Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1622 → Rev 1623

//uspace/trunk/libc/generic/io/printf.c
30,6 → 30,10
#include <stdio.h>
#include <stdio.h>
 
/** Print formatted text.
* @param fmt format string
* \see For more details about format string see printf_core.
*/
int printf(const char *fmt, ...)
{
int ret;
//uspace/trunk/libc/generic/io/snprintf.c
30,6 → 30,12
#include <stdio.h>
#include <io/printf_core.h>
 
/** Print formatted to the given buffer with limited size.
* @param str buffer
* @param size buffer size
* @param fmt format string
* \see For more details about format string see printf_core.
*/
int snprintf(char *str, size_t size, const char *fmt, ...)
{
int ret;
//uspace/trunk/libc/generic/io/sprintf.c
30,6 → 30,11
#include <stdio.h>
#include <io/printf_core.h>
 
/** Print formatted to the given buffer.
* @param str buffer
* @param fmt format string
* \see For more details about format string see printf_core.
*/
int sprintf(char *str, const char *fmt, ...)
{
int ret;
//uspace/trunk/libc/generic/io/vprintf.c
38,6 → 38,11
return write(1, str, count);
}
 
/** Print formatted text.
* @param fmt format string
* @param ap format parameters
* \see For more details about format string see printf_core.
*/
int vprintf(const char *fmt, va_list ap)
{
struct printf_spec ps = {(int(*)(void *, size_t, void *))vprintf_write, NULL};
//uspace/trunk/libc/generic/io/vsnprintf.c
83,6 → 83,12
return count;
}
 
/** Print formatted to the given buffer with limited size.
* @param str buffer
* @param size buffer size
* @param fmt format string
* \see For more details about format string see printf_core.
*/
int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
{
struct vsnprintf_data data = {size, 0, str};
//uspace/trunk/libc/generic/io/vsprintf.c
30,6 → 30,12
#include <stdio.h>
#include <io/printf_core.h>
 
/** Print formatted to the given buffer.
* @param str buffer
* @param fmt format string
* @param ap argument list
* \see For more details about format string see printf_core.
*/
int vsprintf(char *str, const char *fmt, va_list ap)
{
return vsnprintf(str, (size_t)-1, fmt, ap);