diff options
Diffstat (limited to 'src/stdio/getc.c')
| -rw-r--r-- | src/stdio/getc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/stdio/getc.c b/src/stdio/getc.c new file mode 100644 index 00000000..11a75d4e --- /dev/null +++ b/src/stdio/getc.c @@ -0,0 +1,19 @@ +#include <stdio.h> + +/** read a character from a file stream **/ +int getc(FILE *stream) +{ + /* + RETURN_SUCCESS(the next character); + RETURN_FAILURE(CONSTANT(EOF)); + */ + return fgetc(stream); +} + +/*** +is the equivalent of FUNCTION(fgetc) except that if it is +defined as a macro, it may evaluate ARGUMENT(stream) more than once. +***/ +/* +STDC(1) +*/ |
