Cleanup in elf.c with .bss section clean; adm command mounts cdrom instead of floppy...
[ZeXOS.git] / libc / include / stdio.h
blob5b683034a2a1c7ac96fbd7c103742715140bf7e4
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
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>
26 #include <stdarg.h>
28 typedef struct {
29 unsigned long off;
30 unsigned long e;
31 unsigned mode;
32 unsigned fd;
33 unsigned char error;
34 } FILE;
36 FILE *stdin;
37 FILE *stdout;
38 FILE *stderr;
40 extern int errno;
42 extern void putch (char c);
43 extern void puts (const char *text);
44 extern void printf (const char *fmt, ...);
45 extern void cls ();
46 extern unsigned char getch ();
47 extern unsigned char getkey ();
48 extern void gotoxy (int x, int y);
49 extern void setcolor (int t, int f);
50 extern int sprintf (char *buffer, const char *fmt, ...);
51 extern void beep (unsigned freq);
52 extern int open (const char *pathname, int flags);
53 extern int close (int fd);
54 extern int read (unsigned fd, void *buf, unsigned len);
55 extern int write (unsigned fd, void *buf, unsigned len);
56 extern int scanf (const char *fmt, ...);
57 extern int getchar (void);
58 extern int putchar (int c);
59 extern FILE *fopen (const char *filename, const char *mode);
60 extern int fclose (FILE *stream);
61 extern size_t fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
62 extern size_t fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
63 extern int fgetc (FILE *stream);
64 extern char *fgets (char *s, int size, FILE *stream);
65 extern int feof (FILE *stream);
66 extern int fileno (FILE *stream);
67 extern int fseek (FILE *stream, long offset, int whence);
68 extern long ftell (FILE *stream);
69 extern int fprintf (FILE *stream, const char *format, ...);
70 extern int fputc (int c, FILE *stream);
71 extern FILE *fdopen (int fd, const char *mode);
72 extern int ferror (FILE *stream);
73 extern int fflush (FILE *stream);
74 extern int clearerr (FILE *stream);
75 extern void perror (const char *s);
76 extern int putc (int c, FILE *stream);
77 extern int vscanf (const char *fmt, va_list args);
78 extern int vsscanf (const char *str, const char *fmt, va_list args);
79 extern int sscanf (const char *str, const char *fmt, ...);
80 extern int fputs (const char *s, FILE *stream);
81 extern int vsprintf (char *buffer, const char *fmt, va_list args);
82 extern int vsnprintf (char *buffer, size_t size, const char *fmt, va_list args);
83 extern int fseeko (FILE *stream, off_t offset, int whence);
84 extern off_t ftello (FILE *stream);
85 extern int remove (const char *pathname);
86 extern int rename (const char *oldpath, const char *newpath);
88 #endif