fscanf.c File Reference

Implements the functions: fscanf, getch, ungetch. More...

Go to the source code of this file.

Functions

int getc (int)
 getc - get one character from a device
static int getch (int dev, int abuf)
 Get a character from a device with pushback.
static int ungetch (int dev, int abuf)
 Pushback a character for getch.
int _doscan (register char *, register int **, int(*getc)(int, int), int(*ungetc)(int, int), int, int)
 Scan and recognize input according to a format.
int fscanf (int dev, char *fmt, int args)
 Read from a device (file) according to a format.


Detailed Description

Implements the functions: fscanf, getch, ungetch.

Id
fscanf.c 427 2008-02-19 22:46:55Z mschul

Definition in file fscanf.c.


Function Documentation

int _doscan ( register char *  fmt,
register int **  argp,
int(*)(int, int)  getch,
int(*)(int, int)  ungetch,
int  arg1,
int  arg2 
)

Scan and recognize input according to a format.

Parameters:
*fmt format string for the scanf
**argp arguments to scanf
getch function to unget a character
ungetch function to unget a character
arg1 1st argument to getch/ungetch
arg2 2nd argument to getch/ungetch

Definition at line 49 of file doscan.c.

References EOF, getch(), and ungetch().

Here is the call graph for this function:

int fscanf ( int  dev,
char *  fmt,
int  args 
)

Read from a device (file) according to a format.

Parameters:
dev device to read from
*fmt format string
args number of arguments in format string
Returns:
result of _doscan

Definition at line 26 of file fscanf.c.

References _doscan(), EMPTY, getch(), and ungetch().

Here is the call graph for this function:

int getc ( int  descrp  ) 

getc - get one character from a device

Parameters:
descrp definition of device from which to acquire character
Returns:
function to get character on success, SYSERR on failure

Definition at line 17 of file getc.c.

References isbaddev, and SYSERR.

static int getch ( int  dev,
int  abuf 
) [static]

Get a character from a device with pushback.

Parameters:
dev device to read from
*buf buffer for reading into

Definition at line 39 of file fscanf.c.

References EMPTY, EOF, and getc().

Referenced by _doscan(), and fscanf().

Here is the call graph for this function:

Here is the caller graph for this function:

static int ungetch ( int  dev,
int  abuf 
) [static]

Pushback a character for getch.

Parameters:
dev device to push back to
*buf buffer for pushing back from

Definition at line 54 of file fscanf.c.

References EMPTY.

Referenced by _doscan(), and fscanf().

Here is the caller graph for this function:


Generated on Wed Aug 27 06:08:19 2008 for Embedded XINU by  doxygen 1.5.5