forked from aligrudi/neatlibc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdio.h
52 lines (45 loc) · 1.42 KB
/
stdio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdarg.h>
#define EOF (-1)
#define putc(c, fp) (fputc(c, fp))
#define getc(fp) (fgetc(fp))
typedef struct {
int fd;
int back; /* pushback buffer */
char *ibuf, *obuf; /* input/output buffer */
int isize, osize; /* ibuf size */
int ilen, olen; /* length of data in buf */
int iown, oown; /* free the buffer when finished */
int icur; /* current position in ibuf */
int ostat;
} FILE;
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
FILE *fopen(char *path, char *mode);
int fclose(FILE *fp);
int fflush(FILE *fp);
void setbuf(FILE *fp, char *buf);
int fputc(int c, FILE *fp);
int putchar(int c);
int printf(char *fmt, ...);
int vprintf(char *fmt, va_list ap);
int fprintf(FILE *fp, char *fmt, ...);
int sprintf(char *dst, char *fmt, ...);
int vsprintf(char *dst, char *fmt, va_list ap);
int vfprintf(FILE *fp, char *fmt, va_list ap);
int snprintf(char *dst, int sz, char *fmt, ...);
int vsnprintf(char *dst, int sz, char *fmt, va_list ap);
int fputs(char *s, FILE *fp);
int puts(char *s);
int fgetc(FILE *fp);
char *fgets(char *s, int sz, FILE *fp);
int scanf(char *fmt, ...);
int fscanf(FILE *fp, char *fmt, ...);
int sscanf(char *s, char *fmt, ...);
int vsscanf(char *s, char *fmt, va_list ap);
int vfscanf(FILE *fp, char *fmt, va_list ap);
int getchar(void);
int ungetc(int c, FILE *fp);
long fwrite(void *s, long sz, long n, FILE *fp);
long fread(void *s, long sz, long n, FILE *fp);
void perror(char *s);