1da2e3ebchin
2da2e3ebchin/* : : generated by proto : : */
33e14f97Roger A. Faulkner/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
4da2e3ebchin
5da2e3ebchin#ifndef _SFSTDIO_H
6da2e3ebchin#if !defined(__PROTO__)
7da2e3ebchin#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
8da2e3ebchin#    if defined(__cplusplus)
9da2e3ebchin#      define __LINKAGE__	"C"
10da2e3ebchin#    else
11da2e3ebchin#      define __LINKAGE__
12da2e3ebchin#    endif
13da2e3ebchin#    define __STDARG__
14da2e3ebchin#    define __PROTO__(x)	x
15da2e3ebchin#    define __OTORP__(x)
16da2e3ebchin#    define __PARAM__(n,o)	n
17da2e3ebchin#    if !defined(__STDC__) && !defined(__cplusplus)
18da2e3ebchin#      if !defined(c_plusplus)
19da2e3ebchin#      	define const
20da2e3ebchin#      endif
21da2e3ebchin#      define signed
22da2e3ebchin#      define void		int
23da2e3ebchin#      define volatile
24da2e3ebchin#      define __V_		char
25da2e3ebchin#    else
26da2e3ebchin#      define __V_		void
27da2e3ebchin#    endif
28da2e3ebchin#  else
29da2e3ebchin#    define __PROTO__(x)	()
30da2e3ebchin#    define __OTORP__(x)	x
31da2e3ebchin#    define __PARAM__(n,o)	o
32da2e3ebchin#    define __LINKAGE__
33da2e3ebchin#    define __V_		char
34da2e3ebchin#    define const
35da2e3ebchin#    define signed
36da2e3ebchin#    define void		int
37da2e3ebchin#    define volatile
38da2e3ebchin#  endif
39da2e3ebchin#  define __MANGLE__	__LINKAGE__
40da2e3ebchin#  if defined(__cplusplus) || defined(c_plusplus)
41da2e3ebchin#    define __VARARG__	...
42da2e3ebchin#  else
43da2e3ebchin#    define __VARARG__
44da2e3ebchin#  endif
45da2e3ebchin#  if defined(__STDARG__)
46da2e3ebchin#    define __VA_START__(p,a)	va_start(p,a)
47da2e3ebchin#  else
48da2e3ebchin#    define __VA_START__(p,a)	va_start(p)
49da2e3ebchin#  endif
50da2e3ebchin#  if !defined(__INLINE__)
51da2e3ebchin#    if defined(__cplusplus)
52da2e3ebchin#      define __INLINE__	extern __MANGLE__ inline
53da2e3ebchin#    else
54da2e3ebchin#      if defined(_WIN32) && !defined(__GNUC__)
55da2e3ebchin#      	define __INLINE__	__inline
56da2e3ebchin#      endif
57da2e3ebchin#    endif
58da2e3ebchin#  endif
59da2e3ebchin#endif
60da2e3ebchin#if !defined(__LINKAGE__)
61da2e3ebchin#define __LINKAGE__		/* 2004-08-11 transition */
62da2e3ebchin#endif
63da2e3ebchin
64da2e3ebchin#define _SFSTDIO_H	1
65da2e3ebchin#define _sys_types	1	/* #include <sys/types.h> ok */
66da2e3ebchin#define __FILE_typedef	1
67da2e3ebchin#define _FILE_DEFINED	1
68da2e3ebchin#define _FILE_defined	1
69da2e3ebchin#define _FILEDEFED	1
70da2e3ebchin
71da2e3ebchin#ifndef __FILE_TAG
72da2e3ebchin#define __FILE_TAG	_sfio_s
73da2e3ebchin#endif
74da2e3ebchin
75da2e3ebchin#undef	FILE
76da2e3ebchin#undef	_FILE
77da2e3ebchin#undef	fpos_t
78da2e3ebchin#undef	fpos64_t
79da2e3ebchin
80da2e3ebchintypedef struct _sfio_s _sfio_FILE;
81da2e3ebchin
82da2e3ebchin#define FILE		_sfio_FILE
83da2e3ebchin#define _FILE		FILE
84da2e3ebchin
85da2e3ebchin#if !defined(__FILE) && !__CYGWIN__
86da2e3ebchin#undef	__FILE
87da2e3ebchin#define __FILE		FILE
88da2e3ebchin#endif
89da2e3ebchin
90da2e3ebchin#if defined(_AST_H) || defined(_SFIO_H)
91da2e3ebchin
92da2e3ebchin#define BUFSIZ		SF_BUFSIZE
93da2e3ebchin
94da2e3ebchin#else
95da2e3ebchin
96da2e3ebchin#ifndef BUFSIZ
97da2e3ebchin#define BUFSIZ		8192
98da2e3ebchin#endif
99da2e3ebchin
100da2e3ebchin#ifndef EOF
101da2e3ebchin#define EOF		(-1)
102da2e3ebchin#endif
103da2e3ebchin
104da2e3ebchin#ifndef NULL
105da2e3ebchin#define NULL		0
106da2e3ebchin#endif
107da2e3ebchin
108da2e3ebchin#ifndef SEEK_SET
109da2e3ebchin#define SEEK_SET	0
110da2e3ebchin#define SEEK_CUR	1
111da2e3ebchin#define SEEK_END	2
112da2e3ebchin#endif
113da2e3ebchin
114da2e3ebchin#include <ast_std.h>
115da2e3ebchin
116da2e3ebchin#include <sfio_s.h>
117da2e3ebchin
118da2e3ebchin#if __cplusplus
119da2e3ebchin#define _sf_(f)		(f)
120da2e3ebchin#else
121da2e3ebchin#define _sf_(f)		((struct _sfio_s*)(f))
122da2e3ebchin#endif
123da2e3ebchin
124da2e3ebchin#define _SF_EOF		0000200
125da2e3ebchin#define _SF_ERROR	0000400
126da2e3ebchin
127da2e3ebchin#endif
128da2e3ebchin
129da2e3ebchin#ifdef _NO_LARGEFILE64_SOURCE
130da2e3ebchin#undef _LARGEFILE64_SOURCE
131da2e3ebchin#endif
132da2e3ebchin
133da2e3ebchin#ifdef _LARGEFILE64_SOURCE
134da2e3ebchin#undef	off_t
135da2e3ebchin#endif
136da2e3ebchin
137da2e3ebchin#define fpos_t		_ast_fpos_t
138da2e3ebchin#if _typ_int64_t
139da2e3ebchin#define fpos64_t	_ast_fpos_t
140da2e3ebchin#endif
141da2e3ebchin
142da2e3ebchintypedef struct _ast_fpos_s
143da2e3ebchin{
144da2e3ebchin	intmax_t	_sf_offset;
145da2e3ebchin	unsigned char	_sf_state[64 - sizeof(intmax_t)];
146da2e3ebchin} _ast_fpos_t;
147da2e3ebchin
148da2e3ebchin#define _base		_data
149da2e3ebchin#define _ptr		_next
150da2e3ebchin#define _IOFBF		0
151da2e3ebchin#define _IONBF		1
152da2e3ebchin#define _IOLBF		2
153da2e3ebchin
154da2e3ebchin#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
155da2e3ebchin
156da2e3ebchin#undef	FILE
157da2e3ebchin#define FILE            FILE
158da2e3ebchintypedef struct _sfio_s FILE;
159da2e3ebchin
160da2e3ebchin#undef	strerror
161da2e3ebchinextern __MANGLE__ char*	strerror(int) __THROW;
162da2e3ebchin
163da2e3ebchinextern __MANGLE__ int	_doprnt __PROTO__((const char*, va_list, FILE*));
164da2e3ebchinextern __MANGLE__ int	_doscan __PROTO__((FILE*, const char*, va_list));
165da2e3ebchinextern __MANGLE__ int	asprintf __PROTO__((char**, const char*, ...));
166da2e3ebchinextern __MANGLE__ int	clearerr __PROTO__((FILE*));
167da2e3ebchinextern __MANGLE__ int	fclose __PROTO__((FILE*));
168da2e3ebchinextern __MANGLE__ FILE*	fdopen __PROTO__((int, const char*));
169da2e3ebchinextern __MANGLE__ int	feof __PROTO__((FILE*));
170da2e3ebchinextern __MANGLE__ int	ferror __PROTO__((FILE*));
171da2e3ebchinextern __MANGLE__ int	fflush __PROTO__((FILE*));
172da2e3ebchinextern __MANGLE__ int	fgetc __PROTO__((FILE*));
173da2e3ebchinextern __MANGLE__ int	fgetpos __PROTO__((FILE*, fpos_t*));
174da2e3ebchinextern __MANGLE__ char*	fgets __PROTO__((char*, int, FILE*));
175da2e3ebchinextern __MANGLE__ int	fileno __PROTO__((FILE*));
176da2e3ebchinextern __MANGLE__ FILE*	fopen __PROTO__((const char*, const char*));
177da2e3ebchinextern __MANGLE__ int	fprintf __PROTO__((FILE*, const char*, ...));
178da2e3ebchinextern __MANGLE__ int	fpurge __PROTO__((FILE*));
179da2e3ebchinextern __MANGLE__ int	fputc __PROTO__((int, FILE*));
180da2e3ebchinextern __MANGLE__ int	fputs __PROTO__((const char*, FILE*));
1817c2fbfbApril Chinextern __MANGLE__ size_t	fread __PROTO__((__V_*, size_t, size_t, FILE*));
182da2e3ebchinextern __MANGLE__ FILE*	freopen __PROTO__((const char*, const char*, FILE*));
183da2e3ebchinextern __MANGLE__ int	fscanf __PROTO__((FILE*, const char*, ...));
184da2e3ebchinextern __MANGLE__ int	fseek __PROTO__((FILE*, long, int));
185da2e3ebchinextern __MANGLE__ int	fseeko __PROTO__((FILE*, off_t, int));
186da2e3ebchinextern __MANGLE__ int	fsetpos __PROTO__((FILE*, const fpos_t*));
187da2e3ebchinextern __MANGLE__ long	ftell __PROTO__((FILE*));
188da2e3ebchinextern __MANGLE__ off_t	ftello __PROTO__((FILE*));
1897c2fbfbApril Chinextern __MANGLE__ size_t	fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
190da2e3ebchinextern __MANGLE__ int	getc __PROTO__((FILE*));
191da2e3ebchinextern __MANGLE__ int	getchar __PROTO__((void));
192da2e3ebchinextern __MANGLE__ char*	gets __PROTO__((char*));
193da2e3ebchinextern __MANGLE__ int	getw __PROTO__((FILE*));
194da2e3ebchinextern __MANGLE__ int	pclose __PROTO__((FILE*));
195da2e3ebchinextern __MANGLE__ FILE*	popen __PROTO__((const char*, const char*));
196da2e3ebchinextern __MANGLE__ int	printf __PROTO__((const char*, ...));
197da2e3ebchinextern __MANGLE__ int	putc __PROTO__((int, FILE*));
198da2e3ebchinextern __MANGLE__ int	putchar __PROTO__((int));
199da2e3ebchinextern __MANGLE__ int	puts __PROTO__((const char*));
200da2e3ebchinextern __MANGLE__ int	putw __PROTO__((int, FILE*));
201da2e3ebchinextern __MANGLE__ void	rewind __PROTO__((FILE*));
202da2e3ebchinextern __MANGLE__ int	scanf __PROTO__((const char*, ...));
203da2e3ebchinextern __MANGLE__ void	setbuf __PROTO__((FILE*, char*));
204da2e3ebchinextern __MANGLE__ int	setbuffer __PROTO__((FILE*, char*, int));
205da2e3ebchinextern __MANGLE__ int	setlinebuf __PROTO__((FILE*));
206da2e3ebchinextern __MANGLE__ int	setvbuf __PROTO__((FILE*, char*, int, size_t));
207da2e3ebchinextern __MANGLE__ int	snprintf __PROTO__((char*, int, const char*, ...));
208da2e3ebchinextern __MANGLE__ int	sprintf __PROTO__((char*, const char*, ...));
209da2e3ebchinextern __MANGLE__ int	sscanf __PROTO__((const char*, const char*, ...));
210da2e3ebchinextern __MANGLE__ FILE*	tmpfile __PROTO__((void));
211da2e3ebchinextern __MANGLE__ int	ungetc __PROTO__((int, FILE*));
212da2e3ebchinextern __MANGLE__ int	vasprintf __PROTO__((char**, const char*, va_list));
213da2e3ebchinextern __MANGLE__ int	vfprintf __PROTO__((FILE*, const char*, va_list));
214da2e3ebchinextern __MANGLE__ int	vfscanf __PROTO__((FILE*, const char*, va_list));
215da2e3ebchinextern __MANGLE__ int	vprintf __PROTO__((const char*, va_list));
216da2e3ebchinextern __MANGLE__ int	vscanf __PROTO__((const char*, va_list));
217da2e3ebchinextern __MANGLE__ int	vsnprintf __PROTO__((char*, int, const char*, va_list));
218da2e3ebchinextern __MANGLE__ int	vsprintf __PROTO__((char*, const char*, va_list));
219da2e3ebchinextern __MANGLE__ int	vsscanf __PROTO__((const char*, const char*, va_list));
220da2e3ebchin
221da2e3ebchin#if _typ_int64_t
222da2e3ebchin
223da2e3ebchinextern __MANGLE__ int		fgetpos64 __PROTO__((FILE*, fpos64_t*));
224da2e3ebchinextern __MANGLE__ int		fsetpos64 __PROTO__((FILE*, const fpos64_t*));
225da2e3ebchinextern __MANGLE__ int		fseek64 __PROTO__((FILE*, int64_t, int));
226da2e3ebchinextern __MANGLE__ int		fseeko64 __PROTO__((FILE*, int64_t, int));
227da2e3ebchinextern __MANGLE__ int64_t		ftell64 __PROTO__((FILE*));
228da2e3ebchinextern __MANGLE__ int64_t		ftello64 __PROTO__((FILE*));
229da2e3ebchin
230da2e3ebchin#endif
231da2e3ebchin
232da2e3ebchinextern __MANGLE__ void	clearerr_unlocked __PROTO__((FILE*));
233da2e3ebchinextern __MANGLE__ int	feof_unlocked __PROTO__((FILE*));
234da2e3ebchinextern __MANGLE__ int	ferror_unlocked __PROTO__((FILE*));
235da2e3ebchinextern __MANGLE__ int	fflush_unlocked __PROTO__((FILE*));
236da2e3ebchinextern __MANGLE__ int	fgetc_unlocked __PROTO__((FILE*));
237da2e3ebchinextern __MANGLE__ char*	fgets_unlocked __PROTO__((char*, int, FILE*));
238da2e3ebchinextern __MANGLE__ int	fileno_unlocked __PROTO__((FILE*));
239da2e3ebchinextern __MANGLE__ int	fputc_unlocked __PROTO__((int, FILE*));
240da2e3ebchinextern __MANGLE__ int	fputs_unlocked __PROTO__((char*, FILE*));
241da2e3ebchinextern __MANGLE__ size_t	fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
242da2e3ebchinextern __MANGLE__ size_t	fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
243da2e3ebchinextern __MANGLE__ int	getc_unlocked __PROTO__((FILE*));
244da2e3ebchinextern __MANGLE__ int	getchar_unlocked __PROTO__((void));
245da2e3ebchinextern __MANGLE__ int	putc_unlocked __PROTO__((int, FILE*));
246da2e3ebchinextern __MANGLE__ int	putchar_unlocked __PROTO__((int));
247da2e3ebchin
2487c2fbfbApril Chinextern __MANGLE__ void	flockfile __PROTO__((FILE*));
2497c2fbfbApril Chinextern __MANGLE__ int	ftrylockfile __PROTO__((FILE*));
2507c2fbfbApril Chinextern __MANGLE__ void	funlockfile __PROTO__((FILE*));
2517c2fbfbApril Chin
252da2e3ebchin#ifdef _USE_GNU
253da2e3ebchin
254da2e3ebchinextern __MANGLE__ int	fcloseall __PROTO__((void));
255da2e3ebchinextern __MANGLE__ FILE*	fmemopen __PROTO__((__V_*, size_t, const char*));
256da2e3ebchinextern __MANGLE__ ssize_t	__getdelim __PROTO__((char**, size_t*, int, FILE*));
257da2e3ebchinextern __MANGLE__ ssize_t	getdelim __PROTO__((char**, size_t*, int, FILE*));
258da2e3ebchinextern __MANGLE__ ssize_t	getline __PROTO__((char**, size_t*, FILE*));
259da2e3ebchin
260da2e3ebchin#endif
261da2e3ebchin
262da2e3ebchin#endif
263da2e3ebchin
264da2e3ebchin#ifndef FILENAME_MAX
265da2e3ebchin#define FILENAME_MAX	1024
266da2e3ebchin#endif
267da2e3ebchin#ifndef FOPEN_MAX
268da2e3ebchin#define FOPEN_MAX	20
269da2e3ebchin#endif
270da2e3ebchin#ifndef TMP_MAX
271da2e3ebchin#define TMP_MAX		17576
272da2e3ebchin#endif
273da2e3ebchin
274da2e3ebchin#define _doprnt		_ast_doprnt
275da2e3ebchin#define _doscan		_ast_doscan
276da2e3ebchin#define asprintf	_ast_asprintf
277da2e3ebchin#define clearerr	_ast_clearerr
278da2e3ebchin#define fclose		_ast_fclose
279da2e3ebchin#define fdopen		_ast_fdopen
280da2e3ebchin#define fflush		_ast_fflush
281da2e3ebchin#define fgetc		_ast_fgetc
282da2e3ebchin#define fgetpos		_ast_fgetpos
283da2e3ebchin#define fgetpos64	_ast_fgetpos64
284da2e3ebchin#define fgets		_ast_fgets
285da2e3ebchin#define fopen		_ast_fopen
286da2e3ebchin#define fprintf		_ast_fprintf
287da2e3ebchin#define fpurge		_ast_fpurge
288da2e3ebchin#define fputs		_ast_fputs
289da2e3ebchin#define fread		_ast_fread
290da2e3ebchin#define freopen		_ast_freopen
291da2e3ebchin#define fscanf		_ast_fscanf
292da2e3ebchin#define fseek		_ast_fseek
293da2e3ebchin#define fseek64		_ast_fseek64
294da2e3ebchin#define fseeko		_ast_fseeko
295da2e3ebchin#define fseeko64	_ast_fseeko64
296da2e3ebchin#define fsetpos		_ast_fsetpos
297da2e3ebchin#define fsetpos64	_ast_fsetpos64
298da2e3ebchin#define ftell		_ast_ftell
299da2e3ebchin#define ftell64		_ast_ftell64
300da2e3ebchin#define ftello		_ast_ftello
301da2e3ebchin#define ftello64	_ast_ftello64
302da2e3ebchin#define fwrite		_ast_fwrite
303da2e3ebchin#define gets		_ast_gets
304da2e3ebchin#define getw		_ast_getw
305da2e3ebchin#define pclose		_ast_pclose
306da2e3ebchin#define popen		_ast_popen
307da2e3ebchin#define printf		_ast_printf
308da2e3ebchin#define puts		_ast_puts
309da2e3ebchin#define putw		_ast_putw
310da2e3ebchin#define rewind		_ast_rewind
311da2e3ebchin#define scanf		_ast_scanf
312da2e3ebchin#define setbuf		_ast_setbuf
313da2e3ebchin#undef	setbuffer
314da2e3ebchin#define setbuffer	_ast_setbuffer
315da2e3ebchin#define setlinebuf	_ast_setlinebuf
316da2e3ebchin#define setvbuf		_ast_setvbuf
317da2e3ebchin#define snprintf	_ast_snprintf
318da2e3ebchin#define sprintf		_ast_sprintf
319da2e3ebchin#define sscanf		_ast_sscanf
320da2e3ebchin#define tmpfile		_ast_tmpfile
321da2e3ebchin#define ungetc		_ast_ungetc
322da2e3ebchin#define vasprintf	_ast_vasprintf
323da2e3ebchin#define vfprintf	_ast_vfprintf
324da2e3ebchin#define vfscanf		_ast_vfscanf
325da2e3ebchin#define vprintf		_ast_vprintf
326da2e3ebchin#define vscanf		_ast_vscanf
327da2e3ebchin#define vsnprintf	_ast_vsnprintf
328da2e3ebchin#define vsprintf	_ast_vsprintf
329da2e3ebchin#define vsscanf		_ast_vsscanf
330da2e3ebchin#define fcloseall	_ast_fcloseall
3317c2fbfbApril Chin#define _filbuf		_ast__filbuf
332da2e3ebchin#define fmemopen	_ast_fmemopen
333da2e3ebchin#define __getdelim	_ast___getdelim
334da2e3ebchin#define getdelim	_ast_getdelim
335da2e3ebchin#define getline		_ast_getline
336da2e3ebchin#define clearerr_unlocked _ast_clearerr_unlocked
337da2e3ebchin#define feof_unlocked	_ast_feof_unlocked
338da2e3ebchin#define ferror_unlocked	_ast_ferror_unlocked
339da2e3ebchin#define fflush_unlocked	_ast_fflush_unlocked
340da2e3ebchin#define fgetc_unlocked	_ast_fgetc_unlocked
341da2e3ebchin#define fgets_unlocked	_ast_fgets_unlocked
342da2e3ebchin#define fileno_unlocked	_ast_fileno_unlocked
343da2e3ebchin#define fputc_unlocked	_ast_fputc_unlocked
344da2e3ebchin#define fputs_unlocked	_ast_fputs_unlocked
345da2e3ebchin#define fread_unlocked	_ast_fread_unlocked
346da2e3ebchin#define fwrite_unlocked	_ast_fwrite_unlocked
347da2e3ebchin#define getc_unlocked	_ast_getc_unlocked
348da2e3ebchin#define getchar_unlocked _ast_getchar_unlocked
349da2e3ebchin#define putc_unlocked	_ast_putc_unlocked
350da2e3ebchin#define putchar_unlocked _ast_putchar_unlocked
3517c2fbfbApril Chin#define flockfile	_ast_flockfile
3527c2fbfbApril Chin#define ftrylockfile	_ast_ftrylockfile
3537c2fbfbApril Chin#define funlockfile	_ast_funlockfile
354da2e3ebchin
355da2e3ebchin#if defined(__STDPP__directive) && defined(__STDPP__initial)
356da2e3ebchin__STDPP__directive pragma pp:initial
357da2e3ebchin#endif
358da2e3ebchin#ifndef P_tmpdir
359da2e3ebchin#define P_tmpdir  "/var/tmp/" /*NOCATLITERAL*/
360da2e3ebchin#endif
361da2e3ebchin#ifndef L_ctermid
362da2e3ebchin#define L_ctermid  9
363da2e3ebchin#endif
364da2e3ebchin#ifndef L_tmpnam
365da2e3ebchin#define L_tmpnam  25
366da2e3ebchin#endif
367da2e3ebchin#if defined(__STDPP__directive) && defined(__STDPP__initial)
368da2e3ebchin__STDPP__directive pragma pp:noinitial
369da2e3ebchin#endif
370da2e3ebchin#if defined(__cplusplus) && defined(__THROW)
371da2e3ebchinextern __MANGLE__ char*	ctermid(char*) __THROW;
372da2e3ebchin#else
373da2e3ebchinextern __MANGLE__ char*	ctermid __PROTO__((char*));
374da2e3ebchin#endif
375da2e3ebchinextern __MANGLE__ char*	tmpnam __PROTO__((char*));
376da2e3ebchinextern __MANGLE__ char*	tempnam __PROTO__((const char*, const char*));
377da2e3ebchinextern __MANGLE__ void	perror __PROTO__((const char*));
378da2e3ebchin#ifndef _AST_STD_H
379da2e3ebchin#ifndef remove
380da2e3ebchinextern __MANGLE__ int	remove __PROTO__((const char*));
381da2e3ebchin#endif
382da2e3ebchin#ifndef rename
383da2e3ebchinextern __MANGLE__ int	rename __PROTO__((const char*, const char*));
384da2e3ebchin#endif
385da2e3ebchin#endif
386da2e3ebchin
387da2e3ebchin#undef __MANGLE__
388da2e3ebchin#define __MANGLE__ __LINKAGE__
389da2e3ebchin
390da2e3ebchin#if _BLD_ast && defined(__EXPORT__)
391da2e3ebchin#undef __MANGLE__
392da2e3ebchin#define __MANGLE__ __LINKAGE__		__EXPORT__
393da2e3ebchin#endif
394da2e3ebchin
395da2e3ebchinextern __MANGLE__ int	_doprnt __PROTO__((const char*, va_list, FILE*));
396da2e3ebchinextern __MANGLE__ int	_doscan __PROTO__((FILE*, const char*, va_list));
397da2e3ebchinextern __MANGLE__ int	asprintf __PROTO__((char**, const char*, ...));
398da2e3ebchinextern __MANGLE__ int	clearerr __PROTO__((FILE*));
399da2e3ebchinextern __MANGLE__ int	fclose __PROTO__((FILE*));
400da2e3ebchinextern __MANGLE__ FILE*	fdopen __PROTO__((int, const char*));
401da2e3ebchinextern __MANGLE__ int	feof __PROTO__((FILE*));
402da2e3ebchinextern __MANGLE__ int	ferror __PROTO__((FILE*));
403da2e3ebchinextern __MANGLE__ int	fflush __PROTO__((FILE*));
404da2e3ebchinextern __MANGLE__ int	fgetc __PROTO__((FILE*));
405da2e3ebchinextern __MANGLE__ int	fgetpos __PROTO__((FILE*, fpos_t*));
406da2e3ebchinextern __MANGLE__ char*	fgets __PROTO__((char*, int, FILE*));
407da2e3ebchinextern __MANGLE__ int	fileno __PROTO__((FILE*));
408da2e3ebchinextern __MANGLE__ FILE*	fopen __PROTO__((const char*, const char*));
409da2e3ebchinextern __MANGLE__ int	fprintf __PROTO__((FILE*, const char*, ...));
410da2e3ebchinextern __MANGLE__ int	fpurge __PROTO__((FILE*));
411da2e3ebchinextern __MANGLE__ int	fputc __PROTO__((int, FILE*));
412da2e3ebchinextern __MANGLE__ int	fputs __PROTO__((const char*, FILE*));
4137c2fbfbApril Chinextern __MANGLE__ size_t	fread __PROTO__((__V_*, size_t, size_t, FILE*));
414da2e3ebchinextern __MANGLE__ FILE*	freopen __PROTO__((const char*, const char*, FILE*));
415da2e3ebchinextern __MANGLE__ int	fscanf __PROTO__((FILE*, const char*, ...));
416da2e3ebchinextern __MANGLE__ int	fseek __PROTO__((FILE*, long, int));
417da2e3ebchinextern __MANGLE__ int	fseeko __PROTO__((FILE*, off_t, int));
418da2e3ebchinextern __MANGLE__ int	fsetpos __PROTO__((FILE*, const fpos_t*));
419da2e3ebchinextern __MANGLE__ long	ftell __PROTO__((FILE*));
420da2e3ebchinextern __MANGLE__ off_t	ftello __PROTO__((FILE*));
4217c2fbfbApril Chinextern __MANGLE__ size_t	fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
422da2e3ebchinextern __MANGLE__ int	getc __PROTO__((FILE*));
423da2e3ebchinextern __MANGLE__ int	getchar __PROTO__((void));
424da2e3ebchinextern __MANGLE__ char*	gets __PROTO__((char*));
425da2e3ebchinextern __MANGLE__ int	getw __PROTO__((FILE*));
426da2e3ebchinextern __MANGLE__ int	pclose __PROTO__((FILE*));
427da2e3ebchinextern __MANGLE__ FILE*	popen __PROTO__((const char*, const char*));
428da2e3ebchinextern __MANGLE__ int	printf __PROTO__((const char*, ...));
429da2e3ebchinextern __MANGLE__ int	putc __PROTO__((int, FILE*));
430da2e3ebchinextern __MANGLE__ int	putchar __PROTO__((int));
431da2e3ebchinextern __MANGLE__ int	puts __PROTO__((const char*));
432da2e3ebchinextern __MANGLE__ int	putw __PROTO__((int, FILE*));
433da2e3ebchinextern __MANGLE__ void	rewind __PROTO__((FILE*));
434da2e3ebchinextern __MANGLE__ int	scanf __PROTO__((const char*, ...));
435da2e3ebchinextern __MANGLE__ void	setbuf __PROTO__((FILE*, char*));
436da2e3ebchinextern __MANGLE__ int	setbuffer __PROTO__((FILE*, char*, int));
437da2e3ebchinextern __MANGLE__ int	setlinebuf __PROTO__((FILE*));
438da2e3ebchinextern __MANGLE__ int	setvbuf __PROTO__((FILE*, char*, int, size_t));
439da2e3ebchinextern __MANGLE__ int	snprintf __PROTO__((char*, int, const char*, ...));
440da2e3ebchinextern __MANGLE__ int	sprintf __PROTO__((char*, const char*, ...));
441da2e3ebchinextern __MANGLE__ int	sscanf __PROTO__((const char*, const char*, ...));
442da2e3ebchinextern __MANGLE__ FILE*	tmpfile __PROTO__((void));
443da2e3ebchinextern __MANGLE__ int	ungetc __PROTO__((int, FILE*));
444da2e3ebchinextern __MANGLE__ int	vasprintf __PROTO__((char**, const char*, va_list));
445da2e3ebchinextern __MANGLE__ int	vfprintf __PROTO__((FILE*, const char*, va_list));
446da2e3ebchinextern __MANGLE__ int	vfscanf __PROTO__((FILE*, const char*, va_list));
447da2e3ebchinextern __MANGLE__ int	vprintf __PROTO__((const char*, va_list));
448da2e3ebchinextern __MANGLE__ int	vscanf __PROTO__((const char*, va_list));
449da2e3ebchinextern __MANGLE__ int	vsnprintf __PROTO__((char*, int, const char*, va_list));
450da2e3ebchinextern __MANGLE__ int	vsprintf __PROTO__((char*, const char*, va_list));
451da2e3ebchinextern __MANGLE__ int	vsscanf __PROTO__((const char*, const char*, va_list));
452da2e3ebchin
453da2e3ebchin#if _typ_int64_t
454da2e3ebchin
455da2e3ebchinextern __MANGLE__ int		fgetpos64 __PROTO__((FILE*, fpos64_t*));
456da2e3ebchinextern __MANGLE__ int		fsetpos64 __PROTO__((FILE*, const fpos64_t*));
457da2e3ebchinextern __MANGLE__ int		fseek64 __PROTO__((FILE*, int64_t, int));
458da2e3ebchinextern __MANGLE__ int		fseeko64 __PROTO__((FILE*, int64_t, int));
459da2e3ebchinextern __MANGLE__ int64_t		ftell64 __PROTO__((FILE*));
460da2e3ebchinextern __MANGLE__ int64_t		ftello64 __PROTO__((FILE*));
461da2e3ebchin
462da2e3ebchin#ifdef _LARGEFILE64_SOURCE
463da2e3ebchin
464da2e3ebchin#undef	fpos_t
465da2e3ebchin#undef	off_t
466da2e3ebchin#undef	fgetpos
467da2e3ebchin#undef	fsetpos
468da2e3ebchin#undef	fseek
469da2e3ebchin#undef	fseeko
470da2e3ebchin#undef	ftell
471da2e3ebchin#undef	ftello
472da2e3ebchin
473da2e3ebchin#define	fpos_t		fpos64_t
474da2e3ebchin#if _typ_off64_t
475da2e3ebchin#define	off_t		off64_t
476da2e3ebchin#else
477da2e3ebchin#define	off_t		int64_t
478da2e3ebchin#endif
479da2e3ebchin
480da2e3ebchin#define fgetpos		fgetpos64
481da2e3ebchin#define fsetpos		fsetpos64
482da2e3ebchin#define	fseek		fseek64
483da2e3ebchin#define	fseeko		fseeko64
484da2e3ebchin#define ftell		ftell64
485da2e3ebchin#define ftello		ftello64
486da2e3ebchin
487da2e3ebchin#endif
488da2e3ebchin
489da2e3ebchin#endif
490da2e3ebchin
491da2e3ebchinextern __MANGLE__ void	clearerr_unlocked __PROTO__((FILE*));
492da2e3ebchinextern __MANGLE__ int	feof_unlocked __PROTO__((FILE*));
493da2e3ebchinextern __MANGLE__ int	ferror_unlocked __PROTO__((FILE*));
494da2e3ebchinextern __MANGLE__ int	fflush_unlocked __PROTO__((FILE*));
495da2e3ebchinextern __MANGLE__ int	fgetc_unlocked __PROTO__((FILE*));
496da2e3ebchinextern __MANGLE__ char*	fgets_unlocked __PROTO__((char*, int, FILE*));
497da2e3ebchinextern __MANGLE__ int	fileno_unlocked __PROTO__((FILE*));
498da2e3ebchinextern __MANGLE__ int	fputc_unlocked __PROTO__((int, FILE*));
499da2e3ebchinextern __MANGLE__ int	fputs_unlocked __PROTO__((char*, FILE*));
500da2e3ebchinextern __MANGLE__ size_t	fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
501da2e3ebchinextern __MANGLE__ size_t	fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
502da2e3ebchinextern __MANGLE__ int	getc_unlocked __PROTO__((FILE*));
503da2e3ebchinextern __MANGLE__ int	getchar_unlocked __PROTO__((void));
504da2e3ebchinextern __MANGLE__ int	putc_unlocked __PROTO__((int, FILE*));
505da2e3ebchinextern __MANGLE__ int	putchar_unlocked __PROTO__((int));
506da2e3ebchin
507da2e3ebchin#ifdef _USE_GNU
508da2e3ebchin
509da2e3ebchinextern __MANGLE__ int	fcloseall __PROTO__((void));
510da2e3ebchinextern __MANGLE__ FILE*	fmemopen __PROTO__((__V_*, size_t, const char*));
511da2e3ebchinextern __MANGLE__ ssize_t	__getdelim __PROTO__((char**, size_t*, int, FILE*));
512da2e3ebchinextern __MANGLE__ ssize_t	getdelim __PROTO__((char**, size_t*, int, FILE*));
513da2e3ebchinextern __MANGLE__ ssize_t	getline __PROTO__((char**, size_t*, FILE*));
514da2e3ebchin
515da2e3ebchin#endif
516da2e3ebchin
517da2e3ebchin#undef __MANGLE__
518da2e3ebchin#define __MANGLE__ __LINKAGE__
519da2e3ebchin
520da2e3ebchin#if _BLD_DLL && _DLL_INDIRECT_DATA
521da2e3ebchin
522da2e3ebchin#define stdin		((FILE*)_ast_dll->_ast_stdin)
523da2e3ebchin#define stdout		((FILE*)_ast_dll->_ast_stdout)
524da2e3ebchin#define stderr		((FILE*)_ast_dll->_ast_stderr)
525da2e3ebchin
526da2e3ebchin#else
527da2e3ebchin
528da2e3ebchin#define	stdin		(&_Sfstdin)
529da2e3ebchin#define	stdout		(&_Sfstdout)
530da2e3ebchin#define	stderr		(&_Sfstderr)
531da2e3ebchin
532da2e3ebchin#endif
533da2e3ebchin
534da2e3ebchin#if defined(_AST_H) || defined(_SFIO_H)
535da2e3ebchin
536da2e3ebchin#define feof(f)		sfeof(f)
537da2e3ebchin#define ferror(f)	sferror(f)
538da2e3ebchin#define fileno(f)	sffileno(f)
539da2e3ebchin#define fputc(c,f)	sfputc(f,c)
540da2e3ebchin#define getc(f)		sfgetc(f)
541da2e3ebchin#define getchar()	sfgetc(sfstdin)
542da2e3ebchin#define putc(c,f)	sfputc(f,c)
543da2e3ebchin#define putchar(c)	sfputc(sfstdout,c)
544da2e3ebchin
545da2e3ebchin#else
546da2e3ebchin
547da2e3ebchin#if !_UWIN
548da2e3ebchin#if _BLD_ast && defined(__EXPORT__)
549da2e3ebchin#undef __MANGLE__
550da2e3ebchin#define __MANGLE__ __LINKAGE__ __EXPORT__
551da2e3ebchin#endif
552da2e3ebchin#if !_BLD_ast && defined(__IMPORT__)
553da2e3ebchin#undef __MANGLE__
554da2e3ebchin#define __MANGLE__ __LINKAGE__ __IMPORT__
555da2e3ebchin#endif
556da2e3ebchin#endif
557da2e3ebchin
558da2e3ebchinextern __MANGLE__ FILE	_Sfstdin;
559da2e3ebchinextern __MANGLE__ FILE	_Sfstdout;
560da2e3ebchinextern __MANGLE__ FILE	_Sfstderr;
561da2e3ebchin
562da2e3ebchin#undef __MANGLE__
563da2e3ebchin#define __MANGLE__ __LINKAGE__
564da2e3ebchin
565da2e3ebchin#define feof(f)		(_sf_(f)->_flags&_SF_EOF)
566da2e3ebchin#define ferror(f)	(_sf_(f)->_flags&_SF_ERROR)
567da2e3ebchin#define fileno(f)	(_sf_(f)->_file)
568da2e3ebchin#define fputc(c,f)	(_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
569da2e3ebchin#define getc(f)		(_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
570da2e3ebchin#define getchar()	getc(stdin)
571da2e3ebchin#define putc(c,f)	fputc(c,f)
572da2e3ebchin#define putchar(c)	fputc(c,stdout)
573da2e3ebchin
574da2e3ebchin#if _BLD_ast && defined(__EXPORT__)
575da2e3ebchin#undef __MANGLE__
576da2e3ebchin#define __MANGLE__ __LINKAGE__		__EXPORT__
577da2e3ebchin#endif
578da2e3ebchin
579da2e3ebchinextern __MANGLE__ int		_sffilbuf __PROTO__((FILE*, int));
580da2e3ebchinextern __MANGLE__ int		_sfflsbuf __PROTO__((FILE*, int));
581da2e3ebchin
582da2e3ebchin#undef __MANGLE__
583da2e3ebchin#define __MANGLE__ __LINKAGE__
584da2e3ebchin
585da2e3ebchin#endif
586da2e3ebchin
587da2e3ebchin#endif
588