Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getws(3W) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ferror(3S)

fopen(3S)

fread(3S)

scanf(3S)

stdio(3S)

getwc(3W)

mbchar(3W)

scanf(3W)

widec(3W)

getws(3W)                      27 Jan 1992                        getws(3W)

NAME
     getws, fgetws - get a wchart string from a stream

SYNOPSIS
     #include <stdio.h>
     #include <widec.h>
     wchart *getws(wchart *s);
     wchart *fgetws(wchart *s, int n, FILE *stream);

DESCRIPTION (International Functions)
     getws() reads EUC characters from stdin, converts them to wchart
     characters, and places them in the wchart array pointed to by s.
     getws() reads until a new-line character is read or an end-of-file
     condition is encountered.  The new-line character is discarded and the
     wchart string is terminated with a wchart null character.

     fgetws() reads EUC characters from the stream, converts them to
     wchart characters, and places them in the wchart array pointed to by
     s. fgetws() reads until n-1 wchart characters are transferred to s,
     or a new-line character or an end-of-file condition is encountered.
     The wchart string is then terminated with a wchart null character.
     The new-line character, if any, is returned as part of the string.

DIAGNOSTICS
     If end-of-file or a read error is encountered and no characters have
     been transformed, no wchart characters are transferred to s and a
     null pointer is returned and the error indicator for the stream is
     set. If the read error is an illegal byte sequence, errno is set to
     EILSEQ. If end-of-file is encountered, the EOF indicator for the
     stream is set. Otherwise, s is returned.

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

SEE ALSO
     ferror(3S), fopen(3S), fread(3S), scanf(3S), stdio(3S), getwc(3W),
     mbchar(3W), scanf(3W), widec(3W).

















Page 1                       Reliant UNIX 5.44                      1, 1927

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