Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getws(3W) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ferror(3S)

fopen(3S)

fread(3S)

getwc(3W)

scanf(3S)

scanf(3W)

stdio(3S)

widec(3W)

getws(3W)  —  MISC. REFERENCE MANUAL PAGES

NAME

getws, fgetws − get a wchar_t string from a stream

SYNOPSIS

#include <stdio.h>
#include <widec.h> wchar_t ∗getws(wchar_t ∗s); wchar_t ∗fgetws(wchar_t ∗s, int n, FILE ∗stream);

DESCRIPTION (International Functions)

getws() reads EUC characters from stdin, converts them to wchar_t characters, and places them in the wchar_t 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 wchar_t string is terminated with a wchar_t null character. 

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

DIAGNOSTICS

If end-of-file or a read error is encountered and no characters have been transformed, no wchar_t 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, EILSEQ is set to errno.  If end-of-file is encountered, the EOF indicator for the stream is set.  Otherwise, s is returned. 

SEE ALSO

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

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