commit afbbce1c68ac68c42f06f7a99abefd2f2b432bc2
parent 594f195027fdcc6d09b246337d5c4039d18d9ec1
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 17 Feb 2017 14:34:52 +0100
[libc] Update stdio.h from the c99 text
Diffstat:
M | libc/include/stdio.h | | | 94 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
1 file changed, 47 insertions(+), 47 deletions(-)
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
@@ -12,55 +12,55 @@
#define SEEK_END 1
#define SEEK_SET 2
-
-extern FILE *fopen(const char *, const char *mode);
-extern FILE *freopen(const char *path, const char *mode, FILE *fp);
-extern int fclose(FILE *fp);
-
-extern int fflush(FILE *fp);
-extern void setbuf(FILE *fp, char *buf);
-extern int setvbuf(FILE *fp, char *buf, size_t size);
-
-extern size_t fread(void *ptr, size_t size, size_t n, FILE *fp);
-extern size_t fwrite(const void *ptr, size_t size, size_t n, FILE *fp);
-
-extern int fgetc(FILE *fp);
-extern int getc(FILE *fp);
+extern int remove(const char *filename);
+extern int rename(const char *old, const char *new);
+extern FILE *tmpfile(void);
+extern char *tmpnam(char *s);
+extern int fclose(FILE *stream);
+extern int fflush(FILE *stream);
+extern FILE *fopen(const char * restrict filename, const char * restrict mode);
+extern FILE *freopen(const char * restrict filename, const char * restrict mode,
+ FILE * restrict stream);
+extern void setbuf(FILE * restrict stream, char * restrict buf);
+extern int setvbuf(FILE * restrict stream, char * restrict buf, int mode, size_t size);
+extern int fprintf(FILE * restrict stream, const char * restrict format, ...);
+extern int fscanf(FILE * restrict stream, const char * restrict format, ...);
+extern int printf(const char * restrict format, ...);
+extern int scanf(const char * restrict format, ...);
+extern int snprintf(char * restrict s, size_t n, const char * restrict format, ...);
+extern int sprintf(char * restrict s, const char * restrict format, ...);
+extern int sscanf(const char * restrict s, const char * restrict format, ...);
+extern int vfprintf(FILE * restrict stream, const char * restrict format, va_list arg);
+extern int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg);
+extern int vprintf(const char * restrict format, va_list arg);
+extern int vscanf(const char * restrict format, va_list arg);
+extern int vsnprintf(char * restrict s, size_t n, const char * restrict format,
+ va_list arg);
+extern int vsprintf(char * restrict s, const char * restrict format, va_list arg);
+extern int vsscanf(const char * restrict s, const char * restrict format, va_list arg);
+extern int fgetc(FILE *stream);
+extern char *fgets(char * restrict s, int n, FILE * restrict stream);
+extern int fputc(int c, FILE *stream);
+extern int fputs(const char * restrict s, FILE * restrict stream);
+extern int getc(FILE *stream);
extern int getchar(void);
-
-extern int fputc(int c, FILE *fp);
-extern int putc(int c, FILE *fp);
-extern int putchar(int c);
-
-extern char *fgets(char *s, int size, FILE *fp);
extern char *gets(char *s);
-
-extern int fputs(char *s, FILE *fp);
-extern int puts(char *s);
-
-extern int scanf(const char *fmt, ...);
-extern int fscanf(FILE *fp, const char *fmt, ...);
-extern int sscanf(char *s, const char *fmt, ...);
-
-extern int printf(const char *fmt, ...);
-extern int fprintf(FILE *fp, const char *fmt, ...);
-extern int sprintf(char *s, const char *fmt, ...);
-extern int snprintf(char *s, size_t size, const char *fmt, ...);
-
+extern int putc(int c, FILE *stream);
+extern int putchar(int c);
+extern int puts(const char *s);
+extern int ungetc(int c, FILE *stream);
+extern size_t fread(void * restrict ptr, size_t size, size_t nmemb,
+ FILE * restrict stream);
+extern size_t fwrite(const void * restrict ptr, size_t size, size_t nmemb,
+ FILE * restrict stream);
+extern int fgetpos(FILE * restrict stream, fpos_t * restrict pos);
+extern int fseek(FILE *stream, long int offset, int whence);
+extern int fsetpos(FILE *stream, const fpos_t *pos);
+extern long int ftell(FILE *stream);
+extern void rewind(FILE *stream);
+extern void clearerr(FILE *stream);
+extern int feof(FILE *stream);
+extern int ferror(FILE *stream);
extern void perror(const char *s);
-extern long ftell(FILE *fp);
-extern long fseek(FILE *fp);
-extern void rewind(FILE *fp);
-
-extern void clearerr(FILE *fp);
-extern int feof(FILE *fp);
-extern int ferror(FILE *fp);
-
-extern int remove(const char *name);
-extern int rename(const char *old, const char *new);
-extern FILE *tmpfile(void);
-extern FILE *tmpnam(char *s);
-
-extern FILE *stdin, *stdout, *stderr;
#endif