MicrOS
vfscanf.c File Reference
#include <stdarg.h>
#include "../stdio.h"
#include "../ctype.h"

Macros

#define FLAGS_CHAR   (1)
 
#define FLAGS_SHORT   (1 << 1)
 
#define FLAGS_LONG   (1 << 2)
 
#define FLAGS_LONG_LONG   (1 << 3)
 

Functions

static int _getc (FILE *stream)
 
static int _ungetc (int c, FILE *stream)
 
int _get_number_from_file (FILE *stream, int width)
 
int _get_decimal_number_from_file (FILE *stream, int width)
 
int _get_hex_number_from_file (FILE *stream, int width)
 
int _get_octal_number_from_file (FILE *stream, int width)
 
int vfscanf (FILE *stream, const char *format, va_list arg)
 Read formatted data from stream into variable argument list. More...
 

Variables

unsigned int _read_characters_count
 

Macro Definition Documentation

◆ FLAGS_CHAR

#define FLAGS_CHAR   (1)

◆ FLAGS_LONG

#define FLAGS_LONG   (1 << 2)

◆ FLAGS_LONG_LONG

#define FLAGS_LONG_LONG   (1 << 3)

◆ FLAGS_SHORT

#define FLAGS_SHORT   (1 << 1)

Function Documentation

◆ _get_decimal_number_from_file()

int _get_decimal_number_from_file ( FILE stream,
int  width 
)

◆ _get_hex_number_from_file()

int _get_hex_number_from_file ( FILE stream,
int  width 
)

◆ _get_number_from_file()

int _get_number_from_file ( FILE stream,
int  width 
)

◆ _get_octal_number_from_file()

int _get_octal_number_from_file ( FILE stream,
int  width 
)

◆ _getc()

static int _getc ( FILE stream)
inlinestatic

◆ _ungetc()

static int _ungetc ( int  c,
FILE stream 
)
inlinestatic

◆ vfscanf()

int vfscanf ( FILE stream,
const char *  format,
va_list  arg 
)

Read formatted data from stream into variable argument list.

Reads data from the stream and stores them according to parameter format into the locations pointed by the elements in the variable argument list identified by arg.

Parameters
streamPointer to a FILE object that identifies an input stream.
formatC string that contains the text to be written to the stream.Can contain embedded format specifiers.
argA value identifying a variable arguments list initialized with va_start.
Returns
On success, the function returns the number of items of the argument list successfully filled. Otherwise, EOF.

Variable Documentation

◆ _read_characters_count

unsigned int _read_characters_count