summaryrefslogtreecommitdiff
path: root/src/stdio/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/getchar.c')
-rw-r--r--src/stdio/getchar.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/stdio/getchar.c b/src/stdio/getchar.c
new file mode 100644
index 00000000..3bd12654
--- /dev/null
+++ b/src/stdio/getchar.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+/** read a character from stdin **/
+int getchar(void)
+{
+ /*
+ RETURN_SUCCESS(the next character);
+ RETURN_FAILURE(CONSTANT(EOF));
+ */
+ return getc(stdin);
+}
+
+/***
+reads the next character from ARGUMENT(stdin).
+***/
+/*
+STDC(1)
+*/