Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ungetc(3S) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fseek(3S)

getc(3S)

setbuf(3S)



UNGETC(3S)               DOMAIN/IX SYS5                UNGETC(3S)



NAME
     ungetc - push character back into input stream

USAGE
     #include <stdio.h>

     int ungetc(c, stream)
     int c;
     FILE *stream;


DESCRIPTION
     Ungetc inserts the character c into the buffer associated
     with an input stream.  That character, c, is returned by the
     next getc (3S) call on that stream.  Ungetc returns c, and
     leaves the file stream unchanged.

     One character of pushback is guaranteed if something has
     already been read from the stream and the stream is buf-
     fered.  If stream is stdin, one character may be pushed back
     onto the buffer without a previous read statement.

     If c equals EOF, ungetc does nothing to the buffer and
     returns EOF.

     Fseek(3S) erases all memory of inserted characters.

DIAGNOSTICS
     Ungetc returns EOF if it cannot insert the character.

RELATED INFORMATION
     fseek(3S), getc(3S), setbuf(3S)





















Printed 12/4/86                                          UNGETC-1





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026