X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Fungetc.c;h=1bd7323ba80eb7345f26586de79d48912e386439;hp=c355afcd0c7c4b9f7f5336f3ac5ad94a93a470db;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/stdio/ungetc.c b/functions/stdio/ungetc.c index c355afc..1bd7323 100644 --- a/functions/stdio/ungetc.c +++ b/functions/stdio/ungetc.c @@ -1,8 +1,20 @@ -// ---------------------------------------------------------------------------- -// $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 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); +} +*/