#include <sys/types.h>
#include <stdarg.h>
Go to the source code of this file.
Defines | |
#define | _ABLE_CLIB_STDIO_H 1 |
#define | FILE FILE_t |
Buffered I/O stream. | |
#define | SEEK_SET (0) |
#define | SEEK_CUR (1) |
#define | SEEK_END (2) |
#define | _IOFBF 0 |
#define | _IOLBF 1 |
#define | _IONBF 2 |
#define | stdin stdin |
#define | stdout stdout |
#define | stderr stderr |
#define | BUFSIZ 128 |
#define | EOF (-1) |
#define | L_tmpnam 20 |
#define | P_tmpdir "(ram0)/tmp" |
#define | TMP_MAX 238328 |
Typedefs | |
typedef struct file_s | FILE_t |
typedef int(* | printf_fn_t )(const char *msg,...) |
Functions | |
char * | tmpnam (char *s) |
int | printf (const char *format,...) |
Write a formatted string to stdout. | |
int | fprintf (FILE *stream, const char *format,...) |
Write a formatted string to a FILE . | |
int | sprintf (char *buffer, const char *format,...) |
Write a formatted string to a buffer. | |
int | snprintf (char *str, size_t size, const char *format,...) |
Write a formatted string to a buffer with a maximum size. | |
int | vprintf (const char *format, va_list ap) |
Write a formatted string to stdout. | |
int | vfprintf (FILE *stream, const char *format, va_list ap) |
Write a formatted string to a FILE . | |
int | vsprintf (char *str, const char *format, va_list ap) |
Write a formatted string to a buffer. | |
int | vsnprintf (char *str, size_t size, const char *format, va_list ap) |
Write a formatted string to a buffer with a maximum size. | |
void | perror (const char *s) |
Write a standard error message to stderr. | |
void | clearerr (FILE *stream) |
Clears the end of file and error flags on a stream. | |
int | feof (FILE *stream) |
Test for the end of file condition. | |
int | ferror (FILE *stream) |
Test for the stream error condition. | |
int | fileno (FILE *stream) |
Obtain the underlying file descriptor of a stream. | |
size_t | fread (void *ptr, size_t size, size_t nmemb, FILE *stream) |
Read from a stream into a buffer. | |
size_t | fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
Write into a stream from a buffer. | |
int | fgetc (FILE *stream) |
Read a character from a stream. | |
char * | fgets (char *s, int size, FILE *stream) |
Read a string from a stream. | |
int | getc (FILE *stream) |
Read a character from a stream. | |
int | getchar (void) |
Read a character from stdin. | |
char * | gets (char *s) |
Read a string from stdin. | |
int | ungetc (int c, FILE *stream) |
Put a character back into a stream. | |
int | fputc (int c, FILE *stream) |
Writes a character to a stream. | |
int | fputs (const char *s, FILE *stream) |
Writes a string to a stream. | |
int | putc (int c, FILE *stream) |
Writes a character to a stream. | |
int | putchar (int c) |
Writes a character to stdout. | |
int | puts (const char *s) |
Writes a string to a stdout. | |
FILE * | fopen (const char *path, const char *mode) |
Open a FILE stream from a filename. | |
FILE * | fdopen (int fildes, const char *mode) |
Open a FILE stream from a file descriptor. | |
FILE * | freopen (const char *path, const char *mode, FILE *stream) |
Reopen a FILE stream from a filename. | |
int | fclose (FILE *stream) |
Close a FILE stream. | |
FILE * | tmpfile (void) |
Create a temporray file stream. | |
int | scanf (const char *format,...) |
Read data from stdin into variables according to a format string. | |
int | fscanf (FILE *stream, const char *format,...) |
Read data from a stream into variables according to a format string. | |
int | sscanf (const char *str, const char *format,...) |
Read data from a string into variables according to a format string. | |
int | vscanf (const char *format, va_list ap) |
Read data from stdin into variables according to a format string. | |
int | vfscanf (FILE *stream, const char *format, va_list ap) |
Read data from a stream into variables according to a format string. | |
int | vsscanf (const char *str, const char *format, va_list ap) |
Read data from a string into variables according to a format string. | |
int | fseek (FILE *stream, long offset, int whence) |
Seek within a file stream to a specified position. | |
long | ftell (FILE *stream) |
Obtain the current position in a stream. | |
void | rewind (FILE *stream) |
Set a stream position to the beginning. | |
int | fgetpos (FILE *stream, fpos_t *pos) |
Get the current position of a stream. | |
int | fsetpos (FILE *stream, fpos_t *pos) |
Set the current position of a stream. | |
int | fflush (FILE *stream) |
Flush any pending writes out of a stream. | |
int | remove (const char *pathname) |
Deletes an object from the filesystem. | |
void | setbuf (FILE *stream, char *buf) |
Set the buffer a stream is using. | |
void | setbuffer (FILE *stream, char *buf, size_t size) |
Set the buffer a stream is using. | |
void | setlinebuf (FILE *stream) |
Set the buffering type a stream is using. | |
int | setvbuf (FILE *stream, char *buf, int mode, size_t size) |
Set the buffer a stream is using. | |
int | rename (const char *oldpath, const char *newpath) |
Rename an object on a filesystem. | |
FILE * | popen (const char *command, const char *type) |
Process i/o. | |
int | pclose (FILE *stream) |
Close process i/o stream. | |
Variables | |
FILE * | stdin |
Standard input stream. | |
FILE * | stdout |
Standard output stream. | |
FILE * | stderr |
Standard error output stream. |
#define _ABLE_CLIB_STDIO_H 1 |
#define _IOFBF 0 |
#define _IOLBF 1 |
#define _IONBF 2 |
#define BUFSIZ 128 |
#define EOF (-1) |
#define FILE FILE_t |
Buffered I/O stream.
#define L_tmpnam 20 |
#define P_tmpdir "(ram0)/tmp" |
#define SEEK_CUR (1) |
#define SEEK_END (2) |
#define SEEK_SET (0) |
#define TMP_MAX 238328 |
typedef int(* printf_fn_t)(const char *msg,...) |
void clearerr | ( | FILE * | stream | ) |
int fclose | ( | FILE * | stream | ) |
Close a FILE stream.
FILE* fdopen | ( | int | fildes, | |
const char * | mode | |||
) |
Open a FILE stream from a file descriptor.
int feof | ( | FILE * | stream | ) |
Test for the end of file condition.
stream | the FILE stream to test. |
int ferror | ( | FILE * | stream | ) |
Test for the stream error condition.
stream | the FILE stream to test. |
int fflush | ( | FILE * | stream | ) |
Flush any pending writes out of a stream.
int fgetc | ( | FILE * | stream | ) |
Read a character from a stream.
stream | The FILE stream to read from. |
char* fgets | ( | char * | s, | |
int | size, | |||
FILE * | stream | |||
) |
Read a string from a stream.
s | Output string. | |
size | maximum length of output string including null terminator. | |
stream | The FILE stream to read from. |
int fileno | ( | FILE * | stream | ) |
Obtain the underlying file descriptor of a stream.
stream | the FILE stream to obtain the fd from. |
FILE* fopen | ( | const char * | path, | |
const char * | mode | |||
) |
Open a FILE stream from a filename.
int fprintf | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
int fputc | ( | int | c, | |
FILE * | stream | |||
) |
Writes a character to a stream.
int fputs | ( | const char * | s, | |
FILE * | stream | |||
) |
Writes a string to a stream.
Read from a stream into a buffer.
Read data from a FILE stream into a buffer, the amount of data read is the product of nmemb and size. The odd calling convention allows for easy record based file input.
ptr | The output buffer | |
size | The size of the elements being transfered. | |
nmemb | The number of elements. | |
stream | The FILE stream to read from. |
FILE* freopen | ( | const char * | path, | |
const char * | mode, | |||
FILE * | stream | |||
) |
Reopen a FILE stream from a filename.
int fscanf | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
Read data from a stream into variables according to a format string.
int fseek | ( | FILE * | stream, | |
long | offset, | |||
int | whence | |||
) |
Seek within a file stream to a specified position.
long ftell | ( | FILE * | stream | ) |
Obtain the current position in a stream.
Write into a stream from a buffer.
Write data to a FILE stream from a buffer, the amount of data read is the product of nmemb and size. The odd calling convention allows for easy record based file input.
ptr | The output buffer | |
size | The size of the elements being transfered. | |
nmemb | The number of elements. | |
stream | The FILE stream to write to. |
int getc | ( | FILE * | stream | ) |
int getchar | ( | void | ) |
char* gets | ( | char * | s | ) |
int pclose | ( | FILE * | stream | ) |
Close process i/o stream.
void perror | ( | const char * | s | ) |
FILE* popen | ( | const char * | command, | |
const char * | type | |||
) |
Process i/o.
int printf | ( | const char * | format, | |
... | ||||
) |
Write a formatted string to stdout.
format | The format specifier. | |
... | The values depending of the format specifier. |
int putc | ( | int | c, | |
FILE * | stream | |||
) |
Writes a character to a stream.
int putchar | ( | int | c | ) |
Writes a character to stdout.
int puts | ( | const char * | s | ) |
Writes a string to a stdout.
int remove | ( | const char * | pathname | ) |
Deletes an object from the filesystem.
int rename | ( | const char * | oldpath, | |
const char * | newpath | |||
) |
Rename an object on a filesystem.
void rewind | ( | FILE * | stream | ) |
Set a stream position to the beginning.
Equivalent to (void) fseek(stream, 0L, SEEK_SET)
int scanf | ( | const char * | format, | |
... | ||||
) |
Read data from stdin into variables according to a format string.
void setbuf | ( | FILE * | stream, | |
char * | buf | |||
) |
Set the buffer a stream is using.
Equivalent to setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
void setlinebuf | ( | FILE * | stream | ) |
Set the buffering type a stream is using.
Equivalent to setvbuf(stream, (char *) NULL, _IOLBF, 0);
int snprintf | ( | char * | str, | |
size_t | size, | |||
const char * | format, | |||
... | ||||
) |
Write a formatted string to a buffer with a maximum size.
str | The buffer in which to place the output. | |
size | The size of the str buffer, | |
format | The format specifier. |
int sprintf | ( | char * | buffer, | |
const char * | format, | |||
... | ||||
) |
int sscanf | ( | const char * | str, | |
const char * | format, | |||
... | ||||
) |
Read data from a string into variables according to a format string.
FILE* tmpfile | ( | void | ) |
Create a temporray file stream.
Opens a unique temporary file in binary read/write mode. The file will be automatically deleted when it is closed or the program terminates.
char* tmpnam | ( | char * | s | ) |
int ungetc | ( | int | c, | |
FILE * | stream | |||
) |
Put a character back into a stream.
c | The character. | |
stream | The FILE stream to place the character into. |
int vfprintf | ( | FILE * | stream, | |
const char * | format, | |||
va_list | ap | |||
) |
int vfscanf | ( | FILE * | stream, | |
const char * | format, | |||
va_list | ap | |||
) |
Read data from a stream into variables according to a format string.
int vprintf | ( | const char * | format, | |
va_list | ap | |||
) |
Write a formatted string to stdout.
format | The format specifier. | |
ap | The values depending of the format specifier. |
int vscanf | ( | const char * | format, | |
va_list | ap | |||
) |
Read data from stdin into variables according to a format string.
Write a formatted string to a buffer with a maximum size.
str | The buffer in which to place the output. | |
size | The size of the str buffer, | |
format | The format specifier. | |
ap | The values depending of the format specifier. |
int vsprintf | ( | char * | str, | |
const char * | format, | |||
va_list | ap | |||
) |
Write a formatted string to a buffer.
str | The buffer in which to place the output. | |
format | The format specifier. | |
ap | The values depending of the format specifier. |
int vsscanf | ( | const char * | str, | |
const char * | format, | |||
va_list | ap | |||
) |
Read data from a string into variables according to a format string.
FILE* stderr |
Standard error output stream.
FILE* stdin |
Standard input stream.
FILE* stdout |
Standard output stream.