Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chrtbl(1M)

wchrtbl(1M)

environ(1)

setlocale(1)

mbchar(3W)

getwidth(3W)                   04 Jun 1992                     getwidth(3W)

NAME
     getwidth - get byte and screen widths of supplementary code sets

SYNOPSIS
     #include <sys/euc.h>
     #include <getwidth.h>
     void getwidth(eucwidtht *ptr);

DESCRIPTION
     getwidth() reads the character class table generated by chrtbl or
     wchrtbl for the LC_CTYPE category of the current locale. It returns
     the width information for the supplementary code sets in the
     eucwidtht structure supplied.

     The structure eucwidtht is defined in the header file
     /usr/include/euc.h as follows:

         typedef struct {
             short int eucw1,eucw2,eucw3;
             short int scrw1,scrw2,scrw3;
             short int pcw;
             charmultibyte;
         } eucwidtht;

     Code set width values for the three supplementary code sets are placed
     in eucw1, eucw2 and eucw3, respectively. The leading single-shift
     byte (SS2 or SS3) which introduces a character from code sets 2 or 3
     is not included in eucw2 or eucw3. Screen width values for the three
     supplementary code sets are placed in scrw1, scrw2 and scrw3,
     respectively. The width of EUC process code is placed in pcw. If any
     multibyte code sets are defined then multibyte is set to 1, other-
     wise 0.

     If width values cannot be read from the character class table the sys-
     tem default cswidth 0:0,0:0,0:0 is used and multibyte is 0. For code
     set 0 (ASCII) the code set width and screen width values are always 1.

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

SEE ALSO
     chrtbl(1M), wchrtbl(1M), environ(1), setlocale(1), mbchar(3W).












Page 1                       Reliant UNIX 5.44                       6, 194

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