VirtualBox

source: kBuild/vendor/sed/current/lib/localeinfo.h@ 3611

Last change on this file since 3611 was 3611, checked in by bird, 7 months ago

vendor/sed/current: GNU sed 4.9 (sed-4.9.tar.xz sha256:6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181)

File size: 2.1 KB
Line 
1/* locale information
2
3 Copyright 2016-2022 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
18 02110-1301, USA. */
19
20/* Written by Paul Eggert. */
21
22#include <limits.h>
23#include <wchar.h>
24
25struct localeinfo
26{
27 /* MB_CUR_MAX > 1. */
28 bool multibyte;
29
30 /* The locale is simple, like the C locale. These locales can be
31 processed more efficiently, as they are single-byte, their native
32 character set is in collating-sequence order, and they do not
33 have multi-character collating elements. */
34 bool simple;
35
36 /* The locale uses UTF-8. */
37 bool using_utf8;
38
39 /* An array indexed by byte values B that contains 1 if B is a
40 single-byte character, -1 if B is an encoding error, and -2 if B
41 is the leading byte of a multibyte character that contains more
42 than one byte. */
43 signed char sbclen[UCHAR_MAX + 1];
44
45 /* An array indexed by byte values B that contains the corresponding
46 wide character (if any) for B if sbclen[B] == 1. WEOF means the
47 byte is not a valid single-byte character, i.e., sbclen[B] == -1
48 or -2. */
49 wint_t sbctowc[UCHAR_MAX + 1];
50};
51
52extern void init_localeinfo (struct localeinfo *);
53
54/* Maximum number of characters that can be the case-folded
55 counterparts of a single character, not counting the character
56 itself. This is a generous upper bound. */
57enum { CASE_FOLDED_BUFSIZE = 32 };
58
59extern int case_folded_counterparts (wint_t, wchar_t[CASE_FOLDED_BUFSIZE]);
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette