Standard stream interface to Nut/OS devices. More...
Defines | |
#define | EOF (-1) |
End of file. | |
#define | _IOFBF 0x00 |
Fully buffered. | |
#define | _IOLBF 0x01 |
Line buffered. | |
#define | _IONBF 0x02 |
Unbuffered. | |
#define | stdin (__iob[0]) |
Standard input stream. | |
#define | stdout (__iob[1]) |
Standard output stream. | |
#define | stderr (__iob[2]) |
Standard error output stream. | |
#define | CF_LONG 0x01 |
#define | CF_SUPPRESS 0x02 |
#define | CF_SIGNOK 0x04 |
#define | CF_NDIGITS 0x08 |
#define | CF_PFXOK 0x10 |
#define | CF_NZDIGITS 0x20 |
#define | CF_DPTOK 0x10 |
#define | CF_EXPOK 0x20 |
#define | CT_CHAR 0 |
#define | CT_STRING 2 |
#define | CT_INT 3 |
#define | CT_FLOAT 4 |
#define | BUF 16 |
#define | PADSIZE 16 |
#define | NUTCONST const |
#define | ALT 0x01 |
#define | LADJUST 0x04 |
#define | LONGINT 0x08 |
#define | ZEROPAD 0x10 |
Typedefs | |
typedef struct __iobuf | FILE |
Stream structure type. | |
Functions | |
void | clearerr (FILE *stream) |
Reset error status of a stream. | |
int | fclose (FILE *stream) |
Close a stream. | |
void | fcloseall (void) |
Close all open streams. | |
FILE * | _fdopen (int fd, const char *mode) |
Open a stream associated with a file, device or socket descriptor. | |
int | feof (FILE *stream) |
Test if a stream reached the end of file. | |
int | ferror (FILE *stream) |
Test for an error on a stream. | |
int | fflush (FILE *stream) |
Flush a stream. | |
int | fgetc (FILE *stream) |
Read a character from a stream. | |
char * | fgets (char *buffer, int count, FILE *stream) |
Read a line from a stream. | |
int | _fileno (FILE *stream) |
Get the file descriptor associated with a stream. | |
void | _flushall (void) |
Flushes all streams. | |
int | _fmode (const char *mode) |
FILE * | fopen (const char *name, const char *mode) |
Open a stream. | |
int | fprintf (FILE *stream, const char *fmt,...) |
Print formatted data to a stream. | |
int | fprintf_P (FILE *stream, PGM_P fmt,...) |
Print formatted data to a stream. | |
int | fpurge (FILE *stream) |
Purge a stream, i.e. discards the input buffer. | |
int | fputc (int c, FILE *stream) |
Write a character to a stream. | |
int | fputs (const char *string, FILE *stream) |
Write a string to a stream. | |
int | fputs_P (PGM_P string, FILE *stream) |
Write a string from progam memory to a stream. | |
size_t | fread (void *buffer, size_t size, size_t count, FILE *stream) |
Read data from a stream. | |
FILE * | freopen (const char *name, const char *mode, FILE *stream) |
Reassign a stream. | |
int | fscanf (FILE *stream, const char *fmt,...) |
Read formatted data from a stream. | |
int | fscanf_P (FILE *stream, PGM_P fmt,...) |
Read formatted data from a stream. | |
int | fseek (FILE *stream, long offset, int origin) |
Move read/write position of a stream. | |
long | ftell (FILE *stream) |
Return the read/write position of a stream. | |
size_t | fwrite (const void *data, size_t size, size_t count, FILE *stream) |
Write data to a stream. | |
size_t | fwrite_P (PGM_P data, size_t size, size_t count, FILE *stream) |
Write data from program space to a stream. | |
int | getc (FILE *stream) |
Read a character from a stream. | |
int | getchar (void) |
Read a character from a standard input. | |
int | _getf (int _getb(int, void *, size_t), int fd, const char *fmt, va_list ap) |
Read formatted data using a given input function. | |
char * | gets (char *buffer) |
Get a line from the standard input stream. | |
int | printf (const char *fmt,...) |
Print formatted data to the standard output stream. | |
int | printf_P (PGM_P fmt,...) |
Print formatted output to the standard output stream. | |
int | putc (int c, FILE *stream) |
Write a character to a stream. | |
int | putchar (int c) |
Write a character to standard output. | |
int | _putf (int _putb(int, const void *, size_t), int fd, const char *fmt, va_list ap) |
Write formatted data using a given output function. | |
int | puts (const char *string) |
Write a string to stdout. | |
int | puts_P (PGM_P string) |
Write a string from program memory to stdout. | |
int | scanf (const char *fmt,...) |
Read formatted data from the standard input stream. | |
int | scanf_P (PGM_P fmt,...) |
Read formatted data from the standard input stream. | |
int | sprintf (char *buffer, const char *fmt,...) |
Write formatted data to a string. | |
int | sprintf_P (char *buffer, PGM_P fmt,...) |
Write formatted data to a string. | |
int | sscanf (const char *string, const char *fmt,...) |
Read formatted data from a string. | |
int | sscanf_P (const char *string, const char *fmt,...) |
Read formatted data from a string. | |
int | ungetc (int c, FILE *stream) |
Push a character back onto a stream. | |
int | vfprintf (FILE *stream, const char *fmt, va_list ap) |
Write argument list to a stream using a given format. | |
int | vfprintf_P (FILE *stream, PGM_P fmt, va_list ap) |
Write argument list to a stream using a given format. | |
int | vfscanf (FILE *stream, const char *fmt, va_list ap) |
Read formatted data from a stream. | |
int | vfscanf_P (FILE *stream, PGM_P fmt, va_list ap) |
Read formatted data from a stream. | |
int | vsprintf (char *buffer, const char *fmt, va_list ap) |
Write argument list to a string using a given format. | |
int | vsprintf_P (char *buffer, PGM_P fmt, va_list ap) |
Write argument list to a string using a given format. | |
int | vsscanf (const char *string, const char *fmt, va_list ap) |
Read formatted data from a string. | |
int | vsscanf_P (const char *string, PGM_P fmt, va_list ap) |
Read formatted data from a string. | |
Variables | |
FILE * | __iob [] |
FILE * | __iob [FOPEN_MAX] = { (FILE *) 1, (FILE *) 2, (FILE *) 3 } |
Standard stream interface to Nut/OS devices.
#include <stdio.h>
In contrast to the standard, Nut/OS streams do not maintain there own buffers. Any input or output buffering is done in the device driver.
Nut/OS will not associate the standard streams stdin, stdout and stderr to a device when starting the application. Instead, freopen() can be used by the application to redirect any of these stream to any previously opened file, device or connected socket.
As an extension to the standard, many function come in an additional flavour with _P
appended to their name. These functions accept specific parameters pointing into program space.
Output Call Graph
Input Call Graph
#define EOF (-1) |
End of file.
Returned by an input or output operation when the end of a file is encountered. Some routines return this value to indicate an error.
Referenced by _fdopen(), _fmode(), _getf(), EdLineRead(), fclose(), fflush(), fgetc(), fgets(), fopen(), fpurge(), fputc(), freopen(), gets(), NutSmtpSendEncodedLines(), puts(), puts_P(), and ungetc().
#define _IOFBF 0x00 |
Fully buffered.
#define _IOLBF 0x01 |
Line buffered.
#define _IONBF 0x02 |
Unbuffered.
#define stdin (__iob[0]) |
Standard input stream.
Referenced by EdLineOpen(), getchar(), gets(), kbhit(), main(), scanf(), and scanf_P().
#define stdout (__iob[1]) |
Standard output stream.
Referenced by EdLineOpen(), InitDebugDevice(), main(), NutInit(), NUTPANIC(), PhatDirEntryCreate(), PhatDirEntryUpdate(), PhatDirOpen(), PhatDirRead(), PhatFileClose(), PhatFileOpen(), PhatVolMount(), printf(), printf_P(), putchar(), puts(), and puts_P().
#define stderr (__iob[2]) |
Standard error output stream.
Referenced by main(), syslog_flush(), vsyslog(), and vsyslog_P().
#define CF_LONG 0x01 |
Referenced by _getf().
#define CF_SUPPRESS 0x02 |
Referenced by _getf().
#define CF_SIGNOK 0x04 |
Referenced by _getf().
#define CF_NDIGITS 0x08 |
Referenced by _getf().
#define CF_PFXOK 0x10 |
Referenced by _getf().
#define CF_NZDIGITS 0x20 |
Referenced by _getf().
#define CF_DPTOK 0x10 |
Referenced by _getf().
#define CF_EXPOK 0x20 |
Referenced by _getf().
#define CT_CHAR 0 |
Referenced by _getf().
#define CT_STRING 2 |
Referenced by _getf().
#define CT_INT 3 |
Referenced by _getf().
#define CT_FLOAT 4 |
Referenced by _getf().
#define BUF 16 |
Referenced by _putf().
#define PADSIZE 16 |
#define NUTCONST const |
#define ALT 0x01 |
Referenced by _putf().
#define LADJUST 0x04 |
Referenced by _putf().
#define LONGINT 0x08 |
Referenced by _putf().
#define ZEROPAD 0x10 |
Referenced by _putf().
Stream structure type.
A pointer to this type is used for all standard I/O functions to specify a stream.
void clearerr | ( | FILE * | stream | ) |
Reset error status of a stream.
stream | Pointer to a previously opened stream. |
int fclose | ( | FILE * | stream | ) |
Close a stream.
The calling thread may be suspended until all buffered output data has been written.
stream | Pointer to a previously opened stream. |
References __iob, _close(), EBADF, EOF, errno, FOPEN_MAX, free(), and rc.
Referenced by fcloseall(), main(), NutFtpCloseSession(), NutFtpTransferDirectoryOptions(), NutSmtpDisconnect(), service(), Service(), and unix_eeprom_acces().
void fcloseall | ( | void | ) |
FILE* _fdopen | ( | int | fd, |
const char * | mode | ||
) |
Open a stream associated with a file, device or socket descriptor.
fd | Descriptor of a previously opened file, device or connected socket. |
mode | Specifies the access mode.
|
References __iob, _fmode(), _O_TEXT, ENFILE, ENOMEM, EOF, errno, FOPEN_MAX, and malloc().
Referenced by main(), NutFtpOpenSession(), NutFtpTransferDirectoryOptions(), NutSmtpConnect(), service(), and Service().
int feof | ( | FILE * | stream | ) |
int ferror | ( | FILE * | stream | ) |
int fflush | ( | FILE * | stream | ) |
Flush a stream.
The calling thread may be suspended until all buffered output data has been written.
stream | Pointer to a previously opened stream. |
References _write(), EOF, NULL, and NUTASSERT.
Referenced by _flushall(), eeprom_write_byte(), main(), NutFtpProcessPassiv(), NutFtpRespondBad(), NutFtpRespondOk(), NutFtpSendMode(), NutFtpServerSession(), NutHttpProcessRequest(), NutSmtpSendCommand(), NutSmtpSendMail(), ProcessRequests(), ShowForm(), and StreamCopy().
int fgetc | ( | FILE * | stream | ) |
Read a character from a stream.
stream | Pointer to a previously opened stream. |
References _IOEOF, _IOERR, _IOUNG, _read(), EOF, NULL, NUTASSERT, and rc.
Referenced by fgets(), getc(), getchar(), and gets().
char* fgets | ( | char * | buffer, |
int | count, | ||
FILE * | stream | ||
) |
Read a line from a stream.
Read at most one less than the specified number of characters from a stream or stop when a newline has been read.
buffer | Pointer to the buffer that receives the data including the linefeed character. |
count | Maximum number of characters to read. |
stream | Pointer to a previously opened stream. |
References EOF, fgetc(), NULL, and NUTASSERT.
Referenced by main(), NutFtpServerSession(), NutHttpProcessRequest(), NutSmtpReceiveResponse(), and ProcessRequests().
int _fileno | ( | FILE * | stream | ) |
Get the file descriptor associated with a stream.
In contrast to other implementations, the standard streams stdin, stdout and stderr do not return 0, 1 and 2 resp.
stream | Pointer to a previously opened stream. |
References NULL, and NUTASSERT.
Referenced by InitDebugDevice(), kbhit(), main(), syslog_flush(), vfscanf(), and vfscanf_P().
void _flushall | ( | void | ) |
int _fmode | ( | const char * | mode | ) |
FILE* fopen | ( | const char * | name, |
const char * | mode | ||
) |
Open a stream.
name | The name of a registered device, optionally followed by a colon and a filename. |
mode | Specifies the access mode.
|
References __iob, _fmode(), _O_TEXT, _open(), ENFILE, EOF, errno, FOPEN_MAX, free(), and malloc().
Referenced by main(), and unix_eeprom_acces().
int fprintf | ( | FILE * | stream, |
const char * | fmt, | ||
... | |||
) |
Print formatted data to a stream.
stream | Pointer to a previously opened stream. |
fmt | Format string containing conversion specifications. |
References NULL, NUTASSERT, rc, and vfprintf().
Referenced by DhcpStateDebug(), DumpDnsHeader(), DumpDnsQuestion(), DumpDnsResource(), main(), NutArpCacheQuery(), NutArpCacheUpdate(), NutChatExpectString(), NutDhcpClient(), NutDhcpIfConfig(), NutDumpIpcp(), NutDumpIpcpOption(), NutDumpLcp(), NutDumpLcpOption(), NutDumpPap(), NutDumpPapOption(), NutDumpPpp(), NutDumpSocketList(), NutDumpTcpHeader(), NutHeapDump(), NutHttpSendHeaderTop(), NutSmtpSendMailHeader(), NutThreadCreate(), PerCiDump(), PhatDbgDirEntry(), PhatDbgFileInfo(), PhatDbgVbr(), Counter::print(), ProcessRequests(), and ShowForm().
int fprintf_P | ( | FILE * | stream, |
PGM_P | fmt, | ||
... | |||
) |
Print formatted data to a stream.
Similar to fprintf() except that the format string is located in program memory.
stream | Pointer to a previously opened stream. |
fmt | Format string in program space containing conversion specifications. |
References rc, and vfprintf_P().
int fpurge | ( | FILE * | stream | ) |
Purge a stream, i.e. discards the input buffer.
stream | Pointer to a previously opened stream. |
References _read(), EOF, NULL, and NUTASSERT.
int fputc | ( | int | c, |
FILE * | stream | ||
) |
Write a character to a stream.
c | Character to write. |
stream | Pointer to a previously opened stream. |
References _write(), EOF, NULL, and NUTASSERT.
Referenced by DumpDnsResource(), NutArpCacheUpdate(), NutChatExpectString(), NutDumpHeap(), NutDumpPapOption(), NutDumpThreadList(), NutFtpTransferDirectoryOptions(), NutSmtpSendEncodedLines(), PerCiDump(), PhatDbgAttrList(), PhatDbgDirEntry(), putc(), putchar(), puts(), puts_P(), vsyslog(), and vsyslog_P().
int fputs | ( | const char * | string, |
FILE * | stream | ||
) |
Write a string to a stream.
stream | Pointer to a previously opened stream. |
string | String to write. |
References _write(), NULL, NUTASSERT, and strlen().
Referenced by IpcpClose(), IpcpLowerDown(), IpcpLowerUp(), IpcpOpen(), LcpClose(), LcpLowerDown(), LcpLowerUp(), LcpOpen(), main(), NutDumpIpcp(), NutDumpIpcpOption(), NutDumpLcp(), NutDumpLcpOption(), NutDumpPap(), NutDumpPapOption(), NutDumpPpp(), NutDumpSocketList(), NutDumpSockState(), NutDumpTcpHeader(), NutDumpThreadList(), NutDumpThreadQueue(), NutFtpTransferDirectoryOptions(), NutPppInput(), NutPppOutput(), NutSmtpSendCommand(), NutSmtpSendEncodedLines(), NutSmtpSendMail(), PerCiDump(), PhatDbgDirEntry(), ProcessRequests(), puts(), vsyslog(), and vsyslog_P().
int fputs_P | ( | PGM_P | string, |
FILE * | stream | ||
) |
Write a string from progam memory to a stream.
Similar to fputs() except that the string is located in program space.
stream | Pointer to a previously opened stream. |
string | String in program memory to write. |
References _write_P(), NULL, NUTASSERT, and strlen_P.
size_t fread | ( | void * | buffer, |
size_t | size, | ||
size_t | count, | ||
FILE * | stream | ||
) |
Read data from a stream.
buffer | Pointer to the buffer that receives the data. |
size | Item size in bytes. |
count | Maximum number of items to read. |
stream | Pointer to a previously opened stream. |
References _IOEOF, _IOERR, _IOUNG, _read(), NULL, NUTASSERT, and rc.
Referenced by eeprom_read_block(), eeprom_read_byte(), eeprom_read_word(), main(), NutHttpProcessPostQuery(), and StreamCopy().
Reassign a stream.
name | The name of a registered device, optionally followed by a colon and a filename. |
mode | Specifies the access mode.
|
stream | Pointer to a previously opened stream. |
References __iob, _fmode(), _O_TEXT, _open(), EBADF, EOF, errno, FOPEN_MAX, free(), and malloc().
Referenced by InitDebugDevice(), and main().
int fscanf | ( | FILE * | stream, |
const char * | fmt, | ||
... | |||
) |
Read formatted data from a stream.
stream | Pointer to a previously opened stream. |
fmt | Format string containing conversion specifications. |
References NULL, NUTASSERT, rc, and vfscanf().
int fscanf_P | ( | FILE * | stream, |
PGM_P | fmt, | ||
... | |||
) |
Read formatted data from a stream.
Similar to fscanf() except that the format string is expected in program space.
stream | Pointer to a previously opened stream. |
fmt | Format string in program space containing conversion specifications. |
References rc, and vfscanf_P().
int fseek | ( | FILE * | stream, |
long | offset, | ||
int | origin | ||
) |
Move read/write position of a stream.
stream | Pointer to a previously opened stream. |
offset | Number of bytes from initial position. |
origin | Initial position to seek from. |
References _seek(), NULL, and NUTASSERT.
Referenced by unix_eeprom_acces().
long ftell | ( | FILE * | stream | ) |
size_t fwrite | ( | const void * | data, |
size_t | size, | ||
size_t | count, | ||
FILE * | stream | ||
) |
Write data to a stream.
data | Pointer to items to be written. |
size | Item size in bytes. |
count | Number of items to write. |
stream | Pointer to a previously opened stream. |
References _write(), NULL, NUTASSERT, and rc.
Referenced by eeprom_write_byte(), NutHttpProcessAsp(), and StreamCopy().
size_t fwrite_P | ( | PGM_P | data, |
size_t | size, | ||
size_t | count, | ||
FILE * | stream | ||
) |
Write data from program space to a stream.
Similar to fwrite() except that the data is located in program memory.
data | Pointer to items in program space to be written. |
size | Item size in bytes. |
count | Number of items to write. |
stream | Pointer to a previously opened stream. |
References _write_P(), NULL, NUTASSERT, and rc.
int getc | ( | FILE * | stream | ) |
Read a character from a stream.
Same as fgetc().
stream | Pointer to a previously opened stream. |
References fgetc().
int getchar | ( | void | ) |
int _getf | ( | int | _getbint, void *, size_t, |
int | fd, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Read formatted data using a given input function.
_getb | Input function for reading data. |
fd | Descriptor of a previously opened file, device or connected socket. |
fmt | Format string containing coversion specifications. |
ap | List of pointer arguments. |
References CF_DPTOK, CF_EXPOK, CF_LONG, CF_NDIGITS, CF_NZDIGITS, CF_PFXOK, CF_SIGNOK, CF_SUPPRESS, CT_CHAR, CT_FLOAT, CT_INT, CT_STRING, EOF, and strtol().
Referenced by vfscanf(), vfscanf_P(), vsscanf(), and vsscanf_P().
char* gets | ( | char * | buffer | ) |
Get a line from the standard input stream.
Read characters from a stream until a newline has been read.
buffer | Pointer to the buffer that receives the line excluding the linefeed character. |
References EOF, fgetc(), NULL, NUTASSERT, and stdin.
int printf | ( | const char * | fmt, |
... | |||
) |
Print formatted data to the standard output stream.
fmt | Format string containing conversion specifications. |
References NULL, NUTASSERT, rc, stdout, and vfprintf().
int printf_P | ( | PGM_P | fmt, |
... | |||
) |
Print formatted output to the standard output stream.
Similar to printf() except that the format string is located in program memory.
fmt | Format string in program space containing conversion specifications. |
References rc, stdout, and vfprintf_P().
Referenced by NutFtpDataConnect(), and NutFtpServerSession().
int putc | ( | int | c, |
FILE * | stream | ||
) |
Write a character to a stream.
Same as fputc().
c | Character to write. |
stream | Pointer to a previously opened stream. |
References fputc().
int putchar | ( | int | c | ) |
Write a character to standard output.
c | Character to write. |
References fputc(), and stdout.
Referenced by ARM_COMMON_Handler_crash(), main(), ptrace_dump_regs(), Thread1(), Thread2(), X12RtcReadRegs(), and X12RtcWrite().
int _putf | ( | int | _putbint, const void *, size_t, |
int | fd, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Write formatted data using a given output function.
_putb | Output function for writing data. |
fd | Descriptor of a previously opened file, device or connected socket. |
fmt | Format string containing conversion specifications. |
ap | List of arguments. |
References ALT, BUF, dtostre(), dtostrf(), free(), LADJUST, LONGINT, malloc(), memchr(), PGM_P, rc, strcpy(), strcpy_P, strlen(), strlen_P, and ZEROPAD.
Referenced by vfprintf(), vfprintf_P(), vsprintf(), and vsprintf_P().
int puts | ( | const char * | string | ) |
int puts_P | ( | PGM_P | string | ) |
Write a string from program memory to stdout.
Similar to puts() except that the string is located in program memory.
string | String in program memory to write. |
References EOF, fputc(), fputs_P, and stdout.
Referenced by NutFtpDataConnect(), and NutFtpTransferFile().
int scanf | ( | const char * | fmt, |
... | |||
) |
Read formatted data from the standard input stream.
fmt | Format string containing conversion specifications. |
References NULL, NUTASSERT, rc, stdin, and vfscanf().
int scanf_P | ( | PGM_P | fmt, |
... | |||
) |
Read formatted data from the standard input stream.
Similar to scanf() except that the format string is located in program space.
fmt | Format string containing conversion specifications. |
References rc, stdin, and vfscanf_P().
int sprintf | ( | char * | buffer, |
const char * | fmt, | ||
... | |||
) |
Write formatted data to a string.
buffer | Pointer to a buffer that receives the output string. |
fmt | Format string containing conversion specifications. |
References NULL, NUTASSERT, rc, and vsprintf().
int sprintf_P | ( | char * | buffer, |
PGM_P | fmt, | ||
... | |||
) |
Write formatted data to a string.
Similar to sprintf() except that the format string is located in program memory.
buffer | Pointer to a buffer that receives the output string. |
fmt | Format string in program space containing conversion specifications. |
References rc, and vsprintf_P().
int sscanf | ( | const char * | string, |
const char * | fmt, | ||
... | |||
) |
Read formatted data from a string.
string | Pointer to the string that contains the data. |
fmt | Format string containing conversion specifications. |
int sscanf_P | ( | const char * | string, |
const char * | fmt, | ||
... | |||
) |
Read formatted data from a string.
Similar to sscanf() except that the format string is located in program space.
string | Pointer to the string that contains the data. |
fmt | Format string in program space containing conversion specifications. |
References PGM_P, rc, and vsscanf_P().
int ungetc | ( | int | c, |
FILE * | stream | ||
) |
int vfprintf | ( | FILE * | stream, |
const char * | fmt, | ||
va_list | ap | ||
) |
Write argument list to a stream using a given format.
stream | Pointer to a previously opened stream. |
fmt | Format string containing conversion specifications. |
ap | List of arguments. |
References _putf(), _write(), NULL, and NUTASSERT.
Referenced by fprintf(), NUTPANIC(), NutSmtpSendCommand(), printf(), and vsyslog().
int vfprintf_P | ( | FILE * | stream, |
PGM_P | fmt, | ||
va_list | ap | ||
) |
Write argument list to a stream using a given format.
Similar to vfprintf() except that the format string is located in program memory.
stream | Pointer to a previously opened stream. |
fmt | Format string in program space containing conversion specifications. |
ap | List of arguments. |
References _putf(), _write(), memcpy_P, NULL, NUTASSERT, NutHeapAlloc, NutHeapFree, rc, and strlen_P.
Referenced by fprintf_P(), printf_P(), and vsyslog_P().
int vfscanf | ( | FILE * | stream, |
const char * | fmt, | ||
va_list | ap | ||
) |
Read formatted data from a stream.
stream | Pointer to a previously opened stream. |
fmt | Format string containing conversion specifications. |
ap | List of pointer arguments. |
References _fileno(), _getf(), and _read().
Referenced by fscanf(), and scanf().
int vfscanf_P | ( | FILE * | stream, |
PGM_P | fmt, | ||
va_list | ap | ||
) |
Read formatted data from a stream.
Similar to vfscanf() except that the format string is located in program space.
stream | Pointer to a previously opened stream. |
fmt | Format string in program space containing conversion specifications. |
ap | List of pointer arguments. |
References _fileno(), _getf(), _read(), memcpy_P, NutHeapAlloc, NutHeapFree, rc, and strlen_P.
Referenced by fscanf_P(), and scanf_P().
int vsprintf | ( | char * | buffer, |
const char * | fmt, | ||
va_list | ap | ||
) |
Write argument list to a string using a given format.
buffer | Pointer to a buffer that receives the output string. |
fmt | Format string containing conversion specifications. |
ap | List of arguments. |
Referenced by PerCiWriteVarList(), s_printf(), sprintf(), and vsyslog().
int vsprintf_P | ( | char * | buffer, |
PGM_P | fmt, | ||
va_list | ap | ||
) |
Write argument list to a string using a given format.
Similar to vsprintf() except that the format string is located in program memory.
buffer | Pointer to a buffer that receives the output string. |
fmt | Format string in program space containing conversion specifications. |
ap | List of arguments. |
References _putf(), memcpy_P, NutHeapAlloc, NutHeapFree, rc, and strlen_P.
Referenced by sprintf_P(), and vsyslog_P().
int vsscanf | ( | const char * | string, |
const char * | fmt, | ||
va_list | ap | ||
) |
Read formatted data from a string.
string | Pointer to a string that contains the data. |
fmt | Format string containing conversion specifications. |
ap | List of pointer arguments. |
References _getf().
Referenced by sscanf().
int vsscanf_P | ( | const char * | string, |
PGM_P | fmt, | ||
va_list | ap | ||
) |
Read formatted data from a string.
Similar to vsscanf() except that the format string is located in program space.
string | Pointer to a string that contains the data. |
fmt | Format string in program space containing conversion specifications. |
ap | List of pointer arguments. |
References _getf(), memcpy_P, NutHeapAlloc, NutHeapFree, rc, and strlen_P.
Referenced by sscanf_P().
Referenced by _fdopen(), _flushall(), fclose(), fcloseall(), fopen(), and freopen().