Lines Matching refs:ungetc
289 } else if (ungetc('9', fp) == EOF) {
290 printf("%d: ungetc() failed\n", __LINE__);
293 printf("%d: fseek after ungetc failed\n", __LINE__);
404 // ... and test that ungetc moves the file position backwards
406 ASSERT(ungetc(ch, fp) == ch);
409 ASSERT(ungetc(ch, fp) == ch);
411 ASSERT(ungetc('!', fp) == '!');
413 ASSERT(ungetc('#', fp) == '#');
420 // test pushing other data with ungetc
421 ASSERT(ungetc('x', fp) == 'x');
423 ASSERT(ungetc('y', fp) == 'y');
430 // test that fseek discards any data that was pushed with ungetc
431 ASSERT(ungetc('x', fp) == 'x');
433 ASSERT(ungetc('y', fp) == 'y');
441 // test that ungetc resets EOF
447 ASSERT(ungetc(' ', fp) == ' ');
459 ASSERT(ungetc(' ', fp) == ' ');