Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought



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


NAME
       widec  - multibyte character I/O routines

SYNOPSIS
       #include <stdio.h>
       #include <widec.h>

DESCRIPTION
       The functions that the multibyte character library provides for
       wchart string operations correspond to those provided by stdio(3S)
       as shown in the table below:

       --------------------------------------------------------------
                       character-based   byte-based   character- and
                       function          function     byte-based
       --------------------------------------------------------------
       character I/O   getwc             getc
                       getwchar          getchar
                       fgetwc            fgetc
                       ungetwc           ungetc
                       putwc             putc
                       putwchar          putchar
                       fputwc            fputc
       --------------------------------------------------------------
       string I/O      getws             gets
                       fgetws            fgets
                       putws             puts
                       fputws            fputs
       --------------------------------------------------------------
       formatted I/O                                  printf
                                                      fprintf
                                                      sprintf
                                                      vprintf
                                                      vfprintf
                                                      vsprintf
                                                      scanf
                                                      fscanf
                                                      sscanf
       --------------------------------------------------------------


       The character-based input and output routines provide the ability  to
       work in units of characters instead of bytes.  C programs using these
       routines can treat all characters from any of the four EUC code  sets
       as the same size by using the wchart representation.

       getwc  returns  a value of type wchart, which corresponds to the EUC
       representation of a character read from the input stream.  getwc uses
       the  cswidth  parameter in the character class table to determine the
       width of the character in its EUC form.

       putwc transforms a wchart character into EUC, and writes it  to  the
       named  output  stream.   putwc  also  uses  the  cswidth parameter to
       determine the widths of characters in EUC.

       The macros getwchar  and  putwchar;  the  functions  fgetwc,  fputwc,
       getws,  fgetws,  putws,  and fputws; and the format specifications %C
       and %S (%wc and %ws are no longer supported) of the functions printf,
       fprintf,   sprintf  [see  printf(3S)],  vprintf,  vfprintf,  vsprintf
       [see vprintf(3S)], scanf, fscanf, and sscanf [see scanf(3S)]  act  as
       if they had made successive calls to either getwc or putwc.

       The  character-based  routines  use  the existing byte-based routines
       internally, so the buffering scheme is the same.

       Any program that uses  these  routines  must  include  the  following
       header files:

                    #include <stdio.h>
                    #include <widec.h>

REFERENCES
       close(2), ctermid(3S), cuserid(3S), fclose(3S), ferror(3S),
       fopen(3S), fread(3S), fseek(3S), getwc(3W), getws(3W), lseek(2),
       mbchar(3C), mbstring(3C), open(2), pipe(2), popen(3S), printf(3S),
       putwc(3W), putws(3W), read(2), scanf(3S), setbuf(3S), stdio(3S),
       system(3S), tmpfile(3S), tmpnam(3S), ungetwc(3W), vprintf(3S),
       write(2), wstring(3W)


Licensed material--property of copyright holder(s)

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