3 * Portions copyright (c) 1990-1999 Symbian Ltd. All rights reserved.
7 * Copyright (c) 1990 The Regents of the University of California.
10 * Redistribution and use in source and binary forms are permitted
11 * provided that the above copyright notice and this paragraph are
12 * duplicated in all such forms and that any documentation,
13 * advertising materials, and other materials related to such
14 * distribution and use acknowledge that the software was developed
15 * by the University of California, Berkeley. The name of the
16 * University may not be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 * Based on @(#)stdio.h 5.3 (Berkeley) 3/15/86
38 #include <sys/reent.h>
40 #define _stdin_r(x) (&((x)->_sf[0]))
41 #define _stdout_r(x) (&((x)->_sf[1]))
42 #define _stderr_r(x) (&((x)->_sf[2]))
45 Reentrant versions of the <stdio.h> functions
47 IMPORT_C void _cleanup_r (struct _reent *);
48 IMPORT_C FILE * _fdopen_r (struct _reent *, int, const char *);
49 IMPORT_C FILE * _wfdopen_r (struct _reent *, int, const wchar_t *);
50 IMPORT_C FILE * _fopen_r (struct _reent *, const char *, const char *);
51 IMPORT_C FILE * _wfopen_r (struct _reent *, const wchar_t *, const wchar_t *);
52 IMPORT_C int _getchar_r (struct _reent *);
53 IMPORT_C char * _gets_r (struct _reent *, char *);
54 IMPORT_C int _iprintf_r (struct _reent *, const char *, ...);
55 IMPORT_C int _mkstemp_r (struct _reent *, char *);
56 IMPORT_C char * _mktemp_r (struct _reent *, char *);
57 IMPORT_C void _perror_r (struct _reent *, const char *);
58 IMPORT_C int _printf_r (struct _reent *, const char *, ...);
59 IMPORT_C int _putchar_r (struct _reent *, int);
60 IMPORT_C int _puts_r (struct _reent *, const char *);
61 IMPORT_C int _scanf_r (struct _reent *, const char *, ...);
62 IMPORT_C int _sprintf_r (struct _reent *, char *, const char *, ...);
63 IMPORT_C char * _tempnam_r (struct _reent *, char *, char *);
64 IMPORT_C FILE * _tmpfile_r (struct _reent *);
65 IMPORT_C char * _tmpnam_r (struct _reent *, char *);
66 IMPORT_C wchar_t * _wtmpnam_r (struct _reent *, wchar_t *);
67 IMPORT_C int _vfprintf_r (struct _reent *, FILE *, const char *, __e32_va_list);
68 IMPORT_C int _popen3_r (struct _reent *, const char *cmd, const char *mode, char** envp, int fids[3]);
69 IMPORT_C int _wpopen3_r (struct _reent *, const wchar_t *cmd, const wchar_t *mode, wchar_t** envp, int fids[3]);
74 #endif /* _STDIO_H_ */