]> pd.if.org Git - pdclib/blobdiff - functions/stdio/getchar.c
Bla
[pdclib] / functions / stdio / getchar.c
index 0ba30fc14574a60dfc37c48f94534d17fa71f3e6..0aef0c3463dbadf1af24cc9b98cfe71b04b702fa 100644 (file)
@@ -1,14 +1,29 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* $Id$ */
 
-int getchar( void ) { /* TODO */ };
+/* getchar( void )
 
-/* PDPC code - unreviewed
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <stdio.h>
+
+#ifndef REGTEST
+
+int (getchar)( void )
 {
-    return (getc(stdin));
+    return fgetc( stdin );
 }
-*/
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    TESTCASE( NO_TESTDRIVER );
+    return TEST_RESULTS;
+}
+
+#endif