2 * D header file for POSIX.
4 * Copyright: Public Domain
5 * License: Public Domain
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
9 module stdc.posix.stdio;
11 private import stdc.posix.config;
12 public import stdc.stdio;
13 public import stdc.posix.sys.types; // for off_t
18 // Required (defined in stdc.stdio)
47 int fgetpos(FILE*, fpos_t *);
48 char* fgets(char*, int, FILE*);
49 FILE* fopen(in char*, in char*);
50 int fprintf(FILE*, in char*, ...);
51 int fputc(int, FILE*);
52 int fputs(in char*, FILE*);
53 size_t fread(void *, size_t, size_t, FILE*);
54 FILE* freopen(in char*, in char*, FILE*);
55 int fscanf(FILE*, in char*, ...);
56 int fseek(FILE*, c_long, int);
57 int fsetpos(FILE*, in fpos_t*);
59 size_t fwrite(in void *, size_t, size_t, FILE*);
63 void perror(in char*);
64 int printf(in char*, ...);
69 int rename(in char*, in char*);
71 int scanf(in char*, ...);
72 void setbuf(FILE*, char*);
73 int setvbuf(FILE*, char*, int, size_t);
74 int snprintf(char*, size_t, in char*, ...);
75 int sprintf(char*, in char*, ...);
76 int sscanf(in char*, in char*, int ...);
79 int ungetc(int, FILE*);
80 int vfprintf(FILE*, in char*, va_list);
81 int vfscanf(FILE*, in char*, va_list);
82 int vprintf(in char*, va_list);
83 int vscanf(in char*, va_list);
84 int vsnprintf(char*, size_t, in char*, va_list);
85 int vsprintf(char*, in char*, va_list);
86 int vsscanf(in char*, in char*, va_list arg);
91 static if( __USE_LARGEFILE64 )
93 int fgetpos64(FILE*, fpos_t *);
94 alias fgetpos64 fgetpos;
96 FILE* fopen64(in char*, in char*);
99 FILE* freopen64(in char*, in char*, FILE*);
100 alias freopen64 freopen;
102 int fseek64(FILE*, c_long, int);
105 int fsetpos64(FILE*, in fpos_t*);
106 alias fsetpos64 fsetpos;
109 alias tmpfile64 tmpfile;
113 int fgetpos(FILE*, fpos_t *);
114 FILE* fopen(in char*, in char*);
115 FILE* freopen(in char*, in char*, FILE*);
116 int fseek(FILE*, c_long, int);
117 int fsetpos(FILE*, in fpos_t*);
128 char* ctermid(char*);
129 FILE* fdopen(int, in char*);
131 int fseeko(FILE*, off_t, int);
134 FILE* popen(in char*, in char*);
141 static if( __USE_FILE_OFFSET64 )
143 int fseeko64(FILE*, off_t, int);
144 alias fseeko64 fseeko;
148 int fseeko(FILE*, off_t, int);
151 static if( __USE_LARGEFILE64 )
153 off_t ftello64(FILE*);
154 alias ftello64 ftello;
163 int fseeko(FILE*, off_t, int);
167 char* ctermid(char*);
168 FILE* fdopen(int, in char*);
170 //int fseeko(FILE*, off_t, int);
171 //off_t ftello(FILE*);
173 FILE* popen(in char*, in char*);
176 // Thread-Safe Functions (TSF)
179 void flockfile(FILE*);
180 int ftrylockfile(FILE*);
181 void funlockfile(FILE*);
182 int getc_unlocked(FILE*);
183 int getchar_unlocked();
184 int putc_unlocked(int, FILE*);
185 int putchar_unlocked(int);
190 void flockfile(FILE*);
191 int ftrylockfile(FILE*);
192 void funlockfile(FILE*);
193 int getc_unlocked(FILE*);
194 int getchar_unlocked();
195 int putc_unlocked(int, FILE*);
196 int putchar_unlocked(int);
204 va_list (defined in stdc.stdarg)
206 char* tempnam(in char*, in char*);
211 const P_tmpdir = "/tmp";
213 char* tempnam(in char*, in char*);