Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Wiki MarkupSection 7.19.7.11 of C99 defines {{ungetc()}} as follows \[ [ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\]:

The ungetc function pushes the character specified by c (converted to an unsigned char) back onto the input stream pointed to by stream. Pushed-back characters will be returned by subsequent reads on that stream in the reverse order of their pushing. A successful intervening call (with the stream pointed to by stream) to a file positioning function (fseek, fsetpos, or rewind) discards any pushed-back characters for the stream. The external storage corresponding to the stream is unchanged.

One character of pushback is guaranteed.

...

Tool

Version

Checker

Description

Section

Compass/ROSE

 

 

Section

can detect simple violations of this recommendation. In particular, it warns when two calls to ungetc() on the same stream are not interspersed with a file positioning or file read function. It is unable to handle cases where ungetc() is called from inside a loop

Section

LDRA tool suite

Include Page
c:LDRA_Vc:
LDRA_V
Section

83 D

Section

Fully Implemented

...