hdo  beta
Definice maker | Funkce | Proměnné
Dokumentace souboru /home/mrazik/Documents/web/old/hdo/at91lib/utility/stdio.c
#include <stdio.h>
#include <stdarg.h>

Zobrazit zdrojový text tohoto souboru.

Definice maker

#define MAX_STRING_SIZE   100

Funkce

signed int PutChar (char *pStr, char c)
signed int PutString (char *pStr, const char *pSource)
signed int PutUnsignedInt (char *pStr, char fill, signed int width, unsigned int value)
signed int PutSignedInt (char *pStr, char fill, signed int width, signed int value)
signed int PutHexa (char *pStr, char fill, signed int width, unsigned char maj, unsigned int value)
signed int vsnprintf (char *pStr, size_t length, const char *pFormat, va_list ap)
signed int snprintf (char *pString, size_t length, const char *pFormat,...)
signed int vsprintf (char *pString, const char *pFormat, va_list ap)
signed int vfprintf (FILE *pStream, const char *pFormat, va_list ap)
signed int vprintf (const char *pFormat, va_list ap)
signed int fprintf (FILE *pStream, const char *pFormat,...)
signed int printf (const char *pFormat,...)
signed int sprintf (char *pStr, const char *pFormat,...)
signed int puts (const char *pStr)

Proměnné

struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0}
struct _reent * _impure_ptr = &r

Detailní popis

!Purpose

Implementation of several stdio.h methods, such as printf(), sprintf() and so on. This reduces the memory footprint of the binary when using those methods, compared to the libc implementation.

!Usage

Adds stdio.c to the list of file to compile for the project. This will automatically replace libc methods by the custom ones.

Definice v souboru stdio.c.


Dokumentace funkcí

signed int fprintf ( FILE *  pStream,
const char *  pFormat,
  ... 
)

Outputs a formatted string on the given stream, using a variable number of arguments.

Parametry:
pStreamOutput stream.
pFormatFormat string.

Definice je uvedena na řádku 455 v souboru stdio.c.

Odkazuje se na result a vfprintf().

signed int printf ( const char *  pFormat,
  ... 
)

Outputs a formatted string on the DBGU stream, using a variable number of arguments.

Parametry:
pFormatFormat string.

Definice je uvedena na řádku 473 v souboru stdio.c.

Odkazuje se na result a vprintf().

Používá se v main().

signed int puts ( const char *  pStr)

Outputs a string on stdout.

Parametry:
pStrString to output.

Definice je uvedena na řádku 508 v souboru stdio.c.

signed int snprintf ( char *  pString,
size_t  length,
const char *  pFormat,
  ... 
)

Stores the result of a formatted string into another string. Format arguments are given in a va_list instance. Return the number of characters written.

Parametry:
pStringDestination string.
lengthLength of Destination string.
pFormatFormat string.
...Other arguments

Definice je uvedena na řádku 390 v souboru stdio.c.

Odkazuje se na vsnprintf().

signed int sprintf ( char *  pStr,
const char *  pFormat,
  ... 
)

Writes a formatted string inside another string.

Parametry:
pStrStorage string.
pFormatFormat string.

Definice je uvedena na řádku 491 v souboru stdio.c.

Odkazuje se na result a vsprintf().

Používá se v tlg_decode().

signed int vfprintf ( FILE *  pStream,
const char *  pFormat,
va_list  ap 
)

Outputs a formatted string on the given stream. Format arguments are given in a va_list instance.

Parametry:
pStreamOutput stream.
pFormatFormat string
apArgument list.

Definice je uvedena na řádku 422 v souboru stdio.c.

Odkazuje se na vsprintf().

Používá se v fprintf() a vprintf().

signed int vprintf ( const char *  pFormat,
va_list  ap 
)

Outputs a formatted string on the DBGU stream. Format arguments are given in a va_list instance.

Parametry:
pFormatFormat string
apArgument list.

Definice je uvedena na řádku 444 v souboru stdio.c.

Odkazuje se na vfprintf().

Používá se v printf().

signed int vsnprintf ( char *  pStr,
size_t  length,
const char *  pFormat,
va_list  ap 
)

Stores the result of a formatted string into another string. Format arguments are given in a va_list instance. Return the number of characters written.

Parametry:
pStrDestination string.
lengthLength of Destination string.
pFormatFormat string.
apArgument list.

Definice je uvedena na řádku 292 v souboru stdio.c.

Používá se v snprintf() a vsprintf().

signed int vsprintf ( char *  pString,
const char *  pFormat,
va_list  ap 
)

Stores the result of a formatted string into another string. Format arguments are given in a va_list instance. Return the number of characters written.

Parametry:
pStringDestination string.
pFormatFormat string.
apArgument list.

Definice je uvedena na řádku 410 v souboru stdio.c.

Odkazuje se na vsnprintf().

Používá se v sprintf() a vfprintf().