Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
stdio.h File Reference
#include <stdarg.h>

Go to the source code of this file.

Macros

#define ENOMEM   12 /* Out of Memory */
 
#define EINVAL   22 /* Invalid argument */
 
#define ENOSPC   28 /* No space left on device */
 
#define fprintf(fmt, args...)   printf(args)
 

Functions

int printf (const char *fmt,...) __attribute__((format(printf
 
int sprintf (char *buf, const char *fmt,...) __attribute__((format(printf
 
int int vsprintf (char *buf, const char *fmt, va_list args)
 

Macro Definition Documentation

#define EINVAL   22 /* Invalid argument */

Definition at line 7 of file stdio.h.

#define ENOMEM   12 /* Out of Memory */

Definition at line 6 of file stdio.h.

#define ENOSPC   28 /* No space left on device */

Definition at line 8 of file stdio.h.

#define fprintf (   fmt,
  args... 
)    printf(args)

Definition at line 12 of file stdio.h.

Function Documentation

int printf ( const char fmt,
  ... 
)

Definition at line 323 of file stdio.c.

int sprintf ( char buf,
const char fmt,
  ... 
)

Definition at line 309 of file stdio.c.

int int vsprintf ( char buf,
const char fmt,
va_list  args 
)

vsprintf - Format a string and place it in a buffer : The buffer to place the result into : The format string to use : Arguments for the format string

The function returns the number of characters written into . Use vsnprintf() or vscnprintf() in order to avoid buffer overflows.

If you're not already dealing with a va_list consider using sprintf().

See the vsnprintf() documentation for format string extensions over C99.

Definition at line 126 of file stdio.c.