X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=functions%2Fstdio%2Ffgetc.c;h=c4f2993f533f862878f36ed1faf8ea751d4e7d2a;hb=435127acb8e016352a581827aa0465a2b32824e6;hp=1ca2367b4e6b6ffac7b79c99c6b7e05fd8b402d3;hpb=d954dee1f991f0bc017ac65c4203c36c838abb1f;p=fw%2Fpdclib 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]); +} +*/