xref: /titanic_50/usr/src/lib/libast/common/stdio/stdio_c99.c (revision 9ec394dbf343c1f23c6e13c39df427f238e5a369)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *           Copyright (c) 1985-2007 AT&T Knowledge Ventures            *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                      by AT&T Knowledge Ventures                      *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
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
31 clearerr_unlocked(Sfio_t* sp)
32 {
33 	clearerr(sp);
34 }
35 
36 int
37 feof_unlocked(Sfio_t* sp)
38 {
39 	return feof(sp);
40 }
41 
42 int
43 ferror_unlocked(Sfio_t* sp)
44 {
45 	return ferror(sp);
46 }
47 
48 int
49 fflush_unlocked(Sfio_t* sp)
50 {
51 	return fflush(sp);
52 }
53 
54 int
55 fgetc_unlocked(Sfio_t* sp)
56 {
57 	return fgetc(sp);
58 }
59 
60 char*
61 fgets_unlocked(char* buf, int size, Sfio_t* sp)
62 {
63 	return fgets(buf, size, sp);
64 }
65 
66 int
67 fileno_unlocked(Sfio_t* sp)
68 {
69 	return fileno(sp);
70 }
71 
72 int
73 fputc_unlocked(int c, Sfio_t* sp)
74 {
75 	return fputc(c, sp);
76 }
77 
78 int
79 fputs_unlocked(char* buf, Sfio_t* sp)
80 {
81 	return fputs(buf, sp);
82 }
83 
84 size_t
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
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
97 getc_unlocked(Sfio_t* sp)
98 {
99 	return getc(sp);
100 }
101 
102 int
103 getchar_unlocked(void)
104 {
105 	return getchar();
106 }
107 
108 int
109 putc_unlocked(int c, Sfio_t* sp)
110 {
111 	return putc(c, sp);
112 }
113 
114 int
115 putchar_unlocked(int c)
116 {
117 	return putchar(c);
118 }
119