Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ widec(3W) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getwc(3W)

getws(3W)

mbchar(3W)

mbstring(3W)

printf(3W)

putwc(3W)

putws(3W)

scanf(3W)

ungetwc(3W)

vprintf(3W)

wstring(3W)

open(2)

close(2)

lseek(2)

pipe(2)

read(2)

write(2)

ctermid(3S)

cuserid(3S)

fclose(3S)

ferror(3S)

fopen(3S)

fread(3S)

fseek(3S)

popen(3S)

printf(3S)

scanf(3S)

setbuf(3S)

stdio(3S)

system(3S)

tmpfile(3S)

tmpnam(3S)



WIDEC(3W-SVR4)      RISC/os Reference Manual       WIDEC(3W-SVR4)



NAME
     widec - multibyte character I/O routines

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

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


          ________________________________________________________
                          character     byte based   character and
                          based func-   function     byte based
          tion
          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  provides  the
     ability  to  work in units of a characters instead of bytes.
     C programs using these routines can  handle  any  character,
     from any of the four EUC code sets as the same size by using
     the wchar_t representation.

     getwc() returns a value of type wchar_t,  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  determin the width of the character in its
     EUC form.



                        Printed 11/19/92                   Page 1





WIDEC(3W-SVR4)      RISC/os Reference Manual       WIDEC(3W-SVR4)



     putwc() transforms a wchar_t character  into  the  EUC,  and
     writes it to the named output stream.  putwc() also uses the
     cswidth parameter for determining the widths  of  characters
     in EUC.

     The  macros  getwchar()  and   putwchar();   the   functions
     fgetwc(), fputwc(), getws(), fgetws(), putws() and fputws();
     and the format specifications %wc and %ws of  the  functions
     printf(),   fprintf(),   sprintf(),  vprintf(),  vfprintf(),
     vsprintf(), scanf(), fscanf(), and sscanf(); 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.









































 Page 2                 Printed 11/19/92





WIDEC(3W-SVR4)      RISC/os Reference Manual       WIDEC(3W-SVR4)



     Any program that uses these routines must include  the  fol-
     lowing header files:

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


SEE ALSO
     getwc(3W), getws(3W), mbchar(3W), mbstring(3W), printf(3W),
     putwc(3W), putws(3W), scanf(3W), ungetwc(3W), vprintf(3W),
     wstring(3W).

     open(2), close(2), lseek(2), pipe(2), read(2), write(2),
     ctermid(3S), cuserid(3S), fclose(3S), ferror(3S), fopen(3S),
     fread(3S), fseek(3S), popen(3S), printf(3S), scanf(3S),
     setbuf(3S), stdio(3S), system(3S), tmpfile(3S), tmpnam(3S).







































                        Printed 11/19/92                   Page 3



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