whoops - forgot to commit header files
[reactos.git] / posix / include / stdio.h
1 /*
2 * stdio.h
3 *
4 * standard buffered input/output.
5 *
6 * This file is part of the ReactOS Operating System.
7 *
8 * Contributors:
9 * Created by KJK::Hyperion <noog@libero.it>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22 #ifndef __STDIO_H_INCLUDED__
23 #define __STDIO_H_INCLUDED__
24
25 /* INCLUDES */
26 #include <stddef.h>
27 #include <stdarg.h>
28 #include <unistd.h>
29 #include <sys/types.h>
30
31 /* OBJECTS */
32 extern char *optarg;
33 extern int opterr;
34 extern int optind; /* (LEGACY) */
35 extern int optopt;
36
37 /* TYPES */
38 typedef struct _tagFILE
39 {
40 int _dummy;
41 } FILE;
42
43 typedef struct _tagfpos_t
44 {
45 int _dummy;
46 } fpos_t;
47
48
49 /* CONSTANTS */
50 /* Size of <stdio.h> buffers. */
51 #define BUFSIZ (0x10000)
52
53 /* Maximum size in bytes of the longest filename string that the implementation
54 guarantees can be opened. */
55 #define FILENAME_MAX (255)
56
57 /* Number of streams which the implementation guarantees can be open
58 simultaneously. The value will be at least eight. */
59 #define FOPEN_MAX (8)
60
61 /* Input/output fully buffered. */
62 #define _IOFBF (1)
63 /* Input/output line buffered. */
64 #define _IOLBF (2)
65 /* Input/output unbuffered. */
66 #define _IONBF (3)
67
68 /* Maximum size of character array to hold ctermid() output. */
69 #define L_ctermid (255)
70 /* Maximum size of character array to hold cuserid() output. (LEGACY) */
71 #define L_cuserid (255)
72 /* Maximum size of character array to hold tmpnam() output. */
73 #define L_tmpnam (255)
74
75 /* Minimum number of unique filenames generated by tmpnam(). Maximum number
76 of times an application can call tmpnam() reliably. The value of TMP_MAX
77 will be at least 10,000. */
78 #define TMP_MAX (0xFFFF)
79
80 /* End-of-file return value. */
81 #define EOF (-1)
82
83 /* default directory prefix for tempnam() */
84 #define P_tmpdir "/tmp/"
85
86 /* Standard error output stream. */
87 #define stderr ((FILE *)STDERR_FILENO)
88 /* Standard input stream. */
89 #define stdin ((FILE *)STDIN_FILENO)
90 /* Standard output stream. */
91 #define stdout ((FILE *)STDOUT_FILENO)
92
93 /* PROTOTYPES */
94 void clearerr(FILE *);
95 char *ctermid(char *);
96 char *cuserid(char *); /* (LEGACY) */
97 int fclose(FILE *);
98 FILE *fdopen(int, const char *);
99 int feof(FILE *);
100 int ferror(FILE *);
101 int fflush(FILE *);
102 int fgetc(FILE *);
103 int fgetpos(FILE *, fpos_t *);
104 char *fgets(char *, int, FILE *);
105 int fileno(FILE *);
106 void flockfile(FILE *);
107 FILE *fopen(const char *, const char *);
108 int fprintf(FILE *, const char *, ...);
109 int fputc(int, FILE *);
110 int fputs(const char *, FILE *);
111 size_t fread(void *, size_t, size_t, FILE *);
112 FILE *freopen(const char *, const char *, FILE *);
113 int fscanf(FILE *, const char *, ...);
114 int fseek(FILE *, long int, int);
115 int fseeko(FILE *, off_t, int);
116 int fsetpos(FILE *, const fpos_t *);
117 long int ftell(FILE *);
118 off_t ftello(FILE *);
119 int ftrylockfile(FILE *);
120 void funlockfile(FILE *);
121 size_t fwrite(const void *, size_t, size_t, FILE *);
122 int getc(FILE *);
123 int getchar(void);
124 int getc_unlocked(FILE *);
125 int getchar_unlocked(void);
126 int getopt(int, char * const[], const char *); /* (LEGACY) */
127 char *gets(char *);
128 int getw(FILE *);
129 int pclose(FILE *);
130 void perror(const char *);
131 FILE *popen(const char *, const char *);
132 int printf(const char *, ...);
133 int putc(int, FILE *);
134 int putchar(int);
135 int putc_unlocked(int, FILE *);
136 int putchar_unlocked(int);
137 int puts(const char *);
138 int putw(int, FILE *);
139 int remove(const char *);
140 int rename(const char *, const char *);
141 void rewind(FILE *);
142 int scanf(const char *, ...);
143 void setbuf(FILE *, char *);
144 int setvbuf(FILE *, char *, int, size_t);
145 int snprintf(char *, size_t, const char *, ...);
146 int sprintf(char *, const char *, ...);
147 int sscanf(const char *, const char *, int, ...);
148 char *tempnam(const char *, const char *);
149 FILE *tmpfile(void);
150 char *tmpnam(char *);
151 int ungetc(int, FILE *);
152 int vfprintf(FILE *, const char *, va_list);
153 int vprintf(const char *, va_list);
154 int vsnprintf(char *, size_t, const char *, va_list);
155 int vsprintf(char *, const char *, va_list);
156
157 /* MACROS */
158
159 #endif /* __STDIO_H_INCLUDED__ */
160
161 /* EOF */
162