]> pd.if.org Git - pdclib/blobdiff - functions/stdio/getchar.c
Comment cleanups.
[pdclib] / functions / stdio / getchar.c
index 0ba30fc14574a60dfc37c48f94534d17fa71f3e6..db1bd3c05f9ac4cdc3a0e2ff992795efca854e50 100644 (file)
@@ -1,14 +1,27 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* getchar( void )
 
-int getchar( void ) { /* TODO */ };
+   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
 
-/* PDPC code - unreviewed
+int getchar( void )
 {
-    return (getc(stdin));
+    return fgetc( stdin );
 }
-*/
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    /* Testing covered by ftell.c */
+    return TEST_RESULTS;
+}
+
+#endif