16#define NULL ((void *)0)
21typedef struct stdio_file
FILE;
29#define FILENAME_MAX 256
80size_t fread(
void *ptr,
size_t size,
size_t count,
FILE *stream);
81size_t fwrite(
const void *ptr,
size_t size,
size_t count,
FILE *stream);
91int puts(
const char *s);
130int sscanf(const
char *str, const
char *fmt, ...);
136int rename(const
char *old_path, const
char *new_path);
137int renameat(
int old_dirfd, const
char *old_path,
int new_dirfd, const
char *new_path);
void perror(const char *s)
print a message followed by the string for the current errno.
variable argument lists (the compiler's builtins).
__builtin_va_list va_list
variadic arguments, from the compiler's builtins.
Definition stdarg.h:8
struct stdio_file FILE
Definition stdio.h:21
int putchar_unlocked(int c)
int int fprintf(FILE *stream, const char *fmt,...) __attribute__((format(printf
int vfprintf(FILE *stream, const char *fmt, va_list ap)
int getc_unlocked(FILE *stream)
int int int int int int vprintf(const char *fmt, va_list ap)
FILE * fmemopen(void *memory, size_t size, const char *mode)
a stream on size bytes of memory (or on new memory, freed by fclose, when memory is NULL).
int ftrylockfile(FILE *stream)
FILE * tmpfile(void)
a new file for reading and writing that goes when it is closed (it is made in /tmp and removed at onc...
FILE * fopen(const char *path, const char *mode)
int vsprintf(char *buf, const char *fmt, va_list ap)
void flockfile(FILE *stream)
int remove(const char *path)
remove a file or an empty directory.
int putc_unlocked(int c, FILE *stream)
void setbuf(FILE *stream, char *buf)
int putc(int c, FILE *stream)
int ungetc(int c, FILE *stream)
int int int int int snprintf(char *buf, size_t size, const char *fmt,...) __attribute__((format(printf
int int int dprintf(int fd, const char *fmt,...) __attribute__((format(printf
ssize_t getline(char **line, size_t *size, FILE *stream)
read a line, with its newline, into *line (made larger with realloc as it needs; *line may be NULL an...
int fseek(FILE *stream, long offset, int whence)
int sscanf(const char *str, const char *fmt,...)
formatted input from a string: d i u x o c s %[...] n and %%, with widths and the lengths hh h l ll z...
int vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
int fputs(const char *s, FILE *stream)
FILE * popen(const char *command, const char *mode)
run "sh -c command" with a pipe to its standard output ("r") or from its standard input ("w").
FILE * freopen(const char *path, const char *mode, FILE *stream)
give a stream another file: the old file is closed, the stream keeps its fd number (so freopen on std...
void funlockfile(FILE *stream)
int fsetpos(FILE *stream, const fpos_t *pos)
off_t ftello(FILE *stream)
ssize_t getdelim(char **line, size_t *size, int delimiter, FILE *stream)
as getline, up to and with delimiter instead of a newline
int fseeko(FILE *stream, off_t offset, int whence)
size_t fwrite(const void *ptr, size_t size, size_t count, FILE *stream)
void rewind(FILE *stream)
off_t fpos_t
Definition stdio.h:94
int rename(const char *old_path, const char *new_path)
rename a file or directory (on the same filesystem).
int renameat(int old_dirfd, const char *old_path, int new_dirfd, const char *new_path)
void clearerr(FILE *stream)
int printf(const char *fmt,...) __attribute__((format(printf
formatted output.
int fputc(int c, FILE *stream)
int puts(const char *s)
Definition stdio.c:286
char * fgets(char *buf, int size, FILE *stream)
int vdprintf(int fd, const char *fmt, va_list ap)
int int int int sprintf(char *buf, const char *fmt,...) __attribute__((format(printf
int pclose(FILE *stream)
close a stream of popen and wait for the command.
int fgetpos(FILE *stream, fpos_t *pos)
int setvbuf(FILE *stream, char *buf, int mode, size_t size)
FILE * fdopen(int fd, const char *mode)
size_t fread(void *ptr, size_t size, size_t count, FILE *stream)
int getchar_unlocked(void)
ELF32 file header.
Definition elf.h:51
__INT64_TYPE__ off_t
Definition types.h:20
__PTRDIFF_TYPE__ ssize_t
Definition types.h:15