BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / commit / 03048a95d88cc7a78171393371f5c22a0250a014 / include / stdio.h

// Related

OrionLibC

Barry Importing existing Orion LibC 03048a9 (2 years, 2 months ago)
diff --git a/include/stdio.h b/include/stdio.h
new file mode 100644
index 0000000..b38bba5
--- /dev/null
+++ b/include/stdio.h
@@ -0,0 +1,66 @@
+#ifndef _STDIO_H
+#define _STDIO_H
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#define EOF ((int) -1)
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+typedef struct {
+	size_t count;
+	char *buf, *ptr;
+	int flags;
+	int fd;
+} FILE;
+
+enum FILEFlags {
+	FILE_READ  =  1,
+	FILE_WRITE =  2,
+	FILE_UNBUF =  4,
+	FILE_EOF   = 10,
+	FILE_ERR   = 20,
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern FILE *stdin;
+extern FILE *stdout;
+extern FILE *stderr;
+#define stdin stdin
+#define stdout stdout
+#define stderr stderr
+
+int fclose(FILE *);
+int fflush(FILE *);
+FILE *fopen(const char *, const char *);
+int fprintf(FILE *, const char *, ...);
+size_t fread(void *, size_t, size_t, FILE *);
+int fseek(FILE *, long, int);
+long ftell(FILE *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+void setbuf(FILE *stream, char *buf);
+int vfprintf(FILE *stream, const char *fmt, va_list);
+int sprintf(char *buf, const char *fmt, ...);
+void dbgprintf(char *fmt, ...);
+void dbgputs(char *str);
+int printf(const char *fmt, ...);
+void perror(const char *s);
+int getc(FILE *stream);
+int getchar(void);
+int puts(const char *s);
+int putc(int c, FILE *stream);
+int putchar(int c);
+
+int rename(const char *oldpath, const char *newpath);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif