X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fgetchar.c;fp=functions%2Fstdio%2Fgetchar.c;h=16037287f9d166ada249d915bbd3c00492731a97;hb=a448f97e288aa4bd84fdc8d553b335b8d0efb725;hp=0000000000000000000000000000000000000000;hpb=f452f04bd5803b2c2cadbbc0d6cc906ec213daa3;p=pdclib.old 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