X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fgetchar.c;fp=functions%2Fstdio%2Fgetchar.c;h=16037287f9d166ada249d915bbd3c00492731a97;hb=9a862b964b7c7226f4d2fc52de13e0db0a9c66d4;hp=0000000000000000000000000000000000000000;hpb=babe116007c414671ede1a315f16f7936fa3bb0b;p=pdclib diff --git a/functions/stdio/getchar.c b/functions/stdio/getchar.c new file mode 100644 index 0000000..1603728 --- /dev/null +++ b/functions/stdio/getchar.c @@ -0,0 +1,29 @@ +/* $Id$ */ + +/* getchar( void ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include + +#ifndef REGTEST + +int getchar( void ) +{ + return fgetc( stdin ); +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + /* Testing covered by ftell.c */ + return TEST_RESULTS; +} + +#endif