X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Ffgetc.c;h=c4f2993f533f862878f36ed1faf8ea751d4e7d2a;hp=1ca2367b4e6b6ffac7b79c99c6b7e05fd8b402d3;hb=0a5395faab237ba9008352b0f4bee9659bbd3d5f;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec 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]); +} +*/