X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2Finclude%2Fstdio.h;h=8d950656c3ce40bec2d491fb8ac8e6ef4d771ac0;hb=7b8c541cd83b70296325dbbf047d682fd7b03c22;hp=985f058cb417e6ef8333cb6574ffecaa47c4a582;hpb=95a7eaaa4a1065334125b65130866f8d1048ddb7;p=tpg%2Facess2.git diff --git a/Usermode/include/stdio.h b/Usermode/include/stdio.h index 985f058c..8d950656 100644 --- a/Usermode/include/stdio.h +++ b/Usermode/include/stdio.h @@ -1,43 +1,47 @@ -/* - * AcessOS LibC - * stdlib.h - */ -#ifndef __STDIO_H +/* + * AcessOS LibC + * stdlib.h + */ +#ifndef __STDIO_H #define __STDIO_H - -#include -#include - -// === Types === + +#include +#include + +/* === Types === */ typedef struct sFILE FILE; - -// === CONSTANTS === -#define EOF (-1) - -// --- Standard IO --- -extern int printf(const char *format, ...); -extern int vsprintf(char *buf, const char *format, va_list args); -extern int sprintf(char *buf, const char *format, ...); - -extern FILE *fopen(const char *file, const char *mode); -extern FILE *freopen(const char *file, const char *mode, FILE *fp); + +/* === CONSTANTS === */ +#define EOF (-1) + +/* --- Standard IO --- */ +extern int printf(const char *format, ...); +extern int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list args); +extern int vsprintf(char *buf, const char *format, va_list args); +extern int sprintf(char *buf, const char *format, ...); +extern int snprintf(char *buf, size_t maxlen, const char *format, ...); + +extern FILE *fopen(const char *file, const char *mode); +extern FILE *freopen(const char *file, const char *mode, FILE *fp); extern FILE *fdopen(int fd, const char *modes); -extern void fclose(FILE *fp); -extern void fflush(FILE *fp); -extern long int ftell(FILE *fp); -extern int fseek(FILE *fp, long int amt, int whence); - -extern size_t fread(void *buf, size_t size, size_t n, FILE *fp); -extern size_t fwrite(void *buf, size_t size, size_t n, FILE *fp); -extern int fgetc(FILE *fp); -extern int fputc(int ch, FILE *fp); - -extern int fprintf(FILE *fp, const char *format, ...); -extern int vfprintf(FILE *fp, const char *format, va_list args); - -extern FILE *stdin; -extern FILE *stdout; -extern FILE *stderr; - -#endif +extern int fclose(FILE *fp); +extern void fflush(FILE *fp); +extern off_t ftell(FILE *fp); +extern int fseek(FILE *fp, long int amt, int whence); + +extern size_t fread(void *buf, size_t size, size_t n, FILE *fp); +extern size_t fwrite(void *buf, size_t size, size_t n, FILE *fp); +extern int fgetc(FILE *fp); +extern int fputc(int ch, FILE *fp); +extern int getchar(void); +extern int putchar(int ch); + +extern int fprintf(FILE *fp, const char *format, ...); +extern int vfprintf(FILE *fp, const char *format, va_list args); + +extern FILE *stdin; +extern FILE *stdout; +extern FILE *stderr; + +#endif