diff --git a/src/kernel/libroot/posix/glibc/locale/C-address.c b/src/kernel/libroot/posix/glibc/locale/C-address.c index e9e6b1aa81..eabb6fd4a4 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-address.c +++ b/src/kernel/libroot/posix/glibc/locale/C-address.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,27 +24,27 @@ /* This table's entries are taken from ISO 14652, the table in section 4.10 "LC_ADDRESS". */ -const struct locale_data _nl_C_LC_ADDRESS attribute_hidden = +const struct locale_data _nl_C_LC_ADDRESS = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 13, { - { .string = "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = _nl_C_codeset } + { string: "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-collate.c b/src/kernel/libroot/posix/glibc/locale/C-collate.c index cc8c8ee81f..ce2ea1a541 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-collate.c +++ b/src/kernel/libroot/posix/glibc/locale/C-collate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -98,52 +98,52 @@ static const uint32_t collseqwc[] = L'\xf8', L'\xf9', L'\xfa', L'\xfb', L'\xfc', L'\xfd', L'\xfe', L'\xff' }; -const struct locale_data _nl_C_LC_COLLATE attribute_hidden = +const struct locale_data _nl_C_LC_COLLATE = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 19, { /* _NL_COLLATE_NRULES */ - { .word = 0 }, + { word: 0 }, /* _NL_COLLATE_RULESETS */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_TABLEMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_WEIGHTMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_EXTRAMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_INDIRECTMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_GAP1 */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_GAP2 */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_GAP3 */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_TABLEWC */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_WEIGHTWC */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_EXTRAWC */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_INDIRECTWC */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_SYMB_HASH_SIZEMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_SYMB_TABLEMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_SYMB_EXTRAMB */ - { .string = NULL }, + { string: NULL }, /* _NL_COLLATE_COLLSEQMB */ - { .string = collseqmb }, + { string: collseqmb }, /* _NL_COLLATE_COLLSEQWC */ - { .string = (const char *) collseqwc }, + { string: (const char *) collseqwc }, /* _NL_COLLATE_CODESET */ - { .string = _nl_C_codeset } + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-ctype.c b/src/kernel/libroot/posix/glibc/locale/C-ctype.c index ff56258e58..35479baf29 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-ctype.c +++ b/src/kernel/libroot/posix/glibc/locale/C-ctype.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -30,7 +30,7 @@ In the `_nl_C_LC_CTYPE_class' array the value for EOF (== -1) is set to always return 0 and the conversion arrays return EOF. */ -const char _nl_C_LC_CTYPE_class[768] attribute_hidden = +const char _nl_C_LC_CTYPE_class[768] = /* 0x80 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" /* 0x86 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" /* 0x8c */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" @@ -96,7 +96,7 @@ const char _nl_C_LC_CTYPE_class[768] attribute_hidden = /* 0xf4 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" /* 0xfa */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ; -const char _nl_C_LC_CTYPE_class32[1024] attribute_hidden = +const char _nl_C_LC_CTYPE_class32[1024] = /* 0x00 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" /* 0x03 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" /* 0x06 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" @@ -184,7 +184,7 @@ const char _nl_C_LC_CTYPE_class32[1024] attribute_hidden = /* 0xfc */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" /* 0xff */ "\000\000\000\000" ; -const uint32_t _nl_C_LC_CTYPE_toupper[384] attribute_hidden = +const uint32_t _nl_C_LC_CTYPE_toupper[384] = { /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, @@ -235,7 +235,7 @@ const uint32_t _nl_C_LC_CTYPE_toupper[384] attribute_hidden = /* 0xf0 */ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf8 */ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }; -const uint32_t _nl_C_LC_CTYPE_tolower[384] attribute_hidden = +const uint32_t _nl_C_LC_CTYPE_tolower[384] = { /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, @@ -297,7 +297,7 @@ const uint32_t _nl_C_LC_CTYPE_tolower[384] attribute_hidden = uint32_t level3[1 << p]; \ } -const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_upper attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_upper = { { 0x00000000, 0x00000000, 0x07fffffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -310,7 +310,7 @@ const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_upper attribute_hidden = /* 3rd-level table */ { 0x07fffffe, 0x00000000 } }; -const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_lower attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_lower = { { 0x00000000, 0x00000000, 0x00000000, 0x07fffffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -323,7 +323,7 @@ const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_lower attribute_hidden = /* 3rd-level table */ { 0x00000000, 0x07fffffe } }; -const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_alpha attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_alpha = { { 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -336,7 +336,7 @@ const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_alpha attribute_hidden = /* 3rd-level table */ { 0x07fffffe, 0x07fffffe } }; -const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_digit attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_digit = { { 0x00000000, 0x03ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -349,7 +349,7 @@ const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_digit attribute_hidden = /* 3rd-level table */ { 0x00000000, 0x03ff0000 } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_xdigit attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_xdigit = { { 0x00000000, 0x03ff0000, 0x0000007e, 0x0000007e, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -362,7 +362,7 @@ const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_xdigit attribute_hidden = /* 3rd-level table */ { 0x00000000, 0x03ff0000, 0x0000007e, 0x0000007e } }; -const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_space attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_space = { { 0x00003e00, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -375,7 +375,7 @@ const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_space attribute_hidden = /* 3rd-level table */ { 0x00003e00, 0x00000001 } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_print attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_print = { { 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -388,7 +388,7 @@ const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_print attribute_hidden = /* 3rd-level table */ { 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_graph attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_graph = { { 0x00000000, 0xfffffffe, 0xffffffff, 0x7fffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -401,7 +401,7 @@ const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_graph attribute_hidden = /* 3rd-level table */ { 0x00000000, 0xfffffffe, 0xffffffff, 0x7fffffff } }; -const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_blank attribute_hidden = +const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_blank = { { 0x00000200, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -414,7 +414,7 @@ const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_blank attribute_hidden = /* 3rd-level table */ { 0x00000200, 0x00000001 } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_cntrl attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_cntrl = { { 0xffffffff, 0x00000000, 0x00000000, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -427,7 +427,7 @@ const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_cntrl attribute_hidden = /* 3rd-level table */ { 0xffffffff, 0x00000000, 0x00000000, 0x80000000 } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_punct attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_punct = { { 0x00000000, 0xfc00fffe, 0xf8000001, 0x78000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -440,7 +440,7 @@ const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_punct attribute_hidden = /* 3rd-level table */ { 0x00000000, 0xfc00fffe, 0xf8000001, 0x78000001 } }; -const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_alnum attribute_hidden = +const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_alnum = { { 0x00000000, 0x03ff0000, 0x07fffffe, 0x07fffffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000 @@ -461,7 +461,7 @@ const struct uint32_t level2[4]; int32_t level3[32]; } -_nl_C_LC_CTYPE_map_toupper attribute_hidden = +_nl_C_LC_CTYPE_map_toupper = { { 7, 1, 5, 3, 31 }, /* 1st-level table */ @@ -480,7 +480,7 @@ _nl_C_LC_CTYPE_map_toupper attribute_hidden = 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, -_nl_C_LC_CTYPE_map_tolower attribute_hidden = +_nl_C_LC_CTYPE_map_tolower = { { 7, 1, 5, 3, 31 }, /* 1st-level table */ @@ -507,7 +507,7 @@ const struct uint32_t level2[8]; int8_t level3[33]; } -_nl_C_LC_CTYPE_width attribute_hidden = +_nl_C_LC_CTYPE_width = { { 7, 1, 4, 7, 15 }, /* 1st-level table */ @@ -538,37 +538,37 @@ _nl_C_LC_CTYPE_width attribute_hidden = NR_FIXED == _NL_ITEM_INDEX (_NL_CTYPE_EXTRA_MAP_1). */ typedef int assertion1[1 - 2 * (NR_FIXED != _NL_ITEM_INDEX (_NL_CTYPE_EXTRA_MAP_1))]; -const struct locale_data _nl_C_LC_CTYPE attribute_hidden = +const struct locale_data _nl_C_LC_CTYPE = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 1, /* Enable transliteration by default. */ + NULL, NR_FIXED + NR_CLASSES + NR_MAPS, { /* _NL_CTYPE_CLASS */ - { .string = _nl_C_LC_CTYPE_class }, + { string: _nl_C_LC_CTYPE_class }, /* _NL_CTYPE_TOUPPER */ - { .string = (const char *) _nl_C_LC_CTYPE_toupper }, + { string: (const char *) _nl_C_LC_CTYPE_toupper }, /* _NL_CTYPE_GAP1 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_TOLOWER */ - { .string = (const char *) _nl_C_LC_CTYPE_tolower }, + { string: (const char *) _nl_C_LC_CTYPE_tolower }, /* _NL_CTYPE_GAP2 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_CLASS32 */ - { .string = _nl_C_LC_CTYPE_class32 }, + { string: _nl_C_LC_CTYPE_class32 }, /* _NL_CTYPE_GAP3 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_GAP4 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_GAP5 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_GAP6 */ - { .string = NULL }, + { string: NULL }, /* _NL_CTYPE_CLASS_NAMES */ - { .string = "upper\0" "lower\0" "alpha\0" "digit\0" "xdigit\0" "space\0" + { string: "upper\0" "lower\0" "alpha\0" "digit\0" "xdigit\0" "space\0" "print\0" "graph\0" "blank\0" "cntrl\0" "punct\0" "alnum\0" #ifdef PREDEFINED_CLASSES "left_to_right\0" "right_to_left\0" "num_terminator\0" @@ -580,106 +580,106 @@ const struct locale_data _nl_C_LC_CTYPE attribute_hidden = #endif }, /* _NL_CTYPE_MAP_NAMES */ - { .string = "toupper\0" "tolower\0" + { string: "toupper\0" "tolower\0" #ifdef PREDEFINED_CLASSES "tosymmetric\0" #endif }, /* _NL_CTYPE_WIDTH */ - { .string = (const char *) _nl_C_LC_CTYPE_width.header }, + { string: (const char *) _nl_C_LC_CTYPE_width.header }, /* _NL_CTYPE_MB_CUR_MAX */ - { .word = 1 }, + { word: 1 }, /* _NL_CTYPE_CODESET_NAME */ - { .string = _nl_C_codeset }, + { string: _nl_C_codeset }, /* _NL_CTYPE_TOUPPER32 */ - { .string = (const char *) &_nl_C_LC_CTYPE_toupper[128] }, + { string: (const char *) &_nl_C_LC_CTYPE_toupper[128] }, /* _NL_CTYPE_TOLOWER32 */ - { .string = (const char *) &_nl_C_LC_CTYPE_tolower[128] }, + { string: (const char *) &_nl_C_LC_CTYPE_tolower[128] }, /* _NL_CTYPE_CLASS_OFFSET */ - { .word = NR_FIXED }, + { word: NR_FIXED }, /* _NL_CTYPE_MAP_OFFSET */ - { .word = NR_FIXED + NR_CLASSES }, + { word: NR_FIXED + NR_CLASSES }, /* _NL_CTYPE_INDIGITS_MB_LEN */ - { .word = 1 }, + { word: 1 }, /* _NL_CTYPE_INDIGITS0_MB .. _NL_CTYPE_INDIGITS9_MB */ - { .string = "0" }, - { .string = "1" }, - { .string = "2" }, - { .string = "3" }, - { .string = "4" }, - { .string = "5" }, - { .string = "6" }, - { .string = "7" }, - { .string = "8" }, - { .string = "9" }, + { string: "0" }, + { string: "1" }, + { string: "2" }, + { string: "3" }, + { string: "4" }, + { string: "5" }, + { string: "6" }, + { string: "7" }, + { string: "8" }, + { string: "9" }, /* _NL_CTYPE_INDIGITS_WC_LEN */ - { .word = 1 }, + { word: 1 }, /* _NL_CTYPE_INDIGITS0_WC .. _NL_CTYPE_INDIGITS9_WC */ - { .wstr = (uint32_t *) L"0" }, - { .wstr = (uint32_t *) L"1" }, - { .wstr = (uint32_t *) L"2" }, - { .wstr = (uint32_t *) L"3" }, - { .wstr = (uint32_t *) L"4" }, - { .wstr = (uint32_t *) L"5" }, - { .wstr = (uint32_t *) L"6" }, - { .wstr = (uint32_t *) L"7" }, - { .wstr = (uint32_t *) L"8" }, - { .wstr = (uint32_t *) L"9" }, + { wstr: (uint32_t *) L"0" }, + { wstr: (uint32_t *) L"1" }, + { wstr: (uint32_t *) L"2" }, + { wstr: (uint32_t *) L"3" }, + { wstr: (uint32_t *) L"4" }, + { wstr: (uint32_t *) L"5" }, + { wstr: (uint32_t *) L"6" }, + { wstr: (uint32_t *) L"7" }, + { wstr: (uint32_t *) L"8" }, + { wstr: (uint32_t *) L"9" }, /* _NL_CTYPE_OUTDIGIT0_MB .. _NL_CTYPE_OUTDIGIT9_MB */ - { .string = "0" }, - { .string = "1" }, - { .string = "2" }, - { .string = "3" }, - { .string = "4" }, - { .string = "5" }, - { .string = "6" }, - { .string = "7" }, - { .string = "8" }, - { .string = "9" }, + { string: "0" }, + { string: "1" }, + { string: "2" }, + { string: "3" }, + { string: "4" }, + { string: "5" }, + { string: "6" }, + { string: "7" }, + { string: "8" }, + { string: "9" }, /* _NL_CTYPE_OUTDIGIT0_WC .. _NL_CTYPE_OUTDIGIT9_WC */ - { .word = L'0' }, - { .word = L'1' }, - { .word = L'2' }, - { .word = L'3' }, - { .word = L'4' }, - { .word = L'5' }, - { .word = L'6' }, - { .word = L'7' }, - { .word = L'8' }, - { .word = L'9' }, + { word: L'0' }, + { word: L'1' }, + { word: L'2' }, + { word: L'3' }, + { word: L'4' }, + { word: L'5' }, + { word: L'6' }, + { word: L'7' }, + { word: L'8' }, + { word: L'9' }, /* _NL_CTYPE_TRANSLIT_TAB_SIZE */ - { .word = NTRANSLIT }, + { word: NTRANSLIT }, /* _NL_CTYPE_TRANSLIT_FROM_IDX */ - { .wstr = translit_from_idx }, + { wstr: translit_from_idx }, /* _NL_CTYPE_TRANSLIT_FROM_TBL */ - { .wstr = (uint32_t *) translit_from_tbl }, + { wstr: (uint32_t *) translit_from_tbl }, /* _NL_CTYPE_TRANSLIT_TO_IDX */ - { .wstr = translit_to_idx }, + { wstr: translit_to_idx }, /* _NL_CTYPE_TRANSLIT_TO_TBL */ - { .wstr = (uint32_t *) translit_to_tbl }, + { wstr: (uint32_t *) translit_to_tbl }, /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */ - { .word = 1 }, + { word: 1 }, /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */ - { .wstr = (uint32_t *) L"?" }, + { wstr: (uint32_t *) L"?" }, /* _NL_CTYPE_TRANSLIT_IGNORE_LEN */ - { .word = 0 }, + { word: 0 }, /* _NL_CTYPE_TRANSLIT_IGNORE */ - { .wstr = NULL }, + { wstr: NULL }, /* NR_CLASSES wctype_tables */ - { .string = (const char *) _nl_C_LC_CTYPE_class_upper.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_lower.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_alpha.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_digit.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_xdigit.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_space.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_print.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_graph.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_blank.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_cntrl.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_punct.header }, - { .string = (const char *) _nl_C_LC_CTYPE_class_alnum.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_upper.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_lower.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_alpha.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_digit.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_xdigit.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_space.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_print.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_graph.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_blank.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_cntrl.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_punct.header }, + { string: (const char *) _nl_C_LC_CTYPE_class_alnum.header }, /* NR_MAPS wctrans_tables */ - { .string = (const char *) _nl_C_LC_CTYPE_map_toupper.header }, - { .string = (const char *) _nl_C_LC_CTYPE_map_tolower.header } + { string: (const char *) _nl_C_LC_CTYPE_map_toupper.header }, + { string: (const char *) _nl_C_LC_CTYPE_map_tolower.header } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-identification.c b/src/kernel/libroot/posix/glibc/locale/C-identification.c index 628e8f145d..8af6858309 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-identification.c +++ b/src/kernel/libroot/posix/glibc/locale/C-identification.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,34 +24,34 @@ /* This table's entries are taken from ISO 14652, the table in section 4.12 "LC_IDENTIFICATION". */ -const struct locale_data _nl_C_LC_IDENTIFICATION attribute_hidden = +const struct locale_data _nl_C_LC_IDENTIFICATION = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 16, { - { .string = "ISO/IEC 14652 i18n FDCC-set" }, - { .string = "ISO/IEC JTC1/SC22/WG20 - internationalization" }, - { .string = "C/o Keld Simonsen, Skt. Jorgens Alle 8, DK-1615 Kobenhavn V" }, - { .string = "Keld Simonsen" }, - { .string = "keld@dkuug.dk" }, - { .string = "+45 3122-6543" }, - { .string = "+45 3325-6543" }, - { .string = "" }, - { .string = "ISO" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "1.0" }, - { .string = "1997-12-20" }, - { .string = "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" + { string: "ISO/IEC 14652 i18n FDCC-set" }, + { string: "ISO/IEC JTC1/SC22/WG20 - internationalization" }, + { string: "C/o Keld Simonsen, Skt. Jorgens Alle 8, DK-1615 Kobenhavn V" }, + { string: "Keld Simonsen" }, + { string: "keld@dkuug.dk" }, + { string: "+45 3122-6543" }, + { string: "+45 3325-6543" }, + { string: "" }, + { string: "ISO" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "1.0" }, + { string: "1997-12-20" }, + { string: "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999" }, - { .string = _nl_C_codeset } + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-measurement.c b/src/kernel/libroot/posix/glibc/locale/C-measurement.c index 796fe29ce5..e6473672c1 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-measurement.c +++ b/src/kernel/libroot/posix/glibc/locale/C-measurement.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,16 +24,16 @@ /* This table's entries are taken from ISO 14652, the table in section 4.12 "LC_MEASUREMENT". */ -const struct locale_data _nl_C_LC_MEASUREMENT attribute_hidden = +const struct locale_data _nl_C_LC_MEASUREMENT = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 2, { - { .string = "\1" }, - { .string = _nl_C_codeset } + { string: "\1" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-messages.c b/src/kernel/libroot/posix/glibc/locale/C-messages.c index 499d4bf5a6..bcb5ae3763 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-messages.c +++ b/src/kernel/libroot/posix/glibc/locale/C-messages.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -24,19 +24,19 @@ The last two fields are a GNU extension. */ -const struct locale_data _nl_C_LC_MESSAGES attribute_hidden = +const struct locale_data _nl_C_LC_MESSAGES = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 5, { - { .string = "^[yY]" }, - { .string = "^[nN]" }, - { .string = "" }, - { .string = "" }, - { .string = _nl_C_codeset } + { string: "^[yY]" }, + { string: "^[nN]" }, + { string: "" }, + { string: "" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-monetary.c b/src/kernel/libroot/posix/glibc/locale/C-monetary.c index 8cccf9637a..ca5e13bdec 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-monetary.c +++ b/src/kernel/libroot/posix/glibc/locale/C-monetary.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -28,60 +28,60 @@ static const char not_available[] = "\377"; static const char not_available[] = "\177"; #endif -const struct locale_data _nl_C_LC_MONETARY attribute_hidden = +const struct locale_data _nl_C_LC_MONETARY = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 46, { - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = "-" }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = "" }, - { .string = "" }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .string = not_available }, - { .word = 10101 }, - { .word = 99991231 }, - { .word = 10101 }, - { .word = 99991231 }, - { .word = 1 }, - { .word = (unsigned int) L'\0' }, - { .word = (unsigned int) L'\0' }, - { .string = _nl_C_codeset } + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: "-" }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: "" }, + { string: "" }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { string: not_available }, + { word: 10101 }, + { word: 99991231 }, + { word: 10101 }, + { word: 99991231 }, + { word: 1 }, + { word: (unsigned int) L'\0' }, + { word: (unsigned int) L'\0' }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-name.c b/src/kernel/libroot/posix/glibc/locale/C-name.c index 65033d6751..4286b82443 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-name.c +++ b/src/kernel/libroot/posix/glibc/locale/C-name.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,21 +24,21 @@ /* This table's entries are taken from ISO 14652, the table in section 4.9 "LC_NAME". */ -const struct locale_data _nl_C_LC_NAME attribute_hidden = +const struct locale_data _nl_C_LC_NAME = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 7, { - { .string = "%p%t%g%t%m%t%f" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = _nl_C_codeset } + { string: "%p%t%g%t%m%t%f" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-numeric.c b/src/kernel/libroot/posix/glibc/locale/C-numeric.c index 377c51cdfb..d1c599b774 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-numeric.c +++ b/src/kernel/libroot/posix/glibc/locale/C-numeric.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -21,20 +21,20 @@ /* This table's entries are taken from POSIX.2 Table 2-10 ``LC_NUMERIC Category Definition in the POSIX Locale''. */ -const struct locale_data _nl_C_LC_NUMERIC attribute_hidden = +const struct locale_data _nl_C_LC_NUMERIC = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 6, { - { .string = "." }, - { .string = "" }, - { .string = "" }, - { .word = (unsigned int) L'.' }, - { .word = (unsigned int) L'\0' }, - { .string = _nl_C_codeset } + { string: "." }, + { string: "" }, + { string: "" }, + { word: (unsigned int) L'.' }, + { word: (unsigned int) L'\0' }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-paper.c b/src/kernel/libroot/posix/glibc/locale/C-paper.c index 74e6401de7..a168084c26 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-paper.c +++ b/src/kernel/libroot/posix/glibc/locale/C-paper.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,17 +24,17 @@ /* This table's entries are taken from ISO 14652, the table in section 4.8 "LC_PAPER". */ -const struct locale_data _nl_C_LC_PAPER attribute_hidden = +const struct locale_data _nl_C_LC_PAPER = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 3, { - { .word = 297 }, - { .word = 210 }, - { .string = _nl_C_codeset } + { word: 297 }, + { word: 210 }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-telephone.c b/src/kernel/libroot/posix/glibc/locale/C-telephone.c index 561a1ef28a..d7c830ce13 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-telephone.c +++ b/src/kernel/libroot/posix/glibc/locale/C-telephone.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,19 +24,19 @@ /* This table's entries are taken from ISO 14652, the table in section 4.11 "LC_TELEPHONE". */ -const struct locale_data _nl_C_LC_TELEPHONE attribute_hidden = +const struct locale_data _nl_C_LC_TELEPHONE = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 5, { - { .string = "+%c %a %l" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = _nl_C_codeset } + { string: "+%c %a %l" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-time.c b/src/kernel/libroot/posix/glibc/locale/C-time.c index a8534b1704..f230da839b 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-time.c +++ b/src/kernel/libroot/posix/glibc/locale/C-time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -23,125 +23,125 @@ ``LC_TIME Category Definition in the POSIX Locale'', with additions from ISO 14652, section 4.6. */ -const struct locale_data _nl_C_LC_TIME attribute_hidden = +const struct locale_data _nl_C_LC_TIME = { _nl_C_name, - NULL, 0, 0, /* no file mapped */ - { NULL, }, /* no cached data */ + NULL, 0, 0, /* no file mapped */ UNDELETABLE, 0, + NULL, 111, { - { .string = "Sun" }, - { .string = "Mon" }, - { .string = "Tue" }, - { .string = "Wed" }, - { .string = "Thu" }, - { .string = "Fri" }, - { .string = "Sat" }, - { .string = "Sunday" }, - { .string = "Monday" }, - { .string = "Tuesday" }, - { .string = "Wednesday" }, - { .string = "Thursday" }, - { .string = "Friday" }, - { .string = "Saturday" }, - { .string = "Jan" }, - { .string = "Feb" }, - { .string = "Mar" }, - { .string = "Apr" }, - { .string = "May" }, - { .string = "Jun" }, - { .string = "Jul" }, - { .string = "Aug" }, - { .string = "Sep" }, - { .string = "Oct" }, - { .string = "Nov" }, - { .string = "Dec" }, - { .string = "January" }, - { .string = "February" }, - { .string = "March" }, - { .string = "April" }, - { .string = "May" }, - { .string = "June" }, - { .string = "July" }, - { .string = "August" }, - { .string = "September" }, - { .string = "October" }, - { .string = "November" }, - { .string = "December" }, - { .string = "AM" }, - { .string = "PM" }, - { .string = "%a %b %e %H:%M:%S %Y" }, - { .string = "%m/%d/%y" }, - { .string = "%H:%M:%S" }, - { .string = "%I:%M:%S %p" }, - { .string = NULL }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .string = "" }, - { .word = 0 }, - { .string = "" }, - { .wstr = (const uint32_t *) L"Sun" }, - { .wstr = (const uint32_t *) L"Mon" }, - { .wstr = (const uint32_t *) L"Tue" }, - { .wstr = (const uint32_t *) L"Wed" }, - { .wstr = (const uint32_t *) L"Thu" }, - { .wstr = (const uint32_t *) L"Fri" }, - { .wstr = (const uint32_t *) L"Sat" }, - { .wstr = (const uint32_t *) L"Sunday" }, - { .wstr = (const uint32_t *) L"Monday" }, - { .wstr = (const uint32_t *) L"Tuesday" }, - { .wstr = (const uint32_t *) L"Wednesday" }, - { .wstr = (const uint32_t *) L"Thursday" }, - { .wstr = (const uint32_t *) L"Friday" }, - { .wstr = (const uint32_t *) L"Saturday" }, - { .wstr = (const uint32_t *) L"Jan" }, - { .wstr = (const uint32_t *) L"Feb" }, - { .wstr = (const uint32_t *) L"Mar" }, - { .wstr = (const uint32_t *) L"Apr" }, - { .wstr = (const uint32_t *) L"May" }, - { .wstr = (const uint32_t *) L"Jun" }, - { .wstr = (const uint32_t *) L"Jul" }, - { .wstr = (const uint32_t *) L"Aug" }, - { .wstr = (const uint32_t *) L"Sep" }, - { .wstr = (const uint32_t *) L"Oct" }, - { .wstr = (const uint32_t *) L"Nov" }, - { .wstr = (const uint32_t *) L"Dec" }, - { .wstr = (const uint32_t *) L"January" }, - { .wstr = (const uint32_t *) L"February" }, - { .wstr = (const uint32_t *) L"March" }, - { .wstr = (const uint32_t *) L"April" }, - { .wstr = (const uint32_t *) L"May" }, - { .wstr = (const uint32_t *) L"June" }, - { .wstr = (const uint32_t *) L"July" }, - { .wstr = (const uint32_t *) L"August" }, - { .wstr = (const uint32_t *) L"September" }, - { .wstr = (const uint32_t *) L"October" }, - { .wstr = (const uint32_t *) L"November" }, - { .wstr = (const uint32_t *) L"December" }, - { .wstr = (const uint32_t *) L"AM" }, - { .wstr = (const uint32_t *) L"PM" }, - { .wstr = (const uint32_t *) L"%a %b %e %H:%M:%S %Y" }, - { .wstr = (const uint32_t *) L"%m/%d/%y" }, - { .wstr = (const uint32_t *) L"%H:%M:%S" }, - { .wstr = (const uint32_t *) L"%I:%M:%S %p" }, - { .wstr = (const uint32_t *) L"" }, - { .wstr = (const uint32_t *) L"" }, - { .wstr = (const uint32_t *) L"" }, - { .wstr = (const uint32_t *) L"" }, - { .wstr = (const uint32_t *) L"" }, - { .string = "\7" }, - { .word = 19971130 }, - { .string = "\4" }, - { .string = "\7" }, - { .string = "\1" }, - { .string = "\1" }, - { .string = "" }, - { .string = "%a %b %e %H:%M:%S %Z %Y" }, - { .wstr = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y" }, - { .string = _nl_C_codeset } + { string: "Sun" }, + { string: "Mon" }, + { string: "Tue" }, + { string: "Wed" }, + { string: "Thu" }, + { string: "Fri" }, + { string: "Sat" }, + { string: "Sunday" }, + { string: "Monday" }, + { string: "Tuesday" }, + { string: "Wednesday" }, + { string: "Thursday" }, + { string: "Friday" }, + { string: "Saturday" }, + { string: "Jan" }, + { string: "Feb" }, + { string: "Mar" }, + { string: "Apr" }, + { string: "May" }, + { string: "Jun" }, + { string: "Jul" }, + { string: "Aug" }, + { string: "Sep" }, + { string: "Oct" }, + { string: "Nov" }, + { string: "Dec" }, + { string: "January" }, + { string: "February" }, + { string: "March" }, + { string: "April" }, + { string: "May" }, + { string: "June" }, + { string: "July" }, + { string: "August" }, + { string: "September" }, + { string: "October" }, + { string: "November" }, + { string: "December" }, + { string: "AM" }, + { string: "PM" }, + { string: "%a %b %e %H:%M:%S %Y" }, + { string: "%m/%d/%y" }, + { string: "%H:%M:%S" }, + { string: "%I:%M:%S %p" }, + { string: NULL }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { string: "" }, + { word: 0 }, + { string: "" }, + { wstr: (const uint32_t *) L"Sun" }, + { wstr: (const uint32_t *) L"Mon" }, + { wstr: (const uint32_t *) L"Tue" }, + { wstr: (const uint32_t *) L"Wed" }, + { wstr: (const uint32_t *) L"Thu" }, + { wstr: (const uint32_t *) L"Fri" }, + { wstr: (const uint32_t *) L"Sat" }, + { wstr: (const uint32_t *) L"Sunday" }, + { wstr: (const uint32_t *) L"Monday" }, + { wstr: (const uint32_t *) L"Tuesday" }, + { wstr: (const uint32_t *) L"Wednesday" }, + { wstr: (const uint32_t *) L"Thursday" }, + { wstr: (const uint32_t *) L"Friday" }, + { wstr: (const uint32_t *) L"Saturday" }, + { wstr: (const uint32_t *) L"Jan" }, + { wstr: (const uint32_t *) L"Feb" }, + { wstr: (const uint32_t *) L"Mar" }, + { wstr: (const uint32_t *) L"Apr" }, + { wstr: (const uint32_t *) L"May" }, + { wstr: (const uint32_t *) L"Jun" }, + { wstr: (const uint32_t *) L"Jul" }, + { wstr: (const uint32_t *) L"Aug" }, + { wstr: (const uint32_t *) L"Sep" }, + { wstr: (const uint32_t *) L"Oct" }, + { wstr: (const uint32_t *) L"Nov" }, + { wstr: (const uint32_t *) L"Dec" }, + { wstr: (const uint32_t *) L"January" }, + { wstr: (const uint32_t *) L"February" }, + { wstr: (const uint32_t *) L"March" }, + { wstr: (const uint32_t *) L"April" }, + { wstr: (const uint32_t *) L"May" }, + { wstr: (const uint32_t *) L"June" }, + { wstr: (const uint32_t *) L"July" }, + { wstr: (const uint32_t *) L"August" }, + { wstr: (const uint32_t *) L"September" }, + { wstr: (const uint32_t *) L"October" }, + { wstr: (const uint32_t *) L"November" }, + { wstr: (const uint32_t *) L"December" }, + { wstr: (const uint32_t *) L"AM" }, + { wstr: (const uint32_t *) L"PM" }, + { wstr: (const uint32_t *) L"%a %b %e %H:%M:%S %Y" }, + { wstr: (const uint32_t *) L"%m/%d/%y" }, + { wstr: (const uint32_t *) L"%H:%M:%S" }, + { wstr: (const uint32_t *) L"%I:%M:%S %p" }, + { wstr: (const uint32_t *) L"" }, + { wstr: (const uint32_t *) L"" }, + { wstr: (const uint32_t *) L"" }, + { wstr: (const uint32_t *) L"" }, + { wstr: (const uint32_t *) L"" }, + { string: "\7" }, + { word: 19971130 }, + { string: "\4" }, + { string: "\7" }, + { string: "\1" }, + { string: "\1" }, + { string: "" }, + { string: "%a %b %e %H:%M:%S %Z %Y" }, + { wstr: (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y" }, + { string: _nl_C_codeset } } }; diff --git a/src/kernel/libroot/posix/glibc/locale/C-translit.h b/src/kernel/libroot/posix/glibc/locale/C-translit.h index 568db4866f..139b0814b2 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-translit.h +++ b/src/kernel/libroot/posix/glibc/locale/C-translit.h @@ -1,4 +1,4 @@ -#define NTRANSLIT 1352 +#define NTRANSLIT 1291 static const uint32_t translit_from_idx[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, @@ -108,12 +108,7 @@ static const uint32_t translit_from_idx[] = 2496, 2498, 2500, 2502, 2504, 2506, 2508, 2510, 2512, 2514, 2516, 2518, 2520, 2522, 2524, 2526, 2528, 2530, 2532, 2534, 2536, 2538, 2540, 2542, 2544, 2546, 2548, 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, - 2568, 2570, 2572, 2574, 2576, 2578, 2580, 2582, 2584, 2586, 2588, 2590, - 2592, 2594, 2596, 2598, 2600, 2602, 2604, 2606, 2608, 2610, 2612, 2614, - 2616, 2618, 2620, 2622, 2624, 2626, 2628, 2630, 2632, 2634, 2636, 2638, - 2640, 2642, 2644, 2646, 2648, 2650, 2652, 2654, 2656, 2658, 2660, 2662, - 2664, 2666, 2668, 2670, 2672, 2674, 2676, 2678, 2680, 2682, 2684, 2686, - 2688, 2690, 2692, 2694, 2696, 2698, 2700, 2702 + 2568, 2570, 2572, 2574, 2576, 2578, 2580 }; static const wchar_t translit_from_tbl[] = L"\x00a0" L"\0" L"\x00a9" L"\0" L"\x00ab" L"\0" L"\x00ad" L"\0" L"\x00ae" @@ -132,81 +127,71 @@ static const wchar_t translit_from_tbl[] = L"\0" L"\x201d" L"\0" L"\x201e" L"\0" L"\x201f" L"\0" L"\x2020" L"\0" L"\x2022" L"\0" L"\x2024" L"\0" L"\x2025" L"\0" L"\x2026" L"\0" L"\x202f" L"\0" L"\x2035" L"\0" L"\x2036" L"\0" L"\x2037" L"\0" L"\x2039" L"\0" - L"\x203a" L"\0" L"\x203c" L"\0" L"\x2047" L"\0" L"\x2048" L"\0" L"\x2049" - L"\0" L"\x205f" L"\0" L"\x2060" L"\0" L"\x2061" L"\0" L"\x2062" L"\0" - L"\x2063" L"\0" L"\x20a8" L"\0" L"\x20ac" L"\0" L"\x2100" L"\0" L"\x2101" - L"\0" L"\x2102" L"\0" L"\x2105" L"\0" L"\x2106" L"\0" L"\x210a" L"\0" - L"\x210b" L"\0" L"\x210c" L"\0" L"\x210d" L"\0" L"\x210e" L"\0" L"\x2110" - L"\0" L"\x2111" L"\0" L"\x2112" L"\0" L"\x2113" L"\0" L"\x2115" L"\0" - L"\x2116" L"\0" L"\x2119" L"\0" L"\x211a" L"\0" L"\x211b" L"\0" L"\x211c" - L"\0" L"\x211d" L"\0" L"\x2121" L"\0" L"\x2122" L"\0" L"\x2124" L"\0" - L"\x2126" L"\0" L"\x2128" L"\0" L"\x212c" L"\0" L"\x212d" L"\0" L"\x212e" - L"\0" L"\x212f" L"\0" L"\x2130" L"\0" L"\x2131" L"\0" L"\x2133" L"\0" - L"\x2134" L"\0" L"\x2139" L"\0" L"\x2145" L"\0" L"\x2146" L"\0" L"\x2147" - L"\0" L"\x2148" L"\0" L"\x2149" L"\0" L"\x2153" L"\0" L"\x2154" L"\0" - L"\x2155" L"\0" L"\x2156" L"\0" L"\x2157" L"\0" L"\x2158" L"\0" L"\x2159" - L"\0" L"\x215a" L"\0" L"\x215b" L"\0" L"\x215c" L"\0" L"\x215d" L"\0" - L"\x215e" L"\0" L"\x215f" L"\0" L"\x2160" L"\0" L"\x2161" L"\0" L"\x2162" - L"\0" L"\x2163" L"\0" L"\x2164" L"\0" L"\x2165" L"\0" L"\x2166" L"\0" - L"\x2167" L"\0" L"\x2168" L"\0" L"\x2169" L"\0" L"\x216a" L"\0" L"\x216b" - L"\0" L"\x216c" L"\0" L"\x216d" L"\0" L"\x216e" L"\0" L"\x216f" L"\0" - L"\x2170" L"\0" L"\x2171" L"\0" L"\x2172" L"\0" L"\x2173" L"\0" L"\x2174" - L"\0" L"\x2175" L"\0" L"\x2176" L"\0" L"\x2177" L"\0" L"\x2178" L"\0" - L"\x2179" L"\0" L"\x217a" L"\0" L"\x217b" L"\0" L"\x217c" L"\0" L"\x217d" - L"\0" L"\x217e" L"\0" L"\x217f" L"\0" L"\x2190" L"\0" L"\x2192" L"\0" - L"\x2194" L"\0" L"\x21d0" L"\0" L"\x21d2" L"\0" L"\x21d4" L"\0" L"\x2212" - L"\0" L"\x2215" L"\0" L"\x2216" L"\0" L"\x2217" L"\0" L"\x2223" L"\0" - L"\x2236" L"\0" L"\x223c" L"\0" L"\x2264" L"\0" L"\x2265" L"\0" L"\x226a" - L"\0" L"\x226b" L"\0" L"\x22d8" L"\0" L"\x22d9" L"\0" L"\x2400" L"\0" - L"\x2401" L"\0" L"\x2402" L"\0" L"\x2403" L"\0" L"\x2404" L"\0" L"\x2405" - L"\0" L"\x2406" L"\0" L"\x2407" L"\0" L"\x2408" L"\0" L"\x2409" L"\0" - L"\x240a" L"\0" L"\x240b" L"\0" L"\x240c" L"\0" L"\x240d" L"\0" L"\x240e" - L"\0" L"\x240f" L"\0" L"\x2410" L"\0" L"\x2411" L"\0" L"\x2412" L"\0" - L"\x2413" L"\0" L"\x2414" L"\0" L"\x2415" L"\0" L"\x2416" L"\0" L"\x2417" - L"\0" L"\x2418" L"\0" L"\x2419" L"\0" L"\x241a" L"\0" L"\x241b" L"\0" - L"\x241c" L"\0" L"\x241d" L"\0" L"\x241e" L"\0" L"\x241f" L"\0" L"\x2420" - L"\0" L"\x2421" L"\0" L"\x2423" L"\0" L"\x2424" L"\0" L"\x2460" L"\0" - L"\x2461" L"\0" L"\x2462" L"\0" L"\x2463" L"\0" L"\x2464" L"\0" L"\x2465" - L"\0" L"\x2466" L"\0" L"\x2467" L"\0" L"\x2468" L"\0" L"\x2469" L"\0" - L"\x246a" L"\0" L"\x246b" L"\0" L"\x246c" L"\0" L"\x246d" L"\0" L"\x246e" - L"\0" L"\x246f" L"\0" L"\x2470" L"\0" L"\x2471" L"\0" L"\x2472" L"\0" - L"\x2473" L"\0" L"\x2474" L"\0" L"\x2475" L"\0" L"\x2476" L"\0" L"\x2477" - L"\0" L"\x2478" L"\0" L"\x2479" L"\0" L"\x247a" L"\0" L"\x247b" L"\0" - L"\x247c" L"\0" L"\x247d" L"\0" L"\x247e" L"\0" L"\x247f" L"\0" L"\x2480" - L"\0" L"\x2481" L"\0" L"\x2482" L"\0" L"\x2483" L"\0" L"\x2484" L"\0" - L"\x2485" L"\0" L"\x2486" L"\0" L"\x2487" L"\0" L"\x2488" L"\0" L"\x2489" - L"\0" L"\x248a" L"\0" L"\x248b" L"\0" L"\x248c" L"\0" L"\x248d" L"\0" - L"\x248e" L"\0" L"\x248f" L"\0" L"\x2490" L"\0" L"\x2491" L"\0" L"\x2492" - L"\0" L"\x2493" L"\0" L"\x2494" L"\0" L"\x2495" L"\0" L"\x2496" L"\0" - L"\x2497" L"\0" L"\x2498" L"\0" L"\x2499" L"\0" L"\x249a" L"\0" L"\x249b" - L"\0" L"\x249c" L"\0" L"\x249d" L"\0" L"\x249e" L"\0" L"\x249f" L"\0" - L"\x24a0" L"\0" L"\x24a1" L"\0" L"\x24a2" L"\0" L"\x24a3" L"\0" L"\x24a4" - L"\0" L"\x24a5" L"\0" L"\x24a6" L"\0" L"\x24a7" L"\0" L"\x24a8" L"\0" - L"\x24a9" L"\0" L"\x24aa" L"\0" L"\x24ab" L"\0" L"\x24ac" L"\0" L"\x24ad" - L"\0" L"\x24ae" L"\0" L"\x24af" L"\0" L"\x24b0" L"\0" L"\x24b1" L"\0" - L"\x24b2" L"\0" L"\x24b3" L"\0" L"\x24b4" L"\0" L"\x24b5" L"\0" L"\x24b6" - L"\0" L"\x24b7" L"\0" L"\x24b8" L"\0" L"\x24b9" L"\0" L"\x24ba" L"\0" - L"\x24bb" L"\0" L"\x24bc" L"\0" L"\x24bd" L"\0" L"\x24be" L"\0" L"\x24bf" - L"\0" L"\x24c0" L"\0" L"\x24c1" L"\0" L"\x24c2" L"\0" L"\x24c3" L"\0" - L"\x24c4" L"\0" L"\x24c5" L"\0" L"\x24c6" L"\0" L"\x24c7" L"\0" L"\x24c8" - L"\0" L"\x24c9" L"\0" L"\x24ca" L"\0" L"\x24cb" L"\0" L"\x24cc" L"\0" - L"\x24cd" L"\0" L"\x24ce" L"\0" L"\x24cf" L"\0" L"\x24d0" L"\0" L"\x24d1" - L"\0" L"\x24d2" L"\0" L"\x24d3" L"\0" L"\x24d4" L"\0" L"\x24d5" L"\0" - L"\x24d6" L"\0" L"\x24d7" L"\0" L"\x24d8" L"\0" L"\x24d9" L"\0" L"\x24da" - L"\0" L"\x24db" L"\0" L"\x24dc" L"\0" L"\x24dd" L"\0" L"\x24de" L"\0" - L"\x24df" L"\0" L"\x24e0" L"\0" L"\x24e1" L"\0" L"\x24e2" L"\0" L"\x24e3" - L"\0" L"\x24e4" L"\0" L"\x24e5" L"\0" L"\x24e6" L"\0" L"\x24e7" L"\0" - L"\x24e8" L"\0" L"\x24e9" L"\0" L"\x24ea" L"\0" L"\x2500" L"\0" L"\x2502" - L"\0" L"\x250c" L"\0" L"\x2510" L"\0" L"\x2514" L"\0" L"\x2518" L"\0" - L"\x251c" L"\0" L"\x2524" L"\0" L"\x252c" L"\0" L"\x2534" L"\0" L"\x253c" - L"\0" L"\x25e6" L"\0" L"\x2a74" L"\0" L"\x2a75" L"\0" L"\x2a76" L"\0" - L"\x3000" L"\0" L"\x30a0" L"\0" L"\x3251" L"\0" L"\x3252" L"\0" L"\x3253" - L"\0" L"\x3254" L"\0" L"\x3255" L"\0" L"\x3256" L"\0" L"\x3257" L"\0" - L"\x3258" L"\0" L"\x3259" L"\0" L"\x325a" L"\0" L"\x325b" L"\0" L"\x325c" - L"\0" L"\x325d" L"\0" L"\x325e" L"\0" L"\x325f" L"\0" L"\x32b1" L"\0" - L"\x32b2" L"\0" L"\x32b3" L"\0" L"\x32b4" L"\0" L"\x32b5" L"\0" L"\x32b6" - L"\0" L"\x32b7" L"\0" L"\x32b8" L"\0" L"\x32b9" L"\0" L"\x32ba" L"\0" - L"\x32bb" L"\0" L"\x32bc" L"\0" L"\x32bd" L"\0" L"\x32be" L"\0" L"\x32bf" + L"\x203a" L"\0" L"\x203c" L"\0" L"\x2048" L"\0" L"\x2049" L"\0" L"\x20a8" + L"\0" L"\x20ac" L"\0" L"\x2100" L"\0" L"\x2101" L"\0" L"\x2102" L"\0" + L"\x2105" L"\0" L"\x2106" L"\0" L"\x210a" L"\0" L"\x210b" L"\0" L"\x210c" + L"\0" L"\x210d" L"\0" L"\x210e" L"\0" L"\x2110" L"\0" L"\x2111" L"\0" + L"\x2112" L"\0" L"\x2113" L"\0" L"\x2115" L"\0" L"\x2116" L"\0" L"\x2119" + L"\0" L"\x211a" L"\0" L"\x211b" L"\0" L"\x211c" L"\0" L"\x211d" L"\0" + L"\x2121" L"\0" L"\x2122" L"\0" L"\x2124" L"\0" L"\x2126" L"\0" L"\x2128" + L"\0" L"\x212c" L"\0" L"\x212d" L"\0" L"\x212e" L"\0" L"\x212f" L"\0" + L"\x2130" L"\0" L"\x2131" L"\0" L"\x2133" L"\0" L"\x2134" L"\0" L"\x2139" + L"\0" L"\x2153" L"\0" L"\x2154" L"\0" L"\x2155" L"\0" L"\x2156" L"\0" + L"\x2157" L"\0" L"\x2158" L"\0" L"\x2159" L"\0" L"\x215a" L"\0" L"\x215b" + L"\0" L"\x215c" L"\0" L"\x215d" L"\0" L"\x215e" L"\0" L"\x215f" L"\0" + L"\x2160" L"\0" L"\x2161" L"\0" L"\x2162" L"\0" L"\x2163" L"\0" L"\x2164" + L"\0" L"\x2165" L"\0" L"\x2166" L"\0" L"\x2167" L"\0" L"\x2168" L"\0" + L"\x2169" L"\0" L"\x216a" L"\0" L"\x216b" L"\0" L"\x216c" L"\0" L"\x216d" + L"\0" L"\x216e" L"\0" L"\x216f" L"\0" L"\x2170" L"\0" L"\x2171" L"\0" + L"\x2172" L"\0" L"\x2173" L"\0" L"\x2174" L"\0" L"\x2175" L"\0" L"\x2176" + L"\0" L"\x2177" L"\0" L"\x2178" L"\0" L"\x2179" L"\0" L"\x217a" L"\0" + L"\x217b" L"\0" L"\x217c" L"\0" L"\x217d" L"\0" L"\x217e" L"\0" L"\x217f" + L"\0" L"\x2190" L"\0" L"\x2192" L"\0" L"\x2194" L"\0" L"\x21d0" L"\0" + L"\x21d2" L"\0" L"\x21d4" L"\0" L"\x2212" L"\0" L"\x2215" L"\0" L"\x2216" + L"\0" L"\x2217" L"\0" L"\x2223" L"\0" L"\x2236" L"\0" L"\x223c" L"\0" + L"\x2264" L"\0" L"\x2265" L"\0" L"\x226a" L"\0" L"\x226b" L"\0" L"\x22d8" + L"\0" L"\x22d9" L"\0" L"\x2400" L"\0" L"\x2401" L"\0" L"\x2402" L"\0" + L"\x2403" L"\0" L"\x2404" L"\0" L"\x2405" L"\0" L"\x2406" L"\0" L"\x2407" + L"\0" L"\x2408" L"\0" L"\x2409" L"\0" L"\x240a" L"\0" L"\x240b" L"\0" + L"\x240c" L"\0" L"\x240d" L"\0" L"\x240e" L"\0" L"\x240f" L"\0" L"\x2410" + L"\0" L"\x2411" L"\0" L"\x2412" L"\0" L"\x2413" L"\0" L"\x2414" L"\0" + L"\x2415" L"\0" L"\x2416" L"\0" L"\x2417" L"\0" L"\x2418" L"\0" L"\x2419" + L"\0" L"\x241a" L"\0" L"\x241b" L"\0" L"\x241c" L"\0" L"\x241d" L"\0" + L"\x241e" L"\0" L"\x241f" L"\0" L"\x2420" L"\0" L"\x2421" L"\0" L"\x2423" + L"\0" L"\x2424" L"\0" L"\x2460" L"\0" L"\x2461" L"\0" L"\x2462" L"\0" + L"\x2463" L"\0" L"\x2464" L"\0" L"\x2465" L"\0" L"\x2466" L"\0" L"\x2467" + L"\0" L"\x2468" L"\0" L"\x2469" L"\0" L"\x246a" L"\0" L"\x246b" L"\0" + L"\x246c" L"\0" L"\x246d" L"\0" L"\x246e" L"\0" L"\x246f" L"\0" L"\x2470" + L"\0" L"\x2471" L"\0" L"\x2472" L"\0" L"\x2473" L"\0" L"\x2474" L"\0" + L"\x2475" L"\0" L"\x2476" L"\0" L"\x2477" L"\0" L"\x2478" L"\0" L"\x2479" + L"\0" L"\x247a" L"\0" L"\x247b" L"\0" L"\x247c" L"\0" L"\x247d" L"\0" + L"\x247e" L"\0" L"\x247f" L"\0" L"\x2480" L"\0" L"\x2481" L"\0" L"\x2482" + L"\0" L"\x2483" L"\0" L"\x2484" L"\0" L"\x2485" L"\0" L"\x2486" L"\0" + L"\x2487" L"\0" L"\x2488" L"\0" L"\x2489" L"\0" L"\x248a" L"\0" L"\x248b" + L"\0" L"\x248c" L"\0" L"\x248d" L"\0" L"\x248e" L"\0" L"\x248f" L"\0" + L"\x2490" L"\0" L"\x2491" L"\0" L"\x2492" L"\0" L"\x2493" L"\0" L"\x2494" + L"\0" L"\x2495" L"\0" L"\x2496" L"\0" L"\x2497" L"\0" L"\x2498" L"\0" + L"\x2499" L"\0" L"\x249a" L"\0" L"\x249b" L"\0" L"\x249c" L"\0" L"\x249d" + L"\0" L"\x249e" L"\0" L"\x249f" L"\0" L"\x24a0" L"\0" L"\x24a1" L"\0" + L"\x24a2" L"\0" L"\x24a3" L"\0" L"\x24a4" L"\0" L"\x24a5" L"\0" L"\x24a6" + L"\0" L"\x24a7" L"\0" L"\x24a8" L"\0" L"\x24a9" L"\0" L"\x24aa" L"\0" + L"\x24ab" L"\0" L"\x24ac" L"\0" L"\x24ad" L"\0" L"\x24ae" L"\0" L"\x24af" + L"\0" L"\x24b0" L"\0" L"\x24b1" L"\0" L"\x24b2" L"\0" L"\x24b3" L"\0" + L"\x24b4" L"\0" L"\x24b5" L"\0" L"\x24b6" L"\0" L"\x24b7" L"\0" L"\x24b8" + L"\0" L"\x24b9" L"\0" L"\x24ba" L"\0" L"\x24bb" L"\0" L"\x24bc" L"\0" + L"\x24bd" L"\0" L"\x24be" L"\0" L"\x24bf" L"\0" L"\x24c0" L"\0" L"\x24c1" + L"\0" L"\x24c2" L"\0" L"\x24c3" L"\0" L"\x24c4" L"\0" L"\x24c5" L"\0" + L"\x24c6" L"\0" L"\x24c7" L"\0" L"\x24c8" L"\0" L"\x24c9" L"\0" L"\x24ca" + L"\0" L"\x24cb" L"\0" L"\x24cc" L"\0" L"\x24cd" L"\0" L"\x24ce" L"\0" + L"\x24cf" L"\0" L"\x24d0" L"\0" L"\x24d1" L"\0" L"\x24d2" L"\0" L"\x24d3" + L"\0" L"\x24d4" L"\0" L"\x24d5" L"\0" L"\x24d6" L"\0" L"\x24d7" L"\0" + L"\x24d8" L"\0" L"\x24d9" L"\0" L"\x24da" L"\0" L"\x24db" L"\0" L"\x24dc" + L"\0" L"\x24dd" L"\0" L"\x24de" L"\0" L"\x24df" L"\0" L"\x24e0" L"\0" + L"\x24e1" L"\0" L"\x24e2" L"\0" L"\x24e3" L"\0" L"\x24e4" L"\0" L"\x24e5" + L"\0" L"\x24e6" L"\0" L"\x24e7" L"\0" L"\x24e8" L"\0" L"\x24e9" L"\0" + L"\x24ea" L"\0" L"\x2500" L"\0" L"\x2502" L"\0" L"\x250c" L"\0" L"\x2510" + L"\0" L"\x2514" L"\0" L"\x2518" L"\0" L"\x251c" L"\0" L"\x2524" L"\0" + L"\x252c" L"\0" L"\x2534" L"\0" L"\x253c" L"\0" L"\x25e6" L"\0" L"\x3000" L"\0" L"\x3371" L"\0" L"\x3372" L"\0" L"\x3373" L"\0" L"\x3374" L"\0" L"\x3375" L"\0" L"\x3376" L"\0" L"\x3380" L"\0" L"\x3381" L"\0" L"\x3382" L"\0" L"\x3383" L"\0" L"\x3384" L"\0" L"\x3385" L"\0" L"\x3386" L"\0" @@ -230,237 +215,234 @@ static const wchar_t translit_from_tbl[] = L"\0" L"\x33d6" L"\0" L"\x33d7" L"\0" L"\x33d8" L"\0" L"\x33d9" L"\0" L"\x33da" L"\0" L"\x33db" L"\0" L"\x33dc" L"\0" L"\x33dd" L"\0" L"\xfb00" L"\0" L"\xfb01" L"\0" L"\xfb02" L"\0" L"\xfb03" L"\0" L"\xfb04" L"\0" - L"\xfb06" L"\0" L"\xfb29" L"\0" L"\xfe00" L"\0" L"\xfe01" L"\0" L"\xfe02" - L"\0" L"\xfe03" L"\0" L"\xfe04" L"\0" L"\xfe05" L"\0" L"\xfe06" L"\0" - L"\xfe07" L"\0" L"\xfe08" L"\0" L"\xfe09" L"\0" L"\xfe0a" L"\0" L"\xfe0b" - L"\0" L"\xfe0c" L"\0" L"\xfe0d" L"\0" L"\xfe0e" L"\0" L"\xfe0f" L"\0" - L"\xfe4d" L"\0" L"\xfe4e" L"\0" L"\xfe4f" L"\0" L"\xfe50" L"\0" L"\xfe52" - L"\0" L"\xfe54" L"\0" L"\xfe55" L"\0" L"\xfe56" L"\0" L"\xfe57" L"\0" - L"\xfe59" L"\0" L"\xfe5a" L"\0" L"\xfe5b" L"\0" L"\xfe5c" L"\0" L"\xfe5f" - L"\0" L"\xfe60" L"\0" L"\xfe61" L"\0" L"\xfe62" L"\0" L"\xfe63" L"\0" - L"\xfe64" L"\0" L"\xfe65" L"\0" L"\xfe66" L"\0" L"\xfe68" L"\0" L"\xfe69" - L"\0" L"\xfe6a" L"\0" L"\xfe6b" L"\0" L"\xfeff" L"\0" L"\xff01" L"\0" - L"\xff02" L"\0" L"\xff03" L"\0" L"\xff04" L"\0" L"\xff05" L"\0" L"\xff06" - L"\0" L"\xff07" L"\0" L"\xff08" L"\0" L"\xff09" L"\0" L"\xff0a" L"\0" - L"\xff0b" L"\0" L"\xff0c" L"\0" L"\xff0d" L"\0" L"\xff0e" L"\0" L"\xff0f" - L"\0" L"\xff10" L"\0" L"\xff11" L"\0" L"\xff12" L"\0" L"\xff13" L"\0" - L"\xff14" L"\0" L"\xff15" L"\0" L"\xff16" L"\0" L"\xff17" L"\0" L"\xff18" - L"\0" L"\xff19" L"\0" L"\xff1a" L"\0" L"\xff1b" L"\0" L"\xff1c" L"\0" - L"\xff1d" L"\0" L"\xff1e" L"\0" L"\xff1f" L"\0" L"\xff20" L"\0" L"\xff21" - L"\0" L"\xff22" L"\0" L"\xff23" L"\0" L"\xff24" L"\0" L"\xff25" L"\0" - L"\xff26" L"\0" L"\xff27" L"\0" L"\xff28" L"\0" L"\xff29" L"\0" L"\xff2a" - L"\0" L"\xff2b" L"\0" L"\xff2c" L"\0" L"\xff2d" L"\0" L"\xff2e" L"\0" - L"\xff2f" L"\0" L"\xff30" L"\0" L"\xff31" L"\0" L"\xff32" L"\0" L"\xff33" - L"\0" L"\xff34" L"\0" L"\xff35" L"\0" L"\xff36" L"\0" L"\xff37" L"\0" - L"\xff38" L"\0" L"\xff39" L"\0" L"\xff3a" L"\0" L"\xff3b" L"\0" L"\xff3c" - L"\0" L"\xff3d" L"\0" L"\xff3e" L"\0" L"\xff3f" L"\0" L"\xff40" L"\0" - L"\xff41" L"\0" L"\xff42" L"\0" L"\xff43" L"\0" L"\xff44" L"\0" L"\xff45" - L"\0" L"\xff46" L"\0" L"\xff47" L"\0" L"\xff48" L"\0" L"\xff49" L"\0" - L"\xff4a" L"\0" L"\xff4b" L"\0" L"\xff4c" L"\0" L"\xff4d" L"\0" L"\xff4e" - L"\0" L"\xff4f" L"\0" L"\xff50" L"\0" L"\xff51" L"\0" L"\xff52" L"\0" - L"\xff53" L"\0" L"\xff54" L"\0" L"\xff55" L"\0" L"\xff56" L"\0" L"\xff57" - L"\0" L"\xff58" L"\0" L"\xff59" L"\0" L"\xff5a" L"\0" L"\xff5b" L"\0" - L"\xff5c" L"\0" L"\xff5d" L"\0" L"\xff5e" L"\0" L"\x0001d400" L"\0" - L"\x0001d401" L"\0" L"\x0001d402" L"\0" L"\x0001d403" L"\0" L"\x0001d404" - L"\0" L"\x0001d405" L"\0" L"\x0001d406" L"\0" L"\x0001d407" L"\0" - L"\x0001d408" L"\0" L"\x0001d409" L"\0" L"\x0001d40a" L"\0" L"\x0001d40b" - L"\0" L"\x0001d40c" L"\0" L"\x0001d40d" L"\0" L"\x0001d40e" L"\0" - L"\x0001d40f" L"\0" L"\x0001d410" L"\0" L"\x0001d411" L"\0" L"\x0001d412" - L"\0" L"\x0001d413" L"\0" L"\x0001d414" L"\0" L"\x0001d415" L"\0" - L"\x0001d416" L"\0" L"\x0001d417" L"\0" L"\x0001d418" L"\0" L"\x0001d419" - L"\0" L"\x0001d41a" L"\0" L"\x0001d41b" L"\0" L"\x0001d41c" L"\0" - L"\x0001d41d" L"\0" L"\x0001d41e" L"\0" L"\x0001d41f" L"\0" L"\x0001d420" - L"\0" L"\x0001d421" L"\0" L"\x0001d422" L"\0" L"\x0001d423" L"\0" - L"\x0001d424" L"\0" L"\x0001d425" L"\0" L"\x0001d426" L"\0" L"\x0001d427" - L"\0" L"\x0001d428" L"\0" L"\x0001d429" L"\0" L"\x0001d42a" L"\0" - L"\x0001d42b" L"\0" L"\x0001d42c" L"\0" L"\x0001d42d" L"\0" L"\x0001d42e" - L"\0" L"\x0001d42f" L"\0" L"\x0001d430" L"\0" L"\x0001d431" L"\0" - L"\x0001d432" L"\0" L"\x0001d433" L"\0" L"\x0001d434" L"\0" L"\x0001d435" - L"\0" L"\x0001d436" L"\0" L"\x0001d437" L"\0" L"\x0001d438" L"\0" - L"\x0001d439" L"\0" L"\x0001d43a" L"\0" L"\x0001d43b" L"\0" L"\x0001d43c" - L"\0" L"\x0001d43d" L"\0" L"\x0001d43e" L"\0" L"\x0001d43f" L"\0" - L"\x0001d440" L"\0" L"\x0001d441" L"\0" L"\x0001d442" L"\0" L"\x0001d443" - L"\0" L"\x0001d444" L"\0" L"\x0001d445" L"\0" L"\x0001d446" L"\0" - L"\x0001d447" L"\0" L"\x0001d448" L"\0" L"\x0001d449" L"\0" L"\x0001d44a" - L"\0" L"\x0001d44b" L"\0" L"\x0001d44c" L"\0" L"\x0001d44d" L"\0" - L"\x0001d44e" L"\0" L"\x0001d44f" L"\0" L"\x0001d450" L"\0" L"\x0001d451" - L"\0" L"\x0001d452" L"\0" L"\x0001d453" L"\0" L"\x0001d454" L"\0" - L"\x0001d456" L"\0" L"\x0001d457" L"\0" L"\x0001d458" L"\0" L"\x0001d459" - L"\0" L"\x0001d45a" L"\0" L"\x0001d45b" L"\0" L"\x0001d45c" L"\0" - L"\x0001d45d" L"\0" L"\x0001d45e" L"\0" L"\x0001d45f" L"\0" L"\x0001d460" - L"\0" L"\x0001d461" L"\0" L"\x0001d462" L"\0" L"\x0001d463" L"\0" - L"\x0001d464" L"\0" L"\x0001d465" L"\0" L"\x0001d466" L"\0" L"\x0001d467" - L"\0" L"\x0001d468" L"\0" L"\x0001d469" L"\0" L"\x0001d46a" L"\0" - L"\x0001d46b" L"\0" L"\x0001d46c" L"\0" L"\x0001d46d" L"\0" L"\x0001d46e" - L"\0" L"\x0001d46f" L"\0" L"\x0001d470" L"\0" L"\x0001d471" L"\0" - L"\x0001d472" L"\0" L"\x0001d473" L"\0" L"\x0001d474" L"\0" L"\x0001d475" - L"\0" L"\x0001d476" L"\0" L"\x0001d477" L"\0" L"\x0001d478" L"\0" - L"\x0001d479" L"\0" L"\x0001d47a" L"\0" L"\x0001d47b" L"\0" L"\x0001d47c" - L"\0" L"\x0001d47d" L"\0" L"\x0001d47e" L"\0" L"\x0001d47f" L"\0" - L"\x0001d480" L"\0" L"\x0001d481" L"\0" L"\x0001d482" L"\0" L"\x0001d483" - L"\0" L"\x0001d484" L"\0" L"\x0001d485" L"\0" L"\x0001d486" L"\0" - L"\x0001d487" L"\0" L"\x0001d488" L"\0" L"\x0001d489" L"\0" L"\x0001d48a" - L"\0" L"\x0001d48b" L"\0" L"\x0001d48c" L"\0" L"\x0001d48d" L"\0" - L"\x0001d48e" L"\0" L"\x0001d48f" L"\0" L"\x0001d490" L"\0" L"\x0001d491" - L"\0" L"\x0001d492" L"\0" L"\x0001d493" L"\0" L"\x0001d494" L"\0" - L"\x0001d495" L"\0" L"\x0001d496" L"\0" L"\x0001d497" L"\0" L"\x0001d498" - L"\0" L"\x0001d499" L"\0" L"\x0001d49a" L"\0" L"\x0001d49b" L"\0" - L"\x0001d49c" L"\0" L"\x0001d49e" L"\0" L"\x0001d49f" L"\0" L"\x0001d4a2" - L"\0" L"\x0001d4a5" L"\0" L"\x0001d4a6" L"\0" L"\x0001d4a9" L"\0" - L"\x0001d4aa" L"\0" L"\x0001d4ab" L"\0" L"\x0001d4ac" L"\0" L"\x0001d4ae" - L"\0" L"\x0001d4af" L"\0" L"\x0001d4b0" L"\0" L"\x0001d4b1" L"\0" - L"\x0001d4b2" L"\0" L"\x0001d4b3" L"\0" L"\x0001d4b4" L"\0" L"\x0001d4b5" - L"\0" L"\x0001d4b6" L"\0" L"\x0001d4b7" L"\0" L"\x0001d4b8" L"\0" - L"\x0001d4b9" L"\0" L"\x0001d4bb" L"\0" L"\x0001d4bd" L"\0" L"\x0001d4be" - L"\0" L"\x0001d4bf" L"\0" L"\x0001d4c0" L"\0" L"\x0001d4c2" L"\0" - L"\x0001d4c3" L"\0" L"\x0001d4c5" L"\0" L"\x0001d4c6" L"\0" L"\x0001d4c7" - L"\0" L"\x0001d4c8" L"\0" L"\x0001d4c9" L"\0" L"\x0001d4ca" L"\0" - L"\x0001d4cb" L"\0" L"\x0001d4cc" L"\0" L"\x0001d4cd" L"\0" L"\x0001d4ce" - L"\0" L"\x0001d4cf" L"\0" L"\x0001d4d0" L"\0" L"\x0001d4d1" L"\0" - L"\x0001d4d2" L"\0" L"\x0001d4d3" L"\0" L"\x0001d4d4" L"\0" L"\x0001d4d5" - L"\0" L"\x0001d4d6" L"\0" L"\x0001d4d7" L"\0" L"\x0001d4d8" L"\0" - L"\x0001d4d9" L"\0" L"\x0001d4da" L"\0" L"\x0001d4db" L"\0" L"\x0001d4dc" - L"\0" L"\x0001d4dd" L"\0" L"\x0001d4de" L"\0" L"\x0001d4df" L"\0" - L"\x0001d4e0" L"\0" L"\x0001d4e1" L"\0" L"\x0001d4e2" L"\0" L"\x0001d4e3" - L"\0" L"\x0001d4e4" L"\0" L"\x0001d4e5" L"\0" L"\x0001d4e6" L"\0" - L"\x0001d4e7" L"\0" L"\x0001d4e8" L"\0" L"\x0001d4e9" L"\0" L"\x0001d4ea" - L"\0" L"\x0001d4eb" L"\0" L"\x0001d4ec" L"\0" L"\x0001d4ed" L"\0" - L"\x0001d4ee" L"\0" L"\x0001d4ef" L"\0" L"\x0001d4f0" L"\0" L"\x0001d4f1" - L"\0" L"\x0001d4f2" L"\0" L"\x0001d4f3" L"\0" L"\x0001d4f4" L"\0" - L"\x0001d4f5" L"\0" L"\x0001d4f6" L"\0" L"\x0001d4f7" L"\0" L"\x0001d4f8" - L"\0" L"\x0001d4f9" L"\0" L"\x0001d4fa" L"\0" L"\x0001d4fb" L"\0" - L"\x0001d4fc" L"\0" L"\x0001d4fd" L"\0" L"\x0001d4fe" L"\0" L"\x0001d4ff" - L"\0" L"\x0001d500" L"\0" L"\x0001d501" L"\0" L"\x0001d502" L"\0" - L"\x0001d503" L"\0" L"\x0001d504" L"\0" L"\x0001d505" L"\0" L"\x0001d507" - L"\0" L"\x0001d508" L"\0" L"\x0001d509" L"\0" L"\x0001d50a" L"\0" - L"\x0001d50d" L"\0" L"\x0001d50e" L"\0" L"\x0001d50f" L"\0" L"\x0001d510" - L"\0" L"\x0001d511" L"\0" L"\x0001d512" L"\0" L"\x0001d513" L"\0" - L"\x0001d514" L"\0" L"\x0001d516" L"\0" L"\x0001d517" L"\0" L"\x0001d518" - L"\0" L"\x0001d519" L"\0" L"\x0001d51a" L"\0" L"\x0001d51b" L"\0" - L"\x0001d51c" L"\0" L"\x0001d51e" L"\0" L"\x0001d51f" L"\0" L"\x0001d520" - L"\0" L"\x0001d521" L"\0" L"\x0001d522" L"\0" L"\x0001d523" L"\0" - L"\x0001d524" L"\0" L"\x0001d525" L"\0" L"\x0001d526" L"\0" L"\x0001d527" - L"\0" L"\x0001d528" L"\0" L"\x0001d529" L"\0" L"\x0001d52a" L"\0" - L"\x0001d52b" L"\0" L"\x0001d52c" L"\0" L"\x0001d52d" L"\0" L"\x0001d52e" - L"\0" L"\x0001d52f" L"\0" L"\x0001d530" L"\0" L"\x0001d531" L"\0" - L"\x0001d532" L"\0" L"\x0001d533" L"\0" L"\x0001d534" L"\0" L"\x0001d535" - L"\0" L"\x0001d536" L"\0" L"\x0001d537" L"\0" L"\x0001d538" L"\0" - L"\x0001d539" L"\0" L"\x0001d53b" L"\0" L"\x0001d53c" L"\0" L"\x0001d53d" - L"\0" L"\x0001d53e" L"\0" L"\x0001d540" L"\0" L"\x0001d541" L"\0" - L"\x0001d542" L"\0" L"\x0001d543" L"\0" L"\x0001d544" L"\0" L"\x0001d546" - L"\0" L"\x0001d54a" L"\0" L"\x0001d54b" L"\0" L"\x0001d54c" L"\0" - L"\x0001d54d" L"\0" L"\x0001d54e" L"\0" L"\x0001d54f" L"\0" L"\x0001d550" - L"\0" L"\x0001d552" L"\0" L"\x0001d553" L"\0" L"\x0001d554" L"\0" - L"\x0001d555" L"\0" L"\x0001d556" L"\0" L"\x0001d557" L"\0" L"\x0001d558" - L"\0" L"\x0001d559" L"\0" L"\x0001d55a" L"\0" L"\x0001d55b" L"\0" - L"\x0001d55c" L"\0" L"\x0001d55d" L"\0" L"\x0001d55e" L"\0" L"\x0001d55f" - L"\0" L"\x0001d560" L"\0" L"\x0001d561" L"\0" L"\x0001d562" L"\0" - L"\x0001d563" L"\0" L"\x0001d564" L"\0" L"\x0001d565" L"\0" L"\x0001d566" - L"\0" L"\x0001d567" L"\0" L"\x0001d568" L"\0" L"\x0001d569" L"\0" - L"\x0001d56a" L"\0" L"\x0001d56b" L"\0" L"\x0001d56c" L"\0" L"\x0001d56d" - L"\0" L"\x0001d56e" L"\0" L"\x0001d56f" L"\0" L"\x0001d570" L"\0" - L"\x0001d571" L"\0" L"\x0001d572" L"\0" L"\x0001d573" L"\0" L"\x0001d574" - L"\0" L"\x0001d575" L"\0" L"\x0001d576" L"\0" L"\x0001d577" L"\0" - L"\x0001d578" L"\0" L"\x0001d579" L"\0" L"\x0001d57a" L"\0" L"\x0001d57b" - L"\0" L"\x0001d57c" L"\0" L"\x0001d57d" L"\0" L"\x0001d57e" L"\0" - L"\x0001d57f" L"\0" L"\x0001d580" L"\0" L"\x0001d581" L"\0" L"\x0001d582" - L"\0" L"\x0001d583" L"\0" L"\x0001d584" L"\0" L"\x0001d585" L"\0" - L"\x0001d586" L"\0" L"\x0001d587" L"\0" L"\x0001d588" L"\0" L"\x0001d589" - L"\0" L"\x0001d58a" L"\0" L"\x0001d58b" L"\0" L"\x0001d58c" L"\0" - L"\x0001d58d" L"\0" L"\x0001d58e" L"\0" L"\x0001d58f" L"\0" L"\x0001d590" - L"\0" L"\x0001d591" L"\0" L"\x0001d592" L"\0" L"\x0001d593" L"\0" - L"\x0001d594" L"\0" L"\x0001d595" L"\0" L"\x0001d596" L"\0" L"\x0001d597" - L"\0" L"\x0001d598" L"\0" L"\x0001d599" L"\0" L"\x0001d59a" L"\0" - L"\x0001d59b" L"\0" L"\x0001d59c" L"\0" L"\x0001d59d" L"\0" L"\x0001d59e" - L"\0" L"\x0001d59f" L"\0" L"\x0001d5a0" L"\0" L"\x0001d5a1" L"\0" - L"\x0001d5a2" L"\0" L"\x0001d5a3" L"\0" L"\x0001d5a4" L"\0" L"\x0001d5a5" - L"\0" L"\x0001d5a6" L"\0" L"\x0001d5a7" L"\0" L"\x0001d5a8" L"\0" - L"\x0001d5a9" L"\0" L"\x0001d5aa" L"\0" L"\x0001d5ab" L"\0" L"\x0001d5ac" - L"\0" L"\x0001d5ad" L"\0" L"\x0001d5ae" L"\0" L"\x0001d5af" L"\0" - L"\x0001d5b0" L"\0" L"\x0001d5b1" L"\0" L"\x0001d5b2" L"\0" L"\x0001d5b3" - L"\0" L"\x0001d5b4" L"\0" L"\x0001d5b5" L"\0" L"\x0001d5b6" L"\0" - L"\x0001d5b7" L"\0" L"\x0001d5b8" L"\0" L"\x0001d5b9" L"\0" L"\x0001d5ba" - L"\0" L"\x0001d5bb" L"\0" L"\x0001d5bc" L"\0" L"\x0001d5bd" L"\0" - L"\x0001d5be" L"\0" L"\x0001d5bf" L"\0" L"\x0001d5c0" L"\0" L"\x0001d5c1" - L"\0" L"\x0001d5c2" L"\0" L"\x0001d5c3" L"\0" L"\x0001d5c4" L"\0" - L"\x0001d5c5" L"\0" L"\x0001d5c6" L"\0" L"\x0001d5c7" L"\0" L"\x0001d5c8" - L"\0" L"\x0001d5c9" L"\0" L"\x0001d5ca" L"\0" L"\x0001d5cb" L"\0" - L"\x0001d5cc" L"\0" L"\x0001d5cd" L"\0" L"\x0001d5ce" L"\0" L"\x0001d5cf" - L"\0" L"\x0001d5d0" L"\0" L"\x0001d5d1" L"\0" L"\x0001d5d2" L"\0" - L"\x0001d5d3" L"\0" L"\x0001d5d4" L"\0" L"\x0001d5d5" L"\0" L"\x0001d5d6" - L"\0" L"\x0001d5d7" L"\0" L"\x0001d5d8" L"\0" L"\x0001d5d9" L"\0" - L"\x0001d5da" L"\0" L"\x0001d5db" L"\0" L"\x0001d5dc" L"\0" L"\x0001d5dd" - L"\0" L"\x0001d5de" L"\0" L"\x0001d5df" L"\0" L"\x0001d5e0" L"\0" - L"\x0001d5e1" L"\0" L"\x0001d5e2" L"\0" L"\x0001d5e3" L"\0" L"\x0001d5e4" - L"\0" L"\x0001d5e5" L"\0" L"\x0001d5e6" L"\0" L"\x0001d5e7" L"\0" - L"\x0001d5e8" L"\0" L"\x0001d5e9" L"\0" L"\x0001d5ea" L"\0" L"\x0001d5eb" - L"\0" L"\x0001d5ec" L"\0" L"\x0001d5ed" L"\0" L"\x0001d5ee" L"\0" - L"\x0001d5ef" L"\0" L"\x0001d5f0" L"\0" L"\x0001d5f1" L"\0" L"\x0001d5f2" - L"\0" L"\x0001d5f3" L"\0" L"\x0001d5f4" L"\0" L"\x0001d5f5" L"\0" - L"\x0001d5f6" L"\0" L"\x0001d5f7" L"\0" L"\x0001d5f8" L"\0" L"\x0001d5f9" - L"\0" L"\x0001d5fa" L"\0" L"\x0001d5fb" L"\0" L"\x0001d5fc" L"\0" - L"\x0001d5fd" L"\0" L"\x0001d5fe" L"\0" L"\x0001d5ff" L"\0" L"\x0001d600" - L"\0" L"\x0001d601" L"\0" L"\x0001d602" L"\0" L"\x0001d603" L"\0" - L"\x0001d604" L"\0" L"\x0001d605" L"\0" L"\x0001d606" L"\0" L"\x0001d607" - L"\0" L"\x0001d608" L"\0" L"\x0001d609" L"\0" L"\x0001d60a" L"\0" - L"\x0001d60b" L"\0" L"\x0001d60c" L"\0" L"\x0001d60d" L"\0" L"\x0001d60e" - L"\0" L"\x0001d60f" L"\0" L"\x0001d610" L"\0" L"\x0001d611" L"\0" - L"\x0001d612" L"\0" L"\x0001d613" L"\0" L"\x0001d614" L"\0" L"\x0001d615" - L"\0" L"\x0001d616" L"\0" L"\x0001d617" L"\0" L"\x0001d618" L"\0" - L"\x0001d619" L"\0" L"\x0001d61a" L"\0" L"\x0001d61b" L"\0" L"\x0001d61c" - L"\0" L"\x0001d61d" L"\0" L"\x0001d61e" L"\0" L"\x0001d61f" L"\0" - L"\x0001d620" L"\0" L"\x0001d621" L"\0" L"\x0001d622" L"\0" L"\x0001d623" - L"\0" L"\x0001d624" L"\0" L"\x0001d625" L"\0" L"\x0001d626" L"\0" - L"\x0001d627" L"\0" L"\x0001d628" L"\0" L"\x0001d629" L"\0" L"\x0001d62a" - L"\0" L"\x0001d62b" L"\0" L"\x0001d62c" L"\0" L"\x0001d62d" L"\0" - L"\x0001d62e" L"\0" L"\x0001d62f" L"\0" L"\x0001d630" L"\0" L"\x0001d631" - L"\0" L"\x0001d632" L"\0" L"\x0001d633" L"\0" L"\x0001d634" L"\0" - L"\x0001d635" L"\0" L"\x0001d636" L"\0" L"\x0001d637" L"\0" L"\x0001d638" - L"\0" L"\x0001d639" L"\0" L"\x0001d63a" L"\0" L"\x0001d63b" L"\0" - L"\x0001d63c" L"\0" L"\x0001d63d" L"\0" L"\x0001d63e" L"\0" L"\x0001d63f" - L"\0" L"\x0001d640" L"\0" L"\x0001d641" L"\0" L"\x0001d642" L"\0" - L"\x0001d643" L"\0" L"\x0001d644" L"\0" L"\x0001d645" L"\0" L"\x0001d646" - L"\0" L"\x0001d647" L"\0" L"\x0001d648" L"\0" L"\x0001d649" L"\0" - L"\x0001d64a" L"\0" L"\x0001d64b" L"\0" L"\x0001d64c" L"\0" L"\x0001d64d" - L"\0" L"\x0001d64e" L"\0" L"\x0001d64f" L"\0" L"\x0001d650" L"\0" - L"\x0001d651" L"\0" L"\x0001d652" L"\0" L"\x0001d653" L"\0" L"\x0001d654" - L"\0" L"\x0001d655" L"\0" L"\x0001d656" L"\0" L"\x0001d657" L"\0" - L"\x0001d658" L"\0" L"\x0001d659" L"\0" L"\x0001d65a" L"\0" L"\x0001d65b" - L"\0" L"\x0001d65c" L"\0" L"\x0001d65d" L"\0" L"\x0001d65e" L"\0" - L"\x0001d65f" L"\0" L"\x0001d660" L"\0" L"\x0001d661" L"\0" L"\x0001d662" - L"\0" L"\x0001d663" L"\0" L"\x0001d664" L"\0" L"\x0001d665" L"\0" - L"\x0001d666" L"\0" L"\x0001d667" L"\0" L"\x0001d668" L"\0" L"\x0001d669" - L"\0" L"\x0001d66a" L"\0" L"\x0001d66b" L"\0" L"\x0001d66c" L"\0" - L"\x0001d66d" L"\0" L"\x0001d66e" L"\0" L"\x0001d66f" L"\0" L"\x0001d670" - L"\0" L"\x0001d671" L"\0" L"\x0001d672" L"\0" L"\x0001d673" L"\0" - L"\x0001d674" L"\0" L"\x0001d675" L"\0" L"\x0001d676" L"\0" L"\x0001d677" - L"\0" L"\x0001d678" L"\0" L"\x0001d679" L"\0" L"\x0001d67a" L"\0" - L"\x0001d67b" L"\0" L"\x0001d67c" L"\0" L"\x0001d67d" L"\0" L"\x0001d67e" - L"\0" L"\x0001d67f" L"\0" L"\x0001d680" L"\0" L"\x0001d681" L"\0" - L"\x0001d682" L"\0" L"\x0001d683" L"\0" L"\x0001d684" L"\0" L"\x0001d685" - L"\0" L"\x0001d686" L"\0" L"\x0001d687" L"\0" L"\x0001d688" L"\0" - L"\x0001d689" L"\0" L"\x0001d68a" L"\0" L"\x0001d68b" L"\0" L"\x0001d68c" - L"\0" L"\x0001d68d" L"\0" L"\x0001d68e" L"\0" L"\x0001d68f" L"\0" - L"\x0001d690" L"\0" L"\x0001d691" L"\0" L"\x0001d692" L"\0" L"\x0001d693" - L"\0" L"\x0001d694" L"\0" L"\x0001d695" L"\0" L"\x0001d696" L"\0" - L"\x0001d697" L"\0" L"\x0001d698" L"\0" L"\x0001d699" L"\0" L"\x0001d69a" - L"\0" L"\x0001d69b" L"\0" L"\x0001d69c" L"\0" L"\x0001d69d" L"\0" - L"\x0001d69e" L"\0" L"\x0001d69f" L"\0" L"\x0001d6a0" L"\0" L"\x0001d6a1" - L"\0" L"\x0001d6a2" L"\0" L"\x0001d6a3" L"\0" L"\x0001d7ce" L"\0" - L"\x0001d7cf" L"\0" L"\x0001d7d0" L"\0" L"\x0001d7d1" L"\0" L"\x0001d7d2" - L"\0" L"\x0001d7d3" L"\0" L"\x0001d7d4" L"\0" L"\x0001d7d5" L"\0" - L"\x0001d7d6" L"\0" L"\x0001d7d7" L"\0" L"\x0001d7d8" L"\0" L"\x0001d7d9" - L"\0" L"\x0001d7da" L"\0" L"\x0001d7db" L"\0" L"\x0001d7dc" L"\0" - L"\x0001d7dd" L"\0" L"\x0001d7de" L"\0" L"\x0001d7df" L"\0" L"\x0001d7e0" - L"\0" L"\x0001d7e1" L"\0" L"\x0001d7e2" L"\0" L"\x0001d7e3" L"\0" - L"\x0001d7e4" L"\0" L"\x0001d7e5" L"\0" L"\x0001d7e6" L"\0" L"\x0001d7e7" - L"\0" L"\x0001d7e8" L"\0" L"\x0001d7e9" L"\0" L"\x0001d7ea" L"\0" - L"\x0001d7eb" L"\0" L"\x0001d7ec" L"\0" L"\x0001d7ed" L"\0" L"\x0001d7ee" - L"\0" L"\x0001d7ef" L"\0" L"\x0001d7f0" L"\0" L"\x0001d7f1" L"\0" - L"\x0001d7f2" L"\0" L"\x0001d7f3" L"\0" L"\x0001d7f4" L"\0" L"\x0001d7f5" - L"\0" L"\x0001d7f6" L"\0" L"\x0001d7f7" L"\0" L"\x0001d7f8" L"\0" - L"\x0001d7f9" L"\0" L"\x0001d7fa" L"\0" L"\x0001d7fb" L"\0" L"\x0001d7fc" - L"\0" L"\x0001d7fd" L"\0" L"\x0001d7fe" L"\0" L"\x0001d7ff"; + L"\xfb06" L"\0" L"\xfb29" L"\0" L"\xfe4d" L"\0" L"\xfe4e" L"\0" L"\xfe4f" + L"\0" L"\xfe50" L"\0" L"\xfe52" L"\0" L"\xfe54" L"\0" L"\xfe55" L"\0" + L"\xfe56" L"\0" L"\xfe57" L"\0" L"\xfe59" L"\0" L"\xfe5a" L"\0" L"\xfe5b" + L"\0" L"\xfe5c" L"\0" L"\xfe5f" L"\0" L"\xfe60" L"\0" L"\xfe61" L"\0" + L"\xfe62" L"\0" L"\xfe63" L"\0" L"\xfe64" L"\0" L"\xfe65" L"\0" L"\xfe66" + L"\0" L"\xfe68" L"\0" L"\xfe69" L"\0" L"\xfe6a" L"\0" L"\xfe6b" L"\0" + L"\xfeff" L"\0" L"\xff01" L"\0" L"\xff02" L"\0" L"\xff03" L"\0" L"\xff04" + L"\0" L"\xff05" L"\0" L"\xff06" L"\0" L"\xff07" L"\0" L"\xff08" L"\0" + L"\xff09" L"\0" L"\xff0a" L"\0" L"\xff0b" L"\0" L"\xff0c" L"\0" L"\xff0d" + L"\0" L"\xff0e" L"\0" L"\xff0f" L"\0" L"\xff10" L"\0" L"\xff11" L"\0" + L"\xff12" L"\0" L"\xff13" L"\0" L"\xff14" L"\0" L"\xff15" L"\0" L"\xff16" + L"\0" L"\xff17" L"\0" L"\xff18" L"\0" L"\xff19" L"\0" L"\xff1a" L"\0" + L"\xff1b" L"\0" L"\xff1c" L"\0" L"\xff1d" L"\0" L"\xff1e" L"\0" L"\xff1f" + L"\0" L"\xff20" L"\0" L"\xff21" L"\0" L"\xff22" L"\0" L"\xff23" L"\0" + L"\xff24" L"\0" L"\xff25" L"\0" L"\xff26" L"\0" L"\xff27" L"\0" L"\xff28" + L"\0" L"\xff29" L"\0" L"\xff2a" L"\0" L"\xff2b" L"\0" L"\xff2c" L"\0" + L"\xff2d" L"\0" L"\xff2e" L"\0" L"\xff2f" L"\0" L"\xff30" L"\0" L"\xff31" + L"\0" L"\xff32" L"\0" L"\xff33" L"\0" L"\xff34" L"\0" L"\xff35" L"\0" + L"\xff36" L"\0" L"\xff37" L"\0" L"\xff38" L"\0" L"\xff39" L"\0" L"\xff3a" + L"\0" L"\xff3b" L"\0" L"\xff3c" L"\0" L"\xff3d" L"\0" L"\xff3e" L"\0" + L"\xff3f" L"\0" L"\xff40" L"\0" L"\xff41" L"\0" L"\xff42" L"\0" L"\xff43" + L"\0" L"\xff44" L"\0" L"\xff45" L"\0" L"\xff46" L"\0" L"\xff47" L"\0" + L"\xff48" L"\0" L"\xff49" L"\0" L"\xff4a" L"\0" L"\xff4b" L"\0" L"\xff4c" + L"\0" L"\xff4d" L"\0" L"\xff4e" L"\0" L"\xff4f" L"\0" L"\xff50" L"\0" + L"\xff51" L"\0" L"\xff52" L"\0" L"\xff53" L"\0" L"\xff54" L"\0" L"\xff55" + L"\0" L"\xff56" L"\0" L"\xff57" L"\0" L"\xff58" L"\0" L"\xff59" L"\0" + L"\xff5a" L"\0" L"\xff5b" L"\0" L"\xff5c" L"\0" L"\xff5d" L"\0" L"\xff5e" + L"\0" L"\x0001d400" L"\0" L"\x0001d401" L"\0" L"\x0001d402" L"\0" + L"\x0001d403" L"\0" L"\x0001d404" L"\0" L"\x0001d405" L"\0" L"\x0001d406" + L"\0" L"\x0001d407" L"\0" L"\x0001d408" L"\0" L"\x0001d409" L"\0" + L"\x0001d40a" L"\0" L"\x0001d40b" L"\0" L"\x0001d40c" L"\0" L"\x0001d40d" + L"\0" L"\x0001d40e" L"\0" L"\x0001d40f" L"\0" L"\x0001d410" L"\0" + L"\x0001d411" L"\0" L"\x0001d412" L"\0" L"\x0001d413" L"\0" L"\x0001d414" + L"\0" L"\x0001d415" L"\0" L"\x0001d416" L"\0" L"\x0001d417" L"\0" + L"\x0001d418" L"\0" L"\x0001d419" L"\0" L"\x0001d41a" L"\0" L"\x0001d41b" + L"\0" L"\x0001d41c" L"\0" L"\x0001d41d" L"\0" L"\x0001d41e" L"\0" + L"\x0001d41f" L"\0" L"\x0001d420" L"\0" L"\x0001d421" L"\0" L"\x0001d422" + L"\0" L"\x0001d423" L"\0" L"\x0001d424" L"\0" L"\x0001d425" L"\0" + L"\x0001d426" L"\0" L"\x0001d427" L"\0" L"\x0001d428" L"\0" L"\x0001d429" + L"\0" L"\x0001d42a" L"\0" L"\x0001d42b" L"\0" L"\x0001d42c" L"\0" + L"\x0001d42d" L"\0" L"\x0001d42e" L"\0" L"\x0001d42f" L"\0" L"\x0001d430" + L"\0" L"\x0001d431" L"\0" L"\x0001d432" L"\0" L"\x0001d433" L"\0" + L"\x0001d434" L"\0" L"\x0001d435" L"\0" L"\x0001d436" L"\0" L"\x0001d437" + L"\0" L"\x0001d438" L"\0" L"\x0001d439" L"\0" L"\x0001d43a" L"\0" + L"\x0001d43b" L"\0" L"\x0001d43c" L"\0" L"\x0001d43d" L"\0" L"\x0001d43e" + L"\0" L"\x0001d43f" L"\0" L"\x0001d440" L"\0" L"\x0001d441" L"\0" + L"\x0001d442" L"\0" L"\x0001d443" L"\0" L"\x0001d444" L"\0" L"\x0001d445" + L"\0" L"\x0001d446" L"\0" L"\x0001d447" L"\0" L"\x0001d448" L"\0" + L"\x0001d449" L"\0" L"\x0001d44a" L"\0" L"\x0001d44b" L"\0" L"\x0001d44c" + L"\0" L"\x0001d44d" L"\0" L"\x0001d44e" L"\0" L"\x0001d44f" L"\0" + L"\x0001d450" L"\0" L"\x0001d451" L"\0" L"\x0001d452" L"\0" L"\x0001d453" + L"\0" L"\x0001d454" L"\0" L"\x0001d456" L"\0" L"\x0001d457" L"\0" + L"\x0001d458" L"\0" L"\x0001d459" L"\0" L"\x0001d45a" L"\0" L"\x0001d45b" + L"\0" L"\x0001d45c" L"\0" L"\x0001d45d" L"\0" L"\x0001d45e" L"\0" + L"\x0001d45f" L"\0" L"\x0001d460" L"\0" L"\x0001d461" L"\0" L"\x0001d462" + L"\0" L"\x0001d463" L"\0" L"\x0001d464" L"\0" L"\x0001d465" L"\0" + L"\x0001d466" L"\0" L"\x0001d467" L"\0" L"\x0001d468" L"\0" L"\x0001d469" + L"\0" L"\x0001d46a" L"\0" L"\x0001d46b" L"\0" L"\x0001d46c" L"\0" + L"\x0001d46d" L"\0" L"\x0001d46e" L"\0" L"\x0001d46f" L"\0" L"\x0001d470" + L"\0" L"\x0001d471" L"\0" L"\x0001d472" L"\0" L"\x0001d473" L"\0" + L"\x0001d474" L"\0" L"\x0001d475" L"\0" L"\x0001d476" L"\0" L"\x0001d477" + L"\0" L"\x0001d478" L"\0" L"\x0001d479" L"\0" L"\x0001d47a" L"\0" + L"\x0001d47b" L"\0" L"\x0001d47c" L"\0" L"\x0001d47d" L"\0" L"\x0001d47e" + L"\0" L"\x0001d47f" L"\0" L"\x0001d480" L"\0" L"\x0001d481" L"\0" + L"\x0001d482" L"\0" L"\x0001d483" L"\0" L"\x0001d484" L"\0" L"\x0001d485" + L"\0" L"\x0001d486" L"\0" L"\x0001d487" L"\0" L"\x0001d488" L"\0" + L"\x0001d489" L"\0" L"\x0001d48a" L"\0" L"\x0001d48b" L"\0" L"\x0001d48c" + L"\0" L"\x0001d48d" L"\0" L"\x0001d48e" L"\0" L"\x0001d48f" L"\0" + L"\x0001d490" L"\0" L"\x0001d491" L"\0" L"\x0001d492" L"\0" L"\x0001d493" + L"\0" L"\x0001d494" L"\0" L"\x0001d495" L"\0" L"\x0001d496" L"\0" + L"\x0001d497" L"\0" L"\x0001d498" L"\0" L"\x0001d499" L"\0" L"\x0001d49a" + L"\0" L"\x0001d49b" L"\0" L"\x0001d49c" L"\0" L"\x0001d49e" L"\0" + L"\x0001d49f" L"\0" L"\x0001d4a2" L"\0" L"\x0001d4a5" L"\0" L"\x0001d4a6" + L"\0" L"\x0001d4a9" L"\0" L"\x0001d4aa" L"\0" L"\x0001d4ab" L"\0" + L"\x0001d4ac" L"\0" L"\x0001d4ae" L"\0" L"\x0001d4af" L"\0" L"\x0001d4b0" + L"\0" L"\x0001d4b1" L"\0" L"\x0001d4b2" L"\0" L"\x0001d4b3" L"\0" + L"\x0001d4b4" L"\0" L"\x0001d4b5" L"\0" L"\x0001d4b6" L"\0" L"\x0001d4b7" + L"\0" L"\x0001d4b8" L"\0" L"\x0001d4b9" L"\0" L"\x0001d4bb" L"\0" + L"\x0001d4bd" L"\0" L"\x0001d4be" L"\0" L"\x0001d4bf" L"\0" L"\x0001d4c0" + L"\0" L"\x0001d4c2" L"\0" L"\x0001d4c3" L"\0" L"\x0001d4c5" L"\0" + L"\x0001d4c6" L"\0" L"\x0001d4c7" L"\0" L"\x0001d4c8" L"\0" L"\x0001d4c9" + L"\0" L"\x0001d4ca" L"\0" L"\x0001d4cb" L"\0" L"\x0001d4cc" L"\0" + L"\x0001d4cd" L"\0" L"\x0001d4ce" L"\0" L"\x0001d4cf" L"\0" L"\x0001d4d0" + L"\0" L"\x0001d4d1" L"\0" L"\x0001d4d2" L"\0" L"\x0001d4d3" L"\0" + L"\x0001d4d4" L"\0" L"\x0001d4d5" L"\0" L"\x0001d4d6" L"\0" L"\x0001d4d7" + L"\0" L"\x0001d4d8" L"\0" L"\x0001d4d9" L"\0" L"\x0001d4da" L"\0" + L"\x0001d4db" L"\0" L"\x0001d4dc" L"\0" L"\x0001d4dd" L"\0" L"\x0001d4de" + L"\0" L"\x0001d4df" L"\0" L"\x0001d4e0" L"\0" L"\x0001d4e1" L"\0" + L"\x0001d4e2" L"\0" L"\x0001d4e3" L"\0" L"\x0001d4e4" L"\0" L"\x0001d4e5" + L"\0" L"\x0001d4e6" L"\0" L"\x0001d4e7" L"\0" L"\x0001d4e8" L"\0" + L"\x0001d4e9" L"\0" L"\x0001d4ea" L"\0" L"\x0001d4eb" L"\0" L"\x0001d4ec" + L"\0" L"\x0001d4ed" L"\0" L"\x0001d4ee" L"\0" L"\x0001d4ef" L"\0" + L"\x0001d4f0" L"\0" L"\x0001d4f1" L"\0" L"\x0001d4f2" L"\0" L"\x0001d4f3" + L"\0" L"\x0001d4f4" L"\0" L"\x0001d4f5" L"\0" L"\x0001d4f6" L"\0" + L"\x0001d4f7" L"\0" L"\x0001d4f8" L"\0" L"\x0001d4f9" L"\0" L"\x0001d4fa" + L"\0" L"\x0001d4fb" L"\0" L"\x0001d4fc" L"\0" L"\x0001d4fd" L"\0" + L"\x0001d4fe" L"\0" L"\x0001d4ff" L"\0" L"\x0001d500" L"\0" L"\x0001d501" + L"\0" L"\x0001d502" L"\0" L"\x0001d503" L"\0" L"\x0001d504" L"\0" + L"\x0001d505" L"\0" L"\x0001d507" L"\0" L"\x0001d508" L"\0" L"\x0001d509" + L"\0" L"\x0001d50a" L"\0" L"\x0001d50d" L"\0" L"\x0001d50e" L"\0" + L"\x0001d50f" L"\0" L"\x0001d510" L"\0" L"\x0001d511" L"\0" L"\x0001d512" + L"\0" L"\x0001d513" L"\0" L"\x0001d514" L"\0" L"\x0001d516" L"\0" + L"\x0001d517" L"\0" L"\x0001d518" L"\0" L"\x0001d519" L"\0" L"\x0001d51a" + L"\0" L"\x0001d51b" L"\0" L"\x0001d51c" L"\0" L"\x0001d51e" L"\0" + L"\x0001d51f" L"\0" L"\x0001d520" L"\0" L"\x0001d521" L"\0" L"\x0001d522" + L"\0" L"\x0001d523" L"\0" L"\x0001d524" L"\0" L"\x0001d525" L"\0" + L"\x0001d526" L"\0" L"\x0001d527" L"\0" L"\x0001d528" L"\0" L"\x0001d529" + L"\0" L"\x0001d52a" L"\0" L"\x0001d52b" L"\0" L"\x0001d52c" L"\0" + L"\x0001d52d" L"\0" L"\x0001d52e" L"\0" L"\x0001d52f" L"\0" L"\x0001d530" + L"\0" L"\x0001d531" L"\0" L"\x0001d532" L"\0" L"\x0001d533" L"\0" + L"\x0001d534" L"\0" L"\x0001d535" L"\0" L"\x0001d536" L"\0" L"\x0001d537" + L"\0" L"\x0001d538" L"\0" L"\x0001d539" L"\0" L"\x0001d53b" L"\0" + L"\x0001d53c" L"\0" L"\x0001d53d" L"\0" L"\x0001d53e" L"\0" L"\x0001d540" + L"\0" L"\x0001d541" L"\0" L"\x0001d542" L"\0" L"\x0001d543" L"\0" + L"\x0001d544" L"\0" L"\x0001d546" L"\0" L"\x0001d54a" L"\0" L"\x0001d54b" + L"\0" L"\x0001d54c" L"\0" L"\x0001d54d" L"\0" L"\x0001d54e" L"\0" + L"\x0001d54f" L"\0" L"\x0001d550" L"\0" L"\x0001d552" L"\0" L"\x0001d553" + L"\0" L"\x0001d554" L"\0" L"\x0001d555" L"\0" L"\x0001d556" L"\0" + L"\x0001d557" L"\0" L"\x0001d558" L"\0" L"\x0001d559" L"\0" L"\x0001d55a" + L"\0" L"\x0001d55b" L"\0" L"\x0001d55c" L"\0" L"\x0001d55d" L"\0" + L"\x0001d55e" L"\0" L"\x0001d55f" L"\0" L"\x0001d560" L"\0" L"\x0001d561" + L"\0" L"\x0001d562" L"\0" L"\x0001d563" L"\0" L"\x0001d564" L"\0" + L"\x0001d565" L"\0" L"\x0001d566" L"\0" L"\x0001d567" L"\0" L"\x0001d568" + L"\0" L"\x0001d569" L"\0" L"\x0001d56a" L"\0" L"\x0001d56b" L"\0" + L"\x0001d56c" L"\0" L"\x0001d56d" L"\0" L"\x0001d56e" L"\0" L"\x0001d56f" + L"\0" L"\x0001d570" L"\0" L"\x0001d571" L"\0" L"\x0001d572" L"\0" + L"\x0001d573" L"\0" L"\x0001d574" L"\0" L"\x0001d575" L"\0" L"\x0001d576" + L"\0" L"\x0001d577" L"\0" L"\x0001d578" L"\0" L"\x0001d579" L"\0" + L"\x0001d57a" L"\0" L"\x0001d57b" L"\0" L"\x0001d57c" L"\0" L"\x0001d57d" + L"\0" L"\x0001d57e" L"\0" L"\x0001d57f" L"\0" L"\x0001d580" L"\0" + L"\x0001d581" L"\0" L"\x0001d582" L"\0" L"\x0001d583" L"\0" L"\x0001d584" + L"\0" L"\x0001d585" L"\0" L"\x0001d586" L"\0" L"\x0001d587" L"\0" + L"\x0001d588" L"\0" L"\x0001d589" L"\0" L"\x0001d58a" L"\0" L"\x0001d58b" + L"\0" L"\x0001d58c" L"\0" L"\x0001d58d" L"\0" L"\x0001d58e" L"\0" + L"\x0001d58f" L"\0" L"\x0001d590" L"\0" L"\x0001d591" L"\0" L"\x0001d592" + L"\0" L"\x0001d593" L"\0" L"\x0001d594" L"\0" L"\x0001d595" L"\0" + L"\x0001d596" L"\0" L"\x0001d597" L"\0" L"\x0001d598" L"\0" L"\x0001d599" + L"\0" L"\x0001d59a" L"\0" L"\x0001d59b" L"\0" L"\x0001d59c" L"\0" + L"\x0001d59d" L"\0" L"\x0001d59e" L"\0" L"\x0001d59f" L"\0" L"\x0001d5a0" + L"\0" L"\x0001d5a1" L"\0" L"\x0001d5a2" L"\0" L"\x0001d5a3" L"\0" + L"\x0001d5a4" L"\0" L"\x0001d5a5" L"\0" L"\x0001d5a6" L"\0" L"\x0001d5a7" + L"\0" L"\x0001d5a8" L"\0" L"\x0001d5a9" L"\0" L"\x0001d5aa" L"\0" + L"\x0001d5ab" L"\0" L"\x0001d5ac" L"\0" L"\x0001d5ad" L"\0" L"\x0001d5ae" + L"\0" L"\x0001d5af" L"\0" L"\x0001d5b0" L"\0" L"\x0001d5b1" L"\0" + L"\x0001d5b2" L"\0" L"\x0001d5b3" L"\0" L"\x0001d5b4" L"\0" L"\x0001d5b5" + L"\0" L"\x0001d5b6" L"\0" L"\x0001d5b7" L"\0" L"\x0001d5b8" L"\0" + L"\x0001d5b9" L"\0" L"\x0001d5ba" L"\0" L"\x0001d5bb" L"\0" L"\x0001d5bc" + L"\0" L"\x0001d5bd" L"\0" L"\x0001d5be" L"\0" L"\x0001d5bf" L"\0" + L"\x0001d5c0" L"\0" L"\x0001d5c1" L"\0" L"\x0001d5c2" L"\0" L"\x0001d5c3" + L"\0" L"\x0001d5c4" L"\0" L"\x0001d5c5" L"\0" L"\x0001d5c6" L"\0" + L"\x0001d5c7" L"\0" L"\x0001d5c8" L"\0" L"\x0001d5c9" L"\0" L"\x0001d5ca" + L"\0" L"\x0001d5cb" L"\0" L"\x0001d5cc" L"\0" L"\x0001d5cd" L"\0" + L"\x0001d5ce" L"\0" L"\x0001d5cf" L"\0" L"\x0001d5d0" L"\0" L"\x0001d5d1" + L"\0" L"\x0001d5d2" L"\0" L"\x0001d5d3" L"\0" L"\x0001d5d4" L"\0" + L"\x0001d5d5" L"\0" L"\x0001d5d6" L"\0" L"\x0001d5d7" L"\0" L"\x0001d5d8" + L"\0" L"\x0001d5d9" L"\0" L"\x0001d5da" L"\0" L"\x0001d5db" L"\0" + L"\x0001d5dc" L"\0" L"\x0001d5dd" L"\0" L"\x0001d5de" L"\0" L"\x0001d5df" + L"\0" L"\x0001d5e0" L"\0" L"\x0001d5e1" L"\0" L"\x0001d5e2" L"\0" + L"\x0001d5e3" L"\0" L"\x0001d5e4" L"\0" L"\x0001d5e5" L"\0" L"\x0001d5e6" + L"\0" L"\x0001d5e7" L"\0" L"\x0001d5e8" L"\0" L"\x0001d5e9" L"\0" + L"\x0001d5ea" L"\0" L"\x0001d5eb" L"\0" L"\x0001d5ec" L"\0" L"\x0001d5ed" + L"\0" L"\x0001d5ee" L"\0" L"\x0001d5ef" L"\0" L"\x0001d5f0" L"\0" + L"\x0001d5f1" L"\0" L"\x0001d5f2" L"\0" L"\x0001d5f3" L"\0" L"\x0001d5f4" + L"\0" L"\x0001d5f5" L"\0" L"\x0001d5f6" L"\0" L"\x0001d5f7" L"\0" + L"\x0001d5f8" L"\0" L"\x0001d5f9" L"\0" L"\x0001d5fa" L"\0" L"\x0001d5fb" + L"\0" L"\x0001d5fc" L"\0" L"\x0001d5fd" L"\0" L"\x0001d5fe" L"\0" + L"\x0001d5ff" L"\0" L"\x0001d600" L"\0" L"\x0001d601" L"\0" L"\x0001d602" + L"\0" L"\x0001d603" L"\0" L"\x0001d604" L"\0" L"\x0001d605" L"\0" + L"\x0001d606" L"\0" L"\x0001d607" L"\0" L"\x0001d608" L"\0" L"\x0001d609" + L"\0" L"\x0001d60a" L"\0" L"\x0001d60b" L"\0" L"\x0001d60c" L"\0" + L"\x0001d60d" L"\0" L"\x0001d60e" L"\0" L"\x0001d60f" L"\0" L"\x0001d610" + L"\0" L"\x0001d611" L"\0" L"\x0001d612" L"\0" L"\x0001d613" L"\0" + L"\x0001d614" L"\0" L"\x0001d615" L"\0" L"\x0001d616" L"\0" L"\x0001d617" + L"\0" L"\x0001d618" L"\0" L"\x0001d619" L"\0" L"\x0001d61a" L"\0" + L"\x0001d61b" L"\0" L"\x0001d61c" L"\0" L"\x0001d61d" L"\0" L"\x0001d61e" + L"\0" L"\x0001d61f" L"\0" L"\x0001d620" L"\0" L"\x0001d621" L"\0" + L"\x0001d622" L"\0" L"\x0001d623" L"\0" L"\x0001d624" L"\0" L"\x0001d625" + L"\0" L"\x0001d626" L"\0" L"\x0001d627" L"\0" L"\x0001d628" L"\0" + L"\x0001d629" L"\0" L"\x0001d62a" L"\0" L"\x0001d62b" L"\0" L"\x0001d62c" + L"\0" L"\x0001d62d" L"\0" L"\x0001d62e" L"\0" L"\x0001d62f" L"\0" + L"\x0001d630" L"\0" L"\x0001d631" L"\0" L"\x0001d632" L"\0" L"\x0001d633" + L"\0" L"\x0001d634" L"\0" L"\x0001d635" L"\0" L"\x0001d636" L"\0" + L"\x0001d637" L"\0" L"\x0001d638" L"\0" L"\x0001d639" L"\0" L"\x0001d63a" + L"\0" L"\x0001d63b" L"\0" L"\x0001d63c" L"\0" L"\x0001d63d" L"\0" + L"\x0001d63e" L"\0" L"\x0001d63f" L"\0" L"\x0001d640" L"\0" L"\x0001d641" + L"\0" L"\x0001d642" L"\0" L"\x0001d643" L"\0" L"\x0001d644" L"\0" + L"\x0001d645" L"\0" L"\x0001d646" L"\0" L"\x0001d647" L"\0" L"\x0001d648" + L"\0" L"\x0001d649" L"\0" L"\x0001d64a" L"\0" L"\x0001d64b" L"\0" + L"\x0001d64c" L"\0" L"\x0001d64d" L"\0" L"\x0001d64e" L"\0" L"\x0001d64f" + L"\0" L"\x0001d650" L"\0" L"\x0001d651" L"\0" L"\x0001d652" L"\0" + L"\x0001d653" L"\0" L"\x0001d654" L"\0" L"\x0001d655" L"\0" L"\x0001d656" + L"\0" L"\x0001d657" L"\0" L"\x0001d658" L"\0" L"\x0001d659" L"\0" + L"\x0001d65a" L"\0" L"\x0001d65b" L"\0" L"\x0001d65c" L"\0" L"\x0001d65d" + L"\0" L"\x0001d65e" L"\0" L"\x0001d65f" L"\0" L"\x0001d660" L"\0" + L"\x0001d661" L"\0" L"\x0001d662" L"\0" L"\x0001d663" L"\0" L"\x0001d664" + L"\0" L"\x0001d665" L"\0" L"\x0001d666" L"\0" L"\x0001d667" L"\0" + L"\x0001d668" L"\0" L"\x0001d669" L"\0" L"\x0001d66a" L"\0" L"\x0001d66b" + L"\0" L"\x0001d66c" L"\0" L"\x0001d66d" L"\0" L"\x0001d66e" L"\0" + L"\x0001d66f" L"\0" L"\x0001d670" L"\0" L"\x0001d671" L"\0" L"\x0001d672" + L"\0" L"\x0001d673" L"\0" L"\x0001d674" L"\0" L"\x0001d675" L"\0" + L"\x0001d676" L"\0" L"\x0001d677" L"\0" L"\x0001d678" L"\0" L"\x0001d679" + L"\0" L"\x0001d67a" L"\0" L"\x0001d67b" L"\0" L"\x0001d67c" L"\0" + L"\x0001d67d" L"\0" L"\x0001d67e" L"\0" L"\x0001d67f" L"\0" L"\x0001d680" + L"\0" L"\x0001d681" L"\0" L"\x0001d682" L"\0" L"\x0001d683" L"\0" + L"\x0001d684" L"\0" L"\x0001d685" L"\0" L"\x0001d686" L"\0" L"\x0001d687" + L"\0" L"\x0001d688" L"\0" L"\x0001d689" L"\0" L"\x0001d68a" L"\0" + L"\x0001d68b" L"\0" L"\x0001d68c" L"\0" L"\x0001d68d" L"\0" L"\x0001d68e" + L"\0" L"\x0001d68f" L"\0" L"\x0001d690" L"\0" L"\x0001d691" L"\0" + L"\x0001d692" L"\0" L"\x0001d693" L"\0" L"\x0001d694" L"\0" L"\x0001d695" + L"\0" L"\x0001d696" L"\0" L"\x0001d697" L"\0" L"\x0001d698" L"\0" + L"\x0001d699" L"\0" L"\x0001d69a" L"\0" L"\x0001d69b" L"\0" L"\x0001d69c" + L"\0" L"\x0001d69d" L"\0" L"\x0001d69e" L"\0" L"\x0001d69f" L"\0" + L"\x0001d6a0" L"\0" L"\x0001d6a1" L"\0" L"\x0001d6a2" L"\0" L"\x0001d6a3" + L"\0" L"\x0001d7ce" L"\0" L"\x0001d7cf" L"\0" L"\x0001d7d0" L"\0" + L"\x0001d7d1" L"\0" L"\x0001d7d2" L"\0" L"\x0001d7d3" L"\0" L"\x0001d7d4" + L"\0" L"\x0001d7d5" L"\0" L"\x0001d7d6" L"\0" L"\x0001d7d7" L"\0" + L"\x0001d7d8" L"\0" L"\x0001d7d9" L"\0" L"\x0001d7da" L"\0" L"\x0001d7db" + L"\0" L"\x0001d7dc" L"\0" L"\x0001d7dd" L"\0" L"\x0001d7de" L"\0" + L"\x0001d7df" L"\0" L"\x0001d7e0" L"\0" L"\x0001d7e1" L"\0" L"\x0001d7e2" + L"\0" L"\x0001d7e3" L"\0" L"\x0001d7e4" L"\0" L"\x0001d7e5" L"\0" + L"\x0001d7e6" L"\0" L"\x0001d7e7" L"\0" L"\x0001d7e8" L"\0" L"\x0001d7e9" + L"\0" L"\x0001d7ea" L"\0" L"\x0001d7eb" L"\0" L"\x0001d7ec" L"\0" + L"\x0001d7ed" L"\0" L"\x0001d7ee" L"\0" L"\x0001d7ef" L"\0" L"\x0001d7f0" + L"\0" L"\x0001d7f1" L"\0" L"\x0001d7f2" L"\0" L"\x0001d7f3" L"\0" + L"\x0001d7f4" L"\0" L"\x0001d7f5" L"\0" L"\x0001d7f6" L"\0" L"\x0001d7f7" + L"\0" L"\x0001d7f8" L"\0" L"\x0001d7f9" L"\0" L"\x0001d7fa" L"\0" + L"\x0001d7fb" L"\0" L"\x0001d7fc" L"\0" L"\x0001d7fd" L"\0" L"\x0001d7fe" + L"\0" L"\x0001d7ff"; static const uint32_t translit_to_idx[] = { 0, 3, 8, 12, 15, 20, 23, 26, 30, 37, 44, 51, @@ -469,113 +451,108 @@ static const uint32_t translit_to_idx[] = 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, 180, 183, 186, 189, 192, 196, 199, 202, 205, 208, 211, 214, 217, 221, 224, 227, 230, 233, 237, 242, 245, 248, 252, 257, - 260, 263, 267, 271, 275, 279, 282, 284, 286, 288, 290, 294, - 299, 304, 309, 312, 317, 322, 325, 328, 331, 334, 337, 340, - 343, 346, 349, 352, 356, 359, 362, 365, 368, 371, 376, 382, - 385, 390, 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, - 423, 426, 429, 432, 435, 442, 449, 456, 463, 470, 477, 484, - 491, 498, 505, 512, 519, 524, 527, 531, 536, 540, 543, 547, - 552, 558, 562, 565, 569, 574, 577, 580, 583, 586, 589, 593, - 598, 602, 605, 609, 614, 620, 624, 627, 631, 636, 639, 642, - 645, 648, 652, 656, 661, 665, 669, 674, 677, 680, 683, 686, - 689, 692, 695, 699, 703, 707, 711, 716, 721, 726, 731, 736, - 741, 746, 751, 756, 761, 765, 769, 773, 777, 781, 785, 789, - 793, 798, 803, 808, 813, 818, 823, 828, 833, 838, 842, 847, - 852, 856, 860, 864, 868, 872, 877, 880, 884, 889, 894, 899, - 904, 909, 914, 919, 924, 929, 935, 941, 947, 953, 959, 965, - 971, 977, 983, 989, 995, 1000, 1005, 1010, 1015, 1020, 1025, 1030, - 1035, 1040, 1046, 1052, 1058, 1064, 1070, 1076, 1082, 1088, 1094, 1100, - 1106, 1110, 1114, 1118, 1122, 1126, 1130, 1134, 1138, 1142, 1147, 1152, - 1157, 1162, 1167, 1172, 1177, 1182, 1187, 1192, 1197, 1202, 1207, 1212, - 1217, 1222, 1227, 1232, 1237, 1242, 1247, 1252, 1257, 1262, 1267, 1272, - 1277, 1282, 1287, 1292, 1297, 1302, 1307, 1312, 1317, 1322, 1327, 1332, - 1337, 1342, 1347, 1352, 1357, 1362, 1367, 1372, 1377, 1382, 1387, 1392, - 1397, 1402, 1407, 1412, 1417, 1422, 1427, 1432, 1437, 1442, 1447, 1452, - 1457, 1462, 1467, 1472, 1477, 1482, 1487, 1492, 1497, 1502, 1507, 1512, - 1517, 1522, 1527, 1532, 1537, 1542, 1547, 1552, 1557, 1562, 1567, 1572, - 1577, 1582, 1587, 1592, 1595, 1598, 1601, 1604, 1607, 1610, 1613, 1616, - 1619, 1622, 1625, 1628, 1633, 1637, 1642, 1645, 1648, 1654, 1660, 1666, - 1672, 1678, 1684, 1690, 1696, 1702, 1708, 1714, 1720, 1726, 1732, 1738, - 1744, 1750, 1756, 1762, 1768, 1774, 1780, 1786, 1792, 1798, 1804, 1810, - 1816, 1822, 1828, 1833, 1837, 1841, 1846, 1850, 1854, 1858, 1862, 1866, - 1870, 1874, 1878, 1882, 1886, 1891, 1897, 1901, 1905, 1909, 1913, 1917, - 1921, 1925, 1930, 1935, 1940, 1945, 1949, 1953, 1957, 1961, 1965, 1969, - 1973, 1977, 1981, 1985, 1991, 1997, 2002, 2008, 2014, 2020, 2025, 2031, - 2036, 2043, 2047, 2052, 2057, 2062, 2067, 2074, 2083, 2087, 2091, 2095, - 2099, 2103, 2107, 2111, 2115, 2119, 2123, 2127, 2131, 2135, 2139, 2143, - 2147, 2153, 2157, 2161, 2165, 2171, 2176, 2180, 2184, 2188, 2192, 2196, - 2200, 2204, 2208, 2212, 2216, 2221, 2225, 2229, 2234, 2239, 2243, 2249, - 2254, 2258, 2262, 2266, 2270, 2274, 2278, 2282, 2287, 2292, 2296, 2299, - 2301, 2303, 2305, 2307, 2309, 2311, 2313, 2315, 2317, 2319, 2321, 2323, - 2325, 2327, 2329, 2331, 2334, 2337, 2340, 2343, 2346, 2349, 2352, 2355, - 2358, 2361, 2364, 2367, 2370, 2373, 2376, 2379, 2382, 2385, 2388, 2391, - 2394, 2397, 2400, 2403, 2406, 2408, 2411, 2414, 2417, 2420, 2423, 2426, - 2429, 2432, 2435, 2438, 2441, 2444, 2447, 2450, 2453, 2456, 2459, 2462, - 2465, 2468, 2471, 2474, 2477, 2480, 2483, 2486, 2489, 2492, 2495, 2498, - 2501, 2504, 2507, 2510, 2513, 2516, 2519, 2522, 2525, 2528, 2531, 2534, - 2537, 2540, 2543, 2546, 2549, 2552, 2555, 2558, 2561, 2564, 2567, 2570, - 2573, 2576, 2579, 2582, 2585, 2588, 2591, 2594, 2597, 2600, 2603, 2606, - 2609, 2612, 2615, 2618, 2621, 2624, 2627, 2630, 2633, 2636, 2639, 2642, - 2645, 2648, 2651, 2654, 2657, 2660, 2663, 2666, 2669, 2672, 2675, 2678, - 2681, 2684, 2687, 2690, 2693, 2696, 2699, 2702, 2705, 2708, 2711, 2714, - 2717, 2720, 2723, 2726, 2729, 2732, 2735, 2738, 2741, 2744, 2747, 2750, - 2753, 2756, 2759, 2762, 2765, 2768, 2771, 2774, 2777, 2780, 2783, 2786, - 2789, 2792, 2795, 2798, 2801, 2804, 2807, 2810, 2813, 2816, 2819, 2822, - 2825, 2828, 2831, 2834, 2837, 2840, 2843, 2846, 2849, 2852, 2855, 2858, - 2861, 2864, 2867, 2870, 2873, 2876, 2879, 2882, 2885, 2888, 2891, 2894, - 2897, 2900, 2903, 2906, 2909, 2912, 2915, 2918, 2921, 2924, 2927, 2930, - 2933, 2936, 2939, 2942, 2945, 2948, 2951, 2954, 2957, 2960, 2963, 2966, - 2969, 2972, 2975, 2978, 2981, 2984, 2987, 2990, 2993, 2996, 2999, 3002, - 3005, 3008, 3011, 3014, 3017, 3020, 3023, 3026, 3029, 3032, 3035, 3038, - 3041, 3044, 3047, 3050, 3053, 3056, 3059, 3062, 3065, 3068, 3071, 3074, - 3077, 3080, 3083, 3086, 3089, 3092, 3095, 3098, 3101, 3104, 3107, 3110, - 3113, 3116, 3119, 3122, 3125, 3128, 3131, 3134, 3137, 3140, 3143, 3146, - 3149, 3152, 3155, 3158, 3161, 3164, 3167, 3170, 3173, 3176, 3179, 3182, - 3185, 3188, 3191, 3194, 3197, 3200, 3203, 3206, 3209, 3212, 3215, 3218, - 3221, 3224, 3227, 3230, 3233, 3236, 3239, 3242, 3245, 3248, 3251, 3254, - 3257, 3260, 3263, 3266, 3269, 3272, 3275, 3278, 3281, 3284, 3287, 3290, - 3293, 3296, 3299, 3302, 3305, 3308, 3311, 3314, 3317, 3320, 3323, 3326, - 3329, 3332, 3335, 3338, 3341, 3344, 3347, 3350, 3353, 3356, 3359, 3362, - 3365, 3368, 3371, 3374, 3377, 3380, 3383, 3386, 3389, 3392, 3395, 3398, - 3401, 3404, 3407, 3410, 3413, 3416, 3419, 3422, 3425, 3428, 3431, 3434, - 3437, 3440, 3443, 3446, 3449, 3452, 3455, 3458, 3461, 3464, 3467, 3470, - 3473, 3476, 3479, 3482, 3485, 3488, 3491, 3494, 3497, 3500, 3503, 3506, - 3509, 3512, 3515, 3518, 3521, 3524, 3527, 3530, 3533, 3536, 3539, 3542, - 3545, 3548, 3551, 3554, 3557, 3560, 3563, 3566, 3569, 3572, 3575, 3578, - 3581, 3584, 3587, 3590, 3593, 3596, 3599, 3602, 3605, 3608, 3611, 3614, - 3617, 3620, 3623, 3626, 3629, 3632, 3635, 3638, 3641, 3644, 3647, 3650, - 3653, 3656, 3659, 3662, 3665, 3668, 3671, 3674, 3677, 3680, 3683, 3686, - 3689, 3692, 3695, 3698, 3701, 3704, 3707, 3710, 3713, 3716, 3719, 3722, - 3725, 3728, 3731, 3734, 3737, 3740, 3743, 3746, 3749, 3752, 3755, 3758, - 3761, 3764, 3767, 3770, 3773, 3776, 3779, 3782, 3785, 3788, 3791, 3794, - 3797, 3800, 3803, 3806, 3809, 3812, 3815, 3818, 3821, 3824, 3827, 3830, - 3833, 3836, 3839, 3842, 3845, 3848, 3851, 3854, 3857, 3860, 3863, 3866, - 3869, 3872, 3875, 3878, 3881, 3884, 3887, 3890, 3893, 3896, 3899, 3902, - 3905, 3908, 3911, 3914, 3917, 3920, 3923, 3926, 3929, 3932, 3935, 3938, - 3941, 3944, 3947, 3950, 3953, 3956, 3959, 3962, 3965, 3968, 3971, 3974, - 3977, 3980, 3983, 3986, 3989, 3992, 3995, 3998, 4001, 4004, 4007, 4010, - 4013, 4016, 4019, 4022, 4025, 4028, 4031, 4034, 4037, 4040, 4043, 4046, - 4049, 4052, 4055, 4058, 4061, 4064, 4067, 4070, 4073, 4076, 4079, 4082, - 4085, 4088, 4091, 4094, 4097, 4100, 4103, 4106, 4109, 4112, 4115, 4118, - 4121, 4124, 4127, 4130, 4133, 4136, 4139, 4142, 4145, 4148, 4151, 4154, - 4157, 4160, 4163, 4166, 4169, 4172, 4175, 4178, 4181, 4184, 4187, 4190, - 4193, 4196, 4199, 4202, 4205, 4208, 4211, 4214, 4217, 4220, 4223, 4226, - 4229, 4232, 4235, 4238, 4241, 4244, 4247, 4250, 4253, 4256, 4259, 4262, - 4265, 4268, 4271, 4274, 4277, 4280, 4283, 4286, 4289, 4292, 4295, 4298, - 4301, 4304, 4307, 4310, 4313, 4316, 4319, 4322, 4325, 4328, 4331, 4334, - 4337, 4340, 4343, 4346, 4349, 4352, 4355, 4358, 4361, 4364, 4367, 4370, - 4373, 4376, 4379, 4382, 4385, 4388, 4391, 4394, 4397, 4400, 4403, 4406, - 4409, 4412, 4415, 4418, 4421, 4424, 4427, 4430, 4433, 4436, 4439, 4442, - 4445, 4448, 4451, 4454, 4457, 4460, 4463, 4466, 4469, 4472, 4475, 4478, - 4481, 4484, 4487, 4490, 4493, 4496, 4499, 4502, 4505, 4508, 4511, 4514, - 4517, 4520, 4523, 4526, 4529, 4532, 4535, 4538, 4541, 4544, 4547, 4550, - 4553, 4556, 4559, 4562, 4565, 4568, 4571, 4574, 4577, 4580, 4583, 4586, - 4589, 4592, 4595, 4598, 4601, 4604, 4607, 4610, 4613, 4616, 4619, 4622, - 4625, 4628, 4631, 4634, 4637, 4640, 4643, 4646, 4649, 4652, 4655, 4658, - 4661, 4664, 4667, 4670, 4673, 4676, 4679, 4682, 4685, 4688, 4691, 4694, - 4697, 4700, 4703, 4706, 4709, 4712, 4715, 4718, 4721, 4724, 4727, 4730, - 4733, 4736, 4739, 4742, 4745, 4748, 4751, 4754, 4757, 4760, 4763, 4766, - 4769, 4772, 4775, 4778, 4781, 4784, 4787, 4790 + 260, 263, 267, 271, 275, 279, 284, 289, 294, 297, 302, 307, + 310, 313, 316, 319, 322, 325, 328, 331, 334, 337, 341, 344, + 347, 350, 353, 356, 361, 367, 370, 375, 378, 381, 384, 387, + 390, 393, 396, 399, 402, 405, 412, 419, 426, 433, 440, 447, + 454, 461, 468, 475, 482, 489, 494, 497, 501, 506, 510, 513, + 517, 522, 528, 532, 535, 539, 544, 547, 550, 553, 556, 559, + 563, 568, 572, 575, 579, 584, 590, 594, 597, 601, 606, 609, + 612, 615, 618, 622, 626, 631, 635, 639, 644, 647, 650, 653, + 656, 659, 662, 665, 669, 673, 677, 681, 686, 691, 696, 701, + 706, 711, 716, 721, 726, 731, 735, 739, 743, 747, 751, 755, + 759, 763, 768, 773, 778, 783, 788, 793, 798, 803, 808, 812, + 817, 822, 826, 830, 834, 838, 842, 847, 850, 854, 859, 864, + 869, 874, 879, 884, 889, 894, 899, 905, 911, 917, 923, 929, + 935, 941, 947, 953, 959, 965, 970, 975, 980, 985, 990, 995, + 1000, 1005, 1010, 1016, 1022, 1028, 1034, 1040, 1046, 1052, 1058, 1064, + 1070, 1076, 1080, 1084, 1088, 1092, 1096, 1100, 1104, 1108, 1112, 1117, + 1122, 1127, 1132, 1137, 1142, 1147, 1152, 1157, 1162, 1167, 1172, 1177, + 1182, 1187, 1192, 1197, 1202, 1207, 1212, 1217, 1222, 1227, 1232, 1237, + 1242, 1247, 1252, 1257, 1262, 1267, 1272, 1277, 1282, 1287, 1292, 1297, + 1302, 1307, 1312, 1317, 1322, 1327, 1332, 1337, 1342, 1347, 1352, 1357, + 1362, 1367, 1372, 1377, 1382, 1387, 1392, 1397, 1402, 1407, 1412, 1417, + 1422, 1427, 1432, 1437, 1442, 1447, 1452, 1457, 1462, 1467, 1472, 1477, + 1482, 1487, 1492, 1497, 1502, 1507, 1512, 1517, 1522, 1527, 1532, 1537, + 1542, 1547, 1552, 1557, 1562, 1565, 1568, 1571, 1574, 1577, 1580, 1583, + 1586, 1589, 1592, 1595, 1598, 1601, 1606, 1610, 1614, 1619, 1623, 1627, + 1631, 1635, 1639, 1643, 1647, 1651, 1655, 1659, 1664, 1670, 1674, 1678, + 1682, 1686, 1690, 1694, 1698, 1703, 1708, 1713, 1718, 1722, 1726, 1730, + 1734, 1738, 1742, 1746, 1750, 1754, 1758, 1764, 1770, 1775, 1781, 1787, + 1793, 1798, 1804, 1809, 1816, 1820, 1825, 1830, 1835, 1840, 1847, 1856, + 1860, 1864, 1868, 1872, 1876, 1880, 1884, 1888, 1892, 1896, 1900, 1904, + 1908, 1912, 1916, 1920, 1926, 1930, 1934, 1938, 1944, 1949, 1953, 1957, + 1961, 1965, 1969, 1973, 1977, 1981, 1985, 1989, 1994, 1998, 2002, 2007, + 2012, 2016, 2022, 2027, 2031, 2035, 2039, 2043, 2047, 2051, 2055, 2060, + 2065, 2069, 2072, 2075, 2078, 2081, 2084, 2087, 2090, 2093, 2096, 2099, + 2102, 2105, 2108, 2111, 2114, 2117, 2120, 2123, 2126, 2129, 2132, 2135, + 2138, 2141, 2144, 2147, 2149, 2152, 2155, 2158, 2161, 2164, 2167, 2170, + 2173, 2176, 2179, 2182, 2185, 2188, 2191, 2194, 2197, 2200, 2203, 2206, + 2209, 2212, 2215, 2218, 2221, 2224, 2227, 2230, 2233, 2236, 2239, 2242, + 2245, 2248, 2251, 2254, 2257, 2260, 2263, 2266, 2269, 2272, 2275, 2278, + 2281, 2284, 2287, 2290, 2293, 2296, 2299, 2302, 2305, 2308, 2311, 2314, + 2317, 2320, 2323, 2326, 2329, 2332, 2335, 2338, 2341, 2344, 2347, 2350, + 2353, 2356, 2359, 2362, 2365, 2368, 2371, 2374, 2377, 2380, 2383, 2386, + 2389, 2392, 2395, 2398, 2401, 2404, 2407, 2410, 2413, 2416, 2419, 2422, + 2425, 2428, 2431, 2434, 2437, 2440, 2443, 2446, 2449, 2452, 2455, 2458, + 2461, 2464, 2467, 2470, 2473, 2476, 2479, 2482, 2485, 2488, 2491, 2494, + 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530, + 2533, 2536, 2539, 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2563, 2566, + 2569, 2572, 2575, 2578, 2581, 2584, 2587, 2590, 2593, 2596, 2599, 2602, + 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626, 2629, 2632, 2635, 2638, + 2641, 2644, 2647, 2650, 2653, 2656, 2659, 2662, 2665, 2668, 2671, 2674, + 2677, 2680, 2683, 2686, 2689, 2692, 2695, 2698, 2701, 2704, 2707, 2710, + 2713, 2716, 2719, 2722, 2725, 2728, 2731, 2734, 2737, 2740, 2743, 2746, + 2749, 2752, 2755, 2758, 2761, 2764, 2767, 2770, 2773, 2776, 2779, 2782, + 2785, 2788, 2791, 2794, 2797, 2800, 2803, 2806, 2809, 2812, 2815, 2818, + 2821, 2824, 2827, 2830, 2833, 2836, 2839, 2842, 2845, 2848, 2851, 2854, + 2857, 2860, 2863, 2866, 2869, 2872, 2875, 2878, 2881, 2884, 2887, 2890, + 2893, 2896, 2899, 2902, 2905, 2908, 2911, 2914, 2917, 2920, 2923, 2926, + 2929, 2932, 2935, 2938, 2941, 2944, 2947, 2950, 2953, 2956, 2959, 2962, + 2965, 2968, 2971, 2974, 2977, 2980, 2983, 2986, 2989, 2992, 2995, 2998, + 3001, 3004, 3007, 3010, 3013, 3016, 3019, 3022, 3025, 3028, 3031, 3034, + 3037, 3040, 3043, 3046, 3049, 3052, 3055, 3058, 3061, 3064, 3067, 3070, + 3073, 3076, 3079, 3082, 3085, 3088, 3091, 3094, 3097, 3100, 3103, 3106, + 3109, 3112, 3115, 3118, 3121, 3124, 3127, 3130, 3133, 3136, 3139, 3142, + 3145, 3148, 3151, 3154, 3157, 3160, 3163, 3166, 3169, 3172, 3175, 3178, + 3181, 3184, 3187, 3190, 3193, 3196, 3199, 3202, 3205, 3208, 3211, 3214, + 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3244, 3247, 3250, + 3253, 3256, 3259, 3262, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3286, + 3289, 3292, 3295, 3298, 3301, 3304, 3307, 3310, 3313, 3316, 3319, 3322, + 3325, 3328, 3331, 3334, 3337, 3340, 3343, 3346, 3349, 3352, 3355, 3358, + 3361, 3364, 3367, 3370, 3373, 3376, 3379, 3382, 3385, 3388, 3391, 3394, + 3397, 3400, 3403, 3406, 3409, 3412, 3415, 3418, 3421, 3424, 3427, 3430, + 3433, 3436, 3439, 3442, 3445, 3448, 3451, 3454, 3457, 3460, 3463, 3466, + 3469, 3472, 3475, 3478, 3481, 3484, 3487, 3490, 3493, 3496, 3499, 3502, + 3505, 3508, 3511, 3514, 3517, 3520, 3523, 3526, 3529, 3532, 3535, 3538, + 3541, 3544, 3547, 3550, 3553, 3556, 3559, 3562, 3565, 3568, 3571, 3574, + 3577, 3580, 3583, 3586, 3589, 3592, 3595, 3598, 3601, 3604, 3607, 3610, + 3613, 3616, 3619, 3622, 3625, 3628, 3631, 3634, 3637, 3640, 3643, 3646, + 3649, 3652, 3655, 3658, 3661, 3664, 3667, 3670, 3673, 3676, 3679, 3682, + 3685, 3688, 3691, 3694, 3697, 3700, 3703, 3706, 3709, 3712, 3715, 3718, + 3721, 3724, 3727, 3730, 3733, 3736, 3739, 3742, 3745, 3748, 3751, 3754, + 3757, 3760, 3763, 3766, 3769, 3772, 3775, 3778, 3781, 3784, 3787, 3790, + 3793, 3796, 3799, 3802, 3805, 3808, 3811, 3814, 3817, 3820, 3823, 3826, + 3829, 3832, 3835, 3838, 3841, 3844, 3847, 3850, 3853, 3856, 3859, 3862, + 3865, 3868, 3871, 3874, 3877, 3880, 3883, 3886, 3889, 3892, 3895, 3898, + 3901, 3904, 3907, 3910, 3913, 3916, 3919, 3922, 3925, 3928, 3931, 3934, + 3937, 3940, 3943, 3946, 3949, 3952, 3955, 3958, 3961, 3964, 3967, 3970, + 3973, 3976, 3979, 3982, 3985, 3988, 3991, 3994, 3997, 4000, 4003, 4006, + 4009, 4012, 4015, 4018, 4021, 4024, 4027, 4030, 4033, 4036, 4039, 4042, + 4045, 4048, 4051, 4054, 4057, 4060, 4063, 4066, 4069, 4072, 4075, 4078, + 4081, 4084, 4087, 4090, 4093, 4096, 4099, 4102, 4105, 4108, 4111, 4114, + 4117, 4120, 4123, 4126, 4129, 4132, 4135, 4138, 4141, 4144, 4147, 4150, + 4153, 4156, 4159, 4162, 4165, 4168, 4171, 4174, 4177, 4180, 4183, 4186, + 4189, 4192, 4195, 4198, 4201, 4204, 4207, 4210, 4213, 4216, 4219, 4222, + 4225, 4228, 4231, 4234, 4237, 4240, 4243, 4246, 4249, 4252, 4255, 4258, + 4261, 4264, 4267, 4270, 4273, 4276, 4279, 4282, 4285, 4288, 4291, 4294, + 4297, 4300, 4303, 4306, 4309, 4312, 4315, 4318, 4321, 4324, 4327, 4330, + 4333, 4336, 4339, 4342, 4345, 4348, 4351, 4354, 4357, 4360, 4363, 4366, + 4369, 4372, 4375, 4378, 4381, 4384, 4387, 4390, 4393, 4396, 4399, 4402, + 4405, 4408, 4411, 4414, 4417, 4420, 4423, 4426, 4429, 4432, 4435, 4438, + 4441, 4444, 4447, 4450, 4453, 4456, 4459, 4462, 4465, 4468, 4471, 4474, + 4477, 4480, 4483, 4486, 4489, 4492, 4495, 4498, 4501, 4504, 4507, 4510, + 4513, 4516, 4519, 4522, 4525, 4528, 4531 }; static const wchar_t translit_to_tbl[] = L" \0" L"\0" L"(C)\0" L"\0" L"<<\0" L"\0" L"-\0" L"\0" L"(R)\0" L"\0" L"u\0" @@ -591,8 +568,7 @@ static const wchar_t translit_to_tbl[] = L"\0" L"'\0" L"\0" L"'\0" L"\0" L",\0" L"\0" L"'\0" L"\0" L"\"\0" L"\0" L"\"\0" L"\0" L",,\0" L"\0" L"\"\0" L"\0" L"+\0" L"\0" L"o\0" L"\0" L".\0" L"\0" L"..\0" L"\0" L"...\0" L"\0" L" \0" L"\0" L"`\0" L"\0" L"``\0" L"\0" - L"```\0" L"\0" L"<\0" L"\0" L">\0" L"\0" L"!!\0" L"\0" L"??\0" L"\0" L"?!\0" - L"\0" L"!?\0" L"\0" L" \0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" + L"```\0" L"\0" L"<\0" L"\0" L">\0" L"\0" L"!!\0" L"\0" L"?!\0" L"\0" L"!?\0" L"\0" L"Rs\0" L"\0" L"EUR\0" L"\0" L"a/c\0" L"\0" L"a/s\0" L"\0" L"C\0" L"\0" L"c/o\0" L"\0" L"c/u\0" L"\0" L"g\0" L"\0" L"H\0" L"\0" L"H\0" L"\0" L"H\0" L"\0" L"h\0" L"\0" L"I\0" L"\0" L"I\0" L"\0" L"L\0" L"\0" L"l\0" @@ -600,89 +576,78 @@ static const wchar_t translit_to_tbl[] = L"R\0" L"\0" L"R\0" L"\0" L"TEL\0" L"\0" L"(TM)\0" L"\0" L"Z\0" L"\0" L"Ohm\0" L"\0" L"Z\0" L"\0" L"B\0" L"\0" L"C\0" L"\0" L"e\0" L"\0" L"e\0" L"\0" L"E\0" L"\0" L"F\0" L"\0" L"M\0" L"\0" L"o\0" L"\0" L"i\0" L"\0" - L"D\0" L"\0" L"d\0" L"\0" L"e\0" L"\0" L"i\0" L"\0" L"j\0" L"\0" L" 1/3 \0" - L"\0" L" 2/3 \0" L"\0" L" 1/5 \0" L"\0" L" 2/5 \0" L"\0" L" 3/5 \0" L"\0" - L" 4/5 \0" L"\0" L" 1/6 \0" L"\0" L" 5/6 \0" L"\0" L" 1/8 \0" L"\0" - L" 3/8 \0" L"\0" L" 5/8 \0" L"\0" L" 7/8 \0" L"\0" L" 1/\0" L"\0" L"I\0" - L"\0" L"II\0" L"\0" L"III\0" L"\0" L"IV\0" L"\0" L"V\0" L"\0" L"VI\0" L"\0" - L"VII\0" L"\0" L"VIII\0" L"\0" L"IX\0" L"\0" L"X\0" L"\0" L"XI\0" L"\0" - L"XII\0" L"\0" L"L\0" L"\0" L"C\0" L"\0" L"D\0" L"\0" L"M\0" L"\0" L"i\0" - L"\0" L"ii\0" L"\0" L"iii\0" L"\0" L"iv\0" L"\0" L"v\0" L"\0" L"vi\0" L"\0" - L"vii\0" L"\0" L"viii\0" L"\0" L"ix\0" L"\0" L"x\0" L"\0" L"xi\0" L"\0" - L"xii\0" L"\0" L"l\0" L"\0" L"c\0" L"\0" L"d\0" L"\0" L"m\0" L"\0" L"<-\0" - L"\0" L"->\0" L"\0" L"<->\0" L"\0" L"<=\0" L"\0" L"=>\0" L"\0" L"<=>\0" - L"\0" L"-\0" L"\0" L"/\0" L"\0" L"\\\0" L"\0" L"*\0" L"\0" L"|\0" L"\0" - L":\0" L"\0" L"~\0" L"\0" L"<=\0" L"\0" L">=\0" L"\0" L"<<\0" L"\0" L">>\0" - L"\0" L"<<<\0" L"\0" L">>>\0" L"\0" L"NUL\0" L"\0" L"SOH\0" L"\0" L"STX\0" - L"\0" L"ETX\0" L"\0" L"EOT\0" L"\0" L"ENQ\0" L"\0" L"ACK\0" L"\0" L"BEL\0" - L"\0" L"BS\0" L"\0" L"HT\0" L"\0" L"LF\0" L"\0" L"VT\0" L"\0" L"FF\0" L"\0" - L"CR\0" L"\0" L"SO\0" L"\0" L"SI\0" L"\0" L"DLE\0" L"\0" L"DC1\0" L"\0" - L"DC2\0" L"\0" L"DC3\0" L"\0" L"DC4\0" L"\0" L"NAK\0" L"\0" L"SYN\0" L"\0" - L"ETB\0" L"\0" L"CAN\0" L"\0" L"EM\0" L"\0" L"SUB\0" L"\0" L"ESC\0" L"\0" - L"FS\0" L"\0" L"GS\0" L"\0" L"RS\0" L"\0" L"US\0" L"\0" L"SP\0" L"\0" - L"DEL\0" L"\0" L"_\0" L"\0" L"NL\0" L"\0" L"(1)\0" L"\0" L"(2)\0" L"\0" - L"(3)\0" L"\0" L"(4)\0" L"\0" L"(5)\0" L"\0" L"(6)\0" L"\0" L"(7)\0" L"\0" - L"(8)\0" L"\0" L"(9)\0" L"\0" L"(10)\0" L"\0" L"(11)\0" L"\0" L"(12)\0" - L"\0" L"(13)\0" L"\0" L"(14)\0" L"\0" L"(15)\0" L"\0" L"(16)\0" L"\0" - L"(17)\0" L"\0" L"(18)\0" L"\0" L"(19)\0" L"\0" L"(20)\0" L"\0" L"(1)\0" - L"\0" L"(2)\0" L"\0" L"(3)\0" L"\0" L"(4)\0" L"\0" L"(5)\0" L"\0" L"(6)\0" - L"\0" L"(7)\0" L"\0" L"(8)\0" L"\0" L"(9)\0" L"\0" L"(10)\0" L"\0" L"(11)\0" - L"\0" L"(12)\0" L"\0" L"(13)\0" L"\0" L"(14)\0" L"\0" L"(15)\0" L"\0" - L"(16)\0" L"\0" L"(17)\0" L"\0" L"(18)\0" L"\0" L"(19)\0" L"\0" L"(20)\0" - L"\0" L"1.\0" L"\0" L"2.\0" L"\0" L"3.\0" L"\0" L"4.\0" L"\0" L"5.\0" L"\0" - L"6.\0" L"\0" L"7.\0" L"\0" L"8.\0" L"\0" L"9.\0" L"\0" L"10.\0" L"\0" - L"11.\0" L"\0" L"12.\0" L"\0" L"13.\0" L"\0" L"14.\0" L"\0" L"15.\0" L"\0" - L"16.\0" L"\0" L"17.\0" L"\0" L"18.\0" L"\0" L"19.\0" L"\0" L"20.\0" L"\0" - L"(a)\0" L"\0" L"(b)\0" L"\0" L"(c)\0" L"\0" L"(d)\0" L"\0" L"(e)\0" L"\0" - L"(f)\0" L"\0" L"(g)\0" L"\0" L"(h)\0" L"\0" L"(i)\0" L"\0" L"(j)\0" L"\0" - L"(k)\0" L"\0" L"(l)\0" L"\0" L"(m)\0" L"\0" L"(n)\0" L"\0" L"(o)\0" L"\0" - L"(p)\0" L"\0" L"(q)\0" L"\0" L"(r)\0" L"\0" L"(s)\0" L"\0" L"(t)\0" L"\0" - L"(u)\0" L"\0" L"(v)\0" L"\0" L"(w)\0" L"\0" L"(x)\0" L"\0" L"(y)\0" L"\0" - L"(z)\0" L"\0" L"(A)\0" L"\0" L"(B)\0" L"\0" L"(C)\0" L"\0" L"(D)\0" L"\0" - L"(E)\0" L"\0" L"(F)\0" L"\0" L"(G)\0" L"\0" L"(H)\0" L"\0" L"(I)\0" L"\0" - L"(J)\0" L"\0" L"(K)\0" L"\0" L"(L)\0" L"\0" L"(M)\0" L"\0" L"(N)\0" L"\0" - L"(O)\0" L"\0" L"(P)\0" L"\0" L"(Q)\0" L"\0" L"(R)\0" L"\0" L"(S)\0" L"\0" - L"(T)\0" L"\0" L"(U)\0" L"\0" L"(V)\0" L"\0" L"(W)\0" L"\0" L"(X)\0" L"\0" - L"(Y)\0" L"\0" L"(Z)\0" L"\0" L"(a)\0" L"\0" L"(b)\0" L"\0" L"(c)\0" L"\0" - L"(d)\0" L"\0" L"(e)\0" L"\0" L"(f)\0" L"\0" L"(g)\0" L"\0" L"(h)\0" L"\0" - L"(i)\0" L"\0" L"(j)\0" L"\0" L"(k)\0" L"\0" L"(l)\0" L"\0" L"(m)\0" L"\0" - L"(n)\0" L"\0" L"(o)\0" L"\0" L"(p)\0" L"\0" L"(q)\0" L"\0" L"(r)\0" L"\0" - L"(s)\0" L"\0" L"(t)\0" L"\0" L"(u)\0" L"\0" L"(v)\0" L"\0" L"(w)\0" L"\0" - L"(x)\0" L"\0" L"(y)\0" L"\0" L"(z)\0" L"\0" L"(0)\0" L"\0" L"-\0" L"\0" - L"|\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" - L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"o\0" L"\0" - L"::=\0" L"\0" L"==\0" L"\0" L"===\0" L"\0" L" \0" L"\0" L"=\0" L"\0" - L"(21)\0" L"\0" L"(22)\0" L"\0" L"(23)\0" L"\0" L"(24)\0" L"\0" L"(25)\0" - L"\0" L"(26)\0" L"\0" L"(27)\0" L"\0" L"(28)\0" L"\0" L"(29)\0" L"\0" - L"(30)\0" L"\0" L"(31)\0" L"\0" L"(32)\0" L"\0" L"(33)\0" L"\0" L"(34)\0" - L"\0" L"(35)\0" L"\0" L"(36)\0" L"\0" L"(37)\0" L"\0" L"(38)\0" L"\0" - L"(39)\0" L"\0" L"(40)\0" L"\0" L"(41)\0" L"\0" L"(42)\0" L"\0" L"(43)\0" - L"\0" L"(44)\0" L"\0" L"(45)\0" L"\0" L"(46)\0" L"\0" L"(47)\0" L"\0" - L"(48)\0" L"\0" L"(49)\0" L"\0" L"(50)\0" L"\0" L"hPa\0" L"\0" L"da\0" L"\0" - L"AU\0" L"\0" L"bar\0" L"\0" L"oV\0" L"\0" L"pc\0" L"\0" L"pA\0" L"\0" - L"nA\0" L"\0" L"uA\0" L"\0" L"mA\0" L"\0" L"kA\0" L"\0" L"KB\0" L"\0" - L"MB\0" L"\0" L"GB\0" L"\0" L"cal\0" L"\0" L"kcal\0" L"\0" L"pF\0" L"\0" - L"nF\0" L"\0" L"uF\0" L"\0" L"ug\0" L"\0" L"mg\0" L"\0" L"kg\0" L"\0" - L"Hz\0" L"\0" L"kHz\0" L"\0" L"MHz\0" L"\0" L"GHz\0" L"\0" L"THz\0" L"\0" - L"ul\0" L"\0" L"ml\0" L"\0" L"dl\0" L"\0" L"kl\0" L"\0" L"fm\0" L"\0" - L"nm\0" L"\0" L"um\0" L"\0" L"mm\0" L"\0" L"cm\0" L"\0" L"km\0" L"\0" - L"mm^2\0" L"\0" L"cm^2\0" L"\0" L"m^2\0" L"\0" L"km^2\0" L"\0" L"mm^3\0" - L"\0" L"cm^3\0" L"\0" L"m^3\0" L"\0" L"km^3\0" L"\0" L"m/s\0" L"\0" - L"m/s^2\0" L"\0" L"Pa\0" L"\0" L"kPa\0" L"\0" L"MPa\0" L"\0" L"GPa\0" L"\0" - L"rad\0" L"\0" L"rad/s\0" L"\0" L"rad/s^2\0" L"\0" L"ps\0" L"\0" L"ns\0" - L"\0" L"us\0" L"\0" L"ms\0" L"\0" L"pV\0" L"\0" L"nV\0" L"\0" L"uV\0" L"\0" - L"mV\0" L"\0" L"kV\0" L"\0" L"MV\0" L"\0" L"pW\0" L"\0" L"nW\0" L"\0" - L"uW\0" L"\0" L"mW\0" L"\0" L"kW\0" L"\0" L"MW\0" L"\0" L"a.m.\0" L"\0" - L"Bq\0" L"\0" L"cc\0" L"\0" L"cd\0" L"\0" L"C/kg\0" L"\0" L"Co.\0" L"\0" - L"dB\0" L"\0" L"Gy\0" L"\0" L"ha\0" L"\0" L"HP\0" L"\0" L"in\0" L"\0" - L"KK\0" L"\0" L"KM\0" L"\0" L"kt\0" L"\0" L"lm\0" L"\0" L"ln\0" L"\0" - L"log\0" L"\0" L"lx\0" L"\0" L"mb\0" L"\0" L"mil\0" L"\0" L"mol\0" L"\0" - L"PH\0" L"\0" L"p.m.\0" L"\0" L"PPM\0" L"\0" L"PR\0" L"\0" L"sr\0" L"\0" - L"Sv\0" L"\0" L"Wb\0" L"\0" L"ff\0" L"\0" L"fi\0" L"\0" L"fl\0" L"\0" - L"ffi\0" L"\0" L"ffl\0" L"\0" L"st\0" L"\0" L"+\0" L"\0" L"\0" L"\0" L"\0" - L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" - L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" L"\0" - L"\0" L"\0" L"\0" L"\0" L"\0" L"_\0" L"\0" L"_\0" L"\0" L"_\0" L"\0" L",\0" + L" 1/3 \0" L"\0" L" 2/3 \0" L"\0" L" 1/5 \0" L"\0" L" 2/5 \0" L"\0" + L" 3/5 \0" L"\0" L" 4/5 \0" L"\0" L" 1/6 \0" L"\0" L" 5/6 \0" L"\0" + L" 1/8 \0" L"\0" L" 3/8 \0" L"\0" L" 5/8 \0" L"\0" L" 7/8 \0" L"\0" L" 1/\0" + L"\0" L"I\0" L"\0" L"II\0" L"\0" L"III\0" L"\0" L"IV\0" L"\0" L"V\0" L"\0" + L"VI\0" L"\0" L"VII\0" L"\0" L"VIII\0" L"\0" L"IX\0" L"\0" L"X\0" L"\0" + L"XI\0" L"\0" L"XII\0" L"\0" L"L\0" L"\0" L"C\0" L"\0" L"D\0" L"\0" L"M\0" + L"\0" L"i\0" L"\0" L"ii\0" L"\0" L"iii\0" L"\0" L"iv\0" L"\0" L"v\0" L"\0" + L"vi\0" L"\0" L"vii\0" L"\0" L"viii\0" L"\0" L"ix\0" L"\0" L"x\0" L"\0" + L"xi\0" L"\0" L"xii\0" L"\0" L"l\0" L"\0" L"c\0" L"\0" L"d\0" L"\0" L"m\0" + L"\0" L"<-\0" L"\0" L"->\0" L"\0" L"<->\0" L"\0" L"<=\0" L"\0" L"=>\0" L"\0" + L"<=>\0" L"\0" L"-\0" L"\0" L"/\0" L"\0" L"\\\0" L"\0" L"*\0" L"\0" L"|\0" + L"\0" L":\0" L"\0" L"~\0" L"\0" L"<=\0" L"\0" L">=\0" L"\0" L"<<\0" L"\0" + L">>\0" L"\0" L"<<<\0" L"\0" L">>>\0" L"\0" L"NUL\0" L"\0" L"SOH\0" L"\0" + L"STX\0" L"\0" L"ETX\0" L"\0" L"EOT\0" L"\0" L"ENQ\0" L"\0" L"ACK\0" L"\0" + L"BEL\0" L"\0" L"BS\0" L"\0" L"HT\0" L"\0" L"LF\0" L"\0" L"VT\0" L"\0" + L"FF\0" L"\0" L"CR\0" L"\0" L"SO\0" L"\0" L"SI\0" L"\0" L"DLE\0" L"\0" + L"DC1\0" L"\0" L"DC2\0" L"\0" L"DC3\0" L"\0" L"DC4\0" L"\0" L"NAK\0" L"\0" + L"SYN\0" L"\0" L"ETB\0" L"\0" L"CAN\0" L"\0" L"EM\0" L"\0" L"SUB\0" L"\0" + L"ESC\0" L"\0" L"FS\0" L"\0" L"GS\0" L"\0" L"RS\0" L"\0" L"US\0" L"\0" + L"SP\0" L"\0" L"DEL\0" L"\0" L"_\0" L"\0" L"NL\0" L"\0" L"(1)\0" L"\0" + L"(2)\0" L"\0" L"(3)\0" L"\0" L"(4)\0" L"\0" L"(5)\0" L"\0" L"(6)\0" L"\0" + L"(7)\0" L"\0" L"(8)\0" L"\0" L"(9)\0" L"\0" L"(10)\0" L"\0" L"(11)\0" L"\0" + L"(12)\0" L"\0" L"(13)\0" L"\0" L"(14)\0" L"\0" L"(15)\0" L"\0" L"(16)\0" + L"\0" L"(17)\0" L"\0" L"(18)\0" L"\0" L"(19)\0" L"\0" L"(20)\0" L"\0" + L"(1)\0" L"\0" L"(2)\0" L"\0" L"(3)\0" L"\0" L"(4)\0" L"\0" L"(5)\0" L"\0" + L"(6)\0" L"\0" L"(7)\0" L"\0" L"(8)\0" L"\0" L"(9)\0" L"\0" L"(10)\0" L"\0" + L"(11)\0" L"\0" L"(12)\0" L"\0" L"(13)\0" L"\0" L"(14)\0" L"\0" L"(15)\0" + L"\0" L"(16)\0" L"\0" L"(17)\0" L"\0" L"(18)\0" L"\0" L"(19)\0" L"\0" + L"(20)\0" L"\0" L"1.\0" L"\0" L"2.\0" L"\0" L"3.\0" L"\0" L"4.\0" L"\0" + L"5.\0" L"\0" L"6.\0" L"\0" L"7.\0" L"\0" L"8.\0" L"\0" L"9.\0" L"\0" + L"10.\0" L"\0" L"11.\0" L"\0" L"12.\0" L"\0" L"13.\0" L"\0" L"14.\0" L"\0" + L"15.\0" L"\0" L"16.\0" L"\0" L"17.\0" L"\0" L"18.\0" L"\0" L"19.\0" L"\0" + L"20.\0" L"\0" L"(a)\0" L"\0" L"(b)\0" L"\0" L"(c)\0" L"\0" L"(d)\0" L"\0" + L"(e)\0" L"\0" L"(f)\0" L"\0" L"(g)\0" L"\0" L"(h)\0" L"\0" L"(i)\0" L"\0" + L"(j)\0" L"\0" L"(k)\0" L"\0" L"(l)\0" L"\0" L"(m)\0" L"\0" L"(n)\0" L"\0" + L"(o)\0" L"\0" L"(p)\0" L"\0" L"(q)\0" L"\0" L"(r)\0" L"\0" L"(s)\0" L"\0" + L"(t)\0" L"\0" L"(u)\0" L"\0" L"(v)\0" L"\0" L"(w)\0" L"\0" L"(x)\0" L"\0" + L"(y)\0" L"\0" L"(z)\0" L"\0" L"(A)\0" L"\0" L"(B)\0" L"\0" L"(C)\0" L"\0" + L"(D)\0" L"\0" L"(E)\0" L"\0" L"(F)\0" L"\0" L"(G)\0" L"\0" L"(H)\0" L"\0" + L"(I)\0" L"\0" L"(J)\0" L"\0" L"(K)\0" L"\0" L"(L)\0" L"\0" L"(M)\0" L"\0" + L"(N)\0" L"\0" L"(O)\0" L"\0" L"(P)\0" L"\0" L"(Q)\0" L"\0" L"(R)\0" L"\0" + L"(S)\0" L"\0" L"(T)\0" L"\0" L"(U)\0" L"\0" L"(V)\0" L"\0" L"(W)\0" L"\0" + L"(X)\0" L"\0" L"(Y)\0" L"\0" L"(Z)\0" L"\0" L"(a)\0" L"\0" L"(b)\0" L"\0" + L"(c)\0" L"\0" L"(d)\0" L"\0" L"(e)\0" L"\0" L"(f)\0" L"\0" L"(g)\0" L"\0" + L"(h)\0" L"\0" L"(i)\0" L"\0" L"(j)\0" L"\0" L"(k)\0" L"\0" L"(l)\0" L"\0" + L"(m)\0" L"\0" L"(n)\0" L"\0" L"(o)\0" L"\0" L"(p)\0" L"\0" L"(q)\0" L"\0" + L"(r)\0" L"\0" L"(s)\0" L"\0" L"(t)\0" L"\0" L"(u)\0" L"\0" L"(v)\0" L"\0" + L"(w)\0" L"\0" L"(x)\0" L"\0" L"(y)\0" L"\0" L"(z)\0" L"\0" L"(0)\0" L"\0" + L"-\0" L"\0" L"|\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" + L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" L"+\0" L"\0" + L"o\0" L"\0" L" \0" L"\0" L"hPa\0" L"\0" L"da\0" L"\0" L"AU\0" L"\0" + L"bar\0" L"\0" L"oV\0" L"\0" L"pc\0" L"\0" L"pA\0" L"\0" L"nA\0" L"\0" + L"uA\0" L"\0" L"mA\0" L"\0" L"kA\0" L"\0" L"KB\0" L"\0" L"MB\0" L"\0" + L"GB\0" L"\0" L"cal\0" L"\0" L"kcal\0" L"\0" L"pF\0" L"\0" L"nF\0" L"\0" + L"uF\0" L"\0" L"ug\0" L"\0" L"mg\0" L"\0" L"kg\0" L"\0" L"Hz\0" L"\0" + L"kHz\0" L"\0" L"MHz\0" L"\0" L"GHz\0" L"\0" L"THz\0" L"\0" L"ul\0" L"\0" + L"ml\0" L"\0" L"dl\0" L"\0" L"kl\0" L"\0" L"fm\0" L"\0" L"nm\0" L"\0" + L"um\0" L"\0" L"mm\0" L"\0" L"cm\0" L"\0" L"km\0" L"\0" L"mm^2\0" L"\0" + L"cm^2\0" L"\0" L"m^2\0" L"\0" L"km^2\0" L"\0" L"mm^3\0" L"\0" L"cm^3\0" + L"\0" L"m^3\0" L"\0" L"km^3\0" L"\0" L"m/s\0" L"\0" L"m/s^2\0" L"\0" L"Pa\0" + L"\0" L"kPa\0" L"\0" L"MPa\0" L"\0" L"GPa\0" L"\0" L"rad\0" L"\0" L"rad/s\0" + L"\0" L"rad/s^2\0" L"\0" L"ps\0" L"\0" L"ns\0" L"\0" L"us\0" L"\0" L"ms\0" + L"\0" L"pV\0" L"\0" L"nV\0" L"\0" L"uV\0" L"\0" L"mV\0" L"\0" L"kV\0" L"\0" + L"MV\0" L"\0" L"pW\0" L"\0" L"nW\0" L"\0" L"uW\0" L"\0" L"mW\0" L"\0" + L"kW\0" L"\0" L"MW\0" L"\0" L"a.m.\0" L"\0" L"Bq\0" L"\0" L"cc\0" L"\0" + L"cd\0" L"\0" L"C/kg\0" L"\0" L"Co.\0" L"\0" L"dB\0" L"\0" L"Gy\0" L"\0" + L"ha\0" L"\0" L"HP\0" L"\0" L"in\0" L"\0" L"KK\0" L"\0" L"KM\0" L"\0" + L"kt\0" L"\0" L"lm\0" L"\0" L"ln\0" L"\0" L"log\0" L"\0" L"lx\0" L"\0" + L"mb\0" L"\0" L"mil\0" L"\0" L"mol\0" L"\0" L"PH\0" L"\0" L"p.m.\0" L"\0" + L"PPM\0" L"\0" L"PR\0" L"\0" L"sr\0" L"\0" L"Sv\0" L"\0" L"Wb\0" L"\0" + L"ff\0" L"\0" L"fi\0" L"\0" L"fl\0" L"\0" L"ffi\0" L"\0" L"ffl\0" L"\0" + L"st\0" L"\0" L"+\0" L"\0" L"_\0" L"\0" L"_\0" L"\0" L"_\0" L"\0" L",\0" L"\0" L".\0" L"\0" L";\0" L"\0" L":\0" L"\0" L"?\0" L"\0" L"!\0" L"\0" L"(\0" L"\0" L")\0" L"\0" L"{\0" L"\0" L"}\0" L"\0" L"#\0" L"\0" L"&\0" L"\0" L"*\0" L"\0" L"+\0" L"\0" L"-\0" L"\0" L"<\0" L"\0" L">\0" L"\0" diff --git a/src/kernel/libroot/posix/glibc/locale/C-translit.h.in b/src/kernel/libroot/posix/glibc/locale/C-translit.h.in index d440c9b9ab..b833ef9a60 100644 --- a/src/kernel/libroot/posix/glibc/locale/C-translit.h.in +++ b/src/kernel/libroot/posix/glibc/locale/C-translit.h.in @@ -1,5 +1,5 @@ /* Transliteration for the C locale. -*-C-*- - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -94,14 +94,8 @@ "\x2039" "<" /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */ "\x203a" ">" /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */ "\x203c" "!!" /* DOUBLE EXCLAMATION MARK */ -"\x2047" "??" /* DOUBLE QUESTION MARK */ "\x2048" "?!" /* QUESTION EXCLAMATION MARK */ "\x2049" "!?" /* EXCLAMATION QUESTION MARK */ -"\x205f" " " /* MEDIUM MATHEMATICAL SPACE */ -"\x2060" "" /* WORD JOINER */ -"\x2061" "" /* FUNCTION APPLICATION */ -"\x2062" "" /* INVISIBLE TIMES */ -"\x2063" "" /* INVISIBLE SEPARATOR */ "\x20a8" "Rs" /* RUPEE SIGN */ "\x20ac" "EUR" /* EURO SIGN */ "\x2100" "a/c" /* ACCOUNT OF */ @@ -139,11 +133,6 @@ "\x2133" "M" /* SCRIPT CAPITAL M */ "\x2134" "o" /* SCRIPT SMALL O */ "\x2139" "i" /* INFORMATION SOURCE */ -"\x2145" "D" /* DOUBLE-STRUCK ITALIC CAPITAL D */ -"\x2146" "d" /* DOUBLE-STRUCK ITALIC SMALL D */ -"\x2147" "e" /* DOUBLE-STRUCK ITALIC SMALL E */ -"\x2148" "i" /* DOUBLE-STRUCK ITALIC SMALL I */ -"\x2149" "j" /* DOUBLE-STRUCK ITALIC SMALL J */ "\x2153" " 1/3 " /* VULGAR FRACTION ONE THIRD */ "\x2154" " 2/3 " /* VULGAR FRACTION TWO THIRDS */ "\x2155" " 1/5 " /* VULGAR FRACTION ONE FIFTH */ @@ -395,41 +384,7 @@ "\x2534" "+" /* BOX DRAWINGS LIGHT UP AND HORIZONTAL */ "\x253c" "+" /* BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ "\x25e6" "o" /* WHITE BULLET */ -"\x2a74" "::=" /* DOUBLE COLON EQUAL */ -"\x2a75" "==" /* TWO CONSECUTIVE EQUALS SIGNS */ -"\x2a76" "===" /* THREE CONSECUTIVE EQUALS SIGNS */ "\x3000" " " /* IDEOGRAPHIC SPACE */ -"\x30a0" "=" /* KATAKANA-HIRAGANA DOUBLE HYPHEN */ -"\x3251" "(21)" /* CIRCLED NUMBER TWENTY ONE */ -"\x3252" "(22)" /* CIRCLED NUMBER TWENTY TWO */ -"\x3253" "(23)" /* CIRCLED NUMBER TWENTY THREE */ -"\x3254" "(24)" /* CIRCLED NUMBER TWENTY FOUR */ -"\x3255" "(25)" /* CIRCLED NUMBER TWENTY FIVE */ -"\x3256" "(26)" /* CIRCLED NUMBER TWENTY SIX */ -"\x3257" "(27)" /* CIRCLED NUMBER TWENTY SEVEN */ -"\x3258" "(28)" /* CIRCLED NUMBER TWENTY EIGHT */ -"\x3259" "(29)" /* CIRCLED NUMBER TWENTY NINE */ -"\x325a" "(30)" /* CIRCLED NUMBER THIRTY */ -"\x325b" "(31)" /* CIRCLED NUMBER THIRTY ONE */ -"\x325c" "(32)" /* CIRCLED NUMBER THIRTY TWO */ -"\x325d" "(33)" /* CIRCLED NUMBER THIRTY THREE */ -"\x325e" "(34)" /* CIRCLED NUMBER THIRTY FOUR */ -"\x325f" "(35)" /* CIRCLED NUMBER THIRTY FIVE */ -"\x32b1" "(36)" /* CIRCLED NUMBER THIRTY SIX */ -"\x32b2" "(37)" /* CIRCLED NUMBER THIRTY SEVEN */ -"\x32b3" "(38)" /* CIRCLED NUMBER THIRTY EIGHT */ -"\x32b4" "(39)" /* CIRCLED NUMBER THIRTY NINE */ -"\x32b5" "(40)" /* CIRCLED NUMBER FORTY */ -"\x32b6" "(41)" /* CIRCLED NUMBER FORTY ONE */ -"\x32b7" "(42)" /* CIRCLED NUMBER FORTY TWO */ -"\x32b8" "(43)" /* CIRCLED NUMBER FORTY THREE */ -"\x32b9" "(44)" /* CIRCLED NUMBER FORTY FOUR */ -"\x32ba" "(45)" /* CIRCLED NUMBER FORTY FIVE */ -"\x32bb" "(46)" /* CIRCLED NUMBER FORTY SIX */ -"\x32bc" "(47)" /* CIRCLED NUMBER FORTY SEVEN */ -"\x32bd" "(48)" /* CIRCLED NUMBER FORTY EIGHT */ -"\x32be" "(49)" /* CIRCLED NUMBER FORTY NINE */ -"\x32bf" "(50)" /* CIRCLED NUMBER FIFTY */ "\x3371" "hPa" /* SQUARE HPA */ "\x3372" "da" /* SQUARE DA */ "\x3373" "AU" /* SQUARE AU */ @@ -535,22 +490,6 @@ "\xfb04" "ffl" /* LATIN SMALL LIGATURE FFL */ "\xfb06" "st" /* LATIN SMALL LIGATURE ST */ "\xfb29" "+" /* HEBREW LETTER ALTERNATIVE PLUS SIGN */ -"\xfe00" "" /* VARIATION SELECTOR-1 */ -"\xfe01" "" /* VARIATION SELECTOR-2 */ -"\xfe02" "" /* VARIATION SELECTOR-3 */ -"\xfe03" "" /* VARIATION SELECTOR-4 */ -"\xfe04" "" /* VARIATION SELECTOR-5 */ -"\xfe05" "" /* VARIATION SELECTOR-6 */ -"\xfe06" "" /* VARIATION SELECTOR-7 */ -"\xfe07" "" /* VARIATION SELECTOR-8 */ -"\xfe08" "" /* VARIATION SELECTOR-9 */ -"\xfe09" "" /* VARIATION SELECTOR-10 */ -"\xfe0a" "" /* VARIATION SELECTOR-11 */ -"\xfe0b" "" /* VARIATION SELECTOR-12 */ -"\xfe0c" "" /* VARIATION SELECTOR-13 */ -"\xfe0d" "" /* VARIATION SELECTOR-14 */ -"\xfe0e" "" /* VARIATION SELECTOR-15 */ -"\xfe0f" "" /* VARIATION SELECTOR-16 */ "\xfe4d" "_" /* DASHED LOW LINE */ "\xfe4e" "_" /* CENTRELINE LOW LINE */ "\xfe4f" "_" /* WAVY LOW LINE */ diff --git a/src/kernel/libroot/posix/glibc/locale/Jamfile b/src/kernel/libroot/posix/glibc/locale/Jamfile new file mode 100644 index 0000000000..355eebfc69 --- /dev/null +++ b/src/kernel/libroot/posix/glibc/locale/Jamfile @@ -0,0 +1,18 @@ +SubDir OBOS_TOP src kernel libroot posix glibc locale ; + +SubDirHdrs $(OBOS_TOP) src kernel libroot posix glibc include arch $(OBOS_ARCH) ; +SubDirHdrs $(OBOS_TOP) src kernel libroot posix glibc include ; +SubDirHdrs $(OBOS_TOP) src kernel libroot posix glibc locale ; +SubDirHdrs $(OBOS_TOP) src kernel libroot posix glibc ; + +KernelMergeObject posix_gnu_locale.o : + C-ctype.c + C-monetary.c + C_name.c + C-numeric.c + lc-ctype.c + lc-monetary.c + lc-numeric.c + mb_cur_max.c + : -fPIC -DPIC + ; diff --git a/src/kernel/libroot/posix/glibc/locale/Makefile b/src/kernel/libroot/posix/glibc/locale/Makefile index 976926bb8e..03ed1b66fa 100644 --- a/src/kernel/libroot/posix/glibc/locale/Makefile +++ b/src/kernel/libroot/posix/glibc/locale/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991,92,1995-1999,2000,2001,2002 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 1995-1999, 2000, 2001 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ distribute = localeinfo.h categories.def iso-639.def iso-3166.def \ iso-4217.def weight.h weightwc.h strlen-hash.h elem-hash.h \ indigits.h indigitswc.h outdigits.h outdigitswc.h \ coll-lookup.h C-translit.h.in C-translit.h gen-translit.pl \ - locarchive.h hashval.h \ $(addprefix programs/, \ locale.c localedef.c \ $(localedef-modules:=.c) $(locale-modules:=.c) \ @@ -34,20 +33,20 @@ distribute = localeinfo.h categories.def iso-639.def iso-3166.def \ charmap-kw.gperf charmap-kw.h locfile-token.h \ locfile-kw.gperf locfile-kw.h linereader.h \ locfile.h charmap.h repertoire.h localedef.h \ - 3level.h charmap-dir.h locarchive.c) -routines = setlocale findlocale loadlocale loadarchive \ - localeconv nl_langinfo nl_langinfo_l mb_cur_max \ - newlocale duplocale freelocale uselocale + 3level.h charmap-dir.h) +routines = setlocale findlocale loadlocale localeconv nl_langinfo \ + nl_langinfo_l mb_cur_max \ + newlocale duplocale freelocale tests = tst-C-locale categories = ctype messages monetary numeric time paper name \ address telephone measurement identification collate aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \ - xlocale localename global-locale + xlocale others = localedef locale #others-static = localedef locale install-bin = localedef locale -extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \ - $(locale-modules:=.o) $(lib-modules:=.o) +extra-objs = $(localedef-modules:=.o) $(locale-modules:=.o) \ + $(lib-modules:=.o) extra-libs = libBrokenLocale extra-libs-others = $(extra-libs) @@ -55,13 +54,12 @@ extra-libs-others = $(extra-libs) libBrokenLocale-routines = broken_cur_max subdir-dirs = programs -vpath %.c programs ../crypt +vpath %.c programs vpath %.h programs vpath %.gperf programs localedef-modules := $(categories:%=ld-%) charmap linereader locfile \ - repertoire locarchive -localedef-aux := md5 + repertoire locale-modules := locale-spec lib-modules := charmap-dir simple-hash xmalloc xstrdup @@ -76,7 +74,6 @@ programs/%-kw.h: programs/%-kw.gperf mv -f $@.new $@ $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o) -$(objpfx)localedef: $(localedef-aux:%=$(objpfx)%.o) $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o) $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o) @@ -101,12 +98,6 @@ CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-charmap-dir.c = -Wno-write-strings -# This makes sure -DNOT_IN_libc is passed for all these modules. -cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ - $(locale-modules) $(lib-modules)) -lib := nonlib -include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) - # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. diff --git a/src/kernel/libroot/posix/glibc/locale/SYS_libc.c b/src/kernel/libroot/posix/glibc/locale/SYS_libc.c index 4f9e946cf3..53c9a6034e 100644 --- a/src/kernel/libroot/posix/glibc/locale/SYS_libc.c +++ b/src/kernel/libroot/posix/glibc/locale/SYS_libc.c @@ -2,4 +2,3 @@ so the string constant is not repeated in dozens of object files. */ const char _libc_intl_domainname[] = "libc"; -INTDEF(_libc_intl_domainname) diff --git a/src/kernel/libroot/posix/glibc/locale/Versions b/src/kernel/libroot/posix/glibc/locale/Versions index 72119349c1..9c3bda4ffd 100644 --- a/src/kernel/libroot/posix/glibc/locale/Versions +++ b/src/kernel/libroot/posix/glibc/locale/Versions @@ -7,7 +7,9 @@ libBrokenLocale { libc { GLIBC_2.0 { # global variables - _libc_intl_domainname; + __collate_element_hash; __collate_element_strings; + __collate_symbol_classes; __collate_symbol_hash; __collate_symbol_strings; + _libc_intl_domainname; _nl_current_LC_COLLATE; _nl_current_LC_CTYPE; # functions used in inline functions or macros __ctype_get_mb_cur_max; @@ -46,29 +48,4 @@ libc { # missing function from the experimental locale implementation __nl_langinfo_l; } - GLIBC_2.3 { - # the new "experimental" interface is now public - newlocale; duplocale; freelocale; uselocale; - - # this name is used by libstdc++ as well as libpthread - __uselocale; - - isalnum_l; isalpha_l; isascii_l; isblank_l; iscntrl_l; - isdigit_l; isgraph_l; islower_l; isprint_l; ispunct_l; - isspace_l; isupper_l; iswalnum_l; iswalpha_l; iswblank_l; - iswcntrl_l; iswctype_l; iswdigit_l; iswgraph_l; iswlower_l; - iswprint_l; iswpunct_l; iswspace_l; iswupper_l; iswxdigit_l; - isxdigit_l; strcasecmp_l; strcoll_l; strfmon_l; strncasecmp_l; - strtod_l; strtof_l; strtol_l; strtold_l; strtoul_l; - strxfrm_l; toascii_l; tolower_l; toupper_l; - towctrans_l; towlower_l; towupper_l; wcscasecmp_l; wcscoll_l; - wcsncasecmp_l; wcstod_l; wcstof_l; wcstol_l; wcstold_l; - wcstoll_l; wcstoul_l; wcstoull_l; wcsxfrm_l; wctype_l; - wctrans_l; nl_langinfo_l; - } - GLIBC_PRIVATE { - # global variables - __collate_element_hash; __collate_element_strings; - __collate_symbol_classes; __collate_symbol_hash; __collate_symbol_strings; - } } diff --git a/src/kernel/libroot/posix/glibc/locale/broken_cur_max.c b/src/kernel/libroot/posix/glibc/locale/broken_cur_max.c index bfdec32f4f..c997bec163 100644 --- a/src/kernel/libroot/posix/glibc/locale/broken_cur_max.c +++ b/src/kernel/libroot/posix/glibc/locale/broken_cur_max.c @@ -44,8 +44,7 @@ size_t __ctype_get_mb_cur_max (void) { - union locale_data_value u; + size_t correct_value = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX); - u.string = nl_langinfo (_NL_CTYPE_MB_CUR_MAX); - return ((size_t []) { 1, 1, 1, 2, 2, 3, 4 })[u.word]; + return ((size_t []) { 1, 1, 1, 2, 2, 3, 4 })[correct_value]; } diff --git a/src/kernel/libroot/posix/glibc/locale/categories.def b/src/kernel/libroot/posix/glibc/locale/categories.def index dc01a977ce..257fac73ae 100644 --- a/src/kernel/libroot/posix/glibc/locale/categories.def +++ b/src/kernel/libroot/posix/glibc/locale/categories.def @@ -1,5 +1,5 @@ /* Definition of all available locale categories and their items. -*- C -*- - Copyright (C) 1995-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -247,7 +247,7 @@ DEFINE_CATEGORY DEFINE_ELEMENT (_DATE_FMT, "date_fmt", opt, string) DEFINE_ELEMENT (_NL_W_DATE_FMT, "wide-date_fmt", opt, wstring) DEFINE_ELEMENT (_NL_TIME_CODESET, "time-codeset", std, string) - ), NO_POSTLOAD) + ), _nl_postload_time) DEFINE_CATEGORY @@ -335,7 +335,7 @@ DEFINE_CATEGORY DEFINE_ELEMENT (_NL_IDENTIFICATION_LANGUAGE, "language", std, string) DEFINE_ELEMENT (_NL_IDENTIFICATION_TERRITORY, "territory", std, string) DEFINE_ELEMENT (_NL_IDENTIFICATION_AUDIENCE, "audience", std, string) - DEFINE_ELEMENT (_NL_IDENTIFICATION_APPLICATION, "application", std, string) + DEFINE_ELEMENT (_NL_IDENTIFICATION_APPLICATION, "applcation", std, string) DEFINE_ELEMENT (_NL_IDENTIFICATION_ABBREVIATION, "abbreviation", std, string) DEFINE_ELEMENT (_NL_IDENTIFICATION_REVISION, "revision", std, string) DEFINE_ELEMENT (_NL_IDENTIFICATION_DATE, "date", std, string) diff --git a/src/kernel/libroot/posix/glibc/locale/duplocale.c b/src/kernel/libroot/posix/glibc/locale/duplocale.c index 77dfc01046..2fe23fc6ad 100644 --- a/src/kernel/libroot/posix/glibc/locale/duplocale.c +++ b/src/kernel/libroot/posix/glibc/locale/duplocale.c @@ -1,5 +1,5 @@ /* Duplicate handle for selection of locales. - Copyright (C) 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -21,66 +21,43 @@ #include #include #include -#include #include /* Lock for protecting global data. */ -__libc_lock_define (extern , __libc_setlocale_lock attribute_hidden) +__libc_lock_define (extern , __libc_setlocale_lock) __locale_t __duplocale (__locale_t dataset) { - /* This static object is returned for newlocale (LC_ALL_MASK, "C"). */ - if (dataset == &_nl_C_locobj) - return dataset; - __locale_t result; - int cnt; - size_t names_len = 0; - /* Calculate the total space we need to store all the names. */ - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL && dataset->__names[cnt] != _nl_C_name) - names_len += strlen (dataset->__names[cnt]) + 1; + /* We modify global data. */ + __libc_lock_lock (__libc_setlocale_lock); /* Get memory. */ - result = malloc (sizeof (struct __locale_struct) + names_len); - + result = (__locale_t) malloc (sizeof (struct __locale_struct)); if (result != NULL) { - char *namep = (char *) (result + 1); - - /* We modify global data (the usage counts). */ - __libc_lock_lock (__libc_setlocale_lock); - + int cnt; for (cnt = 0; cnt < __LC_LAST; ++cnt) if (cnt != LC_ALL) { result->__locales[cnt] = dataset->__locales[cnt]; if (result->__locales[cnt]->usage_count < MAX_USAGE_COUNT) ++result->__locales[cnt]->usage_count; - - if (dataset->__names[cnt] == _nl_C_name) - result->__names[cnt] = _nl_C_name; - else - { - result->__names[cnt] = namep; - namep = __stpcpy (namep, dataset->__names[cnt]) + 1; - } } - - /* Update the special members. */ - result->__ctype_b = dataset->__ctype_b; - result->__ctype_tolower = dataset->__ctype_tolower; - result->__ctype_toupper = dataset->__ctype_toupper; - - /* It's done. */ - __libc_lock_unlock (__libc_setlocale_lock); } + /* Update the special members. */ + result->__ctype_b = dataset->__ctype_b; + result->__ctype_tolower = dataset->__ctype_tolower; + result->__ctype_toupper = dataset->__ctype_toupper; + + /* It's done. */ + __libc_lock_unlock (__libc_setlocale_lock); + return result; } -weak_alias (__duplocale, duplocale) diff --git a/src/kernel/libroot/posix/glibc/locale/findlocale.c b/src/kernel/libroot/posix/glibc/locale/findlocale.c index 9c9b85347f..59b99925bf 100644 --- a/src/kernel/libroot/posix/glibc/locale/findlocale.c +++ b/src/kernel/libroot/posix/glibc/locale/findlocale.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -30,36 +30,16 @@ #include "../iconv/gconv_charset.h" -#ifdef NL_CURRENT_INDIRECT -# define DEFINE_CATEGORY(category, category_name, items, a) \ -extern struct locale_data _nl_C_##category; \ -weak_extern (_nl_C_##category) -# include "categories.def" -# undef DEFINE_CATEGORY - -/* Array indexed by category of pointers to _nl_C_CATEGORY slots. - Elements are zero for categories whose data is never used. */ -struct locale_data *const _nl_C[] attribute_hidden = - { -# define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = &_nl_C_##category, -# include "categories.def" -# undef DEFINE_CATEGORY - }; -#else -# define _nl_C (_nl_C_locobj.__locales) -#endif +/* Constant data defined in setlocale.c. */ +extern struct locale_data *const _nl_C[]; /* For each category we keep a list of records for the locale files which are somehow addressed. */ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; -const char _nl_default_locale_path[] attribute_hidden = LOCALEDIR; - struct locale_data * -internal_function _nl_find_locale (const char *locale_path, size_t locale_path_len, int category, const char **name) { @@ -71,6 +51,9 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, const char *territory; const char *codeset; const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; struct loaded_l10nfile *locale_file; if ((*name)[0] == '\0') @@ -98,19 +81,6 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, return _nl_C[category]; } - /* We really have to load some data. First we try the archive, - but only if there was no LOCPATH environment variable specified. */ - if (__builtin_expect (locale_path == NULL, 1)) - { - struct locale_data *data = _nl_load_locale_from_archive (category, name); - if (__builtin_expect (data != NULL, 1)) - return data; - - /* Nothing in the archive. Set the default path to search below. */ - locale_path = _nl_default_locale_path; - locale_path_len = sizeof _nl_default_locale_path; - } - /* We really have to load some data. First see whether the name is an alias. Please note that this makes it impossible to have "C" or "POSIX" as aliases. */ @@ -126,24 +96,33 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, language[_territory[.codeset]][@modifier] + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + Beside the first all of them are allowed to be missing. If the full specified locale is not found, the less specific one are - looked for. The various part will be stripped off according to + looked for. The various part will be stripped of according to the following order: - (1) codeset - (2) normalized codeset - (3) territory - (4) modifier + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier */ mask = _nl_explode_name (loc_name, &language, &modifier, &territory, - &codeset, &normalized_codeset); + &codeset, &normalized_codeset, &special, + &sponsor, &revision); /* If exactly this locale was already asked for we have an entry with the complete name. */ locale_file = _nl_make_l10nflist (&_nl_locale_file_list[category], locale_path, locale_path_len, mask, language, territory, codeset, - normalized_codeset, modifier, + normalized_codeset, modifier, special, + sponsor, revision, _nl_category_names[category], 0); if (locale_file == NULL) @@ -153,7 +132,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, locale_file = _nl_make_l10nflist (&_nl_locale_file_list[category], locale_path, locale_path_len, mask, language, territory, codeset, - normalized_codeset, modifier, + normalized_codeset, modifier, special, + sponsor, revision, _nl_category_names[category], 1); if (locale_file == NULL) /* This means we are out of core. */ @@ -250,7 +230,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, } /* Determine whether the user wants transliteration or not. */ - if (modifier != NULL && __strcasecmp (modifier, "TRANSLIT") == 0) + if ((modifier != NULL && __strcasecmp (modifier, "TRANSLIT") == 0) + || (special != NULL && __strcasecmp (special, "TRANSLIT") == 0)) ((struct locale_data *) locale_file->data)->use_translit = 1; /* Increment the usage count. */ @@ -265,28 +246,44 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, /* Calling this function assumes the lock for handling global locale data is acquired. */ void -internal_function _nl_remove_locale (int locale, struct locale_data *data) { if (--data->usage_count == 0) { - if (data->alloc != ld_archive) + /* First search the entry in the list of loaded files. */ + struct loaded_l10nfile *ptr = _nl_locale_file_list[locale]; + + /* Search for the entry. It must be in the list. Otherwise it + is a bug and we crash badly. */ + while ((struct locale_data *) ptr->data != data) + ptr = ptr->next; + + /* Mark the data as not available anymore. So when the data has + to be used again it is reloaded. */ + ptr->decided = 0; + ptr->data = NULL; + + /* Free the name. */ + free ((char *) data->name); + +#ifdef _POSIX_MAPPED_FILES + /* Really delete the data. First delete the real data. */ + if (__builtin_expect (data->mmaped, 1)) { - /* First search the entry in the list of loaded files. */ - struct loaded_l10nfile *ptr = _nl_locale_file_list[locale]; - - /* Search for the entry. It must be in the list. Otherwise it - is a bug and we crash badly. */ - while ((struct locale_data *) ptr->data != data) - ptr = ptr->next; - - /* Mark the data as not available anymore. So when the data has - to be used again it is reloaded. */ - ptr->decided = 0; - ptr->data = NULL; + /* Try to unmap the area. If this fails we mark the area as + permanent. */ + if (__munmap ((caddr_t) data->filedata, data->filesize) != 0) + { + data->usage_count = UNDELETABLE; + return; + } } + else +#endif /* _POSIX_MAPPED_FILES */ + /* The memory was malloced. */ + free ((void *) data->filedata); - /* This does the real work. */ - _nl_unload_locale (data); + /* Now free the structure itself. */ + free (data); } } diff --git a/src/kernel/libroot/posix/glibc/locale/freelocale.c b/src/kernel/libroot/posix/glibc/locale/freelocale.c index ec169bcb66..83d07b962c 100644 --- a/src/kernel/libroot/posix/glibc/locale/freelocale.c +++ b/src/kernel/libroot/posix/glibc/locale/freelocale.c @@ -1,5 +1,5 @@ /* Free data allocated by a call to setlocale_r - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -26,7 +26,7 @@ /* Lock for protecting global data. */ -__libc_lock_define (extern , __libc_setlocale_lock attribute_hidden) +__libc_lock_define (extern , __libc_setlocale_lock) void @@ -34,11 +34,7 @@ __freelocale (__locale_t dataset) { int cnt; - /* This static object is returned for newlocale (LC_ALL_MASK, "C"). */ - if (dataset == &_nl_C_locobj) - return; - - /* We modify global data (the usage counts). */ + /* We modify global data. */ __libc_lock_lock (__libc_setlocale_lock); for (cnt = 0; cnt < __LC_LAST; ++cnt) @@ -46,10 +42,9 @@ __freelocale (__locale_t dataset) /* We can remove the data. */ _nl_remove_locale (cnt, dataset->__locales[cnt]); - /* It's done. */ - __libc_lock_unlock (__libc_setlocale_lock); - /* Free the locale_t handle itself. */ free (dataset); + + /* It's done. */ + __libc_lock_unlock (__libc_setlocale_lock); } -weak_alias (__freelocale, freelocale) diff --git a/src/kernel/libroot/posix/glibc/locale/iso-4217.def b/src/kernel/libroot/posix/glibc/locale/iso-4217.def index f8634d004f..2524054196 100644 --- a/src/kernel/libroot/posix/glibc/locale/iso-4217.def +++ b/src/kernel/libroot/posix/glibc/locale/iso-4217.def @@ -6,33 +6,40 @@ * * !!! The list has to be sorted !!! */ +DEFINE_INT_CURR("ADP ") /* Andorran Peseta */ DEFINE_INT_CURR("AED ") /* United Arab Emirates Dirham */ DEFINE_INT_CURR("AFA ") /* Afghanistan Afgani */ DEFINE_INT_CURR("ALL ") /* Albanian Lek */ DEFINE_INT_CURR("AMD ") /* Armenia Dram */ DEFINE_INT_CURR("ANG ") /* Netherlands Antilles */ -DEFINE_INT_CURR("AOA ") /* Angolan Kwanza */ +DEFINE_INT_CURR("AON ") /* Angolan New Kwanza */ DEFINE_INT_CURR("ARS ") /* Argentine Peso */ +DEFINE_INT_CURR("ATS ") /* Austrian Schilling */ DEFINE_INT_CURR("AUD ") /* Australian Dollar */ DEFINE_INT_CURR("AWG ") /* Aruba Guilder */ DEFINE_INT_CURR("AZM ") /* Azerbaijan Manat */ DEFINE_INT_CURR("BAK ") /* Bosnian and Herzegovina Convertible Mark */ DEFINE_INT_CURR("BBD ") /* Barbados Dollar */ DEFINE_INT_CURR("BDT ") /* Bangladesh Taka */ +DEFINE_INT_CURR("BEF ") /* Belgian Franc */ DEFINE_INT_CURR("BGL ") /* Bulgarian Lev */ DEFINE_INT_CURR("BHD ") /* Bahraini Dinar */ DEFINE_INT_CURR("BIF ") /* Burundi Franc */ DEFINE_INT_CURR("BMD ") /* Burmudian Dollar */ DEFINE_INT_CURR("BND ") /* Brunei Dollar */ DEFINE_INT_CURR("BOB ") /* Bolivian Boliviano */ +DEFINE_INT_CURR("BPS ") /* Canton and Enderbury Islands */ /* ?? */ +DEFINE_INT_CURR("BRE ") /* Brazil Real */ /* obsolete */ DEFINE_INT_CURR("BRL ") /* Brazil Cruzeiro */ DEFINE_INT_CURR("BSD ") /* Bahamas Dollar */ DEFINE_INT_CURR("BTN ") /* Bhutan Ngultrum */ +DEFINE_INT_CURR("BUK ") /* Burma */ /* obsolete */ DEFINE_INT_CURR("BWP ") /* Botswana Pula */ -DEFINE_INT_CURR("BYR ") /* Belarus Ruble */ +DEFINE_INT_CURR("BYB ") /* Belarus Ruble */ DEFINE_INT_CURR("BZD ") /* Belize Dollar */ DEFINE_INT_CURR("CAD ") /* Canadian Dollar */ DEFINE_INT_CURR("CDF ") /* Congo Dem.Rep. Franc */ +DEFINE_INT_CURR("CFP ") /* French Pacific Island Franc */ /* ??*/ DEFINE_INT_CURR("CHF ") /* Swiss Franc (Liechtenstein) */ DEFINE_INT_CURR("CLP ") /* Chilean Peso */ DEFINE_INT_CURR("CNY ") /* China Yuan Renminbi */ @@ -42,24 +49,33 @@ DEFINE_INT_CURR("CUP ") /* Cuban Peso */ DEFINE_INT_CURR("CVE ") /* Cape Verde Escudo */ DEFINE_INT_CURR("CYP ") /* Cypriot Pound */ DEFINE_INT_CURR("CZK ") /* Czech Koruna */ +DEFINE_INT_CURR("DEM ") /* German Mark */ DEFINE_INT_CURR("DJF ") /* Djibouti Franc */ DEFINE_INT_CURR("DKK ") /* Danish Krone (Faroe Islands, Greenland) */ DEFINE_INT_CURR("DOP ") /* Dominican Republic */ DEFINE_INT_CURR("DZD ") /* Algerian Dinar */ +DEFINE_INT_CURR("ECS ") /* Ecuadoran Sucre */ DEFINE_INT_CURR("EEK ") /* Estonian Kroon */ DEFINE_INT_CURR("EGP ") /* Egyptian Pound */ DEFINE_INT_CURR("ERN ") /* Eritrean Nakfa */ +DEFINE_INT_CURR("ESP ") /* Spanish Peseta */ DEFINE_INT_CURR("ETB ") /* Ethiopian Birr */ DEFINE_INT_CURR("EUR ") /* European Union Euro */ +DEFINE_INT_CURR("FIM ") /* Finnish Markka */ DEFINE_INT_CURR("FJD ") /* Fiji Dollar */ DEFINE_INT_CURR("FKP ") /* Falkland Islands Pound (Malvinas) */ +DEFINE_INT_CURR("FRF ") /* French Franc */ DEFINE_INT_CURR("GBP ") /* British Pound */ DEFINE_INT_CURR("GEL ") /* Georgia Lari */ DEFINE_INT_CURR("GHC ") /* Ghana Cedi */ DEFINE_INT_CURR("GIP ") /* Gibraltar Pound */ DEFINE_INT_CURR("GMD ") /* Gambian Dalasi */ DEFINE_INT_CURR("GNF ") /* Guinea Franc */ +DEFINE_INT_CURR("GNS ") /* Guinea Syli */ +DEFINE_INT_CURR("GQE ") /* Equatorial Guinea Ekwele */ +DEFINE_INT_CURR("GRD ") /* Greek Drachma */ DEFINE_INT_CURR("GTQ ") /* Guatemala Quetzal */ +DEFINE_INT_CURR("GWP ") /* Guinea-Bissau Peso */ DEFINE_INT_CURR("GYD ") /* Guyana Dollar */ DEFINE_INT_CURR("HKD ") /* Hong Kong Dollar */ DEFINE_INT_CURR("HNL ") /* Honduras Lempira */ @@ -67,12 +83,13 @@ DEFINE_INT_CURR("HRK ") /* Croatia Kuna */ DEFINE_INT_CURR("HTG ") /* Haiti Gourde */ DEFINE_INT_CURR("HUF ") /* Hungarian Forint */ DEFINE_INT_CURR("IDR ") /* Indonesia Rupiah */ +DEFINE_INT_CURR("IEP ") /* Irish Pound */ DEFINE_INT_CURR("ILS ") /* Israeli Shekel */ -DEFINE_INT_CURR("IMP ") /* Isle of Man Pounds */ DEFINE_INT_CURR("INR ") /* Indian Rupee (Bhutan) */ DEFINE_INT_CURR("IQD ") /* Iraqi Dinar */ DEFINE_INT_CURR("IRR ") /* Iranian Rial */ DEFINE_INT_CURR("ISK ") /* Iceland Krona */ +DEFINE_INT_CURR("ITL ") /* Italian Lira (San Marino, Vatican City) */ DEFINE_INT_CURR("JMD ") /* Jamaican Dollar */ DEFINE_INT_CURR("JOD ") /* Jordanian Dinar */ DEFINE_INT_CURR("JPY ") /* Japanese Yen */ @@ -91,12 +108,14 @@ DEFINE_INT_CURR("LKR ") /* Sri Lankan Rupee */ DEFINE_INT_CURR("LRD ") /* Liberian Dollar */ DEFINE_INT_CURR("LSL ") /* Lesotho Maloti */ DEFINE_INT_CURR("LTL ") /* Lithuanian Litas */ +DEFINE_INT_CURR("LUF ") /* Luxembourg Franc */ DEFINE_INT_CURR("LVL ") /* Latvia Lat */ DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya Dinar */ DEFINE_INT_CURR("MAD ") /* Moroccan Dirham */ DEFINE_INT_CURR("MDL ") /* Moldova Lei */ DEFINE_INT_CURR("MGF ") /* Madagasy Franc */ DEFINE_INT_CURR("MKD ") /* Macedonia Denar */ +DEFINE_INT_CURR("MLF ") /* Mali Franc */ DEFINE_INT_CURR("MMK ") /* Myanmar Kyat */ DEFINE_INT_CURR("MNT ") /* Mongolia Tugrik */ DEFINE_INT_CURR("MOP ") /* Macau Pataca */ @@ -111,6 +130,7 @@ DEFINE_INT_CURR("MZM ") /* Mozambique Metical */ DEFINE_INT_CURR("NAD ") /* Namibia Dollar */ DEFINE_INT_CURR("NGN ") /* Nigeria Naira */ DEFINE_INT_CURR("NIO ") /* Nicaragua Cordoba Oro */ +DEFINE_INT_CURR("NLG ") /* Netherlands Guilder */ DEFINE_INT_CURR("NOK ") /* Norwegian Krone */ DEFINE_INT_CURR("NPR ") /* Nepalese Rupee */ DEFINE_INT_CURR("NZD ") /* New Zealand Dollar */ @@ -120,7 +140,8 @@ DEFINE_INT_CURR("PEN ") /* Peruvian New Sol */ DEFINE_INT_CURR("PGK ") /* Papau New Guinea Kina */ DEFINE_INT_CURR("PHP ") /* Philippines Peso */ DEFINE_INT_CURR("PKR ") /* Pakistan Rupee */ -DEFINE_INT_CURR("PLN ") /* Polish Zloty */ +DEFINE_INT_CURR("PLZ ") /* Polish Zloty */ +DEFINE_INT_CURR("PTE ") /* Portugese Escudo */ DEFINE_INT_CURR("PYG ") /* Paraguay Guarani */ DEFINE_INT_CURR("QAR ") /* Qatar Rial */ DEFINE_INT_CURR("ROL ") /* Romanian Leu */ @@ -129,7 +150,7 @@ DEFINE_INT_CURR("RWF ") /* Rwanda Franc */ DEFINE_INT_CURR("SAR ") /* Saudi Arabia Riyal */ DEFINE_INT_CURR("SBD ") /* Solomon Islands Dollar */ DEFINE_INT_CURR("SCR ") /* Seychelles Rupee */ -DEFINE_INT_CURR("SDD ") /* Sudanese Dinars */ +DEFINE_INT_CURR("SDP ") /* Sudanese Pound */ DEFINE_INT_CURR("SEK ") /* Swedish Krona */ DEFINE_INT_CURR("SGD ") /* Singapore Dollar */ DEFINE_INT_CURR("SHP ") /* St. Helena Pound */ @@ -137,9 +158,9 @@ DEFINE_INT_CURR("SIT ") /* Slovenian Tolar */ DEFINE_INT_CURR("SKK ") /* Slovakian Koruna */ DEFINE_INT_CURR("SLL ") /* Sierra Leone Leone */ DEFINE_INT_CURR("SOS ") /* Somalia Schilling */ -DEFINE_INT_CURR("SPL ") /* Seborga Luigini */ DEFINE_INT_CURR("SRG ") /* Suriname Guilder */ DEFINE_INT_CURR("STD ") /* Sao Tome and Principe Dobra */ +DEFINE_INT_CURR("SUR ") /* Soviet Union Rubel (Ukrainian, Byelorussion) */ /* ??*/ DEFINE_INT_CURR("SVC ") /* El Salvador Colon */ DEFINE_INT_CURR("SYP ") /* Syrian Arab Republic Pound */ DEFINE_INT_CURR("SZL ") /* Swaziland Lilangeni */ @@ -148,14 +169,17 @@ DEFINE_INT_CURR("TJR ") /* Tajikistani Ruble */ DEFINE_INT_CURR("TMM ") /* Turkmenistan Manet */ DEFINE_INT_CURR("TND ") /* Tunisian Dinar */ DEFINE_INT_CURR("TOP ") /* Tonga Pa'Anga */ +DEFINE_INT_CURR("TPE ") /* East Timor Escudo */ /* ??? */ DEFINE_INT_CURR("TRL ") /* Turkish Lira */ DEFINE_INT_CURR("TTD ") /* Trinidad and Tobago */ -DEFINE_INT_CURR("TVD ") /* Tuvalu Dollars */ DEFINE_INT_CURR("TWD ") /* Taiwan, Province of China Dollar */ DEFINE_INT_CURR("TZS ") /* United Republic of Tanzania Shilling */ DEFINE_INT_CURR("UAH ") /* Ukraine Hryvna */ +DEFINE_INT_CURR("UGS ") /* Ugandan Shilling */ /* obsolete */ DEFINE_INT_CURR("UGX ") /* Ugandan Shilling */ DEFINE_INT_CURR("USD ") /* United States Dollar */ +DEFINE_INT_CURR("UYN ") /* Uruguay New Peso */ /* obsolete */ +DEFINE_INT_CURR("UYP ") /* Uruguay Peso */ /* obsolete */ DEFINE_INT_CURR("UYU ") /* Uruguay Peso Uruguayo */ DEFINE_INT_CURR("UZS ") /* Uzbekistan Sum */ DEFINE_INT_CURR("VEB ") /* Venezuelan Bolivar */ @@ -165,10 +189,13 @@ DEFINE_INT_CURR("WST ") /* Samoa Tala */ DEFINE_INT_CURR("XAF ") /* Central African Franc (United Republic of Cameroon, Central African Republic, Chad, Congo, Gabon) */ DEFINE_INT_CURR("XCD ") /* East Caribbean Dollar (Antiqua, Dominica, Grenada, Montserrat, St. Kitts-Nevis-Anguilla, Saint Lucia, Saint Vincent and the Grenadines) */ DEFINE_INT_CURR("XDR ") /* International Monetary Fund */ +DEFINE_INT_CURR("XDS ") /* St. Christopher Dollar */ /* ?? */ DEFINE_INT_CURR("XOF ") /* West African Franc (Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta) */ DEFINE_INT_CURR("XPF ") /* French polynesia, New Caledonia, Wallis and Futuna Islands */ +DEFINE_INT_CURR("YDD ") /* Yemini Dinar (Democratic Yemen) */ /* obsolete */ DEFINE_INT_CURR("YER ") /* Yemeni Rial */ -DEFINE_INT_CURR("YUM ") /* Yugoslavian New Dinar */ +DEFINE_INT_CURR("YUN ") /* Yugoslavian New Dinar */ DEFINE_INT_CURR("ZAR ") /* South Africa Rand (Lesotho, Namibia) */ DEFINE_INT_CURR("ZMK ") /* Zambian Kwacha */ +DEFINE_INT_CURR("ZRN ") /* Zaire New Zaire */ /* obsolete */ DEFINE_INT_CURR("ZWD ") /* Zimbabwe Dollar */ diff --git a/src/kernel/libroot/posix/glibc/locale/iso-639.def b/src/kernel/libroot/posix/glibc/locale/iso-639.def index c9a3e0e9f7..7ae5d51898 100644 --- a/src/kernel/libroot/posix/glibc/locale/iso-639.def +++ b/src/kernel/libroot/posix/glibc/locale/iso-639.def @@ -52,7 +52,6 @@ DEFINE_LANGUAGE_CODE ("German", de, deu, ger) DEFINE_LANGUAGE_CODE ("Gaelic (Scots)", gd, gla, gla) DEFINE_LANGUAGE_CODE ("Irish", ga, gle, gle) DEFINE_LANGUAGE_CODE ("Gallegan", gl, glg, glg) -DEFINE_LANGUAGE_CODE3 ("Ganda", lug, lug) DEFINE_LANGUAGE_CODE ("Manx", gv, glv, glv) DEFINE_LANGUAGE_CODE ("Greek, Modern ()", el, gre, ell) DEFINE_LANGUAGE_CODE ("Guarani", gn, grn, grn) @@ -136,7 +135,6 @@ DEFINE_LANGUAGE_CODE ("Samoan", sm, smo, smo) DEFINE_LANGUAGE_CODE ("Shona", sn, sna, sna) DEFINE_LANGUAGE_CODE ("Sindhi", sd, snd, snd) DEFINE_LANGUAGE_CODE ("Somali", so, som, som) -DEFINE_LANGUAGE_CODE3 ("Sotho, Northern", nso, nso) DEFINE_LANGUAGE_CODE ("Sotho, Southern", st, sot, sot) DEFINE_LANGUAGE_CODE ("Spanish", es, spa, spa) DEFINE_LANGUAGE_CODE ("Sardinian", sc, srd, srd) @@ -163,10 +161,8 @@ DEFINE_LANGUAGE_CODE ("Uighur", ug, uig, uig) DEFINE_LANGUAGE_CODE ("Ukrainian", uk, ukr, ukr) DEFINE_LANGUAGE_CODE ("Urdu", ur, urd, urd) DEFINE_LANGUAGE_CODE ("Uzbek", uz, uzb, uzb) -DEFINE_LANGUAGE_CODE3 ("Venda", ven, ven) DEFINE_LANGUAGE_CODE ("Vietnamese", vi, vie, vie) DEFINE_LANGUAGE_CODE ("Volapük", vo, vol, vol) -DEFINE_LANGUAGE_CODE ("Walloon", wa, wln, wln) DEFINE_LANGUAGE_CODE ("Welsh", cy, cym, wel) DEFINE_LANGUAGE_CODE ("Wolof", wo, wol, wol) DEFINE_LANGUAGE_CODE ("Xhosa", xh, xho, xho) diff --git a/src/kernel/libroot/posix/glibc/locale/langinfo.h b/src/kernel/libroot/posix/glibc/locale/langinfo.h index 1565ba05e8..859b007c12 100644 --- a/src/kernel/libroot/posix/glibc/locale/langinfo.h +++ b/src/kernel/libroot/posix/glibc/locale/langinfo.h @@ -1,5 +1,5 @@ /* Access to locale-dependent parameters. - Copyright (C) 1995-99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,11 +23,11 @@ /* Get the type definition. */ #include -#include #include /* Define the __LC_* category names. */ + __BEGIN_DECLS -struct TTTE; + /* Construct an `nl_item' value for `nl_langinfo' from a locale category (LC_*) and an item index within the category. Some code may depend on the item values within a category increasing monotonically with the @@ -38,7 +38,6 @@ struct TTTE; #define _NL_ITEM_CATEGORY(item) ((int) (item) >> 16) #define _NL_ITEM_INDEX(item) ((int) (item) & 0xffff) -struct TTTE; /* Enumeration of locale items that can be queried with `nl_langinfo'. */ enum @@ -584,7 +583,7 @@ extern char *nl_langinfo (nl_item __item) __THROW; # include /* Just like nl_langinfo but get the information from the locale object L. */ -extern char *nl_langinfo_l (nl_item __item, __locale_t l); +extern char *__nl_langinfo_l (nl_item __item, __locale_t l); #endif __END_DECLS diff --git a/src/kernel/libroot/posix/glibc/locale/lc-ctype.c b/src/kernel/libroot/posix/glibc/locale/lc-ctype.c index eb108416d2..3f9e108b61 100644 --- a/src/kernel/libroot/posix/glibc/locale/lc-ctype.c +++ b/src/kernel/libroot/posix/glibc/locale/lc-ctype.c @@ -1,5 +1,5 @@ /* Define current locale data for LC_CTYPE category. - Copyright (C) 1995-1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,62 +25,29 @@ _NL_CURRENT_DEFINE (LC_CTYPE); /* We are called after loading LC_CTYPE data to load it into - the variables used by the ctype.h macros. */ - + the variables used by the ctype.h macros. + There are three arrays of short ints which need to be indexable + from -128 to 255 inclusive. Stored in the locale data file are + a copy of each for each byte order. */ void _nl_postload_ctype (void) { +#define paste(a,b) paste1(a,b) +#define paste1(a,b) a##b + #define current(type,x,offset) \ - ((const type *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_##x) + offset) - -/* These are defined in ctype-info.c. - The declarations here must match those in localeinfo.h. - - These point into arrays of 384, so they can be indexed by any `unsigned - char' value [0,255]; by EOF (-1); or by any `signed char' value - [-128,-1). ISO C requires that the ctype functions work for `unsigned - char' values and for EOF; we also support negative `signed char' values - for broken old programs. The case conversion arrays are of `int's - rather than `unsigned char's because tolower (EOF) must be EOF, which - doesn't fit into an `unsigned char'. But today more important is that - the arrays are also used for multi-byte character sets. */ - - if (_NL_CURRENT_LOCALE == &_nl_global_locale) - { - __libc_tsd_set (CTYPE_B, (void *) current (uint16_t, CLASS, 128)); - __libc_tsd_set (CTYPE_TOUPPER, (void *) current (int32_t, TOUPPER, 128)); - __libc_tsd_set (CTYPE_TOLOWER, (void *) current (int32_t, TOLOWER, 128)); - } - -#include -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) - /* We must use the exported names to access these so we are sure to - be accessing the main executable's copy if it has COPY relocs. */ - - extern __const unsigned short int *__ctype_b; /* Characteristics. */ - extern __const __int32_t *__ctype_tolower; /* Case conversions. */ - extern __const __int32_t *__ctype_toupper; /* Case conversions. */ + ((const type *) _NL_CURRENT (LC_CTYPE, paste(_NL_CTYPE_,x)) + offset) extern const uint32_t *__ctype32_b; extern const uint32_t *__ctype32_toupper; extern const uint32_t *__ctype32_tolower; + extern const char *__ctype32_wctype[12]; + extern const char *__ctype32_wctrans[2]; + extern const char *__ctype32_width; - /* We need the .symver declarations these macros generate so that - our references are explicitly bound to the versioned symbol names - rather than the unadorned names that are not exported. When the - linker sees these bound to local symbols (as the unexported names are) - then it doesn't generate a proper relocation to the global symbols. - We need those relocations so that a versioned definition with a COPY - reloc in an executable will override the libc.so definition. */ - -compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0); -compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0); -compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0); -compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0); -compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2); -compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2); + size_t offset, cnt; __ctype_b = current (uint16_t, CLASS, 128); __ctype_toupper = current (uint32_t, TOUPPER, 128); @@ -88,5 +55,14 @@ compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2); __ctype32_b = current (uint32_t, CLASS32, 0); __ctype32_toupper = current (uint32_t, TOUPPER32, 0); __ctype32_tolower = current (uint32_t, TOLOWER32, 0); -#endif + + offset = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_CLASS_OFFSET); + for (cnt = 0; cnt < 12; cnt++) + __ctype32_wctype[cnt] = _nl_current_LC_CTYPE->values[offset + cnt].string; + + offset = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET); + for (cnt = 0; cnt < 2; cnt++) + __ctype32_wctrans[cnt] = _nl_current_LC_CTYPE->values[offset + cnt].string; + + __ctype32_width = current (char, WIDTH, 0); } diff --git a/src/kernel/libroot/posix/glibc/locale/lc-time.c b/src/kernel/libroot/posix/glibc/locale/lc-time.c index fa450669a8..efa56b8f82 100644 --- a/src/kernel/libroot/posix/glibc/locale/lc-time.c +++ b/src/kernel/libroot/posix/glibc/locale/lc-time.c @@ -1,5 +1,5 @@ /* Define current locale data for LC_TIME category. - Copyright (C) 1995-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,300 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include +#include +#include +#include +#include +#include #include "localeinfo.h" _NL_CURRENT_DEFINE (LC_TIME); + +/* Some of the functions here must not be used while setlocale is called. */ +__libc_lock_define (extern, __libc_setlocale_lock) + + +static int era_initialized; + +static struct era_entry *eras; +static size_t num_eras; +static int alt_digits_initialized; +static const char **alt_digits; + + +static int walt_digits_initialized; +static const wchar_t **walt_digits; + + +void +_nl_postload_time (void) +{ + /* Prepare lazy initialization of `era' and `alt_digits' array. */ + era_initialized = 0; + alt_digits_initialized = 0; + walt_digits_initialized = 0; +} + +#define ERA_DATE_CMP(a, b) \ + (a[0] < b[0] || (a[0] == b[0] && (a[1] < b[1] \ + || (a[1] == b[1] && a[2] <= b[2])))) + +static void +_nl_init_era_entries (void) +{ + size_t cnt; + + __libc_lock_lock (__libc_setlocale_lock); + + if (era_initialized == 0) + { + size_t new_num_eras = _NL_CURRENT_WORD (LC_TIME, + _NL_TIME_ERA_NUM_ENTRIES); + if (new_num_eras == 0) + { + free (eras); + eras = NULL; + } + else + { + if (num_eras != new_num_eras) + eras = (struct era_entry *) realloc (eras, + new_num_eras + * sizeof (struct era_entry)); + if (eras == NULL) + { + num_eras = 0; + eras = NULL; + } + else + { + const char *ptr = _NL_CURRENT (LC_TIME, _NL_TIME_ERA_ENTRIES); + num_eras = new_num_eras; + + for (cnt = 0; cnt < num_eras; ++cnt) + { + const char *base_ptr = ptr; + memcpy ((void *) (eras + cnt), (const void *) ptr, + sizeof (uint32_t) * 8); + + if (ERA_DATE_CMP(eras[cnt].start_date, + eras[cnt].stop_date)) + if (eras[cnt].direction == (uint32_t) '+') + eras[cnt].absolute_direction = 1; + else + eras[cnt].absolute_direction = -1; + else + if (eras[cnt].direction == (uint32_t) '+') + eras[cnt].absolute_direction = -1; + else + eras[cnt].absolute_direction = 1; + + /* Skip numeric values. */ + ptr += sizeof (uint32_t) * 8; + + /* Set and skip era name. */ + eras[cnt].era_name = ptr; + ptr = strchr (ptr, '\0') + 1; + + /* Set and skip era format. */ + eras[cnt].era_format = ptr; + ptr = strchr (ptr, '\0') + 1; + + ptr += 3 - (((ptr - (const char *) base_ptr) + 3) & 3); + + /* Set and skip wide era name. */ + eras[cnt].era_wname = (wchar_t *) ptr; + ptr = (char *) (wcschr ((wchar_t *) ptr, L'\0') + 1); + + /* Set and skip wide era format. */ + eras[cnt].era_wformat = (wchar_t *) ptr; + ptr = (char *) (wcschr ((wchar_t *) ptr, L'\0') + 1); + } + } + } + + era_initialized = 1; + } + + __libc_lock_unlock (__libc_setlocale_lock); +} + + +struct era_entry * +_nl_get_era_entry (const struct tm *tp) +{ + struct era_entry *result; + int32_t tdate[3]; + size_t cnt; + + tdate[0] = tp->tm_year; + tdate[1] = tp->tm_mon; + tdate[2] = tp->tm_mday; + + if (era_initialized == 0) + _nl_init_era_entries (); + + /* Now compare date with the available eras. */ + for (cnt = 0; cnt < num_eras; ++cnt) + if ((ERA_DATE_CMP(eras[cnt].start_date, tdate) + && ERA_DATE_CMP(tdate, eras[cnt].stop_date)) + || (ERA_DATE_CMP(eras[cnt].stop_date, tdate) + && ERA_DATE_CMP(tdate, eras[cnt].start_date))) + break; + + result = cnt < num_eras ? &eras[cnt] : NULL; + + return result; +} + + +struct era_entry * +_nl_select_era_entry (int cnt) +{ + if (era_initialized == 0) + _nl_init_era_entries (); + + return &eras[cnt]; +} + + +const char * +_nl_get_alt_digit (unsigned int number) +{ + const char *result; + + __libc_lock_lock (__libc_setlocale_lock); + + if (alt_digits_initialized == 0) + { + alt_digits_initialized = 1; + + if (alt_digits == NULL) + alt_digits = malloc (100 * sizeof (const char *)); + + if (alt_digits != NULL) + { + const char *ptr = _NL_CURRENT (LC_TIME, ALT_DIGITS); + size_t cnt; + + if (alt_digits != NULL) + for (cnt = 0; cnt < 100; ++cnt) + { + alt_digits[cnt] = ptr; + + /* Skip digit format. */ + ptr = strchr (ptr, '\0') + 1; + } + } + } + + result = alt_digits != NULL && number < 100 ? alt_digits[number] : NULL; + + __libc_lock_unlock (__libc_setlocale_lock); + + return result; +} + + +const wchar_t * +_nl_get_walt_digit (unsigned int number) +{ + const wchar_t *result; + + __libc_lock_lock (__libc_setlocale_lock); + + if (walt_digits_initialized == 0) + { + walt_digits_initialized = 1; + + if (walt_digits == NULL) + walt_digits = malloc (100 * sizeof (const uint32_t *)); + + if (walt_digits != NULL) + { + const wchar_t *ptr = _NL_CURRENT_WSTR (LC_TIME, _NL_WALT_DIGITS); + size_t cnt; + + for (cnt = 0; cnt < 100; ++cnt) + { + walt_digits[cnt] = ptr; + + /* Skip digit format. */ + ptr = wcschr (ptr, L'\0') + 1; + } + } + } + + result = walt_digits != NULL && number < 100 ? walt_digits[number] : NULL; + + __libc_lock_unlock (__libc_setlocale_lock); + + return (wchar_t *) result; +} + + +int +_nl_parse_alt_digit (const char **strp) +{ + const char *str = *strp; + int result = -1; + size_t cnt; + size_t maxlen = 0; + + __libc_lock_lock (__libc_setlocale_lock); + + if (alt_digits_initialized == 0) + { + alt_digits_initialized = 1; + + if (alt_digits == NULL) + alt_digits = malloc (100 * sizeof (const char *)); + + if (alt_digits != NULL) + { + const char *ptr = _NL_CURRENT (LC_TIME, ALT_DIGITS); + + if (alt_digits != NULL) + for (cnt = 0; cnt < 100; ++cnt) + { + alt_digits[cnt] = ptr; + + /* Skip digit format. */ + ptr = strchr (ptr, '\0') + 1; + } + } + } + + /* Matching is not unambiguos. The alternative digits could be like + I, II, III, ... and the first one is a substring of the second + and third. Therefore we must keep on searching until we found + the longest possible match. Note that this is not specified in + the standard. */ + for (cnt = 0; cnt < 100; ++cnt) + { + size_t len = strlen (alt_digits[cnt]); + + if (len > maxlen && strncmp (alt_digits[cnt], str, len) == 0) + { + maxlen = len; + result = (int) cnt; + } + } + + __libc_lock_unlock (__libc_setlocale_lock); + + if (result != -1) + *strp += maxlen; + + return result; +} + + +static void +free_mem (void) +{ + free (alt_digits); + free (walt_digits); +} +text_set_element (__libc_subfreeres, free_mem); diff --git a/src/kernel/libroot/posix/glibc/locale/loadlocale.c b/src/kernel/libroot/posix/glibc/locale/loadlocale.c index 32faad57e9..53962babac 100644 --- a/src/kernel/libroot/posix/glibc/locale/loadlocale.c +++ b/src/kernel/libroot/posix/glibc/locale/loadlocale.c @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -60,84 +60,21 @@ static const enum value_type *_nl_value_types[] = }; -struct locale_data * -internal_function -_nl_intern_locale_data (int category, const void *data, size_t datasize) +void +_nl_load_locale (struct loaded_l10nfile *file, int category) { - const struct + int fd; + struct { unsigned int magic; unsigned int nstrings; unsigned int strindex[0]; - } *const filedata = data; - struct locale_data *newdata; - size_t cnt; - - if (__builtin_expect (datasize < sizeof *filedata, 0) - || __builtin_expect (filedata->magic != LIMAGIC (category), 0)) - { - /* Bad data file. */ - __set_errno (EINVAL); - return NULL; - } - - if (__builtin_expect (filedata->nstrings < _nl_category_num_items[category], - 0) - || (__builtin_expect (sizeof *filedata - + filedata->nstrings * sizeof (unsigned int) - >= datasize, 0))) - { - /* Insufficient data. */ - __set_errno (EINVAL); - return NULL; - } - - newdata = malloc (sizeof *newdata - + filedata->nstrings * sizeof (union locale_data_value)); - if (newdata == NULL) - return NULL; - - newdata->filedata = (void *) filedata; - newdata->filesize = datasize; - newdata->private.data = NULL; - newdata->private.cleanup = NULL; - newdata->usage_count = 0; - newdata->use_translit = 0; - newdata->nstrings = filedata->nstrings; - for (cnt = 0; cnt < newdata->nstrings; ++cnt) - { - size_t idx = filedata->strindex[cnt]; - if (__builtin_expect (idx > (size_t) newdata->filesize, 0)) - { - puntdata: - free (newdata); - __set_errno (EINVAL); - return NULL; - } - if (__builtin_expect (_nl_value_types[category][cnt] == word, 0)) - { - if (idx % __alignof__ (u_int32_t) != 0) - goto puntdata; - newdata->values[cnt].word = - *((const u_int32_t *) (newdata->filedata + idx)); - } - else - newdata->values[cnt].string = newdata->filedata + idx; - } - - return newdata; -} - -void -internal_function -_nl_load_locale (struct loaded_l10nfile *file, int category) -{ - int fd; - void *filedata; + } *filedata; struct stat64 st; struct locale_data *newdata; int save_err; - int alloc = ld_mapped; + int mmaped = 1; + size_t cnt; file->decided = 1; file->data = NULL; @@ -148,11 +85,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) return; if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0) - { - puntfd: - __close (fd); - return; - } + goto puntfd; if (__builtin_expect (S_ISDIR (st.st_mode), 0)) { /* LOCALE/LC_foo is a directory; open LOCALE/LC_foo/SYS_LC_foo @@ -189,15 +122,25 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) /* Some systems do not have this flag; it is superfluous. */ # define MAP_FILE 0 # endif - filedata = __mmap ((caddr_t) 0, st.st_size, - PROT_READ, MAP_FILE|MAP_COPY, fd, 0); - if (__builtin_expect (filedata == MAP_FAILED, 0)) +# ifndef MAP_INHERIT + /* Some systems might lack this; they lose. */ +# define MAP_INHERIT 0 +# endif + filedata = (void *) __mmap ((caddr_t) 0, st.st_size, PROT_READ, + MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0); + if (__builtin_expect ((void *) filedata != MAP_FAILED, 1)) + { + if (__builtin_expect (st.st_size < sizeof (*filedata), 0)) + /* This cannot be a locale data file since it's too small. */ + goto puntfd; + } + else { if (__builtin_expect (errno, ENOSYS) == ENOSYS) { #endif /* _POSIX_MAPPED_FILES */ /* No mmap; allocate a buffer and read from the file. */ - alloc = ld_malloced; + mmaped = 0; filedata = malloc (st.st_size); if (filedata != NULL) { @@ -217,61 +160,87 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) p += nread; to_read -= nread; } - __set_errno (save_err); } + else + goto puntfd; + __set_errno (save_err); #ifdef _POSIX_MAPPED_FILES } + else + goto puntfd; } #endif /* _POSIX_MAPPED_FILES */ - /* We have mapped the data, so we no longer need the descriptor. */ - __close (fd); - - if (__builtin_expect (filedata == NULL, 0)) - /* We failed to map or read the data. */ - return; - - newdata = _nl_intern_locale_data (category, filedata, st.st_size); - if (__builtin_expect (newdata == NULL, 0)) - /* Bad data. */ + if (__builtin_expect (filedata->magic != LIMAGIC (category), 0)) + /* Bad data file in either byte order. */ { + puntmap: #ifdef _POSIX_MAPPED_FILES - if (alloc == ld_mapped) - __munmap ((caddr_t) filedata, st.st_size); + __munmap ((caddr_t) filedata, st.st_size); #endif + puntfd: + __close (fd); return; } - /* _nl_intern_locale_data leaves us these fields to initialize. */ - newdata->name = NULL; /* This will be filled if necessary in findlocale.c. */ - newdata->alloc = alloc; + if (__builtin_expect (filedata->nstrings < _nl_category_num_items[category], + 0) + || (__builtin_expect (sizeof *filedata + + filedata->nstrings * sizeof (unsigned int) + >= (size_t) st.st_size, 0))) + { + /* Insufficient data. */ + __set_errno (EINVAL); + goto puntmap; + } + newdata = malloc (sizeof *newdata + + filedata->nstrings * sizeof (union locale_data_value)); + if (newdata == NULL) + goto puntmap; + + newdata->name = NULL; /* This will be filled if necessary in findlocale.c. */ + newdata->filedata = (void *) filedata; + newdata->filesize = st.st_size; + newdata->mmaped = mmaped; + newdata->usage_count = 0; + newdata->use_translit = 0; + newdata->options = NULL; + newdata->nstrings = filedata->nstrings; + for (cnt = 0; cnt < newdata->nstrings; ++cnt) + { + off_t idx = filedata->strindex[cnt]; + if (__builtin_expect (idx > newdata->filesize, 0)) + { + free (newdata); + __set_errno (EINVAL); + goto puntmap; + } + if (__builtin_expect (_nl_value_types[category][cnt] == word, 0)) + { + assert (idx % __alignof__ (u_int32_t) == 0); + newdata->values[cnt].word = + *((u_int32_t *) (newdata->filedata + idx)); + } + else + newdata->values[cnt].string = newdata->filedata + idx; + } + + __close (fd); file->data = newdata; } void -internal_function _nl_unload_locale (struct locale_data *locale) { - if (locale->private.cleanup) - (*locale->private.cleanup) (locale); - - switch (__builtin_expect (locale->alloc, ld_mapped)) - { - case ld_malloced: - free ((void *) locale->filedata); - break; - case ld_mapped: #ifdef _POSIX_MAPPED_FILES - __munmap ((caddr_t) locale->filedata, locale->filesize); - break; + if (__builtin_expect (locale->mmaped, 1)) + __munmap ((caddr_t) locale->filedata, locale->filesize); + else #endif - case ld_archive: /* Nothing to do. */ - break; - } - - if (__builtin_expect (locale->alloc, ld_mapped) != ld_archive) - free ((char *) locale->name); + free ((void *) locale->filedata); + free ((char *) locale->options); + free ((char *) locale->name); free (locale); } diff --git a/src/kernel/libroot/posix/glibc/locale/locale.h b/src/kernel/libroot/posix/glibc/locale/locale.h index 1b0296ae4a..9133038178 100644 --- a/src/kernel/libroot/posix/glibc/locale/locale.h +++ b/src/kernel/libroot/posix/glibc/locale/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,95-99,2000,01,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1995-1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -119,17 +119,12 @@ struct lconv }; -__BEGIN_NAMESPACE_STD - /* Set and/or return the current locale. */ extern char *setlocale (int __category, __const char *__locale) __THROW; /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv (void) __THROW; -__END_NAMESPACE_STD - - #ifdef __USE_GNU /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using @@ -145,64 +140,22 @@ __END_NAMESPACE_STD /* Get locale datatype definition. */ # include -typedef __locale_t locale_t; - /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the - CATEGORY_MASK parameter here uses a single bit for each category, - made by OR'ing together LC_*_MASK bits above. */ -extern __locale_t newlocale (int __category_mask, __const char *__locale, - __locale_t __base) __THROW; - -/* These are the bits that can be set in the CATEGORY_MASK argument to - `newlocale'. In the GNU implementation, LC_FOO_MASK has the value - of (1 << LC_FOO), but this is not a part of the interface that - callers can assume will be true. */ -# define LC_CTYPE_MASK (1 << __LC_CTYPE) -# define LC_NUMERIC_MASK (1 << __LC_NUMERIC) -# define LC_TIME_MASK (1 << __LC_TIME) -# define LC_COLLATE_MASK (1 << __LC_COLLATE) -# define LC_MONETARY_MASK (1 << __LC_MONETARY) -# define LC_MESSAGES_MASK (1 << __LC_MESSAGES) -# define LC_PAPER_MASK (1 << __LC_PAPER) -# define LC_NAME_MASK (1 << __LC_NAME) -# define LC_ADDRESS_MASK (1 << __LC_ADDRESS) -# define LC_TELEPHONE_MASK (1 << __LC_TELEPHONE) -# define LC_MEASUREMENT_MASK (1 << __LC_MEASUREMENT) -# define LC_IDENTIFICATION_MASK (1 << __LC_IDENTIFICATION) -# define LC_ALL_MASK (LC_CTYPE_MASK \ - | LC_NUMERIC_MASK \ - | LC_TIME_MASK \ - | LC_COLLATE_MASK \ - | LC_MONETARY_MASK \ - | LC_MESSAGES_MASK \ - | LC_PAPER_MASK \ - | LC_NAME_MASK \ - | LC_ADDRESS_MASK \ - | LC_TELEPHONE_MASK \ - | LC_MEASUREMENT_MASK \ - | LC_IDENTIFICATION_MASK \ - ) + CATEGORY_MASK parameter here uses a single bit for each category. + I.e., 1 << LC_CTYPE means to load data for this category. If + BASE is non-null the appropriate category information in the BASE + record is replaced. */ +extern __locale_t __newlocale (int __category_mask, __const char *__locale, + __locale_t __base) __THROW; /* Return a duplicate of the set of locale in DATASET. All usage counters are increased if necessary. */ -extern __locale_t duplocale (__locale_t __dataset) __THROW; +extern __locale_t __duplocale (__locale_t __dataset) __THROW; /* Free the data associated with a locale dataset previously returned by a call to `setlocale_r'. */ -extern void freelocale (__locale_t __dataset) __THROW; - -/* Switch the current thread's locale to DATASET. - If DATASET is null, instead just return the current setting. - The special value LC_GLOBAL_LOCALE is the initial setting - for all threads and can also be installed any time, meaning - the thread uses the global settings controlled by `setlocale'. */ -extern __locale_t uselocale (__locale_t __dataset) __THROW; - -/* This value can be passed to `uselocale' and may be returned by it. - Passing this value to any other function has undefined behavior. */ -# define LC_GLOBAL_LOCALE ((__locale_t) -1L) - +extern void __freelocale (__locale_t __dataset) __THROW; #endif __END_DECLS diff --git a/src/kernel/libroot/posix/glibc/locale/localeconv.c b/src/kernel/libroot/posix/glibc/locale/localeconv.c index 5cbd99ed16..e1582f5942 100644 --- a/src/kernel/libroot/posix/glibc/locale/localeconv.c +++ b/src/kernel/libroot/posix/glibc/locale/localeconv.c @@ -29,7 +29,7 @@ __localeconv (void) result.decimal_point = (char *) _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT); result.thousands_sep = (char *) _NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP); result.grouping = (char *) _NL_CURRENT (LC_NUMERIC, GROUPING); - if (*result.grouping == CHAR_MAX || *result.grouping == (char) -1) + if (*result.grouping == CHAR_MAX || *result.grouping == -1) result.grouping = (char *) ""; result.int_curr_symbol = (char *) _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL); @@ -39,7 +39,7 @@ __localeconv (void) result.mon_thousands_sep = (char *) _NL_CURRENT (LC_MONETARY, MON_THOUSANDS_SEP); result.mon_grouping = (char *) _NL_CURRENT (LC_MONETARY, MON_GROUPING); - if (*result.mon_grouping == CHAR_MAX || *result.mon_grouping == (char) -1) + if (*result.mon_grouping == CHAR_MAX || *result.mon_grouping == -1) result.mon_grouping = (char *) ""; result.positive_sign = (char *) _NL_CURRENT (LC_MONETARY, POSITIVE_SIGN); result.negative_sign = (char *) _NL_CURRENT (LC_MONETARY, NEGATIVE_SIGN); diff --git a/src/kernel/libroot/posix/glibc/locale/localeinfo.h b/src/kernel/libroot/posix/glibc/locale/localeinfo.h index 74ba538de1..e7528e9edb 100644 --- a/src/kernel/libroot/posix/glibc/locale/localeinfo.h +++ b/src/kernel/libroot/posix/glibc/locale/localeinfo.h @@ -1,5 +1,5 @@ /* Declarations for internal libc locale interfaces - Copyright (C) 1995-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 96, 97, 98, 99,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,11 +23,13 @@ #include #include #include -#include #include #include #include +/* This has to be changed whenever a new locale is defined. */ +#define __LC_LAST 13 + #include /* For loaded_l10nfile definition. */ /* Magic number at the beginning of a locale data file for CATEGORY. */ @@ -47,38 +49,21 @@ struct locale_data const char *name; const char *filedata; /* Region mapping the file data. */ off_t filesize; /* Size of the file (and the region). */ - enum /* Flavor of storage used for those. */ - { - ld_malloced, /* Both are malloc'd. */ - ld_mapped, /* name is malloc'd, filedata mmap'd */ - ld_archive /* Both point into mmap'd archive regions. */ - } alloc; - - /* This provides a slot for category-specific code to cache data computed - about this locale. That code can set a cleanup function to deallocate - the data. */ - struct - { - void (*cleanup) (struct locale_data *) internal_function; - union - { - void *data; - struct lc_time_data *time; - const struct gconv_fcts *ctype; - } u; - } private; + int mmaped; /* If nonzero the data is mmaped. */ unsigned int usage_count; /* Counter for users. */ int use_translit; /* Nonzero if the mb*towv*() and wc*tomb() functions should use transliteration. */ + const char *options; /* Extra options from the locale name, + not used in the path to the locale data. */ unsigned int nstrings; /* Number of strings below. */ union locale_data_value { const uint32_t *wstr; const char *string; - unsigned int word; /* Note endian issues vs 64-bit pointers. */ + unsigned int word; } values __flexarr; /* Items, usually pointers into `filedata'. */ }; @@ -138,20 +123,6 @@ struct era_entry -1 indicates that year number is higher in the past. (like B.C.) */ }; -/* Structure caching computed data about information from LC_TIME. - The `private.time' member of `struct locale_data' points to this. */ -struct lc_time_data -{ - struct era_entry *eras; - size_t num_eras; - int era_initialized; - - const char **alt_digits; - const wchar_t **walt_digits; - int alt_digits_initialized; - int walt_digits_initialized; -}; - /* LC_CTYPE specific: Hardwired indices for standard wide character translation mappings. */ @@ -169,194 +140,77 @@ enum #define _ISCTYPE(c, desc) \ (((((const uint32_t *) (desc)) - 8)[(c) >> 5] >> ((c) & 0x1f)) & 1) -extern const char *const _nl_category_names[__LC_LAST] attribute_hidden; -extern const size_t _nl_category_name_sizes[__LC_LAST] attribute_hidden; -/* Name of the standard locales. */ -extern const char _nl_C_name[] attribute_hidden; -extern const char _nl_POSIX_name[] attribute_hidden; - -/* The standard codeset. */ -extern const char _nl_C_codeset[] attribute_hidden; - -/* This is the internal locale_t object that holds the global locale - controlled by calls to setlocale. A thread's TSD locale pointer - points to this when `uselocale (LC_GLOBAL_LOCALE)' is in effect. */ -extern struct __locale_struct _nl_global_locale attribute_hidden; - -/* This fetches the thread-local locale_t pointer, either one set with - uselocale or &_nl_global_locale. */ -#define _NL_CURRENT_LOCALE ((__locale_t) __libc_tsd_get (LOCALE)) -#include -__libc_tsd_define (extern, LOCALE) - - -/* For static linking it is desireable to avoid always linking in the code - and data for every category when we can tell at link time that they are - unused. We can manage this playing some tricks with weak references. - But with thread-local locale settings, it becomes quite ungainly unless - we can use __thread variables. So only in that case do we attempt this. */ -#if !defined SHARED && defined HAVE___THREAD && defined HAVE_WEAK_SYMBOLS -# include -# if USE_TLS -# define NL_CURRENT_INDIRECT 1 -# endif -#endif - -#ifdef NL_CURRENT_INDIRECT - -/* For each category declare the thread-local variable for the current - locale data. This has an extra indirection so it points at the - __locales[CATEGORY] element in either _nl_global_locale or the current - locale object set by uselocale, which points at the actual data. The - reason for having these variables is so that references to particular - categories will link in the lc-CATEGORY.c module to define this symbol, - and we arrange that linking that module is what brings in all the code - associated with this category. */ +/* For each category declare the variable for the current locale data. */ #define DEFINE_CATEGORY(category, category_name, items, a) \ -extern __thread struct locale_data *const *_nl_current_##category \ - attribute_hidden attribute_tls_model_ie; +extern struct locale_data *_nl_current_##category; #include "categories.def" #undef DEFINE_CATEGORY -/* Return a pointer to the current `struct locale_data' for CATEGORY. */ -#define _NL_CURRENT_DATA(category) (*_nl_current_##category) +extern const char *const _nl_category_names[__LC_LAST]; +extern const size_t _nl_category_name_sizes[__LC_LAST]; +extern struct locale_data * *const _nl_current[__LC_LAST]; + +/* Name of the standard locales. */ +extern const char _nl_C_name[]; +extern const char _nl_POSIX_name[]; + +/* The standard codeset. */ +extern const char _nl_C_codeset[]; /* Extract the current CATEGORY locale's string for ITEM. */ #define _NL_CURRENT(category, item) \ - ((*_nl_current_##category)->values[_NL_ITEM_INDEX (item)].string) + (_nl_current_##category->values[_NL_ITEM_INDEX (item)].string) /* Extract the current CATEGORY locale's string for ITEM. */ #define _NL_CURRENT_WSTR(category, item) \ - ((wchar_t *) (*_nl_current_##category)->values[_NL_ITEM_INDEX (item)].wstr) + ((wchar_t *) (_nl_current_##category->values[_NL_ITEM_INDEX (item)].wstr)) /* Extract the current CATEGORY locale's word for ITEM. */ #define _NL_CURRENT_WORD(category, item) \ - ((uint32_t) (*_nl_current_##category)->values[_NL_ITEM_INDEX (item)].word) + (_nl_current_##category->values[_NL_ITEM_INDEX (item)].word) /* This is used in lc-CATEGORY.c to define _nl_current_CATEGORY. */ #define _NL_CURRENT_DEFINE(category) \ - __thread struct locale_data *const *_nl_current_##category \ - attribute_hidden = &_nl_global_locale.__locales[category]; \ - asm (_NL_CURRENT_DEFINE_STRINGIFY (ASM_GLOBAL_DIRECTIVE) \ - " " __SYMBOL_PREFIX "_nl_current_" #category "_used\n" \ - _NL_CURRENT_DEFINE_ABS (_nl_current_##category##_used, 1)); -#define _NL_CURRENT_DEFINE_STRINGIFY(x) _NL_CURRENT_DEFINE_STRINGIFY_1 (x) -#define _NL_CURRENT_DEFINE_STRINGIFY_1(x) #x -#ifdef HAVE_ASM_SET_DIRECTIVE -# define _NL_CURRENT_DEFINE_ABS(sym, val) ".set " #sym ", " #val -#else -# define _NL_CURRENT_DEFINE_ABS(sym, val) #sym " = " #val -#endif - -#else - -/* All categories are always loaded in the shared library, so there is no - point in having lots of separate symbols for linking. */ - -/* Return a pointer to the current `struct locale_data' for CATEGORY. */ -# define _NL_CURRENT_DATA(category) \ - (_NL_CURRENT_LOCALE->__locales[category]) - -/* Extract the current CATEGORY locale's string for ITEM. */ -# define _NL_CURRENT(category, item) \ - (_NL_CURRENT_DATA (category)->values[_NL_ITEM_INDEX (item)].string) - -/* Extract the current CATEGORY locale's string for ITEM. */ -# define _NL_CURRENT_WSTR(category, item) \ - ((wchar_t *) _NL_CURRENT_DATA (category)->values[_NL_ITEM_INDEX (item)].wstr) - -/* Extract the current CATEGORY locale's word for ITEM. */ -# define _NL_CURRENT_WORD(category, item) \ - ((uint32_t) _NL_CURRENT_DATA (category)->values[_NL_ITEM_INDEX (item)].word) - -/* This is used in lc-CATEGORY.c to define _nl_current_CATEGORY. */ -# define _NL_CURRENT_DEFINE(category) \ - /* No per-category variable here. */ - -#endif - - -/* Default search path if no LOCPATH environment variable. */ -extern const char _nl_default_locale_path[] attribute_hidden; + extern struct locale_data _nl_C_##category; \ + struct locale_data *_nl_current_##category = &_nl_C_##category /* Load the locale data for CATEGORY from the file specified by *NAME. - If *NAME is "", use environment variables as specified by POSIX, and - fill in *NAME with the actual name used. If LOCALE_PATH is not null, - those directories are searched for the locale files. If it's null, - the locale archive is checked first and then _nl_default_locale_path - is searched for locale files. */ + If *NAME is "", use environment variables as specified by POSIX, + and fill in *NAME with the actual name used. The directories + listed in LOCALE_PATH are searched for the locale files. */ extern struct locale_data *_nl_find_locale (const char *locale_path, size_t locale_path_len, - int category, const char **name) - internal_function attribute_hidden; + int category, const char **name); /* Try to load the file described by FILE. */ -extern void _nl_load_locale (struct loaded_l10nfile *file, int category) - internal_function attribute_hidden; +extern void _nl_load_locale (struct loaded_l10nfile *file, int category); /* Free all resource. */ -extern void _nl_unload_locale (struct locale_data *locale) - internal_function attribute_hidden; +extern void _nl_unload_locale (struct locale_data *locale); /* Free the locale and give back all memory if the usage count is one. */ -extern void _nl_remove_locale (int locale, struct locale_data *data) - internal_function attribute_hidden; - -/* Find the locale *NAMEP in the locale archive, and return the - internalized data structure for its CATEGORY data. If this locale has - already been loaded from the archive, just returns the existing data - structure. If successful, sets *NAMEP to point directly into the mapped - archive string table; that way, the next call can short-circuit strcmp. */ -extern struct locale_data *_nl_load_locale_from_archive (int category, - const char **namep) - internal_function attribute_hidden; - -/* Subroutine of setlocale's __libc_subfreeres hook. */ -extern void _nl_archive_subfreeres (void) attribute_hidden; - -/* Validate the contents of a locale file and set up the in-core - data structure to point into the data. This leaves the `alloc' - and `name' fields uninitialized, for the caller to fill in. - If any bogons are detected in the data, this will refuse to - intern it, and return a null pointer instead. */ -extern struct locale_data *_nl_intern_locale_data (int category, - const void *data, - size_t datasize) - internal_function attribute_hidden; +extern void _nl_remove_locale (int locale, struct locale_data *data); /* Return `era' entry which corresponds to TP. Used in strftime. */ -extern struct era_entry *_nl_get_era_entry (const struct tm *tp, - struct locale_data *lc_time) - internal_function attribute_hidden; +extern struct era_entry *_nl_get_era_entry (const struct tm *tp); /* Return `era' cnt'th entry . Used in strptime. */ -extern struct era_entry *_nl_select_era_entry (int cnt, - struct locale_data *lc_time) - internal_function attribute_hidden; +extern struct era_entry *_nl_select_era_entry (int cnt); /* Return `alt_digit' which corresponds to NUMBER. Used in strftime. */ -extern const char *_nl_get_alt_digit (unsigned int number, - struct locale_data *lc_time) - internal_function attribute_hidden; +extern const char *_nl_get_alt_digit (unsigned int number); /* Similar, but now for wide characters. */ -extern const wchar_t *_nl_get_walt_digit (unsigned int number, - struct locale_data *lc_time) - internal_function attribute_hidden; +extern const wchar_t *_nl_get_walt_digit (unsigned int number); /* Parse string as alternative digit and return numeric value. */ -extern int _nl_parse_alt_digit (const char **strp, - struct locale_data *lc_time) - internal_function attribute_hidden; +extern int _nl_parse_alt_digit (const char **strp); /* Postload processing. */ extern void _nl_postload_ctype (void); - -/* Functions used for the `private.cleanup' hook. */ -extern void _nl_cleanup_time (struct locale_data *) - internal_function attribute_hidden; +extern void _nl_postload_time (void); #endif /* localeinfo.h */ diff --git a/src/kernel/libroot/posix/glibc/locale/newlocale.c b/src/kernel/libroot/posix/glibc/locale/newlocale.c index 1131f62c0b..4a785d0c0f 100644 --- a/src/kernel/libroot/posix/glibc/locale/newlocale.c +++ b/src/kernel/libroot/posix/glibc/locale/newlocale.c @@ -1,5 +1,5 @@ /* Return a reference to locale information record. - Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -22,11 +22,13 @@ #include #include #include -#include #include "localeinfo.h" +/* Constant data defined in setlocale.c. */ +extern struct locale_data *const _nl_C[]; + /* Use this when we come along an error. */ #define ERROR_RETURN \ do { \ @@ -46,7 +48,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base) size_t locale_path_len; const char *locpath_var; int cnt; - size_t names_len; /* We treat LC_ALL in the same way as if all bits were set. */ if (category_mask == 1 << LC_ALL) @@ -60,23 +61,16 @@ __newlocale (int category_mask, const char *locale, __locale_t base) if (locale == NULL) ERROR_RETURN; - if (base == &_nl_C_locobj) - /* We're to modify BASE, returned for a previous call with "C". - We can't really modify the read-only structure, so instead - start over by copying it. */ - base = NULL; - - if ((base == NULL || category_mask == (1 << __LC_LAST) - 1 - (1 << LC_ALL)) - && (category_mask == 0 || !strcmp (locale, "C"))) - /* Asking for the "C" locale needn't allocate a new object. */ - return &_nl_C_locobj; - /* Allocate memory for the result. */ if (base != NULL) result = *base; else - /* Fill with pointers to C locale data. */ - result = _nl_C_locobj; + { + /* Fill with pointers to C locale data. */ + for (cnt = 0; cnt < __LC_LAST; ++cnt) + if (cnt != LC_ALL) + result.__locales[cnt] = _nl_C[cnt]; + } /* If no category is to be set we return BASE if available or a dataset using the C locale data. */ @@ -93,22 +87,19 @@ __newlocale (int category_mask, const char *locale, __locale_t base) /* We perhaps really have to load some data. So we determine the path in which to look for the data now. The environment variable `LOCPATH' must only be used when the binary has no SUID or SGID - bit set. If using the default path, we tell _nl_find_locale - by passing null and it can check the canonical locale archive. */ + bit set. */ locale_path = NULL; locale_path_len = 0; locpath_var = getenv ("LOCPATH"); if (locpath_var != NULL && locpath_var[0] != '\0') - { - if (__argz_create_sep (locpath_var, ':', - &locale_path, &locale_path_len) != 0) - return NULL; + if (__argz_create_sep (locpath_var, ':', + &locale_path, &locale_path_len) != 0) + return NULL; - if (__argz_add_sep (&locale_path, &locale_path_len, - _nl_default_locale_path, ':') != 0) - return NULL; - } + if (__argz_append (&locale_path, &locale_path_len, + LOCALEDIR, sizeof (LOCALEDIR)) != 0) + return NULL; /* Get the names for the locales we are interested in. We either allow a composite name or a single name. */ @@ -120,7 +111,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base) /* This is a composite name. Make a copy and split it up. */ char *np = strdupa (locale); char *cp; - int specified_mask = 0; while ((cp = strchr (np, '=')) != NULL) { @@ -135,7 +125,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base) ERROR_RETURN; /* Found the category this clause sets. */ - specified_mask |= 1 << cnt; newnames[cnt] = ++cp; cp = strchr (cp, ';'); if (cp != NULL) @@ -149,105 +138,37 @@ __newlocale (int category_mask, const char *locale, __locale_t base) break; } - if (category_mask &~ specified_mask) - /* The composite name did not specify all categories we need. */ - ERROR_RETURN; + for (cnt = 0; cnt < __LC_LAST; ++cnt) + if (cnt != LC_ALL + && (category_mask & 1 << cnt) != 0 && newnames[cnt] == locale) + /* The composite name did not specify the category we need. */ + ERROR_RETURN; } /* Now process all categories we are interested in. */ - names_len = 0; for (cnt = 0; cnt < __LC_LAST; ++cnt) - { - if ((category_mask & 1 << cnt) != 0) - { - result.__locales[cnt] = _nl_find_locale (locale_path, - locale_path_len, - cnt, &newnames[cnt]); - if (result.__locales[cnt] == NULL) - { - free_cnt_data_and_exit: - while (cnt-- > 0) - if (((category_mask & 1 << cnt) != 0) - && result.__locales[cnt]->usage_count != UNDELETABLE) - /* We can remove the data. */ - _nl_remove_locale (cnt, result.__locales[cnt]); - return NULL; - } - - if (newnames[cnt] != _nl_C_name) - names_len += strlen (newnames[cnt]) + 1; - } - else if (cnt != LC_ALL && result.__names[cnt] != _nl_C_name) - /* Tally up the unchanged names from BASE as well. */ - names_len += strlen (result.__names[cnt]) + 1; - } - - /* We successfully loaded all required data. Allocate a new structure. - We can't just reuse the BASE pointer, because the name strings are - changing and we need the old name string area intact so we can copy - out of it into the new one without overlap problems should some - category's name be getting longer. */ - result_ptr = malloc (sizeof (struct __locale_struct) + names_len); - if (result_ptr == NULL) - { - cnt = __LC_LAST; - goto free_cnt_data_and_exit; - } + if (cnt != LC_ALL && (category_mask & 1 << cnt) != 0) + { + result.__locales[cnt] = _nl_find_locale (locale_path, locale_path_len, + cnt, &newnames[cnt]); + if (result.__locales[cnt] == NULL) + return NULL; + } + /* We successfully loaded all required data. */ if (base == NULL) { - /* Fill in this new structure from scratch. */ + /* Allocate new structure. */ + result_ptr = (__locale_t) malloc (sizeof (struct __locale_struct)); + if (result_ptr == NULL) + return NULL; - char *namep = (char *) (result_ptr + 1); - - /* Install copied new names in the new structure's __names array. - If resolved to "C", that is already in RESULT.__names to start. */ - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if ((category_mask & 1 << cnt) != 0 && newnames[cnt] != _nl_C_name) - { - result.__names[cnt] = namep; - namep = __stpcpy (namep, newnames[cnt]) + 1; - } - - *result_ptr = result; } else - { - /* We modify the base structure. */ + /* We modify the base structure. */ + result_ptr = base; - char *namep = (char *) (result_ptr + 1); - - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if ((category_mask & 1 << cnt) != 0) - { - if (base->__locales[cnt]->usage_count != UNDELETABLE) - /* We can remove the old data. */ - _nl_remove_locale (cnt, base->__locales[cnt]); - result_ptr->__locales[cnt] = result.__locales[cnt]; - - if (newnames[cnt] == _nl_C_name) - result_ptr->__names[cnt] = _nl_C_name; - else - { - result_ptr->__names[cnt] = namep; - namep = __stpcpy (namep, newnames[cnt]) + 1; - } - } - else if (cnt != LC_ALL) - { - /* The RESULT members point into the old BASE structure. */ - result_ptr->__locales[cnt] = result.__locales[cnt]; - if (result.__names[cnt] == _nl_C_name) - result_ptr->__names[cnt] = _nl_C_name; - else - { - result_ptr->__names[cnt] = namep; - namep = __stpcpy (namep, result.__names[cnt]) + 1; - } - } - - free (base); - } + *result_ptr = result; /* Update the special members. */ update: @@ -263,4 +184,3 @@ __newlocale (int category_mask, const char *locale, __locale_t base) return result_ptr; } -weak_alias (__newlocale, newlocale) diff --git a/src/kernel/libroot/posix/glibc/locale/nl_langinfo.c b/src/kernel/libroot/posix/glibc/locale/nl_langinfo.c index 2314b80f0f..7b62c73c63 100644 --- a/src/kernel/libroot/posix/glibc/locale/nl_langinfo.c +++ b/src/kernel/libroot/posix/glibc/locale/nl_langinfo.c @@ -1,5 +1,5 @@ /* User interface for extracting locale-dependent parameters. - Copyright (C) 1995,96,97,99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,20 +47,8 @@ nl_langinfo (item) #ifdef USE_IN_EXTENDED_LOCALE_MODEL data = l->__locales[category]; -#elif defined NL_CURRENT_INDIRECT - /* Make direct reference to every _nl_current_CATEGORY symbol, - since we know only at runtime which categories are used. */ - switch (category) - { -# define DEFINE_CATEGORY(category, category_name, items, a) \ - case category: data = *_nl_current_##category; break; -# include "categories.def" -# undef DEFINE_CATEGORY - default: /* Should be impossible. */ - return (char *) ""; - } #else - data = _NL_CURRENT_DATA (category); + data = *_nl_current[category]; #endif if (index >= data->nstrings) @@ -70,8 +58,3 @@ nl_langinfo (item) /* Return the string for the specified item. */ return (char *) data->values[index].string; } -#ifdef USE_IN_EXTENDED_LOCALE_MODEL -weak_alias (__nl_langinfo_l, nl_langinfo_l) -#else -libc_hidden_def (nl_langinfo) -#endif diff --git a/src/kernel/libroot/posix/glibc/locale/programs/charmap-dir.c b/src/kernel/libroot/posix/glibc/locale/programs/charmap-dir.c index 903bd5cabc..14cf765632 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/charmap-dir.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/charmap-dir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,9 +28,11 @@ #include #include -#include "localedef.h" #include "charmap-dir.h" +extern void *xmalloc (size_t n); +extern void *xrealloc (void *p, size_t n); + /* The data type of a charmap directory being traversed. */ struct charmap_dir { @@ -56,8 +58,8 @@ charmap_opendir (const char *directory) dir = opendir (directory); if (dir == NULL) { - WITH_CUR_LOCALE (error (1, errno, gettext ("\ -cannot read character map directory `%s'"), directory)); + error (1, errno, gettext ("cannot read character map directory `%s'"), + directory); return NULL; } @@ -88,13 +90,13 @@ charmap_readdir (CHARMAP_DIR *cdir) { for (;;) { - struct dirent64 *dirent; + struct dirent *dirent; size_t len; size_t size; char *filename; mode_t mode; - dirent = readdir64 (cdir->dir); + dirent = readdir (cdir->dir); if (dirent == NULL) return NULL; if (strcmp (dirent->d_name, ".") == 0) @@ -224,7 +226,7 @@ charmap_open (const char *directory, const char *name) *p++ = '/'; p = stpcpy (p, name); - stream = fopen (pathname, "rm"); + stream = fopen (pathname, "r"); if (stream != NULL) return stream; diff --git a/src/kernel/libroot/posix/glibc/locale/programs/charmap.c b/src/kernel/libroot/posix/glibc/locale/programs/charmap.c index 8612d99688..5d2441d17a 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/charmap.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/charmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -29,9 +29,8 @@ #include #include #include -#include -#include "localedef.h" +#include "error.h" #include "linereader.h" #include "charmap.h" #include "charmap-dir.h" @@ -44,6 +43,8 @@ #include "charmap-kw.h" +extern void *xmalloc (size_t __n); + /* Prototypes for local functions. */ static struct charmap_t *parse_charmap (struct linereader *cmfile, int verbose, int be_quiet); @@ -116,14 +117,18 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default) cmfile = cmlr_open (path, filename, charmap_hash); if (cmfile == NULL) - /* Try without the "/charmaps" part. */ - cmfile = cmlr_open (next, filename, charmap_hash); + { + /* Try without the "/charmaps" part. */ + cmfile = cmlr_open (next, filename, charmap_hash); + } } } if (cmfile == NULL) - /* Try the default directory. */ - cmfile = cmlr_open (CHARMAP_PATH, filename, charmap_hash); + { + /* Try the default directory. */ + cmfile = cmlr_open (CHARMAP_PATH, filename, charmap_hash); + } } } @@ -132,8 +137,7 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default) result = parse_charmap (cmfile, verbose, be_quiet); if (result == NULL && !be_quiet) - WITH_CUR_LOCALE (error (0, errno, _("\ -character map file `%s' not found"), filename)); + error (0, errno, _("character map file `%s' not found"), filename); } } @@ -190,15 +194,10 @@ character map file `%s' not found"), filename)); result = parse_charmap (cmfile, verbose, be_quiet); if (result == NULL) - WITH_CUR_LOCALE (error (4, errno, _("\ -default character map file `%s' not found"), DEFAULT_CHARMAP)); + error (4, errno, _("default character map file `%s' not found"), + DEFAULT_CHARMAP); } - if (result != NULL && result->code_set_name == NULL) - /* The input file does not specify a code set name. This - shouldn't happen but we should cope with it. */ - result->code_set_name = basename (filename); - /* Test of ASCII compatibility of locale encoding. Verify that the encoding to be used in a locale is ASCII compatible, @@ -244,17 +243,17 @@ default character map file `%s' not found"), DEFAULT_CHARMAP)); do { - struct charseq *seq = charmap_find_symbol (result, p, 1); + struct charseq * seq = charmap_find_symbol (result, p, 1); - if (seq == NULL || seq->ucs4 != (uint32_t) *p) + if (seq == NULL || seq->ucs4 != *p) failed = 1; } while (*p++ != '\0'); if (failed) - WITH_CUR_LOCALE (fprintf (stderr, _("\ + fprintf (stderr, _("\ character map `%s' is not ASCII compatible, locale not ISO C compliant\n"), - result->code_set_name)); + result->code_set_name); } return result; @@ -299,7 +298,7 @@ parse_charmap (struct linereader *cmfile, int verbose, int be_quiet) while (1) { /* What's on? */ - struct token *now = lr_token (cmfile, NULL, NULL, NULL, verbose); + struct token *now = lr_token (cmfile, NULL, NULL, verbose); enum token_t nowtok = now->tok; struct token *arg; @@ -329,9 +328,9 @@ parse_charmap (struct linereader *cmfile, int verbose, int be_quiet) if (result->mb_cur_min > result->mb_cur_max) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: must be greater than \n"), - cmfile->fname)); + cmfile->fname); result->mb_cur_min = result->mb_cur_max; } @@ -357,7 +356,7 @@ parse_charmap (struct linereader *cmfile, int verbose, int be_quiet) } /* We know that we need an argument. */ - arg = lr_token (cmfile, NULL, NULL, NULL, verbose); + arg = lr_token (cmfile, NULL, NULL, verbose); switch (nowtok) { @@ -834,16 +833,14 @@ only WIDTH definitions are allowed to follow the CHARMAP definition")); continue; default: - WITH_CUR_LOCALE (error (5, 0, _("%s: error in state machine"), - __FILE__)); + error (5, 0, _("%s: error in state machine"), __FILE__); /* NOTREACHED */ } break; } if (state != 91 && !be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("%s: premature end of file"), - cmfile->fname)); + error (0, 0, _("%s: premature end of file"), cmfile->fname); lr_close (cmfile); @@ -875,16 +872,6 @@ new_width (struct linereader *cmfile, struct charmap_t *result, lr_error (cmfile, _("unknown character `%s'"), to); return; } - - /* Make sure the number of bytes for the end points of the range - is correct. */ - if (from_val->nbytes != to_val->nbytes) - { - lr_error (cmfile, _("\ -number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"), - from_val->nbytes, to_val->nbytes); - return; - } } if (result->nwidth_rules >= result->nwidth_rules_max) @@ -962,7 +949,7 @@ charmap_new_char (struct linereader *lr, struct charmap_t *cm, errno = 0; newp->ucs4 = strtoul (from + 1, &endp, 16); if (endp - from != len1 - || (newp->ucs4 == ~((uint32_t) 0) && errno == ERANGE) + || (newp->ucs4 == ULONG_MAX && errno == ERANGE) || newp->ucs4 >= 0x80000000) /* This wasn't successful. Signal this name cannot be a correct UCS value. */ @@ -1008,9 +995,9 @@ hexadecimal range format should use only capital characters")); errno = 0; from_nr = strtoul (&from[prefix_len], &from_end, decimal_ellipsis ? 10 : 16); - if (*from_end != '\0' || (from_nr == UINT_MAX && errno == ERANGE) + if (*from_end != '\0' || (from_nr == ULONG_MAX && errno == ERANGE) || ((to_nr = strtoul (&to[prefix_len], &to_end, - decimal_ellipsis ? 10 : 16)) == UINT_MAX + decimal_ellipsis ? 10 : 16)) == ULONG_MAX && errno == ERANGE) || *to_end != '\0') { @@ -1057,7 +1044,7 @@ hexadecimal range format should use only capital characters")); errno = 0; newp->ucs4 = strtoul (name_end + 1, &endp, 16); if (endp - name_end != len1 - || (newp->ucs4 == ~((uint32_t) 0) && errno == ERANGE) + || (newp->ucs4 == ULONG_MAX && errno == ERANGE) || newp->ucs4 >= 0x80000000) /* This wasn't successful. Signal this name cannot be a correct UCS value. */ diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-address.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-address.c index 079aa0094d..96866a2ef6 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-address.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-address.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -29,7 +29,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -56,8 +55,6 @@ static struct { #define DEFINE_LANGUAGE_CODE(Name, Ab, Term, Lib) \ { #Ab, #Term, #Lib }, -#define DEFINE_LANGUAGE_CODE3(Name, Term, Lib) \ - { "", #Term, #Lib }, #include "iso-639.def" }; @@ -98,7 +95,7 @@ address_startup (struct linereader *lr, struct localedef_t *locale, void -address_finish (struct localedef_t *locale, const struct charmap_t *charmap) +address_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_address_t *address = locale->categories[LC_ADDRESS].address; size_t cnt; @@ -131,8 +128,8 @@ address_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (address == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_ADDRESS")); + error (0, 0, _("No definition for %s category found"), + "LC_ADDRESS"); address_startup (NULL, locale, 0); address = locale->categories[LC_ADDRESS].address; nothing = 1; @@ -142,8 +139,8 @@ No definition for %s category found"), "LC_ADDRESS")); if (address->postal_fmt == NULL) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "postal_fmt")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_ADDRESS", "postal_fmt"); /* Use as the default value the value of the i18n locale. */ address->postal_fmt = "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"; } @@ -154,8 +151,8 @@ No definition for %s category found"), "LC_ADDRESS")); const char *cp = address->postal_fmt; if (*cp == '\0') - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_ADDRESS", "postal_fmt")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_ADDRESS", "postal_fmt"); else while (*cp != '\0') { @@ -166,9 +163,9 @@ No definition for %s category found"), "LC_ADDRESS")); ++cp; if (strchr ("afdbshNtreCzTSc%", *cp) == NULL) { - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: invalid escape `%%%c' sequence in field `%s'"), - "LC_ADDRESS", *cp, "postal_fmt")); + "LC_ADDRESS", *cp, "postal_fmt"); break; } } @@ -180,8 +177,7 @@ No definition for %s category found"), "LC_ADDRESS")); if (address->cat == NULL) \ { \ if (verbose && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_ADDRESS", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", #cat); \ address->cat = ""; \ } @@ -198,16 +194,16 @@ No definition for %s category found"), "LC_ADDRESS")); if (address->lang_term == NULL) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "lang_term")); + error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", + "lang_term"); address->lang_term = ""; cnt = sizeof (iso639) / sizeof (iso639[0]); } else if (address->lang_term[0] == '\0') { if (verbose) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_ADDRESS", "lang_term")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_ADDRESS", "lang_term"); cnt = sizeof (iso639) / sizeof (iso639[0]); } else @@ -217,23 +213,22 @@ No definition for %s category found"), "LC_ADDRESS")); if (strcmp (address->lang_term, iso639[cnt].term) == 0) break; if (cnt == sizeof (iso639) / sizeof (iso639[0])) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: terminology language code `%s' not defined"), - "LC_ADDRESS", address->lang_term)); + "LC_ADDRESS", address->lang_term); } if (address->lang_ab == NULL) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "lang_ab")); + error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", "lang_ab"); address->lang_ab = ""; } else if (address->lang_ab[0] == '\0') { if (verbose) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_ADDRESS", "lang_ab")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_ADDRESS", "lang_ab"); } else { @@ -244,16 +239,15 @@ No definition for %s category found"), "LC_ADDRESS")); if (strcmp (address->lang_ab, iso639[cnt].ab) == 0) break; if (cnt == sizeof (iso639) / sizeof (iso639[0])) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: language abbreviation `%s' not defined"), - "LC_ADDRESS", address->lang_ab)); + "LC_ADDRESS", address->lang_ab); } else - if (strcmp (iso639[cnt].ab, address->lang_ab) != 0 - && iso639[cnt].ab[0] != '\0') - WITH_CUR_LOCALE (error (0, 0, _("\ + if (strcmp (iso639[cnt].ab, address->lang_ab) != 0) + error (0, 0, _("\ %s: `%s' value does not match `%s' value"), - "LC_ADDRESS", "lang_ab", "lang_term")); + "LC_ADDRESS", "lang_ab", "lang_term"); } if (address->lang_lib == NULL) @@ -262,8 +256,8 @@ No definition for %s category found"), "LC_ADDRESS")); else if (address->lang_lib[0] == '\0') { if (verbose) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_ADDRESS", "lang_lib")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_ADDRESS", "lang_lib"); } else { @@ -273,22 +267,22 @@ No definition for %s category found"), "LC_ADDRESS")); if (strcmp (address->lang_lib, iso639[cnt].lib) == 0) break; if (cnt == sizeof (iso639) / sizeof (iso639[0])) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: language abbreviation `%s' not defined"), - "LC_ADDRESS", address->lang_lib)); + "LC_ADDRESS", address->lang_lib); } else if (strcmp (iso639[cnt].ab, address->lang_ab) != 0) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: `%s' value does not match `%s' value"), "LC_ADDRESS", "lang_lib", - helper == 1 ? "lang_term" : "lang_ab")); + helper == 1 ? "lang_term" : "lang_ab"); } if (address->country_num == 0) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "country_num")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_ADDRESS", "country_num"); cnt = sizeof (iso3166) / sizeof (iso3166[0]); } else @@ -298,41 +292,39 @@ No definition for %s category found"), "LC_ADDRESS")); break; if (cnt == sizeof (iso3166) / sizeof (iso3166[0])) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: numeric country code `%d' not valid"), - "LC_ADDRESS", address->country_num)); + "LC_ADDRESS", address->country_num); } if (address->country_ab2 == NULL) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "country_ab2")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_ADDRESS", "country_ab2"); address->country_ab2 = " "; } else if (cnt != sizeof (iso3166) / sizeof (iso3166[0]) && strcmp (address->country_ab2, iso3166[cnt].ab2) != 0) - WITH_CUR_LOCALE (error (0, 0, - _("%s: `%s' value does not match `%s' value"), - "LC_ADDRESS", "country_ab2", "country_num")); + error (0, 0, _("%s: `%s' value does not match `%s' value"), + "LC_ADDRESS", "country_ab2", "country_num"); if (address->country_ab3 == NULL) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_ADDRESS", "country_ab3")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_ADDRESS", "country_ab3"); address->country_ab3 = " "; } else if (cnt != sizeof (iso3166) / sizeof (iso3166[0]) && strcmp (address->country_ab3, iso3166[cnt].ab3) != 0) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: `%s' value does not match `%s' value"), - "LC_ADDRESS", "country_ab3", "country_num")); + error (0, 0, _("%s: `%s' value does not match `%s' value"), + "LC_ADDRESS", "country_ab3", "country_num"); } void -address_output (struct localedef_t *locale, const struct charmap_t *charmap, +address_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_address_t *address = locale->categories[LC_ADDRESS].address; @@ -425,7 +417,7 @@ address_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)); - write_locale_data (output_path, LC_ADDRESS, "LC_ADDRESS", + write_locale_data (output_path, "LC_ADDRESS", 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov); } @@ -433,7 +425,7 @@ address_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_ADDRESS section of the locale definition. */ void address_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_address_t *address; @@ -447,7 +439,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -473,7 +465,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, /* Ignore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -490,7 +482,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_string) \ goto err_label; \ if (address->cat != NULL) \ @@ -527,7 +519,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_string && arg->tok != tok_number) \ goto err_label; \ if (address->cat != NULL) \ @@ -565,7 +557,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_number) \ goto err_label; \ else if (address->cat != 0) \ @@ -579,7 +571,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_ADDRESS'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -597,7 +589,7 @@ address_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-collate.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-collate.c index 9d2bca437a..6d238a658e 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-collate.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-collate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -27,11 +27,11 @@ #include #include -#include "localedef.h" #include "charmap.h" #include "localeinfo.h" #include "linereader.h" #include "locfile.h" +#include "localedef.h" #include "elem-hash.h" /* Uncomment the following line in the production version. */ @@ -384,9 +384,8 @@ new_symbol (struct locale_collate_t *collate, const char *name, size_t len) /* Test whether this name is already defined somewhere. */ static int check_duplicate (struct linereader *ldfile, struct locale_collate_t *collate, - const struct charmap_t *charmap, - struct repertoire_t *repertoire, const char *symbol, - size_t symbol_len) + struct charmap_t *charmap, struct repertoire_t *repertoire, + const char *symbol, size_t symbol_len) { void *ignore = NULL; @@ -427,14 +426,13 @@ check_duplicate (struct linereader *ldfile, struct locale_collate_t *collate, /* Read the direction specification. */ static void read_directions (struct linereader *ldfile, struct token *arg, - const struct charmap_t *charmap, - struct repertoire_t *repertoire, struct localedef_t *result) + struct charmap_t *charmap, struct repertoire_t *repertoire, + struct locale_collate_t *collate) { int cnt = 0; int max = nrules ?: 10; enum coll_sort_rule *rules = calloc (max, sizeof (*rules)); int warned = 0; - struct locale_collate_t *collate = result->categories[LC_COLLATE].collate; while (1) { @@ -510,7 +508,7 @@ read_directions (struct linereader *ldfile, struct token *arg, } if (valid) - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_eof || arg->tok == tok_eol || arg->tok == tok_comma || arg->tok == tok_semicolon) @@ -574,7 +572,7 @@ read_directions (struct linereader *ldfile, struct token *arg, } } - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); } if (nrules == 0) @@ -662,13 +660,11 @@ unlink_element (struct locale_collate_t *collate) static void insert_weights (struct linereader *ldfile, struct element_t *elem, - const struct charmap_t *charmap, - struct repertoire_t *repertoire, struct localedef_t *result, - enum token_t ellipsis) + struct charmap_t *charmap, struct repertoire_t *repertoire, + struct locale_collate_t *collate, enum token_t ellipsis) { int weight_cnt; struct token *arg; - struct locale_collate_t *collate = result->categories[LC_COLLATE].collate; /* Initialize all the fields. */ elem->file = ldfile->fname; @@ -701,7 +697,7 @@ insert_weights (struct linereader *ldfile, struct element_t *elem, weight_cnt = 0; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); do { if (arg->tok == tok_eof || arg->tok == tok_eol) @@ -871,11 +867,11 @@ insert_weights (struct linereader *ldfile, struct element_t *elem, break; } - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); /* This better should be the end of the line or a semicolon. */ if (arg->tok == tok_semicolon) /* OK, ignore this and read the next token. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); else if (arg->tok != tok_eof && arg->tok != tok_eol) { /* It's a syntax error. */ @@ -918,14 +914,13 @@ insert_weights (struct linereader *ldfile, struct element_t *elem, static int insert_value (struct linereader *ldfile, const char *symstr, size_t symlen, - const struct charmap_t *charmap, struct repertoire_t *repertoire, - struct localedef_t *result) + struct charmap_t *charmap, struct repertoire_t *repertoire, + struct locale_collate_t *collate) { /* First find out what kind of symbol this is. */ struct charseq *seq; uint32_t wc; struct element_t *elem = NULL; - struct locale_collate_t *collate = result->categories[LC_COLLATE].collate; /* Try to find the character in the charmap. */ seq = charmap_find_value (charmap, symstr, symlen); @@ -1026,7 +1021,7 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen, return 1; } - insert_weights (ldfile, elem, charmap, repertoire, result, tok_none); + insert_weights (ldfile, elem, charmap, repertoire, collate, tok_none); return 0; } @@ -1034,13 +1029,12 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen, static void handle_ellipsis (struct linereader *ldfile, const char *symstr, size_t symlen, - enum token_t ellipsis, const struct charmap_t *charmap, + enum token_t ellipsis, struct charmap_t *charmap, struct repertoire_t *repertoire, - struct localedef_t *result) + struct locale_collate_t *collate) { struct element_t *startp; struct element_t *endp; - struct locale_collate_t *collate = result->categories[LC_COLLATE].collate; /* Unlink the entry added for the ellipsis. */ unlink_element (collate); @@ -1048,7 +1042,7 @@ handle_ellipsis (struct linereader *ldfile, const char *symstr, size_t symlen, /* Process and add the end-entry. */ if (symstr != NULL - && insert_value (ldfile, symstr, symlen, charmap, repertoire, result)) + && insert_value (ldfile, symstr, symlen, charmap, repertoire, collate)) /* Something went wrong with inserting the to-value. This means we cannot process the ellipsis. */ return; @@ -1475,7 +1469,7 @@ collate_startup (struct linereader *ldfile, struct localedef_t *locale, void -collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) +collate_finish (struct localedef_t *locale, struct charmap_t *charmap) { /* Now is the time when we can assign the individual collation values for all the symbols. We have possibly different values @@ -1516,8 +1510,7 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) { /* No data, no check. */ if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("No definition for %s category found"), - "LC_COLLATE")); + error (0, 0, _("No definition for %s category found"), "LC_COLLATE"); return; } @@ -1532,9 +1525,9 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) && ((sect->rules[i] & sort_position) != (collate->sections->rules[i] & sort_position))) { - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: `position' must be used for a specific level in all sections or none"), - "LC_COLLATE")); + "LC_COLLATE"); break; } @@ -1555,10 +1548,9 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) { if (runp->weights[i].w[j]->weights == NULL) { - WITH_CUR_LOCALE (error_at_line (0, 0, runp->file, - runp->line, - _("symbol `%s' not defined"), - runp->weights[i].w[j]->name)); + error_at_line (0, 0, runp->file, runp->line, + _("symbol `%s' not defined"), + runp->weights[i].w[j]->name); need_undefined = 1; runp->weights[i].w[j] = &collate->undefined; @@ -1631,14 +1623,11 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) /* This should not happen. It means that we have to symbols with the same byte sequence. It is of course an error. */ - WITH_CUR_LOCALE (error_at_line (0, 0, (*eptr)->file, - (*eptr)->line, - _("\ -symbol `%s' has the same encoding as"), (*eptr)->name); - error_at_line (0, 0, runp->file, - runp->line, - _("symbol `%s'"), - runp->name)); + error_at_line (0, 0, (*eptr)->file, (*eptr)->line, + _("symbol `%s' has the same encoding as"), + (*eptr)->name); + error_at_line (0, 0, runp->file, runp->line, + _("symbol `%s'"), runp->name); goto dont_insert; } else if (c < 0) @@ -1677,9 +1666,6 @@ symbol `%s' has the same encoding as"), (*eptr)->name); runp->wcseqorder = wcseqact++; } - else if (runp->mbs != NULL && runp->weights != NULL) - /* This is for collation elements. */ - runp->wcseqorder = wcseqact++; /* Up to the next entry. */ runp = runp->next; @@ -1714,9 +1700,8 @@ symbol `%s' has the same encoding as"), (*eptr)->name); struct element_t *lastp; /* Insert the collation sequence value. */ - if (runp->is_character) - collseq_table_add (&collate->wcseqorder, runp->wcs[0], - runp->wcseqorder); + collseq_table_add (&collate->wcseqorder, runp->wcs[0], + runp->wcseqorder); /* Find the point where to insert in the list. */ e = wchead_table_get (&collate->wcheads, runp->wcs[0]); @@ -1737,14 +1722,11 @@ symbol `%s' has the same encoding as"), (*eptr)->name); /* This should not happen. It means that we have two symbols with the same byte sequence. It is of course an error. */ - WITH_CUR_LOCALE (error_at_line (0, 0, (*eptr)->file, - (*eptr)->line, - _("\ -symbol `%s' has the same encoding as"), (*eptr)->name); - error_at_line (0, 0, runp->file, - runp->line, - _("symbol `%s'"), - runp->name)); + error_at_line (0, 0, (*eptr)->file, (*eptr)->line, + _("symbol `%s' has the same encoding as"), + (*eptr)->name); + error_at_line (0, 0, runp->file, runp->line, + _("symbol `%s'"), runp->name); goto dont_insertwc; } else if (c < 0) @@ -1785,7 +1767,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); /* This seems not to be enforced by recent standards. Don't emit an error, simply append UNDEFINED at the end. */ if (0) - WITH_CUR_LOCALE (error (0, 0, _("no definition of `UNDEFINED'"))); + error (0, 0, _("no definition of `UNDEFINED'")); /* Add UNDEFINED at the end. */ collate->undefined.mborder = @@ -1809,15 +1791,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name); sect = collate->sections; while (sect != NULL && sect->rules == NULL) sect = sect->next; - - /* Bail out if we have no sections because of earlier errors. */ - if (sect == NULL) - { - WITH_CUR_LOCALE (error (EXIT_FAILURE, 0, - _("too many errors; giving up"))); - return; - } - + assert (sect != NULL); ruleidx = 0; do { @@ -1923,7 +1897,7 @@ output_weightwc (struct obstack *pool, struct locale_collate_t *collate, void -collate_output (struct localedef_t *locale, const struct charmap_t *charmap, +collate_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_collate_t *collate = locale->categories[LC_COLLATE].collate; @@ -1987,7 +1961,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE)); - write_locale_data (output_path, LC_COLLATE, "LC_COLLATE", 2 + cnt, iov); + write_locale_data (output_path, "LC_COLLATE", 2 + cnt, iov); return; } @@ -2571,7 +2545,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE)); - write_locale_data (output_path, LC_COLLATE, "LC_COLLATE", 2 + cnt, iov); + write_locale_data (output_path, "LC_COLLATE", 2 + cnt, iov); obstack_free (&weightpool, NULL); obstack_free (&extrapool, NULL); @@ -2581,7 +2555,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, void collate_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -2611,7 +2585,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -2619,18 +2593,18 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (nowtok == tok_copy) { state = 2; - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_string) { SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE"); skip_category: do - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok != tok_eof && now->tok != tok_end); if (now->tok != tok_eof - || (now = lr_token (ldfile, charmap, result, NULL, verbose), + || (now = lr_token (ldfile, charmap, NULL, verbose), now->tok == tok_eof)) lr_error (ldfile, _("%s: premature end of file"), "LC_COLLATE"); else if (now->tok != tok_lc_collate) @@ -2660,7 +2634,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, lr_ignore_rest (ldfile, 1); - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } @@ -2681,7 +2655,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -2690,7 +2664,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, { case tok_copy: /* Allow copying other locales. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_string) goto err_label; @@ -2713,7 +2687,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (state != 0) goto err_label; - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok != tok_number) goto err_label; if (collate->col_weight_max != -1) @@ -2736,7 +2710,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (state != 0) goto err_label; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) goto err_label; else if (!ignore_content) @@ -2783,7 +2757,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (state != 0 && state != 2) goto err_label; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) goto err_label; else @@ -2792,7 +2766,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, size_t symbol_len = arg->val.str.lenmb; /* Next the `from' keyword. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_from) { free ((char *) symbol); @@ -2803,7 +2777,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, ldfile->translate_strings = 1; /* Finally the string with the replacement. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); ldfile->return_widestr = 0; ldfile->translate_strings = 0; @@ -2852,7 +2826,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (state != 0 && state != 2) goto err_label; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) goto err_label; else @@ -2863,13 +2837,12 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, size_t endsymbol_len = 0; enum token_t ellipsis = tok_none; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_ellipsis2 || arg->tok == tok_ellipsis4) { ellipsis = arg->tok; - arg = lr_token (ldfile, charmap, result, repertoire, - verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) { free (symbol); @@ -3000,7 +2973,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, if (state != 0) goto err_label; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) goto err_label; else @@ -3011,7 +2984,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, size_t symname_len; struct symbol_t *symval; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) { if (newname != NULL) @@ -3068,7 +3041,7 @@ error while adding equivalent collating symbol")); case tok_script: /* We get told about the scripts we know. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_bsymbol) goto err_label; else @@ -3120,7 +3093,7 @@ error while adding equivalent collating symbol")); /* The 14652 draft does not specify whether all `order_start' lines must contain the same number of sort-rules, but 14651 does. So we require this here as well. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_bsymbol) { /* This better should be a section name. */ @@ -3179,8 +3152,7 @@ error while adding equivalent collating symbol")); } /* Next should come the end of the line or a semicolon. */ - arg = lr_token (ldfile, charmap, result, repertoire, - verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_eol) { uint32_t cnt; @@ -3203,8 +3175,7 @@ error while adding equivalent collating symbol")); } /* Get the next token. */ - arg = lr_token (ldfile, charmap, result, repertoire, - verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); } } else @@ -3227,7 +3198,7 @@ error while adding equivalent collating symbol")); } /* Now read the direction names. */ - read_directions (ldfile, arg, charmap, repertoire, result); + read_directions (ldfile, arg, charmap, repertoire, collate); /* From now we need the strings untranslated. */ ldfile->translate_strings = 0; @@ -3249,7 +3220,7 @@ error while adding equivalent collating symbol")); if (was_ellipsis != tok_none) { handle_ellipsis (ldfile, NULL, 0, was_ellipsis, charmap, - repertoire, result); + repertoire, collate); was_ellipsis = tok_none; } @@ -3277,7 +3248,7 @@ error while adding equivalent collating symbol")); { handle_ellipsis (ldfile, arg->val.str.startmb, arg->val.str.lenmb, was_ellipsis, charmap, - repertoire, result); + repertoire, collate); was_ellipsis = tok_none; } } @@ -3285,7 +3256,7 @@ error while adding equivalent collating symbol")); goto err_label; state = 3; - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_bsymbol || arg->tok == tok_ucs4) { /* Find this symbol in the sequence table. */ @@ -3399,14 +3370,14 @@ error while adding equivalent collating symbol")); if (was_ellipsis != tok_none) { handle_ellipsis (ldfile, NULL, 0, was_ellipsis, charmap, - repertoire, result); + repertoire, collate); was_ellipsis = tok_none; } } else if (state == 3) { - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: missing `reorder-end' keyword"), "LC_COLLATE")); + error (0, 0, _("%s: missing `reorder-end' keyword"), + "LC_COLLATE"); state = 4; } else if (state != 2 && state != 4) @@ -3414,7 +3385,7 @@ error while adding equivalent collating symbol")); state = 5; /* Get the name of the sections we are adding after. */ - arg = lr_token (ldfile, charmap, result, repertoire, verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok == tok_bsymbol) { /* Now find a section with this name. */ @@ -3447,7 +3418,7 @@ error while adding equivalent collating symbol")); { lr_ignore_rest (ldfile, 0); - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } while (now->tok == tok_reorder_sections_after || now->tok == tok_reorder_sections_end @@ -3497,18 +3468,11 @@ error while adding equivalent collating symbol")); symstr = ucs4buf; symlen = 9; } - else if (arg != NULL) + else { symstr = arg->val.str.startmb; symlen = arg->val.str.lenmb; } - else - { - lr_error (ldfile, _("%s: bad symbol <%.*s>"), "LC_COLLATE", - (int) ldfile->token.val.str.lenmb, - ldfile->token.val.str.startmb); - break; - } if (state == 0) { @@ -3548,7 +3512,7 @@ error while adding equivalent collating symbol")); { handle_ellipsis (ldfile, symstr, symlen, was_ellipsis, - charmap, repertoire, result); + charmap, repertoire, collate); /* Remember that we processed the ellipsis. */ was_ellipsis = tok_none; @@ -3608,7 +3572,7 @@ error while adding equivalent collating symbol")); seqp->section->last = seqp->last; /* Now insert it in the new place. */ - insert_weights (ldfile, seqp, charmap, repertoire, result, + insert_weights (ldfile, seqp, charmap, repertoire, collate, tok_none); break; } @@ -3653,11 +3617,10 @@ error while adding equivalent collating symbol")); /* Process the rest of the line which might change the collation rules. */ - arg = lr_token (ldfile, charmap, result, repertoire, - verbose); + arg = lr_token (ldfile, charmap, repertoire, verbose); if (arg->tok != tok_eof && arg->tok != tok_eol) read_directions (ldfile, arg, charmap, repertoire, - result); + collate); } break; } @@ -3669,7 +3632,7 @@ error while adding equivalent collating symbol")); assert (state == 1); handle_ellipsis (ldfile, symstr, symlen, was_ellipsis, charmap, - repertoire, result); + repertoire, collate); /* Remember that we processed the ellipsis. */ was_ellipsis = tok_none; @@ -3679,7 +3642,7 @@ error while adding equivalent collating symbol")); } /* Now insert in the new place. */ - insert_value (ldfile, symstr, symlen, charmap, repertoire, result); + insert_value (ldfile, symstr, symlen, charmap, repertoire, collate); break; case tok_undefined: @@ -3718,7 +3681,7 @@ error while adding equivalent collating symbol")); else /* Parse the weights. */ insert_weights (ldfile, &collate->undefined, charmap, - repertoire, result, tok_none); + repertoire, collate, tok_none); break; case tok_ellipsis2: /* symbolic hexadecimal ellipsis */ @@ -3735,7 +3698,7 @@ error while adding equivalent collating symbol")); was_ellipsis = nowtok; insert_weights (ldfile, &collate->ellipsis_weight, charmap, - repertoire, result, nowtok); + repertoire, collate, nowtok); break; case tok_end: @@ -3757,18 +3720,18 @@ error while adding equivalent collating symbol")); if (was_ellipsis != tok_none) { handle_ellipsis (ldfile, NULL, 0, was_ellipsis, charmap, - repertoire, result); + repertoire, collate); was_ellipsis = tok_none; } } else if (state == 3) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: missing `reorder-end' keyword"), "LC_COLLATE")); + error (0, 0, _("%s: missing `reorder-end' keyword"), + "LC_COLLATE"); else if (state == 5) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: missing `reorder-sections-end' keyword"), "LC_COLLATE")); + error (0, 0, _("%s: missing `reorder-sections-end' keyword"), + "LC_COLLATE"); } - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -3785,7 +3748,7 @@ error while adding equivalent collating symbol")); } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-ctype.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-ctype.c index 2a2c831481..fbcf388cb7 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-ctype.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-ctype.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -33,13 +33,13 @@ #include #include -#include "localedef.h" #include "charmap.h" #include "localeinfo.h" #include "langinfo.h" #include "linereader.h" #include "locfile-token.h" #include "locfile.h" +#include "localedef.h" #include @@ -205,7 +205,6 @@ struct locale_ctype_t struct obstack mempool; }; - /* Marker for an empty slot. This has the value 0xFFFFFFFF, regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ #define EMPTY ((uint32_t) ~0) @@ -217,21 +216,21 @@ struct locale_ctype_t /* Prototypes for local functions. */ static void ctype_startup (struct linereader *lr, struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct localedef_t *copy_locale, int ignore_content); static void ctype_class_new (struct linereader *lr, struct locale_ctype_t *ctype, const char *name); static void ctype_map_new (struct linereader *lr, struct locale_ctype_t *ctype, - const char *name, const struct charmap_t *charmap); + const char *name, struct charmap_t *charmap); static uint32_t *find_idx (struct locale_ctype_t *ctype, uint32_t **table, size_t *max, size_t *act, unsigned int idx); static void set_class_defaults (struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire); static void allocate_arrays (struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire); @@ -250,8 +249,8 @@ static const unsigned char digits[] = "0123456789"; static void ctype_startup (struct linereader *lr, struct localedef_t *locale, - const struct charmap_t *charmap, - struct localedef_t *copy_locale, int ignore_content) + struct charmap_t *charmap, struct localedef_t *copy_locale, + int ignore_content) { unsigned int cnt; struct locale_ctype_t *ctype; @@ -348,7 +347,7 @@ ctype_startup (struct linereader *lr, struct localedef_t *locale, void -ctype_finish (struct localedef_t *locale, const struct charmap_t *charmap) +ctype_finish (struct localedef_t *locale, struct charmap_t *charmap) { /* See POSIX.2, table 2-6 for the meaning of the following table. */ #define NCLASS 12 @@ -413,8 +412,7 @@ ctype_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (ctype == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_CTYPE")); + error (0, 0, _("No definition for %s category found"), "LC_CTYPE"); ctype_startup (NULL, locale, charmap, NULL, 0); ctype = locale->categories[LC_CTYPE].ctype; } @@ -432,8 +430,7 @@ No definition for %s category found"), "LC_CTYPE")); if (ctype->codeset_name == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No character set name specified in charmap"))); + error (0, 0, _("No character set name specified in charmap")); ctype->codeset_name = "//UNKNOWN//"; } @@ -461,12 +458,11 @@ No character set name specified in charmap"))); uint32_t value = ctype->charnames[cnt]; if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ character L'\\u%0*x' in class `%s' must be in class `%s'"), - value > 0xffff ? 8 : 4, - value, - valid_table[cls1].name, - valid_table[cls2].name)); + value > 0xffff ? 8 : 4, value, + valid_table[cls1].name, + valid_table[cls2].name); } break; @@ -476,12 +472,11 @@ character L'\\u%0*x' in class `%s' must be in class `%s'"), uint32_t value = ctype->charnames[cnt]; if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ character L'\\u%0*x' in class `%s' must not be in class `%s'"), - value > 0xffff ? 8 : 4, - value, - valid_table[cls1].name, - valid_table[cls2].name)); + value > 0xffff ? 8 : 4, value, + valid_table[cls1].name, + valid_table[cls2].name); } break; @@ -490,8 +485,8 @@ character L'\\u%0*x' in class `%s' must not be in class `%s'"), break; default: - WITH_CUR_LOCALE (error (5, 0, _("\ -internal error in %s, line %u"), __FUNCTION__, __LINE__)); + error (5, 0, _("internal error in %s, line %u"), + __FUNCTION__, __LINE__); } } } @@ -519,11 +514,10 @@ internal error in %s, line %u"), __FUNCTION__, __LINE__)); snprintf (buf, sizeof buf, "\\%Zo", cnt); if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ character '%s' in class `%s' must be in class `%s'"), - buf, - valid_table[cls1].name, - valid_table[cls2].name)); + buf, valid_table[cls1].name, + valid_table[cls2].name); } break; @@ -535,11 +529,10 @@ character '%s' in class `%s' must be in class `%s'"), snprintf (buf, sizeof buf, "\\%Zo", cnt); if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ character '%s' in class `%s' must not be in class `%s'"), - buf, - valid_table[cls1].name, - valid_table[cls2].name)); + buf, valid_table[cls1].name, + valid_table[cls2].name); } break; @@ -548,8 +541,8 @@ character '%s' in class `%s' must not be in class `%s'"), break; default: - WITH_CUR_LOCALE (error (5, 0, _("\ -internal error in %s, line %u"), __FUNCTION__, __LINE__)); + error (5, 0, _("internal error in %s, line %u"), + __FUNCTION__, __LINE__); } } } @@ -565,8 +558,8 @@ internal error in %s, line %u"), __FUNCTION__, __LINE__)); & BITw (tok_blank)) == 0))) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _(" character not in class `%s'"), - valid_table[cnt].name)); + error (0, 0, _(" character not in class `%s'"), + valid_table[cnt].name); } else if (((cnt = BITPOS (tok_punct), (ELEM (ctype, class_collection, , space_value) @@ -577,9 +570,8 @@ internal error in %s, line %u"), __FUNCTION__, __LINE__)); != 0))) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ - character must not be in class `%s'"), - valid_table[cnt].name)); + error (0, 0, _(" character must not be in class `%s'"), + valid_table[cnt].name); } else ELEM (ctype, class_collection, , space_value) |= BITw (tok_print); @@ -592,8 +584,7 @@ internal error in %s, line %u"), __FUNCTION__, __LINE__)); if (space_seq == NULL || space_seq->nbytes != 1) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -character not defined in character map"))); + error (0, 0, _("character not defined in character map")); } else if (((cnt = BITPOS (tok_space), (ctype->class256_collection[space_seq->bytes[0]] @@ -603,8 +594,8 @@ character not defined in character map"))); & BIT (tok_blank)) == 0))) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _(" character not in class `%s'"), - valid_table[cnt].name)); + error (0, 0, _(" character not in class `%s'"), + valid_table[cnt].name); } else if (((cnt = BITPOS (tok_punct), (ctype->class256_collection[space_seq->bytes[0]] @@ -614,9 +605,8 @@ character not defined in character map"))); & BIT (tok_graph)) != 0))) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ - character must not be in class `%s'"), - valid_table[cnt].name)); + error (0, 0, _(" character must not be in class `%s'"), + valid_table[cnt].name); } else ctype->class256_collection[space_seq->bytes[0]] |= BIT (tok_print); @@ -706,8 +696,7 @@ character not defined in character map"))); assert (ctype->mbdigits_act == ctype->wcdigits_act); ctype->wcdigits_act -= ctype->mbdigits_act % 10; ctype->mbdigits_act -= ctype->mbdigits_act % 10; - WITH_CUR_LOCALE (error (0, 0, _("\ -`digit' category has not entries in groups of ten"))); + error (0, 0, _("`digit' category has not entries in groups of ten")); } /* Check the input digits. There must be a multiple of ten available. @@ -738,7 +727,7 @@ character not defined in character map"))); { if (ctype->mbdigits_max == 0) { - ctype->mbdigits = obstack_alloc (&((struct charmap_t *) charmap)->mem_pool, + ctype->mbdigits = obstack_alloc (&charmap->mem_pool, 10 * sizeof (struct charseq *)); ctype->mbdigits_max = 10; } @@ -755,10 +744,10 @@ character not defined in character map"))); if (ctype->mbdigits[cnt] == NULL) { /* Hum, this ain't good. */ - WITH_CUR_LOCALE (error (0, 0, _("\ -no input digits defined and none of the standard names in the charmap"))); + error (0, 0, _("\ +no input digits defined and none of the standard names in the charmap")); - ctype->mbdigits[cnt] = obstack_alloc (&((struct charmap_t *) charmap)->mem_pool, + ctype->mbdigits[cnt] = obstack_alloc (&charmap->mem_pool, sizeof (struct charseq) + 1); /* This is better than nothing. */ @@ -800,7 +789,7 @@ no input digits defined and none of the standard names in the charmap"))); { if (ctype->wcdigits_max == 0) { - ctype->wcdigits = obstack_alloc (&((struct charmap_t *) charmap)->mem_pool, + ctype->wcdigits = obstack_alloc (&charmap->mem_pool, 10 * sizeof (uint32_t)); ctype->wcdigits_max = 10; } @@ -820,8 +809,8 @@ no input digits defined and none of the standard names in the charmap"))); if (!warned) { - WITH_CUR_LOCALE (error (0, 0, _("\ -not all characters used in `outdigit' are available in the charmap"))); + error (0, 0, _("\ +not all characters used in `outdigit' are available in the charmap")); warned = 1; } @@ -837,8 +826,8 @@ not all characters used in `outdigit' are available in the charmap"))); { if (!warned) { - WITH_CUR_LOCALE (error (0, 0, _("\ -not all characters used in `outdigit' are available in the repertoire"))); + error (0, 0, _("\ +not all characters used in `outdigit' are available in the repertoire")); warned = 1; } @@ -875,7 +864,7 @@ not all characters used in `outdigit' are available in the repertoire"))); void -ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, +ctype_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { static const char nulbytes[4] = { 0, 0, 0, 0 }; @@ -1214,8 +1203,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (2 + elem + offset == (nelems + 2 * ctype->nr_charclass + ctype->map_collection_nr + 4 + 2)); - write_locale_data (output_path, LC_CTYPE, "LC_CTYPE", 2 + elem + offset, - iov); + write_locale_data (output_path, "LC_CTYPE", 2 + elem + offset, iov); } @@ -1238,9 +1226,9 @@ ctype_class_new (struct linereader *lr, struct locale_ctype_t *ctype, if (ctype->nr_charclass == MAX_NR_CHARCLASS) /* Exit code 2 is prescribed in P1003.2b. */ - WITH_CUR_LOCALE (error (2, 0, _("\ + error (2, 0, _("\ implementation limit: no more than %Zd character classes allowed"), - MAX_NR_CHARCLASS)); + MAX_NR_CHARCLASS); ctype->classnames[ctype->nr_charclass++] = name; } @@ -1248,7 +1236,7 @@ implementation limit: no more than %Zd character classes allowed"), static void ctype_map_new (struct linereader *lr, struct locale_ctype_t *ctype, - const char *name, const struct charmap_t *charmap) + const char *name, struct charmap_t *charmap) { size_t max_chars = 0; size_t cnt; @@ -1270,9 +1258,9 @@ ctype_map_new (struct linereader *lr, struct locale_ctype_t *ctype, if (ctype->map_collection_nr == MAX_NR_CHARMAP) /* Exit code 2 is prescribed in P1003.2b. */ - WITH_CUR_LOCALE (error (2, 0, _("\ + error (2, 0, _("\ implementation limit: no more than %d character maps allowed"), - MAX_NR_CHARMAP)); + MAX_NR_CHARMAP); ctype->mapnames[cnt] = name; @@ -1358,7 +1346,7 @@ find_idx (struct locale_ctype_t *ctype, uint32_t **table, size_t *max, static int -get_character (struct token *now, const struct charmap_t *charmap, +get_character (struct token *now, struct charmap_t *charmap, struct repertoire_t *repertoire, struct charseq **seqp, uint32_t *wchp) { @@ -1442,7 +1430,7 @@ get_character (struct token *now, const struct charmap_t *charmap, static void charclass_symbolic_ellipsis (struct linereader *ldfile, struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire, struct token *now, const char *last_str, @@ -1554,7 +1542,7 @@ charclass_symbolic_ellipsis (struct linereader *ldfile, static void charclass_ucs4_ellipsis (struct linereader *ldfile, struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire, struct token *now, uint32_t last_wch, unsigned long int class256_bit, @@ -1679,7 +1667,7 @@ to-value of range is smaller than from-value "), static void charclass_charcode_ellipsis (struct linereader *ldfile, struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire, struct token *now, char *last_charcode, uint32_t last_charcode_len, @@ -1787,104 +1775,10 @@ to-value character sequence is smaller than from-value sequence")); } -static uint32_t * -find_translit2 (struct locale_ctype_t *ctype, const struct charmap_t *charmap, - uint32_t wch) -{ - struct translit_t *trunp = ctype->translit; - struct translit_ignore_t *tirunp = ctype->translit_ignore; - - while (trunp != NULL) - { - /* XXX We simplify things here. The transliterations we look - for are only allowed to have one character. */ - if (trunp->from[0] == wch && trunp->from[1] == 0) - { - /* Found it. Now look for a transliteration which can be - represented with the character set. */ - struct translit_to_t *torunp = trunp->to; - - while (torunp != NULL) - { - int i; - - for (i = 0; torunp->str[i] != 0; ++i) - { - char utmp[10]; - - snprintf (utmp, sizeof (utmp), "U%08X", torunp->str[i]); - if (charmap_find_value (charmap, utmp, 9) == NULL) - /* This character cannot be represented. */ - break; - } - - if (torunp->str[i] == 0) - return torunp->str; - - torunp = torunp->next; - } - - break; - } - - trunp = trunp->next; - } - - /* Check for ignored chars. */ - while (tirunp != NULL) - { - if (tirunp->from <= wch && tirunp->to >= wch) - { - uint32_t wi; - - for (wi = tirunp->from; wi <= wch; wi += tirunp->step) - if (wi == wch) - return (uint32_t []) { 0 }; - } - } - - /* Nothing found. */ - return NULL; -} - - -uint32_t * -find_translit (struct localedef_t *locale, const struct charmap_t *charmap, - uint32_t wch) -{ - struct locale_ctype_t *ctype; - uint32_t *result = NULL; - - assert (locale != NULL); - ctype = locale->categories[LC_CTYPE].ctype; - - if (ctype->translit != NULL) - result = find_translit2 (ctype, charmap, wch); - - if (result == NULL) - { - struct translit_include_t *irunp = ctype->translit_include; - - while (irunp != NULL && result == NULL) - { - result = find_translit (find_locale (CTYPE_LOCALE, - irunp->copy_locale, - irunp->copy_repertoire, - charmap), - charmap, wch); - irunp = irunp->next; - } - } - - return result; -} - - /* Read one transliteration entry. */ static uint32_t * read_widestring (struct linereader *ldfile, struct token *now, - const struct charmap_t *charmap, - struct repertoire_t *repertoire) + struct charmap_t *charmap, struct repertoire_t *repertoire) { uint32_t *wstr; @@ -1954,7 +1848,7 @@ read_widestring (struct linereader *ldfile, struct token *now, static void read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, - struct token *now, const struct charmap_t *charmap, + struct token *now, struct charmap_t *charmap, struct repertoire_t *repertoire) { uint32_t *from_wstr = read_widestring (ldfile, now, charmap, repertoire); @@ -1985,7 +1879,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, /* Next we have one or more transliterations. They are separated by semicolons. */ - now = lr_token (ldfile, charmap, NULL, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (!first && (now->tok == tok_semicolon || now->tok == tok_eol)) { @@ -2038,7 +1932,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, static void read_translit_ignore_entry (struct linereader *ldfile, struct locale_ctype_t *ctype, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct repertoire_t *repertoire) { /* We expect a semicolon-separated list of characters we ignore. We are @@ -2046,8 +1940,7 @@ read_translit_ignore_entry (struct linereader *ldfile, single characters, possibly defining a range when an ellipsis is used. */ while (1) { - struct token *now = lr_token (ldfile, charmap, NULL, repertoire, - verbose); + struct token *now = lr_token (ldfile, charmap, repertoire, verbose); struct translit_ignore_t *newp; uint32_t from; @@ -2091,7 +1984,7 @@ read_translit_ignore_entry (struct linereader *ldfile, /* Now we expect either a semicolon, an ellipsis, or the end of the line. */ - now = lr_token (ldfile, charmap, NULL, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok == tok_ellipsis2 || now->tok == tok_ellipsis2_2) { @@ -2100,7 +1993,7 @@ read_translit_ignore_entry (struct linereader *ldfile, uint32_t to; int step = now->tok == tok_ellipsis2_2 ? 2 : 1; - now = lr_token (ldfile, charmap, NULL, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok == tok_eol || now->tok == tok_eof) { @@ -2141,7 +2034,7 @@ to-value of range is smaller than from-value "), } /* And the next token. */ - now = lr_token (ldfile, charmap, NULL, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); } if (now->tok == tok_eol || now->tok == tok_eof) @@ -2163,7 +2056,7 @@ to-value of range is smaller than from-value "), /* The parser for the LC_CTYPE section of the locale definition. */ void ctype_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -2192,7 +2085,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -2200,18 +2093,18 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, /* If we see `copy' now we are almost done. */ if (nowtok == tok_copy) { - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_string) { SYNTAX_ERROR (_("%s: syntax error"), "LC_CTYPE"); skip_category: do - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok != tok_eof && now->tok != tok_end); if (now->tok != tok_eof - || (now = lr_token (ldfile, charmap, NULL, NULL, verbose), + || (now = lr_token (ldfile, charmap, NULL, verbose), now->tok == tok_eof)) lr_error (ldfile, _("%s: premature end of file"), "LC_CTYPE"); else if (now->tok != tok_lc_ctype) @@ -2241,7 +2134,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, lr_ignore_rest (ldfile, 1); - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } @@ -2266,7 +2159,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -2274,14 +2167,14 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, switch (nowtok) { case tok_charclass: - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok == tok_ident || now->tok == tok_string) { ctype_class_new (ldfile, ctype, now->val.str.startmb); - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) break; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } if (now->tok != tok_eol) SYNTAX_ERROR (_("\ @@ -2289,14 +2182,14 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, break; case tok_charconv: - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok == tok_ident || now->tok == tok_string) { ctype_map_new (ldfile, ctype, now->val.str.startmb, charmap); - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) break; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } if (now->tok != tok_eol) SYNTAX_ERROR (_("\ @@ -2314,7 +2207,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, /* We simply forget the `class' keyword and use the following operand to determine the bit. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_ident || now->tok == tok_string) { /* Must can be one of the predefined class names. */ @@ -2360,7 +2253,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, } /* The next character must be a semicolon. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) goto err_label; goto read_charclass; @@ -2392,7 +2285,7 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, last_token = tok_none; ellipsis_token = tok_none; step = 1; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok != tok_eol && now->tok != tok_eof) { uint32_t wch; @@ -2529,7 +2422,7 @@ with character code range values one must use the absolute ellipsis `...'")); } /* Next we expect a semicolon or the end of the line. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_eol || now->tok == tok_eof) break; @@ -2549,7 +2442,7 @@ with character code range values one must use the absolute ellipsis `...'")); ellipsis_token = now->tok; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); continue; } @@ -2557,7 +2450,7 @@ with character code range values one must use the absolute ellipsis `...'")); goto err_label; /* And get the next character. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); ellipsis_token = tok_none; step = 1; @@ -2632,7 +2525,7 @@ with character code range values one must use the absolute ellipsis `...'")); /* We simply forget the `map' keyword and use the following operand to determine the mapping. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_ident || now->tok == tok_string) { size_t cnt; @@ -2654,7 +2547,7 @@ with character code range values one must use the absolute ellipsis `...'")); else mapidx = now->tok - tok_toupper; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); /* This better should be a semicolon. */ if (now->tok != tok_semicolon) goto err_label; @@ -2670,7 +2563,7 @@ with character code range values one must use the absolute ellipsis `...'")); } ctype->tomap_done[mapidx] = 1; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); while (now->tok != tok_eol && now->tok != tok_eof) { struct charseq *from_seq; @@ -2683,24 +2576,24 @@ with character code range values one must use the absolute ellipsis `...'")); goto err_label; /* Next comes the from-value. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (get_character (now, charmap, repertoire, &from_seq, &from_wch) != 0) goto err_label; /* The next is a comma. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_comma) goto err_label; /* And the other value. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (get_character (now, charmap, repertoire, &to_seq, &to_wch) != 0) goto err_label; /* And the last thing is the closing brace. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_close_brace) goto err_label; @@ -2722,9 +2615,9 @@ with character code range values one must use the absolute ellipsis `...'")); } /* Now comes a semicolon or the end of the line/file. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_semicolon) - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } break; @@ -2736,7 +2629,7 @@ with character code range values one must use the absolute ellipsis `...'")); do { lr_ignore_rest (ldfile, 0); - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } while (now->tok != tok_translit_end && now->tok != tok_eof); @@ -2759,7 +2652,7 @@ with character code range values one must use the absolute ellipsis `...'")); ldfile->return_widestr = 1; /* We proceed until we see the `translit_end' token. */ - while (now = lr_token (ldfile, charmap, NULL, repertoire, verbose), + while (now = lr_token (ldfile, charmap, repertoire, verbose), now->tok != tok_translit_end && now->tok != tok_eof) { if (now->tok == tok_eol) @@ -2773,7 +2666,7 @@ with character code range values one must use the absolute ellipsis `...'")); const char *repertoire_name; struct translit_include_t *include_stmt, **include_ptr; - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); /* This should be a string or an identifier. In any case something to name a locale. */ if (now->tok != tok_string && now->tok != tok_ident) @@ -2786,19 +2679,16 @@ with character code range values one must use the absolute ellipsis `...'")); locale_name = now->val.str.startmb; /* Next should be a semicolon. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) goto translit_syntax; /* Now the repertoire name. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if ((now->tok != tok_string && now->tok != tok_ident) || now->val.str.startmb == NULL) goto translit_syntax; repertoire_name = now->val.str.startmb; - if (repertoire_name[0] == '\0') - /* Ignore the empty string. */ - repertoire_name = NULL; /* Save the include statement for later processing. */ include_stmt = (struct translit_include_t *) @@ -2828,7 +2718,7 @@ with character code range values one must use the absolute ellipsis `...'")); { /* We expect a single character or string as the argument. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); wstr = read_widestring (ldfile, now, charmap, repertoire); @@ -2838,11 +2728,10 @@ with character code range values one must use the absolute ellipsis `...'")); { lr_error (ldfile, _("\ %s: duplicate `default_missing' definition"), "LC_CTYPE"); - WITH_CUR_LOCALE (error_at_line (0, 0, - ctype->default_missing_file, - ctype->default_missing_lineno, - _("\ -previous definition was here"))); + error_at_line (0, 0, ctype->default_missing_file, + ctype->default_missing_lineno, + _("\ +previous definition was here")); } else { @@ -2859,7 +2748,7 @@ previous definition was here"))); break; /* Maybe there is another replacement we can use. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_eol || now->tok == tok_eof) { /* Nothing found. We tell the user. */ @@ -2950,7 +2839,7 @@ previous definition was here"))); case tok_end: /* Next we assume `LC_CTYPE'. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_eof) break; if (now->tok == tok_eol) @@ -2969,7 +2858,7 @@ previous definition was here"))); } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, NULL, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } @@ -2979,8 +2868,7 @@ previous definition was here"))); static void -set_class_defaults (struct locale_ctype_t *ctype, - const struct charmap_t *charmap, +set_class_defaults (struct locale_ctype_t *ctype, struct charmap_t *charmap, struct repertoire_t *repertoire) { size_t cnt; @@ -3016,14 +2904,14 @@ set_class_defaults (struct locale_ctype_t *ctype, if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined in charmap while needed as default value"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); else ctype->class256_collection[seq->bytes[0]] |= bit; @@ -3100,14 +2988,14 @@ set_class_defaults (struct locale_ctype_t *ctype, if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3120,14 +3008,14 @@ set_class_defaults (struct locale_ctype_t *ctype, if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3141,14 +3029,14 @@ set_class_defaults (struct locale_ctype_t *ctype, if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ character `%s' not defined while needed as default value"), - "")); + ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3162,14 +3050,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3183,14 +3071,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3204,14 +3092,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_space); @@ -3244,14 +3132,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_blank); @@ -3265,14 +3153,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_blank); @@ -3332,14 +3220,14 @@ character `%s' not defined while needed as default value"), if (seq == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); } else if (seq->nbytes != 1) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' in charmap not representable with one byte"), - "LC_CTYPE", "")); + "LC_CTYPE", ""); else ctype->class256_collection[seq->bytes[0]] |= BIT (tok_print); @@ -3374,16 +3262,16 @@ character `%s' not defined while needed as default value"), if (seq_from == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); } else if (seq_from->nbytes != 1) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' needed as default value not representable with one byte"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); } else { @@ -3399,16 +3287,16 @@ character `%s' not defined while needed as default value"), if (seq_to == NULL) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' not defined while needed as default value"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); } else if (seq_to->nbytes != 1) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: character `%s' needed as default value not representable with one byte"), - "LC_CTYPE", tmp)); + "LC_CTYPE", tmp); } else /* The index [0] is determined by the order of the @@ -3440,9 +3328,8 @@ character `%s' not defined while needed as default value"), if (ctype->outdigits_act != 10) { if (ctype->outdigits_act != 0) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: field `%s' does not contain exactly ten entries"), - "LC_CTYPE", "outdigit")); + error (0,0, _("%s: field `%s' does not contain exactly ten entries"), + "LC_CTYPE", "outdigit"); for (cnt = ctype->outdigits_act; cnt < 10; ++cnt) { @@ -3461,10 +3348,10 @@ character `%s' not defined while needed as default value"), if (ctype->mboutdigits[cnt] == NULL) { /* Provide a replacement. */ - WITH_CUR_LOCALE (error (0, 0, _("\ -no output digits defined and none of the standard names in the charmap"))); + error (0, 0, _("\ +no output digits defined and none of the standard names in the charmap")); - ctype->mboutdigits[cnt] = obstack_alloc (&((struct charmap_t *) charmap)->mem_pool, + ctype->mboutdigits[cnt] = obstack_alloc (&charmap->mem_pool, sizeof (struct charseq) + 1); @@ -3734,8 +3621,7 @@ wctrans_table_add (struct wctrans_table *t, uint32_t wc, uint32_t mapped_wc) /* Flattens the included transliterations into a translit list. Inserts them in the list at `cursor', and returns the new cursor. */ static struct translit_t ** -translit_flatten (struct locale_ctype_t *ctype, - const struct charmap_t *charmap, +translit_flatten (struct locale_ctype_t *ctype, struct charmap_t *charmap, struct translit_t **cursor) { while (ctype->translit_include != NULL) @@ -3752,9 +3638,9 @@ translit_flatten (struct locale_ctype_t *ctype, if (other == NULL) { - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: transliteration data from locale `%s' not available"), - "LC_CTYPE", copy_locale)); + "LC_CTYPE", copy_locale); } else { @@ -3789,7 +3675,7 @@ translit_flatten (struct locale_ctype_t *ctype, } static void -allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, +allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap, struct repertoire_t *repertoire) { size_t idx, nr; @@ -3848,10 +3734,9 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, wctype_table_finalize (&t); if (verbose) - WITH_CUR_LOCALE (fprintf (stderr, _("\ -%s: table for class \"%s\": %lu bytes\n"), - "LC_CTYPE", ctype->classnames[nr], - (unsigned long int) t.result_size)); + fprintf (stderr, _("%s: table for class \"%s\": %lu bytes\n"), + "LC_CTYPE", ctype->classnames[nr], + (unsigned long int) t.result_size); ctype->class_3level[nr].iov_base = t.result; ctype->class_3level[nr].iov_len = t.result_size; @@ -3917,10 +3802,9 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, wctrans_table_finalize (&t); if (verbose) - WITH_CUR_LOCALE (fprintf (stderr, _("\ -%s: table for map \"%s\": %lu bytes\n"), - "LC_CTYPE", ctype->mapnames[nr], - (unsigned long int) t.result_size)); + fprintf (stderr, _("%s: table for map \"%s\": %lu bytes\n"), + "LC_CTYPE", ctype->mapnames[nr], + (unsigned long int) t.result_size); ctype->map_3level[nr].iov_base = t.result; ctype->map_3level[nr].iov_len = t.result_size; @@ -4050,8 +3934,8 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap, wcwidth_table_finalize (&t); if (verbose) - WITH_CUR_LOCALE (fprintf (stderr, _("%s: table for width: %lu bytes\n"), - "LC_CTYPE", (unsigned long int) t.result_size)); + fprintf (stderr, _("%s: table for width: %lu bytes\n"), + "LC_CTYPE", (unsigned long int) t.result_size); ctype->width.iov_base = t.result; ctype->width.iov_len = t.result_size; diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-identification.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-identification.c index ae5ea6fb16..a64fe63d1b 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-identification.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-identification.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -29,7 +29,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -96,8 +95,7 @@ identification_startup (struct linereader *lr, struct localedef_t *locale, void -identification_finish (struct localedef_t *locale, - const struct charmap_t *charmap) +identification_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_identification_t *identification = locale->categories[LC_IDENTIFICATION].identification; @@ -131,8 +129,8 @@ identification_finish (struct localedef_t *locale, if (identification == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_IDENTIFICATION")); + error (0, 0, _("No definition for %s category found"), + "LC_IDENTIFICATION"); identification_startup (NULL, locale, 0); identification = locale->categories[LC_IDENTIFICATION].identification; @@ -144,8 +142,8 @@ No definition for %s category found"), "LC_IDENTIFICATION")); if (identification->cat == NULL) \ { \ if (verbose && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_IDENTIFICATION", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), \ + "LC_IDENTIFICATION", #cat); \ identification->cat = ""; \ } @@ -168,17 +166,15 @@ No definition for %s category found"), "LC_IDENTIFICATION")); if (num != LC_ALL && identification->category[num] == NULL) { if (verbose && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: no identification for category `%s'"), - "LC_IDENTIFICATION", category_name[num])); + error (0, 0, _("%s: no identification for category `%s'"), + "LC_IDENTIFICATION", category_name[num]); identification->category[num] = ""; } } void -identification_output (struct localedef_t *locale, - const struct charmap_t *charmap, +identification_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_identification_t *identification @@ -291,15 +287,14 @@ identification_output (struct localedef_t *locale, assert (cnt == (2 + _NL_ITEM_INDEX (_NL_NUM_LC_IDENTIFICATION) + (__LC_LAST - 2))); - write_locale_data (output_path, LC_IDENTIFICATION, "LC_IDENTIFICATION", cnt, - iov); + write_locale_data (output_path, "LC_IDENTIFICATION", cnt, iov); } /* The parser for the LC_IDENTIFICATION section of the locale definition. */ void identification_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_identification_t *identification; @@ -314,7 +309,7 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -341,7 +336,7 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, /* Ignore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -358,7 +353,7 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_string) \ goto err_label; \ if (identification->cat != NULL) \ @@ -399,15 +394,15 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, } /* We expect two operands. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok != tok_string && arg->tok != tok_ident) goto err_label; /* Next is a semicolon. */ - cattok = lr_token (ldfile, charmap, result, NULL, verbose); + cattok = lr_token (ldfile, charmap, NULL, verbose); if (cattok->tok != tok_semicolon) goto err_label; /* Now a LC_xxx identifier. */ - cattok = lr_token (ldfile, charmap, result, NULL, verbose); + cattok = lr_token (ldfile, charmap, NULL, verbose); switch (cattok->tok) { #define CATEGORY(lname, uname) \ @@ -443,7 +438,7 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_IDENTIFICATION'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -461,7 +456,7 @@ identification_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-measurement.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-measurement.c index e3ec90199e..90187420b4 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-measurement.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-measurement.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -28,7 +28,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -58,8 +57,7 @@ measurement_startup (struct linereader *lr, struct localedef_t *locale, void -measurement_finish (struct localedef_t *locale, - const struct charmap_t *charmap) +measurement_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_measurement_t *measurement = locale->categories[LC_MEASUREMENT].measurement; @@ -92,8 +90,8 @@ measurement_finish (struct localedef_t *locale, if (measurement == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_MEASUREMENT")); + error (0, 0, _("No definition for %s category found"), + "LC_MEASUREMENT"); measurement_startup (NULL, locale, 0); measurement = locale->categories[LC_MEASUREMENT].measurement; nothing = 1; @@ -103,23 +101,23 @@ No definition for %s category found"), "LC_MEASUREMENT")); if (measurement->measurement == 0) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_MEASUREMENT", "measurement")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_MEASUREMENT", "measurement"); /* Use as the default value the value of the i18n locale. */ measurement->measurement = 1; } else { if (measurement->measurement > 3) - WITH_CUR_LOCALE (error (0, 0, _("%s: invalid value for field `%s'"), - "LC_MEASUREMENT", "measurement")); + error (0, 0, _("%s: invalid value for field `%s'"), + "LC_MEASUREMENT", "measurement"); } } void -measurement_output (struct localedef_t *locale, - const struct charmap_t *charmap, const char *output_path) +measurement_output (struct localedef_t *locale, struct charmap_t *charmap, + const char *output_path) { struct locale_measurement_t *measurement = locale->categories[LC_MEASUREMENT].measurement; @@ -143,14 +141,14 @@ measurement_output (struct localedef_t *locale, iov[cnt].iov_len = 1; ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; iov[cnt].iov_base = (void *) charmap->code_set_name; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MEASUREMENT)); - write_locale_data (output_path, LC_MEASUREMENT, "LC_MEASUREMENT", + write_locale_data (output_path, "LC_MEASUREMENT", 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MEASUREMENT), iov); } @@ -158,7 +156,7 @@ measurement_output (struct localedef_t *locale, /* The parser for the LC_MEASUREMENT section of the locale definition. */ void measurement_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_measurement_t *measurement; @@ -171,7 +169,7 @@ measurement_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -198,7 +196,7 @@ measurement_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -215,7 +213,7 @@ measurement_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_number) \ goto err_label; \ else if (measurement->cat != 0) \ @@ -229,7 +227,7 @@ measurement_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_MEASUREMENT'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -247,7 +245,7 @@ measurement_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-messages.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-messages.c index d5cc393e4b..48c63e2a61 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-messages.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-messages.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -29,8 +29,8 @@ #include -#include "localedef.h" #include "linereader.h" +#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -63,7 +63,7 @@ messages_startup (struct linereader *lr, struct localedef_t *locale, void -messages_finish (struct localedef_t *locale, const struct charmap_t *charmap) +messages_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_messages_t *messages = locale->categories[LC_MESSAGES].messages; @@ -95,8 +95,8 @@ messages_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (messages == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_MESSAGES")); + error (0, 0, _("No definition for %s category found"), + "LC_MESSAGES"); messages_startup (NULL, locale, 0); messages = locale->categories[LC_MESSAGES].messages; nothing = 1; @@ -112,16 +112,15 @@ No definition for %s category found"), "LC_MESSAGES")); if (messages->yesexpr == NULL) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' undefined"), - "LC_MESSAGES", "yesexpr")); + error (0, 0, _("%s: field `%s' undefined"), "LC_MESSAGES", "yesexpr"); messages->yesexpr = "^[yY]"; } else if (messages->yesexpr[0] == '\0') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value for field `%s' must not be an empty string"), - "LC_MESSAGES", "yesexpr")); + "LC_MESSAGES", "yesexpr"); } else { @@ -135,9 +134,9 @@ No definition for %s category found"), "LC_MESSAGES")); char errbuf[BUFSIZ]; (void) regerror (result, &re, errbuf, BUFSIZ); - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: no correct regular expression for field `%s': %s"), - "LC_MESSAGES", "yesexpr", errbuf)); + "LC_MESSAGES", "yesexpr", errbuf); } else if (result != 0) regfree (&re); @@ -146,16 +145,15 @@ No definition for %s category found"), "LC_MESSAGES")); if (messages->noexpr == NULL) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' undefined"), - "LC_MESSAGES", "noexpr")); + error (0, 0, _("%s: field `%s' undefined"), "LC_MESSAGES", "noexpr"); messages->noexpr = "^[nN]"; } else if (messages->noexpr[0] == '\0') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value for field `%s' must not be an empty string"), - "LC_MESSAGES", "noexpr")); + "LC_MESSAGES", "noexpr"); } else { @@ -169,9 +167,9 @@ No definition for %s category found"), "LC_MESSAGES")); char errbuf[BUFSIZ]; (void) regerror (result, &re, errbuf, BUFSIZ); - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: no correct regular expression for field `%s': %s"), - "LC_MESSAGES", "noexpr", errbuf)); + "LC_MESSAGES", "noexpr", errbuf); } else if (result != 0) regfree (&re); @@ -180,7 +178,7 @@ No definition for %s category found"), "LC_MESSAGES")); void -messages_output (struct localedef_t *locale, const struct charmap_t *charmap, +messages_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_messages_t *messages @@ -226,7 +224,7 @@ messages_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt + 1 == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MESSAGES)); - write_locale_data (output_path, LC_MESSAGES, "LC_MESSAGES", + write_locale_data (output_path, "LC_MESSAGES", 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MESSAGES), iov); } @@ -234,7 +232,7 @@ messages_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_MESSAGES section of the locale definition. */ void messages_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -252,7 +250,7 @@ messages_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -280,7 +278,7 @@ messages_read (struct linereader *ldfile, struct localedef_t *result, /* Ignore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -304,7 +302,7 @@ messages_read (struct linereader *ldfile, struct localedef_t *result, lr_ignore_rest (ldfile, 0); \ break; \ } \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_string) \ goto syntax_error; \ else if (!ignore_content && now->val.str.startmb == NULL) \ @@ -324,7 +322,7 @@ messages_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_MESSAGES'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -341,7 +339,7 @@ messages_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-monetary.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-monetary.c index 4c36c505ba..08a10fdcc1 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-monetary.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-monetary.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -30,8 +30,8 @@ #include -#include "localedef.h" #include "linereader.h" +#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -159,7 +159,7 @@ monetary_startup (struct linereader *lr, struct localedef_t *locale, void -monetary_finish (struct localedef_t *locale, const struct charmap_t *charmap) +monetary_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_monetary_t *monetary = locale->categories[LC_MONETARY].monetary; @@ -191,8 +191,8 @@ monetary_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (monetary == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_MONETARY")); + error (0, 0, _("No definition for %s category found"), + "LC_MONETARY"); monetary_startup (NULL, locale, 0); monetary = locale->categories[LC_MONETARY].monetary; nothing = 1; @@ -203,8 +203,8 @@ No definition for %s category found"), "LC_MONETARY")); if (monetary->cat == NULL) \ { \ if (! be_quiet && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_MONETARY", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), \ + "LC_MONETARY", #cat); \ monetary->cat = initval; \ } @@ -221,18 +221,18 @@ No definition for %s category found"), "LC_MONETARY")); if (strlen (monetary->int_curr_symbol) != 4) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value of field `int_curr_symbol' has wrong length"), - "LC_MONETARY")); + "LC_MONETARY"); } else if (bsearch (monetary->int_curr_symbol, valid_int_curr, NR_VALID_INT_CURR, sizeof (const char *), (comparison_fn_t) curr_strcmp) == NULL && !be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value of field `int_curr_symbol' does \ not correspond to a valid name in ISO 4217"), - "LC_MONETARY")); + "LC_MONETARY"); } /* The decimal point must not be empty. This is not said explicitly @@ -241,15 +241,15 @@ not correspond to a valid name in ISO 4217"), if (monetary->mon_decimal_point == NULL) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_MONETARY", "mon_decimal_point")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_MONETARY", "mon_decimal_point"); monetary->mon_decimal_point = "."; } else if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing) { - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value for field `%s' must not be the empty string"), - "LC_MONETARY", "mon_decimal_point")); + "LC_MONETARY", "mon_decimal_point"); } if (monetary->mon_decimal_point_wc == L'\0') monetary->mon_decimal_point_wc = L'.'; @@ -257,8 +257,8 @@ not correspond to a valid name in ISO 4217"), if (monetary->mon_grouping_len == 0) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_MONETARY", "mon_grouping")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_MONETARY", "mon_grouping"); monetary->mon_grouping = (char *) "\177"; monetary->mon_grouping_len = 1; @@ -269,15 +269,15 @@ not correspond to a valid name in ISO 4217"), if (monetary->cat == -2) \ { \ if (! be_quiet && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_MONETARY", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), \ + "LC_MONETARY", #cat); \ monetary->cat = initval; \ } \ else if ((monetary->cat < min || monetary->cat > max) \ && !be_quiet && !nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _(" \ %s: value for field `%s' must be in range %d...%d"), \ - "LC_MONETARY", #cat, min, max)) + "LC_MONETARY", #cat, min, max) TEST_ELEM (int_frac_digits, -128, 127, -1); TEST_ELEM (frac_digits, -128, 127, -1); @@ -305,9 +305,9 @@ not correspond to a valid name in ISO 4217"), monetary->cat = monetary->alt; \ else if ((monetary->cat < min || monetary->cat > max) && !be_quiet \ && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value for field `%s' must be in range %d...%d"), \ - "LC_MONETARY", #cat, min, max)) + "LC_MONETARY", #cat, min, max) TEST_ELEM (int_p_cs_precedes, p_cs_precedes, -1, 1); TEST_ELEM (int_p_sep_by_space, p_sep_by_space, -1, 2); @@ -353,7 +353,7 @@ not correspond to a valid name in ISO 4217"), void -monetary_output (struct localedef_t *locale, const struct charmap_t *charmap, +monetary_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_monetary_t *monetary @@ -612,7 +612,7 @@ monetary_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)); - write_locale_data (output_path, LC_MONETARY, "LC_MONETARY", + write_locale_data (output_path, "LC_MONETARY", 3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY), iov); } @@ -627,7 +627,7 @@ curr_strcmp (const char *s1, const char **s2) /* The parser for the LC_MONETARY section of the locale definition. */ void monetary_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -644,7 +644,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -670,7 +670,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, /* Ignore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -687,7 +687,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - now = lr_token (ldfile, charmap, result, NULL, verbose); \ + now = lr_token (ldfile, charmap, NULL, verbose); \ if (now->tok != tok_string) \ goto err_label; \ else if (monetary->cat != NULL) \ @@ -722,7 +722,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, } \ \ ldfile->return_widestr = 1; \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_string) \ goto err_label; \ if (monetary->cat != NULL) \ @@ -763,7 +763,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - now = lr_token (ldfile, charmap, result, NULL, verbose); \ + now = lr_token (ldfile, charmap, NULL, verbose); \ if (now->tok != tok_minus1 && now->tok != tok_number) \ goto err_label; \ else if (monetary->cat != -2) \ @@ -815,7 +815,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, break; } - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_minus1 && now->tok != tok_number) goto err_label; else @@ -863,11 +863,11 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, grouping[act++] = now->val.num; /* Next must be semicolon. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) break; - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } while (now->tok == tok_minus1 || now->tok == tok_number); @@ -893,7 +893,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, break; } - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_number) goto err_label; if (now->val.num == 0) @@ -910,11 +910,11 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, if (!ignore_content) monetary->conversion_rate[0] = now->val.num; /* Next must be a semicolon. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) goto err_label; /* And another number. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_number) goto err_label; if (now->val.num == 0) @@ -927,7 +927,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_MONETARY'. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_eof) break; if (now->tok == tok_eol) @@ -944,7 +944,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-name.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-name.c index 80b42f7048..423f1707c2 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-name.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-name.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -27,7 +27,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -61,7 +60,7 @@ name_startup (struct linereader *lr, struct localedef_t *locale, void -name_finish (struct localedef_t *locale, const struct charmap_t *charmap) +name_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_name_t *name = locale->categories[LC_NAME].name; int nothing = 0; @@ -92,8 +91,7 @@ name_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (name == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_NAME")); + error (0, 0, _("No definition for %s category found"), "LC_NAME"); name_startup (NULL, locale, 0); name = locale->categories[LC_NAME].name; nothing = 1; @@ -103,8 +101,7 @@ No definition for %s category found"), "LC_NAME")); if (name->name_fmt == NULL) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_NAME", "name_fmt")); + error (0, 0, _("%s: field `%s' not defined"), "LC_NAME", "name_fmt"); /* Use as the default value the value of the i18n locale. */ name->name_fmt = "%p%t%g%t%m%t%f"; } @@ -115,8 +112,8 @@ No definition for %s category found"), "LC_NAME")); const char *cp = name->name_fmt; if (*cp == '\0') - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_NAME", "name_fmt")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_NAME", "name_fmt"); else while (*cp != '\0') { @@ -127,8 +124,9 @@ No definition for %s category found"), "LC_NAME")); ++cp; if (strchr ("dfFgGlomMpsSt", *cp) == NULL) { - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid escape sequence in field `%s'"), "LC_NAME", "name_fmt")); + error (0, 0, _("\ +%s: invalid escape sequence in field `%s'"), + "LC_NAME", "name_fmt"); break; } } @@ -140,8 +138,7 @@ No definition for %s category found"), "LC_NAME")); if (name->cat == NULL) \ { \ if (verbose && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_NAME", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), "LC_NAME", #cat); \ name->cat = ""; \ } @@ -154,7 +151,7 @@ No definition for %s category found"), "LC_NAME")); void -name_output (struct localedef_t *locale, const struct charmap_t *charmap, +name_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_name_t *name = locale->categories[LC_NAME].name; @@ -210,7 +207,7 @@ name_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NAME)); - write_locale_data (output_path, LC_NAME, "LC_NAME", + write_locale_data (output_path, "LC_NAME", 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NAME), iov); } @@ -218,7 +215,7 @@ name_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_NAME section of the locale definition. */ void name_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_name_t *name; @@ -231,7 +228,7 @@ name_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -257,7 +254,7 @@ name_read (struct linereader *ldfile, struct localedef_t *result, /* Ignore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -274,7 +271,7 @@ name_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_string) \ goto err_label; \ if (name->cat != NULL) \ @@ -299,7 +296,7 @@ name_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_NAME'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -316,7 +313,7 @@ name_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-numeric.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-numeric.c index 594c0c8c1b..886dd9d27f 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-numeric.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-numeric.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -27,8 +27,8 @@ #include -#include "localedef.h" #include "linereader.h" +#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -65,7 +65,7 @@ numeric_startup (struct linereader *lr, struct localedef_t *locale, void -numeric_finish (struct localedef_t *locale, const struct charmap_t *charmap) +numeric_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric; int nothing = 0; @@ -96,8 +96,8 @@ numeric_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (numeric == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_NUMERIC")); + error (0, 0, _("No definition for %s category found"), + "LC_NUMERIC"); numeric_startup (NULL, locale, 0); numeric = locale->categories[LC_NUMERIC].numeric; nothing = 1; @@ -110,27 +110,26 @@ No definition for %s category found"), "LC_NUMERIC")); if (numeric->decimal_point == NULL) { if (! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_NUMERIC", "decimal_point")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_NUMERIC", "decimal_point"); numeric->decimal_point = "."; } else if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing) { - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: value for field `%s' must not be the empty string"), - "LC_NUMERIC", "decimal_point")); + "LC_NUMERIC", "decimal_point"); } if (numeric->decimal_point_wc == L'\0') numeric->decimal_point_wc = L'.'; if (numeric->grouping_len == 0 && ! be_quiet && ! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_NUMERIC", "grouping")); + error (0, 0, _("%s: field `%s' not defined"), "LC_NUMERIC", "grouping"); } void -numeric_output (struct localedef_t *locale, const struct charmap_t *charmap, +numeric_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric; @@ -187,7 +186,7 @@ numeric_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt + 1 == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); - write_locale_data (output_path, LC_NUMERIC, "LC_NUMERIC", + write_locale_data (output_path, "LC_NUMERIC", 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); } @@ -195,7 +194,7 @@ numeric_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_NUMERIC section of the locale definition. */ void numeric_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -213,7 +212,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -239,7 +238,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -257,7 +256,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, } \ \ ldfile->return_widestr = 1; \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_string) \ goto err_label; \ if (numeric->cat != NULL) \ @@ -297,7 +296,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, break; } - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_minus1 && now->tok != tok_number) goto err_label; else @@ -344,11 +343,11 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, grouping[act++] = now->val.num; /* Next must be semicolon. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_semicolon) break; - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); } while (now->tok == tok_minus1 || now->tok == tok_number); @@ -367,7 +366,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_NUMERIC'. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok == tok_eof) break; if (now->tok == tok_eol) @@ -384,7 +383,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-paper.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-paper.c index 2910954f04..2fc78202a2 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-paper.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-paper.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -28,7 +28,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -58,7 +57,7 @@ paper_startup (struct linereader *lr, struct localedef_t *locale, void -paper_finish (struct localedef_t *locale, const struct charmap_t *charmap) +paper_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_paper_t *paper = locale->categories[LC_PAPER].paper; int nothing = 0; @@ -89,8 +88,7 @@ paper_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (paper == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_PAPER")); + error (0, 0, _("No definition for %s category found"), "LC_PAPER"); paper_startup (NULL, locale, 0); paper = locale->categories[LC_PAPER].paper; nothing = 1; @@ -100,8 +98,7 @@ No definition for %s category found"), "LC_PAPER")); if (paper->height == 0) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_PAPER", "height")); + error (0, 0, _("%s: field `%s' not defined"), "LC_PAPER", "height"); /* Use as default values the values from the i18n locale. */ paper->height = 297; } @@ -109,8 +106,7 @@ No definition for %s category found"), "LC_PAPER")); if (paper->width == 0) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_PAPER", "width")); + error (0, 0, _("%s: field `%s' not defined"), "LC_PAPER", "width"); /* Use as default values the values from the i18n locale. */ paper->width = 210; } @@ -118,7 +114,7 @@ No definition for %s category found"), "LC_PAPER")); void -paper_output (struct localedef_t *locale, const struct charmap_t *charmap, +paper_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_paper_t *paper = locale->categories[LC_PAPER].paper; @@ -154,7 +150,7 @@ paper_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_PAPER)); - write_locale_data (output_path, LC_PAPER, "LC_PAPER", + write_locale_data (output_path, "LC_PAPER", 2 + _NL_ITEM_INDEX (_NL_NUM_LC_PAPER), iov); } @@ -162,7 +158,7 @@ paper_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_PAPER section of the locale definition. */ void paper_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_paper_t *paper; @@ -175,7 +171,7 @@ paper_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -201,7 +197,7 @@ paper_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -218,7 +214,7 @@ paper_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_number) \ goto err_label; \ else if (paper->cat != 0) \ @@ -233,7 +229,7 @@ paper_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_PAPER'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -250,7 +246,7 @@ paper_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-telephone.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-telephone.c index 5a60c016b0..31cfd25041 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-telephone.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-telephone.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -28,7 +28,6 @@ #include -#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -60,7 +59,7 @@ telephone_startup (struct linereader *lr, struct localedef_t *locale, void -telephone_finish (struct localedef_t *locale, const struct charmap_t *charmap) +telephone_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_telephone_t *telephone = locale->categories[LC_TELEPHONE].telephone; @@ -92,8 +91,8 @@ telephone_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (telephone == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_TELEPHONE")); + error (0, 0, _("No definition for %s category found"), + "LC_TELEPHONE"); telephone_startup (NULL, locale, 0); telephone = locale->categories[LC_TELEPHONE].telephone; nothing = 1; @@ -103,8 +102,8 @@ No definition for %s category found"), "LC_TELEPHONE")); if (telephone->tel_int_fmt == NULL) { if (! nothing) - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), - "LC_TELEPHONE", "tel_int_fmt")); + error (0, 0, _("%s: field `%s' not defined"), + "LC_TELEPHONE", "tel_int_fmt"); /* Use as the default value the value of the i18n locale. */ telephone->tel_int_fmt = "+%c %a %l"; } @@ -115,8 +114,8 @@ No definition for %s category found"), "LC_TELEPHONE")); const char *cp = telephone->tel_int_fmt; if (*cp == '\0') - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), - "LC_TELEPHONE", "tel_int_fmt")); + error (0, 0, _("%s: field `%s' must not be empty"), + "LC_TELEPHONE", "tel_int_fmt"); else while (*cp != '\0') { @@ -124,8 +123,9 @@ No definition for %s category found"), "LC_TELEPHONE")); { if (strchr ("aAlc", *++cp) == NULL) { - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_int_fmt")); + error (0, 0, _("\ +%s: invalid escape sequence in field `%s'"), + "LC_TELEPHONE", "tel_int_fmt"); break; } } @@ -147,8 +147,8 @@ No definition for %s category found"), "LC_TELEPHONE")); { if (strchr ("aAlc", *++cp) == NULL) { - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid escape sequence in field `%s'"), "LC_TELEPHONE", "tel_dom_fmt")); + error (0, 0, _("%s: invalid escape sequence in field `%s'"), + "LC_TELEPHONE", "tel_dom_fmt"); break; } } @@ -160,8 +160,7 @@ No definition for %s category found"), "LC_TELEPHONE")); if (telephone->cat == NULL) \ { \ if (verbose && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_TELEPHONE", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), "LC_TELEPHONE", #cat); \ telephone->cat = ""; \ } @@ -171,7 +170,7 @@ No definition for %s category found"), "LC_TELEPHONE")); void -telephone_output (struct localedef_t *locale, const struct charmap_t *charmap, +telephone_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_telephone_t *telephone = @@ -218,7 +217,7 @@ telephone_output (struct localedef_t *locale, const struct charmap_t *charmap, assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_TELEPHONE)); - write_locale_data (output_path, LC_TELEPHONE, "LC_TELEPHONE", + write_locale_data (output_path, "LC_TELEPHONE", 2 + _NL_ITEM_INDEX (_NL_NUM_LC_TELEPHONE), iov); } @@ -226,7 +225,7 @@ telephone_output (struct localedef_t *locale, const struct charmap_t *charmap, /* The parser for the LC_TELEPHONE section of the locale definition. */ void telephone_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct locale_telephone_t *telephone; @@ -239,7 +238,7 @@ telephone_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -265,7 +264,7 @@ telephone_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; continue; } @@ -282,7 +281,7 @@ telephone_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - arg = lr_token (ldfile, charmap, result, NULL, verbose); \ + arg = lr_token (ldfile, charmap, NULL, verbose); \ if (arg->tok != tok_string) \ goto err_label; \ if (telephone->cat != NULL) \ @@ -305,7 +304,7 @@ telephone_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_TELEPHONE'. */ - arg = lr_token (ldfile, charmap, result, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok == tok_eof) break; if (arg->tok == tok_eol) @@ -322,7 +321,7 @@ telephone_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/ld-time.c b/src/kernel/libroot/posix/glibc/locale/programs/ld-time.c index 2ff56b0034..6245b0f05e 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/ld-time.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/ld-time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -30,8 +30,8 @@ #include -#include "localedef.h" #include "linereader.h" +#include "localedef.h" #include "localeinfo.h" #include "locfile.h" @@ -126,7 +126,7 @@ time_startup (struct linereader *lr, struct localedef_t *locale, void -time_finish (struct localedef_t *locale, const struct charmap_t *charmap) +time_finish (struct localedef_t *locale, struct charmap_t *charmap) { struct locale_time_t *time = locale->categories[LC_TIME].time; int nothing = 0; @@ -157,8 +157,7 @@ time_finish (struct localedef_t *locale, const struct charmap_t *charmap) if (time == NULL) { if (! be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -No definition for %s category found"), "LC_TIME")); + error (0, 0, _("No definition for %s category found"), "LC_TIME"); time_startup (NULL, locale, 0); time = locale->categories[LC_TIME].time; nothing = 1; @@ -173,8 +172,7 @@ No definition for %s category found"), "LC_TIME")); int i; \ \ if (! be_quiet && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_TIME", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), "LC_TIME", #cat); \ \ for (i = 0; i < sizeof (initval) / sizeof (initval[0]); ++i) \ time->cat[i] = initval[i]; \ @@ -194,8 +192,7 @@ No definition for %s category found"), "LC_TIME")); if (time->cat == NULL) \ { \ if (! be_quiet && ! nothing) \ - WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), \ - "LC_TIME", #cat)); \ + error (0, 0, _("%s: field `%s' not defined"), "LC_TIME", #cat); \ \ time->cat = initval; \ } @@ -245,9 +242,10 @@ No definition for %s category found"), "LC_TIME")); if (*str != '+' && *str != '-') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: direction flag in string %Zd in `era' field is not '+' nor '-'"), - "LC_TIME", idx + 1)); + error (0, 0, + _("%s: direction flag in string %Zd in `era' field" + " is not '+' nor '-'"), + "LC_TIME", idx + 1); /* Default arbitrarily to '+'. */ time->era_entries[idx].direction = '+'; } @@ -256,9 +254,10 @@ No definition for %s category found"), "LC_TIME")); if (*++str != ':') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: direction flag in string %Zd in `era' field is not a single character"), - "LC_TIME", idx + 1)); + error (0, 0, + _("%s: direction flag in string %Zd in `era' field" + " is not a single character"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else @@ -269,17 +268,17 @@ No definition for %s category found"), "LC_TIME")); if (endp == str) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid number for offset in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: invalid number for offset in string %Zd in" + " `era' field"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else if (*endp != ':') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: garbage at end of offset value in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: garbage at end of offset value in" + " string %Zd in `era' field"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else @@ -328,18 +327,18 @@ No definition for %s category found"), "LC_TIME")); { invalid_start_date: if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid starting date in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: invalid starting date in string %Zd in" + " `era' field"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else if (*endp != ':') { garbage_start_date: if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: garbage at end of starting date in string %Zd in `era' field "), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: garbage at end of starting date " + "in string %Zd in `era' field "), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else @@ -356,9 +355,9 @@ No definition for %s category found"), "LC_TIME")); && time->era_entries[idx].start_date[2] == 29 && !__isleap (time->era_entries[idx].start_date[0]))) && !be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: starting date is invalid in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: starting date is invalid in" + " string %Zd in `era' field"), + "LC_TIME", idx + 1); } } @@ -405,18 +404,18 @@ No definition for %s category found"), "LC_TIME")); { invalid_stop_date: if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: invalid stopping date in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: invalid stopping date in string %Zd in" + " `era' field"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else if (*endp != ':') { garbage_stop_date: if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: garbage at end of stopping date in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: garbage at end of stopping date " + "in string %Zd in `era' field"), + "LC_TIME", idx + 1); (void) strsep (&str, ":"); } else @@ -433,17 +432,17 @@ No definition for %s category found"), "LC_TIME")); && time->era_entries[idx].stop_date[2] == 29 && !__isleap (time->era_entries[idx].stop_date[0]))) && !be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: stopping date is invalid in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: stopping date is invalid in" + " string %Zd in `era' field"), + "LC_TIME", idx + 1); } } if (str == NULL || *str == '\0') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: missing era name in string %Zd in `era' field"), "LC_TIME", idx + 1)); + error (0, 0, _("%s: missing era name in string %Zd in `era'" + " field"), "LC_TIME", idx + 1); time->era_entries[idx].name = time->era_entries[idx].format = ""; } @@ -454,9 +453,9 @@ No definition for %s category found"), "LC_TIME")); if (str == NULL || *str == '\0') { if (!be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("\ -%s: missing era format in string %Zd in `era' field"), - "LC_TIME", idx + 1)); + error (0, 0, _("%s: missing era format in string %Zd" + " in `era' field"), + "LC_TIME", idx + 1); time->era_entries[idx].name = time->era_entries[idx].format = ""; } @@ -483,33 +482,33 @@ No definition for %s category found"), "LC_TIME")); time->week_1stday = 19971130; if (time->week_1stweek > time->week_ndays) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: third operand for value of field `%s' must not be larger than %d"), - "LC_TIME", "week", 7)); + "LC_TIME", "week", 7); if (time->first_weekday == '\0') /* The definition does not specify this so the default is used. */ time->first_weekday = 1; else if (time->first_weekday > time->week_ndays) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: values of field `%s' must not be larger than %d"), - "LC_TIME", "first_weekday", 7)); + "LC_TIME", "first_weekday", 7); if (time->first_workday == '\0') /* The definition does not specify this so the default is used. */ time->first_workday = 1; else if (time->first_workday > time->week_ndays) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: values of field `%s' must not be larger than %d"), - "LC_TIME", "first_workday", 7)); + "LC_TIME", "first_workday", 7); if (time->cal_direction == '\0') /* The definition does not specify this so the default is used. */ time->cal_direction = 1; else if (time->cal_direction > 3) - WITH_CUR_LOCALE (error (0, 0, _("\ + error (0, 0, _("\ %s: values for field `%s' must not be larger than %d"), - "LC_TIME", "cal_direction", 3)); + "LC_TIME", "cal_direction", 3); /* XXX We don't perform any tests on the timezone value since this is simply useless, stupid $&$!@... */ @@ -524,7 +523,7 @@ No definition for %s category found"), "LC_TIME")); void -time_output (struct localedef_t *locale, const struct charmap_t *charmap, +time_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_time_t *time = locale->categories[LC_TIME].time; @@ -906,14 +905,14 @@ time_output (struct localedef_t *locale, const struct charmap_t *charmap, + 2 + time->num_era * 10 - 1)); assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME)); - write_locale_data (output_path, LC_TIME, "LC_TIME", 2 + cnt, iov); + write_locale_data (output_path, "LC_TIME", 2 + cnt, iov); } /* The parser for the LC_TIME section of the locale definition. */ void time_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, const char *repertoire_name, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content) { struct repertoire_t *repertoire = NULL; @@ -932,7 +931,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, do { - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); nowtok = now->tok; } while (nowtok == tok_eol); @@ -958,7 +957,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, /* Ingore empty lines. */ if (nowtok == tok_eol) { - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); nowtok = now->tok; continue; } @@ -977,7 +976,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, \ for (cnt = 0; cnt < max; ++cnt) \ { \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok == tok_eol) \ { \ if (cnt < min) \ @@ -1009,7 +1008,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, } \ \ /* Match the semicolon. */ \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_semicolon && now->tok != tok_eol) \ break; \ } \ @@ -1023,8 +1022,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, \ if (now->tok == tok_semicolon) \ { \ - now = lr_token (ldfile, charmap, result, repertoire, \ - verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok == tok_eol) \ lr_error (ldfile, _("extra trailing semicolon")); \ else if (now->tok == tok_string) \ @@ -1060,7 +1058,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, } do { - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_string) goto err_label; if (!ignore_content && (now->val.str.startmb == NULL @@ -1082,7 +1080,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, * sizeof (char *)); time->wera[time->num_era++] = now->val.str.startwc; } - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_eol && now->tok != tok_semicolon) goto err_label; } @@ -1099,7 +1097,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_string) \ goto err_label; \ else if (time->cat != NULL) \ @@ -1141,7 +1139,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, break; \ } \ \ - now = lr_token (ldfile, charmap, result, repertoire, verbose); \ + now = lr_token (ldfile, charmap, repertoire, verbose); \ if (now->tok != tok_number) \ goto err_label; \ else if (time->cat != 0) \ @@ -1164,25 +1162,25 @@ time_read (struct linereader *ldfile, struct localedef_t *result, break; } - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_number) goto err_label; time->week_ndays = now->val.num; - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_semicolon) goto err_label; - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_number) goto err_label; time->week_1stday = now->val.num; - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_semicolon) goto err_label; - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok != tok_number) goto err_label; time->week_1stweek = now->val.num; @@ -1192,7 +1190,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, case tok_end: /* Next we assume `LC_TIME'. */ - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); if (now->tok == tok_eof) break; if (now->tok == tok_eol) @@ -1209,7 +1207,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result, } /* Prepare for the next round. */ - now = lr_token (ldfile, charmap, result, repertoire, verbose); + now = lr_token (ldfile, charmap, repertoire, verbose); nowtok = now->tok; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/linereader.c b/src/kernel/libroot/posix/glibc/locale/programs/linereader.c index 1df7df7e50..ac843bcd2f 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/linereader.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/linereader.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -21,7 +21,6 @@ # include #endif -#include #include #include #include @@ -29,11 +28,15 @@ #include #include -#include "localedef.h" #include "charmap.h" #include "error.h" #include "linereader.h" -#include "locfile.h" + +/* Prototypes for a few program-wide used functions. */ +extern void *xmalloc (size_t __n); +extern void *xrealloc (void *__p, size_t __n); +extern char *xstrdup (const char *__str); + /* Prototypes for local functions. */ static struct token *get_toplvl_escape (struct linereader *lr); @@ -41,7 +44,6 @@ static struct token *get_symname (struct linereader *lr); static struct token *get_ident (struct linereader *lr); static struct token *get_string (struct linereader *lr, const struct charmap_t *charmap, - struct localedef_t *locale, const struct repertoire_t *repertoire, int verbose); @@ -56,7 +58,7 @@ lr_open (const char *fname, kw_hash_fct_t hf) return lr_create (stdin, "", hf); else { - fp = fopen (fname, "rm"); + fp = fopen (fname, "r"); if (fp == NULL) return NULL; return lr_create (fp, fname, hf); @@ -161,8 +163,7 @@ extern char *program_name; struct token * lr_token (struct linereader *lr, const struct charmap_t *charmap, - struct localedef_t *locale, const struct repertoire_t *repertoire, - int verbose) + const struct repertoire_t *repertoire, int verbose) { int ch; @@ -294,7 +295,7 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap, return &lr->token; case '"': - return get_string (lr, charmap, locale, repertoire, verbose); + return get_string (lr, charmap, repertoire, verbose); case '-': ch = lr_getc (lr); @@ -381,7 +382,7 @@ get_toplvl_escape (struct linereader *lr) bytes[nbytes++] = byte; } while (ch == lr->escape_char - && nbytes < (int) sizeof (lr->token.val.charcode.bytes)); + && nbytes < sizeof (lr->token.val.charcode.bytes)); if (!isspace (ch)) lr_error (lr, _("garbage at end of character code specification")); @@ -567,8 +568,7 @@ get_ident (struct linereader *lr) static struct token * get_string (struct linereader *lr, const struct charmap_t *charmap, - struct localedef_t *locale, const struct repertoire_t *repertoire, - int verbose) + const struct repertoire_t *repertoire, int verbose) { int return_widestr = lr->return_widestr; char *buf; @@ -690,6 +690,7 @@ non-symbolic character value should not be used")); if (cp == &buf[bufact]) { char utmp[10]; + const char *symbol = NULL; /* Yes, it is. */ ADDC ('\0'); @@ -711,65 +712,21 @@ non-symbolic character value should not be used")); the repertoire the name of the character and find it in the charmap. */ if (repertoire != NULL) + symbol = repertoire_find_symbol (repertoire, wch); + + if (symbol == NULL) + /* We cannot generate a string since we + cannot map from the Unicode number to the + character symbol. */ + illegal_string = 1; + else { - const char *symbol; + seq = charmap_find_value (charmap, symbol, + strlen (symbol)); - symbol = repertoire_find_symbol (repertoire, wch); - - if (symbol != NULL) - seq = charmap_find_value (charmap, symbol, - strlen (symbol)); - } - - if (seq == NULL) - { -#ifndef NO_TRANSLITERATION - /* Transliterate if possible. */ - if (locale != NULL) - { - uint32_t *translit; - - if ((locale->avail & CTYPE_LOCALE) == 0) - { - /* Load the CTYPE data now. */ - int old_needed = locale->needed; - - locale->needed = 0; - locale = load_locale (LC_CTYPE, - locale->name, - locale->repertoire_name, - charmap, locale); - locale->needed = old_needed; - } - - if ((locale->avail & CTYPE_LOCALE) != 0 - && ((translit = find_translit (locale, - charmap, wch)) - != NULL)) - /* The CTYPE data contains a matching - transliteration. */ - { - int i; - - for (i = 0; translit[i] != 0; ++i) - { - char utmp[10]; - - snprintf (utmp, sizeof (utmp), "U%08X", - translit[i]); - seq = charmap_find_value (charmap, utmp, - 9); - assert (seq != NULL); - ADDS (seq->bytes, seq->nbytes); - } - - continue; - } - } -#endif /* NO_TRANSLITERATION */ - - /* Not a known name. */ - illegal_string = 1; + if (seq == NULL) + /* Not a known name. */ + illegal_string = 1; } } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/linereader.h b/src/kernel/libroot/posix/glibc/locale/programs/linereader.h index a44360979b..69053cb02e 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/linereader.h +++ b/src/kernel/libroot/posix/glibc/locale/programs/linereader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . @@ -33,7 +33,7 @@ typedef const struct keyword_t *(*kw_hash_fct_t) (const char *, unsigned int); struct charset_t; -struct localedef_t; + struct token { @@ -85,20 +85,18 @@ struct linereader /* Functions defined in linereader.c. */ extern struct linereader *lr_open (const char *fname, kw_hash_fct_t hf); -extern struct linereader *lr_create (FILE *fp, const char *fname, - kw_hash_fct_t hf); +extern struct linereader *lr_create (FILE *fp, const char *fname, kw_hash_fct_t hf); extern int lr_eof (struct linereader *lr); extern void lr_close (struct linereader *lr); extern int lr_next (struct linereader *lr); extern struct token *lr_token (struct linereader *lr, const struct charmap_t *charmap, - struct localedef_t *locale, const struct repertoire_t *repertoire, int verbose); #define lr_error(lr, fmt, args...) \ - WITH_CUR_LOCALE (error_at_line (0, 0, lr->fname, lr->lineno, fmt, ## args)) + error_at_line (0, 0, lr->fname, lr->lineno, fmt, ## args) diff --git a/src/kernel/libroot/posix/glibc/locale/programs/locale.c b/src/kernel/libroot/posix/glibc/locale/programs/locale.c index 0a8d0563fb..3377bcc286 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/locale.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/locale.c @@ -1,5 +1,5 @@ /* Implementation of the locale program according to POSIX 9945-2. - Copyright (C) 1995-1997, 1999-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -43,12 +43,10 @@ #include "localeinfo.h" #include "charmap-dir.h" -#include "../locarchive.h" extern void *xmalloc (size_t __n); extern char *xstrdup (const char *__str); -#define ARCHIVE_NAME LOCALEDIR "/locale-archive" /* If set print the name of the category. */ static int show_category_name; @@ -170,11 +168,7 @@ extern void locale_special (const char *name, int show_category_name, int show_keyword_name); /* Prototypes for local functions. */ -static void print_LC_IDENTIFICATION (void *mapped, size_t size); -static void print_LC_CTYPE (void *mapped, size_t size); static void write_locales (void); -static int nameentcmp (const void *a, const void *b); -static int write_archive_locales (void **all_datap, char *linebuf); static void write_charmaps (void); static void show_locale_vars (void); static void show_info (const char *name); @@ -288,7 +282,7 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2003"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -333,74 +327,6 @@ select_dirs (const struct dirent *dirent) } -static void -print_LC_IDENTIFICATION (void *mapped, size_t size) -{ - /* Read the information from the file. */ - struct - { - unsigned int magic; - unsigned int nstrings; - unsigned int strindex[0]; - } *filedata = mapped; - - if (filedata->magic == LIMAGIC (LC_IDENTIFICATION) - && (sizeof *filedata - + (filedata->nstrings - * sizeof (unsigned int)) - <= size)) - { - const char *str; - -#define HANDLE(idx, name) \ - str = ((char *) mapped \ - + filedata->strindex[_NL_ITEM_INDEX (_NL_IDENTIFICATION_##idx)]); \ - if (*str != '\0') \ - printf ("%9s | %s\n", name, str) - HANDLE (TITLE, "title"); - HANDLE (SOURCE, "source"); - HANDLE (ADDRESS, "address"); - HANDLE (CONTACT, "contact"); - HANDLE (EMAIL, "email"); - HANDLE (TEL, "telephone"); - HANDLE (FAX, "fax"); - HANDLE (LANGUAGE, "language"); - HANDLE (TERRITORY, "territory"); - HANDLE (AUDIENCE, "audience"); - HANDLE (APPLICATION, "application"); - HANDLE (ABBREVIATION, "abbreviation"); - HANDLE (REVISION, "revision"); - HANDLE (DATE, "date"); - } -} - - -static void -print_LC_CTYPE (void *mapped, size_t size) -{ - struct - { - unsigned int magic; - unsigned int nstrings; - unsigned int strindex[0]; - } *filedata = mapped; - - if (filedata->magic == LIMAGIC (LC_CTYPE) - && (sizeof *filedata - + (filedata->nstrings - * sizeof (unsigned int)) - <= size)) - { - const char *str; - - str = ((char *) mapped - + filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]); - if (*str != '\0') - printf (" codeset | %s\n", str); - } -} - - /* Write the names of all available locales to stdout. We have some sources of the information: the contents of the locale directory and the locale.alias file. To avoid duplicates and print the @@ -421,91 +347,6 @@ write_locales (void) #define PUT(name) tsearch (name, &all_data, \ (int (*) (const void *, const void *)) strcoll) -#define GET(name) tfind (name, &all_data, \ - (int (*) (const void *, const void *)) strcoll) - - /* `POSIX' locale is always available (POSIX.2 4.34.3). */ - PUT ("POSIX"); - /* And so is the "C" locale. */ - PUT ("C"); - - memset (linebuf, '-', sizeof (linebuf) - 1); - linebuf[sizeof (linebuf) - 1] = '\0'; - - /* First scan the locale archive. */ - if (write_archive_locales (&all_data, linebuf)) - first_locale = 0; - - /* Now we can look for all files in the directory. */ - ndirents = scandir (LOCALEDIR, &dirents, select_dirs, alphasort); - for (cnt = 0; cnt < ndirents; ++cnt) - { - /* Test whether at least the LC_CTYPE data is there. Some - directories only contain translations. */ - char buf[sizeof (LOCALEDIR) + strlen (dirents[cnt]->d_name) - + sizeof "/LC_IDENTIFICATION"]; - char *enddir; - struct stat64 st; - - stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), - dirents[cnt]->d_name), - "/LC_IDENTIFICATION"); - - if (stat64 (buf, &st) == 0 && S_ISREG (st.st_mode)) - { - if (verbose && GET (dirents[cnt]->d_name) == NULL) - { - /* Provide some nice output of all kinds of - information. */ - int fd; - - if (! first_locale) - putchar_unlocked ('\n'); - first_locale = 0; - - printf ("locale: %-15.15s directory: %.*s\n%s\n", - dirents[cnt]->d_name, (int) (enddir - buf), buf, - linebuf); - - fd = open64 (buf, O_RDONLY); - if (fd != -1) - { - void *mapped = mmap64 (NULL, st.st_size, PROT_READ, - MAP_SHARED, fd, 0); - if (mapped != MAP_FAILED) - { - print_LC_IDENTIFICATION (mapped, st.st_size); - - munmap (mapped, st.st_size); - } - - close (fd); - - /* Now try to get the charset information. */ - strcpy (enddir, "/LC_CTYPE"); - fd = open64 (buf, O_RDONLY); - if (fd != -1 && fstat64 (fd, &st) >= 0 - && ((mapped = mmap64 (NULL, st.st_size, PROT_READ, - MAP_SHARED, fd, 0)) - != MAP_FAILED)) - { - print_LC_CTYPE (mapped, st.st_size); - - munmap (mapped, st.st_size); - } - - if (fd != -1) - close (fd); - } - } - - /* If the verbose format is not selected we simply - collect the names. */ - PUT (xstrdup (dirents[cnt]->d_name)); - } - } - if (ndirents > 0) - free (dirents); /* Now read the locale.alias files. */ if (argz_create_sep (LOCALE_ALIAS_PATH, ':', &alias_path, &alias_path_len)) @@ -519,7 +360,7 @@ write_locales (void) char full_name[strlen (entry) + sizeof aliasfile]; stpcpy (stpcpy (full_name, entry), aliasfile); - fp = fopen (full_name, "rm"); + fp = fopen (full_name, "r"); if (fp == NULL) /* Ignore non-existing files. */ continue; @@ -581,7 +422,7 @@ write_locales (void) *cp++ = '\0'; /* Add the alias. */ - if (! verbose && GET (value) != NULL) + if (! verbose) PUT (xstrdup (alias)); } } @@ -601,120 +442,146 @@ write_locales (void) fclose (fp); } + memset (linebuf, '-', sizeof (linebuf) - 1); + linebuf[sizeof (linebuf) - 1] = '\0'; + + /* Now we can look for all files in the directory. */ + ndirents = scandir (LOCALEDIR, &dirents, select_dirs, alphasort); + for (cnt = 0; cnt < ndirents; ++cnt) + { + /* Test whether at least the LC_CTYPE data is there. Some + directories only contain translations. */ + char buf[sizeof (LOCALEDIR) + strlen (dirents[cnt]->d_name) + + sizeof "/LC_IDENTIFICATION"]; + char *enddir; + struct stat64 st; + + stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), + dirents[cnt]->d_name), + "/LC_IDENTIFICATION"); + + if (stat64 (buf, &st) == 0 && S_ISREG (st.st_mode)) + { + if (verbose) + { + /* Provide some nice output of all kinds of + information. */ + int fd; + + if (! first_locale) + putchar_unlocked ('\n'); + first_locale = 0; + + printf ("locale: %-15.15s directory: %.*s\n%s\n", + dirents[cnt]->d_name, (int) (enddir - buf), buf, + linebuf); + + fd = open64 (buf, O_RDONLY); + if (fd != -1) + { + void *mapped = mmap64 (NULL, st.st_size, PROT_READ, + MAP_SHARED, fd, 0); + if (mapped != MAP_FAILED) + { + /* Read the information from the file. */ + struct + { + unsigned int magic; + unsigned int nstrings; + unsigned int strindex[0]; + } *filedata = mapped; + + if (filedata->magic == LIMAGIC (LC_IDENTIFICATION) + && (sizeof *filedata + + (filedata->nstrings + * sizeof (unsigned int)) + <= (size_t) st.st_size)) + { + const char *str; + +#define HANDLE(idx, name) \ + str = ((char *) mapped \ + + filedata->strindex[_NL_ITEM_INDEX (_NL_IDENTIFICATION_##idx)]); \ + if (*str != '\0') \ + printf ("%9s | %s\n", name, str) + HANDLE (TITLE, "title"); + HANDLE (SOURCE, "source"); + HANDLE (ADDRESS, "address"); + HANDLE (CONTACT, "contact"); + HANDLE (EMAIL, "email"); + HANDLE (TEL, "telephone"); + HANDLE (FAX, "fax"); + HANDLE (LANGUAGE, "language"); + HANDLE (TERRITORY, "territory"); + HANDLE (AUDIENCE, "audience"); + HANDLE (APPLICATION, "application"); + HANDLE (ABBREVIATION, "abbreviation"); + HANDLE (REVISION, "revision"); + HANDLE (DATE, "date"); + } + + munmap (mapped, st.st_size); + } + + close (fd); + + /* Now try to get the charset information. */ + strcpy (enddir, "/LC_CTYPE"); + fd = open64 (buf, O_RDONLY); + if (fd != -1 && fstat64 (fd, &st) >= 0 + && ((mapped = mmap64 (NULL, st.st_size, PROT_READ, + MAP_SHARED, fd, 0)) + != MAP_FAILED)) + { + struct + { + unsigned int magic; + unsigned int nstrings; + unsigned int strindex[0]; + } *filedata = mapped; + + if (filedata->magic == LIMAGIC (LC_CTYPE) + && (sizeof *filedata + + (filedata->nstrings + * sizeof (unsigned int)) + <= (size_t) st.st_size)) + { + const char *str; + + str = ((char *) mapped + + filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]); + if (*str != '\0') + printf (" codeset | %s\n", str); + } + + munmap (mapped, st.st_size); + } + + if (fd != -1) + close (fd); + } + } + else + /* If the verbose format is not selected we simply + collect the names. */ + PUT (xstrdup (dirents[cnt]->d_name)); + } + } + if (ndirents > 0) + free (dirents); + if (! verbose) { + /* `POSIX' locale is always available (POSIX.2 4.34.3). */ + PUT ("POSIX"); + /* And so is the "C" locale. */ + PUT ("C"); + twalk (all_data, print_names); } } -struct nameent -{ - char *name; - uint32_t locrec_offset; -}; - - -static int -nameentcmp (const void *a, const void *b) -{ - return strcoll (((const struct nameent *) a)->name, - ((const struct nameent *) b)->name); -} - - -static int -write_archive_locales (void **all_datap, char *linebuf) -{ - struct stat64 st; - void *all_data = *all_datap; - size_t len = 0; - struct locarhead *head; - struct namehashent *namehashtab; - char *addr = MAP_FAILED; - int fd, ret = 0; - uint32_t cnt; - - fd = open64 (ARCHIVE_NAME, O_RDONLY); - if (fd < 0) - return 0; - - if (fstat64 (fd, &st) < 0 || st.st_size < sizeof (*head)) - goto error_out; - - len = st.st_size; - addr = mmap64 (NULL, len, PROT_READ, MAP_SHARED, fd, 0); - if (addr == MAP_FAILED) - goto error_out; - - head = (struct locarhead *) addr; - if (head->namehash_offset + head->namehash_size > len - || head->string_offset + head->string_size > len - || head->locrectab_offset + head->locrectab_size > len - || head->sumhash_offset + head->sumhash_size > len) - goto error_out; - - namehashtab = (struct namehashent *) (addr + head->namehash_offset); - if (! verbose) - { - for (cnt = 0; cnt < head->namehash_size; ++cnt) - if (namehashtab[cnt].locrec_offset != 0) - { - PUT (xstrdup (addr + namehashtab[cnt].name_offset)); - ++ret; - } - } - else - { - struct nameent *names; - uint32_t used; - - names = (struct nameent *) xmalloc (head->namehash_used - * sizeof (struct nameent)); - for (cnt = used = 0; cnt < head->namehash_size; ++cnt) - if (namehashtab[cnt].locrec_offset != 0) - { - names[used].name = addr + namehashtab[cnt].name_offset; - names[used++].locrec_offset = namehashtab[cnt].locrec_offset; - } - - /* Sort the names. */ - qsort (names, used, sizeof (struct nameent), nameentcmp); - - for (cnt = 0; cnt < used; ++cnt) - { - struct locrecent *locrec; - - PUT (xstrdup (names[cnt].name)); - - if (cnt) - putchar_unlocked ('\n'); - - printf ("locale: %-15.15s archive: " ARCHIVE_NAME "\n%s\n", - names[cnt].name, linebuf); - - locrec = (struct locrecent *) (addr + names[cnt].locrec_offset); - - print_LC_IDENTIFICATION (addr - + locrec->record[LC_IDENTIFICATION].offset, - locrec->record[LC_IDENTIFICATION].len); - - print_LC_CTYPE (addr + locrec->record[LC_CTYPE].offset, - locrec->record[LC_CTYPE].len); - } - - ret = used; - } - -error_out: - if (addr != MAP_FAILED) - munmap (addr, len); - close (fd); - *all_datap = all_data; - return ret; -} - - /* Write the names of all available character maps to stdout. */ static void write_charmaps (void) diff --git a/src/kernel/libroot/posix/glibc/locale/programs/localedef.c b/src/kernel/libroot/posix/glibc/locale/programs/localedef.c index d106e8dba2..0bdef4be71 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/localedef.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/localedef.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -27,16 +27,14 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include "localedef.h" +#include "error.h" #include "charmap.h" #include "locfile.h" @@ -57,8 +55,7 @@ int verbose; /* If not zero suppress warnings and information messages. */ int be_quiet; -/* If not zero, produce old-style hash table instead of 3-level access - tables. */ +/* If not zero, produce old-style hash table instead of 3-level access tables. */ int oldstyle_tables; /* If not zero force output even if warning were issued. */ @@ -76,44 +73,18 @@ static const char *input_file; /* Name of the repertoire map file. */ const char *repertoire_global; -/* Name of the locale.alias file. */ -const char *alias_file; - /* List of all locales. */ static struct localedef_t *locales; -/* If true don't add locale data to archive. */ -bool no_archive; - -/* If true add named locales to archive. */ -static bool add_to_archive; - -/* If true delete named locales from archive. */ -static bool delete_from_archive; - -/* If true replace archive content when adding. */ -static bool replace_archive; - -/* If true list archive content. */ -static bool list_archive; - -/* Maximum number of retries when opening the locale archive. */ -int max_locarchive_open_retry = 10; - /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; -#define OPT_POSIX 301 -#define OPT_QUIET 302 -#define OPT_OLDSTYLE 303 -#define OPT_PREFIX 304 -#define OPT_NO_ARCHIVE 305 -#define OPT_ADD_TO_ARCHIVE 306 -#define OPT_REPLACE 307 -#define OPT_DELETE_FROM_ARCHIVE 308 -#define OPT_LIST_ARCHIVE 309 +#define OPT_POSIX 1 +#define OPT_QUIET 2 +#define OPT_OLDSTYLE 3 +#define OPT_PREFIX 4 /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = @@ -134,17 +105,6 @@ static const struct argp_option options[] = { "quiet", OPT_QUIET, NULL, 0, N_("Suppress warnings and information messages") }, { "verbose", 'v', NULL, 0, N_("Print more messages") }, - { NULL, 0, NULL, 0, N_("Archive control:") }, - { "no-archive", OPT_NO_ARCHIVE, NULL, 0, - N_("Don't add new data to archive") }, - { "add-to-archive", OPT_ADD_TO_ARCHIVE, NULL, 0, - N_("Add locales named by parameters to archive") }, - { "replace", OPT_REPLACE, NULL, 0, N_("Replace existing archive content") }, - { "delete-from-archive", OPT_DELETE_FROM_ARCHIVE, NULL, 0, - N_("Remove locales named by parameters from archive") }, - { "list-archive", OPT_LIST_ARCHIVE, NULL, 0, N_("List content of archive") }, - { "alias-file", 'A', "FILE", 0, - N_("locale.alias file to consult when making archive")}, { NULL, 0, NULL, 0, NULL } }; @@ -152,10 +112,7 @@ static const struct argp_option options[] = static const char doc[] = N_("Compile locale specification"); /* Strings for arguments in help texts. */ -static const char args_doc[] = N_("\ -NAME\n\ -[--add-to-archive|--delete-from-archive] FILE...\n\ ---list-archive [FILE]"); +static const char args_doc[] = N_("NAME"); /* Prototype for option handler. */ static error_t parse_opt (int key, char *arg, struct argp_state *state); @@ -205,15 +162,6 @@ main (int argc, char *argv[]) argp_err_exit_status = 4; argp_parse (&argp, argc, argv, 0, &remaining, NULL); - /* Handle a few special cases. */ - if (list_archive) - show_archive_content (verbose); - if (add_to_archive) - return add_locales_to_archive (argc - remaining, &argv[remaining], - replace_archive); - if (delete_from_archive) - return delete_locales_from_archive (argc - remaining, &argv[remaining]); - /* POSIX.2 requires to be verbose about missing characters in the character map. */ verbose |= posix_conformance; @@ -229,8 +177,6 @@ main (int argc, char *argv[]) /* The parameter describes the output path of the constructed files. If the described files cannot be written return a NULL pointer. */ output_path = construct_output_path (argv[remaining]); - if (output_path == NULL && ! no_archive) - error (4, errno, _("cannot create directory for output files")); cannot_write_why = errno; /* Now that the parameters are processed we have to reset the local @@ -241,8 +187,7 @@ main (int argc, char *argv[]) defines error code 3 for this situation so I think it must be a fatal error (see P1003.2 4.35.8). */ if (sysconf (_SC_2_LOCALEDEF) < 0) - WITH_CUR_LOCALE (error (3, 0, _("\ -FATAL: system does not define `_POSIX2_LOCALEDEF'"))); + error (3, 0, _("FATAL: system does not define `_POSIX2_LOCALEDEF'")); /* Process charmap file. */ charmap = charmap_read (charmap_file, verbose, be_quiet, 1); @@ -255,8 +200,7 @@ FATAL: system does not define `_POSIX2_LOCALEDEF'"))); /* Now read the locale file. */ if (locfile_read (&global, charmap) != 0) - WITH_CUR_LOCALE (error (4, errno, _("\ -cannot open locale definition file `%s'"), input_file)); + error (4, errno, _("cannot open locale definition file `%s'"), input_file); /* Perhaps we saw some `copy' instructions. */ while (1) @@ -271,8 +215,8 @@ cannot open locale definition file `%s'"), input_file)); break; if (locfile_read (runp, charmap) != 0) - WITH_CUR_LOCALE (error (4, errno, _("\ -cannot open locale definition file `%s'"), runp->name)); + error (4, errno, _("cannot open locale definition file `%s'"), + runp->name); } /* Check the categories we processed in source form. */ @@ -283,14 +227,13 @@ cannot open locale definition file `%s'"), runp->name)); if (error_message_count == 0 || force_output != 0) { if (cannot_write_why != 0) - WITH_CUR_LOCALE (error (4, cannot_write_why, _("\ -cannot write output files to `%s'"), output_path)); + error (4, cannot_write_why, _("cannot write output files to `%s'"), + output_path); else - write_all_categories (locales, charmap, argv[remaining], output_path); + write_all_categories (locales, charmap, output_path); } else - WITH_CUR_LOCALE (error (4, 0, _("\ -no output file produced because warning were issued"))); + error (4, 0, _("no output file produced because warning were issued")); /* This exit status is prescribed by POSIX.2 4.35.7. */ exit (error_message_count != 0); @@ -315,30 +258,12 @@ parse_opt (int key, char *arg, struct argp_state *state) case OPT_PREFIX: output_prefix = arg; break; - case OPT_NO_ARCHIVE: - no_archive = true; - break; - case OPT_ADD_TO_ARCHIVE: - add_to_archive = true; - break; - case OPT_REPLACE: - replace_archive = true; - break; - case OPT_DELETE_FROM_ARCHIVE: - delete_from_archive = true; - break; - case OPT_LIST_ARCHIVE: - list_archive = true; - break; case 'c': force_output = 1; break; case 'f': charmap_file = arg; break; - case 'A': - alias_file = arg; - break; case 'i': input_file = arg; break; @@ -387,7 +312,7 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2003"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -449,9 +374,6 @@ construct_output_path (char *path) output_prefix ?: "", LOCALEDIR, (int) (startp - path), path, normal, endp, '\0'); - if (n < 0) - return NULL; - endp = result + n - 1; } else @@ -461,21 +383,16 @@ construct_output_path (char *path) size_t len = strlen (path) + 1; result = xmalloc (len + 1); endp = mempcpy (result, path, len) - 1; - - /* If the user specified an output path we cannot add the output - to the archive. */ - no_archive = true; } errno = 0; - if (no_archive && euidaccess (result, W_OK) == -1) + if (euidaccess (result, W_OK) == -1) /* Perhaps the directory does not exist now. Try to create it. */ if (errno == ENOENT) { errno = 0; - if (mkdir (result, 0777) < 0) - return NULL; + mkdir (result, 0777); } *endp++ = '/'; @@ -561,17 +478,14 @@ add_to_readlist (int locale, const char *name, const char *repertoire_name, } } - if (generate - && (runp->needed & (1 << locale)) != 0 - && (runp->avail & (1 << locale)) == 0) - WITH_CUR_LOCALE (error (5, 0, _("\ -circular dependencies between locale definitions"))); + if (generate && (runp->needed & (1 << locale)) != 0) + error (5, 0, _("circular dependencies between locale definitions")); if (copy_locale != NULL) { if (runp->categories[locale].generic != NULL) - WITH_CUR_LOCALE (error (5, 0, _("\ -cannot add already read locale `%s' a second time"), name)); + error (5, 0, _("cannot add already read locale `%s' a second time"), + name); else runp->categories[locale].generic = copy_locale->categories[locale].generic; @@ -585,7 +499,7 @@ cannot add already read locale `%s' a second time"), name)); struct localedef_t * find_locale (int locale, const char *name, const char *repertoire_name, - const struct charmap_t *charmap) + struct charmap_t *charmap) { struct localedef_t *result; @@ -596,8 +510,8 @@ find_locale (int locale, const char *name, const char *repertoire_name, if ((result->avail & (1 << locale)) == 0 && locfile_read (result, charmap) != 0) - WITH_CUR_LOCALE (error (4, errno, _("\ -cannot open locale definition file `%s'"), result->name)); + error (4, errno, _("cannot open locale definition file `%s'"), + result->name); return result; } @@ -605,7 +519,7 @@ cannot open locale definition file `%s'"), result->name)); struct localedef_t * load_locale (int locale, const char *name, const char *repertoire_name, - const struct charmap_t *charmap, struct localedef_t *copy_locale) + struct charmap_t *charmap, struct localedef_t *copy_locale) { struct localedef_t *result; @@ -616,8 +530,8 @@ load_locale (int locale, const char *name, const char *repertoire_name, if ((result->avail & (1 << locale)) == 0 && locfile_read (result, charmap) != 0) - WITH_CUR_LOCALE (error (4, errno, _("\ -cannot open locale definition file `%s'"), result->name)); + error (4, errno, _("cannot open locale definition file `%s'"), + result->name); return result; } diff --git a/src/kernel/libroot/posix/glibc/locale/programs/localedef.h b/src/kernel/libroot/posix/glibc/locale/programs/localedef.h index 41f72860d4..dc631e96ac 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/localedef.h +++ b/src/kernel/libroot/posix/glibc/locale/programs/localedef.h @@ -1,5 +1,5 @@ /* General definitions for localedef(1). - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -22,13 +22,10 @@ #define _LOCALEDEF_H 1 /* Get the basic locale definitions. */ -#include #include -#include #include #include "repertoire.h" -#include "../locarchive.h" /* We need a bitmask for the locales. */ @@ -116,9 +113,6 @@ extern int verbose; extern int be_quiet; extern int oldstyle_tables; extern const char *repertoire_global; -extern int max_locarchive_open_retry; -extern bool no_archive; -extern const char *alias_file; /* Prototypes for a few program-wide used functions. */ @@ -128,19 +122,6 @@ extern void *xrealloc (void *__p, size_t __n); extern char *xstrdup (const char *__str); -/* Wrapper to switch LC_CTYPE back to the locale specified in the - environment for output. */ -#define WITH_CUR_LOCALE(stmt) \ - do { \ - int saved_errno = errno; \ - const char *cur_locale_ = setlocale (LC_CTYPE, NULL); \ - setlocale (LC_CTYPE, ""); \ - errno = saved_errno; \ - stmt; \ - setlocale (LC_CTYPE, cur_locale_); \ - } while (0) - - /* Mark given locale as to be read. */ extern struct localedef_t *add_to_readlist (int locale, const char *name, const char *repertoire_name, @@ -150,32 +131,12 @@ extern struct localedef_t *add_to_readlist (int locale, const char *name, /* Find the information for the locale NAME. */ extern struct localedef_t *find_locale (int locale, const char *name, const char *repertoire_name, - const struct charmap_t *charmap); + struct charmap_t *charmap); /* Load (if necessary) the information for the locale NAME. */ extern struct localedef_t *load_locale (int locale, const char *name, const char *repertoire_name, - const struct charmap_t *charmap, + struct charmap_t *charmap, struct localedef_t *copy_locale); - -/* Open the locale archive. */ -extern void open_archive (struct locarhandle *ah, bool readonly); - -/* Close the locale archive. */ -extern void close_archive (struct locarhandle *ah); - -/* Add given locale data to the archive. */ -extern int add_locale_to_archive (struct locarhandle *ah, const char *name, - locale_data_t data, bool replace); - -/* Add content of named directories to locale archive. */ -extern int add_locales_to_archive (size_t nlist, char *list[], bool replace); - -/* Removed named locales from archive. */ -extern int delete_locales_from_archive (size_t nlist, char *list[]); - -/* List content of locale archive. */ -extern void show_archive_content (int verbose); - #endif /* localedef.h */ diff --git a/src/kernel/libroot/posix/glibc/locale/programs/locfile.c b/src/kernel/libroot/posix/glibc/locale/programs/locfile.c index 1e8e434ee1..3d774ef43d 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/locfile.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/locfile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -30,24 +30,18 @@ #include #include -#include "../../crypt/md5.h" #include "localedef.h" #include "locfile.h" -#include "simple-hash.h" #include "locfile-kw.h" -/* Temporary storage of the locale data before writing it to the archive. */ -static locale_data_t to_archive; - - int -locfile_read (struct localedef_t *result, const struct charmap_t *charmap) +locfile_read (struct localedef_t *result, struct charmap_t *charmap) { const char *filename = result->name; const char *repertoire_name = result->repertoire_name; - int locale_mask = result->needed & ~result->avail; + int locale_mask = result->needed ^ result->avail; struct linereader *ldfile; int not_here = ALL_LOCALES; @@ -103,7 +97,7 @@ locfile_read (struct localedef_t *result, const struct charmap_t *charmap) /* Parse locale definition file and store result in RESULT. */ while (1) { - struct token *now = lr_token (ldfile, charmap, NULL, NULL, verbose); + struct token *now = lr_token (ldfile, charmap, NULL, verbose); enum token_t nowtok = now->tok; struct token *arg; @@ -119,7 +113,7 @@ locfile_read (struct localedef_t *result, const struct charmap_t *charmap) case tok_escape_char: case tok_comment_char: /* We need an argument. */ - arg = lr_token (ldfile, charmap, NULL, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok != tok_ident) { @@ -146,7 +140,7 @@ argument to `%s' must be a single character"), case tok_repertoiremap: /* We need an argument. */ - arg = lr_token (ldfile, charmap, NULL, NULL, verbose); + arg = lr_token (ldfile, charmap, NULL, verbose); if (arg->tok != tok_ident) { @@ -271,7 +265,7 @@ syntax error: not inside a locale definition section")); /* Semantic checking of locale specifications. */ static void (*const check_funcs[]) (struct localedef_t *, - const struct charmap_t *) = + struct charmap_t *) = { [LC_CTYPE] = ctype_finish, [LC_COLLATE] = collate_finish, @@ -289,7 +283,7 @@ static void (*const check_funcs[]) (struct localedef_t *, void check_all_categories (struct localedef_t *definitions, - const struct charmap_t *charmap) + struct charmap_t *charmap) { int cnt; @@ -301,8 +295,8 @@ check_all_categories (struct localedef_t *definitions, /* Writing the locale data files. All files use the same output_path. */ -static void (*const write_funcs[]) (struct localedef_t *, - const struct charmap_t *, const char *) = +static void (*const write_funcs[]) (struct localedef_t *, struct charmap_t *, + const char *) = { [LC_CTYPE] = ctype_output, [LC_COLLATE] = collate_output, @@ -318,10 +312,9 @@ static void (*const write_funcs[]) (struct localedef_t *, [LC_IDENTIFICATION] = identification_output }; - void write_all_categories (struct localedef_t *definitions, - const struct charmap_t *charmap, const char *locname, + struct charmap_t *charmap, const char *output_path) { int cnt; @@ -329,25 +322,8 @@ write_all_categories (struct localedef_t *definitions, for (cnt = 0; cnt < sizeof (write_funcs) / sizeof (write_funcs[0]); ++cnt) if (write_funcs[cnt] != NULL) write_funcs[cnt] (definitions, charmap, output_path); - - if (! no_archive) - { - /* The data has to be added to the archive. Do this now. */ - struct locarhandle ah; - - /* Open the archive. This call never returns if we cannot - successfully open the archive. */ - open_archive (&ah, false); - - if (add_locale_to_archive (&ah, locname, to_archive, true) != 0) - error (EXIT_FAILURE, errno, _("cannot add to locale archive")); - - /* We are done. */ - close_archive (&ah); - } } - /* Return a NULL terminated list of the directories next to output_path that have the same owner, group, permissions and device as output_path. */ static const char ** @@ -389,12 +365,12 @@ siblings_uncached (const char *output_path) elems = NULL; for (;;) { - struct dirent64 *other_dentry; + struct dirent *other_dentry; const char *other_name; char *other_path; struct stat other_stat; - other_dentry = readdir64 (dirp); + other_dentry = readdir (dirp); if (other_dentry == NULL) break; @@ -432,7 +408,6 @@ siblings_uncached (const char *output_path) return elems; } - /* Return a NULL terminated list of the directories next to output_path that have the same owner, group, permissions and device as output_path. Cache the result for future calls. */ @@ -459,7 +434,6 @@ siblings (const char *output_path) return last_result; } - /* Read as many bytes from a file descriptor as possible. */ static ssize_t full_read (int fd, void *bufarea, size_t nbyte) @@ -483,7 +457,6 @@ full_read (int fd, void *bufarea, size_t nbyte) return buf - (char *) bufarea; } - /* Compare the contents of two regular files of the same size. Return 0 if they are equal, 1 if they are different, or -1 if an error occurs. */ static int @@ -533,10 +506,9 @@ compare_files (const char *filename1, const char *filename2, size_t size, return ret; } - /* Write a locale file, with contents given by N_ELEM and VEC. */ void -write_locale_data (const char *output_path, int catidx, const char *category, +write_locale_data (const char *output_path, const char *category, size_t n_elem, struct iovec *vec) { size_t cnt, step, maxiov; @@ -544,32 +516,6 @@ write_locale_data (const char *output_path, int catidx, const char *category, char *fname; const char **other_paths; - if (! no_archive) - { - /* The data will be added to the archive. For now we simply - generate the image which will be written. First determine - the size. */ - int cnt; - void *endp; - - to_archive[catidx].size = 0; - for (cnt = 0; cnt < n_elem; ++cnt) - to_archive[catidx].size += vec[cnt].iov_len; - - /* Allocate the memory for it. */ - to_archive[catidx].addr = xmalloc (to_archive[catidx].size); - - /* Fill it in. */ - for (cnt = 0, endp = to_archive[catidx].addr; cnt < n_elem; ++cnt) - endp = mempcpy (endp, vec[cnt].iov_base, vec[cnt].iov_len); - - /* Compute the MD5 sum for the data. */ - __md5_buffer (to_archive[catidx].addr, to_archive[catidx].size, - to_archive[catidx].sum); - - return; - } - fname = xmalloc (strlen (output_path) + 2 * strlen (category) + 7); /* Normally we write to the directory pointed to by the OUTPUT_PATH. @@ -622,8 +568,9 @@ write_locale_data (const char *output_path, int catidx, const char *category, if (fd == -1) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, save_err, _("\ -cannot open output file `%s' for category `%s'"), fname, category)); + error (0, save_err, _("\ +cannot open output file `%s' for category `%s'"), + fname, category); free (fname); return; } @@ -646,8 +593,8 @@ cannot open output file `%s' for category `%s'"), fname, category)); if (writev (fd, &vec[cnt], step) < 0) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, errno, _("\ -failure while writing data for category `%s'"), category)); + error (0, errno, _("failure while writing data for category `%s'"), + category); break; } } @@ -734,7 +681,8 @@ failure while writing data for category `%s'"), category)); char * tmp_fname = (char *) xmalloc (strlen (fname) + 4 + 1); - strcpy (stpcpy (tmp_fname, fname), ".tmp"); + strcpy (tmp_fname, fname); + strcat (tmp_fname, ".tmp"); if (link (other_fname, tmp_fname) >= 0) { @@ -742,8 +690,9 @@ failure while writing data for category `%s'"), category)); if (rename (tmp_fname, fname) < 0) { if (!be_quiet) - WITH_CUR_LOCALE (error (0, errno, _("\ -cannot create output file `%s' for category `%s'"), fname, category)); + error (0, errno, _("\ +cannot create output file `%s' for category `%s'"), + fname, category); } free (tmp_fname); free (other_fname); diff --git a/src/kernel/libroot/posix/glibc/locale/programs/locfile.h b/src/kernel/libroot/posix/glibc/locale/programs/locfile.h index 2e96c62ec7..2693187f9b 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/locfile.h +++ b/src/kernel/libroot/posix/glibc/locale/programs/locfile.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -46,7 +46,7 @@ struct locale_file /* General handling of `copy'. */ static inline void -handle_copy (struct linereader *ldfile, const struct charmap_t *charmap, +handle_copy (struct linereader *ldfile, struct charmap_t *charmap, const char *repertoire_name, struct localedef_t *result, enum token_t token, int locale, const char *locale_name, int ignore_content) @@ -54,7 +54,7 @@ handle_copy (struct linereader *ldfile, const struct charmap_t *charmap, struct token *now; int warned = 0; - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != tok_string) lr_error (ldfile, _("expect string argument for `copy'")); else if (!ignore_content) @@ -74,8 +74,8 @@ locale name should consist only of portable characters")); /* The rest of the line must be empty and the next keyword must be `END xxx'. */ - while ((now = lr_token (ldfile, charmap, result, NULL, verbose))->tok - != tok_end && now->tok != tok_eof) + while ((now = lr_token (ldfile, charmap, NULL, verbose))->tok != tok_end + && now->tok != tok_eof) { if (warned == 0) { @@ -90,7 +90,7 @@ no other keyword shall be specified when `copy' is used")); if (now->tok != tok_eof) { /* Handle `END xxx'. */ - now = lr_token (ldfile, charmap, result, NULL, verbose); + now = lr_token (ldfile, charmap, NULL, verbose); if (now->tok != token) lr_error (ldfile, _("\ @@ -106,22 +106,20 @@ no other keyword shall be specified when `copy' is used")); /* Found in locfile.c. */ extern int locfile_read (struct localedef_t *result, - const struct charmap_t *charmap); + struct charmap_t *charmap); /* Check validity of all the locale data. */ extern void check_all_categories (struct localedef_t *definitions, - const struct charmap_t *charmap); + struct charmap_t *charmap); /* Write out all locale categories. */ extern void write_all_categories (struct localedef_t *definitions, - const struct charmap_t *charmap, - const char *locname, + struct charmap_t *charmap, const char *output_path); /* Write out the data. */ -extern void write_locale_data (const char *output_path, int catidx, - const char *category, size_t n_elem, - struct iovec *vec); +extern void write_locale_data (const char *output_path, const char *category, + size_t n_elem, struct iovec *vec); /* Entrypoints for the parsers of the individual categories. */ @@ -129,147 +127,145 @@ extern void write_locale_data (const char *output_path, int catidx, /* Handle LC_CTYPE category. */ extern void ctype_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void ctype_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void ctype_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); -extern uint32_t *find_translit (struct localedef_t *locale, - const struct charmap_t *charmap, uint32_t wch); /* Handle LC_COLLATE category. */ extern void collate_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void collate_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void collate_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_MONETARY category. */ extern void monetary_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void monetary_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void monetary_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_NUMERIC category. */ extern void numeric_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void numeric_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void numeric_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_MESSAGES category. */ extern void messages_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void messages_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void messages_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_TIME category. */ extern void time_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void time_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void time_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_PAPER category. */ extern void paper_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void paper_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void paper_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_NAME category. */ extern void name_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void name_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void name_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_ADDRESS category. */ extern void address_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void address_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void address_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_TELEPHONE category. */ extern void telephone_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void telephone_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void telephone_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_MEASUREMENT category. */ extern void measurement_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void measurement_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void measurement_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); /* Handle LC_IDENTIFICATION category. */ extern void identification_read (struct linereader *ldfile, struct localedef_t *result, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *repertoire_name, int ignore_content); extern void identification_finish (struct localedef_t *locale, - const struct charmap_t *charmap); + struct charmap_t *charmap); extern void identification_output (struct localedef_t *locale, - const struct charmap_t *charmap, + struct charmap_t *charmap, const char *output_path); #endif /* locfile.h */ diff --git a/src/kernel/libroot/posix/glibc/locale/programs/repertoire.c b/src/kernel/libroot/posix/glibc/locale/programs/repertoire.c index 8251db43d3..e66b24fe58 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/repertoire.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/repertoire.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -30,11 +30,11 @@ #include #include -#include "localedef.h" #include "linereader.h" #include "charmap.h" #include "repertoire.h" #include "simple-hash.h" +#include "localedef.h" /* Simple keyword hashing for the repertoiremap. */ @@ -149,7 +149,7 @@ repertoire_read (const char *filename) while (1) { /* What's on? */ - struct token *now = lr_token (repfile, NULL, NULL, NULL, verbose); + struct token *now = lr_token (repfile, NULL, NULL, verbose); enum token_t nowtok = now->tok; struct token *arg; @@ -168,7 +168,7 @@ repertoire_read (const char *filename) if (nowtok == tok_escape_char || nowtok == tok_comment_char) { /* We know that we need an argument. */ - arg = lr_token (repfile, NULL, NULL, NULL, verbose); + arg = lr_token (repfile, NULL, NULL, verbose); if (arg->tok != tok_ident) { @@ -322,14 +322,13 @@ argument to <%s> must be a single character"), } if (state != 2 && state != 90 && !be_quiet) - WITH_CUR_LOCALE (error (0, 0, _("%s: premature end of file"), - repfile->fname)); + error (0, 0, _("%s: premature end of file"), repfile->fname); lr_close (repfile); if (tsearch (result, &known, &repertoire_compare) == NULL) /* Something went wrong. */ - WITH_CUR_LOCALE (error (0, errno, _("cannot safe new repertoire map"))); + error (0, errno, _("cannot safe new repertoire map")); return result; } @@ -340,8 +339,7 @@ repertoire_complain (const char *name) { if (tfind (name, &unavailable, (__compar_fn_t) strcmp) == NULL) { - WITH_CUR_LOCALE (error (0, errno, _("\ -repertoire map file `%s' not found"), name)); + error (0, errno, _("repertoire map file `%s' not found"), name); /* Remember that we reported this map. */ tsearch (name, &unavailable, (__compar_fn_t) strcmp); diff --git a/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.c b/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.c index c319068677..35e32ca51e 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.c +++ b/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.c @@ -1,5 +1,5 @@ /* Implement simple hashing table with string based keys. - Copyright (C) 1994-1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper , October 1994. @@ -46,12 +46,14 @@ # define BITSPERBYTE 8 #endif +#ifndef LONGBITS +# define LONGBITS (sizeof (long) * BITSPERBYTE) +#endif + #ifndef bcopy # define bcopy(s, d, n) memcpy ((d), (s), (n)) #endif -#include "hashval.h" - extern void *xmalloc (size_t __n); extern void *xcalloc (size_t __n, size_t __m); @@ -68,8 +70,11 @@ hash_entry; /* Prototypes for local functions. */ static void insert_entry_2 (hash_table *htab, const void *key, size_t keylen, unsigned long hval, size_t idx, void *data); -static size_t lookup (const hash_table *htab, const void *key, size_t keylen, +static size_t lookup (hash_table *htab, const void *key, size_t keylen, unsigned long int hval); +static size_t lookup_2 (hash_table *htab, const void *key, size_t keylen, + unsigned long int hval); +static unsigned long compute_hashval (const void *key, size_t keylen); static int is_prime (unsigned long int candidate); @@ -158,11 +163,9 @@ insert_entry_2 (htab, key, keylen, hval, idx, data) } ++htab->filled; - if (100 * htab->filled > 75 * htab->size) + if (100 * htab->filled > 90 * htab->size) { - /* Table is filled more than 75%. Resize the table. - Experiments have shown that for best performance, this threshold - must lie between 40% and 85%. */ + /* Table is filled more than 90%. Resize the table. */ unsigned long int old_size = htab->size; htab->size = next_prime (htab->size * 2); @@ -174,8 +177,8 @@ insert_entry_2 (htab, key, keylen, hval, idx, data) if (table[idx].used) insert_entry_2 (htab, table[idx].key, table[idx].keylen, table[idx].used, - lookup (htab, table[idx].key, table[idx].keylen, - table[idx].used), + lookup_2 (htab, table[idx].key, table[idx].keylen, + table[idx].used), table[idx].data); free (table); @@ -185,7 +188,7 @@ insert_entry_2 (htab, key, keylen, hval, idx, data) int find_entry (htab, key, keylen, result) - const hash_table *htab; + hash_table *htab; const void *key; size_t keylen; void **result; @@ -221,7 +224,7 @@ set_entry (htab, key, keylen, newval) int iterate_table (htab, ptr, key, keylen, data) - const hash_table *htab; + hash_table *htab; void **ptr; const void **key; size_t *keylen; @@ -247,13 +250,56 @@ iterate_table (htab, ptr, key, keylen, data) } +static size_t +lookup (htab, key, keylen, hval) + hash_table *htab; + const void *key; + size_t keylen; + unsigned long hval; +{ + unsigned long hash; + size_t idx; + hash_entry *table = (hash_entry *) htab->table; + + /* First hash function: simply take the modul but prevent zero. */ + hash = 1 + hval % htab->size; + + idx = hash; + + if (table[idx].used) + { + if (table[idx].used == hval && table[idx].keylen == keylen + && memcmp (key, table[idx].key, keylen) == 0) + return idx; + + /* Second hash function as suggested in [Knuth]. */ + hash = 1 + hval % (htab->size - 2); + + do + { + if (idx <= hash) + idx = htab->size + idx - hash; + else + idx -= hash; + + /* If entry is found use it. */ + if (table[idx].used == hval && table[idx].keylen == keylen + && memcmp (key, table[idx].key, keylen) == 0) + return idx; + } + while (table[idx].used); + } + return idx; +} + + /* References: [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986 [Knuth] The Art of Computer Programming, part3 (6.4) */ static size_t -lookup (htab, key, keylen, hval) - const hash_table *htab; +lookup_2 (htab, key, keylen, hval) + hash_table *htab; const void *key; size_t keylen; unsigned long int hval; @@ -294,7 +340,34 @@ lookup (htab, key, keylen, hval) } -unsigned long int +static unsigned long +compute_hashval (key, keylen) + const void *key; + size_t keylen; +{ + size_t cnt; + unsigned long int hval, g; + + /* Compute the hash value for the given string. The algorithm + is taken from [Aho,Sethi,Ullman]. */ + cnt = 0; + hval = keylen; + while (cnt < keylen) + { + hval <<= 4; + hval += (unsigned long int) *(((char *) key) + cnt++); + g = hval & ((unsigned long) 0xf << (LONGBITS - 4)); + if (g != 0) + { + hval ^= g >> (LONGBITS - 8); + hval ^= g; + } + } + return hval != 0 ? hval : ~((unsigned long) 0); +} + + +unsigned long next_prime (seed) unsigned long int seed; { diff --git a/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.h b/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.h index 469caedc19..baca76fb5c 100644 --- a/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.h +++ b/src/kernel/libroot/posix/glibc/locale/programs/simple-hash.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -37,17 +37,15 @@ extern int init_hash (hash_table *htab, unsigned long int init_size) __THROW; extern int delete_hash (hash_table *htab) __THROW; extern int insert_entry (hash_table *htab, const void *key, size_t keylen, void *data) __THROW; -extern int find_entry (const hash_table *htab, const void *key, size_t keylen, +extern int find_entry (hash_table *htab, const void *key, size_t keylen, void **result) __THROW; extern int set_entry (hash_table *htab, const void *key, size_t keylen, void *newval) __THROW; -extern int iterate_table (const hash_table *htab, void **ptr, +extern int iterate_table (hash_table *htab, void **ptr, const void **key, size_t *keylen, void **data) __THROW; -extern unsigned long int compute_hashval (const void *key, size_t keylen) - __THROW; extern unsigned long int next_prime (unsigned long int seed) __THROW; #endif /* simple-hash.h */ diff --git a/src/kernel/libroot/posix/glibc/locale/setlocale.c b/src/kernel/libroot/posix/glibc/locale/setlocale.c index 50c752826c..3953322434 100644 --- a/src/kernel/libroot/posix/glibc/locale/setlocale.c +++ b/src/kernel/libroot/posix/glibc/locale/setlocale.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 95-99, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 95-99, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,42 +27,41 @@ #include "localeinfo.h" -#ifdef NL_CURRENT_INDIRECT +/* For each category declare two external variables (with weak references): + extern const struct locale_data *_nl_current_CATEGORY; + This points to the current locale's in-core data for CATEGORY. + extern const struct locale_data _nl_C_CATEGORY; + This contains the built-in "C"/"POSIX" locale's data for CATEGORY. + Both are weak references; if &_nl_current_CATEGORY is zero, + then nothing is using the locale data. */ +#define DEFINE_CATEGORY(category, category_name, items, a) \ +extern struct locale_data *_nl_current_##category; \ +extern struct locale_data _nl_C_##category; +#include "categories.def" +#undef DEFINE_CATEGORY -/* For each category declare a special external symbol - _nl_current_CATEGORY_used with a weak reference. - This symbol will is defined in lc-CATEGORY.c and will be linked in - if anything uses _nl_current_CATEGORY (also defined in that module). - Also use a weak reference for the _nl_current_CATEGORY thread variable. */ - -# define DEFINE_CATEGORY(category, category_name, items, a) \ - extern char _nl_current_##category##_used; \ - weak_extern (_nl_current_##category##_used) \ - weak_extern (_nl_current_##category) -# include "categories.def" -# undef DEFINE_CATEGORY - -/* Now define a table of flags based on those special weak symbols' values. - _nl_current_used[CATEGORY] will be zero if _nl_current_CATEGORY is not - linked in. */ -static char *const _nl_current_used[] = +/* Array indexed by category of pointers to _nl_current_CATEGORY slots. + Elements are zero for categories whose data is never used. */ +struct locale_data * *const _nl_current[] = { -# define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = &_nl_current_##category##_used, -# include "categories.def" -# undef DEFINE_CATEGORY +#define DEFINE_CATEGORY(category, category_name, items, a) \ + [category] = &_nl_current_##category, +#include "categories.def" +#undef DEFINE_CATEGORY + /* We need this additional element to simplify the code. It must + simply be != NULL. */ + [LC_ALL] = (struct locale_data **) ~0ul }; -# define CATEGORY_USED(category) (_nl_current_used[category] != 0) - -#else - -/* The shared library always loads all the categories, - and the current global settings are kept in _nl_global_locale. */ - -# define CATEGORY_USED(category) (1) - -#endif +/* Array indexed by category of pointers to _nl_C_CATEGORY slots. + Elements are zero for categories whose data is never used. */ +struct locale_data *const _nl_C[] = + { +#define DEFINE_CATEGORY(category, category_name, items, a) \ + [category] = &_nl_C_##category, +#include "categories.def" +#undef DEFINE_CATEGORY + }; /* Define an array of category names (also the environment variable names), @@ -86,17 +85,11 @@ const size_t _nl_category_name_sizes[] = }; -#ifdef NL_CURRENT_INDIRECT -# define WEAK_POSTLOAD(postload) weak_extern (postload) -#else -# define WEAK_POSTLOAD(postload) /* Need strong refs in static linking. */ -#endif - /* Declare the postload functions used below. */ #undef NO_POSTLOAD #define NO_POSTLOAD _nl_postload_ctype /* Harmless thing known to exist. */ #define DEFINE_CATEGORY(category, category_name, items, postload) \ -extern void postload (void); WEAK_POSTLOAD (postload) +extern void postload (void); #include "categories.def" #undef DEFINE_CATEGORY #undef NO_POSTLOAD @@ -112,8 +105,20 @@ static void (*const _nl_category_postload[]) (void) = }; +/* Name of current locale for each individual category. + Each is malloc'd unless it is nl_C_name. */ +static const char *_nl_current_names[] = + { +#define DEFINE_CATEGORY(category, category_name, items, a) \ + [category] = _nl_C_name, +#include "categories.def" +#undef DEFINE_CATEGORY + [LC_ALL] = _nl_C_name /* For LC_ALL. */ + }; + + /* Lock for protecting global data. */ -__libc_lock_define_initialized (, __libc_setlocale_lock attribute_hidden) +__libc_lock_define_initialized (, __libc_setlocale_lock) /* Defined in loadmsgcat.c. */ extern int _nl_msg_cat_cntr; @@ -142,7 +147,7 @@ new_composite_name (int category, const char *newnames[__LC_LAST]) { const char *name = (category == LC_ALL ? newnames[i] : category == i ? newnames[0] : - _nl_global_locale.__names[i]); + _nl_current_names[i]); last_len = strlen (name); cumlen += _nl_category_name_sizes[i] + 1 + last_len + 1; if (i > 0 && same && strcmp (name, newnames[0]) != 0) @@ -171,7 +176,7 @@ new_composite_name (int category, const char *newnames[__LC_LAST]) /* Add "CATEGORY=NAME;" to the string. */ const char *name = (category == LC_ALL ? newnames[i] : category == i ? newnames[0] : - _nl_global_locale.__names[i]); + _nl_current_names[i]); p = __stpcpy (p, _nl_category_names[i]); *p++ = '='; p = __stpcpy (p, name); @@ -182,31 +187,33 @@ new_composite_name (int category, const char *newnames[__LC_LAST]) } -/* Put NAME in _nl_global_locale.__names. */ +/* Put NAME in _nl_current_names. */ static inline void setname (int category, const char *name) { - if (_nl_global_locale.__names[category] == name) + if (_nl_current_names[category] == name) return; - if (_nl_global_locale.__names[category] != _nl_C_name) - free ((char *) _nl_global_locale.__names[category]); + if (_nl_current_names[category] != _nl_C_name) + free ((char *) _nl_current_names[category]); - _nl_global_locale.__names[category] = name; + _nl_current_names[category] = name; } + /* Put DATA in *_nl_current[CATEGORY]. */ static inline void setdata (int category, struct locale_data *data) { - if (CATEGORY_USED (category)) + if (_nl_current[category] != NULL) { - _nl_global_locale.__locales[category] = data; + *_nl_current[category] = data; if (_nl_category_postload[category]) (*_nl_category_postload[category]) (); } } + char * setlocale (int category, const char *locale) { @@ -222,31 +229,27 @@ setlocale (int category, const char *locale) /* Does user want name of current locale? */ if (locale == NULL) - return (char *) _nl_global_locale.__names[category]; + return (char *) _nl_current_names[category]; - if (strcmp (locale, _nl_global_locale.__names[category]) == 0) + if (strcmp (locale, _nl_current_names[category]) == 0) /* Changing to the same thing. */ - return (char *) _nl_global_locale.__names[category]; + return (char *) _nl_current_names[category]; /* We perhaps really have to load some data. So we determine the path in which to look for the data now. The environment variable `LOCPATH' must only be used when the binary has no SUID or SGID - bit set. If using the default path, we tell _nl_find_locale - by passing null and it can check the canonical locale archive. */ + bit set. */ locale_path = NULL; locale_path_len = 0; locpath_var = getenv ("LOCPATH"); if (locpath_var != NULL && locpath_var[0] != '\0') - { - if (__argz_create_sep (locpath_var, ':', - &locale_path, &locale_path_len) != 0) - return NULL; + if (__argz_create_sep (locpath_var, ':', + &locale_path, &locale_path_len) != 0) + return NULL; - if (__argz_add_sep (&locale_path, &locale_path_len, - _nl_default_locale_path, ':') != 0) - return NULL; - } + if (__argz_add_sep (&locale_path, &locale_path_len, LOCALEDIR, ':') != 0) + return NULL; if (category == LC_ALL) { @@ -313,14 +316,7 @@ setlocale (int category, const char *locale) &newnames[category]); if (newdata[category] == NULL) - { -#ifdef NL_CURRENT_INDIRECT - if (newnames[category] == _nl_C_name) - /* Null because it's the weak value of _nl_C_LC_FOO. */ - continue; -#endif - break; - } + break; /* We must not simply free a global locale since we have no control over the usage. So we mark it as un-deletable. */ @@ -330,7 +326,7 @@ setlocale (int category, const char *locale) /* Make a copy of locale name. */ if (newnames[category] != _nl_C_name) { - newnames[category] = __strdup (newnames[category]); + newnames[category] = strdup (newnames[category]); if (newnames[category] == NULL) break; } @@ -375,7 +371,7 @@ setlocale (int category, const char *locale) /* Protect global data. */ __libc_lock_lock (__libc_setlocale_lock); - if (CATEGORY_USED (category)) + if (_nl_current[category] != NULL) { /* Only actually load the data if anything will use it. */ newdata = _nl_find_locale (locale_path, locale_path_len, category, @@ -395,7 +391,7 @@ setlocale (int category, const char *locale) /* Make a copy of locale name. */ if (newname[0] != _nl_C_name) { - newname[0] = __strdup (newname[0]); + newname[0] = strdup (newname[0]); if (newname[0] == NULL) goto abort_single; } @@ -413,7 +409,7 @@ setlocale (int category, const char *locale) } else { - if (CATEGORY_USED (category)) + if (_nl_current[category] != NULL) setdata (category, newdata); setname (category, newname[0]); @@ -433,63 +429,44 @@ setlocale (int category, const char *locale) return (char *) newname[0]; } } -libc_hidden_def (setlocale) -static void -free_category (int category, - struct locale_data *here, struct locale_data *c_data) +extern struct loaded_l10nfile *_nl_locale_file_list[]; + +static void __attribute__ ((unused)) +free_mem (void) { - struct loaded_l10nfile *runp = _nl_locale_file_list[category]; - - /* If this category is already "C" don't do anything. */ - if (here != c_data) - { - /* We have to be prepared that sometime later we still - might need the locale information. */ - setdata (category, c_data); - setname (category, _nl_C_name); - } - - while (runp != NULL) - { - struct loaded_l10nfile *curr = runp; - struct locale_data *data = (struct locale_data *) runp->data; - - if (data != NULL && data != c_data) - _nl_unload_locale (data); - runp = runp->next; - free ((char *) curr->filename); - free (curr); - } -} - -libc_freeres_fn (free_mem) -{ -#ifdef NL_CURRENT_INDIRECT - /* We don't use the loop because we want to have individual weak - symbol references here. */ -# define DEFINE_CATEGORY(category, category_name, items, a) \ - if (CATEGORY_USED (category)) \ - { \ - extern struct locale_data _nl_C_##category; \ - weak_extern (_nl_C_##category) \ - free_category (category, *_nl_current_##category, &_nl_C_##category); \ - } -# include "categories.def" -# undef DEFINE_CATEGORY -#else int category; for (category = 0; category < __LC_LAST; ++category) if (category != LC_ALL) - free_category (category, _NL_CURRENT_DATA (category), - _nl_C_locobj.__locales[category]); -#endif + { + struct locale_data *here = *_nl_current[category]; + struct loaded_l10nfile *runp = _nl_locale_file_list[category]; + + /* If this category is already "C" don't do anything. */ + if (here != _nl_C[category]) + { + /* We have to be prepared that sometime later me still + might need the locale information. */ + setdata (category, _nl_C[category]); + setname (category, _nl_C_name); + + _nl_unload_locale (here); + } + + while (runp != NULL) + { + struct loaded_l10nfile *curr = runp; + struct locale_data *data = (struct locale_data *) runp->data; + + if (data != NULL && data != here && data != _nl_C[category]) + _nl_unload_locale (data); + runp = runp->next; + free ((char *) curr->filename); + free (curr); + } + } setname (LC_ALL, _nl_C_name); - - /* This frees the data structures associated with the locale archive. - The locales from the archive are not in the file list, so we have - not called _nl_unload_locale on them above. */ - _nl_archive_subfreeres (); } +text_set_element (__libc_subfreeres, free_mem); diff --git a/src/kernel/libroot/posix/glibc/locale/xlocale.c b/src/kernel/libroot/posix/glibc/locale/xlocale.c index d9d3442621..dd1dbbf508 100644 --- a/src/kernel/libroot/posix/glibc/locale/xlocale.c +++ b/src/kernel/libroot/posix/glibc/locale/xlocale.c @@ -1,5 +1,5 @@ /* C locale object. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -27,27 +27,27 @@ extern struct locale_data _nl_C_##category; #undef DEFINE_CATEGORY /* Defined in locale/C-ctype.c. */ -extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; -extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; -extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden; +extern const char _nl_C_LC_CTYPE_class[]; +extern const char _nl_C_LC_CTYPE_toupper[]; +extern const char _nl_C_LC_CTYPE_tolower[]; -struct __locale_struct _nl_C_locobj attribute_hidden = +struct __locale_struct _nl_C_locobj = { .__locales = { -#define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = &_nl_C_##category, -#include "categories.def" -#undef DEFINE_CATEGORY - }, - .__names = - { - [LC_ALL] = _nl_C_name, -#define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = _nl_C_name, -#include "categories.def" -#undef DEFINE_CATEGORY + [LC_CTYPE] = &_nl_C_LC_CTYPE, + [LC_NUMERIC] = &_nl_C_LC_NUMERIC, + [LC_TIME] = &_nl_C_LC_TIME, + [LC_COLLATE] = &_nl_C_LC_COLLATE, + [LC_MONETARY] = &_nl_C_LC_MONETARY, + [LC_MESSAGES] = &_nl_C_LC_MESSAGES, + [LC_PAPER] = &_nl_C_LC_PAPER, + [LC_NAME] = &_nl_C_LC_NAME, + [LC_ADDRESS] = &_nl_C_LC_ADDRESS, + [LC_TELEPHONE] = &_nl_C_LC_TELEPHONE, + [LC_MEASUREMENT] = &_nl_C_LC_MEASUREMENT, + [LC_IDENTIFICATION] = &_nl_C_LC_IDENTIFICATION }, .__ctype_b = (const unsigned short int *) _nl_C_LC_CTYPE_class + 128, .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, diff --git a/src/kernel/libroot/posix/glibc/locale/xlocale.h b/src/kernel/libroot/posix/glibc/locale/xlocale.h index 2b17d6973f..fa65e10a01 100644 --- a/src/kernel/libroot/posix/glibc/locale/xlocale.h +++ b/src/kernel/libroot/posix/glibc/locale/xlocale.h @@ -1,5 +1,5 @@ /* Definition of locale datatype. - Copyright (C) 1997,2000,02 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -34,9 +34,6 @@ typedef struct __locale_struct const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; - - /* Note: LC_ALL is not a valid index into this array. */ - const char *__names[13]; } *__locale_t; #endif /* xlocale.h */