X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffgetc.c;h=ba7f8ffa35e1efd7a1cf1d84b024b07e0d67624c;hb=refs%2Ftags%2FOLD;hp=1ca2367b4e6b6ffac7b79c99c6b7e05fd8b402d3;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec;p=pdclib diff --git a/functions/stdio/fgetc.c b/functions/stdio/fgetc.c index 1ca2367..ba7f8ff 100644 --- a/functions/stdio/fgetc.c +++ b/functions/stdio/fgetc.c @@ -1,8 +1,22 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ 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]); +} +*/