All user-space apps ware moved to 8MB virtual address address (link.ld changes);...
[ZeXOS.git] / libc / include / stdio.h
blobe2b0eba31cac67a56e0323e83f6bfb7d976a2117
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
4 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
5 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _STDIO_H
23 #define _STDIO_H
25 #include <sys/types.h>
27 typedef struct {
28 unsigned long off;
29 unsigned long e;
30 unsigned mode;
31 unsigned fd;
32 } FILE;
34 FILE *stdin;
35 FILE *stdout;
36 FILE *stderr;
38 extern void putch (char c);
39 extern void puts (const char *text);
40 extern void printf (const char *fmt, ...);
41 extern void cls ();
42 extern unsigned char getch ();
43 extern unsigned char getkey ();
44 extern void gotoxy (int x, int y);
45 extern void setcolor (int t, int f);
46 extern int sprintf (char *buffer, const char *fmt, ...);
47 extern void beep (unsigned freq);
48 extern int open (const char *pathname, int flags);
49 extern int close (int fd);
50 extern int read (unsigned fd, void *buf, unsigned len);
51 extern int write (unsigned fd, void *buf, unsigned len);
52 extern int scanf (const char *fmt, ...);
53 extern int getchar (void);
54 extern FILE *fopen (const char *filename, const char *mode);
55 extern int fclose (FILE *stream);
56 extern size_t fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
57 extern size_t fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
58 extern int fgetc (FILE *stream);
59 extern char *fgets (char *s, int size, FILE *stream);
60 extern int feof (FILE *stream);
61 extern int fileno (FILE *stream);
62 extern int fseek (FILE *stream, long offset, int whence);
63 extern long ftell (FILE *stream);
64 extern int fprintf (FILE *stream, const char *format, ...);
65 extern int fputc (int c, FILE *stream);
67 #endif