MonkOS  v0.1
A simple 64-bit operating system (x86_64)
stdio.h File Reference

Standard i/o library. More...

#include <core.h>
#include <stdarg.h>

Go to the source code of this file.

Functions

int snprintf (char *buf, size_t n, const char *format,...)
 Compose a printf-formatted string into the target buffer. More...
 
int vsnprintf (char *buf, size_t n, const char *format, va_list arg)
 Compose a printf-formatted string into the target buffer using a variable argument list. More...
 

Detailed Description

Standard i/o library.

Definition in file stdio.h.

Function Documentation

int snprintf ( char *  buf,
size_t  n,
const char *  format,
  ... 
)

Compose a printf-formatted string into the target buffer.

If the length of the string is greater than n-1 characters, truncate the remaining characters but return the total number of characters processed.

Parameters
[in]bufPointer to a buffer where the resulting string is to be stored.
[in]nMaximum number of characters in the the buffer, including space for a null terminator.
[in]formatA format-specifier string.
[in]...A variable argument list based on the contents of the format string.
Returns
The number of characters that would have been written if n was sufficiently large.

Referenced by dump_cpuflags(), and dump_registers().

int vsnprintf ( char *  buf,
size_t  n,
const char *  format,
va_list  arg 
)

Compose a printf-formatted string into the target buffer using a variable argument list.

If the length of the string is greater than n-1 characters, truncate the remaining characters but return the total number of characters processed.

Parameters
[in]bufPointer to a buffer where the resulting string is to be stored.
[in]nMaximum number of characters in the the buffer, including space for a null terminator.
[in]formatA format-specifier string.
[in]argVariable arguments list to be initialized with va_start.
Returns
The number of characters that would have been written if n was sufficiently large.

Referenced by logvf(), and tty_printf().