]> pd.if.org Git - pdclib/blob - functions/stdio/getchar.c
PDCLIB-16: Add _unlocked variations of all I/O routines; move work into these versions
[pdclib] / functions / stdio / getchar.c
1 /* $Id$ */
2
3 /* getchar( void )
4
5    This file is part of the Public Domain C Library (PDCLib).
6    Permission is granted to use, modify, and / or redistribute at will.
7 */
8
9 #include <stdio.h>
10
11 #ifndef REGTEST
12
13 int getchar_unlocked( void )
14 {
15     return fgetc_unlocked( stdin );
16 }
17
18
19 int getchar( void )
20 {
21     return fgetc( stdin );
22 }
23
24 #endif
25
26 #ifdef TEST
27 #include <_PDCLIB_test.h>
28
29 int main( void )
30 {
31     /* Testing covered by ftell.c */
32     return TEST_RESULTS;
33 }
34
35 #endif