]> pd.if.org Git - pdclib/blobdiff - functions/stdio/getchar.c
Porting current working set from CVS.
[pdclib] / functions / stdio / getchar.c
diff --git a/functions/stdio/getchar.c b/functions/stdio/getchar.c
new file mode 100644 (file)
index 0000000..bce6855
--- /dev/null
@@ -0,0 +1,31 @@
+/* $Id$ */
+
+/* Release $Name$ */
+
+/* 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 <stdio.h>
+
+#ifndef REGTEST
+
+int getchar( void )
+{
+    return fgetc( stdin );
+}
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    TESTCASE( NO_TESTDRIVER );
+    return TEST_RESULTS;
+}
+
+#endif