1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1985-2011 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                 Eclipse Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *          http://www.eclipse.org/org/documents/epl-v10.html           *
11 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                 Glenn Fowler <gsf@research.att.com>                  *
18 *                  David Korn <dgk@research.att.com>                   *
19 *                   Phong Vo <kpv@research.att.com>                    *
20 *                                                                      *
21 ***********************************************************************/
22 #pragma prototyped
23 
24 /*
25  * C99 stdio extensions
26  */
27 
28 #include "stdhdr.h"
29 
30 void
clearerr_unlocked(Sfio_t * sp)31 clearerr_unlocked(Sfio_t* sp)
32 {
33 	clearerr(sp);
34 }
35 
36 int
feof_unlocked(Sfio_t * sp)37 feof_unlocked(Sfio_t* sp)
38 {
39 	return feof(sp);
40 }
41 
42 int
ferror_unlocked(Sfio_t * sp)43 ferror_unlocked(Sfio_t* sp)
44 {
45 	return ferror(sp);
46 }
47 
48 int
fflush_unlocked(Sfio_t * sp)49 fflush_unlocked(Sfio_t* sp)
50 {
51 	return fflush(sp);
52 }
53 
54 int
fgetc_unlocked(Sfio_t * sp)55 fgetc_unlocked(Sfio_t* sp)
56 {
57 	return fgetc(sp);
58 }
59 
60 char*
fgets_unlocked(char * buf,int size,Sfio_t * sp)61 fgets_unlocked(char* buf, int size, Sfio_t* sp)
62 {
63 	return fgets(buf, size, sp);
64 }
65 
66 int
fileno_unlocked(Sfio_t * sp)67 fileno_unlocked(Sfio_t* sp)
68 {
69 	return fileno(sp);
70 }
71 
72 int
fputc_unlocked(int c,Sfio_t * sp)73 fputc_unlocked(int c, Sfio_t* sp)
74 {
75 	return fputc(c, sp);
76 }
77 
78 int
fputs_unlocked(char * buf,Sfio_t * sp)79 fputs_unlocked(char* buf, Sfio_t* sp)
80 {
81 	return fputs(buf, sp);
82 }
83 
84 size_t
fread_unlocked(void * buf,size_t size,size_t n,Sfio_t * sp)85 fread_unlocked(void* buf, size_t size, size_t n, Sfio_t* sp)
86 {
87 	return fread(buf, size, n, sp);
88 }
89 
90 size_t
fwrite_unlocked(void * buf,size_t size,size_t n,Sfio_t * sp)91 fwrite_unlocked(void* buf, size_t size, size_t n, Sfio_t* sp)
92 {
93 	return fwrite(buf, size, n, sp);
94 }
95 
96 int
getc_unlocked(Sfio_t * sp)97 getc_unlocked(Sfio_t* sp)
98 {
99 	return getc(sp);
100 }
101 
102 int
getchar_unlocked(void)103 getchar_unlocked(void)
104 {
105 	return getchar();
106 }
107 
108 int
putc_unlocked(int c,Sfio_t * sp)109 putc_unlocked(int c, Sfio_t* sp)
110 {
111 	return putc(c, sp);
112 }
113 
114 int
putchar_unlocked(int c)115 putchar_unlocked(int c)
116 {
117 	return putchar(c);
118 }
119