X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=functions%2Fstdio%2Fgetchar.c;fp=functions%2Fstdio%2Fgetchar.c;h=16037287f9d166ada249d915bbd3c00492731a97;hb=32cd1277a5cfbb35eca856fb7d64fb78cb54da60;hp=0000000000000000000000000000000000000000;hpb=21d7b4c571a934c050edba194a2ed90705b46d86;p=fw%2Fpdclib 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