X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Fungetc.c;h=f15d8a3b8a66de75ab1bcff32a4085ddbcd0c945;hp=c355afcd0c7c4b9f7f5336f3ac5ad94a93a470db;hb=0a5395faab237ba9008352b0f4bee9659bbd3d5f;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/stdio/ungetc.c b/functions/stdio/ungetc.c index c355afc..f15d8a3 100644 --- a/functions/stdio/ungetc.c +++ b/functions/stdio/ungetc.c @@ -6,3 +6,15 @@ // ---------------------------------------------------------------------------- int ungetc( int c, FILE * stream ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + if ((stream->ungetCh != -1) || (c == EOF)) + { + return (EOF); + } + stream->ungetCh = (unsigned char)c; + stream->quickText = 0; + return ((unsigned char)c); +} +*/