Skip to content

Commit ac9825e

Browse files
committed
Switch _MB_ to __MB_
Use __ namespace for config options. Signed-off-by: Keith Packard <[email protected]>
1 parent f5eb078 commit ac9825e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+280
-280
lines changed

CMakeLists.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,28 +165,28 @@ if(NOT DEFINED __ASSERT_VERBOSE)
165165
option(__ASSERT_VERBOSE "Assert provides verbose information" ON)
166166
endif()
167167

168-
if(NOT DEFINED _MB_CAPABLE)
169-
option(_MB_CAPABLE "Enable multi-byte support" OFF)
168+
if(NOT DEFINED __MB_CAPABLE)
169+
option(__MB_CAPABLE "Enable multi-byte support" OFF)
170170
endif()
171171

172-
if(NOT DEFINED _MB_EXTENDED_CHARSETS_ALL)
173-
option(_MB_EXTENDED_CHARSETS_ALL "Enable UCS, ISO, Windows and JIS multibyte encodings" OFF)
172+
if(NOT DEFINED __MB_EXTENDED_CHARSETS_ALL)
173+
option(__MB_EXTENDED_CHARSETS_ALL "Enable UCS, ISO, Windows and JIS multibyte encodings" OFF)
174174
endif()
175175

176-
if(NOT DEFINED _MB_EXTENDED_CHARSETS_UCS)
177-
option(_MB_EXTENDED_CHARSETS_UCS "Enable UCS encodings" OFF)
176+
if(NOT DEFINED __MB_EXTENDED_CHARSETS_UCS)
177+
option(__MB_EXTENDED_CHARSETS_UCS "Enable UCS encodings" OFF)
178178
endif()
179179

180-
if(NOT DEFINED _MB_EXTENDED_CHARSETS_ISO)
181-
option(_MB_EXTENDED_CHARSETS_ISO "Enable ISO encodings" OFF)
180+
if(NOT DEFINED __MB_EXTENDED_CHARSETS_ISO)
181+
option(__MB_EXTENDED_CHARSETS_ISO "Enable ISO encodings" OFF)
182182
endif()
183183

184-
if(NOT DEFINED _MB_EXTENDED_CHARSETS_WINDOWS)
185-
option(_MB_EXTENDED_CHARSETS_WINDOWS "Enable Windows encodings" OFF)
184+
if(NOT DEFINED __MB_EXTENDED_CHARSETS_WINDOWS)
185+
option(__MB_EXTENDED_CHARSETS_WINDOWS "Enable Windows encodings" OFF)
186186
endif()
187187

188-
if(NOT DEFINED _MB_EXTENDED_CHARSETS_JIS)
189-
option(_MB_EXTENDED_CHARSETS_JIS "Enable JIS multibyte encodings" OFF)
188+
if(NOT DEFINED __MB_EXTENDED_CHARSETS_JIS)
189+
option(__MB_EXTENDED_CHARSETS_JIS "Enable JIS multibyte encodings" OFF)
190190
endif()
191191

192192
set(_NANO_FORMATTED_IO OFF)

meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,12 +1376,12 @@ conf_data.set('__THREAD_LOCAL_STORAGE_RP2040', get_option('tls-rp2040'),
13761376
conf_data.set('__HAVE_BITFIELDS_IN_PACKED_STRUCTS', have_bitfields_in_packed_structs, description: 'Use bitfields in packed structs')
13771377
conf_data.set('__HAVE_COMPLEX', have_complex, description: 'Compiler supports _Complex')
13781378

1379-
conf_data.set('_MB_CAPABLE', mb_capable)
1379+
conf_data.set('__MB_CAPABLE', mb_capable)
13801380
if mb_capable
1381-
conf_data.set('_MB_EXTENDED_CHARSETS_UCS', mb_ucs_charsets)
1382-
conf_data.set('_MB_EXTENDED_CHARSETS_ISO', mb_iso_charsets)
1383-
conf_data.set('_MB_EXTENDED_CHARSETS_WINDOWS', mb_windows_charsets)
1384-
conf_data.set('_MB_EXTENDED_CHARSETS_JIS', mb_jis_charsets)
1381+
conf_data.set('__MB_EXTENDED_CHARSETS_UCS', mb_ucs_charsets)
1382+
conf_data.set('__MB_EXTENDED_CHARSETS_ISO', mb_iso_charsets)
1383+
conf_data.set('__MB_EXTENDED_CHARSETS_WINDOWS', mb_windows_charsets)
1384+
conf_data.set('__MB_EXTENDED_CHARSETS_JIS', mb_jis_charsets)
13851385
endif
13861386

13871387
conf_data.set('_PICO_EXIT', picoexit)

newlib/libc/ctype/ctype_.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const char _ctype_b[128 + 256] = {
4040
_CTYPE_DATA_128_255
4141
};
4242

43-
#ifdef _MB_EXTENDED_CHARSETS_NON_UNICODE
43+
#ifdef __MB_EXTENDED_CHARSETS_NON_UNICODE
4444

4545
#include "ctype_extended.h"
4646

@@ -53,7 +53,7 @@ const char _ctype_b[128 + 256] = {
5353
}
5454

5555
const char __ctype[locale_END - locale_EXTENDED_BASE][_CTYPE_OFFSET + 1 + 256] = {
56-
#ifdef _MB_EXTENDED_CHARSETS_ISO
56+
#ifdef __MB_EXTENDED_CHARSETS_ISO
5757
__CTYPE(ISO_8859_1),
5858
__CTYPE(ISO_8859_2),
5959
__CTYPE(ISO_8859_3),
@@ -70,7 +70,7 @@ const char __ctype[locale_END - locale_EXTENDED_BASE][_CTYPE_OFFSET + 1 + 256] =
7070
__CTYPE(ISO_8859_15),
7171
__CTYPE(ISO_8859_16),
7272
#endif
73-
#ifdef _MB_EXTENDED_CHARSETS_WINDOWS
73+
#ifdef __MB_EXTENDED_CHARSETS_WINDOWS
7474
__CTYPE(CP437),
7575
__CTYPE(CP720),
7676
__CTYPE(CP737),
@@ -99,10 +99,10 @@ const char __ctype[locale_END - locale_EXTENDED_BASE][_CTYPE_OFFSET + 1 + 256] =
9999
__CTYPE(PT154),
100100
__CTYPE(KOI8_T),
101101
#endif
102-
#ifdef _MB_EXTENDED_CHARSETS_JIS
102+
#ifdef __MB_EXTENDED_CHARSETS_JIS
103103
__CTYPE(EUCJP),
104104
__CTYPE(SJIS),
105105
#endif
106106
};
107107

108-
#endif /* _MB_EXTENDED_CHARSETS_NON_UNICODE */
108+
#endif /* __MB_EXTENDED_CHARSETS_NON_UNICODE */

newlib/libc/ctype/ctype_.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <wchar.h>
44
#include "locale_private.h"
55

6-
#ifdef _MB_EXTENDED_CHARSETS_NON_UNICODE
6+
#ifdef __MB_EXTENDED_CHARSETS_NON_UNICODE
77

88
extern const char __ctype[locale_END - locale_EXTENDED_BASE][_CTYPE_OFFSET + 1 + 256];
99

newlib/libc/ctype/ctype_table.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <langinfo.h>
4040
#include "local.h"
4141

42-
#ifdef _MB_CAPABLE
42+
#ifdef __MB_CAPABLE
4343

4444
static struct {
4545
wchar_t code;
@@ -80,4 +80,4 @@ __ctype_table_lookup(wint_t ic, locale_t locale)
8080
}
8181
return ctype_table[high].category;
8282
}
83-
#endif /* _MB_CAPABLE */
83+
#endif /* __MB_CAPABLE */

newlib/libc/ctype/iswalnum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ No supporting OS subroutines are required.
7070
int
7171
iswalnum (wint_t c)
7272
{
73-
#ifdef _MB_CAPABLE
73+
#ifdef __MB_CAPABLE
7474
return iswalnum_l (c, 0);
7575
#else
7676
return c < (wint_t)0x100 ? isalnum (c) : 0;

newlib/libc/ctype/iswalnum_l.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ int
1212
iswalnum_l (wint_t c, locale_t locale)
1313
{
1414
(void) locale;
15-
#ifdef _MB_CAPABLE
15+
#ifdef __MB_CAPABLE
1616
uint16_t cat = __ctype_table_lookup (c, locale);
1717
return cat & CLASS_alnum;
1818
#else
1919
return c < (wint_t)0x100 ? isalnum (c) : 0;
20-
#endif /* _MB_CAPABLE */
20+
#endif /* __MB_CAPABLE */
2121
}

newlib/libc/ctype/iswalpha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ No supporting OS subroutines are required.
7070
int
7171
iswalpha (wint_t c)
7272
{
73-
#ifdef _MB_CAPABLE
73+
#ifdef __MB_CAPABLE
7474
return iswalpha_l (c, 0);
7575
#else
7676
return c < (wint_t)0x100 ? isalpha (c) : 0;

newlib/libc/ctype/iswalpha_l.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ int
1212
iswalpha_l (wint_t c, locale_t locale)
1313
{
1414
(void) locale;
15-
#ifdef _MB_CAPABLE
15+
#ifdef __MB_CAPABLE
1616
uint16_t cat = __ctype_table_lookup (c, locale);
1717
return cat & CLASS_alpha;
1818
#else
1919
return c < (wint_t)0x100 ? isalpha (c) : 0;
20-
#endif /* _MB_CAPABLE */
20+
#endif /* __MB_CAPABLE */
2121
}

newlib/libc/ctype/iswblank.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ No supporting OS subroutines are required.
6969
int
7070
iswblank (wint_t c)
7171
{
72-
#ifdef _MB_CAPABLE
72+
#ifdef __MB_CAPABLE
7373
return iswblank_l (c, 0);
7474
#else
7575
return c < (wint_t)0x100 ? isblank (c) : 0;

0 commit comments

Comments
 (0)