Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getws(3W) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought



getws(3W)                      DG/UX R4.11MU05                     getws(3W)


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

SYNOPSIS
       #include <stdio.h>
       #include <widec.h>
       wchart *getws(wchart *s);

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

DESCRIPTION
       getws (available only when linking with libw) 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 newline
       character is read or an end-of-file condition is encountered.  The
       newline 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
       newline character or an end-of-file condition is encountered.  The
       wchart string is then terminated with a wchart null character.

   Errors
       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.

   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |fgetws   |     Y         N        N    |
                     |getws    |     N         -        -    |
                     +---------+-----------------------------+
REFERENCES
       reentrant(3), ferror(3S), fopen(3S), fread(3S), scanf(3S), stdio(3S),
       getwc(3W), widec(3W)


Licensed material--property of copyright holder(s)

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