![]() |
Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
|
#include <pthread.h>#include <stdarg.h>#include <stddef.h>#include <stdint.h>#include <sys/reent.h>#include <sys/types.h>

Go to the source code of this file.
Data Structures | |
| union | FILE |
Macros | |
| #define | SEEK_SET 0 |
| #define | SEEK_CUR 1 |
| #define | SEEK_END 2 |
| #define | fopen _fopen |
| #define | fclose _fclose |
| #define | fread _fread |
| #define | fwrite _fwrite |
| #define | fseek _fseek |
| #define | fileno _fileno |
| #define | __SIZEOF_FILE sizeof(__FILE) |
Functions | |
| FILE * | fopen (const char *pathname, const char *mode) |
| Open the file whose name is the string pointed to by pathname and associate a stream with it. More... | |
| int | fclose (FILE *stream) |
| Close the given file stream. More... | |
| size_t | fread (void *ptr, size_t size, size_t nmemb, FILE *stream) |
| Read nmemb items of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. More... | |
| size_t | fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
| Write nmemb items of data, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr. More... | |
| int | fseek (FILE *stream, long offset, int whence) |
| Set the file position indicator for the stream pointed to by stream. More... | |
| int | fileno (FILE *stream) |
| Examine the argument stream and returns the integer file descriptor used to implement this stream. More... | |
| int | printf (const char *format,...) |
| Format and print data to the standard output. More... | |
| int | fprintf (FILE *stream, const char *format,...) |
| Format and print data to a file. More... | |
| int | dprintf (int fd, const char *format,...) |
| Format and print data to a file. More... | |
| int | sprintf (char *str, const char *format,...) |
| Format and print data to a buffer. More... | |
| int | snprintf (char *str, size_t size, const char *format,...) |
| Format and print data to a buffer with limited buffer size. More... | |
| int | vprintf (const char *format, va_list ap) |
| Format and print data to the standard output with argument list. More... | |
| int | vfprintf (FILE *stream, const char *format, va_list ap) |
| Format and print data to a file with argument list. More... | |
| int | vdprintf (int fd, const char *format, va_list ap) |
| Format and print data to a file with argument list. More... | |
| int | vsprintf (char *str, const char *format, va_list ap) |
| Format and print data to a buffer with argument list. More... | |
| int | vsnprintf (char *str, size_t size, const char *format, va_list ap) |
| Format and print data to a buffer with limited size and argument list. More... | |
Variables | |
| FILE * | stdin |
| FILE * | stdout |
| FILE * | stderr |
| int dprintf | ( | int | fd, |
| const char * | format, | ||
| ... | |||
| ) |
Format and print data to a file.
| str | The pointer to the print buffer. |
| format | Format string. |
| ... | Print arguments. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int fclose | ( | FILE * | stream | ) |
Close the given file stream.
| stream | The file stream to provide. |
| int | 0 on success and nonzero error number on error. |
| int fileno | ( | FILE * | stream | ) |
Examine the argument stream and returns the integer file descriptor used to implement this stream.
| stream | The file stream to provide. |
| int | The file descriptor integer. |
| FILE* fopen | ( | const char * | pathname, |
| const char * | mode | ||
| ) |
Open the file whose name is the string pointed to by pathname and associate a stream with it.
| pathname | The pathname of the file to open. |
| mode | Not used. |
| FILE | *: File stream object. |
| int fprintf | ( | FILE * | stream, |
| const char * | format, | ||
| ... | |||
| ) |
Format and print data to a file.
| stream | The pointer to the file stream. |
| format | Format string. |
| ... | Print arguments. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| size_t fread | ( | void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| FILE * | stream | ||
| ) |
Read nmemb items of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr.
| ptr | The memory space for storing the read data. |
| size | The number of nmemb bytes to read. |
| nmemb | The bytes number to read at once. |
| stream | The file stream to provide. |
| int | The read number on success and nonzero error number on error. |
| int fseek | ( | FILE * | stream, |
| long | offset, | ||
| int | whence | ||
| ) |
Set the file position indicator for the stream pointed to by stream.
| stream | The file stream to provide. |
| offset | The new offset to the position specified by whence. |
| whence | The start position of the new offset. |
| int | The new file position on success and nonzero error number on error. |
| size_t fwrite | ( | const void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| FILE * | stream | ||
| ) |
Write nmemb items of data, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr.
| ptr | The data to write to the file. |
| size | The number of nmemb bytes to write. |
| nmemb | The byte number to write at once. |
| stream | The file stream to provide. |
| int | The write number on success and nonzero error number on error. |
| int printf | ( | const char * | format, |
| ... | |||
| ) |
Format and print data to the standard output.
| format | Format string. |
| ... | Print arguments. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int snprintf | ( | char * | str, |
| size_t | size, | ||
| const char * | format, | ||
| ... | |||
| ) |
Format and print data to a buffer with limited buffer size.
| str | The pointer to the print buffer. |
| size | The size of the buffer. |
| format | Format string. |
| ... | Print arguments. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int sprintf | ( | char * | str, |
| const char * | format, | ||
| ... | |||
| ) |
Format and print data to a buffer.
| str | The pointer to the print buffer. |
| format | Format string. |
| ... | Print arguments. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int vdprintf | ( | int | fd, |
| const char * | format, | ||
| va_list | ap | ||
| ) |
Format and print data to a file with argument list.
| fd: File descriptor number. | |
| format | Format string. |
| ap | Argument list. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int vfprintf | ( | FILE * | stream, |
| const char * | format, | ||
| va_list | ap | ||
| ) |
Format and print data to a file with argument list.
| stream | The pointer to the file stream. |
| format | Format string. |
| ap | Argument list. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int vprintf | ( | const char * | format, |
| va_list | ap | ||
| ) |
Format and print data to the standard output with argument list.
| format | Format string. |
| ap | Argument list. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int vsnprintf | ( | char * | str, |
| size_t | size, | ||
| const char * | format, | ||
| va_list | ap | ||
| ) |
Format and print data to a buffer with limited size and argument list.
| str | The pointer to the print buffer. |
| size | The size of the buffer. |
| format | Format string. |
| ap | Argument list. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |
| int vsprintf | ( | char * | str, |
| const char * | format, | ||
| va_list | ap | ||
| ) |
Format and print data to a buffer with argument list.
| str | The pointer to the print buffer. |
| size | The size of the buffer. |
| format | Format string. |
| ap | Argument list. |
| Upon | successful return, the function returns the number of characters printed; otherwie a negative value is returned. |