Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

getwidth(3C)

Name

getwidth - get codeset information

Synopsis

#include <euc.h>
#include <getwidth.h>

void getwidth(eucwidth_t *ptr);

Description

The getwidth() function reads the character class table for the current locale to get information on the supplementary codesets. getwidth() sets this information into the struct eucwidth_t. This struct is defined in <euc.h> and has the following members:

short int   _eucw1, _eucw2, _eucw3;
short int   _scrw1, _scrw2, _scrw3;
short int   _pcw;
char        _multibyte;

Codeset width values for supplementary codesets 1, 2, and 3 are set in _eucw1, _eucw2, and _eucw3, respectively. Screen width values for supplementary codesets 1, 2, and 3 are set in _scrw1, _scrw2, and _scrw3, respectively.

The width of Extended UNIX Code (EUC) Process Code is set in _pcw. The _multibyte entry is set to 1 if multibyte characters are used, and set to 0 if only single-byte characters are used.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
MT-Level
MT-Safe

See Also

euclen(3C), setlocale(3C), attributes(7)

Notes

The getwidth() function will only work with EUC locales.