C standard library :: stdio
Standard for input og output i gcc. Den er under udarbejdelse og derfor ikke komplet endnu.
Macro
Navn | Beskrivelse |
---|---|
_IOFBF | integer konstant |
_IOLBF | integer konstant |
_IONBF | integer konstant |
BUFSIZ | integer konstant >=256 |
EOF | integer konstant <0 |
SEEK_SET | integer konstant |
SEEK_CUR | integer konstant |
SEEK_END | integer konstant |
P_tmpdir | string konstant |
L_tmpnam | integer konstant >0 default 20 |
TMP_MAX | integer konstant >0 default 238328 |
FILENAME_MAX | integer konstant >0 default 4096 |
NULL | integer konstant defineret som (void *)0 i C og 0 i C++ |
stdin | pointer til FILE |
stdout | pointer til FILE |
stderr | pointer til FILE |
Type
Navn | Beskrivelse |
---|---|
FILE | Fil erklæring |
fpos_t | |
size_t |
Function
Navn | Beskrivelse |
---|---|
int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); |
Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. |
int dprintf (int __fd, __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); |
Write formatted output to a file descriptor. |
int fclose (FILE *__stream) __THROW; | Close STREAM. |
int fcloseall (void) __THROW; | Close all streams. |
FILE *fdopen (int __fd, __const char *__modes) __THROW; | Create a new stream that refers to an existing system file descriptor. |
int fflush (FILE *__stream) __THROW; | Flush STREAM, or all streams if STREAM is NULL. |
int fflush_unlocked (FILE *__stream) __THROW; | Faster versions when locking is not required. |
FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __THROW; | Create a new stream that refers to a memory buffer. |
FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __THROW; |
Open a file and create a new stream for it. |
FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) __THROW; |
Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. |
int printf (__const char *__restrict __format, ...) __THROW; | Write formatted output to stdout. |
int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...) __THROW; |
Write formatted output to STREAM. |
FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __THROW; |
Open a file, replacing an existing stream with it. |
int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __THROW; |
Read formatted input from STREAM. |
FILE *open_memstream (char **__restrict __bufloc, size_t *__restrict __sizeloc) __THROW; |
Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. |
int remove (__const char *__filename) __THROW; | Remove file FILENAME |
int rename (__const char *__old, __const char *__new) __THROW; | Rename file OLD to NEW. |
int scanf (__const char *__restrict __format, ...) __THROW; | Read formatted input from stdin. |
void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; | If BUF is NULL, make STREAM unbuffered.
Else make it use buffer BUF, of size BUFSIZ. |
int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW; |
Make STREAM use buffering mode MODE.
If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. |
int sprintf (char *__restrict __s, __const char *__restrict __format, ...) __THROW; |
Write formatted output to S. |
int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4))); |
Maximum chars of output to write in MAXLEN. |
int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __THROW; |
Read formatted input from S. |
FILE *tmpfile (void) __THROW; | Create a temporary file and open it read/write. |
char *tmpnam (char *__s) __THROW; | Generate a temporary filename. |
int vasprintf (char **__restrict __ptr, __const char *__restrict __f, _G_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 2, 0))); |
Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. |
int vdprintf (int __fd, __const char *__restrict __fmt, _G_va_list __arg) |
Write formatted output to a file descriptor. |
int vfprintf (FILE *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW; |
Write formatted output to S from argument list ARG. |
int vfscanf (FILE *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); |
Read formatted input from S into argument list ARG. |
int vprintf (__const char *__restrict __format, _G_va_list __arg) __THROW; |
Write formatted output to stdout from argument list ARG. |
int vsprintf (char *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW; |
Write formatted output to S from argument list ARG. |
int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 3, 0))); |
Maximum chars of output to write in MAXLEN. |
int vscanf (__const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 1, 0))); |
Read formatted input from stdin into argument list ARG. |
int vsscanf (__const char *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); |
Read formatted input from S into argument list ARG. |
int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); |
Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. |
sideskift(); ?>