1 /* $Id: stdio.h,v 1.4 2002/10/29 04:45:19 rex Exp $
6 * standard buffered input/output. Conforming to the Single UNIX(r)
7 * Specification Version 2, System Interface & Headers Issue 5
9 * This file is part of the ReactOS Operating System.
12 * Created by KJK::Hyperion <noog@libero.it>
14 * THIS SOFTWARE IS NOT COPYRIGHTED
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 #ifndef __STDIO_H_INCLUDED__
26 #define __STDIO_H_INCLUDED__
32 #include <sys/types.h>
37 extern int optind
; /* LEGACY */
41 typedef struct __tagFILE
46 typedef struct __tagfpos_t
53 /* Size of <stdio.h> buffers. */
54 #define BUFSIZ (0x10000)
56 /* Maximum size in bytes of the longest filename string that the implementation
57 guarantees can be opened. */
58 #define FILENAME_MAX (255)
60 /* Number of streams which the implementation guarantees can be open
61 simultaneously. The value will be at least eight. */
64 /* Input/output fully buffered. */
66 /* Input/output line buffered. */
68 /* Input/output unbuffered. */
71 /* Maximum size of character array to hold ctermid() output. */
72 #define L_ctermid (255)
73 /* Maximum size of character array to hold cuserid() output. (LEGACY) */
74 #define L_cuserid (255)
75 /* Maximum size of character array to hold tmpnam() output. */
76 #define L_tmpnam (255)
78 /* Minimum number of unique filenames generated by tmpnam(). Maximum number
79 of times an application can call tmpnam() reliably. The value of TMP_MAX
80 will be at least 10,000. */
81 #define TMP_MAX (0xFFFF)
83 /* End-of-file return value. */
86 /* default directory prefix for tempnam() */
87 #define P_tmpdir "/tmp/"
89 /* Standard error output stream. */
90 #define stderr ((FILE *)STDERR_FILENO)
91 /* Standard input stream. */
92 #define stdin ((FILE *)STDIN_FILENO)
93 /* Standard output stream. */
94 #define stdout ((FILE *)STDOUT_FILENO)
97 void clearerr(FILE *);
98 char *ctermid(char *);
99 char *cuserid(char *); /* LEGACY */
101 FILE *fdopen(int, const char *);
106 int fgetpos(FILE *, fpos_t *);
107 char *fgets(char *, int, FILE *);
109 void flockfile(FILE *);
110 FILE *fopen(const char *, const char *);
111 int fprintf(FILE *, const char *, ...);
112 int fputc(int, FILE *);
113 int fputs(const char *, FILE *);
114 size_t fread(void *, size_t, size_t, FILE *);
115 FILE *freopen(const char *, const char *, FILE *);
116 int fscanf(FILE *, const char *, ...);
117 int fseek(FILE *, long int, int);
118 int fseeko(FILE *, off_t
, int);
119 int fsetpos(FILE *, const fpos_t *);
120 long int ftell(FILE *);
121 off_t
ftello(FILE *);
122 int ftrylockfile(FILE *);
123 void funlockfile(FILE *);
124 size_t fwrite(const void *, size_t, size_t, FILE *);
127 int getc_unlocked(FILE *);
128 int getchar_unlocked(void);
129 int getopt(int, char * const[], const char *); /* LEGACY */
133 void perror(const char *);
134 FILE *popen(const char *, const char *);
135 int printf(const char *, ...);
136 int putc(int, FILE *);
138 int putc_unlocked(int, FILE *);
139 int putchar_unlocked(int);
140 int puts(const char *);
141 int putw(int, FILE *);
142 int remove(const char *);
143 int rename(const char *, const char *);
145 int scanf(const char *, ...);
146 void setbuf(FILE *, char *);
147 int setvbuf(FILE *, char *, int, size_t);
148 int snprintf(char *, size_t, const char *, ...);
149 int sprintf(char *, const char *, ...);
150 int sscanf(const char *, const char *, int, ...);
151 char *tempnam(const char *, const char *);
153 char *tmpnam(char *);
154 int ungetc(int, FILE *);
155 int vfprintf(FILE *, const char *, va_list);
156 int vprintf(const char *, va_list);
157 int vsnprintf(char *, size_t, const char *, va_list);
158 int vsprintf(char *, const char *, va_list);
162 #endif /* __STDIO_H_INCLUDED__ */