diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
commit | c92305221770bb1316d026c200d569ca4e930e42 (patch) | |
tree | bf3e496991e74bd6f2415cf156a7226729f0058b /lib/libc/include/stdio.h | |
parent | 69f2ee15025ccedaae0308c50b7d0d400b854c5b (diff) | |
download | jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.gz jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.bz2 jove-os-c92305221770bb1316d026c200d569ca4e930e42.zip |
merge libc files, new init methods for libjove
Diffstat (limited to 'lib/libc/include/stdio.h')
-rw-r--r-- | lib/libc/include/stdio.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/libc/include/stdio.h b/lib/libc/include/stdio.h new file mode 100644 index 0000000..cd29004 --- /dev/null +++ b/lib/libc/include/stdio.h @@ -0,0 +1,32 @@ +#ifndef _STDIO_H +#define _STDIO_H 1 + +#include <stdarg.h> +#include <stddef.h> + +#define SEEK_SET 0 +typedef struct { int unused; } FILE; + +extern FILE *stderr; +#define stderr stderr + +int fclose(FILE *file); +int fflush(FILE *file); +FILE *fopen(const char *path, const char *flags); + +size_t fread(void *buf, size_t size, size_t nmemb, FILE* file); +int fseek(FILE *file, long offset, int whence); +long ftell(FILE *file); +size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *file); +void setbuf(FILE *file, char *buf); + +int fprintf(FILE *file, const char *fmt, ...); +int vfprintf(FILE *file, const char *fmt, va_list ap); + +int sprintf(char *restrict str, const char *restrict format, ...); +int vsprintf(char *restrict str, const char *restrict format, va_list ap); + +int snprintf(char *restrict str, size_t size, const char *restrict format, ...); +int vsnprintf(char *restrict str, size_t size, const char *restrict format, va_list ap); + +#endif |