Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ungetwc(3W) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fseek(3S)

setbuf(3S)

stdio(3S)

getwc(3W)

mbchar(3W)

widec(3W)

ungetwc(3W)                    27 Jan 1992                      ungetwc(3W)

NAME
     ungetwc - push wchart character back into input stream

SYNOPSIS
     #include <stdio.h>
     #include <widec.h>
     int ungetwc(wchart c, FILE *stream);

DESCRIPTION (International Functions)
     ungetwc() inserts the wchart character c into the buffer associated
     with the input stream. That character, c, will be returned by the next
     getwc() call on that stream. ungetwc() returns c.

     One character of pushback is guaranteed, provided something has
     already been read from the stream and the stream is actually buffered.

     If c equals (wchart)EOF, ungetwc() does nothing to the buffer and
     returns EOF.

     If the stream was at end of file, ungetwc() will reset the EOF indica-
     tor. An feof() immediately after a successful ungetwc() will always
     return 0 (false).

     fseek() erases all memory of inserted characters.

DIAGNOSTICS
     ungetwc() returns EOF if it cannot insert a wchart character.

NOTES
     These functions can support either typedef unsigned short wchart or
     typedef long wchart conditionally, see mbchar(3W).

SEE ALSO
     fseek(3S), setbuf(3S), stdio(3S), getwc(3W), mbchar(3W), widec(3W).





















Page 1                       Reliant UNIX 5.44                      1, 1927

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