1getwidth(3C) Standard C Library Functions getwidth(3C)
2
3
4
6 getwidth - get codeset information
7
9 #include <euc.h>
10 #include <getwidth.h>
11
12 void getwidth(eucwidth_t *ptr);
13
14
16 The getwidth() function reads the character class table for the current
17 locale to get information on the supplementary codesets. getwidth()
18 sets this information into the struct eucwidth_t. This struct is
19 defined in <euc.h> and has the following members:
20
21 short int _eucw1,_eucw2,_eucw3;
22 short int _scrw1,_scrw2,_scrw3;
23 short int _pcw;
24 char _multibyte;
25
26
27
28 Codeset width values for supplementary codesets 1, 2, and 3 are set in
29 _eucw1, _eucw2, and _eucw3, respectively. Screen width values for sup‐
30 plementary codesets 1, 2, and 3 are set in _scrw1, _scrw2, and _scrw3,
31 respectively.
32
33
34 The width of Extended Unix Code (EUC) Process Code is set in _pcw. The
35 _multibyte entry is set to 1 if multibyte characters are used, and set
36 to 0 if only single-byte characters are used.
37
39 See attributes(5) for descriptions of the following attributes:
40
41
42
43
44 ┌───────────────────────────────────────────────────────────┐
45 │ATTRIBUTE TYPE ATTRIBUTE VALUE │
46 │MT-Level MT-Safe with exceptions │
47 └───────────────────────────────────────────────────────────┘
48
50 euclen(3C), setlocale(3C), attributes(5)
51
53 The getwidth() function can be used safely in a multithreaded applica‐
54 tion, as long as setlocale(3C) is not being called to change the
55 locale.
56
57
58 The getwidth() function will only work with EUC locales.
59
60
61
62SunOS 5.11 20 Dec 1996 getwidth(3C)