X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffgetc.c;h=c4f2993f533f862878f36ed1faf8ea751d4e7d2a;hb=e5456e3c2697c4e17fc9aa3439f2e305517b4d96;hp=1ca2367b4e6b6ffac7b79c99c6b7e05fd8b402d3;hpb=dcc8a8e99f69e090a03b7b868443addbc0817820;p=pdclib.old diff --git a/functions/stdio/fgetc.c b/functions/stdio/fgetc.c index 1ca2367..c4f2993 100644 --- a/functions/stdio/fgetc.c +++ b/functions/stdio/fgetc.c @@ -6,3 +6,17 @@ // ---------------------------------------------------------------------------- int fgetc( FILE * stream ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + unsigned char x[1]; + size_t ret; + + ret = fread(x, 1, 1, stream); + if (ret == 0) + { + return (EOF); + } + return ((int)x[0]); +} +*/