From 0d5acd7467c4e95f792ef49fceb3ab8e917ce86b Mon Sep 17 00:00:00 2001 From: John Marino Date: Sat, 21 Sep 2013 12:45:03 +0200 Subject: [PATCH] locales, libconv: Sync with FreeBSD (extensive reach) What started out as a relatively simply upgrade to libiconv finally resulted in a simultaneous overhaul to locales, strings, and stdio. All of these are interdependent and there is no way to upgrade them individually or in steps. These cases are similar to what happened with libm where significant syncing came from NetBSD previously, rendering contributions from FreeBSD difficult. Libiconv and locales (both ancient) are now in sync with FreeBSD HEAD. As several headers were signficantly updated and the mtree was updated to accommodate the new include/xlocale directory, this commit will require a full world build. It also may cause some dports to no longer build due to prototype differences, but the dports will be adjusted. The regexp library was not being used. It was removed from FreeBSD four years ago. Since it required collate updates, I took the opportunity to remove it completely by adding re_comp functionality to 4.3 compat library like FreeBSD did. __DragonFly_version has been bumped to 500300. --- Makefile_upgrade.inc | 8 +- bin/date/date.c | 2 +- .../config/os/bsd/dragonfly/ctype_base.h | 19 +- .../config/os/bsd/dragonfly/ctype_inline.h | 17 + .../config/os/bsd/dragonfly/ctype_noninline.h | 4 + .../config/os/bsd/dragonfly/ctype_base.h | 19 +- .../config/os/bsd/dragonfly/ctype_inline.h | 26 + contrib/gdtoa/README.DELETED | 1 - contrib/gdtoa/README.DRAGONFLY | 18 + contrib/gdtoa/gdtoaimp.h | 38 +- contrib/gdtoa/strtod.c | 25 +- contrib/gdtoa/strtodg.c | 12 +- contrib/gdtoa/strtof.c | 24 +- contrib/gdtoa/{strtorx.c => strtorQ.c} | 75 +- contrib/gdtoa/strtord.c | 8 +- contrib/gdtoa/strtorx.c | 18 +- etc/Makefile | 21 - etc/locale.alias | 77 - etc/locale.deprecated | 17 - etc/mtree/BSD.include.dist | 2 + etc/mtree/BSD.usr.dist | 26 +- etc/nls.alias | 77 +- gnu/usr.bin/grep/libgreputils/Makefile | 6 +- include/Makefile | 11 +- include/ctype.h | 282 +- include/iconv.h | 114 +- include/langinfo.h | 36 +- include/locale.h | 13 +- include/nl_types.h | 36 +- include/paths.h | 5 +- include/regexp.h | 70 - include/runetype.h | 106 + include/stdlib.h | 15 +- include/string.h | 39 +- include/time.h | 128 +- include/{iconv.h => uchar.h} | 55 +- include/wchar.h | 189 +- include/wctype.h | 80 +- .../citrus/citrus_esdb.h => include/xlocale.h | 80 +- include/xlocale/Makefile | 8 + include/xlocale/_ctype.h | 203 + .../getwc.c => include/xlocale/_inttypes.h | 34 +- .../xlocale/_langinfo.h | 26 +- .../xlocale/_locale.h | 38 +- .../xlocale/_monetary.h | 30 +- include/xlocale/_stdio.h | 64 + include/xlocale/_stdlib.h | 59 + include/{iconv.h => xlocale/_string.h} | 51 +- include/{iconv.h => xlocale/_time.h} | 52 +- .../citrus_mmap.h => include/xlocale/_uchar.h | 30 +- include/xlocale/_wchar.h | 133 + lib/i18n_module/BIG5/Makefile | 7 +- .../BIG5}/citrus_big5.c | 205 +- .../BIG5}/citrus_big5.h | 5 +- lib/i18n_module/DECHanyu/Makefile | 6 +- .../DECHanyu}/citrus_dechanyu.c | 235 +- .../DECHanyu}/citrus_dechanyu.h | 3 +- lib/i18n_module/EUC/Makefile | 7 +- .../modules => i18n_module/EUC}/citrus_euc.c | 151 +- .../modules => i18n_module/EUC}/citrus_euc.h | 5 +- lib/i18n_module/EUCTW/Makefile | 7 +- .../EUCTW}/citrus_euctw.c | 155 +- .../EUCTW}/citrus_euctw.h | 5 +- lib/i18n_module/GBK2K/Makefile | 7 +- .../GBK2K}/citrus_gbk2k.c | 176 +- .../GBK2K}/citrus_gbk2k.h | 5 +- lib/i18n_module/HZ/Makefile | 6 +- .../modules => i18n_module/HZ}/citrus_hz.c | 271 +- .../modules => i18n_module/HZ}/citrus_hz.h | 3 +- lib/i18n_module/ISO2022/Makefile | 7 +- .../ISO2022}/citrus_iso2022.c | 452 +- .../ISO2022}/citrus_iso2022.h | 5 +- lib/i18n_module/JOHAB/Makefile | 7 +- .../JOHAB}/citrus_johab.c | 206 +- .../JOHAB}/citrus_johab.h | 3 +- lib/i18n_module/MSKanji/Makefile | 6 +- .../MSKanji}/citrus_mskanji.c | 208 +- .../MSKanji}/citrus_mskanji.h | 5 +- lib/i18n_module/Makefile | 10 +- lib/i18n_module/Makefile.inc | 23 +- lib/i18n_module/Makefile.shlib | 3 - lib/i18n_module/UES/Makefile | 7 +- .../modules => i18n_module/UES}/citrus_ues.c | 183 +- .../modules => i18n_module/UES}/citrus_ues.h | 3 +- lib/i18n_module/UTF1632/Makefile | 7 +- .../UTF1632}/citrus_utf1632.c | 195 +- .../UTF1632}/citrus_utf1632.h | 4 +- lib/i18n_module/UTF7/Makefile | 7 +- .../UTF7}/citrus_utf7.c | 220 +- .../UTF7}/citrus_utf7.h | 5 +- lib/i18n_module/UTF8/Makefile | 6 +- .../UTF8}/citrus_utf8.c | 178 +- .../UTF8}/citrus_utf8.h | 5 +- lib/i18n_module/VIQR/Makefile | 6 +- .../VIQR}/citrus_viqr.c | 237 +- .../VIQR}/citrus_viqr.h | 3 +- lib/i18n_module/ZW/Makefile | 6 +- .../modules => i18n_module/ZW}/citrus_zw.c | 204 +- .../modules => i18n_module/ZW}/citrus_zw.h | 3 +- lib/i18n_module/iconv_none/Makefile | 6 +- .../iconv_none}/citrus_iconv_none.c | 51 +- .../iconv_none}/citrus_iconv_none.h | 4 +- lib/i18n_module/iconv_std/Makefile | 7 +- .../iconv_std}/citrus_iconv_std.c | 215 +- .../iconv_std}/citrus_iconv_std.h | 4 +- .../iconv_std}/citrus_iconv_std_local.h | 28 +- lib/i18n_module/mapper_646/Makefile | 8 +- .../mapper_646}/citrus_mapper_646.c | 101 +- .../mapper_646}/citrus_mapper_646.h | 5 +- lib/i18n_module/mapper_none/Makefile | 6 +- .../mapper_none}/citrus_mapper_none.c | 43 +- .../mapper_none}/citrus_mapper_none.h | 4 +- lib/i18n_module/mapper_parallel/Makefile | 9 +- lib/i18n_module/mapper_serial/Makefile | 7 +- .../mapper_serial}/citrus_mapper_serial.c | 103 +- .../mapper_serial}/citrus_mapper_serial.h | 4 +- lib/i18n_module/mapper_std/Makefile | 7 +- .../mapper_std}/citrus_mapper_std.c | 164 +- .../mapper_std}/citrus_mapper_std.h | 4 +- .../mapper_std}/citrus_mapper_std_file.h | 36 +- .../mapper_std}/citrus_mapper_std_local.h | 6 +- lib/i18n_module/mapper_zone/Makefile | 7 +- .../mapper_zone}/citrus_mapper_zone.c | 205 +- .../mapper_zone}/citrus_mapper_zone.h | 4 +- lib/libarchive/config.h | 2 +- lib/libc/citrus/Makefile.inc | 35 +- lib/libc/citrus/Symbol.map | 90 +- .../{locale/_wcstol.h => citrus/_strtol.h} | 95 +- .../{locale/_wcstoul.h => citrus/_strtoul.h} | 76 +- ...citrus_hash.c => citrus_aliasname_local.h} | 37 +- lib/libc/citrus/citrus_bcs.c | 19 +- lib/libc/citrus/citrus_bcs.h | 50 +- .../citrus_bcs_strtol.c} | 30 +- .../citrus_bcs_strtoul.c} | 29 +- lib/libc/citrus/citrus_csmapper.c | 136 +- lib/libc/citrus/citrus_csmapper.h | 9 +- lib/libc/citrus/citrus_ctype.c | 207 - lib/libc/citrus/citrus_ctype.h | 171 - lib/libc/citrus/citrus_ctype_fallback.c | 103 - lib/libc/citrus/citrus_ctype_local.h | 203 - lib/libc/citrus/citrus_ctype_template.h | 767 -- lib/libc/citrus/citrus_db.c | 170 +- lib/libc/citrus/citrus_db.h | 52 +- lib/libc/citrus/citrus_db_factory.c | 117 +- lib/libc/citrus/citrus_db_factory.h | 43 +- lib/libc/citrus/citrus_db_file.h | 7 +- lib/libc/citrus/citrus_db_hash.c | 19 +- lib/libc/citrus/citrus_db_hash.h | 5 +- lib/libc/citrus/citrus_esdb.c | 123 +- lib/libc/citrus/citrus_esdb.h | 25 +- lib/libc/citrus/citrus_esdb_file.h | 5 +- .../citrus_fix_grouping.h} | 53 +- lib/libc/citrus/citrus_hash.c | 11 +- lib/libc/citrus/citrus_hash.h | 21 +- lib/libc/citrus/citrus_iconv.c | 241 +- lib/libc/citrus/citrus_iconv.h | 25 +- lib/libc/citrus/citrus_iconv_local.h | 90 +- .../citrus_lock.h} | 13 +- lib/libc/citrus/citrus_lookup.c | 117 +- lib/libc/citrus/citrus_lookup.h | 26 +- lib/libc/citrus/citrus_lookup_factory.c | 39 +- lib/libc/citrus/citrus_lookup_factory.h | 6 +- lib/libc/citrus/citrus_lookup_file.h | 4 +- lib/libc/citrus/citrus_mapper.c | 147 +- lib/libc/citrus/citrus_mapper.h | 56 +- lib/libc/citrus/citrus_mapper_local.h | 89 +- lib/libc/citrus/citrus_memstream.c | 35 +- lib/libc/citrus/citrus_memstream.h | 84 +- lib/libc/citrus/citrus_mmap.c | 27 +- lib/libc/citrus/citrus_mmap.h | 10 +- lib/libc/citrus/citrus_module.c | 317 +- lib/libc/citrus/citrus_module.h | 47 +- lib/libc/citrus/citrus_namespace.h | 8 +- lib/libc/citrus/citrus_none.c | 464 +- lib/libc/citrus/citrus_none.h | 9 +- lib/libc/citrus/citrus_pivot_factory.c | 75 +- lib/libc/citrus/citrus_pivot_factory.h | 6 +- lib/libc/citrus/citrus_pivot_file.h | 4 +- lib/libc/citrus/citrus_prop.c | 200 +- lib/libc/citrus/citrus_prop.h | 24 +- lib/libc/citrus/citrus_region.h | 42 +- lib/libc/citrus/citrus_stdenc.c | 71 +- lib/libc/citrus/citrus_stdenc.h | 82 +- lib/libc/citrus/citrus_stdenc_local.h | 162 +- lib/libc/citrus/citrus_stdenc_template.h | 122 +- lib/libc/citrus/citrus_types.h | 12 +- lib/libc/gdtoa/machdep_ldisx.c | 13 +- lib/libc/gen/Makefile.inc | 22 +- lib/libc/gen/Symbol.map | 1 - lib/libc/{stdio/fputws.c => gen/_once_stub.c} | 57 +- lib/libc/gen/ctype.c | 92 - lib/libc/gen/fnmatch.3 | 3 +- lib/libc/gen/fnmatch.c | 62 +- lib/libc/gen/glob.3 | 24 +- lib/libc/gen/glob.c | 310 +- lib/libc/gen/isascii.c | 47 - lib/libc/gen/isgraph.3 | 94 - lib/libc/{stdio/getwc.c => gen/libc_dlopen.c} | 32 +- lib/libc/gen/tolower.c | 60 - lib/libc/gen/toupper.c | 60 - lib/libc/iconv/Makefile.inc | 15 +- lib/libc/iconv/Symbol.map | 12 +- .../libc/iconv/__iconv_get_list.3 | 95 +- lib/libc/iconv/iconv.3 | 120 +- lib/libc/iconv/iconv.c | 241 +- .../libc/iconv/iconv_canonicalize.3 | 76 +- lib/libc/iconv/iconvctl.3 | 164 + .../libc/iconv/iconvlist.3 | 91 +- lib/libc/include/libc_private.h | 19 + lib/libc/locale/DESIGN.xlocale | 159 + lib/libc/locale/Makefile.inc | 99 +- lib/libc/locale/Symbol.map | 194 +- lib/libc/locale/__mb_cur_max.c | 34 - lib/libc/locale/__wctoint.h | 80 - lib/libc/locale/_def_messages.c | 19 - lib/libc/locale/_def_monetary.c | 37 - lib/libc/locale/_def_numeric.c | 18 - lib/libc/locale/_def_time.c | 28 - lib/libc/locale/_wcstod.h | 126 - lib/libc/locale/_wctrans.c | 106 - lib/libc/locale/_wctrans_local.h | 61 - lib/libc/locale/aliasname.c | 125 - lib/libc/locale/ascii.c | 192 + lib/libc/locale/{wcsftime.3 => big5.5} | 60 +- lib/libc/locale/big5.c | 178 + lib/libc/locale/btowc.3 | 92 +- lib/libc/{stdio/getwc.c => locale/btowc.c} | 46 +- .../locale/{multibyte_c90.c => c16rtomb.c} | 112 +- lib/libc/locale/c16rtomb_iconv.c | 8 + lib/libc/locale/{wcstoimax.c => c32rtomb.c} | 45 +- lib/libc/locale/c32rtomb_iconv.c | 8 + lib/libc/locale/cXXrtomb_iconv.h | 116 + lib/libc/locale/collate.c | 167 +- lib/libc/locale/collate.h | 33 +- lib/libc/locale/collcmp.c | 57 +- lib/libc/{gen => locale}/ctype.3 | 50 +- .../{string/wcscasecmp.c => locale/ctype.c} | 41 +- lib/libc/locale/ctype_l.3 | 151 + .../{gen/toascii.3 => locale/digittoint.3} | 57 +- lib/libc/locale/{towlower.3 => duplocale.3} | 83 +- lib/libc/locale/euc.5 | 134 + lib/libc/locale/euc.c | 272 + .../{stdio/fputwc.c => locale/fix_grouping.c} | 110 +- .../{gen/isascii.3 => locale/freelocale.3} | 62 +- lib/libc/locale/gb18030.5 | 78 + lib/libc/locale/gb18030.c | 225 + lib/libc/locale/{wcsftime.3 => gb2312.5} | 60 +- lib/libc/locale/gb2312.c | 161 + lib/libc/locale/{wcsftime.3 => gbk.5} | 70 +- lib/libc/locale/gbk.c | 173 + lib/libc/{gen => locale}/isalnum.3 | 65 +- lib/libc/{gen => locale}/isalpha.3 | 61 +- lib/libc/{gen => locale}/isascii.3 | 13 +- lib/libc/{gen => locale}/isblank.3 | 52 +- lib/libc/{gen => locale}/iscntrl.3 | 53 +- lib/libc/{gen => locale}/isctype.c | 164 +- lib/libc/{gen => locale}/isdigit.3 | 74 +- lib/libc/locale/isgraph.3 | 119 + .../wcswidth.3 => locale/isideogram.3} | 48 +- lib/libc/{gen => locale}/islower.3 | 55 +- .../wcswidth.3 => locale/isphonogram.3} | 48 +- lib/libc/{gen => locale}/isprint.3 | 67 +- lib/libc/{gen => locale}/ispunct.3 | 62 +- .../{string/wcswidth.3 => locale/isrune.3} | 54 +- lib/libc/{gen => locale}/isspace.3 | 60 +- .../{string/wcswidth.3 => locale/isspecial.3} | 47 +- lib/libc/{gen => locale}/isupper.3 | 38 +- lib/libc/locale/iswalnum.3 | 75 +- lib/libc/locale/iswalnum_l.3 | 168 + lib/libc/locale/iswctype.3 | 99 - lib/libc/locale/iswctype.c | 231 +- lib/libc/{gen => locale}/isxdigit.3 | 59 +- lib/libc/locale/ldpart.c | 166 + .../{string/stpncpy.c => locale/ldpart.h} | 27 +- lib/libc/locale/lmessages.c | 126 + .../quirks.h => libc/locale/lmessages.h} | 34 +- lib/libc/locale/lmonetary.c | 225 + .../citrus_esdb.h => locale/lmonetary.h} | 67 +- lib/libc/locale/lnumeric.c | 127 + .../{string/wmemcmp.c => locale/lnumeric.h} | 44 +- lib/libc/locale/localeconv.3 | 237 + lib/libc/locale/localeconv.c | 150 +- lib/libc/locale/mblen.3 | 185 +- lib/libc/{string/wcsdup.c => locale/mblen.c} | 39 +- lib/libc/locale/mblocal.h | 79 + lib/libc/locale/mbrlen.3 | 224 +- lib/libc/{string/wcsspn.c => locale/mbrlen.c} | 43 +- lib/libc/locale/mbrtoc16.c | 89 + lib/libc/locale/mbrtoc16_iconv.c | 8 + .../{string/wcscspn.c => locale/mbrtoc32.c} | 41 +- lib/libc/locale/mbrtoc32_iconv.c | 8 + lib/libc/locale/mbrtocXX_iconv.h | 158 + lib/libc/locale/mbrtowc.3 | 266 +- .../{string/wcsspn.c => locale/mbrtowc.c} | 45 +- lib/libc/locale/mbsinit.3 | 58 +- .../{stdio/fwprintf.c => locale/mbsinit.c} | 31 +- lib/libc/locale/mbsnrtowcs.c | 102 + lib/libc/locale/mbsrtowcs.3 | 202 +- lib/libc/locale/{wcstoll.c => mbsrtowcs.c} | 40 +- lib/libc/locale/mbstowcs.3 | 122 +- lib/libc/locale/{wcstoll.c => mbstowcs.c} | 41 +- lib/libc/locale/mbtowc.3 | 195 +- lib/libc/{stdio/fgetwln.c => locale/mbtowc.c} | 67 +- lib/libc/locale/{wcstod.3 => mskanji.5} | 89 +- lib/libc/locale/mskanji.c | 163 + lib/libc/locale/multibyte.3 | 142 + lib/libc/locale/multibyte.h | 123 - lib/libc/locale/multibyte_amd1.c | 167 - lib/libc/locale/newlocale.3 | 112 + .../wcswidth.3 => locale/nextwctype.3} | 60 +- lib/libc/locale/nextwctype.c | 103 + lib/libc/locale/nl_langinfo.3 | 192 +- lib/libc/locale/nl_langinfo.c | 254 +- lib/libc/locale/nomacros.c | 19 + lib/libc/locale/none.c | 220 + .../{gen/isascii.3 => locale/querylocale.3} | 52 +- .../{string/wcswidth.3 => locale/rpmatch.3} | 57 +- .../{stdio/fwprintf.c => locale/rpmatch.c} | 34 +- lib/libc/locale/rune.c | 472 +- lib/libc/locale/rune.h | 98 - .../{string/wcsrchr.c => locale/runefile.h} | 55 +- lib/libc/locale/runeglue.c | 142 - lib/libc/locale/runetable.c | 275 - .../locale/{___runetype_mb.c => runetype.c} | 73 +- lib/libc/locale/runetype.h | 221 - lib/libc/locale/setlocale.3 | 319 +- lib/libc/locale/setlocale.c | 478 +- .../strchrnul.c => locale/setlocale.h} | 30 +- lib/libc/locale/setrunelocale.c | 315 +- lib/libc/locale/table.c | 261 + lib/libc/{gen => locale}/toascii.3 | 6 +- lib/libc/{gen => locale}/tolower.3 | 43 +- .../locale/{___runetype_mb.c => tolower.c} | 65 +- lib/libc/{gen => locale}/toupper.3 | 43 +- .../locale/{___runetype_mb.c => toupper.c} | 67 +- lib/libc/locale/towctrans.3 | 88 - lib/libc/locale/towlower.3 | 38 +- lib/libc/{gen/toupper.3 => locale/towupper.3} | 54 +- .../{gen/isascii.3 => locale/uselocale.3} | 56 +- lib/libc/locale/utf8.5 | 102 + lib/libc/locale/utf8.c | 435 + lib/libc/locale/wcrtomb.3 | 175 +- .../{string/wcsspn.c => locale/wcrtomb.c} | 44 +- lib/libc/locale/wcsftime.3 | 3 +- lib/libc/locale/wcsftime.c | 33 +- lib/libc/locale/wcsnrtombs.c | 123 + lib/libc/locale/wcsrtombs.3 | 204 +- lib/libc/locale/{wcstoimax.c => wcsrtombs.c} | 42 +- lib/libc/locale/wcstod.3 | 22 +- lib/libc/locale/wcstod.c | 95 +- lib/libc/locale/wcstof.c | 64 +- lib/libc/locale/wcstoimax.c | 116 +- lib/libc/locale/wcstol.3 | 19 +- lib/libc/locale/wcstol.c | 113 +- lib/libc/locale/wcstold.c | 71 +- lib/libc/locale/wcstoll.c | 114 +- lib/libc/locale/wcstombs.3 | 129 +- lib/libc/locale/{wcstoll.c => wcstombs.c} | 41 +- lib/libc/locale/wcstoul.c | 112 +- lib/libc/locale/wcstoull.c | 112 +- lib/libc/locale/wcstoumax.c | 113 +- lib/libc/locale/wctob.3 | 88 - lib/libc/{stdio/fwprintf.c => locale/wctob.c} | 35 +- lib/libc/locale/wctomb.3 | 148 +- lib/libc/{string/wcsdup.c => locale/wctomb.c} | 37 +- lib/libc/locale/wctrans.3 | 122 +- lib/libc/{stdio/fgetws.c => locale/wctrans.c} | 113 +- lib/libc/locale/wctype.3 | 125 +- lib/libc/locale/wctype.c | 113 + lib/libc/locale/wcwidth.3 | 13 +- lib/libc/{gen/toascii.c => locale/wcwidth.c} | 36 +- lib/libc/locale/xlocale.3 | 280 + lib/libc/locale/xlocale.c | 371 + lib/libc/locale/xlocale_private.h | 232 + lib/libc/nls/C.msg | 301 + lib/libc/nls/Makefile.inc | 35 +- lib/libc/nls/be_BY.UTF-8.msg | 249 + lib/libc/nls/ca_ES.ISO8859-1.msg | 267 + lib/libc/nls/catclose.3 | 7 +- lib/libc/nls/catclose.c | 64 - lib/libc/nls/catgets.3 | 20 +- lib/libc/nls/catgets.c | 117 - lib/libc/nls/catopen.3 | 9 +- lib/libc/nls/catopen.c | 186 - lib/libc/nls/de_DE.ISO8859-1.msg | 249 + lib/libc/nls/el_GR.ISO8859-7.msg | 249 + lib/libc/nls/es_ES.ISO8859-1.msg | 295 + lib/libc/nls/fi_FI.ISO8859-1.msg | 233 + lib/libc/nls/fr_FR.ISO8859-1.msg | 249 + lib/libc/nls/gl_ES.ISO8859-1.msg | 295 + lib/libc/nls/hu_HU.ISO8859-2.msg | 295 + lib/libc/nls/it_IT.ISO8859-15.msg | 231 + lib/libc/nls/ja_JP.UTF-8.msg | 295 + lib/libc/nls/ja_JP.eucJP.msg | 295 + lib/libc/nls/ko_KR.UTF-8.msg | 295 + lib/libc/nls/ko_KR.eucKR.msg | 295 + lib/libc/nls/mn_MN.UTF-8.msg | 249 + lib/libc/nls/msgcat.c | 446 + lib/libc/nls/nl_NL.ISO8859-1.msg | 294 + lib/libc/nls/no_NO.ISO8859-1.msg | 231 + lib/libc/nls/pl_PL.ISO8859-2.msg | 249 + lib/libc/nls/pt_BR.ISO8859-1.msg | 249 + lib/libc/nls/ru_RU.KOI8-R.msg | 266 + lib/libc/nls/sk_SK.ISO8859-2.msg | 267 + lib/libc/nls/sv_SE.ISO8859-1.msg | 233 + lib/libc/nls/uk_UA.UTF-8.msg | 259 + lib/libc/nls/zh_CN.GB18030.msg | 297 + lib/libc/nls/zh_CN.GB2312.msg | 297 + lib/libc/nls/zh_CN.UTF-8.msg | 295 + lib/libc/regex/regcomp.c | 64 +- lib/libc/stdio/Symbol.map | 41 + lib/libc/stdio/__fpending.c | 3 - lib/libc/stdio/_flock_stub.c | 2 - lib/libc/stdio/asprintf.c | 26 +- lib/libc/stdio/fclose.c | 2 - lib/libc/stdio/fdopen.c | 2 - lib/libc/stdio/fflush.c | 2 - lib/libc/stdio/fgetln.c | 2 - lib/libc/stdio/fgets.c | 2 - lib/libc/stdio/fgetwc.c | 124 +- lib/libc/stdio/fgetwln.3 | 3 +- lib/libc/stdio/fgetwln.c | 32 +- lib/libc/stdio/fgetws.3 | 10 +- lib/libc/stdio/fgetws.c | 98 +- lib/libc/stdio/findfp.c | 1 - lib/libc/stdio/fmemopen.c | 1 - lib/libc/stdio/fopen.c | 2 - lib/libc/stdio/fprintf.c | 24 +- lib/libc/stdio/fpurge.c | 2 - lib/libc/stdio/fputs.c | 2 - lib/libc/stdio/fputwc.c | 79 +- lib/libc/stdio/fputws.3 | 10 +- lib/libc/stdio/fputws.c | 70 +- lib/libc/stdio/fread.c | 2 - lib/libc/stdio/freopen.c | 2 - lib/libc/stdio/fscanf.c | 28 +- lib/libc/stdio/fseek.c | 2 - lib/libc/stdio/ftell.c | 2 - lib/libc/stdio/funopen.c | 2 - lib/libc/stdio/fvwrite.c | 24 +- lib/libc/stdio/fwalk.c | 2 - lib/libc/stdio/fwide.c | 2 - lib/libc/stdio/fwprintf.c | 22 +- lib/libc/stdio/fwrite.c | 2 - lib/libc/stdio/fwscanf.c | 22 +- lib/libc/stdio/getdelim.c | 1 - lib/libc/stdio/gets.c | 1 - lib/libc/stdio/getwc.c | 16 +- lib/libc/stdio/getwchar.c | 16 +- lib/libc/stdio/local.h | 59 +- lib/libc/stdio/makebuf.c | 2 - lib/libc/stdio/perror.c | 2 - lib/libc/stdio/printf.c | 23 +- lib/libc/stdio/printfcommon.h | 28 +- lib/libc/stdio/puts.c | 2 - lib/libc/stdio/putwc.c | 19 +- lib/libc/stdio/putwchar.c | 19 +- lib/libc/stdio/refill.c | 2 - lib/libc/stdio/rget.c | 2 - lib/libc/stdio/scanf.3 | 7 +- lib/libc/stdio/scanf.c | 28 +- lib/libc/stdio/setvbuf.c | 2 - lib/libc/stdio/snprintf.c | 55 +- lib/libc/stdio/sprintf.c | 35 +- lib/libc/stdio/sreadahead.c | 3 - lib/libc/stdio/sscanf.c | 40 +- lib/libc/stdio/stdio.c | 2 - lib/libc/stdio/ungetc.c | 2 - lib/libc/stdio/ungetwc.3 | 23 +- lib/libc/stdio/ungetwc.c | 83 +- lib/libc/stdio/vasprintf.c | 27 +- lib/libc/stdio/vdprintf.c | 14 +- lib/libc/stdio/vfprintf.c | 91 +- lib/libc/stdio/vfscanf.c | 806 +- lib/libc/stdio/vfwprintf.c | 115 +- lib/libc/stdio/vfwscanf.c | 714 +- lib/libc/stdio/vscanf.c | 20 +- lib/libc/stdio/vsnprintf.c | 36 +- lib/libc/stdio/vsprintf.c | 26 +- lib/libc/stdio/vsscanf.c | 28 +- lib/libc/stdio/vswprintf.c | 40 +- lib/libc/stdio/vswscanf.c | 31 +- lib/libc/stdio/wbuf.c | 2 - lib/libc/stdio/wprintf.3 | 21 +- lib/libc/stdio/wprintf.c | 22 +- lib/libc/stdio/wscanf.3 | 7 +- lib/libc/stdio/wscanf.c | 22 +- lib/libc/stdio/wsetup.c | 2 - lib/libc/stdlib/strtoimax.c | 138 +- lib/libc/stdlib/strtol.c | 142 +- lib/libc/stdlib/strtoumax.c | 115 +- lib/libc/stdtime/Makefile.inc | 7 +- lib/libc/stdtime/Symbol.map | 20 +- lib/libc/stdtime/asctime.c | 29 +- lib/libc/stdtime/ctime.3 | 57 +- lib/libc/stdtime/difftime.c | 8 +- lib/libc/stdtime/localtime.c | 712 +- lib/libc/stdtime/private.h | 177 +- lib/libc/stdtime/strftime.3 | 73 +- lib/libc/stdtime/strftime.c | 327 +- lib/libc/stdtime/strptime.3 | 388 +- lib/libc/stdtime/strptime.c | 935 +- lib/libc/stdtime/time2posix.3 | 13 +- lib/libc/stdtime/time32.c | 48 +- lib/libc/stdtime/timelocal.c | 154 + .../machdep_ldisx.c => stdtime/timelocal.h} | 47 +- lib/libc/stdtime/tzfile.5 | 47 +- lib/libc/stdtime/tzfile.h | 16 +- lib/libc/string/Makefile.inc | 40 +- lib/libc/string/Symbol.map | 8 +- lib/libc/string/bcmp.3 | 3 +- lib/libc/string/bcmp.c | 3 +- lib/libc/string/bcopy.3 | 3 +- lib/libc/string/bcopy.c | 3 +- lib/libc/string/bstring.3 | 3 +- lib/libc/string/bzero.3 | 3 +- lib/libc/string/ffs.3 | 12 +- lib/libc/string/ffs.c | 5 +- lib/libc/string/ffsl.c | 2 +- lib/libc/string/ffsll.c | 2 +- lib/libc/string/fls.c | 2 +- lib/libc/string/flsl.c | 2 +- lib/libc/string/flsll.c | 2 +- lib/libc/string/index.3 | 21 +- lib/libc/string/memccpy.3 | 7 +- lib/libc/string/memccpy.c | 3 +- lib/libc/string/memchr.3 | 11 +- lib/libc/string/memchr.c | 3 +- lib/libc/string/memcmp.3 | 10 +- lib/libc/string/memcmp.c | 3 +- lib/libc/string/memcpy.3 | 19 +- lib/libc/string/memmem.3 | 4 +- lib/libc/string/memmem.c | 14 +- lib/libc/string/memmove.3 | 6 +- lib/libc/string/memrchr.c | 5 +- lib/libc/string/memset.3 | 10 +- lib/libc/string/memset.c | 3 +- lib/libc/string/stpcpy.c | 4 +- lib/libc/string/stpncpy.c | 8 +- lib/libc/string/strcasecmp.3 | 29 +- lib/libc/string/strcasecmp.c | 47 +- lib/libc/string/strcasestr.c | 23 +- lib/libc/string/strcat.3 | 44 +- lib/libc/string/strcat.c | 3 +- lib/libc/string/strchr.3 | 43 +- lib/libc/string/strchr.c | 53 +- lib/libc/string/strchrnul.c | 8 +- lib/libc/string/strcmp.3 | 8 +- lib/libc/string/strcmp.c | 5 +- lib/libc/string/strcoll.3 | 17 +- lib/libc/string/strcoll.c | 34 +- lib/libc/string/strcpy.3 | 52 +- lib/libc/string/strdup.3 | 21 +- lib/libc/string/strdup.c | 3 +- lib/libc/string/strerror.3 | 16 +- lib/libc/string/strerror.c | 5 +- lib/libc/string/strlcat.c | 8 +- lib/libc/string/strlcpy.3 | 12 +- lib/libc/string/strlcpy.c | 8 +- lib/libc/string/strncmp.c | 5 +- lib/libc/string/strncpy.c | 7 +- lib/libc/string/strndup.c | 9 +- lib/libc/string/strnlen.c | 2 +- lib/libc/string/strnstr.c | 10 +- lib/libc/string/strpbrk.3 | 6 +- lib/libc/string/strpbrk.c | 8 +- lib/libc/string/strrchr.c | 54 +- lib/libc/string/strsep.3 | 3 +- lib/libc/string/strsep.c | 3 +- lib/libc/string/strsignal.c | 91 +- lib/libc/string/strstr.3 | 22 +- lib/libc/string/strstr.c | 10 +- lib/libc/string/strtok.3 | 12 +- lib/libc/string/strtok.c | 10 +- lib/libc/string/strxfrm.3 | 17 +- lib/libc/string/strxfrm.c | 25 +- lib/libc/string/swab.3 | 8 +- lib/libc/string/swab.c | 5 +- lib/libc/string/{stpcpy.c => wcpcpy.c} | 8 +- lib/libc/string/{stpncpy.c => wcpncpy.c} | 16 +- lib/libc/string/wcscasecmp.c | 2 + lib/libc/string/wcscat.c | 4 +- lib/libc/string/wcschr.c | 6 +- lib/libc/string/wcscmp.c | 6 +- lib/libc/string/wcscoll.3 | 2 +- lib/libc/string/wcscoll.c | 22 +- lib/libc/string/wcscpy.c | 5 +- lib/libc/string/wcscspn.c | 5 +- lib/libc/string/wcsdup.c | 2 +- lib/libc/string/wcslcat.c | 6 +- lib/libc/string/wcslcpy.c | 6 +- lib/libc/string/wcslen.c | 8 +- lib/libc/string/wcsncasecmp.c | 2 + lib/libc/string/wcsncat.c | 6 +- lib/libc/string/wcsncmp.c | 5 +- lib/libc/string/wcsncpy.c | 4 +- lib/libc/string/wcsnlen.c | 2 +- lib/libc/string/wcspbrk.c | 9 +- lib/libc/string/wcsrchr.c | 6 +- lib/libc/string/wcsspn.c | 5 +- lib/libc/string/wcsstr.c | 8 +- lib/libc/string/wcstok.3 | 2 +- lib/libc/string/wcstok.c | 4 +- lib/libc/string/wcswidth.3 | 5 +- lib/libc/string/wcswidth.c | 19 +- lib/libc/string/wcsxfrm.3 | 2 +- lib/libc/string/wcsxfrm.c | 24 +- lib/libc/string/wmemchr.3 | 14 +- lib/libc/string/wmemchr.c | 11 +- lib/libc/string/wmemcmp.c | 10 +- lib/libc/string/wmemcpy.c | 7 +- lib/libc/string/wmemmove.c | 7 +- lib/libc/string/wmemset.c | 6 +- lib/libcompat/4.3/re_comp.3 | 13 +- lib/libcompat/4.3/{regex.c => re_comp.c} | 66 +- lib/libcompat/Makefile | 21 +- lib/libcompat/regexp/COPYRIGHT | 22 - lib/libcompat/regexp/README | 84 - lib/libcompat/regexp/regerror.c | 19 - lib/libcompat/regexp/regexp.3 | 320 - lib/libcompat/regexp/regexp.c | 1308 --- lib/libcompat/regexp/regmagic.h | 5 - lib/libcompat/regexp/regsub.c | 79 - lib/libkiconv/kiconv.3 | 3 +- lib/libkiconv/quirks.c | 25 +- lib/libkiconv/quirks.h | 2 +- lib/libkiconv/xlat16_iconv.c | 155 +- lib/libkiconv/xlat16_sysctl.c | 20 +- lib/libm/src/s_nan.c | 11 - secure/usr.bin/sftp/Makefile | 4 +- share/Makefile | 2 +- share/colldef/Makefile | 1 - share/colldef/la_LN.UTF-8.src | 6 - share/locale/Makefile | 17 - share/locale/ctype/Makefile | 353 - share/locale/ctype/charset/ASCII | 27 - share/locale/ctype/charset/GB2312 | 235 - share/locale/ctype/charset/JISX0201-left | 25 - share/locale/ctype/charset/JISX0201-right | 13 - share/locale/ctype/charset/JISX0208-1978 | 167 - share/locale/ctype/charset/JISX0208-1983 | 166 - share/locale/ctype/charset/KSC5601 | 154 - share/locale/ctype/charset/Latin-1 | 26 - share/locale/ctype/charset/Latin-2 | 55 - share/locale/ctype/charset/Latin-3 | 64 - share/locale/ctype/charset/Latin-4 | 58 - share/locale/ctype/charset/Latin-5 | 29 - share/locale/ctype/charset/Latin-6 | 41 - share/locale/ctype/charset/Latin-6+ | 23 - share/locale/ctype/charset/Latin-Cyrillic | 35 - share/locale/ctype/charset/Latin-Greek | 30 - share/locale/ctype/charset/Latin-Hebrew | 16 - share/locale/ctype/ja_JP.CTEXT.src | 21 - share/locale/ctype/ja_JP.ISO-2022-JP-2.src | 15 - share/locale/ctype/ja_JP.ISO-2022-JP.src | 18 - share/locale/ctype/ja_JP.eucJP.src | 421 - share/locale/ctype/kk_KZ.PT154.src | 89 - share/locale/ctype/ru_RU.ISO_8859-5.src | 187 - share/locale/ctype/tr_TR.ISO8859-9.src | 71 - share/locale/ctype/zh_CN.GB18030.src | 8489 ----------------- share/locale/ctype/zh_TW.eucTW.src | 659 -- share/locale/locale.alias | 134 - share/mklocale/Makefile | 102 + share/mklocale/README.locale_name | 9 + .../en_US.UTF-8.src => mklocale/UTF-8.src} | 122 +- share/mklocale/am_ET.UTF-8.src | 44 + .../ctype => mklocale}/be_BY.CP1131.src | 9 +- .../ctype => mklocale}/bg_BG.CP1251.src | 13 +- .../ctype => mklocale}/el_GR.ISO8859-7.src | 7 +- share/mklocale/hi_IN.ISCII-DEV.src | 35 + .../ctype => mklocale}/hy_AM.ARMSCII-8.src | 37 +- .../{locale/ctype => mklocale}/ja_JP.SJIS.src | 28 +- share/mklocale/ja_JP.eucJP.src | 245 + share/mklocale/kk_KZ.PT154.src | 105 + share/mklocale/ko_KR.CP949.src | 188 + .../ctype => mklocale}/ko_KR.eucKR.src | 53 +- .../la_LN.ISO8859-1.src} | 20 +- .../la_LN.ISO8859-13.src} | 13 +- .../la_LN.ISO8859-15.src} | 20 +- .../la_LN.ISO8859-2.src} | 40 +- .../la_LN.ISO8859-4.src} | 38 +- .../la_LN.US-ASCII.src} | 16 +- .../ctype => mklocale}/ru_RU.CP866.src | 47 +- share/mklocale/ru_RU.ISO8859-5.src | 46 + .../ctype => mklocale}/ru_RU.KOI8-R.src | 18 +- .../tr_TR.ISO8859-9.src} | 36 +- .../ctype => mklocale}/uk_UA.KOI8-U.src | 18 +- share/mklocale/zh_CN.GB18030.src | 7100 ++++++++++++++ share/mklocale/zh_CN.GB2312.src | 243 + share/mklocale/zh_CN.GBK.src | 328 + .../ctype => mklocale}/zh_CN.eucCN.src | 12 +- .../zh_HK.Big5HKSCS.src} | 174 +- .../zh_TW.Big5.src} | 186 +- share/monetdef/Makefile | 23 +- .../{fo_FO.ISO8859-1.src => ca_ES.UTF-8.src} | 18 +- .../{fo_FO.ISO8859-1.src => de_AT.UTF-8.src} | 16 +- .../{fo_FO.ISO8859-1.src => de_DE.UTF-8.src} | 14 +- .../{fo_FO.ISO8859-1.src => el_GR.UTF-8.src} | 20 +- .../{fo_FO.ISO8859-1.src => es_ES.UTF-8.src} | 14 +- .../{fo_FO.ISO8859-1.src => fi_FI.UTF-8.src} | 14 +- .../{fo_FO.ISO8859-1.src => fr_BE.UTF-8.src} | 18 +- .../{fo_FO.ISO8859-1.src => fr_FR.UTF-8.src} | 20 +- .../{fo_FO.ISO8859-1.src => it_IT.UTF-8.src} | 18 +- .../{fo_FO.ISO8859-1.src => nl_BE.UTF-8.src} | 18 +- .../{fo_FO.ISO8859-1.src => nl_NL.UTF-8.src} | 16 +- share/numericdef/Makefile | 5 +- share/numericdef/fo_FO.ISO8859-1.src | 12 - share/timedef/Makefile | 3 +- share/timedef/fo_FO.ISO8859-1.src | 102 - sys/dev/disk/aic7xxx/aicasm/Makefile | 22 +- sys/sys/_posix.h | 2 +- sys/sys/cdefs.h | 11 +- sys/sys/iconv.h | 38 +- sys/sys/param.h | 3 +- sys/sys/time.h | 36 +- usr.bin/mklocale/ldef.h => sys/sys/timespec.h | 51 +- sys/sys/types.h | 30 + usr.bin/colldef/Makefile | 17 +- usr.bin/colldef/colldef.1 | 69 +- usr.bin/colldef/common.h | 3 +- usr.bin/colldef/parse.y | 71 +- usr.bin/colldef/scan.l | 96 +- usr.bin/gencat/Makefile | 8 +- usr.bin/gencat/gencat.1 | 251 +- usr.bin/gencat/gencat.c | 268 +- usr.bin/iconv/iconv.1 | 34 +- usr.bin/iconv/iconv.c | 215 +- usr.bin/mkcsmapper/Makefile | 20 +- usr.bin/mkcsmapper/ldef.h | 19 +- usr.bin/mkcsmapper/lex.l | 36 +- usr.bin/mkcsmapper/mkcsmapper.1 | 11 +- usr.bin/mkcsmapper/yacc.y | 150 +- usr.bin/mklocale/Makefile | 22 +- usr.bin/mklocale/{ldef.h => extern.h} | 46 +- usr.bin/mklocale/ldef.h | 17 +- usr.bin/mklocale/lex.l | 56 +- usr.bin/mklocale/mklocale.1 | 142 +- usr.bin/mklocale/yacc.y | 556 +- 738 files changed, 40436 insertions(+), 33383 deletions(-) create mode 100644 contrib/gdtoa/README.DRAGONFLY copy contrib/gdtoa/{strtorx.c => strtorQ.c} (64%) delete mode 100644 etc/locale.alias delete mode 100644 etc/locale.deprecated delete mode 100644 include/regexp.h create mode 100644 include/runetype.h copy include/{iconv.h => uchar.h} (58%) copy lib/libc/citrus/citrus_esdb.h => include/xlocale.h (59%) create mode 100644 include/xlocale/Makefile create mode 100644 include/xlocale/_ctype.h copy lib/libc/stdio/getwc.c => include/xlocale/_inttypes.h (64%) copy lib/libc/citrus/citrus_mmap.h => include/xlocale/_langinfo.h (74%) copy lib/libc/citrus/citrus_mmap.h => include/xlocale/_locale.h (57%) rename lib/libc/citrus/citrus_ctype_fallback.h => include/xlocale/_monetary.h (68%) create mode 100644 include/xlocale/_stdio.h create mode 100644 include/xlocale/_stdlib.h copy include/{iconv.h => xlocale/_string.h} (58%) copy include/{iconv.h => xlocale/_time.h} (57%) copy lib/libc/citrus/citrus_mmap.h => include/xlocale/_uchar.h (65%) create mode 100644 include/xlocale/_wchar.h rename lib/{libc/citrus/modules => i18n_module/BIG5}/citrus_big5.c (72%) rename lib/{libc/citrus/modules => i18n_module/BIG5}/citrus_big5.h (86%) rename lib/{libc/citrus/modules => i18n_module/DECHanyu}/citrus_dechanyu.c (65%) rename lib/{libc/citrus/modules => i18n_module/DECHanyu}/citrus_dechanyu.h (91%) rename lib/{libc/citrus/modules => i18n_module/EUC}/citrus_euc.c (75%) rename lib/{libc/citrus/modules => i18n_module/EUC}/citrus_euc.h (86%) rename lib/{libc/citrus/modules => i18n_module/EUCTW}/citrus_euctw.c (72%) rename lib/{libc/citrus/modules => i18n_module/EUCTW}/citrus_euctw.h (86%) rename lib/{libc/citrus/modules => i18n_module/GBK2K}/citrus_gbk2k.c (66%) rename lib/{libc/citrus/modules => i18n_module/GBK2K}/citrus_gbk2k.h (86%) rename lib/{libc/citrus/modules => i18n_module/HZ}/citrus_hz.c (75%) rename lib/{libc/citrus/modules => i18n_module/HZ}/citrus_hz.h (92%) rename lib/{libc/citrus/modules => i18n_module/ISO2022}/citrus_iso2022.c (78%) rename lib/{libc/citrus/modules => i18n_module/ISO2022}/citrus_iso2022.h (86%) rename lib/{libc/citrus/modules => i18n_module/JOHAB}/citrus_johab.c (61%) rename lib/{libc/citrus/modules => i18n_module/JOHAB}/citrus_johab.h (92%) rename lib/{libc/citrus/modules => i18n_module/MSKanji}/citrus_mskanji.c (74%) rename lib/{libc/citrus/modules => i18n_module/MSKanji}/citrus_mskanji.h (86%) delete mode 100644 lib/i18n_module/Makefile.shlib rename lib/{libc/citrus/modules => i18n_module/UES}/citrus_ues.c (68%) rename lib/{libc/citrus/modules => i18n_module/UES}/citrus_ues.h (92%) rename lib/{libc/citrus/modules => i18n_module/UTF1632}/citrus_utf1632.c (71%) rename lib/{libc/citrus/modules => i18n_module/UTF1632}/citrus_utf1632.h (88%) rename lib/{libc/citrus/modules => i18n_module/UTF7}/citrus_utf7.c (70%) rename lib/{libc/citrus/modules => i18n_module/UTF7}/citrus_utf7.h (86%) rename lib/{libc/citrus/modules => i18n_module/UTF8}/citrus_utf8.c (73%) rename lib/{libc/citrus/modules => i18n_module/UTF8}/citrus_utf8.h (86%) rename lib/{libc/citrus/modules => i18n_module/VIQR}/citrus_viqr.c (71%) rename lib/{libc/citrus/modules => i18n_module/VIQR}/citrus_viqr.h (92%) rename lib/{libc/citrus/modules => i18n_module/ZW}/citrus_zw.c (68%) rename lib/{libc/citrus/modules => i18n_module/ZW}/citrus_zw.h (92%) rename lib/{libc/citrus/modules => i18n_module/iconv_none}/citrus_iconv_none.c (75%) rename lib/{libc/citrus/modules => i18n_module/iconv_none}/citrus_iconv_none.h (87%) rename lib/{libc/citrus/modules => i18n_module/iconv_std}/citrus_iconv_std.c (76%) rename lib/{libc/citrus/modules => i18n_module/iconv_std}/citrus_iconv_std.h (87%) rename lib/{libc/citrus/modules => i18n_module/iconv_std}/citrus_iconv_std_local.h (76%) rename lib/{libc/citrus/modules => i18n_module/mapper_646}/citrus_mapper_646.c (72%) rename lib/{libc/citrus/modules => i18n_module/mapper_646}/citrus_mapper_646.h (85%) rename lib/{libc/citrus/modules => i18n_module/mapper_none}/citrus_mapper_none.c (73%) rename lib/{libc/citrus/modules => i18n_module/mapper_none}/citrus_mapper_none.h (87%) rename lib/{libc/citrus/modules => i18n_module/mapper_serial}/citrus_mapper_serial.c (74%) rename lib/{libc/citrus/modules => i18n_module/mapper_serial}/citrus_mapper_serial.h (87%) rename lib/{libc/citrus/modules => i18n_module/mapper_std}/citrus_mapper_std.c (76%) rename lib/{libc/citrus/modules => i18n_module/mapper_std}/citrus_mapper_std.h (88%) rename lib/{libc/citrus/modules => i18n_module/mapper_std}/citrus_mapper_std_file.h (78%) rename lib/{libc/citrus/modules => i18n_module/mapper_std}/citrus_mapper_std_local.h (89%) rename lib/{libc/citrus/modules => i18n_module/mapper_zone}/citrus_mapper_zone.c (69%) rename lib/{libc/citrus/modules => i18n_module/mapper_zone}/citrus_mapper_zone.h (87%) rename lib/libc/{locale/_wcstol.h => citrus/_strtol.h} (56%) rename lib/libc/{locale/_wcstoul.h => citrus/_strtoul.h} (66%) copy lib/libc/citrus/{citrus_hash.c => citrus_aliasname_local.h} (68%) copy lib/libc/{stdlib/strtoimax.c => citrus/citrus_bcs_strtol.c} (73%) copy lib/libc/{stdlib/strtoumax.c => citrus/citrus_bcs_strtoul.c} (72%) delete mode 100644 lib/libc/citrus/citrus_ctype.c delete mode 100644 lib/libc/citrus/citrus_ctype.h delete mode 100644 lib/libc/citrus/citrus_ctype_fallback.c delete mode 100644 lib/libc/citrus/citrus_ctype_local.h delete mode 100644 lib/libc/citrus/citrus_ctype_template.h rename lib/libc/{locale/rune_local.h => citrus/citrus_fix_grouping.h} (60%) rename lib/libc/{locale/aliasname_local.h => citrus/citrus_lock.h} (80%) copy lib/libc/{stdio/fputws.c => gen/_once_stub.c} (56%) delete mode 100644 lib/libc/gen/ctype.c delete mode 100644 lib/libc/gen/isascii.c delete mode 100644 lib/libc/gen/isgraph.3 copy lib/libc/{stdio/getwc.c => gen/libc_dlopen.c} (74%) delete mode 100644 lib/libc/gen/tolower.c delete mode 100644 lib/libc/gen/toupper.c copy usr.bin/mkcsmapper/mkcsmapper.1 => lib/libc/iconv/__iconv_get_list.3 (60%) copy usr.bin/mkcsmapper/mkcsmapper.1 => lib/libc/iconv/iconv_canonicalize.3 (66%) create mode 100644 lib/libc/iconv/iconvctl.3 copy usr.bin/mkcsmapper/mkcsmapper.1 => lib/libc/iconv/iconvlist.3 (63%) create mode 100644 lib/libc/locale/DESIGN.xlocale delete mode 100644 lib/libc/locale/__mb_cur_max.c delete mode 100644 lib/libc/locale/__wctoint.h delete mode 100644 lib/libc/locale/_def_messages.c delete mode 100644 lib/libc/locale/_def_monetary.c delete mode 100644 lib/libc/locale/_def_numeric.c delete mode 100644 lib/libc/locale/_def_time.c delete mode 100644 lib/libc/locale/_wcstod.h delete mode 100644 lib/libc/locale/_wctrans.c delete mode 100644 lib/libc/locale/_wctrans_local.h delete mode 100644 lib/libc/locale/aliasname.c create mode 100644 lib/libc/locale/ascii.c copy lib/libc/locale/{wcsftime.3 => big5.5} (61%) create mode 100644 lib/libc/locale/big5.c copy lib/libc/{stdio/getwc.c => locale/btowc.c} (63%) rename lib/libc/locale/{multibyte_c90.c => c16rtomb.c} (51%) create mode 100644 lib/libc/locale/c16rtomb_iconv.c copy lib/libc/locale/{wcstoimax.c => c32rtomb.c} (65%) create mode 100644 lib/libc/locale/c32rtomb_iconv.c create mode 100644 lib/libc/locale/cXXrtomb_iconv.h rename lib/libc/{gen => locale}/ctype.3 (79%) copy lib/libc/{string/wcscasecmp.c => locale/ctype.c} (58%) create mode 100644 lib/libc/locale/ctype_l.3 copy lib/libc/{gen/toascii.3 => locale/digittoint.3} (64%) copy lib/libc/locale/{towlower.3 => duplocale.3} (51%) create mode 100644 lib/libc/locale/euc.5 create mode 100644 lib/libc/locale/euc.c copy lib/libc/{stdio/fputwc.c => locale/fix_grouping.c} (53%) copy lib/libc/{gen/isascii.3 => locale/freelocale.3} (60%) create mode 100644 lib/libc/locale/gb18030.5 create mode 100644 lib/libc/locale/gb18030.c copy lib/libc/locale/{wcsftime.3 => gb2312.5} (62%) create mode 100644 lib/libc/locale/gb2312.c copy lib/libc/locale/{wcsftime.3 => gbk.5} (55%) create mode 100644 lib/libc/locale/gbk.c rename lib/libc/{gen => locale}/isalnum.3 (57%) rename lib/libc/{gen => locale}/isalpha.3 (59%) copy lib/libc/{gen => locale}/isascii.3 (85%) rename lib/libc/{gen => locale}/isblank.3 (65%) rename lib/libc/{gen => locale}/iscntrl.3 (65%) rename lib/libc/{gen => locale}/isctype.c (52%) rename lib/libc/{gen => locale}/isdigit.3 (57%) create mode 100644 lib/libc/locale/isgraph.3 copy lib/libc/{string/wcswidth.3 => locale/isideogram.3} (63%) rename lib/libc/{gen => locale}/islower.3 (63%) copy lib/libc/{string/wcswidth.3 => locale/isphonogram.3} (63%) rename lib/libc/{gen => locale}/isprint.3 (52%) rename lib/libc/{gen => locale}/ispunct.3 (60%) copy lib/libc/{string/wcswidth.3 => locale/isrune.3} (63%) rename lib/libc/{gen => locale}/isspace.3 (62%) copy lib/libc/{string/wcswidth.3 => locale/isspecial.3} (63%) rename lib/libc/{gen => locale}/isupper.3 (71%) create mode 100644 lib/libc/locale/iswalnum_l.3 delete mode 100644 lib/libc/locale/iswctype.3 rename lib/libc/{gen => locale}/isxdigit.3 (64%) create mode 100644 lib/libc/locale/ldpart.c copy lib/libc/{string/stpncpy.c => locale/ldpart.h} (78%) create mode 100644 lib/libc/locale/lmessages.c copy lib/{libkiconv/quirks.h => libc/locale/lmessages.h} (67%) create mode 100644 lib/libc/locale/lmonetary.c copy lib/libc/{citrus/citrus_esdb.h => locale/lmonetary.h} (50%) create mode 100644 lib/libc/locale/lnumeric.c copy lib/libc/{string/wmemcmp.c => locale/lnumeric.h} (64%) create mode 100644 lib/libc/locale/localeconv.3 copy lib/libc/{string/wcsdup.c => locale/mblen.c} (63%) create mode 100644 lib/libc/locale/mblocal.h copy lib/libc/{string/wcsspn.c => locale/mbrlen.c} (67%) create mode 100644 lib/libc/locale/mbrtoc16.c create mode 100644 lib/libc/locale/mbrtoc16_iconv.c copy lib/libc/{string/wcscspn.c => locale/mbrtoc32.c} (68%) create mode 100644 lib/libc/locale/mbrtoc32_iconv.c create mode 100644 lib/libc/locale/mbrtocXX_iconv.h copy lib/libc/{string/wcsspn.c => locale/mbrtowc.c} (64%) copy lib/libc/{stdio/fwprintf.c => locale/mbsinit.c} (72%) create mode 100644 lib/libc/locale/mbsnrtowcs.c copy lib/libc/locale/{wcstoll.c => mbsrtowcs.c} (63%) copy lib/libc/locale/{wcstoll.c => mbstowcs.c} (64%) copy lib/libc/{stdio/fgetwln.c => locale/mbtowc.c} (61%) copy lib/libc/locale/{wcstod.3 => mskanji.5} (58%) create mode 100644 lib/libc/locale/mskanji.c create mode 100644 lib/libc/locale/multibyte.3 delete mode 100644 lib/libc/locale/multibyte.h delete mode 100644 lib/libc/locale/multibyte_amd1.c create mode 100644 lib/libc/locale/newlocale.3 copy lib/libc/{string/wcswidth.3 => locale/nextwctype.3} (63%) create mode 100644 lib/libc/locale/nextwctype.c create mode 100644 lib/libc/locale/nomacros.c create mode 100644 lib/libc/locale/none.c copy lib/libc/{gen/isascii.3 => locale/querylocale.3} (62%) copy lib/libc/{string/wcswidth.3 => locale/rpmatch.3} (63%) copy lib/libc/{stdio/fwprintf.c => locale/rpmatch.c} (69%) delete mode 100644 lib/libc/locale/rune.h copy lib/libc/{string/wcsrchr.c => locale/runefile.h} (66%) delete mode 100644 lib/libc/locale/runeglue.c delete mode 100644 lib/libc/locale/runetable.c copy lib/libc/locale/{___runetype_mb.c => runetype.c} (56%) delete mode 100644 lib/libc/locale/runetype.h copy lib/libc/{string/strchrnul.c => locale/setlocale.h} (70%) create mode 100644 lib/libc/locale/table.c rename lib/libc/{gen => locale}/toascii.3 (90%) rename lib/libc/{gen => locale}/tolower.3 (78%) copy lib/libc/locale/{___runetype_mb.c => tolower.c} (61%) copy lib/libc/{gen => locale}/toupper.3 (78%) rename lib/libc/locale/{___runetype_mb.c => toupper.c} (61%) delete mode 100644 lib/libc/locale/towctrans.3 rename lib/libc/{gen/toupper.3 => locale/towupper.3} (73%) rename lib/libc/{gen/isascii.3 => locale/uselocale.3} (62%) create mode 100644 lib/libc/locale/utf8.5 create mode 100644 lib/libc/locale/utf8.c copy lib/libc/{string/wcsspn.c => locale/wcrtomb.c} (67%) create mode 100644 lib/libc/locale/wcsnrtombs.c copy lib/libc/locale/{wcstoimax.c => wcsrtombs.c} (62%) copy lib/libc/locale/{wcstoll.c => wcstombs.c} (64%) delete mode 100644 lib/libc/locale/wctob.3 copy lib/libc/{stdio/fwprintf.c => locale/wctob.c} (67%) copy lib/libc/{string/wcsdup.c => locale/wctomb.c} (63%) copy lib/libc/{stdio/fgetws.c => locale/wctrans.c} (50%) create mode 100644 lib/libc/locale/wctype.c rename lib/libc/{gen/toascii.c => locale/wcwidth.c} (71%) create mode 100644 lib/libc/locale/xlocale.3 create mode 100644 lib/libc/locale/xlocale.c create mode 100644 lib/libc/locale/xlocale_private.h create mode 100644 lib/libc/nls/C.msg create mode 100644 lib/libc/nls/be_BY.UTF-8.msg create mode 100644 lib/libc/nls/ca_ES.ISO8859-1.msg delete mode 100644 lib/libc/nls/catclose.c delete mode 100644 lib/libc/nls/catgets.c delete mode 100644 lib/libc/nls/catopen.c create mode 100644 lib/libc/nls/de_DE.ISO8859-1.msg create mode 100644 lib/libc/nls/el_GR.ISO8859-7.msg create mode 100644 lib/libc/nls/es_ES.ISO8859-1.msg create mode 100644 lib/libc/nls/fi_FI.ISO8859-1.msg create mode 100644 lib/libc/nls/fr_FR.ISO8859-1.msg create mode 100644 lib/libc/nls/gl_ES.ISO8859-1.msg create mode 100644 lib/libc/nls/hu_HU.ISO8859-2.msg create mode 100644 lib/libc/nls/it_IT.ISO8859-15.msg create mode 100644 lib/libc/nls/ja_JP.UTF-8.msg create mode 100644 lib/libc/nls/ja_JP.eucJP.msg create mode 100644 lib/libc/nls/ko_KR.UTF-8.msg create mode 100644 lib/libc/nls/ko_KR.eucKR.msg create mode 100644 lib/libc/nls/mn_MN.UTF-8.msg create mode 100644 lib/libc/nls/msgcat.c create mode 100644 lib/libc/nls/nl_NL.ISO8859-1.msg create mode 100644 lib/libc/nls/no_NO.ISO8859-1.msg create mode 100644 lib/libc/nls/pl_PL.ISO8859-2.msg create mode 100644 lib/libc/nls/pt_BR.ISO8859-1.msg create mode 100644 lib/libc/nls/ru_RU.KOI8-R.msg create mode 100644 lib/libc/nls/sk_SK.ISO8859-2.msg create mode 100644 lib/libc/nls/sv_SE.ISO8859-1.msg create mode 100644 lib/libc/nls/uk_UA.UTF-8.msg create mode 100644 lib/libc/nls/zh_CN.GB18030.msg create mode 100644 lib/libc/nls/zh_CN.GB2312.msg create mode 100644 lib/libc/nls/zh_CN.UTF-8.msg create mode 100644 lib/libc/stdtime/timelocal.c copy lib/libc/{gdtoa/machdep_ldisx.c => stdtime/timelocal.h} (59%) copy lib/libc/string/{stpcpy.c => wcpcpy.c} (91%) copy lib/libc/string/{stpncpy.c => wcpncpy.c} (84%) rename lib/libcompat/4.3/{regex.c => re_comp.c} (72%) delete mode 100644 lib/libcompat/regexp/COPYRIGHT delete mode 100644 lib/libcompat/regexp/README delete mode 100644 lib/libcompat/regexp/regerror.c delete mode 100644 lib/libcompat/regexp/regexp.3 delete mode 100644 lib/libcompat/regexp/regexp.c delete mode 100644 lib/libcompat/regexp/regmagic.h delete mode 100644 lib/libcompat/regexp/regsub.c delete mode 100644 share/colldef/la_LN.UTF-8.src delete mode 100644 share/locale/Makefile delete mode 100644 share/locale/ctype/Makefile delete mode 100644 share/locale/ctype/charset/ASCII delete mode 100644 share/locale/ctype/charset/GB2312 delete mode 100644 share/locale/ctype/charset/JISX0201-left delete mode 100644 share/locale/ctype/charset/JISX0201-right delete mode 100644 share/locale/ctype/charset/JISX0208-1978 delete mode 100644 share/locale/ctype/charset/JISX0208-1983 delete mode 100644 share/locale/ctype/charset/KSC5601 delete mode 100644 share/locale/ctype/charset/Latin-1 delete mode 100644 share/locale/ctype/charset/Latin-2 delete mode 100644 share/locale/ctype/charset/Latin-3 delete mode 100644 share/locale/ctype/charset/Latin-4 delete mode 100644 share/locale/ctype/charset/Latin-5 delete mode 100644 share/locale/ctype/charset/Latin-6 delete mode 100644 share/locale/ctype/charset/Latin-6+ delete mode 100644 share/locale/ctype/charset/Latin-Cyrillic delete mode 100644 share/locale/ctype/charset/Latin-Greek delete mode 100644 share/locale/ctype/charset/Latin-Hebrew delete mode 100644 share/locale/ctype/ja_JP.CTEXT.src delete mode 100644 share/locale/ctype/ja_JP.ISO-2022-JP-2.src delete mode 100644 share/locale/ctype/ja_JP.ISO-2022-JP.src delete mode 100644 share/locale/ctype/ja_JP.eucJP.src delete mode 100644 share/locale/ctype/kk_KZ.PT154.src delete mode 100644 share/locale/ctype/ru_RU.ISO_8859-5.src delete mode 100644 share/locale/ctype/tr_TR.ISO8859-9.src delete mode 100644 share/locale/ctype/zh_CN.GB18030.src delete mode 100644 share/locale/ctype/zh_TW.eucTW.src delete mode 100644 share/locale/locale.alias create mode 100644 share/mklocale/Makefile create mode 100644 share/mklocale/README.locale_name rename share/{locale/ctype/en_US.UTF-8.src => mklocale/UTF-8.src} (96%) create mode 100644 share/mklocale/am_ET.UTF-8.src rename share/{locale/ctype => mklocale}/be_BY.CP1131.src (90%) rename share/{locale/ctype => mklocale}/bg_BG.CP1251.src (91%) rename share/{locale/ctype => mklocale}/el_GR.ISO8859-7.src (84%) create mode 100644 share/mklocale/hi_IN.ISCII-DEV.src rename share/{locale/ctype => mklocale}/hy_AM.ARMSCII-8.src (94%) rename share/{locale/ctype => mklocale}/ja_JP.SJIS.src (94%) create mode 100644 share/mklocale/ja_JP.eucJP.src create mode 100644 share/mklocale/kk_KZ.PT154.src create mode 100644 share/mklocale/ko_KR.CP949.src rename share/{locale/ctype => mklocale}/ko_KR.eucKR.src (78%) copy share/{locale/ctype/en_US.ISO_8859-1.src => mklocale/la_LN.ISO8859-1.src} (78%) rename share/{locale/ctype/lt_LT.ISO8859-13.src => mklocale/la_LN.ISO8859-13.src} (79%) rename share/{locale/ctype/en_US.DIS_8859-15.src => mklocale/la_LN.ISO8859-15.src} (80%) rename share/{locale/ctype/en_US.ISO_8859-2.src => mklocale/la_LN.ISO8859-2.src} (66%) rename share/{locale/ctype/en_US.ISO_8859-4.src => mklocale/la_LN.ISO8859-4.src} (69%) rename share/{locale/ctype/en_US.ASCII.src => mklocale/la_LN.US-ASCII.src} (66%) rename share/{locale/ctype => mklocale}/ru_RU.CP866.src (50%) create mode 100644 share/mklocale/ru_RU.ISO8859-5.src rename share/{locale/ctype => mklocale}/ru_RU.KOI8-R.src (81%) rename share/{locale/ctype/en_US.ISO_8859-1.src => mklocale/tr_TR.ISO8859-9.src} (59%) rename share/{locale/ctype => mklocale}/uk_UA.KOI8-U.src (81%) create mode 100644 share/mklocale/zh_CN.GB18030.src create mode 100644 share/mklocale/zh_CN.GB2312.src create mode 100644 share/mklocale/zh_CN.GBK.src rename share/{locale/ctype => mklocale}/zh_CN.eucCN.src (95%) rename share/{locale/ctype/zh_HK.Big5-HKSCS.src => mklocale/zh_HK.Big5HKSCS.src} (55%) rename share/{locale/ctype/zh_TW.BIG5.src => mklocale/zh_TW.Big5.src} (63%) copy share/monetdef/{fo_FO.ISO8859-1.src => ca_ES.UTF-8.src} (78%) copy share/monetdef/{fo_FO.ISO8859-1.src => de_AT.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => de_DE.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => el_GR.UTF-8.src} (73%) copy share/monetdef/{fo_FO.ISO8859-1.src => es_ES.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => fi_FI.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => fr_BE.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => fr_FR.UTF-8.src} (79%) copy share/monetdef/{fo_FO.ISO8859-1.src => it_IT.UTF-8.src} (78%) copy share/monetdef/{fo_FO.ISO8859-1.src => nl_BE.UTF-8.src} (79%) rename share/monetdef/{fo_FO.ISO8859-1.src => nl_NL.UTF-8.src} (79%) delete mode 100644 share/numericdef/fo_FO.ISO8859-1.src delete mode 100644 share/timedef/fo_FO.ISO8859-1.src copy usr.bin/mklocale/ldef.h => sys/sys/timespec.h (64%) copy usr.bin/mklocale/{ldef.h => extern.h} (59%) diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index fa0c8b08bf..5c0c7fd123 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -347,7 +347,6 @@ TO_REMOVE+=/usr/include/machine/pcvt_ioctl.h TO_REMOVE+=/usr/include/net/bpf_compat.h TO_REMOVE+=/usr/include/netinet/ipprotosw.h TO_REMOVE+=/usr/include/rune.h -TO_REMOVE+=/usr/include/runetype.h TO_REMOVE+=/modules/if_snc.ko TO_REMOVE+=/usr/include/machine/gencount.h TO_REMOVE+=/usr/sbin/cursor @@ -2148,6 +2147,13 @@ TO_REMOVE+=/usr/share/man/man4/uhidev.4.gz TO_REMOVE+=/boot/kernel/drmn.ko TO_REMOVE+=/boot/kernel/i915.ko TO_REMOVE+=/usr/share/man/man4/i915drm.4.gz +TO_REMOVE+=/usr/share/nls/eu_ES.ISO8859-1 +TO_REMOVE+=/usr/share/nls/eu_ES.ISO8859-15 +TO_REMOVE+=/usr/share/nls/eu_ES.UTF-8 +TO_REMOVE+=/usr/share/nls/fo_FO.ISO8859-1 +TO_REMOVE+=/usr/share/nls/fo_FO.UTF-8 +TO_REMOVE+=/usr/share/nls/hi_IN.UTF-8 +TO_REMOVE+=/usr/share/nls/la_LN.UTF-8 .if ${MACHINE_ARCH} == "x86_64" TO_REMOVE+=/usr/sbin/stlstats diff --git a/bin/date/date.c b/bin/date/date.c index 8167c75f10..54c6f0b2f0 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -135,7 +135,7 @@ main(int argc, char **argv) if (!rflag && time(&tval) == -1) err(1, "time"); - format = nl_langinfo(_DATE_FMT); + format = nl_langinfo(D_FMT); /* allow the operands in any order */ if (*argv && **argv == '+') { diff --git a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h index 44203370a2..ed978af7b6 100644 --- a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h +++ b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h @@ -27,8 +27,6 @@ // // Information as gleaned from /usr/include/ctype.h on DragonFly. -// Full details can be found from git repo at: -// http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/ctype.h _GLIBCXX_BEGIN_NAMESPACE(std) @@ -40,6 +38,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // NB: Offsets into ctype::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. +#ifdef _CTYPE_S + // DragonFly 3.6 and later + typedef unsigned long mask; + static const mask upper = _CTYPE_U; + static const mask lower = _CTYPE_L; + static const mask alpha = _CTYPE_A; + static const mask digit = _CTYPE_D; + static const mask xdigit = _CTYPE_X; + static const mask space = _CTYPE_S; + static const mask print = _CTYPE_R; + static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; + static const mask cntrl = _CTYPE_C; + static const mask punct = _CTYPE_P; + static const mask alnum = _CTYPE_A | _CTYPE_D; +#else + // DragonFly 3.4 and older typedef uint16_t mask; static const mask upper = _CTYPEMASK_U; static const mask lower = _CTYPEMASK_L; @@ -52,6 +66,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask cntrl = _CTYPEMASK_C; static const mask punct = _CTYPEMASK_P; static const mask alnum = _CTYPEMASK_A | _CTYPEMASK_D; +#endif }; _GLIBCXX_END_NAMESPACE diff --git a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h index 7f84b258d2..e712a69c71 100644 --- a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h +++ b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h @@ -74,7 +74,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ctype:: do_is(mask __m, wchar_t __c) const { +#ifdef _CTYPE_S + return __istype (__c, __m); +#else return __libc_ctype_ [__c + 1] & __m; +#endif } inline const wchar_t* @@ -82,6 +86,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const { for (; __lo < __hi; ++__vec, ++__lo) +#ifdef _CTYPE_S + *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit + | space | print | graph | cntrl | punct | alnum); +#else { mask __m = 0; if (isupper (*__lo)) __m |= _CTYPEMASK_U; @@ -99,6 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) *__vec = __m; } +#endif return __hi; } @@ -106,7 +115,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ctype:: do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const { +#ifdef _CTYPE_S + while (__lo < __hi && ! __istype (*__lo, __m)) +#else while (__lo < __hi && !(__libc_ctype_ [*__lo + 1] & __m)) +#endif ++__lo; return __lo; } @@ -115,7 +128,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ctype:: do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { +#ifdef _CTYPE_S + while (__lo < __hi && __istype (*__lo, __m)) +#else while (__lo < __hi && (__libc_ctype_ [*__lo + 1] & __m)) +#endif ++__lo; return __lo; } diff --git a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h index f1dd10b8da..dd4e2e2639 100644 --- a/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h +++ b/contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h @@ -34,7 +34,11 @@ // Information as gleaned from /usr/include/ctype.h +#ifdef _CTYPE_S + extern "C" const unsigned long __libc_C_ctype_[]; +#else extern "C" const __uint16_t __libc_C_ctype_[]; +#endif const ctype_base::mask* ctype::classic_table() throw() diff --git a/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h b/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h index bcbf5532bc..ed0ba8686a 100644 --- a/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h +++ b/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h @@ -27,8 +27,6 @@ // // Information as gleaned from /usr/include/ctype.h on DragonFly. -// Full details can be found from git repo at: -// http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/ctype.h namespace std _GLIBCXX_VISIBILITY(default) { @@ -42,6 +40,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: Offsets into ctype::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. +#ifdef _CTYPE_S + // DragonFly 3.6 and later + typedef unsigned long mask; + static const mask upper = _CTYPE_U; + static const mask lower = _CTYPE_L; + static const mask alpha = _CTYPE_A; + static const mask digit = _CTYPE_D; + static const mask xdigit = _CTYPE_X; + static const mask space = _CTYPE_S; + static const mask print = _CTYPE_R; + static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; + static const mask cntrl = _CTYPE_C; + static const mask punct = _CTYPE_P; + static const mask alnum = _CTYPE_A | _CTYPE_D; +#else + // DragonFly 3.4 and older typedef uint16_t mask; static const mask upper = _CTYPEMASK_U; static const mask lower = _CTYPEMASK_L; @@ -54,6 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const mask cntrl = _CTYPEMASK_C; static const mask punct = _CTYPEMASK_P; static const mask alnum = _CTYPEMASK_A | _CTYPEMASK_D; +#endif }; _GLIBCXX_END_NAMESPACE_VERSION diff --git a/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h b/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h index c6e4ffee04..1cf38da88c 100644 --- a/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h +++ b/contrib/gcc-4.7/libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h @@ -46,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (_M_table) return _M_table[static_cast(__c)] & __m; else +#ifdef _CTYPE_S + return __istype(__c, __m); +#else return __libc_ctype_ [__c + 1] & __m; +#endif } const char* @@ -59,6 +63,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else for (;__low < __high; ++__vec, ++__low) { +#ifdef _CTYPE_S + *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit + | space | print | graph | cntrl | punct | alnum); +#else mask __m = 0; if (this->is(upper, *__low)) __m |= upper; if (this->is(lower, *__low)) __m |= lower; @@ -73,6 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Do not include explicit line for alnum mask since it is a // pure composite of masks on DragonFly. *__vec = __m; +#endif } return __high; } @@ -110,7 +119,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ctype:: do_is(mask __m, wchar_t __c) const { +#ifdef _CTYPE_S + return __istype (__c, __m); +#else return __libc_ctype_ [__c + 1] & __m; +#endif } inline const wchar_t* @@ -118,6 +131,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const { for (; __lo < __hi; ++__vec, ++__lo) +#ifdef _CTYPE_S + *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit + | space | print | graph | cntrl | punct | alnum); +#else { mask __m = 0; if (isupper (*__lo)) __m |= _CTYPEMASK_U; @@ -135,6 +152,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION *__vec = __m; } +#endif return __hi; } @@ -142,7 +160,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ctype:: do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const { +#ifdef _CTYPE_S + while (__lo < __hi && ! __istype (*__lo, __m)) +#else while (__lo < __hi && !(__libc_ctype_ [*__lo + 1] & __m)) +#endif ++__lo; return __lo; } @@ -151,7 +173,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ctype:: do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { +#ifdef _CTYPE_S + while (__lo < __hi && __istype (*__lo, __m)) +#else while (__lo < __hi && (__libc_ctype_ [*__lo + 1] & __m)) +#endif ++__lo; return __lo; } diff --git a/contrib/gdtoa/README.DELETED b/contrib/gdtoa/README.DELETED index 07d57f03fe..5f48dbc93d 100644 --- a/contrib/gdtoa/README.DELETED +++ b/contrib/gdtoa/README.DELETED @@ -26,7 +26,6 @@ strtopdd.c strtopf.c strtopx.c strtopxL.c -strtorQ.c strtordd.c strtorf.c strtorxL.c diff --git a/contrib/gdtoa/README.DRAGONFLY b/contrib/gdtoa/README.DRAGONFLY new file mode 100644 index 0000000000..30e9835a07 --- /dev/null +++ b/contrib/gdtoa/README.DRAGONFLY @@ -0,0 +1,18 @@ +GDTOA +===== + +Original source can be downloaded from: +TBW + +A list of files and directories removed is in README.DELETED + +Local modifications applied to following files for locale support: + gdtoaimp.h + strtod.c + strtodg.c + strtof.c + strtod.c + strtorx.c + +This file should have been in the vendor branch and has since been modified: + strtorQ.c diff --git a/contrib/gdtoa/gdtoaimp.h b/contrib/gdtoa/gdtoaimp.h index dfeb2d1f9c..5dfec1273f 100644 --- a/contrib/gdtoa/gdtoaimp.h +++ b/contrib/gdtoa/gdtoaimp.h @@ -26,6 +26,8 @@ THIS SOFTWARE. ****************************************************************/ +/* $FreeBSD: head/contrib/gdtoa/gdtoaimp.h 227753 2011-11-20 14:45:42Z theraven $ */ + /* This is a variation on dtoa.c that converts arbitary binary floating-point formats to and from decimal notation. It uses double-precision arithmetic internally, so there are still @@ -89,8 +91,7 @@ THIS SOFTWARE. * #define IBM for IBM mainframe-style floating-point arithmetic. * #define VAX for VAX-style floating-point arithmetic (D_floating). * #define No_leftright to omit left-right logic in fast floating-point - * computation of dtoa and gdtoa. This will cause modes 4 and 5 to be - * treated the same as modes 2 and 3 for some inputs. + * computation of dtoa. * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3. * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines * that use extended-precision instructions to compute rounded @@ -179,8 +180,7 @@ THIS SOFTWARE. #ifndef GDTOAIMP_H_INCLUDED #define GDTOAIMP_H_INCLUDED -#define USE_LOCALE -#define Honor_FLT_ROUNDS +#define Long int #include "gdtoa.h" #include "gd_qnan.h" @@ -201,6 +201,7 @@ THIS SOFTWARE. #include "namespace.h" #include #include "un-namespace.h" +#include "xlocale_private.h" #ifdef KR_headers #define Char char @@ -214,6 +215,12 @@ extern Char *MALLOC ANSI((size_t)); #define MALLOC malloc #endif +#define INFNAN_CHECK +#define USE_LOCALE +#define NO_LOCALE_CACHE +#define Honor_FLT_ROUNDS +#define Trust_FLT_ROUNDS + #undef IEEE_Arith #undef Avoid_Underflow #ifdef IEEE_MC68k @@ -519,11 +526,11 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); #define strtoIQ __strtoIQ #define strtoIx __strtoIx #define strtoIxL __strtoIxL -#define strtord __strtord +#define strtord_l __strtord_l #define strtordd __strtordd #define strtorf __strtorf -#define strtorQ __strtorQ -#define strtorx __strtorx +#define strtorQ_l __strtorQ_l +#define strtorx_l __strtorx_l #define strtorxL __strtorxL #define strtodI __strtodI #define strtopd __strtopd @@ -556,7 +563,7 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); #define hexdig __hexdig_D2A #define hexdig_init_D2A __hexdig_init_D2A #define hexnan __hexnan_D2A -#define hi0bits(x) __hi0bits_D2A((ULong)(x)) +#define hi0bits __hi0bits_D2A #define hi0bits_D2A __hi0bits_D2A #define i2b __i2b_D2A #define increment __increment_D2A @@ -574,7 +581,7 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); #define s2b __s2b_D2A #define set_ones __set_ones_D2A #define strcp __strcp_D2A -#define strcp_D2A __strcp_D2A +#define strcp_D2A __strcp_D2A #define strtoIg __strtoIg_D2A #define sum __sum_D2A #define tens __tens_D2A @@ -605,13 +612,13 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); extern char *dtoa ANSI((double d, int mode, int ndigits, int *decpt, int *sign, char **rve)); extern void freedtoa ANSI((char*)); - extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t)); extern char *gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)); + extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t)); extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int)); extern void hexdig_init_D2A(Void); extern int hexnan ANSI((CONST char**, FPI*, ULong*)); - extern int hi0bits_D2A ANSI((ULong)); + extern int hi0bits ANSI((ULong)); extern Bigint *i2b ANSI((int)); extern Bigint *increment ANSI((Bigint*)); extern int lo0bits ANSI((ULong*)); @@ -628,7 +635,7 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); extern Bigint *s2b ANSI((CONST char*, int, int, ULong, int)); extern Bigint *set_ones ANSI((Bigint*, int)); extern char *strcp ANSI((char*, const char*)); - extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); + extern int strtodg_l ANSI((CONST char*, char**, FPI*, Long*, ULong*, locale_t)); extern int strtoId ANSI((CONST char *, char **, double *, double *)); extern int strtoIdd ANSI((CONST char *, char **, double *, double *)); @@ -638,17 +645,18 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t)); extern int strtoIx ANSI((CONST char *, char **, void *, void *)); extern int strtoIxL ANSI((CONST char *, char **, void *, void *)); extern double strtod ANSI((const char *s00, char **se)); + extern double strtod_l ANSI((const char *s00, char **se, locale_t)); extern int strtopQ ANSI((CONST char *, char **, Void *)); extern int strtopf ANSI((CONST char *, char **, float *)); extern int strtopd ANSI((CONST char *, char **, double *)); extern int strtopdd ANSI((CONST char *, char **, double *)); extern int strtopx ANSI((CONST char *, char **, Void *)); extern int strtopxL ANSI((CONST char *, char **, Void *)); - extern int strtord ANSI((CONST char *, char **, int, double *)); + extern int strtord_l ANSI((CONST char *, char **, int, double *, locale_t)); extern int strtordd ANSI((CONST char *, char **, int, double *)); extern int strtorf ANSI((CONST char *, char **, int, float *)); - extern int strtorQ ANSI((CONST char *, char **, int, void *)); - extern int strtorx ANSI((CONST char *, char **, int, void *)); + extern int strtorQ_l ANSI((CONST char *, char **, int, void *, locale_t)); + extern int strtorx_l ANSI((CONST char *, char **, int, void *, locale_t)); extern int strtorxL ANSI((CONST char *, char **, int, void *)); extern Bigint *sum ANSI((Bigint*, Bigint*)); extern int trailz ANSI((Bigint*)); diff --git a/contrib/gdtoa/strtod.c b/contrib/gdtoa/strtod.c index 6adef8b4bb..6c7fad5e1f 100644 --- a/contrib/gdtoa/strtod.c +++ b/contrib/gdtoa/strtod.c @@ -29,6 +29,8 @@ THIS SOFTWARE. /* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ +/* $FreeBSD: head/contrib/gdtoa/strtod.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "gdtoaimp.h" #ifndef NO_FENV_H #include @@ -80,11 +82,11 @@ sulp #endif /*}*/ double -strtod +strtod_l #ifdef KR_headers - (s00, se) CONST char *s00; char **se; + (s00, se, loc) CONST char *s00; char **se; locale_t loc #else - (CONST char *s00, char **se) + (CONST char *s00, char **se, locale_t loc) #endif { #ifdef Avoid_Underflow @@ -106,14 +108,14 @@ strtod #endif #ifdef USE_LOCALE /*{{*/ #ifdef NO_LOCALE_CACHE - char *decimalpoint = localeconv()->decimal_point; + char *decimalpoint = localeconv_l(loc)->decimal_point; int dplen = strlen(decimalpoint); #else char *decimalpoint; static char *decimalpoint_cache; static int dplen; if (!(s0 = decimalpoint_cache)) { - s0 = localeconv()->decimal_point; + s0 = localeconv_l(loc)->decimal_point; if ((decimalpoint_cache = (char*)MALLOC(strlen(s0) + 1))) { strcpy(decimalpoint_cache, s0); s0 = decimalpoint_cache; @@ -315,7 +317,7 @@ strtod if (*s == '(' /*)*/ && hexnan(&s, &fpinan, bits) == STRTOG_NaNbits) { - word0(&rv) = 0x7ff00000 | bits[1]; + word0(&rv) = 0x7ff80000 | bits[1]; word1(&rv) = bits[0]; } else { @@ -1072,3 +1074,14 @@ strtod return sign ? -dval(&rv) : dval(&rv); } + double +strtod +#ifdef KR_headers + (s00, se, loc) CONST char *s00; char **se; locale_t +#else + (CONST char *s00, char **se) +#endif +{ + return strtod_l(s00, se, __get_locale()); +} + diff --git a/contrib/gdtoa/strtodg.c b/contrib/gdtoa/strtodg.c index 5059869ecf..37832b4ac3 100644 --- a/contrib/gdtoa/strtodg.c +++ b/contrib/gdtoa/strtodg.c @@ -313,12 +313,12 @@ mantbits(U *d) } int -strtodg +strtodg_l #ifdef KR_headers - (s00, se, fpi, exp, bits) - CONST char *s00; char **se; FPI *fpi; Long *exp; ULong *bits; + (s00, se, fpi, exp, bits, loc) + CONST char *s00; char **se; FPI *fpi; Long *exp; ULong *bits; locale_t loc; #else - (CONST char *s00, char **se, FPI *fpi, Long *exp, ULong *bits) + (CONST char *s00, char **se, FPI *fpi, Long *exp, ULong *bits, locale_t loc) #endif { int abe, abits, asub; @@ -334,14 +334,14 @@ strtodg Bigint *ab, *bb, *bb1, *bd, *bd0, *bs, *delta, *rvb, *rvb0; #ifdef USE_LOCALE /*{{*/ #ifdef NO_LOCALE_CACHE - char *decimalpoint = localeconv()->decimal_point; + char *decimalpoint = localeconv_l(loc)->decimal_point; int dplen = strlen(decimalpoint); #else char *decimalpoint; static char *decimalpoint_cache; static int dplen; if (!(s0 = decimalpoint_cache)) { - s0 = localeconv()->decimal_point; + s0 = localeconv_l(loc)->decimal_point; if ((decimalpoint_cache = (char*)MALLOC(strlen(s0) + 1))) { strcpy(decimalpoint_cache, s0); s0 = decimalpoint_cache; diff --git a/contrib/gdtoa/strtof.c b/contrib/gdtoa/strtof.c index a8beb3520a..60283d4984 100644 --- a/contrib/gdtoa/strtof.c +++ b/contrib/gdtoa/strtof.c @@ -29,13 +29,15 @@ THIS SOFTWARE. /* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ +/* $FreeBSD: head/contrib/gdtoa/strtof.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "gdtoaimp.h" float #ifdef KR_headers -strtof(s, sp) CONST char *s; char **sp; +strtof_l(s, sp, loc) CONST char *s; char **sp; locale_t loc; #else -strtof(CONST char *s, char **sp) +strtof_l(CONST char *s, char **sp, locale_t loc) #endif { static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI }; @@ -49,7 +51,7 @@ strtof(CONST char *s, char **sp) #define fpi &fpi0 #endif - k = strtodg(s, sp, fpi, &exp, bits); + k = strtodg_l(s, sp, fpi, &exp, bits, loc); switch(k & STRTOG_Retmask) { case STRTOG_NoNumber: case STRTOG_Zero: @@ -57,10 +59,14 @@ strtof(CONST char *s, char **sp) break; case STRTOG_Normal: - case STRTOG_NaNbits: u.L[0] = (bits[0] & 0x7fffff) | ((exp + 0x7f + 23) << 23); break; + case STRTOG_NaNbits: + /* FreeBSD local: always return a quiet NaN */ + u.L[0] = bits[0] | 0x7fc00000; + break; + case STRTOG_Denormal: u.L[0] = bits[0]; break; @@ -76,3 +82,13 @@ strtof(CONST char *s, char **sp) u.L[0] |= 0x80000000L; return u.f; } + float +#ifdef KR_headers +strtof(s, sp) CONST char *s; char **sp; +#else +strtof(CONST char *s, char **sp) +#endif +{ + return strtof_l(s, sp, __get_locale()); +} + diff --git a/contrib/gdtoa/strtorx.c b/contrib/gdtoa/strtorQ.c similarity index 64% copy from contrib/gdtoa/strtorx.c copy to contrib/gdtoa/strtorQ.c index d2f947220e..641f8ca82c 100644 --- a/contrib/gdtoa/strtorx.c +++ b/contrib/gdtoa/strtorQ.c @@ -29,6 +29,8 @@ THIS SOFTWARE. /* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ +/* $FreeBSD: head/contrib/gdtoa/strtorQ.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "gdtoaimp.h" #undef _0 @@ -41,70 +43,75 @@ THIS SOFTWARE. #define _1 1 #define _2 2 #define _3 3 -#define _4 4 #endif #ifdef IEEE_8087 -#define _0 4 -#define _1 3 -#define _2 2 -#define _3 1 -#define _4 0 +#define _0 3 +#define _1 2 +#define _2 1 +#define _3 0 #endif void #ifdef KR_headers -ULtox(L, bits, exp, k) UShort *L; ULong *bits; Long exp; int k; +ULtoQ(L, bits, exp, k) ULong *L; ULong *bits; Long exp; int k; #else -ULtox(UShort *L, ULong *bits, Long exp, int k) +ULtoQ(ULong *L, ULong *bits, Long exp, int k) #endif { switch(k & STRTOG_Retmask) { case STRTOG_NoNumber: case STRTOG_Zero: - L[0] = L[1] = L[2] = L[3] = L[4] = 0; + L[0] = L[1] = L[2] = L[3] = 0; break; - case STRTOG_Denormal: - L[_0] = 0; - goto normal_bits; - case STRTOG_Normal: + L[_3] = bits[0]; + L[_2] = bits[1]; + L[_1] = bits[2]; + L[_0] = (bits[3] & ~0x10000) | ((exp + 0x3fff + 112) << 16); + break; + case STRTOG_NaNbits: - L[_0] = exp + 0x3fff + 63; - normal_bits: - L[_4] = (UShort)bits[0]; - L[_3] = (UShort)(bits[0] >> 16); - L[_2] = (UShort)bits[1]; - L[_1] = (UShort)(bits[1] >> 16); + L[_3] = bits[0]; + L[_2] = bits[1]; + L[_1] = bits[2]; + L[_0] = (bits[3] & ~0x10000) + | (((exp + 0x3fff + 112) << 16) | (1 << 15)); + break; + + case STRTOG_Denormal: + L[_3] = bits[0]; + L[_2] = bits[1]; + L[_1] = bits[2]; + L[_0] = bits[3]; break; case STRTOG_Infinite: - L[_0] = 0x7fff; - L[_1] = 0x8000; - L[_2] = L[_3] = L[_4] = 0; + L[_0] = 0x7fff0000; + L[_1] = L[_2] = L[_3] = 0; break; case STRTOG_NaN: - L[0] = ldus_QNAN0; - L[1] = ldus_QNAN1; - L[2] = ldus_QNAN2; - L[3] = ldus_QNAN3; - L[4] = ldus_QNAN4; + L[0] = ld_QNAN0; + L[1] = ld_QNAN1; + L[2] = ld_QNAN2; + L[3] = ld_QNAN3; } if (k & STRTOG_Neg) - L[_0] |= 0x8000; + L[_0] |= 0x80000000L; } int #ifdef KR_headers -strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L; +strtorQ_l(s, sp, rounding, L, locale) CONST char *s; char **sp; int rounding; +void *L; locale_t locale; #else -strtorx(CONST char *s, char **sp, int rounding, void *L) +strtorQ_l(CONST char *s, char **sp, int rounding, void *L, locale_t locale) #endif { - static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI }; + static FPI fpi0 = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI }; FPI *fpi, fpi1; - ULong bits[2]; + ULong bits[4]; Long exp; int k; @@ -114,7 +121,7 @@ strtorx(CONST char *s, char **sp, int rounding, void *L) fpi1.rounding = rounding; fpi = &fpi1; } - k = strtodg(s, sp, fpi, &exp, bits); - ULtox((UShort*)L, bits, exp, k); + k = strtodg_l(s, sp, fpi, &exp, bits, locale); + ULtoQ((ULong*)L, bits, exp, k); return k; } diff --git a/contrib/gdtoa/strtord.c b/contrib/gdtoa/strtord.c index 709af4c713..490f3e1609 100644 --- a/contrib/gdtoa/strtord.c +++ b/contrib/gdtoa/strtord.c @@ -70,9 +70,10 @@ ULtod(ULong *L, ULong *bits, Long exp, int k) int #ifdef KR_headers -strtord(s, sp, rounding, d) CONST char *s; char **sp; int rounding; double *d; +strtord_l(s, sp, rounding, d, locale) CONST char *s; char **sp; int rounding; +double *d; locale_t locale; #else -strtord(CONST char *s, char **sp, int rounding, double *d) +strtord_l(CONST char *s, char **sp, int rounding, double *d, locale_t locale) #endif { static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; @@ -87,7 +88,8 @@ strtord(CONST char *s, char **sp, int rounding, double *d) fpi1.rounding = rounding; fpi = &fpi1; } - k = strtodg(s, sp, fpi, &exp, bits); + k = strtodg_l(s, sp, fpi, &exp, bits, locale); ULtod((ULong*)d, bits, exp, k); return k; } + diff --git a/contrib/gdtoa/strtorx.c b/contrib/gdtoa/strtorx.c index d2f947220e..50453cea69 100644 --- a/contrib/gdtoa/strtorx.c +++ b/contrib/gdtoa/strtorx.c @@ -29,6 +29,8 @@ THIS SOFTWARE. /* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ +/* $FreeBSD: head/contrib/gdtoa/strtorx.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "gdtoaimp.h" #undef _0 @@ -69,7 +71,6 @@ ULtox(UShort *L, ULong *bits, Long exp, int k) goto normal_bits; case STRTOG_Normal: - case STRTOG_NaNbits: L[_0] = exp + 0x3fff + 63; normal_bits: L[_4] = (UShort)bits[0]; @@ -78,6 +79,14 @@ ULtox(UShort *L, ULong *bits, Long exp, int k) L[_1] = (UShort)(bits[1] >> 16); break; + case STRTOG_NaNbits: + L[_0] = exp + 0x3fff + 63; + L[_4] = (UShort)bits[0]; + L[_3] = (UShort)(bits[0] >> 16); + L[_2] = (UShort)bits[1]; + L[_1] = (UShort)((bits[1] >> 16) | (3 << 14)); + break; + case STRTOG_Infinite: L[_0] = 0x7fff; L[_1] = 0x8000; @@ -97,9 +106,10 @@ ULtox(UShort *L, ULong *bits, Long exp, int k) int #ifdef KR_headers -strtorx(s, sp, rounding, L) CONST char *s; char **sp; int rounding; void *L; +strtorx_l(s, sp, rounding, L, locale) CONST char *s; char **sp; int rounding; +void *L; locale_t locale; #else -strtorx(CONST char *s, char **sp, int rounding, void *L) +strtorx_l(CONST char *s, char **sp, int rounding, void *L, locale_t locale) #endif { static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI }; @@ -114,7 +124,7 @@ strtorx(CONST char *s, char **sp, int rounding, void *L) fpi1.rounding = rounding; fpi = &fpi1; } - k = strtodg(s, sp, fpi, &exp, bits); + k = strtodg_l(s, sp, fpi, &exp, bits, locale); ULtox((UShort*)L, bits, exp, k); return k; } diff --git a/etc/Makefile b/etc/Makefile index 1fc9e2d19a..d73c67de0d 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -357,19 +357,6 @@ distribution: .endif distrib-dirs: - -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \ - while [ $$# -gt 0 ] ; \ - do \ - for dir in /usr/share/locale \ - /usr/share/nls \ - /usr/local/share/nls; \ - do \ - test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \ - test -L "$$2" && rm -rf "$$2"; \ - test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \ - done; \ - shift; shift; \ - done mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr @@ -388,14 +375,6 @@ distrib-dirs: ${LN} -s "$$2" "$$1"; \ shift; shift; \ done - cd ${DESTDIR}/usr/share/locale; \ - set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ${LN} -s "$$2" "$$1"; \ - shift; shift; \ - done cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ${LN} -sf ../man* . cd ${DESTDIR}/usr/share/nls; \ set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ diff --git a/etc/locale.alias b/etc/locale.alias deleted file mode 100644 index 59efb4f7b7..0000000000 --- a/etc/locale.alias +++ /dev/null @@ -1,77 +0,0 @@ -# $FreeBSD: src/etc/locale.alias,v 1.7.2.6 2002/04/15 00:44:13 dougb Exp $ -# $DragonFly: src/etc/locale.alias,v 1.2 2003/06/17 04:24:45 dillon Exp $ - -ASCII en_US.US-ASCII -US-ASCII en_US.US-ASCII -af_ZA.ISO_8859-1 af_ZA.ISO8859-1 -af_ZA.ISO_8859-15 af_ZA.ISO8859-15 -cs_CZ.ISO_8859-2 cs_CZ.ISO8859-2 -da_DK.ISO_8859-1 da_DK.ISO8859-1 -da_DK.ISO_8859-15 da_DK.ISO8859-15 -de_AT.ISO_8859-1 de_AT.ISO8859-1 -de_AT.ISO_8859-15 de_AT.ISO8859-15 -de_CH.ISO_8859-1 de_CH.ISO8859-1 -de_CH.ISO_8859-15 de_CH.ISO8859-15 -de_DE.ISO_8859-1 de_DE.ISO8859-1 -de_DE.ISO_8859-15 de_DE.ISO8859-15 -el_GR.ISO_8859-7 el_GR.ISO8859-7 -en_AU.ISO_8859-1 en_AU.ISO8859-1 -en_AU.ISO_8859-15 en_AU.ISO8859-15 -en_CA.ISO_8859-1 en_CA.ISO8859-1 -en_CA.ISO_8859-15 en_CA.ISO8859-15 -en_GB.ISO_8859-1 en_GB.ISO8859-1 -en_GB.ISO_8859-15 en_GB.ISO8859-15 -en_NZ.ISO_8859-1 en_NZ.ISO8859-1 -en_NZ.ISO_8859-15 en_NZ.ISO8859-15 -en_US.ISO_8859-1 en_US.ISO8859-1 -en_US.ISO_8859-15 en_US.ISO8859-15 -es_ES.ISO_8859-1 es_ES.ISO8859-1 -es_ES.ISO_8859-15 es_ES.ISO8859-15 -et_EE.ISO_8859-15 et_EE.ISO8859-15 -fi_FI.ISO_8859-1 fi_FI.ISO8859-1 -fi_FI.ISO_8859-15 fi_FI.ISO8859-15 -fr_BE.ISO_8859-1 fr_BE.ISO8859-1 -fr_BE.ISO_8859-15 fr_BE.ISO8859-15 -fr_CA.ISO_8859-1 fr_CA.ISO8859-1 -fr_CA.ISO_8859-15 fr_CA.ISO8859-15 -fr_CH.ISO_8859-1 fr_CH.ISO8859-1 -fr_CH.ISO_8859-15 fr_CH.ISO8859-15 -fr_FR.ISO_8859-1 fr_FR.ISO8859-1 -fr_FR.ISO_8859-15 fr_FR.ISO8859-15 -hr_HR.ISO_8859-2 hr_HR.ISO8859-2 -hu_HU.ISO_8859-2 hu_HU.ISO8859-2 -is_IS.ISO_8859-1 is_IS.ISO8859-1 -is_IS.ISO_8859-15 is_IS.ISO8859-15 -it_CH.ISO_8859-1 it_CH.ISO8859-1 -it_CH.ISO_8859-15 it_CH.ISO8859-15 -it_IT.ISO_8859-1 it_IT.ISO8859-1 -it_IT.ISO_8859-15 it_IT.ISO8859-15 -ja_JP.EUC ja_JP.eucJP -ja_JP.Shift_JIS ja_JP.SJIS -ko_KR.EUC ko_KR.eucKR -la_LN.ASCII la_LN.US-ASCII -la_LN.ISO_8859-1 la_LN.ISO8859-1 -la_LN.ISO_8859-15 la_LN.ISO8859-15 -la_LN.ISO_8859-2 la_LN.ISO8859-2 -la_LN.ISO_8859-4 la_LN.ISO8859-4 -lt_LT.ISO_8859-4 lt_LT.ISO8859-4 -nl_BE.ISO_8859-1 nl_BE.ISO8859-1 -nl_BE.ISO_8859-15 nl_BE.ISO8859-15 -nl_NL.ISO_8859-1 nl_NL.ISO8859-1 -nl_NL.ISO_8859-15 nl_NL.ISO8859-15 -no_NO.ISO_8859-1 no_NO.ISO8859-1 -no_NO.ISO_8859-15 no_NO.ISO8859-15 -pl_PL.ISO_8859-2 pl_PL.ISO8859-2 -pt_PT.ISO_8859-1 pt_PT.ISO8859-1 -pt_PT.ISO_8859-15 pt_PT.ISO8859-15 -ru_SU.CP866 ru_RU.CP866 -ru_RU.ISO_8859-5 ru_RU.ISO8859-5 -ru_SU.ISO8859-5 ru_RU.ISO8859-5 -ru_SU.ISO_8859-5 ru_RU.ISO8859-5 -ru_SU.KOI8-R ru_RU.KOI8-R -sk_SK.ISO_8859-2 sk_SK.ISO8859-2 -sl_SI.ISO_8859-2 sl_SI.ISO8859-2 -sv_SE.ISO_8859-1 sv_SE.ISO8859-1 -sv_SE.ISO_8859-15 sv_SE.ISO8859-15 -tr_TR.ISO_8859-9 tr_TR.ISO8859-9 -zh_CN.EUC zh_CN.eucCN diff --git a/etc/locale.deprecated b/etc/locale.deprecated deleted file mode 100644 index 536bf3aa07..0000000000 --- a/etc/locale.deprecated +++ /dev/null @@ -1,17 +0,0 @@ -# $FreeBSD: src/etc/locale.deprecated,v 1.2.2.6 2002/04/15 07:54:19 phantom Exp $ -# $DragonFly: src/etc/locale.deprecated,v 1.2 2003/06/17 04:24:45 dillon Exp $ -# -# List of deprecated locales -# -# Make sure that deprecated locale directories and their replacements -# are set up correctly. -# -# Format: -# -# -ja_JP.EUC ja_JP.eucJP -ko_KR.EUC ko_KR.eucKR -ru_SU.CP866 ru_RU.CP866 -ru_SU.ISO_8859-5 ru_RU.ISO8859-5 -ru_SU.KOI8-R ru_RU.KOI8-R -zh_CN.EUC zh_CN.eucCN diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index bc4c94ed7a..3c98362785 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -397,4 +397,6 @@ .. vm .. + xlocale + .. .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 7b901ff0fc..20ce7fdcd2 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -543,6 +543,8 @@ .. fr_FR.UTF-8 .. + gl_ES.ISO8859-1 + .. he_IL.UTF-8 .. hi_IN.ISCII-DEV @@ -979,22 +981,12 @@ .. et_EE.UTF-8 .. - eu_ES.ISO8859-1 - .. - eu_ES.ISO8859-15 - .. - eu_ES.UTF-8 - .. fi_FI.ISO8859-1 .. fi_FI.ISO8859-15 .. fi_FI.UTF-8 .. - fo_FO.ISO8859-1 - .. - fo_FO.UTF-8 - .. fr_BE.ISO8859-1 .. fr_BE.ISO8859-15 @@ -1019,12 +1011,12 @@ .. fr_FR.UTF-8 .. + gl_ES.ISO8859-1 + .. he_IL.UTF-8 .. hi_IN.ISCII-DEV .. - hi_IN.UTF-8 - .. hr_HR.ISO8859-2 .. hr_HR.UTF-8 @@ -1073,6 +1065,8 @@ .. la_LN.ISO8859-1 .. + la_LN.ISO8859-13 + .. la_LN.ISO8859-15 .. la_LN.ISO8859-2 @@ -1081,14 +1075,18 @@ .. la_LN.US-ASCII .. - la_LN.UTF-8 - .. lt_LT.ISO8859-13 .. lt_LT.ISO8859-4 .. lt_LT.UTF-8 .. + lv_LV.ISO8859-13 + .. + lv_LV.UTF-8 + .. + mn_MN.UTF-8 + .. nl_BE.ISO8859-1 .. nl_BE.ISO8859-15 diff --git a/etc/nls.alias b/etc/nls.alias index 567d8f16ec..ea4e210ac3 100644 --- a/etc/nls.alias +++ b/etc/nls.alias @@ -1,79 +1,4 @@ -# $FreeBSD: src/etc/nls.alias,v 1.2.2.6 2002/04/15 00:44:13 dougb Exp $ -# $DragonFly: src/etc/nls.alias,v 1.2 2003/06/17 04:24:45 dillon Exp $ +# $FreeBSD: head/etc/nls.alias 116133 2003-06-10 01:22:30Z ache $ -ASCII C POSIX C -US-ASCII C -af_ZA.ISO_8859-1 af_ZA.ISO8859-1 -af_ZA.ISO_8859-15 af_ZA.ISO8859-15 -cs_CZ.ISO_8859-2 cs_CZ.ISO8859-2 -da_DK.ISO_8859-1 da_DK.ISO8859-1 -da_DK.ISO_8859-15 da_DK.ISO8859-15 -de_AT.ISO_8859-1 de_AT.ISO8859-1 -de_AT.ISO_8859-15 de_AT.ISO8859-15 -de_CH.ISO_8859-1 de_CH.ISO8859-1 -de_CH.ISO_8859-15 de_CH.ISO8859-15 -de_DE.ISO_8859-1 de_DE.ISO8859-1 -de_DE.ISO_8859-15 de_DE.ISO8859-15 -el_GR.ISO_8859-7 el_GR.ISO8859-7 -en_AU.ISO_8859-1 en_AU.ISO8859-1 -en_AU.ISO_8859-15 en_AU.ISO8859-15 -en_CA.ISO_8859-1 en_CA.ISO8859-1 -en_CA.ISO_8859-15 en_CA.ISO8859-15 -en_GB.ISO_8859-1 en_GB.ISO8859-1 -en_GB.ISO_8859-15 en_GB.ISO8859-15 -en_NZ.ISO_8859-1 en_NZ.ISO8859-1 -en_NZ.ISO_8859-15 en_NZ.ISO8859-15 -en_US.ISO_8859-1 en_US.ISO8859-1 -en_US.ISO_8859-15 en_US.ISO8859-15 en_US.US-ASCII C -es_ES.ISO_8859-1 es_ES.ISO8859-1 -es_ES.ISO_8859-15 es_ES.ISO8859-15 -et_EE.ISO_8859-15 et_EE.ISO8859-15 -fi_FI.ISO_8859-1 fi_FI.ISO8859-1 -fi_FI.ISO_8859-15 fi_FI.ISO8859-15 -fr_BE.ISO_8859-1 fr_BE.ISO8859-1 -fr_BE.ISO_8859-15 fr_BE.ISO8859-15 -fr_CA.ISO_8859-1 fr_CA.ISO8859-1 -fr_CA.ISO_8859-15 fr_CA.ISO8859-15 -fr_CH.ISO_8859-1 fr_CH.ISO8859-1 -fr_CH.ISO_8859-15 fr_CH.ISO8859-15 -fr_FR.ISO_8859-1 fr_FR.ISO8859-1 -fr_FR.ISO_8859-15 fr_FR.ISO8859-15 -hr_HR.ISO_8859-2 hr_HR.ISO8859-2 -hu_HU.ISO_8859-2 hu_HU.ISO8859-2 -is_IS.ISO_8859-1 is_IS.ISO8859-1 -is_IS.ISO_8859-15 is_IS.ISO8859-15 -it_CH.ISO_8859-1 it_CH.ISO8859-1 -it_CH.ISO_8859-15 it_CH.ISO8859-15 -it_IT.ISO_8859-1 it_IT.ISO8859-1 -it_IT.ISO_8859-15 it_IT.ISO8859-15 -ja_JP.EUC ja_JP.eucJP -ja_JP.Shift_JIS ja_JP.SJIS -ko_KR.EUC ko_KR.eucKR -la_LN.ASCII la_LN.US-ASCII -la_LN.ISO_8859-1 la_LN.ISO8859-1 -la_LN.ISO_8859-15 la_LN.ISO8859-15 -la_LN.ISO_8859-2 la_LN.ISO8859-2 -la_LN.ISO_8859-4 la_LN.ISO8859-4 -lt_LT.ISO_8859-4 lt_LT.ISO8859-4 -nl_BE.ISO_8859-1 nl_BE.ISO8859-1 -nl_BE.ISO_8859-15 nl_BE.ISO8859-15 -nl_NL.ISO_8859-1 nl_NL.ISO8859-1 -nl_NL.ISO_8859-15 nl_NL.ISO8859-15 -no_NO.ISO_8859-1 no_NO.ISO8859-1 -no_NO.ISO_8859-15 no_NO.ISO8859-15 -pl_PL.ISO_8859-2 pl_PL.ISO8859-2 -pt_PT.ISO_8859-1 pt_PT.ISO8859-1 -pt_PT.ISO_8859-15 pt_PT.ISO8859-15 -ru_RU.ISO_8859-5 ru_RU.ISO8859-5 -ru_SU.CP866 ru_RU.CP866 -ru_SU.ISO_8859-5 ru_RU.ISO8859-5 -ru_SU.ISO8859-5 ru_RU.ISO8859-5 -ru_SU.KOI8-R ru_RU.KOI8-R -sk_SK.ISO_8859-2 sk_SK.ISO8859-2 -sl_SI.ISO_8859-2 sl_SI.ISO8859-2 -sv_SE.ISO_8859-1 sv_SE.ISO8859-1 -sv_SE.ISO_8859-15 sv_SE.ISO8859-15 -tr_TR.ISO_8859-9 tr_TR.ISO8859-9 -zh_CN.EUC zh_CN.eucCN diff --git a/gnu/usr.bin/grep/libgreputils/Makefile b/gnu/usr.bin/grep/libgreputils/Makefile index 1194eaa8f4..97d8c89ae3 100644 --- a/gnu/usr.bin/grep/libgreputils/Makefile +++ b/gnu/usr.bin/grep/libgreputils/Makefile @@ -72,7 +72,9 @@ SRCS= argmatch.c \ openat-proc.c \ regex.c \ strerror.c \ - strerror-override.c \ - wcwidth.c + strerror-override.c + +# no longer needed +# wcwidth.c .include diff --git a/include/Makefile b/include/Makefile index 3b367fbffe..a625f6bcd6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -7,7 +7,7 @@ # links. CLEANFILES= osreldate.h version vers.c vers.txt -SUBDIR= arpa protocols rpc rpcsvc +SUBDIR= arpa protocols rpc rpcsvc xlocale INCS= a.out.h ar.h assert.h bitstring.h cpio.h ctype.h db.h \ dirent.h disktab.h \ dlfcn.h elf.h elf-hints.h err.h float.h fmtmsg.h fnmatch.h fstab.h \ @@ -17,17 +17,18 @@ INCS= a.out.h ar.h assert.h bitstring.h cpio.h ctype.h db.h \ mntopts.h mpool.h mqueue.h monetary.h ndbm.h netconfig.h \ netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h \ paths.h printf.h pthread.h pthread_np.h pwd.h \ - ranlib.h readpassphrase.h regex.h regexp.h \ + ranlib.h readpassphrase.h regex.h \ res_update.h resolv.h re_comp.h rmd160.h \ - search.h setjmp.h sgtty.h \ + runetype.h search.h setjmp.h sgtty.h \ signal.h spawn.h stab.h stdarg.h stdbool.h \ stddef.h stdint.h stdio.h stdlib.h \ string.h stringlist.h strings.h struct.h sysexits.h \ tar.h tgmath.h time.h \ timeconv.h \ - timers.h ttyent.h tzfile.h unistd.h ulimit.h utime.h utmp.h utmpx.h \ + timers.h ttyent.h tzfile.h \ + uchar.h unistd.h ulimit.h utime.h utmp.h utmpx.h \ uuid.h vis.h \ - wchar.h wctype.h wordexp.h + wchar.h wctype.h wordexp.h xlocale.h .if defined(WANT_HESIOD) INCS+= hesiod.h diff --git a/include/ctype.h b/include/ctype.h index 572358e421..71e4a86283 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -1,12 +1,15 @@ /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -31,32 +34,154 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 - * $NetBSD: src/include/ctype.h,v 1.25 2003/10/22 15:51:18 kleink Exp $ - * $DragonFly: src/include/ctype.h,v 1.17 2006/03/06 02:54:12 swildner Exp $ + * @(#)ctype.h 8.4 (Berkeley) 1/21/94 + * $FreeBSD: head/include/ctype.h 233600 2012-03-28 12:11:54Z theraven $ */ #ifndef _CTYPE_H_ #define _CTYPE_H_ #include -#include - -#define _CTYPEMASK_U 0x0001 -#define _CTYPEMASK_L 0x0002 -#define _CTYPEMASK_D 0x0004 -#define _CTYPEMASK_S 0x0008 -#define _CTYPEMASK_P 0x0010 -#define _CTYPEMASK_C 0x0020 -#define _CTYPEMASK_X 0x0040 -#define _CTYPEMASK_B 0x0080 -#define _CTYPEMASK_A 0x0100 -#define _CTYPEMASK_G 0x0200 -#define _CTYPEMASK_R 0x0400 - -extern const __uint16_t *__libc_ctype_; -extern const __int16_t *__libc_tolower_tab_; -extern const __int16_t *__libc_toupper_tab_; +#include + +#define _CTYPE_A 0x00000100L /* Alpha */ +#define _CTYPE_C 0x00000200L /* Control */ +#define _CTYPE_D 0x00000400L /* Digit */ +#define _CTYPE_G 0x00000800L /* Graph */ +#define _CTYPE_L 0x00001000L /* Lower */ +#define _CTYPE_P 0x00002000L /* Punct */ +#define _CTYPE_S 0x00004000L /* Space */ +#define _CTYPE_U 0x00008000L /* Upper */ +#define _CTYPE_X 0x00010000L /* X digit */ +#define _CTYPE_B 0x00020000L /* Blank */ +#define _CTYPE_R 0x00040000L /* Print */ +#define _CTYPE_I 0x00080000L /* Ideogram */ +#define _CTYPE_T 0x00100000L /* Special */ +#define _CTYPE_Q 0x00200000L /* Phonogram */ +#define _CTYPE_SW0 0x20000000L /* 0 width character */ +#define _CTYPE_SW1 0x40000000L /* 1 width character */ +#define _CTYPE_SW2 0x80000000L /* 2 width character */ +#define _CTYPE_SW3 0xc0000000L /* 3 width character */ +#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ +#define _CTYPE_SWS 30 /* Bits to shift to get width */ + +/* See comments in about __ct_rune_t. */ +__BEGIN_DECLS +unsigned long ___runetype(__ct_rune_t) __pure; +__ct_rune_t ___tolower(__ct_rune_t) __pure; +__ct_rune_t ___toupper(__ct_rune_t) __pure; +__END_DECLS + +/* + * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us + * to generate code for extern versions of all our inline functions. + */ +#ifdef _EXTERNALIZE_CTYPE_INLINES_ +#define _USE_CTYPE_INLINE_ +#define static +#define __inline +#endif + +extern int __mb_sb_limit; + +/* + * Use inline functions if we are allowed to and the compiler supports them. + */ +#if !defined(_DONT_USE_CTYPE_INLINE_) && \ + (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) + +#include + +static __inline int +__maskrune(__ct_rune_t _c, unsigned long _f) +{ + return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : + _CurrentRuneLocale->__runetype[_c]) & _f; +} + +static __inline int +__sbmaskrune(__ct_rune_t _c, unsigned long _f) +{ + return (_c < 0 || _c >= __mb_sb_limit) ? 0 : + _CurrentRuneLocale->__runetype[_c] & _f; +} + +static __inline int +__istype(__ct_rune_t _c, unsigned long _f) +{ + return (!!__maskrune(_c, _f)); +} + +static __inline int +__sbistype(__ct_rune_t _c, unsigned long _f) +{ + return (!!__sbmaskrune(_c, _f)); +} + +static __inline int +__isctype(__ct_rune_t _c, unsigned long _f) +{ + return (_c < 0 || _c >= 128) ? 0 : + !!(_DefaultRuneLocale.__runetype[_c] & _f); +} + +static __inline __ct_rune_t +__toupper(__ct_rune_t _c) +{ + return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : + _CurrentRuneLocale->__mapupper[_c]; +} + +static __inline __ct_rune_t +__sbtoupper(__ct_rune_t _c) +{ + return (_c < 0 || _c >= __mb_sb_limit) ? _c : + _CurrentRuneLocale->__mapupper[_c]; +} + +static __inline __ct_rune_t +__tolower(__ct_rune_t _c) +{ + return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : + _CurrentRuneLocale->__maplower[_c]; +} + +static __inline __ct_rune_t +__sbtolower(__ct_rune_t _c) +{ + return (_c < 0 || _c >= __mb_sb_limit) ? _c : + _CurrentRuneLocale->__maplower[_c]; +} + +static __inline int +__wcwidth(__ct_rune_t _c) +{ + unsigned int _x; + + if (_c == 0) + return (0); + _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); + if ((_x & _CTYPE_SWM) != 0) + return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); + return ((_x & _CTYPE_R) != 0 ? 1 : -1); +} + +#else /* not using inlines */ + +__BEGIN_DECLS +int __maskrune(__ct_rune_t, unsigned long); +int __sbmaskrune(__ct_rune_t, unsigned long); +int __istype(__ct_rune_t, unsigned long); +int __sbistype(__ct_rune_t, unsigned long); +int __isctype(__ct_rune_t, unsigned long); +__ct_rune_t __toupper(__ct_rune_t); +__ct_rune_t __sbtoupper(__ct_rune_t); +__ct_rune_t __tolower(__ct_rune_t); +__ct_rune_t __sbtolower(__ct_rune_t); +int __wcwidth(__ct_rune_t); +__END_DECLS +#endif /* using inlines */ + __BEGIN_DECLS int isalnum(int); @@ -73,79 +198,76 @@ int isxdigit(int); int tolower(int); int toupper(int); -#if defined(__XSI_VISIBLE) +#if __XSI_VISIBLE int isascii(int); int toascii(int); -int _tolower(int); -int _toupper(int); #endif -#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 200112L || \ - __XSI_VISIBLE >= 600 +#if __ISO_C_VISIBLE >= 1999 int isblank(int); #endif -__END_DECLS -#ifdef _CTYPE_PRIVATE -extern const __uint16_t __libc_C_ctype_[]; -extern const __int16_t __libc_C_toupper_[]; -extern const __int16_t __libc_C_tolower_[]; +#if __BSD_VISIBLE +int digittoint(int); +int ishexnumber(int); +int isideogram(int); +int isnumber(int); +int isphonogram(int); +int isrune(int); +int isspecial(int); #endif -/* - * don't get all wishy washy and try to support architectures where - * char isn't 8 bits. It's 8 bits, period. - */ -#if !defined(_CTYPE_H_DISABLE_MACROS_) - -#define _CTYPE_NUM_CHARS (1 << (8*sizeof(char))) - -static __inline int -__libc_ctype_index(__uint16_t mask, int c) -{ - if (c < -1 || c >= _CTYPE_NUM_CHARS) - return(0); /* XXX maybe assert instead? */ - return(__libc_ctype_[c + 1] & mask); -} +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include +#endif +__END_DECLS -static __inline int -__libc_ctype_convert(const __int16_t *array, int c) -{ - if (c < -1 || c >= _CTYPE_NUM_CHARS) - return(c); /* XXX maybe assert instead? */ - return(array[c + 1]); -} +#ifndef __cplusplus +#define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D) +#define isalpha(c) __sbistype((c), _CTYPE_A) +#define iscntrl(c) __sbistype((c), _CTYPE_C) +#define isdigit(c) __isctype((c), _CTYPE_D) /* ANSI -- locale independent */ +#define isgraph(c) __sbistype((c), _CTYPE_G) +#define islower(c) __sbistype((c), _CTYPE_L) +#define isprint(c) __sbistype((c), _CTYPE_R) +#define ispunct(c) __sbistype((c), _CTYPE_P) +#define isspace(c) __sbistype((c), _CTYPE_S) +#define isupper(c) __sbistype((c), _CTYPE_U) +#define isxdigit(c) __isctype((c), _CTYPE_X) /* ANSI -- locale independent */ +#define tolower(c) __sbtolower(c) +#define toupper(c) __sbtoupper(c) +#endif /* !__cplusplus */ -#ifndef _CTYPE_PRIVATE -#undef _CTYPE_NUM_CHARS +#if __XSI_VISIBLE +/* + * POSIX.1-2001 specifies _tolower() and _toupper() to be macros equivalent to + * tolower() and toupper() respectively, minus extra checking to ensure that + * the argument is a lower or uppercase letter respectively. We've chosen to + * implement these macros with the same error checking as tolower() and + * toupper() since this doesn't violate the specification itself, only its + * intent. We purposely leave _tolower() and _toupper() undocumented to + * discourage their use. + * + * XXX isascii() and toascii() should similarly be undocumented. + */ +#define _tolower(c) __sbtolower(c) +#define _toupper(c) __sbtoupper(c) +#define isascii(c) (((c) & ~0x7F) == 0) +#define toascii(c) ((c) & 0x7F) #endif -#define isdigit(c) __libc_ctype_index(_CTYPEMASK_D, c) -#define islower(c) __libc_ctype_index(_CTYPEMASK_L, c) -#define isspace(c) __libc_ctype_index(_CTYPEMASK_S, c) -#define ispunct(c) __libc_ctype_index(_CTYPEMASK_P, c) -#define isupper(c) __libc_ctype_index(_CTYPEMASK_U, c) -#define isalpha(c) __libc_ctype_index(_CTYPEMASK_A, c) -#define isxdigit(c) __libc_ctype_index(_CTYPEMASK_X, c) -#define isalnum(c) __libc_ctype_index(_CTYPEMASK_A|_CTYPEMASK_D, c) -#define isprint(c) __libc_ctype_index(_CTYPEMASK_R, c) -#define isgraph(c) __libc_ctype_index(_CTYPEMASK_G, c) -#define iscntrl(c) __libc_ctype_index(_CTYPEMASK_C, c) -#define tolower(c) __libc_ctype_convert(__libc_tolower_tab_, c) -#define toupper(c) __libc_ctype_convert(__libc_toupper_tab_, c) - -#if defined(__XSI_VISIBLE) -#define isascii(c) ((unsigned)(c) <= 0177) -#define toascii(c) ((c) & 0177) -#define _tolower(c) ((c) - 'A' + 'a') -#define _toupper(c) ((c) - 'a' + 'A') +#if __ISO_C_VISIBLE >= 1999 && !defined(__cplusplus) +#define isblank(c) __sbistype((c), _CTYPE_B) #endif -#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 200112L || \ - __XSI_VISIBLE >= 600 -#define isblank(c) __libc_ctype_index(_CTYPEMASK_B, c) +#if __BSD_VISIBLE +#define digittoint(c) __sbmaskrune((c), 0xFF) +#define ishexnumber(c) __sbistype((c), _CTYPE_X) +#define isideogram(c) __sbistype((c), _CTYPE_I) +#define isnumber(c) __sbistype((c), _CTYPE_D) +#define isphonogram(c) __sbistype((c), _CTYPE_Q) +#define isrune(c) __sbistype((c), 0xFFFFFF00L) +#define isspecial(c) __sbistype((c), _CTYPE_T) #endif -#endif /* !_CTYPE_H_DISABLE_MACROS_ */ - #endif /* !_CTYPE_H_ */ diff --git a/include/iconv.h b/include/iconv.h index 29dee16326..b8767e356f 100644 --- a/include/iconv.h +++ b/include/iconv.h @@ -1,8 +1,9 @@ -/* $NetBSD: iconv.h,v 1.3 2003/08/22 14:05:03 kleink Exp $ */ -/* $DragonFly: src/include/iconv.h,v 1.1 2005/03/11 23:33:53 joerg Exp $ */ +/* $FreeBSD: head/include/iconv.h 255297 2013-09-06 09:46:44Z theraven $ */ +/* $NetBSD: iconv.h,v 1.6 2005/02/03 04:39:32 perry Exp $ */ /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2009, 2010 Gabor Kovesdan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,24 +32,121 @@ #ifndef _ICONV_H_ #define _ICONV_H_ +#include #include +#include +#include + +#ifdef __LIBICONV_COMPAT +#define libiconv_open iconv_open +#define libiconv_close iconv_close +#define libiconv iconv +#define libiconv_t iconv_t +#endif +#ifdef __cplusplus +typedef bool __iconv_bool; +#elif __STDC_VERSION__ >= 199901L +typedef _Bool __iconv_bool; +#else +typedef int __iconv_bool; +#endif + struct __tag_iconv_t; typedef struct __tag_iconv_t *iconv_t; __BEGIN_DECLS iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, char ** __restrict, size_t * __restrict, - char ** __restrict, size_t * __restrict); +size_t iconv(iconv_t, const char ** __restrict, + size_t * __restrict, char ** __restrict, + size_t * __restrict); int iconv_close(iconv_t); /* * non-portable interfaces for iconv */ -int __iconv_get_list(char ***, size_t *); +int __iconv_get_list(char ***, size_t *, __iconv_bool); void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, - __uint32_t, size_t *); +size_t __iconv(iconv_t, const char **, size_t *, char **, + size_t *, __uint32_t, size_t *); #define __ICONV_F_HIDE_INVALID 0x0001 + +/* + * GNU interfaces for iconv + */ +#ifdef __LIBICONV_COMPAT +#define libiconv_open_into iconv_open_into +#define libiconvctl iconvctl +#define libiconvlist iconvlist +#define libiconv_set_relocation_prefix iconv_set_relocation_prefix +#endif + +/* We have iconvctl() */ +#define _ICONV_VERSION 0x0108 +extern int _iconv_version; + +#ifdef __LIBICONV_COMPAT +#define _libiconv_version _iconv_version +#define _LIBICONV_VERSION _ICONV_VERSION +#endif + +typedef struct { + void *spaceholder[64]; +} iconv_allocation_t; + +int iconv_open_into(const char *, const char *, iconv_allocation_t *); +void iconv_set_relocation_prefix(const char *orig_prefix, + const char *curr_prefix); + +/* + * iconvctl() request macros + */ +#define ICONV_TRIVIALP 0 +#define ICONV_GET_TRANSLITERATE 1 +#define ICONV_SET_TRANSLITERATE 2 +#define ICONV_GET_DISCARD_ILSEQ 3 +#define ICONV_SET_DISCARD_ILSEQ 4 +#define ICONV_SET_HOOKS 5 +#define ICONV_SET_FALLBACKS 6 + +typedef void (*iconv_unicode_char_hook) (unsigned int mbr, void *data); +typedef void (*iconv_wide_char_hook) (wchar_t wc, void *data); + +struct iconv_hooks { + iconv_unicode_char_hook uc_hook; + iconv_wide_char_hook wc_hook; + void *data; +}; + +/* + * Fallbacks aren't supported but type definitions are provided for + * source compatibility. + */ +typedef void (*iconv_unicode_mb_to_uc_fallback) (const char*, + size_t, void (*write_replacement) (const unsigned int *, + size_t, void*), void*, void*); +typedef void (*iconv_unicode_uc_to_mb_fallback) (unsigned int, + void (*write_replacement) (const char *, size_t, void*), + void*, void*); +typedef void (*iconv_wchar_mb_to_wc_fallback) (const char*, size_t, + void (*write_replacement) (const wchar_t *, size_t, void*), + void*, void*); +typedef void (*iconv_wchar_wc_to_mb_fallback) (wchar_t, + void (*write_replacement) (const char *, size_t, void*), + void*, void*); + +struct iconv_fallbacks { + iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback; + iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback; + iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback; + iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback; + void *data; +}; + + +void iconvlist(int (*do_one) (unsigned int, const char * const *, + void *), void *); +const char *iconv_canonicalize(const char *); +int iconvctl(iconv_t, int, void *); __END_DECLS #endif /* !_ICONV_H_ */ diff --git a/include/langinfo.h b/include/langinfo.h index f9ea77bb7f..343cd8d209 100644 --- a/include/langinfo.h +++ b/include/langinfo.h @@ -23,15 +23,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/langinfo.h,v 1.4.2.1 2002/03/12 17:12:24 phantom Exp $ - * $DragonFly: src/include/langinfo.h,v 1.4 2005/04/21 07:28:59 joerg Exp $ + * $FreeBSD: head/include/langinfo.h 233600 2012-03-28 12:11:54Z theraven $ */ #ifndef _LANGINFO_H_ #define _LANGINFO_H_ #include -#include +#include + +#ifndef _NL_ITEM_DECLARED +typedef __nl_item nl_item; +#define _NL_ITEM_DECLARED +#endif #define CODESET 0 /* codeset name */ #define D_T_FMT 1 /* string for formatting date and time */ @@ -98,16 +102,38 @@ #define YESEXPR 52 /* affirmative response expression */ #define NOEXPR 53 /* negative response expression */ + +#if __BSD_VISIBLE || __XSI_VISIBLE <= 500 #define YESSTR 54 /* affirmative response for yes/no queries */ #define NOSTR 55 /* negative response for yes/no queries */ +#endif #define CRNCYSTR 56 /* currency symbol */ +#if __BSD_VISIBLE #define D_MD_ORDER 57 /* month/day order (local extension) */ -#define _DATE_FMT 58 /* date(1) format string (local extension) */ +#endif + +/* standalone months forms for %OB */ +#define ALTMON_1 58 +#define ALTMON_2 59 +#define ALTMON_3 60 +#define ALTMON_4 61 +#define ALTMON_5 62 +#define ALTMON_6 63 +#define ALTMON_7 64 +#define ALTMON_8 65 +#define ALTMON_9 66 +#define ALTMON_10 67 +#define ALTMON_11 68 +#define ALTMON_12 69 __BEGIN_DECLS -char *nl_langinfo (nl_item); +char *nl_langinfo(nl_item); + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include +#endif __END_DECLS #endif /* !_LANGINFO_H_ */ diff --git a/include/locale.h b/include/locale.h index cfcb6c3941..05bc37a473 100644 --- a/include/locale.h +++ b/include/locale.h @@ -1,6 +1,3 @@ -/* $NetBSD: src/include/locale.h,v 1.13 2003/08/07 09:44:10 agc Exp $ */ -/* $DragonFly: src/include/locale.h,v 1.5 2008/06/05 17:53:10 swildner Exp $ */ - /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -30,11 +27,14 @@ * SUCH DAMAGE. * * @(#)locale.h 8.1 (Berkeley) 6/2/93 + * $FreeBSD: head/include/locale.h 232498 2012-03-04 15:31:13Z theraven $ */ #ifndef _LOCALE_H_ #define _LOCALE_H_ +#include + struct lconv { char *decimal_point; char *thousands_sep; @@ -62,8 +62,6 @@ struct lconv { char int_n_sign_posn; }; -#include - #define LC_ALL 0 #define LC_COLLATE 1 #define LC_CTYPE 2 @@ -79,6 +77,11 @@ struct lconv { __BEGIN_DECLS struct lconv *localeconv(void); char *setlocale(int, const char *); + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS + #endif /* _LOCALE_H_ */ diff --git a/include/nl_types.h b/include/nl_types.h index 6ac46069dc..2bf19e4119 100644 --- a/include/nl_types.h +++ b/include/nl_types.h @@ -1,5 +1,4 @@ -/* $NetBSD: src/include/nl_types.h,v 1.10 2001/12/06 23:04:06 wiz Exp $ */ -/* $DragonFly: src/include/nl_types.h,v 1.4 2005/04/21 16:36:34 joerg Exp $ */ +/* $NetBSD: nl_types.h,v 1.9 2000/10/03 19:53:32 sommerfeld Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -16,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -35,18 +27,21 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: head/include/nl_types.h 203963 2010-02-16 19:28:10Z imp $ */ #ifndef _NL_TYPES_H_ #define _NL_TYPES_H_ + #include -#include +#include #ifdef _NLS_PRIVATE /* * MESSAGE CATALOG FILE FORMAT. * - * The NetBSD message catalog format is similar to the format used by + * The NetBSD/FreeBSD message catalog format is similar to the format used by * Svr4 systems. The differences are: * * fixed byte order (big endian) * * fixed data field sizes @@ -78,21 +73,24 @@ struct _nls_msg_hdr { int32_t __offset; } ; -#endif +#endif /* _NLS_PRIVATE */ -#define NL_SETD 1 -#define NL_CAT_LOCALE 1 +#define NL_SETD 0 +#define NL_CAT_LOCALE 1 typedef struct __nl_cat_d { - void *__data; - __size_t __size; + void *__data; + int __size; } *nl_catd; -typedef long nl_item; +#ifndef _NL_ITEM_DECLARED +typedef __nl_item nl_item; +#define _NL_ITEM_DECLARED +#endif __BEGIN_DECLS -nl_catd catopen(const char *, int); -char *catgets(nl_catd, int, int, const char *); +nl_catd catopen(const char *, int); +char *catgets(nl_catd, int, int, const char *) __format_arg(4); int catclose(nl_catd); __END_DECLS diff --git a/include/paths.h b/include/paths.h index 56b933b240..7ddfabacea 100644 --- a/include/paths.h +++ b/include/paths.h @@ -52,17 +52,16 @@ #define _PATH_CONSOLE __SYS_PATH_CONSOLE #define _PATH_CP "/bin/cp" #define _PATH_CSHELL "/bin/csh" +#define _PATH_CSMAPPER "/usr/share/i18n/csmapper" #define _PATH_DEFTAPE __SYS_PATH_DEFTAPE #define _PATH_DEVDB "/var/run/dev.db" #define _PATH_DEVNULL __SYS_PATH_DEVNULL #define _PATH_DEVZERO __SYS_PATH_DEVZERO #define _PATH_DRUM __SYS_PATH_DRUM +#define _PATH_ESDB "/usr/share/i18n/esdb" #define _PATH_ETC "/etc" #define _PATH_FTPUSERS "/etc/ftpusers" #define _PATH_I18NMODULE "/usr/lib/i18n" -#define _PATH_ESDB "/usr/share/i18n/esdb" -#define _PATH_ICONV "/usr/share/i18n/iconv" -#define _PATH_CSMAPPER "/usr/share/i18n/csmapper" #define _PATH_KMEM __SYS_PATH_KMEM #define _PATH_LIBMAP_CONF "/etc/libmap.conf" #define _PATH_LOCALE "/usr/share/locale" diff --git a/include/regexp.h b/include/regexp.h deleted file mode 100644 index c77b0d789c..0000000000 --- a/include/regexp.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1986 by University of Toronto. - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley - * by Henry Spencer. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)regexp.h 8.1 (Berkeley) 6/2/93 - * $DragonFly: src/include/regexp.h,v 1.2 2003/11/14 01:01:43 dillon Exp $ - */ - -#ifndef _REGEXP_H_ -#define _REGEXP_H_ - -/* - * Definitions etc. for regexp(3) routines. - * - * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], - * not the System V one. - */ -#define NSUBEXP 10 -typedef struct regexp { - char *startp[NSUBEXP]; - char *endp[NSUBEXP]; - char regstart; /* Internal use only. */ - char reganch; /* Internal use only. */ - char *regmust; /* Internal use only. */ - int regmlen; /* Internal use only. */ - char program[1]; /* Unwarranted chumminess with compiler. */ -} regexp; - -#include - -__BEGIN_DECLS -regexp *regcomp (const char *); -int regexec (const regexp *, const char *); -void regsub (const regexp *, const char *, char *); -void regerror (const char *); -__END_DECLS - -#endif /* !_REGEXP_H_ */ diff --git a/include/runetype.h b/include/runetype.h new file mode 100644 index 0000000000..e18687fba4 --- /dev/null +++ b/include/runetype.h @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)runetype.h 8.1 (Berkeley) 6/2/93 + * $FreeBSD: head/include/runetype.h 232620 2012-03-06 20:15:23Z dim $ + */ + +#ifndef _RUNETYPE_H_ +#define _RUNETYPE_H_ + +#include +#include + +#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ +#define _CRMASK (~(_CACHED_RUNES - 1)) + +/* + * The lower 8 bits of runetype[] contain the digit value of the rune. + */ +typedef struct { + __rune_t __min; /* First rune of the range */ + __rune_t __max; /* Last rune (inclusive) of the range */ + __rune_t __map; /* What first maps to in maps */ + unsigned long *__types; /* Array of types in range */ +} _RuneEntry; + +typedef struct { + int __nranges; /* Number of ranges stored */ + _RuneEntry *__ranges; /* Pointer to the ranges */ +} _RuneRange; + +typedef struct { + char __magic[8]; /* Magic saying what version we are */ + char __encoding[32]; /* ASCII name of this encoding */ + + __rune_t (*__sgetrune)(const char *, __size_t, char const **); + int (*__sputrune)(__rune_t, char *, __size_t, char **); + __rune_t __invalid_rune; + + unsigned long __runetype[_CACHED_RUNES]; + __rune_t __maplower[_CACHED_RUNES]; + __rune_t __mapupper[_CACHED_RUNES]; + + /* + * The following are to deal with Runes larger than _CACHED_RUNES - 1. + * Their data is actually contiguous with this structure so as to make + * it easier to read/write from/to disk. + */ + _RuneRange __runetype_ext; + _RuneRange __maplower_ext; + _RuneRange __mapupper_ext; + + void *__variable; /* Data which depends on the encoding */ + int __variable_len; /* how long that data is */ +} _RuneLocale; + +#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ +__BEGIN_DECLS +extern const _RuneLocale _DefaultRuneLocale; +extern const _RuneLocale *_CurrentRuneLocale; +#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) +extern const _RuneLocale *__getCurrentRuneLocale(void); +#else +extern __thread const _RuneLocale *_ThreadRuneLocale; +static __inline const _RuneLocale *__getCurrentRuneLocale(void) +{ + + if (_ThreadRuneLocale) + return _ThreadRuneLocale; + if (_CurrentRuneLocale) + return _CurrentRuneLocale; + return &_DefaultRuneLocale; +} +#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ +#define _CurrentRuneLocale (__getCurrentRuneLocale()) +__END_DECLS + +#endif /* !_RUNETYPE_H_ */ diff --git a/include/stdlib.h b/include/stdlib.h index e3245ce81b..59978bd863 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -41,6 +41,13 @@ #include #include +#if __BSD_VISIBLE +#ifndef _RUNE_T_DECLARED +typedef __rune_t rune_t; +#define _RUNE_T_DECLARED +#endif +#endif + #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED @@ -68,10 +75,14 @@ typedef struct { #define RAND_MAX 0x7fffffff +__BEGIN_DECLS +#ifdef _XLOCALE_H_ +#include +#endif extern int __mb_cur_max; -#define MB_CUR_MAX __mb_cur_max +extern int ___mb_cur_max(void); +#define MB_CUR_MAX (___mb_cur_max()) -__BEGIN_DECLS void abort(void) __dead2; /* void abort2(const char *, int, void **) __dead2; */ #if !defined(_KERNEL_VIRTUAL) diff --git a/include/string.h b/include/string.h index 71cd7eb051..fd79d2b537 100644 --- a/include/string.h +++ b/include/string.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,8 +27,7 @@ * SUCH DAMAGE. * * @(#)string.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/include/string.h,v 1.27 2008/12/08 21:04:24 kib Exp $ - * $DragonFly: src/include/string.h,v 1.9 2008/06/05 17:53:10 swildner Exp $ + * $FreeBSD: head/include/string.h 246803 2013-02-14 19:26:58Z zeising $ */ #ifndef _STRING_H_ @@ -56,17 +51,19 @@ typedef __size_t size_t; #endif __BEGIN_DECLS -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 600 void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif void *memchr(const void *, int, size_t) __pure; +#if __BSD_VISIBLE void *memrchr(const void *, int, size_t) __pure; +#endif #if !defined(_KERNEL_VIRTUAL) int memcmp(const void *, const void *, size_t) __pure; void *memcpy(void * __restrict, const void * __restrict, size_t); #endif #if __BSD_VISIBLE -void *memmem(const void *, size_t, const void *, size_t); +void *memmem(const void *, size_t, const void *, size_t) __pure; void *mempcpy(void *, const void *, size_t); #endif #if !defined(_KERNEL_VIRTUAL) @@ -74,18 +71,20 @@ void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); #endif #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE -char *stpcpy(char *, const char *); -char *stpncpy(char * __restrict, const char * __restrict, size_t); +char *stpcpy(char * __restrict, const char * __restrict); +char *stpncpy(char * __restrict, const char * __restrict, size_t); #endif #if __BSD_VISIBLE char *strcasestr(const char *, const char *) __pure; -char *strchrnul(const char *, int) __pure; #endif #if !defined(_KERNEL_VIRTUAL) char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; int strcmp(const char *, const char *) __pure; #endif +#if __BSD_VISIBLE +char *strchrnul(const char*, int) __pure; +#endif int strcoll(const char *, const char *); #if !defined(_KERNEL_VIRTUAL) char *strcpy(char * __restrict, const char * __restrict); @@ -100,9 +99,9 @@ int strerror_r(int, char *, size_t); #endif #if !defined(_KERNEL_VIRTUAL) #if __BSD_VISIBLE -size_t strlcat(char *, const char *, size_t); -size_t strlcpy(char *, const char *, size_t); -#endif /* __BSD_VISIBLE */ +size_t strlcat(char * __restrict, const char * __restrict, size_t); +size_t strlcpy(char * __restrict, const char * __restrict, size_t); +#endif size_t strlen(const char *) __pure; #endif /* !_KERNEL_VIRTUAL */ #if __BSD_VISIBLE @@ -113,9 +112,11 @@ char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #endif -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE char *strndup(const char *, size_t); size_t strnlen(const char *, size_t) __pure; +#endif +#if __BSD_VISIBLE char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; @@ -126,6 +127,8 @@ char *strrchr(const char *, int) __pure; #if !defined(_KERNEL_VIRTUAL) char *strsep(char **, const char *); #endif +#endif +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE char *strsignal(int); #endif size_t strspn(const char *, const char *) __pure; @@ -149,6 +152,10 @@ void swab(const void * __restrict, void * __restrict, ssize_t); #endif /* _SWAB_DECLARED */ #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include +#endif __END_DECLS #endif /* _STRING_H_ */ diff --git a/include/time.h b/include/time.h index 14180fa878..ccd7b652e1 100644 --- a/include/time.h +++ b/include/time.h @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,13 +34,16 @@ * @(#)time.h 8.3 (Berkeley) 1/21/94 */ +/* + * $FreeBSD: head/include/time.h 245428 2013-01-14 18:01:19Z dim $ + */ + #ifndef _TIME_H_ #define _TIME_H_ #include - -#include -#include +#include +#include #if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE /* @@ -57,8 +56,6 @@ /* Frequency of the clock ticks reported by clock(). */ #define CLOCKS_PER_SEC 128 -#include - #ifndef _CLOCK_T_DECLARED #define _CLOCK_T_DECLARED typedef __clock_t clock_t; @@ -88,10 +85,17 @@ typedef __clockid_t clockid_t; typedef __timer_t timer_t; #endif -#include +#include #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +#ifndef _PID_T_DECLARED +#define _PID_T_DECLARED +typedef __pid_t pid_t; +#endif +#endif + /* These macros are also in sys/time.h. */ #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 #define CLOCK_REALTIME 0 @@ -99,18 +103,17 @@ typedef __timer_t timer_t; #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #endif -#define CLOCK_MONOTONIC 4 /* from freebsd */ -#define CLOCK_UPTIME 5 /* from freebsd */ -#define CLOCK_UPTIME_PRECISE 7 /* from freebsd */ -#define CLOCK_UPTIME_FAST 8 /* from freebsd */ -#define CLOCK_REALTIME_PRECISE 9 /* from freebsd */ -#define CLOCK_REALTIME_FAST 10 /* from freebsd */ -#define CLOCK_MONOTONIC_PRECISE 11 /* from freebsd */ -#define CLOCK_MONOTONIC_FAST 12 /* from freebsd */ -#define CLOCK_SECOND 13 /* from freebsd */ -#define CLOCK_THREAD_CPUTIME_ID 14 -#define CLOCK_PROCESS_CPUTIME_ID 15 - +#define CLOCK_MONOTONIC 4 +#define CLOCK_UPTIME 5 /* FreeBSD-specific. */ +#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ +#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ +#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ +#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ +#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ +#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ +#define CLOCK_SECOND 13 /* FreeBSD-specific. */ +#define CLOCK_THREAD_CPUTIME_ID 14 +#define CLOCK_PROCESS_CPUTIME_ID 15 #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 @@ -118,7 +121,7 @@ typedef __timer_t timer_t; #define TIMER_RELTIME 0x0 /* relative timer */ #endif #define TIMER_ABSTIME 0x1 /* absolute timer */ -#endif +#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ struct tm { int tm_sec; /* seconds after the minute [0-60] */ @@ -130,7 +133,7 @@ struct tm { int tm_wday; /* days since Sunday [0-6] */ int tm_yday; /* days since January 1 [0-365] */ int tm_isdst; /* Daylight Savings Time flag */ - long tm_gmtoff; /* offset from CUT in seconds */ + long tm_gmtoff; /* offset from UTC in seconds */ char *tm_zone; /* timezone abbreviation */ }; @@ -139,48 +142,65 @@ extern char *tzname[]; #endif __BEGIN_DECLS -char *asctime (const struct tm *); -clock_t clock (void); -char *ctime (const time_t *); -double difftime (time_t, time_t); -struct tm *gmtime (const time_t *); -struct tm *localtime (const time_t *); -time_t mktime (struct tm *); -size_t strftime (char * __restrict, size_t, const char * __restrict, - const struct tm * __restrict); -time_t time (time_t *); - -#if __POSIX_VISIBLE -void tzset (void); +char *asctime(const struct tm *); +clock_t clock(void); +char *ctime(const time_t *); +double difftime(time_t, time_t); +/* XXX missing: getdate() */ +struct tm *gmtime(const time_t *); +struct tm *localtime(const time_t *); +time_t mktime(struct tm *); +size_t strftime(char * __restrict, size_t, const char * __restrict, + const struct tm * __restrict); +time_t time(time_t *); +#if __POSIX_VISIBLE >= 200112 +struct sigevent; +int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict); +int timer_delete(timer_t); +int timer_gettime(timer_t, struct itimerspec *); +int timer_getoverrun(timer_t); +int timer_settime(timer_t, int, const struct itimerspec *__restrict, + struct itimerspec *__restrict); #endif - -#if __POSIX_VISIBLE >= 199506 -char *asctime_r (const struct tm *, char *); -char *ctime_r (const time_t *, char *); -struct tm *gmtime_r (const time_t *, struct tm *); -struct tm *localtime_r (const time_t *, struct tm *); +#if __POSIX_VISIBLE +void tzset(void); #endif #if __POSIX_VISIBLE >= 199309 -/* Introduced in POSIX 1003.1b-1993, not part of 1003.1-1990. */ -int clock_getres (clockid_t, struct timespec *); -int clock_gettime (clockid_t, struct timespec *); -int clock_settime (clockid_t, const struct timespec *); -int nanosleep (const struct timespec *, struct timespec *); +int clock_getres(clockid_t, struct timespec *); +int clock_gettime(clockid_t, struct timespec *); +int clock_settime(clockid_t, const struct timespec *); +/* XXX missing: clock_nanosleep() */ +int nanosleep(const struct timespec *, struct timespec *); #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +int clock_getcpuclockid(pid_t, clockid_t *); +#endif + +#if __POSIX_VISIBLE >= 199506 +char *asctime_r(const struct tm *, char *); +char *ctime_r(const time_t *, char *); +struct tm *gmtime_r(const time_t *, struct tm *); +struct tm *localtime_r(const time_t *, struct tm *); +#endif + #if __XSI_VISIBLE extern int daylight; extern long timezone; -char *strptime (const char * __restrict, const char * __restrict, - struct tm * __restrict); +char *strptime(const char * __restrict, const char * __restrict, + struct tm * __restrict); #endif #if __BSD_VISIBLE -void tzsetwall (void); -time_t timelocal (struct tm * const); -time_t timegm (struct tm * const); +void tzsetwall(void); +time_t timelocal(struct tm * const); +time_t timegm(struct tm * const); #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include +#endif __END_DECLS #endif /* !_TIME_H_ */ diff --git a/include/iconv.h b/include/uchar.h similarity index 58% copy from include/iconv.h copy to include/uchar.h index 29dee16326..7dccba303f 100644 --- a/include/iconv.h +++ b/include/uchar.h @@ -1,8 +1,5 @@ -/* $NetBSD: iconv.h,v 1.3 2003/08/22 14:05:03 kleink Exp $ */ -/* $DragonFly: src/include/iconv.h,v 1.1 2005/03/11 23:33:53 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2013 Ed Schouten * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,29 +23,45 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/uchar.h 250985 2013-05-25 16:58:12Z ed $ */ -#ifndef _ICONV_H_ -#define _ICONV_H_ +#ifndef _UCHAR_H_ +#define _UCHAR_H_ +#include #include -struct __tag_iconv_t; -typedef struct __tag_iconv_t *iconv_t; +#ifndef _CHAR16_T_DECLARED +typedef __char16_t char16_t; +#define _CHAR16_T_DECLARED +#endif + +#ifndef _CHAR32_T_DECLARED +typedef __char32_t char32_t; +#define _CHAR32_T_DECLARED +#endif + +#ifndef _MBSTATE_T_DECLARED +typedef __mbstate_t mbstate_t; +#define _MBSTATE_T_DECLARED +#endif + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif __BEGIN_DECLS -iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, char ** __restrict, size_t * __restrict, - char ** __restrict, size_t * __restrict); -int iconv_close(iconv_t); -/* - * non-portable interfaces for iconv - */ -int __iconv_get_list(char ***, size_t *); -void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, - __uint32_t, size_t *); -#define __ICONV_F_HIDE_INVALID 0x0001 +size_t c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict); +size_t c32rtomb(char * __restrict, char32_t, mbstate_t * __restrict); +size_t mbrtoc16(char16_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict); +size_t mbrtoc32(char32_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict); +#if __BSD_VISIBLE || defined(_XLOCALE_H_) +#include +#endif __END_DECLS -#endif /* !_ICONV_H_ */ +#endif /* !_UCHAR_H_ */ diff --git a/include/wchar.h b/include/wchar.h index 4895b26172..fe27e7e0d3 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,5 +1,3 @@ -/* $NetBSD: src/include/wchar.h,v 1.20 2004/05/08 21:57:05 kleink Exp $ */ - /*- * Copyright (c)1999 Citrus Project, * All rights reserved. @@ -24,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/include/wchar.h 247411 2013-02-27 19:50:46Z jhb $ */ /*- @@ -41,13 +41,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -60,17 +53,18 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $ */ #ifndef _WCHAR_H_ #define _WCHAR_H_ -#include -/* XXX namespace pollution */ -#include - #include /* for FILE* */ #include +#include +#include +#include #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED @@ -92,14 +86,6 @@ typedef __wchar_t wchar_t; typedef __wint_t wint_t; #endif -#ifndef WINT_MIN -#define WINT_MIN INT_MIN -#endif - -#ifndef WINT_MAX -#define WINT_MAX INT_MAX -#endif - #ifndef _MBSTATE_T_DECLARED #define _MBSTATE_T_DECLARED typedef __mbstate_t mbstate_t; @@ -118,103 +104,130 @@ struct tm; __BEGIN_DECLS wint_t btowc(int); +wint_t fgetwc(FILE *); +wchar_t * + fgetws(wchar_t * __restrict, int, FILE * __restrict); +wint_t fputwc(wchar_t, FILE *); +int fputws(const wchar_t * __restrict, FILE * __restrict); +int fwide(FILE *, int); +int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); +int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); +wint_t getwc(FILE *); +wint_t getwchar(void); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); int mbsinit(const mbstate_t *); size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict); +wint_t putwc(wchar_t, FILE *); +wint_t putwchar(wchar_t); +int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, + ...); +int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); +wint_t ungetwc(wint_t, FILE *); +int vfwprintf(FILE * __restrict, const wchar_t * __restrict, + __va_list); +int vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, + __va_list); +int vwprintf(const wchar_t * __restrict, __va_list); size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); -wchar_t *wcschr(const wchar_t *, wchar_t); -int wcscmp(const wchar_t *, const wchar_t *); +wchar_t *wcschr(const wchar_t *, wchar_t) __pure; +int wcscmp(const wchar_t *, const wchar_t *) __pure; int wcscoll(const wchar_t *, const wchar_t *); wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); -size_t wcscspn(const wchar_t *, const wchar_t *); +size_t wcscspn(const wchar_t *, const wchar_t *) __pure; size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict); -int wcscasecmp(const wchar_t *, const wchar_t *); -int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); -size_t wcslen(const wchar_t *); -wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); -int wcsncmp(const wchar_t *, const wchar_t *, size_t); + const struct tm * __restrict); +size_t wcslen(const wchar_t *) __pure; +wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, + size_t); +int wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure; wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); -size_t wcsnlen(const wchar_t *, size_t) __pure; -wchar_t *wcspbrk(const wchar_t *, const wchar_t *); -wchar_t *wcsrchr(const wchar_t *, wchar_t); +wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __pure; +wchar_t *wcsrchr(const wchar_t *, wchar_t) __pure; size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict); -size_t wcsspn(const wchar_t *, const wchar_t *); -wchar_t *wcsstr(const wchar_t *, const wchar_t *); -wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, - wchar_t ** __restrict); -size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); -wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); -int wmemcmp(const wchar_t *, const wchar_t *, size_t); + mbstate_t * __restrict); +size_t wcsspn(const wchar_t *, const wchar_t *) __pure; +wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict) + __pure; +size_t wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t); +int wctob(wint_t); +double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); +wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, + wchar_t ** __restrict); +long wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); +unsigned long + wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); +wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __pure; +int wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure; wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); wchar_t *wmemset(wchar_t *, wchar_t, size_t); +int wprintf(const wchar_t * __restrict, ...); +int wscanf(const wchar_t * __restrict, ...); -size_t wcslcat(wchar_t *, const wchar_t *, size_t); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -int wcswidth(const wchar_t *, size_t); -int wctob(wint_t); -int wcwidth(wchar_t); +#ifndef _STDSTREAM_DECLARED +extern FILE *__stdinp; +extern FILE *__stdoutp; +extern FILE *__stderrp; +#define _STDSTREAM_DECLARED +#endif -unsigned long wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); -long wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); -double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); +#define getwc(fp) fgetwc(fp) +#define getwchar() fgetwc(__stdinp) +#define putwc(wc, fp) fputwc(wc, fp) +#define putwchar(wc) fputwc(wc, __stdoutp) -#if __ISO_C_VISIBLE >= 1999 || __DF_VISIBLE +#if __ISO_C_VISIBLE >= 1999 +int vfwscanf(FILE * __restrict, const wchar_t * __restrict, + __va_list); +int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, + __va_list); +int vwscanf(const wchar_t * __restrict, __va_list); float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); -long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict); - +long double + wcstold(const wchar_t * __restrict, wchar_t ** __restrict); +#ifdef __LONG_LONG_SUPPORTED /* LONGLONG */ -long long wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); +long long + wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); /* LONGLONG */ -unsigned long long wcstoull(const wchar_t * __restrict, - wchar_t ** __restrict, int); +unsigned long long + wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int); #endif +#endif /* __ISO_C_VISIBLE >= 1999 */ -wint_t ungetwc(wint_t, FILE *); -wint_t fgetwc(FILE *); -wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); -wint_t getwc(FILE *); -wint_t getwchar(void); -wint_t fputwc(wchar_t, FILE *); -int fputws(const wchar_t * __restrict, FILE * __restrict); -wint_t putwc(wchar_t, FILE *); -wint_t putwchar(wchar_t); +#if __XSI_VISIBLE +int wcswidth(const wchar_t *, size_t); +int wcwidth(wchar_t); +#define wcwidth(_c) __wcwidth(_c) +#endif -int fwide(FILE *, int); +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, + size_t, mbstate_t * __restrict); +FILE *open_wmemstream(wchar_t **, size_t *); +wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict); +wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); +wchar_t *wcsdup(const wchar_t *); +int wcscasecmp(const wchar_t *, const wchar_t *); +int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); +size_t wcsnlen(const wchar_t *, size_t) __pure; +size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, + size_t, mbstate_t * __restrict); +#endif +#if __BSD_VISIBLE wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); -int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); -int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); -int swprintf(wchar_t * __restrict, size_t n, - const wchar_t * __restrict, ...); -int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); -int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list); -int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, - __va_list); -int vwprintf(const wchar_t * __restrict, __va_list); -int wprintf(const wchar_t * __restrict, ...); -int wscanf(const wchar_t * __restrict, ...); -#if __ISO_C_VISIBLE >= 1999 || __DF_VISIBLE -int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list); -int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, - __va_list); -int vwscanf(const wchar_t * __restrict, __va_list); +size_t wcslcat(wchar_t *, const wchar_t *, size_t); +size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE -wchar_t *wcsdup(const wchar_t *); +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include #endif __END_DECLS -#define getwc(f) fgetwc(f) -#define getwchar() getwc(stdin) -#define putwc(wc, f) fputwc((wc), (f)) -#define putwchar(wc) putwc((wc), stdout) - #endif /* !_WCHAR_H_ */ diff --git a/include/wctype.h b/include/wctype.h index 13f3fd4419..f7fd4f0252 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -1,6 +1,3 @@ -/* $NetBSD: src/include/wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */ -/* $DragonFly: src/include/wctype.h,v 1.6 2005/04/21 16:36:34 joerg Exp $ */ - /*- * Copyright (c)1999 Citrus Project, * All rights reserved. @@ -27,26 +24,31 @@ * SUCH DAMAGE. * * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp + * $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $ + * $FreeBSD: head/include/wctype.h 232498 2012-03-04 15:31:13Z theraven $ */ #ifndef _WCTYPE_H_ #define _WCTYPE_H_ -#include +#include +#include -#ifndef _WINT_T_DECLARED -#define _WINT_T_DECLARED -typedef __wint_t wint_t; +#include + +#ifndef _WCTRANS_T +typedef int wctrans_t; +#define _WCTRANS_T #endif -#ifndef _WCTRANS_T_DECLARED -#define _WCTRANS_T_DECLARED -typedef __wctrans_t wctrans_t; +#ifndef _WCTYPE_T +typedef unsigned long wctype_t; +#define _WCTYPE_T #endif -#ifndef _WCTYPE_T_DECLARED -#define _WCTYPE_T_DECLARED -typedef __wctype_t wctype_t; +#ifndef _WINT_T_DECLARED +typedef __wint_t wint_t; +#define _WINT_T_DECLARED #endif #ifndef WEOF @@ -58,6 +60,7 @@ int iswalnum(wint_t); int iswalpha(wint_t); int iswblank(wint_t); int iswcntrl(wint_t); +int iswctype(wint_t, wctype_t); int iswdigit(wint_t); int iswgraph(wint_t); int iswlower(wint_t); @@ -66,12 +69,57 @@ int iswpunct(wint_t); int iswspace(wint_t); int iswupper(wint_t); int iswxdigit(wint_t); -int iswctype(wint_t, wctype_t); wint_t towctrans(wint_t, wctrans_t); wint_t towlower(wint_t); wint_t towupper(wint_t); -wctrans_t wctrans(const char *); -wctype_t wctype(const char *); +wctrans_t + wctrans(const char *); +wctype_t + wctype(const char *); + +#if __BSD_VISIBLE +wint_t iswascii(wint_t); +wint_t iswhexnumber(wint_t); +wint_t iswideogram(wint_t); +wint_t iswnumber(wint_t); +wint_t iswphonogram(wint_t); +wint_t iswrune(wint_t); +wint_t iswspecial(wint_t); +wint_t nextwctype(wint_t, wctype_t); +#endif + +#if __POSIX_VISIBLE >= 200809 +#define _XLOCALE_WCTYPES 1 +#include +#endif /* __POSIX_VISIBLE >= 200809 */ __END_DECLS +#ifndef __cplusplus +#define iswalnum(wc) __istype((wc), _CTYPE_A|_CTYPE_D) +#define iswalpha(wc) __istype((wc), _CTYPE_A) +#define iswblank(wc) __istype((wc), _CTYPE_B) +#define iswcntrl(wc) __istype((wc), _CTYPE_C) +#define iswctype(wc, charclass) __istype((wc), (charclass)) +#define iswdigit(wc) __isctype((wc), _CTYPE_D) +#define iswgraph(wc) __istype((wc), _CTYPE_G) +#define iswlower(wc) __istype((wc), _CTYPE_L) +#define iswprint(wc) __istype((wc), _CTYPE_R) +#define iswpunct(wc) __istype((wc), _CTYPE_P) +#define iswspace(wc) __istype((wc), _CTYPE_S) +#define iswupper(wc) __istype((wc), _CTYPE_U) +#define iswxdigit(wc) __isctype((wc), _CTYPE_X) +#define towlower(wc) __tolower(wc) +#define towupper(wc) __toupper(wc) + +#if __BSD_VISIBLE +#define iswascii(wc) (((wc) & ~0x7F) == 0) +#define iswhexnumber(wc) __istype((wc), _CTYPE_X) +#define iswideogram(wc) __istype((wc), _CTYPE_I) +#define iswnumber(wc) __istype((wc), _CTYPE_D) +#define iswphonogram(wc) __istype((wc), _CTYPE_Q) +#define iswrune(wc) __istype((wc), 0xFFFFFF00L) +#define iswspecial(wc) __istype((wc), _CTYPE_T) +#endif /* __BSD_VISIBLE */ +#endif /* __cplusplus */ + #endif /* _WCTYPE_H_ */ diff --git a/lib/libc/citrus/citrus_esdb.h b/include/xlocale.h similarity index 59% copy from lib/libc/citrus/citrus_esdb.h copy to include/xlocale.h index 117f9c6854..2d214be6b5 100644 --- a/lib/libc/citrus/citrus_esdb.h +++ b/include/xlocale.h @@ -1,11 +1,10 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_esdb.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_esdb.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,32 +25,61 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale.h 232498 2012-03-04 15:31:13Z theraven $ */ -#ifndef _CITRUS_ESDB_H_ -#define _CITRUS_ESDB_H_ +#ifndef _XLOCALE_H_ +#define _XLOCALE_H_ -struct _citrus_esdb_charset { - _citrus_csid_t ec_csid; - char *ec_csname; -}; +#include +__BEGIN_DECLS +#include -struct _citrus_esdb { - char *db_encname; - void *db_variable; - size_t db_len_variable; - int db_num_charsets; - struct _citrus_esdb_charset *db_charsets; - int db_use_invalid; - _citrus_wc_t db_invalid; -}; +#ifdef _STRING_H_ +#include +#endif -__BEGIN_DECLS -const char *_citrus_esdb_alias(const char *, char *, size_t); -int _citrus_esdb_open(struct _citrus_esdb *, const char *); -void _citrus_esdb_close(struct _citrus_esdb *); -void _citrus_esdb_free_list(char **, size_t); -int _citrus_esdb_get_list(char ***, size_t *); +#ifdef _INTTYPES_H_ +#include +#endif + +#ifdef _MONETARY_H_ +#include +#endif + +#ifdef _STDLIB_H_ +#include +#endif + +#ifdef _TIME_H_ +#include +#endif + +#ifdef _LANGINFO_H_ +#include +#endif + +#ifdef _CTYPE_H_ +#include +#endif + +#ifdef _WCTYPE_H_ +#define _XLOCALE_WCTYPES 1 +#include +#endif + +#ifdef _STDIO_H_ +#include +#endif + +#ifdef _WCHAR_H_ +#include +#endif + + + +struct lconv *localeconv_l(locale_t); __END_DECLS #endif diff --git a/include/xlocale/Makefile b/include/xlocale/Makefile new file mode 100644 index 0000000000..5bf7a245cd --- /dev/null +++ b/include/xlocale/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD: head/include/xlocale/Makefile 250883 2013-05-21 19:59:37Z ed $ + +NO_OBJ= +INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h \ + _stdlib.h _string.h _time.h _uchar.h _wchar.h +INCSDIR=${INCLUDEDIR}/xlocale + +.include diff --git a/include/xlocale/_ctype.h b/include/xlocale/_ctype.h new file mode 100644 index 0000000000..3d4857eb49 --- /dev/null +++ b/include/xlocale/_ctype.h @@ -0,0 +1,203 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale/_ctype.h 243032 2012-11-14 17:44:37Z demon $ + */ + + +#if (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ + (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) + +#ifdef _XLOCALE_WCTYPES +#define _XLOCALE_WCTYPE_H +#else +#define _XLOCALE_CTYPE_H +#endif + +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +#ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED +#define _XLOCALE_RUN_FUNCTIONS_DEFINED 1 +unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure; +__ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure; +__ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure; +_RuneLocale *__runes_for_locale(locale_t, int*); +#endif + +#ifndef _XLOCALE_INLINE +#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) +/* GNU89 inline has nonstandard semantics. */ +#define _XLOCALE_INLINE extern __inline +#else +/* Hack to work around people who define inline away */ +#ifdef inline +#define _XLOCALE_INLINE static __inline +#else +/* Define with C++ / C99 compatible semantics */ +#define _XLOCALE_INLINE inline +#endif +#endif +#endif /* _XLOCALE_INLINE */ + +#ifdef _XLOCALE_WCTYPES +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +{ + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c]) & __f; +} + +_XLOCALE_INLINE int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +{ + return (!!__maskrune_l(__c, __f, __loc)); +} + +#define XLOCALE_ISCTYPE(fname, cat) \ + _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\ + _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ + { return __istype_l(__c, cat, __l); } +#else +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +{ + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= __limit) ? 0 : + runes->__runetype[__c] & __f; +} + +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +{ + return (!!__sbmaskrune_l(__c, __f, __loc)); +} + +#define XLOCALE_ISCTYPE(__fname, __cat) \ + _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ + _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ + { return __sbistype_l(__c, __cat, __l); } +#endif + +XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) +XLOCALE_ISCTYPE(alpha, _CTYPE_A) +XLOCALE_ISCTYPE(blank, _CTYPE_B) +XLOCALE_ISCTYPE(cntrl, _CTYPE_C) +XLOCALE_ISCTYPE(digit, _CTYPE_D) +XLOCALE_ISCTYPE(graph, _CTYPE_G) +XLOCALE_ISCTYPE(hexnumber, _CTYPE_X) +XLOCALE_ISCTYPE(ideogram, _CTYPE_I) +XLOCALE_ISCTYPE(lower, _CTYPE_L) +XLOCALE_ISCTYPE(number, _CTYPE_D) +XLOCALE_ISCTYPE(phonogram, _CTYPE_Q) +XLOCALE_ISCTYPE(print, _CTYPE_R) +XLOCALE_ISCTYPE(punct, _CTYPE_P) +XLOCALE_ISCTYPE(rune, 0xFFFFFF00L) +XLOCALE_ISCTYPE(space, _CTYPE_S) +XLOCALE_ISCTYPE(special, _CTYPE_T) +XLOCALE_ISCTYPE(upper, _CTYPE_U) +XLOCALE_ISCTYPE(xdigit, _CTYPE_X) +#undef XLOCALE_ISCTYPE + +#ifdef _XLOCALE_WCTYPES +_XLOCALE_INLINE int towlower_l(int, locale_t); +_XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t); +_XLOCALE_INLINE int towupper_l(int, locale_t); + +_XLOCALE_INLINE int towlower_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : + __runes->__maplower[__c]; +} +_XLOCALE_INLINE int towupper_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : + __runes->__mapupper[__c]; +} +_XLOCALE_INLINE int +__wcwidth_l(__ct_rune_t _c, locale_t __l) +{ + unsigned int _x; + + if (_c == 0) + return (0); + _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l); + if ((_x & _CTYPE_SWM) != 0) + return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); + return ((_x & _CTYPE_R) != 0 ? 1 : -1); +} +int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l); +wctype_t wctype_l(const char *property, locale_t __l); +wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l); +wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l); +wctrans_t wctrans_l(const char *__charclass, locale_t __l); +#undef _XLOCALE_WCTYPES +#else +_XLOCALE_INLINE int digittoint_l(int, locale_t); +_XLOCALE_INLINE int tolower_l(int, locale_t); +_XLOCALE_INLINE int toupper_l(int, locale_t); + +_XLOCALE_INLINE int digittoint_l(int __c, locale_t __l) +{ return __sbmaskrune_l((__c), 0xFF, __l); } + +_XLOCALE_INLINE int tolower_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= __limit) ? __c : + __runes->__maplower[__c]; +} +_XLOCALE_INLINE int toupper_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= __limit) ? __c : + __runes->__mapupper[__c]; +} +#endif +#endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ + (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */ diff --git a/lib/libc/stdio/getwc.c b/include/xlocale/_inttypes.h similarity index 64% copy from lib/libc/stdio/getwc.c copy to include/xlocale/_inttypes.h index 4eb88d0e5c..3c590050ed 100644 --- a/lib/libc/stdio/getwc.c +++ b/include/xlocale/_inttypes.h @@ -1,7 +1,10 @@ /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,26 +26,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/getwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/getwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/include/xlocale/_inttypes.h 231673 2012-02-14 12:03:23Z theraven $ */ -#include "namespace.h" -#include -#include -#include "un-namespace.h" -#include "libc_private.h" -#include "local.h" - -#undef getwc /* - * Synonym for fgetwc(). The only difference is that getwc(), if it is a - * macro, may evaluate `fp' more than once. + * Extended locale versions of the locale-aware functions from inttypes.h. + * Include before to expose these. */ -wint_t -getwc(FILE *fp) -{ - - return (fgetwc(fp)); -} +intmax_t strtoimax_l(const char * __restrict, char ** __restrict, + int, locale_t); +uintmax_t strtoumax_l(const char * __restrict, char ** __restrict, int, + locale_t); +intmax_t wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict, + int , locale_t); +uintmax_t wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict, + int, locale_t); diff --git a/lib/libc/citrus/citrus_mmap.h b/include/xlocale/_langinfo.h similarity index 74% copy from lib/libc/citrus/citrus_mmap.h copy to include/xlocale/_langinfo.h index 03d995ffda..a60eac8cc7 100644 --- a/lib/libc/citrus/citrus_mmap.h +++ b/include/xlocale/_langinfo.h @@ -1,10 +1,10 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mmap.h,v 1.1 2003/06/25 09:51:38 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mmap.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,15 +26,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/xlocale/_langinfo.h 231673 2012-02-14 12:03:23Z theraven $ */ -#ifndef _CITRUS_MMAP_H_ -#define _CITRUS_MMAP_H_ - -__BEGIN_DECLS -int _citrus_map_file(struct _citrus_region * __restrict, - const char * __restrict); -void _citrus_unmap_file(struct _citrus_region *); -__END_DECLS +#ifndef _XLOCALE_LANGINFO_H +#define _XLOCALE_LANGINFO_H +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; #endif + +char *nl_langinfo_l(nl_item, locale_t); + +#endif /* _XLOCALE_LANGINFO_H */ diff --git a/lib/libc/citrus/citrus_mmap.h b/include/xlocale/_locale.h similarity index 57% copy from lib/libc/citrus/citrus_mmap.h copy to include/xlocale/_locale.h index 03d995ffda..ff53b3e8e7 100644 --- a/lib/libc/citrus/citrus_mmap.h +++ b/include/xlocale/_locale.h @@ -1,10 +1,10 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mmap.h,v 1.1 2003/06/25 09:51:38 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mmap.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,15 +26,31 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/xlocale/_locale.h 231673 2012-02-14 12:03:23Z theraven $ */ -#ifndef _CITRUS_MMAP_H_ -#define _CITRUS_MMAP_H_ +#ifndef _XLOCALE_LOCALE_H +#define _XLOCALE_LOCALE_H -__BEGIN_DECLS -int _citrus_map_file(struct _citrus_region * __restrict, - const char * __restrict); -void _citrus_unmap_file(struct _citrus_region *); -__END_DECLS +#define LC_COLLATE_MASK (1<<0) +#define LC_CTYPE_MASK (1<<1) +#define LC_MESSAGES_MASK (1<<2) +#define LC_MONETARY_MASK (1<<3) +#define LC_NUMERIC_MASK (1<<4) +#define LC_TIME_MASK (1<<5) +#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \ + LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK) +#define LC_GLOBAL_LOCALE ((locale_t)-1) +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; #endif + +locale_t duplocale(locale_t base); +int freelocale(locale_t loc); +locale_t newlocale(int mask, const char *locale, locale_t base); +const char *querylocale(int mask, locale_t loc); +locale_t uselocale(locale_t loc); + +#endif /* _XLOCALE_LOCALE_H */ diff --git a/lib/libc/citrus/citrus_ctype_fallback.h b/include/xlocale/_monetary.h similarity index 68% rename from lib/libc/citrus/citrus_ctype_fallback.h rename to include/xlocale/_monetary.h index 3353524773..9af20978d0 100644 --- a/lib/libc/citrus/citrus_ctype_fallback.h +++ b/include/xlocale/_monetary.h @@ -1,10 +1,10 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_ctype_fallback.h,v 1.1 2003/03/05 20:18:15 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_ctype_fallback.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -25,15 +25,21 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale/_monetary.h 231673 2012-02-14 12:03:23Z theraven $ */ -#ifndef _CITRUS_CTYPE_FALLBACK_H_ -#define _CITRUS_CTYPE_FALLBACK_H_ +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif -/* fallback functions for 0x00000002 */ -int _citrus_ctype_btowc_fallback(_citrus_ctype_rec_t * __restrict, - int, wint_t * __restrict); -int _citrus_ctype_wctob_fallback(_citrus_ctype_rec_t * __restrict, - wint_t, int * __restrict); +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#ifndef _XLOCALE_MONETARY_H +#define _XLOCALE_MONETARY_H -#endif +ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...) + __strfmonlike(4, 5); + +#endif /* _XLOCALE_MONETARY_H */ +#endif /* __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) */ diff --git a/include/xlocale/_stdio.h b/include/xlocale/_stdio.h new file mode 100644 index 0000000000..1eead2feaa --- /dev/null +++ b/include/xlocale/_stdio.h @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 2011, 2012 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale/_stdio.h 231673 2012-02-14 12:03:23Z theraven $ + */ + +int asprintf_l(char **, locale_t, const char *, ...) __printflike(3, 4); +int dprintf_l(int, locale_t, const char * __restrict, ...) + __printflike(3, 4); +int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...) + __printflike(3, 4); +int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...) + __scanflike(3, 4); +int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3); +int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3); +int snprintf_l(char * __restrict, size_t, locale_t, + const char * __restrict, ...) __printflike(4, 5); +int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...) + __printflike(3, 4); +int sscanf_l(const char * __restrict, locale_t, const char * __restrict, + ...) __scanflike(3, 4); +int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, + __va_list) __printflike(3, 0); +int vprintf_l(locale_t, const char * __restrict, __va_list) + __printflike(2, 0); +int vsprintf_l(char * __restrict, locale_t, const char * __restrict, + __va_list) __printflike(3, 0); +int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, + __va_list) __scanflike(3, 0); +int vscanf_l(locale_t, const char * __restrict, __va_list) + __scanflike(2, 0); +int vsnprintf_l(char * __restrict, size_t, locale_t, + const char * __restrict, __va_list) __printflike(4, 0); +int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, + __va_list) __scanflike(3, 0); +int vdprintf_l(int, locale_t, const char * __restrict, __va_list) + __printflike(3, 0); +int vasprintf_l(char **, locale_t, const char *, __va_list) + __printflike(3, 0); diff --git a/include/xlocale/_stdlib.h b/include/xlocale/_stdlib.h new file mode 100644 index 0000000000..bde781c5b0 --- /dev/null +++ b/include/xlocale/_stdlib.h @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2011, 2012 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale/_stdlib.h 231673 2012-02-14 12:03:23Z theraven $ + */ + +/* + * Extended locale versions of the locale-aware functions from stdlib.h. + * + * Include before to expose these. + */ +double atof_l(const char *, locale_t); +int atoi_l(const char *, locale_t); +long atol_l(const char *, locale_t); +long long atoll_l(const char *, locale_t); +int mblen_l(const char *, size_t, locale_t); +size_t mbstowcs_l(wchar_t * __restrict, + const char * __restrict, size_t, locale_t); +int mbtowc_l(wchar_t * __restrict, + const char * __restrict, size_t, locale_t); +double strtod_l(const char *, char **, locale_t); +float strtof_l(const char *, char **, locale_t); +long strtol_l(const char *, char **, int, locale_t); +long double strtold_l(const char *, char **, locale_t); +long long strtoll_l(const char *, char **, int, locale_t); +unsigned long strtoul_l(const char *, char **, int, locale_t); +unsigned long long strtoull_l(const char *, char **, int, locale_t); +size_t wcstombs_l(char * __restrict, + const wchar_t * __restrict, size_t, locale_t); +int wctomb_l(char *, wchar_t, locale_t); + +int ___mb_cur_max_l(locale_t); +#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) + diff --git a/include/iconv.h b/include/xlocale/_string.h similarity index 58% copy from include/iconv.h copy to include/xlocale/_string.h index 29dee16326..2c6acd6a8a 100644 --- a/include/iconv.h +++ b/include/xlocale/_string.h @@ -1,8 +1,5 @@ -/* $NetBSD: iconv.h,v 1.3 2003/08/22 14:05:03 kleink Exp $ */ -/* $DragonFly: src/include/iconv.h,v 1.1 2005/03/11 23:33:53 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,29 +23,39 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/xlocale/_string.h 231673 2012-02-14 12:03:23Z theraven $ */ -#ifndef _ICONV_H_ -#define _ICONV_H_ +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +/* + * This file is included from both string.h and xlocale.h. We need to expose + * the declarations unconditionally if we are included from xlocale.h, but only + * if we are in POSIX2008 mode if included from string.h. + */ -#include +#ifndef _XLOCALE_STRING1_H +#define _XLOCALE_STRING1_H -struct __tag_iconv_t; -typedef struct __tag_iconv_t *iconv_t; +/* + * POSIX2008 functions + */ +int strcoll_l(const char *, const char *, locale_t); +size_t strxfrm_l(char *, const char *, size_t, locale_t); +#endif /* _XLOCALE_STRING1_H */ -__BEGIN_DECLS -iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, char ** __restrict, size_t * __restrict, - char ** __restrict, size_t * __restrict); -int iconv_close(iconv_t); /* - * non-portable interfaces for iconv + * xlocale extensions */ -int __iconv_get_list(char ***, size_t *); -void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, - __uint32_t, size_t *); -#define __ICONV_F_HIDE_INVALID 0x0001 -__END_DECLS +#ifdef _XLOCALE_H_ +#ifndef _XLOCALE_STRING2_H +#define _XLOCALE_STRING2_H +int strcasecmp_l(const char *, const char *, locale_t); +char *strcasestr_l(const char *, const char *, locale_t); +int strncasecmp_l(const char *, const char *, size_t, locale_t); -#endif /* !_ICONV_H_ */ +#endif /* _XLOCALE_STRING2_H */ +#endif /* _XLOCALE_H_ */ diff --git a/include/iconv.h b/include/xlocale/_time.h similarity index 57% copy from include/iconv.h copy to include/xlocale/_time.h index 29dee16326..043c343b0a 100644 --- a/include/iconv.h +++ b/include/xlocale/_time.h @@ -1,10 +1,10 @@ -/* $NetBSD: iconv.h,v 1.3 2003/08/22 14:05:03 kleink Exp $ */ -/* $DragonFly: src/include/iconv.h,v 1.1 2005/03/11 23:33:53 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,29 +26,33 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/xlocale/_time.h 231673 2012-02-14 12:03:23Z theraven $ */ -#ifndef _ICONV_H_ -#define _ICONV_H_ - -#include - -struct __tag_iconv_t; -typedef struct __tag_iconv_t *iconv_t; +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif -__BEGIN_DECLS -iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, char ** __restrict, size_t * __restrict, - char ** __restrict, size_t * __restrict); -int iconv_close(iconv_t); /* - * non-portable interfaces for iconv + * This file is included from both locale.h and xlocale.h. We need to expose + * the declarations unconditionally if we are included from xlocale.h, but only + * if we are in POSIX2008 mode if included from locale.h. */ -int __iconv_get_list(char ***, size_t *); -void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, - __uint32_t, size_t *); -#define __ICONV_F_HIDE_INVALID 0x0001 -__END_DECLS +#ifndef _XLOCALE_LOCALE1_H +#define _XLOCALE_LOCALE1_H + +size_t strftime_l(char * __restrict, size_t, const char * __restrict, + const struct tm * __restrict, locale_t); + +#endif /* _XLOCALE_LOCALE1_H */ + +#ifdef _XLOCALE_H_ +#ifndef _XLOCALE_LOCALE2_H +#define _XLOCALE_LOCALE2_H + +char *strptime_l(const char * __restrict, const char * __restrict, + struct tm * __restrict, locale_t); -#endif /* !_ICONV_H_ */ +#endif /* _XLOCALE_LOCALE2_H */ +#endif /* _XLOCALE_H_ */ diff --git a/lib/libc/citrus/citrus_mmap.h b/include/xlocale/_uchar.h similarity index 65% copy from lib/libc/citrus/citrus_mmap.h copy to include/xlocale/_uchar.h index 03d995ffda..597c3566e9 100644 --- a/lib/libc/citrus/citrus_mmap.h +++ b/include/xlocale/_uchar.h @@ -1,8 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mmap.h,v 1.1 2003/06/25 09:51:38 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mmap.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2013 Ed Schouten * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,15 +23,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD: head/include/xlocale/_uchar.h 250883 2013-05-21 19:59:37Z ed $ */ -#ifndef _CITRUS_MMAP_H_ -#define _CITRUS_MMAP_H_ +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +#ifndef _XLOCALE_UCHAR_H_ +#define _XLOCALE_UCHAR_H_ -__BEGIN_DECLS -int _citrus_map_file(struct _citrus_region * __restrict, - const char * __restrict); -void _citrus_unmap_file(struct _citrus_region *); -__END_DECLS +size_t c16rtomb_l(char * __restrict, char16_t, mbstate_t * __restrict, + locale_t); +size_t c32rtomb_l(char * __restrict, char32_t, mbstate_t * __restrict, + locale_t); +size_t mbrtoc16_l(char16_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); +size_t mbrtoc32_l(char32_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); -#endif +#endif /* _XLOCALE_UCHAR_H_ */ diff --git a/include/xlocale/_wchar.h b/include/xlocale/_wchar.h new file mode 100644 index 0000000000..d96c0dc7de --- /dev/null +++ b/include/xlocale/_wchar.h @@ -0,0 +1,133 @@ +/*- + * Copyright (c) 2011, 2012 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/include/xlocale/_wchar.h 231673 2012-02-14 12:03:23Z theraven $ + */ + +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +#ifndef _XLOCALE_WCHAR1_H +#define _XLOCALE_WCHAR1_H +int wcscasecmp_l(const wchar_t *, const wchar_t *, + locale_t); +int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, + locale_t); +int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); +size_t wcsxfrm_l(wchar_t * __restrict, + const wchar_t * __restrict, size_t, locale_t); + +#endif /* _XLOCALE_WCHAR1_H */ + +/* + * Only declare the non-POSIX functions if we're included from xlocale.h. + */ + +#ifdef _XLOCALE_H_ +#ifndef _XLOCALE_WCHAR2_H +#define _XLOCALE_WCHAR2_H + +wint_t btowc_l(int, locale_t); +wint_t fgetwc_l(FILE *, locale_t); +wchar_t *fgetws_l(wchar_t * __restrict, int, FILE * __restrict, + locale_t); +wint_t fputwc_l(wchar_t, FILE *, locale_t); +int fputws_l(const wchar_t * __restrict, FILE * __restrict, + locale_t); +int fwprintf_l(FILE * __restrict, locale_t, + const wchar_t * __restrict, ...); +int fwscanf_l(FILE * __restrict, locale_t, + const wchar_t * __restrict, ...); +wint_t getwc_l(FILE *, locale_t); +wint_t getwchar_l(locale_t); +size_t mbrlen_l(const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); +size_t mbrtowc_l(wchar_t * __restrict, + const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); +int mbsinit_l(const mbstate_t *, locale_t); +size_t mbsrtowcs_l(wchar_t * __restrict, + const char ** __restrict, size_t, + mbstate_t * __restrict, locale_t); +wint_t putwc_l(wchar_t, FILE *, locale_t); +wint_t putwchar_l(wchar_t, locale_t); +int swprintf_l(wchar_t * __restrict, size_t n, locale_t, + const wchar_t * __restrict, ...); +int swscanf_l(const wchar_t * __restrict, locale_t, + const wchar_t * __restrict, ...); +wint_t ungetwc_l(wint_t, FILE *, locale_t); +int vfwprintf_l(FILE * __restrict, locale_t, + const wchar_t * __restrict, __va_list); +int vswprintf_l(wchar_t * __restrict, size_t n, locale_t, + const wchar_t * __restrict, __va_list); +int vwprintf_l(locale_t, const wchar_t * __restrict, + __va_list); +size_t wcrtomb_l(char * __restrict, wchar_t, + mbstate_t * __restrict, locale_t); +size_t wcsftime_l(wchar_t * __restrict, size_t, + const wchar_t * __restrict, + const struct tm * __restrict, locale_t); +size_t wcsrtombs_l(char * __restrict, + const wchar_t ** __restrict, size_t, + mbstate_t * __restrict, locale_t); +double wcstod_l(const wchar_t * __restrict, + wchar_t ** __restrict, locale_t); +long wcstol_l(const wchar_t * __restrict, + wchar_t ** __restrict, int, locale_t); +unsigned long wcstoul_l(const wchar_t * __restrict, + wchar_t ** __restrict, int, locale_t); +int wcswidth_l(const wchar_t *, size_t, locale_t); +int wctob_l(wint_t, locale_t); +int wcwidth_l(wchar_t, locale_t); +int wprintf_l(locale_t, const wchar_t * __restrict, ...); +int wscanf_l(locale_t, const wchar_t * __restrict, ...); +int vfwscanf_l(FILE * __restrict, locale_t, + const wchar_t * __restrict, __va_list); +int vswscanf_l(const wchar_t * __restrict, locale_t, + const wchar_t *__restrict, __va_list); +int vwscanf_l(locale_t, const wchar_t * __restrict, + __va_list); +float wcstof_l(const wchar_t * __restrict, + wchar_t ** __restrict, locale_t); +long double wcstold_l(const wchar_t * __restrict, + wchar_t ** __restrict, locale_t); +long long wcstoll_l(const wchar_t * __restrict, + wchar_t ** __restrict, int, locale_t); +unsigned long long wcstoull_l(const wchar_t * __restrict, + wchar_t ** __restrict, int, locale_t); +size_t mbsnrtowcs_l(wchar_t * __restrict, + const char ** __restrict, size_t, size_t, + mbstate_t * __restrict, locale_t); +size_t wcsnrtombs_l(char * __restrict, + const wchar_t ** __restrict, size_t, size_t, + mbstate_t * __restrict, locale_t); + +#endif /* _XLOCALE_WCHAR_H */ +#endif /* _XLOCALE_H_ */ diff --git a/lib/i18n_module/BIG5/Makefile b/lib/i18n_module/BIG5/Makefile index 9935cc2f64..cdde968d45 100644 --- a/lib/i18n_module/BIG5/Makefile +++ b/lib/i18n_module/BIG5/Makefile @@ -1,6 +1,7 @@ -# $DragonFly: src/lib/i18n_module/BIG5/Makefile,v 1.2 2008/04/10 10:21:00 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/BIG5/Makefile 219019 2011-02-25 00:04:39Z gabor $ -SRCPRE= citrus_ -SRCS+= citrus_big5.c citrus_prop.c +LIB= BIG5 +SRCS+= citrus_big5.c +CFLAGS+= --param max-inline-insns-single=32 .include diff --git a/lib/libc/citrus/modules/citrus_big5.c b/lib/i18n_module/BIG5/citrus_big5.c similarity index 72% rename from lib/libc/citrus/modules/citrus_big5.c rename to lib/i18n_module/BIG5/citrus_big5.c index 2eabd9cd4b..f1123062dc 100644 --- a/lib/libc/citrus/modules/citrus_big5.c +++ b/lib/i18n_module/BIG5/citrus_big5.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_big5.c,v 1.11 2006/11/22 23:38:27 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/BIG5/citrus_big5.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_big5.c,v 1.12 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2002, 2006 Citrus Project, @@ -58,12 +59,13 @@ * SUCH DAMAGE. */ +#include #include #include + #include #include #include -#include #include #include #include @@ -72,57 +74,40 @@ #include #include "citrus_namespace.h" +#include "citrus_prop.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_big5.h" -#include "citrus_prop.h" - /* ---------------------------------------------------------------------- * private stuffs used by templates */ typedef struct { - char ch[2]; - int chlen; + int chlen; + char ch[2]; } _BIG5State; typedef struct _BIG5Exclude { - TAILQ_ENTRY(_BIG5Exclude) entry; - wint_t start, end; + TAILQ_ENTRY(_BIG5Exclude) entry; + wint_t end; + wint_t start; } _BIG5Exclude; typedef TAILQ_HEAD(_BIG5ExcludeList, _BIG5Exclude) _BIG5ExcludeList; typedef struct { - int cell[0x100]; - _BIG5ExcludeList excludes; + _BIG5ExcludeList excludes; + int cell[0x100]; } _BIG5EncodingInfo; -typedef struct { - _BIG5EncodingInfo ei; - struct { - /* for future multi-locale facility */ - _BIG5State s_mblen; - _BIG5State s_mbrlen; - _BIG5State s_mbrtowc; - _BIG5State s_mbtowc; - _BIG5State s_mbsrtowcs; - _BIG5State s_wcrtomb; - _BIG5State s_wcsrtombs; - _BIG5State s_wctomb; - } states; -} _BIG5CTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_BIG5_##m #define _ENCODING_INFO _BIG5EncodingInfo -#define _CTYPE_INFO _BIG5CTypeInfo #define _ENCODING_STATE _BIG5State #define _ENCODING_MB_CUR_MAX(_ei_) 2 #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -131,44 +116,45 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_BIG5_init_state(_BIG5EncodingInfo * __restrict ei, - _BIG5State * __restrict s) +_citrus_BIG5_init_state(_BIG5EncodingInfo * __restrict ei __unused, + _BIG5State * __restrict s) { + memset(s, 0, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_BIG5_pack_state(_BIG5EncodingInfo * __restrict ei, - void * __restrict pspriv, - const _BIG5State * __restrict s) +_citrus_BIG5_pack_state(_BIG5EncodingInfo * __restrict ei __unused, + void * __restrict pspriv, + const _BIG5State * __restrict s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_BIG5_unpack_state(_BIG5EncodingInfo * __restrict ei, - _BIG5State * __restrict s, - const void * __restrict pspriv) +_citrus_BIG5_unpack_state(_BIG5EncodingInfo * __restrict ei __unused, + _BIG5State * __restrict s, + const void * __restrict pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static __inline int -_citrus_BIG5_check(_BIG5EncodingInfo *ei, u_int c) +_citrus_BIG5_check(_BIG5EncodingInfo *ei, unsigned int c) { - _DIAGASSERT(ei != NULL); - return (ei->cell[c & 0xFF] & 0x1) ? 2 : 1; + return ((ei->cell[c & 0xFF] & 0x1) ? 2 : 1); } static __inline int -_citrus_BIG5_check2(_BIG5EncodingInfo *ei, u_int c) +_citrus_BIG5_check2(_BIG5EncodingInfo *ei, unsigned int c) { - _DIAGASSERT(ei != NULL); - return (ei->cell[c & 0xFF] & 0x2) ? 1 : 0; + return ((ei->cell[c & 0xFF] & 0x2) ? 1 : 0); } static __inline int @@ -176,59 +162,53 @@ _citrus_BIG5_check_excludes(_BIG5EncodingInfo *ei, wint_t c) { _BIG5Exclude *exclude; - _DIAGASSERT(ei != NULL); - TAILQ_FOREACH(exclude, &ei->excludes, entry) { if (c >= exclude->start && c <= exclude->end) - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static int _citrus_BIG5_fill_rowcol(void ** __restrict ctx, const char * __restrict s, - uint64_t start, uint64_t end) + uint64_t start, uint64_t end) { _BIG5EncodingInfo *ei; - int i; uint64_t n; - - _DIAGASSERT(ctx != NULL && *ctx != NULL); + int i; if (start > 0xFF || end > 0xFF) - return EINVAL; - ei = (_BIG5EncodingInfo *)*ctx; + return (EINVAL); + ei = (_BIG5EncodingInfo *)ctx; i = strcmp("row", s) ? 1 : 0; i = 1 << i; for (n = start; n <= end; ++n) ei->cell[n & 0xFF] |= i; - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_BIG5_fill_excludes(void ** __restrict ctx, const char * __restrict s, - uint64_t start, uint64_t end) +_citrus_BIG5_fill_excludes(void ** __restrict ctx, + const char * __restrict s __unused, uint64_t start, uint64_t end) { _BIG5EncodingInfo *ei; _BIG5Exclude *exclude; - _DIAGASSERT(ctx != NULL && *ctx != NULL); - if (start > 0xFFFF || end > 0xFFFF) - return EINVAL; - ei = (_BIG5EncodingInfo *)*ctx; + return (EINVAL); + ei = (_BIG5EncodingInfo *)ctx; exclude = TAILQ_LAST(&ei->excludes, _BIG5ExcludeList); if (exclude != NULL && (wint_t)start <= exclude->end) - return EINVAL; + return (EINVAL); exclude = (void *)malloc(sizeof(*exclude)); if (exclude == NULL) - return ENOMEM; + return (ENOMEM); exclude->start = (wint_t)start; exclude->end = (wint_t)end; TAILQ_INSERT_TAIL(&ei->excludes, exclude, entry); - return 0; + return (0); } static const _citrus_prop_hint_t root_hints[] = { @@ -244,8 +224,6 @@ _citrus_BIG5_encoding_module_uninit(_BIG5EncodingInfo *ei) { _BIG5Exclude *exclude; - _DIAGASSERT(ei != NULL); - while ((exclude = TAILQ_FIRST(&ei->excludes)) != NULL) { TAILQ_REMOVE(&ei->excludes, exclude, entry); free(exclude); @@ -255,12 +233,11 @@ _citrus_BIG5_encoding_module_uninit(_BIG5EncodingInfo *ei) static int /*ARGSUSED*/ _citrus_BIG5_encoding_module_init(_BIG5EncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { - int err; + void *ctx = (void *)ei; const char *s; - - _DIAGASSERT(ei != NULL); + int err; memset((void *)ei, 0, sizeof(*ei)); TAILQ_INIT(&ei->excludes); @@ -271,7 +248,7 @@ _citrus_BIG5_encoding_module_init(_BIG5EncodingInfo * __restrict ei, err = _citrus_prop_parse_variable( root_hints, (void *)ei, s, lenvar); if (err == 0) - return 0; + return (0); _citrus_BIG5_encoding_module_uninit(ei); memset((void *)ei, 0, sizeof(*ei)); @@ -280,30 +257,24 @@ _citrus_BIG5_encoding_module_init(_BIG5EncodingInfo * __restrict ei, } /* fallback Big5-1984, for backward compatibility. */ - _citrus_BIG5_fill_rowcol((void **)&ei, "row", 0xA1, 0xFE); - _citrus_BIG5_fill_rowcol((void **)&ei, "col", 0x40, 0x7E); - _citrus_BIG5_fill_rowcol((void **)&ei, "col", 0xA1, 0xFE); + _citrus_BIG5_fill_rowcol((void **)&ctx, "row", 0xA1, 0xFE); + _citrus_BIG5_fill_rowcol((void **)&ctx, "col", 0x40, 0x7E); + _citrus_BIG5_fill_rowcol((void **)&ctx, "col", 0xA1, 0xFE); - return 0; + return (0); } static int /*ARGSUSED*/ _citrus_BIG5_mbrtowc_priv(_BIG5EncodingInfo * __restrict ei, - wchar_t * __restrict pwc, - const char ** __restrict s, size_t n, - _BIG5State * __restrict psenc, - size_t * __restrict nresult) + wchar_t * __restrict pwc, + const char ** __restrict s, size_t n, + _BIG5State * __restrict psenc, + size_t * __restrict nresult) { wchar_t wchar; - int c; - int chlenbak; const char *s0; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s != NULL && *s != NULL); + int c, chlenbak; s0 = *s; @@ -364,10 +335,7 @@ _citrus_BIG5_mbrtowc_priv(_BIG5EncodingInfo * __restrict ei, psenc->chlen = 0; if (pwc) *pwc = wchar; - if (!wchar) - *nresult = 0; - else - *nresult = c - chlenbak; + *nresult = wchar ? c - chlenbak : 0; return (0); @@ -385,15 +353,12 @@ restart: static int /*ARGSUSED*/ _citrus_BIG5_wcrtomb_priv(_BIG5EncodingInfo * __restrict ei, - char * __restrict s, - size_t n, wchar_t wc, _BIG5State * __restrict psenc, - size_t * __restrict nresult) + char * __restrict s, + size_t n, wchar_t wc, _BIG5State * __restrict psenc __unused, + size_t * __restrict nresult) { - int l, ret; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); + unsigned char l; + int ret; /* check invalid sequence */ if (wc & ~0xffff || @@ -431,35 +396,32 @@ _citrus_BIG5_wcrtomb_priv(_BIG5EncodingInfo * __restrict ei, *nresult = l; - return 0; + return (0); err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ -_citrus_BIG5_stdenc_wctocs(_BIG5EncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) +_citrus_BIG5_stdenc_wctocs(_BIG5EncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, + _index_t * __restrict idx, wchar_t wc) { - _DIAGASSERT(csid != NULL && idx != NULL); - *csid = (wc < 0x100) ? 0 : 1; *idx = (_index_t)wc; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_BIG5_stdenc_cstowc(_BIG5EncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) +_citrus_BIG5_stdenc_cstowc(_BIG5EncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, + _csid_t csid, _index_t idx) { - _DIAGASSERT(wc != NULL); switch (csid) { case 0: @@ -467,37 +429,24 @@ _citrus_BIG5_stdenc_cstowc(_BIG5EncodingInfo * __restrict ei, *wc = (wchar_t)idx; break; default: - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_BIG5_stdenc_get_state_desc_generic(_BIG5EncodingInfo * __restrict ei, - _BIG5State * __restrict psenc, - int * __restrict rstate) +_citrus_BIG5_stdenc_get_state_desc_generic(_BIG5EncodingInfo * __restrict ei __unused, + _BIG5State * __restrict psenc, + int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(BIG5); -_CITRUS_CTYPE_DEF_OPS(BIG5); - -#include "citrus_ctype_template.h" - - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_big5.h b/lib/i18n_module/BIG5/citrus_big5.h similarity index 86% rename from lib/libc/citrus/modules/citrus_big5.h rename to lib/i18n_module/BIG5/citrus_big5.h index b962715ba0..d2219f8161 100644 --- a/lib/libc/citrus/modules/citrus_big5.h +++ b/lib/i18n_module/BIG5/citrus_big5.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_big5.h,v 1.2 2003/06/25 09:51:41 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_big5.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/BIG5/citrus_big5.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_big5.h,v 1.2 2003/06/25 09:51:41 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_BIG5_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(BIG5); _CITRUS_STDENC_GETOPS_FUNC(BIG5); __END_DECLS diff --git a/lib/i18n_module/DECHanyu/Makefile b/lib/i18n_module/DECHanyu/Makefile index e3f44d6263..23f0c23210 100644 --- a/lib/i18n_module/DECHanyu/Makefile +++ b/lib/i18n_module/DECHanyu/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/DECHanyu/Makefile,v 1.1 2008/04/10 10:21:00 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/DECHanyu/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= DECHanyu +SRCS+= citrus_dechanyu.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_dechanyu.c b/lib/i18n_module/DECHanyu/citrus_dechanyu.c similarity index 65% rename from lib/libc/citrus/modules/citrus_dechanyu.c rename to lib/i18n_module/DECHanyu/citrus_dechanyu.c index 20e4c62ff9..10ac118f3f 100644 --- a/lib/libc/citrus/modules/citrus_dechanyu.c +++ b/lib/i18n_module/DECHanyu/citrus_dechanyu.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_dechanyu.c,v 1.2 2007/04/24 15:42:08 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_dechanyu.c,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_dechanyu.c,v 1.3 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2007 Citrus Project, @@ -26,24 +26,23 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - +#include #include + #include #include -#include +#include +#include #include #include #include -#include -#include +#include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_dechanyu.h" @@ -52,35 +51,19 @@ */ typedef struct { - int chlen; - char ch[4]; + size_t chlen; + char ch[4]; } _DECHanyuState; typedef struct { - int dummy; + int dummy; } _DECHanyuEncodingInfo; -typedef struct { - _DECHanyuEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _DECHanyuState s_mblen; - _DECHanyuState s_mbrlen; - _DECHanyuState s_mbrtowc; - _DECHanyuState s_mbtowc; - _DECHanyuState s_mbsrtowcs; - _DECHanyuState s_wcrtomb; - _DECHanyuState s_wcsrtombs; - _DECHanyuState s_wctomb; - } states; -} _DECHanyuCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.__CONCAT(s_,_func_) #define _FUNCNAME(m) __CONCAT(_citrus_DECHanyu_,m) #define _ENCODING_INFO _DECHanyuEncodingInfo -#define _CTYPE_INFO _DECHanyuCTypeInfo #define _ENCODING_STATE _DECHanyuState #define _ENCODING_MB_CUR_MAX(_ei_) 4 #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -88,116 +71,110 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_DECHanyu_init_state(_DECHanyuEncodingInfo * __restrict ei, - _DECHanyuState * __restrict psenc) +_citrus_DECHanyu_init_state(_DECHanyuEncodingInfo * __restrict ei __unused, + _DECHanyuState * __restrict psenc) { - /* ei may be null */ - _DIAGASSERT(psenc != NULL); psenc->chlen = 0; } static __inline void /*ARGSUSED*/ -_citrus_DECHanyu_pack_state(_DECHanyuEncodingInfo * __restrict ei, - void * __restrict pspriv, - const _DECHanyuState * __restrict psenc) +_citrus_DECHanyu_pack_state(_DECHanyuEncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _DECHanyuState * __restrict psenc) { - /* ei may be null */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_DECHanyu_unpack_state(_DECHanyuEncodingInfo * __restrict ei, - _DECHanyuState * __restrict psenc, - const void * __restrict pspriv) +_citrus_DECHanyu_unpack_state(_DECHanyuEncodingInfo * __restrict ei __unused, + _DECHanyuState * __restrict psenc, + const void * __restrict pspriv) { - /* ei may be null */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } static void /*ARGSUSED*/ -_citrus_DECHanyu_encoding_module_uninit(_DECHanyuEncodingInfo *ei) +_citrus_DECHanyu_encoding_module_uninit(_DECHanyuEncodingInfo *ei __unused) { + /* ei may be null */ } static int /*ARGSUSED*/ -_citrus_DECHanyu_encoding_module_init(_DECHanyuEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) +_citrus_DECHanyu_encoding_module_init(_DECHanyuEncodingInfo * __restrict ei __unused, + const void * __restrict var __unused, size_t lenvar __unused) { + /* ei may be null */ - return 0; + return (0); } -static __inline int +static __inline bool is_singlebyte(int c) { - return c <= 0x7F; + + return (c <= 0x7F); } -static __inline int +static __inline bool is_leadbyte(int c) { - return c >= 0xA1 && c <= 0xFE; + + return (c >= 0xA1 && c <= 0xFE); } -static __inline int +static __inline bool is_trailbyte(int c) { + c &= ~0x80; - return c >= 0x21 && c <= 0x7E; + return (c >= 0x21 && c <= 0x7E); } -static __inline int +static __inline bool is_hanyu1(int c) { - return c == 0xC2; + + return (c == 0xC2); } -static __inline int +static __inline bool is_hanyu2(int c) { - return c == 0xCB; + + return (c == 0xCB); } #define HANYUBIT 0xC2CB0000 -static __inline int +static __inline bool is_94charset(int c) { - return c >= 0x21 && c <= 0x7E; + + return (c >= 0x21 && c <= 0x7E); } static int /*ARGSUSED*/ _citrus_DECHanyu_mbrtowc_priv(_DECHanyuEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _DECHanyuState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _DECHanyuState * __restrict psenc, size_t * __restrict nresult) { const char *s0; - int ch, i; wchar_t wc; - - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + int ch; if (*s == NULL) { _citrus_DECHanyu_init_state(ei, psenc); *nresult = _ENCODING_IS_STATE_DEPENDENT; - return 0; - } + return (0); + } s0 = *s; wc = (wchar_t)0; @@ -206,50 +183,50 @@ _citrus_DECHanyu_mbrtowc_priv(_DECHanyuEncodingInfo * __restrict ei, if (n-- < 1) goto restart; ch = *s0++ & 0xFF; - if (is_singlebyte(ch) != 0) { + if (is_singlebyte(ch)) { if (pwc != NULL) *pwc = (wchar_t)ch; *nresult = (size_t)((ch == 0) ? 0 : 1); *s = s0; - return 0; + return (0); } - if (is_leadbyte(ch) == 0) + if (!is_leadbyte(ch)) goto ilseq; psenc->ch[psenc->chlen++] = ch; break; case 1: ch = psenc->ch[0] & 0xFF; - if (is_leadbyte(ch) == 0) - return EINVAL; + if (!is_leadbyte(ch)) + return (EINVAL); break; case 2: case 3: ch = psenc->ch[0] & 0xFF; - if (is_hanyu1(ch) != 0) { + if (is_hanyu1(ch)) { ch = psenc->ch[1] & 0xFF; - if (is_hanyu2(ch) != 0) { + if (is_hanyu2(ch)) { wc |= (wchar_t)HANYUBIT; break; } } /*FALLTHROUGH*/ default: - return EINVAL; + return (EINVAL); } switch (psenc->chlen) { case 1: - if (is_hanyu1(ch) != 0) { + if (is_hanyu1(ch)) { if (n-- < 1) goto restart; ch = *s0++ & 0xFF; - if (is_hanyu2(ch) == 0) + if (!is_hanyu2(ch)) goto ilseq; psenc->ch[psenc->chlen++] = ch; wc |= (wchar_t)HANYUBIT; if (n-- < 1) goto restart; ch = *s0++ & 0xFF; - if (is_leadbyte(ch) == 0) + if (!is_leadbyte(ch)) goto ilseq; psenc->ch[psenc->chlen++] = ch; } @@ -258,20 +235,20 @@ _citrus_DECHanyu_mbrtowc_priv(_DECHanyuEncodingInfo * __restrict ei, if (n-- < 1) goto restart; ch = *s0++ & 0xFF; - if (is_leadbyte(ch) == 0) + if (!is_leadbyte(ch)) goto ilseq; psenc->ch[psenc->chlen++] = ch; break; case 3: ch = psenc->ch[2] & 0xFF; - if (is_leadbyte(ch) == 0) - return EINVAL; + if (!is_leadbyte(ch)) + return (EINVAL); } if (n-- < 1) goto restart; wc |= (wchar_t)(ch << 8); ch = *s0++ & 0xFF; - if (is_trailbyte(ch) == 0) + if (!is_trailbyte(ch)) goto ilseq; wc |= (wchar_t)ch; if (pwc != NULL) @@ -280,40 +257,35 @@ _citrus_DECHanyu_mbrtowc_priv(_DECHanyuEncodingInfo * __restrict ei, *s = s0; psenc->chlen = 0; - return 0; + return (0); restart: *nresult = (size_t)-2; *s = s0; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } static int /*ARGSUSED*/ -_citrus_DECHanyu_wcrtomb_priv(_DECHanyuEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _DECHanyuState * __restrict psenc, size_t * __restrict nresult) +_citrus_DECHanyu_wcrtomb_priv(_DECHanyuEncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, wchar_t wc, + _DECHanyuState * __restrict psenc, size_t * __restrict nresult) { int ch; - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); /* XXX: assume wchar_t as int */ if ((uint32_t)wc <= 0x7F) { ch = wc & 0xFF; } else { if ((uint32_t)wc > 0xFFFF) { - if ((wc & ~0xFFFF) != HANYUBIT) + if ((wc & ~0xFFFF) != (wchar_t)HANYUBIT) goto ilseq; psenc->ch[psenc->chlen++] = (wc >> 24) & 0xFF; psenc->ch[psenc->chlen++] = (wc >> 16) & 0xFF; @@ -324,111 +296,92 @@ _citrus_DECHanyu_wcrtomb_priv(_DECHanyuEncodingInfo * __restrict ei, goto ilseq; psenc->ch[psenc->chlen++] = ch; ch = wc & 0xFF; - if (is_trailbyte(ch) == 0) + if (!is_trailbyte(ch)) goto ilseq; } psenc->ch[psenc->chlen++] = ch; if (n < psenc->chlen) { *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } memcpy(s, psenc->ch, psenc->chlen); *nresult = psenc->chlen; psenc->chlen = 0; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } static __inline int /*ARGSUSED*/ -_citrus_DECHanyu_stdenc_wctocs(_DECHanyuEncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +_citrus_DECHanyu_stdenc_wctocs(_DECHanyuEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - int plane; wchar_t mask; - - /* ei may be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); + int plane; plane = 0; mask = 0x7F; /* XXX: assume wchar_t as int */ if ((uint32_t)wc > 0x7F) { if ((uint32_t)wc > 0xFFFF) { - if ((wc & ~0xFFFF) != HANYUBIT) - return EILSEQ; + if ((wc & ~0xFFFF) != (wchar_t)HANYUBIT) + return (EILSEQ); plane += 2; } - if (is_leadbyte((wc >> 8) & 0xFF) == 0 || - is_trailbyte(wc & 0xFF) == 0) - return EILSEQ; + if (!is_leadbyte((wc >> 8) & 0xFF) || + !is_trailbyte(wc & 0xFF)) + return (EILSEQ); plane += (wc & 0x80) ? 1 : 2; mask |= 0x7F00; } *csid = plane; *idx = (_index_t)(wc & mask); - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_DECHanyu_stdenc_cstowc(_DECHanyuEncodingInfo * __restrict ei, - wchar_t * __restrict wc, _csid_t csid, _index_t idx) +_citrus_DECHanyu_stdenc_cstowc(_DECHanyuEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - /* ei may be unused */ - _DIAGASSERT(wc != NULL); if (csid == 0) { if (idx > 0x7F) - return EILSEQ; + return (EILSEQ); } else if (csid <= 4) { - if (is_94charset(idx >> 8) == 0) - return EILSEQ; - if (is_94charset(idx & 0xFF) == 0) - return EILSEQ; + if (!is_94charset(idx >> 8)) + return (EILSEQ); + if (!is_94charset(idx & 0xFF)) + return (EILSEQ); if (csid % 2) idx |= 0x80; idx |= 0x8000; if (csid > 2) idx |= HANYUBIT; } else - return EILSEQ; + return (EILSEQ); *wc = (wchar_t)idx; - return 0; + return (0); } static __inline int /*ARGSUSED*/ _citrus_DECHanyu_stdenc_get_state_desc_generic( - _DECHanyuEncodingInfo * __restrict ei, - _DECHanyuState * __restrict psenc, int * __restrict rstate) + _DECHanyuEncodingInfo * __restrict ei __unused, + _DECHanyuState * __restrict psenc, int * __restrict rstate) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : _STDENC_SDGEN_INCOMPLETE_CHAR; - return 0; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(DECHanyu); -_CITRUS_CTYPE_DEF_OPS(DECHanyu); - -#include "citrus_ctype_template.h" - - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_dechanyu.h b/lib/i18n_module/DECHanyu/citrus_dechanyu.h similarity index 91% rename from lib/libc/citrus/modules/citrus_dechanyu.h rename to lib/i18n_module/DECHanyu/citrus_dechanyu.h index 156ff17e48..a9bd12afab 100644 --- a/lib/libc/citrus/modules/citrus_dechanyu.h +++ b/lib/i18n_module/DECHanyu/citrus_dechanyu.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/DECHanyu/citrus_dechanyu.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_dechanyu.h,v 1.1 2007/04/01 18:52:32 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_dechanyu.h,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_DECHANYU_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(DECHanyu); _CITRUS_STDENC_GETOPS_FUNC(DECHanyu); __END_DECLS diff --git a/lib/i18n_module/EUC/Makefile b/lib/i18n_module/EUC/Makefile index ee8cc7c2c0..e009711942 100644 --- a/lib/i18n_module/EUC/Makefile +++ b/lib/i18n_module/EUC/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/EUC/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/EUC/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= EUC +SRCS+= citrus_euc.c +CFLAGS+= --param max-inline-insns-single=32 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_euc.c b/lib/i18n_module/EUC/citrus_euc.c similarity index 75% rename from lib/libc/citrus/modules/citrus_euc.c rename to lib/i18n_module/EUC/citrus_euc.c index 32f9e10bcd..b1c064f548 100644 --- a/lib/libc/citrus/modules/citrus_euc.c +++ b/lib/i18n_module/EUC/citrus_euc.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_euc.c,v 1.11 2006/03/19 01:25:44 christos Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/EUC/citrus_euc.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_euc.c,v 1.14 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -58,11 +59,12 @@ * SUCH DAMAGE. */ +#include #include + #include #include #include -#include #include #include #include @@ -70,9 +72,9 @@ #include #include "citrus_namespace.h" +#include "citrus_bcs.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_euc.h" @@ -82,32 +84,17 @@ */ typedef struct { - char ch[3]; - int chlen; + int chlen; + char ch[3]; } _EUCState; typedef struct { - unsigned count[4]; - wchar_t bits[4]; - wchar_t mask; - unsigned mb_cur_max; + wchar_t bits[4]; + wchar_t mask; + unsigned count[4]; + unsigned mb_cur_max; } _EUCEncodingInfo; -typedef struct { - _EUCEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _EUCState s_mblen; - _EUCState s_mbrlen; - _EUCState s_mbrtowc; - _EUCState s_mbtowc; - _EUCState s_mbsrtowcs; - _EUCState s_wcrtomb; - _EUCState s_wcsrtombs; - _EUCState s_wctomb; - } states; -} _EUCCTypeInfo; - #define _SS2 0x008e #define _SS3 0x008f @@ -116,7 +103,6 @@ typedef struct { #define _FUNCNAME(m) _citrus_EUC_##m #define _ENCODING_INFO _EUCEncodingInfo -#define _CTYPE_INFO _EUCCTypeInfo #define _ENCODING_STATE _EUCState #define _ENCODING_MB_CUR_MAX(_ei_) (_ei_)->mb_cur_max #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -126,89 +112,89 @@ typedef struct { static __inline int _citrus_EUC_cs(unsigned int c) { + c &= 0xff; return ((c & 0x80) ? c == _SS3 ? 3 : c == _SS2 ? 2 : 1 : 0); } static __inline int -_citrus_EUC_parse_variable(_EUCEncodingInfo *ei, - const void *var, size_t lenvar) +_citrus_EUC_parse_variable(_EUCEncodingInfo *ei, const void *var, + size_t lenvar __unused) { - const char *v, *e; + char *e; + const char *v; int x; /* parse variable string */ if (!var) return (EFTYPE); - v = (const char *) var; + v = (const char *)var; while (*v == ' ' || *v == '\t') ++v; ei->mb_cur_max = 1; for (x = 0; x < 4; ++x) { - ei->count[x] = (int) strtol(v, (char **)&e, 0); - if (v == e || !(v = e) || ei->count[x]<1 || ei->count[x]>4) { + ei->count[x] = (int)_bcs_strtol(v, (char **)&e, 0); + if (v == e || !(v = e) || ei->count[x] < 1 || ei->count[x] > 4) { return (EFTYPE); } if (ei->mb_cur_max < ei->count[x]) ei->mb_cur_max = ei->count[x]; while (*v == ' ' || *v == '\t') ++v; - ei->bits[x] = (int) strtol(v, (char **)&e, 0); + ei->bits[x] = (int)_bcs_strtol(v, (char **)&e, 0); if (v == e || !(v = e)) { return (EFTYPE); } while (*v == ' ' || *v == '\t') ++v; } - ei->mask = (int)strtol(v, (char **)&e, 0); + ei->mask = (int)_bcs_strtol(v, (char **)&e, 0); if (v == e || !(v = e)) { return (EFTYPE); } - return 0; + return (0); } static __inline void /*ARGSUSED*/ -_citrus_EUC_init_state(_EUCEncodingInfo *ei, _EUCState *s) +_citrus_EUC_init_state(_EUCEncodingInfo *ei __unused, _EUCState *s) { + memset(s, 0, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_EUC_pack_state(_EUCEncodingInfo *ei, void *pspriv, const _EUCState *s) +_citrus_EUC_pack_state(_EUCEncodingInfo *ei __unused, void *pspriv, + const _EUCState *s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_EUC_unpack_state(_EUCEncodingInfo *ei, _EUCState *s, - const void *pspriv) +_citrus_EUC_unpack_state(_EUCEncodingInfo *ei __unused, _EUCState *s, + const void *pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static int _citrus_EUC_mbrtowc_priv(_EUCEncodingInfo *ei, wchar_t *pwc, const char **s, - size_t n, _EUCState *psenc, size_t *nresult) + size_t n, _EUCState *psenc, size_t *nresult) { wchar_t wchar; - int c, cs, len; - int chlenbak; + int c, chlenbak, cs, len; const char *s0, *s1 = NULL; - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s != NULL); - s0 = *s; if (s0 == NULL) { @@ -271,14 +257,8 @@ _citrus_EUC_mbrtowc_priv(_EUCEncodingInfo *ei, wchar_t *pwc, const char **s, psenc->chlen = 0; if (pwc) *pwc = wchar; - - if (!wchar) { - *nresult = 0; - } else { - *nresult = (size_t)(c - chlenbak); - } - - return 0; + *nresult = wchar ? (size_t)(c - chlenbak) : 0; + return (0); encoding_error: psenc->chlen = 0; @@ -293,30 +273,25 @@ restart: static int _citrus_EUC_wcrtomb_priv(_EUCEncodingInfo *ei, char *s, size_t n, wchar_t wc, - _EUCState *psenc, size_t *nresult) + _EUCState *psenc __unused, size_t *nresult) { wchar_t m, nm; - int cs, i, ret; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); + unsigned int cs; + int ret; + short i; m = wc & ei->mask; nm = wc & ~m; - for (cs = 0; - cs < sizeof(ei->count)/sizeof(ei->count[0]); - cs++) { + for (cs = 0; cs < sizeof(ei->count) / sizeof(ei->count[0]); cs++) if (m == ei->bits[cs]) break; - } /* fallback case - not sure if it is necessary */ - if (cs == sizeof(ei->count)/sizeof(ei->count[0])) + if (cs == sizeof(ei->count) / sizeof(ei->count[0])) cs = 1; i = ei->count[cs]; - if (n < i) { + if (n < (unsigned)i) { ret = E2BIG; goto err; } @@ -336,23 +311,20 @@ _citrus_EUC_wcrtomb_priv(_EUCEncodingInfo *ei, char *s, size_t n, wchar_t wc, *s++ = ((nm >> (i << 3)) & 0xff) | m; *nresult = (size_t)ei->count[cs]; - return 0; + return (0); err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ _citrus_EUC_stdenc_wctocs(_EUCEncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { wchar_t m, nm; - _DIAGASSERT(ei != NULL && csid != NULL && idx != NULL); - m = wc & ei->mask; nm = wc & ~m; @@ -365,12 +337,9 @@ _citrus_EUC_stdenc_wctocs(_EUCEncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ _citrus_EUC_stdenc_cstowc(_EUCEncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(ei != NULL && wc != NULL); - if ((csid & ~ei->mask) != 0 || (idx & ei->mask) != 0) return (EINVAL); @@ -381,44 +350,30 @@ _citrus_EUC_stdenc_cstowc(_EUCEncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_EUC_stdenc_get_state_desc_generic(_EUCEncodingInfo * __restrict ei, - _EUCState * __restrict psenc, - int * __restrict rstate) +_citrus_EUC_stdenc_get_state_desc_generic(_EUCEncodingInfo * __restrict ei __unused, + _EUCState * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static int /*ARGSUSED*/ _citrus_EUC_encoding_module_init(_EUCEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { - _DIAGASSERT(ei != NULL); - return (_citrus_EUC_parse_variable(ei, var, lenvar)); } static void /*ARGSUSED*/ -_citrus_EUC_encoding_module_uninit(_EUCEncodingInfo * __restrict ei) +_citrus_EUC_encoding_module_uninit(_EUCEncodingInfo * __restrict ei __unused) { -} - -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(EUC); -_CITRUS_CTYPE_DEF_OPS(EUC); -#include "citrus_ctype_template.h" +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_euc.h b/lib/i18n_module/EUC/citrus_euc.h similarity index 86% rename from lib/libc/citrus/modules/citrus_euc.h rename to lib/i18n_module/EUC/citrus_euc.h index 2476f4295d..b355069444 100644 --- a/lib/libc/citrus/modules/citrus_euc.h +++ b/lib/i18n_module/EUC/citrus_euc.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_euc.h,v 1.2 2003/06/25 09:51:42 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_euc.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/EUC/citrus_euc.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_euc.h,v 1.2 2003/06/25 09:51:42 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_EUC_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(EUC); _CITRUS_STDENC_GETOPS_FUNC(EUC); __END_DECLS diff --git a/lib/i18n_module/EUCTW/Makefile b/lib/i18n_module/EUCTW/Makefile index ca83c043c0..7e3ea5d086 100644 --- a/lib/i18n_module/EUCTW/Makefile +++ b/lib/i18n_module/EUCTW/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/EUCTW/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/EUCTW/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= EUCTW +SRCS+= citrus_euctw.c +CFLAGS+= --param max-inline-insns-single=32 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_euctw.c b/lib/i18n_module/EUCTW/citrus_euctw.c similarity index 72% rename from lib/libc/citrus/modules/citrus_euctw.c rename to lib/i18n_module/EUCTW/citrus_euctw.c index e5d768be74..3b4c740cf2 100644 --- a/lib/libc/citrus/modules/citrus_euctw.c +++ b/lib/i18n_module/EUCTW/citrus_euctw.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_euctw.c,v 1.10 2005/10/29 18:02:04 tshiozak Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/EUCTW/citrus_euctw.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_euctw.c,v 1.11 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -54,11 +55,12 @@ * $Citrus: xpg4dl/FreeBSD/lib/libc/locale/euctw.c,v 1.13 2001/06/21 01:51:44 yamt Exp $ */ +#include #include + #include #include #include -#include #include #include #include @@ -68,7 +70,6 @@ #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_euctw.h" @@ -78,27 +79,13 @@ */ typedef struct { - char ch[4]; - int chlen; + int chlen; + char ch[4]; } _EUCTWState; typedef struct { - int dummy; + int dummy; } _EUCTWEncodingInfo; -typedef struct { - _EUCTWEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _EUCTWState s_mblen; - _EUCTWState s_mbrlen; - _EUCTWState s_mbrtowc; - _EUCTWState s_mbtowc; - _EUCTWState s_mbsrtowcs; - _EUCTWState s_wcrtomb; - _EUCTWState s_wcsrtombs; - _EUCTWState s_wctomb; - } states; -} _EUCTWCTypeInfo; #define _SS2 0x008e #define _SS3 0x008f @@ -108,15 +95,15 @@ typedef struct { #define _FUNCNAME(m) _citrus_EUCTW_##m #define _ENCODING_INFO _EUCTWEncodingInfo -#define _CTYPE_INFO _EUCTWCTypeInfo #define _ENCODING_STATE _EUCTWState #define _ENCODING_MB_CUR_MAX(_ei_) 4 #define _ENCODING_IS_STATE_DEPENDENT 0 #define _STATE_NEEDS_EXPLICIT_INIT(_ps_) 0 static __inline int -_citrus_EUCTW_cs(u_int c) +_citrus_EUCTW_cs(unsigned int c) { + c &= 0xff; return ((c & 0x80) ? (c == _SS2 ? 2 : 1) : 0); @@ -125,81 +112,74 @@ _citrus_EUCTW_cs(u_int c) static __inline int _citrus_EUCTW_count(int cs) { + switch (cs) { case 0: - return 1; + /*FALLTHROUGH*/ case 1: - return 2; + /*FALLTHROUGH*/ case 2: - return 4; + return (2^cs); case 3: abort(); /*NOTREACHED*/ } - return 0; + return (0); } static __inline void /*ARGSUSED*/ -_citrus_EUCTW_init_state(_EUCTWEncodingInfo * __restrict ei, - _EUCTWState * __restrict s) +_citrus_EUCTW_init_state(_EUCTWEncodingInfo * __restrict ei __unused, + _EUCTWState * __restrict s) { + memset(s, 0, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_EUCTW_pack_state(_EUCTWEncodingInfo * __restrict ei, - void * __restrict pspriv, - const _EUCTWState * __restrict s) +_citrus_EUCTW_pack_state(_EUCTWEncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _EUCTWState * __restrict s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_EUCTW_unpack_state(_EUCTWEncodingInfo * __restrict ei, - _EUCTWState * __restrict s, - const void * __restrict pspriv) +_citrus_EUCTW_unpack_state(_EUCTWEncodingInfo * __restrict ei __unused, + _EUCTWState * __restrict s, const void * __restrict pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static int /*ARGSUSED*/ _citrus_EUCTW_encoding_module_init(_EUCTWEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var __unused, size_t lenvar __unused) { - _DIAGASSERT(ei != NULL); - memset((void *)ei, 0, sizeof(*ei)); - return 0; + return (0); } static void /*ARGSUSED*/ -_citrus_EUCTW_encoding_module_uninit(_EUCTWEncodingInfo *ei) +_citrus_EUCTW_encoding_module_uninit(_EUCTWEncodingInfo *ei __unused) { + } static int _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, - const char ** __restrict s, - size_t n, _EUCTWState * __restrict psenc, - size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, + size_t n, _EUCTWState * __restrict psenc, size_t * __restrict nresult) { - wchar_t wchar; - int c, cs; - int chlenbak; const char *s0; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s != NULL); + wchar_t wchar; + int c, chlenbak, cs; s0 = *s; @@ -253,7 +233,8 @@ _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodingInfo * __restrict ei, wchar |= 'G' << 24; break; case 2: - if ((u_char)psenc->ch[1] < 0xa1 || 0xa7 < (u_char)psenc->ch[1]) + if ((unsigned char)psenc->ch[1] < 0xa1 || + 0xa7 < (unsigned char)psenc->ch[1]) goto ilseq; if (!(psenc->ch[2] & 0x80) || !(psenc->ch[3] & 0x80)) goto ilseq; @@ -269,12 +250,7 @@ _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodingInfo * __restrict ei, if (pwc) *pwc = wchar; - - if (!wchar) - *nresult = 0; - else - *nresult = c - chlenbak; - + *nresult = wchar ? c - chlenbak : 0; return (0); ilseq: @@ -289,19 +265,15 @@ restart: } static int -_citrus_EUCTW_wcrtomb_priv(_EUCTWEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _EUCTWState * __restrict psenc, - size_t * __restrict nresult) +_citrus_EUCTW_wcrtomb_priv(_EUCTWEncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, wchar_t wc, + _EUCTWState * __restrict psenc __unused, size_t * __restrict nresult) { - wchar_t cs = wc & 0x7f000080; - wchar_t v; - int i, len, clen, ret; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); + wchar_t cs, v; + int clen, i, ret; + size_t len; + cs = wc & 0x7f000080; clen = 1; if (wc & 0x00007f00) clen = 2; @@ -346,22 +318,19 @@ _citrus_EUCTW_wcrtomb_priv(_EUCTWEncodingInfo * __restrict ei, *s++ = (v >> (i << 3)) & 0xff; *nresult = len; - return 0; + return (0); err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ -_citrus_EUCTW_stdenc_wctocs(_EUCTWEncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) +_citrus_EUCTW_stdenc_wctocs(_EUCTWEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - _DIAGASSERT(ei != NULL && csid != NULL && idx != NULL); - *csid = (_csid_t)(wc >> 24) & 0xFF; *idx = (_index_t)(wc & 0x7F7F); @@ -370,21 +339,18 @@ _citrus_EUCTW_stdenc_wctocs(_EUCTWEncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_EUCTW_stdenc_cstowc(_EUCTWEncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) +_citrus_EUCTW_stdenc_cstowc(_EUCTWEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(ei != NULL && wc != NULL); - - if (csid==0) { + if (csid == 0) { if ((idx & ~0x7F) != 0) return (EINVAL); *wc = (wchar_t)idx; } else { if (csid < 'G' || csid > 'M' || (idx & ~0x7F7F) != 0) return (EINVAL); - *wc = (wchar_t)idx | ((wchar_t)csid<<24); + *wc = (wchar_t)idx | ((wchar_t)csid << 24); } return (0); @@ -392,28 +358,15 @@ _citrus_EUCTW_stdenc_cstowc(_EUCTWEncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_EUCTW_stdenc_get_state_desc_generic(_EUCTWEncodingInfo * __restrict ei, - _EUCTWState * __restrict psenc, - int * __restrict rstate) +_citrus_EUCTW_stdenc_get_state_desc_generic(_EUCTWEncodingInfo * __restrict ei __unused, + _EUCTWState * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(EUCTW); -_CITRUS_CTYPE_DEF_OPS(EUCTW); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_euctw.h b/lib/i18n_module/EUCTW/citrus_euctw.h similarity index 86% rename from lib/libc/citrus/modules/citrus_euctw.h rename to lib/i18n_module/EUCTW/citrus_euctw.h index 0772c9e548..1476419825 100644 --- a/lib/libc/citrus/modules/citrus_euctw.h +++ b/lib/i18n_module/EUCTW/citrus_euctw.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_euctw.h,v 1.2 2003/06/25 09:51:42 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_euctw.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/EUCTW/citrus_euctw.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_euctw.h,v 1.2 2003/06/25 09:51:42 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_EUCTW_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(EUCTW); _CITRUS_STDENC_GETOPS_FUNC(EUCTW); __END_DECLS diff --git a/lib/i18n_module/GBK2K/Makefile b/lib/i18n_module/GBK2K/Makefile index 7a7f4ca5e9..4dfc5611e3 100644 --- a/lib/i18n_module/GBK2K/Makefile +++ b/lib/i18n_module/GBK2K/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/GBK2K/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/GBK2K/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= GBK2K +SRCS+= citrus_gbk2k.c +CFLAGS+= --param max-inline-insns-single=16 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_gbk2k.c b/lib/i18n_module/GBK2K/citrus_gbk2k.c similarity index 66% rename from lib/libc/citrus/modules/citrus_gbk2k.c rename to lib/i18n_module/GBK2K/citrus_gbk2k.c index db9f827746..7ec023a98a 100644 --- a/lib/libc/citrus/modules/citrus_gbk2k.c +++ b/lib/i18n_module/GBK2K/citrus_gbk2k.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_gbk2k.c,v 1.6 2006/02/15 19:50:27 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_gbk2k.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_gbk2k.c,v 1.7 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,11 +27,13 @@ * SUCH DAMAGE. */ +#include #include + #include #include #include -#include +#include #include #include #include @@ -42,7 +44,6 @@ #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_gbk2k.h" @@ -52,35 +53,19 @@ */ typedef struct _GBK2KState { - char ch[4]; - int chlen; + int chlen; + char ch[4]; } _GBK2KState; typedef struct { - int mb_cur_max; + int mb_cur_max; } _GBK2KEncodingInfo; -typedef struct { - _GBK2KEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _GBK2KState s_mblen; - _GBK2KState s_mbrlen; - _GBK2KState s_mbrtowc; - _GBK2KState s_mbtowc; - _GBK2KState s_mbsrtowcs; - _GBK2KState s_wcrtomb; - _GBK2KState s_wcsrtombs; - _GBK2KState s_wctomb; - } states; -} _GBK2KCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_GBK2K_##m #define _ENCODING_INFO _GBK2KEncodingInfo -#define _CTYPE_INFO _GBK2KCTypeInfo #define _ENCODING_STATE _GBK2KState #define _ENCODING_MB_CUR_MAX(_ei_) (_ei_)->mb_cur_max #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -88,54 +73,58 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_GBK2K_init_state(_GBK2KEncodingInfo * __restrict ei, - _GBK2KState * __restrict s) +_citrus_GBK2K_init_state(_GBK2KEncodingInfo * __restrict ei __unused, + _GBK2KState * __restrict s) { + memset(s, 0, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_GBK2K_pack_state(_GBK2KEncodingInfo * __restrict ei, - void * __restrict pspriv, - const _GBK2KState * __restrict s) +_citrus_GBK2K_pack_state(_GBK2KEncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _GBK2KState * __restrict s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_GBK2K_unpack_state(_GBK2KEncodingInfo * __restrict ei, - _GBK2KState * __restrict s, - const void * __restrict pspriv) +_citrus_GBK2K_unpack_state(_GBK2KEncodingInfo * __restrict ei __unused, + _GBK2KState * __restrict s, const void * __restrict pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } -static __inline int +static __inline bool _mb_singlebyte(int c) { - c &= 0xff; - return (c <= 0x7f); + + return ((c & 0xff) <= 0x7f); } -static __inline int +static __inline bool _mb_leadbyte(int c) { + c &= 0xff; return (0x81 <= c && c <= 0xfe); } -static __inline int +static __inline bool _mb_trailbyte(int c) { + c &= 0xff; return ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfe)); } -static __inline int +static __inline bool _mb_surrogate(int c) { + c &= 0xff; return (0x30 <= c && c <= 0x39); } @@ -143,9 +132,9 @@ _mb_surrogate(int c) static __inline int _mb_count(wchar_t v) { - u_int32_t c; + uint32_t c; - c = (u_int32_t)v; /* XXX */ + c = (uint32_t)v; /* XXX */ if (!(c & 0xffffff00)) return (1); if (!(c & 0xffff0000)) @@ -158,19 +147,12 @@ _mb_count(wchar_t v) static int _citrus_GBK2K_mbrtowc_priv(_GBK2KEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, - const char ** __restrict s, size_t n, - _GBK2KState * __restrict psenc, - size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _GBK2KState * __restrict psenc, size_t * __restrict nresult) { - int chlenbak, len; const char *s0, *s1; wchar_t wc; - - _DIAGASSERT(ei != NULL); - /* pwc may be NULL */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); + int chlenbak, len; s0 = *s; @@ -243,7 +225,7 @@ convert: if (pwc != NULL) *pwc = wc; *s = s0; - *nresult = (wc == 0) ? 0 : psenc->chlen - chlenbak; + *nresult = (wc == 0) ? 0 : psenc->chlen - chlenbak; /* _citrus_GBK2K_init_state(ei, psenc); */ psenc->chlen = 0; @@ -265,15 +247,11 @@ ilseq: static int _citrus_GBK2K_wcrtomb_priv(_GBK2KEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _GBK2KState * __restrict psenc, - size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wc, _GBK2KState * __restrict psenc, + size_t * __restrict nresult) { - int len, ret; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); + size_t len; + int ret; if (psenc->chlen != 0) { ret = EINVAL; @@ -295,7 +273,7 @@ _citrus_GBK2K_wcrtomb_priv(_GBK2KEncodingInfo * __restrict ei, break; case 2: if (!_mb_leadbyte (_PUSH_PSENC(wc >> 8)) || - !_mb_trailbyte (_PUSH_PSENC(wc ))) { + !_mb_trailbyte (_PUSH_PSENC(wc))) { ret = EILSEQ; goto err; } @@ -305,15 +283,13 @@ _citrus_GBK2K_wcrtomb_priv(_GBK2KEncodingInfo * __restrict ei, !_mb_leadbyte (_PUSH_PSENC(wc >> 24)) || !_mb_surrogate (_PUSH_PSENC(wc >> 16)) || !_mb_leadbyte (_PUSH_PSENC(wc >> 8)) || - !_mb_surrogate (_PUSH_PSENC(wc ))) { + !_mb_surrogate (_PUSH_PSENC(wc))) { ret = EILSEQ; goto err; } break; } - _DIAGASSERT(len == psenc->chlen); - memcpy(s, psenc->ch, psenc->chlen); *nresult = psenc->chlen; /* _citrus_GBK2K_init_state(ei, psenc); */ @@ -323,31 +299,28 @@ _citrus_GBK2K_wcrtomb_priv(_GBK2KEncodingInfo * __restrict ei, err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ -_citrus_GBK2K_stdenc_wctocs(_GBK2KEncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) +_citrus_GBK2K_stdenc_wctocs(_GBK2KEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - u_int8_t ch, cl; + uint8_t ch, cl; - _DIAGASSERT(csid != NULL && idx != NULL); - - if ((u_int32_t)wc<0x80) { + if ((uint32_t)wc < 0x80) { /* ISO646 */ *csid = 0; *idx = (_index_t)wc; - } else if ((u_int32_t)wc>=0x10000) { + } else if ((uint32_t)wc >= 0x10000) { /* GBKUCS : XXX */ *csid = 3; *idx = (_index_t)wc; } else { - ch = (u_int8_t)(wc >> 8); - cl = (u_int8_t)wc; - if (ch>=0xA1 && cl>=0xA1) { + ch = (uint8_t)(wc >> 8); + cl = (uint8_t)wc; + if (ch >= 0xA1 && cl >= 0xA1) { /* EUC G1 */ *csid = 1; *idx = (_index_t)wc & 0x7F7FU; @@ -358,18 +331,15 @@ _citrus_GBK2K_stdenc_wctocs(_GBK2KEncodingInfo * __restrict ei, } } - return 0; + return (0); } static __inline int /*ARGSUSED*/ _citrus_GBK2K_stdenc_cstowc(_GBK2KEncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(wc != NULL); - switch (csid) { case 0: /* ISO646 */ @@ -386,53 +356,38 @@ _citrus_GBK2K_stdenc_cstowc(_GBK2KEncodingInfo * __restrict ei, case 3: /* GBKUCS : XXX */ if (ei->mb_cur_max != 4) - return EINVAL; + return (EINVAL); *wc = (wchar_t)idx; break; default: - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_GBK2K_stdenc_get_state_desc_generic(_GBK2KEncodingInfo * __restrict ei, - _GBK2KState * __restrict psenc, - int * __restrict rstate) +_citrus_GBK2K_stdenc_get_state_desc_generic(_GBK2KEncodingInfo * __restrict ei __unused, + _GBK2KState * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static int /*ARGSUSED*/ _citrus_GBK2K_encoding_module_init(_GBK2KEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { const char *p; - _DIAGASSERT(ei != NULL); - p = var; -#define MATCH(x, act) \ -do { \ - if (lenvar >= (sizeof(#x)-1) && \ - _bcs_strncasecmp(p, #x, sizeof(#x)-1) == 0) { \ - act; \ - lenvar -= sizeof(#x)-1; \ - p += sizeof(#x)-1; \ - } \ -} while (/*CONSTCOND*/0) memset((void *)ei, 0, sizeof(*ei)); ei->mb_cur_max = 4; - while (lenvar>0) { + while (lenvar > 0) { switch (_bcs_tolower(*p)) { case '2': MATCH("2byte", ei->mb_cur_max = 2); @@ -447,19 +402,10 @@ do { \ static void /*ARGSUSED*/ -_citrus_GBK2K_encoding_module_uninit(_GBK2KEncodingInfo *ei) +_citrus_GBK2K_encoding_module_uninit(_GBK2KEncodingInfo *ei __unused) { -} - - -/* ---------------------------------------------------------------------- - * public interface for ctype - */ -_CITRUS_CTYPE_DECLS(GBK2K); -_CITRUS_CTYPE_DEF_OPS(GBK2K); - -#include "citrus_ctype_template.h" +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_gbk2k.h b/lib/i18n_module/GBK2K/citrus_gbk2k.h similarity index 86% rename from lib/libc/citrus/modules/citrus_gbk2k.h rename to lib/i18n_module/GBK2K/citrus_gbk2k.h index 5cdd437090..965d81a45a 100644 --- a/lib/libc/citrus/modules/citrus_gbk2k.h +++ b/lib/i18n_module/GBK2K/citrus_gbk2k.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_gbk2k.h,v 1.2 2003/06/25 09:51:43 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_gbk2k.h,v 1.1 2005/03/11 23:33:53 joerg Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/GBK2K/citrus_gbk2k.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_gbk2k.h,v 1.2 2003/06/25 09:51:43 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_GBK2K_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(GBK2K); _CITRUS_STDENC_GETOPS_FUNC(GBK2K); __END_DECLS diff --git a/lib/i18n_module/HZ/Makefile b/lib/i18n_module/HZ/Makefile index 5b3c1d36b6..362dd5c757 100644 --- a/lib/i18n_module/HZ/Makefile +++ b/lib/i18n_module/HZ/Makefile @@ -1,6 +1,6 @@ -# $DragonFly: src/lib/i18n_module/HZ/Makefile,v 1.1 2008/04/10 10:21:00 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/HZ/Makefile 219019 2011-02-25 00:04:39Z gabor $ -SRCPRE=citrus_ -SRCS+= citrus_hz.c citrus_prop.c +LIB= HZ +SRCS+= citrus_hz.c .include diff --git a/lib/libc/citrus/modules/citrus_hz.c b/lib/i18n_module/HZ/citrus_hz.c similarity index 75% rename from lib/libc/citrus/modules/citrus_hz.c rename to lib/i18n_module/HZ/citrus_hz.c index 8230c91b11..9c3098abd9 100644 --- a/lib/libc/citrus/modules/citrus_hz.c +++ b/lib/i18n_module/HZ/citrus_hz.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_hz.c,v 1.1 2006/11/22 23:38:27 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_hz.c,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/HZ/citrus_hz.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_hz.c,v 1.2 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2004, 2006 Citrus Project, @@ -28,23 +28,23 @@ * */ +#include #include #include + #include #include -#include +#include +#include #include #include -#include -#include -#include +#include #include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_hz.h" @@ -65,7 +65,9 @@ typedef enum { } charset_t; typedef struct { - int start, end, width; + int end; + int start; + int width; } range_t; static const range_t ranges[] = { @@ -80,18 +82,19 @@ static const range_t ranges[] = { typedef struct escape_t escape_t; typedef struct { - charset_t charset; - size_t length; + charset_t charset; + escape_t *escape; + ssize_t length; #define ROWCOL_MAX 3 - escape_t *escape; } graphic_t; typedef TAILQ_HEAD(escape_list, escape_t) escape_list; struct escape_t { - TAILQ_ENTRY(escape_t) entry; - int ch; - graphic_t *left, *right; - escape_list *set; + TAILQ_ENTRY(escape_t) entry; + escape_list *set; + graphic_t *left; + graphic_t *right; + int ch; }; #define GL(escape) ((escape)->left) @@ -105,19 +108,19 @@ find_escape(escape_list *set, int ch) { escape_t *escape; - _DIAGASSERT(set != NULL); - TAILQ_FOREACH(escape, set, entry) { if (ESC(escape) == ch) break; } - return escape; + return (escape); } typedef struct { - escape_list e0, e1; - graphic_t *ascii, *gb2312; + escape_list e0; + escape_list e1; + graphic_t *ascii; + graphic_t *gb2312; } _HZEncodingInfo; #define E0SET(ei) (&(ei)->e0) @@ -126,32 +129,16 @@ typedef struct { #define INIT1(ei) (TAILQ_FIRST(E1SET(ei))) typedef struct { - int chlen; - char ch[ROWCOL_MAX]; - escape_t *inuse; + escape_t *inuse; + int chlen; + char ch[ROWCOL_MAX]; } _HZState; -typedef struct { - _HZEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _HZState s_mblen; - _HZState s_mbrlen; - _HZState s_mbrtowc; - _HZState s_mbtowc; - _HZState s_mbsrtowcs; - _HZState s_wcrtomb; - _HZState s_wcsrtombs; - _HZState s_wctomb; - } states; -} _HZCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_HZ_##m #define _ENCODING_INFO _HZEncodingInfo -#define _CTYPE_INFO _HZCTypeInfo #define _ENCODING_STATE _HZState #define _ENCODING_MB_CUR_MAX(_ei_) MB_LEN_MAX #define _ENCODING_IS_STATE_DEPENDENT 1 @@ -159,10 +146,8 @@ typedef struct { static __inline void _citrus_HZ_init_state(_HZEncodingInfo * __restrict ei, - _HZState * __restrict psenc) + _HZState * __restrict psenc) { - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); psenc->chlen = 0; psenc->inuse = INIT0(ei); @@ -170,64 +155,52 @@ _citrus_HZ_init_state(_HZEncodingInfo * __restrict ei, static __inline void /*ARGSUSED*/ -_citrus_HZ_pack_state(_HZEncodingInfo * __restrict ei, - void *__restrict pspriv, const _HZState * __restrict psenc) +_citrus_HZ_pack_state(_HZEncodingInfo * __restrict ei __unused, + void *__restrict pspriv, const _HZState * __restrict psenc) { - /* ei may be unused */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_HZ_unpack_state(_HZEncodingInfo * __restrict ei, - _HZState * __restrict psenc, const void * __restrict pspriv) +_citrus_HZ_unpack_state(_HZEncodingInfo * __restrict ei __unused, + _HZState * __restrict psenc, const void * __restrict pspriv) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } static int _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _HZState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _HZState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; - wchar_t wc; - int bit, head, tail, len, ch; - graphic_t *graphic; escape_t *candidate, *init; + graphic_t *graphic; const range_t *range; - - _DIAGASSERT(ei != NULL); - /* pwc may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + const char *s0; + wchar_t wc; + int bit, ch, head, len, tail; if (*s == NULL) { _citrus_HZ_init_state(ei, psenc); *nresult = 1; - return 0; + return (0); } s0 = *s; if (psenc->chlen < 0 || psenc->inuse == NULL) - return EINVAL; + return (EINVAL); wc = (wchar_t)0; bit = head = tail = 0; graphic = NULL; - for (len = 0; len <= MB_LEN_MAX; /**/) { + for (len = 0; len <= MB_LEN_MAX;) { if (psenc->chlen == tail) { if (n-- < 1) { *s = s0; *nresult = (size_t)-2; - return 0; + return (0); } psenc->ch[psenc->chlen++] = *s0++; ++len; @@ -254,7 +227,7 @@ _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, break; } else if (tail == 2 && psenc->ch[0] == ESCAPE_CHAR) { if (tail < psenc->chlen) - return EINVAL; + return (EINVAL); if (ch == ESCAPE_CHAR) { ++head; } else if (ch == '\n') { @@ -265,7 +238,6 @@ _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, } else { candidate = NULL; init = INIT0(ei); - _DIAGASSERT(init != NULL); if (psenc->inuse == init) { init = INIT1(ei); } else if (INIT(psenc->inuse) == init) { @@ -295,7 +267,6 @@ _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, if (graphic != GL(psenc->inuse)) break; } - _DIAGASSERT(graphic != NULL); range = &ranges[(size_t)graphic->charset]; if (range->start > ch || range->end < ch) break; @@ -309,37 +280,32 @@ _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, } } *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); done: if (tail < psenc->chlen) - return EINVAL; + return (EINVAL); *s = s0; if (pwc != NULL) *pwc = wc; psenc->chlen = 0; *nresult = (wc == 0) ? 0 : len; - return 0; + return (0); } static int _citrus_HZ_wcrtomb_priv(_HZEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _HZState * __restrict psenc, size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wc, + _HZState * __restrict psenc, size_t * __restrict nresult) { - int bit, ch; escape_t *candidate, *init; graphic_t *graphic; - size_t len; const range_t *range; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + size_t len; + int bit, ch; if (psenc->chlen != 0 || psenc->inuse == NULL) - return EINVAL; + return (EINVAL); if (wc & 0x80) { bit = 0x80; wc &= ~0x80; @@ -348,8 +314,7 @@ _citrus_HZ_wcrtomb_priv(_HZEncodingInfo * __restrict ei, } if ((uint32_t)wc <= 0x1F) { candidate = INIT0(ei); - graphic = (bit == 0) - ? candidate->left : candidate->right; + graphic = (bit == 0) ? candidate->left : candidate->right; if (graphic == NULL) goto ilseq; range = &ranges[(size_t)CTRL]; @@ -377,8 +342,7 @@ _citrus_HZ_wcrtomb_priv(_HZEncodingInfo * __restrict ei, goto ilseq; } wc &= ~0xFF000000; - graphic = (bit == 0) - ? candidate->left : candidate->right; + graphic = (bit == 0) ? candidate->left : candidate->right; if (graphic == NULL) goto ilseq; range = &ranges[(size_t)graphic->charset]; @@ -395,20 +359,20 @@ _citrus_HZ_wcrtomb_priv(_HZEncodingInfo * __restrict ei, } if (init != NULL) { if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; psenc->ch[psenc->chlen++] = ESCAPE_CHAR; psenc->ch[psenc->chlen++] = ESC(init); } if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; psenc->ch[psenc->chlen++] = ESCAPE_CHAR; psenc->ch[psenc->chlen++] = ESC(candidate); psenc->inuse = candidate; } if (n < len) - return E2BIG; + return (E2BIG); while (len-- > 0) { ch = (wc >> (len * 8)) & 0xFF; if (range->start > ch || range->end < ch) @@ -419,55 +383,47 @@ _citrus_HZ_wcrtomb_priv(_HZEncodingInfo * __restrict ei, *nresult = psenc->chlen; psenc->chlen = 0; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } static __inline int _citrus_HZ_put_state_reset(_HZEncodingInfo * __restrict ei, - char * __restrict s, size_t n, _HZState * __restrict psenc, - size_t * __restrict nresult) + char * __restrict s, size_t n, _HZState * __restrict psenc, + size_t * __restrict nresult) { escape_t *candidate; - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (psenc->chlen != 0 || psenc->inuse == NULL) - return EINVAL; + return (EINVAL); candidate = INIT0(ei); if (psenc->inuse != candidate) { if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; psenc->ch[psenc->chlen++] = ESCAPE_CHAR; psenc->ch[psenc->chlen++] = ESC(candidate); } if (n < 1) - return E2BIG; + return (E2BIG); if (psenc->chlen > 0) memcpy(s, psenc->ch, psenc->chlen); *nresult = psenc->chlen; _citrus_HZ_init_state(ei, psenc); - return 0; + return (0); } static __inline int _citrus_HZ_stdenc_get_state_desc_generic(_HZEncodingInfo * __restrict ei, - _HZState * __restrict psenc, int * __restrict rstate) + _HZState * __restrict psenc, int * __restrict rstate) { - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); if (psenc->chlen < 0 || psenc->inuse == NULL) - return EINVAL; + return (EINVAL); *rstate = (psenc->chlen == 0) ? ((psenc->inuse == INIT0(ei)) ? _STDENC_SDGEN_INITIAL @@ -476,25 +432,21 @@ _citrus_HZ_stdenc_get_state_desc_generic(_HZEncodingInfo * __restrict ei, ? _STDENC_SDGEN_INCOMPLETE_SHIFT : _STDENC_SDGEN_INCOMPLETE_CHAR); - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_HZ_stdenc_wctocs(_HZEncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +_citrus_HZ_stdenc_wctocs(_HZEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { int bit; - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); - if (wc & 0x80) { bit = 0x80; wc &= ~0x80; - } else { + } else bit = 0x0; - } if ((uint32_t)wc <= 0x7F) { *csid = (_csid_t)bit; *idx = (_index_t)wc; @@ -506,23 +458,21 @@ _citrus_HZ_stdenc_wctocs(_HZEncodingInfo * __restrict ei, *idx = (_csid_t)(wc & 0x00FFFF7F); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_HZ_stdenc_cstowc(_HZEncodingInfo * __restrict ei, - wchar_t * __restrict wc, _csid_t csid, _index_t idx) +_citrus_HZ_stdenc_cstowc(_HZEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(ei != NULL); - _DIAGASSERT(wc != NULL); *wc = (wchar_t)idx; switch (csid) { case 0x80: case 0x8080: *wc |= (wchar_t)0x80; - /*FALLTHROUGH*/ + /*FALLTHROUGH*/ case 0x0: case 0x8000: break; @@ -530,7 +480,7 @@ _citrus_HZ_stdenc_cstowc(_HZEncodingInfo * __restrict ei, *wc |= (wchar_t)csid; } - return 0; + return (0); } static void @@ -538,7 +488,6 @@ _citrus_HZ_encoding_module_uninit(_HZEncodingInfo *ei) { escape_t *escape; - _DIAGASSERT(ei != NULL); while ((escape = TAILQ_FIRST(E0SET(ei))) != NULL) { TAILQ_REMOVE(E0SET(ei), escape, entry); free(GL(escape)); @@ -554,44 +503,36 @@ _citrus_HZ_encoding_module_uninit(_HZEncodingInfo *ei) } static int -_citrus_HZ_parse_char(void **context, const char *name, const char *s) +_citrus_HZ_parse_char(void **context, const char *name __unused, const char *s) { - void **p; escape_t *escape; - - _DIAGASSERT(context != NULL && *context != NULL); - _DIAGASSERT(name != NULL); - _DIAGASSERT(s != NULL); + void **p; p = (void **)*context; escape = (escape_t *)p[0]; if (escape->ch != '\0') - return EINVAL; + return (EINVAL); escape->ch = *s++; if (escape->ch == ESCAPE_CHAR || *s != '\0') - return EINVAL; + return (EINVAL); - return 0; + return (0); } static int _citrus_HZ_parse_graphic(void **context, const char *name, const char *s) { - void **p; _HZEncodingInfo *ei; escape_t *escape; graphic_t *graphic; - - _DIAGASSERT(context != NULL && *context != NULL); - _DIAGASSERT(name != NULL); - _DIAGASSERT(s != NULL); + void **p; p = (void **)*context; escape = (escape_t *)p[0]; ei = (_HZEncodingInfo *)p[1]; graphic = malloc(sizeof(*graphic)); if (graphic == NULL) - return ENOMEM; + return (ENOMEM); memset(graphic, 0, sizeof(*graphic)); if (strcmp("GL", name) == 0) { if (GL(escape) != NULL) @@ -604,30 +545,29 @@ _citrus_HZ_parse_graphic(void **context, const char *name, const char *s) } else { release: free(graphic); - return EINVAL; + return (EINVAL); } graphic->escape = escape; if (_bcs_strncasecmp("ASCII", s, 5) == 0) { if (s[5] != '\0') - return EINVAL; + return (EINVAL); graphic->charset = ASCII; graphic->length = 1; ei->ascii = graphic; - return 0; + return (0); } else if (_bcs_strncasecmp("GB2312", s, 6) == 0) { if (s[6] != '\0') - return EINVAL; + return (EINVAL); graphic->charset = GB2312; graphic->length = 2; ei->gb2312 = graphic; - return 0; - } else if (strncmp("94*", s, 3) == 0) { + return (0); + } else if (strncmp("94*", s, 3) == 0) graphic->charset = CS94; - } else if (strncmp("96*", s, 3) == 0) { + else if (strncmp("96*", s, 3) == 0) graphic->charset = CS96; - } else { - return EINVAL; - } + else + return (EINVAL); s += 3; switch(*s) { case '1': case '2': case '3': @@ -636,9 +576,9 @@ release: break; /*FALLTHROUGH*/ default: - return EINVAL; + return (EINVAL); } - return 0; + return (0); } static const _citrus_prop_hint_t escape_hints[] = { @@ -655,14 +595,10 @@ _citrus_HZ_parse_escape(void **context, const char *name, const char *s) escape_t *escape; void *p[2]; - _DIAGASSERT(context != NULL); - _DIAGASSERT(name != NULL); - _DIAGASSERT(s != NULL); - ei = (_HZEncodingInfo *)*context; escape = malloc(sizeof(*escape)); if (escape == NULL) - return EINVAL; + return (EINVAL); memset(escape, 0, sizeof(*escape)); if (strcmp("0", name) == 0) { escape->set = E0SET(ei); @@ -672,12 +608,12 @@ _citrus_HZ_parse_escape(void **context, const char *name, const char *s) TAILQ_INSERT_TAIL(E1SET(ei), escape, entry); } else { free(escape); - return EINVAL; + return (EINVAL); } p[0] = (void *)escape; p[1] = (void *)ei; - return _citrus_prop_parse_variable( - escape_hints, (void *)&p[0], s, strlen(s)); + return (_citrus_prop_parse_variable( + escape_hints, (void *)&p[0], s, strlen(s))); } static const _citrus_prop_hint_t root_hints[] = { @@ -688,12 +624,10 @@ _CITRUS_PROP_HINT_END static int _citrus_HZ_encoding_module_init(_HZEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { int errnum; - _DIAGASSERT(ei != NULL); - memset(ei, 0, sizeof(*ei)); TAILQ_INIT(E0SET(ei)); TAILQ_INIT(E1SET(ei)); @@ -701,18 +635,9 @@ _citrus_HZ_encoding_module_init(_HZEncodingInfo * __restrict ei, root_hints, (void *)ei, var, lenvar); if (errnum != 0) _citrus_HZ_encoding_module_uninit(ei); - return errnum; + return (errnum); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(HZ); -_CITRUS_CTYPE_DEF_OPS(HZ); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_hz.h b/lib/i18n_module/HZ/citrus_hz.h similarity index 92% rename from lib/libc/citrus/modules/citrus_hz.h rename to lib/i18n_module/HZ/citrus_hz.h index 7d85e461f0..d05e075c3b 100644 --- a/lib/libc/citrus/modules/citrus_hz.h +++ b/lib/i18n_module/HZ/citrus_hz.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/HZ/citrus_hz.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_hz.h,v 1.1 2006/11/22 23:38:27 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_hz.h,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2004, 2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_HZ_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(HZ); _CITRUS_STDENC_GETOPS_FUNC(HZ); __END_DECLS diff --git a/lib/i18n_module/ISO2022/Makefile b/lib/i18n_module/ISO2022/Makefile index 7a23e3b220..3163a21ac5 100644 --- a/lib/i18n_module/ISO2022/Makefile +++ b/lib/i18n_module/ISO2022/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/ISO2022/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/ISO2022/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= ISO2022 +SRCS+= citrus_iso2022.c +CFLAGS+= --param max-inline-insns-single=128 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_iso2022.c b/lib/i18n_module/ISO2022/citrus_iso2022.c similarity index 78% rename from lib/libc/citrus/modules/citrus_iso2022.c rename to lib/i18n_module/ISO2022/citrus_iso2022.c index ad898df4be..cd9ae4134e 100644 --- a/lib/libc/citrus/modules/citrus_iso2022.c +++ b/lib/i18n_module/ISO2022/citrus_iso2022.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_iso2022.c,v 1.18 2007/11/21 14:19:32 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/ISO2022/citrus_iso2022.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_iso2022.c,v 1.19 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)1999, 2002 Citrus Project, @@ -28,11 +29,13 @@ * $Citrus: xpg4dl/FreeBSD/lib/libc/locale/iso2022.c,v 1.23 2001/06/21 01:51:44 yamt Exp $ */ +#include #include + #include #include #include -#include +#include #include #include #include @@ -42,7 +45,6 @@ #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_iso2022.h" @@ -70,16 +72,16 @@ * 1xxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx */ +#define CS94 (0U) +#define CS96 (1U) +#define CS94MULTI (2U) +#define CS96MULTI (3U) + typedef struct { - u_char type; -#define CS94 (0U) -#define CS96 (1U) -#define CS94MULTI (2U) -#define CS96MULTI (3U) - - u_char final; - u_char interm; - u_char vers; + unsigned char interm; + unsigned char final; + unsigned char type; + unsigned char vers; } _ISO2022Charset; static const _ISO2022Charset ascii = { CS94, 'B', '\0', '\0' }; @@ -93,7 +95,7 @@ typedef struct { singlegl:3, singlegr:3; char ch[7]; /* longest escape sequence (ESC & V ESC $ ( F) */ - int chlen; + size_t chlen; int flags; #define _ISO2022STATE_FLAG_INITIALIZED 1 } _ISO2022State; @@ -120,27 +122,12 @@ typedef struct { #define F_SS2R 0x2000 /*8E*/ #define F_SS3R 0x4000 /*8F*/ } _ISO2022EncodingInfo; -typedef struct { - _ISO2022EncodingInfo ei; - struct { - /* for future multi-locale facility */ - _ISO2022State s_mblen; - _ISO2022State s_mbrlen; - _ISO2022State s_mbrtowc; - _ISO2022State s_mbtowc; - _ISO2022State s_mbsrtowcs; - _ISO2022State s_wcrtomb; - _ISO2022State s_wcsrtombs; - _ISO2022State s_wctomb; - } states; -} _ISO2022CTypeInfo; #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_ISO2022_##m #define _ENCODING_INFO _ISO2022EncodingInfo -#define _CTYPE_INFO _ISO2022CTypeInfo #define _ENCODING_STATE _ISO2022State #define _ENCODING_MB_CUR_MAX(_ei_) MB_LEN_MAX #define _ENCODING_IS_STATE_DEPENDENT 1 @@ -150,47 +137,82 @@ typedef struct { #define _ISO2022INVALID (wchar_t)-1 -static __inline int isc0(__uint8_t x) { return ((x & 0x1f) == x); } -static __inline int isc1(__uint8_t x) { return (0x80 <= x && x <= 0x9f); } -static __inline int iscntl(__uint8_t x) { return (isc0(x) || isc1(x) || x == 0x7f); } -static __inline int is94(__uint8_t x) { return (0x21 <= x && x <= 0x7e); } -static __inline int is96(__uint8_t x) { return (0x20 <= x && x <= 0x7f); } -static __inline int isecma(__uint8_t x) { return (0x30 <= x && x <= 0x7f); } -static __inline int isinterm(__uint8_t x) { return (0x20 <= x && x <= 0x2f); } -static __inline int isthree(__uint8_t x) { return (0x60 <= x && x <= 0x6f); } +static __inline bool isc0(__uint8_t x) +{ + + return ((x & 0x1f) == x); +} + +static __inline bool isc1(__uint8_t x) +{ + + return (0x80 <= x && x <= 0x9f); +} + +static __inline bool iscntl(__uint8_t x) +{ + + return (isc0(x) || isc1(x) || x == 0x7f); +} + +static __inline bool is94(__uint8_t x) +{ + + return (0x21 <= x && x <= 0x7e); +} + +static __inline bool is96(__uint8_t x) +{ + + return (0x20 <= x && x <= 0x7f); +} + +static __inline bool isecma(__uint8_t x) +{ + + return (0x30 <= x && x <= 0x7f); +} + +static __inline bool isinterm(__uint8_t x) +{ + + return (0x20 <= x && x <= 0x2f); +} + +static __inline bool isthree(__uint8_t x) +{ + + return (0x60 <= x && x <= 0x6f); +} static __inline int getcs(const char * __restrict p, _ISO2022Charset * __restrict cs) { - _DIAGASSERT(p != NULL); - _DIAGASSERT(cs != NULL); - if (!strncmp(p, "94$", 3) && p[3] && !p[4]) { - cs->final = (u_char)(p[3] & 0xff); + cs->final = (unsigned char)(p[3] & 0xff); cs->interm = '\0'; cs->vers = '\0'; cs->type = CS94MULTI; } else if (!strncmp(p, "96$", 3) && p[3] && !p[4]) { - cs->final = (u_char)(p[3] & 0xff); + cs->final = (unsigned char)(p[3] & 0xff); cs->interm = '\0'; cs->vers = '\0'; cs->type = CS96MULTI; } else if (!strncmp(p, "94", 2) && p[2] && !p[3]) { - cs->final = (u_char)(p[2] & 0xff); + cs->final = (unsigned char)(p[2] & 0xff); cs->interm = '\0'; cs->vers = '\0'; cs->type = CS94; } else if (!strncmp(p, "96", 2) && p[2] && !p[3]) { - cs->final = (u_char )(p[2] & 0xff); + cs->final = (unsigned char )(p[2] & 0xff); cs->interm = '\0'; cs->vers = '\0'; cs->type = CS96; - } else { - return 1; - } + } else + return (1); - return 0; + return (0); } @@ -200,10 +222,10 @@ getcs(const char * __restrict p, _ISO2022Charset * __restrict cs) static __inline int get_recommend(_ISO2022EncodingInfo * __restrict ei, - const char * __restrict token) + const char * __restrict token) { - int i; _ISO2022Charset cs, *p; + int i; if (!strchr("0123", token[0]) || token[1] != '=') return (_NOTMATCH); @@ -211,33 +233,32 @@ get_recommend(_ISO2022EncodingInfo * __restrict ei, if (getcs(&token[2], &cs) == 0) ; else if (!strcmp(&token[2], "94")) { - cs.final = (u_char)(token[4]); + cs.final = (unsigned char)(token[4]); cs.interm = '\0'; cs.vers = '\0'; cs.type = CS94; } else if (!strcmp(&token[2], "96")) { - cs.final = (u_char)(token[4]); + cs.final = (unsigned char)(token[4]); cs.interm = '\0'; cs.vers = '\0'; cs.type = CS96; } else if (!strcmp(&token[2], "94$")) { - cs.final = (u_char)(token[5]); + cs.final = (unsigned char)(token[5]); cs.interm = '\0'; cs.vers = '\0'; cs.type = CS94MULTI; } else if (!strcmp(&token[2], "96$")) { - cs.final = (u_char)(token[5]); + cs.final = (unsigned char)(token[5]); cs.interm = '\0'; cs.vers = '\0'; cs.type = CS96MULTI; - } else { + } else return (_PARSEFAIL); - } i = token[0] - '0'; - if (!ei->recommend[i]) { + if (!ei->recommend[i]) ei->recommend[i] = malloc(sizeof(_ISO2022Charset)); - } else { + else { p = realloc(ei->recommend[i], sizeof(_ISO2022Charset) * (ei->recommendsize[i] + 1)); if (!p) @@ -258,7 +279,7 @@ get_recommend(_ISO2022EncodingInfo * __restrict ei, static __inline int get_initg(_ISO2022EncodingInfo * __restrict ei, - const char * __restrict token) + const char * __restrict token) { _ISO2022Charset cs; @@ -280,15 +301,15 @@ get_initg(_ISO2022EncodingInfo * __restrict ei, static __inline int get_max(_ISO2022EncodingInfo * __restrict ei, - const char * __restrict token) + const char * __restrict token) { - if (!strcmp(token, "MAX1")) { + if (!strcmp(token, "MAX1")) ei->maxcharset = 1; - } else if (!strcmp(token, "MAX2")) { + else if (!strcmp(token, "MAX2")) ei->maxcharset = 2; - } else if (!strcmp(token, "MAX3")) { + else if (!strcmp(token, "MAX3")) ei->maxcharset = 3; - } else + else return (_NOTMATCH); return (_MATCH); @@ -297,9 +318,8 @@ get_max(_ISO2022EncodingInfo * __restrict ei, static __inline int get_flags(_ISO2022EncodingInfo * __restrict ei, - const char * __restrict token) + const char * __restrict token) { - int i; static struct { const char *tag; int flag; @@ -322,13 +342,13 @@ get_flags(_ISO2022EncodingInfo * __restrict ei, { "SS3R", F_SS3R }, { NULL, 0 } }; + int i; - for (i = 0; tags[i].tag; i++) { + for (i = 0; tags[i].tag; i++) if (!strcmp(token, tags[i].tag)) { ei->flags |= tags[i].flag; return (_MATCH); } - } return (_NOTMATCH); } @@ -336,14 +356,12 @@ get_flags(_ISO2022EncodingInfo * __restrict ei, static __inline int _citrus_ISO2022_parse_variable(_ISO2022EncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar __unused) { - char const *v, *e; + char const *e, *v; char buf[20]; - int i, len, ret; - - _DIAGASSERT(ei != NULL); - + size_t len; + int i, ret; /* * parse VARIABLE section. @@ -371,12 +389,12 @@ _citrus_ISO2022_parse_variable(_ISO2022EncodingInfo * __restrict ei, while (*e && *e != ' ' && *e != '\t') ++e; - len = e-v; + len = e - v; if (len == 0) break; - if (len>=sizeof(buf)) + if (len >= sizeof(buf)) goto parsefail; - snprintf(buf, sizeof(buf), "%.*s", len, v); + snprintf(buf, sizeof(buf), "%.*s", (int)len, v); if ((ret = get_recommend(ei, buf)) != _NOTMATCH) ; @@ -388,7 +406,7 @@ _citrus_ISO2022_parse_variable(_ISO2022EncodingInfo * __restrict ei, ; else ret = _PARSEFAIL; - if (ret==_PARSEFAIL) + if (ret == _PARSEFAIL) goto parsefail; v = e; @@ -408,7 +426,7 @@ parsefail: static __inline void /*ARGSUSED*/ _citrus_ISO2022_init_state(_ISO2022EncodingInfo * __restrict ei, - _ISO2022State * __restrict s) + _ISO2022State * __restrict s) { int i; @@ -416,58 +434,54 @@ _citrus_ISO2022_init_state(_ISO2022EncodingInfo * __restrict ei, s->gl = 0; s->gr = (ei->flags & F_8BIT) ? 1 : -1; - for (i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) if (ei->initg[i].final) { s->g[i].type = ei->initg[i].type; s->g[i].final = ei->initg[i].final; s->g[i].interm = ei->initg[i].interm; } - } s->singlegl = s->singlegr = -1; s->flags |= _ISO2022STATE_FLAG_INITIALIZED; } static __inline void /*ARGSUSED*/ -_citrus_ISO2022_pack_state(_ISO2022EncodingInfo * __restrict ei, - void * __restrict pspriv, - const _ISO2022State * __restrict s) +_citrus_ISO2022_pack_state(_ISO2022EncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _ISO2022State * __restrict s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_ISO2022_unpack_state(_ISO2022EncodingInfo * __restrict ei, - _ISO2022State * __restrict s, - const void * __restrict pspriv) +_citrus_ISO2022_unpack_state(_ISO2022EncodingInfo * __restrict ei __unused, + _ISO2022State * __restrict s, const void * __restrict pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static int /*ARGSUSED*/ _citrus_ISO2022_encoding_module_init(_ISO2022EncodingInfo * __restrict ei, - const void * __restrict var, - size_t lenvar) + const void * __restrict var, size_t lenvar) { - _DIAGASSERT(ei != NULL); - - return _citrus_ISO2022_parse_variable(ei, var, lenvar); + return (_citrus_ISO2022_parse_variable(ei, var, lenvar)); } static void /*ARGSUSED*/ -_citrus_ISO2022_encoding_module_uninit(_ISO2022EncodingInfo *ei) +_citrus_ISO2022_encoding_module_uninit(_ISO2022EncodingInfo *ei __unused) { + } #define ESC '\033' #define ECMA -1 #define INTERM -2 #define OECMA -3 - static const struct seqtable { int type; int csoff; @@ -506,20 +520,18 @@ static const struct seqtable { { -1, -1, -1, -1, -1, 2, { ESC, 'N', }, }, { -1, -1, -1, -1, -1, 2, { ESC, 'O', }, }, /* end of records */ - { 0, } +// { 0, } + { 0, 0, 0, 0, 0, 0, { ESC, 0, }, } }; static int seqmatch(const char * __restrict s, size_t n, - const struct seqtable * __restrict sp) + const struct seqtable * __restrict sp) { const int *p; - _DIAGASSERT(s != NULL); - _DIAGASSERT(sp != NULL); - p = sp->chars; - while (p - sp->chars < n && p - sp->chars < sp->len) { + while ((size_t)(p - sp->chars) < n && p - sp->chars < sp->len) { switch (*p) { case ECMA: if (!isecma(*s)) @@ -555,24 +567,17 @@ seqmatch(const char * __restrict s, size_t n, } terminate: - return p - sp->chars; + return (p - sp->chars); } static wchar_t -_ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, - const char * __restrict string, size_t n, - const char ** __restrict result, - _ISO2022State * __restrict psenc) +_ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei __unused, + const char * __restrict string, size_t n, const char ** __restrict result, + _ISO2022State * __restrict psenc) { - wchar_t wchar = 0; - int cur; const struct seqtable *sp; - int nmatch; - int i; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(string != NULL); - /* result may be NULL */ + wchar_t wchar = 0; + int i, cur, nmatch; while (1) { /* SI/SO */ @@ -605,7 +610,7 @@ _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, /* look for a perfect match from escape sequences */ for (sp = &seqtable[0]; sp->len; sp++) { nmatch = seqmatch(string, n, sp); - if (sp->len == nmatch && n >= sp->len) + if (sp->len == nmatch && n >= (size_t)(sp->len)) break; } @@ -647,8 +652,8 @@ _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, } /* LS2/3 */ - if (2 <= n && string[0] == '\033' - && string[1] && strchr("no", string[1])) { + if (2 <= n && string[0] == '\033' && + string[1] && strchr("no", string[1])) { psenc->gl = string[1] - 'n' + 2; string += 2; n -= 2; @@ -657,8 +662,8 @@ _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, /* LS1/2/3R */ /* XXX: { for vi showmatch */ - if (2 <= n && string[0] == '\033' - && string[1] && strchr("~}|", string[1])) { + if (2 <= n && string[0] == '\033' && + string[1] && strchr("~}|", string[1])) { psenc->gr = 3 - (string[1] - '|'); string += 2; n -= 2; @@ -666,8 +671,8 @@ _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, } /* SS2/3 */ - if (2 <= n && string[0] == '\033' - && string[1] && strchr("NO", string[1])) { + if (2 <= n && string[0] == '\033' && string[1] && + strchr("NO", string[1])) { psenc->singlegl = (string[1] - 'N') + 2; string += 2; n -= 2; @@ -688,8 +693,8 @@ _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei, * if we are in the middle of escape sequence, * we still need to wait for more characters to come */ - if (n < sp->len) { - if (nmatch == n) { + if (n < (size_t)(sp->len)) { + if ((size_t)(nmatch) == n) { if (result) *result = string; return (_ISO2022INVALID); @@ -716,13 +721,10 @@ eat: /* normal chars. always eat C0/C1 as is. */ if (iscntl(*string & 0xff)) cur = -1; - else if (*string & 0x80) { - cur = (psenc->singlegr == -1) - ? psenc->gr : psenc->singlegr; - } else { - cur = (psenc->singlegl == -1) - ? psenc->gl : psenc->singlegl; - } + else if (*string & 0x80) + cur = (psenc->singlegr == -1) ? psenc->gr : psenc->singlegr; + else + cur = (psenc->singlegl == -1) ? psenc->gl : psenc->singlegl; if (cur == -1) { asis: @@ -731,7 +733,7 @@ asis: *result = string; /* reset single shift state */ psenc->singlegr = psenc->singlegl = -1; - return wchar; + return (wchar); } /* length error check */ @@ -739,13 +741,13 @@ asis: case CS94MULTI: case CS96MULTI: if (!isthree(psenc->g[cur].final)) { - if (2 <= n - && (string[0] & 0x80) == (string[1] & 0x80)) + if (2 <= n && + (string[0] & 0x80) == (string[1] & 0x80)) break; } else { - if (3 <= n - && (string[0] & 0x80) == (string[1] & 0x80) - && (string[0] & 0x80) == (string[2] & 0x80)) + if (3 <= n && + (string[0] & 0x80) == (string[1] & 0x80) && + (string[0] & 0x80) == (string[2] & 0x80)) break; } @@ -831,32 +833,24 @@ asis: *result = string; /* reset single shift state */ psenc->singlegr = psenc->singlegl = -1; - return wchar; + return (wchar); } static int _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei, - wchar_t * __restrict pwc, - const char ** __restrict s, - size_t n, _ISO2022State * __restrict psenc, - size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, + size_t n, _ISO2022State * __restrict psenc, size_t * __restrict nresult) { + const char *p, *result, *s0; wchar_t wchar; - const char *s0, *p, *result; - int c; - int chlenbak; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s != NULL); + int c, chlenbak; if (*s == NULL) { _citrus_ISO2022_init_state(ei, psenc); *nresult = _ENCODING_IS_STATE_DEPENDENT; - return 0; + return (0); } s0 = *s; c = 0; @@ -866,7 +860,7 @@ _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei, * if we have something in buffer, use that. * otherwise, skip here */ - if (psenc->chlen < 0 || psenc->chlen > sizeof(psenc->ch)) { + if (psenc->chlen > sizeof(psenc->ch)) { /* illgeal state */ _citrus_ISO2022_init_state(ei, psenc); goto encoding_error; @@ -883,12 +877,12 @@ _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei, } wchar = _ISO2022_sgetwchar(ei, p, psenc->chlen - (p-psenc->ch), - &result, psenc); + &result, psenc); c += result - p; if (wchar != _ISO2022INVALID) { - if (psenc->chlen > c) + if (psenc->chlen > (size_t)c) memmove(psenc->ch, result, psenc->chlen - c); - if (psenc->chlen < c) + if (psenc->chlen < (size_t)c) psenc->chlen = 0; else psenc->chlen -= c; @@ -896,7 +890,7 @@ _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei, } if (n == 0) { - if ((result - p) == psenc->chlen) + if ((size_t)(result - p) == psenc->chlen) /* complete shift sequence. */ psenc->chlen = 0; goto restart; @@ -920,7 +914,7 @@ emptybuf: c += (result - s0); n -= (result - s0); s0 = result; - if (n>0) + if (n > 0) goto emptybuf; /* complete shift sequence. */ goto restart; @@ -944,12 +938,7 @@ output: *s = s0; if (pwc) *pwc = wchar; - - if (!wchar) - *nresult = 0; - else - *nresult = c - chlenbak; - + *nresult = wchar ? c - chlenbak : 0; return (0); restart: @@ -961,13 +950,11 @@ restart: static int recommendation(_ISO2022EncodingInfo * __restrict ei, - _ISO2022Charset * __restrict cs) + _ISO2022Charset * __restrict cs) { - int i, j; _ISO2022Charset *recommend; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(cs != NULL); + size_t j; + int i; /* first, try a exact match. */ for (i = 0; i < 4; i++) { @@ -980,7 +967,7 @@ recommendation(_ISO2022EncodingInfo * __restrict ei, if (cs->interm != recommend[j].interm) continue; - return i; + return (i); } } @@ -995,47 +982,37 @@ recommendation(_ISO2022EncodingInfo * __restrict ei, if (cs->interm && (cs->interm != recommend[j].interm)) continue; - return i; + return (i); } } /* there's no recommendation. make a guess. */ if (ei->maxcharset == 0) { - return 0; + return (0); } else { switch (cs->type) { case CS94: case CS94MULTI: - return 0; + return (0); case CS96: case CS96MULTI: - return 1; + return (1); } } - return 0; + return (0); } static int _ISO2022_sputwchar(_ISO2022EncodingInfo * __restrict ei, wchar_t wc, - char * __restrict string, size_t n, - char ** __restrict result, - _ISO2022State * __restrict psenc, - size_t * __restrict nresult) + char * __restrict string, size_t n, char ** __restrict result, + _ISO2022State * __restrict psenc, size_t * __restrict nresult) { - int i = 0; - size_t len; _ISO2022Charset cs; char *p; char tmp[MB_LEN_MAX]; - int target; - u_char mask; - int bit8; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(string != NULL); - /* result may be NULL */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + size_t len; + int bit8, i = 0, target; + unsigned char mask; if (isc0(wc & 0xff)) { /* go back to INIT0 or ASCII on control chars */ @@ -1067,16 +1044,16 @@ _ISO2022_sputwchar(_ISO2022EncodingInfo * __restrict ei, wchar_t wc, bit8 = ei->flags & F_8BIT; /* designate the charset onto the target plane(G0/1/2/3). */ - if (psenc->g[target].type == cs.type - && psenc->g[target].final == cs.final - && psenc->g[target].interm == cs.interm) + if (psenc->g[target].type == cs.type && + psenc->g[target].final == cs.final && + psenc->g[target].interm == cs.interm) goto planeok; *p++ = '\033'; if (cs.type == CS94MULTI || cs.type == CS96MULTI) *p++ = '$'; - if (target == 0 && cs.type == CS94MULTI && strchr("@AB", cs.final) - && !cs.interm && !(ei->flags & F_NOOLD)) + if (target == 0 && cs.type == CS94MULTI && strchr("@AB", cs.final) && + !cs.interm && !(ei->flags & F_NOOLD)) ; else if (cs.type == CS94 || cs.type == CS94MULTI) *p++ = "()*+"[target]; @@ -1175,84 +1152,73 @@ sideok: len = (size_t)(p - tmp); if (n < len) { if (result) - *result = NULL; + *result = (char *)0; *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } if (result) *result = string + len; memcpy(string, tmp, len); *nresult = len; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } static int _citrus_ISO2022_put_state_reset(_ISO2022EncodingInfo * __restrict ei, - char * __restrict s, size_t n, - _ISO2022State * __restrict psenc, - size_t * __restrict nresult) + char * __restrict s, size_t n, _ISO2022State * __restrict psenc, + size_t * __restrict nresult) { - char buf[MB_LEN_MAX]; char *result; - int ret; + char buf[MB_LEN_MAX]; size_t len; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); + int ret; /* XXX state will be modified after this operation... */ ret = _ISO2022_sputwchar(ei, L'\0', buf, sizeof(buf), &result, psenc, &len); if (ret) { *nresult = len; - return ret; + return (ret); } if (sizeof(buf) < len || n < len-1) { /* XXX should recover state? */ *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } - memcpy(s, buf, len-1); - *nresult = len-1; + memcpy(s, buf, len - 1); + *nresult = len - 1; return (0); } static int _citrus_ISO2022_wcrtomb_priv(_ISO2022EncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _ISO2022State * __restrict psenc, - size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wc, + _ISO2022State * __restrict psenc, size_t * __restrict nresult) { - char buf[MB_LEN_MAX]; char *result; - int ret; + char buf[MB_LEN_MAX]; size_t len; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + int ret; /* XXX state will be modified after this operation... */ ret = _ISO2022_sputwchar(ei, wc, buf, sizeof(buf), &result, psenc, &len); if (ret) { *nresult = len; - return ret; + return (ret); } if (sizeof(buf) < len || n < len) { /* XXX should recover state? */ *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } memcpy(s, buf, len); @@ -1262,21 +1228,17 @@ _citrus_ISO2022_wcrtomb_priv(_ISO2022EncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_ISO2022_stdenc_wctocs(_ISO2022EncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) +_citrus_ISO2022_stdenc_wctocs(_ISO2022EncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { wchar_t m, nm; - _DIAGASSERT(csid != NULL && idx != NULL); - m = wc & 0x7FFF8080; nm = wc & 0x007F7F7F; - if (m & 0x00800000) { + if (m & 0x00800000) nm &= 0x00007F7F; - } else { + else m &= 0x7F008080; - } if (nm & 0x007F0000) { /* ^3 mark */ m |= 0x007F0000; @@ -1292,13 +1254,10 @@ _citrus_ISO2022_stdenc_wctocs(_ISO2022EncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_ISO2022_stdenc_cstowc(_ISO2022EncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) +_citrus_ISO2022_stdenc_cstowc(_ISO2022EncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(ei != NULL && wc != NULL); - *wc = (wchar_t)(csid & 0x7F808080) | (wchar_t)idx; return (0); @@ -1306,33 +1265,20 @@ _citrus_ISO2022_stdenc_cstowc(_ISO2022EncodingInfo * __restrict ei, static __inline int /*ARGSUSED*/ -_citrus_ISO2022_stdenc_get_state_desc_generic(_ISO2022EncodingInfo * __restrict ei, - _ISO2022State * __restrict psenc, - int * __restrict rstate) +_citrus_ISO2022_stdenc_get_state_desc_generic(_ISO2022EncodingInfo * __restrict ei __unused, + _ISO2022State * __restrict psenc, int * __restrict rstate) { if (psenc->chlen == 0) { /* XXX: it should distinguish initial and stable. */ *rstate = _STDENC_SDGEN_STABLE; - } else { - if (psenc->ch[0] == '\033') - *rstate = _STDENC_SDGEN_INCOMPLETE_SHIFT; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - } - - return 0; + } else + *rstate = (psenc->ch[0] == '\033') ? + _STDENC_SDGEN_INCOMPLETE_SHIFT : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(ISO2022); -_CITRUS_CTYPE_DEF_OPS(ISO2022); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_iso2022.h b/lib/i18n_module/ISO2022/citrus_iso2022.h similarity index 86% rename from lib/libc/citrus/modules/citrus_iso2022.h rename to lib/i18n_module/ISO2022/citrus_iso2022.h index 92a2a9273b..11acc0867d 100644 --- a/lib/libc/citrus/modules/citrus_iso2022.h +++ b/lib/i18n_module/ISO2022/citrus_iso2022.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_iso2022.h,v 1.2 2003/06/25 09:51:44 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_iso2022.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/ISO2022/citrus_iso2022.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_iso2022.h,v 1.2 2003/06/25 09:51:44 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_ISO2022_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(ISO2022); _CITRUS_STDENC_GETOPS_FUNC(ISO2022); __END_DECLS diff --git a/lib/i18n_module/JOHAB/Makefile b/lib/i18n_module/JOHAB/Makefile index 78e049f7ac..6095db1d5c 100644 --- a/lib/i18n_module/JOHAB/Makefile +++ b/lib/i18n_module/JOHAB/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/JOHAB/Makefile,v 1.1 2008/04/10 10:21:00 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/JOHAB/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= JOHAB +SRCS+= citrus_johab.c +CFLAGS+= --param max-inline-insns-single=16 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_johab.c b/lib/i18n_module/JOHAB/citrus_johab.c similarity index 61% rename from lib/libc/citrus/modules/citrus_johab.c rename to lib/i18n_module/JOHAB/citrus_johab.c index 589ffbb1b7..123a301f1e 100644 --- a/lib/libc/citrus/modules/citrus_johab.c +++ b/lib/i18n_module/JOHAB/citrus_johab.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_johab.c,v 1.3 2007/10/23 15:28:25 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/JOHAB/citrus_johab.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_johab.c,v 1.4 2008/06/14 16:01:07 tnozaki Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -25,24 +26,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - +#include #include + #include #include -#include +#include +#include +#include #include #include #include -#include -#include +#include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_johab.h" @@ -51,35 +52,19 @@ */ typedef struct { - int chlen; - char ch[2]; + int chlen; + char ch[2]; } _JOHABState; typedef struct { - int dummy; + int dummy; } _JOHABEncodingInfo; -typedef struct { - _JOHABEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _JOHABState s_mblen; - _JOHABState s_mbrlen; - _JOHABState s_mbrtowc; - _JOHABState s_mbtowc; - _JOHABState s_mbsrtowcs; - _JOHABState s_wcrtomb; - _JOHABState s_wcsrtombs; - _JOHABState s_wctomb; - } states; -} _JOHABCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_JOHAB_##m #define _ENCODING_INFO _JOHABEncodingInfo -#define _CTYPE_INFO _JOHABCTypeInfo #define _ENCODING_STATE _JOHABState #define _ENCODING_MB_CUR_MAX(_ei_) 2 #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -88,98 +73,87 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_JOHAB_init_state(_JOHABEncodingInfo * __restrict ei, - _JOHABState * __restrict psenc) +_citrus_JOHAB_init_state(_JOHABEncodingInfo * __restrict ei __unused, + _JOHABState * __restrict psenc) { - /* ei may be null */ - _DIAGASSERT(psenc != NULL); psenc->chlen = 0; } static __inline void /*ARGSUSED*/ -_citrus_JOHAB_pack_state(_JOHABEncodingInfo * __restrict ei, - void * __restrict pspriv, - const _JOHABState * __restrict psenc) +_citrus_JOHAB_pack_state(_JOHABEncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _JOHABState * __restrict psenc) { - /* ei may be null */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_JOHAB_unpack_state(_JOHABEncodingInfo * __restrict ei, - _JOHABState * __restrict psenc, - const void * __restrict pspriv) +_citrus_JOHAB_unpack_state(_JOHABEncodingInfo * __restrict ei __unused, + _JOHABState * __restrict psenc, const void * __restrict pspriv) { - /* ei may be null */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } static void /*ARGSUSED*/ -_citrus_JOHAB_encoding_module_uninit(_JOHABEncodingInfo *ei) +_citrus_JOHAB_encoding_module_uninit(_JOHABEncodingInfo *ei __unused) { + /* ei may be null */ } static int /*ARGSUSED*/ -_citrus_JOHAB_encoding_module_init(_JOHABEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) +_citrus_JOHAB_encoding_module_init(_JOHABEncodingInfo * __restrict ei __unused, + const void * __restrict var __unused, size_t lenvar __unused) { + /* ei may be null */ - return 0; + return (0); } -static __inline int +static __inline bool ishangul(int l, int t) { - return (l >= 0x84 && l <= 0xD3) && - ((t >= 0x41 && t <= 0x7E) || (t >= 0x81 && t <= 0xFE)); + return ((l >= 0x84 && l <= 0xD3) && + ((t >= 0x41 && t <= 0x7E) || (t >= 0x81 && t <= 0xFE))); } -static __inline int +static __inline bool isuda(int l, int t) { - return (l == 0xD8) && - ((t >= 0x31 && t <= 0x7E) || (t >= 0x91 && t <= 0xFE)); + + return ((l == 0xD8) && + ((t >= 0x31 && t <= 0x7E) || (t >= 0x91 && t <= 0xFE))); } -static __inline int +static __inline bool ishanja(int l, int t) { - return ((l >= 0xD9 && l <= 0xDE) || (l >= 0xE0 && l <= 0xF9)) && - ((t >= 0x31 && t <= 0x7E) || (t >= 0x91 && t <= 0xFE)); + + return (((l >= 0xD9 && l <= 0xDE) || (l >= 0xE0 && l <= 0xF9)) && + ((t >= 0x31 && t <= 0x7E) || (t >= 0x91 && t <= 0xFE))); } static int /*ARGSUSED*/ _citrus_JOHAB_mbrtowc_priv(_JOHABEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _JOHABState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _JOHABState * __restrict psenc, size_t * __restrict nresult) { const char *s0; int l, t; - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (*s == NULL) { _citrus_JOHAB_init_state(ei, psenc); *nresult = _ENCODING_IS_STATE_DEPENDENT; - return 0; - } + return (0); + } s0 = *s; switch (psenc->chlen) { @@ -192,7 +166,7 @@ _citrus_JOHAB_mbrtowc_priv(_JOHABEncodingInfo * __restrict ei, *pwc = (wchar_t)l; *nresult = (l == 0) ? 0 : 1; *s = s0; - return 0; + return (0); } psenc->ch[psenc->chlen++] = l; break; @@ -200,18 +174,18 @@ _citrus_JOHAB_mbrtowc_priv(_JOHABEncodingInfo * __restrict ei, l = psenc->ch[0] & 0xFF; break; default: - return EINVAL; + return (EINVAL); } if (n-- < 1) { restart: *nresult = (size_t)-2; *s = s0; - return 0; + return (0); } t = *s0++ & 0xFF; if (!ishangul(l, t) && !isuda(l, t) && !ishanja(l, t)) { *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } if (pwc != NULL) *pwc = (wchar_t)(l << 8 | t); @@ -219,24 +193,19 @@ restart: *s = s0; psenc->chlen = 0; - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_JOHAB_wcrtomb_priv(_JOHABEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _JOHABState * __restrict psenc, size_t * __restrict nresult) +_citrus_JOHAB_wcrtomb_priv(_JOHABEncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, wchar_t wc, + _JOHABState * __restrict psenc, size_t * __restrict nresult) { int l, t; - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); /* XXX assume wchar_t as int */ if ((uint32_t)wc <= 0x7F) { @@ -248,7 +217,7 @@ _citrus_JOHAB_wcrtomb_priv(_JOHABEncodingInfo * __restrict ei, if (n < 2) { e2big: *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } l = (wc >> 8) & 0xFF; t = wc & 0xFF; @@ -260,22 +229,18 @@ e2big: } else { ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_JOHAB_stdenc_wctocs(_JOHABEncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +_citrus_JOHAB_stdenc_wctocs(_JOHABEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - int m, l, t, linear; - - /* ei may be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); + int m, l, linear, t; /* XXX assume wchar_t as int */ if ((uint32_t)wc <= 0x7F) { @@ -294,37 +259,31 @@ _citrus_JOHAB_stdenc_wctocs(_JOHABEncodingInfo * __restrict ei, } else if (l >= 0xE0 && l <= 0xF9) { linear = l - 0xE0; m = 0x4A; - } else { - return EILSEQ; - } + } else + return (EILSEQ); linear *= 188; - if (t >= 0x31 && t <= 0x7E) { + if (t >= 0x31 && t <= 0x7E) linear += t - 0x31; - } else if (t >= 0x91 && t <= 0xFE) { + else if (t >= 0x91 && t <= 0xFE) linear += t - 0x43; - } else { - return EILSEQ; - } + else + return (EILSEQ); l = (linear / 94) + m; t = (linear % 94) + 0x21; *idx = (_index_t)((l << 8) | t); *csid = 2; } - } else { - return EILSEQ; - } - return 0; + } else + return (EILSEQ); + return (0); } static __inline int /*ARGSUSED*/ -_citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei, - wchar_t * __restrict wc, _csid_t csid, _index_t idx) +_citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - int m, n, l, t, linear; - - /* ei may be unused */ - _DIAGASSERT(wc != NULL); + int m, n, l, linear, t; switch (csid) { case 0: @@ -338,9 +297,8 @@ _citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei, } else if (idx >= 0x4A21 && idx <= 0x7D7E) { m = 0xE0; n = 0x4A; - } else { - return EILSEQ; - } + } else + return (EILSEQ); l = ((idx >> 8) & 0xFF) - n; t = (idx & 0xFF) - 0x21; linear = (l * 94) + t; @@ -349,35 +307,21 @@ _citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei, t += (t <= 0x4D) ? 0x31 : 0x43; break; default: - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_JOHAB_stdenc_get_state_desc_generic(_JOHABEncodingInfo * __restrict ei, - _JOHABState * __restrict psenc, int * __restrict rstate) +_citrus_JOHAB_stdenc_get_state_desc_generic(_JOHABEncodingInfo * __restrict ei __unused, + _JOHABState * __restrict psenc, int * __restrict rstate) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); - - *rstate = (psenc->chlen == 0) - ? _STDENC_SDGEN_INITIAL - : _STDENC_SDGEN_INCOMPLETE_CHAR; - return 0; -} - -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(JOHAB); -_CITRUS_CTYPE_DEF_OPS(JOHAB); - -#include "citrus_ctype_template.h" + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_johab.h b/lib/i18n_module/JOHAB/citrus_johab.h similarity index 92% rename from lib/libc/citrus/modules/citrus_johab.h rename to lib/i18n_module/JOHAB/citrus_johab.h index bb46237e3a..a0785a7a31 100644 --- a/lib/libc/citrus/modules/citrus_johab.h +++ b/lib/i18n_module/JOHAB/citrus_johab.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/JOHAB/citrus_johab.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_johab.h,v 1.1 2006/10/18 17:54:55 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_johab.h,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_JOHAB_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(JOHAB); _CITRUS_STDENC_GETOPS_FUNC(JOHAB); __END_DECLS diff --git a/lib/i18n_module/MSKanji/Makefile b/lib/i18n_module/MSKanji/Makefile index 2098bc2c53..b227d66471 100644 --- a/lib/i18n_module/MSKanji/Makefile +++ b/lib/i18n_module/MSKanji/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/MSKanji/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/MSKanji/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= MSKanji +SRCS+= citrus_mskanji.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mskanji.c b/lib/i18n_module/MSKanji/citrus_mskanji.c similarity index 74% rename from lib/libc/citrus/modules/citrus_mskanji.c rename to lib/i18n_module/MSKanji/citrus_mskanji.c index a8e44f8b37..1e0cb16e97 100644 --- a/lib/libc/citrus/modules/citrus_mskanji.c +++ b/lib/i18n_module/MSKanji/citrus_mskanji.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_mskanji.c,v 1.12 2007/03/05 16:57:06 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/MSKanji/citrus_mskanji.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_mskanji.c,v 1.13 2008/06/14 16:01:08 tnozaki Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -49,33 +50,34 @@ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include #include + #include #include #include -#include -#include +#include #include #include #include +#include #include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_mskanji.h" @@ -85,105 +87,76 @@ */ typedef struct _MSKanjiState { - char ch[2]; - int chlen; + int chlen; + char ch[2]; } _MSKanjiState; typedef struct { - int mode; + int mode; #define MODE_JIS2004 1 } _MSKanjiEncodingInfo; -typedef struct { - _MSKanjiEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _MSKanjiState s_mblen; - _MSKanjiState s_mbrlen; - _MSKanjiState s_mbrtowc; - _MSKanjiState s_mbtowc; - _MSKanjiState s_mbsrtowcs; - _MSKanjiState s_wcrtomb; - _MSKanjiState s_wcsrtombs; - _MSKanjiState s_wctomb; - } states; -} _MSKanjiCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_MSKanji_##m #define _ENCODING_INFO _MSKanjiEncodingInfo -#define _CTYPE_INFO _MSKanjiCTypeInfo #define _ENCODING_STATE _MSKanjiState #define _ENCODING_MB_CUR_MAX(_ei_) 2 #define _ENCODING_IS_STATE_DEPENDENT 0 #define _STATE_NEEDS_EXPLICIT_INIT(_ps_) 0 -static int +static bool _mskanji1(int c) { - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) - return 1; - else - return 0; + return ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)); } -static int +static bool _mskanji2(int c) { - if ((c >= 0x40 && c <= 0x7e) || (c >= 0x80 && c <= 0xfc)) - return 1; - else - return 0; + return ((c >= 0x40 && c <= 0x7e) || (c >= 0x80 && c <= 0xfc)); } static __inline void /*ARGSUSED*/ -_citrus_MSKanji_init_state(_MSKanjiEncodingInfo * __restrict ei, - _MSKanjiState * __restrict s) +_citrus_MSKanji_init_state(_MSKanjiEncodingInfo * __restrict ei __unused, + _MSKanjiState * __restrict s) { + s->chlen = 0; } static __inline void /*ARGSUSED*/ -_citrus_MSKanji_pack_state(_MSKanjiEncodingInfo * __restrict ei, - void * __restrict pspriv, - const _MSKanjiState * __restrict s) +_citrus_MSKanji_pack_state(_MSKanjiEncodingInfo * __restrict ei __unused, + void * __restrict pspriv, const _MSKanjiState * __restrict s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_MSKanji_unpack_state(_MSKanjiEncodingInfo * __restrict ei, - _MSKanjiState * __restrict s, - const void * __restrict pspriv) +_citrus_MSKanji_unpack_state(_MSKanjiEncodingInfo * __restrict ei __unused, + _MSKanjiState * __restrict s, const void * __restrict pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static int /*ARGSUSED*/ _citrus_MSKanji_mbrtowc_priv(_MSKanjiEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, - const char ** __restrict s, size_t n, - _MSKanjiState * __restrict psenc, - size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _MSKanjiState * __restrict psenc, size_t * __restrict nresult) { - wchar_t wchar; - int len; - int chlenbak; const char *s0; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); + wchar_t wchar; + int chlenbak, len; s0 = *s; @@ -240,12 +213,7 @@ _citrus_MSKanji_mbrtowc_priv(_MSKanjiEncodingInfo * __restrict ei, if (pwc) *pwc = wchar; - - if (!wchar) - *nresult = 0; - else - *nresult = len - chlenbak; - + *nresult = wchar ? len - chlenbak : 0; return (0); encoding_error: @@ -261,17 +229,12 @@ restart: static int -_citrus_MSKanji_wcrtomb_priv(_MSKanjiEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _MSKanjiState * __restrict psenc, - size_t * __restrict nresult) +_citrus_MSKanji_wcrtomb_priv(_MSKanjiEncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, wchar_t wc, + _MSKanjiState * __restrict psenc __unused, size_t * __restrict nresult) { int ret; - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s != NULL); - /* check invalid sequence */ if (wc & ~0xffff) { ret = EILSEQ; @@ -292,7 +255,7 @@ _citrus_MSKanji_wcrtomb_priv(_MSKanjiEncodingInfo * __restrict ei, } *nresult = 2; - return 0; + return (0); } else { if (n < 1) { ret = E2BIG; @@ -306,26 +269,23 @@ _citrus_MSKanji_wcrtomb_priv(_MSKanjiEncodingInfo * __restrict ei, } *nresult = 1; - return 0; + return (0); } err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ _citrus_MSKanji_stdenc_wctocs(_MSKanjiEncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - _index_t row, col; + _index_t col, row; int offset; - _DIAGASSERT(csid != NULL && idx != NULL); - if ((_wc_t)wc < 0x80) { /* ISO-646 */ *csid = 0; @@ -371,7 +331,7 @@ _citrus_MSKanji_stdenc_wctocs(_MSKanjiEncodingInfo * __restrict ei, row = ((_wc_t)wc >> 8) & 0xFF; col = (_wc_t)wc & 0xFF; if (!_mskanji1(row) || !_mskanji2(col)) - return EILSEQ; + return (EILSEQ); if ((ei->mode & MODE_JIS2004) == 0 || row < 0xF0) { *csid = 2; offset = 0x81; @@ -379,8 +339,8 @@ _citrus_MSKanji_stdenc_wctocs(_MSKanjiEncodingInfo * __restrict ei, *csid = 3; if ((_wc_t)wc <= 0xF49E) { offset = (_wc_t)wc >= 0xF29F || - ((_wc_t)wc >= 0xF09F && (_wc_t)wc <= 0xF0FC) - ? 0xED : 0xF0; + ((_wc_t)wc >= 0xF09F && + (_wc_t)wc <= 0xF0FC) ? 0xED : 0xF0; } else offset = 0xCE; } @@ -398,58 +358,55 @@ _citrus_MSKanji_stdenc_wctocs(_MSKanjiEncodingInfo * __restrict ei, *idx = ((_index_t)row << 8) | col; } - return 0; + return (0); } static __inline int /*ARGSUSED*/ _citrus_MSKanji_stdenc_cstowc(_MSKanjiEncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - u_int32_t row, col; + uint32_t col, row; int offset; - _DIAGASSERT(wc != NULL); - switch (csid) { case 0: /* ISO-646 */ if (idx >= 0x80) - return EILSEQ; + return (EILSEQ); *wc = (wchar_t)idx; break; case 1: /* kana */ if (idx >= 0x80) - return EILSEQ; + return (EILSEQ); *wc = (wchar_t)idx + 0x80; break; case 3: if ((ei->mode & MODE_JIS2004) == 0) - return EILSEQ; + return (EILSEQ); /*FALLTHROUGH*/ case 2: /* kanji */ row = (idx >> 8); if (row < 0x21) - return EILSEQ; + return (EILSEQ); if (csid == 3) { if (row <= 0x2F) - offset = (row == 0x22 || row >= 0x26) - ? 0xED : 0xF0; + offset = (row == 0x22 || row >= 0x26) ? + 0xED : 0xF0; else if (row >= 0x4D && row <= 0x7E) offset = 0xCE; else - return EILSEQ; + return (EILSEQ); } else { if (row > 0x97) - return EILSEQ; + return (EILSEQ); offset = (row < 0x5F) ? 0x81 : 0xC1; } col = idx & 0xFF; if (col < 0x21 || col > 0x7E) - return EILSEQ; + return (EILSEQ); row -= 0x21; col -= 0x21; if ((row & 1) == 0) { col += 0x40; @@ -461,47 +418,31 @@ _citrus_MSKanji_stdenc_cstowc(_MSKanjiEncodingInfo * __restrict ei, *wc = ((wchar_t)row << 8) | col; break; default: - return EILSEQ; + return (EILSEQ); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_MSKanji_stdenc_get_state_desc_generic(_MSKanjiEncodingInfo * __restrict ei, - _MSKanjiState * __restrict psenc, - int * __restrict rstate) +_citrus_MSKanji_stdenc_get_state_desc_generic(_MSKanjiEncodingInfo * __restrict ei __unused, + _MSKanjiState * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static int /*ARGSUSED*/ _citrus_MSKanji_encoding_module_init(_MSKanjiEncodingInfo * __restrict ei, - const void * __restrict var, - size_t lenvar) + const void * __restrict var, size_t lenvar) { const char *p; - _DIAGASSERT(ei != NULL); - p = var; -#define MATCH(x, act) \ -do { \ - if (lenvar >= (sizeof(#x)-1) && \ - _bcs_strncasecmp(p, #x, sizeof(#x)-1) == 0) { \ - act; \ - lenvar -= sizeof(#x)-1; \ - p += sizeof(#x)-1; \ - } \ -} while (/*CONSTCOND*/0) memset((void *)ei, 0, sizeof(*ei)); while (lenvar > 0) { switch (_bcs_toupper(*p)) { @@ -513,23 +454,14 @@ do { \ --lenvar; } - return 0; - + return (0); } static void -_citrus_MSKanji_encoding_module_uninit(_MSKanjiEncodingInfo *ei) +_citrus_MSKanji_encoding_module_uninit(_MSKanjiEncodingInfo *ei __unused) { -} -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(MSKanji); -_CITRUS_CTYPE_DEF_OPS(MSKanji); - -#include "citrus_ctype_template.h" +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_mskanji.h b/lib/i18n_module/MSKanji/citrus_mskanji.h similarity index 86% rename from lib/libc/citrus/modules/citrus_mskanji.h rename to lib/i18n_module/MSKanji/citrus_mskanji.h index 8586251750..d6a72a527f 100644 --- a/lib/libc/citrus/modules/citrus_mskanji.h +++ b/lib/i18n_module/MSKanji/citrus_mskanji.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mskanji.h,v 1.2 2003/06/25 09:51:48 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mskanji.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/MSKanji/citrus_mskanji.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mskanji.h,v 1.2 2003/06/25 09:51:48 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_MSKANJI_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(MSKanji); _CITRUS_STDENC_GETOPS_FUNC(MSKanji); __END_DECLS diff --git a/lib/i18n_module/Makefile b/lib/i18n_module/Makefile index 62f31dc139..80c0190a89 100644 --- a/lib/i18n_module/Makefile +++ b/lib/i18n_module/Makefile @@ -1,9 +1,7 @@ -# $DragonFly: src/lib/i18n_module/Makefile,v 1.3 2008/04/10 10:21:00 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/Makefile 255298 2013-09-06 10:40:38Z theraven $ -SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 -SUBDIR+=UTF7 UTF8 VIQR ZW -SUBDIR+=iconv_none iconv_std -SUBDIR+=mapper_646 mapper_none mapper_serial mapper_parallel mapper_std -SUBDIR+=mapper_zone +SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ + UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ + mapper_parallel mapper_serial mapper_std mapper_zone .include diff --git a/lib/i18n_module/Makefile.inc b/lib/i18n_module/Makefile.inc index 24cddc88fc..d14754eb7b 100644 --- a/lib/i18n_module/Makefile.inc +++ b/lib/i18n_module/Makefile.inc @@ -1,19 +1,12 @@ -NOPROFILE= 1 -.include "../Makefile.shlib" +# $FreeBSD: head/lib/libiconv_modules/Makefile.inc 255298 2013-09-06 10:40:38Z theraven $ -SHLIB_MAJOR= ${MODULE_SHLIB_MAJOR} +.PATH: ${.CURDIR}/../../libc/iconv -BASENAME= ${.CURDIR:T} -LIB= ${BASENAME} -SRCS?= ${SRCPRE:tl}${BASENAME:tl}.c +SHLIB_MAJOR= 2 +WARNS?= 6 +CFLAGS+= -I${.CURDIR}/../../libc/citrus -TARGET_LIBDIR= /usr/lib/i18n -TARGET_SHLIBDIR= /usr/lib/i18n +CFLAGS+= -Dbool=_Bool -CITRUSDIR= ${.CURDIR}/../../libc/citrus - -CFLAGS+= -I${CITRUSDIR} -CFLAGS+= -DLOCALEMOD_MAJOR=${MODULE_SHLIB_MAJOR} -WARNS?= 1 - -.PATH: ${CITRUSDIR} ${CITRUSDIR}/modules +LIBDIR= /usr/lib/i18n +NOPROFILE= yes diff --git a/lib/i18n_module/Makefile.shlib b/lib/i18n_module/Makefile.shlib deleted file mode 100644 index 306355de67..0000000000 --- a/lib/i18n_module/Makefile.shlib +++ /dev/null @@ -1,3 +0,0 @@ -# $DragonFly: src/lib/i18n_module/Makefile.shlib,v 1.1 2005/03/11 20:47:05 joerg Exp $ - -MODULE_SHLIB_MAJOR= 1 diff --git a/lib/i18n_module/UES/Makefile b/lib/i18n_module/UES/Makefile index 8d843992df..6e1ae67498 100644 --- a/lib/i18n_module/UES/Makefile +++ b/lib/i18n_module/UES/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/UES/Makefile,v 1.1 2008/04/10 10:21:01 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/UES/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= UES +SRCS+= citrus_ues.c +CFLAGS+= --param max-inline-insns-single=64 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_ues.c b/lib/i18n_module/UES/citrus_ues.c similarity index 68% rename from lib/libc/citrus/modules/citrus_ues.c rename to lib/i18n_module/UES/citrus_ues.c index d0cc058679..93b0c50ea7 100644 --- a/lib/libc/citrus/modules/citrus_ues.c +++ b/lib/i18n_module/UES/citrus_ues.c @@ -1,3 +1,4 @@ +/* $FreeBSD: head/lib/libiconv_modules/UES/citrus_ues.c 252583 2013-07-03 18:27:45Z peter $ */ /* $NetBSD: citrus_ues.c,v 1.1 2006/11/13 15:16:31 tnozaki Exp $ */ /*- @@ -26,55 +27,40 @@ * SUCH DAMAGE. */ +#include + #include #include -#include +#include #include #include #include -#include +#include #include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_ues.h" typedef struct { - int mode; + size_t mb_cur_max; + int mode; #define MODE_C99 1 - size_t mb_cur_max; } _UESEncodingInfo; typedef struct { - int chlen; - char ch[12]; + int chlen; + char ch[12]; } _UESState; -typedef struct { - _UESEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _UESState s_mblen; - _UESState s_mbrlen; - _UESState s_mbrtowc; - _UESState s_mbtowc; - _UESState s_mbsrtowcs; - _UESState s_wcrtomb; - _UESState s_wcsrtombs; - _UESState s_wctomb; - } states; -} _UESCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_UES_##m #define _ENCODING_INFO _UESEncodingInfo -#define _CTYPE_INFO _UESCTypeInfo #define _ENCODING_STATE _UESState #define _ENCODING_MB_CUR_MAX(_ei_) (_ei_)->mb_cur_max #define _ENCODING_IS_STATE_DEPENDENT 0 @@ -82,32 +68,27 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_UES_init_state(_UESEncodingInfo * __restrict ei, - _UESState * __restrict psenc) +_citrus_UES_init_state(_UESEncodingInfo * __restrict ei __unused, + _UESState * __restrict psenc) { + psenc->chlen = 0; } static __inline void /*ARGSUSED*/ -_citrus_UES_pack_state(_UESEncodingInfo * __restrict ei, - void *__restrict pspriv, const _UESState * __restrict psenc) +_citrus_UES_pack_state(_UESEncodingInfo * __restrict ei __unused, + void *__restrict pspriv, const _UESState * __restrict psenc) { - /* ei seem to be unused */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_UES_unpack_state(_UESEncodingInfo * __restrict ei, - _UESState * __restrict psenc, const void * __restrict pspriv) +_citrus_UES_unpack_state(_UESEncodingInfo * __restrict ei __unused, + _UESState * __restrict psenc, const void * __restrict pspriv) { - /* ei seem to be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } @@ -115,13 +96,14 @@ _citrus_UES_unpack_state(_UESEncodingInfo * __restrict ei, static __inline int to_int(int ch) { + if (ch >= '0' && ch <= '9') - return ch - '0'; + return (ch - '0'); else if (ch >= 'A' && ch <= 'F') - return (ch - 'A') + 10; + return ((ch - 'A') + 10); else if (ch >= 'a' && ch <= 'f') - return (ch - 'a') + 10; - return -1; + return ((ch - 'a') + 10); + return (-1); } #define ESCAPE '\\' @@ -156,70 +138,62 @@ to_str(char *s, wchar_t wc, int bit) do { *p++ = xdig[(wc >> (bit -= 4)) & 0xF]; } while (bit > 0); - return p - s; + return (p - s); } -static __inline int +static __inline bool is_hi_surrogate(wchar_t wc) { - return wc >= 0xD800 && wc <= 0xDBFF; + + return (wc >= 0xD800 && wc <= 0xDBFF); } -static __inline int +static __inline bool is_lo_surrogate(wchar_t wc) { - return wc >= 0xDC00 && wc <= 0xDFFF; + + return (wc >= 0xDC00 && wc <= 0xDFFF); } static __inline wchar_t surrogate_to_ucs(wchar_t hi, wchar_t lo) { - _DIAGASSERT(is_hi_surrogate(hi)); - _DIAGASSERT(is_lo_surrogate(lo)); hi -= 0xD800; lo -= 0xDC00; - return (hi << 10 | lo) + 0x10000; + return ((hi << 10 | lo) + 0x10000); } static __inline void ucs_to_surrogate(wchar_t wc, wchar_t * __restrict hi, wchar_t * __restrict lo) { - _DIAGASSERT(hi != NULL); - _DIAGASSERT(lo != NULL); - _DIAGASSERT(wc >= 0x10000); wc -= 0x10000; *hi = (wc >> 10) + 0xD800; *lo = (wc & 0x3FF) + 0xDC00; } -static __inline int +static __inline bool is_basic(wchar_t wc) { - return (uint32_t)wc <= 0x9F && - wc != 0x24 && wc != 0x40 && wc != 0x60; + + return ((uint32_t)wc <= 0x9F && wc != 0x24 && wc != 0x40 && + wc != 0x60); } static int _citrus_UES_mbrtowc_priv(_UESEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _UESState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _UESState * __restrict psenc, size_t * __restrict nresult) { const char *s0; - int ch, head, tail, i, num; + int ch, head, num, tail; wchar_t hi, wc; - _DIAGASSERT(ei != NULL); - /* pwc may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (*s == NULL) { _citrus_UES_init_state(ei, psenc); *nresult = 0; - return 0; + return (0); } s0 = *s; @@ -262,7 +236,7 @@ surrogate: restart: *s = s0; *nresult = (size_t)-2; - return 0; + return (0); } psenc->ch[psenc->chlen++] = *s0++; } @@ -296,7 +270,7 @@ restart: is_hi_surrogate(wc) == 0 && is_lo_surrogate(wc) == 0) goto done; *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); case 12: if (is_lo_surrogate(wc) == 0) break; @@ -315,18 +289,18 @@ done: *nresult = (size_t)((wc == 0) ? 0 : (s0 - *s)); *s = s0; - return 0; + return (0); } static int _citrus_UES_wcrtomb_priv(_UESEncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _UESState * __restrict psenc, size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wc, + _UESState * __restrict psenc, size_t * __restrict nresult) { wchar_t hi, lo; if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); if ((ei->mode & MODE_C99) ? is_basic(wc) : (uint32_t)wc <= 0x7F) { if (n-- < 1) @@ -348,91 +322,71 @@ _citrus_UES_wcrtomb_priv(_UESEncodingInfo * __restrict ei, psenc->chlen = to_str(&psenc->ch[0], wc, UCS4_BIT); } else { *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } memcpy(s, psenc->ch, psenc->chlen); *nresult = psenc->chlen; psenc->chlen = 0; - return 0; + return (0); e2big: *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } -static __inline int /*ARGSUSED*/ -_citrus_UES_stdenc_wctocs(_UESEncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +static int +_citrus_UES_stdenc_wctocs(_UESEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - /* ei seem to be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); *csid = 0; *idx = (_index_t)wc; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_UES_stdenc_cstowc(_UESEncodingInfo * __restrict ei, - wchar_t * __restrict wc, _csid_t csid, _index_t idx) +_citrus_UES_stdenc_cstowc(_UESEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - /* ei seem to be unused */ - _DIAGASSERT(wc != NULL); if (csid != 0) - return EILSEQ; + return (EILSEQ); *wc = (wchar_t)idx; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_UES_stdenc_get_state_desc_generic(_UESEncodingInfo * __restrict ei, - _UESState * __restrict psenc, int * __restrict rstate) +_citrus_UES_stdenc_get_state_desc_generic(_UESEncodingInfo * __restrict ei __unused, + _UESState * __restrict psenc, int * __restrict rstate) { - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); - - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; /* XXX */ - - return 0; + + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static void /*ARGSUSED*/ -_citrus_UES_encoding_module_uninit(_UESEncodingInfo *ei) +_citrus_UES_encoding_module_uninit(_UESEncodingInfo *ei __unused) { + /* ei seems to be unused */ } static int /*ARGSUSED*/ _citrus_UES_encoding_module_init(_UESEncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { const char *p; - _DIAGASSERT(ei != NULL); - p = var; -#define MATCH(x, act) \ -do { \ - if (lenvar >= (sizeof(#x)-1) && \ - _bcs_strncasecmp(p, #x, sizeof(#x)-1) == 0) { \ - act; \ - lenvar -= sizeof(#x)-1; \ - p += sizeof(#x)-1; \ - } \ -} while (/*CONSTCOND*/0) memset((void *)ei, 0, sizeof(*ei)); while (lenvar > 0) { switch (_bcs_toupper(*p)) { @@ -445,18 +399,9 @@ do { \ } ei->mb_cur_max = (ei->mode & MODE_C99) ? 10 : 12; - return 0; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(UES); -_CITRUS_CTYPE_DEF_OPS(UES); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_ues.h b/lib/i18n_module/UES/citrus_ues.h similarity index 92% rename from lib/libc/citrus/modules/citrus_ues.h rename to lib/i18n_module/UES/citrus_ues.h index 3ed648024d..5961a169b0 100644 --- a/lib/libc/citrus/modules/citrus_ues.h +++ b/lib/i18n_module/UES/citrus_ues.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/UES/citrus_ues.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_ues.h,v 1.1 2006/11/13 15:16:31 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_ues.h,v 1.1 2008/04/10 10:21:02 hasso Exp $ */ /*- * Copyright (c)2004, 2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_UES_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(UES); _CITRUS_STDENC_GETOPS_FUNC(UES); __END_DECLS diff --git a/lib/i18n_module/UTF1632/Makefile b/lib/i18n_module/UTF1632/Makefile index cb8f1cbaf4..f904897596 100644 --- a/lib/i18n_module/UTF1632/Makefile +++ b/lib/i18n_module/UTF1632/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/UTF1632/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/UTF1632/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= UTF1632 +SRCS+= citrus_utf1632.c +CFLAGS+= --param max-inline-insns-single=32 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_utf1632.c b/lib/i18n_module/UTF1632/citrus_utf1632.c similarity index 71% rename from lib/libc/citrus/modules/citrus_utf1632.c rename to lib/i18n_module/UTF1632/citrus_utf1632.c index a7d1843f9c..06535f71cd 100644 --- a/lib/libc/citrus/modules/citrus_utf1632.c +++ b/lib/i18n_module/UTF1632/citrus_utf1632.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_utf1632.c,v 1.8 2008/03/20 11:47:45 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF1632/citrus_utf1632.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_utf1632.c,v 1.9 2008/06/14 16:01:08 tnozaki Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -26,12 +27,13 @@ * SUCH DAMAGE. */ -#include +#include #include +#include + #include #include #include -#include #include #include #include @@ -52,20 +54,28 @@ */ typedef struct { - u_int8_t ch[4]; - int chlen; - int current_endian; + int chlen; + int current_endian; + uint8_t ch[4]; } _UTF1632State; -typedef struct { - int preffered_endian; - unsigned int cur_max; -#define _ENDIAN_UNKNOWN 0 -#define _ENDIAN_BIG 1 -#define _ENDIAN_LITTLE 2 - u_int32_t mode; +#define _ENDIAN_UNKNOWN 0 +#define _ENDIAN_BIG 1 +#define _ENDIAN_LITTLE 2 +#if BYTE_ORDER == BIG_ENDIAN +#define _ENDIAN_INTERNAL _ENDIAN_BIG +#define _ENDIAN_SWAPPED _ENDIAN_LITTLE +#else +#define _ENDIAN_INTERNAL _ENDIAN_LITTLE +#define _ENDIAN_SWAPPED _ENDIAN_BIG +#endif #define _MODE_UTF32 0x00000001U #define _MODE_FORCE_ENDIAN 0x00000002U + +typedef struct { + int preffered_endian; + unsigned int cur_max; + uint32_t mode; } _UTF1632EncodingInfo; #define _FUNCNAME(m) _citrus_UTF1632_##m @@ -78,25 +88,21 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_UTF1632_init_state(_UTF1632EncodingInfo *ei __unused, _UTF1632State *s) +_citrus_UTF1632_init_state(_UTF1632EncodingInfo *ei __unused, + _UTF1632State *s) { + memset(s, 0, sizeof(*s)); } static int _citrus_UTF1632_mbrtowc_priv(_UTF1632EncodingInfo *ei, wchar_t *pwc, - const char **s, size_t n, _UTF1632State *psenc, - size_t *nresult) + const char **s, size_t n, _UTF1632State *psenc, size_t *nresult) { - int chlenbak, endian, needlen; - wchar_t wc; - size_t result; const char *s0; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); + size_t result; + wchar_t wc = L'\0'; + int chlenbak, endian, needlen; s0 = *s; @@ -110,13 +116,10 @@ _citrus_UTF1632_mbrtowc_priv(_UTF1632EncodingInfo *ei, wchar_t *pwc, chlenbak = psenc->chlen; refetch: - if ((ei->mode & _MODE_UTF32) != 0 || chlenbak>=2) - needlen = 4; - else - needlen = 2; + needlen = ((ei->mode & _MODE_UTF32) != 0 || chlenbak >= 2) ? 4 : 2; while (chlenbak < needlen) { - if (n==0) + if (n == 0) goto restart; psenc->ch[chlenbak++] = *s0++; n--; @@ -126,54 +129,52 @@ refetch: /* judge endian marker */ if ((ei->mode & _MODE_UTF32) == 0) { /* UTF16 */ - if (psenc->ch[0]==0xFE && psenc->ch[1]==0xFF) { + if (psenc->ch[0] == 0xFE && psenc->ch[1] == 0xFF) { psenc->current_endian = _ENDIAN_BIG; chlenbak = 0; goto refetch; - } else if (psenc->ch[0]==0xFF && psenc->ch[1]==0xFE) { + } else if (psenc->ch[0] == 0xFF && psenc->ch[1] == 0xFE) { psenc->current_endian = _ENDIAN_LITTLE; chlenbak = 0; goto refetch; } } else { /* UTF32 */ - if (psenc->ch[0]==0x00 && psenc->ch[1]==0x00 && - psenc->ch[2]==0xFE && psenc->ch[3]==0xFF) { + if (psenc->ch[0] == 0x00 && psenc->ch[1] == 0x00 && + psenc->ch[2] == 0xFE && psenc->ch[3] == 0xFF) { psenc->current_endian = _ENDIAN_BIG; chlenbak = 0; goto refetch; - } else if (psenc->ch[0]==0xFF && psenc->ch[1]==0xFE && - psenc->ch[2]==0x00 && psenc->ch[3]==0x00) { + } else if (psenc->ch[0] == 0xFF && psenc->ch[1] == 0xFE && + psenc->ch[2] == 0x00 && psenc->ch[3] == 0x00) { psenc->current_endian = _ENDIAN_LITTLE; chlenbak = 0; goto refetch; } } - if ((ei->mode & _MODE_FORCE_ENDIAN) != 0 || - psenc->current_endian == _ENDIAN_UNKNOWN) - endian = ei->preffered_endian; - else - endian = psenc->current_endian; + endian = ((ei->mode & _MODE_FORCE_ENDIAN) != 0 || + psenc->current_endian == _ENDIAN_UNKNOWN) ? ei->preffered_endian : + psenc->current_endian; /* get wc */ if ((ei->mode & _MODE_UTF32) == 0) { /* UTF16 */ - if (needlen==2) { + if (needlen == 2) { switch (endian) { case _ENDIAN_LITTLE: wc = (psenc->ch[0] | - ((wchar_t)psenc->ch[1] << 8)); + ((wchar_t)psenc->ch[1] << 8)); break; case _ENDIAN_BIG: wc = (psenc->ch[1] | - ((wchar_t)psenc->ch[0] << 8)); + ((wchar_t)psenc->ch[0] << 8)); break; default: goto ilseq; } if (wc >= 0xD800 && wc <= 0xDBFF) { /* surrogate high */ - needlen=4; + needlen = 4; goto refetch; } } else { @@ -182,13 +183,13 @@ refetch: wc <<= 10; switch (endian) { case _ENDIAN_LITTLE: - if (psenc->ch[2]<0xDC || psenc->ch[2]>0xDF) + if (psenc->ch[3] < 0xDC || psenc->ch[3] > 0xDF) goto ilseq; wc |= psenc->ch[2]; wc |= (wchar_t)(psenc->ch[3] & 3) << 8; break; case _ENDIAN_BIG: - if (psenc->ch[3]<0xDC || psenc->ch[3]>0xDF) + if (psenc->ch[2]<0xDC || psenc->ch[2]>0xDF) goto ilseq; wc |= psenc->ch[3]; wc |= (wchar_t)(psenc->ch[2] & 3) << 8; @@ -203,15 +204,15 @@ refetch: switch (endian) { case _ENDIAN_LITTLE: wc = (psenc->ch[0] | - ((wchar_t)psenc->ch[1] << 8) | - ((wchar_t)psenc->ch[2] << 16) | - ((wchar_t)psenc->ch[3] << 24)); + ((wchar_t)psenc->ch[1] << 8) | + ((wchar_t)psenc->ch[2] << 16) | + ((wchar_t)psenc->ch[3] << 24)); break; case _ENDIAN_BIG: wc = (psenc->ch[3] | - ((wchar_t)psenc->ch[2] << 8) | - ((wchar_t)psenc->ch[1] << 16) | - ((wchar_t)psenc->ch[0] << 24)); + ((wchar_t)psenc->ch[2] << 8) | + ((wchar_t)psenc->ch[1] << 16) | + ((wchar_t)psenc->ch[0] << 24)); break; default: goto ilseq; @@ -242,34 +243,23 @@ restart: static int _citrus_UTF1632_wcrtomb_priv(_UTF1632EncodingInfo *ei, char *s, size_t n, - wchar_t wc, _UTF1632State *psenc, - size_t *nresult) + wchar_t wc, _UTF1632State *psenc, size_t *nresult) { wchar_t wc2; static const char _bom[4] = { -#if BYTE_ORDER == BIG_ENDIAN 0x00, 0x00, 0xFE, 0xFF, -#else - 0xFF, 0xFE, 0x00, 0x00, -#endif }; const char *bom = &_bom[0]; size_t cnt; - _DIAGASSERT(ei != NULL); - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); - cnt = (size_t)0; if (psenc->current_endian == _ENDIAN_UNKNOWN) { if ((ei->mode & _MODE_FORCE_ENDIAN) == 0) { - if (ei->mode & _MODE_UTF32) { + if (ei->mode & _MODE_UTF32) cnt = 4; - } else { + else { cnt = 2; -#if BYTE_ORDER == BIG_ENDIAN bom += 2; -#endif } if (n < cnt) goto e2big; @@ -282,9 +272,9 @@ _citrus_UTF1632_wcrtomb_priv(_UTF1632EncodingInfo *ei, char *s, size_t n, wc2 = 0; if ((ei->mode & _MODE_UTF32)==0) { /* UTF16 */ - if (wc>0xFFFF) { + if (wc > 0xFFFF) { /* surrogate */ - if (wc>0x10FFFF) + if (wc > 0x10FFFF) goto ilseq; if (n < 4) goto e2big; @@ -309,7 +299,7 @@ surrogate: s[1] = (wc >>= 8); break; } - if (wc2!=0) { + if (wc2 != 0) { wc = wc2; wc2 = 0; s += 2; @@ -339,32 +329,24 @@ surrogate: } *nresult = cnt; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); e2big: *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } static void parse_variable(_UTF1632EncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var, size_t lenvar) { -#define MATCH(x, act) \ -do { \ - if (lenvar >= (sizeof(#x)-1) && \ - _bcs_strncasecmp(p, #x, sizeof(#x)-1) == 0) { \ - act; \ - lenvar -= sizeof(#x)-1; \ - p += sizeof(#x)-1; \ - } \ -} while (/*CONSTCOND*/0) const char *p; + p = var; - while (lenvar>0) { + while (lenvar > 0) { switch (*p) { case 'B': case 'b': @@ -374,6 +356,14 @@ do { \ case 'l': MATCH(little, ei->preffered_endian = _ENDIAN_LITTLE); break; + case 'i': + case 'I': + MATCH(internal, ei->preffered_endian = _ENDIAN_INTERNAL); + break; + case 's': + case 'S': + MATCH(swapped, ei->preffered_endian = _ENDIAN_SWAPPED); + break; case 'F': case 'f': MATCH(force, ei->mode |= _MODE_FORCE_ENDIAN); @@ -391,26 +381,19 @@ do { \ static int /*ARGSUSED*/ _citrus_UTF1632_encoding_module_init(_UTF1632EncodingInfo * __restrict ei, - const void * __restrict var, - size_t lenvar) + const void * __restrict var, size_t lenvar) { - _DIAGASSERT(ei != NULL); memset((void *)ei, 0, sizeof(*ei)); parse_variable(ei, var, lenvar); - if ((ei->mode&_MODE_UTF32)==0) - ei->cur_max = 6; /* endian + surrogate */ - else - ei->cur_max = 8; /* endian + normal */ + ei->cur_max = ((ei->mode&_MODE_UTF32) == 0) ? 6 : 8; + /* 6: endian + surrogate */ + /* 8: endian + normal */ if (ei->preffered_endian == _ENDIAN_UNKNOWN) { -#if BYTE_ORDER == BIG_ENDIAN ei->preffered_endian = _ENDIAN_BIG; -#else - ei->preffered_endian = _ENDIAN_LITTLE; -#endif } return (0); @@ -420,18 +403,15 @@ static void /*ARGSUSED*/ _citrus_UTF1632_encoding_module_uninit(_UTF1632EncodingInfo *ei __unused) { + } static __inline int /*ARGSUSED*/ _citrus_UTF1632_stdenc_wctocs(_UTF1632EncodingInfo * __restrict ei __unused, - _csid_t * __restrict csid, - _index_t * __restrict idx, - _wc_t wc) + _csid_t * __restrict csid, _index_t * __restrict idx, _wc_t wc) { - _DIAGASSERT(csid != NULL && idx != NULL); - *csid = 0; *idx = (_index_t)wc; @@ -441,12 +421,9 @@ _citrus_UTF1632_stdenc_wctocs(_UTF1632EncodingInfo * __restrict ei __unused, static __inline int /*ARGSUSED*/ _citrus_UTF1632_stdenc_cstowc(_UTF1632EncodingInfo * __restrict ei __unused, - _wc_t * __restrict wc, - _csid_t csid, _index_t idx) + _wc_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(wc != NULL); - if (csid != 0) return (EILSEQ); @@ -458,16 +435,12 @@ _citrus_UTF1632_stdenc_cstowc(_UTF1632EncodingInfo * __restrict ei __unused, static __inline int /*ARGSUSED*/ _citrus_UTF1632_stdenc_get_state_desc_generic(_UTF1632EncodingInfo * __restrict ei __unused, - _UTF1632State * __restrict psenc, - int * __restrict rstate) + _UTF1632State * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } /* ---------------------------------------------------------------------- diff --git a/lib/libc/citrus/modules/citrus_utf1632.h b/lib/i18n_module/UTF1632/citrus_utf1632.h similarity index 88% rename from lib/libc/citrus/modules/citrus_utf1632.h rename to lib/i18n_module/UTF1632/citrus_utf1632.h index a280ddabe1..30a2f7d488 100644 --- a/lib/libc/citrus/modules/citrus_utf1632.h +++ b/lib/i18n_module/UTF1632/citrus_utf1632.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_utf1632.h,v 1.1 2003/06/25 09:51:49 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_utf1632.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF1632/citrus_utf1632.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_utf1632.h,v 1.1 2003/06/25 09:51:49 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile index c20f60b101..5854b7ddaa 100644 --- a/lib/i18n_module/UTF7/Makefile +++ b/lib/i18n_module/UTF7/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/UTF7/Makefile,v 1.1 2005/03/11 21:50:39 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/UTF7/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= UTF7 +SRCS+= citrus_utf7.c +CFLAGS+= --param max-inline-insns-single=32 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_utf7.c b/lib/i18n_module/UTF7/citrus_utf7.c similarity index 70% rename from lib/libc/citrus/modules/citrus_utf7.c rename to lib/i18n_module/UTF7/citrus_utf7.c index 356817fe88..fa843d3cef 100644 --- a/lib/libc/citrus/modules/citrus_utf7.c +++ b/lib/i18n_module/UTF7/citrus_utf7.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_utf7.c,v 1.5 2006/08/23 12:57:24 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_utf7.c,v 1.3 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF7/citrus_utf7.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_utf7.c,v 1.5 2006/08/23 12:57:24 tnozaki Exp $ */ /*- * Copyright (c)2004, 2005 Citrus Project, @@ -28,11 +28,13 @@ * */ +#include + #include #include #include -#include #include +#include #include #include #include @@ -40,7 +42,6 @@ #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_utf7.h" @@ -48,12 +49,13 @@ * private stuffs used by templates */ -typedef struct { - uint16_t cell[0x80]; -#define EI_MASK UINT16_C(0xff) +#define EI_MASK UINT16_C(0xff) #define EI_DIRECT UINT16_C(0x100) #define EI_OPTION UINT16_C(0x200) #define EI_SPACE UINT16_C(0x400) + +typedef struct { + uint16_t cell[0x80]; } _UTF7EncodingInfo; typedef struct { @@ -66,27 +68,11 @@ typedef struct { char ch[4]; /* BASE64_IN, 3 * 6 = 18, most closed to UTF16_BIT */ } _UTF7State; -typedef struct { - _UTF7EncodingInfo ei; - struct { - /* for future multi-locale facility */ - _UTF7State s_mblen; - _UTF7State s_mbrlen; - _UTF7State s_mbrtowc; - _UTF7State s_mbtowc; - _UTF7State s_mbsrtowcs; - _UTF7State s_wcrtomb; - _UTF7State s_wcsrtombs; - _UTF7State s_wctomb; - } states; -} _UTF7CTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_UTF7_##m #define _ENCODING_INFO _UTF7EncodingInfo -#define _CTYPE_INFO _UTF7CTypeInfo #define _ENCODING_STATE _UTF7State #define _ENCODING_MB_CUR_MAX(_ei_) 4 #define _ENCODING_IS_STATE_DEPENDENT 1 @@ -94,35 +80,27 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_UTF7_init_state(_UTF7EncodingInfo * __restrict ei, - _UTF7State * __restrict s) +_citrus_UTF7_init_state(_UTF7EncodingInfo * __restrict ei __unused, + _UTF7State * __restrict s) { - /* ei appears to be unused */ - _DIAGASSERT(s != NULL); memset((void *)s, 0, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_UTF7_pack_state(_UTF7EncodingInfo * __restrict ei, - void *__restrict pspriv, const _UTF7State * __restrict s) +_citrus_UTF7_pack_state(_UTF7EncodingInfo * __restrict ei __unused, + void *__restrict pspriv, const _UTF7State * __restrict s) { - /* ei seem to be unused */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(s != NULL); memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ -_citrus_UTF7_unpack_state(_UTF7EncodingInfo * __restrict ei, - _UTF7State * __restrict s, const void * __restrict pspriv) +_citrus_UTF7_unpack_state(_UTF7EncodingInfo * __restrict ei __unused, + _UTF7State * __restrict s, const void * __restrict pspriv) { - /* ei seem to be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)s, pspriv, sizeof(*s)); } @@ -171,29 +149,24 @@ static const char spaces[] = " \t\r\n"; static int _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo * __restrict ei, - uint16_t * __restrict u16, const char ** __restrict s, size_t n, - _UTF7State * __restrict psenc, size_t * __restrict nresult) + uint16_t * __restrict u16, const char ** __restrict s, size_t n, + _UTF7State * __restrict psenc, size_t * __restrict nresult) { _UTF7State sv; const char *s0; - int i, done, len; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL && *s != NULL); - _DIAGASSERT(psenc != NULL); + int done, i, len; s0 = *s; sv = *psenc; for (i = 0, done = 0; done == 0; i++) { - _DIAGASSERT(i <= psenc->chlen); if (i == psenc->chlen) { if (n-- < 1) { *nresult = (size_t)-2; *s = s0; sv.chlen = psenc->chlen; *psenc = sv; - return 0; + return (0); } psenc->ch[psenc->chlen++] = *s0++; } @@ -201,10 +174,10 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo * __restrict ei, goto ilseq; if (!psenc->mode) { if (psenc->bits > 0 || psenc->cache > 0) - return EINVAL; - if (psenc->ch[i] == BASE64_IN) { + return (EINVAL); + if (psenc->ch[i] == BASE64_IN) psenc->mode = 1; - } else { + else { if (!ISDIRECT(ei, (int)psenc->ch[i])) goto ilseq; *u16 = (uint16_t)psenc->ch[i]; @@ -221,7 +194,7 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo * __restrict ei, len = FINDLEN(ei, (int)psenc->ch[i]); if (len < 0) { if (psenc->bits >= BASE64_BIT) - return EINVAL; + return (EINVAL); psenc->mode = 0; psenc->bits = psenc->cache = 0; if (psenc->ch[i] != BASE64_OUT) { @@ -239,65 +212,60 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo * __restrict ei, break; case 10: case 12: case 14: psenc->bits -= (UTF16_BIT - BASE64_BIT); - *u16 = (psenc->cache >> psenc->bits) - & UTF16_MAX; + *u16 = (psenc->cache >> psenc->bits) & + UTF16_MAX; done = 1; break; default: - return EINVAL; + return (EINVAL); } } } } if (psenc->chlen > i) - return EINVAL; + return (EINVAL); psenc->chlen = 0; *nresult = (size_t)((*u16 == 0) ? 0 : s0 - *s); *s = s0; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } static int _citrus_UTF7_mbrtowc_priv(_UTF7EncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _UTF7State * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _UTF7State * __restrict psenc, size_t * __restrict nresult) { const char *s0; uint32_t u32; uint16_t hi, lo; - size_t siz, nr; + size_t nr, siz; int err; - _DIAGASSERT(ei != NULL); - /* pwc may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - if (*s == NULL) { _citrus_UTF7_init_state(ei, psenc); *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; - return 0; + return (0); } s0 = *s; if (psenc->surrogate) { hi = (psenc->cache >> 2) & UTF16_MAX; if (hi < HISRG_MIN || hi > HISRG_MAX) - return EINVAL; + return (EINVAL); siz = 0; } else { err = _citrus_UTF7_mbtoutf16(ei, &hi, &s0, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { *nresult = nr; - return err; + return (err); } if (err != 0) - return err; + return (err); n -= nr; siz = nr; if (hi < HISRG_MIN || hi > HISRG_MAX) { @@ -309,10 +277,10 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingInfo * __restrict ei, err = _citrus_UTF7_mbtoutf16(ei, &lo, &s0, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { *nresult = nr; - return err; + return (err); } if (err != 0) - return err; + return (err); hi -= HISRG_MIN; lo -= LOSRG_MIN; u32 = (hi << 10 | lo) + SRG_BASE; @@ -328,21 +296,18 @@ done: *nresult = siz; psenc->surrogate = 0; } - return err; + return (err); } static int _citrus_UTF7_utf16tomb(_UTF7EncodingInfo * __restrict ei, - char * __restrict s, size_t n, uint16_t u16, - _UTF7State * __restrict psenc, size_t * __restrict nresult) + char * __restrict s, size_t n __unused, uint16_t u16, + _UTF7State * __restrict psenc, size_t * __restrict nresult) { int bits, i; - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - if (psenc->chlen != 0 || psenc->bits > BASE64_BIT) - return EINVAL; + return (EINVAL); if (ISSAFE(ei, u16)) { if (psenc->mode) { @@ -357,14 +322,14 @@ _citrus_UTF7_utf16tomb(_UTF7EncodingInfo * __restrict ei, psenc->mode = 0; } if (psenc->bits != 0) - return EINVAL; + return (EINVAL); psenc->ch[psenc->chlen++] = (char)u16; if (u16 == BASE64_IN) psenc->ch[psenc->chlen++] = BASE64_OUT; } else { if (!psenc->mode) { if (psenc->bits > 0) - return EINVAL; + return (EINVAL); psenc->ch[psenc->chlen++] = BASE64_IN; psenc->mode = 1; } @@ -380,23 +345,18 @@ _citrus_UTF7_utf16tomb(_UTF7EncodingInfo * __restrict ei, *nresult = psenc->chlen; psenc->chlen = 0; - return 0; + return (0); } static int _citrus_UTF7_wcrtomb_priv(_UTF7EncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wchar, - _UTF7State * __restrict psenc, size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wchar, + _UTF7State * __restrict psenc, size_t * __restrict nresult) { uint32_t u32; uint16_t u16[2]; - int err, len, i; - size_t siz, nr; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + int err, i, len; + size_t nr, siz; u32 = (uint32_t)wchar; if (u32 <= UTF16_MAX) { @@ -409,42 +369,37 @@ _citrus_UTF7_wcrtomb_priv(_UTF7EncodingInfo * __restrict ei, len = 2; } else { *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } siz = 0; for (i = 0; i < len; ++i) { err = _citrus_UTF7_utf16tomb(ei, s, n, u16[i], psenc, &nr); if (err != 0) - return err; /* XXX: state has been modified */ + return (err); /* XXX: state has been modified */ s += nr; n -= nr; siz += nr; } *nresult = siz; - return 0; + return (0); } static int /* ARGSUSED */ -_citrus_UTF7_put_state_reset(_UTF7EncodingInfo * __restrict ei, - char * __restrict s, size_t n, _UTF7State * __restrict psenc, - size_t * __restrict nresult) +_citrus_UTF7_put_state_reset(_UTF7EncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, _UTF7State * __restrict psenc, + size_t * __restrict nresult) { int bits, pos; - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (psenc->chlen != 0 || psenc->bits > BASE64_BIT || psenc->surrogate) - return EINVAL; + return (EINVAL); if (psenc->mode) { if (psenc->bits > 0) { if (n-- < 1) - return E2BIG; + return (E2BIG); bits = BASE64_BIT - psenc->bits; pos = (psenc->cache << bits) & BASE64_MAX; psenc->ch[psenc->chlen++] = base64[pos]; @@ -454,84 +409,70 @@ _citrus_UTF7_put_state_reset(_UTF7EncodingInfo * __restrict ei, psenc->mode = 0; } if (psenc->bits != 0) - return EINVAL; + return (EINVAL); if (n-- < 1) - return E2BIG; + return (E2BIG); - _DIAGASSERT(n >= psenc->chlen); *nresult = (size_t)psenc->chlen; if (psenc->chlen > 0) { memcpy(s, psenc->ch, psenc->chlen); psenc->chlen = 0; } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_UTF7_stdenc_wctocs(_UTF7EncodingInfo * __restrict ei, - _csid_t * __restrict csid, - _index_t * __restrict idx, wchar_t wc) +_citrus_UTF7_stdenc_wctocs(_UTF7EncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - /* ei seem to be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); *csid = 0; *idx = (_index_t)wc; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_UTF7_stdenc_cstowc(_UTF7EncodingInfo * __restrict ei, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) +_citrus_UTF7_stdenc_cstowc(_UTF7EncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - /* ei seem to be unused */ - _DIAGASSERT(wc != NULL); if (csid != 0) - return EILSEQ; + return (EILSEQ); *wc = (wchar_t)idx; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_UTF7_stdenc_get_state_desc_generic(_UTF7EncodingInfo * __restrict ei, - _UTF7State * __restrict psenc, - int * __restrict rstate) +_citrus_UTF7_stdenc_get_state_desc_generic(_UTF7EncodingInfo * __restrict ei __unused, + _UTF7State * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static void /*ARGSUSED*/ -_citrus_UTF7_encoding_module_uninit(_UTF7EncodingInfo *ei) +_citrus_UTF7_encoding_module_uninit(_UTF7EncodingInfo *ei __unused) { + /* ei seems to be unused */ } static int /*ARGSUSED*/ _citrus_UTF7_encoding_module_init(_UTF7EncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var __unused, size_t lenvar __unused) { const char *s; - _DIAGASSERT(ei != NULL); - /* var may be null */ - memset(ei, 0, sizeof(*ei)); #define FILL(str, flag) \ @@ -545,18 +486,9 @@ do { \ FILL(option, EI_OPTION); FILL(spaces, EI_SPACE); - return 0; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(UTF7); -_CITRUS_CTYPE_DEF_OPS(UTF7); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_utf7.h b/lib/i18n_module/UTF7/citrus_utf7.h similarity index 86% rename from lib/libc/citrus/modules/citrus_utf7.h rename to lib/i18n_module/UTF7/citrus_utf7.h index 3185b59f67..e66759b93c 100644 --- a/lib/libc/citrus/modules/citrus_utf7.h +++ b/lib/i18n_module/UTF7/citrus_utf7.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_utf7.h,v 1.1 2005/03/05 18:05:15 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_utf7.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF7/citrus_utf7.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_utf7.h,v 1.1 2005/03/05 18:05:15 tnozaki Exp $ */ /*- * Copyright (c)2004,2005 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_UTF7_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(UTF7); _CITRUS_STDENC_GETOPS_FUNC(UTF7); __END_DECLS diff --git a/lib/i18n_module/UTF8/Makefile b/lib/i18n_module/UTF8/Makefile index 081307a85f..c2459a0ddf 100644 --- a/lib/i18n_module/UTF8/Makefile +++ b/lib/i18n_module/UTF8/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/UTF8/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/UTF8/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= UTF8 +SRCS+= citrus_utf8.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_utf8.c b/lib/i18n_module/UTF8/citrus_utf8.c similarity index 73% rename from lib/libc/citrus/modules/citrus_utf8.c rename to lib/i18n_module/UTF8/citrus_utf8.c index eadbc0adf3..c466198299 100644 --- a/lib/libc/citrus/modules/citrus_utf8.c +++ b/lib/i18n_module/UTF8/citrus_utf8.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_utf8.c,v 1.16 2007/03/06 16:13:58 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF8/citrus_utf8.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_utf8.c,v 1.17 2008/06/14 16:01:08 tnozaki Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -58,11 +59,13 @@ * SUCH DAMAGE. */ +#include #include + #include #include #include -#include +#include #include #include #include @@ -72,7 +75,6 @@ #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_utf8.h" @@ -81,134 +83,112 @@ * private stuffs used by templates */ -static int _UTF8_count_array[256]; -static int const *_UTF8_count = NULL; +static uint8_t _UTF8_count_array[256] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 00 - 0F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 10 - 1F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 70 - 7F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* C0 - CF */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* D0 - DF */ + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* E0 - EF */ + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0 /* F0 - FF */ +}; + +static uint8_t const *_UTF8_count = _UTF8_count_array; -static const u_int32_t _UTF8_range[] = { +static const uint32_t _UTF8_range[] = { 0, /*dummy*/ - 0x00000000, 0x00000080, 0x00000800, 0x00010000, + 0x00000000, 0x00000080, 0x00000800, 0x00010000, 0x00200000, 0x04000000, 0x80000000, }; typedef struct { - char ch[6]; - int chlen; + int chlen; + char ch[6]; } _UTF8State; -typedef struct { -} _UTF8EncodingInfo; - -typedef struct { - _UTF8EncodingInfo ei; - struct { - /* for future multi-locale facility */ - _UTF8State s_mblen; - _UTF8State s_mbrlen; - _UTF8State s_mbrtowc; - _UTF8State s_mbtowc; - _UTF8State s_mbsrtowcs; - _UTF8State s_wcrtomb; - _UTF8State s_wcsrtombs; - _UTF8State s_wctomb; - } states; -} _UTF8CTypeInfo; +typedef void *_UTF8EncodingInfo; #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_ei_, _func_) (_ei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_UTF8_##m #define _ENCODING_INFO _UTF8EncodingInfo -#define _CTYPE_INFO _UTF8CTypeInfo #define _ENCODING_STATE _UTF8State #define _ENCODING_MB_CUR_MAX(_ei_) 6 #define _ENCODING_IS_STATE_DEPENDENT 0 #define _STATE_NEEDS_EXPLICIT_INIT(_ps_) 0 - -static __inline void -_UTF8_init_count(void) -{ - int i; - if (!_UTF8_count) { - memset(_UTF8_count_array, 0, sizeof(_UTF8_count_array)); - for (i = 0; i <= 0x7f; i++) - _UTF8_count_array[i] = 1; - for (i = 0xc0; i <= 0xdf; i++) - _UTF8_count_array[i] = 2; - for (i = 0xe0; i <= 0xef; i++) - _UTF8_count_array[i] = 3; - for (i = 0xf0; i <= 0xf7; i++) - _UTF8_count_array[i] = 4; - for (i = 0xf8; i <= 0xfb; i++) - _UTF8_count_array[i] = 5; - for (i = 0xfc; i <= 0xfd; i++) - _UTF8_count_array[i] = 6; - _UTF8_count = _UTF8_count_array; - } -} - -static int +static size_t _UTF8_findlen(wchar_t v) { - int i; - u_int32_t c; + size_t i; + uint32_t c; - c = (u_int32_t)v; /*XXX*/ + c = (uint32_t)v; /*XXX*/ for (i = 1; i < sizeof(_UTF8_range) / sizeof(_UTF8_range[0]) - 1; i++) if (c >= _UTF8_range[i] && c < _UTF8_range[i + 1]) - return i; + return (i); - return -1; /*out of range*/ + return (-1); /*out of range*/ } -static __inline int +static __inline bool _UTF8_surrogate(wchar_t wc) { - return wc >= 0xd800 && wc <= 0xdfff; + + return (wc >= 0xd800 && wc <= 0xdfff); } static __inline void /*ARGSUSED*/ _citrus_UTF8_init_state(_UTF8EncodingInfo *ei __unused, _UTF8State *s) { + s->chlen = 0; } static __inline void /*ARGSUSED*/ _citrus_UTF8_pack_state(_UTF8EncodingInfo *ei __unused, void *pspriv, - const _UTF8State *s) + const _UTF8State *s) { + memcpy(pspriv, (const void *)s, sizeof(*s)); } static __inline void /*ARGSUSED*/ _citrus_UTF8_unpack_state(_UTF8EncodingInfo *ei __unused, _UTF8State *s, - const void *pspriv) + const void *pspriv) { + memcpy((void *)s, pspriv, sizeof(*s)); } static int _citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s, - size_t n, _UTF8State *psenc, size_t *nresult) + size_t n, _UTF8State *psenc, size_t *nresult) { - wchar_t wchar; const char *s0; - int c; + wchar_t wchar; int i; - - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); + uint8_t c; s0 = *s; if (s0 == NULL) { _citrus_UTF8_init_state(ei, psenc); *nresult = 0; /* state independent */ - return 0; + return (0); } /* make sure we have the first byte in the buffer */ @@ -246,29 +226,26 @@ _citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s, *s = s0; psenc->chlen = 0; - return 0; + return (0); ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); restart: *s = s0; *nresult = (size_t)-2; - return 0; + return (0); } static int -_citrus_UTF8_wcrtomb_priv(_UTF8EncodingInfo *ei __unused, - char *s, size_t n, wchar_t wc, - _UTF8State *psenc __unused, size_t *nresult) +_citrus_UTF8_wcrtomb_priv(_UTF8EncodingInfo *ei __unused, char *s, size_t n, + wchar_t wc, _UTF8State *psenc __unused, size_t *nresult) { - int cnt, i, ret; wchar_t c; + size_t cnt; + int i, ret; - _DIAGASSERT(nresult != NULL); - _DIAGASSERT(s != NULL); - if (_UTF8_surrogate(wc)) { ret = EILSEQ; goto err; @@ -301,23 +278,20 @@ _citrus_UTF8_wcrtomb_priv(_UTF8EncodingInfo *ei __unused, } *nresult = (size_t)cnt; - return 0; + return (0); err: *nresult = (size_t)-1; - return ret; + return (ret); } static __inline int /*ARGSUSED*/ _citrus_UTF8_stdenc_wctocs(_UTF8EncodingInfo * __restrict ei __unused, - _csid_t * __restrict csid, - _index_t * __restrict idx, - wchar_t wc) + _csid_t * __restrict csid, _index_t * __restrict idx, + wchar_t wc) { - _DIAGASSERT(csid != NULL && idx != NULL); - *csid = 0; *idx = (_citrus_index_t)wc; @@ -327,12 +301,9 @@ _citrus_UTF8_stdenc_wctocs(_UTF8EncodingInfo * __restrict ei __unused, static __inline int /*ARGSUSED*/ _citrus_UTF8_stdenc_cstowc(_UTF8EncodingInfo * __restrict ei __unused, - wchar_t * __restrict wc, - _csid_t csid, _index_t idx) + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - _DIAGASSERT(wc != NULL); - if (csid != 0) return (EILSEQ); @@ -344,44 +315,29 @@ _citrus_UTF8_stdenc_cstowc(_UTF8EncodingInfo * __restrict ei __unused, static __inline int /*ARGSUSED*/ _citrus_UTF8_stdenc_get_state_desc_generic(_UTF8EncodingInfo * __restrict ei __unused, - _UTF8State * __restrict psenc, - int * __restrict rstate) + _UTF8State * __restrict psenc, int * __restrict rstate) { - if (psenc->chlen == 0) - *rstate = _STDENC_SDGEN_INITIAL; - else - *rstate = _STDENC_SDGEN_INCOMPLETE_CHAR; - - return 0; + *rstate = (psenc->chlen == 0) ? _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; + return (0); } static int /*ARGSUSED*/ _citrus_UTF8_encoding_module_init(_UTF8EncodingInfo * __restrict ei __unused, - const void * __restrict var __unused, - size_t lenvar __unused) + const void * __restrict var __unused, size_t lenvar __unused) { - _UTF8_init_count(); - return 0; + return (0); } static void /*ARGSUSED*/ _citrus_UTF8_encoding_module_uninit(_UTF8EncodingInfo *ei __unused) { -} - -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(UTF8); -_CITRUS_CTYPE_DEF_OPS(UTF8); - -#include "citrus_ctype_template.h" +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_utf8.h b/lib/i18n_module/UTF8/citrus_utf8.h similarity index 86% rename from lib/libc/citrus/modules/citrus_utf8.h rename to lib/i18n_module/UTF8/citrus_utf8.h index 8c5ac82641..9730e5ac81 100644 --- a/lib/libc/citrus/modules/citrus_utf8.h +++ b/lib/i18n_module/UTF8/citrus_utf8.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_utf8.h,v 1.2 2003/06/25 09:51:49 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_utf8.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/UTF8/citrus_utf8.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_utf8.h,v 1.2 2003/06/25 09:51:49 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_UTF8_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(UTF8); _CITRUS_STDENC_GETOPS_FUNC(UTF8); __END_DECLS diff --git a/lib/i18n_module/VIQR/Makefile b/lib/i18n_module/VIQR/Makefile index 7ddd00e355..4718417a64 100644 --- a/lib/i18n_module/VIQR/Makefile +++ b/lib/i18n_module/VIQR/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/VIQR/Makefile,v 1.1 2008/04/10 10:21:01 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/VIQR/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= VIQR +SRCS+= citrus_viqr.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_viqr.c b/lib/i18n_module/VIQR/citrus_viqr.c similarity index 71% rename from lib/libc/citrus/modules/citrus_viqr.c rename to lib/i18n_module/VIQR/citrus_viqr.c index f76ce7be67..c54e76ba1b 100644 --- a/lib/libc/citrus/modules/citrus_viqr.c +++ b/lib/i18n_module/VIQR/citrus_viqr.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_viqr.c,v 1.3 2006/11/22 20:11:03 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_viqr.c,v 1.1 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/VIQR/citrus_viqr.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_viqr.c,v 1.4 2008/06/14 16:01:08 tnozaki Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -28,23 +28,23 @@ * */ +#include #include #include + #include #include -#include +#include +#include #include #include -#include -#include +#include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_viqr.h" @@ -89,8 +89,8 @@ static const char *mnemonic_rfc1456[0x100] = { }; typedef struct { - const char *name; - wchar_t value; + const char *name; + wchar_t value; } mnemonic_def_t; static const mnemonic_def_t mnemonic_ext[] = { @@ -104,28 +104,26 @@ mnemonic_ext_find(wchar_t wc, const mnemonic_def_t *head, size_t n) { const mnemonic_def_t *mid; - _DIAGASSERT(head != NULL); - for (; n > 0; n >>= 1) { mid = head + (n >> 1); - if (mid->value == wc) { - return mid->name; - } else if (mid->value < wc) { + if (mid->value == wc) + return (mid->name); + else if (mid->value < wc) { head = mid + 1; --n; } } - return NULL; + return (NULL); } struct mnemonic_t; typedef TAILQ_HEAD(mnemonic_list_t, mnemonic_t) mnemonic_list_t; typedef struct mnemonic_t { - TAILQ_ENTRY(mnemonic_t) entry; - int ascii; - struct mnemonic_t *parent; - mnemonic_list_t child; - wchar_t value; + TAILQ_ENTRY(mnemonic_t) entry; + struct mnemonic_t *parent; + mnemonic_list_t child; + wchar_t value; + int ascii; } mnemonic_t; static mnemonic_t * @@ -133,14 +131,12 @@ mnemonic_list_find(mnemonic_list_t *ml, int ch) { mnemonic_t *m; - _DIAGASSERT(ml != NULL); - TAILQ_FOREACH(m, ml, entry) { if (m->ascii == ch) - return m; + return (m); } - return NULL; + return (NULL); } static mnemonic_t * @@ -148,8 +144,6 @@ mnemonic_create(mnemonic_t *parent, int ascii, wchar_t value) { mnemonic_t *m; - _DIAGASSERT(parent != NULL); - m = malloc(sizeof(*m)); if (m != NULL) { m->parent = parent; @@ -158,27 +152,24 @@ mnemonic_create(mnemonic_t *parent, int ascii, wchar_t value) TAILQ_INIT(&m->child); } - return m; + return (m); } static int mnemonic_append_child(mnemonic_t *m, const char *s, - wchar_t value, wchar_t invalid) + wchar_t value, wchar_t invalid) { - int ch; mnemonic_t *m0; - - _DIAGASSERT(m != NULL); - _DIAGASSERT(s != NULL); + int ch; ch = (unsigned char)*s++; if (ch == '\0') - return EINVAL; + return (EINVAL); m0 = mnemonic_list_find(&m->child, ch); if (m0 == NULL) { m0 = mnemonic_create(m, ch, (wchar_t)ch); if (m0 == NULL) - return ENOMEM; + return (ENOMEM); TAILQ_INSERT_TAIL(&m->child, m0, entry); } m = m0; @@ -187,16 +178,16 @@ mnemonic_append_child(mnemonic_t *m, const char *s, if (m0 == NULL) { m0 = mnemonic_create(m, ch, invalid); if (m0 == NULL) - return ENOMEM; + return (ENOMEM); TAILQ_INSERT_TAIL(&m->child, m0, entry); } m = m0; } if (m0 == NULL) - return EINVAL; + return (EINVAL); m0->value = value; - return 0; + return (0); } static void @@ -204,45 +195,27 @@ mnemonic_destroy(mnemonic_t *m) { mnemonic_t *m0; - _DIAGASSERT(m != NULL); - TAILQ_FOREACH(m0, &m->child, entry) mnemonic_destroy(m0); free(m); } typedef struct { - size_t mb_cur_max; - wchar_t invalid; - mnemonic_t *mroot; + mnemonic_t *mroot; + wchar_t invalid; + size_t mb_cur_max; } _VIQREncodingInfo; typedef struct { - int chlen; - char ch[MB_LEN_MAX]; + int chlen; + char ch[MB_LEN_MAX]; } _VIQRState; -typedef struct { - _VIQREncodingInfo ei; - struct { - /* for future multi-locale facility */ - _VIQRState s_mblen; - _VIQRState s_mbrlen; - _VIQRState s_mbrtowc; - _VIQRState s_mbtowc; - _VIQRState s_mbsrtowcs; - _VIQRState s_wcrtomb; - _VIQRState s_wcsrtombs; - _VIQRState s_wctomb; - } states; -} _VIQRCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_VIQR_##m #define _ENCODING_INFO _VIQREncodingInfo -#define _CTYPE_INFO _VIQRCTypeInfo #define _ENCODING_STATE _VIQRState #define _ENCODING_MB_CUR_MAX(_ei_) (_ei_)->mb_cur_max #define _ENCODING_IS_STATE_DEPENDENT 1 @@ -250,60 +223,46 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_VIQR_init_state(_VIQREncodingInfo * __restrict ei, - _VIQRState * __restrict psenc) +_citrus_VIQR_init_state(_VIQREncodingInfo * __restrict ei __unused, + _VIQRState * __restrict psenc) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); psenc->chlen = 0; } static __inline void /*ARGSUSED*/ -_citrus_VIQR_pack_state(_VIQREncodingInfo * __restrict ei, - void *__restrict pspriv, const _VIQRState * __restrict psenc) +_citrus_VIQR_pack_state(_VIQREncodingInfo * __restrict ei __unused, + void *__restrict pspriv, const _VIQRState * __restrict psenc) { - /* ei may be unused */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_VIQR_unpack_state(_VIQREncodingInfo * __restrict ei, - _VIQRState * __restrict psenc, const void * __restrict pspriv) +_citrus_VIQR_unpack_state(_VIQREncodingInfo * __restrict ei __unused, + _VIQRState * __restrict psenc, const void * __restrict pspriv) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } static int _citrus_VIQR_mbrtowc_priv(_VIQREncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, - _VIQRState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + _VIQRState * __restrict psenc, size_t * __restrict nresult) { + mnemonic_t *m, *m0; const char *s0; wchar_t wc; - mnemonic_t *m, *m0; - size_t i; + ssize_t i; int ch, escape; - _DIAGASSERT(ei != NULL); - /* pwc may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (*s == NULL) { _citrus_VIQR_init_state(ei, psenc); *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; - return 0; + return (0); } s0 = *s; @@ -314,7 +273,7 @@ _citrus_VIQR_mbrtowc_priv(_VIQREncodingInfo * __restrict ei, if (n-- < 1) { *s = s0; *nresult = (size_t)-2; - return 0; + return (0); } psenc->ch[psenc->chlen++] = *s0++; } @@ -348,28 +307,23 @@ _citrus_VIQR_mbrtowc_priv(_VIQREncodingInfo * __restrict ei, *nresult = (size_t)(wc == 0 ? 0 : s0 - *s); *s = s0; - return 0; + return (0); } static int _citrus_VIQR_wcrtomb_priv(_VIQREncodingInfo * __restrict ei, - char * __restrict s, size_t n, wchar_t wc, - _VIQRState * __restrict psenc, size_t * __restrict nresult) + char * __restrict s, size_t n, wchar_t wc, + _VIQRState * __restrict psenc, size_t * __restrict nresult) { mnemonic_t *m; - int ch, escape; const char *p; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); + int ch = 0; switch (psenc->chlen) { case 0: case 1: break; default: - return EINVAL; + return (EINVAL); } m = NULL; if ((uint32_t)wc <= 0xFF) { @@ -383,7 +337,7 @@ _citrus_VIQR_wcrtomb_priv(_VIQREncodingInfo * __restrict ei, if (psenc->chlen > 0) { m = mnemonic_list_find(&m->child, psenc->ch[0]); if (m == NULL) - return EINVAL; + return (EINVAL); psenc->ch[0] = ESCAPE; } if (mnemonic_list_find(&m->child, ch) == NULL) { @@ -395,7 +349,7 @@ _citrus_VIQR_wcrtomb_priv(_VIQREncodingInfo * __restrict ei, p = mnemonic_ext_find(wc, &mnemonic_ext[0], mnemonic_ext_size); if (p == NULL) { *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } else { mnemonic_found: psenc->chlen = 0; @@ -411,74 +365,63 @@ mnemonic_found: if (m == ei->mroot) { psenc->ch[0] = ch; psenc->chlen = 1; - } else { + } else psenc->chlen = 0; - } - return 0; + return (0); e2big: *nresult = (size_t)-1; - return E2BIG; + return (E2BIG); } static int /* ARGSUSED */ -_citrus_VIQR_put_state_reset(_VIQREncodingInfo * __restrict ei, - char * __restrict s, size_t n, _VIQRState * __restrict psenc, - size_t * __restrict nresult) +_citrus_VIQR_put_state_reset(_VIQREncodingInfo * __restrict ei __unused, + char * __restrict s __unused, size_t n __unused, + _VIQRState * __restrict psenc, size_t * __restrict nresult) { - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); switch (psenc->chlen) { case 0: case 1: break; default: - return EINVAL; + return (EINVAL); } *nresult = 0; psenc->chlen = 0; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_VIQR_stdenc_wctocs(_VIQREncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +_citrus_VIQR_stdenc_wctocs(_VIQREncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - /* ei may be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); *csid = 0; *idx = (_index_t)wc; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_VIQR_stdenc_cstowc(_VIQREncodingInfo * __restrict ei, - wchar_t * __restrict pwc, _csid_t csid, _index_t idx) +_citrus_VIQR_stdenc_cstowc(_VIQREncodingInfo * __restrict ei __unused, + wchar_t * __restrict pwc, _csid_t csid, _index_t idx) { - /* ei may be unused */ - _DIAGASSERT(pwc != NULL); if (csid != 0) - return EILSEQ; + return (EILSEQ); *pwc = (wchar_t)idx; - return 0; + return (0); } static void _citrus_VIQR_encoding_module_uninit(_VIQREncodingInfo *ei) { - _DIAGASSERT(ei != NULL); mnemonic_destroy(ei->mroot); } @@ -486,79 +429,61 @@ _citrus_VIQR_encoding_module_uninit(_VIQREncodingInfo *ei) static int /*ARGSUSED*/ _citrus_VIQR_encoding_module_init(_VIQREncodingInfo * __restrict ei, - const void * __restrict var, size_t lenvar) + const void * __restrict var __unused, size_t lenvar __unused) { - int errnum; + const mnemonic_def_t *p; const char *s; size_t i, n; - const mnemonic_def_t *p; - - _DIAGASSERT(ei != NULL); - /* var may be unused */ + int errnum; ei->mb_cur_max = 1; ei->invalid = (wchar_t)-1; ei->mroot = mnemonic_create(NULL, '\0', ei->invalid); if (ei->mroot == NULL) - return ENOMEM; + return (ENOMEM); for (i = 0; i < sizeof(mnemonic_rfc1456) / sizeof(const char *); ++i) { s = mnemonic_rfc1456[i]; if (s == NULL) continue; n = strlen(s); - _DIAGASSERT(n <= MB_LEN_MAX); if (ei->mb_cur_max < n) ei->mb_cur_max = n; errnum = mnemonic_append_child(ei->mroot, s, (wchar_t)i, ei->invalid); if (errnum != 0) { _citrus_VIQR_encoding_module_uninit(ei); - return errnum; + return (errnum); } } - for (i = 0; i < mnemonic_ext_size; ++i) { + for (i = 0;; ++i) { p = &mnemonic_ext[i]; - _DIAGASSERT(p != NULL && p->name != NULL); n = strlen(p->name); - _DIAGASSERT(n <= MB_LEN_MAX); if (ei->mb_cur_max < n) ei->mb_cur_max = n; errnum = mnemonic_append_child(ei->mroot, p->name, p->value, ei->invalid); if (errnum != 0) { _citrus_VIQR_encoding_module_uninit(ei); - return errnum; + return (errnum); } } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_VIQR_stdenc_get_state_desc_generic(_VIQREncodingInfo * __restrict ei, - _VIQRState * __restrict psenc, int * __restrict rstate) +_citrus_VIQR_stdenc_get_state_desc_generic(_VIQREncodingInfo * __restrict ei __unused, + _VIQRState * __restrict psenc, int * __restrict rstate) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); - *rstate = (psenc->chlen == 0) - ? _STDENC_SDGEN_INITIAL - : _STDENC_SDGEN_INCOMPLETE_CHAR; + *rstate = (psenc->chlen == 0) ? + _STDENC_SDGEN_INITIAL : + _STDENC_SDGEN_INCOMPLETE_CHAR; - return 0; + return (0); } -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(VIQR); -_CITRUS_CTYPE_DEF_OPS(VIQR); - -#include "citrus_ctype_template.h" - /* ---------------------------------------------------------------------- * public interface for stdenc */ diff --git a/lib/libc/citrus/modules/citrus_viqr.h b/lib/i18n_module/VIQR/citrus_viqr.h similarity index 92% rename from lib/libc/citrus/modules/citrus_viqr.h rename to lib/i18n_module/VIQR/citrus_viqr.h index 6af60d6dc2..37a55afea1 100644 --- a/lib/libc/citrus/modules/citrus_viqr.h +++ b/lib/i18n_module/VIQR/citrus_viqr.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/VIQR/citrus_viqr.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_viqr.h,v 1.1 2006/11/13 15:16:31 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_viqr.h,v 1.1 2008/04/10 10:21:02 hasso Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_VIQR_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(VIQR); _CITRUS_STDENC_GETOPS_FUNC(VIQR); __END_DECLS diff --git a/lib/i18n_module/ZW/Makefile b/lib/i18n_module/ZW/Makefile index 702f755744..ae10c91a27 100644 --- a/lib/i18n_module/ZW/Makefile +++ b/lib/i18n_module/ZW/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/ZW/Makefile,v 1.1 2008/04/10 10:21:01 hasso Exp $ +# $FreeBSD: head/lib/libiconv_modules/ZW/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= ZW +SRCS+= citrus_zw.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_zw.c b/lib/i18n_module/ZW/citrus_zw.c similarity index 68% rename from lib/libc/citrus/modules/citrus_zw.c rename to lib/i18n_module/ZW/citrus_zw.c index 2edc314c43..6ac3598d05 100644 --- a/lib/libc/citrus/modules/citrus_zw.c +++ b/lib/i18n_module/ZW/citrus_zw.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_zw.c,v 1.3 2006/11/24 17:27:52 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_zw.c,v 1.1 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/ZW/citrus_zw.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_zw.c,v 1.4 2008/06/14 16:01:08 tnozaki Exp $ */ /*- * Copyright (c)2004, 2006 Citrus Project, @@ -27,23 +27,23 @@ * SUCH DAMAGE. * */ - + +#include #include + #include #include -#include +#include +#include #include #include #include -#include -#include +#include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_stdenc.h" #include "citrus_zw.h" @@ -52,7 +52,7 @@ */ typedef struct { - int dummy; + int dummy; } _ZWEncodingInfo; typedef enum { @@ -60,32 +60,16 @@ typedef enum { } _ZWCharset; typedef struct { - int chlen; - char ch[4]; - _ZWCharset charset; + _ZWCharset charset; + int chlen; + char ch[4]; } _ZWState; -typedef struct { - _ZWEncodingInfo ei; - struct { - /* for future multi-locale facility */ - _ZWState s_mblen; - _ZWState s_mbrlen; - _ZWState s_mbrtowc; - _ZWState s_mbtowc; - _ZWState s_mbsrtowcs; - _ZWState s_wcrtomb; - _ZWState s_wcsrtombs; - _ZWState s_wctomb; - } states; -} _ZWCTypeInfo; - #define _CEI_TO_EI(_cei_) (&(_cei_)->ei) #define _CEI_TO_STATE(_cei_, _func_) (_cei_)->states.s_##_func_ #define _FUNCNAME(m) _citrus_ZW_##m #define _ENCODING_INFO _ZWEncodingInfo -#define _CTYPE_INFO _ZWCTypeInfo #define _ENCODING_STATE _ZWState #define _ENCODING_MB_CUR_MAX(_ei_) MB_LEN_MAX #define _ENCODING_IS_STATE_DEPENDENT 1 @@ -93,11 +77,9 @@ typedef struct { static __inline void /*ARGSUSED*/ -_citrus_ZW_init_state(_ZWEncodingInfo * __restrict ei, - _ZWState * __restrict psenc) +_citrus_ZW_init_state(_ZWEncodingInfo * __restrict ei __unused, + _ZWState * __restrict psenc) { - /* ei my be unused */ - _DIAGASSERT(psenc != NULL); psenc->chlen = 0; psenc->charset = NONE; @@ -105,47 +87,35 @@ _citrus_ZW_init_state(_ZWEncodingInfo * __restrict ei, static __inline void /*ARGSUSED*/ -_citrus_ZW_pack_state(_ZWEncodingInfo * __restrict ei, - void *__restrict pspriv, const _ZWState * __restrict psenc) +_citrus_ZW_pack_state(_ZWEncodingInfo * __restrict ei __unused, + void *__restrict pspriv, const _ZWState * __restrict psenc) { - /* ei may be unused */ - _DIAGASSERT(pspriv != NULL); - _DIAGASSERT(psenc != NULL); memcpy(pspriv, (const void *)psenc, sizeof(*psenc)); } static __inline void /*ARGSUSED*/ -_citrus_ZW_unpack_state(_ZWEncodingInfo * __restrict ei, - _ZWState * __restrict psenc, const void * __restrict pspriv) +_citrus_ZW_unpack_state(_ZWEncodingInfo * __restrict ei __unused, + _ZWState * __restrict psenc, const void * __restrict pspriv) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(pspriv != NULL); memcpy((void *)psenc, pspriv, sizeof(*psenc)); } static int _citrus_ZW_mbrtowc_priv(_ZWEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char **__restrict s, size_t n, - _ZWState * __restrict psenc, size_t * __restrict nresult) + wchar_t * __restrict pwc, const char **__restrict s, size_t n, + _ZWState * __restrict psenc, size_t * __restrict nresult) { const char *s0; + wchar_t wc; int ch, len; - wchar_t wc; - - /* ei may be unused */ - /* pwc may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); if (*s == NULL) { _citrus_ZW_init_state(ei, psenc); *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; - return 0; + return (0); } s0 = *s; len = 0; @@ -155,7 +125,7 @@ do { \ if (n-- < 1) { \ *nresult = (size_t)-2; \ *s = s0; \ - return 0; \ + return (0); \ } \ ch = (unsigned char)*s0++; \ if (len++ > MB_LEN_MAX || ch > 0x7F)\ @@ -177,7 +147,7 @@ loop: case 1: break; default: - return EINVAL; + return (EINVAL); } ch = (unsigned char)psenc->ch[0]; if (ch > 0x7F) @@ -187,7 +157,7 @@ loop: break; case NONE: if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); STORE; ch = (unsigned char)psenc->ch[0]; if (ch != 'z') { @@ -202,7 +172,7 @@ loop: /* FALLTHROUGH */ case AMBIGIOUS: if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); STORE; if (psenc->ch[0] != 'W') { psenc->charset = ASCII; @@ -256,17 +226,17 @@ loop: if (ch < 0x21 || ch > 0x7E) { ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } wc |= (wchar_t)ch; psenc->chlen = 0; break; default: - return EINVAL; + return (EINVAL); } break; default: - return EINVAL; + return (EINVAL); } if (pwc != NULL) *pwc = wc; @@ -274,33 +244,28 @@ ilseq: *nresult = (size_t)(wc == 0 ? 0 : len); *s = s0; - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei, - char *__restrict s, size_t n, wchar_t wc, - _ZWState * __restrict psenc, size_t * __restrict nresult) +_citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei __unused, + char *__restrict s, size_t n, wchar_t wc, + _ZWState * __restrict psenc, size_t * __restrict nresult) { int ch; - /* ei may be null */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); - if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); if ((uint32_t)wc <= 0x7F) { ch = (unsigned char)wc; switch (psenc->charset) { case NONE: - if (ch == '\0' || ch == '\n') { + if (ch == '\0' || ch == '\n') psenc->ch[psenc->chlen++] = ch; - } else { + else { if (n < 4) - return E2BIG; + return (E2BIG); n -= 4; psenc->ch[psenc->chlen++] = 'z'; psenc->ch[psenc->chlen++] = 'W'; @@ -311,7 +276,7 @@ _citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei, break; case GB2312: if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; if (ch == '\0') { psenc->ch[psenc->chlen++] = '\n'; @@ -327,13 +292,13 @@ _citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei, } break; default: - return EINVAL; + return (EINVAL); } } else if ((uint32_t)wc <= 0x7E7E) { switch (psenc->charset) { case NONE: if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; psenc->ch[psenc->chlen++] = 'z'; psenc->ch[psenc->chlen++] = 'W'; @@ -341,7 +306,7 @@ _citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei, /* FALLTHROUGH*/ case GB2312: if (n < 2) - return E2BIG; + return (E2BIG); n -= 2; ch = (wc >> 8) & 0xFF; if (ch < 0x21 || ch > 0x7E) @@ -353,37 +318,33 @@ _citrus_ZW_wcrtomb_priv(_ZWEncodingInfo * __restrict ei, psenc->ch[psenc->chlen++] = ch; break; default: - return EINVAL; + return (EINVAL); } } else { ilseq: *nresult = (size_t)-1; - return EILSEQ; + return (EILSEQ); } memcpy(s, psenc->ch, psenc->chlen); *nresult = psenc->chlen; psenc->chlen = 0; - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_ZW_put_state_reset(_ZWEncodingInfo * __restrict ei, - char * __restrict s, size_t n, - _ZWState * __restrict psenc, size_t * __restrict nresult) +_citrus_ZW_put_state_reset(_ZWEncodingInfo * __restrict ei __unused, + char * __restrict s, size_t n, _ZWState * __restrict psenc, + size_t * __restrict nresult) { - /* ei may be unused */ - _DIAGASSERT(s != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(nresult != NULL); if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); switch (psenc->charset) { case GB2312: if (n-- < 1) - return E2BIG; + return (E2BIG); psenc->ch[psenc->chlen++] = '\n'; psenc->charset = NONE; /*FALLTHROUGH*/ @@ -395,30 +356,27 @@ _citrus_ZW_put_state_reset(_ZWEncodingInfo * __restrict ei, } break; default: - return EINVAL; + return (EINVAL); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_ZW_stdenc_get_state_desc_generic(_ZWEncodingInfo * __restrict ei, - _ZWState * __restrict psenc, int * __restrict rstate) +_citrus_ZW_stdenc_get_state_desc_generic(_ZWEncodingInfo * __restrict ei __unused, + _ZWState * __restrict psenc, int * __restrict rstate) { - /* ei may be unused */ - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(rstate != NULL); switch (psenc->charset) { case NONE: if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); *rstate = _STDENC_SDGEN_INITIAL; break; case AMBIGIOUS: if (psenc->chlen != 0) - return EINVAL; + return (EINVAL); *rstate = _STDENC_SDGEN_INCOMPLETE_SHIFT; break; case ASCII: @@ -428,76 +386,64 @@ _citrus_ZW_stdenc_get_state_desc_generic(_ZWEncodingInfo * __restrict ei, *rstate = _STDENC_SDGEN_STABLE; break; case 1: - *rstate = (psenc->ch[0] == '#') - ? _STDENC_SDGEN_INCOMPLETE_SHIFT - : _STDENC_SDGEN_INCOMPLETE_CHAR; + *rstate = (psenc->ch[0] == '#') ? + _STDENC_SDGEN_INCOMPLETE_SHIFT : + _STDENC_SDGEN_INCOMPLETE_CHAR; break; default: - return EINVAL; + return (EINVAL); } break; default: - return EINVAL; + return (EINVAL); } - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_ZW_stdenc_wctocs(_ZWEncodingInfo * __restrict ei, - _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) +_citrus_ZW_stdenc_wctocs(_ZWEncodingInfo * __restrict ei __unused, + _csid_t * __restrict csid, _index_t * __restrict idx, wchar_t wc) { - /* ei seems to be unused */ - _DIAGASSERT(csid != NULL); - _DIAGASSERT(idx != NULL); - *csid = (_csid_t)(wc <= 0x7FU) ? 0 : 1; + *csid = (_csid_t)(wc <= (wchar_t)0x7FU) ? 0 : 1; *idx = (_index_t)wc; - return 0; + return (0); } static __inline int /*ARGSUSED*/ -_citrus_ZW_stdenc_cstowc(_ZWEncodingInfo * __restrict ei, - wchar_t * __restrict wc, _csid_t csid, _index_t idx) +_citrus_ZW_stdenc_cstowc(_ZWEncodingInfo * __restrict ei __unused, + wchar_t * __restrict wc, _csid_t csid, _index_t idx) { - /* ei seems to be unused */ - _DIAGASSERT(wc != NULL); switch (csid) { case 0: case 1: break; default: - return EINVAL; + return (EINVAL); } *wc = (wchar_t)idx; - return 0; + return (0); } static void /*ARGSUSED*/ -_citrus_ZW_encoding_module_uninit(_ZWEncodingInfo *ei) +_citrus_ZW_encoding_module_uninit(_ZWEncodingInfo *ei __unused) { + } static int /*ARGSUSED*/ -_citrus_ZW_encoding_module_init(_ZWEncodingInfo * __restrict ei, - const void *__restrict var, size_t lenvar) +_citrus_ZW_encoding_module_init(_ZWEncodingInfo * __restrict ei __unused, + const void *__restrict var __unused, size_t lenvar __unused) { - return 0; -} -/* ---------------------------------------------------------------------- - * public interface for ctype - */ - -_CITRUS_CTYPE_DECLS(ZW); -_CITRUS_CTYPE_DEF_OPS(ZW); - -#include "citrus_ctype_template.h" + return (0); +} /* ---------------------------------------------------------------------- * public interface for stdenc diff --git a/lib/libc/citrus/modules/citrus_zw.h b/lib/i18n_module/ZW/citrus_zw.h similarity index 92% rename from lib/libc/citrus/modules/citrus_zw.h rename to lib/i18n_module/ZW/citrus_zw.h index e64fa41ecb..77b1c40e21 100644 --- a/lib/libc/citrus/modules/citrus_zw.h +++ b/lib/i18n_module/ZW/citrus_zw.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libiconv_modules/ZW/citrus_zw.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_zw.h,v 1.1 2006/11/22 23:38:27 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_zw.h,v 1.1 2008/04/10 10:21:02 hasso Exp $ */ /*- * Copyright (c)2004,2006 Citrus Project, @@ -31,7 +31,6 @@ #define _CITRUS_ZW_H_ __BEGIN_DECLS -_CITRUS_CTYPE_GETOPS_FUNC(ZW); _CITRUS_STDENC_GETOPS_FUNC(ZW); __END_DECLS diff --git a/lib/i18n_module/iconv_none/Makefile b/lib/i18n_module/iconv_none/Makefile index 92553db05f..6265205936 100644 --- a/lib/i18n_module/iconv_none/Makefile +++ b/lib/i18n_module/iconv_none/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/iconv_none/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/iconv_none/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= iconv_none +SRCS+= citrus_iconv_none.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_iconv_none.c b/lib/i18n_module/iconv_none/citrus_iconv_none.c similarity index 75% rename from lib/libc/citrus/modules/citrus_iconv_none.c rename to lib/i18n_module/iconv_none/citrus_iconv_none.c index 2fbd78395d..fe74ee5ed4 100644 --- a/lib/libc/citrus/modules/citrus_iconv_none.c +++ b/lib/i18n_module/iconv_none/citrus_iconv_none.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_iconv_none.c,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_iconv_none.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/iconv_none/citrus_iconv_none.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_iconv_none.c,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,10 +27,12 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include +#include #include #include @@ -49,11 +51,8 @@ _CITRUS_ICONV_DEF_OPS(iconv_none); /* ---------------------------------------------------------------------- */ int -_citrus_iconv_none_iconv_getops(struct _citrus_iconv_ops *ops, size_t lenops, - uint32_t expected_version) +_citrus_iconv_none_iconv_getops(struct _citrus_iconv_ops *ops) { - if (expected_version<_CITRUS_ICONV_ABI_VERSION || lenopsci_closure = NULL; - return 0; + return (0); } static void /*ARGSUSED*/ -_citrus_iconv_none_iconv_uninit_shared(struct _citrus_iconv_shared *ci) +_citrus_iconv_none_iconv_uninit_shared(struct _citrus_iconv_shared *ci __unused) { + } static int /*ARGSUSED*/ _citrus_iconv_none_iconv_init_context(struct _citrus_iconv *cv) { + cv->cv_closure = NULL; + return (0); } static void /*ARGSUSED*/ -_citrus_iconv_none_iconv_uninit_context(struct _citrus_iconv *cv) +_citrus_iconv_none_iconv_uninit_context(struct _citrus_iconv *cv __unused) { + } static int /*ARGSUSED*/ -_citrus_iconv_none_iconv_convert(struct _citrus_iconv * __restrict ci, - const char * __restrict * __restrict in, - size_t * __restrict inbytes, - char * __restrict * __restrict out, - size_t * __restrict outbytes, - u_int32_t flags, size_t * __restrict invalids) +_citrus_iconv_none_iconv_convert(struct _citrus_iconv * __restrict ci __unused, + const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict out, size_t * __restrict outbytes, + uint32_t flags __unused, size_t * __restrict invalids) { - int e2big; size_t len; + int e2big; + if ((in == NULL) || (out == NULL) || (inbytes == NULL)) + return (0); + if ((*in == NULL) || (*out == NULL) || (*inbytes == 0) || (*outbytes == 0)) + return (0); len = *inbytes; e2big = 0; if (*outbytes diff --git a/lib/libc/citrus/modules/citrus_iconv_std.c b/lib/i18n_module/iconv_std/citrus_iconv_std.c similarity index 76% rename from lib/libc/citrus/modules/citrus_iconv_std.c rename to lib/i18n_module/iconv_std/citrus_iconv_std.c index b5c00a0dcd..65b075cd7b 100644 --- a/lib/libc/citrus/modules/citrus_iconv_std.c +++ b/lib/i18n_module/iconv_std/citrus_iconv_std.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_iconv_std.c,v 1.15 2006/11/13 19:08:19 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/iconv_std/citrus_iconv_std.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_iconv_std.c,v 1.15 2006/11/13 19:08:19 tnozaki Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -26,12 +27,14 @@ * SUCH DAMAGE. */ -#include +#include #include #include + #include #include #include +#include #include #include #include @@ -59,14 +62,11 @@ _CITRUS_ICONV_DEF_OPS(iconv_std); /* ---------------------------------------------------------------------- */ int -_citrus_iconv_std_iconv_getops(struct _citrus_iconv_ops *ops, size_t lenops, - u_int32_t expected_version) +_citrus_iconv_std_iconv_getops(struct _citrus_iconv_ops *ops) { - if (expected_version<_CITRUS_ICONV_ABI_VERSION || lenopsse_ps) memcpy(se->se_pssaved, se->se_ps, - _stdenc_get_state_size(se->se_handle)); + _stdenc_get_state_size(se->se_handle)); } static __inline void restore_encoding_state(struct _citrus_iconv_std_encoding *se) { + if (se->se_ps) memcpy(se->se_ps, se->se_pssaved, - _stdenc_get_state_size(se->se_handle)); + _stdenc_get_state_size(se->se_handle)); } static __inline void init_encoding_state(struct _citrus_iconv_std_encoding *se) { + if (se->se_ps) _stdenc_init_state(se->se_handle, se->se_ps); } static __inline int mbtocsx(struct _citrus_iconv_std_encoding *se, - _csid_t *csid, _index_t *idx, const char **s, size_t n, - size_t *nresult) + _csid_t *csid, _index_t *idx, const char **s, size_t n, size_t *nresult, + struct iconv_hooks *hooks) { - return _stdenc_mbtocs(se->se_handle, csid, idx, s, n, se->se_ps, - nresult); + + return (_stdenc_mbtocs(se->se_handle, csid, idx, s, n, se->se_ps, + nresult, hooks)); } static __inline int cstombx(struct _citrus_iconv_std_encoding *se, - char *s, size_t n, _csid_t csid, _index_t idx, size_t *nresult) + char *s, size_t n, _csid_t csid, _index_t idx, size_t *nresult, + struct iconv_hooks *hooks) { - return _stdenc_cstomb(se->se_handle, s, n, csid, idx, se->se_ps, - nresult); + + return (_stdenc_cstomb(se->se_handle, s, n, csid, idx, se->se_ps, + nresult, hooks)); } static __inline int wctombx(struct _citrus_iconv_std_encoding *se, - char *s, size_t n, _wc_t wc, size_t *nresult) + char *s, size_t n, _wc_t wc, size_t *nresult, + struct iconv_hooks *hooks) { - return _stdenc_wctomb(se->se_handle, s, n, wc, se->se_ps, nresult); + + return (_stdenc_wctomb(se->se_handle, s, n, wc, se->se_ps, nresult, + hooks)); } static __inline int -put_state_resetx(struct _citrus_iconv_std_encoding *se, - char *s, size_t n, size_t *nresult) +put_state_resetx(struct _citrus_iconv_std_encoding *se, char *s, size_t n, + size_t *nresult) { - return _stdenc_put_state_reset(se->se_handle, s, n, se->se_ps, nresult); + + return (_stdenc_put_state_reset(se->se_handle, s, n, se->se_ps, nresult)); } static __inline int get_state_desc_gen(struct _citrus_iconv_std_encoding *se, int *rstate) { - int ret; struct _stdenc_state_desc ssd; + int ret; ret = _stdenc_get_state_desc(se->se_handle, se->se_ps, - _STDENC_SDID_GENERIC, &ssd); + _STDENC_SDID_GENERIC, &ssd); if (!ret) *rstate = ssd.u.generic.state; - return ret; + return (ret); } /* @@ -149,7 +159,7 @@ get_state_desc_gen(struct _citrus_iconv_std_encoding *se, int *rstate) */ static int init_encoding(struct _citrus_iconv_std_encoding *se, struct _stdenc *cs, - void *ps1, void *ps2) + void *ps1, void *ps2) { int ret = -1; @@ -162,28 +172,28 @@ init_encoding(struct _citrus_iconv_std_encoding *se, struct _stdenc *cs, if (!ret && se->se_pssaved) ret = _stdenc_init_state(cs, se->se_pssaved); - return ret; + return (ret); } static int open_csmapper(struct _csmapper **rcm, const char *src, const char *dst, - unsigned long *rnorm) + unsigned long *rnorm) { - int ret; struct _csmapper *cm; + int ret; ret = _csmapper_open(&cm, src, dst, 0, rnorm); if (ret) - return ret; + return (ret); if (_csmapper_get_src_max(cm) != 1 || _csmapper_get_dst_max(cm) != 1 || _csmapper_get_state_size(cm) != 0) { _csmapper_close(cm); - return EINVAL; + return (EINVAL); } *rcm = cm; - return 0; + return (0); } static void @@ -191,7 +201,7 @@ close_dsts(struct _citrus_iconv_std_dst_list *dl) { struct _citrus_iconv_std_dst *sd; - while ((sd=TAILQ_FIRST(dl)) != NULL) { + while ((sd = TAILQ_FIRST(dl)) != NULL) { TAILQ_REMOVE(dl, sd, sd_entry); _csmapper_close(sd->sd_mapper); free(sd); @@ -200,19 +210,19 @@ close_dsts(struct _citrus_iconv_std_dst_list *dl) static int open_dsts(struct _citrus_iconv_std_dst_list *dl, - const struct _esdb_charset *ec, const struct _esdb *dbdst) + const struct _esdb_charset *ec, const struct _esdb *dbdst) { - int i, ret; struct _citrus_iconv_std_dst *sd, *sdtmp; unsigned long norm; + int i, ret; sd = malloc(sizeof(*sd)); if (sd == NULL) - return errno; + return (errno); - for (i=0; idb_num_charsets; i++) { + for (i = 0; i < dbdst->db_num_charsets; i++) { ret = open_csmapper(&sd->sd_mapper, ec->ec_csname, - dbdst->db_charsets[i].ec_csname, &norm); + dbdst->db_charsets[i].ec_csname, &norm); if (ret == 0) { sd->sd_csid = dbdst->db_charsets[i].ec_csid; sd->sd_norm = norm; @@ -220,7 +230,7 @@ open_dsts(struct _citrus_iconv_std_dst_list *dl, TAILQ_FOREACH(sdtmp, dl, sd_entry) { if (sdtmp->sd_norm > norm) { TAILQ_INSERT_BEFORE(sdtmp, sd, - sd_entry); + sd_entry); sd = NULL; break; } @@ -231,16 +241,16 @@ open_dsts(struct _citrus_iconv_std_dst_list *dl, if (sd == NULL) { ret = errno; close_dsts(dl); - return ret; + return (ret); } } else if (ret != ENOENT) { close_dsts(dl); free(sd); - return ret; + return (ret); } } free(sd); - return 0; + return (0); } static void @@ -248,7 +258,7 @@ close_srcs(struct _citrus_iconv_std_src_list *sl) { struct _citrus_iconv_std_src *ss; - while ((ss=TAILQ_FIRST(sl)) != NULL) { + while ((ss = TAILQ_FIRST(sl)) != NULL) { TAILQ_REMOVE(sl, ss, ss_entry); close_dsts(&ss->ss_dsts); free(ss); @@ -257,18 +267,18 @@ close_srcs(struct _citrus_iconv_std_src_list *sl) static int open_srcs(struct _citrus_iconv_std_src_list *sl, - const struct _esdb *dbsrc, const struct _esdb *dbdst) + const struct _esdb *dbsrc, const struct _esdb *dbdst) { - int i, ret, count = 0; struct _citrus_iconv_std_src *ss; + int count = 0, i, ret; ss = malloc(sizeof(*ss)); if (ss == NULL) - return errno; + return (errno); TAILQ_INIT(&ss->ss_dsts); - for (i=0; idb_num_charsets; i++) { + for (i = 0; i < dbsrc->db_num_charsets; i++) { ret = open_dsts(&ss->ss_dsts, &dbsrc->db_charsets[i], dbdst); if (ret) goto err; @@ -286,12 +296,12 @@ open_srcs(struct _citrus_iconv_std_src_list *sl, } free(ss); - return count ? 0 : ENOENT; + return (count ? 0 : ENOENT); err: free(ss); close_srcs(sl); - return ret; + return (ret); } /* do convert a character */ @@ -299,59 +309,54 @@ err: static int /*ARGSUSED*/ do_conv(const struct _citrus_iconv_std_shared *is, - struct _citrus_iconv_std_context *sc __unused, _csid_t *csid, - _index_t *idx) + _csid_t *csid, _index_t *idx) { + struct _citrus_iconv_std_dst *sd; + struct _citrus_iconv_std_src *ss; _index_t tmpidx; int ret; - struct _citrus_iconv_std_src *ss; - struct _citrus_iconv_std_dst *sd; TAILQ_FOREACH(ss, &is->is_srcs, ss_entry) { if (ss->ss_csid == *csid) { TAILQ_FOREACH(sd, &ss->ss_dsts, sd_entry) { ret = _csmapper_convert(sd->sd_mapper, - &tmpidx, *idx, NULL); + &tmpidx, *idx, NULL); switch (ret) { case _MAPPER_CONVERT_SUCCESS: *csid = sd->sd_csid; *idx = tmpidx; - return 0; + return (0); case _MAPPER_CONVERT_NONIDENTICAL: break; case _MAPPER_CONVERT_SRC_MORE: /*FALLTHROUGH*/ case _MAPPER_CONVERT_DST_MORE: /*FALLTHROUGH*/ - case _MAPPER_CONVERT_FATAL: - return EINVAL; case _MAPPER_CONVERT_ILSEQ: - return EILSEQ; + return (EILSEQ); + case _MAPPER_CONVERT_FATAL: + return (EINVAL); } } break; } } - return E_NO_CORRESPONDING_CHAR; + return (E_NO_CORRESPONDING_CHAR); } /* ---------------------------------------------------------------------- */ static int /*ARGSUSED*/ _citrus_iconv_std_iconv_init_shared(struct _citrus_iconv_shared *ci, - const char * __restrict curdir __unused, - const char * __restrict src, - const char * __restrict dst, - const void * __restrict var __unused, - size_t lenvar __unused) + const char * __restrict src, const char * __restrict dst) { - int ret; + struct _citrus_esdb esdbdst, esdbsrc; struct _citrus_iconv_std_shared *is; - struct _citrus_esdb esdbsrc, esdbdst; + int ret; is = malloc(sizeof(*is)); - if (is==NULL) { + if (is == NULL) { ret = errno; goto err0; } @@ -362,11 +367,11 @@ _citrus_iconv_std_iconv_init_shared(struct _citrus_iconv_shared *ci, if (ret) goto err2; ret = _stdenc_open(&is->is_src_encoding, esdbsrc.db_encname, - esdbsrc.db_variable, esdbsrc.db_len_variable); + esdbsrc.db_variable, esdbsrc.db_len_variable); if (ret) goto err3; ret = _stdenc_open(&is->is_dst_encoding, esdbdst.db_encname, - esdbdst.db_variable, esdbdst.db_len_variable); + esdbdst.db_variable, esdbdst.db_len_variable); if (ret) goto err4; is->is_use_invalid = esdbdst.db_use_invalid; @@ -381,7 +386,7 @@ _citrus_iconv_std_iconv_init_shared(struct _citrus_iconv_shared *ci, _esdb_close(&esdbdst); ci->ci_closure = is; - return 0; + return (0); err5: _stdenc_close(is->is_dst_encoding); @@ -394,7 +399,7 @@ err2: err1: free(is); err0: - return ret; + return (ret); } static void @@ -416,8 +421,8 @@ _citrus_iconv_std_iconv_init_context(struct _citrus_iconv *cv) { const struct _citrus_iconv_std_shared *is = cv->cv_shared->ci_closure; struct _citrus_iconv_std_context *sc; - size_t szpssrc, szpsdst, sz; char *ptr; + size_t sz, szpsdst, szpssrc; szpssrc = _stdenc_get_state_size(is->is_src_encoding); szpsdst = _stdenc_get_state_size(is->is_dst_encoding); @@ -425,63 +430,60 @@ _citrus_iconv_std_iconv_init_context(struct _citrus_iconv *cv) sz = (szpssrc + szpsdst)*2 + sizeof(struct _citrus_iconv_std_context); sc = malloc(sz); if (sc == NULL) - return errno; + return (errno); ptr = (char *)&sc[1]; - if (szpssrc) + if (szpssrc > 0) init_encoding(&sc->sc_src_encoding, is->is_src_encoding, - ptr, ptr+szpssrc); + ptr, ptr+szpssrc); else init_encoding(&sc->sc_src_encoding, is->is_src_encoding, - NULL, NULL); + NULL, NULL); ptr += szpssrc*2; - if (szpsdst) + if (szpsdst > 0) init_encoding(&sc->sc_dst_encoding, is->is_dst_encoding, - ptr, ptr+szpsdst); + ptr, ptr+szpsdst); else init_encoding(&sc->sc_dst_encoding, is->is_dst_encoding, - NULL, NULL); + NULL, NULL); cv->cv_closure = (void *)sc; - return 0; + return (0); } static void _citrus_iconv_std_iconv_uninit_context(struct _citrus_iconv *cv) { + free(cv->cv_closure); } static int _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, - const char * __restrict * __restrict in, - size_t * __restrict inbytes, - char * __restrict * __restrict out, - size_t * __restrict outbytes, u_int32_t flags, - size_t * __restrict invalids) + const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict out, size_t * __restrict outbytes, + uint32_t flags, size_t * __restrict invalids) { const struct _citrus_iconv_std_shared *is = cv->cv_shared->ci_closure; struct _citrus_iconv_std_context *sc = cv->cv_closure; - _index_t idx; _csid_t csid; - int ret, state; - size_t szrin, szrout; - size_t inval; + _index_t idx; const char *tmpin; + size_t inval, szrin, szrout; + int ret, state = 0; inval = 0; - if (in==NULL || *in==NULL) { + if (in == NULL || *in == NULL) { /* special cases */ - if (out!=NULL && *out!=NULL) { + if (out != NULL && *out != NULL) { /* init output state and store the shift sequence */ save_encoding_state(&sc->sc_src_encoding); save_encoding_state(&sc->sc_dst_encoding); szrout = 0; ret = put_state_resetx(&sc->sc_dst_encoding, - *out, *outbytes, - &szrout); + *out, *outbytes, &szrout); if (ret) goto err; @@ -497,12 +499,12 @@ _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, init_encoding_state(&sc->sc_dst_encoding); init_encoding_state(&sc->sc_src_encoding); *invalids = 0; - return 0; + return (0); } /* normal case */ for (;;) { - if (*inbytes==0) { + if (*inbytes == 0) { ret = get_state_desc_gen(&sc->sc_src_encoding, &state); if (state == _STDENC_SDGEN_INITIAL || state == _STDENC_SDGEN_STABLE) @@ -516,8 +518,8 @@ _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, /* mb -> csid/index */ tmpin = *in; szrin = szrout = 0; - ret = mbtocsx(&sc->sc_src_encoding, &csid, &idx, - &tmpin, *inbytes, &szrin); + ret = mbtocsx(&sc->sc_src_encoding, &csid, &idx, &tmpin, + *inbytes, &szrin, cv->cv_shared->ci_hooks); if (ret) goto err; @@ -538,32 +540,31 @@ _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, goto err; } /* convert the character */ - ret = do_conv(is, sc, &csid, &idx); + ret = do_conv(is, &csid, &idx); if (ret) { if (ret == E_NO_CORRESPONDING_CHAR) { inval++; szrout = 0; - if ((flags&_CITRUS_ICONV_F_HIDE_INVALID)==0 && + if ((((flags & _CITRUS_ICONV_F_HIDE_INVALID) == 0) && + !cv->cv_shared->ci_discard_ilseq) && is->is_use_invalid) { ret = wctombx(&sc->sc_dst_encoding, - *out, *outbytes, - is->is_invalid, - &szrout); + *out, *outbytes, is->is_invalid, + &szrout, cv->cv_shared->ci_hooks); if (ret) goto err; } goto next; - } else { + } else goto err; - } } /* csid/index -> mb */ ret = cstombx(&sc->sc_dst_encoding, - *out, *outbytes, csid, idx, &szrout); + *out, *outbytes, csid, idx, &szrout, + cv->cv_shared->ci_hooks); if (ret) goto err; next: - _DIAGASSERT(*inbytes>=szrin && *outbytes>=szrout); *inbytes -= tmpin-*in; /* szrin is insufficient on \0. */ *in = tmpin; *outbytes -= szrout; @@ -571,12 +572,12 @@ next: } *invalids = inval; - return 0; + return (0); err: restore_encoding_state(&sc->sc_src_encoding); restore_encoding_state(&sc->sc_dst_encoding); *invalids = inval; - return ret; + return (ret); } diff --git a/lib/libc/citrus/modules/citrus_iconv_std.h b/lib/i18n_module/iconv_std/citrus_iconv_std.h similarity index 87% rename from lib/libc/citrus/modules/citrus_iconv_std.h rename to lib/i18n_module/iconv_std/citrus_iconv_std.h index d0049afa42..29db463445 100644 --- a/lib/libc/citrus/modules/citrus_iconv_std.h +++ b/lib/i18n_module/iconv_std/citrus_iconv_std.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_iconv_std.h,v 1.1 2003/06/25 09:51:44 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_iconv_std.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/iconv_std/citrus_iconv_std.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_iconv_std.h,v 1.1 2003/06/25 09:51:44 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libc/citrus/modules/citrus_iconv_std_local.h b/lib/i18n_module/iconv_std/citrus_iconv_std_local.h similarity index 76% rename from lib/libc/citrus/modules/citrus_iconv_std_local.h rename to lib/i18n_module/iconv_std/citrus_iconv_std_local.h index 08af43b219..b475e0fb0e 100644 --- a/lib/libc/citrus/modules/citrus_iconv_std_local.h +++ b/lib/i18n_module/iconv_std/citrus_iconv_std_local.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_iconv_std_local.h,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_iconv_std_local.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/iconv_std/citrus_iconv_std_local.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_iconv_std_local.h,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -43,10 +43,10 @@ struct _citrus_iconv_std_encoding { * dst */ struct _citrus_iconv_std_dst { - TAILQ_ENTRY(_citrus_iconv_std_dst) sd_entry; - _citrus_csid_t sd_csid; - unsigned long sd_norm; + TAILQ_ENTRY(_citrus_iconv_std_dst) sd_entry; struct _citrus_csmapper *sd_mapper; + _citrus_csid_t sd_csid; + unsigned long sd_norm; }; TAILQ_HEAD(_citrus_iconv_std_dst_list, _citrus_iconv_std_dst); @@ -54,9 +54,9 @@ TAILQ_HEAD(_citrus_iconv_std_dst_list, _citrus_iconv_std_dst); * src */ struct _citrus_iconv_std_src { - TAILQ_ENTRY(_citrus_iconv_std_src) ss_entry; - _citrus_csid_t ss_csid; - struct _citrus_iconv_std_dst_list ss_dsts; + TAILQ_ENTRY(_citrus_iconv_std_src) ss_entry; + struct _citrus_iconv_std_dst_list ss_dsts; + _citrus_csid_t ss_csid; }; TAILQ_HEAD(_citrus_iconv_std_src_list, _citrus_iconv_std_src); @@ -64,19 +64,19 @@ TAILQ_HEAD(_citrus_iconv_std_src_list, _citrus_iconv_std_src); * iconv_std handle */ struct _citrus_iconv_std_shared { - struct _citrus_stdenc *is_src_encoding; struct _citrus_stdenc *is_dst_encoding; - struct _citrus_iconv_std_src_list is_srcs; - int is_use_invalid; - _citrus_wc_t is_invalid; + struct _citrus_stdenc *is_src_encoding; + struct _citrus_iconv_std_src_list is_srcs; + _citrus_wc_t is_invalid; + int is_use_invalid; }; /* * iconv_std context */ struct _citrus_iconv_std_context { - struct _citrus_iconv_std_encoding sc_src_encoding; - struct _citrus_iconv_std_encoding sc_dst_encoding; + struct _citrus_iconv_std_encoding sc_dst_encoding; + struct _citrus_iconv_std_encoding sc_src_encoding; }; #endif diff --git a/lib/i18n_module/mapper_646/Makefile b/lib/i18n_module/mapper_646/Makefile index 90c07d8c0e..f838325496 100644 --- a/lib/i18n_module/mapper_646/Makefile +++ b/lib/i18n_module/mapper_646/Makefile @@ -1,4 +1,8 @@ -# $DragonFly: src/lib/i18n_module/mapper_646/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_646/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= mapper_646 +SRCS= citrus_mapper_646.c + +WARNS?= 2 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mapper_646.c b/lib/i18n_module/mapper_646/citrus_mapper_646.c similarity index 72% rename from lib/libc/citrus/modules/citrus_mapper_646.c rename to lib/i18n_module/mapper_646/citrus_mapper_646.c index 08a226351b..576aa2e419 100644 --- a/lib/libc/citrus/modules/citrus_mapper_646.c +++ b/lib/i18n_module/mapper_646/citrus_mapper_646.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_646.c,v 1.4 2003/07/14 11:37:49 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_646.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_646/citrus_mapper_646.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_646.c,v 1.4 2003/07/14 11:37:49 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,8 +27,9 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include #include @@ -77,42 +78,40 @@ enum { NUM_OF_SPECIALS }; struct _citrus_mapper_646 { - int m6_forward; - _index_t m6_map[NUM_OF_SPECIALS]; + _index_t m6_map[NUM_OF_SPECIALS]; + int m6_forward; }; int -_citrus_mapper_646_mapper_getops(struct _citrus_mapper_ops *ops, - size_t lenops, uint32_t expected_version) +_citrus_mapper_646_mapper_getops(struct _citrus_mapper_ops *ops) { - if (expected_version<_CITRUS_MAPPER_ABI_VERSION || lenopsm6_map[i] = strtoul(buf, (char **)&p, 0); + pp = __DECONST(void *, p); + m6->m6_map[i] = strtoul(buf, (char **)&pp, 0); p = _bcs_skip_ws(buf); if (*p != T_COMM && !*p) { ret = EINVAL; @@ -133,12 +133,12 @@ retry: } _unmap_file(&r); - return ret; + return (ret); }; static int parse_var(struct _citrus_mapper_646 *m6, struct _memstream *ms, - const char *dir) + const char *dir) { struct _region r; char path[PATH_MAX]; @@ -156,101 +156,94 @@ parse_var(struct _citrus_mapper_646 *m6, struct _memstream *ms, dir, (int)_region_size(&r), (char *)_region_head(&r)); /* remove trailing white spaces */ path[_bcs_skip_nonws(path)-path] = '\0'; - return parse_file(m6, path); + return (parse_file(m6, path)); } static int /*ARGSUSED*/ -_citrus_mapper_646_mapper_init(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict cm, - const char * __restrict dir, - const void * __restrict var, size_t lenvar, - struct _citrus_mapper_traits * __restrict mt, - size_t lenmt) +_citrus_mapper_646_mapper_init(struct _citrus_mapper_area *__restrict ma __unused, + struct _citrus_mapper * __restrict cm, const char * __restrict dir, + const void * __restrict var, size_t lenvar, + struct _citrus_mapper_traits * __restrict mt, size_t lenmt) { struct _citrus_mapper_646 *m6; struct _memstream ms; struct _region r; int ret; - _DIAGASSERT(cm && dir && mt); - - if (lenmtcm_closure = m6; mt->mt_src_max = mt->mt_dst_max = 1; /* 1:1 converter */ mt->mt_state_size = 0; /* stateless */ - return 0; + return (0); } static void /*ARGSUSED*/ _citrus_mapper_646_mapper_uninit(struct _citrus_mapper *cm) { - if (cm && cm->cm_closure) { + + if (cm && cm->cm_closure) free(cm->cm_closure); - } } static int /*ARGSUSED*/ _citrus_mapper_646_mapper_convert(struct _citrus_mapper * __restrict cm, - _index_t * __restrict dst, _index_t src, - void * __restrict ps) + _index_t * __restrict dst, _index_t src, void * __restrict ps __unused) { struct _citrus_mapper_646 *m6; - _DIAGASSERT(cm && cm->cm_closure); - m6 = cm->cm_closure; if (m6->m6_forward) { /* forward */ - if (src>=0x80) - return _MAPPER_CONVERT_ILSEQ; + if (src >= 0x80) + return (_MAPPER_CONVERT_ILSEQ); #define FORWARD(x) \ -if (src==(x)) { \ +if (src == (x)) { \ if (m6->m6_map[INDEX_##x]==INVALID) \ - return _MAPPER_CONVERT_NONIDENTICAL; \ + return (_MAPPER_CONVERT_NONIDENTICAL); \ *dst = m6->m6_map[INDEX_##x]; \ - return 0; \ + return (0); \ } else SPECIALS(FORWARD); *dst = src; } else { /* backward */ #define BACKWARD(x) \ -if (m6->m6_map[INDEX_##x]!=INVALID && src==m6->m6_map[INDEX_##x]) { \ +if (m6->m6_map[INDEX_##x] != INVALID && src == m6->m6_map[INDEX_##x]) { \ *dst = (x); \ - return 0; \ -} else if (src==(x)) \ - return _MAPPER_CONVERT_ILSEQ; \ + return (0); \ +} else if (src == (x)) \ + return (_MAPPER_CONVERT_ILSEQ); \ else SPECIALS(BACKWARD); - if (src>=0x80) - return _MAPPER_CONVERT_NONIDENTICAL; + if (src >= 0x80) + return (_MAPPER_CONVERT_NONIDENTICAL); *dst = src; } - return _MAPPER_CONVERT_SUCCESS; + return (_MAPPER_CONVERT_SUCCESS); } static void /*ARGSUSED*/ -_citrus_mapper_646_mapper_init_state(struct _citrus_mapper * __restrict cm, - void * __restrict ps) +_citrus_mapper_646_mapper_init_state(void) { + } diff --git a/lib/libc/citrus/modules/citrus_mapper_646.h b/lib/i18n_module/mapper_646/citrus_mapper_646.h similarity index 85% rename from lib/libc/citrus/modules/citrus_mapper_646.h rename to lib/i18n_module/mapper_646/citrus_mapper_646.h index b93d233380..ba13343b9a 100644 --- a/lib/libc/citrus/modules/citrus_mapper_646.h +++ b/lib/i18n_module/mapper_646/citrus_mapper_646.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_646.h,v 1.1 2003/06/25 09:51:45 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_646.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_646/citrus_mapper_646.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_646.h,v 1.1 2003/06/25 09:51:45 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -32,7 +32,6 @@ __BEGIN_DECLS _CITRUS_MAPPER_GETOPS_FUNC(mapper_646); -_CITRUS_MAPPER_GETOPS_FUNC(mapper_646); __END_DECLS #endif diff --git a/lib/i18n_module/mapper_none/Makefile b/lib/i18n_module/mapper_none/Makefile index 12e465f120..70f3f65f65 100644 --- a/lib/i18n_module/mapper_none/Makefile +++ b/lib/i18n_module/mapper_none/Makefile @@ -1,4 +1,6 @@ -# $DragonFly: src/lib/i18n_module/mapper_none/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_none/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= mapper_none +SRCS+= citrus_mapper_none.c -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mapper_none.c b/lib/i18n_module/mapper_none/citrus_mapper_none.c similarity index 73% rename from lib/libc/citrus/modules/citrus_mapper_none.c rename to lib/i18n_module/mapper_none/citrus_mapper_none.c index 5a88e2ec32..e6fecad08e 100644 --- a/lib/libc/citrus/modules/citrus_mapper_none.c +++ b/lib/i18n_module/mapper_none/citrus_mapper_none.c @@ -1,4 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_none.c,v 1.2 2003/06/27 17:53:31 tshiozak Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_none/citrus_mapper_none.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_none.c,v 1.2 2003/06/27 17:53:31 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -26,8 +27,9 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include #include @@ -49,61 +51,54 @@ _CITRUS_MAPPER_DEF_OPS(mapper_none); /* ---------------------------------------------------------------------- */ int -_citrus_mapper_none_mapper_getops(struct _citrus_mapper_ops *ops, - size_t lenops, uint32_t expected_version) +_citrus_mapper_none_mapper_getops(struct _citrus_mapper_ops *ops) { - if (expected_version<_CITRUS_MAPPER_ABI_VERSION || lenopscm_closure = NULL; mt->mt_src_max = mt->mt_dst_max = 1; /* 1:1 converter */ mt->mt_state_size = 0; /* stateless */ - return 0; + return (0); } static void /*ARGSUSED*/ _citrus_mapper_none_mapper_uninit(struct _citrus_mapper *cm __unused) { + } static int /*ARGSUSED*/ _citrus_mapper_none_mapper_convert(struct _citrus_mapper * __restrict cm __unused, - _citrus_index_t * __restrict dst, - _citrus_index_t src, - void * __restrict ps __unused) + _citrus_index_t * __restrict dst, _citrus_index_t src, + void * __restrict ps __unused) { + *dst = src; - return _CITRUS_MAPPER_CONVERT_SUCCESS; + return (_CITRUS_MAPPER_CONVERT_SUCCESS); } static void /*ARGSUSED*/ -_citrus_mapper_none_mapper_init_state(struct _citrus_mapper * __restrict cm __unused, - void * __restrict ps __unused) +_citrus_mapper_none_mapper_init_state(void) { + } diff --git a/lib/libc/citrus/modules/citrus_mapper_none.h b/lib/i18n_module/mapper_none/citrus_mapper_none.h similarity index 87% rename from lib/libc/citrus/modules/citrus_mapper_none.h rename to lib/i18n_module/mapper_none/citrus_mapper_none.h index ddbd69559c..61a0314ab5 100644 --- a/lib/libc/citrus/modules/citrus_mapper_none.h +++ b/lib/i18n_module/mapper_none/citrus_mapper_none.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_none.h,v 1.1 2003/06/25 09:51:45 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_none.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_none/citrus_mapper_none.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_none.h,v 1.1 2003/06/25 09:51:45 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/i18n_module/mapper_parallel/Makefile b/lib/i18n_module/mapper_parallel/Makefile index 1782f59229..a43219ddd1 100644 --- a/lib/i18n_module/mapper_parallel/Makefile +++ b/lib/i18n_module/mapper_parallel/Makefile @@ -1,4 +1,9 @@ -# $DragonFly: src/lib/i18n_module/mapper_parallel/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_parallel/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +.PATH: ${.CURDIR}/../mapper_serial + +LIB= mapper_parallel +SRCS+= citrus_mapper_serial.c +CFLAGS+= --param max-inline-insns-single=32 -SRCS=citrus_mapper_serial.c .include diff --git a/lib/i18n_module/mapper_serial/Makefile b/lib/i18n_module/mapper_serial/Makefile index d55d6bae00..87e8ebfacc 100644 --- a/lib/i18n_module/mapper_serial/Makefile +++ b/lib/i18n_module/mapper_serial/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/mapper_serial/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_serial/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= mapper_serial +SRCS+= citrus_mapper_serial.c +CFLAGS+= --param max-inline-insns-single=32 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mapper_serial.c b/lib/i18n_module/mapper_serial/citrus_mapper_serial.c similarity index 74% rename from lib/libc/citrus/modules/citrus_mapper_serial.c rename to lib/i18n_module/mapper_serial/citrus_mapper_serial.c index 7a97fb9d85..eb63507a4f 100644 --- a/lib/libc/citrus/modules/citrus_mapper_serial.c +++ b/lib/i18n_module/mapper_serial/citrus_mapper_serial.c @@ -1,4 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_serial.c,v 1.2 2003/07/12 15:39:20 tshiozak Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_serial/citrus_mapper_serial.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_serial.c,v 1.2 2003/07/12 15:39:20 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -26,8 +27,9 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include #include @@ -58,10 +60,8 @@ _CITRUS_MAPPER_DEF_OPS(mapper_serial); #define _citrus_mapper_parallel_mapper_init_state \ _citrus_mapper_serial_mapper_init_state static int _citrus_mapper_parallel_mapper_convert( - struct _citrus_mapper * __restrict, _index_t * __restrict, _index_t, - void * __restrict); - -CITRUS_MODULE(mapper_parallel, mapper, _citrus_mapper_parallel_mapper_getops) + struct _citrus_mapper * __restrict, _index_t * __restrict, + _index_t, void * __restrict); _CITRUS_MAPPER_DEF_OPS(mapper_parallel); #undef _citrus_mapper_parallel_mapper_init #undef _citrus_mapper_parallel_mapper_uninit @@ -71,39 +71,33 @@ _CITRUS_MAPPER_DEF_OPS(mapper_parallel); /* ---------------------------------------------------------------------- */ struct maplink { - STAILQ_ENTRY(maplink) ml_entry; + STAILQ_ENTRY(maplink) ml_entry; struct _mapper *ml_mapper; }; STAILQ_HEAD(maplist, maplink); struct _citrus_mapper_serial { - struct maplist sr_mappers; + struct maplist sr_mappers; }; int -_citrus_mapper_serial_mapper_getops(struct _citrus_mapper_ops *ops, - size_t lenops, uint32_t expected_version) +_citrus_mapper_serial_mapper_getops(struct _citrus_mapper_ops *ops) { - if (expected_version<_CITRUS_MAPPER_ABI_VERSION || lenopssr_mappers); while (1) { @@ -136,70 +130,67 @@ parse_var(struct _citrus_mapper_area *__restrict ma, /* cut down a mapper name */ _memstream_chr(ms, &r, ','); snprintf(mapname, sizeof(mapname), "%.*s", - (int)_region_size(&r), (char *)_region_head(&r)); + (int)_region_size(&r), (char *)_region_head(&r)); /* remove trailing white spaces */ mapname[_bcs_skip_nonws(mapname)-mapname] = '\0'; /* create a new mapper record */ ml = malloc(sizeof(*ml)); if (ml == NULL) - return errno; + return (errno); ret = _mapper_open(ma, &ml->ml_mapper, mapname); if (ret) { free(ml); - return ret; + return (ret); } /* support only 1:1 and stateless converter */ if (_mapper_get_src_max(ml->ml_mapper) != 1 || _mapper_get_dst_max(ml->ml_mapper) != 1 || _mapper_get_state_size(ml->ml_mapper) != 0) { free(ml); - return EINVAL; + return (EINVAL); } STAILQ_INSERT_TAIL(&sr->sr_mappers, ml, ml_entry); } - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_mapper_serial_mapper_init(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict cm, - const char * __restrict dir __unused, - const void * __restrict var, size_t lenvar, - struct _citrus_mapper_traits * __restrict mt, - size_t lenmt) +_citrus_mapper_serial_mapper_init(struct _citrus_mapper_area *__restrict ma __unused, + struct _citrus_mapper * __restrict cm, const char * __restrict dir __unused, + const void * __restrict var, size_t lenvar, + struct _citrus_mapper_traits * __restrict mt, size_t lenmt) { struct _citrus_mapper_serial *sr; struct _memstream ms; struct _region r; - _DIAGASSERT(cm && dir && mt); - - if (lenmtcm_closure = sr; mt->mt_src_max = mt->mt_dst_max = 1; /* 1:1 converter */ mt->mt_state_size = 0; /* stateless */ - return 0; + return (0); } static void /*ARGSUSED*/ _citrus_mapper_serial_mapper_uninit(struct _citrus_mapper *cm) { + if (cm && cm->cm_closure) { uninit(cm->cm_closure); free(cm->cm_closure); @@ -209,53 +200,47 @@ _citrus_mapper_serial_mapper_uninit(struct _citrus_mapper *cm) static int /*ARGSUSED*/ _citrus_mapper_serial_mapper_convert(struct _citrus_mapper * __restrict cm, - _index_t * __restrict dst, _index_t src, - void * __restrict ps __unused) + _index_t * __restrict dst, _index_t src, void * __restrict ps __unused) { - int ret; struct _citrus_mapper_serial *sr; struct maplink *ml; - - _DIAGASSERT(cm && cm->cm_closure); + int ret; sr = cm->cm_closure; STAILQ_FOREACH(ml, &sr->sr_mappers, ml_entry) { ret = _mapper_convert(ml->ml_mapper, &src, src, NULL); if (ret != _MAPPER_CONVERT_SUCCESS) - return ret; + return (ret); } *dst = src; - return _MAPPER_CONVERT_SUCCESS; + return (_MAPPER_CONVERT_SUCCESS); } static int /*ARGSUSED*/ _citrus_mapper_parallel_mapper_convert(struct _citrus_mapper * __restrict cm, - _index_t * __restrict dst, _index_t src, - void * __restrict ps __unused) + _index_t * __restrict dst, _index_t src, void * __restrict ps __unused) { - int ret; struct _citrus_mapper_serial *sr; struct maplink *ml; _index_t tmp; - - _DIAGASSERT(cm && cm->cm_closure); + int ret; sr = cm->cm_closure; STAILQ_FOREACH(ml, &sr->sr_mappers, ml_entry) { ret = _mapper_convert(ml->ml_mapper, &tmp, src, NULL); if (ret == _MAPPER_CONVERT_SUCCESS) { *dst = tmp; - return _MAPPER_CONVERT_SUCCESS; + return (_MAPPER_CONVERT_SUCCESS); } else if (ret == _MAPPER_CONVERT_ILSEQ) - return _MAPPER_CONVERT_ILSEQ; + return (_MAPPER_CONVERT_ILSEQ); } - return _MAPPER_CONVERT_NONIDENTICAL; + return (_MAPPER_CONVERT_NONIDENTICAL); } static void /*ARGSUSED*/ -_citrus_mapper_serial_mapper_init_state(struct _citrus_mapper * __restrict cm __unused, - void * __restrict ps __unused) +_citrus_mapper_serial_mapper_init_state(void) { + } diff --git a/lib/libc/citrus/modules/citrus_mapper_serial.h b/lib/i18n_module/mapper_serial/citrus_mapper_serial.h similarity index 87% rename from lib/libc/citrus/modules/citrus_mapper_serial.h rename to lib/i18n_module/mapper_serial/citrus_mapper_serial.h index 3faefc4f6c..a7faa03028 100644 --- a/lib/libc/citrus/modules/citrus_mapper_serial.h +++ b/lib/i18n_module/mapper_serial/citrus_mapper_serial.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_serial.h,v 1.1 2003/06/25 09:51:46 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_serial.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_serial/citrus_mapper_serial.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_serial.h,v 1.1 2003/06/25 09:51:46 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/i18n_module/mapper_std/Makefile b/lib/i18n_module/mapper_std/Makefile index 8599a2239a..6010d9f4da 100644 --- a/lib/i18n_module/mapper_std/Makefile +++ b/lib/i18n_module/mapper_std/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/mapper_std/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_std/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= mapper_std +SRCS+= citrus_mapper_std.c +CFLAGS+= --param max-inline-insns-single=8 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mapper_std.c b/lib/i18n_module/mapper_std/citrus_mapper_std.c similarity index 76% rename from lib/libc/citrus/modules/citrus_mapper_std.c rename to lib/i18n_module/mapper_std/citrus_mapper_std.c index 29331fb54e..de14e1eecb 100644 --- a/lib/libc/citrus/modules/citrus_mapper_std.c +++ b/lib/i18n_module/mapper_std/citrus_mapper_std.c @@ -1,4 +1,5 @@ -/* $NetBSD: citrus_mapper_std.c,v 1.8 2006/09/11 13:06:33 tnozaki Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_std/citrus_mapper_std.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_std.c,v 1.8 2006/09/11 13:06:33 tnozaki Exp $ */ /*- * Copyright (c)2003, 2006 Citrus Project, @@ -26,15 +27,16 @@ * SUCH DAMAGE. */ -#include +#include #include #include + #include #include #include +#include #include #include -#include #include #include "citrus_namespace.h" @@ -60,14 +62,11 @@ _CITRUS_MAPPER_DEF_OPS(mapper_std); /* ---------------------------------------------------------------------- */ int -_citrus_mapper_std_mapper_getops(struct _citrus_mapper_ops *ops, size_t lenops, - u_int32_t expected_version) +_citrus_mapper_std_mapper_getops(struct _citrus_mapper_ops *ops) { - if (expected_version<_CITRUS_MAPPER_ABI_VERSION || lenopsms_rowcol; for (i = rc->rc_src_rowcol_len * rc->rc_src_rowcol_bits, - lz = &rc->rc_src_rowcol[0]; i > 0; ++lz) { + lz = &rc->rc_src_rowcol[0]; i > 0; ++lz) { i -= rc->rc_src_rowcol_bits; n = (src >> i) & rc->rc_src_rowcol_mask; if (n < lz->begin || n > lz->end) { switch (rc->rc_oob_mode) { case _CITRUS_MAPPER_STD_OOB_NONIDENTICAL: *dst = rc->rc_dst_invalid; - return _MAPPER_CONVERT_NONIDENTICAL; + return (_MAPPER_CONVERT_NONIDENTICAL); case _CITRUS_MAPPER_STD_OOB_ILSEQ: - return _MAPPER_CONVERT_ILSEQ; + return (_MAPPER_CONVERT_ILSEQ); default: - return _MAPPER_CONVERT_FATAL; + return (_MAPPER_CONVERT_FATAL); } } idx = idx * lz->width + n - lz->begin; @@ -119,48 +115,45 @@ rowcol_convert(struct _citrus_mapper_std * __restrict ms, conv = be32toh(_region_peek32(&rc->rc_table, idx*4)); break; default: - return _MAPPER_CONVERT_FATAL; + return (_MAPPER_CONVERT_FATAL); } if (conv == rc->rc_dst_invalid) { *dst = rc->rc_dst_invalid; - return _MAPPER_CONVERT_NONIDENTICAL; + return (_MAPPER_CONVERT_NONIDENTICAL); } if (conv == rc->rc_dst_ilseq) - return _MAPPER_CONVERT_ILSEQ; + return (_MAPPER_CONVERT_ILSEQ); *dst = conv; - return _MAPPER_CONVERT_SUCCESS; + return (_MAPPER_CONVERT_SUCCESS); } static __inline int set_linear_zone(struct _citrus_mapper_std_linear_zone *lz, - u_int32_t begin, u_int32_t end) + uint32_t begin, uint32_t end) { - _DIAGASSERT(lz != NULL); if (begin > end) - return EFTYPE; + return (EFTYPE); lz->begin = begin; lz->end = end; lz->width= end - begin + 1; - return 0; + return (0); } static __inline int rowcol_parse_variable_compat(struct _citrus_mapper_std_rowcol *rc, - struct _region *r) + struct _region *r) { const struct _citrus_mapper_std_rowcol_info_compat_x *rcx; struct _citrus_mapper_std_linear_zone *lz; - u_int32_t m, n; + uint32_t m, n; int ret; - _DIAGASSERT(rc != NULL); - _DIAGASSERT(r != NULL && _region_size(r) == sizeof(*rcx)); rcx = _region_head(r); rc->rc_dst_invalid = be32toh(rcx->rcx_dst_invalid); @@ -174,7 +167,7 @@ rowcol_parse_variable_compat(struct _citrus_mapper_std_rowcol *rc, rc->rc_src_rowcol = malloc(2 * sizeof(*rc->rc_src_rowcol)); if (rc->rc_src_rowcol == NULL) - return ENOMEM; + return (ENOMEM); lz = rc->rc_src_rowcol; rc->rc_src_rowcol_len = 1; m = be32toh(rcx->rcx_src_row_begin); @@ -182,27 +175,25 @@ rowcol_parse_variable_compat(struct _citrus_mapper_std_rowcol *rc, if (m + n > 0) { ret = set_linear_zone(lz, m, n); if (ret != 0) - return ret; + return (ret); ++rc->rc_src_rowcol_len, ++lz; } m = be32toh(rcx->rcx_src_col_begin); n = be32toh(rcx->rcx_src_col_end); - return set_linear_zone(lz, m, n); + return (set_linear_zone(lz, m, n)); } static __inline int rowcol_parse_variable(struct _citrus_mapper_std_rowcol *rc, - struct _region *r) + struct _region *r) { const struct _citrus_mapper_std_rowcol_info_x *rcx; struct _citrus_mapper_std_linear_zone *lz; - u_int32_t m, n; size_t i; + uint32_t m, n; int ret; - _DIAGASSERT(rc != NULL); - _DIAGASSERT(r != NULL && _region_size(r) == sizeof(*rcx)); rcx = _region_head(r); rc->rc_dst_invalid = be32toh(rcx->rcx_dst_invalid); @@ -216,30 +207,29 @@ rowcol_parse_variable(struct _citrus_mapper_std_rowcol *rc, rc->rc_src_rowcol_len = be32toh(rcx->rcx_src_rowcol_len); if (rc->rc_src_rowcol_len > _CITRUS_MAPPER_STD_ROWCOL_MAX) - return EFTYPE; + return (EFTYPE); rc->rc_src_rowcol = malloc(rc->rc_src_rowcol_len * sizeof(*rc->rc_src_rowcol)); if (rc->rc_src_rowcol == NULL) - return ENOMEM; + return (ENOMEM); for (i = 0, lz = rc->rc_src_rowcol; - i < rc->rc_src_rowcol_len; ++i, ++lz) { + i < rc->rc_src_rowcol_len; ++i, ++lz) { m = be32toh(rcx->rcx_src_rowcol[i].begin), n = be32toh(rcx->rcx_src_rowcol[i].end); ret = set_linear_zone(lz, m, n); if (ret != 0) { free(rc->rc_src_rowcol); rc->rc_src_rowcol = NULL; - return ret; + return (ret); } } - return 0; + return (0); } static void rowcol_uninit(struct _citrus_mapper_std *ms) { struct _citrus_mapper_std_rowcol *rc; - _DIAGASSERT(ms != NULL); rc = &ms->ms_rowcol; free(rc->rc_src_rowcol); @@ -248,34 +238,33 @@ rowcol_uninit(struct _citrus_mapper_std *ms) static int rowcol_init(struct _citrus_mapper_std *ms) { - int ret; + struct _citrus_mapper_std_linear_zone *lz; struct _citrus_mapper_std_rowcol *rc; const struct _citrus_mapper_std_rowcol_ext_ilseq_info_x *eix; struct _region r; - u_int64_t table_size; + uint64_t table_size; size_t i; - struct _citrus_mapper_std_linear_zone *lz; + int ret; - _DIAGASSERT(ms != NULL); ms->ms_convert = &rowcol_convert; ms->ms_uninit = &rowcol_uninit; rc = &ms->ms_rowcol; /* get table region */ ret = _db_lookup_by_s(ms->ms_db, _CITRUS_MAPPER_STD_SYM_TABLE, - &rc->rc_table, NULL); + &rc->rc_table, NULL); if (ret) { - if (ret==ENOENT) + if (ret == ENOENT) ret = EFTYPE; - return ret; + return (ret); } /* get table information */ ret = _db_lookup_by_s(ms->ms_db, _CITRUS_MAPPER_STD_SYM_INFO, &r, NULL); if (ret) { - if (ret==ENOENT) + if (ret == ENOENT) ret = EFTYPE; - return ret; + return (ret); } switch (_region_size(&r)) { case _CITRUS_MAPPER_STD_ROWCOL_INFO_COMPAT_SIZE: @@ -285,10 +274,10 @@ rowcol_init(struct _citrus_mapper_std *ms) ret = rowcol_parse_variable(rc, &r); break; default: - return EFTYPE; + return (EFTYPE); } if (ret != 0) - return ret; + return (ret); /* sanity check */ switch (rc->rc_src_rowcol_bits) { case 8: case 16: case 32: @@ -296,19 +285,18 @@ rowcol_init(struct _citrus_mapper_std *ms) break; /*FALLTHROUGH*/ default: - return EFTYPE; + return (EFTYPE); } /* ilseq extension */ rc->rc_oob_mode = _CITRUS_MAPPER_STD_OOB_NONIDENTICAL; rc->rc_dst_ilseq = rc->rc_dst_invalid; ret = _db_lookup_by_s(ms->ms_db, - _CITRUS_MAPPER_STD_SYM_ROWCOL_EXT_ILSEQ, - &r, NULL); + _CITRUS_MAPPER_STD_SYM_ROWCOL_EXT_ILSEQ, &r, NULL); if (ret && ret != ENOENT) - return ret; + return (ret); if (_region_size(&r) < sizeof(*eix)) - return EFTYPE; + return (EFTYPE); if (ret == 0) { eix = _region_head(&r); rc->rc_oob_mode = be32toh(eix->eix_oob_mode); @@ -327,36 +315,34 @@ rowcol_init(struct _citrus_mapper_std *ms) if (table_size > UINT32_MAX || _region_size(&rc->rc_table) < table_size) - return EFTYPE; + return (EFTYPE); - return 0; + return (0); } typedef int (*initfunc_t)(struct _citrus_mapper_std *); static const struct { + initfunc_t t_init; const char *t_name; - initfunc_t t_init; } types[] = { - { _CITRUS_MAPPER_STD_TYPE_ROWCOL, &rowcol_init }, + { &rowcol_init, _CITRUS_MAPPER_STD_TYPE_ROWCOL }, }; #define NUM_OF_TYPES ((int)(sizeof(types)/sizeof(types[0]))) static int /*ARGSUSED*/ _citrus_mapper_std_mapper_init(struct _citrus_mapper_area *__restrict ma __unused, - struct _citrus_mapper * __restrict cm, - const char * __restrict curdir, - const void * __restrict var, size_t lenvar, - struct _citrus_mapper_traits * __restrict mt, - size_t lenmt) + struct _citrus_mapper * __restrict cm, const char * __restrict curdir, + const void * __restrict var, size_t lenvar, + struct _citrus_mapper_traits * __restrict mt, size_t lenmt) { + struct _citrus_mapper_std *ms; char path[PATH_MAX]; const char *type; - int ret, id; - struct _citrus_mapper_std *ms; + int id, ret; /* set traits */ - if (lenmtms_file, path); if (ret) goto err1; ret = _db_open(&ms->ms_db, &ms->ms_file, _CITRUS_MAPPER_STD_MAGIC, - &_db_hash_std, NULL); + &_db_hash_std, NULL); if (ret) goto err2; /* get mapper type */ ret = _db_lookupstr_by_s(ms->ms_db, _CITRUS_MAPPER_STD_SYM_TYPE, - &type, NULL); + &type, NULL); if (ret) { - if (ret==ENOENT) + if (ret == ENOENT) ret = EFTYPE; goto err3; } - for (id=0; idcm_closure = ms; - return 0; + return (0); err3: _db_close(ms->ms_db); @@ -413,7 +399,7 @@ err2: err1: free(ms); err0: - return ret; + return (ret); } static void @@ -422,8 +408,6 @@ _citrus_mapper_std_mapper_uninit(struct _citrus_mapper *cm) { struct _citrus_mapper_std *ms; - _DIAGASSERT(cm!=NULL && cm->cm_closure!=NULL); - ms = cm->cm_closure; if (ms->ms_uninit) (*ms->ms_uninit)(ms); @@ -434,24 +418,18 @@ _citrus_mapper_std_mapper_uninit(struct _citrus_mapper *cm) static void /*ARGSUSED*/ -_citrus_mapper_std_mapper_init_state(struct _citrus_mapper * __restrict cm __unused, - void * __restrict ps __unused) +_citrus_mapper_std_mapper_init_state(void) { + } static int /*ARGSUSED*/ _citrus_mapper_std_mapper_convert(struct _citrus_mapper * __restrict cm, - _index_t * __restrict dst, _index_t src, - void * __restrict ps) + _index_t * __restrict dst, _index_t src, void * __restrict ps) { struct _citrus_mapper_std *ms; - _DIAGASSERT(cm!=NULL && cm->cm_closure!=NULL); - ms = cm->cm_closure; - - _DIAGASSERT(ms->ms_convert != NULL); - - return (*ms->ms_convert)(ms, dst, src, ps); + return ((*ms->ms_convert)(ms, dst, src, ps)); } diff --git a/lib/libc/citrus/modules/citrus_mapper_std.h b/lib/i18n_module/mapper_std/citrus_mapper_std.h similarity index 88% rename from lib/libc/citrus/modules/citrus_mapper_std.h rename to lib/i18n_module/mapper_std/citrus_mapper_std.h index c9dd25bd02..80048143e3 100644 --- a/lib/libc/citrus/modules/citrus_mapper_std.h +++ b/lib/i18n_module/mapper_std/citrus_mapper_std.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_std.h,v 1.1 2003/06/25 09:51:47 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_std.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_std/citrus_mapper_std.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_std.h,v 1.1 2003/06/25 09:51:47 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libc/citrus/modules/citrus_mapper_std_file.h b/lib/i18n_module/mapper_std/citrus_mapper_std_file.h similarity index 78% rename from lib/libc/citrus/modules/citrus_mapper_std_file.h rename to lib/i18n_module/mapper_std/citrus_mapper_std_file.h index 8a944ed21f..432e375ec4 100644 --- a/lib/libc/citrus/modules/citrus_mapper_std_file.h +++ b/lib/i18n_module/mapper_std/citrus_mapper_std_file.h @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_mapper_std_file.h,v 1.3 2006/09/09 14:35:17 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_std_file.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_std/citrus_mapper_std_file.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_std_file.h,v 1.3 2006/09/09 14:35:17 tnozaki Exp $ */ /*- * Copyright (c)2003, 2006 Citrus Project, @@ -38,28 +38,28 @@ #define _CITRUS_MAPPER_STD_TYPE_ROWCOL "rowcol" struct _citrus_mapper_std_rowcol_info_x { - u_int32_t rcx_src_rowcol_bits; - u_int32_t rcx_dst_invalid; + uint32_t rcx_src_rowcol_bits; + uint32_t rcx_dst_invalid; #define _CITRUS_MAPPER_STD_ROWCOL_MAX 4 struct { - u_int32_t begin; - u_int32_t end; + uint32_t begin; + uint32_t end; } __packed rcx_src_rowcol[_CITRUS_MAPPER_STD_ROWCOL_MAX]; - u_int32_t rcx_dst_unit_bits; - u_int32_t rcx_src_rowcol_len; + uint32_t rcx_dst_unit_bits; + uint32_t rcx_src_rowcol_len; } __packed; #define _CITRUS_MAPPER_STD_ROWCOL_INFO_SIZE 48 /* old file layout */ struct _citrus_mapper_std_rowcol_info_compat_x { - u_int32_t rcx_src_col_bits; - u_int32_t rcx_dst_invalid; - u_int32_t rcx_src_row_begin; - u_int32_t rcx_src_row_end; - u_int32_t rcx_src_col_begin; - u_int32_t rcx_src_col_end; - u_int32_t rcx_dst_unit_bits; - u_int32_t rcx_pad; + uint32_t rcx_src_col_bits; + uint32_t rcx_dst_invalid; + uint32_t rcx_src_row_begin; + uint32_t rcx_src_row_end; + uint32_t rcx_src_col_begin; + uint32_t rcx_src_col_end; + uint32_t rcx_dst_unit_bits; + uint32_t rcx_pad; } __packed; #define _CITRUS_MAPPER_STD_ROWCOL_INFO_COMPAT_SIZE 32 @@ -68,8 +68,8 @@ struct _citrus_mapper_std_rowcol_info_compat_x { struct _citrus_mapper_std_rowcol_ext_ilseq_info_x { #define _CITRUS_MAPPER_STD_OOB_NONIDENTICAL 0 #define _CITRUS_MAPPER_STD_OOB_ILSEQ 1 - u_int32_t eix_oob_mode; - u_int32_t eix_dst_ilseq; + uint32_t eix_oob_mode; + uint32_t eix_dst_ilseq; } __packed; #define _CITRUS_MAPPER_STD_ROWCOL_EXT_ILSEQ_SIZE 8 diff --git a/lib/libc/citrus/modules/citrus_mapper_std_local.h b/lib/i18n_module/mapper_std/citrus_mapper_std_local.h similarity index 89% rename from lib/libc/citrus/modules/citrus_mapper_std_local.h rename to lib/i18n_module/mapper_std/citrus_mapper_std_local.h index 6227745109..8b120dfdea 100644 --- a/lib/libc/citrus/modules/citrus_mapper_std_local.h +++ b/lib/i18n_module/mapper_std/citrus_mapper_std_local.h @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_mapper_std_local.h,v 1.3 2006/09/09 14:35:17 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_std_local.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_std/citrus_mapper_std_local.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_std_local.h,v 1.3 2006/09/09 14:35:17 tnozaki Exp $ */ /*- * Copyright (c)2003, 2006 Citrus Project, @@ -30,7 +30,7 @@ #ifndef _CITRUS_MAPPER_STD_LOCAL_H_ #define _CITRUS_MAPPER_STD_LOCAL_H_ -typedef u_int32_t (*_citrus_mapper_std_getvalfunc_t)(const void *, u_int32_t); +typedef uint32_t (*_citrus_mapper_std_getvalfunc_t)(const void *, uint32_t); struct _citrus_mapper_std_linear_zone { _citrus_index_t begin; diff --git a/lib/i18n_module/mapper_zone/Makefile b/lib/i18n_module/mapper_zone/Makefile index e6f52de853..edb5c1358a 100644 --- a/lib/i18n_module/mapper_zone/Makefile +++ b/lib/i18n_module/mapper_zone/Makefile @@ -1,4 +1,7 @@ -# $DragonFly: src/lib/i18n_module/mapper_zone/Makefile,v 1.1 2005/03/11 20:47:05 joerg Exp $ +# $FreeBSD: head/lib/libiconv_modules/mapper_zone/Makefile 219019 2011-02-25 00:04:39Z gabor $ + +LIB= mapper_zone +SRCS+= citrus_mapper_zone.c +CFLAGS+= --param max-inline-insns-single=8 -SRCPRE=citrus_ .include diff --git a/lib/libc/citrus/modules/citrus_mapper_zone.c b/lib/i18n_module/mapper_zone/citrus_mapper_zone.c similarity index 69% rename from lib/libc/citrus/modules/citrus_mapper_zone.c rename to lib/i18n_module/mapper_zone/citrus_mapper_zone.c index 3b2b9d81bd..db7b28df80 100644 --- a/lib/libc/citrus/modules/citrus_mapper_zone.c +++ b/lib/i18n_module/mapper_zone/citrus_mapper_zone.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_zone.c,v 1.4 2003/07/12 15:39:21 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_zone.c,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_zone/citrus_mapper_zone.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_zone.c,v 1.4 2003/07/12 15:39:21 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,8 +27,9 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include #include @@ -55,22 +56,22 @@ _CITRUS_MAPPER_DEF_OPS(mapper_zone); /* ---------------------------------------------------------------------- */ struct _zone { - u_int32_t z_begin; - u_int32_t z_end; + uint32_t z_begin; + uint32_t z_end; }; struct _citrus_mapper_zone { - struct _zone mz_row; - struct _zone mz_col; - int mz_col_bits; - int32_t mz_row_offset; - int32_t mz_col_offset; + struct _zone mz_col; + struct _zone mz_row; + int32_t mz_col_offset; + int32_t mz_row_offset; + int mz_col_bits; }; struct _parse_state { enum { S_BEGIN, S_OFFSET } ps_state; union { - u_int32_t u_imm; + uint32_t u_imm; int32_t s_imm; struct _zone zone; } u; @@ -81,16 +82,13 @@ struct _parse_state { }; int -_citrus_mapper_zone_mapper_getops(struct _citrus_mapper_ops *ops, - size_t lenops, uint32_t expected_version) +_citrus_mapper_zone_mapper_getops(struct _citrus_mapper_ops *ops) { - if (expected_version<_CITRUS_MAPPER_ABI_VERSION || lenopsps_u_imm = strtoul(buf, &p, 0); - if ((p-buf) != i) - return T_ERR; + if ((p - buf) != i) + return (T_ERR); if (sign == '-') ps->ps_u_imm = (unsigned long)-(long)ps->ps_u_imm; - return T_IMM; + return (T_IMM); } static int @@ -135,8 +133,8 @@ get_tok(struct _memstream *ms, struct _parse_state *ps) loop: c = _memstream_peek(ms); - if (c==0x00) - return EOF; + if (c == 0x00) + return (EOF); if (_bcs_isspace(c)) { _memstream_getc(ms); goto loop; @@ -149,7 +147,7 @@ loop: case '-': case '/': _memstream_getc(ms); - return c; + return (c); case '0': case '1': case '2': @@ -160,16 +158,16 @@ loop: case '7': case '8': case '9': - return get_imm(ms, ps); + return (get_imm(ms, ps)); } break; case S_OFFSET: switch (c) { case '/': _memstream_getc(ms); - return c; - case '+': - case '-': + return (c); + case '+': + case '-': case '0': case '1': case '2': @@ -180,70 +178,68 @@ loop: case '7': case '8': case '9': - return get_imm(ms, ps); + return (get_imm(ms, ps)); } break; } - return T_ERR; + return (T_ERR); } static int parse_zone(struct _memstream *ms, struct _parse_state *ps, struct _zone *z) { + if (get_tok(ms, ps) != T_IMM) - return -1; + return (-1); z->z_begin = ps->ps_u_imm; if (get_tok(ms, ps) != '-') - return -1; + return (-1); if (get_tok(ms, ps) != T_IMM) - return -1; + return (-1); z->z_end = ps->ps_u_imm; if (z->z_begin > z->z_end) - return -1; + return (-1); - return 0; + return (0); } static int check_rowcol(struct _zone *z, int32_t ofs, uint32_t maxval) { - u_int32_t remain; + uint32_t remain; if (maxval != 0 && z->z_end >= maxval) - return -1; + return (-1); if (ofs > 0) { - if (maxval == 0) { + if (maxval == 0) /* this should 0x100000000 - z->z_end */ - if (z->z_end == 0) { - remain = 0xFFFFFFFF; - } else { - remain = 0xFFFFFFFF - z->z_end + 1; - } - } else + remain = (z->z_end == 0) ? 0xFFFFFFFF : + 0xFFFFFFFF - z->z_end + 1; + else remain = maxval - z->z_end; - if ((u_int32_t)ofs > remain) - return -1; + if ((uint32_t)ofs > remain) + return (-1); } else if (ofs < 0) { - if (z->z_begin < (u_int32_t)-ofs) - return -1; + if (z->z_begin < (uint32_t)-ofs) + return (-1); } - return 0; + return (0); } static int parse_var(struct _citrus_mapper_zone *mz, struct _memstream *ms) { struct _parse_state ps; - int ret, isrc; - uint32_t rowmax, colmax; + uint32_t colmax, rowmax; + int isrc, ret; ps.ps_state = S_BEGIN; if (parse_zone(ms, &ps, &mz->mz_col)) - return -1; + return (-1); ret = get_tok(ms, &ps); if (ret == '/') { @@ -252,14 +248,14 @@ parse_var(struct _citrus_mapper_zone *mz, struct _memstream *ms) mz->mz_row = mz->mz_col; if (parse_zone(ms, &ps, &mz->mz_col)) - return -1; + return (-1); if (get_tok(ms, &ps) != '/') - return -1; + return (-1); if (get_tok(ms, &ps) != T_IMM) - return -1; + return (-1); mz->mz_col_bits = ps.ps_u_imm; - if (mz->mz_col_bits<0 || mz->mz_col_bits>32) - return -1; + if (mz->mz_col_bits < 0 || mz->mz_col_bits > 32) + return (-1); ret = get_tok(ms, &ps); } else { /* colzone */ @@ -271,61 +267,51 @@ parse_var(struct _citrus_mapper_zone *mz, struct _memstream *ms) /* offset */ ps.ps_state = S_OFFSET; if (get_tok(ms, &ps) != T_IMM) - return -1; + return (-1); mz->mz_col_offset = ps.ps_s_imm; if (isrc) { /* row/col */ mz->mz_row_offset = mz->mz_col_offset; if (get_tok(ms, &ps) != '/') - return -1; + return (-1); if (get_tok(ms, &ps) != T_IMM) - return -1; + return (-1); mz->mz_col_offset = ps.ps_s_imm; } else mz->mz_row_offset = 0; ret = get_tok(ms, &ps); } if (ret != EOF) - return -1; + return (-1); /* sanity check */ - if (mz->mz_col_bits==32) - colmax = 0; - else - colmax = 1 << mz->mz_col_bits; - if (mz->mz_col_bits==0) - rowmax = 0; - else - rowmax = 1 << (32-mz->mz_col_bits); + colmax = (mz->mz_col_bits == 32) ? 0 : 1 << mz->mz_col_bits; + rowmax = (mz->mz_col_bits == 0) ? 0 : 1 << (32-mz->mz_col_bits); if (check_rowcol(&mz->mz_col, mz->mz_col_offset, colmax)) - return -1; + return (-1); if (check_rowcol(&mz->mz_row, mz->mz_row_offset, rowmax)) - return -1; + return (-1); - return 0; + return (0); } static int /*ARGSUSED*/ -_citrus_mapper_zone_mapper_init(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict cm, - const char * __restrict dir, - const void * __restrict var, size_t lenvar, - struct _citrus_mapper_traits * __restrict mt, - size_t lenmt) +_citrus_mapper_zone_mapper_init(struct _citrus_mapper_area *__restrict ma __unused, + struct _citrus_mapper * __restrict cm, const char * __restrict dir __unused, + const void * __restrict var, size_t lenvar, + struct _citrus_mapper_traits * __restrict mt, size_t lenmt) { struct _citrus_mapper_zone *mz; struct _memstream ms; struct _region r; - _DIAGASSERT(cm && dir && mt); - - if (lenmtmz_col.z_begin = mz->mz_col.z_end = 0; mz->mz_row.z_begin = mz->mz_row.z_end = 0; @@ -333,66 +319,67 @@ _citrus_mapper_zone_mapper_init(struct _citrus_mapper_area *__restrict ma, mz->mz_row_offset = 0; mz->mz_col_offset = 0; - _region_init(&r, (void *)var, lenvar); + _region_init(&r, __DECONST(void *, var), lenvar); _memstream_bind(&ms, &r); if (parse_var(mz, &ms)) { free(mz); - return EINVAL; + return (EINVAL); } cm->cm_closure = mz; mt->mt_src_max = mt->mt_dst_max = 1; /* 1:1 converter */ mt->mt_state_size = 0; /* stateless */ - return 0; + return (0); } static void /*ARGSUSED*/ -_citrus_mapper_zone_mapper_uninit(struct _citrus_mapper *cm) +_citrus_mapper_zone_mapper_uninit(struct _citrus_mapper *cm __unused) { + } static int /*ARGSUSED*/ _citrus_mapper_zone_mapper_convert(struct _citrus_mapper * __restrict cm, - _citrus_index_t * __restrict dst, - _citrus_index_t src, void * __restrict ps) + _citrus_index_t * __restrict dst, _citrus_index_t src, + void * __restrict ps __unused) { - u_int32_t row, col; struct _citrus_mapper_zone *mz = cm->cm_closure; + uint32_t col, row; if (mz->mz_col_bits == 32) { col = src; row = 0; if (col < mz->mz_col.z_begin || col > mz->mz_col.z_end) - return _CITRUS_MAPPER_CONVERT_NONIDENTICAL; - if (mz->mz_col_offset>0) - col += (u_int32_t)mz->mz_col_offset; + return (_CITRUS_MAPPER_CONVERT_NONIDENTICAL); + if (mz->mz_col_offset > 0) + col += (uint32_t)mz->mz_col_offset; else - col -= (u_int32_t)-mz->mz_col_offset; + col -= (uint32_t)-mz->mz_col_offset; *dst = col; } else { - col = src & (((u_int32_t)1<mz_col_bits)-1); + col = src & (((uint32_t)1 << mz->mz_col_bits) - 1); row = src >> mz->mz_col_bits; if (row < mz->mz_row.z_begin || row > mz->mz_row.z_end || col < mz->mz_col.z_begin || col > mz->mz_col.z_end) - return _CITRUS_MAPPER_CONVERT_NONIDENTICAL; - if (mz->mz_col_offset>0) - col += (u_int32_t)mz->mz_col_offset; + return (_CITRUS_MAPPER_CONVERT_NONIDENTICAL); + if (mz->mz_col_offset > 0) + col += (uint32_t)mz->mz_col_offset; else - col -= (u_int32_t)-mz->mz_col_offset; - if (mz->mz_row_offset>0) - row += (u_int32_t)mz->mz_row_offset; + col -= (uint32_t)-mz->mz_col_offset; + if (mz->mz_row_offset > 0) + row += (uint32_t)mz->mz_row_offset; else - row -= (u_int32_t)-mz->mz_row_offset; + row -= (uint32_t)-mz->mz_row_offset; *dst = col | (row << mz->mz_col_bits); } - return _CITRUS_MAPPER_CONVERT_SUCCESS; + return (_CITRUS_MAPPER_CONVERT_SUCCESS); } static void /*ARGSUSED*/ -_citrus_mapper_zone_mapper_init_state(struct _citrus_mapper * __restrict cm, - void * __restrict ps) +_citrus_mapper_zone_mapper_init_state(void) { + } diff --git a/lib/libc/citrus/modules/citrus_mapper_zone.h b/lib/i18n_module/mapper_zone/citrus_mapper_zone.h similarity index 87% rename from lib/libc/citrus/modules/citrus_mapper_zone.h rename to lib/i18n_module/mapper_zone/citrus_mapper_zone.h index d659217ca0..e6b40f38dc 100644 --- a/lib/libc/citrus/modules/citrus_mapper_zone.h +++ b/lib/i18n_module/mapper_zone/citrus_mapper_zone.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/modules/citrus_mapper_zone.h,v 1.1 2003/06/25 09:51:48 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/modules/citrus_mapper_zone.h,v 1.2 2008/04/10 10:21:02 hasso Exp $ */ +/* $FreeBSD: head/lib/libiconv_modules/mapper_zone/citrus_mapper_zone.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper_zone.h,v 1.1 2003/06/25 09:51:48 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libarchive/config.h b/lib/libarchive/config.h index 8072d27c3c..83e04cc7c0 100644 --- a/lib/libarchive/config.h +++ b/lib/libarchive/config.h @@ -900,7 +900,7 @@ /* #undef HAVE__MKGMTIME64 */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST +#define ICONV_CONST const /* Version number of libarchive as a single integer */ /* #undef LIBARCHIVE_VERSION_NUMBER */ diff --git a/lib/libc/citrus/Makefile.inc b/lib/libc/citrus/Makefile.inc index e11072ffa2..3a5a79493b 100644 --- a/lib/libc/citrus/Makefile.inc +++ b/lib/libc/citrus/Makefile.inc @@ -1,34 +1,11 @@ .PATH: ${.CURDIR}/../libc/citrus -.include "../../i18n_module/Makefile.shlib" - CMAPS+= ${.CURDIR}/citrus/Symbol.map -CFLAGS+= -DI18NMODULE_MAJOR=${MODULE_SHLIB_MAJOR} -D_I18N_DYNAMIC -STATIC_LOCALES?= - -SRCS+= citrus_bcs.c citrus_csmapper.c citrus_ctype.c citrus_ctype_fallback.c -SRCS+= citrus_db.c citrus_db_hash.c citrus_esdb.c citrus_hash.c -SRCS+= citrus_iconv.c citrus_lookup.c citrus_mapper.c citrus_memstream.c -SRCS+= citrus_mmap.c citrus_module.c citrus_none.c citrus_stdenc.c -SRCS+= citrus_prop.c +SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_bcs_strtoul.c \ + citrus_csmapper.c citrus_db.c citrus_db_factory.c citrus_db_hash.c \ + citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \ + citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \ + citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \ + citrus_prop.c citrus_stdenc.c -# Add the locale modules to compile-in in the static libc.a -# (and profile/libc.a). -# If a new locale module is added, the includes and the table in -# citrus_module.c must be updated. -# A new module must have the file name citrus_xxx.c where xxx is the lower -# case name of the module. -# Currently the modules specified by STATIC_LOCALES are included in the -# shared libc (but never used). This is a bug. -.if ${STATIC_LOCALES} != "" -.PATH: ${.CURDIR}/../libc/citrus/modules -CFLAGS+=-I${.CURDIR}/../libc/citrus -CFLAGS+=-D_I18N_STATIC -.for var in ${STATIC_LOCALES} -SRCS+= citrus_${var:tl}.c -CFLAGS+=-D_I18N_STATIC_${var} -.endfor -# iconv support -SRCS+=citrus_iconv_std.c citrus_mapper_std.c citrus_mapper_none.c citrus_mapper_serial.c citrus_utf1632.c -.endif # STATIC_LOCALES diff --git a/lib/libc/citrus/Symbol.map b/lib/libc/citrus/Symbol.map index ae0f2f06f2..e997f4c25d 100644 --- a/lib/libc/citrus/Symbol.map +++ b/lib/libc/citrus/Symbol.map @@ -1,80 +1,86 @@ DFprivate_1.0 { - _citrus_NONE_ctype_ops; - _citrus_NONE_stdenc_ops; - _citrus_NONE_stdenc_traits; - _citrus_UTF1632_stdenc_getops; - _citrus_UTF1632_stdenc_ops; - _citrus_UTF8_ctype_getops; - _citrus_UTF8_ctype_ops; - _citrus_UTF8_stdenc_getops; - _citrus_UTF8_stdenc_ops; _citrus_bcs_convert_to_lower; _citrus_bcs_convert_to_upper; + _citrus_bcs_isalnum; + _citrus_bcs_isalpha; + _citrus_bcs_isblank; + _citrus_bcs_isdigit; + _citrus_bcs_iseol; + _citrus_bcs_islower; + _citrus_bcs_isspace; + _citrus_bcs_isupper; + _citrus_bcs_isxdigit; _citrus_bcs_skip_nonws; _citrus_bcs_skip_nonws_len; _citrus_bcs_skip_ws; _citrus_bcs_skip_ws_len; _citrus_bcs_strcasecmp; _citrus_bcs_strncasecmp; + _citrus_bcs_strtol; + _citrus_bcs_strtoul; + _citrus_bcs_tolower; + _citrus_bcs_toupper; _citrus_bcs_trunc_rws_len; + _citrus_bcs_trunc_ws_len; _citrus_csmapper_open; - _citrus_ctype_btowc_fallback; - _citrus_ctype_close; - _citrus_ctype_default; - _citrus_ctype_open; - _citrus_ctype_wctob_fallback; + _citrus_csmapper_close; + _citrus_db_factory_add_by_string; + _citrus_db_factory_add_string_by_string; + _citrus_db_factory_add32_by_string; + _citrus_db_factory_calc_size; + _citrus_db_factory_create; + _citrus_db_factory_serialize; _citrus_db_close; _citrus_db_get_entry; _citrus_db_get_number_of_entries; _citrus_db_hash_std; _citrus_db_lookup; _citrus_db_lookup16_by_string; - _citrus_db_lookup32_by_string; _citrus_db_lookup8_by_string; _citrus_db_lookup_by_string; _citrus_db_lookup_string_by_string; _citrus_db_open; - _citrus_esdb_alias; _citrus_esdb_close; - _citrus_esdb_free_list; - _citrus_esdb_get_list; _citrus_esdb_open; - _citrus_find_getops; - _citrus_iconv_close; - _citrus_iconv_open; - _citrus_iconv_std_iconv_getops; - _citrus_iconv_std_iconv_ops; - _citrus_load_module; - _citrus_lookup_get_number_of_entries; - _citrus_lookup_seq_close; - _citrus_lookup_seq_lookup; - _citrus_lookup_seq_next; - _citrus_lookup_seq_open; - _citrus_lookup_seq_rewind; - _citrus_lookup_simple; + _citrus_lookup_factory_convert; _citrus_map_file; _citrus_mapper_close; + _citrus_mapper_convert; _citrus_mapper_create_area; - _citrus_mapper_none_mapper_getops; - _citrus_mapper_none_mapper_ops; + _citrus_mapper_get_dst_max; + _citrus_mapper_get_src_max; + _citrus_mapper_get_state_size; + _citrus_mapper_init_state; _citrus_mapper_open; _citrus_mapper_open_direct; - _citrus_mapper_parallel_mapper_getops; - _citrus_mapper_parallel_mapper_ops; - _citrus_mapper_serial_mapper_getops; - _citrus_mapper_serial_mapper_ops; _citrus_mapper_set_persistent; - _citrus_mapper_std_mapper_getops; - _citrus_mapper_std_mapper_ops; + _citrus_memory_stream_bind; _citrus_memory_stream_chr; + _citrus_memory_stream_getc; _citrus_memory_stream_getln; + _citrus_memory_stream_getln_region; + _citrus_memory_stream_getregion; + _citrus_memory_stream_iseof; _citrus_memory_stream_matchline; + _citrus_memory_stream_peek; + _citrus_memory_stream_remainder; + _citrus_memory_stream_rewind; + _citrus_memory_stream_seek; _citrus_memory_stream_skip_ws; + _citrus_memory_stream_tell; + _citrus_memory_stream_ungetc; + _citrus_pivot_factory_convert; + _citrus_prop_object_init; + _citrus_prop_object_uninit; _citrus_prop_parse_variable; + _citrus_prop_read_bool; + _citrus_prop_read_character; + _citrus_prop_read_character_common; + _citrus_prop_read_element; + _citrus_prop_read_num; + _citrus_prop_read_str; + _citrus_prop_read_symbol; _citrus_stdenc_close; - _citrus_stdenc_default; _citrus_stdenc_open; - _citrus_unload_module; _citrus_unmap_file; - _string_hash_func; }; diff --git a/lib/libc/locale/_wcstol.h b/lib/libc/citrus/_strtol.h similarity index 56% rename from lib/libc/locale/_wcstol.h rename to lib/libc/citrus/_strtol.h index a9ed7d8405..02c5f71a7b 100644 --- a/lib/libc/locale/_wcstol.h +++ b/lib/libc/citrus/_strtol.h @@ -1,4 +1,5 @@ -/* $NetBSD: src/lib/libc/locale/_wcstol.h,v 1.2 2003/08/07 16:43:03 agc Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/_strtol.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: _strtol.h,v 1.2 2009/05/20 22:03:29 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -29,37 +30,38 @@ * SUCH DAMAGE. * * Original version ID: - * @(#)strtol.c 8.1 (Berkeley) 6/4/93 - * NetBSD: wcstol.c,v 1.1 2001/09/27 16:30:36 yamt Exp - * Citrus: xpg4dl/FreeBSD/lib/libc/locale/wcstol.c,v 1.2 2001/09/21 16:11:41 yamt Exp + * NetBSD: src/lib/libc/locale/_wcstol.h,v 1.2 2003/08/07 16:43:03 agc Exp */ /* - * function template for wcstol, wcstoll and wcstoimax. + * function template for strtol, strtoll and strtoimax. * * parameters: * _FUNCNAME : function name * __INT : return type - * __INT_MIN : lower limit of the return type - * __INT_MAX : upper limit of the return type + * INT_MIN : lower limit of the return type + * INT_MAX : upper limit of the return type */ __INT -_FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) +_FUNCNAME(const char *nptr, char **endptr, int base) { - const wchar_t *s; + const char *s; __INT acc, cutoff; - wint_t wc; - int i; - int neg, any, cutlim; - - _DIAGASSERT(nptr != NULL); - /* endptr may be NULL */ + unsigned char c; + int any, cutlim, i, neg; /* check base value */ if (base && (base < 2 || base > 36)) { +#if !defined(_KERNEL) && !defined(_STANDALONE) errno = EINVAL; - return(0); + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = __DECONST(void *, nptr); + return (0); +#else + panic("%s: invalid base %d", __func__, base); +#endif } /* @@ -69,29 +71,43 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) */ s = nptr; do { - wc = (wchar_t) *s++; - } while (iswspace(wc)); - if (wc == L'-') { + c = *s++; + } while (isspace(c)); + if (c == '-') { neg = 1; - wc = *s++; + c = *s++; } else { neg = 0; - if (wc == L'+') - wc = *s++; + if (c == '+') + c = *s++; } if ((base == 0 || base == 16) && - wc == L'0' && (*s == L'x' || *s == L'X')) { - wc = s[1]; + c == '0' && (*s == 'x' || *s == 'X')) { + c = s[1]; s += 2; base = 16; } if (base == 0) - base = wc == L'0' ? 8 : 10; + base = (c == '0' ? 8 : 10); /* - * See strtol for comments as to the logic used. + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for longs is + * [-2147483648..2147483647] and the input base is 10, + * cutoff will be set to 214748364 and cutlim to either + * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated + * a value > 214748364, or equal but the next digit is > 7 (or 8), + * the number is too big, and we will return a range error. + * + * Set any if any `digits' consumed; make it negative to indicate + * overflow. */ - cutoff = neg ? __INT_MIN : __INT_MAX; + cutoff = (neg ? INT_MIN : INT_MAX); cutlim = (int)(cutoff % base); cutoff /= base; if (neg) { @@ -101,9 +117,12 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) } cutlim = -cutlim; } - for (acc = 0, any = 0;; wc = (wchar_t) *s++) { - i = __wctoint(wc); - if (i == -1) + for (acc = 0, any = 0;; c = *s++) { + if (isdigit(c)) + i = c - '0'; + else if (isalpha(c)) + i = c - (isupper(c) ? 'A' - 10 : 'a' - 10); + else break; if (i >= base) break; @@ -111,9 +130,14 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) continue; if (neg) { if (acc < cutoff || (acc == cutoff && i > cutlim)) { + acc = INT_MIN; +#if !defined(_KERNEL) && !defined(_STANDALONE) any = -1; - acc = __INT_MIN; errno = ERANGE; +#else + any = 0; + break; +#endif } else { any = 1; acc *= base; @@ -121,9 +145,14 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) } } else { if (acc > cutoff || (acc == cutoff && i > cutlim)) { + acc = INT_MAX; +#if !defined(_KERNEL) && !defined(_STANDALONE) any = -1; - acc = __INT_MAX; errno = ERANGE; +#else + any = 0; + break; +#endif } else { any = 1; acc *= base; @@ -133,6 +162,6 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) } if (endptr != NULL) /* LINTED interface specification */ - *endptr = (wchar_t *)(any ? s - 1 : nptr); + *endptr = __DECONST(void *, any ? s - 1 : nptr); return(acc); } diff --git a/lib/libc/locale/_wcstoul.h b/lib/libc/citrus/_strtoul.h similarity index 66% rename from lib/libc/locale/_wcstoul.h rename to lib/libc/citrus/_strtoul.h index dd0ad82782..f4b6dbdb90 100644 --- a/lib/libc/locale/_wcstoul.h +++ b/lib/libc/citrus/_strtoul.h @@ -1,6 +1,7 @@ -/* $NetBSD: src/lib/libc/locale/_wcstoul.h,v 1.2 2003/08/07 16:43:03 agc Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/_strtoul.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: _strtoul.h,v 1.1 2008/08/20 12:42:26 joerg Exp $ */ -/* +/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * @@ -29,35 +30,34 @@ * SUCH DAMAGE. * * Original version ID: - * @(#)strtoul.c 8.1 (Berkeley) 6/4/93 - * Citrus: xpg4dl/FreeBSD/lib/libc/locale/wcstoul.c,v 1.2 2001/09/21 16:11:41 yamt Exp - * NetBSD: wcstoul.c,v 1.1 2001/09/27 16:30:37 yamt Exp + * NetBSD: src/lib/libc/locale/_wcstoul.h,v 1.2 2003/08/07 16:43:03 agc Exp */ /* - * function template for wcstoul, wcstoull and wcstoumax. + * function template for strtoul, strtoull and strtoumax. * * parameters: * _FUNCNAME : function name * __UINT : return type - * __UINT_MAX : upper limit of the return type + * UINT_MAX : upper limit of the return type */ __UINT -_FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) +_FUNCNAME(const char *nptr, char **endptr, int base) { - const wchar_t *s; + const char *s; __UINT acc, cutoff; - wint_t wc; - int i; - int neg, any, cutlim; - - _DIAGASSERT(nptr != NULL); - /* endptr may be NULL */ + unsigned char c; + int any, cutlim, i, neg; + /* check base value */ if (base && (base < 2 || base > 36)) { +#if !defined(_KERNEL) && !defined(_STANDALONE) errno = EINVAL; - return(0); + return (0); +#else + panic("%s: invalid base %d", __func__, base); +#endif } /* @@ -67,42 +67,50 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) */ s = nptr; do { - wc = (wchar_t) *s++; - } while (iswspace(wc)); - if (wc == L'-') { + c = *s++; + } while (isspace(c)); + if (c == '-') { neg = 1; - wc = *s++; + c = *s++; } else { neg = 0; - if (wc == L'+') - wc = *s++; + if (c == '+') + c = *s++; } if ((base == 0 || base == 16) && - wc == L'0' && (*s == L'x' || *s == L'X')) { - wc = s[1]; + c == '0' && (*s == 'x' || *s == 'X')) { + c = s[1]; s += 2; base = 16; } if (base == 0) - base = wc == L'0' ? 8 : 10; + base = (c == '0' ? 8 : 10); /* - * See strtoul for comments as to the logic used. + * See strtol for comments as to the logic used. */ - cutoff = __UINT_MAX / (__UINT)base; - cutlim = (int)(__UINT_MAX % (__UINT)base); - for (acc = 0, any = 0;; wc = (wchar_t) *s++) { - i = __wctoint(wc); - if (i == (wint_t)-1) + cutoff = UINT_MAX / (__UINT)base; + cutlim = (int)(UINT_MAX % (__UINT)base); + for (acc = 0, any = 0;; c = *s++) { + if (isdigit(c)) + i = c - '0'; + else if (isalpha(c)) + i = c - (isupper(c) ? 'A' - 10 : 'a' - 10); + else break; if (i >= base) break; if (any < 0) continue; if (acc > cutoff || (acc == cutoff && i > cutlim)) { + acc = UINT_MAX; +#if !defined(_KERNEL) && !defined(_STANDALONE) any = -1; - acc = __UINT_MAX; errno = ERANGE; +#else + any = 0; + break; +#endif } else { any = 1; acc *= (__UINT)base; @@ -113,6 +121,6 @@ _FUNCNAME(const wchar_t *nptr, wchar_t **endptr, int base) acc = -acc; if (endptr != NULL) /* LINTED interface specification */ - *endptr = (wchar_t *)(any ? s - 1 : nptr); - return(acc); + *endptr = __DECONST(void *, any ? s - 1 : nptr); + return (acc); } diff --git a/lib/libc/citrus/citrus_hash.c b/lib/libc/citrus/citrus_aliasname_local.h similarity index 68% copy from lib/libc/citrus/citrus_hash.c copy to lib/libc/citrus/citrus_aliasname_local.h index 2af6523cb7..e8ee73edf4 100644 --- a/lib/libc/citrus/citrus_hash.c +++ b/lib/libc/citrus/citrus_aliasname_local.h @@ -1,9 +1,8 @@ -/* $NetBSD: citrus_hash.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_hash.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_aliasname_local.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_aliasname_local.h,v 1.2 2009/01/11 02:46:24 christos Exp $ */ /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c)2008 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,23 +27,23 @@ * SUCH DAMAGE. */ -#include -#include -#include -#include - -#include "citrus_namespace.h" -#include "citrus_types.h" -#include "citrus_region.h" -#include "citrus_hash.h" -#include "citrus_db_hash.h" +#ifndef _CITRUS_ALIASNAME_LOCAL_H_ +#define _CITRUS_ALIASNAME_LOCAL_H_ -int -_citrus_string_hash_func(const char *key, int hashsize) +static __inline const char * +__unaliasname(const char *dbname, const char *alias, + void *buf, size_t bufsize) { - struct _region r; - _region_init(&r, __DECONST(char *, key), strlen(key)); + return (_lookup_simple(dbname, alias, + buf, bufsize, _LOOKUP_CASE_SENSITIVE)); +} + +static __inline int +__isforcemapping(const char *name) +{ - return (int)(_db_hash_std(NULL, &r) % (uint32_t)hashsize); + return (_bcs_strcasecmp("/force", name)); } + +#endif /*_CITRUS_ALIASNAME_LOCAL_H_*/ diff --git a/lib/libc/citrus/citrus_bcs.c b/lib/libc/citrus/citrus_bcs.c index fdf9cab3cd..ea029565b5 100644 --- a/lib/libc/citrus/citrus_bcs.c +++ b/lib/libc/citrus/citrus_bcs.c @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_bcs.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_bcs.c,v 1.5 2005/05/14 17:55:42 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_bcs.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,7 +27,8 @@ * SUCH DAMAGE. */ -#include +#include + #include #include @@ -39,9 +40,11 @@ */ int _citrus_bcs_strcasecmp(const char * __restrict str1, - const char * __restrict str2) + const char * __restrict str2) { - int c1 = 1, c2 = 1; + int c1, c2; + + c1 = c2 = 1; while (c1 && c2 && c1 == c2) { c1 = _bcs_toupper(*str1++); @@ -56,9 +59,11 @@ _citrus_bcs_strcasecmp(const char * __restrict str1, */ int _citrus_bcs_strncasecmp(const char * __restrict str1, - const char * __restrict str2, size_t sz) + const char * __restrict str2, size_t sz) { - int c1 = 1, c2 = 1; + int c1, c2; + + c1 = c2 = 1; while (c1 && c2 && c1 == c2 && sz != 0) { c1 = _bcs_toupper(*str1++); @@ -142,6 +147,7 @@ _citrus_bcs_trunc_rws_len(const char * __restrict p, size_t * __restrict len) void _citrus_bcs_convert_to_lower(char *s) { + while (*s) { *s = _bcs_tolower(*s); s++; @@ -154,6 +160,7 @@ _citrus_bcs_convert_to_lower(char *s) void _citrus_bcs_convert_to_upper(char *s) { + while (*s) { *s = _bcs_toupper(*s); s++; diff --git a/lib/libc/citrus/citrus_bcs.h b/lib/libc/citrus/citrus_bcs.h index f88168301a..10afacdb98 100644 --- a/lib/libc/citrus/citrus_bcs.h +++ b/lib/libc/citrus/citrus_bcs.h @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_bcs.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_bcs.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_bcs.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_bcs.h,v 1.6 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,10 +27,13 @@ * SUCH DAMAGE. */ +#include + #ifndef _CITRUS_BCS_H_ #define _CITRUS_BCS_H_ /* + * predicate/conversion for basic character set. * * `Basic character set' is a term defined in the ISO C standard. * Citrus bcs is, if anything, close to `portable character set' @@ -46,17 +49,15 @@ static __inline int _citrus_bcs_##_name_(uint8_t c) { return (_cond_); } */ _CITRUS_BCS_PRED(isblank, c == ' ' || c == '\t') _CITRUS_BCS_PRED(iseol, c == '\n' || c == '\r') -_CITRUS_BCS_PRED(isspace, - _citrus_bcs_isblank(c) || _citrus_bcs_iseol(c) || - c == '\f' || c == '\v') +_CITRUS_BCS_PRED(isspace, _citrus_bcs_isblank(c) || _citrus_bcs_iseol(c) || + c == '\f' || c == '\v') _CITRUS_BCS_PRED(isdigit, c >= '0' && c <= '9') _CITRUS_BCS_PRED(isupper, c >= 'A' && c <= 'Z') _CITRUS_BCS_PRED(islower, c >= 'a' && c <= 'z') _CITRUS_BCS_PRED(isalpha, _citrus_bcs_isupper(c) || _citrus_bcs_islower(c)) _CITRUS_BCS_PRED(isalnum, _citrus_bcs_isdigit(c) || _citrus_bcs_isalpha(c)) -_CITRUS_BCS_PRED(isxdigit, - _citrus_bcs_isdigit(c) || - (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')) +_CITRUS_BCS_PRED(isxdigit, _citrus_bcs_isdigit(c) || + (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')) /* * transliterate between uppercase and lowercase. @@ -65,28 +66,37 @@ _CITRUS_BCS_PRED(isxdigit, static __inline uint8_t _citrus_bcs_toupper(uint8_t c) { + return (_citrus_bcs_islower(c) ? (c - 'a' + 'A') : c); } static __inline uint8_t _citrus_bcs_tolower(uint8_t c) { + return (_citrus_bcs_isupper(c) ? (c - 'A' + 'a') : c); } __BEGIN_DECLS -int _citrus_bcs_strcasecmp(const char * __restrict, const char * __restrict); -int _citrus_bcs_strncasecmp(const char * __restrict, const char * __restrict, - size_t); -const char *_citrus_bcs_skip_ws(const char * __restrict); -const char *_citrus_bcs_skip_nonws(const char * __restrict); -const char *_citrus_bcs_skip_ws_len(const char * __restrict, - size_t * __restrict); -const char *_citrus_bcs_skip_nonws_len(const char * __restrict, - size_t * __restrict); -void _citrus_bcs_trunc_rws_len(const char * __restrict, size_t * __restrict); -void _citrus_bcs_convert_to_lower(char *); -void _citrus_bcs_convert_to_upper(char *); +int _citrus_bcs_strcasecmp(const char * __restrict, + const char * __restrict); +int _citrus_bcs_strncasecmp(const char * __restrict, + const char * __restrict, size_t); +const char *_citrus_bcs_skip_ws(const char * __restrict); +const char *_citrus_bcs_skip_nonws(const char * __restrict); +const char *_citrus_bcs_skip_ws_len(const char * __restrict, + size_t * __restrict); +const char *_citrus_bcs_skip_nonws_len(const char * __restrict, + size_t * __restrict); +void _citrus_bcs_trunc_rws_len(const char * __restrict, + size_t * __restrict); +void _citrus_bcs_convert_to_lower(char *); +void _citrus_bcs_convert_to_upper(char *); + +long int _citrus_bcs_strtol(const char * __restrict, + char ** __restrict, int); +unsigned long _citrus_bcs_strtoul(const char * __restrict, + char ** __restrict, int); __END_DECLS #endif diff --git a/lib/libc/stdlib/strtoimax.c b/lib/libc/citrus/citrus_bcs_strtol.c similarity index 73% copy from lib/libc/stdlib/strtoimax.c copy to lib/libc/citrus/citrus_bcs_strtol.c index d38c70f5c2..e87e929aa8 100644 --- a/lib/libc/stdlib/strtoimax.c +++ b/lib/libc/citrus/citrus_bcs_strtol.c @@ -1,8 +1,9 @@ -/* $DragonFly: src/lib/libc/stdlib/strtoimax.c,v 1.2 2008/08/19 15:50:24 joerg Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_bcs_strtol.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_bcs_strtol.c,v 1.2 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2003, 2008 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,17 +28,30 @@ * SUCH DAMAGE. */ +#include + #include -#include #include -#include #include #include #include -#define _FUNCNAME strtoimax -#define __INT intmax_t -#define __INT_MIN INTMAX_MIN -#define __INT_MAX INTMAX_MAX +#include "citrus_namespace.h" +#include "citrus_bcs.h" + +#define _FUNCNAME _bcs_strtol +#define __INT long int + +#undef isspace +#define isspace(c) _bcs_isspace(c) + +#undef isdigit +#define isdigit(c) _bcs_isdigit(c) + +#undef isalpha +#define isalpha(c) _bcs_isalpha(c) + +#undef isupper +#define isupper(c) _bcs_isupper(c) #include "_strtol.h" diff --git a/lib/libc/stdlib/strtoumax.c b/lib/libc/citrus/citrus_bcs_strtoul.c similarity index 72% copy from lib/libc/stdlib/strtoumax.c copy to lib/libc/citrus/citrus_bcs_strtoul.c index 5c44be0c0f..2ed30ed564 100644 --- a/lib/libc/stdlib/strtoumax.c +++ b/lib/libc/citrus/citrus_bcs_strtoul.c @@ -1,8 +1,9 @@ -/* $DragonFly: src/lib/libc/stdlib/strtoumax.c,v 1.2 2008/08/19 15:50:24 joerg Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_bcs_strtoul.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_bcs_strtoul.c,v 1.3 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2003, 2008 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,16 +28,30 @@ * SUCH DAMAGE. */ +#include + #include -#include #include -#include #include #include #include -#define _FUNCNAME strtoumax -#define __UINT uintmax_t -#define __UINT_MAX UINTMAX_MAX +#include "citrus_namespace.h" +#include "citrus_bcs.h" + +#define _FUNCNAME _bcs_strtoul +#define __UINT unsigned long int + +#undef isspace +#define isspace(c) _bcs_isspace(c) + +#undef isdigit +#define isdigit(c) _bcs_isdigit(c) + +#undef isalpha +#define isalpha(c) _bcs_isalpha(c) + +#undef isupper +#define isupper(c) _bcs_isupper(c) #include "_strtoul.h" diff --git a/lib/libc/citrus/citrus_csmapper.c b/lib/libc/citrus/citrus_csmapper.c index 570ce8ddb8..1a0bdc676e 100644 --- a/lib/libc/citrus/citrus_csmapper.c +++ b/lib/libc/citrus/citrus_csmapper.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_csmapper.c,v 1.8 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_csmapper.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_csmapper.c 252584 2013-07-03 18:35:21Z peter $ */ +/* $NetBSD: citrus_csmapper.c,v 1.10 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,26 +27,24 @@ * SUCH DAMAGE. */ -#include "namespace.h" -#include +#include #include +#include #include + #include #include #include #include -#include #include #include #include -#include "un-namespace.h" - -#include "libc_private.h" #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_bcs.h" #include "citrus_region.h" +#include "citrus_lock.h" #include "citrus_memstream.h" #include "citrus_mmap.h" #include "citrus_module.h" @@ -58,8 +56,9 @@ #include "citrus_db_hash.h" #include "citrus_lookup.h" -static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; -static struct _citrus_mapper_area *maparea = NULL; +static struct _citrus_mapper_area *maparea = NULL; + +static pthread_rwlock_t ma_lock = PTHREAD_RWLOCK_INITIALIZER; #define CS_ALIAS _PATH_CSMAPPER "/charset.alias" #define CS_PIVOT _PATH_CSMAPPER "/charset.pivot" @@ -70,49 +69,50 @@ static struct _citrus_mapper_area *maparea = NULL; static int get32(struct _region *r, uint32_t *rval) { + if (_region_size(r) != 4) - return EFTYPE; + return (EFTYPE); - memcpy(rval, _region_head(r), 4); + memcpy(rval, _region_head(r), (size_t)4); *rval = be32toh(*rval); - return 0; + return (0); } static int open_subdb(struct _citrus_db **subdb, struct _citrus_db *db, const char *src) { - int ret; struct _region r; + int ret; ret = _db_lookup_by_s(db, src, &r, NULL); if (ret) - return ret; + return (ret); ret = _db_open(subdb, &r, _CITRUS_PIVOT_SUB_MAGIC, _db_hash_std, NULL); if (ret) - return ret; + return (ret); - return 0; + return (0); } #define NO_SUCH_FILE EOPNOTSUPP static int find_best_pivot_pvdb(const char *src, const char *dst, char *pivot, - size_t pvlen, unsigned long *rnorm) + size_t pvlen, unsigned long *rnorm) { - int ret, num, i; - struct _region fr, r1, r2; struct _citrus_db *db1, *db2, *db3; + struct _region fr, r1, r2; char buf[LINE_MAX]; - unsigned long norm; uint32_t val32; + unsigned long norm; + int i, num, ret; ret = _map_file(&fr, CS_PIVOT ".pvdb"); if (ret) { if (ret == ENOENT) ret = NO_SUCH_FILE; - return ret; + return (ret); } ret = _db_open(&db1, &fr, _CITRUS_PIVOT_MAGIC, _db_hash_std, NULL); if (ret) @@ -163,12 +163,12 @@ quit2: quit1: _unmap_file(&fr); if (ret) - return ret; + return (ret); if (*rnorm == ULONG_MAX) - return ENOENT; + return (ENOENT); - return 0; + return (0); } /* ---------------------------------------------------------------------- */ @@ -185,43 +185,43 @@ struct parse_arg { static int parse_line(struct parse_arg *pa, struct _region *r) { - char buf[20]; struct zone z1, z2; + char buf[20]; size_t len; len = _region_size(r); z1.begin = _bcs_skip_ws_len(_region_head(r), &len); if (len == 0) - return EFTYPE; + return (EFTYPE); z1.end = _bcs_skip_nonws_len(z1.begin, &len); if (len == 0) - return EFTYPE; + return (EFTYPE); z2.begin = _bcs_skip_ws_len(z1.end, &len); if (len == 0) - return EFTYPE; + return (EFTYPE); z2.end = _bcs_skip_nonws_len(z2.begin, &len); /* z1 : dst name, z2 : norm */ snprintf(pa->dst, sizeof(pa->dst), - "%.*s", (int)(z1.end-z1.begin), z1.begin); + "%.*s", (int)(z1.end-z1.begin), z1.begin); snprintf(buf, sizeof(buf), - "%.*s", (int)(z2.end-z2.begin), z2.begin); - pa->norm = strtoul(buf, NULL, 0); + "%.*s", (int)(z2.end-z2.begin), z2.begin); + pa->norm = _bcs_strtoul(buf, NULL, 0); - return 0; + return (0); } static int find_dst(struct parse_arg *pasrc, const char *dst) { - int ret; - struct parse_arg padst; struct _lookup *cl; + struct parse_arg padst; struct _region data; + int ret; ret = _lookup_seq_open(&cl, CS_PIVOT, _LOOKUP_CASE_IGNORE); if (ret) - return ret; + return (ret); ret = _lookup_seq_lookup(cl, pasrc->dst, &data); while (ret == 0) { @@ -236,23 +236,23 @@ find_dst(struct parse_arg *pasrc, const char *dst) } _lookup_seq_close(cl); - return ret; + return (ret); } static int find_best_pivot_lookup(const char *src, const char *dst, char *pivot, - size_t pvlen, unsigned long *rnorm) + size_t pvlen, unsigned long *rnorm) { - int ret; struct _lookup *cl; struct _region data; struct parse_arg pa; - unsigned long norm_min; char pivot_min[PATH_MAX]; + unsigned long norm_min; + int ret; ret = _lookup_seq_open(&cl, CS_PIVOT, _LOOKUP_CASE_IGNORE); if (ret) - return ret; + return (ret); norm_min = ULONG_MAX; @@ -274,19 +274,19 @@ find_best_pivot_lookup(const char *src, const char *dst, char *pivot, _lookup_seq_close(cl); if (ret != ENOENT) - return ret; + return (ret); if (norm_min == ULONG_MAX) - return ENOENT; + return (ENOENT); strlcpy(pivot, pivot_min, pvlen); if (rnorm) *rnorm = norm_min; - return 0; + return (0); } static int find_best_pivot(const char *src, const char *dst, char *pivot, size_t pvlen, - unsigned long *rnorm) + unsigned long *rnorm) { int ret; @@ -294,31 +294,29 @@ find_best_pivot(const char *src, const char *dst, char *pivot, size_t pvlen, if (ret == NO_SUCH_FILE) ret = find_best_pivot_lookup(src, dst, pivot, pvlen, rnorm); - return ret; + return (ret); } static __inline int open_serial_mapper(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict * __restrict rcm, - const char *src, const char *pivot, const char *dst) + struct _citrus_mapper * __restrict * __restrict rcm, + const char *src, const char *pivot, const char *dst) { char buf[PATH_MAX]; snprintf(buf, sizeof(buf), "%s/%s,%s/%s", src, pivot, pivot, dst); - return _mapper_open_direct(ma, rcm, "mapper_serial", buf); + return (_mapper_open_direct(ma, rcm, "mapper_serial", buf)); } static struct _citrus_csmapper *csm_none = NULL; static int get_none(struct _citrus_mapper_area *__restrict ma, - struct _citrus_csmapper *__restrict *__restrict rcsm) + struct _citrus_csmapper *__restrict *__restrict rcsm) { int ret; - if (__isthreaded) - _pthread_mutex_lock(&lock); - + WLOCK(&ma_lock); if (csm_none) { *rcsm = csm_none; ret = 0; @@ -333,37 +331,35 @@ get_none(struct _citrus_mapper_area *__restrict ma, *rcsm = csm_none; ret = 0; quit: - if (__isthreaded) - _pthread_mutex_unlock(&lock); - - return ret; + UNLOCK(&ma_lock); + return (ret); } int _citrus_csmapper_open(struct _citrus_csmapper * __restrict * __restrict rcsm, - const char * __restrict src, const char * __restrict dst, - uint32_t flags, unsigned long *rnorm) + const char * __restrict src, const char * __restrict dst, uint32_t flags, + unsigned long *rnorm) { - int ret; - char buf1[PATH_MAX], buf2[PATH_MAX], key[PATH_MAX], pivot[PATH_MAX]; const char *realsrc, *realdst; + char buf1[PATH_MAX], buf2[PATH_MAX], key[PATH_MAX], pivot[PATH_MAX]; unsigned long norm; + int ret; - norm = 0; /* XXX gcc */ + norm = 0; ret = _citrus_mapper_create_area(&maparea, _PATH_CSMAPPER); if (ret) - return ret; + return (ret); realsrc = _lookup_alias(CS_ALIAS, src, buf1, sizeof(buf1), - _LOOKUP_CASE_IGNORE); + _LOOKUP_CASE_IGNORE); realdst = _lookup_alias(CS_ALIAS, dst, buf2, sizeof(buf2), - _LOOKUP_CASE_IGNORE); + _LOOKUP_CASE_IGNORE); if (!strcmp(realsrc, realdst)) { ret = get_none(maparea, rcsm); if (ret == 0 && rnorm != NULL) *rnorm = 0; - return ret; + return (ret); } snprintf(key, sizeof(key), "%s/%s", realsrc, realdst); @@ -372,18 +368,18 @@ _citrus_csmapper_open(struct _citrus_csmapper * __restrict * __restrict rcsm, if (ret == 0) { if (rnorm != NULL) *rnorm = 0; - return 0; + return (0); } if (ret != ENOENT || (flags & _CSMAPPER_F_PREVENT_PIVOT)!=0) - return ret; + return (ret); ret = find_best_pivot(realsrc, realdst, pivot, sizeof(pivot), &norm); if (ret) - return ret; + return (ret); ret = open_serial_mapper(maparea, rcsm, realsrc, pivot, realdst); if (ret == 0 && rnorm != NULL) *rnorm = norm; - return ret; + return (ret); } diff --git a/lib/libc/citrus/citrus_csmapper.h b/lib/libc/citrus/citrus_csmapper.h index 9c6ecb2a27..e9420af730 100644 --- a/lib/libc/citrus/citrus_csmapper.h +++ b/lib/libc/citrus/citrus_csmapper.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_csmapper.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_csmapper.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_csmapper.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -40,10 +40,9 @@ #define _CITRUS_CSMAPPER_F_PREVENT_PIVOT 0x00000001 __BEGIN_DECLS -int _citrus_csmapper_open(struct _citrus_csmapper *__restrict *__restrict, - const char *__restrict, - const char *__restrict, uint32_t, - unsigned long *); +int _citrus_csmapper_open(struct _citrus_csmapper *__restrict *__restrict, + const char *__restrict, const char *__restrict, uint32_t, + unsigned long *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_ctype.c b/lib/libc/citrus/citrus_ctype.c deleted file mode 100644 index 614d423f24..0000000000 --- a/lib/libc/citrus/citrus_ctype.c +++ /dev/null @@ -1,207 +0,0 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_ctype.c,v 1.4 2003/03/05 20:18:15 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_ctype.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - -/*- - * Copyright (c)1999, 2000, 2001, 2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "citrus_module.h" -#include "citrus_ctype.h" -#include "citrus_ctype_fallback.h" -#include "citrus_none.h" -#include _CITRUS_DEFAULT_CTYPE_HEADER - -_citrus_ctype_rec_t _citrus_ctype_default = { - &_CITRUS_DEFAULT_CTYPE_OPS, /* cc_ops */ - NULL, /* cc_closure */ - NULL /* cc_module */ -}; - -#if defined(_I18N_DYNAMIC) || defined(_I18N_STATIC) - -static int _initctypemodule(_citrus_ctype_t, char const *, _citrus_module_t, - void *, size_t, size_t); - -static int -_initctypemodule(_citrus_ctype_t cc, char const *modname, - _citrus_module_t handle, void *variable, size_t lenvar, - size_t szpriv) -{ - int ret; - _citrus_ctype_getops_t getops; - - _DIAGASSERT(cc != NULL); - - cc->cc_module = handle; - - getops = (_citrus_ctype_getops_t)_citrus_find_getops(cc->cc_module, - modname, - "ctype"); - if (getops == NULL) - return (EINVAL); - - cc->cc_ops = malloc(sizeof(*cc->cc_ops)); - if (cc->cc_ops == NULL) - return (ENOMEM); - - ret = (*getops)(cc->cc_ops, sizeof(*cc->cc_ops), - _CITRUS_CTYPE_ABI_VERSION); - if (ret) - goto bad; - - /* If return ABI version is not expected, fixup it here*/ - switch (cc->cc_ops->co_abi_version) { - case 0x00000001: - cc->cc_ops->co_btowc = &_citrus_ctype_btowc_fallback; - cc->cc_ops->co_wctob = &_citrus_ctype_wctob_fallback; - /* FALLTHROUGH */ - case 0x00000002: - /* FALLTHROUGH */ - default: - break; - } - - /* validation check */ - if (cc->cc_ops->co_init == NULL || - cc->cc_ops->co_uninit == NULL || - cc->cc_ops->co_get_mb_cur_max == NULL || - cc->cc_ops->co_mblen == NULL || - cc->cc_ops->co_mbrlen == NULL || - cc->cc_ops->co_mbrtowc == NULL || - cc->cc_ops->co_mbsinit == NULL || - cc->cc_ops->co_mbsrtowcs == NULL || - cc->cc_ops->co_mbstowcs == NULL || - cc->cc_ops->co_mbtowc == NULL || - cc->cc_ops->co_wcrtomb == NULL || - cc->cc_ops->co_wcsrtombs == NULL || - cc->cc_ops->co_wcstombs == NULL || - cc->cc_ops->co_wctomb == NULL || - cc->cc_ops->co_btowc == NULL || - cc->cc_ops->co_wctob == NULL) - goto bad; - - /* init and get closure */ - ret = (*cc->cc_ops->co_init)( - &cc->cc_closure, variable, lenvar, szpriv); - if (ret) - goto bad; - - return (0); - -bad: - if (cc->cc_ops) - free(cc->cc_ops); - cc->cc_ops = NULL; - - return (ret); -} - -int -_citrus_ctype_open(_citrus_ctype_t *rcc, - char const *encname, void *variable, size_t lenvar, - size_t szpriv) -{ - int ret; - _citrus_module_t handle; - _citrus_ctype_t cc; - - _DIAGASSERT(encname != NULL); - _DIAGASSERT(!lenvar || variable!=NULL); - _DIAGASSERT(rcc != NULL); - - if (!strcmp(encname, _CITRUS_DEFAULT_CTYPE_NAME)) { - *rcc = &_citrus_ctype_default; - return (0); - } - ret = _citrus_load_module(&handle, encname); - if (ret) - return (ret); - - cc = calloc(1, sizeof(*cc)); - if (!cc) { - _citrus_unload_module(handle); - return (errno); - } - - ret = _initctypemodule(cc, encname, handle, variable, lenvar, szpriv); - if (ret) { - _citrus_unload_module(cc->cc_module); - free(cc); - return (ret); - } - - *rcc = cc; - - return (0); -} - -void -_citrus_ctype_close(_citrus_ctype_t cc) -{ - - _DIAGASSERT(cc != NULL); - - if (cc == &_citrus_ctype_default) - return; - (*cc->cc_ops->co_uninit)(cc->cc_closure); - free(cc->cc_ops); - _citrus_unload_module(cc->cc_module); - free(cc); -} - -#else -/* !(_I18N_DYNAMIC || _I18N_STATIC) */ - -int -/*ARGSUSED*/ -_citrus_ctype_open(_citrus_ctype_t *rcc, - char const *encname, void *variable, size_t lenvar, - size_t szpriv) -{ - if (!strcmp(encname, _CITRUS_DEFAULT_CTYPE_NAME)) { - *rcc = &_citrus_ctype_default; - return (0); - } - return (EINVAL); -} - -void -/*ARGSUSED*/ -_citrus_ctype_close(_citrus_ctype_t cc) -{ -} - -#endif diff --git a/lib/libc/citrus/citrus_ctype.h b/lib/libc/citrus/citrus_ctype.h deleted file mode 100644 index b4d668d107..0000000000 --- a/lib/libc/citrus/citrus_ctype.h +++ /dev/null @@ -1,171 +0,0 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_ctype.h,v 1.2 2003/03/05 20:18:15 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_ctype.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - -/*- - * Copyright (c)2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#ifndef _CITRUS_CTYPE_H_ -#define _CITRUS_CTYPE_H_ - -#include "citrus_ctype_local.h" - -typedef struct _citrus_ctype_rec *_citrus_ctype_t; - -__BEGIN_DECLS -int _citrus_ctype_open(_citrus_ctype_t * __restrict, - char const * __restrict, void * __restrict, - size_t, size_t); -void _citrus_ctype_close(_citrus_ctype_t); -__END_DECLS - -static __inline unsigned -_citrus_ctype_get_mb_cur_max(_citrus_ctype_t cc) -{ - - _DIAGASSERT(cc && cc->cc_ops); - return (*cc->cc_ops->co_get_mb_cur_max)(cc->cc_closure); -} - -static __inline int -_citrus_ctype_mblen(_citrus_ctype_t cc, const char *s, size_t n, int *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mblen && nresult); - return (*cc->cc_ops->co_mblen)(cc->cc_closure, s, n, nresult); -} - -static __inline int -_citrus_ctype_mbrlen(_citrus_ctype_t cc, const char *s, size_t n, - void *pspriv, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbrlen && nresult); - return (*cc->cc_ops->co_mbrlen)(cc->cc_closure, s, n, pspriv, nresult); -} - -static __inline int -_citrus_ctype_mbrtowc(_citrus_ctype_t cc, wchar_t *pwc, const char *s, - size_t n, void *pspriv, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbrtowc); - return (*cc->cc_ops->co_mbrtowc)(cc->cc_closure, pwc, s, n, pspriv, - nresult); -} - -static __inline int -_citrus_ctype_mbsinit(_citrus_ctype_t cc, void const *pspriv, int *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbsinit && nresult); - return (*cc->cc_ops->co_mbsinit)(cc->cc_closure, pspriv, nresult); -} - -static __inline int -_citrus_ctype_mbsrtowcs(_citrus_ctype_t cc, wchar_t *pwcs, const char **s, - size_t n, void *pspriv, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbsrtowcs && nresult); - return (*cc->cc_ops->co_mbsrtowcs)(cc->cc_closure, pwcs, s, n, pspriv, - nresult); -} - -static __inline int -_citrus_ctype_mbstowcs(_citrus_ctype_t cc, wchar_t *pwcs, const char *s, - size_t n, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbstowcs && nresult); - return (*cc->cc_ops->co_mbstowcs)(cc->cc_closure, pwcs, s, n, nresult); -} - -static __inline int -_citrus_ctype_mbtowc(_citrus_ctype_t cc, wchar_t *pw, const char *s, size_t n, - int *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_mbtowc && nresult); - return (*cc->cc_ops->co_mbtowc)(cc->cc_closure, pw, s, n, nresult); -} - -static __inline int -_citrus_ctype_wcrtomb(_citrus_ctype_t cc, char *s, wchar_t wc, - void *pspriv, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_wcrtomb && nresult); - return (*cc->cc_ops->co_wcrtomb)(cc->cc_closure, s, wc, pspriv, - nresult); -} - -static __inline int -_citrus_ctype_wcsrtombs(_citrus_ctype_t cc, char *s, const wchar_t **ppwcs, - size_t n, void *pspriv, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_wcsrtombs && nresult); - return (*cc->cc_ops->co_wcsrtombs)(cc->cc_closure, s, ppwcs, n, - pspriv, nresult); -} - -static __inline int -_citrus_ctype_wcstombs(_citrus_ctype_t cc, char *s, const wchar_t *wcs, - size_t n, size_t *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_wcstombs && nresult); - return (*cc->cc_ops->co_wcstombs)(cc->cc_closure, s, wcs, n, nresult); -} - -static __inline int -_citrus_ctype_wctomb(_citrus_ctype_t cc, char *s, wchar_t wc, int *nresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_wctomb && nresult); - return (*cc->cc_ops->co_wctomb)(cc->cc_closure, s, wc, nresult); -} - -static __inline int -_citrus_ctype_btowc(_citrus_ctype_t cc, int c, wint_t *wcresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_btowc && wcresult); - return (*cc->cc_ops->co_btowc)(cc, c, wcresult); -} - -static __inline int -_citrus_ctype_wctob(_citrus_ctype_t cc, wint_t c, int *cresult) -{ - - _DIAGASSERT(cc && cc->cc_ops && cc->cc_ops->co_wctob && cresult); - return (*cc->cc_ops->co_wctob)(cc, c, cresult); -} - -extern _citrus_ctype_rec_t _citrus_ctype_default; - -#endif diff --git a/lib/libc/citrus/citrus_ctype_fallback.c b/lib/libc/citrus/citrus_ctype_fallback.c deleted file mode 100644 index a7399058b2..0000000000 --- a/lib/libc/citrus/citrus_ctype_fallback.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_ctype_fallback.c,v 1.2 2003/06/27 14:52:25 yamt Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include - -#include "citrus_module.h" -#include "citrus_ctype.h" -#include "citrus_ctype_fallback.h" - -/* - * for ABI version >= 0x00000002 - */ - -int -_citrus_ctype_btowc_fallback(_citrus_ctype_rec_t * __restrict cc, - int c, wint_t * __restrict wcresult) -{ - char mb; - /* - * what we need is _PRIVSIZE - * and we know that it's smaller than sizeof(mbstate_t). - */ - char pspriv[sizeof(mbstate_t)]; - wchar_t wc; - size_t nr; - int err; - - _DIAGASSERT(cc != NULL && cc->cc_closure != NULL); - - if (c == EOF) { - *wcresult = WEOF; - return 0; - } - - memset(&pspriv, 0, sizeof(pspriv)); - mb = (char)(unsigned)c; - err = _citrus_ctype_mbrtowc(cc, &wc, &mb, 1, &pspriv, &nr); - if (!err && (nr == 0 || nr == 1)) - *wcresult = wc; - else - *wcresult = WEOF; - - return 0; -} - -int -_citrus_ctype_wctob_fallback(_citrus_ctype_rec_t * __restrict cc, - wint_t wc, int * __restrict cresult) -{ - /* - * what we need is _PRIVSIZE - * and we know that it's smaller than sizeof(mbstate_t). - */ - char pspriv[sizeof(mbstate_t)]; - char buf[MB_LEN_MAX]; - size_t nr; - int err; - - _DIAGASSERT(cc != NULL && cc->cc_closure != NULL); - - if (wc == WEOF) { - *cresult = EOF; - return 0; - } - memset(&pspriv, 0, sizeof(pspriv)); - err = _citrus_ctype_wcrtomb(cc, buf, (wchar_t)wc, &pspriv, &nr); - if (!err && nr == 1) - *cresult = buf[0]; - else - *cresult = EOF; - - return 0; -} diff --git a/lib/libc/citrus/citrus_ctype_local.h b/lib/libc/citrus/citrus_ctype_local.h deleted file mode 100644 index 64f4e1dec0..0000000000 --- a/lib/libc/citrus/citrus_ctype_local.h +++ /dev/null @@ -1,203 +0,0 @@ -/* $NetBSD: citrus_ctype_local.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_ctype_local.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ - - -/*- - * Copyright (c)2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#ifndef _CITRUS_CTYPE_LOCAL_H_ -#define _CITRUS_CTYPE_LOCAL_H_ - -#include "citrus_module.h" - -#define _CITRUS_CTYPE_GETOPS_FUNC_BASE(_n_) \ -int _n_(_citrus_ctype_ops_rec_t *, size_t, uint32_t) -#define _CITRUS_CTYPE_GETOPS_FUNC(_n_) \ -_CITRUS_CTYPE_GETOPS_FUNC_BASE(_citrus_##_n_##_ctype_getops) - -#define _CITRUS_CTYPE_DECLS(_e_) \ -static int _citrus_##_e_##_ctype_init \ - (void ** __restrict, void * __restrict, size_t, size_t); \ -static void _citrus_##_e_##_ctype_uninit(void *); \ -static unsigned _citrus_##_e_##_ctype_get_mb_cur_max(void *); \ -static int _citrus_##_e_##_ctype_mblen(void * __restrict, \ - const char * __restrict, \ - size_t, int * __restrict); \ -static int _citrus_##_e_##_ctype_mbrlen(void * __restrict, \ - const char * __restrict, \ - size_t, void * __restrict, \ - size_t * __restrict); \ -static int _citrus_##_e_##_ctype_mbrtowc(void * __restrict, \ - wchar_t * __restrict, \ - const char * __restrict, size_t, \ - void * __restrict, \ - size_t * __restrict); \ -static int _citrus_##_e_##_ctype_mbsinit(void * __restrict, \ - void const * __restrict, \ - int * __restrict); \ -static int _citrus_##_e_##_ctype_mbsrtowcs(void * __restrict, \ - wchar_t * __restrict, \ - const char ** __restrict, \ - size_t, void * __restrict, \ - size_t * __restrict); \ -static int _citrus_##_e_##_ctype_mbstowcs(void * __restrict, \ - wchar_t * __restrict, \ - const char * __restrict, \ - size_t, size_t * __restrict); \ -static int _citrus_##_e_##_ctype_mbtowc(void * __restrict, \ - wchar_t * __restrict, \ - const char * __restrict, \ - size_t, int * __restrict); \ -static int _citrus_##_e_##_ctype_wcrtomb(void * __restrict, \ - char * __restrict, wchar_t, \ - void * __restrict, \ - size_t * __restrict); \ -static int _citrus_##_e_##_ctype_wcsrtombs(void * __restrict, \ - char * __restrict, \ - const wchar_t ** __restrict, \ - size_t, void * __restrict, \ - size_t * __restrict); \ -static int _citrus_##_e_##_ctype_wcstombs(void * __restrict, \ - char * __restrict, \ - const wchar_t * __restrict, \ - size_t, size_t * __restrict); \ -static int _citrus_##_e_##_ctype_wctomb(void * __restrict, \ - char * __restrict, \ - wchar_t, int * __restrict); \ -static int _citrus_##_e_##_ctype_btowc(_citrus_ctype_rec_t * __restrict, \ - int, wint_t * __restrict); \ -static int _citrus_##_e_##_ctype_wctob(_citrus_ctype_rec_t * __restrict, \ - wint_t, int * __restrict); \ -CITRUS_MODULE(_e_, ctype, _citrus_##_e_##_ctype_getops) - -#define _CITRUS_CTYPE_DEF_OPS(_e_) \ -_citrus_ctype_ops_rec_t _citrus_##_e_##_ctype_ops = { \ - /* co_abi_version */ _CITRUS_CTYPE_ABI_VERSION, \ - /* co_init */ &_citrus_##_e_##_ctype_init, \ - /* co_uninit */ &_citrus_##_e_##_ctype_uninit, \ - /* co_get_mb_cur_max */ &_citrus_##_e_##_ctype_get_mb_cur_max, \ - /* co_mblen */ &_citrus_##_e_##_ctype_mblen, \ - /* co_mbrlen */ &_citrus_##_e_##_ctype_mbrlen, \ - /* co_mbrtowc */ &_citrus_##_e_##_ctype_mbrtowc, \ - /* co_mbsinit */ &_citrus_##_e_##_ctype_mbsinit, \ - /* co_mbsrtowcs */ &_citrus_##_e_##_ctype_mbsrtowcs, \ - /* co_mbstowcs */ &_citrus_##_e_##_ctype_mbstowcs, \ - /* co_mbtowc */ &_citrus_##_e_##_ctype_mbtowc, \ - /* co_wcrtomb */ &_citrus_##_e_##_ctype_wcrtomb, \ - /* co_wcsrtombs */ &_citrus_##_e_##_ctype_wcsrtombs, \ - /* co_wcstombs */ &_citrus_##_e_##_ctype_wcstombs, \ - /* co_wctomb */ &_citrus_##_e_##_ctype_wctomb, \ - /* co_btowc */ &_citrus_##_e_##_ctype_btowc, \ - /* co_wctob */ &_citrus_##_e_##_ctype_wctob \ -} - -typedef struct _citrus_ctype_ops_rec _citrus_ctype_ops_rec_t; -typedef struct _citrus_ctype_rec _citrus_ctype_rec_t; - -typedef int (*_citrus_ctype_init_t) - (void ** __restrict, void * __restrict, size_t, size_t); -typedef void (*_citrus_ctype_uninit_t)(void *); -typedef unsigned (*_citrus_ctype_get_mb_cur_max_t)(void *); -typedef int (*_citrus_ctype_mblen_t) - (void * __restrict, const char * __restrict, size_t, int * __restrict); -typedef int (*_citrus_ctype_mbrlen_t) - (void * __restrict, const char * __restrict, size_t, - void * __restrict, size_t * __restrict); -typedef int (*_citrus_ctype_mbrtowc_t) - (void * __restrict, wchar_t * __restrict, const char * __restrict, - size_t, void * __restrict, size_t * __restrict); -typedef int (*_citrus_ctype_mbsinit_t) - (void * __restrict, const void * __restrict, int * __restrict); -typedef int (*_citrus_ctype_mbsrtowcs_t) - (void * __restrict, wchar_t * __restrict, const char ** __restrict, - size_t, void * __restrict, - size_t * __restrict); -typedef int (*_citrus_ctype_mbstowcs_t) - (void * __restrict, wchar_t * __restrict, const char * __restrict, - size_t, size_t * __restrict); -typedef int (*_citrus_ctype_mbtowc_t) - (void * __restrict, wchar_t * __restrict, const char * __restrict, - size_t, int * __restrict); -typedef int (*_citrus_ctype_wcrtomb_t) - (void * __restrict, char * __restrict, wchar_t, void * __restrict, - size_t * __restrict); -typedef int (*_citrus_ctype_wcsrtombs_t) - (void * __restrict, char * __restrict, const wchar_t ** __restrict, - size_t, void * __restrict, size_t * __restrict); -typedef int (*_citrus_ctype_wcstombs_t) - (void * __restrict, char * __restrict, const wchar_t * __restrict, - size_t, size_t * __restrict); -typedef int (*_citrus_ctype_wctomb_t) - (void * __restrict, char * __restrict, wchar_t, int * __restrict); -typedef int (*_citrus_ctype_btowc_t) - (_citrus_ctype_rec_t * __restrict, int, wint_t * __restrict); -typedef int (*_citrus_ctype_wctob_t) - (_citrus_ctype_rec_t * __restrict, wint_t, int * __restrict); - -/* - * ABI Version change log: - * 0x00000001 - * initial version - * 0x00000002 - * ops record: btowc and wctob are added. - * ctype record: unchanged. - */ -#define _CITRUS_CTYPE_ABI_VERSION 0x00000002 -struct _citrus_ctype_ops_rec { - uint32_t co_abi_version; - /* version 0x00000001 */ - _citrus_ctype_init_t co_init; - _citrus_ctype_uninit_t co_uninit; - _citrus_ctype_get_mb_cur_max_t co_get_mb_cur_max; - _citrus_ctype_mblen_t co_mblen; - _citrus_ctype_mbrlen_t co_mbrlen; - _citrus_ctype_mbrtowc_t co_mbrtowc; - _citrus_ctype_mbsinit_t co_mbsinit; - _citrus_ctype_mbsrtowcs_t co_mbsrtowcs; - _citrus_ctype_mbstowcs_t co_mbstowcs; - _citrus_ctype_mbtowc_t co_mbtowc; - _citrus_ctype_wcrtomb_t co_wcrtomb; - _citrus_ctype_wcsrtombs_t co_wcsrtombs; - _citrus_ctype_wcstombs_t co_wcstombs; - _citrus_ctype_wctomb_t co_wctomb; - /* version 0x00000002 */ - _citrus_ctype_btowc_t co_btowc; - _citrus_ctype_wctob_t co_wctob; -}; - -#define _CITRUS_DEFAULT_CTYPE_NAME "NONE" -#define _CITRUS_DEFAULT_CTYPE_OPS _citrus_NONE_ctype_ops -#define _CITRUS_DEFAULT_CTYPE_HEADER "citrus_none.h" - -typedef _CITRUS_CTYPE_GETOPS_FUNC_BASE((*_citrus_ctype_getops_t)); -struct _citrus_ctype_rec { - _citrus_ctype_ops_rec_t *cc_ops; - void *cc_closure; - _citrus_module_t cc_module; -}; - -#endif diff --git a/lib/libc/citrus/citrus_ctype_template.h b/lib/libc/citrus/citrus_ctype_template.h deleted file mode 100644 index c7ca996a74..0000000000 --- a/lib/libc/citrus/citrus_ctype_template.h +++ /dev/null @@ -1,767 +0,0 @@ -/* $NetBSD: citrus_ctype_template.h,v 1.35 2008/02/09 14:56:20 junyoung Exp $ */ - -/*- - * Copyright (c)2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -/* - * CAUTION: THIS IS NOT STANDALONE FILE - * - * function templates of ctype encoding handler for each encodings. - * - * you need to define the macros below: - * - * _FUNCNAME(method) : - * It should convine the real function name for the method. - * e.g. _FUNCNAME(mbrtowc) should be expanded to - * _EUC_ctype_mbrtowc - * for EUC locale. - * - * _CEI_TO_STATE(cei, method) : - * It should be expanded to the pointer of the method-internal state - * structures. - * e.g. _CEI_TO_STATE(cei, mbrtowc) might be expanded to - * (cei)->states.s_mbrtowc - * This structure may use if the function is called as - * mbrtowc(&wc, s, n, NULL); - * Such individual structures are needed by: - * mblen - * mbrlen - * mbrtowc - * mbtowc - * mbsrtowcs - * wcrtomb - * wcsrtombs - * wctomb - * These need to be keeped in the ctype encoding information structure, - * pointed by "cei". - * - * _ENCODING_INFO : - * It should be expanded to the name of the encoding information structure. - * e.g. For EUC encoding, this macro is expanded to _EUCInfo. - * Encoding information structure need to contain the common informations - * for the codeset. - * - * _ENCODING_STATE : - * It should be expanded to the name of the encoding state structure. - * e.g. For EUC encoding, this macro is expanded to _EUCState. - * Encoding state structure need to contain the context-dependent states, - * which are "unpacked-form" of mbstate_t type and keeped during sequent - * calls of mb/wc functions, - * - * _ENCODING_IS_STATE_DEPENDENT : - * If the encoding is state dependent, this should be expanded to - * non-zero integral value. Otherwise, 0. - * - * _STATE_NEEDS_EXPLICIT_INIT(ps) : - * some encodings, states needs some explicit initialization. - * (ie. initialization with memset isn't enough.) - * If the encoding state pointed by "ps" needs to be initialized - * explicitly, return non-zero. Otherwize, 0. - * - */ - - -/* prototypes */ - -__BEGIN_DECLS -static void _FUNCNAME(init_state)(_ENCODING_INFO * __restrict, - _ENCODING_STATE * __restrict); -static void _FUNCNAME(pack_state)(_ENCODING_INFO * __restrict, - void * __restrict, - const _ENCODING_STATE * __restrict); -static void _FUNCNAME(unpack_state)(_ENCODING_INFO * __restrict, - _ENCODING_STATE * __restrict, - const void * __restrict); -#if _ENCODING_IS_STATE_DEPENDENT -static int _FUNCNAME(put_state_reset)(_ENCODING_INFO * __restrict, - char * __restrict, size_t, - _ENCODING_STATE * __restrict, - size_t * __restrict); -#endif - -/* - * standard form of mbrtowc_priv. - * - * note (differences from real mbrtowc): - * - 3rd parameter is not "const char *s" but "const char **s". - * after the call of the function, *s will point the first byte of - * the next character. - * - additional 4th parameter is the size of src buffer. - * - 5th parameter is unpacked encoding-dependent state structure. - * - additional 6th parameter is the storage to be stored - * the return value in the real mbrtowc context. - * - return value means "errno" in the real mbrtowc context. - */ - -static int _FUNCNAME(mbrtowc_priv)(_ENCODING_INFO * __restrict, - wchar_t * __restrict, - const char ** __restrict, - size_t, _ENCODING_STATE * __restrict, - size_t * __restrict); - -/* - * standard form of wcrtomb_priv. - * - * note (differences from real wcrtomb): - * - additional 3th parameter is the size of src buffer. - * - 5th parameter is unpacked encoding-dependent state structure. - * - additional 6th parameter is the storage to be stored - * the return value in the real mbrtowc context. - * - return value means "errno" in the real wcrtomb context. - * - caller should ensure that 2nd parameter isn't NULL. - * (XXX inconsist with mbrtowc_priv) - */ - -static int _FUNCNAME(wcrtomb_priv)(_ENCODING_INFO * __restrict, - char * __restrict, size_t, wchar_t, - _ENCODING_STATE * __restrict, - size_t * __restrict); -__END_DECLS - - -/* - * macros - */ - -#define _TO_CEI(_cl_) ((_CTYPE_INFO*)(_cl_)) - - -/* - * templates - */ - -/* internal routines */ - -static __inline int -_FUNCNAME(mbtowc_priv)(_ENCODING_INFO * __restrict ei, - wchar_t * __restrict pwc, const char * __restrict s, - size_t n, _ENCODING_STATE * __restrict psenc, - int * __restrict nresult) -{ - _ENCODING_STATE state; - size_t nr; - int err = 0; - - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - - if (s == NULL) { - _FUNCNAME(init_state)(ei, psenc); - *nresult = _ENCODING_IS_STATE_DEPENDENT; - return (0); - } - - state = *psenc; - err = _FUNCNAME(mbrtowc_priv)(ei, pwc, (const char **)&s, n, psenc, &nr); - if (nr == (size_t)-2) - err = EILSEQ; - if (err) { - /* In error case, we should restore the state. */ - *psenc = state; - *nresult = -1; - return (err); - } - - *nresult = (int)nr; - - return (0); -} - -static int -_FUNCNAME(mbsrtowcs_priv)(_ENCODING_INFO * __restrict ei, - wchar_t * __restrict pwcs, - const char ** __restrict s, - size_t n, _ENCODING_STATE * __restrict psenc, - size_t * __restrict nresult) -{ - int err, cnt; - size_t siz; - const char *s0; - size_t mbcurmax; - - _DIAGASSERT(nresult != 0); - _DIAGASSERT(ei != NULL); - _DIAGASSERT(psenc != NULL); - _DIAGASSERT(s == NULL); - _DIAGASSERT(*s == NULL); - - /* if pwcs is NULL, ignore n */ - if (pwcs == NULL) - n = 1; /* arbitrary >0 value */ - - err = cnt = 0; - s0 = *s; /* to keep *s unchanged for now, use copy instead. */ - mbcurmax = _ENCODING_MB_CUR_MAX(ei); - while (n > 0) { - err = _FUNCNAME(mbrtowc_priv)(ei, pwcs, &s0, mbcurmax, - psenc, &siz); - if (siz == (size_t)-2) - err = EILSEQ; - if (err) { - cnt = -1; - goto bye; - } - switch (siz) { - case 0: - if (pwcs) { - _FUNCNAME(init_state)(ei, psenc); - } - s0 = 0; - goto bye; - default: - if (pwcs) { - pwcs++; - n--; - } - cnt++; - break; - } - } -bye: - if (pwcs) - *s = s0; - - *nresult = (size_t)cnt; - - return err; -} - - -static int -_FUNCNAME(wcsrtombs_priv)(_ENCODING_INFO * __restrict ei, char * __restrict s, - const wchar_t ** __restrict pwcs, - size_t n, _ENCODING_STATE * __restrict psenc, - size_t * __restrict nresult) -{ - int cnt = 0, err; - char buf[MB_LEN_MAX]; - size_t siz; - const wchar_t* pwcs0; -#if _ENCODING_IS_STATE_DEPENDENT - _ENCODING_STATE state; -#endif - - pwcs0 = *pwcs; - - if (!s) - n = 1; - - while (n > 0) { -#if _ENCODING_IS_STATE_DEPENDENT - state = *psenc; -#endif - err = _FUNCNAME(wcrtomb_priv)(ei, buf, sizeof(buf), - *pwcs0, psenc, &siz); - if (siz == (size_t)-1) { - *nresult = siz; - return (err); - } - - if (s) { - if (n < siz) { -#if _ENCODING_IS_STATE_DEPENDENT - *psenc = state; -#endif - break; - } - memcpy(s, buf, siz); - s += siz; - n -= siz; - } - cnt += siz; - if (!*pwcs0) { - if (s) { - _FUNCNAME(init_state)(ei, psenc); - } - pwcs0 = 0; - cnt--; /* don't include terminating null */ - break; - } - pwcs0++; - } - if (s) - *pwcs = pwcs0; - - *nresult = (size_t)cnt; - return (0); -} - - -/* ---------------------------------------------------------------------- - * templates for public functions - */ - -#define _RESTART_BEGIN(_func_, _cei_, _pspriv_, _pse_) \ -do { \ - _ENCODING_STATE _state; \ - do { \ - if (_pspriv_ == NULL) { \ - _pse_ = &_CEI_TO_STATE(_cei_, _func_); \ - if (_STATE_NEEDS_EXPLICIT_INIT(_pse_)) \ - _FUNCNAME(init_state)(_CEI_TO_EI(_cei_), \ - (_pse_)); \ - } else { \ - _pse_ = &_state; \ - _FUNCNAME(unpack_state)(_CEI_TO_EI(_cei_), \ - _pse_, _pspriv_); \ - } \ - } while (/*CONSTCOND*/0) - -#define _RESTART_END(_func_, _cei_, _pspriv_, _pse_) \ - if (_pspriv_ != NULL) { \ - _FUNCNAME(pack_state)(_CEI_TO_EI(_cei_), _pspriv_, \ - _pse_); \ - } \ -} while (/*CONSTCOND*/0) - -int -_FUNCNAME(ctype_getops)(_citrus_ctype_ops_rec_t *ops, size_t lenops, - uint32_t expected_version) -{ - if (expected_version<_CITRUS_CTYPE_ABI_VERSION || lenops lenps) - return (EINVAL); - - cei = calloc(1, sizeof(_CTYPE_INFO)); - if (cei == NULL) - return (ENOMEM); - - *cl = (void *)cei; - - return _FUNCNAME(encoding_module_init)(_CEI_TO_EI(cei), var, lenvar); -} - -static void -_FUNCNAME(ctype_uninit)(void *cl) -{ - if (cl) { - _FUNCNAME(encoding_module_uninit)(_CEI_TO_EI(_TO_CEI(cl))); - free(cl); - } -} - -static unsigned -/*ARGSUSED*/ -_FUNCNAME(ctype_get_mb_cur_max)(void *cl __unused) -{ - return _ENCODING_MB_CUR_MAX(_CEI_TO_EI(_TO_CEI(cl))); -} - -static int -_FUNCNAME(ctype_mblen)(void * __restrict cl, - const char * __restrict s, size_t n, - int * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - - _DIAGASSERT(cl != NULL); - - psenc = &_CEI_TO_STATE(_TO_CEI(cl), mblen); - ei = _CEI_TO_EI(_TO_CEI(cl)); - if (_STATE_NEEDS_EXPLICIT_INIT(psenc)) - _FUNCNAME(init_state)(ei, psenc); - return _FUNCNAME(mbtowc_priv)(ei, NULL, s, n, psenc, nresult); -} - -static int -_FUNCNAME(ctype_mbrlen)(void * __restrict cl, const char * __restrict s, - size_t n, void * __restrict pspriv, - size_t * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - int err = 0; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _RESTART_BEGIN(mbrlen, _TO_CEI(cl), pspriv, psenc); - if (s == NULL) { - _FUNCNAME(init_state)(ei, psenc); - *nresult = 0; - } else { - err = _FUNCNAME(mbrtowc_priv)(ei, NULL, (const char **)&s, n, - (void *)psenc, nresult); - } - _RESTART_END(mbrlen, _TO_CEI(cl), pspriv, psenc); - - return (err); -} - -static int -_FUNCNAME(ctype_mbrtowc)(void * __restrict cl, wchar_t * __restrict pwc, - const char * __restrict s, size_t n, - void * __restrict pspriv, size_t * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - int err = 0; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _RESTART_BEGIN(mbrtowc, _TO_CEI(cl), pspriv, psenc); - if (s == NULL) { - _FUNCNAME(init_state)(ei, psenc); - *nresult = 0; - } else { - err = _FUNCNAME(mbrtowc_priv)(ei, pwc, (const char **)&s, n, - (void *)psenc, nresult); - } - _RESTART_END(mbrtowc, _TO_CEI(cl), pspriv, psenc); - - return (err); -} - -static int -/*ARGSUSED*/ -_FUNCNAME(ctype_mbsinit)(void * __restrict cl, const void * __restrict pspriv, - int * __restrict nresult) -{ - _ENCODING_STATE state; - - if (pspriv == NULL) { - *nresult = 1; - return (0); - } - - _FUNCNAME(unpack_state)(_CEI_TO_EI(_TO_CEI(cl)), &state, pspriv); - - *nresult = (state.chlen == 0); /* XXX: FIXME */ - - return (0); -} - -static int -_FUNCNAME(ctype_mbsrtowcs)(void * __restrict cl, wchar_t * __restrict pwcs, - const char ** __restrict s, size_t n, - void * __restrict pspriv, - size_t * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - int err = 0; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _RESTART_BEGIN(mbsrtowcs, _TO_CEI(cl), pspriv, psenc); - err = _FUNCNAME(mbsrtowcs_priv)(ei, pwcs, s, n, psenc, nresult); - _RESTART_END(mbsrtowcs, _TO_CEI(cl), pspriv, psenc); - - return (err); -} - -static int -_FUNCNAME(ctype_mbstowcs)(void * __restrict cl, wchar_t * __restrict pwcs, - const char * __restrict s, size_t n, - size_t * __restrict nresult) -{ - int err; - _ENCODING_STATE state; - _ENCODING_INFO *ei; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _FUNCNAME(init_state)(ei, &state); - err = _FUNCNAME(mbsrtowcs_priv)(ei, pwcs, (const char **)&s, n, - &state, nresult); - if (*nresult == (size_t)-2) { - err = EILSEQ; - *nresult = (size_t)-1; - } - - return (err); -} - -static int -_FUNCNAME(ctype_mbtowc)(void * __restrict cl, wchar_t * __restrict pwc, - const char * __restrict s, size_t n, - int * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - - _DIAGASSERT(cl != NULL); - - psenc = &_CEI_TO_STATE(_TO_CEI(cl), mbtowc); - ei = _CEI_TO_EI(_TO_CEI(cl)); - if (_STATE_NEEDS_EXPLICIT_INIT(psenc)) - _FUNCNAME(init_state)(ei, psenc); - return _FUNCNAME(mbtowc_priv)(ei, pwc, s, n, psenc, nresult); -} - -static int -_FUNCNAME(ctype_wcrtomb)(void * __restrict cl, char * __restrict s, wchar_t wc, - void * __restrict pspriv, size_t * __restrict nresult) -{ - _ENCODING_STATE *psenc; - char buf[MB_LEN_MAX]; - int err = 0; - size_t sz; -#if _ENCODING_IS_STATE_DEPENDENT - size_t rsz = 0; -#endif - - _DIAGASSERT(cl != NULL); - - if (s == NULL) { - /* - * use internal buffer. - */ - s = buf; - wc = L'\0'; /* SUSv3 */ - } - - _RESTART_BEGIN(wcrtomb, _TO_CEI(cl), pspriv, psenc); - sz = _ENCODING_MB_CUR_MAX(_CEI_TO_EI(_TO_CEI(cl))); -#if _ENCODING_IS_STATE_DEPENDENT - if (wc == L'\0') { - /* reset state */ - err = _FUNCNAME(put_state_reset)(_CEI_TO_EI(_TO_CEI(cl)), s, - sz, psenc, &rsz); - if (err) { - *nresult = -1; - goto quit; - } - s += rsz; - sz -= rsz; - } -#endif - err = _FUNCNAME(wcrtomb_priv)(_CEI_TO_EI(_TO_CEI(cl)), s, sz, - wc, psenc, nresult); -#if _ENCODING_IS_STATE_DEPENDENT - if (err == 0) - *nresult += rsz; -quit: -#endif - if (err == E2BIG) - err = EINVAL; - _RESTART_END(wcrtomb, _TO_CEI(cl), pspriv, psenc); - - return err; -} - -static int -/*ARGSUSED*/ -_FUNCNAME(ctype_wcsrtombs)(void * __restrict cl, char * __restrict s, - const wchar_t ** __restrict pwcs, size_t n, - void * __restrict pspriv, - size_t * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - int err = 0; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _RESTART_BEGIN(wcsrtombs, _TO_CEI(cl), pspriv, psenc); - err = _FUNCNAME(wcsrtombs_priv)(ei, s, pwcs, n, psenc, nresult); - _RESTART_END(wcsrtombs, _TO_CEI(cl), pspriv, psenc); - - return err; -} - -static int -/*ARGSUSED*/ -_FUNCNAME(ctype_wcstombs)(void * __restrict cl, char * __restrict s, - const wchar_t * __restrict pwcs, size_t n, - size_t * __restrict nresult) -{ - _ENCODING_STATE state; - _ENCODING_INFO *ei; - int err; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - _FUNCNAME(init_state)(ei, &state); - err = _FUNCNAME(wcsrtombs_priv)(ei, s, (const wchar_t **)&pwcs, n, - &state, nresult); - - return err; -} - -static int -_FUNCNAME(ctype_wctomb)(void * __restrict cl, char * __restrict s, wchar_t wc, - int * __restrict nresult) -{ - _ENCODING_STATE *psenc; - _ENCODING_INFO *ei; - size_t nr, sz; -#if _ENCODING_IS_STATE_DEPENDENT - size_t rsz = 0; -#endif - int err = 0; - - _DIAGASSERT(cl != NULL); - - ei = _CEI_TO_EI(_TO_CEI(cl)); - psenc = &_CEI_TO_STATE(_TO_CEI(cl), wctomb); - if (_STATE_NEEDS_EXPLICIT_INIT(psenc)) - _FUNCNAME(init_state)(ei, psenc); - if (s == NULL) { - _FUNCNAME(init_state)(ei, psenc); - *nresult = _ENCODING_IS_STATE_DEPENDENT; - return 0; - } - sz = _ENCODING_MB_CUR_MAX(_CEI_TO_EI(_TO_CEI(cl))); -#if _ENCODING_IS_STATE_DEPENDENT - if (wc == L'\0') { - /* reset state */ - err = _FUNCNAME(put_state_reset)(_CEI_TO_EI(_TO_CEI(cl)), s, - sz, psenc, &rsz); - if (err) { - *nresult = -1; /* XXX */ - return 0; - } - s += rsz; - sz -= rsz; - } -#endif - err = _FUNCNAME(wcrtomb_priv)(ei, s, sz, wc, psenc, &nr); -#if _ENCODING_IS_STATE_DEPENDENT - if (err == 0) - *nresult = (int)(nr + rsz); - else -#endif - *nresult = (int)nr; - - return 0; -} - -static int -/*ARGSUSED*/ -_FUNCNAME(ctype_btowc)(_citrus_ctype_rec_t * __restrict cc, - int c, wint_t * __restrict wcresult) -{ - _ENCODING_STATE state; - _ENCODING_INFO *ei; - char mb; - char const *s; - wchar_t wc; - size_t nr; - int err; - - _DIAGASSERT(cc != NULL && cc->cc_closure != NULL); - - if (c == EOF) { - *wcresult = WEOF; - return 0; - } - ei = _CEI_TO_EI(_TO_CEI(cc->cc_closure)); - _FUNCNAME(init_state)(ei, &state); - mb = (char)(unsigned)c; - s = &mb; - err = _FUNCNAME(mbrtowc_priv)(ei, &wc, &s, 1, &state, &nr); - if (!err && (nr == 0 || nr == 1)) - *wcresult = (wint_t)wc; - else - *wcresult = WEOF; - - return 0; -} - -static int -/*ARGSUSED*/ -_FUNCNAME(ctype_wctob)(_citrus_ctype_rec_t * __restrict cc, - wint_t wc, int * __restrict cresult) -{ - _ENCODING_STATE state; - _ENCODING_INFO *ei; - char buf[MB_LEN_MAX]; - size_t nr; - int err; - - _DIAGASSERT(cc != NULL && cc->cc_closure != NULL); - - if (wc == WEOF) { - *cresult = EOF; - return 0; - } - ei = _CEI_TO_EI(_TO_CEI(cc->cc_closure)); - _FUNCNAME(init_state)(ei, &state); - err = _FUNCNAME(wcrtomb_priv)(ei, buf, _ENCODING_MB_CUR_MAX(ei), - (wchar_t)wc, &state, &nr); - if (!err && nr == 1) - *cresult = buf[0]; - else - *cresult = EOF; - - return 0; -} diff --git a/lib/libc/citrus/citrus_db.c b/lib/libc/citrus/citrus_db.c index 137d2727f0..0aed7cb7f8 100644 --- a/lib/libc/citrus/citrus_db.c +++ b/lib/libc/citrus/citrus_db.c @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -28,8 +27,10 @@ * SUCH DAMAGE. */ -#include +#include #include +#include + #include #include #include @@ -43,85 +44,82 @@ #include "citrus_memstream.h" #include "citrus_mmap.h" #include "citrus_db.h" +#include "citrus_db_factory.h" #include "citrus_db_file.h" struct _citrus_db { - /* private */ - struct _region db_region; - uint32_t (*db_hashfunc)(void *, struct _citrus_region *); - void *db_hashfunc_closure; + struct _region db_region; + _citrus_db_hash_func_t db_hashfunc; + void *db_hashfunc_closure; }; int _citrus_db_open(struct _citrus_db **rdb, struct _region *r, const char *magic, - uint32_t (*hashfunc)(void *, struct _citrus_region *), - void *hashfunc_closure) + _citrus_db_hash_func_t hashfunc, void *hashfunc_closure) { - struct _memstream ms; struct _citrus_db *db; struct _citrus_db_header_x *dhx; + struct _memstream ms; _memstream_bind(&ms, r); /* sanity check */ dhx = _memstream_getregion(&ms, NULL, sizeof(*dhx)); if (dhx == NULL) - return EFTYPE; + return (EFTYPE); if (strncmp(dhx->dhx_magic, magic, _CITRUS_DB_MAGIC_SIZE) != 0) - return EFTYPE; + return (EFTYPE); if (_memstream_seek(&ms, be32toh(dhx->dhx_entry_offset), SEEK_SET)) - return EFTYPE; + return (EFTYPE); if (be32toh(dhx->dhx_num_entries)*_CITRUS_DB_ENTRY_SIZE > _memstream_remainder(&ms)) - return EFTYPE; + return (EFTYPE); db = malloc(sizeof(*db)); - if (db==NULL) - return errno; + if (db == NULL) + return (errno); db->db_region = *r; db->db_hashfunc = hashfunc; db->db_hashfunc_closure = hashfunc_closure; *rdb = db; - return 0; + return (0); } void _citrus_db_close(struct _citrus_db *db) { + free(db); } int _citrus_db_lookup(struct _citrus_db *db, struct _citrus_region *key, - struct _citrus_region *data, struct _citrus_db_locator *dl) + struct _citrus_region *data, struct _citrus_db_locator *dl) { - uint32_t hashval, num_entries; - size_t offset; - struct _memstream ms; - struct _citrus_db_header_x *dhx; struct _citrus_db_entry_x *dex; + struct _citrus_db_header_x *dhx; struct _citrus_region r; + struct _memstream ms; + uint32_t hashval, num_entries; + size_t offset; _memstream_bind(&ms, &db->db_region); dhx = _memstream_getregion(&ms, NULL, sizeof(*dhx)); - _DIAGASSERT(dhx); num_entries = be32toh(dhx->dhx_num_entries); if (num_entries == 0) - return ENOENT; + return (ENOENT); if (dl != NULL && dl->dl_offset>0) { hashval = dl->dl_hashval; offset = dl->dl_offset; if (offset >= _region_size(&db->db_region)) - return ENOENT; + return (ENOENT); } else { - hashval = - db->db_hashfunc(db->db_hashfunc_closure, key)%num_entries; - offset = - be32toh(dhx->dhx_entry_offset) + + hashval = db->db_hashfunc(key)%num_entries; + offset = be32toh(dhx->dhx_entry_offset) + hashval * _CITRUS_DB_ENTRY_SIZE; if (dl) dl->dl_hashval = hashval; @@ -129,11 +127,11 @@ _citrus_db_lookup(struct _citrus_db *db, struct _citrus_region *key, do { /* seek to the next entry */ if (_citrus_memory_stream_seek(&ms, offset, SEEK_SET)) - return EFTYPE; + return (EFTYPE); /* get the entry record */ dex = _memstream_getregion(&ms, NULL, _CITRUS_DB_ENTRY_SIZE); if (dex == NULL) - return EFTYPE; + return (EFTYPE); /* jump to next entry having the same hash value. */ offset = be32toh(dex->dex_next_offset); @@ -141,7 +139,7 @@ _citrus_db_lookup(struct _citrus_db *db, struct _citrus_region *key, /* save the current position */ if (dl) { dl->dl_offset = offset; - if (offset==0) + if (offset == 0) dl->dl_offset = _region_size(&db->db_region); } @@ -153,185 +151,181 @@ _citrus_db_lookup(struct _citrus_db *db, struct _citrus_region *key, if (be32toh(dex->dex_key_size) == _region_size(key)) { /* seek to the head of the key. */ if (_memstream_seek(&ms, be32toh(dex->dex_key_offset), - SEEK_SET)) - return EFTYPE; + SEEK_SET)) + return (EFTYPE); /* get the region of the key */ if (_memstream_getregion(&ms, &r, - _region_size(key)) == NULL) - return EFTYPE; + _region_size(key)) == NULL) + return (EFTYPE); /* compare key byte stream */ if (memcmp(_region_head(&r), _region_head(key), - _region_size(key)) == 0) { + _region_size(key)) == 0) { /* match */ if (_memstream_seek( - &ms, be32toh(dex->dex_data_offset), - SEEK_SET)) - return EFTYPE; + &ms, be32toh(dex->dex_data_offset), + SEEK_SET)) + return (EFTYPE); if (_memstream_getregion( - &ms, data, - be32toh(dex->dex_data_size)) == NULL) - return EFTYPE; - return 0; + &ms, data, + be32toh(dex->dex_data_size)) == NULL) + return (EFTYPE); + return (0); } } } while (offset != 0); - return ENOENT; + return (ENOENT); } int _citrus_db_lookup_by_string(struct _citrus_db *db, const char *key, - struct _citrus_region *data, - struct _citrus_db_locator *dl) + struct _citrus_region *data, struct _citrus_db_locator *dl) { struct _region r; - _region_init(&r, __DECONST(char *, key), strlen(key)); + _region_init(&r, __DECONST(void *, key), strlen(key)); - return _citrus_db_lookup(db, &r, data, dl); + return (_citrus_db_lookup(db, &r, data, dl)); } int _citrus_db_lookup8_by_string(struct _citrus_db *db, const char *key, - uint8_t *rval, struct _citrus_db_locator *dl) + uint8_t *rval, struct _citrus_db_locator *dl) { - int ret; struct _region r; + int ret; ret = _citrus_db_lookup_by_string(db, key, &r, dl); if (ret) - return ret; + return (ret); if (_region_size(&r) != 1) - return EFTYPE; + return (EFTYPE); if (rval) memcpy(rval, _region_head(&r), 1); - return 0; + return (0); } int _citrus_db_lookup16_by_string(struct _citrus_db *db, const char *key, - uint16_t *rval, struct _citrus_db_locator *dl) + uint16_t *rval, struct _citrus_db_locator *dl) { - int ret; struct _region r; + int ret; uint16_t val; ret = _citrus_db_lookup_by_string(db, key, &r, dl); if (ret) - return ret; + return (ret); if (_region_size(&r) != 2) - return EFTYPE; + return (EFTYPE); if (rval) { memcpy(&val, _region_head(&r), 2); *rval = be16toh(val); } - return 0; + return (0); } int _citrus_db_lookup32_by_string(struct _citrus_db *db, const char *key, - uint32_t *rval, struct _citrus_db_locator *dl) + uint32_t *rval, struct _citrus_db_locator *dl) { - int ret; struct _region r; uint32_t val; + int ret; ret = _citrus_db_lookup_by_string(db, key, &r, dl); if (ret) - return ret; + return (ret); if (_region_size(&r) != 4) - return EFTYPE; + return (EFTYPE); if (rval) { memcpy(&val, _region_head(&r), 4); *rval = be32toh(val); } - return 0; + return (0); } int _citrus_db_lookup_string_by_string(struct _citrus_db *db, const char *key, - const char **rdata, - struct _citrus_db_locator *dl) + const char **rdata, struct _citrus_db_locator *dl) { - int ret; struct _region r; + int ret; ret = _citrus_db_lookup_by_string(db, key, &r, dl); if (ret) - return ret; + return (ret); /* check whether the string is null terminated */ if (_region_size(&r) == 0) - return EFTYPE; + return (EFTYPE); if (*((const char*)_region_head(&r)+_region_size(&r)-1) != '\0') - return EFTYPE; + return (EFTYPE); if (rdata) *rdata = _region_head(&r); - return 0; + return (0); } int _citrus_db_get_number_of_entries(struct _citrus_db *db) { - struct _memstream ms; struct _citrus_db_header_x *dhx; + struct _memstream ms; _memstream_bind(&ms, &db->db_region); dhx = _memstream_getregion(&ms, NULL, sizeof(*dhx)); - _DIAGASSERT(dhx); - return (int)be32toh(dhx->dhx_num_entries); + return ((int)be32toh(dhx->dhx_num_entries)); } int -_citrus_db_get_entry(struct _citrus_db *db, int idx, - struct _region *key, struct _region *data) +_citrus_db_get_entry(struct _citrus_db *db, int idx, struct _region *key, + struct _region *data) { + struct _citrus_db_entry_x *dex; + struct _citrus_db_header_x *dhx; + struct _memstream ms; uint32_t num_entries; size_t offset; - struct _memstream ms; - struct _citrus_db_header_x *dhx; - struct _citrus_db_entry_x *dex; _memstream_bind(&ms, &db->db_region); dhx = _memstream_getregion(&ms, NULL, sizeof(*dhx)); - _DIAGASSERT(dhx); num_entries = be32toh(dhx->dhx_num_entries); if (idx < 0 || (uint32_t)idx >= num_entries) - return EINVAL; + return (EINVAL); /* seek to the next entry */ offset = be32toh(dhx->dhx_entry_offset) + idx * _CITRUS_DB_ENTRY_SIZE; if (_citrus_memory_stream_seek(&ms, offset, SEEK_SET)) - return EFTYPE; + return (EFTYPE); /* get the entry record */ dex = _memstream_getregion(&ms, NULL, _CITRUS_DB_ENTRY_SIZE); if (dex == NULL) - return EFTYPE; + return (EFTYPE); /* seek to the head of the key. */ if (_memstream_seek(&ms, be32toh(dex->dex_key_offset), SEEK_SET)) - return EFTYPE; + return (EFTYPE); /* get the region of the key. */ if (_memstream_getregion(&ms, key, be32toh(dex->dex_key_size))==NULL) - return EFTYPE; + return (EFTYPE); /* seek to the head of the data. */ if (_memstream_seek(&ms, be32toh(dex->dex_data_offset), SEEK_SET)) - return EFTYPE; + return (EFTYPE); /* get the region of the data. */ if (_memstream_getregion(&ms, data, be32toh(dex->dex_data_size))==NULL) - return EFTYPE; + return (EFTYPE); - return 0; + return (0); } diff --git a/lib/libc/citrus/citrus_db.h b/lib/libc/citrus/citrus_db.h index 08f99f2a14..e8a1f00f88 100644 --- a/lib/libc/citrus/citrus_db.h +++ b/lib/libc/citrus/citrus_db.h @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -31,44 +30,39 @@ #ifndef _CITRUS_DB_H_ #define _CITRUS_DB_H_ +#include "citrus_db_factory.h" + struct _citrus_db; struct _citrus_db_locator { - u_int32_t dl_hashval; + uint32_t dl_hashval; size_t dl_offset; }; __BEGIN_DECLS -int _citrus_db_open(struct _citrus_db **, struct _citrus_region *, - const char *, - u_int32_t (*)(void *, struct _citrus_region *), - void *); -void _citrus_db_close(struct _citrus_db *); -int _citrus_db_lookup(struct _citrus_db *, struct _citrus_region *, - struct _citrus_region *, - struct _citrus_db_locator *); -int _citrus_db_lookup_by_string(struct _citrus_db *, const char *, - struct _citrus_region *, - struct _citrus_db_locator *); -int _citrus_db_lookup8_by_string(struct _citrus_db *, const char *, - u_int8_t *, - struct _citrus_db_locator *); -int _citrus_db_lookup16_by_string(struct _citrus_db *, const char *, - u_int16_t *, - struct _citrus_db_locator *); -int _citrus_db_lookup32_by_string(struct _citrus_db *, const char *, - u_int32_t *, - struct _citrus_db_locator *); -int _citrus_db_lookup_string_by_string(struct _citrus_db *, const char *, - const char **, - struct _citrus_db_locator *); -int _citrus_db_get_number_of_entries(struct _citrus_db *); -int _citrus_db_get_entry(struct _citrus_db *, int, - struct _citrus_region *, struct _citrus_region *); +int _citrus_db_open(struct _citrus_db **, struct _citrus_region *, + const char *, _citrus_db_hash_func_t, void *); +void _citrus_db_close(struct _citrus_db *); +int _citrus_db_lookup(struct _citrus_db *, struct _citrus_region *, + struct _citrus_region *, struct _citrus_db_locator *); +int _citrus_db_lookup_by_string(struct _citrus_db *, const char *, + struct _citrus_region *, struct _citrus_db_locator *); +int _citrus_db_lookup8_by_string(struct _citrus_db *, const char *, + uint8_t *, struct _citrus_db_locator *); +int _citrus_db_lookup16_by_string(struct _citrus_db *, const char *, + uint16_t *, struct _citrus_db_locator *); +int _citrus_db_lookup32_by_string(struct _citrus_db *, const char *, + uint32_t *, struct _citrus_db_locator *); +int _citrus_db_lookup_string_by_string(struct _citrus_db *, const char *, + const char **, struct _citrus_db_locator *); +int _citrus_db_get_number_of_entries(struct _citrus_db *); +int _citrus_db_get_entry(struct _citrus_db *, int, + struct _citrus_region *, struct _citrus_region *); __END_DECLS static __inline void _citrus_db_locator_init(struct _citrus_db_locator *dl) { + dl->dl_hashval = 0; dl->dl_offset = 0; } diff --git a/lib/libc/citrus/citrus_db_factory.c b/lib/libc/citrus/citrus_db_factory.c index 164b491fda..4088327c84 100644 --- a/lib/libc/citrus/citrus_db_factory.c +++ b/lib/libc/citrus/citrus_db_factory.c @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db_factory.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db_factory.c,v 1.9 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db_factory.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,14 +27,16 @@ * SUCH DAMAGE. */ +#include #include #include + +#include #include +#include #include #include #include -#include -#include #include "citrus_namespace.h" #include "citrus_region.h" @@ -42,37 +44,36 @@ #include "citrus_db_factory.h" struct _citrus_db_factory_entry { - STAILQ_ENTRY(_citrus_db_factory_entry) de_entry; - struct _citrus_db_factory_entry *de_next; - uint32_t de_hashvalue; - struct _region de_key; - int de_key_free; - struct _region de_data; - int de_data_free; - int de_idx; + STAILQ_ENTRY(_citrus_db_factory_entry) de_entry; + struct _citrus_db_factory_entry *de_next; + uint32_t de_hashvalue; + struct _region de_key; + int de_key_free; + struct _region de_data; + int de_data_free; + int de_idx; }; struct _citrus_db_factory { - size_t df_num_entries; - STAILQ_HEAD(, _citrus_db_factory_entry) df_entries; - size_t df_total_key_size; - size_t df_total_data_size; - uint32_t (*df_hashfunc)(void *, struct _citrus_region *); - void *df_hashfunc_closure; + size_t df_num_entries; + STAILQ_HEAD(, _citrus_db_factory_entry) df_entries; + size_t df_total_key_size; + size_t df_total_data_size; + uint32_t (*df_hashfunc)(struct _citrus_region *); + void *df_hashfunc_closure; }; #define DB_ALIGN 16 int _citrus_db_factory_create(struct _citrus_db_factory **rdf, - _citrus_db_hash_func_t hashfunc, - void *hashfunc_closure) + _citrus_db_hash_func_t hashfunc, void *hashfunc_closure) { struct _citrus_db_factory *df; df = malloc(sizeof(*df)); if (df == NULL) - return errno; + return (errno); df->df_num_entries = 0; df->df_total_key_size = df->df_total_data_size = 0; STAILQ_INIT(&df->df_entries); @@ -81,7 +82,7 @@ _citrus_db_factory_create(struct _citrus_db_factory **rdf, *rdf = df; - return 0; + return (0); } void @@ -103,21 +104,20 @@ _citrus_db_factory_free(struct _citrus_db_factory *df) static __inline size_t ceilto(size_t sz) { - return (sz+DB_ALIGN-1) & ~(DB_ALIGN-1); + return ((sz + DB_ALIGN - 1) & ~(DB_ALIGN - 1)); } int -_citrus_db_factory_add(struct _citrus_db_factory *df, - struct _region *key, int keyfree, - struct _region *data, int datafree) +_citrus_db_factory_add(struct _citrus_db_factory *df, struct _region *key, + int keyfree, struct _region *data, int datafree) { struct _citrus_db_factory_entry *de; de = malloc(sizeof(*de)); if (de == NULL) - return -1; + return (-1); - de->de_hashvalue = df->df_hashfunc(df->df_hashfunc_closure, key); + de->de_hashvalue = df->df_hashfunc(key); de->de_key = *key; de->de_key_free = keyfree; de->de_data = *data; @@ -129,81 +129,81 @@ _citrus_db_factory_add(struct _citrus_db_factory *df, df->df_total_data_size += ceilto(_region_size(data)); df->df_num_entries++; - return 0; + return (0); } int _citrus_db_factory_add_by_string(struct _citrus_db_factory *df, - const char *key, - struct _citrus_region *data, int datafree) + const char *key, struct _citrus_region *data, int datafree) { struct _region r; char *tmp; + tmp = strdup(key); if (tmp == NULL) - return errno; + return (errno); _region_init(&r, tmp, strlen(key)); return _citrus_db_factory_add(df, &r, 1, data, datafree); } int _citrus_db_factory_add8_by_string(struct _citrus_db_factory *df, - const char *key, uint8_t val) + const char *key, uint8_t val) { struct _region r; uint8_t *p; p = malloc(sizeof(*p)); if (p == NULL) - return errno; + return (errno); *p = val; _region_init(&r, p, 1); - return _citrus_db_factory_add_by_string(df, key, &r, 1); + return (_citrus_db_factory_add_by_string(df, key, &r, 1)); } int _citrus_db_factory_add16_by_string(struct _citrus_db_factory *df, - const char *key, uint16_t val) + const char *key, uint16_t val) { struct _region r; uint16_t *p; p = malloc(sizeof(*p)); if (p == NULL) - return errno; + return (errno); *p = htons(val); _region_init(&r, p, 2); - return _citrus_db_factory_add_by_string(df, key, &r, 1); + return (_citrus_db_factory_add_by_string(df, key, &r, 1)); } int _citrus_db_factory_add32_by_string(struct _citrus_db_factory *df, - const char *key, uint32_t val) + const char *key, uint32_t val) { struct _region r; uint32_t *p; p = malloc(sizeof(*p)); if (p == NULL) - return errno; + return (errno); *p = htonl(val); _region_init(&r, p, 4); - return _citrus_db_factory_add_by_string(df, key, &r, 1); + return (_citrus_db_factory_add_by_string(df, key, &r, 1)); } int _citrus_db_factory_add_string_by_string(struct _citrus_db_factory *df, - const char *key, const char *data) + const char *key, const char *data) { char *p; struct _region r; p = strdup(data); if (p == NULL) - return errno; - _region_init(&r, p, strlen(p)+1); - return _citrus_db_factory_add_by_string(df, key, &r, 1); + return (errno); + _region_init(&r, p, strlen(p) + 1); + return (_citrus_db_factory_add_by_string(df, key, &r, 1)); } size_t @@ -216,12 +216,13 @@ _citrus_db_factory_calc_size(struct _citrus_db_factory *df) sz += ceilto(df->df_total_key_size); sz += df->df_total_data_size; - return sz; + return (sz); } static __inline void put8(struct _region *r, size_t *rofs, uint8_t val) { + *(uint8_t *)_region_offset(r, *rofs) = val; *rofs += 1; } @@ -229,6 +230,7 @@ put8(struct _region *r, size_t *rofs, uint8_t val) static __inline void put16(struct _region *r, size_t *rofs, uint16_t val) { + val = htons(val); memcpy(_region_offset(r, *rofs), &val, 2); *rofs += 2; @@ -237,6 +239,7 @@ put16(struct _region *r, size_t *rofs, uint16_t val) static __inline void put32(struct _region *r, size_t *rofs, uint32_t val) { + val = htonl(val); memcpy(_region_offset(r, *rofs), &val, 4); *rofs += 4; @@ -246,14 +249,16 @@ static __inline void putpad(struct _region *r, size_t *rofs) { size_t i; + for (i = ceilto(*rofs) - *rofs; i > 0; i--) put8(r, rofs, 0); } static __inline void dump_header(struct _region *r, const char *magic, size_t *rofs, - size_t num_entries) + size_t num_entries) { + while (*rofs<_CITRUS_DB_MAGIC_SIZE) put8(r, rofs, *magic++); put32(r, rofs, num_entries); @@ -262,21 +267,21 @@ dump_header(struct _region *r, const char *magic, size_t *rofs, int _citrus_db_factory_serialize(struct _citrus_db_factory *df, const char *magic, - struct _region *r) + struct _region *r) { - size_t i, ofs, keyofs, dataofs, nextofs; struct _citrus_db_factory_entry *de, **depp, *det; + size_t dataofs, i, keyofs, nextofs, ofs; ofs = 0; /* check whether more than 0 entries exist */ if (df->df_num_entries == 0) { dump_header(r, magic, &ofs, 0); - return 0; + return (0); } /* allocate hash table */ depp = malloc(sizeof(*depp) * df->df_num_entries); if (depp == NULL) - return -1; + return (-1); for (i = 0; i < df->df_num_entries; i++) depp[i] = NULL; @@ -306,8 +311,7 @@ _citrus_db_factory_serialize(struct _citrus_db_factory *df, const char *magic, } } - keyofs = - _CITRUS_DB_HEADER_SIZE + + keyofs = _CITRUS_DB_HEADER_SIZE + ceilto(df->df_num_entries*_CITRUS_DB_ENTRY_SIZE); dataofs = keyofs + ceilto(df->df_total_key_size); @@ -319,8 +323,7 @@ _citrus_db_factory_serialize(struct _citrus_db_factory *df, const char *magic, de = depp[i]; nextofs = 0; if (de->de_next) { - nextofs = - _CITRUS_DB_HEADER_SIZE + + nextofs = _CITRUS_DB_HEADER_SIZE + de->de_next->de_idx * _CITRUS_DB_ENTRY_SIZE; } put32(r, &ofs, de->de_hashvalue); @@ -330,10 +333,10 @@ _citrus_db_factory_serialize(struct _citrus_db_factory *df, const char *magic, put32(r, &ofs, dataofs); put32(r, &ofs, _region_size(&de->de_data)); memcpy(_region_offset(r, keyofs), - _region_head(&de->de_key), _region_size(&de->de_key)); + _region_head(&de->de_key), _region_size(&de->de_key)); keyofs += _region_size(&de->de_key); memcpy(_region_offset(r, dataofs), - _region_head(&de->de_data), _region_size(&de->de_data)); + _region_head(&de->de_data), _region_size(&de->de_data)); dataofs += _region_size(&de->de_data); putpad(r, &dataofs); } @@ -341,5 +344,5 @@ _citrus_db_factory_serialize(struct _citrus_db_factory *df, const char *magic, putpad(r, &keyofs); free(depp); - return 0; + return (0); } diff --git a/lib/libc/citrus/citrus_db_factory.h b/lib/libc/citrus/citrus_db_factory.h index f96323ca74..0551199779 100644 --- a/lib/libc/citrus/citrus_db_factory.h +++ b/lib/libc/citrus/citrus_db_factory.h @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db_factory.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db_factory.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db_factory.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -32,29 +31,27 @@ #define _CITRUS_DB_FACTORY_H_ struct _citrus_db_factory; -typedef uint32_t (*_citrus_db_hash_func_t)(void *, struct _citrus_region *); +typedef uint32_t (*_citrus_db_hash_func_t)(struct _citrus_region *); __BEGIN_DECLS -int _citrus_db_factory_create(struct _citrus_db_factory **, - _citrus_db_hash_func_t, void *); -void _citrus_db_factory_free(struct _citrus_db_factory *); -int _citrus_db_factory_add(struct _citrus_db_factory *, - struct _citrus_region *, int, - struct _citrus_region *, int); -int _citrus_db_factory_add_by_string(struct _citrus_db_factory *, - const char *, - struct _citrus_region *, int); -int _citrus_db_factory_add8_by_string(struct _citrus_db_factory *, - const char *, uint8_t); -int _citrus_db_factory_add16_by_string(struct _citrus_db_factory *, - const char *, uint16_t); -int _citrus_db_factory_add32_by_string(struct _citrus_db_factory *, - const char *, uint32_t); -int _citrus_db_factory_add_string_by_string(struct _citrus_db_factory *, - const char *, const char *); -size_t _citrus_db_factory_calc_size(struct _citrus_db_factory *); -int _citrus_db_factory_serialize(struct _citrus_db_factory *, - const char *, struct _citrus_region *); +int _citrus_db_factory_create(struct _citrus_db_factory **, + _citrus_db_hash_func_t, void *); +void _citrus_db_factory_free(struct _citrus_db_factory *); +int _citrus_db_factory_add(struct _citrus_db_factory *, + struct _citrus_region *, int, struct _citrus_region *, int); +int _citrus_db_factory_add_by_string(struct _citrus_db_factory *, + const char *, struct _citrus_region *, int); +int _citrus_db_factory_add8_by_string(struct _citrus_db_factory *, + const char *, uint8_t); +int _citrus_db_factory_add16_by_string(struct _citrus_db_factory *, + const char *, uint16_t); +int _citrus_db_factory_add32_by_string(struct _citrus_db_factory *, + const char *, uint32_t); +int _citrus_db_factory_add_string_by_string(struct _citrus_db_factory *, + const char *, const char *); +size_t _citrus_db_factory_calc_size(struct _citrus_db_factory *); +int _citrus_db_factory_serialize(struct _citrus_db_factory *, + const char *, struct _citrus_region *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_db_file.h b/lib/libc/citrus/citrus_db_file.h index e799585f42..96d0342921 100644 --- a/lib/libc/citrus/citrus_db_file.h +++ b/lib/libc/citrus/citrus_db_file.h @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db_file.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db_file.h,v 1.4 2008/02/10 05:58:22 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db_file.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -71,7 +70,7 @@ struct _citrus_db_header_x { char dhx_magic[_CITRUS_DB_MAGIC_SIZE]; uint32_t dhx_num_entries; uint32_t dhx_entry_offset; -} __attribute__((__packed__)); +} __packed; struct _citrus_db_entry_x { uint32_t dex_hash_value; @@ -80,7 +79,7 @@ struct _citrus_db_entry_x { uint32_t dex_key_size; uint32_t dex_data_offset; uint32_t dex_data_size; -} __attribute__((__packed__)); +} __packed; #define _CITRUS_DB_ENTRY_SIZE 24 #endif diff --git a/lib/libc/citrus/citrus_db_hash.c b/lib/libc/citrus/citrus_db_hash.c index 8e053f3a1f..556ec17ac7 100644 --- a/lib/libc/citrus/citrus_db_hash.c +++ b/lib/libc/citrus/citrus_db_hash.c @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db_hash.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db_hash.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db_hash.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -28,10 +27,12 @@ * SUCH DAMAGE. */ +#include +#include + #include #include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" @@ -40,13 +41,15 @@ #include "citrus_db_hash.h" uint32_t -/*ARGSUSED*/ -_citrus_db_hash_std(void *closure __unused, struct _region *r) +_citrus_db_hash_std(struct _region *r) { - const uint8_t *p = _region_head(r); - uint32_t hash = 0, tmp; + const uint8_t *p; + uint32_t hash, tmp; size_t i; + hash = 0; + p = _region_head(r); + for (i = _region_size(r); i > 0; i--) { hash <<= 4; hash += _bcs_tolower(*p); @@ -57,5 +60,5 @@ _citrus_db_hash_std(void *closure __unused, struct _region *r) } p++; } - return hash; + return (hash); } diff --git a/lib/libc/citrus/citrus_db_hash.h b/lib/libc/citrus/citrus_db_hash.h index 172aea5f95..df3c332df8 100644 --- a/lib/libc/citrus/citrus_db_hash.h +++ b/lib/libc/citrus/citrus_db_hash.h @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_db_hash.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_db_hash.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_db_hash.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -32,7 +31,7 @@ #define _CITRUS_DB_HASH_H_ __BEGIN_DECLS -uint32_t _citrus_db_hash_std(void *, struct _citrus_region *); +uint32_t _citrus_db_hash_std(struct _citrus_region *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_esdb.c b/lib/libc/citrus/citrus_esdb.c index 4b2545dff4..7f634836d9 100644 --- a/lib/libc/citrus/citrus_esdb.c +++ b/lib/libc/citrus/citrus_esdb.c @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_esdb.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_esdb.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_esdb.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -28,14 +27,17 @@ * SUCH DAMAGE. */ +#include +#include + #include -#include -#include -#include #include #include #include -#include +#include +#include +#include +#include #include "citrus_namespace.h" #include "citrus_types.h" @@ -59,8 +61,9 @@ const char * _citrus_esdb_alias(const char *esname, char *buf, size_t bufsize) { - return _lookup_alias(_PATH_ESDB "/" ESDB_ALIAS, esname, buf, bufsize, - _LOOKUP_CASE_IGNORE); + + return (_lookup_alias(_PATH_ESDB "/" ESDB_ALIAS, esname, buf, bufsize, + _LOOKUP_CASE_IGNORE)); } @@ -71,11 +74,11 @@ _citrus_esdb_alias(const char *esname, char *buf, size_t bufsize) static int conv_esdb(struct _citrus_esdb *esdb, struct _region *fr) { - int ret; struct _citrus_db *db; - uint32_t version, num_charsets, csid, i, tmp; - char buf[100]; const char *str; + char buf[100]; + uint32_t csid, i, num_charsets, tmp, version; + int ret; /* open db */ ret = _db_open(&db, fr, _CITRUS_ESDB_MAGIC, &_db_hash_std, NULL); @@ -110,7 +113,7 @@ conv_esdb(struct _citrus_esdb *esdb, struct _region *fr) esdb->db_variable = NULL; ret = _db_lookupstr_by_s(db, _CITRUS_ESDB_SYM_VARIABLE, &str, NULL); if (ret == 0) { - esdb->db_len_variable = strlen(str)+1; + esdb->db_len_variable = strlen(str) + 1; esdb->db_variable = strdup(str); if (esdb->db_variable == NULL) { ret = errno; @@ -121,7 +124,7 @@ conv_esdb(struct _citrus_esdb *esdb, struct _region *fr) /* get number of charsets */ ret = _db_lookup32_by_s(db, _CITRUS_ESDB_SYM_NUM_CHARSETS, - &num_charsets, NULL); + &num_charsets, NULL); if (ret) goto err3; esdb->db_num_charsets = num_charsets; @@ -163,7 +166,7 @@ conv_esdb(struct _citrus_esdb *esdb, struct _region *fr) } _db_close(db); - return 0; + return (0); err4: for (; i > 0; i--) @@ -178,7 +181,7 @@ err1: if (ret == ENOENT) ret = EFTYPE; err0: - return ret; + return (ret); } /* @@ -188,34 +191,32 @@ err0: int _citrus_esdb_open(struct _citrus_esdb *db, const char *esname) { - int ret; + struct _region fr; const char *realname, *encfile; char buf1[PATH_MAX], buf2[PATH_MAX], path[PATH_MAX]; - struct _region fr; - - _DIAGASSERT(esname != NULL); + int ret; snprintf(path, sizeof(path), "%s/%s", _PATH_ESDB, ESDB_ALIAS); realname = _lookup_alias(path, esname, buf1, sizeof(buf1), - _LOOKUP_CASE_IGNORE); + _LOOKUP_CASE_IGNORE); snprintf(path, sizeof(path), "%s/%s", _PATH_ESDB, ESDB_DIR); encfile = _lookup_simple(path, realname, buf2, sizeof(buf2), - _LOOKUP_CASE_IGNORE); - if (encfile==NULL) - return ENOENT; + _LOOKUP_CASE_IGNORE); + if (encfile == NULL) + return (ENOENT); /* open file */ snprintf(path, sizeof(path), "%s/%s", _PATH_ESDB, encfile); ret = _map_file(&fr, path); if (ret) - return ret; + return (ret); ret = conv_esdb(db, &fr); _unmap_file(&fr); - return ret; + return (ret); } /* @@ -225,12 +226,8 @@ _citrus_esdb_open(struct _citrus_esdb *db, const char *esname) void _citrus_esdb_close(struct _citrus_esdb *db) { - int i; - _DIAGASSERT(db != NULL); - _DIAGASSERT(db->db_num_charsets == 0 || db->db_charsets != NULL); - - for (i = 0; i < db->db_num_charsets; i++) + for (int i = 0; i < db->db_num_charsets; i++) free(db->db_charsets[i].ec_csname); db->db_num_charsets = 0; free(db->db_charsets); db->db_charsets = NULL; @@ -246,9 +243,8 @@ _citrus_esdb_close(struct _citrus_esdb *db) void _citrus_esdb_free_list(char **list, size_t num) { - size_t i; - for (i = 0; i < num; i++) + for (size_t i = 0; i < num; i++) free(list[i]); free(list); } @@ -258,24 +254,24 @@ _citrus_esdb_free_list(char **list, size_t num) * get esdb entries. */ int -_citrus_esdb_get_list(char ***rlist, size_t *rnum) +_citrus_esdb_get_list(char ***rlist, size_t *rnum, bool sorted) { - int ret; - struct _region key; - size_t num; struct _citrus_lookup *cla, *cld; + struct _region key, data; char **list, **q; char buf[PATH_MAX]; + size_t num; + int ret; num = 0; ret = _lookup_seq_open(&cla, _PATH_ESDB "/" ESDB_ALIAS, - _LOOKUP_CASE_IGNORE); + _LOOKUP_CASE_IGNORE); if (ret) goto quit0; ret = _lookup_seq_open(&cld, _PATH_ESDB "/" ESDB_DIR, - _LOOKUP_CASE_IGNORE); + _LOOKUP_CASE_IGNORE); if (ret) goto quit1; @@ -294,11 +290,20 @@ _citrus_esdb_get_list(char ***rlist, size_t *rnum) } /* get alias entries */ - while ((ret = _lookup_seq_next(cla, &key, NULL)) == 0) { - snprintf(buf, sizeof(buf), "%.*s", - (int)_region_size(&key), - (const char *)_region_head(&key)); - _bcs_convert_to_lower(buf); + while ((ret = _lookup_seq_next(cla, &key, &data)) == 0) { + if (sorted) + snprintf(buf, sizeof(buf), "%.*s/%.*s", + (int)_region_size(&data), + (const char *)_region_head(&data), + (int)_region_size(&key), + (const char *)_region_head(&key)); + else + snprintf(buf, sizeof(buf), "%.*s/%.*s", + (int)_region_size(&data), + (const char *)_region_head(&data), + (int)_region_size(&key), + (const char *)_region_head(&key)); + _bcs_convert_to_upper(buf); list[num] = strdup(buf); if (list[num] == NULL) { ret = errno; @@ -309,12 +314,28 @@ _citrus_esdb_get_list(char ***rlist, size_t *rnum) if (ret != ENOENT) goto quit3; /* get dir entries */ - while ((ret = _lookup_seq_next(cld, &key, NULL)) == 0) { - /* check duplicated entry */ - snprintf(buf, sizeof(buf), "%.*s", - (int)_region_size(&key), - (const char *)_region_head(&key)); - _bcs_convert_to_lower(buf); + while ((ret = _lookup_seq_next(cld, &key, &data)) == 0) { + if (!sorted) + snprintf(buf, sizeof(buf), "%.*s", + (int)_region_size(&key), + (const char *)_region_head(&key)); + else { + /* check duplicated entry */ + char *p; + char buf1[PATH_MAX]; + + snprintf(buf1, sizeof(buf1), "%.*s", + (int)_region_size(&data), + (const char *)_region_head(&data)); + if ((p = strchr(buf1, '/')) != NULL) + memcpy(buf1, p + 1, strlen(p) - 1); + if ((p = strstr(buf1, ".esdb")) != NULL) + *p = '\0'; + snprintf(buf, sizeof(buf), "%s/%.*s", buf1, + (int)_region_size(&key), + (const char *)_region_head(&key)); + } + _bcs_convert_to_upper(buf); ret = _lookup_seq_lookup(cla, buf, NULL); if (ret) { if (ret != ENOENT) @@ -332,6 +353,8 @@ _citrus_esdb_get_list(char ***rlist, size_t *rnum) goto quit3; ret = 0; + /* XXX: why reallocing the list space posteriorly? + shouldn't be done earlier? */ q = realloc(list, num * sizeof(char *)); if (!q) { ret = ENOMEM; @@ -347,5 +370,5 @@ quit3: quit1: _lookup_seq_close(cla); quit0: - return ret; + return (ret); } diff --git a/lib/libc/citrus/citrus_esdb.h b/lib/libc/citrus/citrus_esdb.h index 117f9c6854..54590040b2 100644 --- a/lib/libc/citrus/citrus_esdb.h +++ b/lib/libc/citrus/citrus_esdb.h @@ -1,6 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_esdb.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_esdb.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_esdb.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_esdb.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,27 +30,29 @@ #ifndef _CITRUS_ESDB_H_ #define _CITRUS_ESDB_H_ +#include "citrus_types.h" + struct _citrus_esdb_charset { - _citrus_csid_t ec_csid; + _citrus_csid_t ec_csid; char *ec_csname; }; struct _citrus_esdb { char *db_encname; void *db_variable; - size_t db_len_variable; - int db_num_charsets; + size_t db_len_variable; + int db_num_charsets; struct _citrus_esdb_charset *db_charsets; - int db_use_invalid; - _citrus_wc_t db_invalid; + int db_use_invalid; + _citrus_wc_t db_invalid; }; __BEGIN_DECLS const char *_citrus_esdb_alias(const char *, char *, size_t); -int _citrus_esdb_open(struct _citrus_esdb *, const char *); -void _citrus_esdb_close(struct _citrus_esdb *); -void _citrus_esdb_free_list(char **, size_t); -int _citrus_esdb_get_list(char ***, size_t *); +int _citrus_esdb_open(struct _citrus_esdb *, const char *); +void _citrus_esdb_close(struct _citrus_esdb *); +void _citrus_esdb_free_list(char **, size_t); +int _citrus_esdb_get_list(char ***, size_t *, bool); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_esdb_file.h b/lib/libc/citrus/citrus_esdb_file.h index 8126023634..bec147f44e 100644 --- a/lib/libc/citrus/citrus_esdb_file.h +++ b/lib/libc/citrus/citrus_esdb_file.h @@ -1,6 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_esdb_file.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_esdb_file.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_esdb_file.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_esdb_file.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libc/locale/rune_local.h b/lib/libc/citrus/citrus_fix_grouping.h similarity index 60% rename from lib/libc/locale/rune_local.h rename to lib/libc/citrus/citrus_fix_grouping.h index 1be4e67e8a..e48a6c0cc4 100644 --- a/lib/libc/locale/rune_local.h +++ b/lib/libc/citrus/citrus_fix_grouping.h @@ -1,8 +1,8 @@ -/* $NetBSD: src/lib/libc/locale/rune_local.h,v 1.7 2003/03/02 22:18:15 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/rune_local.h,v 1.2 2005/05/08 15:55:15 joerg Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_fix_grouping.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_fix_grouping.h,v 1.2 2009/01/11 02:46:24 christos Exp $ */ /*- - * Copyright (c) 2000 Citrus Project, + * Copyright (c)2008 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,28 +27,27 @@ * SUCH DAMAGE. */ -#ifndef _RUNE_LOCAL_H_ -#define _RUNE_LOCAL_H_ - -/* rune.c */ -_RuneLocale *_Read_RuneMagi(FILE *fp); -void _NukeRune(_RuneLocale *); - -/* setrunelocale.c */ -int _xpg4_setrunelocale(const char *); -_RuneLocale *_findrunelocale(char *); -int _newrunelocale(char *); - -/* runeglue.c */ -int __runetable_to_netbsd_ctype(const char *); - -/* ___runetype_mb.c */ -_RuneType ___runetype_mb(wint_t); - -/* ___tolower_mb.c */ -wint_t ___tolower_mb(wint_t); - -/* ___toupper_mb.c */ -wint_t ___toupper_mb(wint_t); - +#ifndef _CITRUS_FIX_GROUPING_H_ +#define _CITRUS_FIX_GROUPING_H_ + +#define _CITRUS_LC_GROUPING_VALUE_MIN 0 +#define _CITRUS_LC_GROUPING_VALUE_MAX 126 +#define _CITRUS_LC_GROUPING_VALUE_NO_FUTHER 127 + +#if CHAR_MAX != _CITRUS_LC_GROUPING_VALUE_NO_FUTHER +static __inline void +_citrus_fixup_char_max_md(char *grouping) +{ + char *p; + + for (p = grouping; *p != '\0'; ++p) + if (*p == _CITRUS_LC_GROUPING_VALUE_NO_FUTHER) + *p = (char)CHAR_MAX; +} +#define _CITRUS_FIXUP_CHAR_MAX_MD(grouping) \ + _citrus_fixup_char_max_md(__DECONST(void *, grouping)) +#else +#define _CITRUS_FIXUP_CHAR_MAX_MD(grouping) /* nothing to do */ #endif + +#endif /*_CITRUS_FIX_GROUPING_H_*/ diff --git a/lib/libc/citrus/citrus_hash.c b/lib/libc/citrus/citrus_hash.c index 2af6523cb7..44c0ade839 100644 --- a/lib/libc/citrus/citrus_hash.c +++ b/lib/libc/citrus/citrus_hash.c @@ -1,6 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_hash.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_hash.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_hash.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ - /*- * Copyright (c)2003 Citrus Project, @@ -28,10 +27,12 @@ * SUCH DAMAGE. */ +#include +#include + #include #include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" @@ -44,7 +45,7 @@ _citrus_string_hash_func(const char *key, int hashsize) { struct _region r; - _region_init(&r, __DECONST(char *, key), strlen(key)); + _region_init(&r, __DECONST(void *, key), strlen(key)); - return (int)(_db_hash_std(NULL, &r) % (uint32_t)hashsize); + return ((int)(_db_hash_std(&r) % (uint32_t)hashsize)); } diff --git a/lib/libc/citrus/citrus_hash.h b/lib/libc/citrus/citrus_hash.h index a555caa20c..1c895c9952 100644 --- a/lib/libc/citrus/citrus_hash.h +++ b/lib/libc/citrus/citrus_hash.h @@ -1,6 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_hash.h,v 1.3 2004/01/02 21:49:35 itojun Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_hash.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_hash.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_hash.h,v 1.3 2004/01/02 21:49:35 itojun Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -39,22 +38,22 @@ struct headname { \ #define _CITRUS_HASH_INIT(head, hashsize) \ do { \ int _ch_loop; \ + \ for (_ch_loop = 0; _ch_loop < hashsize; _ch_loop++) \ LIST_INIT(&(head)->chh_table[_ch_loop]); \ -} while (/*CONSTCOND*/0) -#define _CITRUS_HASH_REMOVE(elm, field) LIST_REMOVE(elm, field) +} while (0) +#define _CITRUS_HASH_REMOVE(elm, field) LIST_REMOVE(elm, field) #define _CITRUS_HASH_INSERT(head, elm, field, hashval) \ -LIST_INSERT_HEAD(&(head)->chh_table[hashval], elm, field) + LIST_INSERT_HEAD(&(head)->chh_table[hashval], elm, field) #define _CITRUS_HASH_SEARCH(head, elm, field, matchfunc, key, hashval) \ do { \ - LIST_FOREACH((elm), &(head)->chh_table[hashval], field) { \ - if (matchfunc((elm), key)==0) \ + LIST_FOREACH((elm), &(head)->chh_table[hashval], field) \ + if (matchfunc((elm), key) == 0) \ break; \ - } \ -} while (/*CONSTCOND*/0) +} while (0) __BEGIN_DECLS -int _citrus_string_hash_func(const char *, int); +int _citrus_string_hash_func(const char *, int); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_iconv.c b/lib/libc/citrus/citrus_iconv.c index d8b319d1df..4c2621fbaf 100644 --- a/lib/libc/citrus/citrus_iconv.c +++ b/lib/libc/citrus/citrus_iconv.c @@ -1,6 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_iconv.c,v 1.6 2004/12/30 05:03:48 christos Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_iconv.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_iconv.c 254080 2013-08-08 01:53:27Z peter $ */ +/* $NetBSD: citrus_iconv.c,v 1.7 2008/07/25 14:05:25 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -28,29 +27,31 @@ * SUCH DAMAGE. */ -#include "namespace.h" +#include #include #include + #include #include #include +#include +#include #include #include -#include +#include #include #include #include #include -#include "un-namespace.h" - -#include "libc_private.h" #include "citrus_namespace.h" #include "citrus_bcs.h" +#include "citrus_esdb.h" #include "citrus_region.h" #include "citrus_memstream.h" #include "citrus_mmap.h" #include "citrus_module.h" +#include "citrus_lock.h" #include "citrus_lookup.h" #include "citrus_hash.h" #include "citrus_iconv.h" @@ -62,18 +63,18 @@ #define CI_INITIAL_MAX_REUSE 5 #define CI_ENV_MAX_REUSE "ICONV_MAX_REUSE" -static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; -static int isinit = 0; +static bool isinit = false; +static int shared_max_reuse, shared_num_unused; static _CITRUS_HASH_HEAD(, _citrus_iconv_shared, CI_HASH_SIZE) shared_pool; static TAILQ_HEAD(, _citrus_iconv_shared) shared_unused; -static int shared_num_unused, shared_max_reuse; + +static pthread_rwlock_t ci_lock = PTHREAD_RWLOCK_INITIALIZER; static __inline void init_cache(void) { - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&ci_lock); if (!isinit) { _CITRUS_HASH_INIT(&shared_pool, CI_HASH_SIZE); TAILQ_INIT(&shared_unused); @@ -82,60 +83,15 @@ init_cache(void) shared_max_reuse = atoi(getenv(CI_ENV_MAX_REUSE)); if (shared_max_reuse < 0) shared_max_reuse = CI_INITIAL_MAX_REUSE; - isinit = 1; + isinit = true; } - - if (__isthreaded) - _pthread_mutex_unlock(&lock); -} - -/* - * lookup_iconv_entry: - * lookup iconv.dir entry in the specified directory. - * - * line format of iconv.dir file: - * key module arg - * key : lookup key. - * module : iconv module name. - * arg : argument for the module (generally, description file name) - * - */ -static __inline int -lookup_iconv_entry(const char *curdir, const char *key, - char *linebuf, size_t linebufsize, - const char **module, const char **variable) -{ - const char *cp, *cq; - char *p, path[PATH_MAX]; - - /* iconv.dir path */ - snprintf(path, PATH_MAX, "%s/" _CITRUS_ICONV_DIR, curdir); - - /* lookup db */ - cp = p = _lookup_simple(path, key, linebuf, linebufsize, - _LOOKUP_CASE_IGNORE); - if (p == NULL) - return ENOENT; - - /* get module name */ - *module = p; - cq = _bcs_skip_nonws(cp); - p[cq-cp] = '\0'; - p += cq-cp+1; - cq++; - - /* get variable */ - cp = _bcs_skip_ws(cq); - *variable = p += cp - cq; - cq = _bcs_skip_nonws(cp); - p[cq-cp] = '\0'; - - return 0; + UNLOCK(&ci_lock); } static __inline void close_shared(struct _citrus_iconv_shared *ci) { + if (ci) { if (ci->ci_module) { if (ci->ci_ops) { @@ -151,32 +107,33 @@ close_shared(struct _citrus_iconv_shared *ci) static __inline int open_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, - const char * __restrict basedir, const char * __restrict convname, - const char * __restrict src, const char * __restrict dst) + const char * __restrict convname, const char * __restrict src, + const char * __restrict dst) { - int ret; struct _citrus_iconv_shared *ci; _citrus_iconv_getops_t getops; - char linebuf[LINE_MAX]; - const char *module, *variable; + const char *module; size_t len_convname; + int ret; - /* search converter entry */ - ret = lookup_iconv_entry(basedir, convname, linebuf, sizeof(linebuf), - &module, &variable); - if (ret) { - if (ret == ENOENT) - /* fallback */ - ret = lookup_iconv_entry(basedir, "*", - linebuf, PATH_MAX, - &module, &variable); - if (ret) - return ret; - } +#ifdef INCOMPATIBLE_WITH_GNU_ICONV + /* + * Sadly, the gnu tools expect iconv to actually parse the + * byte stream and don't allow for a pass-through when + * the (src,dest) encodings are the same. + * See gettext-0.18.3+ NEWS: + * msgfmt now checks PO file headers more strictly with less + * false-positives. + * NetBSD don't do this either. + */ + module = (strcmp(src, dst) != 0) ? "iconv_std" : "iconv_none"; +#else + module = "iconv_std"; +#endif /* initialize iconv handle */ len_convname = strlen(convname); - ci = malloc(sizeof(*ci)+len_convname+1); + ci = malloc(sizeof(*ci) + len_convname + 1); if (!ci) { ret = errno; goto err; @@ -185,7 +142,7 @@ open_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, ci->ci_ops = NULL; ci->ci_closure = NULL; ci->ci_convname = (void *)&ci[1]; - memcpy(ci->ci_convname, convname, len_convname+1); + memcpy(ci->ci_convname, convname, len_convname + 1); /* load module */ ret = _citrus_load_module(&ci->ci_module, module); @@ -193,8 +150,8 @@ open_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, goto err; /* get operators */ - getops = (_citrus_iconv_getops_t) - _citrus_find_getops(ci->ci_module, module, "iconv"); + getops = (_citrus_iconv_getops_t)_citrus_find_getops(ci->ci_module, + module, "iconv"); if (!getops) { ret = EOPNOTSUPP; goto err; @@ -204,18 +161,10 @@ open_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, ret = errno; goto err; } - ret = (*getops)(ci->ci_ops, sizeof(*ci->ci_ops), - _CITRUS_ICONV_ABI_VERSION); + ret = (*getops)(ci->ci_ops); if (ret) goto err; - /* version check */ - if (ci->ci_ops->io_abi_version == 1) { - /* binary compatibility broken at ver.2 */ - ret = EINVAL; - goto err; - } - if (ci->ci_ops->io_init_shared == NULL || ci->ci_ops->io_uninit_shared == NULL || ci->ci_ops->io_init_context == NULL || @@ -224,51 +173,49 @@ open_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, goto err; /* initialize the converter */ - ret = (*ci->ci_ops->io_init_shared)(ci, basedir, src, dst, - (const void *)variable, - strlen(variable)+1); + ret = (*ci->ci_ops->io_init_shared)(ci, src, dst); if (ret) goto err; *rci = ci; - return 0; + return (0); err: close_shared(ci); - return ret; + return (ret); } static __inline int hash_func(const char *key) { - return _string_hash_func(key, CI_HASH_SIZE); + + return (_string_hash_func(key, CI_HASH_SIZE)); } static __inline int match_func(struct _citrus_iconv_shared * __restrict ci, - const char * __restrict key) + const char * __restrict key) { - return strcmp(ci->ci_convname, key); + + return (strcmp(ci->ci_convname, key)); } static int get_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, - const char *basedir, const char *src, const char *dst) + const char *src, const char *dst) { - int ret = 0; - int hashval; struct _citrus_iconv_shared * ci; char convname[PATH_MAX]; + int hashval, ret = 0; snprintf(convname, sizeof(convname), "%s/%s", src, dst); - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&ci_lock); /* lookup alread existing entry */ hashval = hash_func(convname); _CITRUS_HASH_SEARCH(&shared_pool, ci, ci_hash_entry, match_func, - convname, hashval); + convname, hashval); if (ci != NULL) { /* found */ if (ci->ci_used_count == 0) { @@ -281,7 +228,7 @@ get_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, } /* create new entry */ - ret = open_shared(&ci, basedir, convname, src, dst); + ret = open_shared(&ci, convname, src, dst); if (ret) goto quit; @@ -290,18 +237,16 @@ get_shared(struct _citrus_iconv_shared * __restrict * __restrict rci, *rci = ci; quit: - if (__isthreaded) - _pthread_mutex_unlock(&lock); + UNLOCK(&ci_lock); - return ret; + return (ret); } static void release_shared(struct _citrus_iconv_shared * __restrict ci) { - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&ci_lock); ci->ci_used_count--; if (ci->ci_used_count == 0) { /* put it into unused list */ @@ -310,7 +255,6 @@ release_shared(struct _citrus_iconv_shared * __restrict ci) /* flood out */ while (shared_num_unused > shared_max_reuse) { ci = TAILQ_FIRST(&shared_unused); - _DIAGASSERT(ci != NULL); TAILQ_REMOVE(&shared_unused, ci, ci_tailq_entry); _CITRUS_HASH_REMOVE(ci, ci_hash_entry); shared_num_unused--; @@ -318,8 +262,7 @@ release_shared(struct _citrus_iconv_shared * __restrict ci) } } - if (__isthreaded) - _pthread_mutex_unlock(&lock); + UNLOCK(&ci_lock); } /* @@ -328,52 +271,55 @@ release_shared(struct _citrus_iconv_shared * __restrict ci) */ int _citrus_iconv_open(struct _citrus_iconv * __restrict * __restrict rcv, - const char * __restrict basedir, - const char * __restrict src, const char * __restrict dst) + const char * __restrict src, const char * __restrict dst) { - int ret; - struct _citrus_iconv_shared *ci; - struct _citrus_iconv *cv; - char realsrc[PATH_MAX], realdst[PATH_MAX]; + struct _citrus_iconv *cv = NULL; + struct _citrus_iconv_shared *ci = NULL; + char realdst[PATH_MAX], realsrc[PATH_MAX]; char buf[PATH_MAX], path[PATH_MAX]; + int ret; init_cache(); + /* GNU behaviour, using locale encoding if "" or "char" is specified */ + if ((strcmp(src, "") == 0) || (strcmp(src, "char") == 0)) + src = nl_langinfo(CODESET); + if ((strcmp(dst, "") == 0) || (strcmp(dst, "char") == 0)) + dst = nl_langinfo(CODESET); + /* resolve codeset name aliases */ - snprintf(path, sizeof(path), "%s/%s", basedir, _CITRUS_ICONV_ALIAS); - strlcpy(realsrc, - _lookup_alias(path, src, buf, PATH_MAX, _LOOKUP_CASE_IGNORE), - PATH_MAX); - strlcpy(realdst, - _lookup_alias(path, dst, buf, PATH_MAX, _LOOKUP_CASE_IGNORE), - PATH_MAX); + strlcpy(realsrc, _lookup_alias(path, src, buf, (size_t)PATH_MAX, + _LOOKUP_CASE_IGNORE), (size_t)PATH_MAX); + strlcpy(realdst, _lookup_alias(path, dst, buf, (size_t)PATH_MAX, + _LOOKUP_CASE_IGNORE), (size_t)PATH_MAX); /* sanity check */ if (strchr(realsrc, '/') != NULL || strchr(realdst, '/')) - return EINVAL; + return (EINVAL); /* get shared record */ - ret = get_shared(&ci, basedir, realsrc, realdst); + ret = get_shared(&ci, realsrc, realdst); if (ret) - return ret; + return (ret); /* create/init context */ - cv = malloc(sizeof(*cv)); - if (cv == NULL) { - ret = errno; - release_shared(ci); - return ret; + if (*rcv == NULL) { + cv = malloc(sizeof(*cv)); + if (cv == NULL) { + ret = errno; + release_shared(ci); + return (ret); + } + *rcv = cv; } - cv->cv_shared = ci; - ret = (*ci->ci_ops->io_init_context)(cv); + (*rcv)->cv_shared = ci; + ret = (*ci->ci_ops->io_init_context)(*rcv); if (ret) { release_shared(ci); free(cv); - return ret; + return (ret); } - *rcv = cv; - - return 0; + return (0); } /* @@ -383,9 +329,22 @@ _citrus_iconv_open(struct _citrus_iconv * __restrict * __restrict rcv, void _citrus_iconv_close(struct _citrus_iconv *cv) { + if (cv) { (*cv->cv_shared->ci_ops->io_uninit_context)(cv); release_shared(cv->cv_shared); free(cv); } } + +const char +*_citrus_iconv_canonicalize(const char *name) +{ + char *buf; + + if ((buf = malloc((size_t)PATH_MAX)) == NULL) + return (NULL); + memset((void *)buf, 0, (size_t)PATH_MAX); + _citrus_esdb_alias(name, buf, (size_t)PATH_MAX); + return (buf); +} diff --git a/lib/libc/citrus/citrus_iconv.h b/lib/libc/citrus/citrus_iconv.h index 8118ea61f4..f8f303fd0a 100644 --- a/lib/libc/citrus/citrus_iconv.h +++ b/lib/libc/citrus/citrus_iconv.h @@ -1,4 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_iconv.h,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_iconv.h 252547 2013-07-03 07:03:19Z peter $ */ +/* $NetBSD: citrus_iconv.h,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -34,10 +35,10 @@ struct _citrus_iconv_ops; struct _citrus_iconv; __BEGIN_DECLS -int _citrus_iconv_open(struct _citrus_iconv * __restrict * __restrict, - const char * __restrict, - const char * __restrict, const char * __restrict); -void _citrus_iconv_close(struct _citrus_iconv *); +int _citrus_iconv_open(struct _citrus_iconv * __restrict * __restrict, + const char * __restrict, const char * __restrict); +void _citrus_iconv_close(struct _citrus_iconv *); +const char *_citrus_iconv_canonicalize(const char *); __END_DECLS @@ -51,19 +52,13 @@ __END_DECLS */ static __inline int _citrus_iconv_convert(struct _citrus_iconv * __restrict cv, - const char * __restrict * __restrict in, - size_t * __restrict inbytes, - char * __restrict * __restrict out, - size_t * __restrict outbytes, uint32_t flags, - size_t * __restrict nresults) + const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict out, size_t * __restrict outbytes, + uint32_t flags, size_t * __restrict nresults) { - _DIAGASSERT(cv && cv->cv_shared && cv->cv_shared->ci_ops && - cv->cv_shared->ci_ops->io_convert && out); - _DIAGASSERT(out || outbytes == NULL); - return (*cv->cv_shared->ci_ops->io_convert)(cv, in, inbytes, out, - outbytes, flags, nresults); + outbytes, flags, nresults); } #endif diff --git a/lib/libc/citrus/citrus_iconv_local.h b/lib/libc/citrus/citrus_iconv_local.h index 4cdb4caa9b..6d4e56ac49 100644 --- a/lib/libc/citrus/citrus_iconv_local.h +++ b/lib/libc/citrus/citrus_iconv_local.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_iconv_local.h 255297 2013-09-06 09:46:44Z theraven $ */ /* $NetBSD: citrus_iconv_local.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_iconv_local.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -30,40 +30,36 @@ #ifndef _CITRUS_ICONV_LOCAL_H_ #define _CITRUS_ICONV_LOCAL_H_ -#include "citrus_module.h" - -struct _citrus_iconv; -struct _citrus_iconv_ops; -struct _citrus_iconv_shared; +#include +#include #define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_) \ -int _n_(struct _citrus_iconv_ops *, size_t, uint32_t) + int _n_(struct _citrus_iconv_ops *) #define _CITRUS_ICONV_GETOPS_FUNC(_n_) \ -_CITRUS_ICONV_GETOPS_FUNC_BASE(_citrus_##_n_##_iconv_getops) + _CITRUS_ICONV_GETOPS_FUNC_BASE(_citrus_##_n_##_iconv_getops) #define _CITRUS_ICONV_DECLS(_m_) \ -static int _citrus_##_m_##_iconv_init_shared \ - (struct _citrus_iconv_shared * __restrict, \ - const char * __restrict, \ - const char * __restrict, const char * __restrict, \ - const void * __restrict, size_t); \ -static void _citrus_##_m_##_iconv_uninit_shared \ - (struct _citrus_iconv_shared *); \ -static int _citrus_##_m_##_iconv_convert \ - (struct _citrus_iconv * __restrict, \ - const char * __restrict * __restrict, size_t * __restrict, \ - char * __restrict * __restrict, size_t * __restrict outbytes, \ - uint32_t, size_t * __restrict); \ -static int _citrus_##_m_##_iconv_init_context \ - (struct _citrus_iconv *); \ -static void _citrus_##_m_##_iconv_uninit_context \ - (struct _citrus_iconv *); \ -CITRUS_MODULE(_m_, iconv, _citrus_##_m_##_iconv_getops) +static int _citrus_##_m_##_iconv_init_shared \ + (struct _citrus_iconv_shared * __restrict, \ + const char * __restrict, const char * __restrict); \ +static void _citrus_##_m_##_iconv_uninit_shared \ + (struct _citrus_iconv_shared *); \ +static int _citrus_##_m_##_iconv_convert \ + (struct _citrus_iconv * __restrict, \ + const char * __restrict * __restrict, \ + size_t * __restrict, \ + char * __restrict * __restrict, \ + size_t * __restrict outbytes, \ + uint32_t, size_t * __restrict); \ +static int _citrus_##_m_##_iconv_init_context \ + (struct _citrus_iconv *); \ +static void _citrus_##_m_##_iconv_uninit_context \ + (struct _citrus_iconv *) #define _CITRUS_ICONV_DEF_OPS(_m_) \ +extern struct _citrus_iconv_ops _citrus_##_m_##_iconv_ops; \ struct _citrus_iconv_ops _citrus_##_m_##_iconv_ops = { \ - /* io_abi_version */ _CITRUS_ICONV_ABI_VERSION, \ /* io_init_shared */ &_citrus_##_m_##_iconv_init_shared, \ /* io_uninit_shared */ &_citrus_##_m_##_iconv_uninit_shared, \ /* io_init_context */ &_citrus_##_m_##_iconv_init_context, \ @@ -72,44 +68,42 @@ struct _citrus_iconv_ops _citrus_##_m_##_iconv_ops = { \ } typedef _CITRUS_ICONV_GETOPS_FUNC_BASE((*_citrus_iconv_getops_t)); -typedef int (*_citrus_iconv_init_shared_t) - (struct _citrus_iconv_shared * __restrict, - const char * __restrict, const char * __restrict, - const char * __restrict, const void * __restrict, size_t); -typedef void (*_citrus_iconv_uninit_shared_t) - (struct _citrus_iconv_shared *); -typedef int (*_citrus_iconv_convert_t) - (struct _citrus_iconv * __restrict, - const char *__restrict* __restrict, size_t * __restrict, - char * __restrict * __restrict, size_t * __restrict, uint32_t, - size_t * __restrict); -typedef int (*_citrus_iconv_init_context_t)(struct _citrus_iconv *); -typedef void (*_citrus_iconv_uninit_context_t)(struct _citrus_iconv *); +typedef int (*_citrus_iconv_init_shared_t) + (struct _citrus_iconv_shared * __restrict, + const char * __restrict, const char * __restrict); +typedef void (*_citrus_iconv_uninit_shared_t) + (struct _citrus_iconv_shared *); +typedef int (*_citrus_iconv_convert_t) + (struct _citrus_iconv * __restrict, + const char *__restrict* __restrict, size_t * __restrict, + char * __restrict * __restrict, size_t * __restrict, uint32_t, + size_t * __restrict); +typedef int (*_citrus_iconv_init_context_t)(struct _citrus_iconv *); +typedef void (*_citrus_iconv_uninit_context_t)(struct _citrus_iconv *); struct _citrus_iconv_ops { - uint32_t io_abi_version; _citrus_iconv_init_shared_t io_init_shared; _citrus_iconv_uninit_shared_t io_uninit_shared; _citrus_iconv_init_context_t io_init_context; _citrus_iconv_uninit_context_t io_uninit_context; _citrus_iconv_convert_t io_convert; }; -#define _CITRUS_ICONV_ABI_VERSION 2 struct _citrus_iconv_shared { struct _citrus_iconv_ops *ci_ops; void *ci_closure; - /* private */ - _CITRUS_HASH_ENTRY(_citrus_iconv_shared) ci_hash_entry; - TAILQ_ENTRY(_citrus_iconv_shared) ci_tailq_entry; - _citrus_module_t ci_module; - unsigned int ci_used_count; + _CITRUS_HASH_ENTRY(_citrus_iconv_shared) ci_hash_entry; + TAILQ_ENTRY(_citrus_iconv_shared) ci_tailq_entry; + _citrus_module_t ci_module; + unsigned int ci_used_count; char *ci_convname; + bool ci_discard_ilseq; + struct iconv_hooks *ci_hooks; }; struct _citrus_iconv { - struct _citrus_iconv_shared *cv_shared; - void *cv_closure; + struct _citrus_iconv_shared *cv_shared; + void *cv_closure; }; #endif diff --git a/lib/libc/locale/aliasname_local.h b/lib/libc/citrus/citrus_lock.h similarity index 80% rename from lib/libc/locale/aliasname_local.h rename to lib/libc/citrus/citrus_lock.h index 3be3a159c0..ade97975c1 100644 --- a/lib/libc/locale/aliasname_local.h +++ b/lib/libc/citrus/citrus_lock.h @@ -1,8 +1,6 @@ -/* $NetBSD: src/lib/libc/locale/aliasname_local.h,v 1.1 2002/02/13 07:45:52 yamt Exp $ */ -/* $DragonFly: src/lib/libc/locale/aliasname_local.h,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - +/* $FreeBSD: head/lib/libc/iconv/citrus_lock.h 252584 2013-07-03 18:35:21Z peter $ */ /*- - * Copyright (c)2002 YAMAMOTO Takashi, + * Copyright (C) 2010 Gabor Kovesdan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,4 +25,9 @@ * SUCH DAMAGE. */ -const char *__unaliasname(const char *, const char *, void *, size_t); +#include + +#define WLOCK(lock) if (__isthreaded) \ + pthread_rwlock_wrlock(lock); +#define UNLOCK(lock) if (__isthreaded) \ + pthread_rwlock_unlock(lock); diff --git a/lib/libc/citrus/citrus_lookup.c b/lib/libc/citrus/citrus_lookup.c index 305f6e0e3a..a65b3b00eb 100644 --- a/lib/libc/citrus/citrus_lookup.c +++ b/lib/libc/citrus/citrus_lookup.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_lookup.c,v 1.5 2006/03/27 01:09:11 christos Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_lookup.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_lookup.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_lookup.c,v 1.6 2009/02/03 04:58:38 lukem Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,17 +27,19 @@ * SUCH DAMAGE. */ +#include +#include + #include +#include +#include +#include +#include +#include #include #include #include -#include -#include #include -#include -#include -#include -#include #include "citrus_namespace.h" #include "citrus_bcs.h" @@ -84,19 +86,20 @@ struct _citrus_lookup { static int seq_get_num_entries_db(struct _citrus_lookup *cl) { - return cl->cl_dbnum; + + return (cl->cl_dbnum); } static int -seq_next_db(struct _citrus_lookup *cl, - struct _region *key, struct _region *data) +seq_next_db(struct _citrus_lookup *cl, struct _region *key, + struct _region *data) { if (cl->cl_key) { if (key) _region_init(key, cl->cl_key, cl->cl_keylen); - return _db_lookup_by_s(cl->cl_db, cl->cl_key, data, - &cl->cl_dblocator); + return (_db_lookup_by_s(cl->cl_db, cl->cl_key, data, + &cl->cl_dblocator)); } if (cl->cl_rewind) { @@ -104,15 +107,15 @@ seq_next_db(struct _citrus_lookup *cl, } cl->cl_rewind = 0; if (cl->cl_dbidx >= cl->cl_dbnum) - return ENOENT; + return (ENOENT); - return _db_get_entry(cl->cl_db, cl->cl_dbidx++, key, data); + return (_db_get_entry(cl->cl_db, cl->cl_dbidx++, key, data)); } static int -seq_lookup_db(struct _citrus_lookup *cl, const char *key, - struct _region *data) +seq_lookup_db(struct _citrus_lookup *cl, const char *key, struct _region *data) { + cl->cl_rewind = 0; free(cl->cl_key); cl->cl_key = strdup(key); @@ -120,12 +123,14 @@ seq_lookup_db(struct _citrus_lookup *cl, const char *key, _bcs_convert_to_lower(cl->cl_key); cl->cl_keylen = strlen(cl->cl_key); _db_locator_init(&cl->cl_dblocator); - return _db_lookup_by_s(cl->cl_db, cl->cl_key, data, &cl->cl_dblocator); + return (_db_lookup_by_s(cl->cl_db, cl->cl_key, data, + &cl->cl_dblocator)); } static void seq_close_db(struct _citrus_lookup *cl) { + _db_close(cl->cl_db); _unmap_file(&cl->cl_dbfile); } @@ -133,20 +138,20 @@ seq_close_db(struct _citrus_lookup *cl) static int seq_open_db(struct _citrus_lookup *cl, const char *name) { - int ret; struct _region r; char path[PATH_MAX]; + int ret; snprintf(path, sizeof(path), "%s.db", name); ret = _map_file(&r, path); if (ret) - return ret; + return (ret); ret = _db_open(&cl->cl_db, &r, _CITRUS_LOOKUP_MAGIC, - _db_hash_std, NULL); + _db_hash_std, NULL); if (ret) { _unmap_file(&r); - return ret; + return (ret); } cl->cl_dbfile = r; @@ -158,7 +163,7 @@ seq_open_db(struct _citrus_lookup *cl, const char *name) cl->cl_num_entries = &seq_get_num_entries_db; cl->cl_close = &seq_close_db; - return 0; + return (0); } #define T_COMM '#' @@ -176,30 +181,30 @@ seq_next_plain(struct _citrus_lookup *cl, struct _region *key, retry: p = _memstream_getln(&cl->cl_plainms, &len); if (p == NULL) - return ENOENT; + return (ENOENT); /* ignore comment */ q = memchr(p, T_COMM, len); if (q) { - len = q-p; + len = q - p; } /* ignore trailing spaces */ _bcs_trunc_rws_len(p, &len); p = _bcs_skip_ws_len(p, &len); q = _bcs_skip_nonws_len(p, &len); - if (p==q) + if (p == q) goto retry; - if (cl->cl_key && ((size_t)(q-p) != cl->cl_keylen || - memcmp(p, cl->cl_key, (size_t)(q-p)) != 0)) + if (cl->cl_key && ((size_t)(q - p) != cl->cl_keylen || + memcmp(p, cl->cl_key, (size_t)(q - p)) != 0)) goto retry; /* found a entry */ if (key) - _region_init(key, __DECONST(char *, p), q-p); + _region_init(key, __DECONST(void *, p), (size_t)(q - p)); p = _bcs_skip_ws_len(q, &len); if (data) - _region_init(data, len ? __DECONST(char *, p) : NULL, len); + _region_init(data, len ? __DECONST(void *, p) : NULL, len); - return 0; + return (0); } static int @@ -211,12 +216,12 @@ seq_get_num_entries_plain(struct _citrus_lookup *cl) while (seq_next_plain(cl, NULL, NULL) == 0) num++; - return num; + return (num); } static int seq_lookup_plain(struct _citrus_lookup *cl, const char *key, - struct _region *data) + struct _region *data) { size_t len; const char *p; @@ -230,16 +235,17 @@ seq_lookup_plain(struct _citrus_lookup *cl, const char *key, _memstream_bind(&cl->cl_plainms, &cl->cl_plainr); p = _memstream_matchline(&cl->cl_plainms, cl->cl_key, &len, 0); if (p == NULL) - return ENOENT; + return (ENOENT); if (data) - _region_init(data, __DECONST(char *, p), len); + _region_init(data, __DECONST(void *, p), len); - return 0; + return (0); } static void seq_close_plain(struct _citrus_lookup *cl) { + _unmap_file(&cl->cl_plainr); } @@ -251,7 +257,7 @@ seq_open_plain(struct _citrus_lookup *cl, const char *name) /* open read stream */ ret = _map_file(&cl->cl_plainr, name); if (ret) - return ret; + return (ret); cl->cl_rewind = 1; cl->cl_next = &seq_next_plain; @@ -259,19 +265,19 @@ seq_open_plain(struct _citrus_lookup *cl, const char *name) cl->cl_num_entries = &seq_get_num_entries_plain; cl->cl_close = &seq_close_plain; - return 0; + return (0); } int _citrus_lookup_seq_open(struct _citrus_lookup **rcl, const char *name, - int ignore_case) + int ignore_case) { int ret; struct _citrus_lookup *cl; cl = malloc(sizeof(*cl)); if (cl == NULL) - return errno; + return (errno); cl->cl_key = NULL; cl->cl_keylen = 0; @@ -284,12 +290,13 @@ _citrus_lookup_seq_open(struct _citrus_lookup **rcl, const char *name, else free(cl); - return ret; + return (ret); } void _citrus_lookup_seq_rewind(struct _citrus_lookup *cl) { + cl->cl_rewind = 1; free(cl->cl_key); cl->cl_key = NULL; @@ -298,27 +305,31 @@ _citrus_lookup_seq_rewind(struct _citrus_lookup *cl) int _citrus_lookup_seq_next(struct _citrus_lookup *cl, - struct _region *key, struct _region *data) + struct _region *key, struct _region *data) { - return (*cl->cl_next)(cl, key, data); + + return ((*cl->cl_next)(cl, key, data)); } int _citrus_lookup_seq_lookup(struct _citrus_lookup *cl, const char *key, - struct _region *data) + struct _region *data) { - return (*cl->cl_lookup)(cl, key, data); + + return ((*cl->cl_lookup)(cl, key, data)); } int _citrus_lookup_get_number_of_entries(struct _citrus_lookup *cl) { - return (*cl->cl_num_entries)(cl); + + return ((*cl->cl_num_entries)(cl)); } void _citrus_lookup_seq_close(struct _citrus_lookup *cl) { + free(cl->cl_key); (*cl->cl_close)(cl); free(cl); @@ -326,26 +337,26 @@ _citrus_lookup_seq_close(struct _citrus_lookup *cl) char * _citrus_lookup_simple(const char *name, const char *key, - char *linebuf, size_t linebufsize, int ignore_case) + char *linebuf, size_t linebufsize, int ignore_case) { - int ret; struct _citrus_lookup *cl; struct _region data; + int ret; ret = _citrus_lookup_seq_open(&cl, name, ignore_case); if (ret) - return NULL; + return (NULL); ret = _citrus_lookup_seq_lookup(cl, key, &data); if (ret) { _citrus_lookup_seq_close(cl); - return NULL; + return (NULL); } - snprintf(linebuf, linebufsize, "%.*s", - (int)_region_size(&data), (const char *)_region_head(&data)); + snprintf(linebuf, linebufsize, "%.*s", (int)_region_size(&data), + (const char *)_region_head(&data)); _citrus_lookup_seq_close(cl); - return linebuf; + return (linebuf); } diff --git a/lib/libc/citrus/citrus_lookup.h b/lib/libc/citrus/citrus_lookup.h index 0df64cfce5..dfc58e8b56 100644 --- a/lib/libc/citrus/citrus_lookup.h +++ b/lib/libc/citrus/citrus_lookup.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_lookup.h,v 1.2 2004/07/21 14:16:34 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_lookup.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_lookup.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_lookup.h,v 1.2 2004/07/21 14:16:34 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -35,20 +35,22 @@ struct _citrus_lookup; __BEGIN_DECLS -char *_citrus_lookup_simple(const char *, const char *, char *, size_t, int); -int _citrus_lookup_seq_open(struct _citrus_lookup **, const char *, int); -void _citrus_lookup_seq_rewind(struct _citrus_lookup *); -int _citrus_lookup_seq_next(struct _citrus_lookup *, +char *_citrus_lookup_simple(const char *, const char *, char *, + size_t, int); +int _citrus_lookup_seq_open(struct _citrus_lookup **, + const char *, int); +void _citrus_lookup_seq_rewind(struct _citrus_lookup *); +int _citrus_lookup_seq_next(struct _citrus_lookup *, struct _region *, struct _region *); -int _citrus_lookup_seq_lookup(struct _citrus_lookup *, const char *, - struct _region *); -int _citrus_lookup_get_number_of_entries(struct _citrus_lookup *); -void _citrus_lookup_seq_close(struct _citrus_lookup *); +int _citrus_lookup_seq_lookup(struct _citrus_lookup *, + const char *, struct _region *); +int _citrus_lookup_get_number_of_entries(struct _citrus_lookup *); +void _citrus_lookup_seq_close(struct _citrus_lookup *); __END_DECLS static __inline const char * _citrus_lookup_alias(const char *path, const char *key, char *buf, size_t n, - int ignore_case) + int ignore_case) { const char *ret; @@ -56,7 +58,7 @@ _citrus_lookup_alias(const char *path, const char *key, char *buf, size_t n, if (ret == NULL) ret = key; - return ret; + return (ret); } #endif diff --git a/lib/libc/citrus/citrus_lookup_factory.c b/lib/libc/citrus/citrus_lookup_factory.c index e63c90b237..868f0afad8 100644 --- a/lib/libc/citrus/citrus_lookup_factory.c +++ b/lib/libc/citrus/citrus_lookup_factory.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_lookup_factory.c,v 1.4 2003/10/27 00:12:42 lukem Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_lookup_factory.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_lookup_factory.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_lookup_factory.c,v 1.4 2003/10/27 00:12:42 lukem Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,14 +27,15 @@ * SUCH DAMAGE. */ -#include +#include + #include +#include +#include +#include #include #include #include -#include -#include -#include #include "citrus_namespace.h" #include "citrus_region.h" @@ -49,7 +50,7 @@ static int convert_line(struct _citrus_db_factory *df, const char *line, size_t len) { const char *p; - char key[LINE_MAX], data[LINE_MAX]; + char data[LINE_MAX], key[LINE_MAX]; /* cut off trailing comment */ p = memchr(line, T_COMM, len); @@ -59,10 +60,10 @@ convert_line(struct _citrus_db_factory *df, const char *line, size_t len) /* key */ line = _bcs_skip_ws_len(line, &len); if (len == 0) - return 0; + return (0); p = _bcs_skip_nonws_len(line, &len); - if (p==line) - return 0; + if (p == line) + return (0); snprintf(key, sizeof(key), "%.*s", (int)(p-line), line); _bcs_convert_to_lower(key); @@ -71,22 +72,22 @@ convert_line(struct _citrus_db_factory *df, const char *line, size_t len) _bcs_trunc_rws_len(line, &len); snprintf(data, sizeof(data), "%.*s", (int)len, line); - return _db_factory_addstr_by_s(df, key, data); + return (_db_factory_addstr_by_s(df, key, data)); } static int dump_db(struct _citrus_db_factory *df, struct _region *r) { - size_t size; void *ptr; + size_t size; size = _db_factory_calc_size(df); ptr = malloc(size); if (ptr == NULL) - return errno; + return (errno); _region_init(r, ptr, size); - return _db_factory_serialize(df, _CITRUS_LOOKUP_MAGIC, r); + return (_db_factory_serialize(df, _CITRUS_LOOKUP_MAGIC, r)); } int @@ -100,21 +101,21 @@ _citrus_lookup_factory_convert(FILE *out, FILE *in) ret = _db_factory_create(&df, &_db_hash_std, NULL); if (ret) - return ret; + return (ret); while ((line = fgetln(in, &size)) != NULL) if ((ret = convert_line(df, line, size))) { _db_factory_free(df); - return ret; + return (ret); } ret = dump_db(df, &r); _db_factory_free(df); if (ret) - return ret; + return (ret); if (fwrite(_region_head(&r), _region_size(&r), 1, out) != 1) - return errno; + return (errno); - return 0; + return (0); } diff --git a/lib/libc/citrus/citrus_lookup_factory.h b/lib/libc/citrus/citrus_lookup_factory.h index 515ddad3c9..43114b169e 100644 --- a/lib/libc/citrus/citrus_lookup_factory.h +++ b/lib/libc/citrus/citrus_lookup_factory.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_lookup_factory.h,v 1.1 2003/06/25 09:51:35 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_lookup_factory.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_lookup_factory.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_lookup_factory.h,v 1.1 2003/06/25 09:51:35 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,7 +31,7 @@ #define _CITRUS_LOOKUP_FACTORY_H_ __BEGIN_DECLS -int _citrus_lookup_factory_convert(FILE *, FILE *); +int _citrus_lookup_factory_convert(FILE *, FILE *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_lookup_file.h b/lib/libc/citrus/citrus_lookup_file.h index 345c1f4116..a5bd8af890 100644 --- a/lib/libc/citrus/citrus_lookup_file.h +++ b/lib/libc/citrus/citrus_lookup_file.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_lookup_factory.h,v 1.1 2003/06/25 09:51:35 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_lookup_file.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_lookup_file.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_lookup_file.h,v 1.1 2003/06/25 09:51:36 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libc/citrus/citrus_mapper.c b/lib/libc/citrus/citrus_mapper.c index c15ddd4012..8052423570 100644 --- a/lib/libc/citrus/citrus_mapper.c +++ b/lib/libc/citrus/citrus_mapper.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mapper.c,v 1.6 2004/12/30 05:05:01 christos Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mapper.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_mapper.c 252584 2013-07-03 18:35:21Z peter $ */ +/* $NetBSD: citrus_mapper.c,v 1.7 2008/07/25 14:05:25 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,25 +27,22 @@ * SUCH DAMAGE. */ -#include "namespace.h" - +#include #include -#include #include +#include + #include #include #include -#include #include #include #include -#include "un-namespace.h" - -#include "libc_private.h" #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_region.h" +#include "citrus_lock.h" #include "citrus_memstream.h" #include "citrus_bcs.h" #include "citrus_mmap.h" @@ -58,10 +55,10 @@ #define CM_HASH_SIZE 101 #define REFCOUNT_PERSISTENT -1 -static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_rwlock_t cm_lock = PTHREAD_RWLOCK_INITIALIZER; struct _citrus_mapper_area { - _CITRUS_HASH_HEAD(, _citrus_mapper, CM_HASH_SIZE) ma_cache; + _CITRUS_HASH_HEAD(, _citrus_mapper, CM_HASH_SIZE) ma_cache; char *ma_dir; }; @@ -72,23 +69,22 @@ struct _citrus_mapper_area { int _citrus_mapper_create_area( - struct _citrus_mapper_area *__restrict *__restrict rma, - const char *__restrict area) + struct _citrus_mapper_area *__restrict *__restrict rma, + const char *__restrict area) { + struct _citrus_mapper_area *ma; struct stat st; - int ret; char path[PATH_MAX]; - struct _citrus_mapper_area *ma; + int ret; - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&cm_lock); if (*rma != NULL) { ret = 0; goto quit; } - snprintf(path, PATH_MAX, "%s/%s", area, _CITRUS_MAPPER_DIR); + snprintf(path, (size_t)PATH_MAX, "%s/%s", area, _CITRUS_MAPPER_DIR); ret = stat(path, &st); if (ret) @@ -102,7 +98,7 @@ _citrus_mapper_create_area( ma->ma_dir = strdup(area); if (ma->ma_dir == NULL) { ret = errno; - free(ma->ma_dir); + free(ma); goto quit; } _CITRUS_HASH_INIT(&ma->ma_cache, CM_HASH_SIZE); @@ -110,10 +106,9 @@ _citrus_mapper_create_area( *rma = ma; ret = 0; quit: - if (__isthreaded) - _pthread_mutex_unlock(&lock); + UNLOCK(&cm_lock); - return ret; + return (ret); } @@ -129,25 +124,24 @@ quit: */ static int -lookup_mapper_entry(const char *dir, const char *mapname, - void *linebuf, size_t linebufsize, - const char **module, const char **variable) +lookup_mapper_entry(const char *dir, const char *mapname, void *linebuf, + size_t linebufsize, const char **module, const char **variable) { struct _region r; struct _memstream ms; - int ret; const char *cp, *cq; char *p; - size_t len; char path[PATH_MAX]; + size_t len; + int ret; /* create mapper.dir path */ - snprintf(path, PATH_MAX, "%s/%s", dir, _CITRUS_MAPPER_DIR); + snprintf(path, (size_t)PATH_MAX, "%s/%s", dir, _CITRUS_MAPPER_DIR); /* open read stream */ ret = _map_file(&r, path); if (ret) - return ret; + return (ret); _memstream_bind(&ms, &r); @@ -157,7 +151,7 @@ lookup_mapper_entry(const char *dir, const char *mapname, ret = ENOENT; goto quit; } - if (!len || len>linebufsize-1) { + if (!len || len > linebufsize - 1) { ret = EINVAL; goto quit; } @@ -166,19 +160,19 @@ lookup_mapper_entry(const char *dir, const char *mapname, /* get module name */ *module = p; cq = _bcs_skip_nonws_len(cp, &len); - strlcpy(p, cp, (size_t)(cq-cp+1)); - p += cq-cp+1; + strlcpy(p, cp, (size_t)(cq - cp + 1)); + p += cq - cp + 1; /* get variable */ *variable = p; cp = _bcs_skip_ws_len(cq, &len); - strlcpy(p, cp, len+1); + strlcpy(p, cp, len + 1); ret = 0; quit: _unmap_file(&r); - return ret; + return (ret); } /* @@ -206,18 +200,18 @@ mapper_close(struct _citrus_mapper *cm) */ static int mapper_open(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict * __restrict rcm, - const char * __restrict module, - const char * __restrict variable) + struct _citrus_mapper * __restrict * __restrict rcm, + const char * __restrict module, + const char * __restrict variable) { - int ret; struct _citrus_mapper *cm; _citrus_mapper_getops_t getops; + int ret; /* initialize mapper handle */ cm = malloc(sizeof(*cm)); if (!cm) - return errno; + return (errno); cm->cm_module = NULL; cm->cm_ops = NULL; @@ -243,8 +237,7 @@ mapper_open(struct _citrus_mapper_area *__restrict ma, ret = errno; goto err; } - ret = (*getops)(cm->cm_ops, sizeof(*cm->cm_ops), - _CITRUS_MAPPER_ABI_VERSION); + ret = (*getops)(cm->cm_ops); if (ret) goto err; @@ -262,19 +255,18 @@ mapper_open(struct _citrus_mapper_area *__restrict ma, } /* initialize the mapper */ ret = (*cm->cm_ops->mo_init)(ma, cm, ma->ma_dir, - (const void *)variable, - strlen(variable)+1, - cm->cm_traits, sizeof(*cm->cm_traits)); + (const void *)variable, strlen(variable) + 1, + cm->cm_traits, sizeof(*cm->cm_traits)); if (ret) goto err; *rcm = cm; - return 0; + return (0); err: mapper_close(cm); - return ret; + return (ret); } /* @@ -283,11 +275,11 @@ err: */ int _citrus_mapper_open_direct(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict * __restrict rcm, - const char * __restrict module, - const char * __restrict variable) + struct _citrus_mapper * __restrict * __restrict rcm, + const char * __restrict module, const char * __restrict variable) { - return mapper_open(ma, rcm, module, variable); + + return (mapper_open(ma, rcm, module, variable)); } /* @@ -296,7 +288,8 @@ _citrus_mapper_open_direct(struct _citrus_mapper_area *__restrict ma, static __inline int hash_func(const char *key) { - return _string_hash_func(key, CM_HASH_SIZE); + + return (_string_hash_func(key, CM_HASH_SIZE)); } /* @@ -305,7 +298,8 @@ hash_func(const char *key) static __inline int match_func(struct _citrus_mapper *cm, const char *key) { - return strcmp(cm->cm_key, key); + + return (strcmp(cm->cm_key, key)); } /* @@ -314,22 +308,22 @@ match_func(struct _citrus_mapper *cm, const char *key) */ int _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma, - struct _citrus_mapper * __restrict * __restrict rcm, - const char * __restrict mapname) + struct _citrus_mapper * __restrict * __restrict rcm, + const char * __restrict mapname) { - int ret; + struct _citrus_mapper *cm; char linebuf[PATH_MAX]; const char *module, *variable; - struct _citrus_mapper *cm; - int hashval; + int hashval, ret; + + variable = NULL; - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&cm_lock); /* search in the cache */ hashval = hash_func(mapname); _CITRUS_HASH_SEARCH(&ma->ma_cache, cm, cm_entry, match_func, mapname, - hashval); + hashval); if (cm) { /* found */ cm->cm_refcount++; @@ -339,22 +333,22 @@ _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma, } /* search mapper entry */ - ret = lookup_mapper_entry(ma->ma_dir, mapname, linebuf, PATH_MAX, - &module, &variable); + ret = lookup_mapper_entry(ma->ma_dir, mapname, linebuf, + (size_t)PATH_MAX, &module, &variable); if (ret) goto quit; /* open mapper */ + UNLOCK(&cm_lock); ret = mapper_open(ma, &cm, module, variable); + WLOCK(&cm_lock); if (ret) goto quit; cm->cm_key = strdup(mapname); if (cm->cm_key == NULL) { ret = errno; - if (__isthreaded) - _pthread_mutex_unlock(&lock); _mapper_close(cm); - return ret; + goto quit; } /* insert to the cache */ @@ -364,9 +358,9 @@ _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma, *rcm = cm; ret = 0; quit: - if (__isthreaded) - _pthread_mutex_unlock(&lock); - return ret; + UNLOCK(&cm_lock); + + return (ret); } /* @@ -376,9 +370,9 @@ quit: void _citrus_mapper_close(struct _citrus_mapper *cm) { + if (cm) { - if (__isthreaded) - _pthread_mutex_lock(&lock); + WLOCK(&cm_lock); if (cm->cm_refcount == REFCOUNT_PERSISTENT) goto quit; if (cm->cm_refcount > 0) { @@ -387,13 +381,9 @@ _citrus_mapper_close(struct _citrus_mapper *cm) _CITRUS_HASH_REMOVE(cm, cm_entry); free(cm->cm_key); } - if (__isthreaded) - _pthread_mutex_unlock(&lock); mapper_close(cm); - return; quit: - if (__isthreaded) - _pthread_mutex_unlock(&lock); + UNLOCK(&cm_lock); } } @@ -404,9 +394,8 @@ quit: void _citrus_mapper_set_persistent(struct _citrus_mapper * __restrict cm) { - if (__isthreaded) - _pthread_mutex_lock(&lock); + + WLOCK(&cm_lock); cm->cm_refcount = REFCOUNT_PERSISTENT; - if (__isthreaded) - _pthread_mutex_unlock(&lock); + UNLOCK(&cm_lock); } diff --git a/lib/libc/citrus/citrus_mapper.h b/lib/libc/citrus/citrus_mapper.h index 2fe4f67e7f..ea782381f0 100644 --- a/lib/libc/citrus/citrus_mapper.h +++ b/lib/libc/citrus/citrus_mapper.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mapper.h,v 1.3 2003/07/12 15:39:19 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mapper.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_mapper.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mapper.h,v 1.3 2003/07/12 15:39:19 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -36,18 +36,18 @@ struct _citrus_mapper_ops; struct _citrus_mapper_traits; __BEGIN_DECLS -int _citrus_mapper_create_area( - struct _citrus_mapper_area *__restrict *__restrict, - const char *__restrict); -int _citrus_mapper_open(struct _citrus_mapper_area *__restrict, - struct _citrus_mapper *__restrict *__restrict, - const char *__restrict); -int _citrus_mapper_open_direct( - struct _citrus_mapper_area *__restrict, - struct _citrus_mapper *__restrict *__restrict, - const char *__restrict, const char *__restrict); -void _citrus_mapper_close(struct _citrus_mapper *); -void _citrus_mapper_set_persistent(struct _citrus_mapper * __restrict); +int _citrus_mapper_create_area( + struct _citrus_mapper_area *__restrict *__restrict, + const char *__restrict); +int _citrus_mapper_open(struct _citrus_mapper_area *__restrict, + struct _citrus_mapper *__restrict *__restrict, + const char *__restrict); +int _citrus_mapper_open_direct( + struct _citrus_mapper_area *__restrict, + struct _citrus_mapper *__restrict *__restrict, + const char *__restrict, const char *__restrict); +void _citrus_mapper_close(struct _citrus_mapper *); +void _citrus_mapper_set_persistent(struct _citrus_mapper * __restrict); __END_DECLS #include "citrus_mapper_local.h" @@ -77,14 +77,11 @@ __END_DECLS */ static __inline int _citrus_mapper_convert(struct _citrus_mapper * __restrict cm, - _citrus_index_t * __restrict dst, - _citrus_index_t src, - void * __restrict ps) + _citrus_index_t * __restrict dst, _citrus_index_t src, + void * __restrict ps) { - _DIAGASSERT(cm && cm->cm_ops && cm->cm_ops->mo_convert && dst); - - return (*cm->cm_ops->mo_convert)(cm, dst, src, ps); + return ((*cm->cm_ops->mo_convert)(cm, dst, src, ps)); } /* @@ -92,13 +89,10 @@ _citrus_mapper_convert(struct _citrus_mapper * __restrict cm, * initialize the state. */ static __inline void -_citrus_mapper_init_state(struct _citrus_mapper * __restrict cm, - void * __restrict ps) +_citrus_mapper_init_state(struct _citrus_mapper * __restrict cm) { - _DIAGASSERT(cm && cm->cm_ops && cm->cm_ops->mo_init_state); - - (*cm->cm_ops->mo_init_state)(cm, ps); + (*cm->cm_ops->mo_init_state)(); } /* @@ -109,9 +103,7 @@ static __inline size_t _citrus_mapper_get_state_size(struct _citrus_mapper * __restrict cm) { - _DIAGASSERT(cm && cm->cm_traits); - - return cm->cm_traits->mt_state_size; + return (cm->cm_traits->mt_state_size); } /* @@ -122,9 +114,7 @@ static __inline size_t _citrus_mapper_get_src_max(struct _citrus_mapper * __restrict cm) { - _DIAGASSERT(cm && cm->cm_traits); - - return cm->cm_traits->mt_src_max; + return (cm->cm_traits->mt_src_max); } /* @@ -135,9 +125,7 @@ static __inline size_t _citrus_mapper_get_dst_max(struct _citrus_mapper * __restrict cm) { - _DIAGASSERT(cm && cm->cm_traits); - - return cm->cm_traits->mt_dst_max; + return (cm->cm_traits->mt_dst_max); } #endif diff --git a/lib/libc/citrus/citrus_mapper_local.h b/lib/libc/citrus/citrus_mapper_local.h index c0cc06eda4..5ca6f44ccc 100644 --- a/lib/libc/citrus/citrus_mapper_local.h +++ b/lib/libc/citrus/citrus_mapper_local.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_mapper_local.h 250938 2013-05-23 18:07:01Z ed $ */ /* $NetBSD: citrus_mapper_local.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mapper_local.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -30,36 +30,30 @@ #ifndef _CITRUS_MAPPER_LOCAL_H_ #define _CITRUS_MAPPER_LOCAL_H_ -#include "citrus_module.h" - -struct _citrus_mapper; -struct _citrus_mapper_area; -struct _citrus_mapper_ops; -struct _citrus_mapper_traits; - #define _CITRUS_MAPPER_GETOPS_FUNC_BASE(_n_) \ -int _n_(struct _citrus_mapper_ops *, size_t, u_int32_t) +int _n_(struct _citrus_mapper_ops *) #define _CITRUS_MAPPER_GETOPS_FUNC(_n_) \ _CITRUS_MAPPER_GETOPS_FUNC_BASE(_citrus_##_n_##_mapper_getops) #define _CITRUS_MAPPER_DECLS(_m_) \ -static int _citrus_##_m_##_mapper_init \ - (struct _citrus_mapper_area *__restrict, \ - struct _citrus_mapper * __restrict, const char * __restrict, \ - const void * __restrict, size_t, \ - struct _citrus_mapper_traits * __restrict, size_t); \ -static void _citrus_##_m_##_mapper_uninit(struct _citrus_mapper *); \ -static int _citrus_##_m_##_mapper_convert \ - (struct _citrus_mapper * __restrict, \ - _citrus_index_t * __restrict, _citrus_index_t, \ - void * __restrict); \ -static void _citrus_##_m_##_mapper_init_state \ - (struct _citrus_mapper * __restrict, void * __restrict); \ -CITRUS_MODULE(_m_, mapper, _citrus_##_m_##_mapper_getops) +static int _citrus_##_m_##_mapper_init \ + (struct _citrus_mapper_area *__restrict, \ + struct _citrus_mapper * __restrict, \ + const char * __restrict, const void * __restrict, \ + size_t, struct _citrus_mapper_traits * __restrict, \ + size_t); \ +static void _citrus_##_m_##_mapper_uninit( \ + struct _citrus_mapper *); \ +static int _citrus_##_m_##_mapper_convert \ + (struct _citrus_mapper * __restrict, \ + _citrus_index_t * __restrict, _citrus_index_t, \ + void * __restrict); \ +static void _citrus_##_m_##_mapper_init_state \ + (void); #define _CITRUS_MAPPER_DEF_OPS(_m_) \ +extern struct _citrus_mapper_ops _citrus_##_m_##_mapper_ops; \ struct _citrus_mapper_ops _citrus_##_m_##_mapper_ops = { \ - /* mo_abi_version */ _CITRUS_MAPPER_ABI_VERSION, \ /* mo_init */ &_citrus_##_m_##_mapper_init, \ /* mo_uninit */ &_citrus_##_m_##_mapper_uninit, \ /* mo_convert */ &_citrus_##_m_##_mapper_convert, \ @@ -67,48 +61,37 @@ struct _citrus_mapper_ops _citrus_##_m_##_mapper_ops = { \ } typedef _CITRUS_MAPPER_GETOPS_FUNC_BASE((*_citrus_mapper_getops_t)); -typedef int (*_citrus_mapper_init_t)( - struct _citrus_mapper_area *__restrict, - struct _citrus_mapper *__restrict, const char *__restrict, - const void *__restrict, size_t, - struct _citrus_mapper_traits * __restrict, size_t); -typedef void (*_citrus_mapper_uninit_t)(struct _citrus_mapper *); -typedef int (*_citrus_mapper_convert_t)(struct _citrus_mapper * __restrict, - _citrus_index_t * __restrict, - _citrus_index_t, - void * __restrict); -typedef void (*_citrus_mapper_init_state_t)( - struct _citrus_mapper * __restrict, void * __restrict); +typedef int (*_citrus_mapper_init_t)( + struct _citrus_mapper_area *__restrict, + struct _citrus_mapper *__restrict, const char *__restrict, + const void *__restrict, size_t, + struct _citrus_mapper_traits * __restrict, size_t); +typedef void (*_citrus_mapper_uninit_t)(struct _citrus_mapper *); +typedef int (*_citrus_mapper_convert_t)(struct _citrus_mapper * __restrict, + _citrus_index_t * __restrict, _citrus_index_t, void * __restrict); +typedef void (*_citrus_mapper_init_state_t)(void); -/* - * ABI version change log - * 0x00000001 - * initial version - */ -#define _CITRUS_MAPPER_ABI_VERSION 0x00000001 struct _citrus_mapper_ops { - uint32_t mo_abi_version; - /* version 0x00000001 */ - _citrus_mapper_init_t mo_init; - _citrus_mapper_uninit_t mo_uninit; - _citrus_mapper_convert_t mo_convert; - _citrus_mapper_init_state_t mo_init_state; + _citrus_mapper_init_t mo_init; + _citrus_mapper_uninit_t mo_uninit; + _citrus_mapper_convert_t mo_convert; + _citrus_mapper_init_state_t mo_init_state; }; struct _citrus_mapper_traits { /* version 0x00000001 */ - size_t mt_state_size; - size_t mt_src_max; - size_t mt_dst_max; + size_t mt_state_size; + size_t mt_src_max; + size_t mt_dst_max; }; struct _citrus_mapper { struct _citrus_mapper_ops *cm_ops; void *cm_closure; - _citrus_module_t cm_module; + _citrus_module_t cm_module; struct _citrus_mapper_traits *cm_traits; - _CITRUS_HASH_ENTRY(_citrus_mapper) cm_entry; - int cm_refcount; + _CITRUS_HASH_ENTRY(_citrus_mapper) cm_entry; + int cm_refcount; char *cm_key; }; #endif diff --git a/lib/libc/citrus/citrus_memstream.c b/lib/libc/citrus/citrus_memstream.c index 6e7425e219..f3a20b7cb8 100644 --- a/lib/libc/citrus/citrus_memstream.c +++ b/lib/libc/citrus/citrus_memstream.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_memstream.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_memstream.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_memstream.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_memstream.c,v 1.4 2009/02/03 05:02:12 lukem Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,7 +27,8 @@ * SUCH DAMAGE. */ -#include +#include + #include #include #include @@ -40,11 +41,11 @@ const char * _citrus_memory_stream_getln(struct _citrus_memory_stream * __restrict ms, - size_t * __restrict rlen) + size_t * __restrict rlen) { - int i; const uint8_t *h, *p; size_t ret; + int i; if (ms->ms_pos>=_region_size(&ms->ms_region)) return (NULL); @@ -67,15 +68,13 @@ _citrus_memory_stream_getln(struct _citrus_memory_stream * __restrict ms, const char * _citrus_memory_stream_matchline(struct _citrus_memory_stream * __restrict ms, - const char * __restrict key, - size_t * __restrict rlen, - int iscasesensitive) + const char * __restrict key, size_t * __restrict rlen, int iscasesensitive) { const char *p, *q; - size_t len, keylen; + size_t keylen, len; keylen = strlen(key); - while (/*CONSTCOND*/ 1) { + for(;;) { p = _citrus_memory_stream_getln(ms, &len); if (p == NULL) return (NULL); @@ -83,7 +82,7 @@ _citrus_memory_stream_matchline(struct _citrus_memory_stream * __restrict ms, /* ignore comment */ q = memchr(p, T_COMM, len); if (q) { - len = q-p; + len = q - p; } /* ignore trailing white space and newline */ _bcs_trunc_rws_len(p, &len); @@ -94,7 +93,7 @@ _citrus_memory_stream_matchline(struct _citrus_memory_stream * __restrict ms, p = _bcs_skip_ws_len(p, &len); q = _bcs_skip_nonws_len(p, &len); - if ((size_t)(q-p) == keylen) { + if ((size_t)(q - p) == keylen) { if (iscasesensitive) { if (memcmp(key, p, keylen) == 0) break; /* match */ @@ -113,27 +112,27 @@ _citrus_memory_stream_matchline(struct _citrus_memory_stream * __restrict ms, void * _citrus_memory_stream_chr(struct _citrus_memory_stream *ms, - struct _citrus_region *r, char ch) + struct _citrus_region *r, char ch) { - void *head, *chr; + void *chr, *head; size_t sz; if (ms->ms_pos >= _region_size(&ms->ms_region)) - return NULL; + return (NULL); head = _region_offset(&ms->ms_region, ms->ms_pos); chr = memchr(head, ch, _memstream_remainder(ms)); if (chr == NULL) { _region_init(r, head, _memstream_remainder(ms)); ms->ms_pos = _region_size(&ms->ms_region); - return NULL; + return (NULL); } sz = (char *)chr - (char *)head; _region_init(r, head, sz); - ms->ms_pos += sz+1; + ms->ms_pos += sz + 1; - return chr; + return (chr); } void diff --git a/lib/libc/citrus/citrus_memstream.h b/lib/libc/citrus/citrus_memstream.h index 80010d5593..45a701937b 100644 --- a/lib/libc/citrus/citrus_memstream.h +++ b/lib/libc/citrus/citrus_memstream.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_memstream.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_memstream.h,v 1.3 2005/05/14 17:55:42 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_memstream.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -37,33 +37,36 @@ struct _citrus_memory_stream { }; __BEGIN_DECLS -const char * _citrus_memory_stream_getln( - struct _citrus_memory_stream * __restrict, size_t * __restrict); -const char * _citrus_memory_stream_matchline( - struct _citrus_memory_stream * __restrict, const char * __restrict, - size_t * __restrict, int); -void * _citrus_memory_stream_chr(struct _citrus_memory_stream *, - struct _citrus_region *, char); +const char *_citrus_memory_stream_getln( + struct _citrus_memory_stream * __restrict, + size_t * __restrict); +const char *_citrus_memory_stream_matchline( + struct _citrus_memory_stream * __restrict, + const char * __restrict, size_t * __restrict, int); +void *_citrus_memory_stream_chr(struct _citrus_memory_stream *, + struct _citrus_region *, char); void _citrus_memory_stream_skip_ws(struct _citrus_memory_stream *); __END_DECLS static __inline int _citrus_memory_stream_iseof(struct _citrus_memory_stream *ms) { - return ms->ms_pos >= _citrus_region_size(&ms->ms_region); + + return (ms->ms_pos >= _citrus_region_size(&ms->ms_region)); } static __inline void _citrus_memory_stream_bind(struct _citrus_memory_stream * __restrict ms, - const struct _citrus_region * __restrict r) + const struct _citrus_region * __restrict r) { + ms->ms_region = *r; ms->ms_pos = 0; } static __inline void _citrus_memory_stream_bind_ptr(struct _citrus_memory_stream * __restrict ms, - void *ptr, size_t sz) + void *ptr, size_t sz) { struct _citrus_region r; @@ -74,61 +77,69 @@ _citrus_memory_stream_bind_ptr(struct _citrus_memory_stream * __restrict ms, static __inline void _citrus_memory_stream_rewind(struct _citrus_memory_stream *ms) { + ms->ms_pos = 0; } static __inline size_t _citrus_memory_stream_tell(struct _citrus_memory_stream *ms) { - return ms->ms_pos; + + return (ms->ms_pos); } static __inline size_t _citrus_memory_stream_remainder(struct _citrus_memory_stream *ms) { size_t sz; + sz = _citrus_region_size(&ms->ms_region); if (ms->ms_pos>sz) - return 0; - return sz-ms->ms_pos; + return (0); + return (sz-ms->ms_pos); } static __inline int _citrus_memory_stream_seek(struct _citrus_memory_stream *ms, size_t pos, int w) { - size_t sz = _citrus_region_size(&ms->ms_region); + size_t sz; + + sz = _citrus_region_size(&ms->ms_region); + switch (w) { case SEEK_SET: - if (pos>=sz) - return -1; + if (pos >= sz) + return (-1); ms->ms_pos = pos; break; case SEEK_CUR: pos += (ssize_t)ms->ms_pos; - if (pos>=sz) - return -1; + if (pos >= sz) + return (-1); ms->ms_pos = pos; break; case SEEK_END: - if (szms_pos = sz - pos; break; } - return 0; + return (0); } static __inline int _citrus_memory_stream_getc(struct _citrus_memory_stream *ms) { + if (_citrus_memory_stream_iseof(ms)) return (EOF); - return _citrus_region_peek8(&ms->ms_region, ms->ms_pos++); + return (_citrus_region_peek8(&ms->ms_region, ms->ms_pos++)); } static __inline void _citrus_memory_stream_ungetc(struct _citrus_memory_stream *ms, int ch) { + if (ch != EOF && ms->ms_pos > 0) ms->ms_pos--; } @@ -136,26 +147,27 @@ _citrus_memory_stream_ungetc(struct _citrus_memory_stream *ms, int ch) static __inline int _citrus_memory_stream_peek(struct _citrus_memory_stream *ms) { + if (_citrus_memory_stream_iseof(ms)) return (EOF); - return _citrus_region_peek8(&ms->ms_region, ms->ms_pos); + return (_citrus_region_peek8(&ms->ms_region, ms->ms_pos)); } static __inline void * _citrus_memory_stream_getregion(struct _citrus_memory_stream *ms, - struct _citrus_region *r, size_t sz) + struct _citrus_region *r, size_t sz) { void *ret; if (ms->ms_pos + sz > _citrus_region_size(&ms->ms_region)) - return NULL; + return (NULL); ret = _citrus_region_offset(&ms->ms_region, ms->ms_pos); ms->ms_pos += sz; if (r) _citrus_region_init(r, ret, sz); - return ret; + return (ret); } static __inline int @@ -163,12 +175,12 @@ _citrus_memory_stream_get8(struct _citrus_memory_stream *ms, uint8_t *rval) { if (ms->ms_pos + 1 > _citrus_region_size(&ms->ms_region)) - return -1; + return (-1); *rval = _citrus_region_peek8(&ms->ms_region, ms->ms_pos); ms->ms_pos += 2; - return 0; + return (0); } static __inline int @@ -176,12 +188,12 @@ _citrus_memory_stream_get16(struct _citrus_memory_stream *ms, uint16_t *rval) { if (ms->ms_pos + 2 > _citrus_region_size(&ms->ms_region)) - return -1; + return (-1); *rval = _citrus_region_peek16(&ms->ms_region, ms->ms_pos); ms->ms_pos += 2; - return 0; + return (0); } static __inline int @@ -189,26 +201,26 @@ _citrus_memory_stream_get32(struct _citrus_memory_stream *ms, uint32_t *rval) { if (ms->ms_pos + 4 > _citrus_region_size(&ms->ms_region)) - return -1; + return (-1); *rval = _citrus_region_peek32(&ms->ms_region, ms->ms_pos); ms->ms_pos += 4; - return 0; + return (0); } static __inline int _citrus_memory_stream_getln_region(struct _citrus_memory_stream *ms, - struct _citrus_region *r) + struct _citrus_region *r) { const char *ptr; size_t sz; ptr = _citrus_memory_stream_getln(ms, &sz); if (ptr) - _citrus_region_init(r, __DECONST(char *, ptr), sz); + _citrus_region_init(r, __DECONST(void *, ptr), sz); - return ptr == NULL; + return (ptr == NULL); } #endif diff --git a/lib/libc/citrus/citrus_mmap.c b/lib/libc/citrus/citrus_mmap.c index ede0b19b26..5da4c25cf6 100644 --- a/lib/libc/citrus/citrus_mmap.c +++ b/lib/libc/citrus/citrus_mmap.c @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mmap.c,v 1.3 2005/01/19 00:52:37 mycroft Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mmap.c,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_mmap.c 244350 2012-12-17 10:38:51Z jilles $ */ +/* $NetBSD: citrus_mmap.c,v 1.3 2005/01/19 00:52:37 mycroft Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,9 +27,11 @@ * SUCH DAMAGE. */ -#include +#include #include +#include #include + #include #include #include @@ -47,20 +49,16 @@ int _citrus_map_file(struct _citrus_region * __restrict r, const char * __restrict path) { - int fd, ret = 0; struct stat st; void *head; + int fd, ret; - _DIAGASSERT(r != NULL); + ret = 0; _region_init(r, NULL, 0); - if ((fd = open(path, O_RDONLY)) == -1) - return errno; - if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { - ret = errno; - goto error; - } + if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) + return (errno); if (fstat(fd, &st) == -1) { ret = errno; @@ -80,17 +78,16 @@ _citrus_map_file(struct _citrus_region * __restrict r, _region_init(r, head, (size_t)st.st_size); error: - close(fd); - return ret; + (void)close(fd); + return (ret); } void _citrus_unmap_file(struct _citrus_region *r) { - _DIAGASSERT(r != NULL); if (_region_head(r) != NULL) { - munmap(_region_head(r), _region_size(r)); + (void)munmap(_region_head(r), _region_size(r)); _region_init(r, NULL, 0); } } diff --git a/lib/libc/citrus/citrus_mmap.h b/lib/libc/citrus/citrus_mmap.h index 03d995ffda..b8d70f2eb4 100644 --- a/lib/libc/citrus/citrus_mmap.h +++ b/lib/libc/citrus/citrus_mmap.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_mmap.h,v 1.1 2003/06/25 09:51:38 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_mmap.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_mmap.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_mmap.h,v 1.1 2003/06/25 09:51:38 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -32,9 +32,9 @@ #define _CITRUS_MMAP_H_ __BEGIN_DECLS -int _citrus_map_file(struct _citrus_region * __restrict, - const char * __restrict); -void _citrus_unmap_file(struct _citrus_region *); +int _citrus_map_file(struct _citrus_region * __restrict, + const char * __restrict); +void _citrus_unmap_file(struct _citrus_region *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_module.c b/lib/libc/citrus/citrus_module.c index 672e43a585..b48eb68960 100644 --- a/lib/libc/citrus/citrus_module.c +++ b/lib/libc/citrus/citrus_module.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_module.c,v 1.5 2005/11/29 03:11:58 christos Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_module.c,v 1.5 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_module.c 228843 2011-12-23 15:00:37Z cperciva $ */ +/* $NetBSD: citrus_module.c,v 1.9 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c)1999, 2000, 2001, 2002 Citrus Project, @@ -42,13 +42,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -95,28 +88,32 @@ * SUCH DAMAGE. */ +#include +#include + #include +#include +#include #include #include -#include +#include +#include +#include #include #include +#include #include -#include -#include -#include -#include -#include "citrus_module.h" -#include -#include -#include +#define I18NMODULE_MAJOR 2 -#ifdef __PIC__ +#include "citrus_namespace.h" +#include "citrus_bcs.h" +#include "citrus_module.h" +#include "libc_private.h" -static int _getdewey(int [], char *); -static int _cmpndewey(int [], int, int [], int); -static const char *_findshlib(char *, int *, int *); +static int _getdewey(int[], char *); +static int _cmpndewey(int[], int, int[], int); +static const char *_findshlib(char *, int *, int *); static const char *_pathI18nModule = NULL; @@ -128,10 +125,7 @@ static const char *_pathI18nModule = NULL; static int _getdewey(int dewey[], char *cp) { - int i, n; - - _DIAGASSERT(dewey != NULL); - _DIAGASSERT(cp != NULL); + int i, n; for (n = 0, i = 0; i < MAXDEWEY; i++) { if (*cp == '\0') @@ -139,12 +133,12 @@ _getdewey(int dewey[], char *cp) if (*cp == '.') cp++; if (*cp < '0' || '9' < *cp) - return 0; + return (0); - dewey[n++] = (int)strtol(cp, &cp, 10); + dewey[n++] = (int)_bcs_strtol(cp, &cp, 10); } - return n; + return (n); } /* @@ -156,49 +150,38 @@ _getdewey(int dewey[], char *cp) static int _cmpndewey(int d1[], int n1, int d2[], int n2) { - int i; - - _DIAGASSERT(d1 != NULL); - _DIAGASSERT(d2 != NULL); + int i; for (i = 0; i < n1 && i < n2; i++) { if (d1[i] < d2[i]) - return -1; + return (-1); if (d1[i] > d2[i]) - return 1; + return (1); } if (n1 == n2) - return 0; + return (0); if (i == n1) - return -1; + return (-1); if (i == n2) - return 1; + return (1); - /* XXX cannot happen */ - return 0; + /* cannot happen */ + return (0); } static const char * _findshlib(char *name, int *majorp, int *minorp) { - int dewey[MAXDEWEY]; - int ndewey; - int tmp[MAXDEWEY]; - int i; - int len; - char *lname; - static char path[PATH_MAX]; - int major, minor; - const char *search_dirs[1]; - const int n_search_dirs = 1; - - _DIAGASSERT(name != NULL); - _DIAGASSERT(majorp != NULL); - _DIAGASSERT(minorp != NULL); + char *lname; + const char *search_dirs[1]; + static char path[PATH_MAX]; + int dewey[MAXDEWEY], tmp[MAXDEWEY]; + int i, len, major, minor, ndewey, n_search_dirs; + n_search_dirs = 1; major = *majorp; minor = *minorp; path[0] = '\0'; @@ -209,16 +192,15 @@ _findshlib(char *name, int *majorp, int *minorp) ndewey = 0; for (i = 0; i < n_search_dirs; i++) { - DIR *dd = opendir(search_dirs[i]); - struct dirent *dp; - int found_dot_a = 0; - int found_dot_so = 0; + struct dirent *dp; + DIR *dd = opendir(search_dirs[i]); + int found_dot_a = 0, found_dot_so = 0; if (dd == NULL) - continue; + break; while ((dp = readdir(dd)) != NULL) { - int n; + int n; if (dp->d_namlen < len + 4) continue; @@ -235,9 +217,9 @@ _findshlib(char *name, int *majorp, int *minorp) /* XXX should verify the library is a.out/ELF? */ - if (major == -1 && minor == -1) { + if (major == -1 && minor == -1) goto compare_version; - } else if (major != -1 && minor == -1) { + else if (major != -1 && minor == -1) { if (tmp[0] == major) goto compare_version; } else if (major != -1 && minor != -1) { @@ -270,26 +252,23 @@ _findshlib(char *name, int *majorp, int *minorp) /* * There's a lib in this dir; take it. */ - return path[0] ? path : NULL; + return (path[0] ? path : NULL); } - return path[0] ? path : NULL; + return (path[0] ? path : NULL); } void * _citrus_find_getops(_citrus_module_t handle, const char *modname, - const char *ifname) + const char *ifname) { char name[PATH_MAX]; void *p; - _DIAGASSERT(handle != NULL); - _DIAGASSERT(modname != NULL); - _DIAGASSERT(ifname != NULL); - - snprintf(name, sizeof(name), "_citrus_%s_%s_getops", modname, ifname); + snprintf(name, sizeof(name), "_citrus_%s_%s_getops", + modname, ifname); p = dlsym((void *)handle, name); - return p; + return (p); } int @@ -297,30 +276,30 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname) { const char *p; char path[PATH_MAX]; - int maj, min; void *handle; - - _DIAGASSERT(rhandle != NULL); + int maj, min; if (_pathI18nModule == NULL) { p = getenv("PATH_I18NMODULE"); if (p != NULL && !issetugid()) { _pathI18nModule = strdup(p); if (_pathI18nModule == NULL) - return ENOMEM; + return (ENOMEM); } else _pathI18nModule = _PATH_I18NMODULE; } - snprintf(path, sizeof(path), "lib%s", encname); + (void)snprintf(path, sizeof(path), "lib%s", encname); maj = I18NMODULE_MAJOR; min = -1; p = _findshlib(path, &maj, &min); if (!p) return (EINVAL); - handle = dlopen(p, RTLD_LAZY); - if (!handle) + handle = libc_dlopen(p, RTLD_LAZY); + if (!handle) { + printf("%s", dlerror()); return (EINVAL); + } *rhandle = (_citrus_module_t)handle; @@ -330,187 +309,7 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname) void _citrus_unload_module(_citrus_module_t handle) { + if (handle) dlclose((void *)handle); } -#elif defined(_I18N_STATIC) -/* - * Compiled-in multibyte locale support for statically linked programs. - */ -#include "citrus_ctype.h" -#include "sys/queue.h" -#include "citrus_types.h" -#include "citrus_hash.h" -#include "citrus_namespace.h" -#include "citrus_region.h" -#include "citrus_iconv_local.h" -#include "citrus_mapper_local.h" -#include "citrus_stdenc_local.h" -#include "modules/citrus_mapper_serial.h" -#include "modules/citrus_mapper_std.h" -#include "modules/citrus_mapper_none.h" -#include "modules/citrus_iconv_std.h" -#include "modules/citrus_utf1632.h" - -#ifdef _I18N_STATIC_BIG5 -#include "modules/citrus_big5.h" -#endif -#ifdef _I18N_STATIC_EUC -#include "modules/citrus_euc.h" -#endif -#ifdef _I18N_STATIC_EUCTW -#include "modules/citrus_euctw.h" -#endif -#ifdef _I18N_STATIC_ISO2022 -#include "modules/citrus_iso2022.h" -#endif -#ifdef _I18N_STATIC_MSKanji -#include "modules/citrus_mskanji.h" -#endif -#ifdef _I18N_STATIC_UTF8 -#include "modules/citrus_utf8.h" -#endif - -#define _CITRUS_GETOPS_FUNC(_m_, _if_) _citrus_##_m_##_##_if_##_getops -/* only ctype is supported */ -#define _CITRUS_LOCALE_TABLE_ENTRY(_n_) \ -{ #_n_, "ctype", _CITRUS_GETOPS_FUNC(_n_, ctype) } - -#define _CITRUS_MODULE_TABLE_ENTRY(_n_, _if_) \ -{ #_n_, #_if_, _CITRUS_GETOPS_FUNC(_n_, _if_) } -/* - * Table of compiled-in modules. - */ -struct citrus_metadata module_table[] = { - _CITRUS_MODULE_TABLE_ENTRY(iconv_std, iconv), - _CITRUS_MODULE_TABLE_ENTRY(mapper_std, mapper), - _CITRUS_MODULE_TABLE_ENTRY(mapper_serial, mapper), - _CITRUS_MODULE_TABLE_ENTRY(mapper_none, mapper), - _CITRUS_MODULE_TABLE_ENTRY(UTF1632, stdenc), -#ifdef _I18N_STATIC_BIG5 - _CITRUS_LOCALE_TABLE_ENTRY(BIG5), -#endif -#ifdef _I18N_STATIC_EUC - _CITRUS_LOCALE_TABLE_ENTRY(EUC), -#endif -#ifdef _I18N_STATIC_EUCTW - _CITRUS_LOCALE_TABLE_ENTRY(EUCTW), -#endif -#ifdef _I18N_STATIC_ISO2022 - _CITRUS_LOCALE_TABLE_ENTRY(ISO2022), -#endif -#ifdef _I18N_STATIC_MSKanji - _CITRUS_LOCALE_TABLE_ENTRY(MSKanji), -#endif -#ifdef _I18N_STATIC_UTF8 - _CITRUS_LOCALE_TABLE_ENTRY(UTF8), -#endif - { NULL, NULL, NULL }, -}; - -SET_DECLARE(citrus_set, struct citrus_metadata); - -DATA_SET(citrus_set, module_table); - -#define MAGIC_HANDLE (void *)(0xC178C178) - -void * -/*ARGSUSED*/ -_citrus_find_getops(_citrus_module_t handle __unused, const char *modname, - const char *ifname) -{ - struct citrus_metadata **mdp, *mod; - - SET_FOREACH(mdp, citrus_set) { - mod = *mdp; - if (mod == NULL || mod->module_name == NULL || mod->interface_name == NULL) - continue; - if (strcmp(mod->module_name, modname) != 0) - continue; - if (strcmp(mod->interface_name, ifname) != 0) - continue; - return(mod->module_ops); - } - return (NULL); -} - -int -/*ARGSUSED*/ -_citrus_load_module(_citrus_module_t *rhandle, char const *modname) -{ - struct citrus_metadata **mdp, *mod; - - SET_FOREACH(mdp, citrus_set) { - mod = *mdp; - if (mod == NULL || mod->module_name == NULL) - continue; - if (strcmp(mod->module_name, modname) != 0) - continue; - *rhandle = (_citrus_module_t)mod; - return(0); - } - return (EINVAL); -} - -void -/*ARGSUSED*/ -_citrus_unload_module(_citrus_module_t handle __unused) -{ -} -#else -SET_DECLARE(citrus_set, struct citrus_metadata); - -struct citrus_metadata empty = { - NULL, NULL, NULL -}; - -DATA_SET(citrus_set, empty); - -#define MAGIC_HANDLE (void *)(0xC178C178) - -void * -/*ARGSUSED*/ -_citrus_find_getops(_citrus_module_t handle __unused, const char *modname, - const char *ifname) -{ - struct citrus_metadata **mdp, *mod; - - _DIAGASSERT(handle == MAGIC_HANDLE); - - SET_FOREACH(mdp, citrus_set) { - mod = *mdp; - if (mod == NULL || mod->module_name == NULL || mod->interface_name == NULL) - continue; - if (strcmp(mod->module_name, modname) != 0) - continue; - if (strcmp(mod->interface_name, ifname) != 0) - continue; - return(mod->module_ops); - } - return (NULL); -} - -int -/*ARGSUSED*/ -_citrus_load_module(_citrus_module_t *rhandle, char const *modname) -{ - struct citrus_metadata **mdp, *mod; - - SET_FOREACH(mdp, citrus_set) { - mod = *mdp; - if (mod == NULL || mod->module_name == NULL) - continue; - if (strcmp(mod->module_name, modname) != 0) - continue; - *rhandle = MAGIC_HANDLE; - return(0); - } - return (EINVAL); -} - -void -/*ARGSUSED*/ -_citrus_unload_module(_citrus_module_t handle __unused) -{ -} -#endif diff --git a/lib/libc/citrus/citrus_module.h b/lib/libc/citrus/citrus_module.h index 89a77d4892..2b5f4de0fe 100644 --- a/lib/libc/citrus/citrus_module.h +++ b/lib/libc/citrus/citrus_module.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_module.h,v 1.1 2002/03/17 22:14:20 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_module.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_module.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_module.h,v 1.1 2002/03/17 22:14:20 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -31,39 +31,24 @@ #ifndef _CITRUS_MODULE_H_ #define _CITRUS_MODULE_H_ -#include - -struct citrus_metadata { - const char *module_name; - const char *interface_name; - void *module_ops; -}; - -#ifdef __PIC__ -#define CITRUS_MODULE(name, interface, ops) -#else - -#define CITRUS_MODULE(name, interface, ops) \ -static const char __citrus_module_ ## name ## _ ## interface ## _str[] = \ - #name; \ -static struct citrus_metadata \ - __citrus_module_ ## name ## _ ## interface = { \ - __citrus_module_ ## name ## _ ##interface ## _str, \ - #interface, ops \ -}; \ -__weak_reference(__citrus_module_ ## name ## _ ## interface ## _str, \ - _citrus_module_ ## name); \ -DATA_SET(citrus_set, __citrus_module_ ## name ## _ ## interface); -#endif +#define MATCH(x, act) \ +do { \ + if (lenvar >= (sizeof(#x)-1) && \ + _bcs_strncasecmp(p, #x, sizeof(#x)-1) == 0) { \ + act; \ + lenvar -= sizeof(#x)-1; \ + p += sizeof(#x)-1; \ + } \ +} while (0) typedef struct _citrus_module_rec *_citrus_module_t; __BEGIN_DECLS -void *_citrus_find_getops(_citrus_module_t __restrict, - const char * __restrict, const char * __restrict); -int _citrus_load_module(_citrus_module_t * __restrict, - const char * __restrict); -void _citrus_unload_module(_citrus_module_t); +void *_citrus_find_getops(_citrus_module_t __restrict, + const char * __restrict, const char * __restrict); +int _citrus_load_module(_citrus_module_t * __restrict, + const char * __restrict); +void _citrus_unload_module(_citrus_module_t); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_namespace.h b/lib/libc/citrus/citrus_namespace.h index 878e95081b..d645032a2c 100644 --- a/lib/libc/citrus/citrus_namespace.h +++ b/lib/libc/citrus/citrus_namespace.h @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_namespace.h,v 1.6 2005/10/29 18:02:04 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_namespace.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_namespace.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_namespace.h,v 1.8 2009/01/11 02:46:24 christos Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "citrus_bcs.h" + #ifndef _CITRUS_NAMESPACE_H_ #define _CITRUS_NAMESPACE_H_ @@ -57,6 +59,8 @@ #define _bcs_trunc_rws_len _citrus_bcs_trunc_rws_len #define _bcs_convert_to_lower _citrus_bcs_convert_to_lower #define _bcs_convert_to_upper _citrus_bcs_convert_to_upper +#define _bcs_strtol _citrus_bcs_strtol +#define _bcs_strtoul _citrus_bcs_strtoul #endif /* _CITRUS_BCS_NO_NAMESPACE */ /* citrus_csmapper */ diff --git a/lib/libc/citrus/citrus_none.c b/lib/libc/citrus/citrus_none.c index 2a44a26000..19c0a3a0fd 100644 --- a/lib/libc/citrus/citrus_none.c +++ b/lib/libc/citrus/citrus_none.c @@ -1,7 +1,9 @@ -/* $NetBSD: citrus_none.c,v 1.17 2005/12/02 11:14:20 yamt Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_none.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: citrus_none.c,v 1.18 2008/06/14 16:01:07 tnozaki Exp $ */ /*- - * Copyright (c)2002 Citrus Project, + * Copyright (c) 2002 Citrus Project, + * Copyright (c) 2010 Gabor Kovesdan , * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,350 +28,24 @@ * SUCH DAMAGE. */ +#include +#include + #include #include -#include +#include +#include #include #include -#include -#include +#include #include -#include #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_ctype.h" #include "citrus_none.h" #include "citrus_stdenc.h" -/* ---------------------------------------------------------------------- */ -static int -_citrus_NONE_ctype_getops(_citrus_ctype_ops_rec_t *, size_t, uint32_t); -static int -_citrus_NONE_stdenc_getops(struct _citrus_stdenc_ops *, size_t, uint32_t); - -_CITRUS_CTYPE_DECLS(NONE); -_CITRUS_CTYPE_DEF_OPS(NONE); - - -/* ---------------------------------------------------------------------- */ - -static int -_citrus_NONE_ctype_getops(_citrus_ctype_ops_rec_t *ops, size_t lenops, - uint32_t expected_version) -{ - if (expected_version<_CITRUS_CTYPE_ABI_VERSION || lenops0 value */ - - cnt = 0; - s0 = *s; /* to keep *s unchanged for now, use copy instead. */ - while (n > 0) { - if (pwcs != NULL) { - *pwcs = (wchar_t)(unsigned char)*s0; - } - if (*s0 == '\0') { - s0 = NULL; - break; - } - s0++; - if (pwcs != NULL) { - pwcs++; - n--; - } - cnt++; - } - if (pwcs) - *s = s0; - - *nresult = (size_t)cnt; - - return (0); -} - -static int -_citrus_NONE_ctype_mbstowcs(void * __restrict cl, wchar_t * __restrict wcs, - const char * __restrict s, size_t n, - size_t * __restrict nresult) -{ - const char *tmp_s = __DEQUALIFY(const char *, s); - - return (_citrus_NONE_ctype_mbsrtowcs(cl, wcs, &tmp_s, n, NULL, nresult)); -} - -static int -/*ARGSUSED*/ -_citrus_NONE_ctype_mbtowc(void * __restrict cl __unused, - wchar_t * __restrict pwc, - const char * __restrict s, size_t n, - int * __restrict nresult) -{ - - if (s == NULL) { - *nresult = 0; /* state independent */ - return (0); - } - if (n == 0) { - return (EILSEQ); - } - if (pwc == NULL) { - if (*s == '\0') { - *nresult = 0; - } else { - *nresult = 1; - } - return (0); - } - - *pwc = (wchar_t)(unsigned char)*s; - *nresult = *s == '\0' ? 0 : 1; - - return (0); -} - -static int -/*ARGSUSED*/ -_citrus_NONE_ctype_wcrtomb(void * __restrict cl __unused, - char * __restrict s, wchar_t wc, - void * __restrict pspriv __unused, - size_t * __restrict nresult) -{ - if ((wc&~0xFFU) != 0) { - *nresult = (size_t)-1; - return (EILSEQ); - } - - *nresult = 1; - if (s!=NULL) - *s = (char)wc; - - return (0); -} - -static int -/*ARGSUSED*/ -_citrus_NONE_ctype_wcsrtombs(void * __restrict cl __unused, - char * __restrict s, - const wchar_t ** __restrict pwcs, size_t n, - void * __restrict pspriv __unused, - size_t * __restrict nresult) -{ - size_t count; - const wchar_t *pwcs0; - - pwcs0 = *pwcs; - count = 0; - - if (s == NULL) - n = 1; - - while (n > 0) { - if ((*pwcs0 & ~0xFFU) != 0) { - *nresult = (size_t)-1; - return (EILSEQ); - } - if (s != NULL) { - *s++ = (char)*pwcs0; - n--; - } - if (*pwcs0 == L'\0') { - pwcs0 = NULL; - break; - } - count++; - pwcs0++; - } - if (s != NULL) - *pwcs = pwcs0; - - *nresult = count; - - return (0); -} - -static int -_citrus_NONE_ctype_wcstombs(void * __restrict cl, char * __restrict s, - const wchar_t * __restrict pwcs, size_t n, - size_t * __restrict nresult) -{ - const wchar_t *tmp_pwcs = __DEQUALIFY(const wchar_t *, pwcs); - - return (_citrus_NONE_ctype_wcsrtombs(cl, s, &tmp_pwcs, n, NULL, nresult)); -} - -static int -_citrus_NONE_ctype_wctomb(void * __restrict cl, char * __restrict s, - wchar_t wc, int * __restrict nresult) -{ - int ret; - size_t nr; - - if (s == NULL) { - /* - * initialize state here. - * (nothing to do for us.) - */ - *nresult = 0; /* we're state independent */ - return (0); - } - - ret = _citrus_NONE_ctype_wcrtomb(cl, s, wc, NULL, &nr); - *nresult = (int)nr; - - return (ret); -} - -static int -/*ARGSUSED*/ -_citrus_NONE_ctype_btowc(_citrus_ctype_rec_t * __restrict cc __unused, - int c, wint_t * __restrict wcresult) -{ - if (c == EOF || c & ~0xFF) - *wcresult = WEOF; - else - *wcresult = (wint_t)c; - return (0); -} - -static int -/*ARGSUSED*/ -_citrus_NONE_ctype_wctob(_citrus_ctype_rec_t * __restrict cc __unused, - wint_t wc, int * __restrict cresult) -{ - if (wc == WEOF || wc & ~0xFF) - *cresult = EOF; - else - *cresult = (int)wc; - return (0); -} - -/* ---------------------------------------------------------------------- */ - _CITRUS_STDENC_DECLS(NONE); _CITRUS_STDENC_DEF_OPS(NONE); struct _citrus_stdenc_traits _citrus_NONE_stdenc_traits = { @@ -378,10 +54,9 @@ struct _citrus_stdenc_traits _citrus_NONE_stdenc_traits = { }; static int -/*ARGSUSED*/ _citrus_NONE_stdenc_init(struct _citrus_stdenc * __restrict ce, - const void *var __unused, size_t lenvar __unused, - struct _citrus_stdenc_traits * __restrict et) + const void *var __unused, size_t lenvar __unused, + struct _citrus_stdenc_traits * __restrict et) { et->et_state_size = 0; @@ -393,30 +68,26 @@ _citrus_NONE_stdenc_init(struct _citrus_stdenc * __restrict ce, } static void -/*ARGSUSED*/ _citrus_NONE_stdenc_uninit(struct _citrus_stdenc *ce __unused) { + } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_init_state(struct _citrus_stdenc * __restrict ce __unused, - void * __restrict ps __unused) + void * __restrict ps __unused) { + return (0); } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_mbtocs(struct _citrus_stdenc * __restrict ce __unused, - _csid_t *csid, _index_t *idx, - const char **s, size_t n, - void *ps __unused, size_t *nresult) + _citrus_csid_t *csid, _citrus_index_t *idx, const char **s, size_t n, + void *ps __unused, size_t *nresult, struct iconv_hooks *hooks) { - _DIAGASSERT(csid != NULL && idx != NULL); - - if (n<1) { + if (n < 1) { *nresult = (size_t)-2; return (0); } @@ -425,42 +96,74 @@ _citrus_NONE_stdenc_mbtocs(struct _citrus_stdenc * __restrict ce __unused, *idx = (_index_t)(unsigned char)*(*s)++; *nresult = *idx == 0 ? 0 : 1; + if ((hooks != NULL) && (hooks->uc_hook != NULL)) + hooks->uc_hook((unsigned int)*idx, hooks->data); + return (0); } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __restrict ce __unused, - char *s, size_t n, - _csid_t csid, _index_t idx, - void *ps __unused, size_t *nresult) + char *s, size_t n, _csid_t csid, _index_t idx, void *ps __unused, + size_t *nresult, struct iconv_hooks *hooks __unused) { if (csid == _CITRUS_CSID_INVALID) { *nresult = 0; return (0); } - if (n<1) { - *nresult = (size_t)-1; - return (E2BIG); - } - if (csid != 0 || (idx&0xFF) != idx) + if (csid != 0) return (EILSEQ); - *s = (char)idx; - *nresult = 1; - + if ((idx & 0x000000FF) == idx) { + if (n < 1) { + *nresult = (size_t)-1; + return (E2BIG); + } + *s = (char)idx; + *nresult = 1; + } else if ((idx & 0x0000FFFF) == idx) { + if (n < 2) { + *nresult = (size_t)-1; + return (E2BIG); + } + s[0] = (char)idx; + /* XXX: might be endian dependent */ + s[1] = (char)(idx >> 8); + *nresult = 2; + } else if ((idx & 0x00FFFFFF) == idx) { + if (n < 3) { + *nresult = (size_t)-1; + return (E2BIG); + } + s[0] = (char)idx; + /* XXX: might be endian dependent */ + s[1] = (char)(idx >> 8); + s[2] = (char)(idx >> 16); + *nresult = 3; + } else { + if (n < 3) { + *nresult = (size_t)-1; + return (E2BIG); + } + s[0] = (char)idx; + /* XXX: might be endian dependent */ + s[1] = (char)(idx >> 8); + s[2] = (char)(idx >> 16); + s[3] = (char)(idx >> 24); + *nresult = 4; + } + return (0); } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_mbtowc(struct _citrus_stdenc * __restrict ce __unused, - _wc_t * __restrict pwc, - const char ** __restrict s, size_t n, - void * __restrict pspriv __unused, - size_t * __restrict nresult) + _wc_t * __restrict pwc, const char ** __restrict s, size_t n, + void * __restrict pspriv __unused, size_t * __restrict nresult, + struct iconv_hooks *hooks) { + if (s == NULL) { *nresult = 0; return (0); @@ -474,39 +177,40 @@ _citrus_NONE_stdenc_mbtowc(struct _citrus_stdenc * __restrict ce __unused, *pwc = (_wc_t)(unsigned char) **s; *nresult = *s == '\0' ? 0 : 1; + + if ((hooks != NULL) && (hooks->wc_hook != NULL)) + hooks->wc_hook(*pwc, hooks->data); + return (0); } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused, - char * __restrict s, size_t n, _wc_t wc, - void * __restrict pspriv __unused, - size_t * __restrict nresult) + char * __restrict s, size_t n, _wc_t wc, + void * __restrict pspriv __unused, size_t * __restrict nresult, + struct iconv_hooks *hooks __unused) { - if ((wc&~0xFFU) != 0) { + + if ((wc & ~0xFFU) != 0) { *nresult = (size_t)-1; return (EILSEQ); } - if (n==0) { + if (n == 0) { *nresult = (size_t)-1; return (E2BIG); } *nresult = 1; - if (s!=NULL && n>0) + if (s != NULL && n > 0) *s = (char)wc; return (0); } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_put_state_reset(struct _citrus_stdenc * __restrict ce __unused, - char * __restrict s __unused, - size_t n __unused, - void * __restrict pspriv __unused, - size_t * __restrict nresult) + char * __restrict s __unused, size_t n __unused, + void * __restrict pspriv __unused, size_t * __restrict nresult) { *nresult = 0; @@ -515,11 +219,9 @@ _citrus_NONE_stdenc_put_state_reset(struct _citrus_stdenc * __restrict ce __unus } static int -/*ARGSUSED*/ _citrus_NONE_stdenc_get_state_desc(struct _stdenc * __restrict ce __unused, - void * __restrict ps __unused, - int id, - struct _stdenc_state_desc * __restrict d) + void * __restrict ps __unused, int id, + struct _stdenc_state_desc * __restrict d) { int ret = 0; @@ -531,5 +233,5 @@ _citrus_NONE_stdenc_get_state_desc(struct _stdenc * __restrict ce __unused, ret = EOPNOTSUPP; } - return ret; + return (ret); } diff --git a/lib/libc/citrus/citrus_none.h b/lib/libc/citrus/citrus_none.h index ac835423d3..532d84b629 100644 --- a/lib/libc/citrus/citrus_none.h +++ b/lib/libc/citrus/citrus_none.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_none.h,v 1.3 2003/06/25 09:51:38 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_none.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_none.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_none.h,v 1.3 2003/06/25 09:51:38 tshiozak Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -30,8 +30,7 @@ #ifndef _CITRUS_NONE_H_ #define _CITRUS_NONE_H_ -extern struct _citrus_ctype_ops_rec _citrus_NONE_ctype_ops; -extern struct _citrus_stdenc_ops _citrus_NONE_stdenc_ops; -extern struct _citrus_stdenc_traits _citrus_NONE_stdenc_traits; +extern struct _citrus_stdenc_ops _citrus_NONE_stdenc_ops; +extern struct _citrus_stdenc_traits _citrus_NONE_stdenc_traits; #endif diff --git a/lib/libc/citrus/citrus_pivot_factory.c b/lib/libc/citrus/citrus_pivot_factory.c index 5f09b12f98..e33579c039 100644 --- a/lib/libc/citrus/citrus_pivot_factory.c +++ b/lib/libc/citrus/citrus_pivot_factory.c @@ -1,5 +1,5 @@ -/* $NetBSD: citrus_pivot_factory.c,v 1.6 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_pivot_factory.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_pivot_factory.c 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_pivot_factory.c,v 1.7 2009/04/12 14:20:19 lukem Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,8 +27,9 @@ * SUCH DAMAGE. */ -#include +#include #include + #include #include #include @@ -46,9 +47,9 @@ #include "citrus_pivot_factory.h" struct src_entry { - char *se_name; - struct _citrus_db_factory *se_df; - STAILQ_ENTRY(src_entry) se_entry; + char *se_name; + struct _citrus_db_factory *se_df; + STAILQ_ENTRY(src_entry) se_entry; }; STAILQ_HEAD(src_head, src_entry); @@ -61,28 +62,28 @@ find_src(struct src_head *sh, struct src_entry **rse, const char *name) STAILQ_FOREACH(se, sh, se_entry) { if (_bcs_strcasecmp(se->se_name, name) == 0) { *rse = se; - return 0; + return (0); } } se = malloc(sizeof(*se)); if (se == NULL) - return errno; + return (errno); se->se_name = strdup(name); if (se->se_name == NULL) { ret = errno; free(se); - return ret; + return (ret); } ret = _db_factory_create(&se->se_df, &_db_hash_std, NULL); if (ret) { free(se->se_name); free(se); - return ret; + return (ret); } STAILQ_INSERT_TAIL(sh, se, se_entry); *rse = se; - return 0; + return (0); } static void @@ -103,13 +104,14 @@ free_src(struct src_head *sh) static int convert_line(struct src_head *sh, const char *line, size_t len) { - int ret; struct src_entry *se; const char *p; char key1[LINE_MAX], key2[LINE_MAX], data[LINE_MAX]; + char *ep; uint32_t val; + int ret; - se = NULL; /* XXX gcc */ + se = NULL; /* cut off trailing comment */ p = memchr(line, T_COMM, len); @@ -119,51 +121,50 @@ convert_line(struct src_head *sh, const char *line, size_t len) /* key1 */ line = _bcs_skip_ws_len(line, &len); if (len == 0) - return 0; + return (0); p = _bcs_skip_nonws_len(line, &len); - if (p==line) - return 0; - snprintf(key1, sizeof(key1), "%.*s", (int)(p-line), line); + if (p == line) + return (0); + snprintf(key1, sizeof(key1), "%.*s", (int)(p - line), line); /* key2 */ line = _bcs_skip_ws_len(p, &len); if (len == 0) - return 0; + return (0); p = _bcs_skip_nonws_len(line, &len); - if (p==line) - return 0; - snprintf(key2, sizeof(key2), "%.*s", (int)(p-line), line); + if (p == line) + return (0); + snprintf(key2, sizeof(key2), "%.*s", (int)(p - line), line); /* data */ line = _bcs_skip_ws_len(p, &len); _bcs_trunc_rws_len(line, &len); snprintf(data, sizeof(data), "%.*s", (int)len, line); - /* LINTED: discard const */ - val = strtoul(data, __DECONST(char **, &p), 0); - if (*p != '\0') - return EFTYPE; + val = strtoul(data, &ep, 0); + if (*ep != '\0') + return (EFTYPE); /* insert to DB */ ret = find_src(sh, &se, key1); if (ret) - return ret; + return (ret); - return _db_factory_add32_by_s(se->se_df, key2, val); + return (_db_factory_add32_by_s(se->se_df, key2, val)); } static int dump_db(struct src_head *sh, struct _region *r) { - int ret; struct _db_factory *df; struct src_entry *se; - size_t size; - void *ptr; struct _region subr; + void *ptr; + size_t size; + int ret; ret = _db_factory_create(&df, &_db_hash_std, NULL); if (ret) - return ret; + return (ret); STAILQ_FOREACH(se, sh, se_entry) { size = _db_factory_calc_size(se->se_df); @@ -172,7 +173,7 @@ dump_db(struct src_head *sh, struct _region *r) goto quit; _region_init(&subr, ptr, size); ret = _db_factory_serialize(se->se_df, _CITRUS_PIVOT_SUB_MAGIC, - &subr); + &subr); if (ret) goto quit; ret = _db_factory_add_by_s(df, se->se_name, &subr, 1); @@ -192,7 +193,7 @@ dump_db(struct src_head *sh, struct _region *r) quit: free(ptr); _db_factory_free(df); - return ret; + return (ret); } int @@ -209,16 +210,16 @@ _citrus_pivot_factory_convert(FILE *out, FILE *in) while ((line = fgetln(in, &size)) != NULL) if ((ret = convert_line(&sh, line, size))) { free_src(&sh); - return ret; + return (ret); } ret = dump_db(&sh, &r); free_src(&sh); if (ret) - return ret; + return (ret); if (fwrite(_region_head(&r), _region_size(&r), 1, out) != 1) - return errno; + return (errno); - return 0; + return (0); } diff --git a/lib/libc/citrus/citrus_pivot_factory.h b/lib/libc/citrus/citrus_pivot_factory.h index ba93d71ee7..d6d48ea8f2 100644 --- a/lib/libc/citrus/citrus_pivot_factory.h +++ b/lib/libc/citrus/citrus_pivot_factory.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_pivot_factory.h,v 1.1 2003/06/25 09:51:39 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_pivot_factory.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_pivot_factory.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_pivot_factory.h,v 1.1 2003/06/25 09:51:39 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,7 +31,7 @@ #define _CITRUS_PIVOT_FACTORY_H_ __BEGIN_DECLS -int _citrus_pivot_factory_convert(FILE *, FILE *); +int _citrus_pivot_factory_convert(FILE *, FILE *); __END_DECLS #endif diff --git a/lib/libc/citrus/citrus_pivot_file.h b/lib/libc/citrus/citrus_pivot_file.h index 401cf0c059..fd8ecbf7f2 100644 --- a/lib/libc/citrus/citrus_pivot_file.h +++ b/lib/libc/citrus/citrus_pivot_file.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_pivot_file.h,v 1.1 2003/06/25 09:51:39 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_pivot_file.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_pivot_file.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_pivot_file.h,v 1.1 2003/06/25 09:51:39 tshiozak Exp $ */ /*- * Copyright (c)2003 Citrus Project, diff --git a/lib/libc/citrus/citrus_prop.c b/lib/libc/citrus/citrus_prop.c index 64c7506c1e..d86a8b3cb6 100644 --- a/lib/libc/citrus/citrus_prop.c +++ b/lib/libc/citrus/citrus_prop.c @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_prop.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_prop.c,v 1.3 2006/11/22 23:47:21 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_prop.c,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -28,9 +28,12 @@ * */ +#include + #include -#include #include +#include +#include #include #include #include @@ -47,7 +50,8 @@ typedef struct { _citrus_prop_type_t type; union { const char *str; - int bool, chr; + int chr; + bool boolean; uint64_t num; } u; } _citrus_prop_object_t; @@ -55,7 +59,6 @@ typedef struct { static __inline void _citrus_prop_object_init(_citrus_prop_object_t *obj, _citrus_prop_type_t type) { - _DIAGASSERT(obj != NULL); obj->type = type; memset(&obj->u, 0, sizeof(obj->u)); @@ -64,7 +67,6 @@ _citrus_prop_object_init(_citrus_prop_object_t *obj, _citrus_prop_type_t type) static __inline void _citrus_prop_object_uninit(_citrus_prop_object_t *obj) { - _DIAGASSERT(obj != NULL); if (obj->type == _CITRUS_PROP_STR) free(__DECONST(void *, obj->u.str)); @@ -75,15 +77,12 @@ static const char *xdigit = "0123456789ABCDEF"; #define _CITRUS_PROP_READ_UINT_COMMON(_func_, _type_, _max_) \ static int \ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ - _type_ * __restrict result, int base) \ + _type_ * __restrict result, int base) \ { \ _type_ acc, cutoff; \ - int n, ch, cutlim; \ + int ch, cutlim, n; \ char *p; \ \ - _DIAGASSERT(ms != NULL); \ - _DIAGASSERT(result != NULL); \ - \ acc = (_type_)0; \ cutoff = _max_ / base; \ cutlim = _max_ % base; \ @@ -99,7 +98,7 @@ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ } \ _memstream_ungetc(ms, ch); \ *result = acc; \ - return 0; \ + return (0); \ } _CITRUS_PROP_READ_UINT_COMMON(chr, int, UCHAR_MAX) _CITRUS_PROP_READ_UINT_COMMON(num, uint64_t, UINT64_MAX) @@ -108,12 +107,9 @@ _CITRUS_PROP_READ_UINT_COMMON(num, uint64_t, UINT64_MAX) #define _CITRUS_PROP_READ_INT(_func_, _type_) \ static int \ _citrus_prop_read_##_func_(struct _memstream * __restrict ms, \ - _citrus_prop_object_t * __restrict obj) \ + _citrus_prop_object_t * __restrict obj) \ { \ - int ch, neg, base; \ - \ - _DIAGASSERT(ms != NULL); \ - _DIAGASSERT(obj != NULL); \ + int base, ch, neg; \ \ _memstream_skip_ws(ms); \ ch = _memstream_getc(ms); \ @@ -133,15 +129,15 @@ _citrus_prop_read_##_func_(struct _memstream * __restrict ms, \ if (_bcs_isxdigit(ch) == 0) { \ _memstream_ungetc(ms, ch); \ obj->u._func_ = 0; \ - return 0; \ + return (0); \ } \ base += 8; \ } \ } else if (_bcs_isdigit(ch) == 0) \ - return EINVAL; \ + return (EINVAL); \ _memstream_ungetc(ms, ch); \ - return _citrus_prop_read_##_func_##_common \ - (ms, &obj->u._func_, base); \ + return (_citrus_prop_read_##_func_##_common \ + (ms, &obj->u._func_, base)); \ } _CITRUS_PROP_READ_INT(chr, int) _CITRUS_PROP_READ_INT(num, uint64_t) @@ -149,74 +145,80 @@ _CITRUS_PROP_READ_INT(num, uint64_t) static int _citrus_prop_read_character_common(struct _memstream * __restrict ms, - int * __restrict result) + int * __restrict result) { - int ch, base; - - _DIAGASSERT(ms != NULL); - _DIAGASSERT(result != NULL); + int base, ch; ch = _memstream_getc(ms); - if (ch != '\\') { + if (ch != '\\') *result = ch; - } else { + else { ch = _memstream_getc(ms); base = 16; switch (ch) { - case 'a': *result = '\a'; break; - case 'b': *result = '\b'; break; - case 'f': *result = '\f'; break; - case 'n': *result = '\n'; break; - case 'r': *result = '\r'; break; - case 't': *result = '\t'; break; - case 'v': *result = '\v'; break; - /*FALLTHROUGH*/ + case 'a': + *result = '\a'; + break; + case 'b': + *result = '\b'; + break; + case 'f': + *result = '\f'; + break; + case 'n': + *result = '\n'; + break; + case 'r': + *result = '\r'; + break; + case 't': + *result = '\t'; + break; + case 'v': + *result = '\v'; + break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': _memstream_ungetc(ms, ch); base -= 8; + /*FALLTHROUGH*/ case 'x': - return _citrus_prop_read_chr_common(ms, result, base); - + return (_citrus_prop_read_chr_common(ms, result, base)); + /*NOTREACHED*/ default: /* unknown escape */ *result = ch; } } - return 0; + return (0); } static int _citrus_prop_read_character(struct _memstream * __restrict ms, - _citrus_prop_object_t * __restrict obj) + _citrus_prop_object_t * __restrict obj) { int ch, errnum; - _DIAGASSERT(ms != NULL); - _DIAGASSERT(obj != NULL); - _memstream_skip_ws(ms); ch = _memstream_getc(ms); if (ch != '\'') { _memstream_ungetc(ms, ch); - return _citrus_prop_read_chr(ms, obj); + return (_citrus_prop_read_chr(ms, obj)); } errnum = _citrus_prop_read_character_common(ms, &ch); if (errnum != 0) - return errnum; + return (errnum); obj->u.chr = ch; ch = _memstream_getc(ms); if (ch != '\'') - return EINVAL; - return 0; + return (EINVAL); + return (0); } static int _citrus_prop_read_bool(struct _memstream * __restrict ms, - _citrus_prop_object_t * __restrict obj) + _citrus_prop_object_t * __restrict obj) { - _DIAGASSERT(ms != NULL); - _DIAGASSERT(obj != NULL); _memstream_skip_ws(ms); switch (_bcs_tolower(_memstream_getc(ms))) { @@ -224,8 +226,8 @@ _citrus_prop_read_bool(struct _memstream * __restrict ms, if (_bcs_tolower(_memstream_getc(ms)) == 'r' && _bcs_tolower(_memstream_getc(ms)) == 'u' && _bcs_tolower(_memstream_getc(ms)) == 'e') { - obj->u.bool = 1; - return 0; + obj->u.boolean = true; + return (0); } break; case 'f': @@ -233,39 +235,37 @@ _citrus_prop_read_bool(struct _memstream * __restrict ms, _bcs_tolower(_memstream_getc(ms)) == 'l' && _bcs_tolower(_memstream_getc(ms)) == 's' && _bcs_tolower(_memstream_getc(ms)) == 'e') { - obj->u.bool = 0; - return 0; + obj->u.boolean = false; + return (0); } } - return EINVAL; + return (EINVAL); } static int _citrus_prop_read_str(struct _memstream * __restrict ms, - _citrus_prop_object_t * __restrict obj) + _citrus_prop_object_t * __restrict obj) { - int errnum, quot, ch; + int ch, errnum, quot; char *s, *t; #define _CITRUS_PROP_STR_BUFSIZ 512 - size_t n, m; - - _DIAGASSERT(ms != NULL); - _DIAGASSERT(obj != NULL); + size_t m, n; m = _CITRUS_PROP_STR_BUFSIZ; s = malloc(m); if (s == NULL) - return ENOMEM; + return (ENOMEM); n = 0; _memstream_skip_ws(ms); quot = _memstream_getc(ms); switch (quot) { case EOF: goto done; + /*NOTREACHED*/ case '\\': _memstream_ungetc(ms, quot); quot = EOF; - /*FALLTHROUGH*/ + /*FALLTHROUGH*/ case '\"': case '\'': break; default: @@ -279,7 +279,7 @@ _citrus_prop_read_str(struct _memstream * __restrict ms, t = realloc(s, n + m); if (t == NULL) { free(s); - return ENOMEM; + return (ENOMEM); } s = t; } @@ -289,22 +289,22 @@ _citrus_prop_read_str(struct _memstream * __restrict ms, done: s[n] = '\0'; obj->u.str = (const char *)s; - return 0; + return (0); } _memstream_ungetc(ms, ch); errnum = _citrus_prop_read_character_common(ms, &ch); if (errnum != 0) - return errnum; + return (errnum); s[n] = ch; ++n, --m; } free(s); - return EINVAL; + return (EINVAL); #undef _CITRUS_PROP_STR_BUFSIZ } typedef int (*_citrus_prop_read_type_t)(struct _memstream * __restrict, - _citrus_prop_object_t * __restrict); + _citrus_prop_object_t * __restrict); static const _citrus_prop_read_type_t readers[] = { _citrus_prop_read_bool, @@ -315,15 +315,11 @@ static const _citrus_prop_read_type_t readers[] = { static __inline int _citrus_prop_read_symbol(struct _memstream * __restrict ms, - char * __restrict s, size_t n) + char * __restrict s, size_t n) { int ch; size_t m; - _DIAGASSERT(ms != NULL); - _DIAGASSERT(s != NULL); - _DIAGASSERT(n > 0); - for (m = 0; m < n; ++m) { ch = _memstream_getc(ms); if (ch != '_' && _bcs_isalnum(ch) == 0) @@ -332,19 +328,18 @@ _citrus_prop_read_symbol(struct _memstream * __restrict ms, } ch = _memstream_getc(ms); if (ch == '_' || _bcs_isalnum(ch) != 0) - return EINVAL; + return (EINVAL); name_found: _memstream_ungetc(ms, ch); s[m] = '\0'; - return 0; + return (0); } static int _citrus_prop_parse_element(struct _memstream * __restrict ms, - const _citrus_prop_hint_t * __restrict hints, - void ** __restrict context) + const _citrus_prop_hint_t * __restrict hints, void ** __restrict context) { int ch, errnum; #define _CITRUS_PROP_HINT_NAME_LEN_MAX 255 @@ -352,17 +347,13 @@ _citrus_prop_parse_element(struct _memstream * __restrict ms, const _citrus_prop_hint_t *hint; _citrus_prop_object_t ostart, oend; - _DIAGASSERT(ms != NULL); - _DIAGASSERT(hints != NULL); - errnum = _citrus_prop_read_symbol(ms, name, sizeof(name)); if (errnum != 0) - return errnum; - for (hint = hints; hint->name != NULL; ++hint) { + return (errnum); + for (hint = hints; hint->name != NULL; ++hint) if (_citrus_bcs_strcasecmp(name, hint->name) == 0) goto hint_found; - } - return EINVAL; + return (EINVAL); hint_found: _memstream_skip_ws(ms); @@ -374,11 +365,12 @@ hint_found: _citrus_prop_object_init(&oend, hint->type); errnum = (*readers[hint->type])(ms, &ostart); if (errnum != 0) - return errnum; + return (errnum); _memstream_skip_ws(ms); ch = _memstream_getc(ms); switch (hint->type) { case _CITRUS_PROP_BOOL: + /*FALLTHROUGH*/ case _CITRUS_PROP_STR: break; default: @@ -386,27 +378,33 @@ hint_found: break; errnum = (*readers[hint->type])(ms, &oend); if (errnum != 0) - return errnum; + return (errnum); _memstream_skip_ws(ms); ch = _memstream_getc(ms); } #define CALL0(_func_) \ do { \ - _DIAGASSERT(hint->cb._func_.func != NULL); \ errnum = (*hint->cb._func_.func)(context, \ hint->name, ostart.u._func_); \ -} while (/*CONSTCOND*/0) +} while (0) #define CALL1(_func_) \ do { \ - _DIAGASSERT(hint->cb._func_.func != NULL); \ errnum = (*hint->cb._func_.func)(context, \ hint->name, ostart.u._func_, oend.u._func_);\ -} while (/*CONSTCOND*/0) +} while (0) switch (hint->type) { - case _CITRUS_PROP_BOOL: CALL0(bool); break; - case _CITRUS_PROP_STR : CALL0( str); break; - case _CITRUS_PROP_CHR : CALL1( chr); break; - case _CITRUS_PROP_NUM : CALL1( num); break; + case _CITRUS_PROP_BOOL: + CALL0(boolean); + break; + case _CITRUS_PROP_STR: + CALL0(str); + break; + case _CITRUS_PROP_CHR: + CALL1(chr); + break; + case _CITRUS_PROP_NUM: + CALL1(num); + break; default: abort(); /*NOTREACHED*/ @@ -416,21 +414,19 @@ do { \ _citrus_prop_object_uninit(&ostart); _citrus_prop_object_uninit(&oend); if (errnum != 0) - return errnum; + return (errnum); } while (ch == ','); if (ch != ';') _memstream_ungetc(ms, ch); - return 0; + return (0); } int _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict hints, - void * __restrict context, const void *var, size_t lenvar) + void * __restrict context, const void *var, size_t lenvar) { struct _memstream ms; - int errnum, ch; - - _DIAGASSERT(hints != NULL); + int ch, errnum; _memstream_bind_ptr(&ms, __DECONST(void *, var), lenvar); for (;;) { @@ -440,9 +436,9 @@ _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict hints, break; _memstream_ungetc(&ms, ch); errnum = _citrus_prop_parse_element( - &ms, hints, (void **)&context); + &ms, hints, (void ** __restrict)context); if (errnum != 0) - return errnum; + return (errnum); } - return 0; + return (0); } diff --git a/lib/libc/citrus/citrus_prop.h b/lib/libc/citrus/citrus_prop.h index c1f5c13e1e..b7d41f98c9 100644 --- a/lib/libc/citrus/citrus_prop.h +++ b/lib/libc/citrus/citrus_prop.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_prop.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_prop.h,v 1.3 2006/11/23 13:59:03 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_prop.h,v 1.1 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2006 Citrus Project, @@ -42,17 +42,17 @@ typedef struct _citrus_prop_hint_t _citrus_prop_hint_t; #define _CITRUS_PROP_CB0_T(_func_, _type_) \ typedef int (*_citrus_prop_##_func_##_cb_func_t) \ - (void ** __restrict, const char *, _type_); \ + (void ** __restrict, const char *, _type_); \ typedef struct { \ _citrus_prop_##_func_##_cb_func_t func; \ } _citrus_prop_##_func_##_cb_t; -_CITRUS_PROP_CB0_T(bool, int) +_CITRUS_PROP_CB0_T(boolean, int) _CITRUS_PROP_CB0_T(str, const char *) #undef _CITRUS_PROP_CB0_T #define _CITRUS_PROP_CB1_T(_func_, _type_) \ typedef int (*_citrus_prop_##_func_##_cb_func_t) \ - (void ** __restrict, const char *, _type_, _type_); \ + (void ** __restrict, const char *, _type_, _type_); \ typedef struct { \ _citrus_prop_##_func_##_cb_func_t func; \ } _citrus_prop_##_func_##_cb_t; @@ -66,7 +66,7 @@ struct _citrus_prop_hint_t { #define _CITRUS_PROP_CB_T_OPS(_name_) \ _citrus_prop_##_name_##_cb_t _name_ union { - _CITRUS_PROP_CB_T_OPS(bool); + _CITRUS_PROP_CB_T_OPS(boolean); _CITRUS_PROP_CB_T_OPS(str); _CITRUS_PROP_CB_T_OPS(chr); _CITRUS_PROP_CB_T_OPS(num); @@ -74,19 +74,19 @@ struct _citrus_prop_hint_t { }; #define _CITRUS_PROP_HINT_BOOL(name, cb) \ - { name, _CITRUS_PROP_BOOL, { .bool = { cb } } } + { name, _CITRUS_PROP_BOOL, { .boolean = { cb } } } #define _CITRUS_PROP_HINT_STR(name, cb) \ - { name, _CITRUS_PROP_STR, { .str = { cb } } } + { name, _CITRUS_PROP_STR, { .str = { cb } } } #define _CITRUS_PROP_HINT_CHR(name, cb) \ - { name, _CITRUS_PROP_CHR, { .chr = { cb } } } + { name, _CITRUS_PROP_CHR, { .chr = { cb } } } #define _CITRUS_PROP_HINT_NUM(name, cb) \ - { name, _CITRUS_PROP_NUM, { .num = { cb } } } + { name, _CITRUS_PROP_NUM, { .num = { cb } } } #define _CITRUS_PROP_HINT_END \ - { NULL } + { NULL, _CITRUS_PROP_NUM, { .num = { 0 } } } __BEGIN_DECLS -int _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict, - void * __restrict, const void *, size_t); +int _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict, + void * __restrict, const void *, size_t); __END_DECLS #endif /* !_CITRUS_PROP_H_ */ diff --git a/lib/libc/citrus/citrus_region.h b/lib/libc/citrus/citrus_region.h index b312ab0044..f9d82eb565 100644 --- a/lib/libc/citrus/citrus_region.h +++ b/lib/libc/citrus/citrus_region.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_region.h 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_region.h,v 1.7 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_region.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,16 +31,17 @@ #ifndef _CITRUS_REGION_H_ #define _CITRUS_REGION_H_ +#include + struct _citrus_region { -/* private: */ void *r_head; - size_t r_size; + size_t r_size; }; static __inline void _citrus_region_init(struct _citrus_region *r, void *h, size_t sz) { - _DIAGASSERT(r); + r->r_head = h; r->r_size = sz; } @@ -48,58 +49,65 @@ _citrus_region_init(struct _citrus_region *r, void *h, size_t sz) static __inline void * _citrus_region_head(const struct _citrus_region *r) { - return r->r_head; + + return (r->r_head); } static __inline size_t _citrus_region_size(const struct _citrus_region *r) { - return r->r_size; + + return (r->r_size); } static __inline int _citrus_region_check(const struct _citrus_region *r, size_t ofs, size_t sz) { - return r->r_size >= ofs + sz ? 0 : -1; + + return (r->r_size >= ofs + sz ? 0 : -1); } static __inline void * _citrus_region_offset(const struct _citrus_region *r, size_t pos) { - return (void *)((uint8_t *)r->r_head + pos); + + return ((void *)((uint8_t *)r->r_head + pos)); } static __inline uint8_t _citrus_region_peek8(const struct _citrus_region *r, size_t pos) { - return *(uint8_t *)_citrus_region_offset(r, pos); + + return (*(uint8_t *)_citrus_region_offset(r, pos)); } static __inline uint16_t _citrus_region_peek16(const struct _citrus_region *r, size_t pos) { uint16_t val; - memcpy(&val, _citrus_region_offset(r, pos), 2); - return val; + + memcpy(&val, _citrus_region_offset(r, pos), (size_t)2); + return (val); } static __inline uint32_t _citrus_region_peek32(const struct _citrus_region *r, size_t pos) { uint32_t val; - memcpy(&val, _citrus_region_offset(r, pos), 4); - return val; + + memcpy(&val, _citrus_region_offset(r, pos), (size_t)4); + return (val); } static __inline int _citrus_region_get_subregion(struct _citrus_region *subr, - const struct _citrus_region *r, - size_t ofs, size_t sz) + const struct _citrus_region *r, size_t ofs, size_t sz) { + if (_citrus_region_check(r, ofs, sz)) - return -1; + return (-1); _citrus_region_init(subr, _citrus_region_offset(r, ofs), sz); - return 0; + return (0); } #endif diff --git a/lib/libc/citrus/citrus_stdenc.c b/lib/libc/citrus/citrus_stdenc.c index 2018606427..405613df4e 100644 --- a/lib/libc/citrus/citrus_stdenc.c +++ b/lib/libc/citrus/citrus_stdenc.c @@ -1,3 +1,4 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_stdenc.c 219019 2011-02-25 00:04:39Z gabor $ */ /* $NetBSD: citrus_stdenc.c,v 1.3 2005/10/29 18:02:04 tshiozak Exp $ */ /*- @@ -26,7 +27,8 @@ * SUCH DAMAGE. */ -#include +#include + #include #include #include @@ -35,8 +37,8 @@ #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_module.h" -#include "citrus_stdenc.h" #include "citrus_none.h" +#include "citrus_stdenc.h" struct _citrus_stdenc _citrus_stdenc_default = { &_citrus_NONE_stdenc_ops, /* ce_ops */ @@ -45,38 +47,22 @@ struct _citrus_stdenc _citrus_stdenc_default = { &_citrus_NONE_stdenc_traits, /* ce_traits */ }; -#ifdef _I18N_DYNAMIC - -static int -/*ARGSUSED*/ -get_state_desc_default(struct _citrus_stdenc * __restrict ce __unused, - void * __restrict ps __unused, - int id __unused, - struct _citrus_stdenc_state_desc * __restrict d __unused) -{ - return EOPNOTSUPP; -} - int _citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict rce, - char const * __restrict encname, - const void * __restrict variable, size_t lenvar) + char const * __restrict encname, const void * __restrict variable, + size_t lenvar) { - int ret; - _citrus_module_t handle; struct _citrus_stdenc *ce; + _citrus_module_t handle; _citrus_stdenc_getops_t getops; - - _DIAGASSERT(encname != NULL); - _DIAGASSERT(!lenvar || variable!=NULL); - _DIAGASSERT(rce != NULL); + int ret; if (!strcmp(encname, _CITRUS_DEFAULT_STDENC_NAME)) { *rce = &_citrus_stdenc_default; return (0); } ce = malloc(sizeof(*ce)); - if (ce==NULL) { + if (ce == NULL) { ret = errno; goto bad; } @@ -91,9 +77,8 @@ _citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict rce, ce->ce_module = handle; - getops = - (_citrus_stdenc_getops_t)_citrus_find_getops(ce->ce_module, - encname, "stdenc"); + getops = (_citrus_stdenc_getops_t)_citrus_find_getops(ce->ce_module, + encname, "stdenc"); if (getops == NULL) { ret = EINVAL; goto bad; @@ -105,16 +90,10 @@ _citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict rce, goto bad; } - ret = (*getops)(ce->ce_ops, sizeof(*ce->ce_ops), - _CITRUS_STDENC_ABI_VERSION); + ret = (*getops)(ce->ce_ops, sizeof(*ce->ce_ops)); if (ret) goto bad; - /* If return ABI version is not expected, should fixup it */ - if (ce->ce_ops->eo_abi_version < 0x00000002) { - ce->ce_ops->eo_get_state_desc = &get_state_desc_default; - } - /* validation check */ if (ce->ce_ops->eo_init == NULL || ce->ce_ops->eo_uninit == NULL || @@ -150,8 +129,6 @@ void _citrus_stdenc_close(struct _citrus_stdenc *ce) { - _DIAGASSERT(ce != NULL); - if (ce == &_citrus_stdenc_default) return; @@ -166,27 +143,3 @@ _citrus_stdenc_close(struct _citrus_stdenc *ce) } free(ce); } - -#else -/* !_I18N_DYNAMIC */ - -int -/*ARGSUSED*/ -_citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict rce, - char const * __restrict encname, - const void * __restrict variable, size_t lenvar) -{ - if (!strcmp(encname, _CITRUS_DEFAULT_STDENC_NAME)) { - *rce = &_citrus_stdenc_default; - return (0); - } - return (EINVAL); -} - -void -/*ARGSUSED*/ -_citrus_stdenc_close(struct _citrus_stdenc *ce) -{ -} - -#endif diff --git a/lib/libc/citrus/citrus_stdenc.h b/lib/libc/citrus/citrus_stdenc.h index ac614c6872..fb65bd478d 100644 --- a/lib/libc/citrus/citrus_stdenc.h +++ b/lib/libc/citrus/citrus_stdenc.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_stdenc.h 252583 2013-07-03 18:27:45Z peter $ */ /* $NetBSD: citrus_stdenc.h,v 1.4 2005/10/29 18:02:04 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_stdenc.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -53,94 +53,72 @@ struct _citrus_stdenc_state_desc #include "citrus_stdenc_local.h" __BEGIN_DECLS -int _citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict, - char const * __restrict, - const void * __restrict, size_t); -void _citrus_stdenc_close(struct _citrus_stdenc *); +int _citrus_stdenc_open(struct _citrus_stdenc * __restrict * __restrict, + char const * __restrict, const void * __restrict, size_t); +void _citrus_stdenc_close(struct _citrus_stdenc *); __END_DECLS static __inline int _citrus_stdenc_init_state(struct _citrus_stdenc * __restrict ce, - void * __restrict ps) + void * __restrict ps) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_init_state); - return (*ce->ce_ops->eo_init_state)(ce, ps); + + return ((*ce->ce_ops->eo_init_state)(ce, ps)); } static __inline int _citrus_stdenc_mbtocs(struct _citrus_stdenc * __restrict ce, - _citrus_csid_t * __restrict csid, - _citrus_index_t * __restrict idx, - const char ** __restrict s, size_t n, - void * __restrict ps, size_t * __restrict nresult) + _citrus_csid_t * __restrict csid, _citrus_index_t * __restrict idx, + const char ** __restrict s, size_t n, void * __restrict ps, + size_t * __restrict nresult, struct iconv_hooks *hooks) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_mbtocs); - return (*ce->ce_ops->eo_mbtocs)(ce, csid, idx, s, n, ps, nresult); + + return ((*ce->ce_ops->eo_mbtocs)(ce, csid, idx, s, n, ps, nresult, + hooks)); } static __inline int _citrus_stdenc_cstomb(struct _citrus_stdenc * __restrict ce, - char * __restrict s, size_t n, - _citrus_csid_t csid, _citrus_index_t idx, - void * __restrict ps, size_t * __restrict nresult) + char * __restrict s, size_t n, _citrus_csid_t csid, _citrus_index_t idx, + void * __restrict ps, size_t * __restrict nresult, + struct iconv_hooks *hooks) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_cstomb); - return (*ce->ce_ops->eo_cstomb)(ce, s, n, csid, idx, ps, nresult); -} -static __inline int -_citrus_stdenc_mbtowc(struct _citrus_stdenc * __restrict ce, - _citrus_wc_t * __restrict wc, - const char ** __restrict s, size_t n, - void * __restrict ps, size_t * __restrict nresult) -{ - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_mbtocs); - return (*ce->ce_ops->eo_mbtowc)(ce, wc, s, n, ps, nresult); + return ((*ce->ce_ops->eo_cstomb)(ce, s, n, csid, idx, ps, nresult, + hooks)); } static __inline int _citrus_stdenc_wctomb(struct _citrus_stdenc * __restrict ce, - char * __restrict s, size_t n, _citrus_wc_t wc, - void * __restrict ps, size_t * __restrict nresult) + char * __restrict s, size_t n, _citrus_wc_t wc, void * __restrict ps, + size_t * __restrict nresult, struct iconv_hooks *hooks) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_cstomb); - return (*ce->ce_ops->eo_wctomb)(ce, s, n, wc, ps, nresult); + + return ((*ce->ce_ops->eo_wctomb)(ce, s, n, wc, ps, nresult, hooks)); } static __inline int _citrus_stdenc_put_state_reset(struct _citrus_stdenc * __restrict ce, - char * __restrict s, size_t n, - void * __restrict ps, - size_t * __restrict nresult) + char * __restrict s, size_t n, void * __restrict ps, + size_t * __restrict nresult) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_put_state_reset); - return (*ce->ce_ops->eo_put_state_reset)(ce, s, n, ps, nresult); + + return ((*ce->ce_ops->eo_put_state_reset)(ce, s, n, ps, nresult)); } static __inline size_t _citrus_stdenc_get_state_size(struct _citrus_stdenc *ce) { - _DIAGASSERT(ce && ce->ce_traits); - return ce->ce_traits->et_state_size; -} -static __inline size_t -_citrus_stdenc_get_mb_cur_max(struct _citrus_stdenc *ce) -{ - _DIAGASSERT(ce && ce->ce_traits); - return ce->ce_traits->et_mb_cur_max; + return (ce->ce_traits->et_state_size); } static __inline int _citrus_stdenc_get_state_desc(struct _citrus_stdenc * __restrict ce, - void * __restrict ps, - int id, - struct _citrus_stdenc_state_desc * __restrict d) + void * __restrict ps, int id, + struct _citrus_stdenc_state_desc * __restrict d) { - _DIAGASSERT(ce && ce->ce_ops && ce->ce_ops->eo_get_state_desc); - - return (*ce->ce_ops->eo_get_state_desc)(ce, ps, id, d); + return ((*ce->ce_ops->eo_get_state_desc)(ce, ps, id, d)); } - #endif diff --git a/lib/libc/citrus/citrus_stdenc_local.h b/lib/libc/citrus/citrus_stdenc_local.h index 64a4e73bb0..89408902d2 100644 --- a/lib/libc/citrus/citrus_stdenc_local.h +++ b/lib/libc/citrus/citrus_stdenc_local.h @@ -1,5 +1,5 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_stdenc_local.h 252583 2013-07-03 18:27:45Z peter $ */ /* $NetBSD: citrus_stdenc_local.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_stdenc_local.h,v 1.3 2008/04/10 10:21:01 hasso Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -31,55 +31,61 @@ #ifndef _CITRUS_STDENC_LOCAL_H_ #define _CITRUS_STDENC_LOCAL_H_ -#include "citrus_module.h" +#include -struct _citrus_stdenc; -struct _citrus_stdenc_ops; -struct _citrus_stdenc_state_desc; -struct _citrus_stdenc_traits; +#include "citrus_module.h" #define _CITRUS_STDENC_GETOPS_FUNC_BASE(n) \ -int n(struct _citrus_stdenc_ops *, size_t, uint32_t) + int n(struct _citrus_stdenc_ops *, size_t) #define _CITRUS_STDENC_GETOPS_FUNC(_e_) \ -_CITRUS_STDENC_GETOPS_FUNC_BASE(_citrus_##_e_##_stdenc_getops) + _CITRUS_STDENC_GETOPS_FUNC_BASE(_citrus_##_e_##_stdenc_getops) typedef _CITRUS_STDENC_GETOPS_FUNC_BASE((*_citrus_stdenc_getops_t)); #define _CITRUS_STDENC_DECLS(_e_) \ -static int _citrus_##_e_##_stdenc_init \ - (struct _citrus_stdenc * __restrict, const void * __restrict, \ - size_t, struct _citrus_stdenc_traits * __restrict); \ -static void _citrus_##_e_##_stdenc_uninit(struct _citrus_stdenc *); \ -static int _citrus_##_e_##_stdenc_init_state \ - (struct _citrus_stdenc * __restrict, void * __restrict); \ -static int _citrus_##_e_##_stdenc_mbtocs \ - (struct _citrus_stdenc * __restrict, \ - _citrus_csid_t * __restrict, _citrus_index_t * __restrict, \ - const char ** __restrict, size_t, \ - void * __restrict, size_t * __restrict); \ -static int _citrus_##_e_##_stdenc_cstomb \ - (struct _citrus_stdenc * __restrict, char * __restrict, \ - size_t, _citrus_csid_t, _citrus_index_t, \ - void * __restrict, size_t * __restrict); \ -static int _citrus_##_e_##_stdenc_mbtowc \ - (struct _citrus_stdenc * __restrict, \ - _citrus_wc_t * __restrict, \ - const char ** __restrict, size_t, \ - void * __restrict, size_t * __restrict); \ -static int _citrus_##_e_##_stdenc_wctomb \ - (struct _citrus_stdenc * __restrict, char * __restrict, size_t, \ - _citrus_wc_t, void * __restrict, size_t * __restrict); \ -static int _citrus_##_e_##_stdenc_put_state_reset \ - (struct _citrus_stdenc * __restrict, char * __restrict, size_t, \ - void * __restrict, size_t * __restrict); \ -static int _citrus_##_e_##_stdenc_get_state_desc \ - (struct _citrus_stdenc * __restrict, void * __restrict, int, \ - struct _citrus_stdenc_state_desc * __restrict); \ -CITRUS_MODULE(_e_, stdenc, _citrus_##_e_##_stdenc_getops) +static int _citrus_##_e_##_stdenc_init \ + (struct _citrus_stdenc * __restrict, \ + const void * __restrict, size_t, \ + struct _citrus_stdenc_traits * __restrict); \ +static void _citrus_##_e_##_stdenc_uninit(struct _citrus_stdenc *);\ +static int _citrus_##_e_##_stdenc_init_state \ + (struct _citrus_stdenc * __restrict, \ + void * __restrict); \ +static int _citrus_##_e_##_stdenc_mbtocs \ + (struct _citrus_stdenc * __restrict, \ + _citrus_csid_t * __restrict, \ + _citrus_index_t * __restrict, \ + const char ** __restrict, size_t, \ + void * __restrict, size_t * __restrict, \ + struct iconv_hooks *); \ +static int _citrus_##_e_##_stdenc_cstomb \ + (struct _citrus_stdenc * __restrict, \ + char * __restrict, size_t, _citrus_csid_t, \ + _citrus_index_t, void * __restrict, \ + size_t * __restrict, struct iconv_hooks *); \ +static int _citrus_##_e_##_stdenc_mbtowc \ + (struct _citrus_stdenc * __restrict, \ + _citrus_wc_t * __restrict, \ + const char ** __restrict, size_t, \ + void * __restrict, size_t * __restrict, \ + struct iconv_hooks *); \ +static int _citrus_##_e_##_stdenc_wctomb \ + (struct _citrus_stdenc * __restrict, \ + char * __restrict, size_t, _citrus_wc_t, \ + void * __restrict, size_t * __restrict, \ + struct iconv_hooks *); \ +static int _citrus_##_e_##_stdenc_put_state_reset \ + (struct _citrus_stdenc * __restrict, \ + char * __restrict, size_t, void * __restrict, \ + size_t * __restrict); \ +static int _citrus_##_e_##_stdenc_get_state_desc \ + (struct _citrus_stdenc * __restrict, \ + void * __restrict, int, \ + struct _citrus_stdenc_state_desc * __restrict) #define _CITRUS_STDENC_DEF_OPS(_e_) \ +extern struct _citrus_stdenc_ops _citrus_##_e_##_stdenc_ops; \ struct _citrus_stdenc_ops _citrus_##_e_##_stdenc_ops = { \ - /* eo_abi_version */ _CITRUS_STDENC_ABI_VERSION, \ /* eo_init */ &_citrus_##_e_##_stdenc_init, \ /* eo_uninit */ &_citrus_##_e_##_stdenc_uninit, \ /* eo_init_state */ &_citrus_##_e_##_stdenc_init_state, \ @@ -91,44 +97,40 @@ struct _citrus_stdenc_ops _citrus_##_e_##_stdenc_ops = { \ /* eo_get_state_desc */ &_citrus_##_e_##_stdenc_get_state_desc \ } -typedef int (*_citrus_stdenc_init_t) - (struct _citrus_stdenc * __reatrict, const void * __restrict , size_t, - struct _citrus_stdenc_traits * __restrict); -typedef void (*_citrus_stdenc_uninit_t)(struct _citrus_stdenc * __restrict); -typedef int (*_citrus_stdenc_init_state_t) - (struct _citrus_stdenc * __restrict, void * __restrict); -typedef int (*_citrus_stdenc_mbtocs_t) - (struct _citrus_stdenc * __restrict, - _citrus_csid_t * __restrict, _citrus_index_t * __restrict, - const char ** __restrict, size_t, - void * __restrict, size_t * __restrict); -typedef int (*_citrus_stdenc_cstomb_t) - (struct _citrus_stdenc *__restrict, char * __restrict, size_t, - _citrus_csid_t, _citrus_index_t, void * __restrict, - size_t * __restrict); -typedef int (*_citrus_stdenc_mbtowc_t) - (struct _citrus_stdenc * __restrict, - _citrus_wc_t * __restrict, - const char ** __restrict, size_t, - void * __restrict, size_t * __restrict); -typedef int (*_citrus_stdenc_wctomb_t) - (struct _citrus_stdenc *__restrict, char * __restrict, size_t, - _citrus_wc_t, void * __restrict, size_t * __restrict); -typedef int (*_citrus_stdenc_put_state_reset_t) - (struct _citrus_stdenc *__restrict, char * __restrict, size_t, - void * __restrict, size_t * __restrict); -typedef int (*_citrus_stdenc_get_state_desc_t) - (struct _citrus_stdenc * __restrict, void * __restrict, int, - struct _citrus_stdenc_state_desc * __restrict); -/* - * ABI version change log - * 0x00000001 - * initial version - */ -#define _CITRUS_STDENC_ABI_VERSION 0x00000002 +typedef int (*_citrus_stdenc_init_t) + (struct _citrus_stdenc * __reatrict, const void * __restrict , size_t, + struct _citrus_stdenc_traits * __restrict); +typedef void (*_citrus_stdenc_uninit_t)(struct _citrus_stdenc * __restrict); +typedef int (*_citrus_stdenc_init_state_t) + (struct _citrus_stdenc * __restrict, void * __restrict); +typedef int (*_citrus_stdenc_mbtocs_t) + (struct _citrus_stdenc * __restrict, + _citrus_csid_t * __restrict, _citrus_index_t * __restrict, + const char ** __restrict, size_t, + void * __restrict, size_t * __restrict, + struct iconv_hooks *); +typedef int (*_citrus_stdenc_cstomb_t) + (struct _citrus_stdenc *__restrict, char * __restrict, size_t, + _citrus_csid_t, _citrus_index_t, void * __restrict, + size_t * __restrict, struct iconv_hooks *); +typedef int (*_citrus_stdenc_mbtowc_t) + (struct _citrus_stdenc * __restrict, + _citrus_wc_t * __restrict, + const char ** __restrict, size_t, + void * __restrict, size_t * __restrict, + struct iconv_hooks *); +typedef int (*_citrus_stdenc_wctomb_t) + (struct _citrus_stdenc *__restrict, char * __restrict, size_t, + _citrus_wc_t, void * __restrict, size_t * __restrict, + struct iconv_hooks *); +typedef int (*_citrus_stdenc_put_state_reset_t) + (struct _citrus_stdenc *__restrict, char * __restrict, size_t, + void * __restrict, size_t * __restrict); +typedef int (*_citrus_stdenc_get_state_desc_t) + (struct _citrus_stdenc * __restrict, void * __restrict, int, + struct _citrus_stdenc_state_desc * __restrict); + struct _citrus_stdenc_ops { - uint32_t eo_abi_version; - /* version 0x00000001 */ _citrus_stdenc_init_t eo_init; _citrus_stdenc_uninit_t eo_uninit; _citrus_stdenc_init_state_t eo_init_state; @@ -143,17 +145,15 @@ struct _citrus_stdenc_ops { struct _citrus_stdenc_traits { /* version 0x00000001 */ - size_t et_state_size; - size_t et_mb_cur_max; + size_t et_state_size; + size_t et_mb_cur_max; }; struct _citrus_stdenc { - /* public */ /* version 0x00000001 */ struct _citrus_stdenc_ops *ce_ops; void *ce_closure; - /* private */ - _citrus_module_t ce_module; + _citrus_module_t ce_module; struct _citrus_stdenc_traits *ce_traits; }; diff --git a/lib/libc/citrus/citrus_stdenc_template.h b/lib/libc/citrus/citrus_stdenc_template.h index 9f597c2f81..5326416b24 100644 --- a/lib/libc/citrus/citrus_stdenc_template.h +++ b/lib/libc/citrus/citrus_stdenc_template.h @@ -1,3 +1,4 @@ +/* $FreeBSD: head/lib/libc/iconv/citrus_stdenc_template.h 252583 2013-07-03 18:27:45Z peter $ */ /* $NetBSD: citrus_stdenc_template.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */ /*- @@ -26,6 +27,8 @@ * SUCH DAMAGE. */ +#include + /* * CAUTION: THIS IS NOT STANDALONE FILE * @@ -49,11 +52,9 @@ */ int -_FUNCNAME(stdenc_getops)(struct _citrus_stdenc_ops *ops, size_t lenops, - uint32_t expected_version) +_FUNCNAME(stdenc_getops)(struct _citrus_stdenc_ops *ops, + size_t lenops __unused) { - if (expected_version<_CITRUS_STDENC_ABI_VERSION || lenops 0) { ei = calloc(1, sizeof(_ENCODING_INFO)); - if (ei == NULL) { - return errno; - } + if (ei == NULL) + return (errno); } ret = _FUNCNAME(encoding_module_init)(ei, var, lenvar); if (ret) { free((void *)ei); - return ret; + return (ret); } ce->ce_closure = ei; et->et_state_size = sizeof(_ENCODING_STATE); et->et_mb_cur_max = _ENCODING_MB_CUR_MAX(_CE_TO_EI(ce)); - return 0; + return (0); } static void _FUNCNAME(stdenc_uninit)(struct _citrus_stdenc * __restrict ce) { + if (ce) { _FUNCNAME(encoding_module_uninit)(_CE_TO_EI(ce)); free(ce->ce_closure); @@ -100,108 +101,111 @@ _FUNCNAME(stdenc_uninit)(struct _citrus_stdenc * __restrict ce) static int _FUNCNAME(stdenc_init_state)(struct _citrus_stdenc * __restrict ce, - void * __restrict ps) + void * __restrict ps) { + _FUNCNAME(init_state)(_CE_TO_EI(ce), _TO_STATE(ps)); - return 0; + return (0); } static int _FUNCNAME(stdenc_mbtocs)(struct _citrus_stdenc * __restrict ce, - _citrus_csid_t * __restrict csid, - _citrus_index_t * __restrict idx, - const char ** __restrict s, size_t n, - void * __restrict ps, size_t * __restrict nresult) + _citrus_csid_t * __restrict csid, _citrus_index_t * __restrict idx, + const char ** __restrict s, size_t n, void * __restrict ps, + size_t * __restrict nresult, struct iconv_hooks *hooks) { - int ret; wchar_t wc; - - _DIAGASSERT(nresult != NULL); + int ret; ret = _FUNCNAME(mbrtowc_priv)(_CE_TO_EI(ce), &wc, s, n, - _TO_STATE(ps), nresult); + _TO_STATE(ps), nresult); - if (!ret && *nresult != (size_t)-2) - _FUNCNAME(stdenc_wctocs)(_CE_TO_EI(ce), csid, idx, wc); + if ((ret == 0) && *nresult != (size_t)-2) + ret = _FUNCNAME(stdenc_wctocs)(_CE_TO_EI(ce), csid, idx, wc); - return ret; + if ((ret == 0) && (hooks != NULL) && (hooks->uc_hook != NULL)) + hooks->uc_hook((unsigned int)*idx, hooks->data); + return (ret); } static int _FUNCNAME(stdenc_cstomb)(struct _citrus_stdenc * __restrict ce, - char * __restrict s, size_t n, - _citrus_csid_t csid, _citrus_index_t idx, - void * __restrict ps, size_t * __restrict nresult) + char * __restrict s, size_t n, _citrus_csid_t csid, _citrus_index_t idx, + void * __restrict ps, size_t * __restrict nresult, + struct iconv_hooks *hooks __unused) { - int ret; wchar_t wc; + int ret; - _DIAGASSERT(nresult != NULL); - - wc = 0; + wc = ret = 0; - if (csid != _CITRUS_CSID_INVALID) { + if (csid != _CITRUS_CSID_INVALID) ret = _FUNCNAME(stdenc_cstowc)(_CE_TO_EI(ce), &wc, csid, idx); - if (ret) - return ret; - } - return _FUNCNAME(wcrtomb_priv)(_CE_TO_EI(ce), s, n, wc, _TO_STATE(ps), - nresult); + if (ret == 0) + ret = _FUNCNAME(wcrtomb_priv)(_CE_TO_EI(ce), s, n, wc, + _TO_STATE(ps), nresult); + return (ret); } static int _FUNCNAME(stdenc_mbtowc)(struct _citrus_stdenc * __restrict ce, - _citrus_wc_t * __restrict wc, - const char ** __restrict s, size_t n, - void * __restrict ps, size_t * __restrict nresult) + _citrus_wc_t * __restrict wc, const char ** __restrict s, size_t n, + void * __restrict ps, size_t * __restrict nresult, + struct iconv_hooks *hooks) { - return _FUNCNAME(mbrtowc_priv)(_CE_TO_EI(ce), wc, s, n, - _TO_STATE(ps), nresult); + int ret; + + ret = _FUNCNAME(mbrtowc_priv)(_CE_TO_EI(ce), wc, s, n, + _TO_STATE(ps), nresult); + if ((ret == 0) && (hooks != NULL) && (hooks->wc_hook != NULL)) + hooks->wc_hook(*wc, hooks->data); + return (ret); } static int _FUNCNAME(stdenc_wctomb)(struct _citrus_stdenc * __restrict ce, - char * __restrict s, size_t n, _citrus_wc_t wc, - void * __restrict ps, size_t * __restrict nresult) + char * __restrict s, size_t n, _citrus_wc_t wc, void * __restrict ps, + size_t * __restrict nresult, struct iconv_hooks *hooks __unused) { - return _FUNCNAME(wcrtomb_priv)(_CE_TO_EI(ce), s, n, wc, _TO_STATE(ps), - nresult); + int ret; + + ret = _FUNCNAME(wcrtomb_priv)(_CE_TO_EI(ce), s, n, wc, _TO_STATE(ps), + nresult); + return (ret); } static int _FUNCNAME(stdenc_put_state_reset)(struct _citrus_stdenc * __restrict ce __unused, - char * __restrict s __unused, - size_t n __unused, - void * __restrict ps __unused, - size_t * __restrict nresult) + char * __restrict s __unused, size_t n __unused, + void * __restrict ps __unused, size_t * __restrict nresult) { + #if _ENCODING_IS_STATE_DEPENDENT - return _FUNCNAME(put_state_reset)(_CE_TO_EI(ce), s, n, _TO_STATE(ps), - nresult); + return ((_FUNCNAME(put_state_reset)(_CE_TO_EI(ce), s, n, _TO_STATE(ps), + nresult))); #else *nresult = 0; - return 0; + return (0); #endif } static int _FUNCNAME(stdenc_get_state_desc)(struct _citrus_stdenc * __restrict ce, - void * __restrict ps, - int id, - struct _citrus_stdenc_state_desc * __restrict d) + void * __restrict ps, int id, + struct _citrus_stdenc_state_desc * __restrict d) { int ret; switch (id) { case _STDENC_SDID_GENERIC: ret = _FUNCNAME(stdenc_get_state_desc_generic)( - _CE_TO_EI(ce), _TO_STATE(ps), &d->u.generic.state); + _CE_TO_EI(ce), _TO_STATE(ps), &d->u.generic.state); break; default: ret = EOPNOTSUPP; } - return ret; + return (ret); } diff --git a/lib/libc/citrus/citrus_types.h b/lib/libc/citrus/citrus_types.h index e0d4a9be19..e691219eab 100644 --- a/lib/libc/citrus/citrus_types.h +++ b/lib/libc/citrus/citrus_types.h @@ -1,5 +1,5 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_types.h,v 1.3 2003/10/27 00:12:42 lukem Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_types.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/citrus_types.h 219019 2011-02-25 00:04:39Z gabor $ */ +/* $NetBSD: citrus_types.h,v 1.3 2003/10/27 00:12:42 lukem Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,12 +27,14 @@ * SUCH DAMAGE. */ +#include + #ifndef _CITRUS_TYPES_H_ #define _CITRUS_TYPES_H_ -typedef uint32_t _citrus_wc_t; -typedef uint32_t _citrus_index_t; -typedef uint32_t _citrus_csid_t; +typedef uint32_t _citrus_wc_t; +typedef uint32_t _citrus_index_t; +typedef uint32_t _citrus_csid_t; #define _CITRUS_CSID_INVALID ((_citrus_csid_t)-1) #endif diff --git a/lib/libc/gdtoa/machdep_ldisx.c b/lib/libc/gdtoa/machdep_ldisx.c index aa49110196..ed92ac3387 100644 --- a/lib/libc/gdtoa/machdep_ldisx.c +++ b/lib/libc/gdtoa/machdep_ldisx.c @@ -2,6 +2,11 @@ * Copyright (c) 2003 David Schultz * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/gdtoa/machdep_ldisx.c,v 1.3 2007/12/03 07:17:32 das Exp $ + * $FreeBSD: head/lib/libc/gdtoa/machdep_ldisx.c 227753 2011-11-20 14:45:42Z theraven $ */ /* @@ -32,15 +37,17 @@ * is an IEEE extended precision number. */ + #include #include "gdtoaimp.h" long double -strtold(const char * __restrict s, char ** __restrict sp) +strtold_l(const char * __restrict s, char ** __restrict sp, locale_t locale) { long double result; + FIX_LOCALE(locale); - strtorx(s, sp, FLT_ROUNDS, &result); + strtorx_l(s, sp, FLT_ROUNDS, &result, locale); return result; } diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index c7f8f03fd1..ff78e9696b 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -6,10 +6,10 @@ CMAPS+= ${.CURDIR}/gen/Symbol.map -SRCS+= _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ - alarm.c arc4random.c assert.c basename.c \ +SRCS+= _once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \ + _thread_init.c alarm.c arc4random.c assert.c basename.c \ clock.c closedir.c confstr.c \ - ctermid.c ctype.c daemon.c devname.c dirname.c disklabel.c disktab.c \ + ctermid.c daemon.c devname.c dirname.c disklabel.c disktab.c \ dlfcn.c drand48.c elf_utils.c erand48.c err.c errlst.c exec.c \ fdevname.c fmtcheck.c fmtmsg.c fnmatch.c fpclassify.c \ frexp.c fstab.c ftok.c fts.c ftw.c getbootfile.c getbsize.c \ @@ -19,8 +19,8 @@ SRCS+= _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ getnetgrent.c getobjformat.c getosreldate.c getpagesize.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c getvfsent.c glob.c \ - initgroups.c isascii.c isatty.c isctype.c isinf.c isnan.c \ - jrand48.c lcong48.c ldexp.c \ + initgroups.c isatty.c isinf.c isnan.c \ + jrand48.c lcong48.c ldexp.c libc_dlopen.c \ lockf.c lrand48.c modf.c mrand48.c msgctl.c \ msgget.c msgrcv.c msgsnd.c nftw.c nice.c \ nlist.c nrand48.c ntp_gettime.c opendir.c \ @@ -34,7 +34,7 @@ SRCS+= _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ sigsetops.c sigwait.c sleep.c srand48.c \ stringlist.c strtofflags.c sysconf.c sysctl.c sysctlbyname.c \ sysctlnametomib.c syslog.c telldir.c termios.c time.c times.c \ - toascii.c tolower.c toupper.c ttyname.c ttyslot.c \ + ttyname.c ttyslot.c \ ualarm.c ucontext.c ulimit.c uname.c unvis.c usleep.c utime.c \ utmp.c utmpx.c \ valloc.c vis.c wait.c wait3.c waitpid.c wordexp.c @@ -49,7 +49,7 @@ SRCS+= tls.c .if ${LIB} == "c" MAN+= alarm.3 arc4random.3 clock.3 \ basename.3 \ - confstr.3 ctermid.3 ctype.3 daemon.3 \ + confstr.3 ctermid.3 daemon.3 \ devname.3 directory.3 dirname.3 \ dladdr.3 dlinfo.3 dlopen.3 \ dlclose.3 dlerror.3 dlfcn.3 dlsym.3 dlvsym.3 dl_iterate_phdr.3 \ @@ -62,10 +62,8 @@ MAN+= alarm.3 arc4random.3 clock.3 \ getmntinfo.3 getnetgrent.3 getobjformat.3 getosreldate.3 \ getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ getttyent.3 getusershell.3 getvfsbyname.3 getvfsent.3 \ - glob.3 initgroups.3 isalnum.3 isalpha.3 isascii.3 isblank.3 \ - iscntrl.3 isdigit.3 isgraph.3 isgreater.3 islower.3 \ - isprint.3 ispunct.3 \ - isspace.3 isupper.3 isxdigit.3 \ + glob.3 initgroups.3 \ + isgreater.3 \ ldexp.3 lockf.3 makecontext.3 modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \ nice.3 nlist.3 pause.3 popen.3 posix_spawn.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_init.3 \ @@ -78,7 +76,7 @@ MAN+= alarm.3 arc4random.3 clock.3 \ siginterrupt.3 signal.3 sigsetops.3 sleep.3 stringlist.3 \ strtofflags.3 sysconf.3 sysctl.3 syslog.3 tcgetpgrp.3 tcgetsid.3 \ tcsendbreak.3 tcsetattr.3 tcsetpgrp.3 time.3 times.3 \ - toascii.3 tolower.3 toupper.3 ttyname.3 tzset.3 ualarm.3 \ + ttyname.3 tzset.3 ualarm.3 \ ucontext.3 ulimit.3 uname.3 unvis.3 usleep.3 utime.3 \ valloc.3 vis.3 wordexp.3 diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index df157a4c30..61a76a7226 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -468,7 +468,6 @@ DFprivate_1.0 { __libc_C_toupper_; __libc_allocate_tls; __libc_call_init; - __libc_ctype_; __libc_free_tls; #if defined(i386) __libc_tls_get_addr; diff --git a/lib/libc/stdio/fputws.c b/lib/libc/gen/_once_stub.c similarity index 56% copy from lib/libc/stdio/fputws.c copy to lib/libc/gen/_once_stub.c index 76bdf618e0..4efbafd2d2 100644 --- a/lib/libc/stdio/fputws.c +++ b/lib/libc/gen/_once_stub.c @@ -1,8 +1,6 @@ -/* $NetBSD: fputws.c,v 1.1 2003/03/07 07:11:37 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fputws.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2009 Advanced Computing Technologies LLC + * Written by: John H. Baldwin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,38 +24,41 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Original version ID: - * FreeBSD: src/lib/libc/stdio/fputws.c,v 1.4 2002/09/20 13:25:40 tjr Exp + * $FreeBSD: head/lib/libc/gen/_once_stub.c 199614 2009-11-20 20:43:34Z jhb $ */ + #include "namespace.h" -#include -#include -#include -#include +#include #include "un-namespace.h" - #include "libc_private.h" -#include "local.h" -#include "priv_stdio.h" -int -fputws(const wchar_t * __restrict ws, FILE * __restrict fp) +/* This implements pthread_once() for the single-threaded case. */ +static int +_libc_once(pthread_once_t *once_control, void (*init_routine)(void)) { - _DIAGASSERT(fp != NULL); - _DIAGASSERT(ws != NULL); - - FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); - while (*ws != '\0') { - if (__fputwc_unlock(*ws++, fp) == WEOF) { - FUNLOCKFILE(fp); - return (-1); - } - } + if (once_control->state == PTHREAD_DONE_INIT) + return (0); + init_routine(); + once_control->state = PTHREAD_DONE_INIT; + return (0); +} - FUNLOCKFILE(fp); +/* + * This is the internal interface provided to libc. It will use + * pthread_once() from the threading library in a multi-threaded + * process and _libc_once() for a single-threaded library. Because + * _libc_once() uses the same ABI for the values in the pthread_once_t + * structure as the threading library, it is safe for a process to + * switch from _libc_once() to pthread_once() when threading is + * enabled. + */ +int +_once(pthread_once_t *once_control, void (*init_routine)(void)) +{ - return (0); + if (__isthreaded) + return (_pthread_once(once_control, init_routine)); + return (_libc_once(once_control, init_routine)); } diff --git a/lib/libc/gen/ctype.c b/lib/libc/gen/ctype.c deleted file mode 100644 index 72a12a428b..0000000000 --- a/lib/libc/gen/ctype.c +++ /dev/null @@ -1,92 +0,0 @@ -/* $NetBSD: src/lib/libc/gen/ctype_.c,v 1.16 2003/08/07 16:42:46 agc Exp $ */ -/* $DragonFly: src/lib/libc/gen/ctype.c,v 1.5 2005/09/17 14:39:44 joerg Exp $ */ - -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#define _CTYPE_PRIVATE - -#include -#include -#include - -#define _U _CTYPEMASK_U -#define _L _CTYPEMASK_L -#define _D _CTYPEMASK_D -#define _S _CTYPEMASK_S -#define _P _CTYPEMASK_P -#define _C _CTYPEMASK_C -#define _X _CTYPEMASK_X -#define _B _CTYPEMASK_B -#define _A _CTYPEMASK_A -#define _G _CTYPEMASK_G -#define _R _CTYPEMASK_R - -const uint16_t __libc_C_ctype_[1 + _CTYPE_NUM_CHARS] = { - 0, -/*00*/ _C, _C, _C, _C, - _C, _C, _C, _C, - _C, _C|_S|_B, _C|_S, _C|_S, - _C|_S, _C|_S, _C, _C, -/*10*/ _C, _C, _C, _C, - _C, _C, _C, _C, - _C, _C, _C, _C, - _C, _C, _C, _C, -/*20*/ _S|_B|_R, _P|_R|_G, _P|_R|_G, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G, -/*30*/ _D|_R|_G|_X, _D|_R|_G|_X, _D|_R|_G|_X, _D|_R|_G|_X, - _D|_R|_G|_X, _D|_R|_G|_X, _D|_R|_G|_X, _D|_R|_G|_X, - _D|_R|_G|_X, _D|_R|_G|_X, _P|_R|_G, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G, -/*40*/ _P|_R|_G, _U|_X|_R|_G|_A, _U|_X|_R|_G|_A, _U|_X|_R|_G|_A, - _U|_X|_R|_G|_A, _U|_X|_R|_G|_A, _U|_X|_R|_G|_A, _U|_R|_G|_A, - _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, - _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, -/*50*/ _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, - _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, - _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G, -/*60*/ _P|_R|_G, _L|_X|_R|_G|_A, _L|_X|_R|_G|_A, _L|_X|_R|_G|_A, - _L|_X|_R|_G|_A, _L|_X|_R|_G|_A, _L|_X|_R|_G|_A, _L|_R|_G|_A, - _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, - _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, -/*70*/ _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, - _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, - _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _P|_R|_G, - _P|_R|_G, _P|_R|_G, _P|_R|_G, _C -}; - -const uint16_t *__libc_ctype_ = __libc_C_ctype_; diff --git a/lib/libc/gen/fnmatch.3 b/lib/libc/gen/fnmatch.3 index b9b1cae56f..6242e2cef2 100644 --- a/lib/libc/gen/fnmatch.3 +++ b/lib/libc/gen/fnmatch.3 @@ -28,8 +28,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95 -.\" $FreeBSD: src/lib/libc/gen/fnmatch.3,v 1.19 2007/01/09 00:27:53 imp Exp $ -.\" $DragonFly: src/lib/libc/gen/fnmatch.3,v 1.3 2006/05/26 19:39:36 swildner Exp $ +.\" $FreeBSD: head/lib/libc/gen/fnmatch.3 165903 2007-01-09 00:28:16Z imp $ .\" .Dd July 18, 2004 .Dt FNMATCH 3 diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index e6487db736..45a491bf99 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Guido van Rossum. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,10 +35,10 @@ * SUCH DAMAGE. * * @(#)fnmatch.c 8.2 (Berkeley) 4/16/94 - * $FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.18 2007/01/09 00:27:53 imp Exp $ - * $DragonFly: src/lib/libc/gen/fnmatch.c,v 1.6 2005/11/13 00:07:42 swildner Exp $ + * $FreeBSD: head/lib/libc/gen/fnmatch.c 254091 2013-08-08 09:04:02Z ache $ */ + /* * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. * Compares a filename or pathname to a pattern. @@ -65,27 +70,31 @@ #define RANGE_ERROR (-1) static int rangematch(const char *, wchar_t, int, char **, mbstate_t *); -static int fnmatch1(const char *, const char *, int, mbstate_t, mbstate_t); +static int fnmatch1(const char *, const char *, const char *, int, mbstate_t, + mbstate_t); int -fnmatch(const char *pattern, const char *string, int flags) +fnmatch(pattern, string, flags) + const char *pattern, *string; + int flags; { static const mbstate_t initial; - return (fnmatch1(pattern, string, flags, initial, initial)); + return (fnmatch1(pattern, string, string, flags, initial, initial)); } static int -fnmatch1(const char *pattern, const char *string, int flags, mbstate_t patmbs, - mbstate_t strmbs) +fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) + const char *pattern, *string, *stringstart; + int flags; + mbstate_t patmbs, strmbs; { - const char *stringstart; char *newp; char c; wchar_t pc, sc; size_t pclen, sclen; - for (stringstart = string;;) { + for (;;) { pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); @@ -139,8 +148,8 @@ fnmatch1(const char *pattern, const char *string, int flags, mbstate_t patmbs, /* General case, use recursion. */ while (sc != EOS) { - if (!fnmatch1(pattern, string, - flags & ~FNM_PERIOD, patmbs, strmbs)) + if (!fnmatch1(pattern, string, stringstart, + flags, patmbs, strmbs)) return (0); sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs); @@ -183,8 +192,6 @@ fnmatch1(const char *pattern, const char *string, int flags, mbstate_t patmbs, &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); - if (pclen == 0) - pc = '\\'; pattern += pclen; } /* FALLTHROUGH */ @@ -205,13 +212,19 @@ fnmatch1(const char *pattern, const char *string, int flags, mbstate_t patmbs, } static int -rangematch(const char *pattern, wchar_t test, int flags, char **newp, - mbstate_t *patmbs) +rangematch(pattern, test, flags, newp, patmbs) + const char *pattern; + wchar_t test; + int flags; + char **newp; + mbstate_t *patmbs; { int negate, ok; wchar_t c, c2; size_t pclen; const char *origpat; + struct xlocale_collate *table = + (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE]; /* * A bracket expression starting with an unquoted circumflex @@ -220,7 +233,7 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp, * consistency with the regular expression syntax. * J.T. Conklin (conklin@ngai.kaleida.com) */ - if ((negate = (*pattern == '!' || *pattern == '^'))) + if ( (negate = (*pattern == '!' || *pattern == '^')) ) ++pattern; if (flags & FNM_CASEFOLD) @@ -241,9 +254,8 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp, return (RANGE_ERROR); } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { return (RANGE_NOMATCH); - } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) { + } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) pattern++; - } pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (RANGE_NOMATCH); @@ -254,10 +266,9 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp, if (*pattern == '-' && *(pattern + 1) != EOS && *(pattern + 1) != ']') { - if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) { + if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) if (*pattern != EOS) pattern++; - } pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (RANGE_NOMATCH); @@ -268,17 +279,16 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp, if (flags & FNM_CASEFOLD) c2 = towlower(c2); - if (__collate_load_error ? + if (table->__collate_load_error ? c <= test && test <= c2 : - __collate_range_cmp(c, test) <= 0 - && __collate_range_cmp(test, c2) <= 0 + __collate_range_cmp(table, c, test) <= 0 + && __collate_range_cmp(table, test, c2) <= 0 ) ok = 1; - } else if (c == test) { + } else if (c == test) ok = 1; - } } - *newp = __DECONST(char *, pattern); + *newp = (char *)pattern; return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); } diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index 3c8db21844..5b249b0dd7 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -28,10 +28,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.32 2007/01/09 00:27:54 imp Exp $ -.\" $DragonFly: src/lib/libc/gen/glob.3,v 1.5 2007/06/30 19:03:52 swildner Exp $ +.\" $FreeBSD: head/lib/libc/gen/glob.3 228754 2011-12-20 22:56:13Z eadler $ .\" -.Dd December 6, 2005 +.Dd December 20, 2011 .Dt GLOB 3 .Os .Sh NAME @@ -43,7 +42,7 @@ .Sh SYNOPSIS .In glob.h .Ft int -.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob" +.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob" .Ft void .Fn globfree "glob_t *pglob" .Sh DESCRIPTION @@ -267,8 +266,6 @@ that can be coerced into a denial of service attack via patterns that expand to a very large number of matches, such as a long string of .Ql */../*/.. . -.It Dv GLOB_PERIOD -Allow matching of pathnames which start with a period. .El .Pp If, during the search, a directory is encountered that cannot be opened @@ -372,10 +369,9 @@ are undefined. .Pp If .Fn glob -terminates due to an error, it sets -.Va errno -and returns one of the -following non-zero constants, which are defined in the include file +terminates due to an error, it sets errno and returns one of the +following non-zero constants, which are defined in the include +file .In glob.h : .Bl -tag -width GLOB_NOCHECK .It Dv GLOB_NOSPACE @@ -421,7 +417,7 @@ execvp("ls", g.gl_pathv); .Sh SEE ALSO .Xr sh 1 , .Xr fnmatch 3 , -.Xr regexp 3 +.Xr regex 3 .Sh STANDARDS The current implementation of the .Fn glob @@ -463,9 +459,9 @@ may cause unchecked errors. .Pp The .Fn glob -argument may fail and set -.Va errno -for any of the errors specified for the library routines +argument +may fail and set errno for any of the errors specified for the +library routines .Xr stat 2 , .Xr closedir 3 , .Xr opendir 3 , diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 66472a60e8..cf8d616561 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Guido van Rossum. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,8 +35,7 @@ * SUCH DAMAGE. * * @(#)glob.c 8.3 (Berkeley) 10/13/93 - * $FreeBSD: src/lib/libc/gen/glob.c,v 1.27 2008/06/26 07:12:35 mtm Exp $ - * $DragonFly: src/lib/libc/gen/glob.c,v 1.6 2005/12/07 02:28:15 corecode Exp $ + * $FreeBSD: head/lib/libc/gen/glob.c 249381 2013-04-11 20:15:37Z emaste $ */ /* @@ -87,6 +91,25 @@ #include "collate.h" +/* + * glob(3) expansion limits. Stop the expansion if any of these limits + * is reached. This caps the runtime in the face of DoS attacks. See + * also CVE-2010-2632 + */ +#define GLOB_LIMIT_BRACE 128 /* number of brace calls */ +#define GLOB_LIMIT_PATH 65536 /* number of path elements */ +#define GLOB_LIMIT_READDIR 16384 /* number of readdirs */ +#define GLOB_LIMIT_STAT 1024 /* number of stat system calls */ +#define GLOB_LIMIT_STRING ARG_MAX /* maximum total size for paths */ + +struct glob_limit { + size_t l_brace_cnt; + size_t l_path_lim; + size_t l_readdir_cnt; + size_t l_stat_cnt; + size_t l_string_cnt; +}; + #define DOLLAR '$' #define DOT '.' #define EOS '\0' @@ -137,48 +160,38 @@ typedef char Char; #define ismeta(c) (((c)&M_QUOTE) != 0) -#define GLOB_LIMIT_MALLOC 65536 -#define GLOB_LIMIT_STAT 128 -#define GLOB_LIMIT_READDIR 16384 - -#define GLOB_INDEX_MALLOC 0 -#define GLOB_INDEX_STAT 1 -#define GLOB_INDEX_READDIR 2 - static int compare(const void *, const void *); static int g_Ctoc(const Char *, char *, size_t); -static int g_lstat(const Char *, struct stat *, glob_t *); -static DIR *g_opendir(const Char *, glob_t *); +static int g_lstat(Char *, struct stat *, glob_t *); +static DIR *g_opendir(Char *, glob_t *); static const Char *g_strchr(const Char *, wchar_t); #ifdef notdef static Char *g_strcat(Char *, const Char *); #endif -static int g_stat(const Char *, struct stat *, glob_t *); -static int glob0(const Char *, glob_t *, size_t *); -static int glob1(const Char *, glob_t *, size_t *); -static int glob2(Char *, Char *, Char *, const Char *, glob_t *, - size_t *); -static int glob3(Char *, Char *, Char *, const Char *, const Char *, - glob_t *, size_t *); -static int globextend(const Char *, glob_t *, size_t *); -static const Char * +static int g_stat(Char *, struct stat *, glob_t *); +static int glob0(const Char *, glob_t *, struct glob_limit *); +static int glob1(Char *, glob_t *, struct glob_limit *); +static int glob2(Char *, Char *, Char *, Char *, glob_t *, + struct glob_limit *); +static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, + struct glob_limit *); +static int globextend(const Char *, glob_t *, struct glob_limit *); +static const Char * globtilde(const Char *, Char *, size_t, glob_t *); -static int globexp1(const Char *, glob_t *, size_t *); -static int globexp2(const Char *, const Char *, glob_t *, int *, size_t *); -static int match(const Char *, const Char *, const Char *); +static int globexp1(const Char *, glob_t *, struct glob_limit *); +static int globexp2(const Char *, const Char *, glob_t *, int *, + struct glob_limit *); +static int match(Char *, Char *, Char *); #ifdef DEBUG -static void qprintf(const char *, const Char *); +static void qprintf(const char *, Char *); #endif -/* 0 = malloc(), 1 = stat(), 2 = readdir() */ -static size_t limits[] = { 0, 0, 0 }; - int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), - glob_t *pglob) +glob(const char * __restrict pattern, int flags, + int (*errfunc)(const char *, int), glob_t * __restrict pglob) { + struct glob_limit limit = { 0, 0, 0, 0, 0 }; const char *patnext; - size_t limit; Char *bufnext, *bufend, patbuf[MAXPATHLEN], prot; mbstate_t mbs; wchar_t wc; @@ -192,11 +205,10 @@ glob(const char *pattern, int flags, int (*errfunc)(const char *, int), pglob->gl_offs = 0; } if (flags & GLOB_LIMIT) { - limit = pglob->gl_matchc; - if (limit == 0) - limit = ARG_MAX; - } else - limit = 0; + limit.l_path_lim = pglob->gl_matchc; + if (limit.l_path_lim == 0) + limit.l_path_lim = GLOB_LIMIT_PATH; + } pglob->gl_flags = flags & ~GLOB_MAGCHAR; pglob->gl_errfunc = errfunc; pglob->gl_matchc = 0; @@ -238,9 +250,9 @@ glob(const char *pattern, int flags, int (*errfunc)(const char *, int), *bufnext = EOS; if (flags & GLOB_BRACE) - return globexp1(patbuf, pglob, &limit); + return (globexp1(patbuf, pglob, &limit)); else - return glob0(patbuf, pglob, &limit); + return (glob0(patbuf, pglob, &limit)); } /* @@ -249,11 +261,17 @@ glob(const char *pattern, int flags, int (*errfunc)(const char *, int), * characters */ static int -globexp1(const Char *pattern, glob_t *pglob, size_t *limit) +globexp1(const Char *pattern, glob_t *pglob, struct glob_limit *limit) { - const Char *ptr = pattern; + const Char* ptr = pattern; int rv; + if ((pglob->gl_flags & GLOB_LIMIT) && + limit->l_brace_cnt++ >= GLOB_LIMIT_BRACE) { + errno = 0; + return (GLOB_NOSPACE); + } + /* Protect a single {}, for find(1), like csh */ if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS) return glob0(pattern, pglob, limit); @@ -273,7 +291,7 @@ globexp1(const Char *pattern, glob_t *pglob, size_t *limit) */ static int globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, - size_t *limit) + struct glob_limit *limit) { int i; Char *lm, *ls; @@ -311,7 +329,7 @@ globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, /* Non matching braces; just glob the pattern */ if (i != 0 || *pe == EOS) { *rv = glob0(patbuf, pglob, limit); - return 0; + return (0); } for (i = 0, pl = pm = ptr; pm <= pe; pm++) @@ -368,7 +386,7 @@ globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, break; } *rv = 0; - return 0; + return (0); } @@ -385,7 +403,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) Char *b, *eb; if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE)) - return pattern; + return (pattern); /* * Copy up to the end of the string or / @@ -410,7 +428,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) (pwd = getpwuid(getuid())) != NULL) h = pwd->pw_dir; else - return pattern; + return (pattern); } } else { @@ -418,7 +436,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) * Expand a ~user */ if ((pwd = getpwnam((char*) patbuf)) == NULL) - return pattern; + return (pattern); else h = pwd->pw_dir; } @@ -432,7 +450,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) continue; *b = EOS; - return patbuf; + return (patbuf); } @@ -443,12 +461,12 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) * if things went well, nonzero if errors occurred. */ static int -glob0(const Char *pattern, glob_t *pglob, size_t *limit) +glob0(const Char *pattern, glob_t *pglob, struct glob_limit *limit) { const Char *qpatnext; - int c, err; + int err; size_t oldpathc; - Char *bufnext, patbuf[MAXPATHLEN]; + Char *bufnext, c, patbuf[MAXPATHLEN]; qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob); oldpathc = pglob->gl_pathc; @@ -519,31 +537,31 @@ glob0(const Char *pattern, glob_t *pglob, size_t *limit) if (((pglob->gl_flags & GLOB_NOCHECK) || ((pglob->gl_flags & GLOB_NOMAGIC) && !(pglob->gl_flags & GLOB_MAGCHAR)))) - return(globextend(pattern, pglob, limit)); + return (globextend(pattern, pglob, limit)); else - return(GLOB_NOMATCH); + return (GLOB_NOMATCH); } if (!(pglob->gl_flags & GLOB_NOSORT)) qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, pglob->gl_pathc - oldpathc, sizeof(char *), compare); - return(0); + return (0); } static int compare(const void *p, const void *q) { - return(strcmp(*(const char * const *)p, *(const char * const *)q)); + return (strcmp(*(char **)p, *(char **)q)); } static int -glob1(const Char *pattern, glob_t *pglob, size_t *limit) +glob1(Char *pattern, glob_t *pglob, struct glob_limit *limit) { Char pathbuf[MAXPATHLEN]; /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */ if (*pattern == EOS) - return(0); - return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, + return (0); + return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, pattern, pglob, limit)); } @@ -553,12 +571,11 @@ glob1(const Char *pattern, glob_t *pglob, size_t *limit) * meta characters. */ static int -glob2(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, - glob_t *pglob, size_t *limit) +glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, + glob_t *pglob, struct glob_limit *limit) { struct stat sb; - const Char *p; - Char *q; + Char *p, *q; int anymeta; /* @@ -569,16 +586,17 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, if (*pattern == EOS) { /* End of pattern? */ *pathend = EOS; if (g_lstat(pathbuf, &sb, pglob)) - return(0); + return (0); if ((pglob->gl_flags & GLOB_LIMIT) && - limits[GLOB_INDEX_STAT]++ >= GLOB_LIMIT_STAT) { + limit->l_stat_cnt++ >= GLOB_LIMIT_STAT) { errno = 0; + if (pathend + 1 > pathend_last) + return (GLOB_ABORTED); *pathend++ = SEP; *pathend = EOS; - return GLOB_NOSPACE; + return (GLOB_NOSPACE); } - if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || (S_ISLNK(sb.st_mode) && @@ -590,7 +608,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, *pathend = EOS; } ++pglob->gl_matchc; - return(globextend(pathbuf, pglob, limit)); + return (globextend(pathbuf, pglob, limit)); } /* Find end of next segment, copy tentatively to pathend. */ @@ -613,21 +631,29 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, *pathend++ = *pattern++; } } else /* Need expansion, recurse. */ - return(glob3(pathbuf, pathend, pathend_last, pattern, p, - pglob, limit)); + return (glob3(pathbuf, pathend, pathend_last, pattern, + p, pglob, limit)); } /* NOTREACHED */ } static int -glob3(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, - const Char *restpattern, glob_t *pglob, size_t *limit) +glob3(Char *pathbuf, Char *pathend, Char *pathend_last, + Char *pattern, Char *restpattern, + glob_t *pglob, struct glob_limit *limit) { struct dirent *dp; DIR *dirp; int err; char buf[MAXPATHLEN]; - struct dirent *(*readdirfunc)(DIR *); + + /* + * The readdirfunc declaration can't be prototyped, because it is + * assigned, below, to two functions which are prototyped in glob.h + * and dirent.h as taking pointers to differently typed opaque + * structures. + */ + struct dirent *(*readdirfunc)(); if (pathend > pathend_last) return (GLOB_ABORTED); @@ -643,19 +669,17 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, pglob->gl_flags & GLOB_ERR) return (GLOB_ABORTED); } - return(0); + return (0); } err = 0; - /* pglob->gl_readdir takes a void *, fix this manually. */ + /* Search directory for matching names. */ if (pglob->gl_flags & GLOB_ALTDIRFUNC) - readdirfunc = (struct dirent *(*)(DIR *))pglob->gl_readdir; + readdirfunc = pglob->gl_readdir; else readdirfunc = readdir; - - /* Search directory for matching names. */ - while ((dp = (*readdirfunc)(dirp)) != NULL) { + while ((dp = (*readdirfunc)(dirp))) { char *sc; Char *dc; wchar_t wc; @@ -663,16 +687,20 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, mbstate_t mbs; if ((pglob->gl_flags & GLOB_LIMIT) && - limits[GLOB_INDEX_READDIR]++ >= GLOB_LIMIT_READDIR) { + limit->l_readdir_cnt++ >= GLOB_LIMIT_READDIR) { errno = 0; - *pathend++ = SEP; - *pathend = EOS; - return GLOB_NOSPACE; + if (pathend + 1 > pathend_last) + err = GLOB_ABORTED; + else { + *pathend++ = SEP; + *pathend = EOS; + err = GLOB_NOSPACE; + } + break; } /* Initial DOT must be matched literally. */ - if (dp->d_name[0] == DOT && *pattern != DOT && - !(pglob->gl_flags & GLOB_PERIOD)) + if (dp->d_name[0] == DOT && *pattern != DOT) continue; memset(&mbs, 0, sizeof(mbs)); dc = pathend; @@ -702,12 +730,12 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, (*pglob->gl_closedir)(dirp); else closedir(dirp); - return(err); + return (err); } /* - * Extend the gl_pathv member of a glob_t structure to accomodate a new item, + * Extend the gl_pathv member of a glob_t structure to accommodate a new item, * add the new item, and update gl_pathc. * * This assumes the BSD realloc, which only copies the block when its size @@ -721,29 +749,24 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_last, const Char *pattern, * gl_pathv points to (gl_offs + gl_pathc + 1) items. */ static int -globextend(const Char *path, glob_t *pglob, size_t *limit) +globextend(const Char *path, glob_t *pglob, struct glob_limit *limit) { char **pathv; size_t i, newsize, len; char *copy; const Char *p; - if (*limit && pglob->gl_pathc > *limit) { + if ((pglob->gl_flags & GLOB_LIMIT) && + pglob->gl_matchc > limit->l_path_lim) { errno = 0; return (GLOB_NOSPACE); } newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); - pathv = pglob->gl_pathv ? - realloc((char *)pglob->gl_pathv, newsize) : - malloc(newsize); - if (pathv == NULL) { - if (pglob->gl_pathv) { - free(pglob->gl_pathv); - pglob->gl_pathv = NULL; - } - return(GLOB_NOSPACE); - } + /* realloc(NULL, newsize) is equivalent to malloc(newsize). */ + pathv = realloc((void *)pglob->gl_pathv, newsize); + if (pathv == NULL) + return (GLOB_NOSPACE); if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { /* first time around -- clear initial gl_offs items */ @@ -756,7 +779,12 @@ globextend(const Char *path, glob_t *pglob, size_t *limit) for (p = path; *p++;) continue; len = MB_CUR_MAX * (size_t)(p - path); /* XXX overallocation */ - limits[GLOB_INDEX_MALLOC] += len; + limit->l_string_cnt += len; + if ((pglob->gl_flags & GLOB_LIMIT) && + limit->l_string_cnt >= GLOB_LIMIT_STRING) { + errno = 0; + return (GLOB_NOSPACE); + } if ((copy = malloc(len)) != NULL) { if (g_Ctoc(path, copy, len)) { free(copy); @@ -765,13 +793,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limit) pathv[pglob->gl_offs + pglob->gl_pathc++] = copy; } pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; - if ((pglob->gl_flags & GLOB_LIMIT) && - (newsize + limits[GLOB_INDEX_MALLOC]) >= GLOB_LIMIT_MALLOC) { - errno = 0; - return GLOB_NOSPACE; - } - - return(copy == NULL ? GLOB_NOSPACE : 0); + return (copy == NULL ? GLOB_NOSPACE : 0); } /* @@ -779,53 +801,55 @@ globextend(const Char *path, glob_t *pglob, size_t *limit) * pattern causes a recursion level. */ static int -match(const Char * name, const Char *pat, const Char *patend) +match(Char *name, Char *pat, Char *patend) { int ok, negate_range; Char c, k; + struct xlocale_collate *table = + (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE]; while (pat < patend) { c = *pat++; switch (c & M_MASK) { case M_ALL: if (pat == patend) - return(1); + return (1); do if (match(name, pat, patend)) - return(1); + return (1); while (*name++ != EOS); - return(0); + return (0); case M_ONE: if (*name++ == EOS) - return(0); + return (0); break; case M_SET: ok = 0; if ((k = *name++) == EOS) - return(0); + return (0); if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) ++pat; while (((c = *pat++) & M_MASK) != M_END) if ((*pat & M_MASK) == M_RNG) { - if (__collate_load_error ? + if (table->__collate_load_error ? CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) : - __collate_range_cmp(CHAR(c), CHAR(k)) <= 0 - && __collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0 + __collate_range_cmp(table, CHAR(c), CHAR(k)) <= 0 + && __collate_range_cmp(table, CHAR(k), CHAR(pat[1])) <= 0 ) ok = 1; pat += 2; } else if (c == k) ok = 1; if (ok == negate_range) - return(0); + return (0); break; default: if (*name++ != c) - return(0); + return (0); break; } } - return(*name == EOS); + return (*name == EOS); } /* Free allocated data belonging to a glob_t structure. */ @@ -846,23 +870,25 @@ globfree(glob_t *pglob) } static DIR * -g_opendir(const Char *str, glob_t *pglob) +g_opendir(Char *str, glob_t *pglob) { char buf[MAXPATHLEN]; - if (*str == '\0') + if (!*str) strcpy(buf, "."); - else if (g_Ctoc(str, buf, sizeof(buf))) - return (NULL); + else { + if (g_Ctoc(str, buf, sizeof(buf))) + return (NULL); + } if (pglob->gl_flags & GLOB_ALTDIRFUNC) - return((*pglob->gl_opendir)(buf)); + return ((*pglob->gl_opendir)(buf)); - return(opendir(buf)); + return (opendir(buf)); } static int -g_lstat(const Char *fn, struct stat *sb, glob_t *pglob) +g_lstat(Char *fn, struct stat *sb, glob_t *pglob) { char buf[MAXPATHLEN]; @@ -872,11 +898,11 @@ g_lstat(const Char *fn, struct stat *sb, glob_t *pglob) } if (pglob->gl_flags & GLOB_ALTDIRFUNC) return((*pglob->gl_lstat)(buf, sb)); - return(lstat(buf, sb)); + return (lstat(buf, sb)); } static int -g_stat(const Char *fn, struct stat *sb, glob_t *pglob) +g_stat(Char *fn, struct stat *sb, glob_t *pglob) { char buf[MAXPATHLEN]; @@ -885,19 +911,19 @@ g_stat(const Char *fn, struct stat *sb, glob_t *pglob) return (-1); } if (pglob->gl_flags & GLOB_ALTDIRFUNC) - return((*pglob->gl_stat)(buf, sb)); - return(stat(buf, sb)); + return ((*pglob->gl_stat)(buf, sb)); + return (stat(buf, sb)); } static const Char * g_strchr(const Char *str, wchar_t ch) { - for (;; ++str) { + + do { if (*str == ch) - return(str); - if (*str == '\0') - return(NULL); - } + return (str); + } while (*str++); + return (NULL); } static int @@ -922,19 +948,19 @@ g_Ctoc(const Char *str, char *buf, size_t len) #ifdef DEBUG static void -qprintf(const char *str, const Char *s) +qprintf(const char *str, Char *s) { - const Char *p; + Char *p; - printf("%s:\n", str); + (void)printf("%s:\n", str); for (p = s; *p; p++) - printf("%c", CHAR(*p)); - printf("\n"); + (void)printf("%c", CHAR(*p)); + (void)printf("\n"); for (p = s; *p; p++) - printf("%c", *p & M_PROTECT ? '"' : ' '); - printf("\n"); + (void)printf("%c", *p & M_PROTECT ? '"' : ' '); + (void)printf("\n"); for (p = s; *p; p++) - printf("%c", ismeta(*p) ? '_' : ' '); - printf("\n"); + (void)printf("%c", ismeta(*p) ? '_' : ' '); + (void)printf("\n"); } #endif diff --git a/lib/libc/gen/isascii.c b/lib/libc/gen/isascii.c deleted file mode 100644 index 0cf56e47d2..0000000000 --- a/lib/libc/gen/isascii.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $NetBSD: src/lib/libc/gen/isascii.c,v 1.2 2003/08/07 16:42:51 agc Exp $ */ -/* $DragonFly: src/lib/libc/gen/isascii.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)isctype.c 5.2 (Berkeley) 6/1/90 - */ - -#include - -#undef isascii -int -isascii(int c) -{ - return ((unsigned)(c) <= 0177); -} diff --git a/lib/libc/gen/isgraph.3 b/lib/libc/gen/isgraph.3 deleted file mode 100644 index eeae96f4d8..0000000000 --- a/lib/libc/gen/isgraph.3 +++ /dev/null @@ -1,94 +0,0 @@ -.\" Copyright (c) 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" This code is derived from software contributed to Berkeley by -.\" the American National Standards Committee X3, on Information -.\" Processing Systems. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/isgraph.3,v 1.7.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isgraph.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ -.\" -.Dd December 11, 1993 -.Dt ISGRAPH 3 -.Os -.Sh NAME -.Nm isgraph -.Nd printing character test (space character exclusive) -.Sh LIBRARY -.Lb libc -.Sh SYNOPSIS -.In ctype.h -.Ft int -.Fn isgraph "int c" -.Sh DESCRIPTION -The -.Fn isgraph -function tests for any printing character except space. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char -or the value of -.Dv EOF . -In the ASCII character set, this includes the following characters -(with their numeric values shown in octal): -.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''" -.It "\&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''" -.It "\&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''" -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.It "\&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''" -.It "\&077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B'' \t103\ ``C''" -.It "\&104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G'' \t110\ ``H''" -.It "\&111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L'' \t115\ ``M''" -.It "\&116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q'' \t122\ ``R''" -.It "\&123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V'' \t127\ ``W''" -.It "\&130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``['' \t134\ ``\e\|''" -.It "\&135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```'' \t141\ ``a''" -.It "\&142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e'' \t146\ ``f''" -.It "\&147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j'' \t153\ ``k''" -.It "\&154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o'' \t160\ ``p''" -.It "\&161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t'' \t165\ ``u''" -.It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''" -.It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" -.El -.Sh RETURN VALUES -The -.Fn isgraph -function returns zero if the character tests false and -returns non-zero if the character tests true. -.Sh SEE ALSO -.Xr ctype 3 , -.Xr ascii 7 -.Sh STANDARDS -The -.Fn isgraph -function conforms to -.St -isoC . diff --git a/lib/libc/stdio/getwc.c b/lib/libc/gen/libc_dlopen.c similarity index 74% copy from lib/libc/stdio/getwc.c copy to lib/libc/gen/libc_dlopen.c index 4eb88d0e5c..d2f00f0e4c 100644 --- a/lib/libc/stdio/getwc.c +++ b/lib/libc/gen/libc_dlopen.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2011 Xin Li * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,26 +23,28 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/getwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/getwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/gen/libc_dlopen.c 228843 2011-12-23 15:00:37Z cperciva $ */ -#include "namespace.h" -#include -#include -#include "un-namespace.h" -#include "libc_private.h" -#include "local.h" +#include +#include +#include -#undef getwc +#include "libc_private.h" /* - * Synonym for fgetwc(). The only difference is that getwc(), if it is a - * macro, may evaluate `fp' more than once. + * Whether we want to restrict dlopen()s. */ -wint_t -getwc(FILE *fp) +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) { - return (fgetwc(fp)); + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); } + diff --git a/lib/libc/gen/tolower.c b/lib/libc/gen/tolower.c deleted file mode 100644 index e266132ead..0000000000 --- a/lib/libc/gen/tolower.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: src/lib/libc/gen/tolower_.c,v 1.9 2003/07/26 19:24:45 salo Exp $ */ -/* $DragonFly: src/lib/libc/gen/tolower.c,v 1.2 2005/07/07 07:17:47 dillon Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include -#include - -#if EOF != -1 -#error "EOF != -1" -#endif - -const int16_t __libc_C_tolower_[1 + 256] = { - EOF, - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff -}; - -const int16_t *__libc_tolower_tab_ = __libc_C_tolower_; - -#undef tolower -int -tolower(int c) -{ - return(__libc_ctype_convert(__libc_tolower_tab_, c)); -} diff --git a/lib/libc/gen/toupper.c b/lib/libc/gen/toupper.c deleted file mode 100644 index 7a095fd9e7..0000000000 --- a/lib/libc/gen/toupper.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: src/lib/libc/gen/toupper_.c,v 1.9 2003/07/26 19:24:45 salo Exp $ */ -/* $DragonFly: src/lib/libc/gen/toupper.c,v 1.2 2005/07/07 07:17:47 dillon Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include -#include - -#if EOF != -1 -#error "EOF != -1" -#endif - -const int16_t __libc_C_toupper_[1 + 256] = { - EOF, - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff -}; - -const int16_t *__libc_toupper_tab_ = __libc_C_toupper_; - -#undef toupper -int -toupper(int c) -{ - return(__libc_ctype_convert(__libc_toupper_tab_, c)); -} diff --git a/lib/libc/iconv/Makefile.inc b/lib/libc/iconv/Makefile.inc index 2aaf36373f..c9e014faa8 100644 --- a/lib/libc/iconv/Makefile.inc +++ b/lib/libc/iconv/Makefile.inc @@ -1,11 +1,18 @@ -# $DragonFly: src/lib/libc/iconv/Makefile.inc,v 1.2 2005/04/29 21:23:42 joerg Exp $ - .PATH: ${.CURDIR}/../libc/iconv CMAPS+= ${.CURDIR}/iconv/Symbol.map SRCS+= iconv.c + +# To establish libiconv functions as weak aliases, uncomment next line +# CFLAGS+= -D__LIBICONV_COMPAT=1 + .if ${LIB} == "c" -MAN+= iconv.3 -MLINKS+=iconv.3 iconv_open.3 iconv.3 iconv_close.3 +MAN+= iconv.3 iconvctl.3 iconv_canonicalize.3 iconvlist.3 __iconv_get_list.3 +MLINKS+=iconv.3 iconvctl.3 +MLINKS+=iconv.3 iconv_open.3 +MLINKS+=iconv.3 iconv_open_into.3 +MLINKS+=iconv.3 iconv_close.3 +MLINKS+=iconv.3 __iconv.3 +MLINKS+=__iconv_get_list.3 __iconv_free_list.3 .endif diff --git a/lib/libc/iconv/Symbol.map b/lib/libc/iconv/Symbol.map index a6fa70b341..d9ec281eb1 100644 --- a/lib/libc/iconv/Symbol.map +++ b/lib/libc/iconv/Symbol.map @@ -1,14 +1,14 @@ DF306.0 { + _iconv_version; iconv; + iconv_canonicalize; iconv_close; iconv_open; + iconv_open_into; + iconv_set_relocation_prefix; + iconvctl; + iconvlist; }; DFprivate_1.0 { - __iconv; - __iconv_free_list; - __iconv_get_list; - _iconv; - _iconv_close; - _iconv_open; }; diff --git a/usr.bin/mkcsmapper/mkcsmapper.1 b/lib/libc/iconv/__iconv_get_list.3 similarity index 60% copy from usr.bin/mkcsmapper/mkcsmapper.1 copy to lib/libc/iconv/__iconv_get_list.3 index 5b751daf82..d781841896 100644 --- a/usr.bin/mkcsmapper/mkcsmapper.1 +++ b/lib/libc/iconv/__iconv_get_list.3 @@ -30,61 +30,66 @@ .\" event of any discrepancy between this version and the original IEEE and .\" The Open Group Standard, the original IEEE and The Open Group Standard is .\" the referee document. The original Standard can be obtained online at -.\" http://www.opengroup.org/unix/online.html. +.\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD: src/usr.bin/mkcsmapper/mkcsmapper.1,v 1.2 2011/05/25 14:13:53 ru Exp $ +.\" $FreeBSD: head/lib/libc/iconv/__iconv_get_list.3 219019 2011-02-25 00:04:39Z gabor $ .\" -.Dd June 2, 2011 -.Dt MKCSMAPPER 1 +.Dd September 19, 2013 +.Dt __ICONV_GET_LIST 3 .Os .Sh NAME -.Nm mkcsmapper -.Nd generates hashed conversion data for +.Nm __iconv_get_list +.Nm __iconv_free_list +.Nd retrieving a list of character encodings supported by .Xr iconv 3 +.Sh LIBRARY +.Lb libc .Sh SYNOPSIS -.Nm -.Op Fl mpd -.Fl o -.Ar outfile -.Ar infile +.In iconv.h +.Ft int +.Fn __iconv_get_list "char ***names" "size_t count" "bool paired" +.Ft void +.Fn __iconv_free_list "char **names" "size_t count" .Sh DESCRIPTION The -.Nm -utility generates binary conversion data from plain text conversion tables -for the +.Fn __iconv_get_list +function obtains a list of character encodings that are supported by the .Xr iconv 3 -library. -The conversion data has two components: -The conversion mapping between specific character encodings. -A pivot file, which the possible source and destination encoding -pairs or the set of mappings to use for a compound encoding. +call. +The list of the encoding names will be stored in +.Fa names +and the number of the entries is stored in +.Fa count . +If the +.Fa paired +variable is true, the list will be arranged into +canonical/alias name pairs. .Pp -The following options are available: -.Bl -tag -width 0123 -.It Fl d -Turns on debug mode. -.It Fl m -Generate mapping data from -.Ar infile . -.It Fl o Ar outfile -Put generated binary data to -.Ar outfile . -.It Fl p -Generate pivot data from -.Ar outfile . -.El -.Sh EXIT STATUS -.Ex -std mkcsmapper +The +.Fn __iconv_free_list +function is to free the allocated memory during the call of +.Fn __iconv_get_list . +.Sh RETURN VALUES +Upon successful completion +.Fn __iconv_get_list +returns 0 and set the +.Fa names +and +.Fa count +arguments. +Otherwise, \-1 is returned and errno is set to indicate the error. .Sh SEE ALSO -.Xr iconv 1 , -.Xr mkesdb 1 , -.Xr iconv 3 -.Sh HISTORY -.Nm -first appeared in -.Nx 2.0 -and was ported to -.Dx 1.1 . +.Xr iconv 3 , +.Xr iconvlist 3 +.Sh STANDARDS +The +.Nm __iconv_get_list +and +.Nm __iconv_free_list +functions are non-standard interfaces, which appeared in +the implementation of the Citrus Project. +The iconv implementation of the Citrus Project was adopted in +.Fx 9 . .Sh AUTHORS This manual page was written by -.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org . +.An Gabor Kovesdan Aq gabor@FreeBSD.org . diff --git a/lib/libc/iconv/iconv.3 b/lib/libc/iconv/iconv.3 index 1db6cb77d0..08ea72f748 100644 --- a/lib/libc/iconv/iconv.3 +++ b/lib/libc/iconv/iconv.3 @@ -1,7 +1,8 @@ -.\" $NetBSD: src/lib/libc/iconv/iconv.3,v 1.12 2004/08/02 13:38:21 tshiozak Exp $ -.\" $DragonFly: src/lib/libc/iconv/iconv.3,v 1.2 2007/06/30 19:03:52 swildner Exp $ +.\" $FreeBSD: head/lib/libc/iconv/iconv.3 233509 2012-03-26 14:56:23Z joel $ +.\" $NetBSD: iconv.3,v 1.12 2004/08/02 13:38:21 tshiozak Exp $ .\" -.\" Copyright (c)2003 Citrus Project, +.\" Copyright (c) 2003 Citrus Project, +.\" Copyright (c) 2009, 2010 Gabor Kovesdan , .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,28 +26,29 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2004 +.Dd September 19, 2013 .Dt ICONV 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm iconv_open , +.Nm iconv_open_into , .Nm iconv_close , .Nm iconv .Nd codeset conversion functions -.\" ---------------------------------------------------------------------- .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In iconv.h .Ft iconv_t .Fn iconv_open "const char *dstname" "const char *srcname" .Ft int +.Fn iconv_open_into "const char *dstname" "const char *srcname" "iconv_allocation_t *ptr" +.Ft int .Fn iconv_close "iconv_t cd" .Ft size_t .Fn iconv "iconv_t cd" "char ** restrict src" "size_t * restrict srcleft" "char ** restrict dst" "size_t * restrict dstleft" -.\" ---------------------------------------------------------------------- +.Ft size_t +.Fn __iconv "iconv_t cd" "const char ** restrict src" "size_t * restrict srcleft" "char ** restrict dst" "size_t * restrict dstleft" "uint32_t flags" "size_t invalids" .Sh DESCRIPTION The .Fn iconv_open @@ -55,6 +57,29 @@ function opens a converter from the codeset to the codeset .Fa dstname and returns its descriptor. +The arguments +.Fa srcname +and +.Fa dstname +accept "" and "char", which refer to the current locale encoding. +.Pp +The +.Fn iconv_open_into +creates a conversion descriptor on a preallocated space. +The +.Ft iconv_allocation_t +is used as a spaceholder type when allocating such space. +The +.Fa dstname +and +.Fa srcname +arguments are the same as in the case of +.Fn iconv_open . +The +.Fa ptr +argument is a pointer of +.Ft iconv_allocation_t +to the preallocated space. .Pp The .Fn iconv_close @@ -123,7 +148,6 @@ There are two special cases of .Fn iconv : .Bl -tag -width 0123 .It "src == NULL || *src == NULL" -.\" If the source and/or destination codesets are stateful, .Fn iconv places these into their initial state. @@ -152,26 +176,47 @@ may be .Dv NULL . In this case, the shift sequence for the destination switching to the initial state is discarded. +.Pp +.El +The +.Fn __iconv +function works just like +.Fn iconv +but if +.Fn iconv +fails, the invalid character count is lost there. +This is a not bug rather a limitation of +.St -p1003.1-2008 , +so +.Fn __iconv +is provided as an alternative but non-standard interface. +It also has a flags argument, where currently the following +flags can be passed: +.Bl -tag -width 0123 +.It __ICONV_F_HIDE_INVALID +Skip invalid characters, instead of returning with an error. .El -.\" ---------------------------------------------------------------------- .Sh RETURN VALUES Upon successful completion of .Fn iconv_open , it returns a conversion descriptor. Otherwise, .Fn iconv_open -returns (iconv_t)\-1 and sets -.Va errno -to indicate the error. +returns (iconv_t)\-1 and sets errno to indicate the error. +.Pp +Upon successful completion of +.Fn iconv_open_into , +it returns 0. +Otherwise, +.Fn iconv_open_into +returns \-1, and sets errno to indicate the error. .Pp Upon successful completion of .Fn iconv_close , it returns 0. Otherwise, .Fn iconv_close -returns \-1 and sets -.Va errno -to indicate the error. +returns \-1 and sets errno to indicate the error. .Pp Upon successful completion of .Fn iconv , @@ -180,10 +225,7 @@ it returns the number of conversions. Otherwise, .Fn iconv -returns (size_t)\-1 and sets -.Va errno -to indicate the error. -.\" ---------------------------------------------------------------------- +returns (size_t)\-1 and sets errno to indicate the error. .Sh ERRORS The .Fn iconv_open @@ -197,6 +239,16 @@ There is no converter specified by and .Fa dstname . .El +The +.Fn iconv_open_into +function may cause an error in the following cases: +.Bl -tag -width Er +.It Bq Er EINVAL +There is no converter specified by +.Fa srcname +and +.Fa dstname . +.El .Pp The .Fn iconv_close @@ -230,22 +282,24 @@ The string pointed to by .Fa *src terminates with an incomplete character or shift sequence. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO -.Xr iconv 1 -.\" ---------------------------------------------------------------------- +.Xr iconv 1 , +.Xr mkcsmapper 1 , +.Xr mkesdb 1 .Sh STANDARDS +The .Fn iconv_open , .Fn iconv_close , and .Fn iconv -conform to -.St -p1003.1-2001 . -.\" ---------------------------------------------------------------------- -.Sh BUGS -If -.Fn iconv -is aborted due to the occurrence of some error, -the -.Dq invalid conversion -count mentioned above is unfortunately lost. +functions conform to +.St -p1003.1-2008 . +.Pp +The +.Fn iconv_open_into +function is a GNU-specific extension and it is not part of any standard, +thus its use may break portability. +The +.Fn __iconv +function is an own extension and it is not part of any standard, +thus its use may break portability. diff --git a/lib/libc/iconv/iconv.c b/lib/libc/iconv/iconv.c index 40a3b8de6a..97cc648471 100644 --- a/lib/libc/iconv/iconv.c +++ b/lib/libc/iconv/iconv.c @@ -1,8 +1,9 @@ -/* $NetBSD: src/lib/libc/iconv/iconv.c,v 1.4 2004/08/02 13:38:21 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/iconv/iconv.c,v 1.3 2005/11/23 08:50:34 swildner Exp $ */ +/* $FreeBSD: head/lib/libc/iconv/iconv.c 254273 2013-08-13 07:15:01Z peter $ */ +/* $NetBSD: iconv.c,v 1.11 2009/03/03 16:22:33 explorer Exp $ */ /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2009, 2010 Gabor Kovesdan , * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,40 +28,100 @@ * SUCH DAMAGE. */ -#include -#include -#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include -#include #include "../citrus/citrus_types.h" #include "../citrus/citrus_module.h" #include "../citrus/citrus_esdb.h" #include "../citrus/citrus_hash.h" #include "../citrus/citrus_iconv.h" +#ifdef __LIBICONV_COMPAT +__weak_reference(iconv, libiconv); +__weak_reference(iconv_open, libiconv_open); +__weak_reference(iconv_open_into, libiconv_open_into); +__weak_reference(iconv_close, libiconv_close); +__weak_reference(iconvlist, libiconvlist); +__weak_reference(iconvctl, libiconvctl); +__weak_reference(iconv_set_relocation_prefix, libiconv_set_relocation_prefix); +__weak_reference(_iconv_version, _libiconv_version); +#endif + #define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) +int _iconv_version = _ICONV_VERSION; + +iconv_t _iconv_open(const char *out, const char *in, + struct _citrus_iconv *prealloc); + iconv_t -_iconv_open(const char *out, const char *in) +_iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) { + const char *out_slashes; + char *out_noslashes; int ret; - struct _citrus_iconv *handle; - ret = _citrus_iconv_open(&handle, _PATH_ICONV, in, out); + /* + * Remove anything following a //, as these are options (like + * //ignore, //translate, etc) and we just don't handle them. + * This is for compatibility with software that uses these + * blindly. + */ + out_slashes = strstr(out, "//"); + if (out_slashes != NULL) { + out_noslashes = strndup(out, out_slashes - out); + if (out_noslashes == NULL) { + errno = ENOMEM; + return ((iconv_t)-1); + } + ret = _citrus_iconv_open(&handle, in, out_noslashes); + free(out_noslashes); + } else { + ret = _citrus_iconv_open(&handle, in, out); + } + if (ret) { - errno = ret; + errno = ret == ENOENT ? EINVAL : ret; return ((iconv_t)-1); } + handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_hooks = NULL; + return ((iconv_t)(void *)handle); } +iconv_t +iconv_open(const char *out, const char *in) +{ + + return (_iconv_open(out, in, NULL)); +} + +int +iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) +{ + struct _citrus_iconv *handle; + + handle = (struct _citrus_iconv *)ptr; + return ((_iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); +} + int -_iconv_close(iconv_t handle) +iconv_close(iconv_t handle) { + if (ISBADF(handle)) { errno = EBADF; return (-1); @@ -72,19 +133,18 @@ _iconv_close(iconv_t handle) } size_t -_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) { - int err; size_t ret; + int err; if (ISBADF(handle)) { errno = EBADF; return ((size_t)-1); } - err = _citrus_iconv_convert( - (struct _citrus_iconv *)(void *)handle, in, szin, out, szout, - 0, &ret); + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, 0, &ret); if (err) { errno = err; ret = (size_t)-1; @@ -95,19 +155,18 @@ _iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) size_t __iconv(iconv_t handle, const char **in, size_t *szin, char **out, - size_t *szout, u_int32_t flags, size_t *invalids) + size_t *szout, uint32_t flags, size_t *invalids) { - int err; size_t ret; + int err; if (ISBADF(handle)) { errno = EBADF; return ((size_t)-1); } - err = _citrus_iconv_convert( - (struct _citrus_iconv *)(void *)handle, in, szin, out, szout, - flags, &ret); + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, flags, &ret); if (invalids) *invalids = ret; if (err) { @@ -119,25 +178,149 @@ __iconv(iconv_t handle, const char **in, size_t *szin, char **out, } int -__iconv_get_list(char ***rlist, size_t *rsz) +__iconv_get_list(char ***rlist, size_t *rsz, bool sorted) { int ret; - ret = _citrus_esdb_get_list(rlist, rsz); + ret = _citrus_esdb_get_list(rlist, rsz, sorted); if (ret) { errno = ret; - return -1; + return (-1); } - return 0; + return (0); } void __iconv_free_list(char **list, size_t sz) { + _citrus_esdb_free_list(list, sz); } -__weak_reference(_iconv, iconv); -__weak_reference(_iconv_open, iconv_open); -__weak_reference(_iconv_close, iconv_close); +/* + * GNU-compatibile non-standard interfaces. + */ +static int +qsort_helper(const void *first, const void *second) +{ + const char * const *s1; + const char * const *s2; + + s1 = first; + s2 = second; + return (strcmp(*s1, *s2)); +} + +void +iconvlist(int (*do_one) (unsigned int, const char * const *, + void *), void *data) +{ + char **list, **names; + const char * const *np; + char *curitem, *curkey, *slashpos; + size_t sz; + unsigned int i, j; + + i = 0; + + if (__iconv_get_list(&list, &sz, true)) + list = NULL; + qsort((void *)list, sz, sizeof(char *), qsort_helper); + while (i < sz) { + j = 0; + slashpos = strchr(list[i], '/'); + curkey = (char *)malloc(slashpos - list[i] + 2); + names = (char **)malloc(sz * sizeof(char *)); + if ((curkey == NULL) || (names == NULL)) { + __iconv_free_list(list, sz); + return; + } + strlcpy(curkey, list[i], slashpos - list[i] + 1); + names[j++] = strdup(curkey); + for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { + slashpos = strchr(list[i], '/'); + curitem = (char *)malloc(strlen(slashpos) + 1); + if (curitem == NULL) { + __iconv_free_list(list, sz); + return; + } + strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1); + if (strcmp(curkey, curitem) == 0) { + continue; + } + names[j++] = strdup(curitem); + } + np = (const char * const *)names; + do_one(j, np, data); + free(names); + } + + __iconv_free_list(list, sz); +} + +__inline const char +*iconv_canonicalize(const char *name) +{ + + return (_citrus_iconv_canonicalize(name)); +} + +int +iconvctl(iconv_t cd, int request, void *argument) +{ + struct _citrus_iconv *cv; + struct iconv_hooks *hooks; + const char *convname; + char src[PATH_MAX], *dst; + int *i; + + cv = (struct _citrus_iconv *)(void *)cd; + hooks = (struct iconv_hooks *)argument; + i = (int *)argument; + + if (ISBADF(cd)) { + errno = EBADF; + return (-1); + } + + switch (request) { + case ICONV_TRIVIALP: + convname = cv->cv_shared->ci_convname; + dst = strchr(convname, '/'); + + strlcpy(src, convname, dst - convname + 1); + dst++; + if ((convname == NULL) || (src == NULL) || (dst == NULL)) + return (-1); + *i = strcmp(src, dst) == 0 ? 1 : 0; + return (0); + case ICONV_GET_TRANSLITERATE: + *i = 1; + return (0); + case ICONV_SET_TRANSLITERATE: + return ((*i == 1) ? 0 : -1); + case ICONV_GET_DISCARD_ILSEQ: + *i = cv->cv_shared->ci_discard_ilseq ? 1 : 0; + return (0); + case ICONV_SET_DISCARD_ILSEQ: + cv->cv_shared->ci_discard_ilseq = *i; + return (0); + case ICONV_SET_HOOKS: + cv->cv_shared->ci_hooks = hooks; + return (0); + case ICONV_SET_FALLBACKS: + errno = EOPNOTSUPP; + return (-1); + default: + errno = EINVAL; + return (-1); + } +} + +void +iconv_set_relocation_prefix(const char *orig_prefix __unused, + const char *curr_prefix __unused) +{ + +} diff --git a/usr.bin/mkcsmapper/mkcsmapper.1 b/lib/libc/iconv/iconv_canonicalize.3 similarity index 66% copy from usr.bin/mkcsmapper/mkcsmapper.1 copy to lib/libc/iconv/iconv_canonicalize.3 index 5b751daf82..99c460b673 100644 --- a/usr.bin/mkcsmapper/mkcsmapper.1 +++ b/lib/libc/iconv/iconv_canonicalize.3 @@ -30,61 +30,45 @@ .\" event of any discrepancy between this version and the original IEEE and .\" The Open Group Standard, the original IEEE and The Open Group Standard is .\" the referee document. The original Standard can be obtained online at -.\" http://www.opengroup.org/unix/online.html. +.\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD: src/usr.bin/mkcsmapper/mkcsmapper.1,v 1.2 2011/05/25 14:13:53 ru Exp $ +.\" $FreeBSD: head/lib/libc/iconv/iconv_canonicalize.3 219019 2011-02-25 00:04:39Z gabor $ .\" -.Dd June 2, 2011 -.Dt MKCSMAPPER 1 +.Dd September 19, 2013 +.Dt ICONV_CANONICALIZE 3 .Os .Sh NAME -.Nm mkcsmapper -.Nd generates hashed conversion data for -.Xr iconv 3 +.Nm iconv_canonicalize +.Nd resolving character encoding names to canonical form +.Sh LIBRARY +.Lb libc .Sh SYNOPSIS -.Nm -.Op Fl mpd -.Fl o -.Ar outfile -.Ar infile +.In iconv.h +.Ft const char * +.Fn iconv_canonicalize "const char *name" .Sh DESCRIPTION The -.Nm -utility generates binary conversion data from plain text conversion tables -for the -.Xr iconv 3 -library. -The conversion data has two components: -The conversion mapping between specific character encodings. -A pivot file, which the possible source and destination encoding -pairs or the set of mappings to use for a compound encoding. -.Pp -The following options are available: -.Bl -tag -width 0123 -.It Fl d -Turns on debug mode. -.It Fl m -Generate mapping data from -.Ar infile . -.It Fl o Ar outfile -Put generated binary data to -.Ar outfile . -.It Fl p -Generate pivot data from -.Ar outfile . -.El -.Sh EXIT STATUS -.Ex -std mkcsmapper +.Fn iconv_canonicalize +function resolves the character encoding name specified by the +.Fa name +argument to its canonical form. +.Sh RETURN VALUES +Upon successful completion +.Fn iconv_canonicalize , +returns the canonical name of the given encoding. +If the specified name is already a canonical name, the same +value is returned. +If the specified name is not an existing character encoding +name, NULL is returned. .Sh SEE ALSO -.Xr iconv 1 , -.Xr mkesdb 1 , .Xr iconv 3 -.Sh HISTORY +.Sh STANDARDS +The .Nm -first appeared in -.Nx 2.0 -and was ported to -.Dx 1.1 . +function is a non-standard extension, which appeared in +the GNU implementation and was adopted in +.Fx 9 +for compatibility's sake. .Sh AUTHORS This manual page was written by -.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org . +.An Gabor Kovesdan Aq gabor@FreeBSD.org . diff --git a/lib/libc/iconv/iconvctl.3 b/lib/libc/iconv/iconvctl.3 new file mode 100644 index 0000000000..b196c23fad --- /dev/null +++ b/lib/libc/iconv/iconvctl.3 @@ -0,0 +1,164 @@ +.\" Copyright (c) 2009 Gabor Kovesdan +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- +.\" Portable Operating System Interface (POSIX), The Open Group Base +.\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of +.\" Electrical and Electronics Engineers, Inc and The Open Group. In the +.\" event of any discrepancy between this version and the original IEEE and +.\" The Open Group Standard, the original IEEE and The Open Group Standard is +.\" the referee document. The original Standard can be obtained online at +.\" http://www.opengroup.org/unix/online.html. +.\" +.\" $FreeBSD: head/lib/libc/iconv/iconvctl.3 233577 2012-03-27 20:50:14Z joel $ +.\" +.Dd September 19, 2013 +.Dt ICONVCTL 3 +.Os +.Sh NAME +.Nm iconvctl +.Nd controlling and diagnostical facility for +.Xr iconv 3 +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In iconv.h +.Ft int +.Fn iconvctl "iconv_t cd" "int request" "void *argument" +.Sh DESCRIPTION +The +.Fn iconvctl +function can retrieve or set specific conversion +setting from the +.Fa cd +conversion descriptor. +The +.Fa request +parameter specifies the operation to accomplish and +.Fa argument +is an operation-specific argument. +.Pp +The possible operations are the following: +.Bl -tag -width indent +.It ICONV_TRIVIALP +In this case +.Fa argument +is an +.Ft int * +variable, which is set to 1 if the encoding is trivial one, i.e. +the input and output encodings are the same. +Otherwise, the variable will be 0. +.It ICONV_GET_TRANSLITERATE +Determines if transliteration is enabled. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_TRANSLITERATE +Enables transliteration if +.Fa argument , +which is of +.Ft int * +set to 1 or disables it if +.Fa argument +is set to 0. +.It ICONV_GET_DISCARD_ILSEQ +Determines if illegal sequences are discarded or not. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_DISCARD_ILSEQ +Sets whether illegal sequences are discarded or not. +.Fa argument , +which is of +.Ft int * +set to 1 or disables it if +.Fa argument +is set to 0. +.It ICONV_SET_HOOKS +Sets callback functions, which will be called back after successful +conversions. +The callback functions are stored in a +.Ft struct iconv_hooks +variable, which is passed to +.Nm +via +.Fa argument +by its address. +.El +.\" XXX: fallbacks are unimplemented and trying to set them will always +.\" return EOPNOTSUPP but definitions are provided for source-level +.\" compatibility. +.\".It ICONV_SET_FALLBACKS +.\"Sets callback functions, which will be called back after failed +.\"conversions. +.\"The callback functions are stored in a +.\".Ft struct iconv_fallbacks +.\"variable, which is passed to +.\".Nm +.\"via +.\".Fa argument +.\"by its address. +.Sh RETURN VALUES +Upon successful completion +.Fn iconvctl , +returns 0. +Otherwise, \-1 is returned and errno is set to +specify the kind of error. +.Sh ERRORS +The +.Fn iconvctl +function may cause an error in the following cases: +.Bl -tag -width Er +.It Bq Er EINVAL +Unknown or unimplemented operation. +.It Bq Er EBADF +The conversion descriptor specified by +.Fa cd +is invalid. +.El +.Sh SEE ALSO +.Xr iconv 1 , +.Xr iconv 3 +.Sh STANDARDS +The +.Nm +facility is a non-standard extension, which appeared in +the GNU implementation and was adopted in +.Fx 9 +for compatibility's sake. +.Sh AUTHORS +This manual page was written by +.An Gabor Kovesdan Aq gabor@FreeBSD.org . +.Sh BUGS +Transliteration is enabled in this implementation by default, so it +is impossible by design to turn it off. +Accordingly, trying to turn it off will always fail and \-1 will be +returned. +Getting the transliteration state will always succeed and indicate +that it is turned on, though. diff --git a/usr.bin/mkcsmapper/mkcsmapper.1 b/lib/libc/iconv/iconvlist.3 similarity index 63% copy from usr.bin/mkcsmapper/mkcsmapper.1 copy to lib/libc/iconv/iconvlist.3 index 5b751daf82..167c13ea11 100644 --- a/usr.bin/mkcsmapper/mkcsmapper.1 +++ b/lib/libc/iconv/iconvlist.3 @@ -30,61 +30,64 @@ .\" event of any discrepancy between this version and the original IEEE and .\" The Open Group Standard, the original IEEE and The Open Group Standard is .\" the referee document. The original Standard can be obtained online at -.\" http://www.opengroup.org/unix/online.html. +.\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD: src/usr.bin/mkcsmapper/mkcsmapper.1,v 1.2 2011/05/25 14:13:53 ru Exp $ +.\" $FreeBSD: head/lib/libc/iconv/iconvlist.3 233625 2012-03-28 19:20:28Z joel $ .\" -.Dd June 2, 2011 -.Dt MKCSMAPPER 1 +.Dd September 19, 2013 +.Dt ICONVLIST 3 .Os .Sh NAME -.Nm mkcsmapper -.Nd generates hashed conversion data for +.Nm iconvlist +.Nd retrieving a list of character encodings supported by .Xr iconv 3 +.Sh LIBRARY +.Lb libc .Sh SYNOPSIS -.Nm -.Op Fl mpd -.Fl o -.Ar outfile -.Ar infile +.In iconv.h +.Ft void +.Fo iconvlist +.Fa "int \*[lp]*do_one\*[rp]\*[lp]unsigned int *count, const char * const *names, void *arg\*[rp]" +.Fa "void *arg" +.Fc .Sh DESCRIPTION The -.Nm -utility generates binary conversion data from plain text conversion tables -for the +.Fn iconvlist +function obtains a list of character encodings that are supported by the .Xr iconv 3 -library. -The conversion data has two components: -The conversion mapping between specific character encodings. -A pivot file, which the possible source and destination encoding -pairs or the set of mappings to use for a compound encoding. +call. +The +.Fn do_one +callback function will be called, where the +.Fa count +argument will be set to the number of the encoding names found, the +.Fa names +argument will be the list of the supported encoding names and the +.Fa arg +argument will be the \"outer\" +.Fa arg +argument of the +.Fn iconvlist +function. +This argument can be used to interchange custom data between the caller of +.Fn iconvlist +and the callback function. .Pp -The following options are available: -.Bl -tag -width 0123 -.It Fl d -Turns on debug mode. -.It Fl m -Generate mapping data from -.Ar infile . -.It Fl o Ar outfile -Put generated binary data to -.Ar outfile . -.It Fl p -Generate pivot data from -.Ar outfile . -.El -.Sh EXIT STATUS -.Ex -std mkcsmapper +If an error occurs, +.Fa names +will be NULL when calling +.Fn do_one . .Sh SEE ALSO -.Xr iconv 1 , -.Xr mkesdb 1 , -.Xr iconv 3 -.Sh HISTORY +.Xr iconv 3 , +.Xr __iconv_get_list 3 , +.Xr __iconv_free_list 3 +.Sh STANDARDS +The .Nm -first appeared in -.Nx 2.0 -and was ported to -.Dx 1.1 . +function is a non-standard extension, which appeared in +the GNU implementation and was adopted in +.Fx 9 +for compatibility's sake. .Sh AUTHORS This manual page was written by -.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org . +.An Gabor Kovesdan Aq gabor@FreeBSD.org . diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index dcceee1afe..fbdc9cc43f 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -35,6 +35,8 @@ #ifndef _LIBC_PRIVATE_H_ #define _LIBC_PRIVATE_H_ +#include + /* * This global flag is non-zero when a process has created one * or more threads. It is used to avoid calling locking functions @@ -94,4 +96,21 @@ void _nmalloc_thr_init(void); struct dl_phdr_info; int __elf_phdr_match_addr(struct dl_phdr_info *, void *); +/* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker + */ +void _rtld_error(const char *fmt, ...); + +/* + * Provides pthread_once()-like functionality for both single-threaded + * and multi-threaded applications + */ +int _once(pthread_once_t *, void (*)(void)); + #endif /* _LIBC_PRIVATE_H_ */ diff --git a/lib/libc/locale/DESIGN.xlocale b/lib/libc/locale/DESIGN.xlocale new file mode 100644 index 0000000000..e5bff978b7 --- /dev/null +++ b/lib/libc/locale/DESIGN.xlocale @@ -0,0 +1,159 @@ +$FreeBSD: head/lib/libc/locale/DESIGN.xlocale 227753 2011-11-20 14:45:42Z theraven $ + +Design of xlocale +================= + +The xlocale APIs come from Darwin, although a subset is now part of POSIX 2008. +They fall into two broad categories: + +- Manipulation of per-thread locales (POSIX) +- Locale-aware functions taking an explicit locale argument (Darwin) + +This document describes the implementation of these APIs for FreeBSD. + +Goals +----- + +The overall goal of this implementation is to be compatible with the Darwin +version. Additionally, it should include minimal changes to the existing +locale code. A lot of the existing locale code originates with 4BSD or earlier +and has had over a decade of testing. Replacing this code, unless absolutely +necessary, gives us the potential for more bugs without much benefit. + +With this in mind, various libc-private functions have been modified to take a +locale_t parameter. This causes a compiler error if they are accidentally +called without a locale. This approach was taken, rather than adding _l +variants of these functions, to make it harder for accidental uses of the +global-locale versions to slip in. + +Locale Objects +-------------- + +A locale is encapsulated in a `locale_t`, which is an opaque type: a pointer to +a `struct _xlocale`. The name `_xlocale` is unfortunate, as it does not fit +well with existing conventions, but is used because this is the name the Darwin +implementation gives to this structure and so may be used by existing (bad) code. + +This structure should include all of the information corresponding to a locale. +A locale_t is almost immutable after creation. There are no functions that modify it, +and it can therefore be used without locking. It is the responsibility of the +caller to ensure that a locale is not deallocated during a call that uses it. + +Each locale contains a number of components, one for each of the categories +supported by `setlocale()`. These are likewise immutable after creation. This +differs from the Darwin implementation, which includes a deprecated +`setinvalidrune()` function that can modify the rune locale. + +The exception to these mutability rules is a set of `mbstate_t` flags stored +with each locale. These are used by various functions that previously had a +static local `mbstate_t` variable. + +The components are reference counted, and so can be aliased between locale +objects. This makes copying locales very cheap. + +The Global Locale +----------------- + +All locales and locale components are reference counted. The global locale, +however, is special. It, and all of its components, are static and so no +malloc() memory is required when using a single locale. + +This means that threads using the global locale are subject to the same +constraints as with the pre-xlocale libc. Calls to any locale-aware functions +in threads using the global locale, while modifying the global locale, have +undefined behaviour. + +Because of this, we have to ensure that we always copy the components of the +global locale, rather than alias them. + +It would be cleaner to simply remove the special treatment of the global locale +and have a locale_t lazily allocated for the global context. This would cost a +little more `malloc()` memory, so is not done in the initial version. + +Caching +------- + +The existing locale implementation included several ad-hoc caching layers. +None of these were thread safe. Caching is only really of use for supporting +the pattern where the locale is briefly changed to something and then changed +back. + +The current xlocale implementation removes the caching entirely. This pattern +is not one that should be encouraged. If you need to make some calls with a +modified locale, then you should use the _l suffix versions of the calls, +rather than switch the global locale. If you do need to temporarily switch the +locale and then switch it back, `uselocale()` provides a way of doing this very +easily: It returns the old locale, which can then be passed to a subsequent +call to `uselocale()` to restore it, without the need to load any locale data +from the disk. + +If, in the future, it is determined that caching is beneficial, it can be added +quite easily in xlocale.c. Given, however, that any locale-aware call is going +to be a preparation for presenting data to the user, and so is invariably going +to be part of an I/O operation, this seems like a case of premature +optimisation. + +localeconv +---------- + +The `localeconv()` function is an exception to the immutable-after-creation +rule. In the classic implementation, this function returns a pointer to some +global storage, which is initialised with the data from the current locale. +This is not possible in a multithreaded environment, with multiple locales. + +Instead, each locale contains a `struct lconv` that is lazily initialised on +calls to `localeconv()`. This is not protected by any locking, however this is +still safe on any machine where word-sized stores are atomic: two concurrent +calls will write the same data into the structure. + +Explicit Locale Calls +--------------------- + +A large number of functions have been modified to take an explicit `locale_t` +parameter. The old APIs are then reimplemented with a call to `__get_locale()` +to supply the `locale_t` parameter. This is in line with the Darwin public +APIs, but also simplifies the modifications to these functions. The +`__get_locale()` function is now the only way to access the current locale +within libc. All of the old globals have gone, so there is now a linker error +if any functions attempt to use them. + +The ctype.h functions are a little different. These are not implemented in +terms of their locale-aware versions, for performance reasons. Each of these +is implemented as a short inline function. + +Differences to Darwin APIs +-------------------------- + +`strtoq_l()` and `strtouq_l() `are not provided. These are extensions to +deprecated functions - we should not be encouraging people to use deprecated +interfaces. + +Locale Placeholders +------------------- + +The pointer values 0 and -1 have special meanings as `locale_t` values. Any +public function that accepts a `locale_t` parameter must use the `FIX_LOCALE()` +macro on it before using it. For efficiency, this can be emitted in functions +which *only* use their locale parameter as an argument to another public +function, as the callee will do the `FIX_LOCALE()` itself. + +Potential Improvements +---------------------- + +Currently, the current rune set is accessed via a function call. This makes it +fairly expensive to use any of the ctype.h functions. We could improve this +quite a lot by storing the rune locale data in a __thread-qualified variable. + +Several of the existing FreeBSD locale-aware functions appear to be wrong. For +example, most of the `strto*()` family should probably use `digittoint_l()`, +but instead they assume ASCII. These will break if using a character encoding +that does not put numbers and the letters A-F in the same location as ASCII. +Some functions, like `strcoll()` only work on single-byte encodings. No +attempt has been made to fix existing limitations in the libc functions other +than to add support for xlocale. + +Intuitively, setting a thread-local locale should ensure that all locale-aware +functions can be used safely from that thread. In fact, this is not the case +in either this implementation or the Darwin one. You must call `duplocale()` +or `newlocale()` before calling `uselocale()`. This is a bit ugly, and it +would be better if libc ensure that every thread had its own locale object. diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc index ded2600d0f..7a7ceab736 100644 --- a/lib/libc/locale/Makefile.inc +++ b/lib/libc/locale/Makefile.inc @@ -1,35 +1,86 @@ -# $DragonFly: src/lib/libc/locale/Makefile.inc,v 1.13 2008/05/31 04:51:55 swildner Exp $ +# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 +# $FreeBSD: head/lib/libc/locale/Makefile.inc 251314 2013-06-03 17:17:56Z ed $ .PATH: ${.CURDIR}/../libc/locale CMAPS+= ${.CURDIR}/locale/Symbol.map -SRCS+= collate.c collcmp.c -SRCS+= _def_messages.c _def_monetary.c _def_numeric.c _def_time.c -SRCS+= localeconv.c nl_langinfo.c setlocale.c __mb_cur_max.c -SRCS+= wcsftime.c wcstod.c wcstof.c wcstol.c wcstold.c -SRCS+= wcstoll.c wcstoimax.c wcstoul.c -SRCS+= wcstoull.c wcstoumax.c aliasname.c -SRCS+= ___runetype_mb.c _wctrans.c iswctype.c multibyte_c90.c -SRCS+= multibyte_amd1.c rune.c runeglue.c runetable.c setrunelocale.c +SRCS+= ascii.c big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c \ + gb18030.c gb2312.c gbk.c ctype.c isctype.c iswctype.c \ + ldpart.c lmessages.c lmonetary.c lnumeric.c localeconv.c mblen.c \ + mbrlen.c \ + mbrtowc.c mbsinit.c mbsnrtowcs.c \ + mbsrtowcs.c mbtowc.c mbstowcs.c \ + mskanji.c nextwctype.c nl_langinfo.c nomacros.c none.c rpmatch.c \ + rune.c \ + runetype.c setlocale.c setrunelocale.c \ + table.c \ + tolower.c toupper.c utf8.c wcrtomb.c wcsnrtombs.c \ + wcsrtombs.c wcsftime.c \ + wcstof.c wcstod.c \ + wcstoimax.c wcstol.c wcstold.c wcstoll.c \ + wcstombs.c \ + wcstoul.c wcstoull.c wcstoumax.c wctob.c wctomb.c wctrans.c wctype.c \ + wcwidth.c\ + xlocale.c -CFLAGS+= -I${.CURDIR}/../libc/locale +SRCS+= c16rtomb_iconv.c c32rtomb_iconv.c mbrtoc16_iconv.c mbrtoc32_iconv.c .if ${LIB} == "c" -MAN+= nl_langinfo.3 setlocale.3 -MAN+= btowc.3 iswalnum.3 iswctype.3 towlower.3 towctrans.3 mblen.3 mbrlen.3 -MAN+= mbrtowc.3 mbsinit.3 mbsrtowcs.3 mbstowcs.3 mbtowc.3 wcrtomb.3 -MAN+= wcsftime.3 wcstod.3 wcstol.3 wcsrtombs.3 wcstombs.3 -MAN+= wctob.3 wctomb.3 wctrans.3 wctype.3 wcwidth.3 +MAN+= btowc.3 \ + ctype_l.3 \ + ctype.3 digittoint.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \ + isdigit.3 isgraph.3 isideogram.3 islower.3 isphonogram.3 isprint.3 \ + ispunct.3 isrune.3 isspace.3 isspecial.3 \ + isupper.3 iswalnum.3 iswalnum_l.3 isxdigit.3 \ + localeconv.3 mblen.3 mbrlen.3 \ + mbrtowc.3 \ + mbsinit.3 \ + mbsrtowcs.3 mbstowcs.3 mbtowc.3 multibyte.3 \ + nextwctype.3 nl_langinfo.3 rpmatch.3 \ + setlocale.3 toascii.3 tolower.3 toupper.3 towlower.3 towupper.3 \ + wcsftime.3 \ + wcrtomb.3 \ + wcsrtombs.3 wcstod.3 wcstol.3 wcstombs.3 wctomb.3 \ + wctrans.3 wctype.3 wcwidth.3 \ + duplocale.3 freelocale.3 newlocale.3 querylocale.3 uselocale.3 xlocale.3 -MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswblank.3 -MLINKS+=iswalnum.3 iswcntrl.3 iswalnum.3 iswdigit.3 -MLINKS+=iswalnum.3 iswgraph.3 iswalnum.3 iswlower.3 -MLINKS+=iswalnum.3 iswprint.3 iswalnum.3 iswpunct.3 -MLINKS+=iswalnum.3 iswspace.3 iswalnum.3 iswupper.3 -MLINKS+=iswalnum.3 iswxdigit.3 towlower.3 towupper.3 -MLINKS+=setlocale.3 localeconv.3 +MAN+= big5.5 euc.5 gb18030.5 gb2312.5 gbk.5 mskanji.5 utf8.5 + +MLINKS+=btowc.3 wctob.3 +MLINKS+=isdigit.3 isnumber.3 +MLINKS+=isgraph.3 isgraph_l.3 +MLINKS+=islower.3 islower_l.3 +MLINKS+=ispunct.3 ispunct_l.3 +MLINKS+=isspace.3 isspace_l.3 +MLINKS+=nl_langinfo.3 nl_langinfo_l.3 +MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswascii.3 iswalnum.3 iswblank.3 \ + iswalnum.3 iswcntrl.3 iswalnum.3 iswdigit.3 iswalnum.3 iswgraph.3 \ + iswalnum.3 iswhexnumber.3 \ + iswalnum.3 iswideogram.3 iswalnum.3 iswlower.3 iswalnum.3 iswnumber.3 \ + iswalnum.3 iswphonogram.3 iswalnum.3 iswprint.3 iswalnum.3 iswpunct.3 \ + iswalnum.3 iswrune.3 iswalnum.3 iswspace.3 iswalnum.3 iswspecial.3 \ + iswalnum.3 iswupper.3 iswalnum.3 iswxdigit.3 +MLINKS+=iswalnum_l.3 iswalpha_l.3 iswalnum_l.3 iswcntrl_l.3 \ + iswalnum_l.3 iswctype_l.3 iswalnum_l.3 iswdigit_l.3 \ + iswalnum_l.3 iswgraph_l.3 iswalnum_l.3 iswlower_l.3 \ + iswalnum_l.3 iswprint_l.3 iswalnum_l.3 iswpunct_l.3 \ + iswalnum_l.3 iswspace_l.3 iswalnum_l.3 iswupper_l.3 \ + iswalnum_l.3 iswxdigit_l.3 iswalnum_l.3 towlower_l.3 \ + iswalnum_l.3 towupper_l.3 iswalnum_l.3 wctype_l.3 \ + iswalnum_l.3 iswblank_l.3 iswalnum_l.3 iswhexnumber_l.3 \ + iswalnum_l.3 iswideogram_l.3 iswalnum_l.3 iswnumber_l.3 \ + iswalnum_l.3 iswphonogram_l.3 iswalnum_l.3 iswrune_l.3 \ + iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \ + iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3 +MLINKS+=isxdigit.3 ishexnumber.3 +MLINKS+=mbrtowc.3 mbrtoc16.3 mbrtowc.3 mbrtoc32.3 +MLINKS+=mbsrtowcs.3 mbsnrtowcs.3 +MLINKS+=wcrtomb.3 c16rtomb.3 wcrtomb.3 c32rtomb.3 +MLINKS+=wcsrtombs.3 wcsnrtombs.3 MLINKS+=wcstod.3 wcstof.3 wcstod.3 wcstold.3 -MLINKS+=wcstol.3 wcstoul.3 wcstol.3 wcstoll.3 wcstol.3 wcstoull.3 -MLINKS+=wcstol.3 wcstoimax.3 wcstol.3 wcstoumax.3 +MLINKS+=wcstol.3 wcstoul.3 wcstol.3 wcstoll.3 wcstol.3 wcstoull.3 \ + wcstol.3 wcstoimax.3 wcstol.3 wcstoumax.3 +MLINKS+=wctrans.3 towctrans.3 +MLINKS+=wctype.3 iswctype.3 .endif diff --git a/lib/libc/locale/Symbol.map b/lib/libc/locale/Symbol.map index 46f2c016ad..f53795c1b5 100644 --- a/lib/libc/locale/Symbol.map +++ b/lib/libc/locale/Symbol.map @@ -1,102 +1,208 @@ DF306.0 { + _CurrentRuneLocale; + _DefaultRuneLocale; + _ThreadRuneLocale; + ___mb_cur_max; + ___mb_cur_max_l; + ___runetype; + ___runetype_l; + ___tolower; + ___tolower_l; + ___toupper; + ___toupper_l; + __getCurrentRuneLocale; + __isctype; + __istype; + __istype_l; + __maskrune; + __maskrune_l; + __mb_cur_max; + __mb_sb_limit; + __runes_for_locale; + __sbistype; + __sbistype_l; + __sbmaskrune; + __sbmaskrune_l; + __sbtolower; + __sbtoupper; + __tolower; + __toupper; + __wcwidth; btowc; + btowc_l; + c16rtomb; + c16rtomb_l; + c32rtomb; + c32rtomb_l; + digittoint; + digittoint_l; + duplocale; + freelocale; isalnum; + isalnum_l; isalpha; + isalpha_l; isascii; isblank; + isblank_l; iscntrl; + iscntrl_l; isdigit; + isdigit_l; isgraph; + isgraph_l; + ishexnumber; + ishexnumber_l; + isideogram; + isideogram_l; islower; + islower_l; + isnumber; + isnumber_l; + isphonogram; + isphonogram_l; isprint; + isprint_l; ispunct; + ispunct_l; + isrune; + isrune_l; isspace; + isspace_l; + isspecial; + isspecial_l; isupper; - isxdigit; - toascii; - tolower; - toupper; + isupper_l; iswalnum; + iswalnum_l; iswalpha; + iswalpha_l; + iswascii; iswblank; + iswblank_l; iswcntrl; + iswcntrl_l; + iswctype; + iswctype_l; iswdigit; + iswdigit_l; iswgraph; + iswgraph_l; + iswhexnumber; + iswhexnumber_l; + iswideogram; + iswideogram_l; iswlower; + iswlower_l; + iswnumber; + iswnumber_l; + iswphonogram; + iswphonogram_l; iswprint; + iswprint_l; iswpunct; + iswpunct_l; + iswrune; + iswrune_l; iswspace; + iswspace_l; + iswspecial; + iswspecial_l; iswupper; + iswupper_l; iswxdigit; - towlower; - towupper; + iswxdigit_l; + isxdigit; + isxdigit_l; localeconv; + localeconv_l; mblen; + mblen_l; mbrlen; + mbrlen_l; + mbrtoc16; + mbrtoc16_l; + mbrtoc32; + mbrtoc32_l; mbrtowc; + mbrtowc_l; mbsinit; + mbsinit_l; + mbsnrtowcs; + mbsnrtowcs_l; mbsrtowcs; + mbsrtowcs_l; mbstowcs; + mbstowcs_l; mbtowc; + mbtowc_l; + newlocale; + nextwctype; + nextwctype_l; nl_langinfo; - __mb_cur_max; + nl_langinfo_l; + querylocale; + rpmatch; setlocale; - _DefaultRuneLocale; - _CurrentRuneLocale; + strcoll_l; + strfmon_l; + strftime_l; + strptime_l; + strxfrm_l; + toascii; + tolower; + tolower_l; + toupper; + toupper_l; + towctrans; + towctrans_l; + towlower; + towlower_l; + towupper; + towupper_l; + uselocale; wcrtomb; + wcrtomb_l; + wcscoll_l; wcsftime; + wcsftime_l; + wcsnrtombs; + wcsnrtombs_l; wcsrtombs; + wcsrtombs_l; wcstod; + wcstod_l; wcstof; + wcstof_l; wcstoimax; + wcstoimax_l; wcstol; + wcstol_l; wcstold; + wcstold_l; wcstoll; + wcstoll_l; wcstombs; + wcstombs_l; wcstoul; + wcstoul_l; wcstoull; + wcstoull_l; wcstoumax; + wcstoumax_l; + wcsxfrm_l; wctob; + wctob_l; wctomb; - towctrans; + wctomb_l; wctrans; - iswctype; + wctrans_l; wctype; + wctype_l; wcwidth; -}; - DFprivate_1.0 { - ___runetype_mb; - __collate_chain_pri_table; - __collate_char_pri_table_ptr; - __collate_err; + _PathLocale; + __detect_path_locale; __collate_load_error; - __collate_load_tables; - __collate_lookup; __collate_range_cmp; - __collate_strdup; - __collate_substitute; - __collate_substitute_nontrivial; - __collate_substitute_table_ptr; - __mb_len_max_runtime; - __mlocale_changed; - __nlocale_changed; - __runetable_to_netbsd_ctype; - __unaliasname; - _NukeRune; - _Read_RuneMagi; - _CurrentMessagesLocale; - _CurrentMonetaryLocale; - _CurrentNumericLocale; - _CurrentTimeLocale; - _DefaultMessagesLocale; - _DefaultMonetaryLocale; - _DefaultNumericLocale; - _DefaultTimeLocale; - _PathLocale; - _findrunelocale; - _newrunelocale; - _towctrans_ext; - _wctrans_init; - _xpg4_setrunelocale; }; diff --git a/lib/libc/locale/__mb_cur_max.c b/lib/libc/locale/__mb_cur_max.c deleted file mode 100644 index dbd0e95a16..0000000000 --- a/lib/libc/locale/__mb_cur_max.c +++ /dev/null @@ -1,34 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/__mb_cur_max.c,v 1.2 2001/01/25 01:25:06 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/__mb_cur_max.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -size_t __mb_cur_max = 1; -size_t __mb_len_max_runtime = MB_LEN_MAX; diff --git a/lib/libc/locale/__wctoint.h b/lib/libc/locale/__wctoint.h deleted file mode 100644 index 5d3953e875..0000000000 --- a/lib/libc/locale/__wctoint.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/__wctoint.h,v 1.1 2001/09/28 11:25:37 yamt Exp $ */ -/* $DragonFly: src/lib/libc/locale/__wctoint.h,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2001 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Citrus: xpg4dl/FreeBSD/lib/libc/locale/__wctoint.h,v 1.1 2001/09/21 13:52:32 yamt Exp $ - */ - - -static __inline int -__wctoint(wchar_t wc) -{ - int n; - - /* XXX I expect compiler to optimize this. :D */ - switch (wc) { - case L'0': n = 0; break; - case L'1': n = 1; break; - case L'2': n = 2; break; - case L'3': n = 3; break; - case L'4': n = 4; break; - case L'5': n = 5; break; - case L'6': n = 6; break; - case L'7': n = 7; break; - case L'8': n = 8; break; - case L'9': n = 9; break; - case L'A': case L'a': n = 10; break; - case L'B': case L'b': n = 11; break; - case L'C': case L'c': n = 12; break; - case L'D': case L'd': n = 13; break; - case L'E': case L'e': n = 14; break; - case L'F': case L'f': n = 15; break; - case L'G': case L'g': n = 16; break; - case L'H': case L'h': n = 17; break; - case L'I': case L'i': n = 18; break; - case L'J': case L'j': n = 19; break; - case L'K': case L'k': n = 20; break; - case L'L': case L'l': n = 21; break; - case L'M': case L'm': n = 22; break; - case L'N': case L'n': n = 23; break; - case L'O': case L'o': n = 24; break; - case L'P': case L'p': n = 25; break; - case L'Q': case L'q': n = 26; break; - case L'R': case L'r': n = 27; break; - case L'S': case L's': n = 28; break; - case L'T': case L't': n = 29; break; - case L'U': case L'u': n = 30; break; - case L'V': case L'v': n = 31; break; - case L'W': case L'w': n = 32; break; - case L'X': case L'x': n = 33; break; - case L'Y': case L'y': n = 34; break; - case L'Z': case L'z': n = 35; break; - default: n = -1; break; /* error */ - } - - return(n); -} diff --git a/lib/libc/locale/_def_messages.c b/lib/libc/locale/_def_messages.c deleted file mode 100644 index 43cfd2d7a8..0000000000 --- a/lib/libc/locale/_def_messages.c +++ /dev/null @@ -1,19 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_def_messages.c,v 1.5 2003/07/26 19:24:45 salo Exp $ */ -/* $DragonFly: src/lib/libc/locale/_def_messages.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include - -const _MessagesLocale _DefaultMessagesLocale = { - "^[Yy]", - "^[Nn]", - "yes", - "no" -}; - -const _MessagesLocale *_CurrentMessagesLocale = &_DefaultMessagesLocale; diff --git a/lib/libc/locale/_def_monetary.c b/lib/libc/locale/_def_monetary.c deleted file mode 100644 index fbed774c87..0000000000 --- a/lib/libc/locale/_def_monetary.c +++ /dev/null @@ -1,37 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_def_monetary.c,v 1.7 2003/07/26 19:24:46 salo Exp $ */ -/* $DragonFly: src/lib/libc/locale/_def_monetary.c,v 1.1 2005/04/21 16:36:34 joerg Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include -#include - -const _MonetaryLocale _DefaultMonetaryLocale = { - "", - "", - "", - "", - "", - "", - "", - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX, - (char)CHAR_MAX -}; - -const _MonetaryLocale *_CurrentMonetaryLocale = &_DefaultMonetaryLocale; diff --git a/lib/libc/locale/_def_numeric.c b/lib/libc/locale/_def_numeric.c deleted file mode 100644 index 3b5e190d8c..0000000000 --- a/lib/libc/locale/_def_numeric.c +++ /dev/null @@ -1,18 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_def_numeric.c,v 1.5 2003/07/26 19:24:46 salo Exp $ */ -/* $DragonFly: src/lib/libc/locale/_def_numeric.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include - -const _NumericLocale _DefaultNumericLocale = { - ".", - "", - "" -}; - -const _NumericLocale *_CurrentNumericLocale = &_DefaultNumericLocale; diff --git a/lib/libc/locale/_def_time.c b/lib/libc/locale/_def_time.c deleted file mode 100644 index b4536252be..0000000000 --- a/lib/libc/locale/_def_time.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_def_time.c,v 1.7 2003/07/26 19:24:46 salo Exp $ */ -/* $DragonFly: src/lib/libc/locale/_def_time.c,v 1.2 2005/04/21 16:36:34 joerg Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include -#include - -const _TimeLocale _DefaultTimeLocale = { - { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, - { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday" }, - { "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }, - { "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" }, - { "AM", "PM" }, - "%a %b %e %H:%M:%S %Y", - "%m/%d/%y", - "%H:%M:%S", - "%I:%M:%S %p", - "%a %b %e %H:%M:%S %Z %Y" -}; - -const _TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale; diff --git a/lib/libc/locale/_wcstod.h b/lib/libc/locale/_wcstod.h deleted file mode 100644 index 2b7b429816..0000000000 --- a/lib/libc/locale/_wcstod.h +++ /dev/null @@ -1,126 +0,0 @@ -/* $NetBSD: _wcstod.h,v 1.1 2006/04/15 12:17:23 tnozaki Exp $ */ - -/*- - * Copyright (c) 2002 Tim J. Robbins - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Original version ID: - * FreeBSD: /repoman/r/ncvs/src/lib/libc/locale/wcstod.c,v 1.4 2004/04/07 09:47:56 tjr Exp - * NetBSD: wcstod.c,v 1.8 2006/04/13 01:25:13 tnozaki Exp - */ - -/* - * function template for wcstof, wcstod, wcstold. - * - * parameters: - * _FUNCNAME : function name - * _RETURN_TYPE : return type - * _STRTOD_FUNC : real conversion function - */ -#ifndef __WCSTOD_H_ -#define __WCSTOD_H_ - -/* - * Convert a string to a double-precision number. - * - * This is the wide-character counterpart of strto{f,d,ld}(). So that - * we do not have to duplicate the code of strto{f,d,ld}() here, - * we convert the supplied wide character string to multibyte and - * call strto{f,d,ld}() on the result. - * This assumes that the multibyte encoding is compatible with ASCII - * for at least the digits, radix character and letters. - */ -_RETURN_TYPE -_FUNCNAME(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr) -{ - const wchar_t *src, *start; - _RETURN_TYPE val; - char *buf, *end; - size_t bufsiz, len; - - _DIAGASSERT(nptr != NULL); - /* endptr may be null */ - - src = nptr; - while (iswspace((wint_t)*src) != 0) - ++src; - if (*src == L'\0') - goto no_convert; - - /* - * Convert the supplied numeric wide char. string to multibyte. - * - * We could attempt to find the end of the numeric portion of the - * wide char. string to avoid converting unneeded characters but - * choose not to bother; optimising the uncommon case where - * the input string contains a lot of text after the number - * duplicates a lot of strto{f,d,ld}()'s functionality and - * slows down the most common cases. - */ - start = src; - len = wcstombs(NULL, src, 0); - if (len == (size_t)-1) - /* errno = EILSEQ */ - goto no_convert; - - _DIAGASSERT(len > 0); - - bufsiz = len; - buf = (void *)malloc(bufsiz + 1); - if (buf == NULL) - /* errno = ENOMEM */ - goto no_convert; - - len = wcstombs(buf, src, bufsiz + 1); - - _DIAGASSERT(len == bufsiz); - _DIAGASSERT(buf[len] == '\0'); - - /* Let strto{f,d,ld}() do most of the work for us. */ - val = _STRTOD_FUNC(buf, &end); - if (buf == end) { - free(buf); - goto no_convert; - } - - /* - * We only know where the number ended in the _multibyte_ - * representation of the string. If the caller wants to know - * where it ended, count multibyte characters to find the - * corresponding position in the wide char string. - */ - if (endptr != NULL) - /* XXX Assume each wide char is one byte. */ - *endptr = __DECONST(wchar_t *, start + (size_t)(end - buf)); - - free(buf); - - return val; - -no_convert: - if (endptr != NULL) - *endptr = __DECONST(wchar_t *, nptr); - return 0; -} -#endif /*__WCSTOD_H_*/ diff --git a/lib/libc/locale/_wctrans.c b/lib/libc/locale/_wctrans.c deleted file mode 100644 index d6ac55fca0..0000000000 --- a/lib/libc/locale/_wctrans.c +++ /dev/null @@ -1,106 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_wctrans.c,v 1.5 2003/08/07 16:43:03 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/_wctrans.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include "rune.h" -#include "rune_local.h" -#include "_wctrans_local.h" - -/* - * _wctrans_init: - */ - -void -_wctrans_init(_RuneLocale *rl) -{ - rl->rl_wctrans[_WCTRANS_INDEX_LOWER].te_name = "tolower"; - rl->rl_wctrans[_WCTRANS_INDEX_LOWER].te_cached = rl->rl_maplower; - rl->rl_wctrans[_WCTRANS_INDEX_LOWER].te_extmap = &rl->rl_maplower_ext; - rl->rl_wctrans[_WCTRANS_INDEX_UPPER].te_name = "toupper"; - rl->rl_wctrans[_WCTRANS_INDEX_UPPER].te_cached = rl->rl_mapupper; - rl->rl_wctrans[_WCTRANS_INDEX_UPPER].te_extmap = &rl->rl_mapupper_ext; -} - -/* - * _wctrans_ext: - * translate a character (extended part) - */ -wint_t -_towctrans_ext(wint_t c, struct _WCTransEntry *te) -{ - uint32_t x; - _RuneRange *rr = te->te_extmap; - _RuneEntry *re = rr->rr_rune_ranges; - - if (c == WEOF) - return(c); - - for (x = 0; x < rr->rr_nranges; ++x, ++re) { - /* XXX assumes wchar_t = int */ - if ((__rune_t)c < re->re_min) - return(c); - if ((__rune_t)c <= re->re_max) - return(re->re_map + (__rune_t)c - re->re_min); - } - return(c); -} diff --git a/lib/libc/locale/_wctrans_local.h b/lib/libc/locale/_wctrans_local.h deleted file mode 100644 index 1ae0405b0e..0000000000 --- a/lib/libc/locale/_wctrans_local.h +++ /dev/null @@ -1,61 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/_wctrans_local.h,v 1.2 2003/04/06 18:33:23 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/_wctrans_local.h,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _WCTRANS_LOCAL_H_ -#define _WCTRANS_LOCAL_H_ - -wint_t _towctrans_ext(wint_t, _WCTransEntry *); -void _wctrans_init(_RuneLocale *); - -static __inline wint_t -_towctrans(wint_t c, _WCTransEntry *te) -{ - if (_RUNE_ISCACHED(c)) - return(te->te_cached[(__nbrune_t)c]); - else - return(_towctrans_ext(c, te)); -} - -static __inline struct _WCTransEntry * -_wctrans_lower(_RuneLocale *rl) -{ - if (rl->rl_wctrans[_WCTRANS_INDEX_LOWER].te_name == NULL) - _wctrans_init(rl); - return(&rl->rl_wctrans[_WCTRANS_INDEX_LOWER]); -} - -static __inline struct _WCTransEntry * -_wctrans_upper(_RuneLocale *rl) -{ - if (rl->rl_wctrans[_WCTRANS_INDEX_UPPER].te_name == NULL) - _wctrans_init(rl); - return(&rl->rl_wctrans[_WCTRANS_INDEX_UPPER]); -} - -#endif diff --git a/lib/libc/locale/aliasname.c b/lib/libc/locale/aliasname.c deleted file mode 100644 index 7428cea753..0000000000 --- a/lib/libc/locale/aliasname.c +++ /dev/null @@ -1,125 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/aliasname.c,v 1.1 2002/02/13 07:45:52 yamt Exp $ */ -/* $DragonFly: src/lib/libc/locale/aliasname.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2002 YAMAMOTO Takashi, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include - -#include "aliasname_local.h" - -static __inline int __is_ws(char); - -static __inline int -__is_ws(char ch) -{ - - return(ch == ' ' || ch == '\t'); -} - -const char * -__unaliasname(const char *dbname, const char *alias, void *buf, size_t bufsize) -{ - FILE *fp = NULL; - const char *result = alias; - size_t resultlen; - size_t aliaslen; - const char *p; - size_t len; - - _DIAGASSERT(dbname != NULL); - _DIAGASSERT(alias != NULL); - _DIAGASSERT(buf != NULL); - - fp = fopen(dbname, "r"); - if (fp == NULL) - goto quit; - - aliaslen = strlen(alias); - - for (;;) { - p = fgetln(fp, &len); - if (p == NULL) - goto quit; /* eof or error */ - - _DIAGASSERT(len != 0); - - /* ignore terminating NL */ - if (p[len - 1] == '\n') - len--; - - /* ignore null line and comment */ - if (len == 0 || p[0] == '#') - continue; - - if (aliaslen > len) - continue; - - if (memcmp(alias, p, aliaslen)) - continue; - - p += aliaslen; - len -= aliaslen; - - if (len == 0 || !__is_ws(*p)) - continue; - - /* entry was found here */ - break; - - /* NOTREACHED */ - } - - /* skip white spaces */ - do { - p++; - len--; - } while (len != 0 && __is_ws(*p)); - - if (len == 0) - goto quit; - - /* count length of result */ - resultlen = 0; - while (resultlen < len && !__is_ws(*p)) - resultlen++; - - /* check if space is enough */ - if (bufsize < resultlen + 1) - goto quit; - - memcpy(buf, p, resultlen); - ((char *)buf)[resultlen] = 0; - result = buf; - -quit: - if (fp) - fclose(fp); - - return(result); -} diff --git a/lib/libc/locale/ascii.c b/lib/libc/locale/ascii.c new file mode 100644 index 0000000000..6427de6a29 --- /dev/null +++ b/lib/libc/locale/ascii.c @@ -0,0 +1,192 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/ascii.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +static size_t _ascii_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _ascii_mbsinit(const mbstate_t *); +static size_t _ascii_mbsnrtowcs(wchar_t * __restrict dst, + const char ** __restrict src, size_t nms, size_t len, + mbstate_t * __restrict ps __unused); +static size_t _ascii_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); +static size_t _ascii_wcsnrtombs(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict); + +int +_ascii_init(struct xlocale_ctype *l,_RuneLocale *rl) +{ + + l->__mbrtowc = _ascii_mbrtowc; + l->__mbsinit = _ascii_mbsinit; + l->__mbsnrtowcs = _ascii_mbsnrtowcs; + l->__wcrtomb = _ascii_wcrtomb; + l->__wcsnrtombs = _ascii_wcsnrtombs; + l->runes = rl; + l->__mb_cur_max = 1; + l->__mb_sb_limit = 128; + return(0); +} + +static int +_ascii_mbsinit(const mbstate_t *ps __unused) +{ + + /* + * Encoding is not state dependent - we are always in the + * initial state. + */ + return (1); +} + +static size_t +_ascii_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps __unused) +{ + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (0); + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + if (*s & 0x80) { + errno = EILSEQ; + return ((size_t)-1); + } + if (pwc != NULL) + *pwc = (unsigned char)*s; + return (*s == '\0' ? 0 : 1); +} + +static size_t +_ascii_wcrtomb(char * __restrict s, wchar_t wc, + mbstate_t * __restrict ps __unused) +{ + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc < 0 || wc > 127) { + errno = EILSEQ; + return ((size_t)-1); + } + *s = (unsigned char)wc; + return (1); +} + +static size_t +_ascii_mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps __unused) +{ + const char *s; + size_t nchr; + + if (dst == NULL) { + for (s = *src; nms > 0 && *s != '\0'; s++, nms--) { + if (*s & 0x80) { + errno = EILSEQ; + return ((size_t)-1); + } + } + return (s - *src); + } + + s = *src; + nchr = 0; + while (len-- > 0 && nms-- > 0) { + if (*s & 0x80) { + errno = EILSEQ; + return ((size_t)-1); + } + if ((*dst++ = (unsigned char)*s++) == L'\0') { + *src = NULL; + return (nchr); + } + nchr++; + } + *src = s; + return (nchr); +} + +static size_t +_ascii_wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src, + size_t nwc, size_t len, mbstate_t * __restrict ps __unused) +{ + const wchar_t *s; + size_t nchr; + + if (dst == NULL) { + for (s = *src; nwc > 0 && *s != L'\0'; s++, nwc--) { + if (*s < 0 || *s > 127) { + errno = EILSEQ; + return ((size_t)-1); + } + } + return (s - *src); + } + + s = *src; + nchr = 0; + while (len-- > 0 && nwc-- > 0) { + if (*s < 0 || *s > 127) { + errno = EILSEQ; + return ((size_t)-1); + } + if ((*dst++ = *s++) == '\0') { + *src = NULL; + return (nchr); + } + nchr++; + } + *src = s; + return (nchr); +} + diff --git a/lib/libc/locale/wcsftime.3 b/lib/libc/locale/big5.5 similarity index 61% copy from lib/libc/locale/wcsftime.3 copy to lib/libc/locale/big5.5 index 03cb641538..ce34c34aac 100644 --- a/lib/libc/locale/wcsftime.3 +++ b/lib/libc/locale/big5.5 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" Copyright (c) 2002, 2003 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,46 +22,30 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcsftime.3,v 1.2 2002/11/29 17:35:09 ru Exp $ -.\" $DragonFly: src/lib/libc/locale/wcsftime.3,v 1.1 2005/08/10 13:42:28 joerg Exp $ +.\" $FreeBSD: head/lib/libc/locale/big5.5 131608 2004-07-05 06:39:03Z ru $ .\" -.Dd September 8, 2002 -.Dt WCSFTIME 3 +.Dd August 7, 2003 +.Dt BIG5 5 .Os .Sh NAME -.Nm wcsftime -.Nd "convert date and time to a wide-character string" -.Sh LIBRARY -.Lb libc +.Nm big5 +.Nd +.Dq "Big Five" +encoding for Traditional Chinese text .Sh SYNOPSIS -.In wchar.h -.Ft size_t -.Fo wcsftime -.Fa "wchar_t * restrict wcs" "size_t maxsize" -.Fa "const wchar_t * restrict format" "const struct tm * restrict timeptr" -.Fc +.Nm ENCODING +.Qq BIG5 .Sh DESCRIPTION -The -.Fn wcsftime -function is equivalent to the -.Fn strftime -function except for the types of its arguments. -Refer to -.Xr strftime 3 -for a detailed description. -.Sh COMPATIBILITY -Some early implementations of -.Fn wcsftime -had a -.Fa format -argument with type -.Vt "const char *" -instead of -.Vt "const wchar_t *" . +.Dq Big Five +is the de facto standard for encoding Traditional Chinese text. +Each character is represented by either one or two bytes. +Characters from the +.Tn ASCII +character set are represented as single bytes in the range 0x00 - 0x7F. +Traditional Chinese characters are represented by two bytes: +the first in the range 0xA1 - 0xFE, the second in the range +0x40 - 0xFE. .Sh SEE ALSO -.Xr strftime 3 -.Sh STANDARDS -The -.Fn wcsftime -function conforms to -.St -isoC-99 . +.Xr euc 5 , +.Xr gb18030 5 , +.Xr utf8 5 diff --git a/lib/libc/locale/big5.c b/lib/libc/locale/big5.c new file mode 100644 index 0000000000..9a24f005ad --- /dev/null +++ b/lib/libc/locale/big5.c @@ -0,0 +1,178 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)big5.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/big5.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +extern int __mb_sb_limit; + +static size_t _BIG5_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _BIG5_mbsinit(const mbstate_t *); +static size_t _BIG5_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + wchar_t ch; +} _BIG5State; + +int +_BIG5_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _BIG5_mbrtowc; + l->__wcrtomb = _BIG5_wcrtomb; + l->__mbsinit = _BIG5_mbsinit; + l->runes = rl; + l->__mb_cur_max = 2; + l->__mb_sb_limit = 128; + return (0); +} + +static int +_BIG5_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _BIG5State *)ps)->ch == 0); +} + +static __inline int +_big5_check(u_int c) +{ + + c &= 0xff; + return ((c >= 0xa1 && c <= 0xfe) ? 2 : 1); +} + +static size_t +_BIG5_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _BIG5State *bs; + wchar_t wc; + size_t len; + + bs = (_BIG5State *)ps; + + if ((bs->ch & ~0xFF) != 0) { + /* Bad conversion state. */ + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + if (bs->ch != 0) { + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (bs->ch << 8) | (*s & 0xFF); + if (pwc != NULL) + *pwc = wc; + bs->ch = 0; + return (1); + } + + len = (size_t)_big5_check(*s); + wc = *s++ & 0xff; + if (len == 2) { + if (n < 2) { + /* Incomplete multibyte sequence */ + bs->ch = wc; + return ((size_t)-2); + } + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (wc << 8) | (*s++ & 0xff); + if (pwc != NULL) + *pwc = wc; + return (2); + } else { + if (pwc != NULL) + *pwc = wc; + return (wc == L'\0' ? 0 : 1); + } +} + +static size_t +_BIG5_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _BIG5State *bs; + + bs = (_BIG5State *)ps; + + if (bs->ch != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc & 0x8000) { + *s++ = (wc >> 8) & 0xff; + *s = wc & 0xff; + return (2); + } + *s = wc & 0xff; + return (1); +} diff --git a/lib/libc/locale/btowc.3 b/lib/libc/locale/btowc.3 index 03cda27fac..ac1c84f6f3 100644 --- a/lib/libc/locale/btowc.3 +++ b/lib/libc/locale/btowc.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/btowc.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/btowc.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, +.\" Copyright (c) 2002 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,64 +22,67 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 3, 2003 +.\" $FreeBSD: head/lib/libc/locale/btowc.3 248803 2013-03-27 21:31:40Z jilles $ +.\" +.Dd February 13, 2012 .Dt BTOWC 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm btowc -.Nd convert a single byte character to a wide character -.\" ---------------------------------------------------------------------- +.Nm btowc , +.Nm wctob +.Nd "convert between wide and single-byte characters" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wchar.h .Ft wint_t .Fn btowc "int c" -.\" ---------------------------------------------------------------------- +.Ft int +.Fn wctob "wint_t c" +.In wchar.h +.In xlocale.h +.Ft wint_t +.Fn btowc_l "int c" "locale_t loc" +.Ft int +.Fn wctob_l "wint_t c" "locale_t loc" .Sh DESCRIPTION The .Fn btowc -function converts a single byte character -.Fa c -in the initial shift state of the current locale to a corresponding -wide character. -.Pp -The behaviour of +function converts a single-byte character into a corresponding wide character. +If the character is +.Dv EOF +or not valid in the initial shift state, .Fn btowc -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- -.Sh RETURN VALUES +returns +.Dv WEOF . +.Pp The -.Fn btowc -function returns: -.Bl -tag -width 012345678901 -.It Dv WEOF -If -.Fa c -is -.Dv EOF -or if (unsigned char) -.Fa c -does not correspond to a valid single byte character representation. -.It (otherwise) -A wide character corresponding to -.Fa c . -.El -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- +.Fn wctob +function converts a wide character into a corresponding single-byte character. +If the wide character is +.Dv WEOF +or not able to be represented as a single byte in the initial shift state, +.Fn wctob +returns +.Dv EOF . +.Pp +The _l-suffixed versions take an explicit locale argument, while the +non-suffixed versions use the current global or per-thread locale. .Sh SEE ALSO .Xr mbrtowc 3 , -.Xr setlocale 3 , -.Xr wctob 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 , +.Xr wcrtomb 3 .Sh STANDARDS The .Fn btowc -function conforms to -.St -isoC-amd1 . +and +.Fn wctob +functions conform to +.St -p1003.1-2001 . +.Sh HISTORY +The +.Fn btowc +and +.Fn wctob +functions first appeared in +.Fx 5.0 . diff --git a/lib/libc/stdio/getwc.c b/lib/libc/locale/btowc.c similarity index 63% copy from lib/libc/stdio/getwc.c copy to lib/libc/locale/btowc.c index 4eb88d0e5c..5b47ec8aac 100644 --- a/lib/libc/stdio/getwc.c +++ b/lib/libc/locale/btowc.c @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2002, 2003 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,26 +28,37 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/getwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/getwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/btowc.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include "namespace.h" + #include #include -#include "un-namespace.h" -#include "libc_private.h" -#include "local.h" - -#undef getwc +#include "mblocal.h" -/* - * Synonym for fgetwc(). The only difference is that getwc(), if it is a - * macro, may evaluate `fp' more than once. - */ wint_t -getwc(FILE *fp) +btowc_l(int c, locale_t l) { + static const mbstate_t initial; + mbstate_t mbs = initial; + char cc; + wchar_t wc; + FIX_LOCALE(l); - return (fgetwc(fp)); + if (c == EOF) + return (WEOF); + /* + * We expect mbrtowc() to return 0 or 1, hence the check for n > 1 + * which detects error return values as well as "impossible" byte + * counts. + */ + cc = (char)c; + if (XLOCALE_CTYPE(l)->__mbrtowc(&wc, &cc, 1, &mbs) > 1) + return (WEOF); + return (wc); +} +wint_t +btowc(int c) +{ + return btowc_l(c, __get_locale()); } diff --git a/lib/libc/locale/multibyte_c90.c b/lib/libc/locale/c16rtomb.c similarity index 51% rename from lib/libc/locale/multibyte_c90.c rename to lib/libc/locale/c16rtomb.c index 47d871b98a..242ecb31a2 100644 --- a/lib/libc/locale/multibyte_c90.c +++ b/lib/libc/locale/c16rtomb.c @@ -1,8 +1,5 @@ -/* $NetBSD: src/lib/libc/locale/multibyte_c90.c,v 1.4 2003/03/05 20:18:16 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/multibyte_c90.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2002 Citrus Project, + * Copyright (c) 2013 Ed Schouten * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,79 +22,60 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/c16rtomb.c 250883 2013-05-21 19:59:37Z ed $ */ -#include -#include -#include -#include -#include -#include "../citrus/citrus_module.h" -#include "../citrus/citrus_ctype.h" -#include "rune.h" -#include "multibyte.h" - -int -mblen(const char *s, size_t n) -{ - int ret; - int err0; - err0 = _citrus_ctype_mblen(_to_cur_ctype(), s, n, &ret); - if (err0) - errno = err0; +#include +#include +#include "xlocale_private.h" - return(ret); -} +typedef struct { + char16_t lead_surrogate; + mbstate_t c32_mbstate; +} _Char16State; size_t -mbstowcs(wchar_t *pwcs, const char *s, size_t n) -{ - size_t ret; - int err0; - - err0 = _citrus_ctype_mbstowcs(_to_cur_ctype(), pwcs, s, n, &ret); - if (err0) - errno = err0; - - return(ret); -} - -int -mbtowc(wchar_t *pw, const char *s, size_t n) +c16rtomb_l(char * __restrict s, char16_t c16, mbstate_t * __restrict ps, + locale_t locale) { - int ret; - int err0; - - err0 = _citrus_ctype_mbtowc(_to_cur_ctype(), pw, s, n, &ret); - if (err0) - errno = err0; - - return(ret); + _Char16State *cs; + char32_t c32; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->c16rtomb; + cs = (_Char16State *)ps; + + /* If s is a null pointer, the value of parameter c16 is ignored. */ + if (s == NULL) { + c32 = 0; + } else if (cs->lead_surrogate >= 0xd800 && + cs->lead_surrogate <= 0xdbff) { + /* We should see a trail surrogate now. */ + if (c16 < 0xdc00 || c16 > 0xdfff) { + errno = EILSEQ; + return ((size_t)-1); + } + c32 = 0x10000 + ((cs->lead_surrogate & 0x3ff) << 10 | + (c16 & 0x3ff)); + } else if (c16 >= 0xd800 && c16 <= 0xdbff) { + /* Store lead surrogate for next invocation. */ + cs->lead_surrogate = c16; + return (0); + } else { + /* Regular character. */ + c32 = c16; + } + cs->lead_surrogate = 0; + + return (c32rtomb_l(s, c32, &cs->c32_mbstate, locale)); } size_t -wcstombs(char *s, const wchar_t *wcs, size_t n) -{ - size_t ret; - int err0; - - err0 = _citrus_ctype_wcstombs(_to_cur_ctype(), s, wcs, n, &ret); - if (err0) - errno = err0; - - return(ret); -} - -int -wctomb(char *s, wchar_t wc) +c16rtomb(char * __restrict s, char16_t c16, mbstate_t * __restrict ps) { - int ret; - int err0; - - err0 = _citrus_ctype_wctomb(_to_cur_ctype(), s, wc, &ret); - if (err0) - errno = err0; - return(ret); + return (c16rtomb_l(s, c16, ps, __get_locale())); } diff --git a/lib/libc/locale/c16rtomb_iconv.c b/lib/libc/locale/c16rtomb_iconv.c new file mode 100644 index 0000000000..9b773e7abd --- /dev/null +++ b/lib/libc/locale/c16rtomb_iconv.c @@ -0,0 +1,8 @@ +/* $FreeBSD: head/lib/libc/locale/c16rtomb_iconv.c 251314 2013-06-03 17:17:56Z ed $ */ +#define charXX_t char16_t +#define cXXrtomb c16rtomb +#define cXXrtomb_l c16rtomb_l +#define SRCBUF_LEN 2 +#define UTF_XX_INTERNAL "UTF-16-INTERNAL" + +#include "cXXrtomb_iconv.h" diff --git a/lib/libc/locale/wcstoimax.c b/lib/libc/locale/c32rtomb.c similarity index 65% copy from lib/libc/locale/wcstoimax.c copy to lib/libc/locale/c32rtomb.c index c7343f5e9e..b153aa3dc9 100644 --- a/lib/libc/locale/wcstoimax.c +++ b/lib/libc/locale/c32rtomb.c @@ -1,8 +1,5 @@ -/* $NetBSD: src/lib/libc/locale/wcstoimax.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoimax.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2013 Ed Schouten * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,22 +22,38 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/c32rtomb.c 250883 2013-05-21 19:59:37Z ed $ */ -#include -#include + #include -#include -#include -#include +#include #include -#include +#include "xlocale_private.h" + +size_t +c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps, + locale_t locale) +{ + + /* Unicode Standard 5.0, D90: ill-formed characters. */ + if ((c32 >= 0xd800 && c32 <= 0xdfff) || c32 > 0x10ffff) { + errno = EILSEQ; + return ((size_t)-1); + } + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->c32rtomb; -#include "__wctoint.h" + /* Assume wchar_t uses UTF-32. */ + return (wcrtomb_l(s, c32, ps, locale)); +} -#define _FUNCNAME wcstoimax -#define __INT intmax_t -#define __INT_MIN INTMAX_MIN -#define __INT_MAX INTMAX_MAX +size_t +c32rtomb(char * __restrict s, char32_t c32, mbstate_t * __restrict ps) +{ -#include "_wcstol.h" + return (c32rtomb_l(s, c32, ps, __get_locale())); +} diff --git a/lib/libc/locale/c32rtomb_iconv.c b/lib/libc/locale/c32rtomb_iconv.c new file mode 100644 index 0000000000..40b6b6f566 --- /dev/null +++ b/lib/libc/locale/c32rtomb_iconv.c @@ -0,0 +1,8 @@ +/* $FreeBSD: head/lib/libc/locale/c32rtomb_iconv.c 251314 2013-06-03 17:17:56Z ed $ */ +#define charXX_t char32_t +#define cXXrtomb c32rtomb +#define cXXrtomb_l c32rtomb_l +#define SRCBUF_LEN 1 +#define UTF_XX_INTERNAL "UTF-32-INTERNAL" + +#include "cXXrtomb_iconv.h" diff --git a/lib/libc/locale/cXXrtomb_iconv.h b/lib/libc/locale/cXXrtomb_iconv.h new file mode 100644 index 0000000000..8a3500dfb2 --- /dev/null +++ b/lib/libc/locale/cXXrtomb_iconv.h @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/cXXrtomb_iconv.h 252547 2013-07-03 07:03:19Z peter $ + */ + + +#include + +#include +#include +#include +#include + +#include "../citrus/citrus_hash.h" +#include "../citrus/citrus_module.h" +#include "../citrus/citrus_iconv.h" +#include "xlocale_private.h" + +typedef struct { + bool initialized; + struct _citrus_iconv iconv; + union { + charXX_t widechar[SRCBUF_LEN]; + char bytes[sizeof(charXX_t) * SRCBUF_LEN]; + } srcbuf; + size_t srcbuf_len; +} _ConversionState; +_Static_assert(sizeof(_ConversionState) <= sizeof(mbstate_t), + "Size of _ConversionState must not exceed mbstate_t's size."); + +size_t +cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t * __restrict ps, + locale_t locale) +{ + _ConversionState *cs; + struct _citrus_iconv *handle; + const char *src; + char *dst; + size_t srcleft, dstleft, invlen; + int err; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->cXXrtomb; + cs = (_ConversionState *)ps; + handle = &cs->iconv; + + /* Reinitialize mbstate_t. */ + if (s == NULL || !cs->initialized) { + if (_citrus_iconv_open(&handle, UTF_XX_INTERNAL, + nl_langinfo_l(CODESET, locale)) != 0) { + cs->initialized = false; + errno = EINVAL; + return (-1); + } + handle->cv_shared->ci_discard_ilseq = true; + handle->cv_shared->ci_hooks = NULL; + cs->srcbuf_len = 0; + cs->initialized = true; + if (s == NULL) + return (1); + } + + assert(cs->srcbuf_len < sizeof(cs->srcbuf.widechar) / sizeof(charXX_t)); + cs->srcbuf.widechar[cs->srcbuf_len++] = c; + + /* Perform conversion. */ + src = cs->srcbuf.bytes; + srcleft = cs->srcbuf_len * sizeof(charXX_t); + dst = s; + dstleft = MB_CUR_MAX_L(locale); + err = _citrus_iconv_convert(handle, &src, &srcleft, &dst, &dstleft, + 0, &invlen); + + /* Character is part of a surrogate pair. We need more input. */ + if (err == EINVAL) + return (0); + cs->srcbuf_len = 0; + + /* Illegal sequence. */ + if (dst == s) { + errno = EILSEQ; + return ((size_t)-1); + } + return (dst - s); +} + +size_t +cXXrtomb(char * __restrict s, charXX_t c, mbstate_t * __restrict ps) +{ + + return (cXXrtomb_l(s, c, ps, __get_locale())); +} diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index 543a1faac9..b6b57d0295 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -3,6 +3,11 @@ * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,13 +29,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/locale/collate.c,v 1.21.2.4 2002/10/11 10:36:47 ache Exp $ - * $DragonFly: src/lib/libc/locale/collate.c,v 1.7 2005/11/13 01:20:49 swildner Exp $ + * $FreeBSD: head/lib/libc/locale/collate.c 244126 2012-12-11 22:52:56Z jilles $ */ + #include "namespace.h" #include -#include #include #include #include @@ -40,83 +44,125 @@ #include "un-namespace.h" #include "collate.h" +#include "setlocale.h" +#include "ldpart.h" + +#include "libc_private.h" + +/* + * To avoid modifying the original (single-threaded) code too much, we'll just + * define the old globals as fields inside the table. + * + * We also modify the collation table test functions to search the thread-local + * table first and the global table second. + */ +#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial) +#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr) +#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr) +#define __collate_chain_pri_table (table->__collate_chain_pri_table) +int __collate_load_error; -#define ENCODING_LEN 31 -#define _LDP_LOADED 0 -#define _LDP_ERROR (-1) -#define _LDP_CACHE 1 -int __collate_load_error = 1; -int __collate_substitute_nontrivial; +struct xlocale_collate __xlocale_global_collate = { + {{0}, "C"}, 1, 0 +}; -u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN]; -struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1]; -struct __collate_st_chain_pri *__collate_chain_pri_table; + struct xlocale_collate __xlocale_C_collate = { + {{0}, "C"}, 1, 0 +}; void __collate_err(int ex, const char *f) __dead2; +int +__collate_load_tables_l(const char *encoding, struct xlocale_collate *table); + +static void +destruct_collate(void *t) +{ + struct xlocale_collate *table = t; + if (__collate_chain_pri_table) { + free(__collate_chain_pri_table); + } + free(t); +} + +void * +__collate_load(const char *encoding, locale_t unused) +{ + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + return &__xlocale_C_collate; + } + struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 1); + table->header.header.destructor = destruct_collate; + // FIXME: Make sure that _LDP_CACHE is never returned. We should be doing + // the caching outside of this section + if (__collate_load_tables_l(encoding, table) != _LDP_LOADED) { + xlocale_release(table); + return NULL; + } + return table; +} + +/** + * Load the collation tables for the specified encoding into the global table. + */ int __collate_load_tables(const char *encoding) +{ + int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate); + __collate_load_error = __xlocale_global_collate.__collate_load_error; + return ret; +} + +int +__collate_load_tables_l(const char *encoding, struct xlocale_collate *table) { FILE *fp; int i, saverr, chains; uint32_t u32; char strbuf[STR_LEN], buf[PATH_MAX]; void *TMP_substitute_table, *TMP_char_pri_table, *TMP_chain_pri_table; - static char collate_encoding[ENCODING_LEN + 1]; /* 'encoding' must be already checked. */ if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { - __collate_load_error = 1; + table->__collate_load_error = 1; return (_LDP_CACHE); } - /* - * If the locale name is the same as our cache, use the cache. - */ - if (strcmp(encoding, collate_encoding) == 0) { - __collate_load_error = 0; - return (_LDP_CACHE); - } - - /* - * Slurp the locale file into the cache. - */ - /* 'PathLocale' must be already set & checked. */ /* Range checking not needed, encoding has fixed size */ - strcpy(buf, _PathLocale); - strcat(buf, "/"); - strcat(buf, encoding); - strcat(buf, "/LC_COLLATE"); - if ((fp = fopen(buf, "r")) == NULL) + (void)strcpy(buf, _PathLocale); + (void)strcat(buf, "/"); + (void)strcat(buf, encoding); + (void)strcat(buf, "/LC_COLLATE"); + if ((fp = fopen(buf, "re")) == NULL) return (_LDP_ERROR); if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) { saverr = errno; - fclose(fp); + (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } chains = -1; if (strcmp(strbuf, COLLATE_VERSION) == 0) chains = 0; - else if (strcmp(strbuf, COLLATE_VERSION1_1) == 0) + else if (strcmp(strbuf, COLLATE_VERSION1_2) == 0) chains = 1; if (chains < 0) { - fclose(fp); + (void)fclose(fp); errno = EFTYPE; return (_LDP_ERROR); } if (chains) { if (fread(&u32, sizeof(u32), 1, fp) != 1) { saverr = errno; - fclose(fp); + (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } if ((chains = (int)ntohl(u32)) < 1) { - fclose(fp); + (void)fclose(fp); errno = EFTYPE; return (_LDP_ERROR); } @@ -126,7 +172,7 @@ __collate_load_tables(const char *encoding) if ((TMP_substitute_table = malloc(sizeof(__collate_substitute_table))) == NULL) { saverr = errno; - fclose(fp); + (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } @@ -134,7 +180,7 @@ __collate_load_tables(const char *encoding) malloc(sizeof(__collate_char_pri_table))) == NULL) { saverr = errno; free(TMP_substitute_table); - fclose(fp); + (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } @@ -143,19 +189,19 @@ __collate_load_tables(const char *encoding) saverr = errno; free(TMP_substitute_table); free(TMP_char_pri_table); - fclose(fp); + (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } #define FREAD(a, b, c, d) \ { \ - if ( fread(a, b, c, d) != c) { \ + if (fread(a, b, c, d) != c) { \ saverr = errno; \ free(TMP_substitute_table); \ free(TMP_char_pri_table); \ free(TMP_chain_pri_table); \ - fclose(d); \ + (void)fclose(d); \ errno = saverr; \ return (_LDP_ERROR); \ } \ @@ -165,19 +211,29 @@ __collate_load_tables(const char *encoding) FREAD(TMP_char_pri_table, sizeof(__collate_char_pri_table), 1, fp); FREAD(TMP_chain_pri_table, sizeof(*__collate_chain_pri_table), chains, fp); - fclose(fp); + (void)fclose(fp); - strcpy(collate_encoding, encoding); if (__collate_substitute_table_ptr != NULL) free(__collate_substitute_table_ptr); __collate_substitute_table_ptr = TMP_substitute_table; if (__collate_char_pri_table_ptr != NULL) free(__collate_char_pri_table_ptr); __collate_char_pri_table_ptr = TMP_char_pri_table; + for (i = 0; i < UCHAR_MAX + 1; i++) { + __collate_char_pri_table[i].prim = + ntohl(__collate_char_pri_table[i].prim); + __collate_char_pri_table[i].sec = + ntohl(__collate_char_pri_table[i].sec); + } if (__collate_chain_pri_table != NULL) free(__collate_chain_pri_table); __collate_chain_pri_table = TMP_chain_pri_table; - + for (i = 0; i < chains; i++) { + __collate_chain_pri_table[i].prim = + ntohl(__collate_chain_pri_table[i].prim); + __collate_chain_pri_table[i].sec = + ntohl(__collate_chain_pri_table[i].sec); + } __collate_substitute_nontrivial = 0; for (i = 0; i < UCHAR_MAX + 1; i++) { if (__collate_substitute_table[i][0] != i || @@ -186,13 +242,13 @@ __collate_load_tables(const char *encoding) break; } } - __collate_load_error = 0; + table->__collate_load_error = 0; return (_LDP_LOADED); } u_char * -__collate_substitute(const u_char *s) +__collate_substitute(struct xlocale_collate *table, const u_char *s) { int dest_len, len, nlen; int delta = strlen(s); @@ -212,14 +268,14 @@ __collate_substitute(const u_char *s) if (dest_str == NULL) __collate_err(EX_OSERR, __func__); } - strcpy(dest_str + len, __collate_substitute_table[*s++]); + (void)strcpy(dest_str + len, __collate_substitute_table[*s++]); len = nlen; } return (dest_str); } void -__collate_lookup(const u_char *t, int *len, int *prim, int *sec) +__collate_lookup(struct xlocale_collate *table, const u_char *t, int *len, int *prim, int *sec) { struct __collate_st_chain_pri *p2; @@ -251,23 +307,24 @@ __collate_strdup(u_char *s) void __collate_err(int ex, const char *f) { - const char *progname; + const char *s; int serrno = errno; - progname = _getprogname(); - _write(STDERR_FILENO, progname, strlen(progname)); + s = _getprogname(); + _write(STDERR_FILENO, s, strlen(s)); _write(STDERR_FILENO, ": ", 2); - _write(STDERR_FILENO, f, strlen(f)); + s = f; + _write(STDERR_FILENO, s, strlen(s)); _write(STDERR_FILENO, ": ", 2); - f = strerror(serrno); - _write(STDERR_FILENO, f, strlen(f)); + s = strerror(serrno); + _write(STDERR_FILENO, s, strlen(s)); _write(STDERR_FILENO, "\n", 1); exit(ex); } #ifdef COLLATE_DEBUG void -__collate_print_tables(void) +__collate_print_tables() { int i; struct __collate_st_chain_pri *p2; diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h index e21295494c..97c2755945 100644 --- a/lib/libc/locale/collate.h +++ b/lib/libc/locale/collate.h @@ -3,6 +3,11 @@ * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/locale/collate.h,v 1.9.2.3 2002/10/11 10:36:47 ache Exp $ - * $DragonFly: src/lib/libc/locale/collate.h,v 1.2 2003/06/17 04:26:43 dillon Exp $ + * $FreeBSD: head/lib/libc/locale/collate.h 227753 2011-11-20 14:45:42Z theraven $ */ #ifndef _COLLATE_H_ @@ -34,11 +38,12 @@ #include #include #include +#include "xlocale_private.h" #define STR_LEN 10 #define TABLE_SIZE 100 #define COLLATE_VERSION "1.0\n" -#define COLLATE_VERSION1_1 "1.1\n" +#define COLLATE_VERSION1_2 "1.2\n" struct __collate_st_char_pri { int prim, sec; @@ -48,20 +53,26 @@ struct __collate_st_chain_pri { int prim, sec; }; -extern int __collate_load_error; -extern int __collate_substitute_nontrivial; #define __collate_substitute_table (*__collate_substitute_table_ptr) -extern u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN]; #define __collate_char_pri_table (*__collate_char_pri_table_ptr) -extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1]; -extern struct __collate_st_chain_pri *__collate_chain_pri_table; + +struct xlocale_collate { + struct xlocale_component header; + int __collate_load_error; + int __collate_substitute_nontrivial; + + u_char (*__collate_substitute_table_ptr)[UCHAR_MAX + 1][STR_LEN]; + struct __collate_st_char_pri (*__collate_char_pri_table_ptr)[UCHAR_MAX + 1]; + struct __collate_st_chain_pri *__collate_chain_pri_table; +}; + __BEGIN_DECLS u_char *__collate_strdup(u_char *); -u_char *__collate_substitute(const u_char *); +u_char *__collate_substitute(struct xlocale_collate *, const u_char *); int __collate_load_tables(const char *); -void __collate_lookup(const u_char *, int *, int *, int *); -int __collate_range_cmp(int, int); +void __collate_lookup(struct xlocale_collate *, const u_char *, int *, int *, int *); +int __collate_range_cmp(struct xlocale_collate *, int, int); #ifdef COLLATE_DEBUG void __collate_print_tables(void); #endif diff --git a/lib/libc/locale/collcmp.c b/lib/libc/locale/collcmp.c index 1097c9dbab..b1209cefe3 100644 --- a/lib/libc/locale/collcmp.c +++ b/lib/libc/locale/collcmp.c @@ -2,6 +2,11 @@ * Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,63 +28,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/locale/collcmp.c,v 1.12.2.1 2000/08/22 01:54:39 jhb Exp $ - * $DragonFly: src/lib/libc/locale/collcmp.c,v 1.4 2005/11/20 09:18:37 swildner Exp $ + * $FreeBSD: head/lib/libc/locale/collcmp.c 227753 2011-11-20 14:45:42Z theraven $ */ -#define ASCII_COMPATIBLE_COLLATE /* see share/colldef */ #include +#include #include "collate.h" -#ifndef ASCII_COMPATIBLE_COLLATE -#include -#endif /* - * Compare two characters converting collate information - * into ASCII-compatible range, it allows to handle - * "[a-z]"-type ranges with national characters. + * Compare two characters using collate */ -int -__collate_range_cmp(int c1, int c2) +int __collate_range_cmp(struct xlocale_collate *table, int c1, int c2) { static char s1[2], s2[2]; - int ret; -#ifndef ASCII_COMPATIBLE_COLLATE - int as1, as2, al1, al2; -#endif - - c1 &= UCHAR_MAX; - c2 &= UCHAR_MAX; - if (c1 == c2) - return (0); - -#ifndef ASCII_COMPATIBLE_COLLATE - as1 = isascii(c1); - as2 = isascii(c2); - al1 = isalpha(c1); - al2 = isalpha(c2); - if (as1 || as2 || al1 || al2) { - if ((as1 && as2) || (!al1 && !al2)) - return (c1 - c2); - if (al1 && !al2) { - if (isupper(c1)) - return ('A' - c2); - else - return ('a' - c2); - } else if (al2 && !al1) { - if (isupper(c2)) - return (c1 - 'A'); - else - return (c1 - 'a'); - } - } -#endif s1[0] = c1; s2[0] = c2; - if ((ret = strcoll(s1, s2)) != 0) - return (ret); - return (c1 - c2); + struct _xlocale l = {{0}}; + l.components[XLC_COLLATE] = (struct xlocale_component *)table; + return (strcoll_l(s1, s2, &l)); } diff --git a/lib/libc/gen/ctype.3 b/lib/libc/locale/ctype.3 similarity index 79% rename from lib/libc/gen/ctype.3 rename to lib/libc/locale/ctype.3 index 57867dfaca..d7f3c25a79 100644 --- a/lib/libc/gen/ctype.3 +++ b/lib/libc/locale/ctype.3 @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -26,13 +26,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/ctype.3,v 1.6.2.3 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/ctype.3,v 1.4 2006/10/21 08:57:31 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/ctype.3 233648 2012-03-29 05:02:12Z eadler $ .\" -.Dd October 21, 2006 +.Dd March 30, 2004 .Dt CTYPE 3 .Os .Sh NAME +.Nm digittoint , .Nm isalnum , .Nm isalpha , .Nm isascii , @@ -40,41 +40,59 @@ .Nm iscntrl , .Nm isdigit , .Nm isgraph , +.Nm ishexnumber , +.Nm isideogram , .Nm islower , +.Nm isnumber , +.Nm isphonogram , .Nm isprint , .Nm ispunct , +.Nm isrune , .Nm isspace , +.Nm isspecial , .Nm isupper , .Nm isxdigit , .Nm toascii , .Nm tolower , .Nm toupper -.Nd character classification and mapping functions +.Nd character classification functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In ctype.h .Ft int +.Fn digittoint "int c" +.Ft int .Fn isalnum "int c" .Ft int .Fn isalpha "int c" .Ft int .Fn isascii "int c" .Ft int -.Fn isblank "int c" -.Ft int .Fn iscntrl "int c" .Ft int .Fn isdigit "int c" .Ft int .Fn isgraph "int c" .Ft int +.Fn ishexnumber "int c" +.Ft int +.Fn isideogram "int c" +.Ft int .Fn islower "int c" .Ft int +.Fn isnumber "int c" +.Ft int +.Fn isphonogram "int c" +.Ft int +.Fn isspecial "int c" +.Ft int .Fn isprint "int c" .Ft int .Fn ispunct "int c" .Ft int +.Fn isrune "int c" +.Ft int .Fn isspace "int c" .Ft int .Fn isupper "int c" @@ -88,12 +106,13 @@ .Fn toupper "int c" .Sh DESCRIPTION The above functions perform character tests and conversions on the integer -.Ar c . +.Fa c . They are available as macros, defined in the include file .In ctype.h , or as true functions in the C library. See the specific manual pages for more information. .Sh SEE ALSO +.Xr digittoint 3 , .Xr isalnum 3 , .Xr isalpha 3 , .Xr isascii 3 , @@ -101,20 +120,31 @@ See the specific manual pages for more information. .Xr iscntrl 3 , .Xr isdigit 3 , .Xr isgraph 3 , +.Xr isideogram 3 , .Xr islower 3 , +.Xr isphonogram 3 , .Xr isprint 3 , .Xr ispunct 3 , +.Xr isrune 3 , .Xr isspace 3 , +.Xr isspecial 3 , .Xr isupper 3 , .Xr isxdigit 3 , .Xr toascii 3 , .Xr tolower 3 , .Xr toupper 3 , +.Xr wctype 3 , .Xr ascii 7 .Sh STANDARDS -These functions, with the exception of +These functions, except for +.Fn digittoint , .Fn isascii , -.Fn isblank +.Fn ishexnumber , +.Fn isideogram , +.Fn isnumber , +.Fn isphonogram , +.Fn isrune , +.Fn isspecial and .Fn toascii , conform to diff --git a/lib/libc/string/wcscasecmp.c b/lib/libc/locale/ctype.c similarity index 58% copy from lib/libc/string/wcscasecmp.c copy to lib/libc/locale/ctype.c index 1f5630d96e..04d85b0a78 100644 --- a/lib/libc/string/wcscasecmp.c +++ b/lib/libc/locale/ctype.c @@ -1,20 +1,22 @@ /*- - * Copyright (c) 2009 David Schultz + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * modification, are permitted provided that the following conditions * are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -22,21 +24,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/ctype.c 227753 2011-11-20 14:45:42Z theraven $ */ - -#include +#define _XLOCALE_INLINE +#include #include - -int -wcscasecmp(const wchar_t *s1, const wchar_t *s2) -{ - wchar_t c1, c2; - - for (; *s1; s1++, s2++) { - c1 = towlower(*s1); - c2 = towlower(*s2); - if (c1 != c2) - return ((int)c1 - c2); - } - return (-*s2); -} +#include diff --git a/lib/libc/locale/ctype_l.3 b/lib/libc/locale/ctype_l.3 new file mode 100644 index 0000000000..e97569174d --- /dev/null +++ b/lib/libc/locale/ctype_l.3 @@ -0,0 +1,151 @@ +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/ctype_l.3 237939 2012-07-01 22:18:20Z jilles $ +.\" +.Dd March 6, 2012 +.Dt CTYPE_L 3 +.Os +.Sh NAME +.Nm digittoint_l , +.Nm isalnum_l , +.Nm isalpha_l , +.Nm isascii_l , +.Nm isblank_l , +.Nm iscntrl_l , +.Nm isdigit_l , +.Nm isgraph_l , +.Nm ishexnumber_l , +.Nm isideogram_l , +.Nm islower_l , +.Nm isnumber_l , +.Nm isphonogram_l , +.Nm isprint_l , +.Nm ispunct_l , +.Nm isrune_l , +.Nm isspace_l , +.Nm isspecial_l , +.Nm isupper_l , +.Nm isxdigit_l , +.Nm tolower_l , +.Nm toupper_l +.Nd character classification functions +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In ctype.h +.Ft int +.Fn digittoint_l "int c" "locale_t loc" +.Ft int +.Fn isalnum_l "int c" "locale_t loc" +.Ft int +.Fn isalpha_l "int c" "locale_t loc" +.Ft int +.Fn isascii_l "int c" "locale_t loc" +.Ft int +.Fn iscntrl_l "int c" "locale_t loc" +.Ft int +.Fn isdigit_l "int c" "locale_t loc" +.Ft int +.Fn isgraph_l "int c" "locale_t loc" +.Ft int +.Fn ishexnumber_l "int c" "locale_t loc" +.Ft int +.Fn isideogram_l "int c" "locale_t loc" +.Ft int +.Fn islower_l "int c" "locale_t loc" +.Ft int +.Fn isnumber_l "int c" "locale_t loc" +.Ft int +.Fn isphonogram_l "int c" "locale_t loc" +.Ft int +.Fn isspecial_l "int c" "locale_t loc" +.Ft int +.Fn isprint_l "int c" "locale_t loc" +.Ft int +.Fn ispunct_l "int c" "locale_t loc" +.Ft int +.Fn isrune_l "int c" "locale_t loc" +.Ft int +.Fn isspace_l "int c" "locale_t loc" +.Ft int +.Fn isupper_l "int c" "locale_t loc" +.Ft int +.Fn isxdigit_l "int c" "locale_t loc" +.Ft int +.Fn tolower_l "int c" "locale_t loc" +.Ft int +.Fn toupper_l "int c" "locale_t loc" +.Sh DESCRIPTION +The above functions perform character tests and conversions on the integer +.Fa c +in the locale +.Fa loc . +They behave in the same way as the versions without the _l suffix, but use the +specified locale rather than the global or per-thread locale. +.In ctype.h , +or as true functions in the C library. +See the specific manual pages for more information. +.Sh SEE ALSO +.Xr digittoint 3 , +.Xr isalnum 3 , +.Xr isalpha 3 , +.Xr isascii 3 , +.Xr isblank 3 , +.Xr iscntrl 3 , +.Xr isdigit 3 , +.Xr isgraph 3 , +.Xr isideogram 3 , +.Xr islower 3 , +.Xr isphonogram 3 , +.Xr isprint 3 , +.Xr ispunct 3 , +.Xr isrune 3 , +.Xr isspace 3 , +.Xr isspecial 3 , +.Xr isupper 3 , +.Xr isxdigit 3 , +.Xr tolower 3 , +.Xr toupper 3 , +.Xr wctype 3 , +.Xr xlocale 3 +.Sh STANDARDS +These functions conform to +.St -p1003.1-2008 , +except for +.Fn digittoint_l , +.Fn isascii_l , +.Fn ishexnumber_l , +.Fn isideogram_l , +.Fn isnumber_l , +.Fn isphonogram_l , +.Fn isrune_l +and +.Fn isspecial_l +which are +.Fx +extensions. diff --git a/lib/libc/gen/toascii.3 b/lib/libc/locale/digittoint.3 similarity index 64% copy from lib/libc/gen/toascii.3 copy to lib/libc/locale/digittoint.3 index f2ad35bad3..99f93ba610 100644 --- a/lib/libc/gen/toascii.3 +++ b/lib/libc/locale/digittoint.3 @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -25,45 +25,44 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)toascii.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/toascii.3,v 1.4.2.2 2001/12/14 18:33:55 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/toascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ +.\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/locale/digittoint.3 233648 2012-03-29 05:02:12Z eadler $ .\" -.Dd June 4, 1993 -.Dt TOASCII 3 +.Dd April 6, 2001 +.Dt DIGITTOINT 3 .Os .Sh NAME -.Nm toascii -.Nd convert a byte to 7-bit ASCII +.Nm digittoint +.Nd convert a numeric character to its integer value .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In ctype.h .Ft int -.Fn toascii "int c" +.Fn digittoint "int c" +.Ft int +.Fn digittoint_l "int c" "locale_t loc" .Sh DESCRIPTION The -.Fn toascii -function strips all but the low 7 bits from a letter, -including parity or other marker bits. +.Fn digittoint +function converts a numeric character to its corresponding integer value. +The character can be any decimal digit or hexadecimal digit. +With hexadecimal characters, the case of the values does not matter. +.Pp +The +.Fn digittoint_l +function takes an explicit locale argument, whereas the +.Fn digittoint +function use the current global or per-thread locale. .Sh RETURN VALUES The -.Fn toascii -function always returns a valid ASCII character. +.Fn digittoint +function always returns an integer from the range of 0 to 15. +If the given character was not a digit as defined by +.Xr isxdigit 3 , +the function will return 0. .Sh SEE ALSO -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr iscntrl 3 , +.Xr ctype 3 , .Xr isdigit 3 , -.Xr isgraph 3 , -.Xr islower 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isspace 3 , -.Xr isupper 3 , -.Xr isxdigit 3 , -.Xr stdio 3 , -.Xr tolower 3 , -.Xr toupper 3 , -.Xr ascii 7 +.Xr isxdigit 3, +.Xr xlocale 3 diff --git a/lib/libc/locale/towlower.3 b/lib/libc/locale/duplocale.3 similarity index 51% copy from lib/libc/locale/towlower.3 copy to lib/libc/locale/duplocale.3 index c895c6994c..ba9428f792 100644 --- a/lib/libc/locale/towlower.3 +++ b/lib/libc/locale/duplocale.3 @@ -1,12 +1,8 @@ -.\" $NetBSD: src/lib/libc/locale/towlower.3,v 1.7 2003/09/08 17:54:31 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/towlower.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c) 1989, 1991 The Regents of the University of California. +.\" Copyright (c) 2011 The FreeBSD Foundation .\" All rights reserved. .\" -.\" This code is derived from software contributed to Berkeley by -.\" the American National Standards Committee X3, on Information -.\" Processing Systems. +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -16,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -32,39 +25,55 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)tolower.3 5.2 (Berkeley) 6/29/91 +.\" $FreeBSD: head/lib/libc/locale/duplocale.3 250244 2013-05-04 17:06:47Z pluknet $ .\" -.Dd December 22, 2000 -.Dt TOWLOWER 3 +.Dd September 17, 2011 +.Dt DUPLOCALE 3 .Os .Sh NAME -.Nm towlower -.Nd wide character case letter conversion utilities +.Nm duplocale +.Nd duplicate an locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wctype.h -.Ft wint_t -.Fn towlower "wint_t wc" -.Ft wint_t -.Fn towupper "wint_t wc" +.In xlocale.h +.Ft locale_t +.Fn duplocale "locale_t locale" .Sh DESCRIPTION -The -.Fn towlower -function converts an upper-case wide character to the corresponding lower-case -letter. -The -.Fn towupper -function converts an lower-case wide character to the corresponding upper-case -letter. -.Sh RETURN VALUES -If the argument is an upper/lower-case letter, the -.Fn tolower -function returns the corresponding counterpart if there is -one; otherwise the argument is returned unchanged. +Duplicates an existing +.Fa locale_t +returning a new +.Fa locale_t +that refers to the same locale values but has an independent internal state. +Various functions, such as +.Xr mblen 3 +require a persistent state. +These functions formerly used static variables and calls to them from multiple +threads had undefined behavior. +They now use fields in the +.Fa locale_t +associated with the current thread by +.Xr uselocale 3 . +These calls are therefore only thread safe on threads with a unique per-thread +locale. +The locale returned by this call must be freed with +.Xr freelocale 3 . .Sh SEE ALSO -.Xr tolower 3 , -.Xr toupper 3 +.Xr freelocale 3 , +.Xr localeconv 3 , +.Xr newlocale 3 , +.Xr querylocale 3 , +.Xr uselocale 3 , +.Xr xlocale 3 .Sh STANDARDS -The functions conform to -.St -isoC-99 . +This function conforms to +.St -p1003.1-2008 . +.Sh BUGS +Ideally, +.Xr uselocale 3 +should make a copy of the +.Fa locale_t +implicitly to ensure thread safety, +and a copy of the global locale should be installed lazily on each thread. +The FreeBSD implementation does not do this, +for compatibility with Darwin. diff --git a/lib/libc/locale/euc.5 b/lib/libc/locale/euc.5 new file mode 100644 index 0000000000..36d6f0213c --- /dev/null +++ b/lib/libc/locale/euc.5 @@ -0,0 +1,134 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Paul Borman at Krystal Technologies. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)euc.4 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/locale/euc.5 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd November 8, 2003 +.Dt EUC 5 +.Os +.Sh NAME +.Nm euc +.Nd EUC encoding of wide characters +.Sh SYNOPSIS +.Nm ENCODING +.Qq EUC +.Pp +.Nm VARIABLE +.Ar len1 +.Ar mask1 +.Ar len2 +.Ar mask2 +.Ar len3 +.Ar mask3 +.Ar len4 +.Ar mask4 +.Ar mask +.Sh DESCRIPTION +.\"The +.\".Nm EUC +.\"encoding is provided for compatibility with +.\".Ux +.\"based systems. +.\"See +.\".Xr mklocale 1 +.\"for a complete description of the +.\".Ev LC_CTYPE +.\"source file format. +.\".Pp +.Nm EUC +implements a system of 4 multibyte codesets. +A multibyte character in the first codeset consists of +.Ar len1 +bytes starting with a byte in the range of 0x00 to 0x7f. +To allow use of +.Tn ASCII , +.Ar len1 +is always 1. +A multibyte character in the second codeset consists of +.Ar len2 +bytes starting with a byte in the range of 0x80-0xff excluding 0x8e and 0x8f. +A multibyte character in the third codeset consists of +.Ar len3 +bytes starting with the byte 0x8e. +A multibyte character in the fourth codeset consists of +.Ar len4 +bytes starting with the byte 0x8f. +.Pp +The +.Vt wchar_t +encoding of +.Nm EUC +multibyte characters is dependent on the +.Ar len +and +.Ar mask +arguments. +First, the bytes are moved into a +.Vt wchar_t +as follows: +.Bd -literal +byte0 << ((\fIlen\fPN-1) * 8) | byte1 << ((\fIlen\fPN-2) * 8) | ... | byte\fIlen\fPN-1 +.Ed +.Pp +The result is then ANDed with +.Ar ~mask +and ORed with +.Ar maskN . +Codesets 2 and 3 are special in that the leading byte (0x8e or 0x8f) is +first removed and the +.Ar lenN +argument is reduced by 1. +.Pp +For example, the +.Li ja_JP.eucJP +locale has the following +.Va VARIABLE +line: +.Bd -literal +VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 +.Ed +.Pp +Codeset 1 consists of the values 0x0000 - 0x007f. +.Pp +Codeset 2 consists of the values who have the bits 0x8080 set. +.Pp +Codeset 3 consists of the values 0x0080 - 0x00ff. +.Pp +Codeset 4 consists of the values 0x8000 - 0xff7f excluding the values +which have the 0x0080 bit set. +.Pp +Notice that the global +.Ar mask +is set to 0x8080, this implies that from those 2 bits the codeset can +be determined. +.Sh SEE ALSO +.Xr mklocale 1 , +.Xr setlocale 3 diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c new file mode 100644 index 0000000000..1c81bb2840 --- /dev/null +++ b/lib/libc/locale/euc.c @@ -0,0 +1,272 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)euc.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/euc.c 227753 2011-11-20 14:45:42Z theraven $ + */ + +#include + +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +extern int __mb_sb_limit; + +static size_t _EUC_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _EUC_mbsinit(const mbstate_t *); +static size_t _EUC_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + int count[4]; + wchar_t bits[4]; + wchar_t mask; +} _EucInfo; + +typedef struct { + wchar_t ch; + int set; + int want; +} _EucState; + +int +_EUC_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + _EucInfo *ei; + int x, new__mb_cur_max; + char *v, *e; + + if (rl->__variable == NULL) + return (EFTYPE); + + v = (char *)rl->__variable; + + while (*v == ' ' || *v == '\t') + ++v; + + if ((ei = malloc(sizeof(_EucInfo))) == NULL) + return (errno == 0 ? ENOMEM : errno); + + new__mb_cur_max = 0; + for (x = 0; x < 4; ++x) { + ei->count[x] = (int)strtol(v, &e, 0); + if (v == e || !(v = e)) { + free(ei); + return (EFTYPE); + } + if (new__mb_cur_max < ei->count[x]) + new__mb_cur_max = ei->count[x]; + while (*v == ' ' || *v == '\t') + ++v; + ei->bits[x] = (int)strtol(v, &e, 0); + if (v == e || !(v = e)) { + free(ei); + return (EFTYPE); + } + while (*v == ' ' || *v == '\t') + ++v; + } + ei->mask = (int)strtol(v, &e, 0); + if (v == e || !(v = e)) { + free(ei); + return (EFTYPE); + } + rl->__variable = ei; + rl->__variable_len = sizeof(_EucInfo); + l->runes = rl; + l->__mb_cur_max = new__mb_cur_max; + l->__mbrtowc = _EUC_mbrtowc; + l->__wcrtomb = _EUC_wcrtomb; + l->__mbsinit = _EUC_mbsinit; + l->__mb_sb_limit = 256; + return (0); +} + +static int +_EUC_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _EucState *)ps)->want == 0); +} + +#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) + +#define _SS2 0x008e +#define _SS3 0x008f + +#define GR_BITS 0x80808080 /* XXX: to be fixed */ + +static __inline int +_euc_set(u_int c) +{ + + c &= 0xff; + return ((c & 0x80) ? c == _SS3 ? 3 : c == _SS2 ? 2 : 1 : 0); +} + +static size_t +_EUC_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _EucState *es; + int i, set, want; + wchar_t wc; + const char *os; + + es = (_EucState *)ps; + + if (es->want < 0 || es->want > MB_CUR_MAX || es->set < 0 || + es->set > 3) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + os = s; + + if (es->want == 0) { + want = CEI->count[set = _euc_set(*s)]; + if (set == 2 || set == 3) { + --want; + if (--n == 0) { + /* Incomplete multibyte sequence */ + es->set = set; + es->want = want; + es->ch = 0; + return ((size_t)-2); + } + ++s; + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + } + wc = (unsigned char)*s++; + } else { + set = es->set; + want = es->want; + wc = es->ch; + } + for (i = (es->want == 0) ? 1 : 0; i < MIN(want, n); i++) { + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (wc << 8) | (unsigned char)*s++; + } + if (i < want) { + /* Incomplete multibyte sequence */ + es->set = set; + es->want = want - i; + es->ch = wc; + return ((size_t)-2); + } + wc = (wc & ~CEI->mask) | CEI->bits[set]; + if (pwc != NULL) + *pwc = wc; + es->want = 0; + return (wc == L'\0' ? 0 : s - os); +} + +static size_t +_EUC_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _EucState *es; + wchar_t m, nm; + int i, len; + + es = (_EucState *)ps; + + if (es->want != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + + m = wc & CEI->mask; + nm = wc & ~m; + + if (m == CEI->bits[1]) { +CodeSet1: + /* Codeset 1: The first byte must have 0x80 in it. */ + i = len = CEI->count[1]; + while (i-- > 0) + *s++ = (nm >> (i << 3)) | 0x80; + } else { + if (m == CEI->bits[0]) + i = len = CEI->count[0]; + else if (m == CEI->bits[2]) { + i = len = CEI->count[2]; + *s++ = _SS2; + --i; + /* SS2 designates G2 into GR */ + nm |= GR_BITS; + } else if (m == CEI->bits[3]) { + i = len = CEI->count[3]; + *s++ = _SS3; + --i; + /* SS3 designates G3 into GR */ + nm |= GR_BITS; + } else + goto CodeSet1; /* Bletch */ + while (i-- > 0) + *s++ = (nm >> (i << 3)) & 0xff; + } + return (len); +} diff --git a/lib/libc/stdio/fputwc.c b/lib/libc/locale/fix_grouping.c similarity index 53% copy from lib/libc/stdio/fputwc.c copy to lib/libc/locale/fix_grouping.c index 2fc90ba67c..e525a73ce7 100644 --- a/lib/libc/stdio/fputwc.c +++ b/lib/libc/locale/fix_grouping.c @@ -1,7 +1,5 @@ -/* $NetBSD: fputwc.c,v 1.4 2005/06/12 05:21:27 lukem Exp $ */ - -/*- - * Copyright (c)2001 Citrus Project, +/* + * Copyright (c) 2001 Alexey Zelkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,74 +23,64 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Citrus$ + * $FreeBSD: head/lib/libc/locale/fix_grouping.c 116875 2003-06-26 10:46:16Z phantom $ */ -#include "namespace.h" -#include -#include -#include -#include -#include -#include "un-namespace.h" - -#include "libc_private.h" -#include "local.h" -#include "priv_stdio.h" - -wint_t -__fputwc_unlock(wchar_t wc, FILE *fp) -{ - struct wchar_io_data *wcio; - mbstate_t *st; - size_t size; - char buf[MB_LEN_MAX]; - struct __suio uio; - struct __siov iov; - _DIAGASSERT(fp != NULL); - - /* LINTED we don't play with buf */ - iov.iov_base = (void *)buf; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - - _SET_ORIENTATION(fp, 1); - wcio = WCIO_GET(fp); - if (wcio == NULL) { - errno = ENOMEM; - return WEOF; - } +#include +#include +#include - wcio->wcio_ungetwc_inbuf = 0; - st = &wcio->wcio_mbstate_out; +static const char nogrouping[] = { CHAR_MAX, '\0' }; - size = wcrtomb(buf, wc, st); - if (size == (size_t)-1) { - errno = EILSEQ; - return WEOF; - } +/* + * Internal helper used to convert grouping sequences from string + * representation into POSIX specified form, i.e. + * + * "3;3;-1" -> "\003\003\177\000" + */ - _DIAGASSERT(size != 0); +const char * +__fix_locale_grouping_str(const char *str) +{ + char *src, *dst; + char n; - uio.uio_resid = iov.iov_len = size; - if (__sfvwrite(fp, &uio)) { - return WEOF; + if (str == NULL || *str == '\0') { + return nogrouping; } - return (wint_t)wc; -} + for (src = (char*)str, dst = (char*)str; *src != '\0'; src++) { -wint_t -fputwc(wchar_t wc, FILE *fp) -{ - wint_t r; + /* input string examples: "3;3", "3;2;-1" */ + if (*src == ';') + continue; + + if (*src == '-' && *(src+1) == '1') { + *dst++ = CHAR_MAX; + src++; + continue; + } - _DIAGASSERT(fp != NULL); + if (!isdigit((unsigned char)*src)) { + /* broken grouping string */ + return nogrouping; + } - FLOCKFILE(fp); - r = __fputwc_unlock(wc, fp); - FUNLOCKFILE(fp); + /* assume all numbers <= 99 */ + n = *src - '0'; + if (isdigit((unsigned char)*(src+1))) { + src++; + n *= 10; + n += *src - '0'; + } - return (r); + *dst = n; + /* NOTE: assume all input started with "0" as 'no grouping' */ + if (*dst == '\0') + return (dst == (char*)str) ? nogrouping : str; + dst++; + } + *dst = '\0'; + return str; } diff --git a/lib/libc/gen/isascii.3 b/lib/libc/locale/freelocale.3 similarity index 60% copy from lib/libc/gen/isascii.3 copy to lib/libc/locale/freelocale.3 index 623da12c5a..476a54ee52 100644 --- a/lib/libc/gen/isascii.3 +++ b/lib/libc/locale/freelocale.3 @@ -1,5 +1,8 @@ -.\" Copyright (c) 1989, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,34 +25,44 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.5.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ -.\" -.Dd December 11, 1993 -.Dt ISASCII 3 +.\" $FreeBSD: head/lib/libc/locale/freelocale.3 250245 2013-05-04 17:21:44Z pluknet $ +.Dd September 17, 2011 +.Dt FREELOCALE 3 .Os .Sh NAME -.Nm isascii -.Nd test for ASCII character +.Nm freelocale +.Nd Frees a locale created with +.Xr duplocale 3 +or +.Xr newlocale 3 .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In ctype.h +.In xlocale.h .Ft int -.Fn isascii "int c" +.Fn freelocale "locale_t locale" .Sh DESCRIPTION -The -.Fn isascii -function tests for an -.Tn ASCII -character, which is any character -between 0 and octal 0177 inclusive. +Frees a +.Fa locale_t . +This relinquishes any resources held exclusively by this locale. +Note that locales share reference-counted components, +so a call to this function is not guaranteed to free all of the components. +.Sh RETURN VALUES +Returns 0 on success or -1 on error. .Sh SEE ALSO -.Xr ctype 3 , -.Xr ascii 7 +.Xr duplocale 3 , +.Xr localeconv 3 , +.Xr newlocale 3 , +.Xr querylocale 3 , +.Xr uselocale 3 , +.Xr xlocale 3 .Sh STANDARDS The -.Fn isascii -function conforms to -.St -isoC . +.Fn freelocale +function +differs from +.St -p1003.1-2008 +in that its return type is +.Vt int +rather than +.Vt void . diff --git a/lib/libc/locale/gb18030.5 b/lib/libc/locale/gb18030.5 new file mode 100644 index 0000000000..3ccc3c2233 --- /dev/null +++ b/lib/libc/locale/gb18030.5 @@ -0,0 +1,78 @@ +.\" Copyright (c) 2002, 2003 Tim J. Robbins +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/gb18030.5 131608 2004-07-05 06:39:03Z ru $ +.\" +.Dd August 10, 2003 +.Dt GB18030 5 +.Os +.Sh NAME +.Nm gb18030 +.Nd "GB 18030 encoding method for Chinese text" +.Sh SYNOPSIS +.Nm ENCODING +.Qq GB18030 +.Sh DESCRIPTION +The +.Nm GB18030 +encoding implements GB 18030-2000, a PRC national standard for the encoding of +Chinese characters. +It is a superset of the older GB\ 2312-1980 and GBK encodings, +and incorporates Unicode's Unihan Extension A completely. +It also provides code space for all Unicode 3.0 code points. +.Pp +Multibyte characters in the +.Nm GB18030 +encoding can be one byte, two bytes, or +four bytes long. +There are a total of over 1.5 million code positions. +.Pp +.No GB\ 11383-1981 Pq Tn ASCII +characters are represented by single bytes in the range 0x00 to 0x7F. +.Pp +Chinese characters are represented as either two bytes or four bytes. +Characters that are represented by two bytes begin with a byte in the range +0x81-0xFE and end with a byte either in the range 0x40-0x7E or 0x80-0xFE. +.Pp +Characters that are represented by four bytes begin with a byte in the range +0x81-0xFE, have a second byte in the range 0x30-0x39, a third byte in the range +0x81-0xFE and a fourth byte in the range 0x30-0x39. +.Sh SEE ALSO +.Xr euc 5 , +.Xr gb2312 5 , +.Xr gbk 5 , +.Xr utf8 5 +.Rs +.%T "Chinese National Standard GB 18030-2000: Information Technology -- Chinese ideograms coded character set for information interchange -- Extension for the basic set" +.%D "March 2000" +.Re +.Rs +.%Q "The Unicode Consortium" +.%T "The Unicode Standard, Version 3.0" +.%D "2000" +.Re +.Sh STANDARDS +The +.Nm GB18030 +encoding is believed to be compatible with GB 18030-2000. diff --git a/lib/libc/locale/gb18030.c b/lib/libc/locale/gb18030.c new file mode 100644 index 0000000000..b8f7e9820c --- /dev/null +++ b/lib/libc/locale/gb18030.c @@ -0,0 +1,225 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/gb18030.c 227753 2011-11-20 14:45:42Z theraven $ + */ +/* + * PRC National Standard GB 18030-2000 encoding of Chinese text. + * + * See gb18030(5) for details. + */ + +#include + +#include +#include +#include +#include +#include +#include "mblocal.h" + +static size_t _GB18030_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _GB18030_mbsinit(const mbstate_t *); +static size_t _GB18030_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + int count; + u_char bytes[4]; +} _GB18030State; + +int +_GB18030_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _GB18030_mbrtowc; + l->__wcrtomb = _GB18030_wcrtomb; + l->__mbsinit = _GB18030_mbsinit; + l->runes = rl; + l->__mb_cur_max = 4; + l->__mb_sb_limit = 128; + + return (0); +} + +static int +_GB18030_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _GB18030State *)ps)->count == 0); +} + +static size_t +_GB18030_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, + size_t n, mbstate_t * __restrict ps) +{ + _GB18030State *gs; + wchar_t wch; + int ch, len, ocount; + size_t ncopy; + + gs = (_GB18030State *)ps; + + if (gs->count < 0 || gs->count > sizeof(gs->bytes)) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + ncopy = MIN(MIN(n, MB_CUR_MAX), sizeof(gs->bytes) - gs->count); + memcpy(gs->bytes + gs->count, s, ncopy); + ocount = gs->count; + gs->count += ncopy; + s = (char *)gs->bytes; + n = gs->count; + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + /* + * Single byte: [00-7f] + * Two byte: [81-fe][40-7e,80-fe] + * Four byte: [81-fe][30-39][81-fe][30-39] + */ + ch = (unsigned char)*s++; + if (ch <= 0x7f) { + len = 1; + wch = ch; + } else if (ch >= 0x81 && ch <= 0xfe) { + wch = ch; + if (n < 2) + return ((size_t)-2); + ch = (unsigned char)*s++; + if ((ch >= 0x40 && ch <= 0x7e) || (ch >= 0x80 && ch <= 0xfe)) { + wch = (wch << 8) | ch; + len = 2; + } else if (ch >= 0x30 && ch <= 0x39) { + /* + * Strip high bit off the wide character we will + * eventually output so that it is positive when + * cast to wint_t on 32-bit twos-complement machines. + */ + wch = ((wch & 0x7f) << 8) | ch; + if (n < 3) + return ((size_t)-2); + ch = (unsigned char)*s++; + if (ch < 0x81 || ch > 0xfe) + goto ilseq; + wch = (wch << 8) | ch; + if (n < 4) + return ((size_t)-2); + ch = (unsigned char)*s++; + if (ch < 0x30 || ch > 0x39) + goto ilseq; + wch = (wch << 8) | ch; + len = 4; + } else + goto ilseq; + } else + goto ilseq; + + if (pwc != NULL) + *pwc = wch; + gs->count = 0; + return (wch == L'\0' ? 0 : len - ocount); +ilseq: + errno = EILSEQ; + return ((size_t)-1); +} + +static size_t +_GB18030_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _GB18030State *gs; + size_t len; + int c; + + gs = (_GB18030State *)ps; + + if (gs->count != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if ((wc & ~0x7fffffff) != 0) + goto ilseq; + if (wc & 0x7f000000) { + /* Replace high bit that mbrtowc() removed. */ + wc |= 0x80000000; + c = (wc >> 24) & 0xff; + if (c < 0x81 || c > 0xfe) + goto ilseq; + *s++ = c; + c = (wc >> 16) & 0xff; + if (c < 0x30 || c > 0x39) + goto ilseq; + *s++ = c; + c = (wc >> 8) & 0xff; + if (c < 0x81 || c > 0xfe) + goto ilseq; + *s++ = c; + c = wc & 0xff; + if (c < 0x30 || c > 0x39) + goto ilseq; + *s++ = c; + len = 4; + } else if (wc & 0x00ff0000) + goto ilseq; + else if (wc & 0x0000ff00) { + c = (wc >> 8) & 0xff; + if (c < 0x81 || c > 0xfe) + goto ilseq; + *s++ = c; + c = wc & 0xff; + if (c < 0x40 || c == 0x7f || c == 0xff) + goto ilseq; + *s++ = c; + len = 2; + } else if (wc <= 0x7f) { + *s++ = wc; + len = 1; + } else + goto ilseq; + + return (len); +ilseq: + errno = EILSEQ; + return ((size_t)-1); +} diff --git a/lib/libc/locale/wcsftime.3 b/lib/libc/locale/gb2312.5 similarity index 62% copy from lib/libc/locale/wcsftime.3 copy to lib/libc/locale/gb2312.5 index 03cb641538..d55e08a8e1 100644 --- a/lib/libc/locale/wcsftime.3 +++ b/lib/libc/locale/gb2312.5 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" Copyright (c) 2003 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,46 +22,36 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcsftime.3,v 1.2 2002/11/29 17:35:09 ru Exp $ -.\" $DragonFly: src/lib/libc/locale/wcsftime.3,v 1.1 2005/08/10 13:42:28 joerg Exp $ +.\" $FreeBSD: head/lib/libc/locale/gb2312.5 131608 2004-07-05 06:39:03Z ru $ .\" -.Dd September 8, 2002 -.Dt WCSFTIME 3 +.Dd November 7, 2003 +.Dt GB2312 5 .Os .Sh NAME -.Nm wcsftime -.Nd "convert date and time to a wide-character string" -.Sh LIBRARY -.Lb libc +.Nm gb2312 +.Nd "GB2312 encoding method for Chinese text" .Sh SYNOPSIS -.In wchar.h -.Ft size_t -.Fo wcsftime -.Fa "wchar_t * restrict wcs" "size_t maxsize" -.Fa "const wchar_t * restrict format" "const struct tm * restrict timeptr" -.Fc +.Nm ENCODING +.Qq GB2312 .Sh DESCRIPTION The -.Fn wcsftime -function is equivalent to the -.Fn strftime -function except for the types of its arguments. -Refer to -.Xr strftime 3 -for a detailed description. -.Sh COMPATIBILITY -Some early implementations of -.Fn wcsftime -had a -.Fa format -argument with type -.Vt "const char *" -instead of -.Vt "const wchar_t *" . +.Nm GB2312 +encoding implements GB\ 2312-1980, a PRC national standard +for the encoding of simplified Chinese characters. +.Pp +Multibyte characters in the GB2312 +encoding can be one byte or two bytes long. +.No GB\ 11383-1981 Pq Tn ASCII +characters are represented by single bytes in the range 0x00 to 0x7F. +Simplified Chinese characters are represented by two bytes, both in +the range 0xA1-0xFE. .Sh SEE ALSO -.Xr strftime 3 +.Xr euc 5 , +.Xr gb18030 5 , +.Xr gbk 5 .Sh STANDARDS The -.Fn wcsftime -function conforms to -.St -isoC-99 . +.Nm GB2312 +encoding is believed to be compatible with GB\ 2312-1980. +This standard has been superseded by GB\ 18030-2000, but is still +in wide use. diff --git a/lib/libc/locale/gb2312.c b/lib/libc/locale/gb2312.c new file mode 100644 index 0000000000..39feefbbbc --- /dev/null +++ b/lib/libc/locale/gb2312.c @@ -0,0 +1,161 @@ +/*- + * Copyright (c) 2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 2003 David Xu + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/gb2312.c 227753 2011-11-20 14:45:42Z theraven $ + */ + +#include + +#include +#include +#include +#include +#include +#include "mblocal.h" + +static size_t _GB2312_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _GB2312_mbsinit(const mbstate_t *); +static size_t _GB2312_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + int count; + u_char bytes[2]; +} _GB2312State; + +int +_GB2312_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->runes = rl; + l->__mbrtowc = _GB2312_mbrtowc; + l->__wcrtomb = _GB2312_wcrtomb; + l->__mbsinit = _GB2312_mbsinit; + l->__mb_cur_max = 2; + l->__mb_sb_limit = 128; + return (0); +} + +static int +_GB2312_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _GB2312State *)ps)->count == 0); +} + +static __inline int +_GB2312_check(const char *str, size_t n) +{ + const u_char *s = (const u_char *)str; + + if (n == 0) + /* Incomplete multibyte sequence */ + return (-2); + if (s[0] >= 0xa1 && s[0] <= 0xfe) { + if (n < 2) + /* Incomplete multibyte sequence */ + return (-2); + if (s[1] < 0xa1 || s[1] > 0xfe) + /* Invalid multibyte sequence */ + return (-1); + return (2); + } else if (s[0] & 0x80) { + /* Invalid multibyte sequence */ + return (-1); + } + return (1); +} + +static size_t +_GB2312_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _GB2312State *gs; + wchar_t wc; + int i, len, ocount; + size_t ncopy; + + gs = (_GB2312State *)ps; + + if (gs->count < 0 || gs->count > sizeof(gs->bytes)) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + ncopy = MIN(MIN(n, MB_CUR_MAX), sizeof(gs->bytes) - gs->count); + memcpy(gs->bytes + gs->count, s, ncopy); + ocount = gs->count; + gs->count += ncopy; + s = (char *)gs->bytes; + n = gs->count; + + if ((len = _GB2312_check(s, n)) < 0) + return ((size_t)len); + wc = 0; + i = len; + while (i-- > 0) + wc = (wc << 8) | (unsigned char)*s++; + if (pwc != NULL) + *pwc = wc; + gs->count = 0; + return (wc == L'\0' ? 0 : len - ocount); +} + +static size_t +_GB2312_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _GB2312State *gs; + + gs = (_GB2312State *)ps; + + if (gs->count != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc & 0x8000) { + *s++ = (wc >> 8) & 0xff; + *s = wc & 0xff; + return (2); + } + *s = wc & 0xff; + return (1); +} diff --git a/lib/libc/locale/wcsftime.3 b/lib/libc/locale/gbk.5 similarity index 55% copy from lib/libc/locale/wcsftime.3 copy to lib/libc/locale/gbk.5 index 03cb641538..6b3bb1b6b1 100644 --- a/lib/libc/locale/wcsftime.3 +++ b/lib/libc/locale/gbk.5 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" Copyright (c) 2003 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,46 +22,42 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcsftime.3,v 1.2 2002/11/29 17:35:09 ru Exp $ -.\" $DragonFly: src/lib/libc/locale/wcsftime.3,v 1.1 2005/08/10 13:42:28 joerg Exp $ +.\" $FreeBSD: head/lib/libc/locale/gbk.5 131608 2004-07-05 06:39:03Z ru $ .\" -.Dd September 8, 2002 -.Dt WCSFTIME 3 +.Dd August 10, 2003 +.Dt GBK 5 .Os .Sh NAME -.Nm wcsftime -.Nd "convert date and time to a wide-character string" -.Sh LIBRARY -.Lb libc +.Nm gbk +.Nd "Guojia biaozhun kuozhan (GBK) encoding method for Chinese text" .Sh SYNOPSIS -.In wchar.h -.Ft size_t -.Fo wcsftime -.Fa "wchar_t * restrict wcs" "size_t maxsize" -.Fa "const wchar_t * restrict format" "const struct tm * restrict timeptr" -.Fc +.Nm ENCODING +.Qq GBK .Sh DESCRIPTION -The -.Fn wcsftime -function is equivalent to the -.Fn strftime -function except for the types of its arguments. -Refer to -.Xr strftime 3 -for a detailed description. -.Sh COMPATIBILITY -Some early implementations of -.Fn wcsftime -had a -.Fa format -argument with type -.Vt "const char *" -instead of -.Vt "const wchar_t *" . +GBK is a backwards-compatible extension of the GB\ 2312-1980 encoding +method for Chinese text, which adds the characters defined in the +Unified Han portion of the Unicode 2.1 standard. +.Pp +Multibyte characters in the GBK +encoding can be one byte or two bytes long. +.No GB\ 11383-1981 Pq Tn ASCII +characters are represented by single bytes in the range 0x00 to 0x7F. +Chinese characters are represented by two bytes, beginning with a byte in +the range 0x80-0xFE and ending with a byte in the range 0x40-0xFE. .Sh SEE ALSO -.Xr strftime 3 +.Xr euc 5 , +.Xr gb18030 5 , +.Xr gb2312 5 , +.Xr utf8 5 +.Rs +.%Q "The Unicode Consortium" +.%T "The Unicode Standard, Version 2.1" +.%D "1999" +.Re +.Rs +.%T "Chinese National Standard GB 18030-2000: Information Technology -- Chinese ideograms coded character set for information interchange -- Extension for the basic set" +.%D "March 2000" +.Re .Sh STANDARDS -The -.Fn wcsftime -function conforms to -.St -isoC-99 . +GBK is not a standard, but has been superseded by +GB\ 18030-2000. diff --git a/lib/libc/locale/gbk.c b/lib/libc/locale/gbk.c new file mode 100644 index 0000000000..a420b60db2 --- /dev/null +++ b/lib/libc/locale/gbk.c @@ -0,0 +1,173 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/gbk.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +extern int __mb_sb_limit; + +static size_t _GBK_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _GBK_mbsinit(const mbstate_t *); +static size_t _GBK_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + wchar_t ch; +} _GBKState; + +int +_GBK_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _GBK_mbrtowc; + l->__wcrtomb = _GBK_wcrtomb; + l->__mbsinit = _GBK_mbsinit; + l->runes = rl; + l->__mb_cur_max = 2; + l->__mb_sb_limit = 128; + return (0); +} + +static int +_GBK_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _GBKState *)ps)->ch == 0); +} + +static __inline int +_gbk_check(u_int c) +{ + + c &= 0xff; + return ((c >= 0x81 && c <= 0xfe) ? 2 : 1); +} + +static size_t +_GBK_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _GBKState *gs; + wchar_t wc; + size_t len; + + gs = (_GBKState *)ps; + + if ((gs->ch & ~0xFF) != 0) { + /* Bad conversion state. */ + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + if (gs->ch != 0) { + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (gs->ch << 8) | (*s & 0xFF); + if (pwc != NULL) + *pwc = wc; + gs->ch = 0; + return (1); + } + + len = (size_t)_gbk_check(*s); + wc = *s++ & 0xff; + if (len == 2) { + if (n < 2) { + /* Incomplete multibyte sequence */ + gs->ch = wc; + return ((size_t)-2); + } + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (wc << 8) | (*s++ & 0xff); + if (pwc != NULL) + *pwc = wc; + return (2); + } else { + if (pwc != NULL) + *pwc = wc; + return (wc == L'\0' ? 0 : 1); + } +} + +static size_t +_GBK_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _GBKState *gs; + + gs = (_GBKState *)ps; + + if (gs->ch != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc & 0x8000) { + *s++ = (wc >> 8) & 0xff; + *s = wc & 0xff; + return (2); + } + *s = wc & 0xff; + return (1); +} diff --git a/lib/libc/gen/isalnum.3 b/lib/libc/locale/isalnum.3 similarity index 57% rename from lib/libc/gen/isalnum.3 rename to lib/libc/locale/isalnum.3 index 768d033422..941466b0e3 100644 --- a/lib/libc/gen/isalnum.3 +++ b/lib/libc/locale/isalnum.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isalnum.3,v 1.7.2.7 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isalnum.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isalnum.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISALNUM 3 .Os .Sh NAME @@ -45,6 +44,8 @@ .In ctype.h .Ft int .Fn isalnum "int c" +.Ft int +.Fn isalnum_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isalnum @@ -53,42 +54,62 @@ function tests for any character for which or .Xr isdigit 3 is true. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''" -.It "\&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''" -.It "\&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''" -.It "\&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''" -.It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" -.It "\&171\ ``y'' \t172\ ``z''" +.It "\&060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" Ta "064\ ``4''" +.It "\&065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" Ta "071\ ``9''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta "141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" +.It "\&145\ ``e''" Ta "146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" +.It "\&152\ ``j''" Ta "153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" +.It "\&157\ ``o''" Ta "160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" +.It "\&164\ ``t''" Ta "165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" +.It "\&171\ ``y''" Ta "172\ ``z''" Ta \& Ta \& Ta \& .El +.Pp +The +.Fn isalnum_l +function takes an explicit locale argument, whereas the +.Fn isalnum +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalnum function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswalnum +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , .Xr isalpha 3 , .Xr isdigit 3 , +.Xr iswalnum 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isalnum function conforms to .St -isoC . +The +.Fn isalnum_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/gen/isalpha.3 b/lib/libc/locale/isalpha.3 similarity index 59% rename from lib/libc/gen/isalpha.3 rename to lib/libc/locale/isalpha.3 index af8a9175c1..876d94dc8a 100644 --- a/lib/libc/gen/isalpha.3 +++ b/lib/libc/locale/isalpha.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isalpha.3,v 1.7.2.6 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isalpha.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isalpha.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISALPHA 3 .Os .Sh NAME @@ -45,6 +44,8 @@ .In ctype.h .Ft int .Fn isalpha "int c" +.Ft int +.Fn isalpha_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isalpha @@ -53,40 +54,60 @@ function tests for any character for which or .Xr islower 3 is true. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''" -.It "\&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''" -.It "\&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''" -.It "\&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''" -.It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" -.It "\&171\ ``y'' \t172\ ``z''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta "141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" +.It "\&145\ ``e''" Ta "146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" +.It "\&152\ ``j''" Ta "153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" +.It "\&157\ ``o''" Ta "160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" +.It "\&164\ ``t''" Ta "165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" +.It "\&171\ ``y''" Ta "172\ ``z''" Ta \& Ta \& Ta \& .El +.Pp +The +.Fn isalpha_l +function takes an explicit locale argument, whereas the +.Fn isalpha +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalpha function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswalpha +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , .Xr islower 3 , .Xr isupper 3 , +.Xr iswalpha 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isalpha function conforms to .St -isoC . +The +.Fn isalpha_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/gen/isascii.3 b/lib/libc/locale/isascii.3 similarity index 85% copy from lib/libc/gen/isascii.3 copy to lib/libc/locale/isascii.3 index 623da12c5a..79d9f81dcf 100644 --- a/lib/libc/gen/isascii.3 +++ b/lib/libc/locale/isascii.3 @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -26,10 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.5.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ +.\" $FreeBSD: head/lib/libc/locale/isascii.3 196820 2009-09-04 07:44:58Z des $ .\" -.Dd December 11, 1993 +.Dd October 6, 2002 .Dt ISASCII 3 .Os .Sh NAME @@ -50,9 +49,5 @@ character, which is any character between 0 and octal 0177 inclusive. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswascii 3 , .Xr ascii 7 -.Sh STANDARDS -The -.Fn isascii -function conforms to -.St -isoC . diff --git a/lib/libc/gen/isblank.3 b/lib/libc/locale/isblank.3 similarity index 65% rename from lib/libc/gen/isblank.3 rename to lib/libc/locale/isblank.3 index 1c49440542..e90da44d7b 100644 --- a/lib/libc/gen/isblank.3 +++ b/lib/libc/locale/isblank.3 @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -26,10 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isblank.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isblank.3,v 1.4.2.3 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isblank.3,v 1.3 2006/04/08 08:57:00 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isblank.3 248803 2013-03-27 21:31:40Z jilles $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISBLANK 3 .Os .Sh NAME @@ -41,22 +40,57 @@ .In ctype.h .Ft int .Fn isblank "int c" +.Ft int +.Fn isblank_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isblank function tests for a space or tab character. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +For any locale, this includes the following standard characters: +.Bl -column XXXX +.It Do \et Dc Ta Dq " " +.El +.Pp +In the "C" locale, a successful +.Fn isblank +test is limited to these characters only. +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp +The +.Fn isblank_l +function takes an explicit locale argument, whereas the +.Fn isblank +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isblank function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswblank +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswblank 3 , +.Xr xlocale 3 , .Xr ascii 7 +.Sh STANDARDS +The +.Fn isblank +function +conforms to +.St -isoC-99 . +The +.Fn isblank_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/gen/iscntrl.3 b/lib/libc/locale/iscntrl.3 similarity index 65% rename from lib/libc/gen/iscntrl.3 rename to lib/libc/locale/iscntrl.3 index a212f8137f..0e9a553738 100644 --- a/lib/libc/gen/iscntrl.3 +++ b/lib/libc/locale/iscntrl.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/iscntrl.3,v 1.6.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/iscntrl.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/iscntrl.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISCNTRL 3 .Os .Sh NAME @@ -45,38 +44,60 @@ .In ctype.h .Ft int .Fn iscntrl "int c" +.Ft int +.Fn iscntrl_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn iscntrl function tests for any control character. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&000\ nul \t001\ soh \t002\ stx \t003\ etx \t004\ eot" -.It "\&005\ enq \t006\ ack \t007\ bel \t010\ bs \t011\ ht" -.It "\&012\ nl \t013\ vt \t014\ np \t015\ cr \t016\ so" -.It "\&017\ si \t020\ dle \t021\ dc1 \t022\ dc2 \t023\ dc3" -.It "\&024\ dc4 \t025\ nak \t026\ syn \t027\ etb \t030\ can" -.It "\&031\ em \t032\ sub \t033\ esc \t034\ fs \t035\ gs" -.It "\&036\ rs \t037\ us \t177\ del" +.It "\&000\ NUL" Ta "001\ SOH" Ta "002\ STX" Ta "003\ ETX" Ta "004\ EOT" +.It "\&005\ ENQ" Ta "006\ ACK" Ta "007\ BEL" Ta "010\ BS" Ta "011\ HT" +.It "\&012\ NL" Ta "013\ VT" Ta "014\ NP" Ta "015\ CR" Ta "016\ SO" +.It "\&017\ SI" Ta "020\ DLE" Ta "021\ DC1" Ta "022\ DC2" Ta "023\ DC3" +.It "\&024\ DC4" Ta "025\ NAK" Ta "026\ SYN" Ta "027\ ETB" Ta "030\ CAN" +.It "\&031\ EM" Ta "032\ SUB" Ta "033\ ESC" Ta "034\ FS" Ta "035\ GS" +.It "\&036\ RS" Ta "037\ US" Ta "177\ DEL" Ta \& Ta \& .El +.Pp +The +.Fn iscntrl_l +function takes an explicit locale argument, whereas the +.Fn iscntrl +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn iscntrl function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswcntrl +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswcntrl 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn iscntrl function conforms to .St -isoC . +The +.Fn iscntrl_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/gen/isctype.c b/lib/libc/locale/isctype.c similarity index 52% rename from lib/libc/gen/isctype.c rename to lib/libc/locale/isctype.c index 14b3882a13..d810b08036 100644 --- a/lib/libc/gen/isctype.c +++ b/lib/libc/locale/isctype.c @@ -1,15 +1,15 @@ -/* $NetBSD: src/lib/libc/gen/isctype.c,v 1.16 2003/08/07 16:42:52 agc Exp $ */ -/* $DragonFly: src/lib/libc/gen/isctype.c,v 1.6 2005/09/17 14:39:44 joerg Exp $ */ - /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -18,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,105 +33,195 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)isctype.c 8.3 (Berkeley) 2/24/94 + * $FreeBSD: head/lib/libc/locale/isctype.c 172619 2007-10-13 16:28:22Z ache $ */ -#define _ANSI_LIBRARY + #include +#undef digittoint +int +digittoint(c) + int c; +{ + return (__sbmaskrune(c, 0xFF)); +} + #undef isalnum int -isalnum(int c) +isalnum(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_A | _CTYPEMASK_D, c)); + return (__sbistype(c, _CTYPE_A|_CTYPE_D)); } #undef isalpha int -isalpha(int c) +isalpha(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_A, c)); + return (__sbistype(c, _CTYPE_A)); +} + +#undef isascii +int +isascii(c) + int c; +{ + return ((c & ~0x7F) == 0); } #undef isblank int -isblank(int c) +isblank(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_B, c)); + return (__sbistype(c, _CTYPE_B)); } #undef iscntrl int -iscntrl(int c) +iscntrl(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_C, c)); + return (__sbistype(c, _CTYPE_C)); } #undef isdigit int -isdigit(int c) +isdigit(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_D, c)); + return (__isctype(c, _CTYPE_D)); } #undef isgraph int -isgraph(int c) +isgraph(c) + int c; +{ + return (__sbistype(c, _CTYPE_G)); +} + +#undef ishexnumber +int +ishexnumber(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_G, c)); + return (__sbistype(c, _CTYPE_X)); +} + +#undef isideogram +int +isideogram(c) + int c; +{ + return (__sbistype(c, _CTYPE_I)); } #undef islower int -islower(int c) +islower(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_L, c)); + return (__sbistype(c, _CTYPE_L)); +} + +#undef isnumber +int +isnumber(c) + int c; +{ + return (__sbistype(c, _CTYPE_D)); +} + +#undef isphonogram +int +isphonogram(c) + int c; +{ + return (__sbistype(c, _CTYPE_Q)); } #undef isprint int -isprint(int c) +isprint(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_R, c)); + return (__sbistype(c, _CTYPE_R)); } #undef ispunct int -ispunct(int c) +ispunct(c) + int c; +{ + return (__sbistype(c, _CTYPE_P)); +} + +#undef isrune +int +isrune(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_P, c)); + return (__sbistype(c, 0xFFFFFF00L)); } #undef isspace int -isspace(int c) +isspace(c) + int c; +{ + return (__sbistype(c, _CTYPE_S)); +} + +#undef isspecial +int +isspecial(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_S, c)); + return (__sbistype(c, _CTYPE_T)); } #undef isupper int -isupper(int c) +isupper(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_U, c)); + return (__sbistype(c, _CTYPE_U)); } #undef isxdigit int -isxdigit(int c) +isxdigit(c) + int c; { - return(__libc_ctype_index(_CTYPEMASK_X, c)); + return (__isctype(c, _CTYPE_X)); } -#undef _toupper +#undef toascii int -_toupper(int c) +toascii(c) + int c; { - return(c - 'a' + 'A'); + return (c & 0x7F); } -#undef _tolower +#undef tolower int -_tolower(int c) +tolower(c) + int c; { - return(c - 'A' + 'a'); + return (__sbtolower(c)); } + +#undef toupper +int +toupper(c) + int c; +{ + return (__sbtoupper(c)); +} + diff --git a/lib/libc/gen/isdigit.3 b/lib/libc/locale/isdigit.3 similarity index 57% rename from lib/libc/gen/isdigit.3 rename to lib/libc/locale/isdigit.3 index 3454080401..eb740825dc 100644 --- a/lib/libc/gen/isdigit.3 +++ b/lib/libc/locale/isdigit.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,14 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.6.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isdigit.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isdigit.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd May 4, 2007 .Dt ISDIGIT 3 .Os .Sh NAME -.Nm isdigit +.Nm isdigit, isnumber .Nd decimal-digit character test .Sh LIBRARY .Lb libc @@ -45,33 +44,70 @@ .In ctype.h .Ft int .Fn isdigit "int c" +.Ft int +.Fn isnumber "int c" +.Ft int +.Fn isdigit_l "int c" "locale_t loc" +.Ft int +.Fn isnumber_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isdigit -function tests for any decimal-digit character. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +function tests for a decimal digit character. +Regardless of locale, this includes the following characters only: +.Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ +.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''" +.It "\&``5''" Ta "``6''" Ta "``7''" Ta "``8''" Ta "``9''" +.El +.Pp +The +.Fn isnumber +function behaves similarly to +.Fn isdigit , +but may recognize additional characters, depending on the current locale +setting. +.Pp +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . -In the ASCII character set, this includes the following characters -(with their numeric values shown in octal): -.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.El +.Pp +The _l-suffixed versions take an explicit locale argument, whereas the +non-suffixed versions use the current global or per-thread locale. .Sh RETURN VALUES The .Fn isdigit -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isnumber +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswdigit +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswdigit 3 , +.Xr multibyte 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isdigit function conforms to .St -isoC . +The +.Fn isdigit_l +function conforms to +.St -p1003.1-2008 . +.Sh HISTORY +The +.Fn isnumber +function appeared in +.Bx 4.4 . diff --git a/lib/libc/locale/isgraph.3 b/lib/libc/locale/isgraph.3 new file mode 100644 index 0000000000..a374864cbb --- /dev/null +++ b/lib/libc/locale/isgraph.3 @@ -0,0 +1,119 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the American National Standards Committee X3, on Information +.\" Processing Systems. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 +.\" $FreeBSD: head/lib/libc/locale/isgraph.3 238919 2012-07-30 20:56:19Z issyl0 $ +.\" +.Dd July 30, 2012 +.Dt ISGRAPH 3 +.Os +.Sh NAME +.Nm isgraph +.Nd printing character test (space character exclusive) +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In ctype.h +.Ft int +.Fn isgraph "int c" +.Ft int +.Fn isgraph_l "int c" "locale_t loc" +.Sh DESCRIPTION +The +.Fn isgraph +function tests for any printing character except space +.Pq Ql "\~" +and other +locale-specific space-like characters. +The value of the argument must be representable as an +.Vt "unsigned char" +or the value of +.Dv EOF . +.Pp +In the ASCII character set, this includes the following characters +(with their numeric values shown in octal): +.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ +.It "\&041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" Ta "045\ ``%''" +.It "\&046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" Ta "052\ ``*''" +.It "\&053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" Ta "057\ ``/''" +.It "\&060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" Ta "064\ ``4''" +.It "\&065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" Ta "071\ ``9''" +.It "\&072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" Ta "076\ ``>''" +.It "\&077\ ``?''" Ta "100\ ``@''" Ta "101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" +.It "\&104\ ``D''" Ta "105\ ``E''" Ta "106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" +.It "\&111\ ``I''" Ta "112\ ``J''" Ta "113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" +.It "\&116\ ``N''" Ta "117\ ``O''" Ta "120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" +.It "\&123\ ``S''" Ta "124\ ``T''" Ta "125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" +.It "\&130\ ``X''" Ta "131\ ``Y''" Ta "132\ ``Z''" Ta "133\ ``[''" Ta "134\ ``\e\|''" +.It "\&135\ ``]''" Ta "136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "141\ ``a''" +.It "\&142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" Ta "146\ ``f''" +.It "\&147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" Ta "153\ ``k''" +.It "\&154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" Ta "160\ ``p''" +.It "\&161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" Ta "165\ ``u''" +.It "\&166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" Ta "172\ ``z''" +.It "\&173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" Ta \& +.El +.Pp +The +.Fn isgraph_l +function takes an explicit locale argument, whereas the +.Fn isgraph +function uses the current global or per-thread locale. +.Sh RETURN VALUES +The +.Fn isgraph +and +.Fn isgraph_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswgraph +function should be used instead. +.Sh SEE ALSO +.Xr ctype 3 , +.Xr iswgraph 3 , +.Xr ascii 7 +.Sh STANDARDS +The +.Fn isgraph +function conforms to +.St -isoC . +The +.Fn isgraph_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/isideogram.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/isideogram.3 index 94573d7bfc..dc1a8b80ce 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/isideogram.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,35 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isideogram.3 196820 2009-09-04 07:44:58Z des $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd March 30, 2004 +.Dt ISIDEOGRAM 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm isideogram +.Nd ideographic character test .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h +.In ctype.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fn isideogram "int c" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn isideogram +function tests for an ideographic character. .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn isideogram +function returns zero if the character tests false and +returns non-zero if the character tests true. .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr ctype 3 , +.Xr isphonogram 3 , +.Xr iswideogram 3 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn isideogram +function appeared in +.Bx 4.4 . diff --git a/lib/libc/gen/islower.3 b/lib/libc/locale/islower.3 similarity index 63% rename from lib/libc/gen/islower.3 rename to lib/libc/locale/islower.3 index e605aaa6db..7600c6defd 100644 --- a/lib/libc/gen/islower.3 +++ b/lib/libc/locale/islower.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)islower.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/islower.3,v 1.7.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/islower.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/islower.3 238920 2012-07-30 21:02:44Z joel $ .\" -.Dd June 4, 1993 +.Dd July 30, 2012 .Dt ISLOWER 3 .Os .Sh NAME @@ -45,34 +44,52 @@ .In ctype.h .Ft int .Fn islower "int c" +.Ft int +.Fn islower_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn islower function tests for any lower-case letters. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''" -.It "\&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''" -.It "\&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''" -.It "\&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''" -.It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" -.It "\&172\ ``z''" +.It "\&141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" +.It "\&146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" +.It "\&153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" +.It "\&160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" +.It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" +.It "\&172\ ``z''" Ta \& Ta \& Ta \& Ta \& .El +The +.Fn islower_l +function takes an explicit locale argument, whereas the +.Fn islower +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn islower -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn islower_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswlower +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswlower 3 , .Xr tolower 3 , .Xr ascii 7 .Sh STANDARDS @@ -80,3 +97,7 @@ The .Fn islower function conforms to .St -isoC . +The +.Fn islower_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/isphonogram.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/isphonogram.3 index 94573d7bfc..2e8811bbe5 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/isphonogram.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,35 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isphonogram.3 196820 2009-09-04 07:44:58Z des $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd March 30, 2004 +.Dt ISPHONOGRAM 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm isphonogram +.Nd phonographic character test .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h +.In ctype.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fn isphonogram "int c" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn isphonogram +function tests for a phonographic character. .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn isphonogram +function returns zero if the character tests false and +returns non-zero if the character tests true. .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr ctype 3 , +.Xr isideogram 3 , +.Xr iswphonogram 3 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn isphonogram +function appeared in +.Bx 4.4 . diff --git a/lib/libc/gen/isprint.3 b/lib/libc/locale/isprint.3 similarity index 52% rename from lib/libc/gen/isprint.3 rename to lib/libc/locale/isprint.3 index 62851818b1..67d06872c6 100644 --- a/lib/libc/gen/isprint.3 +++ b/lib/libc/locale/isprint.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isprint.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isprint.3,v 1.7.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isprint.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isprint.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISPRINT 3 .Os .Sh NAME @@ -48,44 +47,54 @@ .Sh DESCRIPTION The .Fn isprint -function tests for any printing character including space (' '). -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +function tests for any printing character, including space +.Pq Ql "\ " . +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&040\ sp \t041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$''" -.It "\&045\ ``%'' \t046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)''" -.It "\&052\ ``*'' \t053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.''" -.It "\&057\ ``/'' \t060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3''" -.It "\&064\ ``4'' \t065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8''" -.It "\&071\ ``9'' \t072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``=''" -.It "\&076\ ``>'' \t077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B''" -.It "\&103\ ``C'' \t104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G''" -.It "\&110\ ``H'' \t111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L''" -.It "\&115\ ``M'' \t116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q''" -.It "\&122\ ``R'' \t123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V''" -.It "\&127\ ``W'' \t130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``[''" -.It "\&134\ ``\e\|'' \t135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```''" -.It "\&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''" -.It "\&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''" -.It "\&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''" -.It "\&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''" -.It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" -.It "\&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" +.It "\&040\ sp" Ta "041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" +.It "\&045\ ``%''" Ta "046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" +.It "\&052\ ``*''" Ta "053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" +.It "\&057\ ``/''" Ta "060\ ``0''" Ta "061\ ``1''" Ta "062\ ``2''" Ta "063\ ``3''" +.It "\&064\ ``4''" Ta "065\ ``5''" Ta "066\ ``6''" Ta "067\ ``7''" Ta "070\ ``8''" +.It "\&071\ ``9''" Ta "072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" +.It "\&076\ ``>''" Ta "077\ ``?''" Ta "100\ ``@''" Ta "101\ ``A''" Ta "102\ ``B''" +.It "\&103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" Ta "106\ ``F''" Ta "107\ ``G''" +.It "\&110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" Ta "113\ ``K''" Ta "114\ ``L''" +.It "\&115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" Ta "120\ ``P''" Ta "121\ ``Q''" +.It "\&122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" Ta "125\ ``U''" Ta "126\ ``V''" +.It "\&127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" Ta "132\ ``Z''" Ta "133\ ``[''" +.It "\&134\ ``\e\|''" Ta "135\ ``]''" Ta "136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" +.It "\&141\ ``a''" Ta "142\ ``b''" Ta "143\ ``c''" Ta "144\ ``d''" Ta "145\ ``e''" +.It "\&146\ ``f''" Ta "147\ ``g''" Ta "150\ ``h''" Ta "151\ ``i''" Ta "152\ ``j''" +.It "\&153\ ``k''" Ta "154\ ``l''" Ta "155\ ``m''" Ta "156\ ``n''" Ta "157\ ``o''" +.It "\&160\ ``p''" Ta "161\ ``q''" Ta "162\ ``r''" Ta "163\ ``s''" Ta "164\ ``t''" +.It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" +.It "\&172\ ``z''" Ta "173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" .El .Sh RETURN VALUES The .Fn isprint function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswprint +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswprint 3 , .Xr ascii 7 .Sh STANDARDS The diff --git a/lib/libc/gen/ispunct.3 b/lib/libc/locale/ispunct.3 similarity index 60% rename from lib/libc/gen/ispunct.3 rename to lib/libc/locale/ispunct.3 index 9d451c9ebe..a78f901b2d 100644 --- a/lib/libc/gen/ispunct.3 +++ b/lib/libc/locale/ispunct.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/ispunct.3,v 1.7.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/ispunct.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/ispunct.3 238919 2012-07-30 20:56:19Z issyl0 $ .\" -.Dd June 4, 1993 +.Dd July 30, 2012 .Dt ISPUNCT 3 .Os .Sh NAME @@ -45,41 +44,66 @@ .In ctype.h .Ft int .Fn ispunct "int c" +.Ft int +.Fn ispunct_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn ispunct -function tests for any printing character except for space (' ') or a +function tests for any printing character except for space +.Pq Ql "\ " +or a character for which .Xr isalnum 3 is true. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&041\ ``!'' \t042\ ``""'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''" -.It "\&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''" -.It "\&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''" -.It "\&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''" -.It "\&077\ ``?'' \t100\ ``@'' \t133\ ``['' \t134\ ``\e\|'' \t135\ ``]''" -.It "\&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''" -.It "\&175\ ``}'' \t176\ ``~''" +.It "\&041\ ``!''" Ta "042\ ``""''" Ta "043\ ``#''" Ta "044\ ``$''" Ta "045\ ``%''" +.It "\&046\ ``&''" Ta "047\ ``'''" Ta "050\ ``(''" Ta "051\ ``)''" Ta "052\ ``*''" +.It "\&053\ ``+''" Ta "054\ ``,''" Ta "055\ ``-''" Ta "056\ ``.''" Ta "057\ ``/''" +.It "\&072\ ``:''" Ta "073\ ``;''" Ta "074\ ``<''" Ta "075\ ``=''" Ta "076\ ``>''" +.It "\&077\ ``?''" Ta "100\ ``@''" Ta "133\ ``[''" Ta "134\ ``\e\|''" Ta "135\ ``]''" +.It "\&136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "173\ ``{''" Ta "174\ ``|''" +.It "\&175\ ``}''" Ta "176\ ``~''" Ta \& Ta \& Ta \& .El +.Pp +The +.Fn ispunct_l +function takes an explicit locale argument, whereas the +.Fn ispunct +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn ispunct -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn ispunct_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswpunct +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswpunct 3 , .Xr ascii 7 .Sh STANDARDS The .Fn ispunct function conforms to .St -isoC . +The +.Fn ispunct_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/isrune.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/isrune.3 index 94573d7bfc..e89c45cbe2 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/isrune.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,41 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isrune.3 196820 2009-09-04 07:44:58Z des $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd March 30, 2004 +.Dt ISRUNE 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm isrune +.Nd valid character test .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h +.In ctype.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fn isrune "int c" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn isrune +function tests for any character that is valid in the current +character set. +In the +.Tn ASCII +character set, this is equivalent to +.Fn isascii . .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn isrune +function returns zero if the character tests false and +returns non-zero if the character tests true. .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr ctype 3 , +.Xr isascii 3 , +.Xr iswrune 3 , +.Xr ascii 7 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn isrune +function appeared in +.Bx 4.4 . diff --git a/lib/libc/gen/isspace.3 b/lib/libc/locale/isspace.3 similarity index 62% rename from lib/libc/gen/isspace.3 rename to lib/libc/locale/isspace.3 index 9d4fabcb11..3f5fa92206 100644 --- a/lib/libc/gen/isspace.3 +++ b/lib/libc/locale/isspace.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isspace.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isspace.3,v 1.6.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isspace.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isspace.3 238919 2012-07-30 20:56:19Z issyl0 $ .\" -.Dd June 4, 1993 +.Dd July 30, 2012 .Dt ISSPACE 3 .Os .Sh NAME @@ -45,33 +44,58 @@ .In ctype.h .Ft int .Fn isspace "int c" +.Ft int +.Fn isspace_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isspace -function tests for the standard white-space characters. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +function tests for white-space characters. +For any locale, this includes the following standard characters: +.Bl -column \&`\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___ \&``\et''___ +.It "\&``\et''" Ta "``\en''" Ta "``\ev''" Ta "``\ef''" Ta "``\er''" Ta "`` ''" +.El +.Pp +In the "C" locale, +.Fn isspace +returns non-zero for these characters only. +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . -In the ASCII character set, this includes the following characters -(with their numeric values shown in octal): -.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&011\ ht \t012\ nl \t013\ vt \t014\ np \t015\ cr" -.It "\&040\ sp" -.El +.Pp +The +.Fn isspace_l +function takes an explicit locale argument, whereas the +.Fn isspace +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isspace -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isspace_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswspace +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswspace 3 , +.Xr multibyte 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isspace function conforms to .St -isoC . +The +.Fn isspace_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/isspecial.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/isspecial.3 index 94573d7bfc..27b5c5529c 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/isspecial.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,34 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isspecial.3 196820 2009-09-04 07:44:58Z des $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd March 30, 2004 +.Dt ISSPECIAL 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm isspecial +.Nd special character test .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h +.In ctype.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fn isspecial "int c" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn isspecial +function tests for a special character. .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn isspecial +function returns zero if the character tests false and +returns non-zero if the character tests true. .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr ctype 3 , +.Xr iswspecial 3 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn isspecial +function appeared in +.Bx 4.4 . diff --git a/lib/libc/gen/isupper.3 b/lib/libc/locale/isupper.3 similarity index 71% rename from lib/libc/gen/isupper.3 rename to lib/libc/locale/isupper.3 index f22e2772ee..54188ae289 100644 --- a/lib/libc/gen/isupper.3 +++ b/lib/libc/locale/isupper.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isupper.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isupper.3,v 1.8.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isupper.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isupper.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISUPPER 3 .Os .Sh NAME @@ -49,30 +48,39 @@ The .Fn isupper function tests for any upper-case letter. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . +.Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" -.It "\&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''" -.It "\&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''" -.It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" -.It "\&132\ ``Z''" +.It "\&101\ ``A''" Ta "102\ ``B''" Ta "103\ ``C''" Ta "104\ ``D''" Ta "105\ ``E''" +.It "\&106\ ``F''" Ta "107\ ``G''" Ta "110\ ``H''" Ta "111\ ``I''" Ta "112\ ``J''" +.It "\&113\ ``K''" Ta "114\ ``L''" Ta "115\ ``M''" Ta "116\ ``N''" Ta "117\ ``O''" +.It "\&120\ ``P''" Ta "121\ ``Q''" Ta "122\ ``R''" Ta "123\ ``S''" Ta "124\ ``T''" +.It "\&125\ ``U''" Ta "126\ ``V''" Ta "127\ ``W''" Ta "130\ ``X''" Ta "131\ ``Y''" +.It "\&132\ ``Z''" Ta \& Ta \& Ta \& Ta \& .El .Sh RETURN VALUES The .Fn isupper function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswupper +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswupper 3 , .Xr toupper 3 , .Xr ascii 7 .Sh STANDARDS diff --git a/lib/libc/locale/iswalnum.3 b/lib/libc/locale/iswalnum.3 index 25dd2244df..6f7a4edc6e 100644 --- a/lib/libc/locale/iswalnum.3 +++ b/lib/libc/locale/iswalnum.3 @@ -1,5 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/iswalnum.3,v 1.9 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/iswalnum.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" $NetBSD: iswalnum.3,v 1.5 2002/07/10 14:46:10 yamt Exp $ .\" .\" Copyright (c) 1991 The Regents of the University of California. .\" All rights reserved. @@ -16,7 +15,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -33,21 +32,29 @@ .\" SUCH DAMAGE. .\" .\" @(#)isalnum.3 5.2 (Berkeley) 6/29/91 +.\" $FreeBSD: head/lib/libc/locale/iswalnum.3 165903 2007-01-09 00:28:16Z imp $ .\" -.Dd December 22, 2000 +.Dd October 3, 2002 .Dt ISWALNUM 3 .Os .Sh NAME .Nm iswalnum , .Nm iswalpha , +.Nm iswascii , .Nm iswblank , .Nm iswcntrl , .Nm iswdigit , .Nm iswgraph , +.Nm iswhexnumber , +.Nm iswideogram , .Nm iswlower , +.Nm iswnumber , +.Nm iswphonogram , .Nm iswprint , .Nm iswpunct , +.Nm iswrune , .Nm iswspace , +.Nm iswspecial , .Nm iswupper , .Nm iswxdigit .Nd wide character classification utilities @@ -60,6 +67,8 @@ .Ft int .Fn iswalpha "wint_t wc" .Ft int +.Fn iswascii "wint_t wc" +.Ft int .Fn iswblank "wint_t wc" .Ft int .Fn iswcntrl "wint_t wc" @@ -68,27 +77,38 @@ .Ft int .Fn iswgraph "wint_t wc" .Ft int +.Fn iswhexnumber "wint_t wc" +.Ft int +.Fn iswideogram "wint_t wc" +.Ft int .Fn iswlower "wint_t wc" .Ft int +.Fn iswnumber "wint_t wc" +.Ft int +.Fn iswphonogram "wint_t wc" +.Ft int .Fn iswprint "wint_t wc" .Ft int .Fn iswpunct "wint_t wc" .Ft int +.Fn iswrune "wint_t wc" +.Ft int .Fn iswspace "wint_t wc" .Ft int +.Fn iswspecial "wint_t wc" +.Ft int .Fn iswupper "wint_t wc" .Ft int .Fn iswxdigit "wint_t wc" .Sh DESCRIPTION -The functions are character classification utility functions, +The above functions are character classification utility functions, for use with wide characters -.Po -.Fa wchar_t +.Vt ( wchar_t or -.Fa wint_t -.Pc . -See the description of singlebyte classification functions, like -.Xr isalnum 3 , +.Vt wint_t ) . +See the description for the similarly-named single byte classification +functions (like +.Xr isalnum 3 ) , for details. .Sh RETURN VALUES The functions return zero if the character tests false and @@ -96,22 +116,43 @@ return non-zero if the character tests true. .Sh SEE ALSO .Xr isalnum 3 , .Xr isalpha 3 , +.Xr isascii 3 , .Xr isblank 3 , .Xr iscntrl 3 , .Xr isdigit 3 , .Xr isgraph 3 , +.Xr ishexnumber 3 , +.Xr isideogram 3 , .Xr islower 3 , +.Xr isnumber 3 , +.Xr isphonogram 3 , .Xr isprint 3 , .Xr ispunct 3 , +.Xr isrune 3 , .Xr isspace 3 , +.Xr isspecial 3 , .Xr isupper 3 , -.Xr isxdigit 3 +.Xr isxdigit 3 , +.Xr wctype 3 .Sh STANDARDS -The functions conform to -.St -isoC-99 . +These functions conform to +.St -p1003.1-2001 , +except +.Fn iswascii , +.Fn iswhexnumber , +.Fn iswideogram , +.Fn iswnumber , +.Fn iswphonogram , +.Fn iswrune +and +.Fn iswspecial , +which are +.Fx +extensions. .Sh CAVEATS -The argument to these functions must be +The result of these functions is undefined unless +the argument is .Dv WEOF or a valid -.Fa wchar_t -value with the current locale; otherwise, the result is undefined. +.Vt wchar_t +value for the current locale. diff --git a/lib/libc/locale/iswalnum_l.3 b/lib/libc/locale/iswalnum_l.3 new file mode 100644 index 0000000000..f79b43b504 --- /dev/null +++ b/lib/libc/locale/iswalnum_l.3 @@ -0,0 +1,168 @@ +.\" Copyright (c) 2012 Isabell Long +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/iswalnum_l.3 238808 2012-07-26 14:46:19Z joel $ +.\" +.Dd July 25, 2012 +.Dt ISWALNUM_L 3 +.Os +.Sh NAME +.Nm iswalnum_l , +.Nm iswalpha_l , +.Nm iswcntrl_l , +.Nm iswctype_l , +.Nm iswdigit_l , +.Nm iswgraph_l , +.Nm iswlower_l , +.Nm iswprint_l , +.Nm iswpunct_l , +.Nm iswspace_l , +.Nm iswupper_l , +.Nm iswxdigit_l , +.Nm towlower_l , +.Nm towupper_l , +.Nm wctype_l , +.Nm iswblank_l , +.Nm iswhexnumber_l , +.Nm iswideogram_l , +.Nm iswnumber_l , +.Nm iswphonogram_l , +.Nm iswrune_l , +.Nm iswspecial_l , +.Nm nextwctype_l , +.Nm towctrans_l , +.Nm wctrans_l +.Nd wide character classification utilities +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In wctype.h +.Ft int +.Fn iswalnum_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswalpha_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswcntrl_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswctype_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswdigit_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswgraph_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswlower_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswprint_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswpunct_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswspace_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswupper_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswxdigit_l "wint_t wc" "locale_t loc" +.Ft wint_t +.Fn towlower_l "wint_t wc" "locale_t loc" +.Ft wint_t +.Fn towupper_l "wint_t wc" "locale_t loc" +.Ft wctype_t +.Fn wctype_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswblank_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswhexnumber_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswideogram_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswnumber_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswphonogram_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswrune_l "wint_t wc" "locale_t loc" +.Ft int +.Fn iswspecial_l "wint_t wc" "locale_t loc" +.Ft wint_t +.Fn nextwctype_l "wint_t wc" "locale_t loc" +.Ft wint_t +.Fn towctrans_l "wint_t wc" "wctrans_t" "locale_t loc" +.Ft wctrans_t +.Fn wctrans_l "const char *" "locale_t loc" +.Sh DESCRIPTION +The above functions are character classification utility functions, +for use with wide characters +.Vt ( wchar_t +or +.Vt wint_t ) +in the locale +.Fa loc . +They behave in the same way as the versions without the _l suffix, but use +the specified locale rather than the global or per-thread locale. +These functions may be implemented as inline functions in +.In wctype.h +and as functions in the C library. +See the specific manual pages for more information. +.Sh RETURN VALUES +These functions return the same things as their non-locale versions. +If the locale is invalid, their behaviors are undefined. +.Sh SEE ALSO +.Xr iswalnum 3 , +.Xr iswalpha 3 , +.Xr iswblank 3 , +.Xr iswcntrl 3 , +.Xr iswctype 3 , +.Xr iswdigit 3 , +.Xr iswgraph 3 , +.Xr iswhexnumber 3 , +.Xr iswideogram 3 , +.Xr iswlower 3 , +.Xr iswnumber 3 , +.Xr iswphonogram 3 , +.Xr iswprint 3 , +.Xr iswpunct 3 , +.Xr iswrune 3 , +.Xr iswspace 3 , +.Xr iswspecial 3 , +.Xr iswupper 3 , +.Xr iswxdigit 3 , +.Xr nextwctype 3 , +.Xr towctrans 3 , +.Xr towlower 3 , +.Xr towupper 3 , +.Xr wctrans 3 , +.Xr wctype 3 +.Sh STANDARDS +These functions conform to +.St -p1003.1-2008 , +except for +.Fn iswascii_l , +.Fn iswhexnumber_l , +.Fn iswideogram_l , +.Fn iswphonogram_l , +.Fn iswrune_l , +.Fn iswspecial_l +and +.Fn nextwctype_l +which are +.Fx +extensions. diff --git a/lib/libc/locale/iswctype.3 b/lib/libc/locale/iswctype.3 deleted file mode 100644 index b32165b3c0..0000000000 --- a/lib/libc/locale/iswctype.3 +++ /dev/null @@ -1,99 +0,0 @@ -.\" $NetBSD: src/lib/libc/locale/iswctype.3,v 1.6 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/iswctype.3,v 1.3 2006/10/21 22:17:09 swildner Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd March 4, 2003 -.Dt ISWCTYPE 3 -.Os -.\" ---------------------------------------------------------------------- -.Sh NAME -.Nm iswctype -.Nd test a character for character class identifier -.\" ---------------------------------------------------------------------- -.Sh LIBRARY -.Lb libc -.\" ---------------------------------------------------------------------- -.Sh SYNOPSIS -.In wctype.h -.Ft int -.Fn iswctype "wint_t wc" "wctype_t charclass" -.\" ---------------------------------------------------------------------- -.Sh DESCRIPTION -The -.Fn iswctype -function returns a boolean value that indicates whether a wide character -.Fa wc -is in -.Fa charclass . -.Pp -The behaviour of -.Fn iswctype -is undefined if the -.Fn iswctype -function is called with an invalid -.Fa charclass -(changes of -.Dv LC_CTYPE -category invalidate -.Fa charclass ) -or invalid wide character -.Fa wc . -.Pp -The behaviour of -.Fn iswctype -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- -.Sh RETURN VALUES -The -.Fn iswctype -returns: -.Bl -tag -width 012345678901 -.It 0 -.Fa wc -is not in -.Fa charclass . -.It non-zero -.Fa wc -is in -.Fa charclass . -.El -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- -.Sh SEE ALSO -.Xr setlocale 3 , -.Xr towctrans 3 , -.Xr wctrans 3 , -.Xr wctype 3 -.\" ---------------------------------------------------------------------- -.Sh STANDARDS -The -.Fn iswctype -function conforms to -.St -isoC-amd1 . diff --git a/lib/libc/locale/iswctype.c b/lib/libc/locale/iswctype.c index 5877c8475e..117d5aee82 100644 --- a/lib/libc/locale/iswctype.c +++ b/lib/libc/locale/iswctype.c @@ -1,14 +1,15 @@ -/* $NetBSD: src/lib/libc/locale/iswctype.c,v 1.14 2003/08/07 16:43:04 agc Exp $ */ - /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -17,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,212 +33,178 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/iswctype.c 172909 2007-10-23 17:39:28Z ache $ */ -#include -#include -#include -#include -#include -#include "rune.h" -#include "runetype.h" -#include "rune_local.h" -#include "_wctrans_local.h" - -static _RuneType __runetype_w(wint_t); -static int __isctype_w(wint_t, _RuneType); -static wint_t __toupper_w(wint_t); -static wint_t __tolower_w(wint_t); - -static _RuneType -__runetype_w(wint_t c) -{ - _RuneLocale *rl = _CurrentRuneLocale; - if (_RUNE_ISCACHED(c)) - return(rl->rl_runetype[c]); - else - return(___runetype_mb(c)); -} +#include -static int -__isctype_w(wint_t c, _RuneType f) +#undef iswalnum +int +iswalnum(wc) + wint_t wc; { - if (__runetype_w(c) & f) - return(1); - else - return(0); + return (__istype(wc, _CTYPE_A|_CTYPE_D)); } -static wint_t -__toupper_w(wint_t c) +#undef iswalpha +int +iswalpha(wc) + wint_t wc; { - return(_towctrans(c, _wctrans_upper(_CurrentRuneLocale))); + return (__istype(wc, _CTYPE_A)); } -static wint_t -__tolower_w(wint_t c) +#undef iswascii +int +iswascii(wc) + wint_t wc; { - return(_towctrans(c, _wctrans_lower(_CurrentRuneLocale))); + return ((wc & ~0x7F) == 0); } -#undef iswalnum +#undef iswblank int -iswalnum(wint_t c) +iswblank(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_A|_CTYPE_D)); + return (__istype(wc, _CTYPE_B)); } -#undef iswalpha +#undef iswcntrl int -iswalpha(wint_t c) +iswcntrl(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_A)); + return (__istype(wc, _CTYPE_C)); } -#undef iswblank +#undef iswdigit int -iswblank(wint_t c) +iswdigit(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_B)); + return (__isctype(wc, _CTYPE_D)); } -#undef iswcntrl +#undef iswgraph int -iswcntrl(wint_t c) +iswgraph(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_C)); + return (__istype(wc, _CTYPE_G)); } -#undef iswdigit +#undef iswhexnumber int -iswdigit(wint_t c) +iswhexnumber(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_D)); + return (__istype(wc, _CTYPE_X)); } -#undef iswgraph +#undef iswideogram int -iswgraph(wint_t c) +iswideogram(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_G)); + return (__istype(wc, _CTYPE_I)); } #undef iswlower int -iswlower(wint_t c) +iswlower(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_L)); + return (__istype(wc, _CTYPE_L)); } -#undef iswprint +#undef iswnumber int -iswprint(wint_t c) +iswnumber(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_R)); + return (__istype(wc, _CTYPE_D)); } -#undef iswpunct +#undef iswphonogram int -iswpunct(wint_t c) +iswphonogram(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_P)); + return (__istype(wc, _CTYPE_Q)); } -#undef iswspace +#undef iswprint int -iswspace(wint_t c) +iswprint(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_S)); + return (__istype(wc, _CTYPE_R)); } -#undef iswupper +#undef iswpunct int -iswupper(wint_t c) +iswpunct(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_U)); + return (__istype(wc, _CTYPE_P)); } -#undef iswxdigit +#undef iswrune int -iswxdigit(wint_t c) +iswrune(wc) + wint_t wc; { - return(__isctype_w((c), _CTYPE_X)); + return (__istype(wc, 0xFFFFFF00L)); } -#undef towupper -wint_t -towupper(wint_t c) +#undef iswspace +int +iswspace(wc) + wint_t wc; { - return(__toupper_w(c)); + return (__istype(wc, _CTYPE_S)); } -#undef towlower -wint_t -towlower(wint_t c) +#undef iswspecial +int +iswspecial(wc) + wint_t wc; { - return(__tolower_w(c)); + return (__istype(wc, _CTYPE_T)); } -#undef wcwidth +#undef iswupper int -wcwidth(wchar_t c) +iswupper(wc) + wint_t wc; { - return(((unsigned)__runetype_w(c) & _CTYPE_SWM) >> _CTYPE_SWS); + return (__istype(wc, _CTYPE_U)); } -#undef wctrans -wctrans_t -wctrans(const char *charclass) +#undef iswxdigit +int +iswxdigit(wc) + wint_t wc; { - int i; - _RuneLocale *rl = _CurrentRuneLocale; - - if (rl->rl_wctrans[_WCTRANS_INDEX_LOWER].te_name == NULL) - _wctrans_init(rl); - - for (i = 0; i < _WCTRANS_NINDEXES; i++) { - if (strcmp(rl->rl_wctrans[i].te_name, charclass) == 0) - return((wctrans_t)&rl->rl_wctrans[i]); - } - - return(NULL); + return (__isctype(wc, _CTYPE_X)); } -#undef towctrans +#undef towlower wint_t -towctrans(wint_t c, wctrans_t desc) +towlower(wc) + wint_t wc; { - if (desc == NULL) { - errno = EINVAL; - return(c); - } - return(_towctrans(c, (_WCTransEntry *)desc)); + return (__tolower(wc)); } -#undef wctype -wctype_t -wctype(const char *property) +#undef towupper +wint_t +towupper(wc) + wint_t wc; { - int i; - _RuneLocale *rl = _CurrentRuneLocale; - - for (i=0; i < _WCTYPE_NINDEXES; i++) { - if (strcmp(rl->rl_wctype[i].te_name, property) == 0) - return((wctype_t)&rl->rl_wctype[i]); - } - return(NULL); + return (__toupper(wc)); } -#undef iswctype -int -iswctype(wint_t c, wctype_t charclass) -{ - /* - * SUSv3: If charclass is 0, iswctype() shall return 0. - */ - if (charclass == (wctype_t)0) - return(0); - - return (__isctype_w(c, ((_WCTypeEntry *)charclass)->te_mask)); -} diff --git a/lib/libc/gen/isxdigit.3 b/lib/libc/locale/isxdigit.3 similarity index 64% rename from lib/libc/gen/isxdigit.3 rename to lib/libc/locale/isxdigit.3 index 3e11ea8601..eb56cc9f71 100644 --- a/lib/libc/gen/isxdigit.3 +++ b/lib/libc/locale/isxdigit.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,14 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isxdigit.3,v 1.6.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isxdigit.3,v 1.4 2008/05/02 02:05:03 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/isxdigit.3 233992 2012-04-07 09:05:30Z joel $ .\" -.Dd June 4, 1993 +.Dd July 17, 2005 .Dt ISXDIGIT 3 .Os .Sh NAME -.Nm isxdigit +.Nm isxdigit, ishexnumber .Nd hexadecimal-digit character test .Sh LIBRARY .Lb libc @@ -45,36 +44,58 @@ .In ctype.h .Ft int .Fn isxdigit "int c" +.Ft int +.Fn ishexnumber "int c" .Sh DESCRIPTION The .Fn isxdigit function tests for any hexadecimal-digit character. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +Regardless of locale, this includes the following characters only: +.Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ +.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''" +.It "\&``5''" Ta "``6''" Ta "``7''" Ta "``8''" Ta "``9''" +.It "\&``A''" Ta "``B''" Ta "``C''" Ta "``D''" Ta "``E''" +.It "\&``F''" Ta "``a''" Ta "``b''" Ta "``c''" Ta "``d''" +.It "\&``e''" Ta "``f''" Ta \& Ta \& Ta \& +.El +.Pp +The +.Fn ishexnumber +function behaves similarly to +.Fn isxdigit , +but may recognize additional characters, +depending on the current locale setting. +.Pp +The value of the argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . -In the ASCII character set, this includes the following characters -(with their numeric values shown in octal): -.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ -.It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" -.It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" -.It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" -.It "\&106\ ``F'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''" -.It "\&145\ ``e'' \t146\ ``f''" -.El .Sh RETURN VALUES The .Fn isxdigit function returns zero if the character tests false and returns non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswxdigit +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr iswxdigit 3 , .Xr ascii 7 .Sh STANDARDS The .Fn isxdigit function conforms to .St -isoC . +.Sh HISTORY +The +.Fn ishexnumber +function appeared in +.Bx 4.4 . diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c new file mode 100644 index 0000000000..074b3c2709 --- /dev/null +++ b/lib/libc/locale/ldpart.c @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2000, 2001 Alexey Zelkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/ldpart.c 241046 2012-09-29 11:54:34Z jilles $ + */ + + +#include "namespace.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include "un-namespace.h" + +#include "ldpart.h" +#include "setlocale.h" + +static int split_lines(char *, const char *); + +int +__part_load_locale(const char *name, + int *using_locale, + char **locale_buf, + const char *category_filename, + int locale_buf_size_max, + int locale_buf_size_min, + const char **dst_localebuf) +{ + int saverr, fd, i, num_lines; + char *lbuf, *p; + const char *plim; + char filename[PATH_MAX]; + struct stat st; + size_t namesize, bufsize; + + /* 'name' must be already checked. */ + if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) { + *using_locale = 0; + return (_LDP_CACHE); + } + + /* + * If the locale name is the same as our cache, use the cache. + */ + if (*locale_buf != NULL && strcmp(name, *locale_buf) == 0) { + *using_locale = 1; + return (_LDP_CACHE); + } + + /* + * Slurp the locale file into the cache. + */ + namesize = strlen(name) + 1; + + /* 'PathLocale' must be already set & checked. */ + + /* Range checking not needed, 'name' size is limited */ + strcpy(filename, _PathLocale); + strcat(filename, "/"); + strcat(filename, name); + strcat(filename, "/"); + strcat(filename, category_filename); + if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0) + return (_LDP_ERROR); + if (_fstat(fd, &st) != 0) + goto bad_locale; + if (st.st_size <= 0) { + errno = EFTYPE; + goto bad_locale; + } + bufsize = namesize + st.st_size; + if ((lbuf = malloc(bufsize)) == NULL) { + errno = ENOMEM; + goto bad_locale; + } + (void)strcpy(lbuf, name); + p = lbuf + namesize; + plim = p + st.st_size; + if (_read(fd, p, (size_t) st.st_size) != st.st_size) + goto bad_lbuf; + /* + * Parse the locale file into localebuf. + */ + if (plim[-1] != '\n') { + errno = EFTYPE; + goto bad_lbuf; + } + num_lines = split_lines(p, plim); + if (num_lines >= locale_buf_size_max) + num_lines = locale_buf_size_max; + else if (num_lines >= locale_buf_size_min) + num_lines = locale_buf_size_min; + else { + errno = EFTYPE; + goto bad_lbuf; + } + (void)_close(fd); + /* + * Record the successful parse in the cache. + */ + if (*locale_buf != NULL) + free(*locale_buf); + *locale_buf = lbuf; + for (p = *locale_buf, i = 0; i < num_lines; i++) + dst_localebuf[i] = (p += strlen(p) + 1); + for (i = num_lines; i < locale_buf_size_max; i++) + dst_localebuf[i] = NULL; + *using_locale = 1; + + return (_LDP_LOADED); + +bad_lbuf: + saverr = errno; + free(lbuf); + errno = saverr; +bad_locale: + saverr = errno; + (void)_close(fd); + errno = saverr; + + return (_LDP_ERROR); +} + +static int +split_lines(char *p, const char *plim) +{ + int i; + + i = 0; + while (p < plim) { + if (*p == '\n') { + *p = '\0'; + i++; + } + p++; + } + return (i); +} + diff --git a/lib/libc/string/stpncpy.c b/lib/libc/locale/ldpart.h similarity index 78% copy from lib/libc/string/stpncpy.c copy to lib/libc/locale/ldpart.h index b509c8fc2f..b7803ef3c8 100644 --- a/lib/libc/string/stpncpy.c +++ b/lib/libc/locale/ldpart.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 David Schultz + * Copyright (c) 2000, 2001 Alexey Zelkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,22 +23,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/stpncpy.c, SVN Rev. 189136 $ + * $FreeBSD: head/lib/libc/locale/ldpart.h 116274 2003-06-13 00:14:07Z jkh $ */ -#include +#ifndef _LDPART_H_ +#define _LDPART_H_ -char * -stpncpy(char * __restrict dst, const char * __restrict src, size_t len) -{ +#define _LDP_LOADED 0 +#define _LDP_ERROR (-1) +#define _LDP_CACHE 1 - for (; len--; dst++, src++) { - if (!(*dst = *src)) { - char *ret = dst; - while (len--) - *++dst = '\0'; - return (ret); - } - } - return (dst); -} +int __part_load_locale(const char *, int*, char **, const char *, + int, int, const char **); + +#endif /* !_LDPART_H_ */ diff --git a/lib/libc/locale/lmessages.c b/lib/libc/locale/lmessages.c new file mode 100644 index 0000000000..c136d94401 --- /dev/null +++ b/lib/libc/locale/lmessages.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2001 Alexey Zelkin + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/lmessages.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include + +#include "ldpart.h" +#include "lmessages.h" + +#define LCMESSAGES_SIZE_FULL (sizeof(struct lc_messages_T) / sizeof(char *)) +#define LCMESSAGES_SIZE_MIN \ + (offsetof(struct lc_messages_T, yesstr) / sizeof(char *)) + +struct xlocale_messages { + struct xlocale_component header; + char *buffer; + struct lc_messages_T locale; +}; + +struct xlocale_messages __xlocale_global_messages; + +static char empty[] = ""; + +static const struct lc_messages_T _C_messages_locale = { + "^[yY]" , /* yesexpr */ + "^[nN]" , /* noexpr */ + "yes" , /* yesstr */ + "no" /* nostr */ +}; + +static void destruct_messages(void *v) +{ + struct xlocale_messages *l = v; + if (l->buffer) + free(l->buffer); + free(l); +} + +static int +messages_load_locale(struct xlocale_messages *loc, int *using_locale, const char *name) +{ + int ret; + struct lc_messages_T *l = &loc->locale; + + ret = __part_load_locale(name, using_locale, + &loc->buffer, "LC_MESSAGES", + LCMESSAGES_SIZE_FULL, LCMESSAGES_SIZE_MIN, + (const char **)l); + if (ret == _LDP_LOADED) { + if (l->yesstr == NULL) + l->yesstr = empty; + if (l->nostr == NULL) + l->nostr = empty; + } + return (ret); +} +int +__messages_load_locale(const char *name) +{ + return messages_load_locale(&__xlocale_global_messages, + &__xlocale_global_locale.using_messages_locale, name); +} +void * +__messages_load(const char *name, locale_t l) +{ + struct xlocale_messages *new = calloc(sizeof(struct xlocale_messages), 1); + new->header.header.destructor = destruct_messages; + if (messages_load_locale(new, &l->using_messages_locale, name) == _LDP_ERROR) { + xlocale_release(new); + return NULL; + } + return new; +} + +struct lc_messages_T * +__get_current_messages_locale(locale_t loc) +{ + return (loc->using_messages_locale + ? &((struct xlocale_messages *)loc->components[XLC_MESSAGES])->locale + : (struct lc_messages_T *)&_C_messages_locale); +} + +#ifdef LOCALE_DEBUG +void +msgdebug() { +printf( "yesexpr = %s\n" + "noexpr = %s\n" + "yesstr = %s\n" + "nostr = %s\n", + _messages_locale.yesexpr, + _messages_locale.noexpr, + _messages_locale.yesstr, + _messages_locale.nostr +); +} +#endif /* LOCALE_DEBUG */ diff --git a/lib/libkiconv/quirks.h b/lib/libc/locale/lmessages.h similarity index 67% copy from lib/libkiconv/quirks.h copy to lib/libc/locale/lmessages.h index bec16fee3d..2e9f23528b 100644 --- a/lib/libkiconv/quirks.h +++ b/lib/libc/locale/lmessages.h @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2003 Ryuichiro Imura + * Copyright (c) 2000, 2001 Alexey Zelkin * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +28,22 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libkiconv/quirks.h,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $ + * $FreeBSD: head/lib/libc/locale/lmessages.h 227753 2011-11-20 14:45:42Z theraven $ */ -#ifndef _KICONV_QUIRKS_H_ -#define _KICONV_QUIRKS_H_ +#ifndef _LMESSAGES_H_ +#define _LMESSAGES_H_ + +#include "xlocale_private.h" -struct quirk_replace_list { - uint16_t standard_code, vendor_code; +struct lc_messages_T { + const char *yesexpr; + const char *noexpr; + const char *yesstr; + const char *nostr; }; -const char *search_quirk(const char *, const char *, - struct quirk_replace_list **, size_t *); -uint16_t quirk_vendor2unix(uint16_t, - struct quirk_replace_list *, - size_t); -uint16_t quirk_unix2vendor(uint16_t, - struct quirk_replace_list *, - size_t); +struct lc_messages_T *__get_current_messages_locale(locale_t); +int __messages_load_locale(const char *); -#endif /* _KICONV_QUIRKS_H_ */ +#endif /* !_LMESSAGES_H_ */ diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c new file mode 100644 index 0000000000..5a20b947c1 --- /dev/null +++ b/lib/libc/locale/lmonetary.c @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2000, 2001 Alexey Zelkin + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/lmonetary.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include + +#include "ldpart.h" +#include "lmonetary.h" + +extern const char * __fix_locale_grouping_str(const char *); + +#define LCMONETARY_SIZE_FULL (sizeof(struct lc_monetary_T) / sizeof(char *)) +#define LCMONETARY_SIZE_MIN \ + (offsetof(struct lc_monetary_T, int_p_cs_precedes) / \ + sizeof(char *)) + +static char empty[] = ""; +static char numempty[] = { CHAR_MAX, '\0'}; + +static const struct lc_monetary_T _C_monetary_locale = { + empty, /* int_curr_symbol */ + empty, /* currency_symbol */ + empty, /* mon_decimal_point */ + empty, /* mon_thousands_sep */ + numempty, /* mon_grouping */ + empty, /* positive_sign */ + empty, /* negative_sign */ + numempty, /* int_frac_digits */ + numempty, /* frac_digits */ + numempty, /* p_cs_precedes */ + numempty, /* p_sep_by_space */ + numempty, /* n_cs_precedes */ + numempty, /* n_sep_by_space */ + numempty, /* p_sign_posn */ + numempty, /* n_sign_posn */ + numempty, /* int_p_cs_precedes */ + numempty, /* int_n_cs_precedes */ + numempty, /* int_p_sep_by_space */ + numempty, /* int_n_sep_by_space */ + numempty, /* int_p_sign_posn */ + numempty /* int_n_sign_posn */ +}; + +struct xlocale_monetary __xlocale_global_monetary; + +static char +cnv(const char *str) +{ + int i = strtol(str, NULL, 10); + + if (i == -1) + i = CHAR_MAX; + return ((char)i); +} + +static void +destruct_monetary(void *v) +{ + struct xlocale_monetary *l = v; + if (l->buffer) + free(l->buffer); + free(l); +} + +static int +monetary_load_locale_l(struct xlocale_monetary *loc, int *using_locale, + int *changed, const char *name) +{ + int ret; + struct lc_monetary_T *l = &loc->locale; + + ret = __part_load_locale(name, using_locale, + &loc->buffer, "LC_MONETARY", + LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, + (const char **)l); + if (ret != _LDP_ERROR) + *changed = 1; + if (ret == _LDP_LOADED) { + l->mon_grouping = + __fix_locale_grouping_str(l->mon_grouping); + +#define M_ASSIGN_CHAR(NAME) (((char *)l->NAME)[0] = \ + cnv(l->NAME)) + + M_ASSIGN_CHAR(int_frac_digits); + M_ASSIGN_CHAR(frac_digits); + M_ASSIGN_CHAR(p_cs_precedes); + M_ASSIGN_CHAR(p_sep_by_space); + M_ASSIGN_CHAR(n_cs_precedes); + M_ASSIGN_CHAR(n_sep_by_space); + M_ASSIGN_CHAR(p_sign_posn); + M_ASSIGN_CHAR(n_sign_posn); + + /* + * The six additional C99 international monetary formatting + * parameters default to the national parameters when + * reading FreeBSD LC_MONETARY data files. + */ +#define M_ASSIGN_ICHAR(NAME) \ + do { \ + if (l->int_##NAME == NULL) \ + l->int_##NAME = \ + l->NAME; \ + else \ + M_ASSIGN_CHAR(int_##NAME); \ + } while (0) + + M_ASSIGN_ICHAR(p_cs_precedes); + M_ASSIGN_ICHAR(n_cs_precedes); + M_ASSIGN_ICHAR(p_sep_by_space); + M_ASSIGN_ICHAR(n_sep_by_space); + M_ASSIGN_ICHAR(p_sign_posn); + M_ASSIGN_ICHAR(n_sign_posn); + } + return (ret); +} +int +__monetary_load_locale(const char *name) +{ + return monetary_load_locale_l(&__xlocale_global_monetary, + &__xlocale_global_locale.using_monetary_locale, + &__xlocale_global_locale.monetary_locale_changed, name); +} +void* __monetary_load(const char *name, locale_t l) +{ + struct xlocale_monetary *new = calloc(sizeof(struct xlocale_monetary), 1); + new->header.header.destructor = destruct_monetary; + if (monetary_load_locale_l(new, &l->using_monetary_locale, + &l->monetary_locale_changed, name) == _LDP_ERROR) + { + xlocale_release(new); + return NULL; + } + return new; +} + + +struct lc_monetary_T * +__get_current_monetary_locale(locale_t loc) +{ + return (loc->using_monetary_locale + ? &((struct xlocale_monetary*)loc->components[XLC_MONETARY])->locale + : (struct lc_monetary_T *)&_C_monetary_locale); +} + +#ifdef LOCALE_DEBUG +void +monetdebug() { +printf( "int_curr_symbol = %s\n" + "currency_symbol = %s\n" + "mon_decimal_point = %s\n" + "mon_thousands_sep = %s\n" + "mon_grouping = %s\n" + "positive_sign = %s\n" + "negative_sign = %s\n" + "int_frac_digits = %d\n" + "frac_digits = %d\n" + "p_cs_precedes = %d\n" + "p_sep_by_space = %d\n" + "n_cs_precedes = %d\n" + "n_sep_by_space = %d\n" + "p_sign_posn = %d\n" + "n_sign_posn = %d\n", + "int_p_cs_precedes = %d\n" + "int_p_sep_by_space = %d\n" + "int_n_cs_precedes = %d\n" + "int_n_sep_by_space = %d\n" + "int_p_sign_posn = %d\n" + "int_n_sign_posn = %d\n", + _monetary_locale.int_curr_symbol, + _monetary_locale.currency_symbol, + _monetary_locale.mon_decimal_point, + _monetary_locale.mon_thousands_sep, + _monetary_locale.mon_grouping, + _monetary_locale.positive_sign, + _monetary_locale.negative_sign, + _monetary_locale.int_frac_digits[0], + _monetary_locale.frac_digits[0], + _monetary_locale.p_cs_precedes[0], + _monetary_locale.p_sep_by_space[0], + _monetary_locale.n_cs_precedes[0], + _monetary_locale.n_sep_by_space[0], + _monetary_locale.p_sign_posn[0], + _monetary_locale.n_sign_posn[0], + _monetary_locale.int_p_cs_precedes[0], + _monetary_locale.int_p_sep_by_space[0], + _monetary_locale.int_n_cs_precedes[0], + _monetary_locale.int_n_sep_by_space[0], + _monetary_locale.int_p_sign_posn[0], + _monetary_locale.int_n_sign_posn[0] +); +} +#endif /* LOCALE_DEBUG */ diff --git a/lib/libc/citrus/citrus_esdb.h b/lib/libc/locale/lmonetary.h similarity index 50% copy from lib/libc/citrus/citrus_esdb.h copy to lib/libc/locale/lmonetary.h index 117f9c6854..06cd8a407c 100644 --- a/lib/libc/citrus/citrus_esdb.h +++ b/lib/libc/locale/lmonetary.h @@ -1,10 +1,11 @@ -/* $NetBSD: src/lib/libc/citrus/citrus_esdb.h,v 1.1 2003/06/25 09:51:32 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/citrus/citrus_esdb.h,v 1.2 2008/04/10 10:21:01 hasso Exp $ */ - - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2000, 2001 Alexey Zelkin + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,32 +27,44 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/lmonetary.h 227753 2011-11-20 14:45:42Z theraven $ */ -#ifndef _CITRUS_ESDB_H_ -#define _CITRUS_ESDB_H_ +#ifndef _LMONETARY_H_ +#define _LMONETARY_H_ +#include "xlocale_private.h" -struct _citrus_esdb_charset { - _citrus_csid_t ec_csid; - char *ec_csname; +struct lc_monetary_T { + const char *int_curr_symbol; + const char *currency_symbol; + const char *mon_decimal_point; + const char *mon_thousands_sep; + const char *mon_grouping; + const char *positive_sign; + const char *negative_sign; + const char *int_frac_digits; + const char *frac_digits; + const char *p_cs_precedes; + const char *p_sep_by_space; + const char *n_cs_precedes; + const char *n_sep_by_space; + const char *p_sign_posn; + const char *n_sign_posn; + const char *int_p_cs_precedes; + const char *int_n_cs_precedes; + const char *int_p_sep_by_space; + const char *int_n_sep_by_space; + const char *int_p_sign_posn; + const char *int_n_sign_posn; }; - -struct _citrus_esdb { - char *db_encname; - void *db_variable; - size_t db_len_variable; - int db_num_charsets; - struct _citrus_esdb_charset *db_charsets; - int db_use_invalid; - _citrus_wc_t db_invalid; +struct xlocale_monetary { + struct xlocale_component header; + char *buffer; + struct lc_monetary_T locale; }; -__BEGIN_DECLS -const char *_citrus_esdb_alias(const char *, char *, size_t); -int _citrus_esdb_open(struct _citrus_esdb *, const char *); -void _citrus_esdb_close(struct _citrus_esdb *); -void _citrus_esdb_free_list(char **, size_t); -int _citrus_esdb_get_list(char ***, size_t *); -__END_DECLS +struct lc_monetary_T *__get_current_monetary_locale(locale_t loc); +int __monetary_load_locale(const char *); -#endif +#endif /* !_LMONETARY_H_ */ diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c new file mode 100644 index 0000000000..58a577bd47 --- /dev/null +++ b/lib/libc/locale/lnumeric.c @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2000, 2001 Alexey Zelkin + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/lnumeric.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include + +#include "ldpart.h" +#include "lnumeric.h" + +extern const char *__fix_locale_grouping_str(const char *); + +#define LCNUMERIC_SIZE (sizeof(struct lc_numeric_T) / sizeof(char *)) + +static char numempty[] = { CHAR_MAX, '\0' }; + +static const struct lc_numeric_T _C_numeric_locale = { + ".", /* decimal_point */ + "", /* thousands_sep */ + numempty /* grouping */ +}; + +static void +destruct_numeric(void *v) +{ + struct xlocale_numeric *l = v; + if (l->buffer) + free(l->buffer); + free(l); +} + +struct xlocale_numeric __xlocale_global_numeric; + +static int +numeric_load_locale(struct xlocale_numeric *loc, int *using_locale, int *changed, + const char *name) +{ + int ret; + struct lc_numeric_T *l = &loc->locale; + + ret = __part_load_locale(name, using_locale, + &loc->buffer, "LC_NUMERIC", + LCNUMERIC_SIZE, LCNUMERIC_SIZE, + (const char**)l); + if (ret != _LDP_ERROR) + *changed= 1; + if (ret == _LDP_LOADED) { + /* Can't be empty according to C99 */ + if (*l->decimal_point == '\0') + l->decimal_point = + _C_numeric_locale.decimal_point; + l->grouping = + __fix_locale_grouping_str(l->grouping); + } + return (ret); +} + +int +__numeric_load_locale(const char *name) +{ + return numeric_load_locale(&__xlocale_global_numeric, + &__xlocale_global_locale.using_numeric_locale, + &__xlocale_global_locale.numeric_locale_changed, name); +} +void * +__numeric_load(const char *name, locale_t l) +{ + struct xlocale_numeric *new = calloc(sizeof(struct xlocale_numeric), 1); + new->header.header.destructor = destruct_numeric; + if (numeric_load_locale(new, &l->using_numeric_locale, + &l->numeric_locale_changed, name) == _LDP_ERROR) + { + xlocale_release(new); + return NULL; + } + return new; +} + +struct lc_numeric_T * +__get_current_numeric_locale(locale_t loc) +{ + return (loc->using_numeric_locale + ? &((struct xlocale_numeric *)loc->components[XLC_NUMERIC])->locale + : (struct lc_numeric_T *)&_C_numeric_locale); +} + +#ifdef LOCALE_DEBUG +void +numericdebug(void) { +printf( "decimal_point = %s\n" + "thousands_sep = %s\n" + "grouping = %s\n", + _numeric_locale.decimal_point, + _numeric_locale.thousands_sep, + _numeric_locale.grouping +); +} +#endif /* LOCALE_DEBUG */ diff --git a/lib/libc/string/wmemcmp.c b/lib/libc/locale/lnumeric.h similarity index 64% copy from lib/libc/string/wmemcmp.c copy to lib/libc/locale/lnumeric.h index 788425cf90..9f5bc34737 100644 --- a/lib/libc/string/wmemcmp.c +++ b/lib/libc/locale/lnumeric.h @@ -1,7 +1,12 @@ /*- - * Copyright (c)1999 Citrus Project, + * Copyright (c) 2000, 2001 Alexey Zelkin * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,26 +28,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemcmp.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemcmp.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemcmp.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/locale/lnumeric.h 227753 2011-11-20 14:45:42Z theraven $ */ -#include +#ifndef _LNUMERIC_H_ +#define _LNUMERIC_H_ +#include "xlocale_private.h" + +struct lc_numeric_T { + const char *decimal_point; + const char *thousands_sep; + const char *grouping; +}; +struct xlocale_numeric { + struct xlocale_component header; + char *buffer; + struct lc_numeric_T locale; +}; -int -wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) -{ - size_t i; +struct lc_numeric_T *__get_current_numeric_locale(locale_t loc); +int __numeric_load_locale(const char *); - for (i = 0; i < n; i++) { - if (*s1 != *s2) { - /* wchar might be unsigned */ - return (*s1 > *s2 ? 1 : -1); - } - s1++; - s2++; - } - return (0); -} +#endif /* !_LNUMERIC_H_ */ diff --git a/lib/libc/locale/localeconv.3 b/lib/libc/locale/localeconv.3 new file mode 100644 index 0000000000..8153a91443 --- /dev/null +++ b/lib/libc/locale/localeconv.3 @@ -0,0 +1,237 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley at BSDI. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" From @(#)setlocale.3 8.1 (Berkeley) 6/9/93 +.\" From FreeBSD: src/lib/libc/locale/setlocale.3,v 1.28 2003/11/15 02:26:04 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/localeconv.3 228199 2011-12-02 11:55:09Z obrien $ +.\" +.Dd November 21, 2003 +.Dt LOCALECONV 3 +.Os +.Sh NAME +.Nm localeconv +.Nd natural language formatting for C +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In locale.h +.Ft struct lconv * +.Fn localeconv "void" +.In xlocale.h +.Ft struct lconv * +.Fn localeconv_l "locale_t locale" +.Sh DESCRIPTION +The +.Fn localeconv +function returns a pointer to a structure +which provides parameters for formatting numbers, +especially currency values: +.Bd -literal -offset indent +struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + char int_p_cs_precedes; + char int_n_cs_precedes; + char int_p_sep_by_space; + char int_n_sep_by_space; + char int_p_sign_posn; + char int_n_sign_posn; +}; +.Ed +.Pp +The individual fields have the following meanings: +.Bl -tag -width mon_decimal_point +.It Va decimal_point +The decimal point character, except for currency values, +cannot be an empty string. +.It Va thousands_sep +The separator between groups of digits +before the decimal point, except for currency values. +.It Va grouping +The sizes of the groups of digits, except for currency values. +This is a pointer to a vector of integers, each of size +.Vt char , +representing group size from low order digit groups +to high order (right to left). +The list may be terminated with 0 or +.Dv CHAR_MAX . +If the list is terminated with 0, +the last group size before the 0 is repeated to account for all the digits. +If the list is terminated with +.Dv CHAR_MAX , +no more grouping is performed. +.It Va int_curr_symbol +The standardized international currency symbol. +.It Va currency_symbol +The local currency symbol. +.It Va mon_decimal_point +The decimal point character for currency values. +.It Va mon_thousands_sep +The separator for digit groups in currency values. +.It Va mon_grouping +Like +.Va grouping +but for currency values. +.It Va positive_sign +The character used to denote nonnegative currency values, +usually the empty string. +.It Va negative_sign +The character used to denote negative currency values, +usually a minus sign. +.It Va int_frac_digits +The number of digits after the decimal point +in an international-style currency value. +.It Va frac_digits +The number of digits after the decimal point +in the local style for currency values. +.It Va p_cs_precedes +1 if the currency symbol precedes the currency value +for nonnegative values, 0 if it follows. +.It Va p_sep_by_space +1 if a space is inserted between the currency symbol +and the currency value for nonnegative values, 0 otherwise. +.It Va n_cs_precedes +Like +.Va p_cs_precedes +but for negative values. +.It Va n_sep_by_space +Like +.Va p_sep_by_space +but for negative values. +.It Va p_sign_posn +The location of the +.Va positive_sign +with respect to a nonnegative quantity and the +.Va currency_symbol , +coded as follows: +.Pp +.Bl -tag -width 3n -compact +.It Li 0 +Parentheses around the entire string. +.It Li 1 +Before the string. +.It Li 2 +After the string. +.It Li 3 +Just before +.Va currency_symbol . +.It Li 4 +Just after +.Va currency_symbol . +.El +.It Va n_sign_posn +Like +.Va p_sign_posn +but for negative currency values. +.It Va int_p_cs_precedes +Same as +.Va p_cs_precedes , +but for internationally formatted monetary quantities. +.It Va int_n_cs_precedes +Same as +.Va n_cs_precedes , +but for internationally formatted monetary quantities. +.It Va int_p_sep_by_space +Same as +.Va p_sep_by_space , +but for internationally formatted monetary quantities. +.It Va int_n_sep_by_space +Same as +.Va n_sep_by_space , +but for internationally formatted monetary quantities. +.It Va int_p_sign_posn +Same as +.Va p_sign_posn , +but for internationally formatted monetary quantities. +.It Va int_n_sign_posn +Same as +.Va n_sign_posn , +but for internationally formatted monetary quantities. +.El +.Pp +Unless mentioned above, +an empty string as a value for a field +indicates a zero length result or +a value that is not in the current locale. +A +.Dv CHAR_MAX +result similarly denotes an unavailable value. +.Pp +The +.Fn localeconv_l +function takes an explicit locale parameter. For more information, see +.Xr xlocale 3 . +.Sh RETURN VALUES +The +.Fn localeconv +function returns a pointer to a static object +which may be altered by later calls to +.Xr setlocale 3 +or +.Fn localeconv . +The return value for +.Fn localeconv_l +is stored with the locale. +It will remain valid until a subsequent call to +.Xr freelocale 3 . +If a thread-local locale is in effect then the return value from +.Fn localeconv +will remain valid until the locale is destroyed. +.Sh ERRORS +No errors are defined. +.Sh SEE ALSO +.Xr setlocale 3 , +.Xr strfmon 3 +.Sh STANDARDS +The +.Fn localeconv +function conforms to +.St -isoC-99 . +.Sh HISTORY +The +.Fn localeconv +function first appeared in +.Bx 4.4 . diff --git a/lib/libc/locale/localeconv.c b/lib/libc/locale/localeconv.c index ebbf0930f3..4d4978269d 100644 --- a/lib/libc/locale/localeconv.c +++ b/lib/libc/locale/localeconv.c @@ -1,81 +1,115 @@ -/* $NetBSD: src/lib/libc/locale/localeconv.c,v 1.12 2004/01/02 21:53:49 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/localeconv.c,v 1.4 2007/09/20 07:40:51 hasso Exp $ */ - /* - * Written by J.T. Conklin . - * Public domain. + * Copyright (c) 2001 Alexey Zelkin + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)localeconv.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/localeconv.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include + #include +#include "lmonetary.h" +#include "lnumeric.h" + /* * The localeconv() function constructs a struct lconv from the current * monetary and numeric locales. * * Because localeconv() may be called many times (especially by library - * routines like printf() & strtod()), the appropriate members of the + * routines like printf() & strtod()), the approprate members of the * lconv structure are computed only when the monetary or numeric * locale has been changed. */ -int __mlocale_changed = 1; -int __nlocale_changed = 1; /* * Return the current locale conversion. */ struct lconv * -localeconv(void) +localeconv_l(locale_t loc) { - static struct lconv ret; + FIX_LOCALE(loc); + struct lconv *ret = &loc->lconv; - if (__mlocale_changed) { - /* LC_MONETARY */ - ret.int_curr_symbol = - (char *)_CurrentMonetaryLocale->int_curr_symbol; - ret.currency_symbol = - (char *)_CurrentMonetaryLocale->currency_symbol; - ret.mon_decimal_point = - (char *)_CurrentMonetaryLocale->mon_decimal_point; - ret.mon_thousands_sep = - (char *)_CurrentMonetaryLocale->mon_thousands_sep; - ret.mon_grouping = - (char *)_CurrentMonetaryLocale->mon_grouping; - ret.positive_sign = - (char *)_CurrentMonetaryLocale->positive_sign; - ret.negative_sign = - (char *)_CurrentMonetaryLocale->negative_sign; - ret.int_frac_digits = _CurrentMonetaryLocale->int_frac_digits; - ret.frac_digits = _CurrentMonetaryLocale->frac_digits; - ret.p_cs_precedes = _CurrentMonetaryLocale->p_cs_precedes; - ret.p_sep_by_space = _CurrentMonetaryLocale->p_sep_by_space; - ret.n_cs_precedes = _CurrentMonetaryLocale->n_cs_precedes; - ret.n_sep_by_space = _CurrentMonetaryLocale->n_sep_by_space; - ret.p_sign_posn = _CurrentMonetaryLocale->p_sign_posn; - ret.n_sign_posn = _CurrentMonetaryLocale->n_sign_posn; - ret.int_p_cs_precedes = - _CurrentMonetaryLocale->int_p_cs_precedes; - ret.int_n_cs_precedes = - _CurrentMonetaryLocale->int_n_cs_precedes; - ret.int_p_sep_by_space = - _CurrentMonetaryLocale->int_p_sep_by_space; - ret.int_n_sep_by_space = - _CurrentMonetaryLocale->int_n_sep_by_space; - ret.int_p_sign_posn = _CurrentMonetaryLocale->int_p_sign_posn; - ret.int_n_sign_posn = _CurrentMonetaryLocale->int_n_sign_posn; - __mlocale_changed = 0; - } + if (loc->monetary_locale_changed) { + /* LC_MONETARY part */ + struct lc_monetary_T * mptr; - if (__nlocale_changed) { - /* LC_NUMERIC */ - ret.decimal_point = - (char *)_CurrentNumericLocale->decimal_point; - ret.thousands_sep = - (char *)_CurrentNumericLocale->thousands_sep; - ret.grouping = - (char *)_CurrentNumericLocale->grouping; - __nlocale_changed = 0; - } +#define M_ASSIGN_STR(NAME) (ret->NAME = (char*)mptr->NAME) +#define M_ASSIGN_CHAR(NAME) (ret->NAME = mptr->NAME[0]) - return(&ret); + mptr = __get_current_monetary_locale(loc); + M_ASSIGN_STR(int_curr_symbol); + M_ASSIGN_STR(currency_symbol); + M_ASSIGN_STR(mon_decimal_point); + M_ASSIGN_STR(mon_thousands_sep); + M_ASSIGN_STR(mon_grouping); + M_ASSIGN_STR(positive_sign); + M_ASSIGN_STR(negative_sign); + M_ASSIGN_CHAR(int_frac_digits); + M_ASSIGN_CHAR(frac_digits); + M_ASSIGN_CHAR(p_cs_precedes); + M_ASSIGN_CHAR(p_sep_by_space); + M_ASSIGN_CHAR(n_cs_precedes); + M_ASSIGN_CHAR(n_sep_by_space); + M_ASSIGN_CHAR(p_sign_posn); + M_ASSIGN_CHAR(n_sign_posn); + M_ASSIGN_CHAR(int_p_cs_precedes); + M_ASSIGN_CHAR(int_n_cs_precedes); + M_ASSIGN_CHAR(int_p_sep_by_space); + M_ASSIGN_CHAR(int_n_sep_by_space); + M_ASSIGN_CHAR(int_p_sign_posn); + M_ASSIGN_CHAR(int_n_sign_posn); + loc->monetary_locale_changed = 0; + } + + if (loc->numeric_locale_changed) { + /* LC_NUMERIC part */ + struct lc_numeric_T * nptr; + +#define N_ASSIGN_STR(NAME) (ret->NAME = (char*)nptr->NAME) + + nptr = __get_current_numeric_locale(loc); + N_ASSIGN_STR(decimal_point); + N_ASSIGN_STR(thousands_sep); + N_ASSIGN_STR(grouping); + loc->numeric_locale_changed = 0; + } + + return ret; +} +struct lconv * +localeconv(void) +{ + return localeconv_l(__get_locale()); } diff --git a/lib/libc/locale/mblen.3 b/lib/libc/locale/mblen.3 index a7da329339..b854f23b27 100644 --- a/lib/libc/locale/mblen.3 +++ b/lib/libc/locale/mblen.3 @@ -1,8 +1,9 @@ -.\" $NetBSD: src/lib/libc/locale/mblen.3,v 1.5 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mblen.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Copyright (c)2002 Citrus Project, -.\" All rights reserved. +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -12,11 +13,14 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,157 +29,78 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" From @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" From FreeBSD: src/lib/libc/locale/multibyte.3,v 1.22 2003/11/08 03:23:11 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/mblen.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 11, 2004 .Dt MBLEN 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm mblen -.Nd get number of bytes in a multibyte character -.\" ---------------------------------------------------------------------- +.Nd get number of bytes in a character .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In stdlib.h .Ft int -.Fn mblen "const char *s" "size_t n" -.\" ---------------------------------------------------------------------- +.Fn mblen "const char *mbchar" "size_t nbytes" .Sh DESCRIPTION The .Fn mblen -function usually determines the number of bytes in -a multibyte character pointed to by -.Fa s -and returns it. -This function shall only examine max n bytes of the array beginning from -.Fa s . +function computes the length in bytes +of a multibyte character +.Fa mbchar +according to the current conversion state. +Up to +.Fa nbytes +bytes are examined. .Pp -In state-dependent encodings, -.Fa s -may point the special sequence bytes to change the shift-state. -Although such sequence bytes corresponds to no individual -wide-character code, +A call with a null +.Fa mbchar +pointer returns nonzero if the current locale requires shift states, +zero otherwise; +if shift states are required, the shift state is reset to the initial state. +.Sh RETURN VALUES +If +.Fa mbchar +is +.Dv NULL , the .Fn mblen -changes the own state by them and treats them -as if they are a part of the subsequent multibyte character. -.Pp -Unlike -.Xr mbrlen 3 , -the first -.Fa n -bytes pointed to by -.Fa s -need to form an entire multibyte character. -Otherwise, this function causes an error. -.Pp -.Fn mblen -is equivalent to the following call, except the internal state of the -.Xr mbtowc 3 -function is not affected: -.Bd -literal -offset indent -mbtowc(NULL, s, n); -.Ed -.Pp -Calling any other functions in -.Lb libc -never changes the internal -state of -.Fn mblen , -except for calling -.Xr setlocale 3 -with the -.Dv LC_CTYPE -category changed to that of the current locale. -Such -.Xr setlocale 3 -calls cause the internal state of this function to be indeterminate. -.Pp -The behaviour of -.Fn mblen -is affected by the -.Dv LC_CTYPE -category of the current locale. +function returns nonzero if shift states are supported, +zero otherwise. .Pp -These are the special cases: -.Bl -tag -width 0123456789 -.It "s == NULL" +Otherwise, if +.Fa mbchar +is not a null pointer, .Fn mblen -initializes its own internal state to an initial state, and -determines whether the current encoding is state-dependent. -This function returns 0 if the encoding is state-independent, -otherwise non-zero. -.It "n == 0" +either returns 0 if +.Fa mbchar +represents the null wide character, or returns +the number of bytes processed in +.Fa mbchar , +or returns \-1 if no multibyte character +could be recognized or converted. In this case, -the first -.Fa n -bytes of the array pointed to by -.Fa s -never form a complete character. -Thus, -.Fn mblen -always fails. -.El -.\" ---------------------------------------------------------------------- -.Sh RETURN VALUES -Normally, -.Fn mblen -returns: -.Bl -tag -width 0123456789 -.It "0" -.Fa s -points to a null byte -.Pq Sq \e0 . -.It "positive" -The value returned is -a number of bytes for the valid multibyte character pointed to by -.Fa s . -There are no cases that this value is greater than -.Fa n -or the value of the -.Dv MB_CUR_MAX -macro. -.It "-1" -.Fa s -points to an invalid or incomplete multibyte character. -The -.Fn mblen -also sets -.Va errno -to indicate the error. -.El -.Pp -When -.Fa s -is equal to -.Dv NULL , -the -.Fn mblen -returns: -.Bl -tag -width 0123456789 -.It "0" -The current encoding is state-independent. -.It "non-zero" -The current encoding is state-dependent. -.El -.\" ---------------------------------------------------------------------- +.Fn mblen Ns 's +internal conversion state is undefined. .Sh ERRORS +The .Fn mblen -may cause an error in the following case: +function will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa s -points to an invalid or incomplete multibyte character. +An invalid multibyte sequence was detected. +.It Bq Er EINVAL +The internal conversion state is not valid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO .Xr mbrlen 3 , .Xr mbtowc 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 .Sh STANDARDS The .Fn mblen function conforms to -.St -ansiC . +.St -isoC-99 . diff --git a/lib/libc/string/wcsdup.c b/lib/libc/locale/mblen.c similarity index 63% copy from lib/libc/string/wcsdup.c copy to lib/libc/locale/mblen.c index a8fb551307..9cdeb7d882 100644 --- a/lib/libc/string/wcsdup.c +++ b/lib/libc/locale/mblen.c @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2005 Tim J. Robbins. + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,20 +28,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsdup.c,v 1.1 2005/08/13 05:54:33 tjr Exp $ + * $FreeBSD: head/lib/libc/locale/mblen.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include +#include "mblocal.h" -wchar_t * -wcsdup(const wchar_t *s) +int +mblen_l(const char *s, size_t n, locale_t locale) { - wchar_t *copy; - size_t len; + static const mbstate_t initial; + size_t rval; + FIX_LOCALE(locale); - len = wcslen(s) + 1; - if ((copy = malloc(len * sizeof(wchar_t))) == NULL) - return (NULL); - return (wmemcpy(copy, s, len)); + if (s == NULL) { + /* No support for state dependent encodings. */ + locale->mblen = initial; + return (0); + } + rval = XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n, &locale->mblen); + if (rval == (size_t)-1 || rval == (size_t)-2) + return (-1); + return ((int)rval); +} + +int +mblen(const char *s, size_t n) +{ + return mblen_l(s, n, __get_locale()); } diff --git a/lib/libc/locale/mblocal.h b/lib/libc/locale/mblocal.h new file mode 100644 index 0000000000..f3512cbc5c --- /dev/null +++ b/lib/libc/locale/mblocal.h @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mblocal.h 227753 2011-11-20 14:45:42Z theraven $ + */ + +#ifndef _MBLOCAL_H_ +#define _MBLOCAL_H_ + +#include +#include "xlocale_private.h" + + +/* + * Conversion function pointers for current encoding. + */ +struct xlocale_ctype { + struct xlocale_component header; + _RuneLocale *runes; + size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); + int (*__mbsinit)(const mbstate_t *); + size_t (*__mbsnrtowcs)(wchar_t * __restrict, const char ** __restrict, + size_t, size_t, mbstate_t * __restrict); + size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict); + size_t (*__wcsnrtombs)(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict); + int __mb_cur_max; + int __mb_sb_limit; +}; +#define XLOCALE_CTYPE(x) ((struct xlocale_ctype*)(x)->components[XLC_CTYPE]) +extern struct xlocale_ctype __xlocale_global_ctype; + +/* + * Rune initialization function prototypes. + */ +int _none_init(struct xlocale_ctype *, _RuneLocale *); +int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); +int _EUC_init(struct xlocale_ctype *, _RuneLocale *); +int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); +int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); +int _GBK_init(struct xlocale_ctype *, _RuneLocale *); +int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); +int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); + +extern size_t __mbsnrtowcs_std(wchar_t * __restrict, const char ** __restrict, + size_t, size_t, mbstate_t * __restrict); +extern size_t __wcsnrtombs_std(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict); + +#endif /* _MBLOCAL_H_ */ diff --git a/lib/libc/locale/mbrlen.3 b/lib/libc/locale/mbrlen.3 index d988ea0db4..a93a6d8579 100644 --- a/lib/libc/locale/mbrlen.3 +++ b/lib/libc/locale/mbrlen.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/mbrlen.3,v 1.6 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbrlen.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,183 +22,124 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" $FreeBSD: head/lib/libc/locale/mbrlen.3 131360 2004-06-30 19:32:41Z ru $ +.\" +.Dd April 7, 2004 .Dt MBRLEN 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm mbrlen -.Nd get number of bytes in a multibyte character (restartable) -.\" ---------------------------------------------------------------------- +.Nd "get number of bytes in a character (restartable)" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wchar.h -.Ft int +.Ft size_t .Fn mbrlen "const char * restrict s" "size_t n" "mbstate_t * restrict ps" -.\" ---------------------------------------------------------------------- .Sh DESCRIPTION The .Fn mbrlen -function usually determines the number of bytes in -a multibyte character pointed to by +function inspects at most +.Fa n +bytes pointed to by .Fa s -and returns it. -This function shall only examine max n bytes of the array beginning from -.Fa s . -.Pp -.Fn mbrlen -is equivalent to the following call (except -.Fa ps -is evaluated only once): -.Bd -literal -offset indent -mbrtowc(NULL, s, n, (ps != NULL) ? ps : &internal); -.Ed +to determine the number of bytes needed to complete the next +multibyte character. .Pp -Here, -.Fa internal -is an internal state object. -.Pp -In state-dependent encodings, -.Fa s -may point to the special sequence bytes to change the shift-state. -Although such sequence bytes corresponds to no individual -wide-character code, these affect the conversion state object pointed -to by +The +.Vt mbstate_t +argument, .Fa ps , -and the +is used to keep track of the shift state. +If it is +.Dv NULL , .Fn mbrlen -treats the special sequence bytes -as if these are a part of the subsequent multibyte character. +uses an internal, static +.Vt mbstate_t +object, which is initialized to the initial conversion state +at program startup. .Pp -Unlike -.Xr mblen 3 , -.Fn mbrlen -may accept the byte sequence when it is not a complete character -but possibly contains part of a valid character. -In this case, this function will accept all such bytes -and save them into the conversion state object pointed to by -.Fa ps . -They will be used on subsequent calls of this function to restart -the conversion suspended. +It is equivalent to: .Pp -The behaviour of -.Fn mbrlen -is affected by the -.Dv LC_CTYPE -category of the current locale. +.Dl "mbrtowc(NULL, s, n, ps);" .Pp -These are the special cases: -.Bl -tag -width 0123456789 -.It "s == NULL" -.Fn mbrlen -sets the conversion state object pointed to by +Except that when .Fa ps -to an initial state and always returns 0. -Unlike -.Xr mblen 3 , -the value returned does not indicate whether the current encoding of -the locale is state-dependent. -.Pp -In this case, -.Fn mbrlen -ignores -.Fa n . -.It "n == 0" -In this case, -the first -.Fa n -bytes of the array pointed to by -.Fa s -never form a complete character. -Thus, -.Fn mbrlen -always returns (size_t)-2. -.It "ps == NULL" +is a +.Dv NULL +pointer, .Fn mbrlen -uses its own internal state object to keep the conversion state, -instead of -.Fa ps -mentioned in this manual page. -.Pp -Calling any other functions in -.Lb libc -never changes the internal -state of -.Fn mbrlen , -except for calling -.Xr setlocale 3 -with a changing -.Dv LC_CTYPE -category of the current locale. -Such -.Xr setlocale 3 -calls cause the internal state of this function to be indeterminate. -This internal state is initialized at startup time of the program. -.El -.\" ---------------------------------------------------------------------- +uses its own static, internal +.Vt mbstate_t +object to keep track of the shift state. .Sh RETURN VALUES The .Fn mbrlen -returns: -.Bl -tag -width 0123456789 -.It "0" -.Fa s -points to a null byte -.Pq Sq \e0 . -.It "positive" -The value returned is -a number of bytes for the valid multibyte character pointed to by -.Fa s . -There are no cases that this value is greater than +functions returns: +.Bl -tag -width indent +.It 0 +The next .Fa n -or the value of the -.Dv MB_CUR_MAX -macro. -.It "(size_t)-2" -.Fa s -points to the byte sequence which possibly contains part of a valid -multibyte character, but which is incomplete. -When +or fewer bytes +represent the null wide character +.Pq Li "L'\e0'" . +.It >0 +The next .Fa n -is at least -.Dv MB_CUR_MAX , -this case can only occur if the array pointed to by -.Fa s -contains a redundant shift sequence. -.It "(size_t)-1" -.Fa s -points to an illegal byte sequence which does not form a valid multibyte -character. -In this case, -.Fn mbrtowc -sets -.Va errno -to indicate the error. +or fewer bytes +represent a valid character, +.Fn mbrlen +returns the number of bytes used to complete the multibyte character. +.It Po Vt size_t Pc Ns \-2 +The next +.Fa n +contribute to, but do not complete, a valid multibyte character sequence, +and all +.Fa n +bytes have been processed. +.It Po Vt size_t Pc Ns \-1 +An encoding error has occurred. +The next +.Fa n +or fewer bytes do not contribute to a valid multibyte character. .El -.\" ---------------------------------------------------------------------- +.Sh EXAMPLES +A function that calculates the number of characters in a multibyte +character string: +.Bd -literal -offset indent +size_t +nchars(const char *s) +{ + size_t charlen, chars; + mbstate_t mbs; + + chars = 0; + memset(&mbs, 0, sizeof(mbs)); + while ((charlen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0 && + charlen != (size_t)-1 && charlen != (size_t)-2) { + s += charlen; + chars++; + } + + return (chars); +} +.Ed .Sh ERRORS +The .Fn mbrlen -may cause an error in the following case: +function will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa s -points to an invalid multibyte character. +An invalid multibyte sequence was detected. .It Bq Er EINVAL -.Fa ps -points to an invalid or uninitialized mbstate_t object. +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO .Xr mblen 3 , .Xr mbrtowc 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 .Sh STANDARDS The .Fn mbrlen function conforms to -.St -isoC-amd1 . -The restrict qualifier is added at .St -isoC-99 . diff --git a/lib/libc/string/wcsspn.c b/lib/libc/locale/mbrlen.c similarity index 67% copy from lib/libc/string/wcsspn.c copy to lib/libc/locale/mbrlen.c index e6f8bbb0dc..504c765b82 100644 --- a/lib/libc/string/wcsspn.c +++ b/lib/libc/locale/mbrlen.c @@ -1,7 +1,12 @@ /*- - * Copyright (c)1999 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,34 +28,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcsspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcsspn.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsspn.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/locale/mbrlen.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include +#include "mblocal.h" size_t -wcsspn(const wchar_t *s, const wchar_t *set) +mbrlen_l(const char * __restrict s, size_t n, mbstate_t * __restrict ps, locale_t locale) { - const wchar_t *p; - const wchar_t *q; - - p = s; - while (*p) { - q = set; - while (*q) { - if (*p == *q) - break; - q++; - } - if (!*q) - goto done; - p++; - } + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrlen; + return (XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n, ps)); +} -done: - return (p - s); +size_t +mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps) +{ + return mbrlen_l(s, n, ps, __get_locale()); } diff --git a/lib/libc/locale/mbrtoc16.c b/lib/libc/locale/mbrtoc16.c new file mode 100644 index 0000000000..ad77243290 --- /dev/null +++ b/lib/libc/locale/mbrtoc16.c @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbrtoc16.c 250883 2013-05-21 19:59:37Z ed $ + */ + + +#include +#include "xlocale_private.h" + +typedef struct { + char16_t trail_surrogate; + mbstate_t c32_mbstate; +} _Char16State; + +size_t +mbrtoc16_l(char16_t * __restrict pc16, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) +{ + _Char16State *cs; + char32_t c32; + ssize_t len; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtoc16; + cs = (_Char16State *)ps; + + /* + * Call straight into mbrtoc32_l() if we don't need to return a + * character value. According to the spec, if s is a null + * pointer, the value of parameter pc16 is also ignored. + */ + if (pc16 == NULL || s == NULL) { + cs->trail_surrogate = 0; + return (mbrtoc32_l(NULL, s, n, &cs->c32_mbstate, locale)); + } + + /* Return the trail surrogate from the previous invocation. */ + if (cs->trail_surrogate >= 0xdc00 && cs->trail_surrogate <= 0xdfff) { + *pc16 = cs->trail_surrogate; + cs->trail_surrogate = 0; + return ((size_t)-3); + } + + len = mbrtoc32_l(&c32, s, n, &cs->c32_mbstate, locale); + if (len >= 0) { + if (c32 < 0x10000) { + /* Fits in one UTF-16 character. */ + *pc16 = c32; + } else { + /* Split up in a surrogate pair. */ + c32 -= 0x10000; + *pc16 = 0xd800 | (c32 >> 10); + cs->trail_surrogate = 0xdc00 | (c32 & 0x3ff); + } + } + return (len); +} + +size_t +mbrtoc16(char16_t * __restrict pc16, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + + return (mbrtoc16_l(pc16, s, n, ps, __get_locale())); +} diff --git a/lib/libc/locale/mbrtoc16_iconv.c b/lib/libc/locale/mbrtoc16_iconv.c new file mode 100644 index 0000000000..faba9f6ef6 --- /dev/null +++ b/lib/libc/locale/mbrtoc16_iconv.c @@ -0,0 +1,8 @@ +/* $FreeBSD: head/lib/libc/locale/mbrtoc16_iconv.c 251314 2013-06-03 17:17:56Z ed $ */ +#define charXX_t char16_t +#define mbrtocXX mbrtoc16 +#define mbrtocXX_l mbrtoc16_l +#define DSTBUF_LEN 2 +#define UTF_XX_INTERNAL "UTF-16-INTERNAL" + +#include "mbrtocXX_iconv.h" diff --git a/lib/libc/string/wcscspn.c b/lib/libc/locale/mbrtoc32.c similarity index 68% copy from lib/libc/string/wcscspn.c copy to lib/libc/locale/mbrtoc32.c index 4fbc29b69b..f29013910f 100644 --- a/lib/libc/string/wcscspn.c +++ b/lib/libc/locale/mbrtoc32.c @@ -1,5 +1,5 @@ /*- - * Copyright (c)1999 Citrus Project, + * Copyright (c) 2013 Ed Schouten * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,32 +23,31 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcscspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcscspn.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcscspn.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcscspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/locale/mbrtoc32.c 250883 2013-05-21 19:59:37Z ed $ */ + +#include #include +#include "xlocale_private.h" size_t -wcscspn(const wchar_t *s, const wchar_t *set) +mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) { - const wchar_t *p; - const wchar_t *q; - p = s; - while (*p) { - q = set; - while (*q) { - if (*p == *q) - goto done; - q++; - } - p++; - } + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtoc32; + + /* Assume wchar_t uses UTF-32. */ + return (mbrtowc_l(pc32, s, n, ps, locale)); +} + +size_t +mbrtoc32(char32_t * __restrict pc32, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ -done: - return (p - s); + return (mbrtoc32_l(pc32, s, n, ps, __get_locale())); } diff --git a/lib/libc/locale/mbrtoc32_iconv.c b/lib/libc/locale/mbrtoc32_iconv.c new file mode 100644 index 0000000000..1ed59882d3 --- /dev/null +++ b/lib/libc/locale/mbrtoc32_iconv.c @@ -0,0 +1,8 @@ +/* $FreeBSD: head/lib/libc/locale/mbrtoc32_iconv.c 251314 2013-06-03 17:17:56Z ed $ */ +#define charXX_t char32_t +#define mbrtocXX mbrtoc32 +#define mbrtocXX_l mbrtoc32_l +#define DSTBUF_LEN 1 +#define UTF_XX_INTERNAL "UTF-32-INTERNAL" + +#include "mbrtocXX_iconv.h" diff --git a/lib/libc/locale/mbrtocXX_iconv.h b/lib/libc/locale/mbrtocXX_iconv.h new file mode 100644 index 0000000000..42161579a3 --- /dev/null +++ b/lib/libc/locale/mbrtocXX_iconv.h @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbrtocXX_iconv.h 252547 2013-07-03 07:03:19Z peter $ + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "../citrus/citrus_hash.h" +#include "../citrus/citrus_module.h" +#include "../citrus/citrus_iconv.h" +#include "xlocale_private.h" + +typedef struct { + bool initialized; + struct _citrus_iconv iconv; + char srcbuf[MB_LEN_MAX]; + size_t srcbuf_len; + union { + charXX_t widechar[DSTBUF_LEN]; + char bytes[sizeof(charXX_t) * DSTBUF_LEN]; + } dstbuf; + size_t dstbuf_len; +} _ConversionState; +_Static_assert(sizeof(_ConversionState) <= sizeof(mbstate_t), + "Size of _ConversionState must not exceed mbstate_t's size."); + +size_t +mbrtocXX_l(charXX_t * __restrict pc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) +{ + _ConversionState *cs; + struct _citrus_iconv *handle; + size_t i, retval; + charXX_t retchar; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtocXX; + cs = (_ConversionState *)ps; + handle = &cs->iconv; + + /* Reinitialize mbstate_t. */ + if (s == NULL || !cs->initialized) { + if (_citrus_iconv_open(&handle, + nl_langinfo_l(CODESET, locale), UTF_XX_INTERNAL) != 0) { + cs->initialized = false; + errno = EINVAL; + return (-1); + } + handle->cv_shared->ci_discard_ilseq = true; + handle->cv_shared->ci_hooks = NULL; + cs->srcbuf_len = cs->dstbuf_len = 0; + cs->initialized = true; + if (s == NULL) + return (0); + } + + /* See if we still have characters left from the previous invocation. */ + if (cs->dstbuf_len > 0) { + retval = (size_t)-3; + goto return_char; + } + + /* Fill up the read buffer as far as possible. */ + if (n > sizeof(cs->srcbuf) - cs->srcbuf_len) + n = sizeof(cs->srcbuf) - cs->srcbuf_len; + memcpy(cs->srcbuf + cs->srcbuf_len, s, n); + + /* Convert as few characters to the dst buffer as possible. */ + for (i = 0; ; i++) { + const char *src; + char *dst; + size_t srcleft, dstleft, invlen; + int err; + + src = cs->srcbuf; + srcleft = cs->srcbuf_len + n; + dst = cs->dstbuf.bytes; + dstleft = i * sizeof(charXX_t); + assert(srcleft <= sizeof(cs->srcbuf) && + dstleft <= sizeof(cs->dstbuf.bytes)); + err = _citrus_iconv_convert(handle, &src, &srcleft, + &dst, &dstleft, 0, &invlen); + cs->dstbuf_len = (dst - cs->dstbuf.bytes) / sizeof(charXX_t); + + /* Got new character(s). Return the first. */ + if (cs->dstbuf_len > 0) { + assert(src - cs->srcbuf > cs->srcbuf_len); + retval = src - cs->srcbuf - cs->srcbuf_len; + cs->srcbuf_len = 0; + goto return_char; + } + + /* Increase dst buffer size, to obtain the surrogate pair. */ + if (err == E2BIG) + continue; + + /* Illegal sequence. */ + if (invlen > 0) { + cs->srcbuf_len = 0; + errno = EILSEQ; + return ((size_t)-1); + } + + /* Save unprocessed remainder for the next invocation. */ + memmove(cs->srcbuf, src, srcleft); + cs->srcbuf_len = srcleft; + return ((size_t)-2); + } + +return_char: + retchar = cs->dstbuf.widechar[0]; + memmove(&cs->dstbuf.widechar[0], &cs->dstbuf.widechar[1], + --cs->dstbuf_len * sizeof(charXX_t)); + if (pc != NULL) + *pc = retchar; + if (retchar == 0) + return (0); + return (retval); +} + +size_t +mbrtocXX(charXX_t * __restrict pc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + + return (mbrtocXX_l(pc, s, n, ps, __get_locale())); +} diff --git a/lib/libc/locale/mbrtowc.3 b/lib/libc/locale/mbrtowc.3 index 5b8347ca2a..c997479117 100644 --- a/lib/libc/locale/mbrtowc.3 +++ b/lib/libc/locale/mbrtowc.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/mbrtowc.3,v 1.6 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbrtowc.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,171 +22,158 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2002 +.\" $FreeBSD: head/lib/libc/locale/mbrtowc.3 250883 2013-05-21 19:59:37Z ed $ +.\" +.Dd May 21, 2013 .Dt MBRTOWC 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm mbrtowc -.Nd converts a multibyte character to a wide character (restartable) -.\" ---------------------------------------------------------------------- +.Nm mbrtowc , +.Nm mbrtoc16 , +.Nm mbrtoc32 +.Nd "convert a character to a wide-character code (restartable)" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wchar.h .Ft size_t -.Fn mbrtowc "wchar_t * restrict pwc" "const char * restrict s" "size_t n" \ -"mbstate_t * restrict ps" -.\" ---------------------------------------------------------------------- +.Fo mbrtowc +.Fa "wchar_t * restrict pc" "const char * restrict s" "size_t n" +.Fa "mbstate_t * restrict ps" +.Fc +.In uchar.h +.Ft size_t +.Fo mbrtoc16 +.Fa "char16_t * restrict pc" "const char * restrict s" "size_t n" +.Fa "mbstate_t * restrict ps" +.Fc +.Ft size_t +.Fo mbrtoc32 +.Fa "char32_t * restrict pc" "const char * restrict s" "size_t n" +.Fa "mbstate_t * restrict ps" +.Fc .Sh DESCRIPTION The -.Fn mbrtowc -usually converts the multibyte character pointed to by +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions inspect at most +.Fa n +bytes pointed to by .Fa s -to a wide character, and stores the wide character -to the wchar_t object pointed to by -.Fa pwc -if -.Fa pwc -is non-null and +to determine the number of bytes needed to complete the next multibyte +character. +If a character can be completed, and +.Fa pc +is not +.Dv NULL , +the wide character which is represented by .Fa s -points to a valid character. -The conversion happens in accordance with, and changes the conversion -state described in the mbstate_t object pointed to by -.Fa ps . -This function may examine at most -.Fa n -bytes of the array beginning from -.Fa s . +is stored in the +.Vt wchar_t , +.Vt char16_t +or +.Vt char32_t +it points to. .Pp If .Fa s -points to a valid character and the character corresponds to a null wide -character, then the -.Fn mbrtowc -places the mbstate_t object pointed to by -.Fa ps -to an initial conversion state. -.Pp -Unlike -.Xr mbtowc 3 , -the -.Fn mbrtowc -may accept the byte sequence pointed to by +is +.Dv NULL , +these functions behave as if +.Fa pc +was +.Dv NULL , .Fa s -not forming a complete multibyte character -but which may be part of a valid character. -In this case, this function will accept all such bytes -and save them into the conversion state object pointed to by -.Fa ps . -They will be used at subsequent calls of this function to restart -the conversion suspended. -.Pp -The behaviour of -.Fn mbrtowc -is affected by the -.Dv LC_CTYPE -category of the current locale. -.Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It "s == NULL" -.Fn mbrtowc -sets the conversion state object pointed to by -.Fa ps -to an initial state and always returns 0. -Unlike -.Xr mbtowc 3 , -the value returned does not indicate whether the current encoding of -the locale is state-dependent. -.Pp -In this case, -.Fn mbrtowc -ignores -.Fa pwc +was an empty string +.Pq Qq and -.Fa n , -and is equivalent to the following call: -.Bd -literal -offset indent -mbrtowc(NULL, "", 1, ps); -.Ed -.It "pwc == NULL" -The conversion from a multibyte character to a wide character has -taken place and the conversion state may be affected, but the resulting -wide character is discarded. -.It "ps == NULL" -.Fn mbrtowc -uses its own internal state object to keep the conversion state, -instead of -.Fa ps -mentioned in this manual page. +.Fa n +was 1. .Pp -Calling any other functions in -.Lb libc -never changes the internal state of -.Fn mbrtowc , -which is initialized at startup time of the program. -.El -.\" ---------------------------------------------------------------------- +The +.Vt mbstate_t +argument, +.Fa ps , +is used to keep track of the shift state. +If it is +.Dv NULL , +these functions use an internal, static +.Vt mbstate_t +object, which is initialized to the initial conversion state +at program startup. +.Pp +As a single +.Vt char16_t +is not large enough to represent certain multibyte characters, the +.Fn mbrtoc16 +function may need to be invoked multiple times to convert a single +multibyte character sequence. .Sh RETURN VALUES -In the usual cases, -.Fn mbrtowc -returns: -.Bl -tag -width 012345678901 +The +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions return: +.Bl -tag -width indent .It 0 -The next bytes pointed to by -.Fa s -form a null character. -.It positive -If -.Fa s -points to a valid character, -.Fn mbrtowc -returns the number of bytes in the character. -.It (size_t)-2 -.Fa s -points to a byte sequence which possibly contains part of a valid -multibyte character, but which is incomplete. -When +The next .Fa n -is at least -.Dv MB_CUR_MAX , -this case can only occur if the array pointed to by -.Fa s -contains a redundant shift sequence. -.It (size_t)-1 -.Fa s -points to an illegal byte sequence which does not form a valid multibyte -character. -In this case, -.Fn mbrtowc -sets -.Va errno -to indicate the error. +or fewer bytes +represent the null wide character +.Pq Li "L'\e0'" . +.It >0 +The next +.Fa n +or fewer bytes represent a valid character, these functions +return the number of bytes used to complete the multibyte character. +.It Po Vt size_t Pc Ns \-1 +An encoding error has occurred. +The next +.Fa n +or fewer bytes do not contribute to a valid multibyte character. +.It Po Vt size_t Pc Ns \-2 +The next +.Fa n +contribute to, but do not complete, a valid multibyte character sequence, +and all +.Fa n +bytes have been processed. +.El +.Pp +The +.Fn mbrtoc16 +function also returns: +.Bl -tag -width indent +.It Po Vt size_t Pc Ns \-3 +The next character resulting from a previous call has been stored. +No bytes from the input have been consumed. .El -.\" ---------------------------------------------------------------------- .Sh ERRORS -.Fn mbrtowc -may cause an error in the following case: +The +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa s -points to an invalid or incomplete multibyte character. +An invalid multibyte sequence was detected. .It Bq Er EINVAL -.Fa ps -points to an invalid or uninitialized mbstate_t object. +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO -.Xr mbrlen 3 , .Xr mbtowc 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 , +.Xr setlocale 3 , +.Xr wcrtomb 3 .Sh STANDARDS The -.Fn mbrtowc -function conforms to -.St -isoC-amd1 . -The restrict qualifier is added at -.St -isoC-99 . +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions conform to +.St -isoC-2011 . diff --git a/lib/libc/string/wcsspn.c b/lib/libc/locale/mbrtowc.c similarity index 64% copy from lib/libc/string/wcsspn.c copy to lib/libc/locale/mbrtowc.c index e6f8bbb0dc..bef12338f0 100644 --- a/lib/libc/string/wcsspn.c +++ b/lib/libc/locale/mbrtowc.c @@ -1,7 +1,12 @@ /*- - * Copyright (c)1999 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,34 +28,26 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcsspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcsspn.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsspn.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/locale/mbrtowc.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include +#include "mblocal.h" size_t -wcsspn(const wchar_t *s, const wchar_t *set) +mbrtowc_l(wchar_t * __restrict pwc, const char * __restrict s, + size_t n, mbstate_t * __restrict ps, locale_t locale) { - const wchar_t *p; - const wchar_t *q; - - p = s; - while (*p) { - q = set; - while (*q) { - if (*p == *q) - break; - q++; - } - if (!*q) - goto done; - p++; - } + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtowc; + return (XLOCALE_CTYPE(locale)->__mbrtowc(pwc, s, n, ps)); +} -done: - return (p - s); +size_t +mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, + size_t n, mbstate_t * __restrict ps) +{ + return mbrtowc_l(pwc, s, n, ps, __get_locale()); } diff --git a/lib/libc/locale/mbsinit.3 b/lib/libc/locale/mbsinit.3 index 5283e4ac08..0951aee073 100644 --- a/lib/libc/locale/mbsinit.3 +++ b/lib/libc/locale/mbsinit.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/mbsinit.3,v 1.5 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbsinit.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,55 +22,46 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" $FreeBSD: head/lib/libc/locale/mbsinit.3 128032 2004-04-08 09:59:02Z tjr $ +.\" +.Dd April 8, 2004 .Dt MBSINIT 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm mbsinit -.Nd determines whether the state object is in the initial state -.\" ---------------------------------------------------------------------- +.Nd "determine conversion object status" .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In wchar.h .Ft int .Fn mbsinit "const mbstate_t *ps" -.\" ---------------------------------------------------------------------- .Sh DESCRIPTION The .Fn mbsinit -determines whether the state object pointed to by -.Fa ps -is the initial conversion state, or not. -.Pp +function determines whether the +.Vt mbstate_t +object pointed to by .Fa ps -may be a -.Dv NULL -pointer. -In this case, -.Fn mbsinit -will always return non-zero. -.\" ---------------------------------------------------------------------- +describes an initial conversion state. .Sh RETURN VALUES +The .Fn mbsinit -returns: -.Bl -tag -width 0123456789 -.It 0 -The current state is not the initial state. -.It non-zero -The current state is the initial state or +function returns non-zero if .Fa ps -is a +is .Dv NULL -pointer. -.El -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- +or describes an initial conversion state, +otherwise it returns zero. +.Sh SEE ALSO +.Xr mbrlen 3 , +.Xr mbrtowc 3 , +.Xr mbsrtowcs 3 , +.Xr multibyte 3 , +.Xr wcrtomb 3 , +.Xr wcsrtombs 3 .Sh STANDARDS The .Fn mbsinit -conforms to -.St -isoC-amd1 . +function conforms to +.St -isoC-99 . diff --git a/lib/libc/stdio/fwprintf.c b/lib/libc/locale/mbsinit.c similarity index 72% copy from lib/libc/stdio/fwprintf.c copy to lib/libc/locale/mbsinit.c index 479f9b3832..c432de8bc5 100644 --- a/lib/libc/stdio/fwprintf.c +++ b/lib/libc/locale/mbsinit.c @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2002 Tim J. Robbins + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +28,21 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/fwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/fwprintf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/mbsinit.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include +#include "mblocal.h" int -fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) +mbsinit_l(const mbstate_t *ps, locale_t locale) { - int ret; - va_list ap; - - va_start(ap, fmt); - ret = vfwprintf(fp, fmt, ap); - va_end(ap); - - return (ret); + FIX_LOCALE(locale); + return (XLOCALE_CTYPE(locale)->__mbsinit(ps)); +} +int +mbsinit(const mbstate_t *ps) +{ + return mbsinit_l(ps, __get_locale()); } diff --git a/lib/libc/locale/mbsnrtowcs.c b/lib/libc/locale/mbsnrtowcs.c new file mode 100644 index 0000000000..d4f07646c3 --- /dev/null +++ b/lib/libc/locale/mbsnrtowcs.c @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbsnrtowcs.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include "mblocal.h" + +size_t +mbsnrtowcs_l(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps, locale_t locale) +{ + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbsnrtowcs; + return (XLOCALE_CTYPE(locale)->__mbsnrtowcs(dst, src, nms, len, ps)); +} +size_t +mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps) +{ + return mbsnrtowcs_l(dst, src, nms, len, ps, __get_locale()); +} + +size_t +__mbsnrtowcs_std(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps) +{ + const char *s; + size_t nchr; + wchar_t wc; + size_t nb; + struct xlocale_ctype *ct = XLOCALE_CTYPE(__get_locale()); + + s = *src; + nchr = 0; + + if (dst == NULL) { + for (;;) { + if ((nb = ct->__mbrtowc(&wc, s, nms, ps)) == (size_t)-1) + /* Invalid sequence - mbrtowc() sets errno. */ + return ((size_t)-1); + else if (nb == 0 || nb == (size_t)-2) + return (nchr); + s += nb; + nms -= nb; + nchr++; + } + /*NOTREACHED*/ + } + + while (len-- > 0) { + if ((nb = ct->__mbrtowc(dst, s, nms, ps)) == (size_t)-1) { + *src = s; + return ((size_t)-1); + } else if (nb == (size_t)-2) { + *src = s + nms; + return (nchr); + } else if (nb == 0) { + *src = NULL; + return (nchr); + } + s += nb; + nms -= nb; + nchr++; + dst++; + } + *src = s; + return (nchr); +} diff --git a/lib/libc/locale/mbsrtowcs.3 b/lib/libc/locale/mbsrtowcs.3 index 82a2978aab..ab3d5b94bf 100644 --- a/lib/libc/locale/mbsrtowcs.3 +++ b/lib/libc/locale/mbsrtowcs.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/mbsrtowcs.3,v 1.8 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbsrtowcs.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,161 +22,114 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2002 +.\" $FreeBSD: head/lib/libc/locale/mbsrtowcs.3 140081 2005-01-11 20:50:51Z ru $ +.Dd July 21, 2004 .Dt MBSRTOWCS 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm mbsrtowcs -.Nd converts a multibyte character string to a wide character string \ -(restartable) -.\" ---------------------------------------------------------------------- +.Nm mbsrtowcs , +.Nm mbsnrtowcs +.Nd "convert a character string to a wide-character string (restartable)" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wchar.h .Ft size_t -.Fn mbsrtowcs "wchar_t * restrict pwcs" "const char ** restrict s" "size_t n" \ -"mbstate_t * restrict ps" -.\" ---------------------------------------------------------------------- +.Fo mbsrtowcs +.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t len" +.Fa "mbstate_t * restrict ps" +.Fc +.Ft size_t +.Fo mbsnrtowcs +.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t nms" +.Fa "size_t len" "mbstate_t * restrict ps" +.Fc .Sh DESCRIPTION The .Fn mbsrtowcs -converts the multibyte character string indirectly pointed to by -.Fa s -to the corresponding wide character string, and stores it in the +function converts a sequence of multibyte characters pointed to indirectly by +.Fa src +into a sequence of corresponding wide characters and stores at most +.Fa len +of them in the +.Vt wchar_t array pointed to by -.Fa pwcs . -The conversion stops due to the following reasons: -.Bl -bullet -.It -The conversion reaches a null byte. -In this case, the null byte is also converted. -.It -The -.Fn mbsrtowcs -has already stored -.Fa n -wide characters. -.It -The conversion encounters an invalid character. -.El -.Pp -Each character will be converted as if -.Xr mbrtowc 3 -is continuously called. -.Pp -After conversion, -if -.Fa pwcs -is not a -.Dv NULL -pointer, -the pointer object pointed to by -.Fa s -is a -.Dv NULL -pointer (if the conversion is stopped due to reaching a null byte) -or the first byte of the character just after the last character converted. +.Fa dst , +until it encounters a terminating null character +.Pq Li '\e0' . .Pp If -.Fa pwcs -is not a -.Dv NULL -pointer and the conversion is stopped due to reaching -a null byte, the -.Fn mbsrtowcs -places the state object pointed to by -.Fa ps -to an initial state after the conversion has taken place. +.Fa dst +is +.Dv NULL , +no characters are stored. .Pp -The behaviour of -.Fn mbsrtowcs -is affected by the -.Dv LC_CTYPE -category of the current locale. +If +.Fa dst +is not +.Dv NULL , +the pointer pointed to by +.Fa src +is updated to point to the character after the one that conversion stopped at. +If conversion stops because a null character is encountered, +.Fa *src +is set to +.Dv NULL . .Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It "s == NULL || *s == NULL" -Undefined (may cause the program to crash). -.It "pwcs == NULL" -The conversion has taken place, but the resulting wide character string -was discarded. -In this case, the pointer object pointed to by -.Fa s -is not modified and -.Fa n -is ignored. -.It "ps == NULL" The +.Vt mbstate_t +argument, +.Fa ps , +is used to keep track of the shift state. +If it is +.Dv NULL , .Fn mbsrtowcs -uses its own internal state object to keep the conversion state, -instead of -.Fa ps -mentioned in this manual page. +uses an internal, static +.Vt mbstate_t +object, which is initialized to the initial conversion state +at program startup. .Pp -Calling any other functions in -.Lb libc -never changes the internal state of +The +.Fn mbsnrtowcs +function behaves identically to .Fn mbsrtowcs , -which is initialized at startup time of the program. -.El -.\" ---------------------------------------------------------------------- +except that conversion stops after reading at most +.Fa nms +bytes from the buffer pointed to by +.Fa src . .Sh RETURN VALUES +The .Fn mbsrtowcs -returns: -.Bl -tag -width 012345678901 -.It 0 or positive -The value returned is the number of elements stored in the array -pointed to by -.Fa pwcs , -except for a terminating null wide character (if any). -If -.Fa pwcs -is not null and the value returned is equal to -.Fa n , -the wide character string pointed to by -.Fa pwcs -is not null terminated. -If -.Fa pwcs -is a null pointer, the value returned is the number of elements to contain -the whole string converted, except for a terminating null wide character. -.It (size_t)-1 -The array indirectly pointed to by -.Fa s -contains a byte sequence forming invalid character. -In this case, -.Fn mbsrtowcs -sets -.Va errno -to indicate the error. -.El -.\" ---------------------------------------------------------------------- +and +.Fn mbsnrtowcs +functions return the number of wide characters stored in +the array pointed to by +.Fa dst +if successful, otherwise it returns +.Po Vt size_t Pc Ns \-1 . .Sh ERRORS +The .Fn mbsrtowcs -may cause an error in the following case: +and +.Fn mbsnrtowcs +functions will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -The pointer pointed to by -.Fa s -points to an invalid or incomplete multibyte character. +An invalid multibyte character sequence was encountered. .It Bq Er EINVAL -.Fa ps -points to an invalid or uninitialized mbstate_t object. +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO .Xr mbrtowc 3 , .Xr mbstowcs 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 , +.Xr wcsrtombs 3 .Sh STANDARDS The .Fn mbsrtowcs function conforms to -.St -isoC-amd1 . -The restrict qualifier is added at .St -isoC-99 . +.Pp +The +.Fn mbsnrtowcs +function is an extension to the standard. diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/mbsrtowcs.c similarity index 63% copy from lib/libc/locale/wcstoll.c copy to lib/libc/locale/mbsrtowcs.c index 321f2bba26..9da9924687 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/mbsrtowcs.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoll.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoll.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,21 +27,29 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbsrtowcs.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include #include #include #include -#include - -#include "__wctoint.h" - -#define _FUNCNAME wcstoll -#define __INT /* LONGLONG */ long long int -#define __INT_MIN LLONG_MIN -#define __INT_MAX LLONG_MAX +#include "mblocal.h" -#include "_wcstol.h" +size_t +mbsrtowcs_l(wchar_t * __restrict dst, const char ** __restrict src, size_t len, + mbstate_t * __restrict ps, locale_t locale) +{ + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbsrtowcs; + return (XLOCALE_CTYPE(locale)->__mbsnrtowcs(dst, src, SIZE_T_MAX, len, ps)); +} +size_t +mbsrtowcs(wchar_t * __restrict dst, const char ** __restrict src, size_t len, + mbstate_t * __restrict ps) +{ + return mbsrtowcs_l(dst, src, len, ps, __get_locale()); +} diff --git a/lib/libc/locale/mbstowcs.3 b/lib/libc/locale/mbstowcs.3 index 7bd1c4e533..a148382ce9 100644 --- a/lib/libc/locale/mbstowcs.3 +++ b/lib/libc/locale/mbstowcs.3 @@ -1,8 +1,9 @@ -.\" $NetBSD: src/lib/libc/locale/mbstowcs.3,v 1.8 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbstowcs.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Copyright (c)2002 Citrus Project, -.\" All rights reserved. +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -12,11 +13,14 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,105 +29,59 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" From @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" From FreeBSD: src/lib/libc/locale/multibyte.3,v 1.22 2003/11/08 03:23:11 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/mbstowcs.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 8, 2004 .Dt MBSTOWCS 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm mbstowcs -.Nd converts a multibyte character string to a wide character string -.\" ---------------------------------------------------------------------- +.Nd convert a character string to a wide-character string .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In stdlib.h .Ft size_t -.Fn mbstowcs "wchar_t * restrict pwcs" "const char * restrict s" "size_t n" -.\" ---------------------------------------------------------------------- +.Fo mbstowcs +.Fa "wchar_t * restrict wcstring" "const char * restrict mbstring" +.Fa "size_t nwchars" +.Fc .Sh DESCRIPTION +The .Fn mbstowcs -converts a null-terminated multibyte character string pointed to by -.Fa s -to the corresponding wide character string and stores it in the array -pointed to by -.Fa pwcs . -This function may modify the first at most -.Fa n -elements of the array pointed to by -.Fa pwcs . -Each character will be converted as if -.Xr mbtowc 3 -is continuously called, except the internal state of -.Xr mbtowc 3 -will not be affected. -.Pp -For state-dependent encoding, -.Fn mbstowcs -implies the multibyte character string pointed to by -.Fa s -always begins with an initial state. -.Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It pwcs == NULL -.Fn mbstowcs -returns the number of elements to store the whole wide character string -corresponding to the multibyte character string pointed to by -.Fa s . -In this case, -.Fa n -is ignored. -.It s == NULL -Undefined (may cause the program to crash). -.El -.\" ---------------------------------------------------------------------- +function converts a multibyte character string +.Fa mbstring +beginning in the initial conversion state +into a wide character string +.Fa wcstring . +No more than +.Fa nwchars +wide characters are stored. +A terminating null wide character is appended if there is room. .Sh RETURN VALUES -.Fn mbstowcs -returns: -.Bl -tag -width 012345678901 -.It 0 or positive -Number of elements stored in the array pointed to by -.Fa pwcs . -There are no cases that the value returned is greater than -.Fa n -(unless -.Fa pwcs -is a null pointer) or the value of the -.Dv MB_CUR_MAX -macro. -If the return value is equal to -.Fa n , -the string pointed to by -.Fa pwcs -will not be null-terminated. -.It (size_t)-1 -.Fa s -points to a string containing an invalid or incomplete multibyte character. The .Fn mbstowcs -also sets -.Va errno -to indicate the error. -.El -.\" ---------------------------------------------------------------------- +function returns the number of wide characters converted, +not counting any terminating null wide character, or \-1 +if an invalid multibyte character was encountered. .Sh ERRORS +The .Fn mbstowcs -may cause an error in the following case: +function will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa s -points to a string containing an invalid or incomplete multibyte character. +An invalid multibyte sequence was detected. +.It Bq Er EINVAL +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO +.Xr mbsrtowcs 3 , .Xr mbtowc 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr multibyte 3 .Sh STANDARDS The .Fn mbstowcs function conforms to -.St -ansiC . -The restrict qualifier is added at .St -isoC-99 . diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/mbstowcs.c similarity index 64% copy from lib/libc/locale/wcstoll.c copy to lib/libc/locale/mbstowcs.c index 321f2bba26..8ab23d5b43 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/mbstowcs.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoll.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoll.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,21 +27,30 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbstowcs.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include + #include #include #include -#include - -#include "__wctoint.h" +#include "mblocal.h" -#define _FUNCNAME wcstoll -#define __INT /* LONGLONG */ long long int -#define __INT_MIN LLONG_MIN -#define __INT_MAX LLONG_MAX +size_t +mbstowcs_l(wchar_t * __restrict pwcs, const char * __restrict s, size_t n, locale_t locale) +{ + static const mbstate_t initial; + mbstate_t mbs; + const char *sp; + FIX_LOCALE(locale); -#include "_wcstol.h" + mbs = initial; + sp = s; + return (XLOCALE_CTYPE(locale)->__mbsnrtowcs(pwcs, &sp, SIZE_T_MAX, n, &mbs)); +} +size_t +mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n) +{ + return mbstowcs_l(pwcs, s, n, __get_locale()); +} diff --git a/lib/libc/locale/mbtowc.3 b/lib/libc/locale/mbtowc.3 index e16602d114..885b960db4 100644 --- a/lib/libc/locale/mbtowc.3 +++ b/lib/libc/locale/mbtowc.3 @@ -1,8 +1,9 @@ -.\" $NetBSD: src/lib/libc/locale/mbtowc.3,v 1.6 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/mbtowc.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Copyright (c)2002 Citrus Project, -.\" All rights reserved. +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -12,11 +13,14 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,157 +29,86 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" From @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" From FreeBSD: src/lib/libc/locale/multibyte.3,v 1.22 2003/11/08 03:23:11 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/mbtowc.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 11, 2004 .Dt MBTOWC 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm mbtowc -.Nd converts a multibyte character to a wide character -.\" ---------------------------------------------------------------------- +.Nd convert a character to a wide-character code .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In stdlib.h .Ft int -.Fn mbtowc "wchar_t * restrict pwc" "const char * restrict s" "size_t n" +.Fo mbtowc +.Fa "wchar_t * restrict wcharp" "const char * restrict mbchar" +.Fa "size_t nbytes" +.Fc .Sh DESCRIPTION +The .Fn mbtowc -usually converts the multibyte character pointed to by -.Fa s -to a wide character, and stores it in the wchar_t object pointed to by -.Fa pwc -if -.Fa pwc -is non-null and -.Fa s -points to a valid character. -This function may inspect at most n bytes of the array beginning from -.Fa s . -.Pp -In state-dependent encodings, -.Fa s -may point to the special sequence bytes to change the shift-state. -Although such sequence bytes correspond to no individual -wide-character code, -.Fn mbtowc -changes its own state by the sequence bytes and treats them -as if they are a part of the subsequence multibyte character. -.Pp -Unlike -.Xr mbrtowc 3 , -the first -.Fa n -bytes pointed to by -.Fa s -need to form an entire multibyte character. -Otherwise, this function causes an error. -.Pp -Calling any other functions in -.Lb libc -never changes the internal state of -.Fn mbtowc , -except for calling -.Xr setlocale 3 -with changing the -.Dv LC_CTYPE -category of the current locale. -Such -.Xr setlocale 3 -call causes the internal state of this function to be indeterminate. -.Pp -The behaviour of -.Fn mbtowc -is affected by the -.Dv LC_CTYPE -category of the current locale. +function converts a multibyte character +.Fa mbchar +into a wide character according to the current conversion state, +and stores the result +in the object pointed to by +.Fa wcharp . +Up to +.Fa nbytes +bytes are examined. .Pp -There are special cases: -.Bl -tag -width 012345678901 -.It s == NULL -.Fn mbtowc -initializes its own internal state to an initial state, and -determines whether the current encoding is state-dependent. -This function returns 0 if the encoding is state-independent, -otherwise non-zero. -In this case, -.Fa pwc -is completely ignored. -.It pwc == NULL -.Fn mbtowc -executes the conversion as if -.Fa pwc -is non-null, but a result of the conversion is discarded. -.It n == 0 -In this case, -the first -.Fa n -bytes of the array pointed to by -.Fa s -never form a complete character. -Thus, the -.Fn mbtowc -always fails. -.El -.\" ---------------------------------------------------------------------- +A call with a null +.Fa mbchar +pointer returns nonzero if the current encoding requires shift states, +zero otherwise; +if shift states are required, the shift state is reset to the initial state. .Sh RETURN VALUES -Normally, the -.Fn mbtowc -returns: -.Bl -tag -width 012345678901 -.It 0 -.Fa s -points to a null byte -.Pq Sq \e0 . -.It positive -Number of bytes for the valid multibyte character pointed to by -.Fa s . -There are no cases that the value returned is greater than -the value of the -.Dv MB_CUR_MAX -macro. -.It -1 -.Fa s -points to an invalid or an incomplete multibyte character. -The +If +.Fa mbchar +is +.Dv NULL , +the .Fn mbtowc -also sets -.Va errno -to indicate the error. -.El +function returns nonzero if shift states are supported, +zero otherwise. .Pp -When -.Fa s -is equal to -.Dv NULL , +Otherwise, if +.Fa mbchar +is not a null pointer, .Fn mbtowc -returns: -.Bl -tag -width 0123456789 -.It 0 -The current encoding is state-independent. -.It non-zero -The current encoding is state-dependent. -.El -.\" ---------------------------------------------------------------------- +either returns 0 if +.Fa mbchar +represents the null wide character, or returns +the number of bytes processed in +.Fa mbchar , +or returns \-1 if no multibyte character +could be recognized or converted. +In this case, +.Fn mbtowc Ns 's +internal conversion state is undefined. .Sh ERRORS +The .Fn mbtowc -may cause an error in the following case: +function will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa s -points to an invalid or incomplete multibyte character. +An invalid multibyte sequence was detected. +.It Bq Er EINVAL +The internal conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO +.Xr btowc 3 , .Xr mblen 3 , .Xr mbrtowc 3 , -.Xr setlocale 3 -.\" ---------------------------------------------------------------------- +.Xr mbstowcs 3 , +.Xr multibyte 3 , +.Xr wctomb 3 .Sh STANDARDS The .Fn mbtowc function conforms to -.St -ansiC . -The restrict qualifier is added at .St -isoC-99 . diff --git a/lib/libc/stdio/fgetwln.c b/lib/libc/locale/mbtowc.c similarity index 61% copy from lib/libc/stdio/fgetwln.c copy to lib/libc/locale/mbtowc.c index 9c7113480d..f50bfb56a1 100644 --- a/lib/libc/stdio/fgetwln.c +++ b/lib/libc/locale/mbtowc.c @@ -1,10 +1,12 @@ -/* $NetBSD: fgetwln.c,v 1.2 2009/01/31 06:08:28 lukem Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fgetwln.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -25,45 +27,34 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/mbtowc.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include "namespace.h" -#include -#include -#include "un-namespace.h" -#include "libc_private.h" -#include "local.h" -#include "priv_stdio.h" +#include +#include +#include "mblocal.h" -wchar_t * -fgetwln(FILE * __restrict fp, size_t *lenp) +int +mbtowc_l(wchar_t * __restrict pwc, const char * __restrict s, size_t n, locale_t locale) { - wint_t wc; - size_t len; - - FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); - - len = 0; - while ((wc = __fgetwc_unlock(fp)) != WEOF) { -#define GROW 512 - if (len * sizeof(wchar_t) >= (size_t)fp->_lb._size && - __slbexpand(fp, (len + GROW) * sizeof(wchar_t))) - goto error; - *((wchar_t *)(void *)fp->_lb._base + len++) = wc; - if (wc == L'\n') - break; + static const mbstate_t initial; + size_t rval; + FIX_LOCALE(locale); + + if (s == NULL) { + /* No support for state dependent encodings. */ + locale->mbtowc = initial; + return (0); } - if (len == 0) - goto error; - - FUNLOCKFILE(fp); - *lenp = len; - return ((wchar_t *)(void *)fp->_lb._base); - -error: - FUNLOCKFILE(fp); - *lenp = 0; - return (NULL); + rval = XLOCALE_CTYPE(locale)->__mbrtowc(pwc, s, n, &locale->mbtowc); + if (rval == (size_t)-1 || rval == (size_t)-2) + return (-1); + return ((int)rval); +} +int +mbtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n) +{ + return mbtowc_l(pwc, s, n, __get_locale()); } diff --git a/lib/libc/locale/wcstod.3 b/lib/libc/locale/mskanji.5 similarity index 58% copy from lib/libc/locale/wcstod.3 copy to lib/libc/locale/mskanji.5 index fe045bf158..f66bd422fb 100644 --- a/lib/libc/locale/wcstod.3 +++ b/lib/libc/locale/mskanji.5 @@ -1,6 +1,3 @@ -.\" $NetBSD: wcstod.3,v 1.5 2007/05/21 15:29:51 tnozaki Exp $ -.\" $DragonFly: src/lib/libc/locale/wcstod.3,v 1.1 2006/11/02 19:53:56 swildner Exp $ -.\" .\" Copyright (c) 2002, 2003 Tim J. Robbins .\" All rights reserved. .\" @@ -25,55 +22,49 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: wcstod.3,v 1.4 2003/05/22 13:02:27 ru Exp $ +.\" $FreeBSD: head/lib/libc/locale/mskanji.5 131608 2004-07-05 06:39:03Z ru $ .\" -.Dd April 23, 2009 -.Dt WCSTOD 3 +.Dd August 7, 2003 +.Dt MSKANJI 5 .Os .Sh NAME -.Nm wcstof , -.Nm wcstod , -.Nm wcstold -.Nd convert string to -.Vt float , double , -or -.Vt "long double" -.Sh LIBRARY -.Lb libc +.Nm mskanji +.Nd "Shift-JIS (MS Kanji) encoding for Japanese text" .Sh SYNOPSIS -.In wchar.h -.Ft float -.Fn wcstof "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" -.Ft double -.Fn wcstod "const wchar_t * restrict nptr" "wchar_t **endptr" -.Ft "long double" -.Fn wcstold "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" +.Nm ENCODING +.Qq MSKanji .Sh DESCRIPTION -The -.Fn wcstof , -.Fn wcstod , -and -.Fn wcstold -functions are the wide-character versions of the -.Fn strtof , -.Fn strtod , -and -.Fn strtold -functions. -Refer to -.Xr strtod 3 -for details. +Shift-JIS, also known as MS Kanji or SJIS, is an encoding system for +Japanese characters, developed by Microsoft Corporation. +It encodes the characters from the +.Tn JIS +X 0201 (ASCII/JIS-Roman) and +.Tn JIS +X 0208 (Japanese) character sets as sequences of either one or two bytes. +.Pp +Characters from the +.Tn ASCII Ns +/JIS-Roman character set are encoded as single bytes between 0x00 and 0x7F +(ASCII) or 0xA1 and 0xDF (Half-width katakana). +.Pp +Characters from the +.Tn JIS +X 0208 character set are encoded as two bytes. +The first ranges from +0x81 - 0x9F, 0xE0 - 0xEA, 0xED - 0xEE (not +.Tn JIS : +.Tn NEC Ns - Ns +selected +.Tn IBM +extended characters), +0xF0 - 0xF9 (not +.Tn JIS : +user defined), +or 0xFA - 0xFC (not +.Tn JIS : +.Tn IBM +extended characters). +The second byte ranges from 0x40 - 0xFC, excluding 0x7F (delete). .Sh SEE ALSO -.Xr strtod 3 , -.Xr wcstol 3 -.Sh STANDARDS -The -.Fn wcstod -function conforms to -.St -isoC-amd1 . -The -.Fn wcstof -and -.Fn wcstold -functions conform to -.St -isoC-99 . +.Xr euc 5 , +.Xr utf8 5 diff --git a/lib/libc/locale/mskanji.c b/lib/libc/locale/mskanji.c new file mode 100644 index 0000000000..60172b3da2 --- /dev/null +++ b/lib/libc/locale/mskanji.c @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * + * ja_JP.SJIS locale table for BSD4.4/rune + * version 1.0 + * (C) Sin'ichiro MIYATANI / Phase One, Inc + * May 12, 1995 + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Phase One, Inc. + * 4. The name of Phase One, Inc. may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)mskanji.c 1.0 (Phase One) 5/5/95 + * $FreeBSD: head/lib/libc/locale/mskanji.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +extern int __mb_sb_limit; + +static size_t _MSKanji_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _MSKanji_mbsinit(const mbstate_t *); +static size_t _MSKanji_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); + +typedef struct { + wchar_t ch; +} _MSKanjiState; + +int +_MSKanji_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _MSKanji_mbrtowc; + l->__wcrtomb = _MSKanji_wcrtomb; + l->__mbsinit = _MSKanji_mbsinit; + l->runes = rl; + l->__mb_cur_max = 2; + l->__mb_sb_limit = 256; + return (0); +} + +static int +_MSKanji_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _MSKanjiState *)ps)->ch == 0); +} + +static size_t +_MSKanji_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _MSKanjiState *ms; + wchar_t wc; + + ms = (_MSKanjiState *)ps; + + if ((ms->ch & ~0xFF) != 0) { + /* Bad conversion state. */ + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + if (ms->ch != 0) { + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (ms->ch << 8) | (*s & 0xFF); + if (pwc != NULL) + *pwc = wc; + ms->ch = 0; + return (1); + } + wc = *s++ & 0xff; + if ((wc > 0x80 && wc < 0xa0) || (wc >= 0xe0 && wc < 0xfd)) { + if (n < 2) { + /* Incomplete multibyte sequence */ + ms->ch = wc; + return ((size_t)-2); + } + if (*s == '\0') { + errno = EILSEQ; + return ((size_t)-1); + } + wc = (wc << 8) | (*s++ & 0xff); + if (pwc != NULL) + *pwc = wc; + return (2); + } else { + if (pwc != NULL) + *pwc = wc; + return (wc == L'\0' ? 0 : 1); + } +} + +static size_t +_MSKanji_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _MSKanjiState *ms; + int len, i; + + ms = (_MSKanjiState *)ps; + + if (ms->ch != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + len = (wc > 0x100) ? 2 : 1; + for (i = len; i-- > 0; ) + *s++ = wc >> (i << 3); + return (len); +} diff --git a/lib/libc/locale/multibyte.3 b/lib/libc/locale/multibyte.3 new file mode 100644 index 0000000000..80690d8d88 --- /dev/null +++ b/lib/libc/locale/multibyte.3 @@ -0,0 +1,142 @@ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/locale/multibyte.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 8, 2004 +.Dt MULTIBYTE 3 +.Os +.Sh NAME +.Nm multibyte +.Nd multibyte and wide character manipulation functions +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In limits.h +.In stdlib.h +.In wchar.h +.Sh DESCRIPTION +The basic elements of some written natural languages, such as Chinese, +cannot be represented uniquely with single C +.Vt char Ns s . +The C standard supports two different ways of dealing with +extended natural language encodings: +wide characters and +multibyte characters. +Wide characters are an internal representation +which allows each basic element to map +to a single object of type +.Vt wchar_t . +Multibyte characters are used for input and output +and code each basic element as a sequence of C +.Vt char Ns s . +Individual basic elements may map into one or more +(up to +.Dv MB_LEN_MAX ) +bytes in a multibyte character. +.Pp +The current locale +.Pq Xr setlocale 3 +governs the interpretation of wide and multibyte characters. +The locale category +.Dv LC_CTYPE +specifically controls this interpretation. +The +.Vt wchar_t +type is wide enough to hold the largest value +in the wide character representations for all locales. +.Pp +Multibyte strings may contain +.Sq shift +indicators to switch to and from +particular modes within the given representation. +If explicit bytes are used to signal shifting, +these are not recognized as separate characters +but are lumped with a neighboring character. +There is always a distinguished +.Sq initial +shift state. +Some functions (e.g., +.Xr mblen 3 , +.Xr mbtowc 3 +and +.Xr wctomb 3 ) +maintain static shift state internally, whereas +others store it in an +.Vt mbstate_t +object passed by the caller. +Shift states are undefined after a call to +.Xr setlocale 3 +with the +.Dv LC_CTYPE +or +.Dv LC_ALL +categories. +.Pp +For convenience in processing, +the wide character with value 0 +(the null wide character) +is recognized as the wide character string terminator, +and the character with value 0 +(the null byte) +is recognized as the multibyte character string terminator. +Null bytes are not permitted within multibyte characters. +.Pp +The C library provides the following functions for dealing with +multibyte characters: +.Bl -column "Description" +.It Sy "Function Description" +.It Xr mblen 3 Ta "get number of bytes in a character" +.It Xr mbrlen 3 Ta "get number of bytes in a character (restartable)" +.It Xr mbrtowc 3 Ta "convert a character to a wide-character code (restartable)" +.It Xr mbsrtowcs 3 Ta "convert a character string to a wide-character string (restartable)" +.It Xr mbstowcs 3 Ta "convert a character string to a wide-character string" +.It Xr mbtowc 3 Ta "convert a character to a wide-character code" +.It Xr wcrtomb 3 Ta "convert a wide-character code to a character (restartable)" +.It Xr wcstombs 3 Ta "convert a wide-character string to a character string" +.It Xr wcsrtombs 3 Ta "convert a wide-character string to a character string (restartable)" +.It Xr wctomb 3 Ta "convert a wide-character code to a character" +.El +.Sh SEE ALSO +.Xr mklocale 1 , +.Xr setlocale 3 , +.Xr stdio 3 , +.Xr big5 5 , +.Xr euc 5 , +.Xr gb18030 5 , +.Xr gb2312 5 , +.Xr gbk 5 , +.Xr mskanji 5 , +.Xr utf8 5 +.Sh STANDARDS +These functions conform to +.St -isoC-99 . diff --git a/lib/libc/locale/multibyte.h b/lib/libc/locale/multibyte.h deleted file mode 100644 index a71d9af86f..0000000000 --- a/lib/libc/locale/multibyte.h +++ /dev/null @@ -1,123 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/multibyte.h,v 1.3 2003/04/29 14:53:12 scw Exp $ */ -/* $DragonFly: src/lib/libc/locale/multibyte.h,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _MULTIBYTE_H_ -#define _MULTIBYTE_H_ - -/* mbstate_t private */ - -#ifndef _MBSTATE_T_DECLARED -#define _MBSTATE_T_DECLARED -typedef __mbstate_t mbstate_t; -#endif - -typedef struct _RuneStatePriv { - _RuneLocale *__runelocale; - char __private __attribute__((__aligned__)); -} _RuneStatePriv; - -typedef union _RuneState { - mbstate_t __pad; - struct _RuneStatePriv __priv; -#define rs_runelocale __priv.__runelocale -#define rs_private __priv.__private -} _RuneState; -#define _PRIVSIZE (sizeof(mbstate_t)-offsetof(_RuneStatePriv, __private)) - -static __inline _citrus_ctype_t -_to_cur_ctype(void) -{ - return(_CurrentRuneLocale->rl_citrus_ctype); -} - -static __inline _RuneState * -_ps_to_runestate(mbstate_t *ps) -{ - return((_RuneState *)(void *)ps); -} - -static __inline const _RuneState * -_ps_to_runestate_const(const mbstate_t *ps) -{ - return((const _RuneState *)(const void *)ps); -} - -static __inline _RuneLocale * -_ps_to_runelocale(const mbstate_t *ps) -{ - return(_ps_to_runestate_const(ps)->rs_runelocale); -} - -static __inline _citrus_ctype_t -_ps_to_ctype(const mbstate_t *ps) -{ - if (ps == NULL) - return(_to_cur_ctype()); - - _DIAGASSERT(_ps_to_runelocale(ps) != NULL); - - return(_ps_to_runelocale(ps)->rl_citrus_ctype); -} - -static __inline void * -_ps_to_private(mbstate_t *ps) -{ - if (ps == NULL) - return(NULL); - return((void *)&_ps_to_runestate(ps)->rs_private); -} - -static __inline const void * -_ps_to_private_const(const mbstate_t *ps) -{ - if (ps == NULL) - return(NULL); - return((const void *)&_ps_to_runestate_const(ps)->rs_private); -} - -static __inline void -_init_ps(_RuneLocale *rl, mbstate_t *ps) -{ - size_t dum; - _ps_to_runestate(ps)->rs_runelocale = rl; - _citrus_ctype_mbrtowc(rl->rl_citrus_ctype, NULL, NULL, 0, - _ps_to_private(ps), &dum); -} - -static __inline void -_fixup_ps(_RuneLocale *rl, mbstate_t *ps, int forceinit) -{ - /* for future multi-locale facility */ - _DIAGASSERT(rl != NULL); - - if (ps != NULL && (_ps_to_runelocale(ps) == NULL || forceinit)) - _init_ps(rl, ps); -} - -#endif diff --git a/lib/libc/locale/multibyte_amd1.c b/lib/libc/locale/multibyte_amd1.c deleted file mode 100644 index 251c3a4c05..0000000000 --- a/lib/libc/locale/multibyte_amd1.c +++ /dev/null @@ -1,167 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/multibyte_amd1.c,v 1.5 2003/03/05 20:18:16 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/multibyte_amd1.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2002 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include "../citrus/citrus_module.h" -#include "../citrus/citrus_ctype.h" -#include "rune.h" -#include "multibyte.h" - -size_t -mbrlen(const char *s, size_t n, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s == NULL); - - err0 = _citrus_ctype_mbrlen(_ps_to_ctype(ps), s, n, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -int -mbsinit(const mbstate_t *ps) -{ - int ret; - int err0; - _RuneLocale *rl; - - if (ps == NULL) - return(1); - - if (_ps_to_runelocale(ps) == NULL) - rl = _CurrentRuneLocale; - else - rl = _ps_to_runelocale(ps); - - /* mbsinit should cause no error... */ - err0 = _citrus_ctype_mbsinit(rl->rl_citrus_ctype, - _ps_to_private_const(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -size_t -mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s==NULL); - - err0 = _citrus_ctype_mbrtowc(_ps_to_ctype(ps), pwc, s, n, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -size_t -mbsrtowcs(wchar_t *pwcs, const char **s, size_t n, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s==NULL); - - err0 = _citrus_ctype_mbsrtowcs(_ps_to_ctype(ps), pwcs, s, n, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -size_t -wcrtomb(char *s, wchar_t wc, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s==NULL); - - err0 = _citrus_ctype_wcrtomb(_ps_to_ctype(ps), s, wc, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -size_t -wcsrtombs(char *s, const wchar_t **ppwcs, size_t n, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s==NULL); - - err0 = _citrus_ctype_wcsrtombs(_ps_to_ctype(ps), s, ppwcs, n, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return(ret); -} - -wint_t -btowc(int c) -{ - wint_t ret; - int err0; - - err0 = _citrus_ctype_btowc(_to_cur_ctype(), c, &ret); - if (err0) - errno = err0; - - return(ret); -} - -int -wctob(wint_t wc) -{ - int ret; - int err0; - - err0 = _citrus_ctype_wctob(_to_cur_ctype(), wc, &ret); - if (err0) - errno = err0; - - return(ret); -} diff --git a/lib/libc/locale/newlocale.3 b/lib/libc/locale/newlocale.3 new file mode 100644 index 0000000000..3bded5f4fb --- /dev/null +++ b/lib/libc/locale/newlocale.3 @@ -0,0 +1,112 @@ +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/newlocale.3 250244 2013-05-04 17:06:47Z pluknet $ +.Dd September 17, 2011 +.Dt NEWLOCALE 3 +.Os +.Sh NAME +.Nm newlocale +.Nd Creates a new locale +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In xlocale +.Ft locale_t +.Fn newlocale "int mask" "const char * locale" "locale_t base" +.Sh DESCRIPTION +Creates a new locale, inheriting some properties from an existing locale. +The +.Fa mask +defines the components that the new locale will have set to the locale with the +name specified in the +.Fa locale +parameter. +Any other components will be inherited from +.Fa base . +The +.Fa mask +is either +.Fa LC_ALL_MASK , +indicating all possible locale components, +or the logical OR of some combination of the following: +.Bl -tag -width "LC_MESSAGES_MASK" -offset indent +.It LC_COLLATE_MASK +The locale for string collation routines. +This controls alphabetic ordering in +.Xr strcoll 3 +and +.Xr strxfrm 3 . +.It LC_CTYPE_MASK +The locale for the +.Xr ctype 3 +and +.Xr multibyte 3 +functions. +This controls recognition of upper and lower case, alphabetic or +non-alphabetic characters, and so on. +.It LC_MESSAGES_MASK +Set a locale for message catalogs, see +.Xr catopen 3 +function. +.It LC_MONETARY_MASK +Set a locale for formatting monetary values; this affects +the +.Xr localeconv 3 +function. +.It LC_NUMERIC_MASK +Set a locale for formatting numbers. +This controls the formatting of decimal points in input and output of floating +point numbers in functions such as +.Xr printf 3 +and +.Xr scanf 3 , +as well as values returned by +.Xr localeconv 3 . +.It LC_TIME_MASK +Set a locale for formatting dates and times using the +.Xr strftime 3 +function. +.El +This function uses the same rules for loading locale components as +.Xr setlocale 3 . +.Sh RETURN VALUES +Returns a new, valid, +.Fa locale_t +or NULL if an error occurs. +You must free the returned locale with +.Xr freelocale 3 . +.Sh SEE ALSO +.Xr duplocale 3 , +.Xr freelocale 3 , +.Xr localeconv 3 , +.Xr querylocale 3 , +.Xr uselocale 3 , +.Xr xlocale 3 +.Sh STANDARDS +This function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/nextwctype.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/nextwctype.3 index 94573d7bfc..33cf674ce0 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/nextwctype.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,45 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/nextwctype.3 148232 2005-07-21 10:27:45Z tjr $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd July 21, 2005 +.Dt NEXTWCTYPE 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm nextwctype +.Nd "iterate through character classes" .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h -.Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.In wctype.h +.Ft wint_t +.Fn nextwctype "wint_t ch" "wctype_t wct" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn nextwctype +function determines the next character after +.Fa ch +that is a member of character class +.Fa wct . +If +.Fa ch +is \-1, the search begins at the first member of +.Fa wct . .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn nextwctype +function returns the next character, or \-1 if there are no more. +.Sh COMPATIBILITY +This function is a non-standard +.Fx +extension and should not be used where the standard +.Fn iswctype +function would suffice. .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr wctype 3 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn nextwctype +function appeared in +.Fx 5.4 . diff --git a/lib/libc/locale/nextwctype.c b/lib/libc/locale/nextwctype.c new file mode 100644 index 0000000000..9e149f7b6a --- /dev/null +++ b/lib/libc/locale/nextwctype.c @@ -0,0 +1,103 @@ +/*- + * Copyright (c) 2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/nextwctype.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include "mblocal.h" + +wint_t +nextwctype_l(wint_t wc, wctype_t wct, locale_t locale) +{ + size_t lim; + FIX_LOCALE(locale); + _RuneLocale *runes = XLOCALE_CTYPE(locale)->runes; + _RuneRange *rr = &runes->__runetype_ext; + _RuneEntry *base, *re; + int noinc; + + noinc = 0; + if (wc < _CACHED_RUNES) { + wc++; + while (wc < _CACHED_RUNES) { + if (runes->__runetype[wc] & wct) + return (wc); + wc++; + } + wc--; + } + if (rr->__ranges != NULL && wc < rr->__ranges[0].__min) { + wc = rr->__ranges[0].__min; + noinc = 1; + } + + /* Binary search -- see bsearch.c for explanation. */ + base = rr->__ranges; + for (lim = rr->__nranges; lim != 0; lim >>= 1) { + re = base + (lim >> 1); + if (re->__min <= wc && wc <= re->__max) + goto found; + else if (wc > re->__max) { + base = re + 1; + lim--; + } + } + return (-1); +found: + if (!noinc) + wc++; + if (re->__min <= wc && wc <= re->__max) { + if (re->__types != NULL) { + for (; wc <= re->__max; wc++) + if (re->__types[wc - re->__min] & wct) + return (wc); + } else if (re->__map & wct) + return (wc); + } + while (++re < rr->__ranges + rr->__nranges) { + wc = re->__min; + if (re->__types != NULL) { + for (; wc <= re->__max; wc++) + if (re->__types[wc - re->__min] & wct) + return (wc); + } else if (re->__map & wct) + return (wc); + } + return (-1); +} +wint_t +nextwctype(wint_t wc, wctype_t wct) +{ + return nextwctype_l(wc, wct, __get_locale()); +} diff --git a/lib/libc/locale/nl_langinfo.3 b/lib/libc/locale/nl_langinfo.3 index 6ce3b2e6b6..68b4522b44 100644 --- a/lib/libc/locale/nl_langinfo.3 +++ b/lib/libc/locale/nl_langinfo.3 @@ -1,152 +1,102 @@ -.\" $NetBSD: src/lib/libc/locale/nl_langinfo.3,v 1.13 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/nl_langinfo.3,v 1.6 2008/05/02 02:05:04 swildner Exp $ +.\" Copyright (c) 2001 Alexey Zelkin +.\" All rights reserved. .\" -.\" Written by J.T. Conklin . -.\" Public domain. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. .\" -.Dd February 12, 2003 +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/nl_langinfo.3 238919 2012-07-30 20:56:19Z issyl0 $ +.\" +.Dd July 30, 2012 .Dt NL_LANGINFO 3 .Os .Sh NAME .Nm nl_langinfo -.Nd get locale information +.Nd language information .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In langinfo.h .Ft char * .Fn nl_langinfo "nl_item item" +.Ft char * +.Fn nl_langinfo_l "nl_item item" "locale_t loc" .Sh DESCRIPTION The .Fn nl_langinfo -function returns a pointer to a string containing information -set by the program's locale. -.Pp -The names and values of +function returns a pointer to a string containing information relevant to +the particular language or cultural area defined in the program or thread's +locale, or in the case of +.Fn nl_langinfo_l , +the locale passed as the second argument. +The manifest constant names and values of .Fa item are defined in .In langinfo.h . -The entries under Category indicate in which -.Xr setlocale 3 -category each item is defined. -.sp -.nf -.ta \w'ERA_D_T_FMT'u+1n +\w'LC_MESSAGES'u+1n +\w'Name of the third day of the week (e.g.: Tuesday)'u -\fIConstant\fP \fICategory\fP \fIMeaning\fP -.ta \w'ERA_D_T_FMT'u+1n +\w'LC_MESSAGES'u+1n +\w'Name of the third day of the week (e.g.: Tuesday)'u+1nC -.sp 5p -CODESET LC_CTYPE Codeset name -D_T_FMT LC_TIME String for formatting date and time -D_FMT LC_TIME Date format string -T_FMT LC_TIME Time format string -T_FMT_AMPM LC_TIME A.M. or P.M. time format string -AM_STR LC_TIME Ante-meridiem affix -PM_STR LC_TIME Post-meridiem affix -DAY_1 LC_TIME Name of the first day of the week (e.g.: Sunday) -DAY_2 LC_TIME Name of the second day of the week (e.g.: Monday) -DAY_3 LC_TIME Name of the third day of the week (e.g.: Tuesday) -DAY_4 LC_TIME Name of the fourth day of the week (e.g.: Wednesday) -DAY_5 LC_TIME Name of the fifth day of the week (e.g.: Thursday) -DAY_6 LC_TIME Name of the sixth day of the week (e.g.: Friday) -DAY_7 LC_TIME Name of the seventh day of the week (e.g.: Saturday) -ABDAY_1 LC_TIME Abbreviated name of the first day of the week -ABDAY_2 LC_TIME Abbreviated name of the second day of the week -ABDAY_3 LC_TIME Abbreviated name of the third day of the week -ABDAY_4 LC_TIME Abbreviated name of the fourth day of the week -ABDAY_5 LC_TIME Abbreviated name of the fifth day of the week -ABDAY_6 LC_TIME Abbreviated name of the sixth day of the week -ABDAY_7 LC_TIME Abbreviated name of the seventh day of the week -MON_1 LC_TIME Name of the first month of the year -MON_2 LC_TIME Name of the second month -MON_3 LC_TIME Name of the third month -MON_4 LC_TIME Name of the fourth month -MON_5 LC_TIME Name of the fifth month -MON_6 LC_TIME Name of the sixth month -MON_7 LC_TIME Name of the seventh month -MON_8 LC_TIME Name of the eighth month -MON_9 LC_TIME Name of the ninth month -MON_10 LC_TIME Name of the tenth month -MON_11 LC_TIME Name of the eleventh month -MON_12 LC_TIME Name of the twelfth month -ABMON_1 LC_TIME Abbreviated name of the first month -ABMON_2 LC_TIME Abbreviated name of the second month -ABMON_3 LC_TIME Abbreviated name of the third month -ABMON_4 LC_TIME Abbreviated name of the fourth month -ABMON_5 LC_TIME Abbreviated name of the fifth month -ABMON_6 LC_TIME Abbreviated name of the sixth month -ABMON_7 LC_TIME Abbreviated name of the seventh month -ABMON_8 LC_TIME Abbreviated name of the eighth month -ABMON_9 LC_TIME Abbreviated name of the ninth month -ABMON_10 LC_TIME Abbreviated name of the tenth month -ABMON_11 LC_TIME Abbreviated name of the eleventh month -ABMON_12 LC_TIME Abbreviated name of the twelfth month -ERA LC_TIME Era description segments -ERA_D_FMT LC_TIME Era date format string -ERA_D_T_FMT LC_TIME Era date and time format string -ERA_T_FMT LC_TIME Era time format string -ALT_DIGITS LC_TIME Alternative symbols for digits -RADIXCHAR LC_NUMERIC Radix character -THOUSEP LC_NUMERIC Separator for thousands -YESEXPR LC_MESSAGES Affirmative response expression -NOEXPR LC_MESSAGES Negative response expression -.\" CRNCYSTR LC_MONETARY Local currency symbol -.fi +.Pp +Calls to +.Fn setlocale +with a category corresponding to the category of +.Fa item , +or to the +category +.Dv LC_ALL , +may overwrite the buffer pointed to by the return value. .Sh RETURN VALUES +In a locale where langinfo data is not defined, +.Fn nl_langinfo +returns a pointer to the corresponding string in the +.Tn POSIX +locale. +.Fn nl_langinfo_l +returns the same values as +.Fn nl_langinfo . +In all locales, .Fn nl_langinfo returns a pointer to an empty string if .Fa item -is invalid. +contains an invalid setting. .Sh EXAMPLES -The following example uses -.Fn nl_langinfo -to obtain the date and time format for the current locale: -.Bd -literal -offset indent -#include -#include -#include - -int main(void) -{ - char datestring[100]; - struct tm *tm; - time_t t; - char *ptr; - - t = time(NULL); - tm = localtime(&t); - (void)setlocale(LC_ALL, ""); - ptr = nl_langinfo(D_T_FMT); - strftime(datestring, sizeof(datestring), ptr, tm); - printf("%s\en",datestring); - return (0); -} -.Ed -.\" .Pp -.\" The following example uses -.\" .Fn nl_langinfo -.\" to obtain the setting of the currency symbol for the current locale: -.\" .Pp -.\" .Bd -.\" #include -.\" #include -.\" int main(void) -.\" { -.\" char *ptr; -.\" (void)setlocale(LC_ALL, ""); -.\" ptr = nl_langinfo(CRNCYSTR); -.\" printf("%s", ptr); -.\" } -.\" .Ed +For example: +.Pp +.Dl nl_langinfo(ABDAY_1) +.Pp +would return a pointer to the string +.Qq Li Dom +if the identified language was +Portuguese, and +.Qq Li Sun +if the identified language was English. .Sh SEE ALSO -.Xr setlocale 3 , -.Xr nls 7 +.Xr setlocale 3 .Sh STANDARDS The .Fn nl_langinfo function conforms to -.St -p1003.1-2001 . +.St -susv2 . +The +.Fn nl_langinfo_l +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn nl_langinfo -function appeared in -.Nx 1.0 . +function first appeared in +.Fx 4.6 . diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c index 784fdca16a..17c2434222 100644 --- a/lib/libc/locale/nl_langinfo.c +++ b/lib/libc/locale/nl_langinfo.c @@ -1,121 +1,193 @@ -/* $NetBSD: src/lib/libc/locale/nl_langinfo.c,v 1.10 2004/07/21 20:27:46 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/nl_langinfo.c,v 1.4 2005/04/21 16:36:34 joerg Exp $ */ - -/* - * Written by J.T. Conklin . - * Public domain. +/*- + * Copyright (c) 2001, 2003 Alexey Zelkin + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/nl_langinfo.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include + #include +#include #include -#include -#include "rune.h" -#include "runetype.h" +#include +#include + +#include "lnumeric.h" +#include "lmessages.h" +#include "lmonetary.h" +#include "../stdtime/timelocal.h" + +#define _REL(BASE) ((int)item-BASE) char * -nl_langinfo(nl_item item) +nl_langinfo_l(nl_item item, locale_t loc) { - const char *s; + char *ret, *cs; + const char *s; + FIX_LOCALE(loc); - switch (item) { + switch (item) { + case CODESET: + ret = ""; + if ((s = querylocale(LC_CTYPE_MASK, loc)) != NULL) { + if ((cs = strchr(s, '.')) != NULL) + ret = cs + 1; + else if (strcmp(s, "C") == 0 || + strcmp(s, "POSIX") == 0) + ret = "US-ASCII"; + } + break; case D_T_FMT: - s = _CurrentTimeLocale->d_t_fmt; - break; + ret = (char *) __get_current_time_locale(loc)->c_fmt; + break; case D_FMT: - s = _CurrentTimeLocale->d_fmt; + ret = (char *) __get_current_time_locale(loc)->x_fmt; break; case T_FMT: - s = _CurrentTimeLocale->t_fmt; + ret = (char *) __get_current_time_locale(loc)->X_fmt; break; case T_FMT_AMPM: - s = _CurrentTimeLocale->t_fmt_ampm; + ret = (char *) __get_current_time_locale(loc)->ampm_fmt; break; case AM_STR: + ret = (char *) __get_current_time_locale(loc)->am; + break; case PM_STR: - s = _CurrentTimeLocale->am_pm[(size_t)(item - AM_STR)]; - break; - case DAY_1: - case DAY_2: - case DAY_3: - case DAY_4: - case DAY_5: - case DAY_6: - case DAY_7: - s = _CurrentTimeLocale->day[(size_t)(item - DAY_1)]; - break; - case ABDAY_1: - case ABDAY_2: - case ABDAY_3: - case ABDAY_4: - case ABDAY_5: - case ABDAY_6: - case ABDAY_7: - s = _CurrentTimeLocale->abday[(size_t)(item - ABDAY_1)]; - break; - case MON_1: - case MON_2: - case MON_3: - case MON_4: - case MON_5: - case MON_6: - case MON_7: - case MON_8: - case MON_9: - case MON_10: - case MON_11: - case MON_12: - s = _CurrentTimeLocale->mon[(size_t)(item - MON_1)]; - break; - case ABMON_1: - case ABMON_2: - case ABMON_3: - case ABMON_4: - case ABMON_5: - case ABMON_6: - case ABMON_7: - case ABMON_8: - case ABMON_9: - case ABMON_10: - case ABMON_11: - case ABMON_12: - s = _CurrentTimeLocale->abmon[(size_t)(item - ABMON_1)]; + ret = (char *) __get_current_time_locale(loc)->pm; break; - case RADIXCHAR: - s = _CurrentNumericLocale->decimal_point; + case DAY_1: case DAY_2: case DAY_3: + case DAY_4: case DAY_5: case DAY_6: case DAY_7: + ret = (char*) __get_current_time_locale(loc)->weekday[_REL(DAY_1)]; break; - case THOUSEP: - s = _CurrentNumericLocale->thousands_sep; + case ABDAY_1: case ABDAY_2: case ABDAY_3: + case ABDAY_4: case ABDAY_5: case ABDAY_6: case ABDAY_7: + ret = (char*) __get_current_time_locale(loc)->wday[_REL(ABDAY_1)]; break; - case YESSTR: - s = _CurrentMessagesLocale->yesstr; + case MON_1: case MON_2: case MON_3: case MON_4: + case MON_5: case MON_6: case MON_7: case MON_8: + case MON_9: case MON_10: case MON_11: case MON_12: + ret = (char*) __get_current_time_locale(loc)->month[_REL(MON_1)]; break; - case YESEXPR: - s = _CurrentMessagesLocale->yesexpr; + case ABMON_1: case ABMON_2: case ABMON_3: case ABMON_4: + case ABMON_5: case ABMON_6: case ABMON_7: case ABMON_8: + case ABMON_9: case ABMON_10: case ABMON_11: case ABMON_12: + ret = (char*) __get_current_time_locale(loc)->mon[_REL(ABMON_1)]; break; - case NOSTR: - s = _CurrentMessagesLocale->nostr; + case ALTMON_1: case ALTMON_2: case ALTMON_3: case ALTMON_4: + case ALTMON_5: case ALTMON_6: case ALTMON_7: case ALTMON_8: + case ALTMON_9: case ALTMON_10: case ALTMON_11: case ALTMON_12: + ret = (char*) + __get_current_time_locale(loc)->alt_month[_REL(ALTMON_1)]; break; - case NOEXPR: - s = _CurrentMessagesLocale->noexpr; + case ERA: + /* XXX: need to be implemented */ + ret = ""; break; - case CRNCYSTR: /* XXX */ - s = ""; + case ERA_D_FMT: + /* XXX: need to be implemented */ + ret = ""; break; - case CODESET: - s = _CurrentRuneLocale->rl_codeset; - if (!s) - s = ""; + case ERA_D_T_FMT: + /* XXX: need to be implemented */ + ret = ""; break; - case _DATE_FMT: /* local extension */ - s = _CurrentTimeLocale->date_fmt; + case ERA_T_FMT: + /* XXX: need to be implemented */ + ret = ""; break; - default: - s = ""; + case ALT_DIGITS: + /* XXX: need to be implemented */ + ret = ""; break; - } + case RADIXCHAR: + ret = (char*) __get_current_numeric_locale(loc)->decimal_point; + break; + case THOUSEP: + ret = (char*) __get_current_numeric_locale(loc)->thousands_sep; + break; + case YESEXPR: + ret = (char*) __get_current_messages_locale(loc)->yesexpr; + break; + case NOEXPR: + ret = (char*) __get_current_messages_locale(loc)->noexpr; + break; + /* + * YESSTR and NOSTR items marked with LEGACY are available, but not + * recomended by SUSv2 to be used in portable applications since + * they're subject to remove in future specification editions. + */ + case YESSTR: /* LEGACY */ + ret = (char*) __get_current_messages_locale(loc)->yesstr; + break; + case NOSTR: /* LEGACY */ + ret = (char*) __get_current_messages_locale(loc)->nostr; + break; + /* + * SUSv2 special formatted currency string + */ + case CRNCYSTR: + ret = ""; + cs = (char*) __get_current_monetary_locale(loc)->currency_symbol; + if (*cs != '\0') { + char pos = localeconv_l(loc)->p_cs_precedes; + + if (pos == localeconv_l(loc)->n_cs_precedes) { + char psn = '\0'; + + if (pos == CHAR_MAX) { + if (strcmp(cs, __get_current_monetary_locale(loc)->mon_decimal_point) == 0) + psn = '.'; + } else + psn = pos ? '-' : '+'; + if (psn != '\0') { + int clen = strlen(cs); - /* The return value should be really const, but the interface says OW */ - /* LINTED const castaway. */ - return((char *) s); + if ((loc->csym = reallocf(loc->csym, clen + 2)) != NULL) { + *loc->csym = psn; + strcpy(loc->csym + 1, cs); + ret = loc->csym; + } + } + } + } + break; + case D_MD_ORDER: /* FreeBSD local extension */ + ret = (char *) __get_current_time_locale(loc)->md_order; + break; + default: + ret = ""; + } + return (ret); +} + +char * +nl_langinfo(nl_item item) +{ + return nl_langinfo_l(item, __get_locale()); } diff --git a/lib/libc/locale/nomacros.c b/lib/libc/locale/nomacros.c new file mode 100644 index 0000000000..35db11b527 --- /dev/null +++ b/lib/libc/locale/nomacros.c @@ -0,0 +1,19 @@ +/* + * $FreeBSD: head/lib/libc/locale/nomacros.c 232626 2012-03-06 21:56:30Z dim $ + */ + +/* + * Tell to generate extern versions of all its inline + * functions. The extern versions get called if the system doesn't + * support inlines or the user defines _DONT_USE_CTYPE_INLINE_ + * before including . + */ +#define _EXTERNALIZE_CTYPE_INLINES_ + +/* + * Also make sure does not generate an inline definition + * of __getCurrentRuneLocale(). + */ +#define __RUNETYPE_INTERNAL + +#include diff --git a/lib/libc/locale/none.c b/lib/libc/locale/none.c new file mode 100644 index 0000000000..d7980d2be2 --- /dev/null +++ b/lib/libc/locale/none.c @@ -0,0 +1,220 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)none.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/none.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +static size_t _none_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _none_mbsinit(const mbstate_t *); +static size_t _none_mbsnrtowcs(wchar_t * __restrict dst, + const char ** __restrict src, size_t nms, size_t len, + mbstate_t * __restrict ps __unused); +static size_t _none_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); +static size_t _none_wcsnrtombs(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict); + +/* setup defaults */ + +int __mb_cur_max = 1; +int __mb_sb_limit = 256; /* Expected to be <= _CACHED_RUNES */ + +int +_none_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _none_mbrtowc; + l->__mbsinit = _none_mbsinit; + l->__mbsnrtowcs = _none_mbsnrtowcs; + l->__wcrtomb = _none_wcrtomb; + l->__wcsnrtombs = _none_wcsnrtombs; + l->runes = rl; + l->__mb_cur_max = 1; + l->__mb_sb_limit = 256; + return(0); +} + +static int +_none_mbsinit(const mbstate_t *ps __unused) +{ + + /* + * Encoding is not state dependent - we are always in the + * initial state. + */ + return (1); +} + +static size_t +_none_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps __unused) +{ + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (0); + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + if (pwc != NULL) + *pwc = (unsigned char)*s; + return (*s == '\0' ? 0 : 1); +} + +static size_t +_none_wcrtomb(char * __restrict s, wchar_t wc, + mbstate_t * __restrict ps __unused) +{ + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc < 0 || wc > UCHAR_MAX) { + errno = EILSEQ; + return ((size_t)-1); + } + *s = (unsigned char)wc; + return (1); +} + +static size_t +_none_mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps __unused) +{ + const char *s; + size_t nchr; + + if (dst == NULL) { + s = memchr(*src, '\0', nms); + return (s != NULL ? s - *src : nms); + } + + s = *src; + nchr = 0; + while (len-- > 0 && nms-- > 0) { + if ((*dst++ = (unsigned char)*s++) == L'\0') { + *src = NULL; + return (nchr); + } + nchr++; + } + *src = s; + return (nchr); +} + +static size_t +_none_wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src, + size_t nwc, size_t len, mbstate_t * __restrict ps __unused) +{ + const wchar_t *s; + size_t nchr; + + if (dst == NULL) { + for (s = *src; nwc > 0 && *s != L'\0'; s++, nwc--) { + if (*s < 0 || *s > UCHAR_MAX) { + errno = EILSEQ; + return ((size_t)-1); + } + } + return (s - *src); + } + + s = *src; + nchr = 0; + while (len-- > 0 && nwc-- > 0) { + if (*s < 0 || *s > UCHAR_MAX) { + errno = EILSEQ; + return ((size_t)-1); + } + if ((*dst++ = *s++) == '\0') { + *src = NULL; + return (nchr); + } + nchr++; + } + *src = s; + return (nchr); +} + +/* setup defaults */ + +size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict) = _none_mbrtowc; +int (*__mbsinit)(const mbstate_t *) = _none_mbsinit; +size_t (*__mbsnrtowcs)(wchar_t * __restrict, const char ** __restrict, + size_t, size_t, mbstate_t * __restrict) = _none_mbsnrtowcs; +size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict) = + _none_wcrtomb; +size_t (*__wcsnrtombs)(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict) = _none_wcsnrtombs; + +struct xlocale_ctype __xlocale_global_ctype = { + {{0}, "C"}, + (_RuneLocale*)&_DefaultRuneLocale, + _none_mbrtowc, + _none_mbsinit, + _none_mbsnrtowcs, + _none_wcrtomb, + _none_wcsnrtombs, + 1, /* __mb_cur_max, */ + 256 /* __mb_sb_limit */ +}; + +const struct xlocale_ctype __xlocale_C_ctype = { + {{0}, "C"}, + (_RuneLocale*)&_DefaultRuneLocale, + _none_mbrtowc, + _none_mbsinit, + _none_mbsnrtowcs, + _none_wcrtomb, + _none_wcsnrtombs, + 1, /* __mb_cur_max, */ + 256 /* __mb_sb_limit */ +}; diff --git a/lib/libc/gen/isascii.3 b/lib/libc/locale/querylocale.3 similarity index 62% copy from lib/libc/gen/isascii.3 copy to lib/libc/locale/querylocale.3 index 623da12c5a..01f550db27 100644 --- a/lib/libc/gen/isascii.3 +++ b/lib/libc/locale/querylocale.3 @@ -1,5 +1,8 @@ -.\" Copyright (c) 1989, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,34 +25,30 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.5.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ +.\" $FreeBSD: head/lib/libc/locale/querylocale.3 250209 2013-05-03 12:42:43Z pluknet $ .\" -.Dd December 11, 1993 -.Dt ISASCII 3 +.Dd May 3, 2013 +.Dt QUERYLOCALE 3 .Os .Sh NAME -.Nm isascii -.Nd test for ASCII character +.Nm querylocale +.Nd Look up the locale name for a specified category .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In ctype.h -.Ft int -.Fn isascii "int c" +.In xlocale.h +.Ft const char * +.Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION -The -.Fn isascii -function tests for an -.Tn ASCII -character, which is any character -between 0 and octal 0177 inclusive. +Returns the name of the locale for the category specified by +.Fa mask . +This possible values for the mask are the same as those in +.Xr newlocale 3 . +If more than one bit in the mask is set, the returned value is undefined. .Sh SEE ALSO -.Xr ctype 3 , -.Xr ascii 7 -.Sh STANDARDS -The -.Fn isascii -function conforms to -.St -isoC . +.Xr duplocale 3 , +.Xr freelocale 3 , +.Xr localeconv 3 , +.Xr newlocale 3 , +.Xr uselocale 3 , +.Xr xlocale 3 diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/locale/rpmatch.3 similarity index 63% copy from lib/libc/string/wcswidth.3 copy to lib/libc/locale/rpmatch.3 index 94573d7bfc..81eb9fec1f 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/locale/rpmatch.3 @@ -1,4 +1,5 @@ -.\" Copyright (c) 2002 Tim J. Robbins +.\" +.\" Copyright (c) 2005 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,42 +23,44 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/rpmatch.3 148234 2005-07-21 10:53:27Z tjr $ .\" -.Dd May 30, 2008 -.Dt WCSWIDTH 3 +.Dd July 21, 2005 +.Dt RPMATCH 3 .Os .Sh NAME -.Nm wcswidth -.Nd "number of column positions in wide-character string" +.Nm rpmatch +.Nd "determine whether the response to a question is affirmative or negative" .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In wchar.h +.In stdlib.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fn rpmatch "const char *response" .Sh DESCRIPTION The -.Fn wcswidth -function determines the number of column positions required for the first -.Fa n -characters of -.Fa pwcs , -or until a null wide character (L'\e0') is encountered. +.Fn rpmatch +function determines whether the +.Fa response +argument is an affirmative or negative response to a question +according to the current locale. .Sh RETURN VALUES The -.Fn wcswidth -function returns 0 if -.Fa pwcs -is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +.Fn rpmatch +functions returns: +.Bl -tag -width indent +.It 1 +The response is affirmative. +.It 0 +The response is negative. +.It \&-1 +The response is not recognized. +.El .Sh SEE ALSO -.Xr iswprint 3 , -.Xr wcwidth 3 -.Sh STANDARDS +.Xr nl_langinfo 3 , +.Xr setlocale 3 +.Sh HISTORY The -.Fn wcswidth -function conforms to -.St -p1003.1-2001 . +.Fn rpmatch +function appeared in +.Fx 6.0 . diff --git a/lib/libc/stdio/fwprintf.c b/lib/libc/locale/rpmatch.c similarity index 69% copy from lib/libc/stdio/fwprintf.c copy to lib/libc/locale/rpmatch.c index 479f9b3832..b00576fdfd 100644 --- a/lib/libc/stdio/fwprintf.c +++ b/lib/libc/locale/rpmatch.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Tim J. Robbins + * Copyright (c) 2004-2005 Tim J. Robbins. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,23 +23,33 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/fwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/fwprintf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/rpmatch.c 139922 2005-01-09 03:55:13Z tjr $ */ -#include -#include -#include + +#include +#include +#include int -fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) +rpmatch(const char *response) { + regex_t yes, no; int ret; - va_list ap; - - va_start(ap, fmt); - ret = vfwprintf(fp, fmt, ap); - va_end(ap); + if (regcomp(&yes, nl_langinfo(YESEXPR), REG_EXTENDED|REG_NOSUB) != 0) + return (-1); + if (regcomp(&no, nl_langinfo(NOEXPR), REG_EXTENDED|REG_NOSUB) != 0) { + regfree(&yes); + return (-1); + } + if (regexec(&yes, response, 0, NULL, 0) == 0) + ret = 1; + else if (regexec(&no, response, 0, NULL, 0) == 0) + ret = 0; + else + ret = -1; + regfree(&yes); + regfree(&no); return (ret); } diff --git a/lib/libc/locale/rune.c b/lib/libc/locale/rune.c index 50ec76bae6..8b278463a5 100644 --- a/lib/libc/locale/rune.c +++ b/lib/libc/locale/rune.c @@ -1,32 +1,3 @@ -/* $NetBSD: src/lib/libc/locale/rune.c,v 1.26 2004/05/09 11:26:33 kleink Exp $ */ -/* $DragonFly: src/lib/libc/locale/rune.c,v 1.6 2005/11/20 09:18:37 swildner Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -42,7 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -57,280 +28,257 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)rune.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/rune.c 165903 2007-01-09 00:28:16Z imp $ */ -#include -#include -#include + +#include "namespace.h" +#include #include +#include #include -#include #include -#include - -#include +#include +#include +#include +#include "un-namespace.h" -#include "../citrus/citrus_module.h" -#include "../citrus/citrus_ctype.h" -#include "rune.h" -#include "rune_local.h" +#include "runefile.h" -static int readrange(_RuneLocale *, _RuneRange *, _FileRuneRange *, - void *, FILE *); -static void _freeentry(_RuneRange *); -static void _wctype_init(_RuneLocale *rl); +_RuneLocale *_Read_RuneMagi(FILE *); -static int -readrange(_RuneLocale *rl, _RuneRange *rr, _FileRuneRange *frr, void *lastp, - FILE *fp) +_RuneLocale * +_Read_RuneMagi(FILE *fp) { - uint32_t i; - _RuneEntry *re; - _FileRuneEntry fre; - - _DIAGASSERT(rl != NULL); - _DIAGASSERT(rr != NULL); - _DIAGASSERT(frr != NULL); - _DIAGASSERT(lastp != NULL); - _DIAGASSERT(fp != NULL); - - re = (_RuneEntry *)rl->rl_variable; - - rr->rr_nranges = ntohl(frr->frr_nranges); - if (rr->rr_nranges == 0) { - rr->rr_rune_ranges = NULL; - return(0); + char *fdata, *data; + void *lastp; + _FileRuneLocale *frl; + _RuneLocale *rl; + _FileRuneEntry *frr; + _RuneEntry *rr; + struct stat sb; + int x, saverr; + void *variable; + _FileRuneEntry *runetype_ext_ranges; + _FileRuneEntry *maplower_ext_ranges; + _FileRuneEntry *mapupper_ext_ranges; + int runetype_ext_len = 0; + + if (_fstat(fileno(fp), &sb) < 0) + return (NULL); + + if ((size_t)sb.st_size < sizeof(_FileRuneLocale)) { + errno = EFTYPE; + return (NULL); } - rr->rr_rune_ranges = re; - for (i = 0; i < rr->rr_nranges; i++) { - if (fread(&fre, sizeof(fre), 1, fp) != 1) - return(-1); - - re->re_min = ntohl((uint32_t)fre.fre_min); - re->re_max = ntohl((uint32_t)fre.fre_max); - re->re_map = ntohl((uint32_t)fre.fre_map); - re++; + if ((fdata = malloc(sb.st_size)) == NULL) + return (NULL); - if ((void *)re > lastp) - return(-1); + errno = 0; + rewind(fp); /* Someone might have read the magic number once already */ + if (errno) { + saverr = errno; + free(fdata); + errno = saverr; + return (NULL); } - rl->rl_variable = re; - return(0); -} -static int -readentry(_RuneRange *rr, FILE *fp) -{ - _RuneEntry *re; - size_t l, i, j; - int error; - - _DIAGASSERT(rr != NULL); - _DIAGASSERT(fp != NULL); - - re = rr->rr_rune_ranges; - for (i = 0; i < rr->rr_nranges; i++) { - if (re[i].re_map != 0) { - re[i].re_rune_types = NULL; - continue; - } + if (fread(fdata, sb.st_size, 1, fp) != 1) { + saverr = errno; + free(fdata); + errno = saverr; + return (NULL); + } - l = re[i].re_max - re[i].re_min + 1; - re[i].re_rune_types = malloc(l * sizeof(_RuneType)); - if (!re[i].re_rune_types) { - error = ENOMEM; - goto fail; - } - memset(re[i].re_rune_types, 0, l * sizeof(_RuneType)); + frl = (_FileRuneLocale *)fdata; + lastp = fdata + sb.st_size; - if (fread(re[i].re_rune_types, sizeof(_RuneType), l, fp) != l) - goto fail2; + variable = frl + 1; - for (j = 0; j < l; j++) - re[i].re_rune_types[j] = ntohl(re[i].re_rune_types[j]); + if (memcmp(frl->magic, _FILE_RUNE_MAGIC_1, sizeof(frl->magic))) { + free(fdata); + errno = EFTYPE; + return (NULL); } - return(0); -fail: - for (j = 0; j < i; j++) { - free(re[j].re_rune_types); - re[j].re_rune_types = NULL; - } - return(error); + frl->variable_len = ntohl(frl->variable_len); + frl->runetype_ext_nranges = ntohl(frl->runetype_ext_nranges); + frl->maplower_ext_nranges = ntohl(frl->maplower_ext_nranges); + frl->mapupper_ext_nranges = ntohl(frl->mapupper_ext_nranges); -fail2: - for (j = 0; j <= i; j++) { - free(re[j].re_rune_types); - re[j].re_rune_types = NULL; + for (x = 0; x < _CACHED_RUNES; ++x) { + frl->runetype[x] = ntohl(frl->runetype[x]); + frl->maplower[x] = ntohl(frl->maplower[x]); + frl->mapupper[x] = ntohl(frl->mapupper[x]); } - return(errno); -} -/* XXX: temporary implementation */ -static void -find_codeset(_RuneLocale *rl) -{ - char *top, *codeset, *tail, *ep; - - /* end of rl_variable region */ - ep = (char *)rl->rl_variable; - ep += rl->rl_variable_len; - rl->rl_codeset = NULL; - if (!(top = strstr(rl->rl_variable, _RUNE_CODESET))) - return; - tail = strpbrk(top, " \t"); - codeset = top + sizeof(_RUNE_CODESET) - 1; - if (tail) { - *top = *tail; - *tail = '\0'; - rl->rl_codeset = strdup(codeset); - strlcpy(top + 1, tail + 1, (unsigned)(ep - (top + 1))); - } else { - *top = '\0'; - rl->rl_codeset = strdup(codeset); + runetype_ext_ranges = (_FileRuneEntry *)variable; + variable = runetype_ext_ranges + frl->runetype_ext_nranges; + if (variable > lastp) { + free(fdata); + errno = EFTYPE; + return (NULL); } -} - -static void -_freeentry(_RuneRange *rr) -{ - _RuneEntry *re; - uint32_t i; - _DIAGASSERT(rr != NULL); - - re = rr->rr_rune_ranges; - for (i = 0; i < rr->rr_nranges; i++) { - if (re[i].re_rune_types) - free(re[i].re_rune_types); - re[i].re_rune_types = NULL; + maplower_ext_ranges = (_FileRuneEntry *)variable; + variable = maplower_ext_ranges + frl->maplower_ext_nranges; + if (variable > lastp) { + free(fdata); + errno = EFTYPE; + return (NULL); } -} - -void -_wctype_init(_RuneLocale *rl) -{ - memcpy(&rl->rl_wctype, &_DefaultRuneLocale.rl_wctype, - sizeof(rl->rl_wctype)); -} - - -_RuneLocale * -_Read_RuneMagi(FILE *fp) -{ - /* file */ - _FileRuneLocale frl; - /* host data */ - char *hostdata; - size_t hostdatalen; - void *lastp; - _RuneLocale *rl; - struct stat sb; - int x; - _DIAGASSERT(fp != NULL); - - if (fstat(fileno(fp), &sb) < 0) - return(NULL); - - if (sb.st_size < sizeof(_FileRuneLocale)) - return(NULL); - /* XXX more validation? */ + mapupper_ext_ranges = (_FileRuneEntry *)variable; + variable = mapupper_ext_ranges + frl->mapupper_ext_nranges; + if (variable > lastp) { + free(fdata); + errno = EFTYPE; + return (NULL); + } - /* Someone might have read the magic number once already */ - rewind(fp); + frr = runetype_ext_ranges; + for (x = 0; x < frl->runetype_ext_nranges; ++x) { + uint32_t *types; + + frr[x].min = ntohl(frr[x].min); + frr[x].max = ntohl(frr[x].max); + frr[x].map = ntohl(frr[x].map); + if (frr[x].map == 0) { + int len = frr[x].max - frr[x].min + 1; + types = variable; + variable = types + len; + runetype_ext_len += len; + if (variable > lastp) { + free(fdata); + errno = EFTYPE; + return (NULL); + } + while (len-- > 0) + types[len] = ntohl(types[len]); + } + } - if (fread(&frl, sizeof(frl), 1, fp) != 1) - return(NULL); - if (memcmp(frl.frl_magic, _RUNE_MAGIC_1, sizeof(frl.frl_magic))) - return(NULL); + frr = maplower_ext_ranges; + for (x = 0; x < frl->maplower_ext_nranges; ++x) { + frr[x].min = ntohl(frr[x].min); + frr[x].max = ntohl(frr[x].max); + frr[x].map = ntohl(frr[x].map); + } - hostdatalen = sizeof(*rl) + ntohl((u_int32_t)frl.frl_variable_len) + - ntohl(frl.frl_runetype_ext.frr_nranges) * sizeof(_RuneEntry) + - ntohl(frl.frl_maplower_ext.frr_nranges) * sizeof(_RuneEntry) + - ntohl(frl.frl_mapupper_ext.frr_nranges) * sizeof(_RuneEntry); + frr = mapupper_ext_ranges; + for (x = 0; x < frl->mapupper_ext_nranges; ++x) { + frr[x].min = ntohl(frr[x].min); + frr[x].max = ntohl(frr[x].max); + frr[x].map = ntohl(frr[x].map); + } + if ((char *)variable + frl->variable_len > (char *)lastp) { + free(fdata); + errno = EFTYPE; + return (NULL); + } - if ((hostdata = malloc(hostdatalen)) == NULL) - return(NULL); - memset(hostdata, 0, hostdatalen); - lastp = hostdata + hostdatalen; + /* + * Convert from disk format to host format. + */ + data = malloc(sizeof(_RuneLocale) + + (frl->runetype_ext_nranges + frl->maplower_ext_nranges + + frl->mapupper_ext_nranges) * sizeof(_RuneEntry) + + runetype_ext_len * sizeof(*rr->__types) + + frl->variable_len); + if (data == NULL) { + saverr = errno; + free(fdata); + errno = saverr; + return (NULL); + } - rl = (_RuneLocale *)(void *)hostdata; - rl->rl_variable = rl + 1; + rl = (_RuneLocale *)data; + rl->__variable = rl + 1; - memcpy(rl->rl_magic, frl.frl_magic, sizeof(rl->rl_magic)); - memcpy(rl->rl_encoding, frl.frl_encoding, sizeof(rl->rl_encoding)); + memcpy(rl->__magic, _RUNE_MAGIC_1, sizeof(rl->__magic)); + memcpy(rl->__encoding, frl->encoding, sizeof(rl->__encoding)); + rl->__invalid_rune = 0; - rl->rl_invalid_rune = ntohl((u_int32_t)frl.frl_invalid_rune); - rl->rl_variable_len = ntohl((u_int32_t)frl.frl_variable_len); + rl->__variable_len = frl->variable_len; + rl->__runetype_ext.__nranges = frl->runetype_ext_nranges; + rl->__maplower_ext.__nranges = frl->maplower_ext_nranges; + rl->__mapupper_ext.__nranges = frl->mapupper_ext_nranges; for (x = 0; x < _CACHED_RUNES; ++x) { - rl->rl_runetype[x] = ntohl(frl.frl_runetype[x]); - - /* XXX assumes rune_t = u_int32_t */ - rl->rl_maplower[x] = ntohl((uint32_t)frl.frl_maplower[x]); - rl->rl_mapupper[x] = ntohl((uint32_t)frl.frl_mapupper[x]); + rl->__runetype[x] = frl->runetype[x]; + rl->__maplower[x] = frl->maplower[x]; + rl->__mapupper[x] = frl->mapupper[x]; } - if (readrange(rl, &rl->rl_runetype_ext, &frl.frl_runetype_ext, - lastp, fp)) { - free(hostdata); - return(NULL); - } - if (readrange(rl, &rl->rl_maplower_ext, &frl.frl_maplower_ext, - lastp, fp)) { - free(hostdata); - return(NULL); - } - if (readrange(rl, &rl->rl_mapupper_ext, &frl.frl_mapupper_ext, - lastp, fp)) { - free(hostdata); - return(NULL); + rl->__runetype_ext.__ranges = (_RuneEntry *)rl->__variable; + rl->__variable = rl->__runetype_ext.__ranges + + rl->__runetype_ext.__nranges; + + rl->__maplower_ext.__ranges = (_RuneEntry *)rl->__variable; + rl->__variable = rl->__maplower_ext.__ranges + + rl->__maplower_ext.__nranges; + + rl->__mapupper_ext.__ranges = (_RuneEntry *)rl->__variable; + rl->__variable = rl->__mapupper_ext.__ranges + + rl->__mapupper_ext.__nranges; + + variable = mapupper_ext_ranges + frl->mapupper_ext_nranges; + frr = runetype_ext_ranges; + rr = rl->__runetype_ext.__ranges; + for (x = 0; x < rl->__runetype_ext.__nranges; ++x) { + uint32_t *types; + + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; + if (rr[x].__map == 0) { + int len = rr[x].__max - rr[x].__min + 1; + types = variable; + variable = types + len; + rr[x].__types = rl->__variable; + rl->__variable = rr[x].__types + len; + while (len-- > 0) + rr[x].__types[len] = types[len]; + } else + rr[x].__types = NULL; } - if (readentry(&rl->rl_runetype_ext, fp) != 0) { - free(hostdata); - return(NULL); + frr = maplower_ext_ranges; + rr = rl->__maplower_ext.__ranges; + for (x = 0; x < rl->__maplower_ext.__nranges; ++x) { + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; } - if ((uint8_t *)rl->rl_variable + rl->rl_variable_len > - (uint8_t *)lastp) { - _freeentry(&rl->rl_runetype_ext); - free(hostdata); - return(NULL); - } - if (rl->rl_variable_len == 0) - rl->rl_variable = NULL; - else if (fread(rl->rl_variable, rl->rl_variable_len, 1, fp) != 1) { - _freeentry(&rl->rl_runetype_ext); - free(hostdata); - return(NULL); - } - find_codeset(rl); - _wctype_init(rl); - - /* error if we have junk at the tail */ - if (ftell(fp) != sb.st_size) { - _freeentry(&rl->rl_runetype_ext); - free(hostdata); - return(NULL); + frr = mapupper_ext_ranges; + rr = rl->__mapupper_ext.__ranges; + for (x = 0; x < rl->__mapupper_ext.__nranges; ++x) { + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; } - return(rl); -} + memcpy(rl->__variable, variable, rl->__variable_len); + free(fdata); -void -_NukeRune(_RuneLocale *rl) -{ - _DIAGASSERT(rl != NULL); - - if (rl != &_DefaultRuneLocale) { - _freeentry(&rl->rl_runetype_ext); - if (rl->rl_codeset != NULL) - free(rl->rl_codeset); - if (rl->rl_citrus_ctype) - _citrus_ctype_close(rl->rl_citrus_ctype); - free(rl); - } + /* + * Go out and zero pointers that should be zero. + */ + if (!rl->__variable_len) + rl->__variable = NULL; + + if (!rl->__runetype_ext.__nranges) + rl->__runetype_ext.__ranges = NULL; + + if (!rl->__maplower_ext.__nranges) + rl->__maplower_ext.__ranges = NULL; + + if (!rl->__mapupper_ext.__nranges) + rl->__mapupper_ext.__ranges = NULL; + + return (rl); } diff --git a/lib/libc/locale/rune.h b/lib/libc/locale/rune.h deleted file mode 100644 index c101e1847d..0000000000 --- a/lib/libc/locale/rune.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/rune.h,v 1.9 2003/08/07 16:43:04 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/rune.h,v 1.1 2005/04/21 16:36:34 joerg Exp $ */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)rune.h 8.1 (Berkeley) 6/27/93 - */ - -#ifndef _RUNE_H_ -#define _RUNE_H_ - -#include -#include -#include "runetype.h" - -/* - * map _RTYPE_x to _CTYPE_x - * - * XXX: these should be defined in ctype.h and used in isxxx macros. - * (note: current isxxx macros use "old" NetBSD masks and - * _CTYPE_x are not public.) - */ -#define _CTYPE_A _RUNETYPE_A -#define _CTYPE_C _RUNETYPE_C -#define _CTYPE_D _RUNETYPE_D -#define _CTYPE_G _RUNETYPE_G -#define _CTYPE_L _RUNETYPE_L -#define _CTYPE_P _RUNETYPE_P -#define _CTYPE_S _RUNETYPE_S -#define _CTYPE_U _RUNETYPE_U -#define _CTYPE_X _RUNETYPE_X -#define _CTYPE_B _RUNETYPE_B -#define _CTYPE_R _RUNETYPE_R -#define _CTYPE_I _RUNETYPE_I -#define _CTYPE_T _RUNETYPE_T -#define _CTYPE_Q _RUNETYPE_Q -#define _CTYPE_SWM _RUNETYPE_SWM -#define _CTYPE_SWS _RUNETYPE_SWS -#define _CTYPE_SW0 _RUNETYPE_SW0 -#define _CTYPE_SW1 _RUNETYPE_SW1 -#define _CTYPE_SW2 _RUNETYPE_SW2 -#define _CTYPE_SW3 _RUNETYPE_SW3 - -/* - * Other namespace conversion. - */ - -#define rune_t __nbrune_t -#define _RUNE_ISCACHED _NB_RUNE_ISCACHED -#define _CACHED_RUNES _NB_CACHED_RUNES -#define _DEFAULT_INVALID_RUNE _NB_DEFAULT_INVALID_RUNE -#define _RuneEntry _NBRuneEntry -#define _RuneRange _NBRuneRange -#define _RuneLocale _NBRuneLocale -#define _RUNE_MAGIC_1 _NB_RUNE_MAGIC_1 -#define _RUNE_MODULE_1 _NB_RUNE_MODULE_1 -#define _RUNE_CODESET _NB_RUNE_CODESET - -/* - * global variables - */ -extern size_t __mb_len_max_runtime; -#define __MB_LEN_MAX_RUNTIME __mb_len_max_runtime - -extern _RuneLocale _DefaultRuneLocale; -extern _RuneLocale *_CurrentRuneLocale; -extern const char *_PathLocale; - -#endif /*! _RUNE_H_ */ diff --git a/lib/libc/string/wcsrchr.c b/lib/libc/locale/runefile.h similarity index 66% copy from lib/libc/string/wcsrchr.c copy to lib/libc/locale/runefile.h index 741a018257..519b22f222 100644 --- a/lib/libc/string/wcsrchr.c +++ b/lib/libc/locale/runefile.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Tim J. Robbins + * Copyright (c) 2005 Ruslan Ermilov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,26 +23,39 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsrchr.c,v 1.7 2002/10/23 10:52:04 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsrchr.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/runefile.h 146261 2005-05-16 09:32:41Z ru $ */ +#ifndef _RUNEFILE_H_ +#define _RUNEFILE_H_ + #include -#include - -wchar_t * -wcsrchr(const wchar_t *s, wchar_t c) -{ - const wchar_t *last; - - last = NULL; - for (;;) { - if (*s == c) - last = s; - if (*s == L'\0') - break; - s++; - } - - return (__DECONST(wchar_t *, last)); -} + +#ifndef _CACHED_RUNES +#define _CACHED_RUNES (1 << 8) +#endif + +typedef struct { + int32_t min; + int32_t max; + int32_t map; +} _FileRuneEntry; + +typedef struct { + char magic[8]; + char encoding[32]; + + uint32_t runetype[_CACHED_RUNES]; + int32_t maplower[_CACHED_RUNES]; + int32_t mapupper[_CACHED_RUNES]; + + int32_t runetype_ext_nranges; + int32_t maplower_ext_nranges; + int32_t mapupper_ext_nranges; + + int32_t variable_len; +} _FileRuneLocale; + +#define _FILE_RUNE_MAGIC_1 "RuneMag1" + +#endif /* !_RUNEFILE_H_ */ diff --git a/lib/libc/locale/runeglue.c b/lib/libc/locale/runeglue.c deleted file mode 100644 index 7dd75c03b0..0000000000 --- a/lib/libc/locale/runeglue.c +++ /dev/null @@ -1,142 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/runeglue.c,v 1.10 2003/03/10 21:18:49 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/locale/runeglue.c,v 1.3 2005/09/17 14:39:44 joerg Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Id: runeglue.c,v 1.7 2000/12/22 22:52:29 itojun Exp - */ - -/* - * Glue code to hide "rune" facility from user programs. - * This is important to keep backward/future compatibility. - */ - -#define _CTYPE_PRIVATE - -#include -#include -#include -#include -#include -#include -#include -#include -#include "rune.h" -#include "rune_local.h" - -#if EOF != -1 -#error "EOF != -1" -#endif -#if _CACHED_RUNES != 256 -#error "_CACHED_RUNES != 256" -#endif - -int -__runetable_to_netbsd_ctype(const char *locale) -{ - int i; - uint16_t *new_ctype; - int16_t *new_toupper, *new_tolower; - - _DIAGASSERT(locale != NULL); - - /* set to C locale, to ease failure case handling */ - if (__libc_ctype_ != __libc_C_ctype_) { - /* LINTED const castaway */ - free(__DECONST(void *, __libc_ctype_)); - __libc_ctype_ = __libc_C_ctype_; - } - if (__libc_toupper_tab_ != __libc_C_toupper_) { - /* LINTED const castaway */ - free(__DECONST(void *, __libc_toupper_tab_)); - __libc_toupper_tab_ = __libc_C_toupper_; - } - if (__libc_tolower_tab_ != __libc_C_tolower_) { - /* LINTED const castaway */ - free(__DECONST(void *, __libc_tolower_tab_)); - __libc_tolower_tab_ = __libc_C_tolower_; - } - - if (strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) - return(0); - - new_ctype = malloc(sizeof(*new_ctype) * (1 + _CTYPE_NUM_CHARS)); - if (new_ctype == NULL) - return(-1); - new_toupper = malloc(sizeof(*new_toupper) * (1 + 256)); - if (new_toupper == NULL) { - free(new_ctype); - return(-1); - } - new_tolower = malloc(sizeof(*new_tolower) * (1 + 256)); - if (new_tolower == NULL) { - free(new_ctype); - free(new_toupper); - return(-1); - } - - memset(new_ctype, 0, sizeof(*new_ctype) * (1 + _CTYPE_NUM_CHARS)); - memset(new_toupper, 0, sizeof(*new_toupper) * (1 + 256)); - memset(new_tolower, 0, sizeof(*new_tolower) * (1 + 256)); - - new_ctype[0] = 0; - new_toupper[0] = EOF; - new_tolower[0] = EOF; - for (i = 0; i < _CTYPE_NUM_CHARS; i++) { - new_ctype[i + 1] = 0; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_U) - new_ctype[i + 1] |= _CTYPEMASK_U; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_L) - new_ctype[i + 1] |= _CTYPEMASK_L; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_D) - new_ctype[i + 1] |= _CTYPEMASK_D; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_S) - new_ctype[i + 1] |= _CTYPEMASK_S; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_P) - new_ctype[i + 1] |= _CTYPEMASK_P; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_C) - new_ctype[i + 1] |= _CTYPEMASK_C; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_X) - new_ctype[i + 1] |= _CTYPEMASK_X; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_B) - new_ctype[i + 1] |= _CTYPEMASK_B; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_A) - new_ctype[i + 1] |= _CTYPEMASK_A; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_G) - new_ctype[i + 1] |= _CTYPEMASK_G; - if (_CurrentRuneLocale->rl_runetype[i] & _CTYPE_R) - new_ctype[i + 1] |= _CTYPEMASK_R; - - new_toupper[i + 1] = (int16_t)_CurrentRuneLocale->rl_mapupper[i]; - new_tolower[i + 1] = (int16_t)_CurrentRuneLocale->rl_maplower[i]; - } - - __libc_ctype_ = new_ctype; - __libc_toupper_tab_ = new_toupper; - __libc_tolower_tab_ = new_tolower; - - return(0); -} diff --git a/lib/libc/locale/runetable.c b/lib/libc/locale/runetable.c deleted file mode 100644 index 7f7db56955..0000000000 --- a/lib/libc/locale/runetable.c +++ /dev/null @@ -1,275 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/runetable.c,v 1.12 2003/08/07 16:43:04 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/runetable.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/lib/libc/locale/table.c,v 1.13 2000/02/08 07:43:25 obrien Exp $ - */ - -#include -#include -#include -#include -#include -#include -#include "../citrus/citrus_module.h" -#include "../citrus/citrus_ctype.h" -#include "rune.h" -#include "rune_local.h" - -_RuneLocale _DefaultRuneLocale = { - _RUNE_MAGIC_1, - "NONE", - _DEFAULT_INVALID_RUNE, - - { /*00*/ _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - /*08*/ _CTYPE_C, - _CTYPE_C|_CTYPE_S|_CTYPE_B, - _CTYPE_C|_CTYPE_S, - _CTYPE_C|_CTYPE_S, - _CTYPE_C|_CTYPE_S, - _CTYPE_C|_CTYPE_S, - _CTYPE_C, - _CTYPE_C, - /*10*/ _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - /*18*/ _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - _CTYPE_C, - /*20*/ _CTYPE_S|_CTYPE_B|_CTYPE_R|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - /*28*/ _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - /*30*/ _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|0, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|1, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|2, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|3, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|4, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|5, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|6, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|7, - /*38*/ _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|8, - _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|_CTYPE_SW1|9, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - /*40*/ _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|10, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|11, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|12, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|13, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|14, - _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|15, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*48*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*50*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*58*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - /*60*/ _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|10, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|11, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|12, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|13, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|14, - _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1|15, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*68*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*70*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - /*78*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_P|_CTYPE_R|_CTYPE_G|_CTYPE_SW1, - _CTYPE_C, - }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - { 0, NULL }, - { 0, NULL }, - { 0, NULL }, - NULL, 0, - "US-ASCII", - &_citrus_ctype_default, - { - { NULL, NULL, NULL }, - { NULL, NULL, NULL }, - }, - { - { "alnum", _CTYPE_A|_CTYPE_D }, - { "alpha", _CTYPE_A }, - { "blank", _CTYPE_B }, - { "cntrl", _CTYPE_C }, - { "digit", _CTYPE_D }, - { "graph", _CTYPE_G }, - { "lower", _CTYPE_L }, - { "print", _CTYPE_R }, - { "punct", _CTYPE_P }, - { "space", _CTYPE_S }, - { "upper", _CTYPE_U }, - { "xdigit", _CTYPE_X }, - } -}; - -_RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale; diff --git a/lib/libc/locale/___runetype_mb.c b/lib/libc/locale/runetype.c similarity index 56% copy from lib/libc/locale/___runetype_mb.c copy to lib/libc/locale/runetype.c index ab95d3cfd6..5e8fef603e 100644 --- a/lib/libc/locale/___runetype_mb.c +++ b/lib/libc/locale/runetype.c @@ -1,6 +1,3 @@ -/* $NetBSD: src/lib/libc/locale/___runetype_mb.c,v 1.9 2003/08/07 16:43:03 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/___runetype_mb.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -8,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,32 +33,57 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/runetype.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include "rune.h" -#include "rune_local.h" -_RuneType -___runetype_mb(wint_t c) +#include +#include +#include +#include +#include "mblocal.h" + +unsigned long +___runetype_l(__ct_rune_t c, locale_t locale) { - uint32_t x; - _RuneRange *rr = &_CurrentRuneLocale->rl_runetype_ext; - _RuneEntry *re = rr->rr_rune_ranges; + size_t lim; + FIX_LOCALE(locale); + _RuneRange *rr = &(XLOCALE_CTYPE(locale)->runes->__runetype_ext); + _RuneEntry *base, *re; - if (c == WEOF) - return(0U); + if (c < 0 || c == EOF) + return(0L); - for (x = 0; x < rr->rr_nranges; ++x, ++re) { - /* XXX assumes wchar_t = int */ - if ((__nbrune_t)c < re->re_min) - return(0U); - if ((__nbrune_t)c <= re->re_max) { - if (re->re_rune_types) - return(re->re_rune_types[(__nbrune_t)c - re->re_min]); + /* Binary search -- see bsearch.c for explanation. */ + base = rr->__ranges; + for (lim = rr->__nranges; lim != 0; lim >>= 1) { + re = base + (lim >> 1); + if (re->__min <= c && c <= re->__max) { + if (re->__types) + return(re->__types[c - re->__min]); else - return(re->re_map); + return(re->__map); + } else if (c > re->__max) { + base = re + 1; + lim--; } } - return(0U); + + return(0L); +} +unsigned long +___runetype(__ct_rune_t c) +{ + return ___runetype_l(c, __get_locale()); +} + +int ___mb_cur_max(void) +{ + return XLOCALE_CTYPE(__get_locale())->__mb_cur_max; +} +int ___mb_cur_max_l(locale_t locale) +{ + FIX_LOCALE(locale); + return XLOCALE_CTYPE(locale)->__mb_cur_max; } diff --git a/lib/libc/locale/runetype.h b/lib/libc/locale/runetype.h deleted file mode 100644 index 9019fd9eda..0000000000 --- a/lib/libc/locale/runetype.h +++ /dev/null @@ -1,221 +0,0 @@ -/* $NetBSD: src/lib/libc/locale/runetype.h,v 1.18 2003/08/07 16:43:04 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/runetype.h,v 1.1 2005/04/21 16:36:34 joerg Exp $ */ - -/*- - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)runetype.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _NB_RUNETYPE_H_ -#define _NB_RUNETYPE_H_ - -#include - -#ifndef UINT32_C -/* assumes sizeof(unsigned int)>=4 */ -#define UINT32_C(c) ((uint32_t)(c##U)) -#endif - -typedef uint32_t __nbrune_t; -typedef uint64_t __runepad_t; - -#define _NB_CACHED_RUNES (1 << 8) /* Must be a power of 2 */ -#define _NB_RUNE_ISCACHED(c) ((c) >= 0 && (c) < _CACHED_RUNES) - -#define _NB_DEFAULT_INVALID_RUNE ((__nbrune_t)(-3)) - -/* - * The lower 8 bits of runetype[] contain the digit value of the rune. - */ -typedef uint32_t _RuneType; -#define _RUNETYPE_A UINT32_C(0x00000100) /* Alpha */ -#define _RUNETYPE_C UINT32_C(0x00000200) /* Control */ -#define _RUNETYPE_D UINT32_C(0x00000400) /* Digit */ -#define _RUNETYPE_G UINT32_C(0x00000800) /* Graph */ -#define _RUNETYPE_L UINT32_C(0x00001000) /* Lower */ -#define _RUNETYPE_P UINT32_C(0x00002000) /* Punct */ -#define _RUNETYPE_S UINT32_C(0x00004000) /* Space */ -#define _RUNETYPE_U UINT32_C(0x00008000) /* Upper */ -#define _RUNETYPE_X UINT32_C(0x00010000) /* X digit */ -#define _RUNETYPE_B UINT32_C(0x00020000) /* Blank */ -#define _RUNETYPE_R UINT32_C(0x00040000) /* Print */ -#define _RUNETYPE_I UINT32_C(0x00080000) /* Ideogram */ -#define _RUNETYPE_T UINT32_C(0x00100000) /* Special */ -#define _RUNETYPE_Q UINT32_C(0x00200000) /* Phonogram */ -#define _RUNETYPE_SWM UINT32_C(0xc0000000)/* Mask to get screen width data */ -#define _RUNETYPE_SWS 30 /* Bits to shift to get width */ -#define _RUNETYPE_SW0 UINT32_C(0x00000000) /* 0 width character */ -#define _RUNETYPE_SW1 UINT32_C(0x40000000) /* 1 width character */ -#define _RUNETYPE_SW2 UINT32_C(0x80000000) /* 2 width character */ -#define _RUNETYPE_SW3 UINT32_C(0xc0000000) /* 3 width character */ - - -/* - * rune file format. network endian. - */ -typedef struct { - int32_t fre_min; /* First rune of the range */ - int32_t fre_max; /* Last rune (inclusive) of the range */ - int32_t fre_map; /* What first maps to in maps */ - uint32_t fre_pad1; /* backward compatibility */ - __runepad_t fre_pad2; /* backward compatibility */ -} __packed _FileRuneEntry; - - -typedef struct { - uint32_t frr_nranges; /* Number of ranges stored */ - uint32_t frr_pad1; /* backward compatibility */ - __runepad_t frr_pad2; /* backward compatibility */ -} __packed _FileRuneRange; - - -typedef struct { - char frl_magic[8]; /* Magic saying what version we are */ - char frl_encoding[32];/* ASCII name of this encoding */ - - __runepad_t frl_pad1; /* backward compatibility */ - __runepad_t frl_pad2; /* backward compatibility */ - int32_t frl_invalid_rune; - uint32_t frl_pad3; /* backward compatibility */ - - _RuneType frl_runetype[_NB_CACHED_RUNES]; - int32_t frl_maplower[_NB_CACHED_RUNES]; - int32_t frl_mapupper[_NB_CACHED_RUNES]; - - /* - * The following are to deal with Runes larger than _CACHED_RUNES - 1. - * Their data is actually contiguous with this structure so as to make - * it easier to read/write from/to disk. - */ - _FileRuneRange frl_runetype_ext; - _FileRuneRange frl_maplower_ext; - _FileRuneRange frl_mapupper_ext; - - __runepad_t frl_pad4; /* backward compatibility */ - int32_t frl_variable_len;/* how long that data is */ - uint32_t frl_pad5; /* backward compatibility */ - - /* variable size data follows */ -} __packed _FileRuneLocale; - - -/* - * expanded rune locale declaration. local to the host. host endian. - */ -typedef struct { - __nbrune_t re_min; /* First rune of the range */ - __nbrune_t re_max; /* Last rune (inclusive) of the range */ - __nbrune_t re_map; /* What first maps to in maps */ - _RuneType *re_rune_types; /* Array of types in range */ -} _NBRuneEntry; - - -typedef struct { - uint32_t rr_nranges; /* Number of ranges stored */ - _NBRuneEntry *rr_rune_ranges; -} _NBRuneRange; - - -/* - * wctrans stuffs. - */ -typedef struct _WCTransEntry { - const char *te_name; - __nbrune_t *te_cached; - _NBRuneRange *te_extmap; -} _WCTransEntry; -#define _WCTRANS_INDEX_LOWER 0 -#define _WCTRANS_INDEX_UPPER 1 -#define _WCTRANS_NINDEXES 2 - -/* - * wctype stuffs. - */ -typedef struct _WCTypeEntry { - const char *te_name; - _RuneType te_mask; -} _WCTypeEntry; -#define _WCTYPE_INDEX_ALNUM 0 -#define _WCTYPE_INDEX_ALPHA 1 -#define _WCTYPE_INDEX_BLANK 2 -#define _WCTYPE_INDEX_CNTRL 3 -#define _WCTYPE_INDEX_DIGIT 4 -#define _WCTYPE_INDEX_GRAPH 5 -#define _WCTYPE_INDEX_LOWER 6 -#define _WCTYPE_INDEX_PRINT 7 -#define _WCTYPE_INDEX_PUNCT 8 -#define _WCTYPE_INDEX_SPACE 9 -#define _WCTYPE_INDEX_UPPER 10 -#define _WCTYPE_INDEX_XDIGIT 11 -#define _WCTYPE_NINDEXES 12 - -/* - * ctype stuffs - */ - -typedef struct _NBRuneLocale { - /* - * copied from _FileRuneLocale - */ - char rl_magic[8]; /* Magic saying what version we are */ - char rl_encoding[32];/* ASCII name of this encoding */ - __nbrune_t rl_invalid_rune; - _RuneType rl_runetype[_NB_CACHED_RUNES]; - __nbrune_t rl_maplower[_NB_CACHED_RUNES]; - __nbrune_t rl_mapupper[_NB_CACHED_RUNES]; - _NBRuneRange rl_runetype_ext; - _NBRuneRange rl_maplower_ext; - _NBRuneRange rl_mapupper_ext; - - void *rl_variable; - size_t rl_variable_len; - - /* - * the following portion is generated on the fly - */ - char *rl_codeset; - struct _citrus_ctype_rec *rl_citrus_ctype; - _WCTransEntry rl_wctrans[_WCTRANS_NINDEXES]; - _WCTypeEntry rl_wctype[_WCTYPE_NINDEXES]; -} _NBRuneLocale; - - -/* magic number for LC_CTYPE (rune)locale declaration */ -#define _NB_RUNE_MAGIC_1 "RuneCT10" /* Indicates version 0 of RuneLocale */ - -/* magic string for dynamic link module - type should be like "LC_CTYPE" */ -#define _NB_RUNE_MODULE_1(type) "RuneModule10." type - -/* codeset tag */ -#define _NB_RUNE_CODESET "CODESET=" - -#endif /* !_NB_RUNETYPE_H_ */ diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3 index 89dfd13fac..af45cfdb04 100644 --- a/lib/libc/locale/setlocale.3 +++ b/lib/libc/locale/setlocale.3 @@ -1,5 +1,3 @@ -.\" $NetBSD: src/lib/libc/locale/setlocale.3,v 1.21 2004/01/24 16:58:54 wiz Exp $ -.\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -14,7 +12,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -31,13 +29,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)setlocale.3 8.1 (Berkeley) 6/9/93 +.\" $FreeBSD: head/lib/libc/locale/setlocale.3 213573 2010-10-08 12:40:16Z uqs $ .\" -.Dd May 30, 2003 +.Dd November 21, 2003 .Dt SETLOCALE 3 .Os .Sh NAME -.Nm setlocale , -.Nm localeconv +.Nm setlocale .Nd natural language formatting for C .Sh LIBRARY .Lb libc @@ -45,8 +43,6 @@ .In locale.h .Ft char * .Fn setlocale "int category" "const char *locale" -.Ft struct lconv * -.Fn localeconv "void" .Sh DESCRIPTION The .Fn setlocale @@ -56,10 +52,6 @@ for particular sets of routines. Each such style is called a .Sq locale and is invoked using an appropriate name passed as a C string. -The -.Fn localeconv -routine returns the current locale's parameters -for formatting numbers. .Pp The .Fn setlocale @@ -77,20 +69,16 @@ and .It Dv LC_CTYPE Set a locale for the .Xr ctype 3 +and +.Xr multibyte 3 functions. This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on. -The real work is done by the -.Fn _xpg4_setrunelocale -function. .It Dv LC_MESSAGES -Set a locale for message catalogs. -This controls the selection of message catalogs by the -.Xr catgets 3 -and -.Xr gettext 3 -families of functions. +Set a locale for message catalogs, see +.Xr catopen 3 +function. .It Dv LC_MONETARY Set a locale for formatting monetary values; this affects the @@ -114,11 +102,11 @@ function. .Pp Only three locales are defined by default, the empty string -.Li "\&""\|"" +.Li \&"\|" which denotes the native environment, and the -.Li "\&""C"" +.Li \&"C" and -.Li "\&""POSIX"" +.Li \&"POSIX" locales, which denote the C language environment. A .Fa locale @@ -128,178 +116,18 @@ causes .Fn setlocale to return the current locale. By default, C programs start in the -.Li "\&""C"" +.Li \&"C" locale. -The format of the locale string is described in -.Xr nls 7 . -.Pp The only function in the library that sets the locale is .Fn setlocale ; the locale is never changed as a side effect of some other routine. -.Pp -Changing the setting of -.Dv LC_MESSAGES -has no effect on catalogs that have already been opened by -.Xr catopen 3 . -.Pp -The -.Fn localeconv -function returns a pointer to a structure -which provides parameters for formatting numbers, -especially currency values: -.Bd -literal -offset indent -struct lconv { - char *decimal_point; - char *thousands_sep; - char *grouping; - char *int_curr_symbol; - char *currency_symbol; - char *mon_decimal_point; - char *mon_thousands_sep; - char *mon_grouping; - char *positive_sign; - char *negative_sign; - char int_frac_digits; - char frac_digits; - char p_cs_precedes; - char p_sep_by_space; - char n_cs_precedes; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -}; -.Ed -.Pp -The individual fields have the following meanings: -.Bl -tag -width int_p_sep_by_space -.It Fa decimal_point -The decimal point character, except for monetary values. -.It Fa thousands_sep -The separator between groups of digits -before the decimal point, except for monetary values. -.It Fa grouping -The sizes of the groups of digits, except for monetary values. -This is a pointer to a vector of integers, each of size -.Va char , -representing group size from low order digit groups -to high order (right to left). -The list may be terminated with 0 or -.Dv CHAR_MAX . -If the list is terminated with 0, -the last group size before the 0 is repeated to account for all the digits. -If the list is terminated with -.Dv CHAR_MAX , -no more grouping is performed. -.It Fa int_curr_symbol -The standardized (ISO 4217:1995) international currency symbol. -.It Fa currency_symbol -The local currency symbol. -.It Fa mon_decimal_point -The decimal point character for monetary values. -.It Fa mon_thousands_sep -The separator for digit groups in monetary values. -.It Fa mon_grouping -Like -.Fa grouping -but for monetary values. -.It Fa positive_sign -The character used to denote nonnegative monetary values, -usually the empty string. -.It Fa negative_sign -The character used to denote negative monetary values, -usually a minus sign. -.It Fa int_frac_digits -The number of digits after the decimal point -in an internationally formatted monetary value. -.It Fa frac_digits -The number of digits after the decimal point -in an locally formatted monetary value. -.It Fa p_cs_precedes -1 if the currency symbol precedes the monetary value -for nonnegative values, 0 if it follows. -.It Fa p_sep_by_space -1 if a space is inserted between the currency symbol -and the monetary value for nonnegative values, 0 otherwise. -.It Fa n_cs_precedes -Like -.Fa p_cs_precedes -but for negative values. -.It Fa n_sep_by_space -Like -.Fa p_sep_by_space -but for negative values. -.It Fa p_sign_posn -The location of the -.Fa positive_sign -with respect to a nonnegative quantity and the -.Fa currency_symbol . -.It Fa n_sign_posn -Like -.Fa p_sign_posn -but for negative currency values. -.It Fa int_p_cs_precedes -1 if the currency symbol precedes the internationally -formatted monetary value for nonnegative values, 0 if it follows. -.It Fa int_n_cs_precedes -Like -.Fa int_p_cs_precedes -but for negative values. -.It Fa int_p_sep_by_space -1 if a space is inserted between the currency symbol -and the internationally formatted monetary value for -nonnegative values, 0 otherwise. -.It Fa int_n_sep_by_space -Like -.Fa int_p_sep_by_space -but for negative values. -.It Fa int_p_sign_posn -The location of the -.Fa positive_sign -with respect to a nonnegative quantity and the -.Fa currency_symbol , -for internationally formatted nonnegative monetary values. -.It Fa int_n_sign_posn -Like -.Fa int_p_sign_posn -but for negative values. -.El -.Pp -The positional parameters in -.Fa p_sign_posn , -.Fa n_sign_posn , -.Fa int_p_sign_posn -and -.Fa int_n_sign_posn -are encoded as follows: -.Bl -tag -width 3n -compact -.It Li 0 -Parentheses around the entire string. -.It Li 1 -Before the string. -.It Li 2 -After the string. -.It Li 3 -Just before -.Fa currency_symbol . -.It Li 4 -Just after -.Fa currency_symbol . -.El -.Pp -Unless mentioned above, -an empty string as a value for a field -indicates a zero length result or -a value that is not in the current locale. -A -.Dv CHAR_MAX -result similarly denotes an unavailable value. .Sh RETURN VALUES +Upon successful completion, +.Fn setlocale +returns the string associated with the specified +.Fa category +for the requested +.Fa locale . The .Fn setlocale function returns @@ -310,99 +138,36 @@ if the given combination of and .Fa locale makes no sense. -The -.Fn localeconv -function returns a pointer to a static object -which may be altered by later calls to -.Fn setlocale -or -.Fn localeconv . -.Sh EXAMPLES -The following code illustrates how a program can initialize the -international environment for one language, while selectively -modifying the program's locale such that regular expressions and -string operations can be applied to text recorded in a different -language: -.Bd -literal - setlocale(LC_ALL, "de"); - setlocale(LC_COLLATE, "fr"); -.Ed -.Pp -When a process is started, its current locale is set to the C or POSIX -locale. -An internationalized program that depends on locale data not defined in -the C or POSIX locale must invoke the setlocale subroutine in the -following manner before using any of the locale-specific information: -.Bd -literal - setlocale(LC_ALL, ""); -.Ed -.\" .Sh FILES XXX -.\" .Bl -tag -width /usr/share/locale/locale/category -compact XXX -.\" .It Pa $PATH_LOCALE/\fIlocale\fP/\fIcategory\fP XXX -.\" .It Pa /usr/share/locale/\fIlocale\fP/\fIcategory\fP XXX -.\" locale file for the locale \fIlocale\fP XXX -.\" and the category \fIcategory\fP. XXX -.\" .El +.Sh FILES +.Bl -tag -width /usr/share/locale/locale/category -compact +.It Pa $PATH_LOCALE/ Ns Em locale/category +.It Pa /usr/share/locale/ Ns Em locale/category +locale file for the locale +.Em locale +and the category +.Em category . +.El +.Sh ERRORS +No errors are defined. .Sh SEE ALSO +.Xr colldef 1 , +.Xr mklocale 1 , .Xr catopen 3 , -.Xr gettext 3 Pq Pa devel/gettext , -.Xr nl_langinfo 3 , -.Xr strfmon 3 , -.Xr nls 7 -.\" .Xr strcoll 3 , XXX -.\" .Xr strxfrm 3 XXX +.Xr ctype 3 , +.Xr localeconv 3 , +.Xr multibyte 3 , +.Xr strcoll 3 , +.Xr strxfrm 3 , +.Xr euc 5 , +.Xr utf8 5 , +.Xr environ 7 .Sh STANDARDS The .Fn setlocale -and -.Fn localeconv -functions conform to -.St -ansiC -and -.St -isoC-90 . -.Pp -The -.Fa int_p_cs_precedes , -.Fa int_n_cs_precedes , -.Fa int_p_sep_by_space , -.Fa int_n_sep_by_space , -.Fa int_p_sign_posn -and -.Fa int_n_sign_posn -members of -.Ft struct lconv -were introduced in +function conforms to .St -isoC-99 . .Sh HISTORY The .Fn setlocale -and -.Fn localeconv -functions first appeared in +function first appeared in .Bx 4.4 . -.Sh BUGS -The current implementation supports only the -.Li "\&""C"" -and -.Li "\&""POSIX"" -locales for all but the -.Dv LC_CTYPE -locale. -.Pp -In spite of the gnarly currency support in -.Fn localeconv , -the standards don't include any functions -for generalized currency formatting. -.Pp -.Dv LC_COLLATE -does not make sense for many languages. -Use of -.Dv LC_MONETARY -could lead to misleading results until we have a real time currency -conversion function. -.Dv LC_NUMERIC -and -.Dv LC_TIME -are personal choices and should not be wrapped up with the other categories. -.Pp -Multibyte locales aren't supported for static binaries. diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index d1fb246894..2e3ec2c223 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -1,6 +1,5 @@ -/* $NetBSD: src/lib/libc/locale/setlocale.c,v 1.47 2004/07/21 20:27:46 tshiozak Exp $ */ - /* + * Copyright (c) 1996 - 2002 FreeBSD Project * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -15,7 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -30,354 +29,303 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)setlocale.c 8.1 (Berkeley) 7/4/93 + * $FreeBSD: head/lib/libc/locale/setlocale.c 228921 2011-12-27 23:28:01Z jilles $ */ -#define _CTYPE_PRIVATE #include -#include #include -#include -#include +#include #include #include -#include -#include +#include /* for _PATH_LOCALE */ #include #include #include #include "collate.h" -#include "rune.h" -#include "rune_local.h" - -#include "../citrus/citrus_namespace.h" -#include "../citrus/citrus_region.h" -#include "../citrus/citrus_lookup.h" -#include "../citrus/citrus_bcs.h" +#include "lmonetary.h" /* for __monetary_load_locale() */ +#include "lnumeric.h" /* for __numeric_load_locale() */ +#include "lmessages.h" /* for __messages_load_locale() */ +#include "setlocale.h" +#include "ldpart.h" +#include "../stdtime/timelocal.h" /* for __time_load_locale() */ -#define _LOCALE_ALIAS_NAME "locale.alias" -#define _LOCALE_SYM_FORCE "/force" - -static char *currentlocale(void); -static void revert_to_default(int); -static int force_locale_enable(int); -static int load_locale_sub(int, const char *, int); -static char *loadlocale(int); -static const char *__get_locale_env(int); - -static void revert_collate(void); -static int load_ctype(const char *); -static void revert_ctype(void); -static int load_messages(const char *); - -static const struct { - const char *name; - int (*load_function)(const char *); - void (*revert_function)(void); -} categories[] = { - { "LC_ALL", NULL, NULL }, - { "LC_COLLATE", __collate_load_tables, revert_collate }, - { "LC_CTYPE", load_ctype, revert_ctype }, - { "LC_MONETARY", NULL, NULL }, - { "LC_NUMERIC", NULL, NULL }, - { "LC_TIME", NULL, NULL }, - { "LC_MESSAGES", load_messages, NULL } +/* + * Category names for getenv() + */ +static const char categories[_LC_LAST][12] = { + "LC_ALL", + "LC_COLLATE", + "LC_CTYPE", + "LC_MONETARY", + "LC_NUMERIC", + "LC_TIME", + "LC_MESSAGES", }; /* * Current locales for each category */ -static char current_categories[_LC_LAST][32] = { - "C", - "C", - "C", - "C", - "C", - "C", - "C" +static char current_categories[_LC_LAST][ENCODING_LEN + 1] = { + "C", + "C", + "C", + "C", + "C", + "C", + "C", }; /* - * The locales we are going to try and load + * Path to locale storage directory */ -static char new_categories[_LC_LAST][32]; - -static char current_locale_string[_LC_LAST * 33]; -const char *_PathLocale; - -static int -load_ctype(const char *locale) -{ - if (_xpg4_setrunelocale(locale)) - return(-1); - if (__runetable_to_netbsd_ctype(locale)) { - /* very unfortunate, but need to go to "C" locale */ - revert_ctype(); - return(-1); - } - - return(0); -} - -static void -revert_ctype(void) -{ - _xpg4_setrunelocale("C"); - __runetable_to_netbsd_ctype("C"); -} +char *_PathLocale; -static void -revert_collate(void) -{ - __collate_load_tables("C"); -} +/* + * The locales we are going to try and load + */ +static char new_categories[_LC_LAST][ENCODING_LEN + 1]; +static char saved_categories[_LC_LAST][ENCODING_LEN + 1]; -static int -load_messages(const char *locale) -{ - char name[PATH_MAX]; - struct stat st; +static char current_locale_string[_LC_LAST * (ENCODING_LEN + 1/*"/"*/ + 1)]; - /* - * XXX we don't have LC_MESSAGES support yet, - * but catopen may use the value of LC_MESSAGES category. - * so return successfully if locale directory is present. - */ - snprintf(name, sizeof(name), "%s/%s", _PathLocale, locale); - - if (stat(name, &st) < 0) - return(-1); - if (!S_ISDIR(st.st_mode)) - return(-1); - return(0); -} +static char *currentlocale(void); +static char *loadlocale(int); +const char *__get_locale_env(int); char * -setlocale(int category, const char *locale) +setlocale(category, locale) + int category; + const char *locale; { - int i, loadlocale_success; - size_t len; - const char *env, *r; + int i, j, len, saverr; + const char *env, *r; - __mb_len_max_runtime = 32; - - if (issetugid() || - (!_PathLocale && !(_PathLocale = getenv("PATH_LOCALE")))) - _PathLocale = _PATH_LOCALE; - - if (category < 0 || category >= (int)__arysize(categories)) - return(NULL); + if (category < LC_ALL || category >= _LC_LAST) { + errno = EINVAL; + return (NULL); + } if (locale == NULL) - return(category ? + return (category != LC_ALL ? current_categories[category] : currentlocale()); /* * Default to the current locale for everything. */ for (i = 1; i < _LC_LAST; ++i) - strlcpy(new_categories[i], current_categories[i], - sizeof(new_categories[i])); + (void)strcpy(new_categories[i], current_categories[i]); /* * Now go fill up new_categories from the locale argument */ - if (*locale == '\0') { + if (!*locale) { if (category == LC_ALL) { for (i = 1; i < _LC_LAST; ++i) { env = __get_locale_env(i); - strlcpy(new_categories[i], env, - sizeof(new_categories[i])); + if (strlen(env) > ENCODING_LEN) { + errno = EINVAL; + return (NULL); + } + (void)strcpy(new_categories[i], env); } - } - else { + } else { env = __get_locale_env(category); - strlcpy(new_categories[category], env, - sizeof(new_categories[category])); + if (strlen(env) > ENCODING_LEN) { + errno = EINVAL; + return (NULL); + } + (void)strcpy(new_categories[category], env); + } + } else if (category != LC_ALL) { + if (strlen(locale) > ENCODING_LEN) { + errno = EINVAL; + return (NULL); } - } else if (category) { - strlcpy(new_categories[category], locale, - sizeof(new_categories[category])); + (void)strcpy(new_categories[category], locale); } else { if ((r = strchr(locale, '/')) == NULL) { - for (i = 1; i < _LC_LAST; ++i) { - strlcpy(new_categories[i], locale, - sizeof(new_categories[i])); + if (strlen(locale) > ENCODING_LEN) { + errno = EINVAL; + return (NULL); } + for (i = 1; i < _LC_LAST; ++i) + (void)strcpy(new_categories[i], locale); } else { - for (i = 1;;) { - _DIAGASSERT(*r == '/' || *r == 0); - _DIAGASSERT(*locale != 0); - if (*locale == '/') - return(NULL); /* invalid format. */ - len = r - locale; - if (len + 1 > sizeof(new_categories[i])) - return(NULL); /* too long */ - memcpy(new_categories[i], locale, len); - new_categories[i][len] = '\0'; - if (*r == 0) - break; - _DIAGASSERT(*r == '/'); - if (*(locale = ++r) == 0) - /* slash followed by NUL */ - return(NULL); - /* skip until NUL or '/' */ + for (i = 1; r[1] == '/'; ++r) + ; + if (!r[1]) { + errno = EINVAL; + return (NULL); /* Hmm, just slashes... */ + } + do { + if (i == _LC_LAST) + break; /* Too many slashes... */ + if ((len = r - locale) > ENCODING_LEN) { + errno = EINVAL; + return (NULL); + } + (void)strlcpy(new_categories[i], locale, + len + 1); + i++; + while (*r == '/') + r++; + locale = r; while (*r && *r != '/') r++; - if (++i == _LC_LAST) - return(NULL); /* too many slashes. */ + } while (*locale); + while (i < _LC_LAST) { + (void)strcpy(new_categories[i], + new_categories[i-1]); + i++; } - if (i + 1 != _LC_LAST) - return(NULL); /* too few slashes. */ } } - if (category) - return(loadlocale(category)); + if (category != LC_ALL) + return (loadlocale(category)); - loadlocale_success = 0; for (i = 1; i < _LC_LAST; ++i) { - if (loadlocale(i) != NULL) - loadlocale_success = 1; + (void)strcpy(saved_categories[i], current_categories[i]); + if (loadlocale(i) == NULL) { + saverr = errno; + for (j = 1; j < i; j++) { + (void)strcpy(new_categories[j], + saved_categories[j]); + if (loadlocale(j) == NULL) { + (void)strcpy(new_categories[j], "C"); + (void)loadlocale(j); + } + } + errno = saverr; + return (NULL); + } } - - /* - * If all categories failed, return NULL; we don't need to back - * changes off, since none happened. - */ - if (!loadlocale_success) - return(NULL); - - return(currentlocale()); + return (currentlocale()); } static char * -currentlocale(void) +currentlocale() { int i; - strlcpy(current_locale_string, current_categories[1], - sizeof(current_locale_string)); + (void)strcpy(current_locale_string, current_categories[1]); for (i = 2; i < _LC_LAST; ++i) if (strcmp(current_categories[1], current_categories[i])) { - snprintf(current_locale_string, - sizeof(current_locale_string), "%s/%s/%s/%s/%s/%s", - current_categories[1], current_categories[2], - current_categories[3], current_categories[4], - current_categories[5], current_categories[6]); + for (i = 2; i < _LC_LAST; ++i) { + (void)strcat(current_locale_string, "/"); + (void)strcat(current_locale_string, + current_categories[i]); + } break; } - return(current_locale_string); + return (current_locale_string); } -static void -revert_to_default(int category) +static char * +loadlocale(category) + int category; { - _DIAGASSERT(category >= 0 && category < _LC_LAST); + char *new = new_categories[category]; + char *old = current_categories[category]; + int (*func)(const char *); + int saved_errno; + + if ((new[0] == '.' && + (new[1] == '\0' || (new[1] == '.' && new[2] == '\0'))) || + strchr(new, '/') != NULL) { + errno = EINVAL; + return (NULL); + } - if (categories[category].revert_function != NULL) - categories[category].revert_function(); -} + saved_errno = errno; + errno = __detect_path_locale(); + if (errno != 0) + return (NULL); + errno = saved_errno; + + switch (category) { + case LC_CTYPE: + func = __wrap_setrunelocale; + break; + case LC_COLLATE: + func = __collate_load_tables; + break; + case LC_TIME: + func = __time_load_locale; + break; + case LC_NUMERIC: + func = __numeric_load_locale; + break; + case LC_MONETARY: + func = __monetary_load_locale; + break; + case LC_MESSAGES: + func = __messages_load_locale; + break; + default: + errno = EINVAL; + return (NULL); + } -static int -force_locale_enable(int category) -{ - revert_to_default(category); + if (strcmp(new, old) == 0) + return (old); + + if (func(new) != _LDP_ERROR) { + (void)strcpy(old, new); + (void)strcpy(__xlocale_global_locale.components[category-1]->locale, new); + return (old); + } - return(0); + return (NULL); } -static int -load_locale_sub(int category, const char *locname, int isspecial) +const char * +__get_locale_env(category) + int category; { - char name[PATH_MAX]; - - /* check for the default locales */ - if (!strcmp(new_categories[category], "C") || - !strcmp(new_categories[category], "POSIX")) { - revert_to_default(category); - return(0); - } + const char *env; - /* check whether special symbol */ - if (isspecial && _bcs_strcasecmp(locname, _LOCALE_SYM_FORCE) == 0) - return(force_locale_enable(category)); + /* 1. check LC_ALL. */ + env = getenv(categories[0]); - /* sanity check */ - if (strchr(locname, '/') != NULL) - return(-1); + /* 2. check LC_* */ + if (env == NULL || !*env) + env = getenv(categories[category]); - snprintf(name, sizeof(name), "%s/%s/%s", _PathLocale, locname, - categories[category].name); + /* 3. check LANG */ + if (env == NULL || !*env) + env = getenv("LANG"); - if (category > 0 && category < (int)__arysize(categories) && - categories[category].load_function != NULL) - return(categories[category].load_function(locname)); + /* 4. if none is set, fall to "C" */ + if (env == NULL || !*env) + env = "C"; - return(0); + return (env); } -static char * -loadlocale(int category) +/* + * Detect locale storage location and store its value to _PathLocale variable + */ +int +__detect_path_locale(void) { - char aliaspath[PATH_MAX], loccat[PATH_MAX], buf[PATH_MAX]; - const char *alias; - - _DIAGASSERT(0 < category && category < __arysize(categories)); - - if (strcmp(new_categories[category], current_categories[category]) == 0) - return(current_categories[category]); - - /* (1) non-aliased file */ - if (!load_locale_sub(category, new_categories[category], 0)) - goto success; - - /* (2) lookup locname/catname type alias */ - snprintf(aliaspath, sizeof(aliaspath), "%s/" _LOCALE_ALIAS_NAME, - _PathLocale); - snprintf(loccat, sizeof(loccat), "%s/%s", new_categories[category], - categories[category].name); - alias = _lookup_alias(aliaspath, loccat, buf, sizeof(buf), - _LOOKUP_CASE_SENSITIVE); - if (!load_locale_sub(category, alias, 1)) - goto success; - - /* (3) lookup locname type alias */ - alias = _lookup_alias(aliaspath, new_categories[category], - buf, sizeof(buf), _LOOKUP_CASE_SENSITIVE); - if (!load_locale_sub(category, alias, 1)) - goto success; - - return(NULL); - -success: - strlcpy(current_categories[category], new_categories[category], - sizeof(current_categories[category])); - return(current_categories[category]); + if (_PathLocale == NULL) { + char *p = getenv("PATH_LOCALE"); + + if (p != NULL && !issetugid()) { + if (strlen(p) + 1/*"/"*/ + ENCODING_LEN + + 1/*"/"*/ + CATEGORY_LEN >= PATH_MAX) + return (ENAMETOOLONG); + _PathLocale = strdup(p); + if (_PathLocale == NULL) + return (errno == 0 ? ENOMEM : errno); + } else + _PathLocale = _PATH_LOCALE; + } + return (0); } -static const char * -__get_locale_env(int category) -{ - const char *env; - - _DIAGASSERT(category != LC_ALL); - - /* 1. check LC_ALL. */ - env = getenv(categories[0].name); - - /* 2. check LC_* */ - if (env == NULL || *env == '\0') - env = getenv(categories[category].name); - - /* 3. check LANG */ - if (env == NULL || *env == '\0') - env = getenv("LANG"); - - /* 4. if none is set, fall to "C" */ - if (env == NULL || *env == '\0' || strchr(env, '/')) - env = "C"; - - return(env); -} diff --git a/lib/libc/string/strchrnul.c b/lib/libc/locale/setlocale.h similarity index 70% copy from lib/libc/string/strchrnul.c copy to lib/libc/locale/setlocale.h index a1a6719327..8a4a8d6482 100644 --- a/lib/libc/string/strchrnul.c +++ b/lib/libc/locale/setlocale.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Niclas Zeising + * Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,10 +11,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23,20 +23,18 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strchrnul.c,v 1.1 2013/02/14 01:18:03 svnexp Exp $ + * $FreeBSD: head/lib/libc/locale/setlocale.h 117270 2003-07-06 02:03:37Z ache $ */ -#include +#ifndef _SETLOCALE_H_ +#define _SETLOCALE_H_ -char * -strchrnul(const char *p, int ch) -{ - char c; +#define ENCODING_LEN 31 +#define CATEGORY_LEN 11 - c = ch; - for (;; ++p) { - if (*p == c || *p == '\0') - return ((char *)p); - } - /* NOTREACHED */ -} +extern char *_PathLocale; + +int __detect_path_locale(void); +int __wrap_setrunelocale(const char *); + +#endif /* !_SETLOCALE_H_ */ diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index b2f1cd723d..80db9e61e0 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -1,68 +1,3 @@ -/* $NetBSD: src/lib/libc/locale/setrunelocale.c,v 1.14 2003/08/07 16:43:07 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/setrunelocale.c,v 1.6 2005/05/08 15:55:15 joerg Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -70,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -78,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -93,130 +33,191 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/setrunelocale.c 244126 2012-12-11 22:52:56Z jilles $ */ -#include + +#define __RUNETYPE_INTERNAL 1 + +#include #include #include -#include -#include +#include #include #include -#include #include #include -#include "../citrus/citrus_module.h" -#include "../citrus/citrus_ctype.h" -#include "rune.h" -#include "rune_local.h" -#include "multibyte.h" - -struct localetable { - char path[PATH_MAX]; - _RuneLocale *runelocale; - struct localetable *next; -}; -static struct localetable *localetable_head; - -_RuneLocale * -_findrunelocale(char *path) -{ - struct localetable *lt; +#include "ldpart.h" +#include "mblocal.h" +#include "setlocale.h" + +#undef _CurrentRuneLocale +extern _RuneLocale const *_CurrentRuneLocale; +#ifndef __NO_TLS +/* + * A cached version of the runes for this thread. Used by ctype.h + */ +__thread const _RuneLocale *_ThreadRuneLocale; +#endif - _DIAGASSERT(path != NULL); +extern int __mb_sb_limit; - /* ones which we have seen already */ - for (lt = localetable_head; lt; lt = lt->next) { - if (strcmp(path, lt->path) == 0) - return(lt->runelocale); - } +extern _RuneLocale *_Read_RuneMagi(FILE *); - return(NULL); +static int __setrunelocale(struct xlocale_ctype *l, const char *); + +#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial) +#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr) +#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr) +#define __collate_chain_pri_table (table->__collate_chain_pri_table) + + +static void +destruct_ctype(void *v) +{ + struct xlocale_ctype *l = v; + + if (strcmp(l->runes->__encoding, "EUC") == 0) + free(l->runes->__variable); + if (&_DefaultRuneLocale != l->runes) + free(l->runes); + free(l); } -int -_newrunelocale(char *path) +const _RuneLocale * +__getCurrentRuneLocale(void) { - struct localetable *lt; - FILE *fp; - _RuneLocale *rl; - int ret; - /* path may be NULL (actually, it's checked below) */ + return XLOCALE_CTYPE(__get_locale())->runes; +} - if (path == NULL || strlen(path) + 1 > sizeof(lt->path)) - return(EFAULT); +static void +free_runes(_RuneLocale *rl) +{ - rl = _findrunelocale(path); - if (rl) - return(0); + /* FIXME: The "EUC" check here is a hideous abstraction violation. */ + if ((rl != &_DefaultRuneLocale) && (rl)) { + if (strcmp(rl->__encoding, "EUC") == 0) { + free(rl->__variable); + } + free(rl); + } +} - if ((fp = fopen(path, "r")) == NULL) - return(ENOENT); +static int +__setrunelocale(struct xlocale_ctype *l, const char *encoding) +{ + FILE *fp; + char name[PATH_MAX]; + _RuneLocale *rl; + int saverr, ret; + struct xlocale_ctype saved = *l; - if ((rl = _Read_RuneMagi(fp)) != NULL) - goto found; + /* + * The "C" and "POSIX" locale are always here. + */ + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + free_runes(saved.runes); + (void) _none_init(l, (_RuneLocale*)&_DefaultRuneLocale); + return (0); + } - fclose(fp); - return(EFTYPE); + /* Range checking not needed, encoding length already checked before */ + (void) strcpy(name, _PathLocale); + (void) strcat(name, "/"); + (void) strcat(name, encoding); + (void) strcat(name, "/LC_CTYPE"); -found: - fclose(fp); + if ((fp = fopen(name, "re")) == NULL) + return (errno == 0 ? ENOENT : errno); - rl->rl_citrus_ctype = NULL; - ret = _citrus_ctype_open(&rl->rl_citrus_ctype, rl->rl_encoding, - rl->rl_variable, rl->rl_variable_len, - _PRIVSIZE); - if (ret) { - _NukeRune(rl); - return(ret); + if ((rl = _Read_RuneMagi(fp)) == NULL) { + saverr = (errno == 0 ? EFTYPE : errno); + (void)fclose(fp); + return (saverr); } - if (__MB_LEN_MAX_RUNTIME < - _citrus_ctype_get_mb_cur_max(rl->rl_citrus_ctype)) { - _NukeRune(rl); - return(EINVAL); - } - - /* register it */ - lt = malloc(sizeof(struct localetable)); - if (lt == NULL) { - _NukeRune(rl); - return(ENOMEM); + (void)fclose(fp); + + l->__mbrtowc = NULL; + l->__mbsinit = NULL; + l->__mbsnrtowcs = __mbsnrtowcs_std; + l->__wcrtomb = NULL; + l->__wcsnrtombs = __wcsnrtombs_std; + + rl->__sputrune = NULL; + rl->__sgetrune = NULL; + if (strcmp(rl->__encoding, "NONE") == 0) + ret = _none_init(l, rl); + else if (strcmp(rl->__encoding, "ASCII") == 0) + ret = _ascii_init(l, rl); + else if (strcmp(rl->__encoding, "UTF-8") == 0) + ret = _UTF8_init(l, rl); + else if (strcmp(rl->__encoding, "EUC") == 0) + ret = _EUC_init(l, rl); + else if (strcmp(rl->__encoding, "GB18030") == 0) + ret = _GB18030_init(l, rl); + else if (strcmp(rl->__encoding, "GB2312") == 0) + ret = _GB2312_init(l, rl); + else if (strcmp(rl->__encoding, "GBK") == 0) + ret = _GBK_init(l, rl); + else if (strcmp(rl->__encoding, "BIG5") == 0) + ret = _BIG5_init(l, rl); + else if (strcmp(rl->__encoding, "MSKanji") == 0) + ret = _MSKanji_init(l, rl); + else + ret = EFTYPE; + + if (ret == 0) { + /* Free the old runes if it exists. */ + free_runes(saved.runes); + } else { + /* Restore the saved version if this failed. */ + memcpy(l, &saved, sizeof(struct xlocale_ctype)); + free(rl); } - strlcpy(lt->path, path, sizeof(lt->path)); - lt->runelocale = rl; - lt->next = localetable_head; - localetable_head = lt; - return(0); + return (ret); } int -_xpg4_setrunelocale(const char *encoding) +__wrap_setrunelocale(const char *locale) { - char path[PATH_MAX]; - _RuneLocale *rl; - int error; - - _DIAGASSERT(encoding != NULL); + int ret = __setrunelocale(&__xlocale_global_ctype, locale); - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { - rl = &_DefaultRuneLocale; - goto found; + if (ret != 0) { + errno = ret; + return (_LDP_ERROR); } + __mb_cur_max = __xlocale_global_ctype.__mb_cur_max; + __mb_sb_limit = __xlocale_global_ctype.__mb_sb_limit; + _CurrentRuneLocale = __xlocale_global_ctype.runes; + return (_LDP_LOADED); +} - snprintf(path, sizeof(path), "%s/%s/LC_CTYPE", _PathLocale, encoding); +#ifndef __NO_TLS +void +__set_thread_rune_locale(locale_t loc) +{ - error = _newrunelocale(path); - if (error) - return(error); - rl = _findrunelocale(path); - if (!rl) - return(ENOENT); + if (loc == NULL) { + _ThreadRuneLocale = &_DefaultRuneLocale; + } else { + _ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes; + } +} +#endif -found: - _CurrentRuneLocale = rl; - __mb_cur_max = _citrus_ctype_get_mb_cur_max(rl->rl_citrus_ctype); +void * +__ctype_load(const char *locale, locale_t unused) +{ + struct xlocale_ctype *l = calloc(sizeof(struct xlocale_ctype), 1); - return(0); + l->header.header.destructor = destruct_ctype; + if (__setrunelocale(l, locale)) + { + free(l); + return NULL; + } + return l; } diff --git a/lib/libc/locale/table.c b/lib/libc/locale/table.c new file mode 100644 index 0000000000..151a1b900c --- /dev/null +++ b/lib/libc/locale/table.c @@ -0,0 +1,261 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)table.c 8.1 (Berkeley) 6/27/93 + * $FreeBSD: head/lib/libc/locale/table.c 232498 2012-03-04 15:31:13Z theraven $ + */ + + +#include +#include +#include +#include "mblocal.h" + +const _RuneLocale _DefaultRuneLocale = { + _RUNE_MAGIC_1, + "NONE", + NULL, + NULL, + 0xFFFD, + + { /*00*/ _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + /*08*/ _CTYPE_C, + _CTYPE_C|_CTYPE_S|_CTYPE_B, + _CTYPE_C|_CTYPE_S, + _CTYPE_C|_CTYPE_S, + _CTYPE_C|_CTYPE_S, + _CTYPE_C|_CTYPE_S, + _CTYPE_C, + _CTYPE_C, + /*10*/ _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + /*18*/ _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + _CTYPE_C, + /*20*/ _CTYPE_S|_CTYPE_B|_CTYPE_R, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + /*28*/ _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + /*30*/ _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|0, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|1, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|2, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|3, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|4, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|5, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|6, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|7, + /*38*/ _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|8, + _CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X|9, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + /*40*/ _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|10, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|11, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|12, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|13, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|14, + _CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|15, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*48*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*50*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*58*/ _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + /*60*/ _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|10, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|11, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|12, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|13, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|14, + _CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A|15, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*68*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*70*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + /*78*/ _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_P|_CTYPE_R|_CTYPE_G, + _CTYPE_C, + }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, +}; + +#undef _CurrentRuneLocale +const _RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale; + +_RuneLocale * +__runes_for_locale(locale_t locale, int *mb_sb_limit) +{ + FIX_LOCALE(locale); + struct xlocale_ctype *c = XLOCALE_CTYPE(locale); + *mb_sb_limit = c->__mb_sb_limit; + return c->runes; +} diff --git a/lib/libc/gen/toascii.3 b/lib/libc/locale/toascii.3 similarity index 90% rename from lib/libc/gen/toascii.3 rename to lib/libc/locale/toascii.3 index f2ad35bad3..9073773f6a 100644 --- a/lib/libc/gen/toascii.3 +++ b/lib/libc/locale/toascii.3 @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -26,8 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)toascii.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/toascii.3,v 1.4.2.2 2001/12/14 18:33:55 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/toascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ +.\" $FreeBSD: head/lib/libc/locale/toascii.3 196820 2009-09-04 07:44:58Z des $ .\" .Dd June 4, 1993 .Dt TOASCII 3 @@ -51,6 +50,7 @@ The .Fn toascii function always returns a valid ASCII character. .Sh SEE ALSO +.Xr digittoint 3 , .Xr isalnum 3 , .Xr isalpha 3 , .Xr isascii 3 , diff --git a/lib/libc/gen/tolower.3 b/lib/libc/locale/tolower.3 similarity index 78% rename from lib/libc/gen/tolower.3 rename to lib/libc/locale/tolower.3 index fdf6d2af19..9d54e9f74e 100644 --- a/lib/libc/gen/tolower.3 +++ b/lib/libc/locale/tolower.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/tolower.3,v 1.6.2.4 2001/12/14 18:33:55 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/tolower.3,v 1.3 2006/04/08 08:57:00 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/tolower.3 210468 2010-07-25 13:32:19Z bcr $ .\" -.Dd June 4, 1993 +.Dd July 25, 2010 .Dt TOLOWER 3 .Os .Sh NAME @@ -50,35 +49,29 @@ The .Fn tolower function converts an upper-case letter to the corresponding lower-case letter. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . .Sh RETURN VALUES If the argument is an upper-case letter, the .Fn tolower function returns the corresponding lower-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn towlower +function should be used instead. .Sh SEE ALSO -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr iscntrl 3 , -.Xr isdigit 3 , -.Xr isgraph 3 , +.Xr ctype 3 , .Xr islower 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isspace 3 , -.Xr isupper 3 , -.Xr isxdigit 3 , -.Xr stdio 3 , -.Xr toascii 3 , -.Xr toupper 3 , -.Xr ascii 7 +.Xr towlower 3 .Sh STANDARDS The .Fn tolower diff --git a/lib/libc/locale/___runetype_mb.c b/lib/libc/locale/tolower.c similarity index 61% copy from lib/libc/locale/___runetype_mb.c copy to lib/libc/locale/tolower.c index ab95d3cfd6..9855150c96 100644 --- a/lib/libc/locale/___runetype_mb.c +++ b/lib/libc/locale/tolower.c @@ -1,6 +1,3 @@ -/* $NetBSD: src/lib/libc/locale/___runetype_mb.c,v 1.9 2003/08/07 16:43:03 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/___runetype_mb.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -8,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,32 +33,47 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/tolower.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include "rune.h" -#include "rune_local.h" -_RuneType -___runetype_mb(wint_t c) +#include +#include +#include +#include +#include "mblocal.h" + +__ct_rune_t +___tolower_l(c, l) + __ct_rune_t c; + locale_t l; { - uint32_t x; - _RuneRange *rr = &_CurrentRuneLocale->rl_runetype_ext; - _RuneEntry *re = rr->rr_rune_ranges; + size_t lim; + FIX_LOCALE(l); + _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__maplower_ext; + _RuneEntry *base, *re; - if (c == WEOF) - return(0U); + if (c < 0 || c == EOF) + return(c); - for (x = 0; x < rr->rr_nranges; ++x, ++re) { - /* XXX assumes wchar_t = int */ - if ((__nbrune_t)c < re->re_min) - return(0U); - if ((__nbrune_t)c <= re->re_max) { - if (re->re_rune_types) - return(re->re_rune_types[(__nbrune_t)c - re->re_min]); - else - return(re->re_map); + /* Binary search -- see bsearch.c for explanation. */ + base = rr->__ranges; + for (lim = rr->__nranges; lim != 0; lim >>= 1) { + re = base + (lim >> 1); + if (re->__min <= c && c <= re->__max) + return (re->__map + c - re->__min); + else if (c > re->__max) { + base = re + 1; + lim--; } } - return(0U); + + return(c); +} +__ct_rune_t +___tolower(c) + __ct_rune_t c; +{ + return ___tolower_l(c, __get_locale()); } diff --git a/lib/libc/gen/toupper.3 b/lib/libc/locale/toupper.3 similarity index 78% copy from lib/libc/gen/toupper.3 copy to lib/libc/locale/toupper.3 index f865e30951..ead6b3340e 100644 --- a/lib/libc/gen/toupper.3 +++ b/lib/libc/locale/toupper.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/toupper.3,v 1.5.2.5 2001/12/14 18:33:55 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/toupper.3,v 1.3 2006/04/08 08:57:00 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/toupper.3 210468 2010-07-25 13:32:19Z bcr $ .\" -.Dd June 4, 1993 +.Dd July 25, 2010 .Dt TOUPPER 3 .Os .Sh NAME @@ -50,35 +49,29 @@ The .Fn toupper function converts a lower-case letter to the corresponding upper-case letter. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char +The argument must be representable as an +.Vt "unsigned char" or the value of .Dv EOF . .Sh RETURN VALUES If the argument is a lower-case letter, the .Fn toupper function returns the corresponding upper-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn towupper +function should be used instead. .Sh SEE ALSO -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr iscntrl 3 , -.Xr isdigit 3 , -.Xr isgraph 3 , -.Xr islower 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isspace 3 , +.Xr ctype 3 , .Xr isupper 3 , -.Xr isxdigit 3 , -.Xr stdio 3 , -.Xr toascii 3 , -.Xr tolower 3 , -.Xr ascii 7 +.Xr towupper 3 .Sh STANDARDS The .Fn toupper diff --git a/lib/libc/locale/___runetype_mb.c b/lib/libc/locale/toupper.c similarity index 61% rename from lib/libc/locale/___runetype_mb.c rename to lib/libc/locale/toupper.c index ab95d3cfd6..dbe19e6bef 100644 --- a/lib/libc/locale/___runetype_mb.c +++ b/lib/libc/locale/toupper.c @@ -1,6 +1,3 @@ -/* $NetBSD: src/lib/libc/locale/___runetype_mb.c,v 1.9 2003/08/07 16:43:03 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/___runetype_mb.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -8,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,32 +33,49 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/toupper.c 235239 2012-05-10 20:03:34Z dim $ */ -#include -#include "rune.h" -#include "rune_local.h" -_RuneType -___runetype_mb(wint_t c) +#include +#include +#include +#include +#include "mblocal.h" + +__ct_rune_t +___toupper_l(c, l) + __ct_rune_t c; + locale_t l; { - uint32_t x; - _RuneRange *rr = &_CurrentRuneLocale->rl_runetype_ext; - _RuneEntry *re = rr->rr_rune_ranges; + size_t lim; + FIX_LOCALE(l); + _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__mapupper_ext; + _RuneEntry *base, *re; - if (c == WEOF) - return(0U); + if (c < 0 || c == EOF) + return(c); - for (x = 0; x < rr->rr_nranges; ++x, ++re) { - /* XXX assumes wchar_t = int */ - if ((__nbrune_t)c < re->re_min) - return(0U); - if ((__nbrune_t)c <= re->re_max) { - if (re->re_rune_types) - return(re->re_rune_types[(__nbrune_t)c - re->re_min]); - else - return(re->re_map); + /* Binary search -- see bsearch.c for explanation. */ + base = rr->__ranges; + for (lim = rr->__nranges; lim != 0; lim >>= 1) { + re = base + (lim >> 1); + if (re->__min <= c && c <= re->__max) + { + return (re->__map + c - re->__min); + } + else if (c > re->__max) { + base = re + 1; + lim--; } } - return(0U); + + return(c); +} +__ct_rune_t +___toupper(c) + __ct_rune_t c; +{ + return ___toupper_l(c, __get_locale()); } diff --git a/lib/libc/locale/towctrans.3 b/lib/libc/locale/towctrans.3 deleted file mode 100644 index 459581ae24..0000000000 --- a/lib/libc/locale/towctrans.3 +++ /dev/null @@ -1,88 +0,0 @@ -.\" $NetBSD: src/lib/libc/locale/towctrans.3,v 1.5 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/towctrans.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd March 4, 2003 -.Dt TOWCTRANS 3 -.Os -.\" ---------------------------------------------------------------------- -.Sh NAME -.Nm towctrans -.Nd convert a wide character with a specified map -.\" ---------------------------------------------------------------------- -.Sh LIBRARY -.Lb libc -.\" ---------------------------------------------------------------------- -.Sh SYNOPSIS -.In wctype.h -.Ft wint_t -.Fn towctrans "wint_t wc" "wctrans_t charmap" -.\" ---------------------------------------------------------------------- -.Sh DESCRIPTION -The -.Fn towctrans -function converts a wide character -.Fa wc -with a character mapping -.Fa charmap . -.Pp -The behaviour of -.Fn towctrans -is undefined if the -.Fn towctrans -function is called with an invalid -.Fa charmap -(changes of -.Dv LC_CTYPE -category invalidate -.Fa charclass ) -or invalid wide character -.Fa wc . -.Pp -The behaviour of -.Fn towctrans -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- -.Sh RETURN VALUES -.Fn towctrans -returns the resulting character of the conversion. -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- -.Sh SEE ALSO -.Xr iswctype 3 , -.Xr setlocale 3 , -.Xr wctrans 3 , -.Xr wctype 3 -.\" ---------------------------------------------------------------------- -.Sh STANDARDS -The -.Fn towctrans -function conforms to -.St -isoC-amd1 . diff --git a/lib/libc/locale/towlower.3 b/lib/libc/locale/towlower.3 index c895c6994c..c0c30b923d 100644 --- a/lib/libc/locale/towlower.3 +++ b/lib/libc/locale/towlower.3 @@ -1,8 +1,5 @@ -.\" $NetBSD: src/lib/libc/locale/towlower.3,v 1.7 2003/09/08 17:54:31 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/towlower.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c) 1989, 1991 The Regents of the University of California. -.\" All rights reserved. +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information @@ -16,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -32,39 +29,38 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)tolower.3 5.2 (Berkeley) 6/29/91 +.\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/locale/towlower.3 165903 2007-01-09 00:28:16Z imp $ .\" -.Dd December 22, 2000 +.Dd October 3, 2002 .Dt TOWLOWER 3 .Os .Sh NAME .Nm towlower -.Nd wide character case letter conversion utilities +.Nd "upper case to lower case letter conversion (wide character version)" .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In wctype.h .Ft wint_t .Fn towlower "wint_t wc" -.Ft wint_t -.Fn towupper "wint_t wc" .Sh DESCRIPTION The .Fn towlower -function converts an upper-case wide character to the corresponding lower-case -letter. -The -.Fn towupper -function converts an lower-case wide character to the corresponding upper-case +function converts an upper-case letter to the corresponding lower-case letter. .Sh RETURN VALUES -If the argument is an upper/lower-case letter, the -.Fn tolower -function returns the corresponding counterpart if there is +If the argument is an upper-case letter, the +.Fn towlower +function returns the corresponding lower-case letter if there is one; otherwise the argument is returned unchanged. .Sh SEE ALSO +.Xr iswlower 3 , .Xr tolower 3 , -.Xr toupper 3 +.Xr towupper 3 , +.Xr wctrans 3 .Sh STANDARDS -The functions conform to +The +.Fn towlower +function conforms to .St -isoC-99 . diff --git a/lib/libc/gen/toupper.3 b/lib/libc/locale/towupper.3 similarity index 73% rename from lib/libc/gen/toupper.3 rename to lib/libc/locale/towupper.3 index f865e30951..bbefa728f4 100644 --- a/lib/libc/gen/toupper.3 +++ b/lib/libc/locale/towupper.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -30,57 +30,37 @@ .\" SUCH DAMAGE. .\" .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/toupper.3,v 1.5.2.5 2001/12/14 18:33:55 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/toupper.3,v 1.3 2006/04/08 08:57:00 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/towupper.3 165903 2007-01-09 00:28:16Z imp $ .\" -.Dd June 4, 1993 -.Dt TOUPPER 3 +.Dd October 3, 2002 +.Dt TOWUPPER 3 .Os .Sh NAME -.Nm toupper -.Nd lower case to upper case letter conversion +.Nm towupper +.Nd "lower case to upper case letter conversion (wide character version)" .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In ctype.h -.Ft int -.Fn toupper "int c" +.In wctype.h +.Ft wint_t +.Fn towupper "wint_t wc" .Sh DESCRIPTION The -.Fn toupper +.Fn towupper function converts a lower-case letter to the corresponding upper-case letter. -For single C -.Va char Ns s -locales the value of the argument is -representable as an -.Li unsigned char -or the value of -.Dv EOF . .Sh RETURN VALUES If the argument is a lower-case letter, the -.Fn toupper +.Fn towupper function returns the corresponding upper-case letter if there is one; otherwise the argument is returned unchanged. .Sh SEE ALSO -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr iscntrl 3 , -.Xr isdigit 3 , -.Xr isgraph 3 , -.Xr islower 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isspace 3 , -.Xr isupper 3 , -.Xr isxdigit 3 , -.Xr stdio 3 , -.Xr toascii 3 , -.Xr tolower 3 , -.Xr ascii 7 +.Xr iswupper 3 , +.Xr toupper 3 , +.Xr towlower 3 , +.Xr wctrans 3 .Sh STANDARDS The -.Fn toupper +.Fn towupper function conforms to -.St -isoC . +.St -isoC-99 . diff --git a/lib/libc/gen/isascii.3 b/lib/libc/locale/uselocale.3 similarity index 62% rename from lib/libc/gen/isascii.3 rename to lib/libc/locale/uselocale.3 index 623da12c5a..ea63c44697 100644 --- a/lib/libc/gen/isascii.3 +++ b/lib/libc/locale/uselocale.3 @@ -1,5 +1,8 @@ -.\" Copyright (c) 1989, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,34 +25,36 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.5.2.5 2001/12/14 18:33:54 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/isascii.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ +.\" $FreeBSD: head/lib/libc/locale/uselocale.3 250244 2013-05-04 17:06:47Z pluknet $ .\" -.Dd December 11, 1993 -.Dt ISASCII 3 +.Dd September 17, 2011 +.Dt USELOCALE 3 .Os .Sh NAME -.Nm isascii -.Nd test for ASCII character +.Nm uselocale +.Nd Sets a thread-local locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In ctype.h -.Ft int -.Fn isascii "int c" +.In xlocale.h +.Ft locale_t +.Fn uselocale "locale_t locale" .Sh DESCRIPTION -The -.Fn isascii -function tests for an -.Tn ASCII -character, which is any character -between 0 and octal 0177 inclusive. +Specifies the locale for this thread to use. +Specifying +.Fa LC_GLOBAL_LOCALE +disables the per-thread locale, +while NULL returns the current locale without setting a new one. +.Sh RETURN VALUES +Returns the previous locale, +or LC_GLOBAL_LOCALE if this thread has no locale associated with it. .Sh SEE ALSO -.Xr ctype 3 , -.Xr ascii 7 +.Xr duplocale 3 , +.Xr freelocale 3 , +.Xr localeconv 3 , +.Xr newlocale 3 , +.Xr querylocale 3 , +.Xr xlocale 3 .Sh STANDARDS -The -.Fn isascii -function conforms to -.St -isoC . +This function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/locale/utf8.5 b/lib/libc/locale/utf8.5 new file mode 100644 index 0000000000..bd0bc7ba62 --- /dev/null +++ b/lib/libc/locale/utf8.5 @@ -0,0 +1,102 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Paul Borman at Krystal Technologies. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)utf2.4 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/locale/utf8.5 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 7, 2004 +.Dt UTF8 5 +.Os +.Sh NAME +.Nm utf8 +.Nd "UTF-8, a transformation format of ISO 10646" +.Sh SYNOPSIS +.Nm ENCODING +.Qq UTF-8 +.Sh DESCRIPTION +The +.Nm UTF-8 +encoding represents UCS-4 characters as a sequence of octets, using +between 1 and 6 for each character. +It is backwards compatible with +.Tn ASCII , +so 0x00-0x7f refer to the +.Tn ASCII +character set. +The multibyte encoding of +.No non- Ns Tn ASCII +characters +consist entirely of bytes whose high order bit is set. +The actual +encoding is represented by the following table: +.Bd -literal +[0x00000000 - 0x0000007f] [00000000.0bbbbbbb] -> 0bbbbbbb +[0x00000080 - 0x000007ff] [00000bbb.bbbbbbbb] -> 110bbbbb, 10bbbbbb +[0x00000800 - 0x0000ffff] [bbbbbbbb.bbbbbbbb] -> + 1110bbbb, 10bbbbbb, 10bbbbbb +[0x00010000 - 0x001fffff] [00000000.000bbbbb.bbbbbbbb.bbbbbbbb] -> + 11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb +[0x00200000 - 0x03ffffff] [000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] -> + 111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb +[0x04000000 - 0x7fffffff] [0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] -> + 1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb +.Ed +.Pp +If more than a single representation of a value exists (for example, +0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always +used. +Longer ones are detected as an error as they pose a potential +security risk, and destroy the 1:1 character:octet sequence mapping. +.Sh SEE ALSO +.Xr euc 5 +.Rs +.%A "Rob Pike" +.%A "Ken Thompson" +.%T "Hello World" +.%J "Proceedings of the Winter 1993 USENIX Technical Conference" +.%Q "USENIX Association" +.%D "January 1993" +.Re +.Rs +.%A "F. Yergeau" +.%T "UTF-8, a transformation format of ISO 10646" +.%O "RFC 2279" +.%D "January 1998" +.Re +.Rs +.%Q "The Unicode Consortium" +.%T "The Unicode Standard, Version 3.0" +.%D "2000" +.%O "as amended by the Unicode Standard Annex #27: Unicode 3.1 and by the Unicode Standard Annex #28: Unicode 3.2" +.Re +.Sh STANDARDS +The +.Nm +encoding is compatible with RFC 2279 and Unicode 3.2. diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c new file mode 100644 index 0000000000..629f72f9aa --- /dev/null +++ b/lib/libc/locale/utf8.c @@ -0,0 +1,435 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/utf8.c 227753 2011-11-20 14:45:42Z theraven $ + */ + +#include + +#include +#include +#include +#include +#include +#include +#include "mblocal.h" + +extern int __mb_sb_limit; + +static size_t _UTF8_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _UTF8_mbsinit(const mbstate_t *); +static size_t _UTF8_mbsnrtowcs(wchar_t * __restrict, + const char ** __restrict, size_t, size_t, + mbstate_t * __restrict); +static size_t _UTF8_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); +static size_t _UTF8_wcsnrtombs(char * __restrict, const wchar_t ** __restrict, + size_t, size_t, mbstate_t * __restrict); + +typedef struct { + wchar_t ch; + int want; + wchar_t lbound; +} _UTF8State; + +int +_UTF8_init(struct xlocale_ctype *l, _RuneLocale *rl) +{ + + l->__mbrtowc = _UTF8_mbrtowc; + l->__wcrtomb = _UTF8_wcrtomb; + l->__mbsinit = _UTF8_mbsinit; + l->__mbsnrtowcs = _UTF8_mbsnrtowcs; + l->__wcsnrtombs = _UTF8_wcsnrtombs; + l->runes = rl; + l->__mb_cur_max = 6; + /* + * UCS-4 encoding used as the internal representation, so + * slots 0x0080-0x00FF are occuped and must be excluded + * from the single byte ctype by setting the limit. + */ + l->__mb_sb_limit = 128; + + return (0); +} + +static int +_UTF8_mbsinit(const mbstate_t *ps) +{ + + return (ps == NULL || ((const _UTF8State *)ps)->want == 0); +} + +static size_t +_UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + _UTF8State *us; + int ch, i, mask, want; + wchar_t lbound, wch; + + us = (_UTF8State *)ps; + + if (us->want < 0 || us->want > 6) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) { + s = ""; + n = 1; + pwc = NULL; + } + + if (n == 0) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + + if (us->want == 0 && ((ch = (unsigned char)*s) & ~0x7f) == 0) { + /* Fast path for plain ASCII characters. */ + if (pwc != NULL) + *pwc = ch; + return (ch != '\0' ? 1 : 0); + } + + if (us->want == 0) { + /* + * Determine the number of octets that make up this character + * from the first octet, and a mask that extracts the + * interesting bits of the first octet. We already know + * the character is at least two bytes long. + * + * We also specify a lower bound for the character code to + * detect redundant, non-"shortest form" encodings. For + * example, the sequence C0 80 is _not_ a legal representation + * of the null character. This enforces a 1-to-1 mapping + * between character codes and their multibyte representations. + */ + ch = (unsigned char)*s; + if ((ch & 0x80) == 0) { + mask = 0x7f; + want = 1; + lbound = 0; + } else if ((ch & 0xe0) == 0xc0) { + mask = 0x1f; + want = 2; + lbound = 0x80; + } else if ((ch & 0xf0) == 0xe0) { + mask = 0x0f; + want = 3; + lbound = 0x800; + } else if ((ch & 0xf8) == 0xf0) { + mask = 0x07; + want = 4; + lbound = 0x10000; + } else if ((ch & 0xfc) == 0xf8) { + mask = 0x03; + want = 5; + lbound = 0x200000; + } else if ((ch & 0xfe) == 0xfc) { + mask = 0x01; + want = 6; + lbound = 0x4000000; + } else { + /* + * Malformed input; input is not UTF-8. + */ + errno = EILSEQ; + return ((size_t)-1); + } + } else { + want = us->want; + lbound = us->lbound; + } + + /* + * Decode the octet sequence representing the character in chunks + * of 6 bits, most significant first. + */ + if (us->want == 0) + wch = (unsigned char)*s++ & mask; + else + wch = us->ch; + for (i = (us->want == 0) ? 1 : 0; i < MIN(want, n); i++) { + if ((*s & 0xc0) != 0x80) { + /* + * Malformed input; bad characters in the middle + * of a character. + */ + errno = EILSEQ; + return ((size_t)-1); + } + wch <<= 6; + wch |= *s++ & 0x3f; + } + if (i < want) { + /* Incomplete multibyte sequence. */ + us->want = want - i; + us->lbound = lbound; + us->ch = wch; + return ((size_t)-2); + } + if (wch < lbound) { + /* + * Malformed input; redundant encoding. + */ + errno = EILSEQ; + return ((size_t)-1); + } + if (pwc != NULL) + *pwc = wch; + us->want = 0; + return (wch == L'\0' ? 0 : want); +} + +static size_t +_UTF8_mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src, + size_t nms, size_t len, mbstate_t * __restrict ps) +{ + _UTF8State *us; + const char *s; + size_t nchr; + wchar_t wc; + size_t nb; + + us = (_UTF8State *)ps; + + s = *src; + nchr = 0; + + if (dst == NULL) { + /* + * The fast path in the loop below is not safe if an ASCII + * character appears as anything but the first byte of a + * multibyte sequence. Check now to avoid doing it in the loop. + */ + if (nms > 0 && us->want > 0 && (signed char)*s > 0) { + errno = EILSEQ; + return ((size_t)-1); + } + for (;;) { + if (nms > 0 && (signed char)*s > 0) + /* + * Fast path for plain ASCII characters + * excluding NUL. + */ + nb = 1; + else if ((nb = _UTF8_mbrtowc(&wc, s, nms, ps)) == + (size_t)-1) + /* Invalid sequence - mbrtowc() sets errno. */ + return ((size_t)-1); + else if (nb == 0 || nb == (size_t)-2) + return (nchr); + s += nb; + nms -= nb; + nchr++; + } + /*NOTREACHED*/ + } + + /* + * The fast path in the loop below is not safe if an ASCII + * character appears as anything but the first byte of a + * multibyte sequence. Check now to avoid doing it in the loop. + */ + if (nms > 0 && len > 0 && us->want > 0 && (signed char)*s > 0) { + errno = EILSEQ; + return ((size_t)-1); + } + while (len-- > 0) { + if (nms > 0 && (signed char)*s > 0) { + /* + * Fast path for plain ASCII characters + * excluding NUL. + */ + *dst = (wchar_t)*s; + nb = 1; + } else if ((nb = _UTF8_mbrtowc(dst, s, nms, ps)) == + (size_t)-1) { + *src = s; + return ((size_t)-1); + } else if (nb == (size_t)-2) { + *src = s + nms; + return (nchr); + } else if (nb == 0) { + *src = NULL; + return (nchr); + } + s += nb; + nms -= nb; + nchr++; + dst++; + } + *src = s; + return (nchr); +} + +static size_t +_UTF8_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + _UTF8State *us; + unsigned char lead; + int i, len; + + us = (_UTF8State *)ps; + + if (us->want != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + + if ((wc & ~0x7f) == 0) { + /* Fast path for plain ASCII characters. */ + *s = (char)wc; + return (1); + } + + /* + * Determine the number of octets needed to represent this character. + * We always output the shortest sequence possible. Also specify the + * first few bits of the first octet, which contains the information + * about the sequence length. + */ + if ((wc & ~0x7f) == 0) { + lead = 0; + len = 1; + } else if ((wc & ~0x7ff) == 0) { + lead = 0xc0; + len = 2; + } else if ((wc & ~0xffff) == 0) { + lead = 0xe0; + len = 3; + } else if ((wc & ~0x1fffff) == 0) { + lead = 0xf0; + len = 4; + } else if ((wc & ~0x3ffffff) == 0) { + lead = 0xf8; + len = 5; + } else if ((wc & ~0x7fffffff) == 0) { + lead = 0xfc; + len = 6; + } else { + errno = EILSEQ; + return ((size_t)-1); + } + + /* + * Output the octets representing the character in chunks + * of 6 bits, least significant last. The first octet is + * a special case because it contains the sequence length + * information. + */ + for (i = len - 1; i > 0; i--) { + s[i] = (wc & 0x3f) | 0x80; + wc >>= 6; + } + *s = (wc & 0xff) | lead; + + return (len); +} + +static size_t +_UTF8_wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src, + size_t nwc, size_t len, mbstate_t * __restrict ps) +{ + _UTF8State *us; + char buf[MB_LEN_MAX]; + const wchar_t *s; + size_t nbytes; + size_t nb; + + us = (_UTF8State *)ps; + + if (us->want != 0) { + errno = EINVAL; + return ((size_t)-1); + } + + s = *src; + nbytes = 0; + + if (dst == NULL) { + while (nwc-- > 0) { + if (0 <= *s && *s < 0x80) + /* Fast path for plain ASCII characters. */ + nb = 1; + else if ((nb = _UTF8_wcrtomb(buf, *s, ps)) == + (size_t)-1) + /* Invalid character - wcrtomb() sets errno. */ + return ((size_t)-1); + if (*s == L'\0') + return (nbytes + nb - 1); + s++; + nbytes += nb; + } + return (nbytes); + } + + while (len > 0 && nwc-- > 0) { + if (0 <= *s && *s < 0x80) { + /* Fast path for plain ASCII characters. */ + nb = 1; + *dst = *s; + } else if (len > (size_t)MB_CUR_MAX) { + /* Enough space to translate in-place. */ + if ((nb = _UTF8_wcrtomb(dst, *s, ps)) == (size_t)-1) { + *src = s; + return ((size_t)-1); + } + } else { + /* + * May not be enough space; use temp. buffer. + */ + if ((nb = _UTF8_wcrtomb(buf, *s, ps)) == (size_t)-1) { + *src = s; + return ((size_t)-1); + } + if (nb > (int)len) + /* MB sequence for character won't fit. */ + break; + memcpy(dst, buf, nb); + } + if (*s == L'\0') { + *src = NULL; + return (nbytes + nb - 1); + } + s++; + dst += nb; + len -= nb; + nbytes += nb; + } + *src = s; + return (nbytes); +} diff --git a/lib/libc/locale/wcrtomb.3 b/lib/libc/locale/wcrtomb.3 index e0578bc51e..e7d9859de6 100644 --- a/lib/libc/locale/wcrtomb.3 +++ b/lib/libc/locale/wcrtomb.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/wcrtomb.3,v 1.6 2004/09/27 07:07:04 yamt Exp $ -.\" $DragonFly: src/lib/libc/locale/wcrtomb.3,v 1.2 2008/04/15 19:19:49 swildner Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,122 +22,102 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2002 +.\" $FreeBSD: head/lib/libc/locale/wcrtomb.3 250883 2013-05-21 19:59:37Z ed $ +.\" +.Dd May 21, 2013 .Dt WCRTOMB 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm wcrtomb -.Nd converts a wide character to a multibyte character (restartable) -.\" ---------------------------------------------------------------------- +.Nm wcrtomb , +.Nm c16rtomb , +.Nm c32rtomb +.Nd "convert a wide-character code to a character (restartable)" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wchar.h .Ft size_t -.Fn wcrtomb "char * restrict s" "wchar_t wc" "mbstate_t * restrict ps" -.\" ---------------------------------------------------------------------- +.Fn wcrtomb "char * restrict s" "wchar_t c" "mbstate_t * restrict ps" +.In uchar.h +.Ft size_t +.Fn c16rtomb "char * restrict s" "char16_t c" "mbstate_t * restrict ps" +.Ft size_t +.Fn c32rtomb "char * restrict s" "char32_t c" "mbstate_t * restrict ps" .Sh DESCRIPTION -.Fn wcrtomb -converts the wide character given by -.Fa wc -to the corresponding multibyte character, and stores it in the array -pointed to by -.Fa s -unless -.Fa s -is a null pointer. -This function will modify the first at most +The +.Fn wcrtomb , +.Fn c16rtomb +and +.Fn c32rtomb +functions store a multibyte sequence representing the +wide character +.Fa c , +including any necessary shift sequences, to the +character array +.Fa s , +storing a maximum of .Dv MB_CUR_MAX -bytes of the array pointed to by -.Fa s . -.Pp -The behaviour of -.Fn wcrtomb -is affected by the -.Dv LC_CTYPE -category of the current locale. +bytes. .Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It "wc == 0" -For state-dependent encodings, -.Fn wcrtomb -stores a null byte preceded by special byte sequence (if any) -to return to an initial state in the array pointed to by -.Fa s , -and the state object pointed to by -.Fa ps -also returns to an initial state. -.It "s == NULL" -.Fn wcrtomb -just places -.Fa ps -into an initial state. -It is equivalent to the following call: -.Bd -literal -offset indent -wcrtomb(buf, L'\\0', ps); -.Ed +If +.Fa s +is +.Dv NULL , +these functions behave as if +.Fa s +pointed to an internal buffer and +.Fa c +was a null wide character (L'\e0'). .Pp -Here, -.Fa buf -is a dummy buffer. -In this case, -.Fa wc -is ignored. -.It "ps == NULL" -.Fn mbrtowc -uses its own internal state object to keep the conversion state, -instead of -.Fa ps -mentioned in this manual page. +The +.Ft mbstate_t +argument, +.Fa ps , +is used to keep track of the shift state. +If it is +.Dv NULL , +these functions use an internal, static +.Vt mbstate_t +object, which is initialized to the initial conversion state +at program startup. .Pp -Calling any other functions in -.Lb libc -never changes the internal -state of -.Fn mbrtowc , -which is initialized at startup time of the program. -.El -.\" ---------------------------------------------------------------------- +As certain multibyte characters may only be represented by a series of +16-bit characters, the +.Fn c16rtomb +may need to invoked multiple times before a multibyte sequence is +returned. .Sh RETURN VALUES -.Fn wcrtomb -returns: -.Bl -tag -width 012345678901 -.It "positive" -The number of bytes (including any shift sequences) -which are stored in the array. -.It "(size_t)-1" -.Fa wc -is not a valid wide character. -In this case, -.Fn wcrtomb -also sets -.Va errno -to indicate the error. -.El -.\" ---------------------------------------------------------------------- +These functions return the length (in bytes) of the multibyte sequence +needed to represent +.Fa c , +or +.Po Vt size_t Pc Ns \-1 +if +.Fa c +is not a valid wide character code. .Sh ERRORS -.Fn wcrtomb -may cause an error in the following case: +The +.Fn wcrtomb , +.Fn c16rtomb +and +.Fn c32rtomb +functions will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa wc -is not a valid wide character. +An invalid wide character code was specified. .It Bq Er EINVAL -.Fa ps -points to an invalid or uninitialized mbstate_t object. +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO +.Xr mbrtowc 3 , +.Xr multibyte 3 , .Xr setlocale 3 , .Xr wctomb 3 -.\" ---------------------------------------------------------------------- .Sh STANDARDS The -.Fn wcrtomb -function conforms to -.St -isoC-amd1 . -The restrict qualifier is added at -.St -isoC-99 . +.Fn wcrtomb , +.Fn c16rtomb +and +.Fn c32rtomb +functions conform to +.St -isoC-2011 . diff --git a/lib/libc/string/wcsspn.c b/lib/libc/locale/wcrtomb.c similarity index 67% copy from lib/libc/string/wcsspn.c copy to lib/libc/locale/wcrtomb.c index e6f8bbb0dc..1b02ee5e17 100644 --- a/lib/libc/string/wcsspn.c +++ b/lib/libc/locale/wcrtomb.c @@ -1,7 +1,12 @@ /*- - * Copyright (c)1999 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,34 +28,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcsspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcsspn.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsspn.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/locale/wcrtomb.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include +#include "mblocal.h" size_t -wcsspn(const wchar_t *s, const wchar_t *set) +wcrtomb_l(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps, + locale_t locale) { - const wchar_t *p; - const wchar_t *q; - - p = s; - while (*p) { - q = set; - while (*q) { - if (*p == *q) - break; - q++; - } - if (!*q) - goto done; - p++; - } + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->wcrtomb; + return (XLOCALE_CTYPE(locale)->__wcrtomb(s, wc, ps)); +} -done: - return (p - s); +size_t +wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) +{ + return wcrtomb_l(s, wc, ps, __get_locale()); } diff --git a/lib/libc/locale/wcsftime.3 b/lib/libc/locale/wcsftime.3 index 03cb641538..67a12c6291 100644 --- a/lib/libc/locale/wcsftime.3 +++ b/lib/libc/locale/wcsftime.3 @@ -22,8 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcsftime.3,v 1.2 2002/11/29 17:35:09 ru Exp $ -.\" $DragonFly: src/lib/libc/locale/wcsftime.3,v 1.1 2005/08/10 13:42:28 joerg Exp $ +.\" $FreeBSD: head/lib/libc/locale/wcsftime.3 107392 2002-11-29 17:35:09Z ru $ .\" .Dd September 8, 2002 .Dt WCSFTIME 3 diff --git a/lib/libc/locale/wcsftime.c b/lib/libc/locale/wcsftime.c index 65aa9b5dfb..2be03fe5d4 100644 --- a/lib/libc/locale/wcsftime.c +++ b/lib/libc/locale/wcsftime.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,15 +28,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/locale/wcsftime.c,v 1.4 2004/04/07 09:47:56 tjr Exp $ - * $DragonFly: src/lib/libc/locale/wcsftime.c,v 1.1 2005/08/10 13:42:28 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/wcsftime.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include #include #include +#include "xlocale_private.h" /* * Convert date and time to a wide-character string. @@ -47,15 +53,18 @@ * format specifications in the format string. */ size_t -wcsftime(wchar_t * __restrict wcs, size_t maxsize, - const wchar_t * __restrict format, const struct tm * __restrict timeptr) +wcsftime_l(wchar_t * __restrict wcs, size_t maxsize, + const wchar_t * __restrict format, const struct tm * __restrict timeptr, + locale_t locale) { static const mbstate_t initial; mbstate_t mbs; - char *dst, *dstp, *sformat; + char *dst, *sformat; + const char *dstp; const wchar_t *formatp; size_t n, sflen; int sverrno; + FIX_LOCALE(locale); sformat = dst = NULL; @@ -65,13 +74,13 @@ wcsftime(wchar_t * __restrict wcs, size_t maxsize, */ mbs = initial; formatp = format; - sflen = wcsrtombs(NULL, &formatp, 0, &mbs); + sflen = wcsrtombs_l(NULL, &formatp, 0, &mbs, locale); if (sflen == (size_t)-1) goto error; if ((sformat = malloc(sflen + 1)) == NULL) goto error; mbs = initial; - wcsrtombs(sformat, &formatp, sflen + 1, &mbs); + wcsrtombs_l(sformat, &formatp, sflen + 1, &mbs, locale); /* * Allocate memory for longest multibyte sequence that will fit @@ -86,11 +95,11 @@ wcsftime(wchar_t * __restrict wcs, size_t maxsize, } if ((dst = malloc(maxsize * MB_CUR_MAX)) == NULL) goto error; - if (strftime(dst, maxsize, sformat, timeptr) == 0) + if (strftime_l(dst, maxsize, sformat, timeptr, locale) == 0) goto error; dstp = dst; mbs = initial; - n = mbsrtowcs(wcs, (const char **)&dstp, maxsize, &mbs); + n = mbsrtowcs_l(wcs, &dstp, maxsize, &mbs, locale); if (n == (size_t)-2 || n == (size_t)-1 || dstp != NULL) goto error; @@ -105,3 +114,9 @@ error: errno = sverrno; return (0); } +size_t +wcsftime(wchar_t * __restrict wcs, size_t maxsize, + const wchar_t * __restrict format, const struct tm * __restrict timeptr) +{ + return wcsftime_l(wcs, maxsize, format, timeptr, __get_locale()); +} diff --git a/lib/libc/locale/wcsnrtombs.c b/lib/libc/locale/wcsnrtombs.c new file mode 100644 index 0000000000..a0116b1d56 --- /dev/null +++ b/lib/libc/locale/wcsnrtombs.c @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcsnrtombs.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include +#include +#include +#include +#include "mblocal.h" + +size_t +wcsnrtombs_l(char * __restrict dst, const wchar_t ** __restrict src, size_t nwc, + size_t len, mbstate_t * __restrict ps, locale_t locale) +{ + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->wcsnrtombs; + return (XLOCALE_CTYPE(locale)->__wcsnrtombs(dst, src, nwc, len, ps)); +} +size_t +wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src, size_t nwc, + size_t len, mbstate_t * __restrict ps) +{ + return wcsnrtombs_l(dst, src, nwc, len, ps, __get_locale()); +} + + +size_t +__wcsnrtombs_std(char * __restrict dst, const wchar_t ** __restrict src, + size_t nwc, size_t len, mbstate_t * __restrict ps) +{ + mbstate_t mbsbak; + char buf[MB_LEN_MAX]; + const wchar_t *s; + size_t nbytes; + size_t nb; + struct xlocale_ctype *l = XLOCALE_CTYPE(__get_locale()); + + s = *src; + nbytes = 0; + + if (dst == NULL) { + while (nwc-- > 0) { + if ((nb = l->__wcrtomb(buf, *s, ps)) == (size_t)-1) + /* Invalid character - wcrtomb() sets errno. */ + return ((size_t)-1); + else if (*s == L'\0') + return (nbytes + nb - 1); + s++; + nbytes += nb; + } + return (nbytes); + } + + while (len > 0 && nwc-- > 0) { + if (len > (size_t)MB_CUR_MAX) { + /* Enough space to translate in-place. */ + if ((nb = l->__wcrtomb(dst, *s, ps)) == (size_t)-1) { + *src = s; + return ((size_t)-1); + } + } else { + /* + * May not be enough space; use temp. buffer. + * + * We need to save a copy of the conversion state + * here so we can restore it if the multibyte + * character is too long for the buffer. + */ + mbsbak = *ps; + if ((nb = l->__wcrtomb(buf, *s, ps)) == (size_t)-1) { + *src = s; + return ((size_t)-1); + } + if (nb > (int)len) { + /* MB sequence for character won't fit. */ + *ps = mbsbak; + break; + } + memcpy(dst, buf, nb); + } + if (*s == L'\0') { + *src = NULL; + return (nbytes + nb - 1); + } + s++; + dst += nb; + len -= nb; + nbytes += nb; + } + *src = s; + return (nbytes); +} diff --git a/lib/libc/locale/wcsrtombs.3 b/lib/libc/locale/wcsrtombs.3 index 7a92508c26..40e701b65e 100644 --- a/lib/libc/locale/wcsrtombs.3 +++ b/lib/libc/locale/wcsrtombs.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/wcsrtombs.3,v 1.8 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wcsrtombs.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2002 Citrus Project, +.\" Copyright (c) 2002-2004 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,158 +22,113 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2002 +.\" $FreeBSD: head/lib/libc/locale/wcsrtombs.3 132497 2004-07-21 10:54:57Z tjr $ +.\" +.Dd July 21, 2004 .Dt WCSRTOMBS 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm wcsrtombs -.Nd converts a wide character string to a multibyte character string \ -(restartable) -.\" ---------------------------------------------------------------------- +.Nm wcsrtombs , +.Nm wcsnrtombs +.Nd "convert a wide-character string to a character string (restartable)" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS -.In stdlib.h +.In wchar.h +.Ft size_t +.Fo wcsrtombs +.Fa "char * restrict dst" "const wchar_t ** restrict src" +.Fa "size_t len" "mbstate_t * restrict ps" +.Fc .Ft size_t -.Fn wcsrtombs "const char * restrict s" "const wchar_t ** restrict pwcs" \ -"size_t n" "mbstate_t * restrict ps" -.\" ---------------------------------------------------------------------- +.Fo wcsnrtombs +.Fa "char * restrict dst" "const wchar_t ** restrict src" "size_t nwc" +.Fa "size_t len" "mbstate_t * restrict ps" +.Fc .Sh DESCRIPTION The .Fn wcsrtombs -converts the null-terminated wide character string indirectly pointed -to by -.Fa pwcs -to the corresponding multibyte character string, -and stores it in the array pointed to by -.Fa s . -The conversion stops due to the following reasons: -.Bl -bullet -.It -The conversion reaches a null wide character. -In this case, the null wide character is also converted. -.It -The -.Fn wcsrtombs -has already stored -.Fa n -bytes in the array pointed to by -.Fa s . -.It -The conversion encounters an invalid character. -.El -.Pp -Each character will be converted as if -.Xr wcrtomb 3 -is continuously called, except the internal state of -.Xr wcrtomb 3 -will not be affected. -.Pp -After conversion, -if -.Fa s -is not a -.Dv NULL -pointer, the pointer object pointed to by -.Fa pwcs -is a -.Dv NULL -pointer (if the conversion is stopped due to reaching a null wide character) -or the first byte of the character just after the last character converted. +function converts a string of wide characters indirectly pointed to by +.Fa src +to a corresponding multibyte character string stored in the array +pointed to by +.Fa dst . +No more than +.Fa len +bytes are written to +.Fa dst . .Pp If -.Fa s -is not a -.Dv NULL -pointer and the conversion is stopped due to reaching -a null wide character, -.Fn wcsrtombs -places the state object pointed to by -.Fa ps -to an initial state after the conversion is taken place. +.Fa dst +is +.Dv NULL , +no characters are stored. .Pp -The behaviour of -.Fn wcsrtombs -is affected by the -.Dv LC_CTYPE -category of the current locale. +If +.Fa dst +is not +.Dv NULL , +the pointer pointed to by +.Fa src +is updated to point to the character after the one that conversion stopped at. +If conversion stops because a null character is encountered, +.Fa *src +is set to +.Dv NULL . .Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It "s == NULL" -.Fn wcsrtombs -returns the number of bytes to store the whole multibyte character string -corresponding to the wide character string pointed to by -.Fa pwcs , -not including the terminating null byte. -In this case, -.Fa n -is ignored. -.It "pwcs == NULL || *pwcs == NULL" -Undefined (may cause the program to crash). -.It "ps == NULL" +The +.Vt mbstate_t +argument, +.Fa ps , +is used to keep track of the shift state. +If it is +.Dv NULL , .Fn wcsrtombs -uses its own internal state object to keep the conversion state, -instead of -.Fa ps -mentioned in this manual page. +uses an internal, static +.Vt mbstate_t +object, which is initialized to the initial conversion state +at program startup. .Pp -Calling any other functions in -.Lb libc -never changes the internal -state of +The +.Fn wcsnrtombs +function behaves identically to .Fn wcsrtombs , -which is initialized at startup time of the program. -.El -.\" ---------------------------------------------------------------------- +except that conversion stops after reading at most +.Fa nwc +characters from the buffer pointed to by +.Fa src . .Sh RETURN VALUES -.Fn wcsrtombs -returns: -.Bl -tag -width 012345678901 -.It 0 or positive -Number of bytes stored in the array pointed to by -.Fa s , -except for a null byte. -There are no cases that the value returned is greater than -.Fa n -(unless -.Fa s -is a null pointer). -If the return value is equal to -.Fa n , -the string pointed to by -.Fa s -will not be null-terminated. -.It (size_t)-1 -.Fa pwcs -points to a string containing an invalid wide character. The .Fn wcsrtombs -also sets -.Va errno -to indicate the error. -.El -.\" ---------------------------------------------------------------------- +and +.Fn wcsnrtombs +functions return the number of bytes stored in +the array pointed to by +.Fa dst +(not including any terminating null), if successful, otherwise it returns +.Po Vt size_t Pc Ns \-1 . .Sh ERRORS +The .Fn wcsrtombs -may cause an error in the following case: +and +.Fn wcsnrtombs +functions will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa pwcs -points to a string containing an invalid wide character. +An invalid wide character was encountered. +.It Bq Er EINVAL +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO -.Xr setlocale 3 , +.Xr mbsrtowcs 3 , .Xr wcrtomb 3 , .Xr wcstombs 3 -.\" ---------------------------------------------------------------------- .Sh STANDARDS The .Fn wcsrtombs function conforms to -.St -ansiC . -The restrict qualifier is added at .St -isoC-99 . +.Pp +The +.Fn wcsnrtombs +function is an extension to the standard. diff --git a/lib/libc/locale/wcstoimax.c b/lib/libc/locale/wcsrtombs.c similarity index 62% copy from lib/libc/locale/wcstoimax.c copy to lib/libc/locale/wcsrtombs.c index c7343f5e9e..3aa8b9c7af 100644 --- a/lib/libc/locale/wcstoimax.c +++ b/lib/libc/locale/wcsrtombs.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoimax.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoimax.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,22 +27,30 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcsrtombs.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include -#include + #include #include +#include #include -#include - -#include "__wctoint.h" +#include "mblocal.h" -#define _FUNCNAME wcstoimax -#define __INT intmax_t -#define __INT_MIN INTMAX_MIN -#define __INT_MAX INTMAX_MAX +size_t +wcsrtombs_l(char * __restrict dst, const wchar_t ** __restrict src, size_t len, + mbstate_t * __restrict ps, locale_t locale) +{ + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->wcsrtombs; + return (XLOCALE_CTYPE(locale)->__wcsnrtombs(dst, src, SIZE_T_MAX, len, ps)); +} -#include "_wcstol.h" +size_t +wcsrtombs(char * __restrict dst, const wchar_t ** __restrict src, size_t len, + mbstate_t * __restrict ps) +{ + return wcsrtombs_l(dst, src, len, ps, __get_locale()); +} diff --git a/lib/libc/locale/wcstod.3 b/lib/libc/locale/wcstod.3 index fe045bf158..30d94dd300 100644 --- a/lib/libc/locale/wcstod.3 +++ b/lib/libc/locale/wcstod.3 @@ -1,6 +1,3 @@ -.\" $NetBSD: wcstod.3,v 1.5 2007/05/21 15:29:51 tnozaki Exp $ -.\" $DragonFly: src/lib/libc/locale/wcstod.3,v 1.1 2006/11/02 19:53:56 swildner Exp $ -.\" .\" Copyright (c) 2002, 2003 Tim J. Robbins .\" All rights reserved. .\" @@ -25,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: wcstod.3,v 1.4 2003/05/22 13:02:27 ru Exp $ +.\" $FreeBSD: head/lib/libc/locale/wcstod.3 115225 2003-05-22 13:02:28Z ru $ .\" -.Dd April 23, 2009 +.Dd February 22, 2003 .Dt WCSTOD 3 .Os .Sh NAME @@ -35,7 +32,7 @@ .Nm wcstod , .Nm wcstold .Nd convert string to -.Vt float , double , +.Vt float , double or .Vt "long double" .Sh LIBRARY @@ -44,19 +41,19 @@ or .In wchar.h .Ft float .Fn wcstof "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" -.Ft double -.Fn wcstod "const wchar_t * restrict nptr" "wchar_t **endptr" .Ft "long double" .Fn wcstold "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" +.Ft double +.Fn wcstod "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" .Sh DESCRIPTION The .Fn wcstof , -.Fn wcstod , +.Fn wcstod and .Fn wcstold functions are the wide-character versions of the .Fn strtof , -.Fn strtod , +.Fn strtod and .Fn strtold functions. @@ -68,11 +65,8 @@ for details. .Xr wcstol 3 .Sh STANDARDS The +.Fn wcstof , .Fn wcstod -function conforms to -.St -isoC-amd1 . -The -.Fn wcstof and .Fn wcstold functions conform to diff --git a/lib/libc/locale/wcstod.c b/lib/libc/locale/wcstod.c index 2b6ec7f9d1..ea857b2906 100644 --- a/lib/libc/locale/wcstod.c +++ b/lib/libc/locale/wcstod.c @@ -1,9 +1,11 @@ -/* $NetBSD: wcstod.c,v 1.14 2008/04/25 16:43:00 christos Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstod.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2006 Citrus Project, + * Copyright (c) 2002 Tim J. Robbins + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,18 +27,87 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstod.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include + #include -#include #include #include +#include "xlocale_private.h" + +/* + * Convert a string to a double-precision number. + * + * This is the wide-character counterpart of strtod(). So that we do not + * have to duplicate the code of strtod() here, we convert the supplied + * wide character string to multibyte and call strtod() on the result. + * This assumes that the multibyte encoding is compatible with ASCII + * for at least the digits, radix character and letters. + */ +double +wcstod_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + locale_t locale) +{ + static const mbstate_t initial; + mbstate_t mbs; + double val; + char *buf, *end; + const wchar_t *wcp = nptr; + size_t len; + size_t spaces = 0; + FIX_LOCALE(locale); + + while (iswspace_l(*wcp, locale)) { + wcp++; + spaces++; + } + + /* + * Convert the supplied numeric wide char. string to multibyte. + * + * We could attempt to find the end of the numeric portion of the + * wide char. string to avoid converting unneeded characters but + * choose not to bother; optimising the uncommon case where + * the input string contains a lot of text after the number + * duplicates a lot of strtod()'s functionality and slows down the + * most common cases. + */ + mbs = initial; + if ((len = wcsrtombs_l(NULL, &wcp, 0, &mbs, locale)) == (size_t)-1) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; + return (0.0); + } + if ((buf = malloc(len + 1)) == NULL) + return (0.0); + mbs = initial; + wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); + + /* Let strtod() do most of the work for us. */ + val = strtod_l(buf, &end, locale); + + /* + * We only know where the number ended in the _multibyte_ + * representation of the string. If the caller wants to know + * where it ended, count multibyte characters to find the + * corresponding position in the wide char string. + */ + if (endptr != NULL) { + /* XXX Assume each wide char is one byte. */ + *endptr = (wchar_t *)nptr + (end - buf); + if (buf != end) + *endptr += spaces; + } + -#define _FUNCNAME wcstod -#define _RETURN_TYPE double -#define _STRTOD_FUNC strtod + free(buf); -#include "_wcstod.h" + return (val); +} +double +wcstod(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr) +{ + return wcstod_l(nptr, endptr, __get_locale()); +} diff --git a/lib/libc/locale/wcstof.c b/lib/libc/locale/wcstof.c index 74fa34601c..6ac9febc96 100644 --- a/lib/libc/locale/wcstof.c +++ b/lib/libc/locale/wcstof.c @@ -1,8 +1,11 @@ -/* $NetBSD: wcstof.c,v 1.3 2008/04/25 16:43:00 christos Exp $ */ - /*- - * Copyright (c)2006 Citrus Project, + * Copyright (c) 2002, 2003 Tim J. Robbins + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,18 +27,57 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstof.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include + #include -#include #include #include +#include "xlocale_private.h" + +/* + * See wcstod() for comments as to the logic used. + */ +float +wcstof_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + locale_t locale) +{ + static const mbstate_t initial; + mbstate_t mbs; + float val; + char *buf, *end; + const wchar_t *wcp; + size_t len; + FIX_LOCALE(locale); + + while (iswspace_l(*nptr, locale)) + nptr++; + + wcp = nptr; + mbs = initial; + if ((len = wcsrtombs_l(NULL, &wcp, 0, &mbs, locale)) == (size_t)-1) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; + return (0.0); + } + if ((buf = malloc(len + 1)) == NULL) + return (0.0); + mbs = initial; + wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); + + val = strtof_l(buf, &end, locale); + + if (endptr != NULL) + *endptr = (wchar_t *)nptr + (end - buf); -#define _FUNCNAME wcstof -#define _RETURN_TYPE float -#define _STRTOD_FUNC strtof + free(buf); -#include "_wcstod.h" + return (val); +} +float +wcstof(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr) +{ + return wcstof_l(nptr, endptr, __get_locale()); +} diff --git a/lib/libc/locale/wcstoimax.c b/lib/libc/locale/wcstoimax.c index c7343f5e9e..7156ddbfcc 100644 --- a/lib/libc/locale/wcstoimax.c +++ b/lib/libc/locale/wcstoimax.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoimax.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoimax.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,22 +30,103 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * from @(#)strtol.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/wcstoimax.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include #include -#include #include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a wide character string to an intmax_t integer. + */ +intmax_t +wcstoimax_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base, locale_t locale) +{ + const wchar_t *s; + uintmax_t acc; + wchar_t c; + uintmax_t cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoimax -#define __INT intmax_t -#define __INT_MIN INTMAX_MIN -#define __INT_MAX INTMAX_MAX + /* + * See strtoimax for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == L'-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstol.h" + cutoff = neg ? (uintmax_t)-(INTMAX_MIN + INTMAX_MAX) + INTMAX_MAX + : INTMAX_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? INTMAX_MIN : INTMAX_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +intmax_t +wcstoimax(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base) +{ + return wcstoimax_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wcstol.3 b/lib/libc/locale/wcstol.3 index fe3efcd668..94e5c12361 100644 --- a/lib/libc/locale/wcstol.3 +++ b/lib/libc/locale/wcstol.3 @@ -1,6 +1,3 @@ -.\" $NetBSD: wcstol.3,v 1.2 2006/08/08 17:32:05 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wcstol.3,v 1.1 2006/11/02 19:53:56 swildner Exp $ -.\" .\" Copyright (c) 2002 Tim J. Robbins .\" All rights reserved. .\" @@ -25,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wcstol.3,v 1.4 2002/11/29 17:35:09 ru Exp $ +.\" $FreeBSD: head/lib/libc/locale/wcstol.3 107392 2002-11-29 17:35:09Z ru $ .\" -.Dd November 2, 2006 +.Dd September 7, 2002 .Dt WCSTOL 3 .Os .Sh NAME @@ -48,18 +45,18 @@ integer .Sh SYNOPSIS .In wchar.h .Ft long -.Fn wcstol "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstol "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .Ft "unsigned long" -.Fn wcstoul "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstoul "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .Ft "long long" -.Fn wcstoll "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstoll "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .Ft "unsigned long long" -.Fn wcstoull "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstoull "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .In inttypes.h .Ft intmax_t -.Fn wcstoimax "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstoimax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .Ft uintmax_t -.Fn wcstoumax "const wchar_t *nptr" "wchar_t **endptr" "int base" +.Fn wcstoumax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base" .Sh DESCRIPTION The .Fn wcstol , diff --git a/lib/libc/locale/wcstol.c b/lib/libc/locale/wcstol.c index cfdfc4c4a5..eb19b0b696 100644 --- a/lib/libc/locale/wcstol.c +++ b/lib/libc/locale/wcstol.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstol.c,v 1.3 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstol.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,21 +30,101 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstol.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include + #include #include #include -#include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a string to a long integer. + */ +long +wcstol_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int + base, locale_t locale) +{ + const wchar_t *s; + unsigned long acc; + wchar_t c; + unsigned long cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstol -#define __INT long -#define __INT_MIN LONG_MIN -#define __INT_MAX LONG_MAX + /* + * See strtol for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstol.h" + cutoff = neg ? (unsigned long)-(LONG_MIN + LONG_MAX) + LONG_MAX + : LONG_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= L'a' && c <= L'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? LONG_MIN : LONG_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +long +wcstol(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base) +{ + return wcstol_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wcstold.c b/lib/libc/locale/wcstold.c index 0f94fbc6c0..d26b057a43 100644 --- a/lib/libc/locale/wcstold.c +++ b/lib/libc/locale/wcstold.c @@ -1,8 +1,11 @@ -/* $NetBSD: wcstold.c,v 1.3 2008/07/08 00:23:28 gmcgarry Exp $ */ - /*- - * Copyright (c)2006 Citrus Project, + * Copyright (c) 2002, 2003 Tim J. Robbins + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,18 +27,64 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstold.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include + #include -#include #include #include +#include "xlocale_private.h" + +/* + * See wcstod() for comments as to the logic used. + */ +long double +wcstold_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + locale_t locale) +{ + static const mbstate_t initial; + mbstate_t mbs; + long double val; + char *buf, *end; + const wchar_t *wcp = nptr; + size_t len; + size_t spaces = 0; + FIX_LOCALE(locale); + + while (iswspace_l(*wcp, locale)) { + wcp++; + spaces++; + } + + wcp = nptr; + mbs = initial; + if ((len = wcsrtombs_l(NULL, &wcp, 0, &mbs, locale)) == (size_t)-1) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; + return (0.0); + } + if ((buf = malloc(len + 1)) == NULL) + return (0.0); + mbs = initial; + wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); + + val = strtold_l(buf, &end, locale); + + if (endptr != NULL) { + /* XXX Assume each wide char is one byte. */ + *endptr = (wchar_t *)nptr + (end - buf); + if (buf != end) + *endptr += spaces; + } -#define _FUNCNAME wcstold -#define _RETURN_TYPE long double -#define _STRTOD_FUNC strtold + free(buf); -#include "_wcstod.h" + return (val); +} +long double +wcstold(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr) +{ + return wcstold_l(nptr, endptr, __get_locale()); +} diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/wcstoll.c index 321f2bba26..b334c08aa9 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/wcstoll.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoll.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoll.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,21 +30,102 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)strtoq.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/wcstoll.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include #include #include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a wide character string to a long long integer. + */ +long long +wcstoll_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base, locale_t locale) +{ + const wchar_t *s; + unsigned long long acc; + wchar_t c; + unsigned long long cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoll -#define __INT /* LONGLONG */ long long int -#define __INT_MIN LLONG_MIN -#define __INT_MAX LLONG_MAX + /* + * See strtoll for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == L'-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstol.h" + cutoff = neg ? (unsigned long long)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX + : LLONG_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= L'a' && c <= L'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? LLONG_MIN : LLONG_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +long long +wcstoll(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base) +{ + return wcstoll_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wcstombs.3 b/lib/libc/locale/wcstombs.3 index 651e287e48..18c23dacce 100644 --- a/lib/libc/locale/wcstombs.3 +++ b/lib/libc/locale/wcstombs.3 @@ -1,8 +1,9 @@ -.\" $NetBSD: src/lib/libc/locale/wcstombs.3,v 1.7 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wcstombs.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Copyright (c)2002 Citrus Project, -.\" All rights reserved. +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -12,11 +13,14 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,109 +29,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2002 +.\" From @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" From FreeBSD: src/lib/libc/locale/multibyte.3,v 1.22 2003/11/08 03:23:11 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/wcstombs.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 8, 2004 .Dt WCSTOMBS 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm wcstombs -.Nd converts a wide character string to a multibyte character string -.\" ---------------------------------------------------------------------- +.Nd convert a wide-character string to a character string .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In stdlib.h .Ft size_t -.Fn wcstombs "const char * restrict s" "wchar_t * restrict pwcs" "size_t n" -.\" ---------------------------------------------------------------------- +.Fo wcstombs +.Fa "char * restrict mbstring" "const wchar_t * restrict wcstring" +.Fa "size_t nbytes" +.Fc .Sh DESCRIPTION -.Fn wcstombs -converts the null-terminated wide character string pointed to by -.Fa pwcs -to the corresponding multibyte character string, -and stores it in the array pointed to by -.Fa s . -This function may modify the first at most -.Fa n -bytes of the array pointed to by -.Fa s . -Each character will be converted as if -.Xr wctomb 3 -is continuously called, except the internal state of -.Xr wctomb 3 -will not be affected. -.Pp -For state-dependent encoding, the -.Fn wcstombs -implies the result multibyte character string pointed to by -.Fa s -always to begin with an initial state. -.Pp -The behaviour of -.Fn wcstombs -is affected by the -.Dv LC_CTYPE -category of the current locale. -.Pp -These are the special cases: -.Bl -tag -width 012345678901 -.It s == NULL The .Fn wcstombs -returns the number of bytes to store the whole multibyte character string -corresponding to the wide character string pointed to by -.Fa pwcs . -In this case, -.Fa n -is ignored. -.It pwcs == NULL -Undefined (may cause the program to crash). -.El -.\" ---------------------------------------------------------------------- +function converts a wide character string +.Fa wcstring +into a multibyte character string, +.Fa mbstring , +beginning in the initial conversion state. +Up to +.Fa nbytes +bytes are stored in +.Fa mbstring . +Partial multibyte characters at the end of the string are not stored. +The multibyte character string is null terminated if there is room. .Sh RETURN VALUES +The .Fn wcstombs -returns: -.Bl -tag -width 012345678901 -.It 0 or positive -Number of bytes stored in the array pointed to by -.Fa s . -There are no cases that the value returned is greater than -.Fa n -(unless -.Fa s -is a null pointer). -If the return value is equal to -.Fa n , -the string pointed to by -.Fa s -will not be null-terminated. -.It (size_t)-1 -.Fa pwcs -points to a string containing an invalid wide character. -.Fn wcstombs -also sets -.Va errno -to indicate the error. -.El -.\" ---------------------------------------------------------------------- +function returns the number of bytes converted +(not including any terminating null), if successful, otherwise it returns +.Po Vt size_t Pc Ns \-1 . .Sh ERRORS +The .Fn wcstombs -may cause an error in the following case: +function will fail if: .Bl -tag -width Er .It Bq Er EILSEQ -.Fa pwcs -points to a string containing an invalid wide character. +An invalid wide character was encountered. +.It Bq Er EINVAL +The conversion state is invalid. .El -.\" ---------------------------------------------------------------------- .Sh SEE ALSO -.Xr setlocale 3 , +.Xr mbstowcs 3 , +.Xr multibyte 3 , +.Xr wcsrtombs 3 , .Xr wctomb 3 -.\" ---------------------------------------------------------------------- .Sh STANDARDS The .Fn wcstombs function conforms to -.St -ansiC . -The restrict qualifier is added at .St -isoC-99 . diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/wcstombs.c similarity index 64% copy from lib/libc/locale/wcstoll.c copy to lib/libc/locale/wcstombs.c index 321f2bba26..a4b94f087b 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/wcstombs.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoll.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoll.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,21 +27,32 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstombs.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include -#include + #include #include #include -#include +#include "mblocal.h" -#include "__wctoint.h" +size_t +wcstombs_l(char * __restrict s, const wchar_t * __restrict pwcs, size_t n, + locale_t locale) +{ + static const mbstate_t initial; + mbstate_t mbs; + const wchar_t *pwcsp; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoll -#define __INT /* LONGLONG */ long long int -#define __INT_MIN LLONG_MIN -#define __INT_MAX LLONG_MAX + mbs = initial; + pwcsp = pwcs; + return (XLOCALE_CTYPE(locale)->__wcsnrtombs(s, &pwcsp, SIZE_T_MAX, n, &mbs)); +} +size_t +wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n) +{ + return wcstombs_l(s, pwcs, n, __get_locale()); +} -#include "_wcstol.h" diff --git a/lib/libc/locale/wcstoul.c b/lib/libc/locale/wcstoul.c index ac45eb1759..dfeb547717 100644 --- a/lib/libc/locale/wcstoul.c +++ b/lib/libc/locale/wcstoul.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoul.c,v 1.3 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoul.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, +/* + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,20 +30,99 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wcstoul.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include + #include #include #include -#include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a wide character string to an unsigned long integer. + */ +unsigned long +wcstoul_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base, locale_t locale) +{ + const wchar_t *s; + unsigned long acc; + wchar_t c; + unsigned long cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoul -#define __UINT unsigned long -#define __UINT_MAX ULONG_MAX + /* + * See strtol for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == L'-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstoul.h" + cutoff = ULONG_MAX / base; + cutlim = ULONG_MAX % base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= L'a' && c <= L'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = ULONG_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +unsigned long +wcstoul(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int base) +{ + return wcstoul_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wcstoull.c b/lib/libc/locale/wcstoull.c index 788f598fdb..92489e1464 100644 --- a/lib/libc/locale/wcstoull.c +++ b/lib/libc/locale/wcstoull.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoull.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoull.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,20 +30,101 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)strtouq.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/wcstoull.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include #include #include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a wide character string to an unsigned long long integer. + */ +unsigned long long +wcstoull_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base, locale_t locale) +{ + const wchar_t *s; + unsigned long long acc; + wchar_t c; + unsigned long long cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoull -#define __UINT /* LONGLONG */ unsigned long long int -#define __UINT_MAX ULLONG_MAX + /* + * See strtoull for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == L'-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstoul.h" + cutoff = ULLONG_MAX / base; + cutlim = ULLONG_MAX % base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= L'a' && c <= L'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = ULLONG_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +unsigned long long +wcstoull(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base) +{ + return wcstoull_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wcstoumax.c b/lib/libc/locale/wcstoumax.c index 937f335699..48c420f3dc 100644 --- a/lib/libc/locale/wcstoumax.c +++ b/lib/libc/locale/wcstoumax.c @@ -1,9 +1,11 @@ -/* $NetBSD: src/lib/libc/locale/wcstoumax.c,v 1.2 2004/06/21 21:20:43 itojun Exp $ */ -/* $DragonFly: src/lib/libc/locale/wcstoumax.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /*- - * Copyright (c)2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,21 +30,101 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * from @(#)strtoul.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/locale/wcstoumax.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#include + #include #include -#include #include #include #include +#include "xlocale_private.h" -#include "__wctoint.h" +/* + * Convert a wide character string to a uintmax_t integer. + */ +uintmax_t +wcstoumax_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base, locale_t locale) +{ + const wchar_t *s; + uintmax_t acc; + wchar_t c; + uintmax_t cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME wcstoumax -#define __UINT uintmax_t -#define __UINT_MAX UINTMAX_MAX + /* + * See strtoimax for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (iswspace_l(c, locale)); + if (c == L'-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == L'+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_wcstoul.h" + cutoff = UINTMAX_MAX / base; + cutlim = UINTMAX_MAX % base; + for ( ; ; c = *s++) { +#ifdef notyet + if (iswdigit_l(c, locale)) + c = digittoint_l(c, locale); + else +#endif + if (c >= L'0' && c <= L'9') + c -= L'0'; + else if (c >= L'A' && c <= L'Z') + c -= L'A' - 10; + else if (c >= L'a' && c <= L'z') + c -= L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = UINTMAX_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (wchar_t *)(any ? s - 1 : nptr); + return (acc); +} +uintmax_t +wcstoumax(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, + int base) +{ + return wcstoumax_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/locale/wctob.3 b/lib/libc/locale/wctob.3 deleted file mode 100644 index 0f7d35d747..0000000000 --- a/lib/libc/locale/wctob.3 +++ /dev/null @@ -1,88 +0,0 @@ -.\" $NetBSD: src/lib/libc/locale/wctob.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wctob.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd March 3, 2003 -.Dt WCTOB 3 -.Os -.\" ---------------------------------------------------------------------- -.Sh NAME -.Nm wctob -.Nd convert a wide character to a single byte character -.\" ---------------------------------------------------------------------- -.Sh LIBRARY -.Lb libc -.\" ---------------------------------------------------------------------- -.Sh SYNOPSIS -.In wchar.h -.Ft int -.Fn wctob "wint_t wc" -.\" ---------------------------------------------------------------------- -.Sh DESCRIPTION -The -.Fn wctob -function converts a wide character -.Fa wc -to a corresponding single byte character in the initial shift state of -the current locale. -.Pp -The behaviour of -.Fn wctob -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- -.Sh RETURN VALUES -The -.Fn wctob -function returns: -.Bl -tag -width 012345678901 -.It Dv EOF -If -.Fa wc -is -.Dv WEOF -or if -.Fa wc -does not correspond to a valid single byte character representation. -.It (otherwise) -A single byte character corresponding to -.Fa wc . -.El -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- -.Sh SEE ALSO -.Xr btowc 3 , -.Xr setlocale 3 , -.Xr wcrtomb 3 -.\" ---------------------------------------------------------------------- -.Sh STANDARDS -The -.Fn wctob -function conforms to -.St -isoC-amd1 . diff --git a/lib/libc/stdio/fwprintf.c b/lib/libc/locale/wctob.c similarity index 67% copy from lib/libc/stdio/fwprintf.c copy to lib/libc/locale/wctob.c index 479f9b3832..34d7f69065 100644 --- a/lib/libc/stdio/fwprintf.c +++ b/lib/libc/locale/wctob.c @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2002 Tim J. Robbins + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +28,29 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/fwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/fwprintf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/locale/wctob.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include + +#include #include #include +#include "mblocal.h" int -fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) +wctob_l(wint_t c, locale_t locale) { - int ret; - va_list ap; - - va_start(ap, fmt); - ret = vfwprintf(fp, fmt, ap); - va_end(ap); + static const mbstate_t initial; + mbstate_t mbs = initial; + char buf[MB_LEN_MAX]; + FIX_LOCALE(locale); - return (ret); + if (c == WEOF || XLOCALE_CTYPE(locale)->__wcrtomb(buf, c, &mbs) != 1) + return (EOF); + return ((unsigned char)*buf); +} +int +wctob(wint_t c) +{ + return wctob_l(c, __get_locale()); } diff --git a/lib/libc/locale/wctomb.3 b/lib/libc/locale/wctomb.3 index 3d404d2366..64a45d121e 100644 --- a/lib/libc/locale/wctomb.3 +++ b/lib/libc/locale/wctomb.3 @@ -1,8 +1,9 @@ -.\" $NetBSD: src/lib/libc/locale/wctomb.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wctomb.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ +.\" Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. .\" -.\" Copyright (c)2002 Citrus Project, -.\" All rights reserved. +.\" This code is derived from software contributed to Berkeley by +.\" Donn Seeley of BSDI. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -12,11 +13,14 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,108 +29,80 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 3, 2002 +.\" From @(#)multibyte.3 8.1 (Berkeley) 6/4/93 +.\" From FreeBSD: src/lib/libc/locale/multibyte.3,v 1.22 2003/11/08 03:23:11 tjr Exp +.\" $FreeBSD: head/lib/libc/locale/wctomb.3 165903 2007-01-09 00:28:16Z imp $ +.\" +.Dd April 8, 2004 .Dt WCTOMB 3 .Os .Sh NAME .Nm wctomb -.Nd converts a wide character to a multibyte character +.Nd convert a wide-character code to a character .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In stdlib.h .Ft int -.Fn wctomb "char * s" "const wchar_t wchar" +.Fn wctomb "char *mbchar" "wchar_t wchar" .Sh DESCRIPTION The .Fn wctomb -converts the wide character +function converts a wide character .Fa wchar -to the corresponding multibyte character, and stores it in the array -pointed to by -.Fa s . -.Fn wctomb -may store at most -.Dv MB_CUR_MAX -bytes in the array. +into a multibyte character and stores +the result in +.Fa mbchar . +The object pointed to by +.Fa mbchar +must be large enough to accommodate the multibyte character, which +may be up to +.Dv MB_LEN_MAX +bytes. .Pp -In state-dependent encoding, -.Fn wctomb -may store the special sequence to change the conversion state -before an actual multibyte character into the array pointed to by -.Fa s . +A call with a null +.Fa mbchar +pointer returns nonzero if the current locale requires shift states, +zero otherwise; +if shift states are required, the shift state is reset to the initial state. +.Sh RETURN VALUES If -.Fa wchar -is a null wide character -.Pq Sq \e0 , -this function sets its own internal state to an initial conversion state. -.Pp -Calling any other functions in -.Lb libc -never changes the internal state of -.Fn wctomb , -except changing the -.Dv LC_CTYPE -category of the current locale by calling -.Xr setlocale 3 . -Such -.Xr setlocale 3 -calls cause the internal state of this function to be indeterminate. -.Pp -The behaviour of +.Fa mbchar +is +.Dv NULL , +the .Fn wctomb -is affected by the -.Dv LC_CTYPE -category of the current locale. -.Pp -There is one special case: -.Bl -tag -width 012345678901 -.It s == NULL +function returns nonzero if shift states are supported, +zero otherwise. +If +.Fa mbchar +is valid, .Fn wctomb -initializes its own internal state to an initial state, and -determines whether the current encoding is state-dependent. -This function returns 0 if the encoding is state-independent, -otherwise non-zero. +returns +the number of bytes processed in +.Fa mbchar , +or \-1 if no multibyte character +could be recognized or converted. In this case, -.Fa wchar -is completely ignored. -.El -.Sh RETURN VALUES -Normally, +.Fn wctomb Ns 's +internal conversion state is undefined. +.Sh ERRORS +The .Fn wctomb -returns: -.Bl -tag -width 012345678901 -.It positive -Number of bytes for the valid multibyte character pointed to by -.Fa s . -There are no cases that the value returned is greater than -.Fa n -or the value of the -.Dv MB_CUR_MAX -macro. -.It -1 -.Fa wchar -is an invalid wide character. +function will fail if: +.Bl -tag -width Er +.It Bq Er EILSEQ +An invalid multibyte sequence was detected. +.It Bq Er EINVAL +The internal conversion state is invalid. .El -.Pp -If -.Fa s -is equal to -.Dv NULL , -.Fn mbtowc -returns: -.Bl -tag -width 0123456789 -.It 0 -The current encoding is state-independent. -.It non-zero -The current encoding is state-dependent. -.El -.Sh ERRORS -No errors are defined. .Sh SEE ALSO -.Xr setlocale 3 +.Xr mbtowc 3 , +.Xr wcrtomb 3 , +.Xr wcstombs 3 , +.Xr wctob 3 .Sh STANDARDS The .Fn wctomb function conforms to -.St -ansiC . +.St -isoC-99 . diff --git a/lib/libc/string/wcsdup.c b/lib/libc/locale/wctomb.c similarity index 63% copy from lib/libc/string/wcsdup.c copy to lib/libc/locale/wctomb.c index a8fb551307..3fcdda108e 100644 --- a/lib/libc/string/wcsdup.c +++ b/lib/libc/locale/wctomb.c @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2005 Tim J. Robbins. + * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,20 +28,32 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsdup.c,v 1.1 2005/08/13 05:54:33 tjr Exp $ + * $FreeBSD: head/lib/libc/locale/wctomb.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include +#include "mblocal.h" -wchar_t * -wcsdup(const wchar_t *s) +int +wctomb_l(char *s, wchar_t wchar, locale_t locale) { - wchar_t *copy; - size_t len; + static const mbstate_t initial; + size_t rval; + FIX_LOCALE(locale); - len = wcslen(s) + 1; - if ((copy = malloc(len * sizeof(wchar_t))) == NULL) - return (NULL); - return (wmemcpy(copy, s, len)); + if (s == NULL) { + /* No support for state dependent encodings. */ + locale->wctomb = initial; + return (0); + } + if ((rval = XLOCALE_CTYPE(locale)->__wcrtomb(s, wchar, &locale->wctomb)) == (size_t)-1) + return (-1); + return ((int)rval); +} +int +wctomb(char *s, wchar_t wchar) +{ + return wctomb_l(s, wchar, __get_locale()); } diff --git a/lib/libc/locale/wctrans.3 b/lib/libc/locale/wctrans.3 index 2061ac9442..d9ae30343f 100644 --- a/lib/libc/locale/wctrans.3 +++ b/lib/libc/locale/wctrans.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/wctrans.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wctrans.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, +.\" Copyright (c) 2002 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,66 +22,101 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 4, 2003 +.\" $FreeBSD: head/lib/libc/locale/wctrans.3 107392 2002-11-29 17:35:09Z ru $ +.\" +.Dd October 3, 2002 .Dt WCTRANS 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm wctrans -.Nd get character mapping identifier by name -.\" ---------------------------------------------------------------------- +.Nm towctrans , wctrans +.Nd "wide character mapping functions" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wctype.h +.Ft wint_t +.Fn towctrans "wint_t wc" "wctrans_t desc" .Ft wctrans_t -.Fn wctrans "const char *charmap" -.\" ---------------------------------------------------------------------- +.Fn wctrans "const char *charclass" .Sh DESCRIPTION The .Fn wctrans -function returns a character mapping identifier corresponding to the -locale-specific character mapping name -.Fa charmap . -This identifier can be used on the subsequent calls of +function returns a value of type +.Vt wctrans_t +which represents the requested wide character mapping operation and +may be used as the second argument for calls to .Fn towctrans . -The following names are defined in all locales: -.Bd -literal -offset indent -tolower toupper -.Ed .Pp -The behaviour of -.Fn wctrans -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- +The following character mapping names are recognised: +.Bl -column -offset indent ".Li tolower" ".Li toupper" +.It Li "tolower toupper" +.El +.Pp +The +.Fn towctrans +function transliterates the wide character +.Fa wc +according to the mapping described by +.Fa desc . .Sh RETURN VALUES +The +.Fn towctrans +function returns the transliterated character if successful, otherwise +it returns the character unchanged and sets +.Va errno . +.Pp +The .Fn wctrans -returns: -.Bl -tag -width 012345678901 -.It 0 -If the string -.Fa charmap -does not corresponding to a valid character mapping name. -.It non-zero -A character mapping identifier corresponding to -.Fa charmap . +function returns non-zero if successful, otherwise it returns zero +and sets +.Va errno . +.Sh EXAMPLES +Reimplement +.Fn towupper +in terms of +.Fn towctrans +and +.Fn wctrans : +.Bd -literal -offset indent +wint_t +mytowupper(wint_t wc) +{ + return (towctrans(wc, wctrans("toupper"))); +} +.Ed +.Sh ERRORS +The +.Fn towctrans +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The supplied +.Fa desc +argument is invalid. .El .Pp -Note: wctype_t is a scalar type, e.g., a pointer. -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- +The +.Fn wctrans +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The requested mapping name is invalid. +.El .Sh SEE ALSO -.Xr iswctype 3 , -.Xr setlocale 3 , +.Xr tolower 3 , +.Xr toupper 3 , .Xr wctype 3 -.\" ---------------------------------------------------------------------- .Sh STANDARDS The .Fn towctrans -function conforms to -.St -isoC-amd1 . +and +.Fn wctrans +functions conform to +.St -p1003.1-2001 . +.Sh HISTORY +The +.Fn towctrans +and +.Fn wctrans +functions first appeared in +.Fx 5.0 . diff --git a/lib/libc/stdio/fgetws.c b/lib/libc/locale/wctrans.c similarity index 50% copy from lib/libc/stdio/fgetws.c copy to lib/libc/locale/wctrans.c index 31170da816..b76a2ad880 100644 --- a/lib/libc/stdio/fgetws.c +++ b/lib/libc/locale/wctrans.c @@ -1,10 +1,12 @@ -/* $NetBSD: fgetws.c,v 1.2 2006/07/03 17:06:36 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fgetws.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,63 +28,74 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Original version ID: - * FreeBSD: src/lib/libc/stdio/fgetws.c,v 1.4 2002/09/20 13:25:40 tjr Exp - * + * $FreeBSD: head/lib/libc/locale/wctrans.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include "namespace.h" -#include + #include -#include -#include -#include "un-namespace.h" +#include +#include +#include "xlocale_private.h" -#include "libc_private.h" -#include "local.h" -#include "priv_stdio.h" +enum { + _WCT_ERROR = 0, + _WCT_TOLOWER = 1, + _WCT_TOUPPER = 2 +}; -wchar_t * -fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp) +wint_t +towctrans_l(wint_t wc, wctrans_t desc, locale_t locale) { - wchar_t *wsp; - wint_t wc; - - _DIAGASSERT(fp != NULL); - _DIAGASSERT(ws != NULL); - - FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); - - if (n <= 0) { + switch (desc) { + case _WCT_TOLOWER: + wc = towlower_l(wc, locale); + break; + case _WCT_TOUPPER: + wc = towupper_l(wc, locale); + break; + case _WCT_ERROR: + default: errno = EINVAL; - goto error; + break; } - wsp = ws; - while (n-- > 1) { - wc = __fgetwc_unlock(fp); - if (__sferror(fp) != 0) - goto error; - if (__sfeof(fp) != 0) { - if (wsp == ws) { - /* EOF/error, no characters read yet. */ - goto error; - } - break; - } - *wsp++ = (wchar_t)wc; - if (wc == L'\n') { - break; - } - } + return (wc); +} +wint_t +towctrans(wint_t wc, wctrans_t desc) +{ + return towctrans_l(wc, desc, __get_locale()); +} - *wsp++ = L'\0'; - FUNLOCKFILE(fp); +/* + * wctrans() calls this will a 0 locale. If this is ever modified to actually + * use the locale, wctrans() must be modified to call __get_locale(). + */ +wctrans_t +wctrans_l(const char *charclass, locale_t locale) +{ + struct { + const char *name; + wctrans_t trans; + } ccls[] = { + { "tolower", _WCT_TOLOWER }, + { "toupper", _WCT_TOUPPER }, + { NULL, _WCT_ERROR }, /* Default */ + }; + int i; - return (ws); + i = 0; + while (ccls[i].name != NULL && strcmp(ccls[i].name, charclass) != 0) + i++; -error: - FUNLOCKFILE(fp); - return (NULL); + if (ccls[i].trans == _WCT_ERROR) + errno = EINVAL; + return (ccls[i].trans); } + +wctrans_t +wctrans(const char *charclass) +{ + return wctrans_l(charclass, 0); +} + diff --git a/lib/libc/locale/wctype.3 b/lib/libc/locale/wctype.3 index 165a9993a6..c8edf1ccad 100644 --- a/lib/libc/locale/wctype.3 +++ b/lib/libc/locale/wctype.3 @@ -1,7 +1,4 @@ -.\" $NetBSD: src/lib/libc/locale/wctype.3,v 1.5 2004/01/24 16:58:54 wiz Exp $ -.\" $DragonFly: src/lib/libc/locale/wctype.3,v 1.2 2006/10/21 22:17:09 swildner Exp $ -.\" -.\" Copyright (c)2003 Citrus Project, +.\" Copyright (c) 2002 Tim J. Robbins .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,68 +22,98 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 4, 2003 +.\" $FreeBSD: head/lib/libc/locale/wctype.3 163314 2006-10-13 16:11:12Z ru $ +.\" +.Dd March 27, 2004 .Dt WCTYPE 3 .Os -.\" ---------------------------------------------------------------------- .Sh NAME -.Nm wctype -.Nd get character class identifier by name -.\" ---------------------------------------------------------------------- +.Nm iswctype , wctype +.Nd "wide character class functions" .Sh LIBRARY .Lb libc -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .In wctype.h +.Ft int +.Fn iswctype "wint_t wc" "wctype_t charclass" .Ft wctype_t -.Fn wctype "const char *charclass" -.\" ---------------------------------------------------------------------- +.Fn wctype "const char *property" .Sh DESCRIPTION The .Fn wctype -function returns a character class identifier corresponding to the -locale-specific character class name -.Fa charclass . -This identifier can be used in subsequent calls of +function returns a value of type +.Vt wctype_t +which represents the requested wide character class and +may be used as the second argument for calls to .Fn iswctype . -The following names are defined in all locales: -.Bd -literal -offset indent -alnum alpha blank cntrl digit graph -lower print punct space upper xdigit -.Ed .Pp -The behaviour of -.Fn wctype -is affected by the -.Dv LC_CTYPE -category of the current locale. -.\" ---------------------------------------------------------------------- +The following character class names are recognised: +.Bl -column -offset indent ".Li alnum" ".Li cntrl" ".Li ideogram" ".Li print" ".Li space" +.It Li "alnum cntrl ideogram print space xdigit" +.It Li "alpha digit lower punct special" +.It Li "blank graph phonogram rune upper" +.El +.Pp +The +.Fn iswctype +function checks whether the wide character +.Fa wc +is in the character class +.Fa charclass . .Sh RETURN VALUES -.Fn wctype -returns: -.Bl -tag -width 012345678901 -.It 0 -If +The +.Fn iswctype +function returns non-zero if and only if +.Fa wc +has the property described by +.Fa charclass , +or .Fa charclass -does not correspond to a valid character class name. -.It non-zero -A character class identifier corresponding to -.Fa charclass . -.El +is zero. .Pp -Note: wctype_t is a scalar type, e.g., a pointer. -.\" ---------------------------------------------------------------------- -.Sh ERRORS -No errors are defined. -.\" ---------------------------------------------------------------------- +The +.Fn wctype +function returns 0 if +.Fa property +is invalid, otherwise it returns a value of type +.Vt wctype_t +that can be used in subsequent calls to +.Fn iswctype . +.Sh EXAMPLES +Reimplement +.Xr iswalpha 3 +in terms of +.Fn iswctype +and +.Fn wctype : +.Bd -literal -offset indent +int +myiswalpha(wint_t wc) +{ + return (iswctype(wc, wctype("alpha"))); +} +.Ed .Sh SEE ALSO -.Xr iswctype 3 , -.Xr setlocale 3 , -.Xr towctrans 3 , -.Xr wctrans 3 -.\" ---------------------------------------------------------------------- +.Xr ctype 3 , +.Xr nextwctype 3 .Sh STANDARDS The +.Fn iswctype +and +.Fn wctype +functions conform to +.St -p1003.1-2001 . +The +.Dq Li ideogram , +.Dq Li phonogram , +.Dq Li special , +and +.Dq Li rune +character classes are extensions. +.Sh HISTORY +The +.Fn iswctype +and .Fn wctype -function conforms to -.St -isoC-amd1 . +functions first appeared in +.Fx 5.0 . diff --git a/lib/libc/locale/wctype.c b/lib/libc/locale/wctype.c new file mode 100644 index 0000000000..ccdb33fa16 --- /dev/null +++ b/lib/libc/locale/wctype.c @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2002 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/wctype.c 228269 2011-12-05 00:00:47Z jilles $ + */ + + +#include +#include +#include +#include + +#undef iswctype +int +iswctype(wint_t wc, wctype_t charclass) +{ + return (__istype(wc, charclass)); +} +int +iswctype_l(wint_t wc, wctype_t charclass, locale_t locale) +{ + return __istype_l(wc, charclass, locale); +} + +/* + * IMPORTANT: The 0 in the call to this function in wctype() must be changed to + * __get_locale() if wctype_l() is ever modified to actually use the locale + * parameter. + */ +wctype_t +wctype_l(const char *property, locale_t locale) +{ + const char *propnames = + "alnum\0" + "alpha\0" + "blank\0" + "cntrl\0" + "digit\0" + "graph\0" + "lower\0" + "print\0" + "punct\0" + "space\0" + "upper\0" + "xdigit\0" + "ideogram\0" /* BSD extension */ + "special\0" /* BSD extension */ + "phonogram\0" /* BSD extension */ + "rune\0"; /* BSD extension */ + static const wctype_t propmasks[] = { + _CTYPE_A|_CTYPE_D, + _CTYPE_A, + _CTYPE_B, + _CTYPE_C, + _CTYPE_D, + _CTYPE_G, + _CTYPE_L, + _CTYPE_R, + _CTYPE_P, + _CTYPE_S, + _CTYPE_U, + _CTYPE_X, + _CTYPE_I, + _CTYPE_T, + _CTYPE_Q, + 0xFFFFFF00L + }; + size_t len1, len2; + const char *p; + const wctype_t *q; + + len1 = strlen(property); + q = propmasks; + for (p = propnames; (len2 = strlen(p)) != 0; p += len2 + 1) { + if (len1 == len2 && memcmp(property, p, len1) == 0) + return (*q); + q++; + } + + return (0UL); +} + +wctype_t wctype(const char *property) +{ + return wctype_l(property, 0); +} diff --git a/lib/libc/locale/wcwidth.3 b/lib/libc/locale/wcwidth.3 index 615cbeb59d..a3bbc7f5d6 100644 --- a/lib/libc/locale/wcwidth.3 +++ b/lib/libc/locale/wcwidth.3 @@ -1,6 +1,3 @@ -.\" $NetBSD: wcwidth.3,v 1.3 2006/10/14 07:51:01 wiz Exp $ -.\" FreeBSD: src/lib/libc/locale/wcwidth.3,v 1.6 2004/08/17 04:56:03 trhodes Exp -.\" .\" Copyright (c) 2002 Tim J. Robbins .\" All rights reserved. .\" @@ -25,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $DragonFly: src/lib/libc/locale/wcwidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/locale/wcwidth.3 133915 2004-08-17 04:56:03Z trhodes $ .\" -.Dd May 30, 2008 +.Dd August 17, 2004 .Dt WCWIDTH 3 .Os .Sh NAME @@ -50,7 +47,7 @@ The .Fn wcwidth function returns 0 if the .Fa wc -argument is a nul wide character (L'\e0'), +argument is a null wide character (L'\e0'), \-1 if .Fa wc is not printable, @@ -69,14 +66,14 @@ int column, w; column = 0; while ((ch = getwchar()) != WEOF) { w = wcwidth(ch); - if (w \*[Gt] 0 \*[Am]\*[Am] column + w \*[Gt]= 20) { + if (w > 0 && column + w >= 20) { putwchar(L'\en'); column = 0; } putwchar(ch); if (ch == L'\en') column = 0; - else if (w \*[Gt] 0) + else if (w > 0) column += w; } .Ed diff --git a/lib/libc/gen/toascii.c b/lib/libc/locale/wcwidth.c similarity index 71% rename from lib/libc/gen/toascii.c rename to lib/libc/locale/wcwidth.c index e61b5386b0..2f210b6ba1 100644 --- a/lib/libc/gen/toascii.c +++ b/lib/libc/locale/wcwidth.c @@ -1,15 +1,20 @@ -/* $NetBSD: src/lib/libc/gen/toascii.c,v 1.2 2003/08/07 16:42:58 agc Exp $ */ -/* $DragonFly: src/lib/libc/gen/toascii.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -18,7 +23,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -34,14 +39,23 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)isctype.c 5.2 (Berkeley) 6/1/90 + * $FreeBSD: head/lib/libc/locale/wcwidth.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include -#undef toascii +#include +#include +#include + +#undef wcwidth + +int +wcwidth(wchar_t wc) +{ + return (__wcwidth(wc)); +} int -toascii(int c) +wcwidth_l(wchar_t wc, locale_t locale) { - return ((c) & 0177); + return (__wcwidth_l(wc, locale)); } diff --git a/lib/libc/locale/xlocale.3 b/lib/libc/locale/xlocale.3 new file mode 100644 index 0000000000..4d9326ef78 --- /dev/null +++ b/lib/libc/locale/xlocale.3 @@ -0,0 +1,280 @@ +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/lib/libc/locale/xlocale.3 250244 2013-05-04 17:06:47Z pluknet $ +.\" +.Dd September 17, 2011 +.Dt XLOCALE 3 +.Os +.Sh NAME +.Nm xlocale +.Nd Thread-safe extended locale support +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In xlocale.h +.Sh DESCRIPTION +The extended locale support includes a set of functions for setting +thread-local locales, +as well convenience functions for performing locale-aware +calls with a specified locale. +.Pp +The core of the xlocale API is the +.Fa locale_t +type. +This is an opaque type encapsulating a locale. +Instances of this can be either set as the locale for a specific thread or +passed directly to the +.Fa _l +suffixed variants of various standard C functions. +Two special +.Fa locale_t +values are available: +.Bl -bullet -offset indent +.It +NULL refers to the current locale for the thread, +or to the global locale if no locale has been set for this thread. +.It +LC_GLOBAL_LOCALE refers to the global locale. +.El +.Pp +The global locale is the locale set with the +.Xr setlocale 3 +function. +.Sh SEE ALSO +.Xr duplocale 3 , +.Xr freelocale 3 , +.Xr localeconv 3 , +.Xr newlocale 3 , +.Xr querylocale 3 , +.Xr uselocale 3 , +.Sh CONVENIENCE FUNCTIONS +The xlocale API includes a number of +.Fa _l +suffixed convenience functions. +These are variants of standard C functions +that have been modified to take an explicit +.Fa locale_t +parameter as the final argument or, in the case of variadic functions, +as an additional argument directly before the format string. +Each of these functions accepts either NULL or LC_GLOBAL_LOCALE. +In these functions, NULL refers to the C locale, +rather than the thread's current locale. +If you wish to use the thread's current locale, +then use the unsuffixed version of the function. +.Pp +These functions are exposed by including +.In xlocale.h +.Em after +including the relevant headers for the standard variant. +For example, the +.Xr strtol_l 3 +function is exposed by including +.In xlocale.h +after +.In stdlib.h , +which defines +.Xr strtol 3 . +.Pp +For reference, +a complete list of the locale-aware functions that are available in this form, +along with the headers that expose them, is provided here: +.Bl -tag -width " " +.It In wctype.h +.Xr iswalnum_l 3 , +.Xr iswalpha_l 3 , +.Xr iswcntrl_l 3 , +.Xr iswctype_l 3 , +.Xr iswdigit_l 3 , +.Xr iswgraph_l 3 , +.Xr iswlower_l 3 , +.Xr iswprint_l 3 , +.Xr iswpunct_l 3 , +.Xr iswspace_l 3 , +.Xr iswupper_l 3 , +.Xr iswxdigit_l 3 , +.Xr towlower_l 3 , +.Xr towupper_l 3 , +.Xr wctype_l 3 , +.It In ctype.h +.Xr digittoint_l 3 , +.Xr isalnum_l 3 , +.Xr isalpha_l 3 , +.Xr isblank_l 3 , +.Xr iscntrl_l 3 , +.Xr isdigit_l 3 , +.Xr isgraph_l 3 , +.Xr ishexnumber_l 3 , +.Xr isideogram_l 3 , +.Xr islower_l 3 , +.Xr isnumber_l 3 , +.Xr isphonogram_l 3 , +.Xr isprint_l 3 , +.Xr ispunct_l 3 , +.Xr isrune_l 3 , +.Xr isspace_l 3 , +.Xr isspecial_l 3 , +.Xr isupper_l 3 , +.Xr isxdigit_l 3 , +.Xr tolower_l 3 , +.Xr toupper_l 3 +.It In inttypes.h +.Xr strtoimax_l 3 , +.Xr strtoumax_l 3 , +.Xr wcstoimax_l 3 , +.Xr wcstoumax_l 3 +.It In langinfo.h +.Xr nl_langinfo_l 3 +.It In monetary.h +.Xr strfmon_l 3 +.It In stdio.h +.Xr asprintf_l 3 , +.Xr fprintf_l 3 , +.Xr fscanf_l 3 , +.Xr printf_l 3 , +.Xr scanf_l 3 , +.Xr snprintf_l 3 , +.Xr sprintf_l 3 , +.Xr sscanf_l 3 , +.Xr vasprintf_l 3 , +.Xr vfprintf_l 3 , +.Xr vfscanf_l 3 , +.Xr vprintf_l 3 , +.Xr vscanf_l 3 , +.Xr vsnprintf_l 3 , +.Xr vsprintf_l 3 , +.Xr vsscanf_l 3 +.It In stdlib.h +.Xr atof_l 3 , +.Xr atoi_l 3 , +.Xr atol_l 3 , +.Xr atoll_l 3 , +.Xr mblen_l 3 , +.Xr mbstowcs_l 3 , +.Xr mbtowc_l 3 , +.Xr strtod_l 3 , +.Xr strtof_l 3 , +.Xr strtol_l 3 , +.Xr strtold_l 3 , +.Xr strtoll_l 3 , +.Xr strtoq_l 3 , +.Xr strtoul_l 3 , +.Xr strtoull_l 3 , +.Xr strtouq_l 3 , +.Xr wcstombs_l 3 , +.Xr wctomb_l 3 +.It In string.h +.Xr strcoll_l 3 , +.Xr strxfrm_l 3 , +.Xr strcasecmp_l 3 , +.Xr strcasestr_l 3 , +.Xr strncasecmp_l 3 +.It In time.h +.Xr strftime_l 3 +.Xr strptime_l 3 +.It In wchar.h +.Xr btowc_l 3 , +.Xr fgetwc_l 3 , +.Xr fgetws_l 3 , +.Xr fputwc_l 3 , +.Xr fputws_l 3 , +.Xr fwprintf_l 3 , +.Xr fwscanf_l 3 , +.Xr getwc_l 3 , +.Xr getwchar_l 3 , +.Xr mbrlen_l 3 , +.Xr mbrtowc_l 3 , +.Xr mbsinit_l 3 , +.Xr mbsnrtowcs_l 3 , +.Xr mbsrtowcs_l 3 , +.Xr putwc_l 3 , +.Xr putwchar_l 3 , +.Xr swprintf_l 3 , +.Xr swscanf_l 3 , +.Xr ungetwc_l 3 , +.Xr vfwprintf_l 3 , +.Xr vfwscanf_l 3 , +.Xr vswprintf_l 3 , +.Xr vswscanf_l 3 , +.Xr vwprintf_l 3 , +.Xr vwscanf_l 3 , +.Xr wcrtomb_l 3 , +.Xr wcscoll_l 3 , +.Xr wcsftime_l 3 , +.Xr wcsnrtombs_l 3 , +.Xr wcsrtombs_l 3 , +.Xr wcstod_l 3 , +.Xr wcstof_l 3 , +.Xr wcstol_l 3 , +.Xr wcstold_l 3 , +.Xr wcstoll_l 3 , +.Xr wcstoul_l 3 , +.Xr wcstoull_l 3 , +.Xr wcswidth_l 3 , +.Xr wcsxfrm_l 3 , +.Xr wctob_l 3 , +.Xr wcwidth_l 3 , +.Xr wprintf_l 3 , +.Xr wscanf_l 3 +.It In wctype.h +.Xr iswblank_l 3 , +.Xr iswhexnumber_l 3 , +.Xr iswideogram_l 3 , +.Xr iswnumber_l 3 , +.Xr iswphonogram_l 3 , +.Xr iswrune_l 3 , +.Xr iswspecial_l 3 , +.Xr nextwctype_l 3 , +.Xr towctrans_l 3 , +.Xr wctrans_l 3 +.It In xlocale.h +.Xr localeconv_l 3 +.El +.Sh STANDARDS +The functions +conform to +.St -p1003.1-2008 . +.Sh HISTORY +The xlocale APIs first appeared in Darwin 8.0. +This implementation was written by David Chisnall, +under sponsorship from the FreeBSD Foundation and first appeared in +.Fx 9.1 . +.Sh CAVEATS +The +.Xr setlocale 3 +function, and others in the family, refer to the global locale. +Other functions that depend on the locale, however, +will take the thread-local locale if one has been set. +This means that the idiom of setting the locale using +.Xr setlocale 3 , +calling a locale-dependent function, +and then restoring the locale will not +have the expected behavior if the current thread has had a locale set using +.Xr uselocale 3 . +You should avoid this idiom and prefer to use the +.Fa _l +suffixed versions instead. diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c new file mode 100644 index 0000000000..695e435b99 --- /dev/null +++ b/lib/libc/locale/xlocale.c @@ -0,0 +1,371 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/xlocale.c 232498 2012-03-04 15:31:13Z theraven $ + */ + +#include +#include +#include +#include +#include "libc_private.h" +#include "xlocale_private.h" + +/** + * Each locale loader declares a global component. This is used by setlocale() + * and also by xlocale with LC_GLOBAL_LOCALE.. + */ +extern struct xlocale_component __xlocale_global_collate; +extern struct xlocale_component __xlocale_global_ctype; +extern struct xlocale_component __xlocale_global_monetary; +extern struct xlocale_component __xlocale_global_numeric; +extern struct xlocale_component __xlocale_global_time; +extern struct xlocale_component __xlocale_global_messages; +/* + * And another version for the statically-allocated C locale. We only have + * components for the parts that are expected to be sensible. + */ +extern struct xlocale_component __xlocale_C_collate; +extern struct xlocale_component __xlocale_C_ctype; + +#ifndef __NO_TLS +/* + * The locale for this thread. + */ +__thread locale_t __thread_locale; +#endif +/* + * Flag indicating that one or more per-thread locales exist. + */ +int __has_thread_locale; +/* + * Private functions in setlocale.c. + */ +const char * +__get_locale_env(int category); +int +__detect_path_locale(void); + +struct _xlocale __xlocale_global_locale = { + {0}, + { + &__xlocale_global_collate, + &__xlocale_global_ctype, + &__xlocale_global_monetary, + &__xlocale_global_numeric, + &__xlocale_global_time, + &__xlocale_global_messages + }, + 1, + 0, + 1, + 0 +}; + +struct _xlocale __xlocale_C_locale = { + {0}, + { + &__xlocale_C_collate, + &__xlocale_C_ctype, + 0, 0, 0, 0 + }, + 1, + 0, + 1, + 0 +}; + +static void*(*constructors[])(const char*, locale_t) = +{ + __collate_load, + __ctype_load, + __monetary_load, + __numeric_load, + __time_load, + __messages_load +}; + +static pthread_key_t locale_info_key; +static int fake_tls; +static locale_t thread_local_locale; + +static void init_key(void) +{ + + pthread_key_create(&locale_info_key, xlocale_release); + pthread_setspecific(locale_info_key, (void*)42); + if (pthread_getspecific(locale_info_key) == (void*)42) { + pthread_setspecific(locale_info_key, 0); + } else { + fake_tls = 1; + } + /* At least one per-thread locale has now been set. */ + __has_thread_locale = 1; + __detect_path_locale(); +} + +static pthread_once_t once_control = PTHREAD_ONCE_INIT; + +static locale_t +get_thread_locale(void) +{ + + _once(&once_control, init_key); + + return (fake_tls ? thread_local_locale : + pthread_getspecific(locale_info_key)); +} + +#ifdef __NO_TLS +locale_t +__get_locale(void) +{ + locale_t l = get_thread_locale(); + return (l ? l : &__xlocale_global_locale); + +} +#endif + +static void +set_thread_locale(locale_t loc) +{ + + _once(&once_control, init_key); + + if (NULL != loc) { + xlocale_retain((struct xlocale_refcounted*)loc); + } + locale_t old = pthread_getspecific(locale_info_key); + if ((NULL != old) && (loc != old)) { + xlocale_release((struct xlocale_refcounted*)old); + } + if (fake_tls) { + thread_local_locale = loc; + } else { + pthread_setspecific(locale_info_key, loc); + } +#ifndef __NO_TLS + __thread_locale = loc; + __set_thread_rune_locale(loc); +#endif +} + +/** + * Clean up a locale, once its reference count reaches zero. This function is + * called by xlocale_release(), it should not be called directly. + */ +static void +destruct_locale(void *l) +{ + locale_t loc = l; + + for (int type=0 ; typecomponents[type]) { + xlocale_release(loc->components[type]); + } + } + if (loc->csym) { + free(loc->csym); + } + free(l); +} + +/** + * Allocates a new, uninitialised, locale. + */ +static locale_t +alloc_locale(void) +{ + locale_t new = calloc(sizeof(struct _xlocale), 1); + + new->header.destructor = destruct_locale; + new->monetary_locale_changed = 1; + new->numeric_locale_changed = 1; + return (new); +} +static void +copyflags(locale_t new, locale_t old) +{ + new->using_monetary_locale = old->using_monetary_locale; + new->using_numeric_locale = old->using_numeric_locale; + new->using_time_locale = old->using_time_locale; + new->using_messages_locale = old->using_messages_locale; +} + +static int dupcomponent(int type, locale_t base, locale_t new) +{ + /* Always copy from the global locale, since it has mutable components. + */ + struct xlocale_component *src = base->components[type]; + + if (&__xlocale_global_locale == base) { + new->components[type] = constructors[type](src->locale, new); + if (new->components[type]) { + strncpy(new->components[type]->locale, src->locale, + ENCODING_LEN); + } + } else if (base->components[type]) { + new->components[type] = xlocale_retain(base->components[type]); + } else { + /* If the component was NULL, return success - if base is a + * valid locale then the flag indicating that this isn't + * present should be set. If it isn't a valid locale, then + * we're stuck anyway. */ + return 1; + } + return (0 != new->components[type]); +} + +/* + * Public interfaces. These are the five public functions described by the + * xlocale interface. + */ + +locale_t newlocale(int mask, const char *locale, locale_t base) +{ + int type; + const char *realLocale = locale; + int useenv = 0; + int success = 1; + + _once(&once_control, init_key); + + locale_t new = alloc_locale(); + if (NULL == new) { + return (NULL); + } + + FIX_LOCALE(base); + copyflags(new, base); + + if (NULL == locale) { + realLocale = "C"; + } else if ('\0' == locale[0]) { + useenv = 1; + } + + for (type=0 ; typecomponents[type] = + constructors[type](realLocale, new); + if (new->components[type]) { + strncpy(new->components[type]->locale, + realLocale, ENCODING_LEN); + } else { + success = 0; + break; + } + } else { + if (!dupcomponent(type, base, new)) { + success = 0; + break; + } + } + mask >>= 1; + } + if (0 == success) { + xlocale_release(new); + new = NULL; + } + + return (new); +} + +locale_t duplocale(locale_t base) +{ + locale_t new = alloc_locale(); + int type; + + _once(&once_control, init_key); + + if (NULL == new) { + return (NULL); + } + + FIX_LOCALE(base); + copyflags(new, base); + + for (type=0 ; type= XLC_LAST) + return (NULL); + if (loc->components[type]) + return (loc->components[type]->locale); + return ("C"); +} + +/* + * Installs the specified locale_t as this thread's locale. + */ +locale_t uselocale(locale_t loc) +{ + locale_t old = get_thread_locale(); + if (NULL != loc) { + if (LC_GLOBAL_LOCALE == loc) { + loc = NULL; + } + set_thread_locale(loc); + } + return (old ? old : LC_GLOBAL_LOCALE); +} + diff --git a/lib/libc/locale/xlocale_private.h b/lib/libc/locale/xlocale_private.h new file mode 100644 index 0000000000..778181858a --- /dev/null +++ b/lib/libc/locale/xlocale_private.h @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by David Chisnall under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/locale/xlocale_private.h 250883 2013-05-21 19:59:37Z ed $ + */ + +#ifndef _XLOCALE_PRIVATE__H_ +#define _XLOCALE_PRIVATE__H_ + +#include +#include +#include +#include +#include +#include +#include "setlocale.h" + +enum { + XLC_COLLATE = 0, + XLC_CTYPE, + XLC_MONETARY, + XLC_NUMERIC, + XLC_TIME, + XLC_MESSAGES, + XLC_LAST +}; + + +/** + * Header used for objects that are reference counted. Objects may optionally + * have a destructor associated, which is responsible for destroying the + * structure. Global / static versions of the structure should have no + * destructor set - they can then have their reference counts manipulated as + * normal, but will not do anything with them. + * + * The header stores a retain count - objects are assumed to have a reference + * count of 1 when they are created, but the retain count is 0. When the + * retain count is less than 0, they are freed. + */ +struct xlocale_refcounted { + /** Number of references to this component. */ + long retain_count; + /** Function used to destroy this component, if one is required*/ + void(*destructor)(void*); +}; +/** + * Header for a locale component. All locale components must begin with this + * header. + */ +struct xlocale_component { + struct xlocale_refcounted header; + /** Name of the locale used for this component. */ + char locale[ENCODING_LEN+1]; +}; + +/** + * xlocale structure, stores per-thread locale information. + */ +struct _xlocale { + struct xlocale_refcounted header; + /** Components for the locale. */ + struct xlocale_component *components[XLC_LAST]; + /** Flag indicating if components[XLC_MONETARY] has changed since the + * last call to localeconv_l() with this locale. */ + int monetary_locale_changed; + /** Flag indicating whether this locale is actually using a locale for + * LC_MONETARY (1), or if it should use the C default instead (0). */ + int using_monetary_locale; + /** Flag indicating if components[XLC_NUMERIC] has changed since the + * last call to localeconv_l() with this locale. */ + int numeric_locale_changed; + /** Flag indicating whether this locale is actually using a locale for + * LC_NUMERIC (1), or if it should use the C default instead (0). */ + int using_numeric_locale; + /** Flag indicating whether this locale is actually using a locale for + * LC_TIME (1), or if it should use the C default instead (0). */ + int using_time_locale; + /** Flag indicating whether this locale is actually using a locale for + * LC_MESSAGES (1), or if it should use the C default instead (0). */ + int using_messages_locale; + /** The structure to be returned from localeconv_l() for this locale. */ + struct lconv lconv; + /** Persistent state used by mblen() calls. */ + __mbstate_t mblen; + /** Persistent state used by mbrlen() calls. */ + __mbstate_t mbrlen; + /** Persistent state used by mbrtoc16() calls. */ + __mbstate_t mbrtoc16; + /** Persistent state used by mbrtoc32() calls. */ + __mbstate_t mbrtoc32; + /** Persistent state used by mbrtowc() calls. */ + __mbstate_t mbrtowc; + /** Persistent state used by mbsnrtowcs() calls. */ + __mbstate_t mbsnrtowcs; + /** Persistent state used by mbsrtowcs() calls. */ + __mbstate_t mbsrtowcs; + /** Persistent state used by mbtowc() calls. */ + __mbstate_t mbtowc; + /** Persistent state used by c16rtomb() calls. */ + __mbstate_t c16rtomb; + /** Persistent state used by c32rtomb() calls. */ + __mbstate_t c32rtomb; + /** Persistent state used by wcrtomb() calls. */ + __mbstate_t wcrtomb; + /** Persistent state used by wcsnrtombs() calls. */ + __mbstate_t wcsnrtombs; + /** Persistent state used by wcsrtombs() calls. */ + __mbstate_t wcsrtombs; + /** Persistent state used by wctomb() calls. */ + __mbstate_t wctomb; + /** Buffer used by nl_langinfo_l() */ + char *csym; +}; + +/** + * Increments the reference count of a reference-counted structure. + */ +__attribute__((unused)) static void* +xlocale_retain(void *val) +{ + struct xlocale_refcounted *obj = val; + atomic_add_long(&(obj->retain_count), 1); + return (val); +} +/** + * Decrements the reference count of a reference-counted structure, freeing it + * if this is the last reference, calling its destructor if it has one. + */ +__attribute__((unused)) static void +xlocale_release(void *val) +{ + struct xlocale_refcounted *obj = val; + long count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; + if (count < 0) { + if (0 != obj->destructor) { + obj->destructor(obj); + } + } +} + +/** + * Load functions. Each takes the name of a locale and a pointer to the data + * to be initialised as arguments. Two special values are allowed for the + */ +extern void* __collate_load(const char*, locale_t); +extern void* __ctype_load(const char*, locale_t); +extern void* __messages_load(const char*, locale_t); +extern void* __monetary_load(const char*, locale_t); +extern void* __numeric_load(const char*, locale_t); +extern void* __time_load(const char*, locale_t); + +extern struct _xlocale __xlocale_global_locale; +extern struct _xlocale __xlocale_C_locale; + +/** + * Caches the rune table in TLS for fast access. + */ +void __set_thread_rune_locale(locale_t loc); +/** + * Flag indicating whether a per-thread locale has been set. If no per-thread + * locale has ever been set, then we always use the global locale. + */ +extern int __has_thread_locale; +#ifndef __NO_TLS +/** + * The per-thread locale. Avoids the need to use pthread lookup functions when + * getting the per-thread locale. + */ +extern __thread locale_t __thread_locale; + +/** + * Returns the current locale for this thread, or the global locale if none is + * set. The caller does not have to free the locale. The return value from + * this call is not guaranteed to remain valid after the locale changes. As + * such, this should only be called within libc functions. + */ +static inline locale_t __get_locale(void) +{ + + if (!__has_thread_locale) { + return (&__xlocale_global_locale); + } + return (__thread_locale ? __thread_locale : &__xlocale_global_locale); +} +#else +locale_t __get_locale(void); +#endif + +/** + * Two magic values are allowed for locale_t objects. NULL and -1. This + * function maps those to the real locales that they represent. + */ +static inline locale_t get_real_locale(locale_t locale) +{ + switch ((intptr_t)locale) { + case 0: return (&__xlocale_C_locale); + case -1: return (&__xlocale_global_locale); + default: return (locale); + } +} + +/** + * Replace a placeholder locale with the real global or thread-local locale_t. + */ +#define FIX_LOCALE(l) (l = get_real_locale(l)) + +#endif diff --git a/lib/libc/nls/C.msg b/lib/libc/nls/C.msg new file mode 100644 index 0000000000..3863fc514d --- /dev/null +++ b/lib/libc/nls/C.msg @@ -0,0 +1,301 @@ +$ $FreeBSD: head/lib/libc/nls/C.msg 250250 2013-05-04 19:07:22Z pluknet $ +$ +$ Message catalog for C locale (template) +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operation not permitted +$ ENOENT +2 No such file or directory +$ ESRCH +3 No such process +$ EINTR +4 Interrupted system call +$ EIO +5 Input/output error +$ ENXIO +6 Device not configured +$ E2BIG +7 Argument list too long +$ ENOEXEC +8 Exec format error +$ EBADF +9 Bad file descriptor +$ ECHILD +10 No child processes +$ EDEADLK +11 Resource deadlock avoided +$ ENOMEM +12 Cannot allocate memory +$ EACCES +13 Permission denied +$ EFAULT +14 Bad address +$ ENOTBLK +15 Block device required +$ EBUSY +16 Device busy +$ EEXIST +17 File exists +$ EXDEV +18 Cross-device link +$ ENODEV +19 Operation not supported by device +$ ENOTDIR +20 Not a directory +$ EISDIR +21 Is a directory +$ EINVAL +22 Invalid argument +$ ENFILE +23 Too many open files in system +$ EMFILE +24 Too many open files +$ ENOTTY +25 Inappropriate ioctl for device +$ ETXTBSY +26 Text file busy +$ EFBIG +27 File too large +$ ENOSPC +28 No space left on device +$ ESPIPE +29 Illegal seek +$ EROFS +30 Read-only file system +$ EMLINK +31 Too many links +$ EPIPE +32 Broken pipe +$ EDOM +33 Numerical argument out of domain +$ ERANGE +34 Result too large +$ EAGAIN, EWOULDBLOCK +35 Resource temporarily unavailable +$ EINPROGRESS +36 Operation now in progress +$ EALREADY +37 Operation already in progress +$ ENOTSOCK +38 Socket operation on non-socket +$ EDESTADDRREQ +39 Destination address required +$ EMSGSIZE +40 Message too long +$ EPROTOTYPE +41 Protocol wrong type for socket +$ ENOPROTOOPT +42 Protocol not available +$ EPROTONOSUPPORT +43 Protocol not supported +$ ESOCKTNOSUPPORT +44 Socket type not supported +$ EOPNOTSUPP +45 Operation not supported +$ EPFNOSUPPORT +46 Protocol family not supported +$ EAFNOSUPPORT +47 Address family not supported by protocol family +$ EADDRINUSE +48 Address already in use +$ EADDRNOTAVAIL +49 Can't assign requested address +$ ENETDOWN +50 Network is down +$ ENETUNREACH +51 Network is unreachable +$ ENETRESET +52 Network dropped connection on reset +$ ECONNABORTED +53 Software caused connection abort +$ ECONNRESET +54 Connection reset by peer +$ ENOBUFS +55 No buffer space available +$ EISCONN +56 Socket is already connected +$ ENOTCONN +57 Socket is not connected +$ ESHUTDOWN +58 Can't send after socket shutdown +$ ETOOMANYREFS +59 Too many references: can't splice +$ ETIMEDOUT +60 Operation timed out +$ ECONNREFUSED +61 Connection refused +$ ELOOP +62 Too many levels of symbolic links +$ ENAMETOOLONG +63 File name too long +$ EHOSTDOWN +64 Host is down +$ EHOSTUNREACH +65 No route to host +$ ENOTEMPTY +66 Directory not empty +$ EPROCLIM +67 Too many processes +$ EUSERS +68 Too many users +$ EDQUOT +69 Disc quota exceeded +$ ESTALE +70 Stale NFS file handle +$ EREMOTE +71 Too many levels of remote in path +$ EBADRPC +72 RPC struct is bad +$ ERPCMISMATCH +73 RPC version wrong +$ EPROGUNAVAIL +74 RPC prog. not avail +$ EPROGMISMATCH +75 Program version wrong +$ EPROCUNAVAIL +76 Bad procedure for program +$ ENOLCK +77 No locks available +$ ENOSYS +78 Function not implemented +$ EFTYPE +79 Inappropriate file type or format +$ EAUTH +80 Authentication error +$ ENEEDAUTH +81 Need authenticator +$ EIDRM +82 Identifier removed +$ ENOMSG +83 No message of desired type +$ EOVERFLOW +84 Value too large to be stored in data type +$ ECANCELED +85 Operation canceled +$ EILSEQ +86 Illegal byte sequence +$ ENOATTR +87 Attribute not found +$ EDOOFUS +88 Programming error +$ EBADMSG +89 Bad message +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 Protocol error +$ ENOTCAPABLE +93 Capabilities insufficient +$ ECAPMODE +94 Not permitted in capability mode +$ ENOTRECOVERABLE +95 State not recoverable +$ EOWNERDEAD +96 Previous owner died +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Hangup +$ SIGINT +2 Interrupt +$ SIGQUIT +3 Quit +$ SIGILL +4 Illegal instruction +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Floating point exception +$ SIGKILL +9 Killed +$ SIGBUS +10 Bus error +$ SIGSEGV +11 Segmentation fault +$ SIGSYS +12 Bad system call +$ SIGPIPE +13 Broken pipe +$ SIGALRM +14 Alarm clock +$ SIGTERM +15 Terminated +$ SIGURG +16 Urgent I/O condition +$ SIGSTOP +17 Suspended (signal) +$ SIGTSTP +18 Suspended +$ SIGCONT +19 Continued +$ SIGCHLD +20 Child exited +$ SIGTTIN +21 Stopped (tty input) +$ SIGTTOU +22 Stopped (tty output) +$ SIGIO +23 I/O possible +$ SIGXCPU +24 Cputime limit exceeded +$ SIGXFSZ +25 Filesize limit exceeded +$ SIGVTALRM +26 Virtual timer expired +$ SIGPROF +27 Profiling timer expired +$ SIGWINCH +28 Window size changes +$ SIGINFO +29 Information request +$ SIGUSR1 +30 User defined signal 1 +$ SIGUSR2 +31 User defined signal 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 Address family for hostname not supported +$ EAI_AGAIN +2 Temporary failure in name resolution +$ EAI_BADFLAGS +3 Invalid value for ai_flags +$ EAI_FAIL +4 Non-recoverable failure in name resolution +$ EAI_FAMILY +5 ai_family not supported +$ EAI_MEMORY +6 Memory allocation failure +$ 7 (obsolete) +7 No address associated with hostname +$ EAI_NONAME +8 hostname nor servname provided, or not known +$ EAI_SERVICE +9 servname not supported for ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype not supported +$ EAI_SYSTEM +11 System error returned in errno +$ EAI_BADHINTS +12 Invalid value for hints +$ EAI_PROTOCOL +13 Resolved protocol is unknown +$ EAI_OVERFLOW +14 Argument buffer overflow +$ 0 +32766 Success +$ NL_MSGMAX +32767 Unknown error diff --git a/lib/libc/nls/Makefile.inc b/lib/libc/nls/Makefile.inc index df29ffc3d0..ac34c7b29b 100644 --- a/lib/libc/nls/Makefile.inc +++ b/lib/libc/nls/Makefile.inc @@ -1,13 +1,44 @@ # from $NetBSD: Makefile.inc,v 1.7 1995/02/27 13:06:20 cgd Exp $ -# $FreeBSD: src/lib/libc/nls/Makefile.inc,v 1.5.2.2 2001/04/25 10:04:07 ru Exp $ +# $FreeBSD: head/lib/libc/nls/Makefile.inc 244757 2012-12-28 01:23:12Z delphij $ .PATH: ${.CURDIR}/../libc/iconv .PATH: ${.CURDIR}/../libc/nls CMAPS+= ${.CURDIR}/nls/Symbol.map -SRCS+= catclose.c catgets.c catopen.c +SRCS+= msgcat.c .if ${LIB} == "c" MAN+= catclose.3 catgets.3 catopen.3 .endif + +# NOTE: C.msg should not be processed here, it's used as a template +# for translators. + +NLSNAME= libc +NLS+= be_BY.UTF-8 +NLS+= ca_ES.ISO8859-1 +NLS+= de_DE.ISO8859-1 +NLS+= el_GR.ISO8859-7 +NLS+= es_ES.ISO8859-1 +NLS+= fi_FI.ISO8859-1 +NLS+= fr_FR.ISO8859-1 +NLS+= gl_ES.ISO8859-1 +NLS+= hu_HU.ISO8859-2 +NLS+= it_IT.ISO8859-15 +NLS+= ja_JP.UTF-8 +NLS+= ja_JP.eucJP +NLS+= ko_KR.UTF-8 +NLS+= ko_KR.eucKR +NLS+= mn_MN.UTF-8 +NLS+= nl_NL.ISO8859-1 +NLS+= no_NO.ISO8859-1 +NLS+= pl_PL.ISO8859-2 +NLS+= pt_BR.ISO8859-1 +NLS+= ru_RU.KOI8-R +NLS+= sk_SK.ISO8859-2 +NLS+= sv_SE.ISO8859-1 +NLS+= uk_UA.UTF-8 +NLS+= zh_CN.GB18030 +NLS+= zh_CN.GB2312 +NLS+= zh_CN.UTF-8 diff --git a/lib/libc/nls/be_BY.UTF-8.msg b/lib/libc/nls/be_BY.UTF-8.msg new file mode 100644 index 0000000000..e5e47e787f --- /dev/null +++ b/lib/libc/nls/be_BY.UTF-8.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/be_BY.UTF-8.msg 192653 2009-05-23 17:13:35Z des $ +$ +$ Message catalog for be_BY.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Аперацыя не дазволена +$ ENOENT +2 Няма такога файлу ці каталогу +$ ESRCH +3 Няма такога працэсу +$ EINTR +4 Перарваны сістэмны выклік +$ EIO +5 Памылка ўводу/вываду +$ ENXIO +6 Прыстасаванне не сканфігуравана +$ E2BIG +7 Надта доўгі спіс аргументаў +$ ENOEXEC +8 Памылка фармату файлу, які выконваецца +$ EBADF +9 Некарэктны дэскрыптар файлу +$ ECHILD +10 Няма дачэрніх працэсаў +$ EDEADLK +11 Прадухілена ўзаемная блакіроўка падчас доступу да рэсурсу +$ ENOMEM +12 Не дастае памяці +$ EACCES +13 Не дастае прывілеяў +$ EFAULT +14 Некарэктны адрас +$ ENOTBLK +15 Неабходна блочнае прыстасаванне +$ EBUSY +16 Прыстасаванне занятае +$ EEXIST +17 Файл існуе +$ EXDEV +18 Спасылка на іншае прыстасаванне +$ ENODEV +19 Аперацыя не падтрымліваецца прыстасаваннем +$ ENOTDIR +20 Пазначаны файл не з'яўляецца каталогам +$ EISDIR +21 Пазначаны файл з'яўляецца каталогам +$ EINVAL +22 Недапушчальны аргумент +$ ENFILE +23 Надта шмат адчыненых файлаў у сістэме +$ EMFILE +24 Надта шмат адчыненых файлаў +$ ENOTTY +25 Выклік ioctl не падтрымліваецца прыстасаваннем +$ ETXTBSY +26 Текставы файл заняты +$ EFBIG +27 Надта вялікі файл +$ ENOSPC +28 На прыстасаванні не засталося месца +$ ESPIPE +29 Недапушчальнае пазіцыянаванне +$ EROFS +30 Файлавая сістэма толькі для чытання +$ EMLINK +31 Надта шмат спасылак +$ EPIPE +32 Канал пашкоджаны +$ EDOM +33 Недапушчальнае значэнне лічбавага аргументу +$ ERANGE +34 Надта вялікі рэзультат +$ EAGAIN, EWOULDBLOCK +35 Рэсурс часова недаступны +$ EINPROGRESS +36 Аперацыя ў працэсе выканання +$ EALREADY +37 Аперацыя ўжо выконваецца +$ ENOTSOCK +38 Аперацыя з сокетам прыменена не да сокету +$ EDESTADDRREQ +39 Патрабуецца адрас прызначэння +$ EMSGSIZE +40 Надта доўгае паведамленне +$ EPROTOTYPE +41 Няправільны тып пратаколу для сокету +$ ENOPROTOOPT +42 Пратакол недаступны +$ EPROTONOSUPPORT +43 Пратакол не падтрымліваецца +$ ESOCKTNOSUPPORT +44 Тып сокету не падтрымліваецца +$ EOPNOTSUPP +45 Аперацыя не падтрымліваецца +$ EPFNOSUPPORT +46 Сямейства пратаколаў не падтрымліваецца +$ EAFNOSUPPORT +47 Сямейства адрасоў не падтрымліваецца сямействам пратаколаў +$ EADDRINUSE +48 Адрас ўжо выкарыстоўваецца +$ EADDRNOTAVAIL +49 Не магчыма прызначыць дадзены адрас +$ ENETDOWN +50 Сетка не працуе +$ ENETUNREACH +51 Сетка недасяжна +$ ENETRESET +52 Злучэнне прыпынена сеткай +$ ECONNABORTED +53 Праграма выклікала аварыйнае завяршэнне злучэння +$ ECONNRESET +54 Злучэнне завяршана супрацьлеглым бокам +$ ENOBUFS +55 Не засталося месца пад буфер +$ EISCONN +56 Сокет ужо падлучаны +$ ENOTCONN +57 Сокет не падлучаны +$ ESHUTDOWN +58 Не магчыма дасылаць пасля закрыцця сокету +$ ETOOMANYREFS +59 Надта шмат спасылак: не магчыма злучыць +$ ETIMEDOUT +60 Аперацыя перавысіла часавы ліміт +$ ECONNREFUSED +61 У злучэнні адмоўлена +$ ELOOP +62 Надта шмат узроўняў сімвальных спасылак +$ ENAMETOOLONG +63 Надта доўгае імя файлу +$ EHOSTDOWN +64 Хост не працуе +$ EHOSTUNREACH +65 Няма маршруту да хосту +$ ENOTEMPTY +66 Каталог не пусты +$ EPROCLIM +67 Надта шмат працэсаў +$ EUSERS +68 Надта шмат карыстальнікаў +$ EDQUOT +69 Перавышана дыскавая квота +$ ESTALE +70 Састарэлы дэскрыптар файлу NFS +$ EREMOTE +71 Надта шмат дыстанцыйных пераходаў на шляху +$ EBADRPC +72 Некарэктная структура RPC +$ ERPCMISMATCH +73 Няправільная версія RPC +$ EPROGUNAVAIL +74 Праграма RPC недасяжная +$ EPROGMISMATCH +75 Няправільная версія праграмы +$ EPROCUNAVAIL +76 Некарэктная працэдура для праграмы +$ ENOLCK +77 Блакіроўкі недаступны +$ ENOSYS +78 Функцыя не рэалізавана +$ EFTYPE +79 Непадыходзячы тып ці фармат файлу +$ EAUTH +80 Памылка аўтэнтыфікацыі +$ ENEEDAUTH +81 Неабходна аўтэнтыфікацыя +$ EIDRM +82 Ідэнтыфікатар выдалены +$ ENOMSG +83 Няма паведамлення патрэбнага тыпу +$ EOVERFLOW +84 Надта вялікае значэнне для захоўвання ў пазначаным тыпе дадзеных +$ ECANCELED +85 Аперацыя адменена +$ EILSEQ +86 Недазволеная паслядоўнасць байтаў +$ ENOATTR +87 Атрыбут не знойдзены +$ EDOOFUS +88 Памылка праграмавання +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Разрыў сувязі +$ SIGINT +2 Перарванне па сігналу +$ SIGQUIT +3 Выхад +$ SIGILL +4 Недапушчальная інструкцыя +$ SIGTRAP +5 Пастка трасіроўкі/кропкі спынення +$ SIGABRT +6 Пастка аварыйнага завяршэння +$ SIGEMT +7 Пастка EMT +$ SIGFPE +8 Памылка падчас працы з рэчыўным лікам +$ SIGKILL +9 Прымусова спынены +$ SIGBUS +10 Памылка шыны +$ SIGSEGV +11 Памылка сегментацыі +$ SIGSYS +12 Недапушчальны сістэмны выклік +$ SIGPIPE +13 Канал пашкоджаны +$ SIGALRM +14 Спрацаваў таймер +$ SIGTERM +15 Завершаны +$ SIGURG +16 Неабходны тэрміновы ўвод-вывад +$ SIGSTOP +17 Прыпыненне (сігнал) +$ SIGTSTP +18 Прыпыненне +$ SIGCONT +19 Працяг працы +$ SIGCHLD +20 Завершана праца дачэрняга працэсу +$ SIGTTIN +21 Спынены (увод з тэрміналу) +$ SIGTTOU +22 Спынены (увод на тэрмінал) +$ SIGIO +23 Увод-вывад магчымы +$ SIGXCPU +24 Перавышана абмежаванне працэсарнага часу +$ SIGXFSZ +25 Перавышаны максімальны памер файлу +$ SIGVTALRM +26 Вычарпаны віртуальны таймер +$ SIGPROF +27 Вычарпаны таймер прафілявання +$ SIGWINCH +28 Змена памеру вакна +$ SIGINFO +29 Запыт інфармацыі +$ SIGUSR1 +30 Сігнал карыстальніка 1 +$ SIGUSR2 +31 Сігнал карыстальніка 2 diff --git a/lib/libc/nls/ca_ES.ISO8859-1.msg b/lib/libc/nls/ca_ES.ISO8859-1.msg new file mode 100644 index 0000000000..6915957777 --- /dev/null +++ b/lib/libc/nls/ca_ES.ISO8859-1.msg @@ -0,0 +1,267 @@ +$ $FreeBSD: head/lib/libc/nls/ca_ES.ISO8859-1.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for ca_ES.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operació no permesa +$ ENOENT +2 Arxiu o directori inexistent +$ ESRCH +3 Procés inexistent +$ EINTR +4 Crida del sistema interrompuda +$ EIO +5 Error d'entrada/sortida +$ ENXIO +6 Dispositiu no configurat +$ E2BIG +7 Llista de paràmetres massa llarga +$ ENOEXEC +8 Error en el format de l'executable +$ EBADF +9 Descriptor d'arxiu incorrecte +$ ECHILD +10 No hi ha processos fills +$ EDEADLK +11 S'ha evitat el bloqueig del recurs +$ ENOMEM +12 No es pot assignar la memòria demanada +$ EACCES +13 Permís denegat +$ EFAULT +14 Adreça incorrecta +$ ENOTBLK +15 Es necessita un dispositiu de blocs +$ EBUSY +16 Dispositiu ocupat +$ EEXIST +17 L'arxiu ja existeix +$ EXDEV +18 Enllaç entre dispositius +$ ENODEV +19 Operació no suportada pel dispositiu +$ ENOTDIR +20 No és un directori +$ EISDIR +21 És un directori +$ EINVAL +22 Paràmetre incorrecte +$ ENFILE +23 Hi ha massa arxius oberts al sistema +$ EMFILE +24 Hi ha massa arxius oberts +$ ENOTTY +25 L'ioctl no és adecuat per al dispositiu +$ ETXTBSY +26 Arxiu de text ocupat +$ EFBIG +27 Arxiu massa gran +$ ENOSPC +28 No queda espai lliure en el dispositiu +$ ESPIPE +29 Cerca il·legal +$ EROFS +30 Sistema d'arxius de només lectura +$ EMLINK +31 Massa enllaços +$ EPIPE +32 Canal (pipe) trencat +$ EDOM +33 El resultat surt fora de rang +$ ERANGE +34 Resultat massa gran +$ EAGAIN, EWOULDBLOCK +35 El recurs no està disponible temporalment +$ EINPROGRESS +36 L'operació es troba en progrés actualment +$ EALREADY +37 L'operació ja es troba en progrés +$ ENOTSOCK +38 Operació de tipus socket en quelcom que no ho és +$ EDESTADDRREQ +39 Es requereix l'adreça de destí +$ EMSGSIZE +40 Missatge massa llarg +$ EPROTOTYPE +41 Tipus de protocol incorrecte per al socket +$ ENOPROTOOPT +42 Protocol no disponible +$ EPROTONOSUPPORT +43 Protocol no suportat +$ ESOCKTNOSUPPORT +44 Tipus de socket no suportat +$ EOPNOTSUPP +45 Operació no suportada +$ EPFNOSUPPORT +46 Família de protocols no suportada +$ EAFNOSUPPORT +47 Família d'adreces no suportada per la família de protocols +$ EADDRINUSE +48 L'adreça ja es troba en ús +$ EADDRNOTAVAIL +49 No es pot assignar l'adreça demanada +$ ENETDOWN +50 La xarxa no es troba disponible +$ ENETUNREACH +51 No es pot accedir a la xarxa +$ ENETRESET +52 La connexió a la xarxa s'ha perdut durant la reinicialització +$ ECONNABORTED +53 El programari ha causat l'avort de la connexió +$ ECONNRESET +54 L'interlocutor ha reinicialitzat la comunicació +$ ENOBUFS +55 No hi ha prou espai per a la memoria intermèdia (buffer) +$ EISCONN +56 El socket ja es troba connectat +$ ENOTCONN +57 El socket no es troba connectat +$ ESHUTDOWN +58 No es pot enviar desprès de la desconnexió del socket +$ ETOOMANYREFS +59 Hi ha massa referències: no es poden unir +$ ETIMEDOUT +60 El temps de connexió s'ha esgotat +$ ECONNREFUSED +61 Connexió rebutjada +$ ELOOP +62 Hi ha massa nivells d'enllaços simbòlics +$ ENAMETOOLONG +63 Nom d'arxiu massa llarg +$ EHOSTDOWN +64 La màquina no es troba disponible +$ EHOSTUNREACH +65 No hi ha cap camí fins a la màquina +$ ENOTEMPTY +66 El directori no està buit +$ EPROCLIM +67 Hi ha massa processos +$ EUSERS +68 Hi ha massa usuaris +$ EDQUOT +69 Quota de disc sobrepassada +$ ESTALE +70 Descriptor d'arxiu NFS incorrecte +$ EREMOTE +71 Massa nivells en el camí de destí +$ EBADRPC +72 L'estructura RPC es incorrecta +$ ERPCMISMATCH +73 La versió del RPC es incorrecta +$ EPROGUNAVAIL +74 El programa RPC no es troba disponible +$ EPROGMISMATCH +75 Versió incorrecta del programa +$ EPROCUNAVAIL +76 Procediment erroni per al programa +$ ENOLCK +77 No hi ha bloquejos disponibles +$ ENOSYS +78 Funció no implementada +$ EFTYPE +79 Tipus d'arxiu o de format inadequat +$ EAUTH +80 Error d'autenticació +$ ENEEDAUTH +81 Es necessita un autenticador +$ EIDRM +82 Identificador eliminat +$ ENOMSG +83 No hi ha missatges del tipus desitjat +$ EOVERFLOW +84 Valor massa gran per a ésser emmagatzemat en el tipus de dades +$ EILSEQ +85 Seqüència de bytes il·legal +$ ENOTSUP +86 No suportat +$ ECANCELED +87 Operació cancel·lada +$ EBADMSG +88 Missatje incorrecte o corrupte +$ ENODATA +89 No hi ha missatges disponibles +$ ENOSR +90 No hi ha recursos de tipus STREAM +$ ENOSTR +91 No és un STREAM +$ ETIME +92 Temps d'espera esgotat en el ioctl STREAM +$ ENOATTR +93 Atribut inexistent +$ EMULTIHOP +94 S'ha intentat un multisalt +$ ENOLINK +95 L'enllaç s'ha servit +$ EPROTO +96 Error de protocol +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Fí de línia (hangup) +$ SIGINT +2 Interrupció +$ SIGQUIT +3 Finalització +$ SIGILL +4 Instrucció il·legal +$ SIGTRAP +5 Depuració (Trace/BPT) +$ SIGABRT +6 Crida d'avort +$ SIGEMT +7 Captura d'EMT +$ SIGFPE +8 Excepció de coma flotant +$ SIGKILL +9 Matat +$ SIGBUS +10 Error del bus +$ SIGSEGV +11 Error de segmentació +$ SIGSYS +12 Crida al sistema incorrecta +$ SIGPIPE +13 Canal (pipe) trencat +$ SIGALRM +14 Alarma de rellotge +$ SIGTERM +15 Finalitzat +$ SIGURG +16 Condició urgent d'E/S +$ SIGSTOP +17 Parat (per senyal) +$ SIGTSTP +18 Parat +$ SIGCONT +19 Continuant +$ SIGCHLD +20 El fill ha acabat +$ SIGTTIN +21 Parat (entrada de tty) +$ SIGTTOU +22 Parat (sortida de tty) +$ SIGIO +23 I/O permesa +$ SIGXCPU +24 S'ha sobrepassat el límit de temps de la CPU +$ SIGXFSZ +25 S'ha sobrepassat el límit de la longitud de l'arxiu +$ SIGVTALRM +26 El temporitzador virtual ha expirat +$ SIGPROF +27 El temporitzador del perfilador ha expirat +$ SIGWINCH +28 Canvis en la mida de la finestra +$ SIGINFO +29 Demanda d'informació +$ SIGUSR1 +30 Senyal 1 definida per l'usuari +$ SIGUSR2 +31 Senyal 2 definida per l'usuari +$ SIGPWR +32 Fallada/reinicialització de l'alimentació diff --git a/lib/libc/nls/catclose.3 b/lib/libc/nls/catclose.3 index 461678b20b..bb0d7a6475 100644 --- a/lib/libc/nls/catclose.3 +++ b/lib/libc/nls/catclose.3 @@ -26,9 +26,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/nls/catclose.3,v 1.7.2.6 2001/12/14 18:33:56 ru Exp $ -.\" $DragonFly: src/lib/libc/nls/catclose.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ -.Dd May 29, 1994 +.\" $FreeBSD: head/lib/libc/nls/catclose.3 142665 2005-02-27 16:30:16Z phantom $ +.Dd February 12, 2005 .Dt CATCLOSE 3 .Os .Sh NAME @@ -62,4 +61,4 @@ argument. The .Fn catclose function conforms to -.St -xpg4 . +.St -p1003.1-2001 . diff --git a/lib/libc/nls/catclose.c b/lib/libc/nls/catclose.c deleted file mode 100644 index 01314bdcae..0000000000 --- a/lib/libc/nls/catclose.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: src/lib/libc/nls/catclose.c,v 1.11 1999/08/17 04:00:51 mycroft Exp $ */ -/* $DragonFly: src/lib/libc/nls/catclose.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#define _NLS_PRIVATE - -#include -#include -#include -#include -#include - -__weak_reference(_catclose, catclose); - -int -_catclose(nl_catd catd) -{ - if (catd == ((nl_catd)-1)) { - errno = EBADF; - return(-1); - } - - if (catd != NULL) { - munmap(catd->__data, catd->__size); - free(catd); - } - - return(0); -} diff --git a/lib/libc/nls/catgets.3 b/lib/libc/nls/catgets.3 index 725665b44e..aff77e2df9 100644 --- a/lib/libc/nls/catgets.3 +++ b/lib/libc/nls/catgets.3 @@ -26,9 +26,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/nls/catgets.3,v 1.7.2.4 2001/12/14 18:33:56 ru Exp $ -.\" $DragonFly: src/lib/libc/nls/catgets.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ -.Dd May 29, 1994 +.\" $FreeBSD: head/lib/libc/nls/catgets.3 147402 2005-06-15 19:04:04Z ru $ +.Dd February 12, 2005 .Dt CATGETS 3 .Os .Sh NAME @@ -59,6 +58,19 @@ If the specified message was retrieved successfully, returns a pointer to an internal buffer containing the message string; otherwise it returns .Fa s . +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa catd +argument is not a valid message catalog descriptor. +.It Bq Er EBADMSG +The message identified by +.Fa set_id +and +.Fa msg_id +is not in the message catalog. +.El .Sh SEE ALSO .Xr gencat 1 , .Xr catclose 3 , @@ -67,4 +79,4 @@ otherwise it returns The .Fn catgets function conforms to -.St -xpg4 . +.St -p1003.1-2001 . diff --git a/lib/libc/nls/catgets.c b/lib/libc/nls/catgets.c deleted file mode 100644 index f12db0ad82..0000000000 --- a/lib/libc/nls/catgets.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $NetBSD: src/lib/libc/nls/catgets.c,v 1.15 1999/08/17 04:00:51 mycroft Exp $ */ -/* $DragonFly: src/lib/libc/nls/catgets.c,v 1.2 2005/11/20 09:18:37 swildner Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#define _NLS_PRIVATE - -#include -#include -#include -#include -#include -#include - -__weak_reference(_catgets, catgets); - -char * -_catgets(nl_catd catd, int set_id, int msg_id, const char *s) -{ - struct _nls_cat_hdr *cat_hdr; - struct _nls_set_hdr *set_hdr; - struct _nls_msg_hdr *msg_hdr; - int l, u, i, r; - - if (catd == (nl_catd)(-1)) { - errno = EBADF; - /* LINTED interface problem */ - return((char *)s); - } - - cat_hdr = (struct _nls_cat_hdr *)catd->__data; - set_hdr = (struct _nls_set_hdr *)(void *)((char *)catd->__data - + sizeof(struct _nls_cat_hdr)); - - /* binary search, see knuth algorithm b */ - l = 0; - u = ntohl((uint32_t)cat_hdr->__nsets) - 1; - while (l <= u) { - i = (l + u) / 2; - r = set_id - ntohl((uint32_t)set_hdr[i].__setno); - - if (r == 0) { - msg_hdr = (struct _nls_msg_hdr *) - (void *)((char *)catd->__data + - sizeof(struct _nls_cat_hdr) + - ntohl((uint32_t)cat_hdr->__msg_hdr_offset)); - - l = ntohl((uint32_t)set_hdr[i].__index); - u = l + ntohl((uint32_t)set_hdr[i].__nmsgs) - 1; - while (l <= u) { - i = (l + u) / 2; - r = msg_id - - ntohl((uint32_t)msg_hdr[i].__msgno); - if (r == 0) { - return((char *) catd->__data + - sizeof(struct _nls_cat_hdr) + - ntohl((uint32_t) - cat_hdr->__msg_txt_offset) + - ntohl((uint32_t) - msg_hdr[i].__offset)); - } else if (r < 0) { - u = i - 1; - } else { - l = i + 1; - } - } - - /* not found */ - goto notfound; - - } else if (r < 0) { - u = i - 1; - } else { - l = i + 1; - } - } - -notfound: - /* not found */ - errno = ENOMSG; - /* LINTED interface problem */ - return((char *)s); -} diff --git a/lib/libc/nls/catopen.3 b/lib/libc/nls/catopen.3 index f7ca76f5f6..a3f3af4bd5 100644 --- a/lib/libc/nls/catopen.3 +++ b/lib/libc/nls/catopen.3 @@ -26,9 +26,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/nls/catopen.3,v 1.9.2.6 2001/12/14 18:33:56 ru Exp $ -.\" $DragonFly: src/lib/libc/nls/catopen.3,v 1.2 2003/06/17 04:26:44 dillon Exp $ -.Dd May 29, 1994 +.\" $FreeBSD: head/lib/libc/nls/catopen.3 142665 2005-02-27 16:30:16Z phantom $ +.Dd February 12, 2005 .Dt CATOPEN 3 .Os .Sh NAME @@ -136,7 +135,7 @@ is set to indicate the error. .It Bq Er EINVAL Argument .Fa name -does not point to a valid message catalog. +does not point to a valid message catalog, or catalog is corrupt. .It Bq Er ENAMETOOLONG An entire path to the message catalog exceeded 1024 characters. .It Bq Er ENOENT @@ -155,4 +154,4 @@ Insufficient memory is available. The .Fn catopen function conforms to -.St -xpg4 . +.St -p1003.1-2001 . diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c deleted file mode 100644 index 679d7e7cfa..0000000000 --- a/lib/libc/nls/catopen.c +++ /dev/null @@ -1,186 +0,0 @@ -/* $NetBSD: src/lib/libc/nls/catopen.c,v 1.21 2004/07/21 20:27:46 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/nls/catopen.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by J.T. Conklin. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#define _NLS_PRIVATE - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../citrus/citrus_namespace.h" -#include "../citrus/citrus_region.h" -#include "../citrus/citrus_lookup.h" - -#define NLS_ALIAS_DB "/usr/share/nls/nls.alias" - -#define NLS_DEFAULT_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L" -#define NLS_DEFAULT_LANG "C" - -#define INVALID_CAT (nl_catd)(-1) - -__weak_reference(_catopen, catopen); - -static nl_catd load_msgcat(const char *); - -nl_catd -_catopen(const char *name, int oflag) -{ - char tmppath[PATH_MAX+1]; - char *nlspath; - const char *lang; - char *s, *t; - const char *u; - nl_catd catd; - char langbuf[PATH_MAX]; - - if (name == NULL || *name == '\0') - return(INVALID_CAT); - - /* absolute or relative path? */ - if (strchr(name, '/')) - return(load_msgcat(name)); - - if (issetugid() || (nlspath = getenv("NLSPATH")) == NULL) - nlspath = NLS_DEFAULT_PATH; - if (oflag == NL_CAT_LOCALE) - lang = setlocale(LC_MESSAGES, NULL); - else - lang = getenv("LANG"); - - if (lang == NULL || strchr(lang, '/')) - lang = NLS_DEFAULT_LANG; - - lang = _lookup_alias(NLS_ALIAS_DB, lang, langbuf, sizeof(langbuf), - _LOOKUP_CASE_SENSITIVE); - - s = nlspath; - t = tmppath; - do { - while (*s && *s != ':') { - if (*s == '%') { - switch (*(++s)) { - case 'L': /* locale */ - u = lang; - while (*u && t < tmppath + PATH_MAX) - *t++ = *u++; - break; - case 'N': /* name */ - u = name; - while (*u && t < tmppath + PATH_MAX) - *t++ = *u++; - break; - case 'l': /* lang */ - case 't': /* territory */ - case 'c': /* codeset */ - break; - default: - if (t < tmppath + PATH_MAX) - *t++ = *s; - } - } else { - if (t < tmppath + PATH_MAX) - *t++ = *s; - } - s++; - } - - *t = '\0'; - catd = load_msgcat(tmppath); - if (catd != INVALID_CAT) - return(catd); - - if (*s) - s++; - t = tmppath; - } while (*s); - - return(INVALID_CAT); -} - -static nl_catd -load_msgcat(const char *path) -{ - struct stat st; - nl_catd catd; - void *data; - int fd; - - _DIAGASSERT(path != NULL); - - if ((fd = open(path, O_RDONLY)) == -1) - return(INVALID_CAT); - - if (fstat(fd, &st) != 0) { - close (fd); - return(INVALID_CAT); - } - - data = mmap(0, (size_t)st.st_size, PROT_READ, MAP_FILE|MAP_SHARED, fd, - (off_t)0); - close(fd); - - if (data == (void *)-1) { - munmap(data, (size_t)st.st_size); - return(INVALID_CAT); - } - - if (ntohl((uint32_t)((struct _nls_cat_hdr *)data)->__magic) != - _NLS_MAGIC) { - munmap(data, (size_t)st.st_size); - return(INVALID_CAT); - } - - if ((catd = malloc(sizeof (*catd))) == 0) { - munmap(data, (size_t)st.st_size); - return(INVALID_CAT); - } - - catd->__data = data; - catd->__size = st.st_size; - return(catd); -} diff --git a/lib/libc/nls/de_DE.ISO8859-1.msg b/lib/libc/nls/de_DE.ISO8859-1.msg new file mode 100644 index 0000000000..3bb92e392a --- /dev/null +++ b/lib/libc/nls/de_DE.ISO8859-1.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/de_DE.ISO8859-1.msg 190410 2009-03-25 12:36:37Z netchild $ +$ +$ Message catalog for de_DE.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operation nicht erlaubt +$ ENOENT +2 Datei oder Verzeichnis nicht gefunden +$ ESRCH +3 Prozess nicht gefunden +$ EINTR +4 Interrupt innerhalb eines Systemaufrufs +$ EIO +5 Ein-/Ausgabefehler +$ ENXIO +6 Gerät ist nicht konfiguriert +$ E2BIG +7 Argumentliste ist zu lang +$ ENOEXEC +8 Die Datei hat kein bekanntes ausführbares Format +$ EBADF +9 Ungültiger Dateideskriptor +$ ECHILD +10 Keine Kindprozesse +$ EDEADLK +11 Ein Deadlock wurde vermieden +$ ENOMEM +12 Kann nicht genug Speicher belegen +$ EACCES +13 Zugriff verweigert +$ EFAULT +14 Ungültige Adresse +$ ENOTBLK +15 Es wird ein Blockgerät benötigt +$ EBUSY +16 Das Gerät ist belegt +$ EEXIST +17 Datei existiert bereits +$ EXDEV +18 Link zwischen verschiedenen Geräten +$ ENODEV +19 Die Operation wird von diesem Gerät nicht unterstützt +$ ENOTDIR +20 Kein Verzeichnis +$ EISDIR +21 Ist ein Verzeichnis +$ EINVAL +22 Ungültiges Argument +$ ENFILE +23 Zu viele offene Dateien im System +$ EMFILE +24 Zu viele offene Dateien +$ ENOTTY +25 Ungültiger IOCTL für dieses Gerät +$ ETXTBSY +26 Datei wird benutzt +$ EFBIG +27 Datei zu groß +$ ENOSPC +28 Kein Platz mehr auf dem Gerät +$ ESPIPE +29 Ungültige Positionierung +$ EROFS +30 Dateisystem ist schreibgeschützt +$ EMLINK +31 Zu viele Links +$ EPIPE +32 Unterbrochene Pipe +$ EDOM +33 Numerisches Argument außerhalb des Wertebereichs +$ ERANGE +34 Ergebnis außerhalb des Wertebereichs +$ EAGAIN, EWOULDBLOCK +35 Ressource vorübergehend nicht verfügbar +$ EINPROGRESS +36 Operation wird gerade ausgeführt +$ EALREADY +37 Operation wird bereits ausgeführt +$ ENOTSOCK +38 Deskriptor ist kein Socket +$ EDESTADDRREQ +39 Zieladresse benötigt +$ EMSGSIZE +40 Nachricht zu lang +$ EPROTOTYPE +41 Ungültiger Protokolltyp für diesen Socket +$ ENOPROTOOPT +42 Protokoll nicht verfügbar +$ EPROTONOSUPPORT +43 Protokoll nicht unterstützt +$ ESOCKTNOSUPPORT +44 Sockettyp nicht unterstützt +$ EOPNOTSUPP +45 Operation nicht unterstützt +$ EPFNOSUPPORT +46 Protokollfamilie nicht unterstützt +$ EAFNOSUPPORT +47 Adressfamilie wird von der Protokollfamilie nicht unterstützt +$ EADDRINUSE +48 Adresse wird bereits benutzt +$ EADDRNOTAVAIL +49 Kann angeforderte Adresse nicht belegen +$ ENETDOWN +50 Netzwerk nicht verfügbar +$ ENETUNREACH +51 Netzwerk nicht erreichbar +$ ENETRESET +52 Netzwerk hat Verbindung mit Reset abgebrochen +$ ECONNABORTED +53 Software verursachte einen Verbindungsabbruch +$ ECONNRESET +54 Verbindung wurde von der Gegenstelle geschlossen +$ ENOBUFS +55 Keine Buffer verfügbar +$ EISCONN +56 Socket ist schon verbunden +$ ENOTCONN +57 Socket ist nicht verbunden +$ ESHUTDOWN +58 Kann nach einem Socket-Shutdown nicht mehr senden +$ ETOOMANYREFS +59 Zu viele Referenzen, kann nicht verbinden +$ ETIMEDOUT +60 Verbindungsabbruch durch Zeitüberschreitung +$ ECONNREFUSED +61 Verbindung wurde abgelehnt +$ ELOOP +62 Zu viele symbolische Links (zirkulär?) +$ ENAMETOOLONG +63 Dateiname zu lang +$ EHOSTDOWN +64 Host nicht verfügbar +$ EHOSTUNREACH +65 Keine Route zum Host +$ ENOTEMPTY +66 Verzeichnis ist nicht leer +$ EPROCLIM +67 Zu viele Prozesse +$ EUSERS +68 Zu viele Benutzer +$ EDQUOT +69 Platzlimit überschritten +$ ESTALE +70 Verwaister NFS-Dateideskriptor +$ EREMOTE +71 Zu viele Fernverweise in diesem Zugriff +$ EBADRPC +72 RPC-Struktur ist ungültig +$ ERPCMISMATCH +73 RPC-Version ist falsch +$ EPROGUNAVAIL +74 RPC-Programm nicht verfügbar +$ EPROGMISMATCH +75 Falsche Programmversion +$ EPROCUNAVAIL +76 Falsche Prozedur für dieses Programm +$ ENOLCK +77 Keine Dateisperren verfügbar +$ ENOSYS +78 Funktion nicht implementiert +$ EFTYPE +79 Ungültiger Dateityp oder Dateiformat +$ EAUTH +80 Authentifizierungsfehler +$ ENEEDAUTH +81 Authentikator benötigt +$ EIDRM +82 Identifizierung entfernt +$ ENOMSG +83 Keine Nachricht vom gewünschten Typ +$ EOVERFLOW +84 Wert zu groß, um in Datentyp zu speichern +$ ECANCELED +85 Operation abgebrochen +$ EILSEQ +86 Ungültige Byte-Sequenz +$ ENOATTR +87 Attribut nicht gefunden +$ EDOOFUS +88 Programmierfehler +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Verbindungsende +$ SIGINT +2 Unterbrechung +$ SIGQUIT +3 Programmende +$ SIGILL +4 Ungültiger Maschinenbefehl +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Fließkommafehler +$ SIGKILL +9 Unbedingter Programmabbruch +$ SIGBUS +10 Bus-Zugriffsfehler +$ SIGSEGV +11 Illegaler Speicherzugriff +$ SIGSYS +12 Ungültiger Systemaufruf +$ SIGPIPE +13 Unterbrochene Pipe +$ SIGALRM +14 Wecker +$ SIGTERM +15 Beendet +$ SIGURG +16 Dringende Ein/Ausgabeanforderung +$ SIGSTOP +17 Gestoppt (Signal) +$ SIGTSTP +18 Gestoppt +$ SIGCONT +19 Fortgesetzt +$ SIGCHLD +20 Kindprozess beendet +$ SIGTTIN +21 Gestoppt (Eingabe) +$ SIGTTOU +22 Gestoppt (Ausgabe) +$ SIGIO +23 Ein/Ausgabe möglich +$ SIGXCPU +24 CPU-Zeitlimit überschritten +$ SIGXFSZ +25 Dateigrößenlimit überschritten +$ SIGVTALRM +26 Virtueller Wecker abgelaufen +$ SIGPROF +27 Profil-Wecker abgelaufen +$ SIGWINCH +28 Fenstergröße hat sich verändert +$ SIGINFO +29 Informationsanforderung +$ SIGUSR1 +30 Benutzerdefiniertes Signal 1 +$ SIGUSR2 +31 Benutzerdefiniertes Signal 2 diff --git a/lib/libc/nls/el_GR.ISO8859-7.msg b/lib/libc/nls/el_GR.ISO8859-7.msg new file mode 100644 index 0000000000..7949d7ca70 --- /dev/null +++ b/lib/libc/nls/el_GR.ISO8859-7.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/el_GR.ISO8859-7.msg 192653 2009-05-23 17:13:35Z des $ +$ +$ Message catalog for C locale (template) +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Ìç åðéôñåðôÞ åíÝñãåéá +$ ENOENT +2 Äåí õðÜñ÷åé ôÝôïéï áñ÷åßï Þ êáôÜëïãïò +$ ESRCH +3 Ç äéåñãáóßá áõôÞ äåí õðÜñ÷åé +$ EINTR +4 Ç êëÞóç óõóôÞìáôïò äéáêüðçêå +$ EIO +5 ÓöÜëìá åéóüäïõ/åîüäïõ +$ ENXIO +6 Ç óõóêåõÞ äåí Ý÷åé ñõèìéóôåß +$ E2BIG +7 Ç ëßóôá ôùí ðáñáìÝôñùí åßíáé ðïëý ìåãÜëç +$ ENOEXEC +8 ËáíèáóìÝíç ìïñöÞ åêôåëÝóéìïõ +$ EBADF +9 Ðñïâëçìáôéêüò ðåñéãñáöÝáò áñ÷åßïõ +$ ECHILD +10 Äåí õðÜñ÷ïõí åîáñôþìåíåò äéåñãáóßåò +$ EDEADLK +11 Áðïöåý÷èçêå áäéÝîïäï ðüñïõ +$ ENOMEM +12 Áäõíáìßá åê÷þñçóçò ìíÞìçò +$ EACCES +13 ¶ñíçóç ðñüóâáóçò +$ EFAULT +14 ËÜèïò äéåýèõíóç +$ ENOTBLK +15 Áðáéôåßôáé óõóêåõÞ ôýðïõ block +$ EBUSY +16 ÓõóêåõÞ êáôåéëçììÝíç +$ EEXIST +17 Ôï áñ÷åßï õðÜñ÷åé +$ EXDEV +18 Óýíäåóìïò ìåôáîý óõóêåõþí +$ ENODEV +19 Ç ëåéôïõñãßá äåí õðïóôçñßæåôáé áðü ôç óõóêåõÞ +$ ENOTDIR +20 Äåí åßíáé êáôÜëïãïò +$ EISDIR +21 Åßíáé êáôÜëïãïò +$ EINVAL +22 Ìç Ýãêõñç ðáñÜìåôñïò +$ ENFILE +23 ÕðåñâïëéêÜ ðïëëÜ áíïéêôÜ áñ÷åßá óôï óýóôçìá +$ EMFILE +24 ÕðåñâïëéêÜ ðïëëÜ áíïéêôÜ áñ÷åßá +$ ENOTTY +25 ÁêáôÜëëçëï ioctl ãéá ôç óõóêåõÞ +$ ETXTBSY +26 Ôï áñ÷åßï êåéìÝíïõ åßíáé êáôåéëçììÝíï +$ EFBIG +27 Ðïëý ìåãÜëï áñ÷åßï +$ ENOSPC +28 Äåí Ý÷åé ìåßíåé åëåýèåñïò ÷þñïò óôç óõóêåõÞ +$ ESPIPE +29 ÁêáôÜëëçëç áíß÷íåõóç +$ EROFS +30 Ôï óýóôçìá áñ÷åßùí åßíáé ìüíï ãéá áíÜãíùóç +$ EMLINK +31 ÐÜñá ðïëëïß óýíäåóìïé +$ EPIPE +32 Äéáêïðåßóá óùëÞíùóç +$ EDOM +33 Ôï áñéèìçôéêü üñéóìá åßíáé åêôüò ïñßùí +$ ERANGE +34 Ðïëý ìåãÜëï áðïôÝëåóìá +$ EAGAIN, EWOULDBLOCK +35 Ï ðüñïò äåí åßíáé äéáèÝóéìïò ðñïóùñéíÜ +$ EINPROGRESS +36 Ç ëåéôïõñãßá âñßóêåôáé óå åîÝëéîç ôþñá +$ EALREADY +37 Ç ëåéôïõñãßá åßíáé Þäç óå åîÝëéîç +$ ENOTSOCK +38 Ëåéôïõñãßá õðïäï÷Þò óå ìç-õðïäï÷Þ +$ EDESTADDRREQ +39 Áðáéôåßôáé äéåýèõíóç ðñïïñéóìïý +$ EMSGSIZE +40 Ðïëý ìåãÜëï ìÞíõìá +$ EPROTOTYPE +41 ËÜèïò ôýðïõ ðñùôüêïëëï ãéá õðïäï÷Þ +$ ENOPROTOOPT +42 Ôï ðñùôüêïëëï äåí åßíáé äéáèÝóéìï +$ EPROTONOSUPPORT +43 Ôï ðñùôüêïëëï äåí õðïóôçñßæåôáé +$ ESOCKTNOSUPPORT +44 Ï ôýðïò ôçò õðïäï÷Þò äåí õðóôçñßæåôáé +$ EOPNOTSUPP +45 Ç ëåéôïõñãßá äåí õðïóôçñßæåôáé +$ EPFNOSUPPORT +46 Äåí õðïóôçñßæåôáé ç ïéêïãÝíåéá ðñùôïêüëëùí +$ EAFNOSUPPORT +47 Ç ïéêïãÝíåéá äéåõèýíóåùí äåí õðïóôçñßæåôáé áðü ôçí ïéêïãÝíåéá ðñùôïêüëëùí +$ EADDRINUSE +48 Ç äéåýèõíóç ÷ñçóéìïðïéåßôáé Þäç +$ EADDRNOTAVAIL +49 Äåí ìðïñåß íá ãßíåé áíÜèåóç ôçò æçôïýìåíçò äéåýèõíóçò +$ ENETDOWN +50 Ôï äßêôõï äåí ëåéôïõñãåß +$ ENETUNREACH +51 Äåí õðÜñ÷åé äéáäñïìÞ ðñïò ôï äßêôõï +$ ENETRESET +52 Ôï äßêôõï äéÝêïøå ôç óýíäåóç êáôÜ ôçí åðáíáöïñÜ +$ ECONNABORTED +53 Ôï ëïãéóìéêü ðñïêÜëåóå ôåñìáôéóìü ôçò óýíäåóçò +$ ECONNRESET +54 Ç óýíäåóç ôåñìáôßóôçêå áðü ôçí Üëëç ìåñéÜ +$ ENOBUFS +55 Äåí õðÜñ÷åé äéáèÝóéìïò ðñïóùñéíüò ÷þñïò +$ EISCONN +56 Ç õðïäï÷Þ Ý÷åé Þäç óõíäåèåß +$ ENOTCONN +57 Ç õðïäï÷Þ äåí Ý÷åé óõíäåèåß +$ ESHUTDOWN +58 Äåí åßíáé äõíáôÞ ç áðïóôïëÞ ìåôÜ ôïí ôåñìáôéóìü ôçò õðïäï÷Þò +$ ETOOMANYREFS +59 ÐÜñá ðïëëÝò áíáöïñÝò: äåí ìðïñåß íá ãßíåé óõíÝíùóç +$ ETIMEDOUT +60 ÔÝëïò ÷ñüíïõ äéáäéêáóßáò +$ ECONNREFUSED +61 ¶ñíçóç óýíäåóçò +$ ELOOP +62 ÐÜñá ðïëëÜ åðßðåäá óõìâïëéêþí óõíäÝóåùí +$ ENAMETOOLONG +63 Ðïëý ìåãÜëï üíïìá áñ÷åßïõ +$ EHOSTDOWN +64 Ôï óýóôçìá äåí åßíáé óå ëåéôïõñãßá +$ EHOSTUNREACH +65 Äåí õðÜñ÷åé äéáäñïìÞ ðñïò ôï óýóôçìá +$ ENOTEMPTY +66 Ï êáôÜëïãïò äåí åßíáé Üäåéïò +$ EPROCLIM +67 ÕðåñâïëéêÜ ðïëëÝò äéåñãáóßåò +$ EUSERS +68 ÕðåñâïëéêÜ ðïëëïß ÷ñÞóôåò +$ EDQUOT +69 ÕðÝñâáóç ïñßùí ÷ñÞóçò äßóêïõ +$ ESTALE +70 ¶êõñï handle áñ÷åßïõ óôï NFS +$ EREMOTE +71 ÐÜñá ðïëëÜ áðïìáêñõóìÝíá åðßðåäá óôç äéáäñïìÞ +$ EBADRPC +72 Ç äïìÞ RPC åßíáé ðñïâëçìáôéêÞ +$ ERPCMISMATCH +73 ËáíèáóìÝíç Ýêäïóç RPC +$ EPROGUNAVAIL +74 Ôï ðñüãñáììá RPC äåí åßíáé äéáèÝóéìï +$ EPROGMISMATCH +75 ËáíèáóìÝíç Ýêäïóç ðñïãñÜììáôïò +$ EPROCUNAVAIL +76 ÐñïâëçìáôéêÞ äéáäéêáóßá ãéá ôï ðñüãñáììá +$ ENOLCK +77 Äåí õðÜñ÷ïõí äéáèÝóéìá êëåéäþìáôá +$ ENOSYS +78 Ç ëåéôïõñãßá äåí Ý÷åé õëïðïéçèåß +$ EFTYPE +79 ËáíèáóìÝíïò ôýðïò Þ ìïñöÞ áñ÷åßïõ +$ EAUTH +80 ÓöÜëìá êáôÜ ôçí ðéóôïðïßçóç áõèåíôéêüôçôáò +$ ENEEDAUTH +81 Áðáéôåßôáé ðéóôïðïéçôÞò áõèåíôéêüôçôáò +$ EIDRM +82 Ôï áíáãíùñéóôéêü Ý÷åé áöáéñåèåß +$ ENOMSG +83 Äåí õðÜñ÷åé ìÞíõìá ôïõ êáèïñéóìÝíïõ ôýðïõ +$ EOVERFLOW +84 Ç ôéìÞ åßíáé ðïëý ìåãÜëç ãéá íá áðïèçêåõèåß óôïí ôýðï äåäïìÝíùí +$ ECANCELED +85 Ç ëåéôïõñãßá áêõñþèçêå +$ EILSEQ +86 Ìç-Ýãêõñç áêïëïõèßá bytes +$ ENOATTR +87 Ôï ÷áñáêôçñéóôéêü äåí âñÝèçêå +$ EDOOFUS +88 ÓöÜëìá ðñïãñáììáôéóìïý +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Êëåßóéìï +$ SIGINT +2 ÄéáêïðÞ +$ SIGQUIT +3 Ôåñìáôéóìüò +$ SIGILL +4 Ìç-Ýãêõñç åíôïëÞ +$ SIGTRAP +5 Ðáãßäá Trace/BPT +$ SIGABRT +6 Ðáãßäá áêýñùóçò +$ SIGEMT +7 Ðáãßäá EMT +$ SIGFPE +8 Åîáßñåóç êéíçôÞò õðïäéáóôïëÞò +$ SIGKILL +9 Ôåñìáôßóôçêå +$ SIGBUS +10 ÓöÜëìá äéáýëïõ +$ SIGSEGV +11 ÓöÜëìá Segmentation +$ SIGSYS +12 ÊáêÞ êëÞóç óõóôÞìáôïò +$ SIGPIPE +13 ÄéáêïðÞ pipe +$ SIGALRM +14 Ñïëüé åéäïðïßçóçò +$ SIGTERM +15 Ôåñìáôßóôçêå +$ SIGURG +16 ¸êôáêôç êáôÜóôáóç É/Ï +$ SIGSTOP +17 Óå áíáìïíÞ (óÞìá) +$ SIGTSTP +18 Óå áíáìïíÞ +$ SIGCONT +19 Óõíå÷ßæåôáé +$ SIGCHLD +20 ÔÝëïò åîáñôþìåíçò äéåñãáóßáò +$ SIGTTIN +21 ÄéáêïðÞ (åßóïäïò tty) +$ SIGTTOU +22 ÄéáêïðÞ (Ýîïäïò tty) +$ SIGIO +23 Äõíáôüôçôá I/O +$ SIGXCPU +24 ÎåðåñÜóôçêå ôï üñéï ÷ñÞóçò ôçò CPU +$ SIGXFSZ +25 ÎåðåñÜóôçêå ôï ìÝãéóôï ìÝãåèïò áñ÷åßïõ +$ SIGVTALRM +26 ÅîáíôëÞèçêå ï åéêïíéêüò ÷ñïíïìåôñçôÞò +$ SIGPROF +27 ÅîáíôëÞèçêå ï ÷ñïíïìåôñçôÞò profiling +$ SIGWINCH +28 Ôï ìÝãåèïò ôïõ ðáñáèýñïõ áëëÜæåé +$ SIGINFO +29 Áßôçóç ãéá ðëçñïöïñßá +$ SIGUSR1 +30 ÓÞìá 1 êáèïñéóìÝíï áðü ôï ÷ñÞóôç +$ SIGUSR2 +31 ÓÞìá 2 êáèïñéóìÝíï áðü ôï ÷ñÞóôç diff --git a/lib/libc/nls/es_ES.ISO8859-1.msg b/lib/libc/nls/es_ES.ISO8859-1.msg new file mode 100644 index 0000000000..3fd67faacd --- /dev/null +++ b/lib/libc/nls/es_ES.ISO8859-1.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/es_ES.ISO8859-1.msg 200077 2009-12-03 19:27:12Z gabor $ +$ +$ Message catalog for es_ES.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operación no permitida +$ ENOENT +2 Fichero o directorio inexistente +$ ESRCH +3 Proceso inexistente +$ EINTR +4 Llamada del sistema interrumpida +$ EIO +5 Error de Entrada/Salida +$ ENXIO +6 Dispositivo no configurado +$ E2BIG +7 La lista de argumentos es demasiado larga +$ ENOEXEC +8 Error en el formato del ejecutable +$ EBADF +9 Descriptor incorrecto de fichero +$ ECHILD +10 No hay procesos hijo +$ EDEADLK +11 Se ha evitado el bloqueo del recurso +$ ENOMEM +12 No se pudo asignar memoria +$ EACCES +13 Permiso denegado +$ EFAULT +14 Dirección incorrecta +$ ENOTBLK +15 Se necesita un dispositivo de bloques +$ EBUSY +16 Dispositivo ocupado +$ EEXIST +17 El fichero ya existe +$ EXDEV +18 Enlace entre dispositivos +$ ENODEV +19 Operación inadecuada para este dispositivo +$ ENOTDIR +20 No es un directorio +$ EISDIR +21 Es un directorio +$ EINVAL +22 Argumento inadecuado +$ ENFILE +23 Hay demasiados ficheros abiertos en el sistema +$ EMFILE +24 Hay demasiados ficheros abiertos +$ ENOTTY +25 ioctl inapropiado para el dispositivo +$ ETXTBSY +26 Fichero de texto ocupado +$ EFBIG +27 Fichero demasiado grande +$ ENOSPC +28 No queda espacio libre en el dispositivo +$ ESPIPE +29 Búsqueda ilegal +$ EROFS +30 Sistema de ficheros de solo lectura +$ EMLINK +31 Demasiados enlaces +$ EPIPE +32 Canal (pipe) roto +$ EDOM +33 Argumento numérico fuera de rango +$ ERANGE +34 El resultado es demasiado grande +$ EAGAIN, EWOULDBLOCK +35 el recurso no está disponible temporalmente +$ EINPROGRESS +36 Operación en proceso +$ EALREADY +37 La operación ya se está ejecutando +$ ENOTSOCK +38 Operación de socket inaceptable para el dispositivo +$ EDESTADDRREQ +39 Se necesita una dirección de destino +$ EMSGSIZE +40 Mensaje demasiado largo +$ EPROTOTYPE +41 Tipo erróneo de protocolo para el socket +$ ENOPROTOOPT +42 Protocolo no disponible +$ EPROTONOSUPPORT +43 Protocolo no contemplado +$ ESOCKTNOSUPPORT +44 Tipo de socket no contemplado +$ EOPNOTSUPP +45 Operación no contemplada +$ EPFNOSUPPORT +46 Familia de protocolos no contemplada +$ EAFNOSUPPORT +47 Familia de direcciones no contemplada por la familia de protocolos +$ EADDRINUSE +48 La dirección ya está siendo usada +$ EADDRNOTAVAIL +49 No se pudo asignar la dirección requerida +$ ENETDOWN +50 La red no funciona +$ ENETUNREACH +51 No se ha podido acceder a la red +$ ENETRESET +52 La conexión de red se ha interrumpido al reinicializar +$ ECONNABORTED +53 Conexión perdida por problemas en el software +$ ECONNRESET +54 El interlocutor ha reinicializado la conexión +$ ENOBUFS +55 No queda espacio en el búfer +$ EISCONN +56 El socket ya estaba conectado +$ ENOTCONN +57 El socket no está conectado +$ ESHUTDOWN +58 No se puede enviar tras la desconexión del socket +$ ETOOMANYREFS +59 Demasiadas referencias: no se pueden unir +$ ETIMEDOUT +60 El tiempo de conexión ha expirado +$ ECONNREFUSED +61 Conexión rehusada +$ ELOOP +62 Demasiados niveles de enlaces simbólicos +$ ENAMETOOLONG +63 Nombre de fichero demasiado largo +$ EHOSTDOWN +64 La máquina está fuera de servicio +$ EHOSTUNREACH +65 No hay ruta hasta la máquina +$ ENOTEMPTY +66 Directorio no vacío +$ EPROCLIM +67 Demasiados procesos +$ EUSERS +68 Demasiados usuarios +$ EDQUOT +69 Cuota de disco sobrepasada +$ ESTALE +70 Descriptor de fichero NFS inválido +$ EREMOTE +71 Ruta con demasiados niveles +$ EBADRPC +72 La estructura de la RPC es errónea +$ ERPCMISMATCH +73 La versón de la RPC es errónea +$ EPROGUNAVAIL +74 La RPC no está accesible +$ EPROGMISMATCH +75 Versión errónea del programa +$ EPROCUNAVAIL +76 Procedimiento erróneo para el programa +$ ENOLCK +77 No hay bloqueos disponibles +$ ENOSYS +78 Función no realizada +$ EFTYPE +79 Tipo de fichero o formato inapropiado +$ EAUTH +80 Error de autentificación +$ ENEEDAUTH +81 Se necesita un autenticador +$ EIDRM +82 Identificador eliminado +$ ENOMSG +83 No hay mensajes del tipo deseado +$ EOVERFLOW +84 Valor demasiado grande para almacenarse en el tipo deseado +$ ECANCELED +85 Operación cancelada +$ EILSEQ +86 Secuencia de bytes ilegal +$ ENOATTR +87 Atributo no encontrado +$ EDOOFUS +88 Error de programación +$ EBADMSG +89 Mensaje inválido +$ EMULTIHOP +90 Intento de hop multiple +$ ENOLINK +91 El enlace se ha roto +$ EPROTO +92 Fallo de protocolo +$ ENOTCAPABLE +93 Habilidades insuficientes +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Fin de línea (Hangup) +$ SIGINT +2 Interrumpido +$ SIGQUIT +3 Terminado +$ SIGILL +4 Instrucción ilegal +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Excepción de coma flotante +$ SIGKILL +9 Matado +$ SIGBUS +10 Error en el bus +$ SIGSEGV +11 Fallo de segmentación +$ SIGSYS +12 Llamada al sistema errónea +$ SIGPIPE +13 Canal (pipe) roto +$ SIGALRM +14 Alarma del reloj +$ SIGTERM +15 Terminado +$ SIGURG +16 Condición urgente de E/S +$ SIGSTOP +17 Detenido (señal) +$ SIGTSTP +18 Detenido +$ SIGCONT +19 Continuando +$ SIGCHLD +20 Proceso hijo terminado +$ SIGTTIN +21 Detenido (entrada tty) +$ SIGTTOU +22 Detenido (salida tty) +$ SIGIO +23 E/S posible +$ SIGXCPU +24 Se ha sobrepasado el tiempo límite de la CPU +$ SIGXFSZ +25 Se ha sobrepasado el límite de tamaño de fichero +$ SIGVTALRM +26 Temporizador virtual expirado +$ SIGPROF +27 Temporizador de perfilación expirado +$ SIGWINCH +28 Cambios en el tamaño de ventana +$ SIGINFO +29 Petición de información +$ SIGUSR1 +30 Señal definida por el usuario n1 +$ SIGUSR2 +31 Señal definida por el usuario n2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsoleto) +1 Tipo de dirección no contemplado +$ EAI_AGAIN +2 Error transitorio en la resolución de nombres +$ EAI_BADFLAGS +3 Valor inválido de ai_flags +$ EAI_FAIL +4 Error no recuperable en la resolución de nombres +$ EAI_FAMILY +5 ai_family no contemplado +$ EAI_MEMORY +6 Error en la asignación de memoria +$ 7 (obsoleto) +7 No hay dirección asociada con el nombre de máquina +$ EAI_NONAME +8 No se dispone nombre de máquina, ni nombre de servicio +$ EAI_SERVICE +9 Nombre de servicio no contemplado en ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype no contemplado +$ EAI_SYSTEM +11 Error de sistema devuelto en errno +$ EAI_BADHINTS +12 Valor inválido de hints +$ EAI_PROTOCOL +13 Protocolo resuelto desconocido +$ EAI_OVERFLOW +14 Búfer de argumentos sobrepasado +$ 0 +32766 Éxito +$ NL_MSGMAX +32767 Error desconocido diff --git a/lib/libc/nls/fi_FI.ISO8859-1.msg b/lib/libc/nls/fi_FI.ISO8859-1.msg new file mode 100644 index 0000000000..386b41353d --- /dev/null +++ b/lib/libc/nls/fi_FI.ISO8859-1.msg @@ -0,0 +1,233 @@ +$ $FreeBSD: head/lib/libc/nls/fi_FI.ISO8859-1.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for fi_FI.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Toimintoa ei sallita +$ ENOENT +2 Tiedostoa tai hakemistoa ei löydy +$ ESRCH +3 Prosessia ei löydy +$ EINTR +4 Systeemikutsu keskeytyi +$ EIO +5 Syöttö/tulostusvirhe +$ ENXIO +6 Laitetta ei määritelty +$ E2BIG +7 Liikaa argumentteja +$ ENOEXEC +8 Tuntematon ohjelmatyyppi +$ EBADF +9 Virheellinen tiedosto-osoitin +$ ECHILD +10 Ei lapsiprosesseja +$ EDEADLK +11 Resurssin ristiinlukitus vältetty +$ ENOMEM +12 Muistinvaraus epäonnistui +$ EACCES +13 Lupa kielletty +$ EFAULT +14 Virheellinen osoite +$ ENOTBLK +15 Tarvitaan lohko-osoitettava laite +$ EBUSY +16 Laite käytössä +$ EEXIST +17 Tiedosto on jo olemassa +$ EXDEV +18 Laitteiden välinen linkki +$ ENODEV +19 Laite ei tue toimintoa +$ ENOTDIR +20 Kohde ei ole hakemisto +$ EISDIR +21 Kohde on hakemisto +$ EINVAL +22 Virheellinen argumentti +$ ENFILE +23 Järjestelmässä on liian monta avointa tiedostoa +$ EMFILE +24 Liian monta avointa tiedostoa +$ ENOTTY +25 Virheellinen ohjaustoiminto laitteelle +$ ETXTBSY +26 Tiedosto on käytössä +$ EFBIG +27 Tiedosto liian suuri +$ ENOSPC +28 Laitteella ei ole tilaa +$ ESPIPE +29 Virheellinen haku +$ EROFS +30 Vain luettava tiedostojärjestelmä +$ EMLINK +31 Liian monta linkkiä +$ EPIPE +32 Katkennut putki +$ EDOM +33 Numeerinen syöte virheellinen +$ ERANGE +34 Tulos liian suuri +$ EAGAIN, EWOULDBLOCK +35 Resurssi ei ole tilapäisesti saatavilla +$ EINPROGRESS +36 Toiminta on käynnissä +$ EALREADY +37 Toiminta oli jo käynnissä +$ ENOTSOCK +38 Socket-operaatio muulla kuin socketilla +$ EDESTADDRREQ +39 Tarvitaan kohdeosoite +$ EMSGSIZE +40 Sanoma liian pitkä +$ EPROTOTYPE +41 Väärä protokolla socketille +$ ENOPROTOOPT +42 Protokolla ei ole käytettävissä +$ EPROTONOSUPPORT +43 Protokollaa ei tueta +$ ESOCKTNOSUPPORT +44 Socket-tyyppiä ei tueta +$ EOPNOTSUPP +45 Toimintoa ei tueta +$ EPFNOSUPPORT +46 Protokollaperhettä ei tueta +$ EAFNOSUPPORT +47 Protokollaperhe ei tue osoiteperhettä +$ EADDRINUSE +48 Osoite on jo käytössä +$ EADDRNOTAVAIL +49 Ei pysty antamaan pyydettyä osoitetta +$ ENETDOWN +50 Verkko ei ole käytettävissä +$ ENETUNREACH +51 Verkkoon ei ole yhteyttä +$ ENETRESET +52 Verkko sulki yhteyden +$ ECONNABORTED +53 Ohjelmiston aiheuttama yhteyden keskeytyminen +$ ECONNRESET +54 Isäntä nollasi yhteyden +$ ENOBUFS +55 Puskuritila on lopussa +$ EISCONN +56 Yhteys on jo olemassa +$ ENOTCONN +57 Yhteyttä ei ole olemassa +$ ESHUTDOWN +58 Lähettäminen ei ole mahdollista yhteyden katkaisun jälkeen +$ ETOOMANYREFS +59 Liikaa viittauksia: ei voi yhdistää +$ ETIMEDOUT +60 Yhteyden aikavalvontakatkaisu +$ ECONNREFUSED +61 Yhteys hylätty +$ ELOOP +62 Liian monta peräkkäistä symbolista linkkiä +$ ENAMETOOLONG +63 Tiedoston nimi on liian pitkä +$ EHOSTDOWN +64 Isäntä ei vastaa +$ EHOSTUNREACH +65 Ei reittiä isäntään +$ ENOTEMPTY +66 Hakemisto ei ole tyhjä +$ EPROCLIM +67 Liian monta prosessia +$ EUSERS +68 Liian monta käyttäjää +$ EDQUOT +69 Levytilarajoitus ylittyi +$ ESTALE +70 Vanhentunut NFS-yhteys +$ EREMOTE +71 Liian monta verkkolevyä polussa +$ EBADRPC +72 Virheellinen RPC-pyyntö +$ ERPCMISMATCH +73 Väärä RPC-versio +$ EPROGUNAVAIL +74 RPC ei käytettävissä +$ EPROGMISMATCH +75 Väärä ohjelmaversio +$ EPROCUNAVAIL +76 Väärä RPC-pyyntö ohjelmalle +$ ENOLCK +77 Lukitus ei käytettävissä +$ ENOSYS +78 Toimintoa ei ole +$ EFTYPE +79 Väärä tiedostotyyppi tai -formaatti +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Katkaisu +$ SIGINT +2 Keskeytys +$ SIGQUIT +3 Lopetus +$ SIGILL +4 Laiton käsky +$ SIGTRAP +5 Jäljitys/BPT ansa +$ SIGABRT +6 Poistumisansa +$ SIGEMT +7 EMT-ansa +$ SIGFPE +8 Liukulukuvirhe +$ SIGKILL +9 Tapettu +$ SIGBUS +10 Väylävirhe +$ SIGSEGV +11 Suojausvirhe +$ SIGSYS +12 Virheellinen systeemikutsu +$ SIGPIPE +13 Katkennut putki +$ SIGALRM +14 Hälytyskello +$ SIGTERM +15 Lopetettu +$ SIGURG +16 Kiireellinen syöttö/tulostus +$ SIGSTOP +17 Pysäytetty (signaali) +$ SIGTSTP +18 Pysäytetty +$ SIGCONT +19 Jatkettu +$ SIGCHLD +20 Lapsiprosessi päättynyt +$ SIGTTIN +21 Pysäytetty (tty-syöte) +$ SIGTTOU +22 Pysäytetty (tty-tuloste) +$ SIGIO +23 Syöttö ja tulostus mahdollisia +$ SIGXCPU +24 Keskusyksikköaikarajoitus ylitetty +$ SIGXFSZ +25 Tiedoston kokorajoitus ylitetty +$ SIGVTALRM +26 Virtuaali-ajastin laukesi +$ SIGPROF +27 Profilointiajastin laukesi +$ SIGWINCH +28 Ikkunan koko muuttuu +$ SIGINFO +29 Informaatiopyyntö +$ SIGUSR1 +30 Käyttäjän määriteltävä signaali 1 +$ SIGUSR2 +31 Käyttäjän määriteltävä signaali 2 +$ SIGPWR +32 Virransaannin tilassa muutos diff --git a/lib/libc/nls/fr_FR.ISO8859-1.msg b/lib/libc/nls/fr_FR.ISO8859-1.msg new file mode 100644 index 0000000000..9e2796adb3 --- /dev/null +++ b/lib/libc/nls/fr_FR.ISO8859-1.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/fr_FR.ISO8859-1.msg 249471 2013-04-14 11:44:47Z jilles $ +$ +$ Message catalog for fr_FR.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Opération non autorisée +$ ENOENT +2 Fichier ou répertoire inexistant +$ ESRCH +3 Processus inconnu +$ EINTR +4 Appel système interrompu +$ EIO +5 Erreur d'entrée/sortie +$ ENXIO +6 Dispositif non configuré +$ E2BIG +7 Liste d'arguments trop longue +$ ENOEXEC +8 Format d'exécutable invalide +$ EBADF +9 Mauvais descripteur de fichier +$ ECHILD +10 Pas de processus fils +$ EDEADLK +11 Étreinte mortelle détectée +$ ENOMEM +12 Impossible d'allouer de la mémoire +$ EACCES +13 Permission refusée +$ EFAULT +14 Mauvaise adresse +$ ENOTBLK +15 Dispositif en mode bloc requis +$ EBUSY +16 Dispositif occupé +$ EEXIST +17 Le fichier existe +$ EXDEV +18 Lien inter-unités +$ ENODEV +19 Opération non supportée par le dispositif +$ ENOTDIR +20 Pas un répertoire +$ EISDIR +21 Est un répertoire +$ EINVAL +22 Argument invalide +$ ENFILE +23 Trop de fichiers ouverts sur le système +$ EMFILE +24 Trop de fichiers ouverts +$ ENOTTY +25 Fonction inadaptée au dispositif +$ ETXTBSY +26 Fichier en cours d'utilisation +$ EFBIG +27 Fichier trop grand +$ ENOSPC +28 Plus d'espace disponible +$ ESPIPE +29 Recherche illégale +$ EROFS +30 Système de fichier en lecture seulement +$ EMLINK +31 Trop de liens +$ EPIPE +32 Tube déconnecté +$ EDOM +33 Argument numérique hors définition +$ ERANGE +34 Résultat trop grand +$ EAGAIN, EWOULDBLOCK +35 Ressource indisponible temporairement +$ EINPROGRESS +36 Opération en cours +$ EALREADY +37 Opération déjà en cours +$ ENOTSOCK +38 Opération de type socket sur un descripteur de fichier +$ EDESTADDRREQ +39 Adresse de destination obligatoire +$ EMSGSIZE +40 Message trop long +$ EPROTOTYPE +41 Mauvais type de protocole pour la socket +$ ENOPROTOOPT +42 Protocole non disponible +$ EPROTONOSUPPORT +43 Protocole non supporté +$ ESOCKTNOSUPPORT +44 Type de socket non supporté +$ EOPNOTSUPP +45 Opération non supportée +$ EPFNOSUPPORT +46 Famille de protocole non supportée +$ EAFNOSUPPORT +47 Famille d'adresse non supportée par la famille de protocole +$ EADDRINUSE +48 Adresse en cours d'utilisation +$ EADDRNOTAVAIL +49 Impossible d'assigner l'adresse demandée +$ ENETDOWN +50 Plus de réseau +$ ENETUNREACH +51 Réseau inaccessible +$ ENETRESET +52 Connexion coupée par le réseau +$ ECONNABORTED +53 Connexion interrompue +$ ECONNRESET +54 Connexion interrompue par l'hôte distant +$ ENOBUFS +55 Tampon saturé +$ EISCONN +56 La socket est déjà connectée +$ ENOTCONN +57 La socket n'est pas connectée +$ ESHUTDOWN +58 Impossible d'envoyer après la coupure +$ ETOOMANYREFS +59 Trop de références : lien impossible +$ ETIMEDOUT +60 Dépassement du délai d'attente +$ ECONNREFUSED +61 Connexion refusée +$ ELOOP +62 Trop de niveaux de liens symboliques +$ ENAMETOOLONG +63 Nom de fichier trop long +$ EHOSTDOWN +64 Hôte distant arrêté +$ EHOSTUNREACH +65 Pas de route vers l'hôte distant +$ ENOTEMPTY +66 Répertoire non vide +$ EPROCLIM +67 Trop de processus +$ EUSERS +68 Trop d'utilisateurs +$ EDQUOT +69 Quota de disque dépassé +$ ESTALE +70 Identificateur de fichier NFS périmé +$ EREMOTE +71 Trop de niveaux extérieurs dans le path +$ EBADRPC +72 Mauvaise structure RPC +$ ERPCMISMATCH +73 Mauvaise version RPC +$ EPROGUNAVAIL +74 Prog. RPC indisponible +$ EPROGMISMATCH +75 Mauvaise version de programme +$ EPROCUNAVAIL +76 Mauvaise procédure pour le programme +$ ENOLCK +77 Plus de verrous disponibles +$ ENOSYS +78 Fonction non implémentée +$ EFTYPE +79 Type de fichier ou format inapproprié +$ EAUTH +80 Erreur d'authentification +$ ENEEDAUTH +81 Authentification requise +$ EIDRM +82 Identifiant retiré +$ ENOMSG +83 Aucun message du type souhaité +$ EOVERFLOW +84 Valeur trop grande pour le type de donnée +$ ECANCELED +85 Opération annulée +$ EILSEQ +86 Séquence d'octets illégale +$ ENOATTR +87 Attribut non trouvé +$ EDOOFUS +88 Erreur de programmation +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Fin de connexion +$ SIGINT +2 Interruption +$ SIGQUIT +3 Quitter +$ SIGILL +4 Instruction illégale +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Exception sur virgule flottante +$ SIGKILL +9 Tué +$ SIGBUS +10 Bus error +$ SIGSEGV +11 Segmentation fault +$ SIGSYS +12 Bad system call +$ SIGPIPE +13 Broken pipe +$ SIGALRM +14 Alarm clock +$ SIGTERM +15 Terminé +$ SIGURG +16 Urgent I/O condition +$ SIGSTOP +17 Suspended (signal) +$ SIGTSTP +18 Suspended +$ SIGCONT +19 Continued +$ SIGCHLD +20 Child exited +$ SIGTTIN +21 Stopped (tty input) +$ SIGTTOU +22 Stopped (tty output) +$ SIGIO +23 I/O possible +$ SIGXCPU +24 Cputime limit exceeded +$ SIGXFSZ +25 Filesize limit exceeded +$ SIGVTALRM +26 Virtual timer expired +$ SIGPROF +27 Profiling timer expired +$ SIGWINCH +28 Window size changes +$ SIGINFO +29 Information request +$ SIGUSR1 +30 User defined signal 1 +$ SIGUSR2 +31 User defined signal 2 diff --git a/lib/libc/nls/gl_ES.ISO8859-1.msg b/lib/libc/nls/gl_ES.ISO8859-1.msg new file mode 100644 index 0000000000..7153ba029d --- /dev/null +++ b/lib/libc/nls/gl_ES.ISO8859-1.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/gl_ES.ISO8859-1.msg 202743 2010-01-21 11:36:40Z gabor $ +$ +$ Message catalog for gl_ES.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operación non permitida +$ ENOENT +2 Ficheiro ou directorio inexistente +$ ESRCH +3 Proceso inexistente +$ EINTR +4 Chamada do sistema interrompida +$ EIO +5 Erro de Entrada/Saída +$ ENXIO +6 Dispositivo non configurado +$ E2BIG +7 A lista de argumentos é demasiado larga +$ ENOEXEC +8 Erro no formato do executable +$ EBADF +9 Descriptor incorrecto de ficheiro +$ ECHILD +10 Non hai procesos fillos +$ EDEADLK +11 Evitouse o bloqueo do recurso +$ ENOMEM +12 Non se puido asignar memoria +$ EACCES +13 Permiso denegado +$ EFAULT +14 Dirección incorrecta +$ ENOTBLK +15 Precísase un dispositivo de bloques +$ EBUSY +16 Dispositivo ocupado +$ EEXIST +17 O ficheiro xa existe +$ EXDEV +18 Enlace entre dispositivos +$ ENODEV +19 Operación inadecuada para este dispositivo +$ ENOTDIR +20 Non é un directorio +$ EISDIR +21 É un directorio +$ EINVAL +22 Argumento inadecuado +$ ENFILE +23 Hai demasiados ficheiros abertos no sistema +$ EMFILE +24 Hai demasiados ficheiros abertos +$ ENOTTY +25 ioctl inapropiado para o dispositivo +$ ETXTBSY +26 Ficheiro de texto ocupado +$ EFBIG +27 Ficheiro demasiado grande +$ ENOSPC +28 Non queda espacio libre no dispositivo +$ ESPIPE +29 seek inválido +$ EROFS +30 Sistema de ficheiros de só lectura +$ EMLINK +31 Demasiados enlaces +$ EPIPE +32 Canal (pipe) roto +$ EDOM +33 Argumento numérico fóra de rango +$ ERANGE +34 O resultado é demasiado grande +$ EAGAIN, EWOULDBLOCK +35 O recurso non está dispoñible temporalmente +$ EINPROGRESS +36 Operación en proceso +$ EALREADY +37 A operación xa estase executando +$ ENOTSOCK +38 Operación de socket inaceptable para o dispositivo +$ EDESTADDRREQ +39 Precísase unha dirección de destino +$ EMSGSIZE +40 Mensaxe demasiado largo +$ EPROTOTYPE +41 Tipo malo de protocolo para o socket +$ ENOPROTOOPT +42 Protocolo non dispoñible +$ EPROTONOSUPPORT +43 Protocolo non contemplado +$ ESOCKTNOSUPPORT +44 Tipo de socket non contemplado +$ EOPNOTSUPP +45 Operación non contemplada +$ EPFNOSUPPORT +46 Familia de protocolos non contemplada +$ EAFNOSUPPORT +47 Familia de direcciones non contemplada pola familia de protocolos +$ EADDRINUSE +48 A dirección xa está en uso +$ EADDRNOTAVAIL +49 Non se puido asignar a dirección requerida +$ ENETDOWN +50 A rede non funciona +$ ENETUNREACH +51 Non se puido acceder á rede +$ ENETRESET +52 A conexión de rede interrompiuse ao reinicializar +$ ECONNABORTED +53 Conexión perdida por problemas no software +$ ECONNRESET +54 O interlocutor reinicializou a conexión +$ ENOBUFS +55 Non queda espacio no búfer +$ EISCONN +56 O socket xa estaba conectado +$ ENOTCONN +57 O socket non está conectado +$ ESHUTDOWN +58 Non se pode enviar tras a desconexión do socket +$ ETOOMANYREFS +59 Demasiadas referencias: non poden unirse +$ ETIMEDOUT +60 O tempo de conexión expirou +$ ECONNREFUSED +61 Conexión rexeitada +$ ELOOP +62 Demasiados niveles de enlaces simbólicos +$ ENAMETOOLONG +63 Nome de ficheiro demasiado largo +$ EHOSTDOWN +64 A máquina está fóra de servicio +$ EHOSTUNREACH +65 Non hai ruta ata a máquina +$ ENOTEMPTY +66 Directorio non baleiro +$ EPROCLIM +67 Demasiados procesos +$ EUSERS +68 Demasiados usuarios +$ EDQUOT +69 Cuota de disco sobrepasada +$ ESTALE +70 Descriptor de ficheiro NFS inválido +$ EREMOTE +71 Ruta con demasiados niveles +$ EBADRPC +72 A estructura da RPC é mala +$ ERPCMISMATCH +73 A versión da RPC é mala +$ EPROGUNAVAIL +74 A RPC non está accesible +$ EPROGMISMATCH +75 Versión mala do programa +$ EPROCUNAVAIL +76 Procedemento malo para o programa +$ ENOLCK +77 Non hai bloqueos dispoñibles +$ ENOSYS +78 Función non realizada +$ EFTYPE +79 Tipo de ficheiro ou formato inapropiado +$ EAUTH +80 Erro de autenticación +$ ENEEDAUTH +81 Precísase un autenticador +$ EIDRM +82 Identificador eliminado +$ ENOMSG +83 Non hai mensaxes do tipo desexado +$ EOVERFLOW +84 Valor demasiado grande para se almacenar no tipo desexado +$ ECANCELED +85 Operación cancelada +$ EILSEQ +86 Secuencia inválida de byte +$ ENOATTR +87 Atributo non encontrado +$ EDOOFUS +88 Erro de programación +$ EBADMSG +89 Mensaxe inválido +$ EMULTIHOP +90 Intento de Multihop +$ ENOLINK +91 Enlace fortaleceuse +$ EPROTO +92 Erro de protocolo +$ ENOTCAPABLE +93 Habilidades non suficientes +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Fin de liña (Hangup) +$ SIGINT +2 Interrompido +$ SIGQUIT +3 Terminado +$ SIGILL +4 Instrucción inválida +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Excepción de coma flotante +$ SIGKILL +9 Matado +$ SIGBUS +10 Erro no bus +$ SIGSEGV +11 Fallo de segmentación +$ SIGSYS +12 Chamada ao sistema mala +$ SIGPIPE +13 Canal (pipe) roto +$ SIGALRM +14 Alarma do reloxo +$ SIGTERM +15 Terminado +$ SIGURG +16 Condición urxente de E/S +$ SIGSTOP +17 Detido (sinal) +$ SIGTSTP +18 Detido +$ SIGCONT +19 Continuando +$ SIGCHLD +20 Proceso fillo terminado +$ SIGTTIN +21 Detido (entrada tty) +$ SIGTTOU +22 Detido (sída tty) +$ SIGIO +23 E/S posible +$ SIGXCPU +24 Sobrepasouse o tempo límite da CPU +$ SIGXFSZ +25 Sobrepasouse o límite de tamaño de ficheiro +$ SIGVTALRM +26 Temporizador virtual caducado +$ SIGPROF +27 Temporizador de perfilación caducado +$ SIGWINCH +28 Cambios no tamaño de xanela +$ SIGINFO +29 Petición de información +$ SIGUSR1 +30 Sinal definida polo usuario no. 1 +$ SIGUSR2 +31 Sinal definida polo usuario no. 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsoleto) +1 Tipo de dirección non soportado +$ EAI_AGAIN +2 Erro temporal na resolución de nomes +$ EAI_BADFLAGS +3 Valor inválido de ai_flags +$ EAI_FAIL +4 Erro non recuperable na resolución de nomes +$ EAI_FAMILY +5 ai_family non soportado +$ EAI_MEMORY +6 Erro na asignación de memoria +$ 7 (obsoleto) +7 Non hai dirección asociada co nome de máquina +$ EAI_NONAME +8 Non se dispón nome de máquina, nin nome de servizo +$ EAI_SERVICE +9 Nome de servizo non soportado en ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype non soportado +$ EAI_SYSTEM +11 Erro de sistema devolto en errno +$ EAI_BADHINTS +12 Valor inválido de hints +$ EAI_PROTOCOL +13 Protocolo resolto descoñecido +$ EAI_OVERFLOW +14 Búfer de argumentos excedido +$ 0 +32766 Éxito +$ NL_MSGMAX +32767 Erro descoñecido diff --git a/lib/libc/nls/hu_HU.ISO8859-2.msg b/lib/libc/nls/hu_HU.ISO8859-2.msg new file mode 100644 index 0000000000..a188a49fa0 --- /dev/null +++ b/lib/libc/nls/hu_HU.ISO8859-2.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/hu_HU.ISO8859-2.msg 199417 2009-11-17 18:57:44Z gabor $ +$ +$ Message catalog for hu_HU.ISO8859-2 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Nem engedélyezett mûvelet +$ ENOENT +2 Fájl vagy könyvtár nem található +$ ESRCH +3 Processz nem található +$ EINTR +4 Megszakított rendszerhívás +$ EIO +5 B/K hiba +$ ENXIO +6 Konfigurálatlan eszköz +$ E2BIG +7 Túl hosszú argumentumlista +$ ENOEXEC +8 Hibás végrehajtható formátum +$ EBADF +9 Rossz fájlleíró +$ ECHILD +10 Nem létezõ gyermek processz +$ EDEADLK +11 Resource deadlock avoided +$ ENOMEM +12 Memória nem foglalható le +$ EACCES +13 Hozzáférés megtagadva +$ EFAULT +14 Rossz cím +$ ENOTBLK +15 Blokkos eszköz szükséges +$ EBUSY +16 Eszköz foglalt +$ EEXIST +17 Fájl létezik +$ EXDEV +18 Kereszthivatkozás eszközökön +$ ENODEV +19 A mûvelet nem támogatott az eszköz által +$ ENOTDIR +20 Nem könyvtár +$ EISDIR +21 Könyvtár +$ EINVAL +22 Érvénytelen argumentum +$ ENFILE +23 Túl sok megnyitott fájl a rendszerben +$ EMFILE +24 Túl sok megnyitott fájl +$ ENOTTY +25 Nem megfelelõ ioctl az eszközhöz +$ ETXTBSY +26 Szöveges fájl foglalt +$ EFBIG +27 Fájl túl nagy +$ ENOSPC +28 Nincs hely az eszközön +$ ESPIPE +29 Érvénytelen seek +$ EROFS +30 Csak olvasható fájlrendszer +$ EMLINK +31 Túl sok link +$ EPIPE +32 Hibás csõvezeték +$ EDOM +33 Numerikus argumentum nem esik a tartományba +$ ERANGE +34 Az esermény túl nagy +$ EAGAIN, EWOULDBLOCK +35 Az erõforrás ideiglenesen nem érhetõ el +$ EINPROGRESS +36 A mûvelet folyamatban van +$ EALREADY +37 A mûvelet már folyamatban van +$ ENOTSOCK +38 Socket mûvelet nem socketen +$ EDESTADDRREQ +39 Cél cím szükséges +$ EMSGSIZE +40 Túl hosszú üzenet +$ EPROTOTYPE +41 Rossz protokolltípus a sockethez +$ ENOPROTOOPT +42 Protokoll nem érhetõ el +$ EPROTONOSUPPORT +43 Protokoll nem támogatott +$ ESOCKTNOSUPPORT +44 Sockettípus nem támogatott +$ EOPNOTSUPP +45 Mûvelet nem támogatott +$ EPFNOSUPPORT +46 Protokollcsalád nem támogatott +$ EAFNOSUPPORT +47 A címcsalád nem támogatott a protokollcsalád által +$ EADDRINUSE +48 A cím már használatban van +$ EADDRNOTAVAIL +49 A kért cím nem osztható ki +$ ENETDOWN +50 A hálózat nem mûködik +$ ENETUNREACH +51 A hálózat nem érhetõ el +$ ENETRESET +52 A hálózat megszakította a kapcsolatot +$ ECONNABORTED +53 A szoftver megszakította a kapcsolatot +$ ECONNRESET +54 A kapcsolatot megszakította a peer +$ ENOBUFS +55 Nincs rendelkezésre álló pufferterület +$ EISCONN +56 A socket már kapcsolódva van +$ ENOTCONN +57 A socket nincs kapcsolódva +$ ESHUTDOWN +58 Nem küldhetõ el a socket lebontása után +$ ETOOMANYREFS +59 Túl sok hivatkozás: nem illeszthetõ össze +$ ETIMEDOUT +60 A mûvelet túllépte a rendelkezésre álló idõt +$ ECONNREFUSED +61 Kapcsolat elutasítva +$ ELOOP +62 Túl sok szint a szimbolikus linkekben +$ ENAMETOOLONG +63 Túl hosszú fájlnév +$ EHOSTDOWN +64 A kiszolgáló nem érhetõ el +$ EHOSTUNREACH +65 Nincs útvonal a kiszolgálóhoz +$ ENOTEMPTY +66 Könyvtár nem üres +$ EPROCLIM +67 Túl sok processz +$ EUSERS +68 Túl sok felhasználó +$ EDQUOT +69 A lemezkvóta túllépve +$ ESTALE +70 Elavult NFS fájlkezelõ +$ EREMOTE +71 Túl sok szint a távoli útvonalban +$ EBADRPC +72 Rossz RPC struktúra +$ ERPCMISMATCH +73 Rossz RPC verzió +$ EPROGUNAVAIL +74 RPC program nem érhetõ el +$ EPROGMISMATCH +75 Rossz programverzió +$ EPROCUNAVAIL +76 Rossz eljárás a programhoz +$ ENOLCK +77 Nincs elérhetõ zárolás +$ ENOSYS +78 Nem implementált funkció +$ EFTYPE +79 Nem megfelelõ fájltípus vagy formátum +$ EAUTH +80 Azonosítási hiba +$ ENEEDAUTH +81 Azonosítás szükséges +$ EIDRM +82 Azonosító eltávolítva +$ ENOMSG +83 Nincs üzenet a kívánt típusból +$ EOVERFLOW +84 Az érték túl nagy az adott adattípusban való tároláshoz +$ ECANCELED +85 Mûvelet törölva +$ EILSEQ +86 Érvénytelen bájtsorrend +$ ENOATTR +87 Attribútum nem található +$ EDOOFUS +88 Programozási hiba +$ EBADMSG +89 Helytelen üzenet +$ EMULTIHOP +90 Multihop kísérlet +$ ENOLINK +91 A kapcsolat szigorítva lett +$ EPROTO +92 Protokol hiba +$ ENOTCAPABLE +93 Elégtelen képességek +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Hangup +$ SIGINT +2 Megszakítás +$ SIGQUIT +3 Kilépés +$ SIGILL +4 Érvénytelen mûvelet +$ SIGTRAP +5 Trace/BPT csapda +$ SIGABRT +6 Abort csapda +$ SIGEMT +7 EMT csapda +$ SIGFPE +8 Lebegõpontos kivétel +$ SIGKILL +9 Megölve +$ SIGBUS +10 Busz hiba +$ SIGSEGV +11 Szegmentációs hiba +$ SIGSYS +12 Rossz rendszerhívás +$ SIGPIPE +13 Hibás csõvezeték +$ SIGALRM +14 Idõzítési riasztás +$ SIGTERM +15 Befejezve +$ SIGURG +16 Sürgõs B/K feltétel +$ SIGSTOP +17 Elaltatva (szignál) +$ SIGTSTP +18 Elaltatva +$ SIGCONT +19 Folytatva +$ SIGCHLD +20 Gyermek befejezõdött +$ SIGTTIN +21 Leállítva (tty bevitel) +$ SIGTTOU +22 Leállítva (tty kivitel) +$ SIGIO +23 B/K lehetséges +$ SIGXCPU +24 Processzoridõ-korlátozás túllépve +$ SIGXFSZ +25 ájlméret-korlátozás túllépve +$ SIGVTALRM +26 Virtuális idõzítõ lejárt +$ SIGPROF +27 Profilidõzítõ lejárt +$ SIGWINCH +28 Ablakméret-változások +$ SIGINFO +29 Információkérés +$ SIGUSR1 +30 Felhasználói szignál 1 +$ SIGUSR2 +31 Felhasználói szignál 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (elavult) +1 A hosztnévhez tartozó címcsalád nem támogatott +$ EAI_AGAIN +2 Ideiglenes hiba a névfeloldáskor +$ EAI_BADFLAGS +3 Érvénytelen ai_flags érték +$ EAI_FAIL +4 Nem helyreállítható hiba a névfeloldásban +$ EAI_FAMILY +5 ai_family nem támogatott +$ EAI_MEMORY +6 Memóriafoglalási hiba +$ 7 (elavult) +7 Nem tartozik cím í hosztnévhez +$ EAI_NONAME +8 Se hosztnév, se szolgáltatásnév nem áll rendelkezésre +$ EAI_SERVICE +9 Nem támogatott ai_socktype szolgáltatásnév +$ EAI_SOCKTYPE +10 ai_socktype nem támogatott +$ EAI_SYSTEM +11 Rendszerhiba jött vissza az errno változóban +$ EAI_BADHINTS +12 Érvénytelen hint érték +$ EAI_PROTOCOL +13 A feloldott protokol ismeretlen +$ EAI_OVERFLOW +14 Az argumentumok puffere túlcsordult +$ 0 +32766 Siker +$ NL_MSGMAX +32767 Ismeretlen hiba diff --git a/lib/libc/nls/it_IT.ISO8859-15.msg b/lib/libc/nls/it_IT.ISO8859-15.msg new file mode 100644 index 0000000000..4385f8bb7f --- /dev/null +++ b/lib/libc/nls/it_IT.ISO8859-15.msg @@ -0,0 +1,231 @@ +$ $FreeBSD: head/lib/libc/nls/it_IT.ISO8859-15.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for it_IT.ISO8859-15 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operazione non permessa +$ ENOENT +2 File o directory inesistente +$ ESRCH +3 Processo inesistente +$ EINTR +4 Chiamata di sistema interrotta +$ EIO +5 Errore di input/output +$ ENXIO +6 Periferica non configurata +$ E2BIG +7 Lista degli argomenti troppo lunga +$ ENOEXEC +8 Errore nel formato eseguibile +$ EBADF +9 Descrittore di file non valido +$ ECHILD +10 Nessun processo figlio +$ EDEADLK +11 Situazione di deadlock evitata +$ ENOMEM +12 Impossibile allocare memoria +$ EACCES +13 Permesso negato +$ EFAULT +14 Indirizzo non valido +$ ENOTBLK +15 Periferica a blocchi necessaria +$ EBUSY +16 Periferica occupata +$ EEXIST +17 Il file esiste +$ EXDEV +18 Link improprio +$ ENODEV +19 Operazione non supportata dalla periferica +$ ENOTDIR +20 Non è una directory +$ EISDIR +21 E' una directory +$ EINVAL +22 Argomento non valido +$ ENFILE +23 Troppi file aperti nel sistema +$ EMFILE +24 Troppi file aperti +$ ENOTTY +25 Ioctl inappropriata per la periferica +$ ETXTBSY +26 File di testo occupato +$ EFBIG +27 File troppo grande +$ ENOSPC +28 Spazio sulla periferica esaurito +$ ESPIPE +29 Ricerca non valida +$ EROFS +30 Filesystem di sola lettura +$ EMLINK +31 Troppi link +$ EPIPE +32 Pipe rotta +$ EDOM +33 Argomento numerico fuori dal dominio +$ ERANGE +34 Risultato troppo grande +$ EAGAIN, EWOULDBLOCK +35 Risorsa temporaneamente non disponibile +$ EINPROGRESS +36 Operazione in esecuzione +$ EALREADY +37 Operazione già in esecuzione +$ ENOTSOCK +38 Operazione sui socket eseguita su un non-socket +$ EDESTADDRREQ +39 Indirizzo destinazione necessario +$ EMSGSIZE +40 Messaggio troppo lungo +$ EPROTOTYPE +41 Tipo di protocollo non valido per il socket +$ ENOPROTOOPT +42 Protocollo non disponibile +$ EPROTONOSUPPORT +43 Protocollo non supportato +$ ESOCKTNOSUPPORT +44 Tipo di socket non supportato +$ EOPNOTSUPP +45 Operazione non supportata +$ EPFNOSUPPORT +46 Famiglia di protocolli non supportata +$ EAFNOSUPPORT +47 Famiglia di indirizzi non supportata dalla famiglia di protocolli +$ EADDRINUSE +48 Indirizzo già in uso +$ EADDRNOTAVAIL +49 Impossibile assegnare l'indirizzo richiesto +$ ENETDOWN +50 Network fuori uso +$ ENETUNREACH +51 Network non raggiungibile +$ ENETRESET +52 Network dropped connection on reset +$ ECONNABORTED +53 Interruzione della connessione causata dal software +$ ECONNRESET +54 Connessione azzerata dal corrispondente +$ ENOBUFS +55 Spazio del buffer esaurito +$ EISCONN +56 Socket già connesso +$ ENOTCONN +57 Socket non connesso +$ ESHUTDOWN +58 Impossibile inviare dopo la chiusura del socket +$ ETOOMANYREFS +59 Troppe referenze: impossibile raccordare +$ ETIMEDOUT +60 Connessione scaduta +$ ECONNREFUSED +61 Connection rifiutata +$ ELOOP +62 Troppi livelli di link simbolici +$ ENAMETOOLONG +63 Nome di file troppo lungo +$ EHOSTDOWN +64 Host fuori uso +$ EHOSTUNREACH +65 Host irraggiungibile +$ ENOTEMPTY +66 Directory non vuota +$ EPROCLIM +67 Troppi processi +$ EUSERS +68 Troppi utenti +$ EDQUOT +69 Quota disco superata +$ ESTALE +70 Manipolatore di file NFS scaduto +$ EREMOTE +71 Troppi livelli remoti nel path +$ EBADRPC +72 Struttura RPC non valida +$ ERPCMISMATCH +73 Versione RPC non corrispondente +$ EPROGUNAVAIL +74 Programma RPC non disponibile +$ EPROGMISMATCH +75 Versione del programma non corrispodente +$ EPROCUNAVAIL +76 Procedura non disponibile +$ ENOLCK +77 Nessun lock disponibile +$ ENOSYS +78 Funzione non implementata +$ EFTYPE +79 Tipo di file o formato inappropriato +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Hangup +$ SIGINT +2 Interruzione +$ SIGQUIT +3 Chiusura +$ SIGILL +4 Istruzione illegale +$ SIGTRAP +5 Trappola Trace/breakpoint +$ SIGABRT +6 Trappola abort() +$ SIGEMT +7 Trappola EMT +$ SIGFPE +8 Errore di virgola mobile +$ SIGKILL +9 Ucciso +$ SIGBUS +10 Errore di bus +$ SIGSEGV +11 Errore di segmentazione +$ SIGSYS +12 Chiamata di sistema non valida +$ SIGPIPE +13 Pipe rotta +$ SIGALRM +14 Sveglia +$ SIGTERM +15 Terminato +$ SIGURG +16 I/O urgente +$ SIGSTOP +17 Processo fermato +$ SIGTSTP +18 Stop da terminale +$ SIGCONT +19 Continuato +$ SIGCHLD +20 Processo figlio uscito +$ SIGTTIN +21 Input da terminale per processo in background +$ SIGTTOU +22 Output a terminale per processo in background +$ SIGIO +23 I/O possibile +$ SIGXCPU +24 Limite del tempo di CPU superato +$ SIGXFSZ +25 Limite della dimensione del file superato +$ SIGVTALRM +26 Timer virtuale scaduto +$ SIGPROF +27 Timer di profilo expired +$ SIGWINCH +28 Cambio di dimensione della finestra +$ SIGINFO +29 Richiesta di informazioni +$ SIGUSR1 +30 Segnale definito dall'utente 1 +$ SIGUSR2 +31 Segnale definito dall'utente 2 diff --git a/lib/libc/nls/ja_JP.UTF-8.msg b/lib/libc/nls/ja_JP.UTF-8.msg new file mode 100644 index 0000000000..b71c6719bf --- /dev/null +++ b/lib/libc/nls/ja_JP.UTF-8.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/ja_JP.UTF-8.msg 199128 2009-11-10 03:56:51Z ume $ +$ +$ Message catalog for ja_JP.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 許可されていない操作です +$ ENOENT +2 そのようなファイルまたはディレクトリはありません +$ ESRCH +3 そのようなプロセスはありません +$ EINTR +4 システムコールが中断されました +$ EIO +5 入出力エラーです +$ ENXIO +6 デバイスが準備されていません +$ E2BIG +7 引数のリストが長すぎます +$ ENOEXEC +8 無効な実行形式です +$ EBADF +9 無効なファイル記述子です +$ ECHILD +10 子プロセスがありません +$ EDEADLK +11 リソースデッドロックを回避しました +$ ENOMEM +12 メモリの割り当てができません +$ EACCES +13 パーミッションが拒絶されました +$ EFAULT +14 無効なアドレスです +$ ENOTBLK +15 ブロックデバイスが要求されています +$ EBUSY +16 デバイスがビジー状態です +$ EEXIST +17 ファイルが存在します +$ EXDEV +18 デバイスをまたぐリンクです +$ ENODEV +19 デバイスが対応してない操作です +$ ENOTDIR +20 ディレクトリではありません +$ EISDIR +21 ディレクトリです +$ EINVAL +22 無効な引数です +$ ENFILE +23 システム内でオープンされているファイルが多すぎます +$ EMFILE +24 オープンしているファイルが多すぎます +$ ENOTTY +25 デバイスが対応していない ioctl です +$ ETXTBSY +26 テキストファイルがビジー状態です +$ EFBIG +27 ファイルが大きすぎます +$ ENOSPC +28 デバイスの空き領域不足です +$ ESPIPE +29 無効なシークです +$ EROFS +30 読み込み専用ファイルシステムです +$ EMLINK +31 リンク数が多すぎます +$ EPIPE +32 パイプが破壊されてました +$ EDOM +33 数値引数が範囲外です +$ ERANGE +34 結果が大き過ぎます +$ EAGAIN, EWOULDBLOCK +35 リソースが一時的に利用できません +$ EINPROGRESS +36 操作が現在進行中です +$ EALREADY +37 操作は既に進行中です +$ ENOTSOCK +38 ソケットでないものについてソケット操作を行いました +$ EDESTADDRREQ +39 宛先アドレスが要求されています +$ EMSGSIZE +40 メッセージが長すぎます +$ EPROTOTYPE +41 ソケットが対応していないプロトコルタイプです +$ ENOPROTOOPT +42 利用できないプロトコルです +$ EPROTONOSUPPORT +43 対応していないプロトコルです +$ ESOCKTNOSUPPORT +44 対応していないソケットタイプです +$ EOPNOTSUPP +45 対応していない操作です +$ EPFNOSUPPORT +46 対応していないプロトコルファミリです +$ EAFNOSUPPORT +47 プロトコルファミリが対応していないアドレスファミリが指定されました +$ EADDRINUSE +48 アドレスが既に使用中です +$ EADDRNOTAVAIL +49 要求されたアドレスを割り当てできません +$ ENETDOWN +50 ネットワークがダウンしています +$ ENETUNREACH +51 ネットワークに到達できません +$ ENETRESET +52 リセットによりネットワークの接続が失われました +$ ECONNABORTED +53 ソフトウェアによって接続が切断されました +$ ECONNRESET +54 接続が通信相手によってリセットされました +$ ENOBUFS +55 バッファの容量不足です +$ EISCONN +56 ソケットは既に接続されています +$ ENOTCONN +57 ソケットは接続されていません +$ ESHUTDOWN +58 ソケットのシャットダウンの後で送信ができません +$ ETOOMANYREFS +59 処理限界を超える多重参照です +$ ETIMEDOUT +60 操作がタイムアウトしました +$ ECONNREFUSED +61 接続が拒絶されました +$ ELOOP +62 処理限界を超えるシンボリックリンクレベルです +$ ENAMETOOLONG +63 ファイル名が長すぎます +$ EHOSTDOWN +64 ホストがダウンしています +$ EHOSTUNREACH +65 ホストへの経路がありません +$ ENOTEMPTY +66 ディレクトリが空ではありません +$ EPROCLIM +67 プロセスが多すぎます +$ EUSERS +68 ユーザが多すぎます +$ EDQUOT +69 ディスククォータが超過しました +$ ESTALE +70 失効した NFS ファイルハンドルです +$ EREMOTE +71 パス中のリモートのレベルが多すぎます +$ EBADRPC +72 無効な RPC 構造体です +$ ERPCMISMATCH +73 RPC バージョンが間違っています +$ EPROGUNAVAIL +74 RPC プログラムが利用できません +$ EPROGMISMATCH +75 プログラムのバージョンが合っていません +$ EPROCUNAVAIL +76 プログラムでは利用できない procedure です +$ ENOLCK +77 ロックが利用できません +$ ENOSYS +78 関数が実装されていません +$ EFTYPE +79 ファイルの型または形式が不適切です +$ EAUTH +80 認証エラーです +$ ENEEDAUTH +81 認証物が必要です +$ EIDRM +82 識別子は削除されました +$ ENOMSG +83 要求された型のメッセージがありません +$ EOVERFLOW +84 データ型に格納するには大きすぎる値です +$ ECANCELED +85 処理がキャンセルされました +$ EILSEQ +86 不正なバイト列です +$ ENOATTR +87 そのような属性はありません +$ EDOOFUS +88 プログラミングエラーです +$ EBADMSG +89 無効なメッセージです +$ EMULTIHOP +90 マルチホップが試みられました +$ ENOLINK +91 リンクが切断されています +$ EPROTO +92 プロトコルエラーです +$ ENOTCAPABLE +93 ケーパビリティが不足です +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 ハングアップ +$ SIGINT +2 割り込み +$ SIGQUIT +3 中断 +$ SIGILL +4 不正命令 +$ SIGTRAP +5 トレース/BPT トラップ +$ SIGABRT +6 アボートトラップ +$ SIGEMT +7 EMT トラップ +$ SIGFPE +8 浮動小数点例外 +$ SIGKILL +9 Kill された +$ SIGBUS +10 バスエラー +$ SIGSEGV +11 セグメンテーション違反 +$ SIGSYS +12 存在しないシステムコール +$ SIGPIPE +13 パイプ破壊 +$ SIGALRM +14 アラームクロック +$ SIGTERM +15 終了 +$ SIGURG +16 緊急入出力状況 +$ SIGSTOP +17 一時停止 (シグナル) +$ SIGTSTP +18 一時停止 +$ SIGCONT +19 継続 +$ SIGCHLD +20 子プロセスの終了 +$ SIGTTIN +21 一時停止 (tty 入力) +$ SIGTTOU +22 一時停止 (tty 出力) +$ SIGIO +23 入出力可能 +$ SIGXCPU +24 CPU 時間の制限超過 +$ SIGXFSZ +25 ファイルサイズの制限超過 +$ SIGVTALRM +26 仮想タイマの期限超過 +$ SIGPROF +27 プロファイルタイマの期限超過 +$ SIGWINCH +28 ウィンドウサイズの変化 +$ SIGINFO +29 情報要求 +$ SIGUSR1 +30 ユーザ定義シグナル 1 +$ SIGUSR2 +31 ユーザ定義シグナル 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 ホスト名のアドレスファミリーはサポートされません +$ EAI_AGAIN +2 名前解決での一時的な失敗 +$ EAI_BADFLAGS +3 ai_flags の値が無効 +$ EAI_FAIL +4 名前解決での回復不能な失敗 +$ EAI_FAMILY +5 ai_family はサポートされません +$ EAI_MEMORY +6 メモリ割り当て失敗 +$ 7 (obsolete) +7 ホスト名に対応するアドレスはありません +$ EAI_NONAME +8 ホスト名かサービス名が指定されない、または不明 +$ EAI_SERVICE +9 サービス名は ai_socktype に対してサポートされません +$ EAI_SOCKTYPE +10 ai_socktype はサポートされません +$ EAI_SYSTEM +11 システムエラー、errno 参照 +$ EAI_BADHINTS +12 hints の値が無効 +$ EAI_PROTOCOL +13 解決されたプロトコルは不明です +$ EAI_OVERFLOW +14 引数バッファオーバフロー +$ 0 +32766 成功 +$ NL_MSGMAX +32767 不明なエラー diff --git a/lib/libc/nls/ja_JP.eucJP.msg b/lib/libc/nls/ja_JP.eucJP.msg new file mode 100644 index 0000000000..901b970d73 --- /dev/null +++ b/lib/libc/nls/ja_JP.eucJP.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/ja_JP.eucJP.msg 199128 2009-11-10 03:56:51Z ume $ +$ +$ Message catalog for ja_JP.eucJP locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤Áàºî¤Ç¤¹ +$ ENOENT +2 ¤½¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ï¤¢¤ê¤Þ¤»¤ó +$ ESRCH +3 ¤½¤Î¤è¤¦¤Ê¥×¥í¥»¥¹¤Ï¤¢¤ê¤Þ¤»¤ó +$ EINTR +4 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬ÃæÃǤµ¤ì¤Þ¤·¤¿ +$ EIO +5 Æþ½ÐÎÏ¥¨¥é¡¼¤Ç¤¹ +$ ENXIO +6 ¥Ç¥Ð¥¤¥¹¤¬½àÈ÷¤µ¤ì¤Æ¤¤¤Þ¤»¤ó +$ E2BIG +7 °ú¿ô¤Î¥ê¥¹¥È¤¬Ä¹¤¹¤®¤Þ¤¹ +$ ENOEXEC +8 ̵¸ú¤Ê¼Â¹Ô·Á¼°¤Ç¤¹ +$ EBADF +9 ̵¸ú¤Ê¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤Ç¤¹ +$ ECHILD +10 »Ò¥×¥í¥»¥¹¤¬¤¢¤ê¤Þ¤»¤ó +$ EDEADLK +11 ¥ê¥½¡¼¥¹¥Ç¥Ã¥É¥í¥Ã¥¯¤ò²óÈò¤·¤Þ¤·¤¿ +$ ENOMEM +12 ¥á¥â¥ê¤Î³ä¤êÅö¤Æ¤¬¤Ç¤­¤Þ¤»¤ó +$ EACCES +13 ¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤¬µñÀ䤵¤ì¤Þ¤·¤¿ +$ EFAULT +14 ̵¸ú¤Ê¥¢¥É¥ì¥¹¤Ç¤¹ +$ ENOTBLK +15 ¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤¬Í׵ᤵ¤ì¤Æ¤¤¤Þ¤¹ +$ EBUSY +16 ¥Ç¥Ð¥¤¥¹¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹ +$ EEXIST +17 ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤¹ +$ EXDEV +18 ¥Ç¥Ð¥¤¥¹¤ò¤Þ¤¿¤°¥ê¥ó¥¯¤Ç¤¹ +$ ENODEV +19 ¥Ç¥Ð¥¤¥¹¤¬Âбþ¤·¤Æ¤Ê¤¤Áàºî¤Ç¤¹ +$ ENOTDIR +20 ¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó +$ EISDIR +21 ¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹ +$ EINVAL +22 ̵¸ú¤Ê°ú¿ô¤Ç¤¹ +$ ENFILE +23 ¥·¥¹¥Æ¥àÆâ¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤¬Â¿¤¹¤®¤Þ¤¹ +$ EMFILE +24 ¥ª¡¼¥×¥ó¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤¬Â¿¤¹¤®¤Þ¤¹ +$ ENOTTY +25 ¥Ç¥Ð¥¤¥¹¤¬Âбþ¤·¤Æ¤¤¤Ê¤¤ ioctl ¤Ç¤¹ +$ ETXTBSY +26 ¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹ +$ EFBIG +27 ¥Õ¥¡¥¤¥ë¤¬Â礭¤¹¤®¤Þ¤¹ +$ ENOSPC +28 ¥Ç¥Ð¥¤¥¹¤Î¶õ¤­ÎΰèÉÔ­¤Ç¤¹ +$ ESPIPE +29 ̵¸ú¤Ê¥·¡¼¥¯¤Ç¤¹ +$ EROFS +30 Æɤ߹þ¤ßÀìÍÑ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤¹ +$ EMLINK +31 ¥ê¥ó¥¯¿ô¤¬Â¿¤¹¤®¤Þ¤¹ +$ EPIPE +32 ¥Ñ¥¤¥×¤¬Ç˲õ¤µ¤ì¤Æ¤Þ¤·¤¿ +$ EDOM +33 ¿ôÃÍ°ú¿ô¤¬Èϰϳ°¤Ç¤¹ +$ ERANGE +34 ·ë²Ì¤¬Â礭²á¤®¤Þ¤¹ +$ EAGAIN, EWOULDBLOCK +35 ¥ê¥½¡¼¥¹¤¬°ì»þŪ¤ËÍøÍѤǤ­¤Þ¤»¤ó +$ EINPROGRESS +36 Áàºî¤¬¸½ºß¿Ê¹ÔÃæ¤Ç¤¹ +$ EALREADY +37 Áàºî¤Ï´û¤Ë¿Ê¹ÔÃæ¤Ç¤¹ +$ ENOTSOCK +38 ¥½¥±¥Ã¥È¤Ç¤Ê¤¤¤â¤Î¤Ë¤Ä¤¤¤Æ¥½¥±¥Ã¥ÈÁàºî¤ò¹Ô¤¤¤Þ¤·¤¿ +$ EDESTADDRREQ +39 °¸À襢¥É¥ì¥¹¤¬Í׵ᤵ¤ì¤Æ¤¤¤Þ¤¹ +$ EMSGSIZE +40 ¥á¥Ã¥»¡¼¥¸¤¬Ä¹¤¹¤®¤Þ¤¹ +$ EPROTOTYPE +41 ¥½¥±¥Ã¥È¤¬Âбþ¤·¤Æ¤¤¤Ê¤¤¥×¥í¥È¥³¥ë¥¿¥¤¥×¤Ç¤¹ +$ ENOPROTOOPT +42 ÍøÍѤǤ­¤Ê¤¤¥×¥í¥È¥³¥ë¤Ç¤¹ +$ EPROTONOSUPPORT +43 Âбþ¤·¤Æ¤¤¤Ê¤¤¥×¥í¥È¥³¥ë¤Ç¤¹ +$ ESOCKTNOSUPPORT +44 Âбþ¤·¤Æ¤¤¤Ê¤¤¥½¥±¥Ã¥È¥¿¥¤¥×¤Ç¤¹ +$ EOPNOTSUPP +45 Âбþ¤·¤Æ¤¤¤Ê¤¤Áàºî¤Ç¤¹ +$ EPFNOSUPPORT +46 Âбþ¤·¤Æ¤¤¤Ê¤¤¥×¥í¥È¥³¥ë¥Õ¥¡¥ß¥ê¤Ç¤¹ +$ EAFNOSUPPORT +47 ¥×¥í¥È¥³¥ë¥Õ¥¡¥ß¥ê¤¬Âбþ¤·¤Æ¤¤¤Ê¤¤¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¤¬»ØÄꤵ¤ì¤Þ¤·¤¿ +$ EADDRINUSE +48 ¥¢¥É¥ì¥¹¤¬´û¤Ë»ÈÍÑÃæ¤Ç¤¹ +$ EADDRNOTAVAIL +49 Í׵ᤵ¤ì¤¿¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤Ç¤­¤Þ¤»¤ó +$ ENETDOWN +50 ¥Í¥Ã¥È¥ï¡¼¥¯¤¬¥À¥¦¥ó¤·¤Æ¤¤¤Þ¤¹ +$ ENETUNREACH +51 ¥Í¥Ã¥È¥ï¡¼¥¯¤ËÅþã¤Ç¤­¤Þ¤»¤ó +$ ENETRESET +52 ¥ê¥»¥Ã¥È¤Ë¤è¤ê¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀܳ¤¬¼º¤ï¤ì¤Þ¤·¤¿ +$ ECONNABORTED +53 ¥½¥Õ¥È¥¦¥§¥¢¤Ë¤è¤Ã¤ÆÀܳ¤¬ÀÚÃǤµ¤ì¤Þ¤·¤¿ +$ ECONNRESET +54 Àܳ¤¬ÄÌ¿®Áê¼ê¤Ë¤è¤Ã¤Æ¥ê¥»¥Ã¥È¤µ¤ì¤Þ¤·¤¿ +$ ENOBUFS +55 ¥Ð¥Ã¥Õ¥¡¤ÎÍÆÎÌÉÔ­¤Ç¤¹ +$ EISCONN +56 ¥½¥±¥Ã¥È¤Ï´û¤ËÀܳ¤µ¤ì¤Æ¤¤¤Þ¤¹ +$ ENOTCONN +57 ¥½¥±¥Ã¥È¤ÏÀܳ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó +$ ESHUTDOWN +58 ¥½¥±¥Ã¥È¤Î¥·¥ã¥Ã¥È¥À¥¦¥ó¤Î¸å¤ÇÁ÷¿®¤¬¤Ç¤­¤Þ¤»¤ó +$ ETOOMANYREFS +59 ½èÍý¸Â³¦¤òĶ¤¨¤ë¿½Å»²¾È¤Ç¤¹ +$ ETIMEDOUT +60 Áàºî¤¬¥¿¥¤¥à¥¢¥¦¥È¤·¤Þ¤·¤¿ +$ ECONNREFUSED +61 Àܳ¤¬µñÀ䤵¤ì¤Þ¤·¤¿ +$ ELOOP +62 ½èÍý¸Â³¦¤òĶ¤¨¤ë¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¥ì¥Ù¥ë¤Ç¤¹ +$ ENAMETOOLONG +63 ¥Õ¥¡¥¤¥ë̾¤¬Ä¹¤¹¤®¤Þ¤¹ +$ EHOSTDOWN +64 ¥Û¥¹¥È¤¬¥À¥¦¥ó¤·¤Æ¤¤¤Þ¤¹ +$ EHOSTUNREACH +65 ¥Û¥¹¥È¤Ø¤Î·ÐÏ©¤¬¤¢¤ê¤Þ¤»¤ó +$ ENOTEMPTY +66 ¥Ç¥£¥ì¥¯¥È¥ê¤¬¶õ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó +$ EPROCLIM +67 ¥×¥í¥»¥¹¤¬Â¿¤¹¤®¤Þ¤¹ +$ EUSERS +68 ¥æ¡¼¥¶¤¬Â¿¤¹¤®¤Þ¤¹ +$ EDQUOT +69 ¥Ç¥£¥¹¥¯¥¯¥©¡¼¥¿¤¬Ä¶²á¤·¤Þ¤·¤¿ +$ ESTALE +70 ¼º¸ú¤·¤¿ NFS ¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Ç¤¹ +$ EREMOTE +71 ¥Ñ¥¹Ãæ¤Î¥ê¥â¡¼¥È¤Î¥ì¥Ù¥ë¤¬Â¿¤¹¤®¤Þ¤¹ +$ EBADRPC +72 ̵¸ú¤Ê RPC ¹½Â¤ÂΤǤ¹ +$ ERPCMISMATCH +73 RPC ¥Ð¡¼¥¸¥ç¥ó¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹ +$ EPROGUNAVAIL +74 RPC ¥×¥í¥°¥é¥à¤¬ÍøÍѤǤ­¤Þ¤»¤ó +$ EPROGMISMATCH +75 ¥×¥í¥°¥é¥à¤Î¥Ð¡¼¥¸¥ç¥ó¤¬¹ç¤Ã¤Æ¤¤¤Þ¤»¤ó +$ EPROCUNAVAIL +76 ¥×¥í¥°¥é¥à¤Ç¤ÏÍøÍѤǤ­¤Ê¤¤ procedure ¤Ç¤¹ +$ ENOLCK +77 ¥í¥Ã¥¯¤¬ÍøÍѤǤ­¤Þ¤»¤ó +$ ENOSYS +78 ´Ø¿ô¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó +$ EFTYPE +79 ¥Õ¥¡¥¤¥ë¤Î·¿¤Þ¤¿¤Ï·Á¼°¤¬ÉÔŬÀڤǤ¹ +$ EAUTH +80 ǧ¾Ú¥¨¥é¡¼¤Ç¤¹ +$ ENEEDAUTH +81 ǧ¾Úʪ¤¬É¬ÍפǤ¹ +$ EIDRM +82 ¼±Ê̻ҤϺï½ü¤µ¤ì¤Þ¤·¤¿ +$ ENOMSG +83 Í׵ᤵ¤ì¤¿·¿¤Î¥á¥Ã¥»¡¼¥¸¤¬¤¢¤ê¤Þ¤»¤ó +$ EOVERFLOW +84 ¥Ç¡¼¥¿·¿¤Ë³ÊǼ¤¹¤ë¤Ë¤ÏÂ礭¤¹¤®¤ëÃͤǤ¹ +$ ECANCELED +85 ½èÍý¤¬¥­¥ã¥ó¥»¥ë¤µ¤ì¤Þ¤·¤¿ +$ EILSEQ +86 ÉÔÀµ¤Ê¥Ð¥¤¥ÈÎó¤Ç¤¹ +$ ENOATTR +87 ¤½¤Î¤è¤¦¤Ê°À­¤Ï¤¢¤ê¤Þ¤»¤ó +$ EDOOFUS +88 ¥×¥í¥°¥é¥ß¥ó¥°¥¨¥é¡¼¤Ç¤¹ +$ EBADMSG +89 ̵¸ú¤Ê¥á¥Ã¥»¡¼¥¸¤Ç¤¹ +$ EMULTIHOP +90 ¥Þ¥ë¥Á¥Û¥Ã¥×¤¬»î¤ß¤é¤ì¤Þ¤·¤¿ +$ ENOLINK +91 ¥ê¥ó¥¯¤¬ÀÚÃǤµ¤ì¤Æ¤¤¤Þ¤¹ +$ EPROTO +92 ¥×¥í¥È¥³¥ë¥¨¥é¡¼¤Ç¤¹ +$ ENOTCAPABLE +93 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬ÉÔ­¤Ç¤¹ +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 ¥Ï¥ó¥°¥¢¥Ã¥× +$ SIGINT +2 ³ä¤ê¹þ¤ß +$ SIGQUIT +3 ÃæÃÇ +$ SIGILL +4 ÉÔÀµÌ¿Îá +$ SIGTRAP +5 ¥È¥ì¡¼¥¹/BPT ¥È¥é¥Ã¥× +$ SIGABRT +6 ¥¢¥Ü¡¼¥È¥È¥é¥Ã¥× +$ SIGEMT +7 EMT ¥È¥é¥Ã¥× +$ SIGFPE +8 ÉâÆ°¾®¿ôÅÀÎã³° +$ SIGKILL +9 Kill ¤µ¤ì¤¿ +$ SIGBUS +10 ¥Ð¥¹¥¨¥é¡¼ +$ SIGSEGV +11 ¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó°ãÈ¿ +$ SIGSYS +12 ¸ºß¤·¤Ê¤¤¥·¥¹¥Æ¥à¥³¡¼¥ë +$ SIGPIPE +13 ¥Ñ¥¤¥×Ç˲õ +$ SIGALRM +14 ¥¢¥é¡¼¥à¥¯¥í¥Ã¥¯ +$ SIGTERM +15 ½ªÎ» +$ SIGURG +16 ¶ÛµÞÆþ½ÐÎϾõ¶· +$ SIGSTOP +17 °ì»þÄä»ß (¥·¥°¥Ê¥ë) +$ SIGTSTP +18 °ì»þÄä»ß +$ SIGCONT +19 ·Ñ³ +$ SIGCHLD +20 »Ò¥×¥í¥»¥¹¤Î½ªÎ» +$ SIGTTIN +21 °ì»þÄä»ß (tty ÆþÎÏ) +$ SIGTTOU +22 °ì»þÄä»ß (tty ½ÐÎÏ) +$ SIGIO +23 Æþ½ÐÎϲÄǽ +$ SIGXCPU +24 CPU »þ´Ö¤ÎÀ©¸ÂĶ²á +$ SIGXFSZ +25 ¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤ÎÀ©¸ÂĶ²á +$ SIGVTALRM +26 ²¾ÁÛ¥¿¥¤¥Þ¤Î´ü¸ÂĶ²á +$ SIGPROF +27 ¥×¥í¥Õ¥¡¥¤¥ë¥¿¥¤¥Þ¤Î´ü¸ÂĶ²á +$ SIGWINCH +28 ¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ÎÊѲ½ +$ SIGINFO +29 ¾ðÊóÍ×µá +$ SIGUSR1 +30 ¥æ¡¼¥¶ÄêµÁ¥·¥°¥Ê¥ë 1 +$ SIGUSR2 +31 ¥æ¡¼¥¶ÄêµÁ¥·¥°¥Ê¥ë 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 ¥Û¥¹¥È̾¤Î¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó +$ EAI_AGAIN +2 ̾Á°²ò·è¤Ç¤Î°ì»þŪ¤Ê¼ºÇÔ +$ EAI_BADFLAGS +3 ai_flags ¤ÎÃͤ¬Ìµ¸ú +$ EAI_FAIL +4 ̾Á°²ò·è¤Ç¤Î²óÉüÉÔǽ¤Ê¼ºÇÔ +$ EAI_FAMILY +5 ai_family ¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó +$ EAI_MEMORY +6 ¥á¥â¥ê³ä¤êÅö¤Æ¼ºÇÔ +$ 7 (obsolete) +7 ¥Û¥¹¥È̾¤ËÂбþ¤¹¤ë¥¢¥É¥ì¥¹¤Ï¤¢¤ê¤Þ¤»¤ó +$ EAI_NONAME +8 ¥Û¥¹¥È̾¤«¥µ¡¼¥Ó¥¹Ì¾¤¬»ØÄꤵ¤ì¤Ê¤¤¡¢¤Þ¤¿¤ÏÉÔÌÀ +$ EAI_SERVICE +9 ¥µ¡¼¥Ó¥¹Ì¾¤Ï ai_socktype ¤ËÂФ·¤Æ¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó +$ EAI_SOCKTYPE +10 ai_socktype ¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó +$ EAI_SYSTEM +11 ¥·¥¹¥Æ¥à¥¨¥é¡¼¡¢errno »²¾È +$ EAI_BADHINTS +12 hints ¤ÎÃͤ¬Ìµ¸ú +$ EAI_PROTOCOL +13 ²ò·è¤µ¤ì¤¿¥×¥í¥È¥³¥ë¤ÏÉÔÌÀ¤Ç¤¹ +$ EAI_OVERFLOW +14 °ú¿ô¥Ð¥Ã¥Õ¥¡¥ª¡¼¥Ð¥Õ¥í¡¼ +$ 0 +32766 À®¸ù +$ NL_MSGMAX +32767 ÉÔÌÀ¤Ê¥¨¥é¡¼ diff --git a/lib/libc/nls/ko_KR.UTF-8.msg b/lib/libc/nls/ko_KR.UTF-8.msg new file mode 100644 index 0000000000..c2904463b2 --- /dev/null +++ b/lib/libc/nls/ko_KR.UTF-8.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/ko_KR.UTF-8.msg 199329 2009-11-16 19:10:09Z jkim $ +$ +$ Message catalog for ko_KR.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 명령이 허용되지 않습니다 +$ ENOENT +2 파일 또는 디렉터리가 없습니다 +$ ESRCH +3 존재하지 않는 프로세스입니다 +$ EINTR +4 시스템 호출이 중단되었습니다 +$ EIO +5 입출력 에러입니다 +$ ENXIO +6 장치가 설정되지 않았습니다 +$ E2BIG +7 인자가 너무 깁니다 +$ ENOEXEC +8 실행 파일 형식이 잘못되었습니다 +$ EBADF +9 잘못된 파일 디스크립터입니다 +$ ECHILD +10 자식 프로세스가 없습니다 +$ EDEADLK +11 자원 데드락을 중단하였습니다 +$ ENOMEM +12 메모리를 할당할 수 없습니다 +$ EACCES +13 권한이 없습니다 +$ EFAULT +14 잘못된 주소가 지정되었습니다 +$ ENOTBLK +15 블럭 장치여야 합니다 +$ EBUSY +16 장치가 사용 중입니다 +$ EEXIST +17 파일이 이미 존재합니다 +$ EXDEV +18 다른 장치 간의 연결입니다 +$ ENODEV +19 ê·¸ 장치가 지원하지 않는 명령입니다 +$ ENOTDIR +20 디렉터리가 아닙니다 +$ EISDIR +21 디렉터리입니다 +$ EINVAL +22 인자가 잘못되었습니다 +$ ENFILE +23 시스템에 파일이 너무 많이 열려있습니다 +$ EMFILE +24 파일이 너무 많이 열려있습니다 +$ ENOTTY +25 장치가 지원하지 않는 ioctl입니다 +$ ETXTBSY +26 Text 파일이 사용 중입니다 +$ EFBIG +27 파일이 너무 큽니다 +$ ENOSPC +28 장치에 여유 공간이 남아있지 않습니다 +$ ESPIPE +29 잘못된 탐색입니다 +$ EROFS +30 읽기 전용 파일 시스템입니다 +$ EMLINK +31 연결이 너무 많습니다 +$ EPIPE +32 파이프가 끊어졌습니다 +$ EDOM +33 수치 인자가 영역을 벗어났습니다 +$ ERANGE +34 결과가 너무 큽니다 +$ EAGAIN, EWOULDBLOCK +35 자원을 잠시 사용할 수 없습니다 +$ EINPROGRESS +36 작업이 진행 중입니다 +$ EALREADY +37 작업이 이미 진행 중입니다 +$ ENOTSOCK +38 소켓이 아닌 객체에 대한 소켓 작업입니다 +$ EDESTADDRREQ +39 목적지 주소가 필요합니다 +$ EMSGSIZE +40 메시지가 너무 깁니다 +$ EPROTOTYPE +41 소켓에 사용할 수 없는 프로토콜 유형입니다 +$ ENOPROTOOPT +42 프로토콜을 사용할 수 없습니다 +$ EPROTONOSUPPORT +43 지원하지 않는 프로토콜입니다 +$ ESOCKTNOSUPPORT +44 지원하지 않는 종류의 소켓입니다 +$ EOPNOTSUPP +45 지원되지 않는 명령입니다 +$ EPFNOSUPPORT +46 지원되지 않는 프로토콜군입니다 +$ EAFNOSUPPORT +47 프로토콜군에서 지원되지 않는 주소군입니다 +$ EADDRINUSE +48 이미 사용 중인 주소입니다 +$ EADDRNOTAVAIL +49 요청한 주소를 할당할 수 없습니다 +$ ENETDOWN +50 네트워크가 단절되었습니다 +$ ENETUNREACH +51 네트워크에 도달할 수 없습니다 +$ ENETRESET +52 네트워크가 재설정되어 접속이 끊어졌습니다 +$ ECONNABORTED +53 소프트웨어적인 이유로 연결이 끊어졌습니다 +$ ECONNRESET +54 상대방이 연결을 끊었습니다 +$ ENOBUFS +55 버퍼 공간이 모자랍니다 +$ EISCONN +56 소켓이 이미 연결되있습니다 +$ ENOTCONN +57 소켓이 연결되어 있지 않습니다 +$ ESHUTDOWN +58 소켓이 이미 중단되어, 더 이상 전송할 수 없습니다 +$ ETOOMANYREFS +59 참조수가 너무 많아 나눌 수 없습니다 +$ ETIMEDOUT +60 시간이 너무 많이 지나 작업이 중단되었습니다 +$ ECONNREFUSED +61 접속이 거부되었습니다 +$ ELOOP +62 심볼릭 연결이 너무 많이 거쳐서 연결되었습니다 +$ ENAMETOOLONG +63 파일 이름이 너무 깁니다 +$ EHOSTDOWN +64 호스트가 죽었습니다 +$ EHOSTUNREACH +65 호스트로 갈 경로가 없습니다 +$ ENOTEMPTY +66 디렉터리가 비어있지 않습니다 +$ EPROCLIM +67 프로세스가 너무 많습니다 +$ EUSERS +68 사용자가 너무 많습니다 +$ EDQUOT +69 디스크 할당량을 초과했습니다 +$ ESTALE +70 끊어진 NFS 연결입니다 +$ EREMOTE +71 너무 많은 경로로 원격에 접근하였습니다 +$ EBADRPC +72 RPC 구조체가 잘못되었습니다 +$ ERPCMISMATCH +73 RPC 버전이 맞지 않습니다 +$ EPROGUNAVAIL +74 RPC 프로그램이 없습니다 +$ EPROGMISMATCH +75 프로그램 버전이 맞지 않습니다 +$ EPROCUNAVAIL +76 프로그램에 원격 프로시저가 없습니다 +$ ENOLCK +77 잠금이 불가능합니다 +$ ENOSYS +78 구현되지 않은 기능입니다 +$ EFTYPE +79 잘못된 파일 종류이거나 형식이 잘못됐습니다 +$ EAUTH +80 인증이 실패했습니다 +$ ENEEDAUTH +81 인증 서버가 지정되지 않았습니다 +$ EIDRM +82 식별자가 제거되었습니다 +$ ENOMSG +83 요청된 형식의 메시지는 없습니다 +$ EOVERFLOW +84 데이터 형식에 저장하기에 너무 큰 값입니다 +$ ECANCELED +85 작업이 취소되었습니다 +$ EILSEQ +86 바이트 배열이 잘못되었습니다 +$ ENOATTR +87 속성을 찾을 수 없습니다 +$ EDOOFUS +88 프로그램상 오류입니다 +$ EBADMSG +89 잘못된 메시지입니다 +$ EMULTIHOP +90 멀티홉이 시도되었습니다 +$ ENOLINK +91 연결이 끊겼습니다 +$ EPROTO +92 프로토콜이 잘못되었습니다 +$ ENOTCAPABLE +93 접근 능력이 충분치 않습니다 +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 끊김 +$ SIGINT +2 중단 +$ SIGQUIT +3 종료 +$ SIGILL +4 잘못된 명령 +$ SIGTRAP +5 Trace/BPT 트랩 +$ SIGABRT +6 Abort 트랩 +$ SIGEMT +7 EMT 트랩 +$ SIGFPE +8 부동소수점 연산 예외 +$ SIGKILL +9 강제종료 +$ SIGBUS +10 버스 오류 +$ SIGSEGV +11 세그먼테이션 오류 +$ SIGSYS +12 잘못된 시스템 호출 +$ SIGPIPE +13 파이프가 끊김 +$ SIGALRM +14 시간 경보 +$ SIGTERM +15 종료됨 +$ SIGURG +16 긴급 I/O ì¡°ê±´ +$ SIGSTOP +17 일시정지 (시그널) +$ SIGTSTP +18 일시정지 +$ SIGCONT +19 계속 +$ SIGCHLD +20 자식 프로세스 종료 +$ SIGTTIN +21 정지 (터미널 입력) +$ SIGTTOU +22 정지 (터미널 출력) +$ SIGIO +23 I/O 가능 +$ SIGXCPU +24 CPU 사용 시간 초과 +$ SIGXFSZ +25 파일 용량 제한 초과 +$ SIGVTALRM +26 가상 타이머 만료 +$ SIGPROF +27 프로파일링 타이머 만료 +$ SIGWINCH +28 ì°½ 크기 변경 +$ SIGINFO +29 정보 요청 +$ SIGUSR1 +30 사용자 정의 시그널 1 +$ SIGUSR2 +31 사용자 정의 시그널 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 호스트 이름이 지원하지 않는 주소군입니다 +$ EAI_AGAIN +2 주소 변환에 일시적으로 실패했습니다 +$ EAI_BADFLAGS +3 잘못된 ai_flags입니다 +$ EAI_FAIL +4 주소 변환에 완전히 실패했습니다 +$ EAI_FAMILY +5 지원되지 않는 ai_family입니다 +$ EAI_MEMORY +6 메모리 할당에 실패했습니다 +$ 7 (obsolete) +7 호스트 이름과 일치하는 주소가 없습니다 +$ EAI_NONAME +8 호스트 이름 또는 서비스 이름이 지정되지 않았거나 알 수 없습니다 +$ EAI_SERVICE +9 서비스 이름은 ai_socktype에서 지원되지 않습니다 +$ EAI_SOCKTYPE +10 지원되지 않는 ai_socktype입니다 +$ EAI_SYSTEM +11 시스템 오류가 errno에 반환되었습니다 +$ EAI_BADHINTS +12 잘못된 hints입니다 +$ EAI_PROTOCOL +13 알 수 없는 프로토콜이 변환되었습니다 +$ EAI_OVERFLOW +14 인자 버퍼 공간이 모자랍니다 +$ 0 +32766 성공 +$ NL_MSGMAX +32767 알 수 없는 오류 diff --git a/lib/libc/nls/ko_KR.eucKR.msg b/lib/libc/nls/ko_KR.eucKR.msg new file mode 100644 index 0000000000..72c01cdb4e --- /dev/null +++ b/lib/libc/nls/ko_KR.eucKR.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/ko_KR.eucKR.msg 199329 2009-11-16 19:10:09Z jkim $ +$ +$ Message catalog for ko_KR.eucKR locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 ¸í·ÉÀÌ Çã¿ëµÇÁö ¾Ê½À´Ï´Ù +$ ENOENT +2 ÆÄÀÏ ¶Ç´Â µð·ºÅ͸®°¡ ¾ø½À´Ï´Ù +$ ESRCH +3 Á¸ÀçÇÏÁö ¾Ê´Â ÇÁ·Î¼¼½ºÀÔ´Ï´Ù +$ EINTR +4 ½Ã½ºÅÛ È£ÃâÀÌ ÁߴܵǾú½À´Ï´Ù +$ EIO +5 ÀÔÃâ·Â ¿¡·¯ÀÔ´Ï´Ù +$ ENXIO +6 ÀåÄ¡°¡ ¼³Á¤µÇÁö ¾Ê¾Ò½À´Ï´Ù +$ E2BIG +7 ÀÎÀÚ°¡ ³Ê¹« ±é´Ï´Ù +$ ENOEXEC +8 ½ÇÇà ÆÄÀÏ Çü½ÄÀÌ À߸øµÇ¾ú½À´Ï´Ù +$ EBADF +9 À߸øµÈ ÆÄÀÏ µð½ºÅ©¸³ÅÍÀÔ´Ï´Ù +$ ECHILD +10 ÀÚ½Ä ÇÁ·Î¼¼½º°¡ ¾ø½À´Ï´Ù +$ EDEADLK +11 ÀÚ¿ø µ¥µå¶ôÀ» Áß´ÜÇÏ¿´½À´Ï´Ù +$ ENOMEM +12 ¸Þ¸ð¸®¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù +$ EACCES +13 ±ÇÇÑÀÌ ¾ø½À´Ï´Ù +$ EFAULT +14 À߸øµÈ ÁÖ¼Ò°¡ ÁöÁ¤µÇ¾ú½À´Ï´Ù +$ ENOTBLK +15 ºí·° ÀåÄ¡¿©¾ß ÇÕ´Ï´Ù +$ EBUSY +16 ÀåÄ¡°¡ »ç¿ë ÁßÀÔ´Ï´Ù +$ EEXIST +17 ÆÄÀÏÀÌ ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù +$ EXDEV +18 ´Ù¸¥ ÀåÄ¡ °£ÀÇ ¿¬°áÀÔ´Ï´Ù +$ ENODEV +19 ±× ÀåÄ¡°¡ Áö¿øÇÏÁö ¾Ê´Â ¸í·ÉÀÔ´Ï´Ù +$ ENOTDIR +20 µð·ºÅ͸®°¡ ¾Æ´Õ´Ï´Ù +$ EISDIR +21 µð·ºÅ͸®ÀÔ´Ï´Ù +$ EINVAL +22 ÀÎÀÚ°¡ À߸øµÇ¾ú½À´Ï´Ù +$ ENFILE +23 ½Ã½ºÅÛ¿¡ ÆÄÀÏÀÌ ³Ê¹« ¸¹ÀÌ ¿­·ÁÀÖ½À´Ï´Ù +$ EMFILE +24 ÆÄÀÏÀÌ ³Ê¹« ¸¹ÀÌ ¿­·ÁÀÖ½À´Ï´Ù +$ ENOTTY +25 ÀåÄ¡°¡ Áö¿øÇÏÁö ¾Ê´Â ioctlÀÔ´Ï´Ù +$ ETXTBSY +26 Text ÆÄÀÏÀÌ »ç¿ë ÁßÀÔ´Ï´Ù +$ EFBIG +27 ÆÄÀÏÀÌ ³Ê¹« Å®´Ï´Ù +$ ENOSPC +28 ÀåÄ¡¿¡ ¿©À¯ °ø°£ÀÌ ³²¾ÆÀÖÁö ¾Ê½À´Ï´Ù +$ ESPIPE +29 À߸øµÈ Ž»öÀÔ´Ï´Ù +$ EROFS +30 Àбâ Àü¿ë ÆÄÀÏ ½Ã½ºÅÛÀÔ´Ï´Ù +$ EMLINK +31 ¿¬°áÀÌ ³Ê¹« ¸¹½À´Ï´Ù +$ EPIPE +32 ÆÄÀÌÇÁ°¡ ²÷¾îÁ³½À´Ï´Ù +$ EDOM +33 ¼öÄ¡ ÀÎÀÚ°¡ ¿µ¿ªÀ» ¹þ¾î³µ½À´Ï´Ù +$ ERANGE +34 °á°ú°¡ ³Ê¹« Å®´Ï´Ù +$ EAGAIN, EWOULDBLOCK +35 ÀÚ¿øÀ» Àá½Ã »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù +$ EINPROGRESS +36 ÀÛ¾÷ÀÌ ÁøÇà ÁßÀÔ´Ï´Ù +$ EALREADY +37 ÀÛ¾÷ÀÌ ÀÌ¹Ì ÁøÇà ÁßÀÔ´Ï´Ù +$ ENOTSOCK +38 ¼ÒÄÏÀÌ ¾Æ´Ñ °´Ã¼¿¡ ´ëÇÑ ¼ÒÄÏ ÀÛ¾÷ÀÔ´Ï´Ù +$ EDESTADDRREQ +39 ¸ñÀûÁö ÁÖ¼Ò°¡ ÇÊ¿äÇÕ´Ï´Ù +$ EMSGSIZE +40 ¸Þ½ÃÁö°¡ ³Ê¹« ±é´Ï´Ù +$ EPROTOTYPE +41 ¼ÒÄÏ¿¡ »ç¿ëÇÒ ¼ö ¾ø´Â ÇÁ·ÎÅäÄÝ À¯ÇüÀÔ´Ï´Ù +$ ENOPROTOOPT +42 ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù +$ EPROTONOSUPPORT +43 Áö¿øÇÏÁö ¾Ê´Â ÇÁ·ÎÅäÄÝÀÔ´Ï´Ù +$ ESOCKTNOSUPPORT +44 Áö¿øÇÏÁö ¾Ê´Â Á¾·ùÀÇ ¼ÒÄÏÀÔ´Ï´Ù +$ EOPNOTSUPP +45 Áö¿øµÇÁö ¾Ê´Â ¸í·ÉÀÔ´Ï´Ù +$ EPFNOSUPPORT +46 Áö¿øµÇÁö ¾Ê´Â ÇÁ·ÎÅäÄݱºÀÔ´Ï´Ù +$ EAFNOSUPPORT +47 ÇÁ·ÎÅäÄݱº¿¡¼­ Áö¿øµÇÁö ¾Ê´Â ÁÖ¼Ò±ºÀÔ´Ï´Ù +$ EADDRINUSE +48 ÀÌ¹Ì »ç¿ë ÁßÀÎ ÁÖ¼ÒÀÔ´Ï´Ù +$ EADDRNOTAVAIL +49 ¿äûÇÑ ÁÖ¼Ò¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù +$ ENETDOWN +50 ³×Æ®¿öÅ©°¡ ´ÜÀýµÇ¾ú½À´Ï´Ù +$ ENETUNREACH +51 ³×Æ®¿öÅ©¿¡ µµ´ÞÇÒ ¼ö ¾ø½À´Ï´Ù +$ ENETRESET +52 ³×Æ®¿öÅ©°¡ Àç¼³Á¤µÇ¾î Á¢¼ÓÀÌ ²÷¾îÁ³½À´Ï´Ù +$ ECONNABORTED +53 ¼ÒÇÁÆ®¿þ¾îÀûÀÎ ÀÌÀ¯·Î ¿¬°áÀÌ ²÷¾îÁ³½À´Ï´Ù +$ ECONNRESET +54 »ó´ë¹æÀÌ ¿¬°áÀ» ²÷¾ú½À´Ï´Ù +$ ENOBUFS +55 ¹öÆÛ °ø°£ÀÌ ¸ðÀÚ¶ø´Ï´Ù +$ EISCONN +56 ¼ÒÄÏÀÌ ÀÌ¹Ì ¿¬°áµÇÀÖ½À´Ï´Ù +$ ENOTCONN +57 ¼ÒÄÏÀÌ ¿¬°áµÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù +$ ESHUTDOWN +58 ¼ÒÄÏÀÌ ÀÌ¹Ì ÁߴܵǾî, ´õ ÀÌ»ó Àü¼ÛÇÒ ¼ö ¾ø½À´Ï´Ù +$ ETOOMANYREFS +59 ÂüÁ¶¼ö°¡ ³Ê¹« ¸¹¾Æ ³ª´­ ¼ö ¾ø½À´Ï´Ù +$ ETIMEDOUT +60 ½Ã°£ÀÌ ³Ê¹« ¸¹ÀÌ Áö³ª ÀÛ¾÷ÀÌ ÁߴܵǾú½À´Ï´Ù +$ ECONNREFUSED +61 Á¢¼ÓÀÌ °ÅºÎµÇ¾ú½À´Ï´Ù +$ ELOOP +62 ½Éº¼¸¯ ¿¬°áÀÌ ³Ê¹« ¸¹ÀÌ °ÅÃļ­ ¿¬°áµÇ¾ú½À´Ï´Ù +$ ENAMETOOLONG +63 ÆÄÀÏ À̸§ÀÌ ³Ê¹« ±é´Ï´Ù +$ EHOSTDOWN +64 È£½ºÆ®°¡ Á×¾ú½À´Ï´Ù +$ EHOSTUNREACH +65 È£½ºÆ®·Î °¥ °æ·Î°¡ ¾ø½À´Ï´Ù +$ ENOTEMPTY +66 µð·ºÅ͸®°¡ ºñ¾îÀÖÁö ¾Ê½À´Ï´Ù +$ EPROCLIM +67 ÇÁ·Î¼¼½º°¡ ³Ê¹« ¸¹½À´Ï´Ù +$ EUSERS +68 »ç¿ëÀÚ°¡ ³Ê¹« ¸¹½À´Ï´Ù +$ EDQUOT +69 µð½ºÅ© ÇÒ´ç·®À» ÃÊ°úÇß½À´Ï´Ù +$ ESTALE +70 ²÷¾îÁø NFS ¿¬°áÀÔ´Ï´Ù +$ EREMOTE +71 ³Ê¹« ¸¹Àº °æ·Î·Î ¿ø°Ý¿¡ Á¢±ÙÇÏ¿´½À´Ï´Ù +$ EBADRPC +72 RPC ±¸Á¶Ã¼°¡ À߸øµÇ¾ú½À´Ï´Ù +$ ERPCMISMATCH +73 RPC ¹öÀüÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù +$ EPROGUNAVAIL +74 RPC ÇÁ·Î±×·¥ÀÌ ¾ø½À´Ï´Ù +$ EPROGMISMATCH +75 ÇÁ·Î±×·¥ ¹öÀüÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù +$ EPROCUNAVAIL +76 ÇÁ·Î±×·¥¿¡ ¿ø°Ý ÇÁ·Î½ÃÀú°¡ ¾ø½À´Ï´Ù +$ ENOLCK +77 Àá±ÝÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù +$ ENOSYS +78 ±¸ÇöµÇÁö ¾ÊÀº ±â´ÉÀÔ´Ï´Ù +$ EFTYPE +79 À߸øµÈ ÆÄÀÏ Á¾·ùÀ̰ųª Çü½ÄÀÌ À߸øµÆ½À´Ï´Ù +$ EAUTH +80 ÀÎÁõÀÌ ½ÇÆÐÇß½À´Ï´Ù +$ ENEEDAUTH +81 ÀÎÁõ ¼­¹ö°¡ ÁöÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù +$ EIDRM +82 ½Äº°ÀÚ°¡ Á¦°ÅµÇ¾ú½À´Ï´Ù +$ ENOMSG +83 ¿äûµÈ Çü½ÄÀÇ ¸Þ½ÃÁö´Â ¾ø½À´Ï´Ù +$ EOVERFLOW +84 µ¥ÀÌÅÍ Çü½Ä¿¡ ÀúÀåÇϱ⿡ ³Ê¹« Å« °ªÀÔ´Ï´Ù +$ ECANCELED +85 ÀÛ¾÷ÀÌ Ãë¼ÒµÇ¾ú½À´Ï´Ù +$ EILSEQ +86 ¹ÙÀÌÆ® ¹è¿­ÀÌ À߸øµÇ¾ú½À´Ï´Ù +$ ENOATTR +87 ¼Ó¼ºÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù +$ EDOOFUS +88 ÇÁ·Î±×·¥»ó ¿À·ùÀÔ´Ï´Ù +$ EBADMSG +89 À߸øµÈ ¸Þ½ÃÁöÀÔ´Ï´Ù +$ EMULTIHOP +90 ¸ÖƼȩÀÌ ½ÃµµµÇ¾ú½À´Ï´Ù +$ ENOLINK +91 ¿¬°áÀÌ ²÷°å½À´Ï´Ù +$ EPROTO +92 ÇÁ·ÎÅäÄÝÀÌ À߸øµÇ¾ú½À´Ï´Ù +$ ENOTCAPABLE +93 Á¢±Ù ´É·ÂÀÌ ÃæºÐÄ¡ ¾Ê½À´Ï´Ù +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 ²÷±è +$ SIGINT +2 Áß´Ü +$ SIGQUIT +3 Á¾·á +$ SIGILL +4 À߸øµÈ ¸í·É +$ SIGTRAP +5 Trace/BPT Æ®·¦ +$ SIGABRT +6 Abort Æ®·¦ +$ SIGEMT +7 EMT Æ®·¦ +$ SIGFPE +8 ºÎµ¿¼Ò¼öÁ¡ ¿¬»ê ¿¹¿Ü +$ SIGKILL +9 °­Á¦Á¾·á +$ SIGBUS +10 ¹ö½º ¿À·ù +$ SIGSEGV +11 ¼¼±×¸ÕÅ×ÀÌ¼Ç ¿À·ù +$ SIGSYS +12 À߸øµÈ ½Ã½ºÅÛ È£Ãâ +$ SIGPIPE +13 ÆÄÀÌÇÁ°¡ ²÷±è +$ SIGALRM +14 ½Ã°£ °æº¸ +$ SIGTERM +15 Á¾·áµÊ +$ SIGURG +16 ±ä±Þ I/O Á¶°Ç +$ SIGSTOP +17 ÀϽÃÁ¤Áö (½Ã±×³Î) +$ SIGTSTP +18 ÀϽÃÁ¤Áö +$ SIGCONT +19 °è¼Ó +$ SIGCHLD +20 ÀÚ½Ä ÇÁ·Î¼¼½º Á¾·á +$ SIGTTIN +21 Á¤Áö (Å͹̳ΠÀÔ·Â) +$ SIGTTOU +22 Á¤Áö (Å͹̳ΠÃâ·Â) +$ SIGIO +23 I/O °¡´É +$ SIGXCPU +24 CPU »ç¿ë ½Ã°£ ÃÊ°ú +$ SIGXFSZ +25 ÆÄÀÏ ¿ë·® Á¦ÇÑ ÃÊ°ú +$ SIGVTALRM +26 °¡»ó ŸÀÌ¸Ó ¸¸·á +$ SIGPROF +27 ÇÁ·ÎÆÄÀϸµ ŸÀÌ¸Ó ¸¸·á +$ SIGWINCH +28 â Å©±â º¯°æ +$ SIGINFO +29 Á¤º¸ ¿äû +$ SIGUSR1 +30 »ç¿ëÀÚ Á¤ÀÇ ½Ã±×³Î 1 +$ SIGUSR2 +31 »ç¿ëÀÚ Á¤ÀÇ ½Ã±×³Î 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 È£½ºÆ® À̸§ÀÌ Áö¿øÇÏÁö ¾Ê´Â ÁÖ¼Ò±ºÀÔ´Ï´Ù +$ EAI_AGAIN +2 ÁÖ¼Ò º¯È¯¿¡ ÀϽÃÀûÀ¸·Î ½ÇÆÐÇß½À´Ï´Ù +$ EAI_BADFLAGS +3 À߸øµÈ ai_flagsÀÔ´Ï´Ù +$ EAI_FAIL +4 ÁÖ¼Ò º¯È¯¿¡ ¿ÏÀüÈ÷ ½ÇÆÐÇß½À´Ï´Ù +$ EAI_FAMILY +5 Áö¿øµÇÁö ¾Ê´Â ai_familyÀÔ´Ï´Ù +$ EAI_MEMORY +6 ¸Þ¸ð¸® ÇÒ´ç¿¡ ½ÇÆÐÇß½À´Ï´Ù +$ 7 (obsolete) +7 È£½ºÆ® À̸§°ú ÀÏÄ¡ÇÏ´Â ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù +$ EAI_NONAME +8 È£½ºÆ® À̸§ ¶Ç´Â ¼­ºñ½º À̸§ÀÌ ÁöÁ¤µÇÁö ¾Ê¾Ò°Å³ª ¾Ë ¼ö ¾ø½À´Ï´Ù +$ EAI_SERVICE +9 ¼­ºñ½º À̸§Àº ai_socktype¿¡¼­ Áö¿øµÇÁö ¾Ê½À´Ï´Ù +$ EAI_SOCKTYPE +10 Áö¿øµÇÁö ¾Ê´Â ai_socktypeÀÔ´Ï´Ù +$ EAI_SYSTEM +11 ½Ã½ºÅÛ ¿À·ù°¡ errno¿¡ ¹ÝȯµÇ¾ú½À´Ï´Ù +$ EAI_BADHINTS +12 À߸øµÈ hintsÀÔ´Ï´Ù +$ EAI_PROTOCOL +13 ¾Ë ¼ö ¾ø´Â ÇÁ·ÎÅäÄÝÀÌ º¯È¯µÇ¾ú½À´Ï´Ù +$ EAI_OVERFLOW +14 ÀÎÀÚ ¹öÆÛ °ø°£ÀÌ ¸ðÀÚ¶ø´Ï´Ù +$ 0 +32766 ¼º°ø +$ NL_MSGMAX +32767 ¾Ë ¼ö ¾ø´Â ¿À·ù diff --git a/lib/libc/nls/mn_MN.UTF-8.msg b/lib/libc/nls/mn_MN.UTF-8.msg new file mode 100644 index 0000000000..fbbd95f1e9 --- /dev/null +++ b/lib/libc/nls/mn_MN.UTF-8.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/mn_MN.UTF-8.msg 192653 2009-05-23 17:13:35Z des $ +$ +$ Message catalog for mn_MN.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Үйлдэл зөвшөөрөгдөхгүй +$ ENOENT +2 Тийм файл эсвэл сан алга +$ ESRCH +3 Тийм процесс байхгүй +$ EINTR +4 Системийн тасалдсан дуудлага +$ EIO +5 Оролт/гаралтын алдаа +$ ENXIO +6 Төхөөрөмж тохируулагдаагүй +$ E2BIG +7 Дагавар өгөгдлийн жагсаалт хэтэрхий урт +$ ENOEXEC +8 Exec хэлбэршилтийн алдаа +$ EBADF +9 Файлын буруу тодорхойлогч +$ ECHILD +10 Хүүхэд процесс алга +$ EDEADLK +11 Эх үүсвэрийн гацаанаас зайлсхийсэн +$ ENOMEM +12 Санах ойд зай байрлуулж чадахгүй байна +$ EACCES +13 Зөвшөөрөхөөс татгалзсан +$ EFAULT +14 Буруу хаяг +$ ENOTBLK +15 Блок төхөөрөмж шаардагдсан +$ EBUSY +16 Төхөөрөмж завгүй +$ EEXIST +17 Файл байна +$ EXDEV +18 Төхөөрөмж хоорондын холбоос +$ ENODEV +19 Үйлдлийг төхөөрөмж дэмжээгүй +$ ENOTDIR +20 Сан биш +$ EISDIR +21 Сан мөн +$ EINVAL +22 Дагавар өгөгдөл буруу +$ ENFILE +23 Системд хэтэрхий олон нээлттэй файл байна +$ EMFILE +24 Хэтэрхий олон нээлттэй файл байна +$ ENOTTY +25 Төхөөрөмжтэй тохирохгүй ioctl үйлдэл +$ ETXTBSY +26 Текст файл завгүй +$ EFBIG +27 Файл хэтэрхий том +$ ENOSPC +28 Төхөөрөмж дээр зай үлдсэнгүй +$ ESPIPE +29 Хайлт буруу +$ EROFS +30 Зөвхөн-уншигдах файлын систем +$ EMLINK +31 Хэтэрхий олон холбоос байна +$ EPIPE +32 Эвдэрхий хоолой +$ EDOM +33 Тоон дагавар өгөгдөл талбараас гадна байна +$ ERANGE +34 Үр дүн хэтэрхий том +$ EAGAIN, EWOULDBLOCK +35 Эх үүсвэр түр зуур боломжгүй байна +$ EINPROGRESS +36 Үйлдэл одоо хийгдэж байна +$ EALREADY +37 Үйлдэл аль хэдийн хийгдэж байна +$ ENOTSOCK +38 Сокет бус зүйл дээр сокет үйлдэл +$ EDESTADDRREQ +39 Очих хаяг шаардагдсан +$ EMSGSIZE +40 Зурвас мэдээ хэтэрхий урт +$ EPROTOTYPE +41 Сокетийн хувьд протокол буруу төрлийнх байна +$ ENOPROTOOPT +42 Протокол байхгүй +$ EPROTONOSUPPORT +43 Протокол дэмжигдээгүй +$ ESOCKTNOSUPPORT +44 Сокетийн төрөл дэмжигдээгүй +$ EOPNOTSUPP +45 Үйлдэл дэмжигдээгүй +$ EPFNOSUPPORT +46 Протоколын гэр бүл дэмжигдээгүй +$ EAFNOSUPPORT +47 Хаягийн гэр бүлийг протоколын гэр бүл дэмжээгүй +$ EADDRINUSE +48 Хаяг ашиглагдаж байна +$ EADDRNOTAVAIL +49 Хүссэн хаягийг өгч чадахгүй +$ ENETDOWN +50 Сүлжээ унасан байна +$ ENETUNREACH +51 Сүлжээнд хүрэх боломжгүй +$ ENETRESET +52 Салгалт хийгдэхэд сүлжээ холболтыг унагалаа +$ ECONNABORTED +53 Програм хангамжаас болж холболт зогслоо +$ ECONNRESET +54 Холболтыг харилцагч салгалаа +$ ENOBUFS +55 Буфферийн зай байхгүй +$ EISCONN +56 Сокет аль хэдийн холбогдсон +$ ENOTCONN +57 Сокет холбогдоогүй +$ ESHUTDOWN +58 Сокет унтарсны дараа илгээж чадахгүй +$ ETOOMANYREFS +59 Хэтэрхий их хамаарлууд байна: залгаж чадахгүй +$ ETIMEDOUT +60 Үйлдлийн хугацаа дууссан +$ ECONNREFUSED +61 Холболт тогтоохоос татгалзлаа +$ ELOOP +62 Тэмдэгт холбоосуудын түвшин хэтэрхий олон байна +$ ENAMETOOLONG +63 Файлын нэр хэтэрхий урт +$ EHOSTDOWN +64 Төв компьютер зогссон байна +$ EHOSTUNREACH +65 Төв компьютер рүү чиглүүлэлт байхгүй +$ ENOTEMPTY +66 Сан хоосон биш +$ EPROCLIM +67 Хэтэрхий олон үйлдэл байна +$ EUSERS +68 Хэтэрхий олон хэрэглэгч байна +$ EDQUOT +69 Дискийн хязгаар хэмжээ хэтэрсэн +$ ESTALE +70 Хуучирсан NFS файлын жолоо +$ EREMOTE +71 Зам хэтэрхий алслагдсан түвшинтэй байна +$ EBADRPC +2 RPC бүтэц буруу +$ ERPCMISMATCH +73 RPC-ийн хувилбар буруу +$ EPROGUNAVAIL +74 RPC програм байхгүй +$ EPROGMISMATCH +75 Програмын хувилбар буруу +$ EPROCUNAVAIL +76 Програмын хувьд процедур буруу +$ ENOLCK +77 Түгжээ байхгүй +$ ENOSYS +78 Функц гүйцэтгэгдээгүй +$ EFTYPE +79 Файлын төрөл эсвэл хэлбэршилт тохироогүй +$ EAUTH +80 Нэвтрүүлэх алдаа +$ ENEEDAUTH +81 Нэвтррүүлэгч хэрэгтэй +$ EIDRM +82 Танигч устгагдсан +$ ENOMSG +83 Хүссэн төрлийн зурвас мэдээ байхгүй +$ EOVERFLOW +84 Утга нь өгөгдлийн төрөлд хадгалагдаж болохооргүй хэтэрхий том байна +$ ECANCELED +85 Үйлдэл зогсоогдсон +$ EILSEQ +86 Байтын дараалал буруу +$ ENOATTR +87 Атрибут олдсонгүй +$ EDOOFUS +88 Програмчлалын алдаа +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Зогсоох (Hangup) +$ SIGINT +2 Тасалдал +$ SIGQUIT +3 Гарах +$ SIGILL +4 Буруу заавар +$ SIGTRAP +5 Мөр/BPT занга +$ SIGABRT +6 Таслан зогсоох занга +$ SIGEMT +7 EMT занга +$ SIGFPE +8 Хөвөгч цэгийн онцгой алдаа +$ SIGKILL +9 Хөнөөсөн +$ SIGBUS +10 Шугамын алдаа +$ SIGSEGV +11 Сегментийн гэмтэл +$ SIGSYS +12 Системийн буруу дуудлага +$ SIGPIPE +13 Эвдэрхий хоолой +$ SIGALRM +14 Сэрүүлэгт цаг +$ SIGTERM +15 Төгссөн +$ SIGURG +16 Яаралтай I/O нөхцөл +$ SIGSTOP +17 Түр зогссон (дохио) +$ SIGTSTP +18 Түр зогссон +$ SIGCONT +19 Үргэлжилсэн +$ SIGCHLD +20 Хүүхэд процесс гарсан +$ SIGTTIN +21 Зогссон (tty оролт) +$ SIGTTOU +22 Зогссон (tty гаралт) +$ SIGIO +23 I/O боломжтой +$ SIGXCPU +24 CPU-ийн хугацааны хязгаар хэтэрсэн +$ SIGXFSZ +25 Файлын хэмжээний хязгаар хэтэрсэн +$ SIGVTALRM +26 Виртуал цаг хэмжигчийн хугацаа дууссан +$ SIGPROF +27 Профил хийх цаг хэмжигчийн хугацаа дууссан +$ SIGWINCH +28 Цонхны хэмжээний өөрчлөлт +$ SIGINFO +29 Мэдээллийн хүсэлт +$ SIGUSR1 +30 Хэрэглэгчийн тодорхойлсон дохио 1 +$ SIGUSR2 +31 Хэрэглэгчийн тодорхойлсон дохио 2 diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c new file mode 100644 index 0000000000..2625fa87a0 --- /dev/null +++ b/lib/libc/nls/msgcat.c @@ -0,0 +1,446 @@ +/*********************************************************** +Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. +Copyright 2010, Gabor Kovesdan + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that Alfalfa's name not be used in +advertising or publicity pertaining to distribution of the software +without specific, written prior permission. + +ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +ALPHALPHA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +If you make any modifications, bugfixes or other changes to this software +we'd appreciate it if you could send a copy to us so we can keep things +up-to-date. Many thanks. + Kee Hinckley + Alfalfa Software, Inc. + 267 Allston St., #3 + Cambridge, MA 02139 USA + nazgul@alfalfa.com + +$FreeBSD: head/lib/libc/nls/msgcat.c 244358 2012-12-17 12:57:36Z eadler $ +******************************************************************/ + +#define _NLS_PRIVATE + +#include "namespace.h" +#include +#include +#include +#include + +#include /* for ntohl() */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "un-namespace.h" + +#include "../locale/setlocale.h" /* for ENCODING_LEN */ + +#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" + +#define RLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_rdlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ + }} +#define WLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_wrlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ + }} +#define UNLOCK { if (__isthreaded) \ + _pthread_rwlock_unlock(&rwlock); } + +#define NLERR ((nl_catd) -1) +#define NLRETERR(errc) { errno = errc; return (NLERR); } +#define SAVEFAIL(n, l, e) { WLOCK(NLERR); \ + np = malloc(sizeof(struct catentry)); \ + if (np != NULL) { \ + np->name = strdup(n); \ + np->path = NULL; \ + np->catd = NLERR; \ + np->lang = (l == NULL) ? NULL : \ + strdup(l); \ + np->caterrno = e; \ + SLIST_INSERT_HEAD(&cache, np, list); \ + } \ + UNLOCK; \ + errno = e; \ + } + +static nl_catd load_msgcat(const char *, const char *, const char *); + +static pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER; + +struct catentry { + SLIST_ENTRY(catentry) list; + char *name; + char *path; + int caterrno; + nl_catd catd; + char *lang; + int refcount; +}; + +SLIST_HEAD(listhead, catentry) cache = + SLIST_HEAD_INITIALIZER(cache); + +nl_catd +catopen(const char *name, int type) +{ + struct stat sbuf; + struct catentry *np; + char *base, *cptr, *cptr1, *lang, *nlspath, *pathP, *pcode; + char *plang, *pter, *tmpptr; + int saverr, spcleft; + char path[PATH_MAX]; + + /* sanity checking */ + if (name == NULL || *name == '\0') + NLRETERR(EINVAL); + + if (strchr(name, '/') != NULL) + /* have a pathname */ + lang = NULL; + else { + if (type == NL_CAT_LOCALE) + lang = setlocale(LC_MESSAGES, NULL); + else + lang = getenv("LANG"); + + if (lang == NULL || *lang == '\0' || strlen(lang) > ENCODING_LEN || + (lang[0] == '.' && + (lang[1] == '\0' || (lang[1] == '.' && lang[2] == '\0'))) || + strchr(lang, '/') != NULL) + lang = "C"; + } + + /* Try to get it from the cache first */ + RLOCK(NLERR); + SLIST_FOREACH(np, &cache, list) { + if ((strcmp(np->name, name) == 0) && + ((lang != NULL && np->lang != NULL && + strcmp(np->lang, lang) == 0) || (np->lang == lang))) { + if (np->caterrno != 0) { + /* Found cached failing entry */ + UNLOCK; + NLRETERR(np->caterrno); + } else { + /* Found cached successful entry */ + np->refcount++; + UNLOCK; + return (np->catd); + } + } + } + UNLOCK; + + /* is it absolute path ? if yes, load immediately */ + if (strchr(name, '/') != NULL) + return (load_msgcat(name, name, lang)); + + /* sanity checking */ + if ((plang = cptr1 = strdup(lang)) == NULL) + return (NLERR); + if ((cptr = strchr(cptr1, '@')) != NULL) + *cptr = '\0'; + pter = pcode = ""; + if ((cptr = strchr(cptr1, '_')) != NULL) { + *cptr++ = '\0'; + pter = cptr1 = cptr; + } + if ((cptr = strchr(cptr1, '.')) != NULL) { + *cptr++ = '\0'; + pcode = cptr; + } + + if ((nlspath = getenv("NLSPATH")) == NULL || issetugid()) + nlspath = _DEFAULT_NLS_PATH; + + if ((base = cptr = strdup(nlspath)) == NULL) { + saverr = errno; + free(plang); + errno = saverr; + return (NLERR); + } + + while ((nlspath = strsep(&cptr, ":")) != NULL) { + pathP = path; + if (*nlspath) { + for (; *nlspath; ++nlspath) { + if (*nlspath == '%') { + switch (*(nlspath + 1)) { + case 'l': + tmpptr = plang; + break; + case 't': + tmpptr = pter; + break; + case 'c': + tmpptr = pcode; + break; + case 'L': + tmpptr = lang; + break; + case 'N': + tmpptr = (char *)name; + break; + case '%': + ++nlspath; + /* FALLTHROUGH */ + default: + if (pathP - path >= + sizeof(path) - 1) + goto too_long; + *(pathP++) = *nlspath; + continue; + } + ++nlspath; + put_tmpptr: + spcleft = sizeof(path) - + (pathP - path) - 1; + if (strlcpy(pathP, tmpptr, spcleft) >= + spcleft) { + too_long: + free(plang); + free(base); + SAVEFAIL(name, lang, ENAMETOOLONG); + NLRETERR(ENAMETOOLONG); + } + pathP += strlen(tmpptr); + } else { + if (pathP - path >= sizeof(path) - 1) + goto too_long; + *(pathP++) = *nlspath; + } + } + *pathP = '\0'; + if (stat(path, &sbuf) == 0) { + free(plang); + free(base); + return (load_msgcat(path, name, lang)); + } + } else { + tmpptr = (char *)name; + --nlspath; + goto put_tmpptr; + } + } + free(plang); + free(base); + SAVEFAIL(name, lang, ENOENT); + NLRETERR(ENOENT); +} + +char * +catgets(nl_catd catd, int set_id, int msg_id, const char *s) +{ + struct _nls_cat_hdr *cat_hdr; + struct _nls_msg_hdr *msg_hdr; + struct _nls_set_hdr *set_hdr; + int i, l, r, u; + + if (catd == NULL || catd == NLERR) { + errno = EBADF; + /* LINTED interface problem */ + return ((char *)s); + } + + cat_hdr = (struct _nls_cat_hdr *)catd->__data; + set_hdr = (struct _nls_set_hdr *)(void *)((char *)catd->__data + + sizeof(struct _nls_cat_hdr)); + + /* binary search, see knuth algorithm b */ + l = 0; + u = ntohl((u_int32_t)cat_hdr->__nsets) - 1; + while (l <= u) { + i = (l + u) / 2; + r = set_id - ntohl((u_int32_t)set_hdr[i].__setno); + + if (r == 0) { + msg_hdr = (struct _nls_msg_hdr *) + (void *)((char *)catd->__data + + sizeof(struct _nls_cat_hdr) + + ntohl((u_int32_t)cat_hdr->__msg_hdr_offset)); + + l = ntohl((u_int32_t)set_hdr[i].__index); + u = l + ntohl((u_int32_t)set_hdr[i].__nmsgs) - 1; + while (l <= u) { + i = (l + u) / 2; + r = msg_id - + ntohl((u_int32_t)msg_hdr[i].__msgno); + if (r == 0) { + return ((char *) catd->__data + + sizeof(struct _nls_cat_hdr) + + ntohl((u_int32_t) + cat_hdr->__msg_txt_offset) + + ntohl((u_int32_t) + msg_hdr[i].__offset)); + } else if (r < 0) { + u = i - 1; + } else { + l = i + 1; + } + } + + /* not found */ + goto notfound; + + } else if (r < 0) { + u = i - 1; + } else { + l = i + 1; + } + } + +notfound: + /* not found */ + errno = ENOMSG; + /* LINTED interface problem */ + return ((char *)s); +} + +int +catclose(nl_catd catd) +{ + struct catentry *np; + + /* sanity checking */ + if (catd == NULL || catd == NLERR) { + errno = EBADF; + return (-1); + } + + /* Remove from cache if not referenced any more */ + WLOCK(-1); + SLIST_FOREACH(np, &cache, list) { + if (catd == np->catd) { + np->refcount--; + if (np->refcount == 0) { + munmap(catd->__data, (size_t)catd->__size); + free(catd); + SLIST_REMOVE(&cache, np, catentry, list); + free(np->name); + free(np->path); + free(np->lang); + free(np); + } + break; + } + } + UNLOCK; + return (0); +} + +/* + * Internal support functions + */ + +static nl_catd +load_msgcat(const char *path, const char *name, const char *lang) +{ + struct stat st; + nl_catd catd; + struct catentry *np; + void *data; + int fd; + + /* path/name will never be NULL here */ + + /* + * One more try in cache; if it was not found by name, + * it might still be found by absolute path. + */ + RLOCK(NLERR); + SLIST_FOREACH(np, &cache, list) { + if ((np->path != NULL) && (strcmp(np->path, path) == 0)) { + np->refcount++; + UNLOCK; + return (np->catd); + } + } + UNLOCK; + + if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) { + SAVEFAIL(name, lang, errno); + NLRETERR(errno); + } + + if (_fstat(fd, &st) != 0) { + _close(fd); + SAVEFAIL(name, lang, EFTYPE); + NLRETERR(EFTYPE); + } + + /* + * If the file size cannot be held in size_t we cannot mmap() + * it to the memory. Probably, this will not be a problem given + * that catalog files are usually small. + */ + if (st.st_size > SIZE_T_MAX) { + _close(fd); + SAVEFAIL(name, lang, EFBIG); + NLRETERR(EFBIG); + } + + if ((data = mmap(0, (size_t)st.st_size, PROT_READ, + MAP_FILE|MAP_SHARED, fd, (off_t)0)) == MAP_FAILED) { + int saved_errno = errno; + _close(fd); + SAVEFAIL(name, lang, saved_errno); + NLRETERR(saved_errno); + } + _close(fd); + + if (ntohl((u_int32_t)((struct _nls_cat_hdr *)data)->__magic) != + _NLS_MAGIC) { + munmap(data, (size_t)st.st_size); + SAVEFAIL(name, lang, EFTYPE); + NLRETERR(EFTYPE); + } + + if ((catd = malloc(sizeof (*catd))) == NULL) { + munmap(data, (size_t)st.st_size); + SAVEFAIL(name, lang, ENOMEM); + NLRETERR(ENOMEM); + } + + catd->__data = data; + catd->__size = (int)st.st_size; + + /* Caching opened catalog */ + WLOCK(NLERR); + if ((np = malloc(sizeof(struct catentry))) != NULL) { + np->name = strdup(name); + np->path = strdup(path); + np->catd = catd; + np->lang = (lang == NULL) ? NULL : strdup(lang); + np->refcount = 1; + np->caterrno = 0; + SLIST_INSERT_HEAD(&cache, np, list); + } + UNLOCK; + return (catd); +} diff --git a/lib/libc/nls/nl_NL.ISO8859-1.msg b/lib/libc/nls/nl_NL.ISO8859-1.msg new file mode 100644 index 0000000000..4fc1154815 --- /dev/null +++ b/lib/libc/nls/nl_NL.ISO8859-1.msg @@ -0,0 +1,294 @@ +$ $FreeBSD: head/lib/libc/nls/nl_NL.ISO8859-1.msg 199190 2009-11-11 18:28:12Z rene $ +$ +$ Message catalog for nl_NL.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Bewerking niet toegestaan +$ ENOENT +2 Bestand of map niet gevonden +$ ESRCH +3 Taak bestaat niet +$ EINTR +4 Onderbroken systeemaanroep +$ EIO +5 Invoer/uitvoer fout +$ ENXIO +6 Apparaat niet geconfigureerd +$ E2BIG +7 Argumentenlijst is te lang +$ ENOEXEC +8 Programma kan niet worden uitgevoerd +$ EBADF +9 Ongeldige bestandsverwijzing +$ ECHILD +10 Geen kindprocessen +$ EDEADLK +11 Een deadlock op een bron is vermeden +$ ENOMEM +12 Kan geen geheugen meer verkrijgen +$ EACCES +13 Toegang geweigerd +$ EFAULT +14 Ongeldig adres +$ ENOTBLK +15 Een per blok adresseerbaar apparaat is vereist +$ EBUSY +16 Apparaat is bezig +$ EEXIST +17 Bestand bestaat reeds +$ EXDEV +18 Verwijzing tussen verschillende apparaten +$ ENODEV +19 Bewerking wordt niet ondersteund door dit apparaat +$ ENOTDIR +20 Dit is geen map +$ EISDIR +21 Dit is een map +$ EINVAL +22 Ongeldig argument +$ ENFILE +23 Te veel open bestanden in het systeem +$ EMFILE +24 Te veel open bestanden +$ ENOTTY +25 ioctl niet van toepassing op dit apparaat +$ ETXTBSY +26 Programmabestand is bezig +$ EFBIG +27 Bestand is te groot +$ ENOSPC +28 Geen ruimte meer op dit apparaat +$ ESPIPE +29 Ongeldige zoekopdracht +$ EROFS +30 Van dit bestandssysteem kan alleen worden gelezen +$ EMLINK +31 Te veel bestandsverwijzingen +$ EPIPE +32 Gebroken pijp +$ EDOM +33 Numeriek argument valt buiten domein +$ ERANGE +34 Resultaat te groot of te klein +$ EAGAIN, EWOULDBLOCK +35 Middel tijdelijk onbeschikbaar +$ EINPROGRESS +36 Bewerking in gang gezet +$ EALREADY +37 Bewerking is al in gang gezet +$ ENOTSOCK +38 Voor deze bewerking is een contactpunt vereist +$ EDESTADDRREQ +39 Een bestemmingsadres is vereist +$ EMSGSIZE +40 Te groot bericht +$ EPROTOTYPE +41 Protocol past niet bij dit contactpunt +$ ENOPROTOOPT +42 Protocol is niet beschikbaar +$ EPROTONOSUPPORT +43 Protocol is niet ondersteund +$ ESOCKTNOSUPPORT +44 Dit soort contactpunt is niet ondersteund +$ EOPNOTSUPP +45 Bewerking niet ondersteund +$ EPFNOSUPPORT +46 Protocolfamilie niet ondersteund +$ EAFNOSUPPORT +47 Adressenfamilie niet ondersteund door protocolfamilie +$ EADDRINUSE +48 Adres is al in gebruik +$ EADDRNOTAVAIL +49 Het gevraagde adres kan niet worden toegekend +$ ENETDOWN +50 Netwerk is plat +$ ENETUNREACH +51 Netwerk is onbereikbaar +$ ENETRESET +52 Netwerk onderbrak verbinding tijdens herstart +$ ECONNABORTED +53 Verbroken verbinding veroorzaakt door software +$ ECONNRESET +54 Verbinding werd aan de andere kant verbroken +$ ENOBUFS +55 Geen bufferruimte meer beschikbaar +$ EISCONN +56 Contactpunt is al verbonden +$ ENOTCONN +57 Contactpunt is niet verbonden +$ ESHUTDOWN +58 Een afgesloten contactpunt kan geen gegevens meer verzenden +$ ETOOMANYREFS +59 Te veel verwijzingen: splitsen niet mogelijk +$ ETIMEDOUT +60 Verbinding te lang niet mogelijk +$ ECONNREFUSED +61 Verbinding geweigerd +$ ELOOP +62 Te veel niveaus van symbolische verwijzingen +$ ENAMETOOLONG +63 Bestandsnaam te lang +$ EHOSTDOWN +64 Bestemming niet actief +$ EHOSTUNREACH +65 Bestemming niet bereikbaar +$ ENOTEMPTY +66 Map is niet leeg +$ EPROCLIM +67 Te veel processen +$ EUSERS +68 Te veel gebruikers +$ EDQUOT +69 Schijfquota overschreden +$ ESTALE +70 Verlopen NFS-bestandsverwijzing +$ EREMOTE +71 Te veel verwijzingen op afstand in dit pad +$ EBADRPC +72 RPC-argumentstructuur is incorrect +$ ERPCMISMATCH +73 RPC-versie is verkeerd +$ EPROGUNAVAIL +74 RPC-programma niet beschikbaar +$ EPROGMISMATCH +75 Programmaversie is verkeerd +$ EPROCUNAVAIL +76 Taak kan niet door dit programma worden uitgevoerd +$ ENOLCK +77 Geen sloten beschikbaar +$ ENOSYS +78 Systeemfunctie is niet geimplementeerd +$ EFTYPE +79 Bestandsformaat niet van toepassing +$ EAUTH +80 Aanmeldingsfout +$ ENEEDAUTH +81 Aanmeldingsprocedure benodigd +$ EIDRM +82 De aanwijzer is verwijderd +$ ENOMSG +83 Geen bericht van het gewenste type +$ EOVERFLOW +84 Waarde te groot om te bewaren in gegevenstype +$ ECANCELED +85 Bewerking geannuleerd +$ EILSEQ +86 Ongeldige bytereeks +$ ENOATTR +87 Attribuut niet gevonden +$ EDOOFUS +88 Programmeerfout +$ EBADMSG +89 Verkeerd of defect bericht +$ EMULTIHOP +90 Multihopverzoek +$ ENOLINK +91 Verbinding werd verstoord +$ EPROTO +92 Protocolfout +$ ENOTCAPABLE +93 Onvoldoende mogelijkheden +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Opgehangen +$ SIGINT +2 Onderbroken +$ SIGQUIT +3 Opgegeven +$ SIGILL +4 Verboden instructie +$ SIGTRAP +5 Spoor/BPT-val +$ SIGABRT +6 Abort-val +$ SIGEMT +7 EMT-val +$ SIGFPE +8 Drijvende kommafout +$ SIGKILL +9 Gedood +$ SIGBUS +10 Busfout +$ SIGSEGV +11 Segmentatiefout +$ SIGSYS +12 Verkeerde systeemaanroep +$ SIGPIPE +13 Gebroken pijp +$ SIGALRM +14 Wekker +$ SIGTERM +15 Beeindigd +$ SIGURG +16 Dringende I/O opgemerkt +$ SIGSTOP +17 Gestopt (signaal) +$ SIGTSTP +18 Gestopt +$ SIGCONT +19 Voortgezet +$ SIGCHLD +20 Kindproces beeindigd +$ SIGTTIN +21 Gestopt (TTY-invoer) +$ SIGTTOU +22 Gestopt (TTY-uitvoer) +$ SIGIO +23 I/O mogelijk +$ SIGXCPU +24 Te veel CPU-tijd verbruikt +$ SIGXFSZ +25 Maximale bestandsgrootte overschreden +$ SIGVTALRM +26 Virtuele wekker +$ SIGPROF +27 Profiling-wekker +$ SIGWINCH +28 Venstergrootte veranderd +$ SIGINFO +29 Informatieverzoek +$ SIGUSR1 +30 Gebruikersignaal 1 +$ SIGUSR2 +31 Gebruikersignaal 2 +$ +$ gai_strerror() support catalog +$set 3 +$ 1 (obsolete) +1 Adresfamilie voor hostnaam niet ondersteund +$ EAI_AGAIN +2 Tijdelijke fout in naamresolutie +$ EAI_BADFLAGS +3 Ongeldige waarde voor ai_flags +$ EAI_FAIL +4 Onherstelbare fout in naamresolutie +$ EAI_FAMILY +5 ai_familie niet ondersteund +$ EAI_MEMORY +6 Geheugenallocatiefout +$ 7 (obsolete) +7 Geen adres met hostnaam geassocieerd +$ EAI_NONAME +8 hostname noch servname gegeven, of onbekend +$ EAI_SERVICE +9 servname niet ondersteund voor ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype niet ondersteund +$ EAI_SYSTEM +11 Systeemfout geretourneerd in errno +$ EAI_BADHINTS +12 Ongeldige waarde voor hints +$ EAI_PROTOCOL +13 Opgelost protocol is onbekend +$ EAI_OVERFLOW +14 Argumentbuffer overstroomd +$ 0 +32766 Succes +$ NL_MSGMAX +32767 Onbekende fout diff --git a/lib/libc/nls/no_NO.ISO8859-1.msg b/lib/libc/nls/no_NO.ISO8859-1.msg new file mode 100644 index 0000000000..a6545b0ced --- /dev/null +++ b/lib/libc/nls/no_NO.ISO8859-1.msg @@ -0,0 +1,231 @@ +$ $FreeBSD: head/lib/libc/nls/no_NO.ISO8859-1.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for no_NO.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operasjonen er ikke tillatt +$ ENOENT +2 Filen eller katalogen finnes ikke +$ ESRCH +3 Prosessen finnes ikke +$ EINTR +4 Avbrudt systemkall +$ EIO +5 I/O feil +$ ENXIO +6 Enheten er ikke konfigurert +$ E2BIG +7 Argumentlisten er for lang +$ ENOEXEC +8 Ukjent kjørbart format +$ EBADF +9 Ugyldig fildeskriptor +$ ECHILD +10 Ingen barneprosess +$ EDEADLK +11 Vranglås unngått +$ ENOMEM +12 Kan ikke allokere nok minne +$ EACCES +13 Ingen adgang +$ EFAULT +14 Ugyldig adresse +$ ENOTBLK +15 Blokk-enhet påkrevd +$ EBUSY +16 Enheten er opptatt +$ EEXIST +17 Filen finnes +$ EXDEV +18 Link mellom forskjellige enheter +$ ENODEV +19 Operasjonen er ikke støttet av enheten +$ ENOTDIR +20 Ikke en katalog +$ EISDIR +21 Er en katalog +$ EINVAL +22 Ugyldig argument +$ ENFILE +23 For mange åpne filer i systemet +$ EMFILE +24 For mange åpne filer +$ ENOTTY +25 Ugyldig ioctl for enheten +$ ETXTBSY +26 Kjørbar fil i bruk +$ EFBIG +27 Filen er for stor +$ ENOSPC +28 Ingen ledig plass på enheten +$ ESPIPE +29 Ugyldig seek operasjon +$ EROFS +30 Filsystemet er skrivebeskyttet +$ EMLINK +31 For mange linker +$ EPIPE +32 Brudt pipe +$ EDOM +33 Numerisk argument utenfor arbeidsområdet +$ ERANGE +34 Resultatet er for stort +$ EAGAIN, EWOULDBLOCK +35 Ressurs midlertidig utilgjengelig +$ EINPROGRESS +36 Operasjonen er nå i gang +$ EALREADY +37 Operasjonen er allerede i gang +$ ENOTSOCK +38 Deskriptoren er ikke en socket +$ EDESTADDRREQ +39 Mottakeradresse er påkrevd +$ EMSGSIZE +40 Meldingen er for lang +$ EPROTOTYPE +41 Ugyldig protokolltype for denne socketen +$ ENOPROTOOPT +42 Protokollen er ikke tilgjengelig +$ EPROTONOSUPPORT +43 Protokollen er ikke støttet +$ ESOCKTNOSUPPORT +44 Socket-typen er ikke støttet +$ EOPNOTSUPP +45 Operasjonen er ikke støttet +$ EPFNOSUPPORT +46 Protokollfamilien er ikke støttet +$ EAFNOSUPPORT +47 Adressetypen er ikke støttet av protokollfamilien +$ EADDRINUSE +48 Adressen er allerede i bruk +$ EADDRNOTAVAIL +49 Kan ikke bruke den ønskede adressen +$ ENETDOWN +50 Nettverket er nede +$ ENETUNREACH +51 Nettverket er utilgjengelig +$ ENETRESET +52 Nettverket kuttet forbindelsen ved reset +$ ECONNABORTED +53 Programvaren forårsaket brudd av forbindelsen +$ ECONNRESET +54 Forbindelsen avbrudt av korrespondenten +$ ENOBUFS +55 Buffer-plass ikke tilgjengelig +$ EISCONN +56 Socketen er allerede forbundet +$ ENOTCONN +57 Socketen er ikke forbundet +$ ESHUTDOWN +58 Kan ikke sende etter at socketen er tatt ned +$ ETOOMANYREFS +59 For mange referanser: kan ikke slå dem sammen +$ ETIMEDOUT +60 Tiden til forbindelsen utløp +$ ECONNREFUSED +61 Forbindelse nektet +$ ELOOP +62 For mange nivåer med symbolske linker +$ ENAMETOOLONG +63 Filnavnet er for langt +$ EHOSTDOWN +64 Maskinen er nede +$ EHOSTUNREACH +65 Ingen rute til maskinen +$ ENOTEMPTY +66 Katalogen er ikke tom +$ EPROCLIM +67 For mange prosesser +$ EUSERS +68 For mange brukere +$ EDQUOT +69 Diskkvote overskredet +$ ESTALE +70 Fastlåst NFS fildeskriptor +$ EREMOTE +71 For mange nivåer med remote i stien +$ EBADRPC +72 Ugyldig RPC struktur +$ ERPCMISMATCH +73 Feil RPC versjon +$ EPROGUNAVAIL +74 RPC program ikke tilgjengelig +$ EPROGMISMATCH +75 Feil programversjon +$ EPROCUNAVAIL +76 Prosedyren finnes ikke i programmet +$ ENOLCK +77 Ingen låsing tilgjengelig +$ ENOSYS +78 Funksjonen er ikke implementert +$ EFTYPE +79 Ugyldig filtype eller format +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Hangup +$ SIGINT +2 Avbrudd +$ SIGQUIT +3 Avslutt +$ SIGILL +4 Ugyldig instruksjon +$ SIGTRAP +5 Trace/BPT trap +$ SIGABRT +6 Abort trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Flyttallsfeil +$ SIGKILL +9 Drept +$ SIGBUS +10 Buss feil +$ SIGSEGV +11 Segmenteringsfeil +$ SIGSYS +12 Ugyldig systemkall +$ SIGPIPE +13 Brudt pipe +$ SIGALRM +14 Alarmklokke +$ SIGTERM +15 Terminert +$ SIGURG +16 Urgent I/O condition +$ SIGSTOP +17 Stoppet (signal) +$ SIGTSTP +18 Stoppet +$ SIGCONT +19 Fortsetter +$ SIGCHLD +20 Barn avsluttet +$ SIGTTIN +21 Stoppet (tty input) +$ SIGTTOU +22 Stoppet (tty output) +$ SIGIO +23 I/O mulig +$ SIGXCPU +24 CPU-tid overskredet +$ SIGXFSZ +25 Maksimal filstørrelse overskredet +$ SIGVTALRM +26 Virtuell timer utløpt +$ SIGPROF +27 Profileringstimer utløpt +$ SIGWINCH +28 Vindustørrelse endres +$ SIGINFO +29 Informasjonsforespørsel +$ SIGUSR1 +30 Brukerdefinert signal 1 +$ SIGUSR2 +31 Brukerdefinert signal 2 diff --git a/lib/libc/nls/pl_PL.ISO8859-2.msg b/lib/libc/nls/pl_PL.ISO8859-2.msg new file mode 100644 index 0000000000..9e4794897b --- /dev/null +++ b/lib/libc/nls/pl_PL.ISO8859-2.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/pl_PL.ISO8859-2.msg 148355 2005-07-23 21:30:35Z pjd $ +$ +$ Message catalog for pl_PL.ISO8859-2 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operacja niedozwolona +$ ENOENT +2 Nie ma takiego pliku/katalogu +$ ESRCH +3 Nie ma takiego procesu +$ EINTR +4 Wywo³anie systemowe przerwane +$ EIO +5 B³±d wej¶cia/wyj¶cia +$ ENXIO +6 Nieskonfigurowane urz±dzenie +$ E2BIG +7 Zbyt d³uga lista argumentów +$ ENOEXEC +8 B³êdny format pliku wykonywalnego +$ EBADF +9 Z³y deskryptor pliku +$ ECHILD +10 Brak procesów potomnych +$ EDEADLK +11 Unikniêto zakleszczenia zasobów +$ ENOMEM +12 Brak pamiêci do przydzia³u +$ EACCES +13 Brak dostêpu +$ EFAULT +14 Z³y adres +$ ENOTBLK +15 Wymagane urz±dzenie blokowe +$ EBUSY +16 Urz±dzenie zajête +$ EEXIST +17 Plik istnieje +$ EXDEV +18 Dowi±zanie miedzy urz±dzeniami +$ ENODEV +19 Operacja nieobs³ugiwana przez urz±dzenie +$ ENOTDIR +20 To nie jest katalog +$ EISDIR +21 To jest katalog +$ EINVAL +22 B³êdny argument +$ ENFILE +23 Zbyt wiele otwartych plików w systemie +$ EMFILE +24 Zbyt wiele otwartych plików +$ ENOTTY +25 Niew³a¶ciwy dostêp do urz±dzenia +$ ETXTBSY +26 Plik wykonywalny jest zajêty +$ EFBIG +27 Zbyt du¿y plik +$ ENOSPC +28 Brak miejsca na urz±dzeniu +$ ESPIPE +29 Przesuniêcie niemo¿liwe +$ EROFS +30 System plików tylko do odczytu +$ EMLINK +31 Zbyt wiele dowi±zañ +$ EPIPE +32 Potok przerwany +$ EDOM +33 Argument liczbowy z poza zakresu +$ ERANGE +34 Wynik z poza zakresu +$ EAGAIN, EWOULDBLOCK +35 Zasoby chwilowo niedostêpne +$ EINPROGRESS +36 Operacja jest w³a¶nie wykonywana +$ EALREADY +37 Operacja jest ju¿ wykonywana +$ ENOTSOCK +38 Operacja na obiekcie, który nie jest gniazdem +$ EDESTADDRREQ +39 Wymagany adres przeznaczenia +$ EMSGSIZE +40 Wiadomo¶æ zbyt d³uga +$ EPROTOTYPE +41 Typ protoko³u nie pasuje do gniazda +$ ENOPROTOOPT +42 Protokó³ nie jest dostêpny +$ EPROTONOSUPPORT +43 Nieobs³ugiwany protokó³ +$ ESOCKTNOSUPPORT +44 Nieobs³ugiwany typ gniazda +$ EOPNOTSUPP +45 Nieobs³ugiwana operacja +$ EPFNOSUPPORT +46 Nieobs³ugiwana rodzina protoko³ów +$ EAFNOSUPPORT +47 Rodzina adresów nie jest obs³ugiwana przez rodzinê protoko³ów +$ EADDRINUSE +48 Adres jest ju¿ w u¿yciu +$ EADDRNOTAVAIL +49 Adres nie mo¿e byæ przydzielony +$ ENETDOWN +50 Sieæ nie dzia³a +$ ENETUNREACH +51 Sieæ jest niedostêpna +$ ENETRESET +52 Sieæ przerwa³a po³±czenie po resecie +$ ECONNABORTED +53 Oprogramowanie spowodowa³o przerwanie po³±czenia +$ ECONNRESET +54 Po³±czenie zerwane przez drug± stronê +$ ENOBUFS +55 Brak miejsca w buforze +$ EISCONN +56 Gniazdo jest ju¿ po³±czone +$ ENOTCONN +57 Gniazdo nie jest po³±czone +$ ESHUTDOWN +58 Nie mo¿na wysy³aæ po zamkniêciu gniazda +$ ETOOMANYREFS +59 Za du¿o powi±zañ: dowi±zanie niemo¿liwe +$ ETIMEDOUT +60 Limit czasu operacji przekroczony +$ ECONNREFUSED +61 Po³±czenie odrzucone +$ ELOOP +62 Zbyt wiele wzajemnych dowi±zañ symbolicznych +$ ENAMETOOLONG +63 Zbyt d³uga nazwa pliku +$ EHOSTDOWN +64 Host jest wy³±czony +$ EHOSTUNREACH +65 Brak drogi do hosta +$ ENOTEMPTY +66 Katalog nie jest pusty +$ EPROCLIM +67 Zbyt wiele procesów +$ EUSERS +68 Zbyt wielu u¿ytkowników +$ EDQUOT +69 Przekroczono limit miejsca na dysku +$ ESTALE +70 Uchwyt pliku NFS jest nieaktualny +$ EREMOTE +71 Zbyt wiele poziomów zagnie¿d¿enia w ¶cie¿ce +$ EBADRPC +72 RPC b³êdna struktura +$ ERPCMISMATCH +73 RPC niekompatybilna wersja +$ EPROGUNAVAIL +74 RPC program niedostêpny +$ EPROGMISMATCH +75 Nieobs³ugiwana wersja programu +$ EPROCUNAVAIL +76 Nieobs³ugiwana procedura +$ ENOLCK +77 Wyczerpany limit blokad +$ ENOSYS +78 Nieobs³ugiwana funkcja +$ EFTYPE +79 Niew³a¶ciwy typ lub format pliku +$ EAUTH +80 B³±d uwierzytelnienia +$ ENEEDAUTH +81 Wymagane uwierzytelnienie +$ EIDRM +82 Identyfikator zosta³ usuniêty +$ ENOMSG +83 Brak komunikatu po¿±danego typu +$ EOVERFLOW +84 Warto¶æ zbyt du¿a dla zdefiniowanego typu danych +$ ECANCELED +85 Operacja anulowana +$ EILSEQ +86 B³êdna sekwencja bajtów +$ ENOATTR +87 Nie znaleziono atrybutu +$ EDOOFUS +88 Wewnêtrzny b³±d programu +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Roz³±czenie +$ SIGINT +2 Przerwanie +$ SIGQUIT +3 Wyj¶cie +$ SIGILL +4 Nieznana instrukcja +$ SIGTRAP +5 Pu³apka debuggera/BPT +$ SIGABRT +6 Przerwana pu³apka +$ SIGEMT +7 Pu³apka EMT +$ SIGFPE +8 B³±d w obliczeniach zmiennoprzecinkowych +$ SIGKILL +9 Unicestwiony +$ SIGBUS +10 B³±d szyny +$ SIGSEGV +11 Naruszenie ochrony pamiêci +$ SIGSYS +12 B³êdne wywo³anie systemowe +$ SIGPIPE +13 Przerwany potok +$ SIGALRM +14 Budzik +$ SIGTERM +15 Zakoñczony +$ SIGURG +16 Nag³y wypadek I/O +$ SIGSTOP +17 Zatrzymany (sygna³) +$ SIGTSTP +18 Zatrzymany +$ SIGCONT +19 Kontynuacja +$ SIGCHLD +20 Proces potomny zakoñczy³ pracê +$ SIGTTIN +21 Zatrzymany (wej¶cie z tty) +$ SIGTTOU +22 Zatrzymany (wyj¶cie z tty) +$ SIGIO +23 Wej/Wyj dozwolone +$ SIGXCPU +24 Przekroczony limit czasu procesora +$ SIGXFSZ +25 Przekroczony limit wielko¶ci pliku +$ SIGVTALRM +26 Alarm stopera wirtualnego +$ SIGPROF +27 Alarm stopera profiluj±cego +$ SIGWINCH +28 Zmiana rozmiaru okna +$ SIGINFO +29 ¯±danie informacji +$ SIGUSR1 +30 Sygna³ u¿ytkownika 1 +$ SIGUSR2 +31 Sygna³ u¿ytkownika 2 diff --git a/lib/libc/nls/pt_BR.ISO8859-1.msg b/lib/libc/nls/pt_BR.ISO8859-1.msg new file mode 100644 index 0000000000..7c1e96237a --- /dev/null +++ b/lib/libc/nls/pt_BR.ISO8859-1.msg @@ -0,0 +1,249 @@ +$ $FreeBSD: head/lib/libc/nls/pt_BR.ISO8859-1.msg 189963 2009-03-18 14:33:10Z gabor $ +$ +$ Message catalog for pt_BR.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operação não permitida +$ ENOENT +2 Nenhum arquivo ou diretório encontrado +$ ESRCH +3 Nenhum processo encontrado +$ EINTR +4 Chamada de sistema interrompida +$ EIO +5 Erro de entrada/saída +$ ENXIO +6 Dispositivo não configurado +$ E2BIG +7 Lista de argumentos muito grande +$ ENOEXEC +8 Erro no formato de execução +$ EBADF +9 Erro no descritor de arquivo +$ ECHILD +10 Nenhum processo filho +$ EDEADLK +11 Bloqueio de recurso evitado +$ ENOMEM +12 Impossível alocar memória +$ EACCES +13 Permissão negada +$ EFAULT +14 Endereço errado +$ ENOTBLK +15 Dispositivo de bloco requerido +$ EBUSY +16 Dispositivo ocupado +$ EEXIST +17 Arquivo existe +$ EXDEV +18 Ligação entre dispositivos +$ ENODEV +19 Operação não suportada pelo dispositivo +$ ENOTDIR +20 Não é um diretório +$ EISDIR +21 É um diretório +$ EINVAL +22 Argumento inválido +$ ENFILE +23 Muitos arquivos abertos no sistema +$ EMFILE +24 Muitos arquivos abertos no sistema +$ ENOTTY +25 ioctl inapropriado para o dispositivo +$ ETXTBSY +26 Arquivo texto sendo utilizado +$ EFBIG +27 Arquivo muito grande +$ ENOSPC +28 Sem espaço no dispositivo +$ ESPIPE +29 seek ilegal +$ EROFS +30 Sistema de arquivos apenas para leitura +$ EMLINK +31 Muitos links +$ EPIPE +32 pipe quebrado +$ EDOM +33 Argumento numérico fora do domínio +$ ERANGE +34 Resultado muito grande +$ EAGAIN, EWOULDBLOCK +35 Recurso temporariamente indisponível +$ EINPROGRESS +36 Operação em progresso agora +$ EALREADY +37 Operação em progresso pronta +$ ENOTSOCK +38 Operação de socket em um não-socket +$ EDESTADDRREQ +39 Endereço de destino requerido +$ EMSGSIZE +40 Mensagem muito grande +$ EPROTOTYPE +41 Tipo de protocolo errado para socket +$ ENOPROTOOPT +42 Protocolo não disponível +$ EPROTONOSUPPORT +43 Protocolo não suportado +$ ESOCKTNOSUPPORT +44 Tipo de socket não suportado +$ EOPNOTSUPP +45 Operação não permitida +$ EPFNOSUPPORT +46 Família de protocolo não suportada +$ EAFNOSUPPORT +47 Família de endereços não suportada pela família de protocolos +$ EADDRINUSE +48 Endereço já está em uso +$ EADDRNOTAVAIL +49 Impossível obter endereço solicitado +$ ENETDOWN +50 Rede está parada +$ ENETUNREACH +51 Rede está inalcançável +$ ENETRESET +52 Conexão de rede perdida durante reset +$ ECONNABORTED +53 Conexão abortada por software +$ ECONNRESET +54 Conexão reiniciada pelo outro ponto +$ ENOBUFS +55 Sem espaço de buffer disponível +$ EISCONN +56 Socket já está conectado +$ ENOTCONN +57 Socket não está conectado +$ ESHUTDOWN +58 Impossível enviar depois que o socket foi finalizado +$ ETOOMANYREFS +59 Muitas referências: impossível ligar +$ ETIMEDOUT +60 Tempo de operação expirou +$ ECONNREFUSED +61 Conexão recusada +$ ELOOP +62 Muitos níveis de links simbólicos +$ ENAMETOOLONG +63 Nome de arquivo muito grande +$ EHOSTDOWN +64 Host está desligado +$ EHOSTUNREACH +65 Sem rota para o host +$ ENOTEMPTY +66 Diretório não está vazio +$ EPROCLIM +67 Muitos processos +$ EUSERS +68 Muitos usuários +$ EDQUOT +69 Quota de disco excedida +$ ESTALE +70 Manipulador de arquivo NFS velho +$ EREMOTE +71 Muitos níveis no caminho remoto +$ EBADRPC +72 Estrutura RPC incorreta +$ ERPCMISMATCH +73 Versão RPC incorreta +$ EPROGUNAVAIL +74 Programa RPC indisponível +$ EPROGMISMATCH +75 Versão do programa incorreta +$ EPROCUNAVAIL +76 Procedimento incorreto para o programa +$ ENOLCK +77 Nenhum lock disponível +$ ENOSYS +78 Função não implementada +$ EFTYPE +79 Tipo de arquivo ou formato inapropriados +$ EAUTH +80 Erro de autenticação +$ ENEEDAUTH +81 Necessidade de autenticador +$ EIDRM +82 Identificador removido +$ ENOMSG +83 Nenhuma mensagem do tipo desejado +$ EOVERFLOW +84 Valor muito grande para ser armazenado neste tipo de dado +$ ECANCELED +85 Operação cancelada +$ EILSEQ +86 Sequência de bytes ilegal +$ ENOATTR +87 Atributo não encontrado +$ EDOOFUS +88 Erro de programação +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Fim da linha (Hangup) +$ SIGINT +2 Interrupção +$ SIGQUIT +3 Saída +$ SIGILL +4 Instrução ilegal +$ SIGTRAP +5 Trap de Trace/BPT +$ SIGABRT +6 Abortar trap +$ SIGEMT +7 EMT trap +$ SIGFPE +8 Exceção de ponto flutuante +$ SIGKILL +9 Morreu +$ SIGBUS +10 Erro de barramento +$ SIGSEGV +11 Falha de segmentação +$ SIGSYS +12 Chamada de sistema incorreta +$ SIGPIPE +13 Pipe incorreto +$ SIGALRM +14 Alarme do relógio +$ SIGTERM +15 Terminado +$ SIGURG +16 Condição urgente de E/S +$ SIGSTOP +17 Suspendido (sinal) +$ SIGTSTP +18 Suspendido +$ SIGCONT +19 Continuado +$ SIGCHLD +20 Filho saiu +$ SIGTTIN +21 Parado (entrada de tty) +$ SIGTTOU +22 Parado (saída de tty) +$ SIGIO +23 E/S possível +$ SIGXCPU +24 Limite de tempo de CPU excedido +$ SIGXFSZ +25 Tamanho de arquivo excedido +$ SIGVTALRM +26 Temporizador virtual expirou +$ SIGPROF +27 Temporizador de profiling expirou +$ SIGWINCH +28 Mudança no tamanho de janela +$ SIGINFO +29 Requisição de informação +$ SIGUSR1 +30 Sinal 1 definido pelo usuário +$ SIGUSR2 +31 Sinal 2 definido pelo usuário diff --git a/lib/libc/nls/ru_RU.KOI8-R.msg b/lib/libc/nls/ru_RU.KOI8-R.msg new file mode 100644 index 0000000000..539aa75e12 --- /dev/null +++ b/lib/libc/nls/ru_RU.KOI8-R.msg @@ -0,0 +1,266 @@ +$ $FreeBSD: head/lib/libc/nls/ru_RU.KOI8-R.msg 209360 2010-06-20 06:52:10Z maxim $ +$ +$ Message catalog for ru_RU.KOI8-R locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 ïÐÅÒÁÃÉÑ ÎÅ ÒÁÚÒÅÛÅÎÁ +$ ENOENT +2 îÅÔ ÔÁËÏÇÏ ÆÁÊÌÁ ÉÌÉ ËÁÔÁÌÏÇÁ +$ ESRCH +3 îÅÔ ÔÁËÏÇÏ ÐÒÏÃÅÓÓÁ +$ EINTR +4 ðÒÅÒ×ÁÎÎÙÊ ÓÉÓÔÅÍÎÙÊ ×ÙÚÏ× +$ EIO +5 ïÛÉÂËÁ ××ÏÄÁ/×Ù×ÏÄÁ +$ ENXIO +6 õÓÔÒÏÊÓÔ×Ï ÎÅ ÓËÏÎÆÉÇÕÒÉÒÏ×ÁÎÏ +$ E2BIG +7 óÌÉÛËÏÍ ÄÌÉÎÎÙÊ ÓÐÉÓÏË ÁÒÇÕÍÅÎÔÏ× +$ ENOEXEC +8 ïÛÉÂËÁ ÆÏÒÍÁÔÁ ×ÙÐÏÌÎÑÅÍÏÇÏ ÆÁÊÌÁ +$ EBADF +9 îÅËÏÒÒÅËÔÎÙÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ +$ ECHILD +10 îÅÔ ÐÏÒÏÖÄÅÎÎÙÈ ÐÒÏÃÅÓÓÏ× +$ EDEADLK +11 ðÒÅÄÏÔ×ÒÁÝÅÎÁ ×ÚÁÉÍÎÁÑ ÂÌÏËÉÒÏ×ËÁ ÐÒÉ ÄÏÓÔÕÐÅ Ë ÒÅÓÕÒÓÕ +$ ENOMEM +12 îÅ×ÏÚÍÏÖÎÏ ×ÙÄÅÌÉÔØ ÐÁÍÑÔØ +$ EACCES +13 îÅÄÏÓÔÁÔÏÞÎÏ ÐÒÉ×ÉÌÅÇÉÊ +$ EFAULT +14 îÅËÏÒÒÅËÔÎÙÊ ÁÄÒÅÓ +$ ENOTBLK +15 îÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ ÂÌÏÞÎÏÅ ÕÓÔÒÏÊÓÔ×Ï +$ EBUSY +16 õÓÔÒÏÊÓÔ×Ï ÚÁÎÑÔÏ +$ EEXIST +17 æÁÊÌ ÓÕÝÅÓÔ×ÕÅÔ +$ EXDEV +18 óÓÙÌËÁ ÎÁ ÄÒÕÇÏÅ ÕÓÔÒÏÊÓÔ×Ï +$ ENODEV +19 ïÐÅÒÁÃÉÑ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÕÓÔÒÏÊÓÔ×ÏÍ +$ ENOTDIR +20 õËÁÚÁÎÎÙÊ ÆÁÊÌ ÎÅ Ñ×ÌÑÅÔÓÑ ËÁÔÁÌÏÇÏÍ +$ EISDIR +21 õËÁÚÁÎÎÙÊ ÆÁÊÌ Ñ×ÌÑÅÔÓÑ ËÁÔÁÌÏÇÏÍ +$ EINVAL +22 îÅÄÏÐÕÓÔÉÍÙÊ ÁÒÇÕÍÅÎÔ +$ ENFILE +23 óÌÉÛËÏÍ ÍÎÏÇÏ ÏÔËÒÙÔÙÈ ÆÁÊÌÏ× × ÓÉÓÔÅÍÅ +$ EMFILE +24 óÌÉÛËÏÍ ÍÎÏÇÏ ÏÔËÒÙÔÙÈ ÆÁÊÌÏ× +$ ENOTTY +25 ÷ÙÚÏ× ioctl ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÕÓÔÒÏÊÓÔ×ÏÍ +$ ETXTBSY +26 ôÅËÓÔÏ×ÙÊ ÆÁÊÌ ÚÁÎÑÔ +$ EFBIG +27 óÌÉÛËÏÍ ÂÏÌØÛÏÊ ÆÁÊÌ +$ ENOSPC +28 îÁ ÕÓÔÒÏÊÓÔ×Å ÎÅ ÏÓÔÁÌÏÓØ ÍÅÓÔÁ +$ ESPIPE +29 îÅÄÏÐÕÓÔÉÍÏÅ ÓÍÅÝÅÎÉÅ +$ EROFS +30 æÁÊÌÏ×ÁÑ ÓÉÓÔÅÍÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ +$ EMLINK +31 óÌÉÛËÏÍ ÍÎÏÇÏ ÓÓÙÌÏË +$ EPIPE +$ XXX??? +32 ëÁÎÁÌ ÒÁÚÒÕÛÅÎ +$ EDOM +33 îÅÄÏÐÕÓÔÉÍÏÅ ÚÎÁÞÅÎÉÅ ÞÉÓÌÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ +$ ERANGE +34 óÌÉÛËÏÍ ÂÏÌØÛÏÊ ÒÅÚÕÌØÔÁÔ +$ EAGAIN, EWOULDBLOCK +35 òÅÓÕÒÓ ×ÒÅÍÅÎÎÏ ÎÅÄÏÓÔÕÐÅÎ +$ EINPROGRESS +36 ïÐÅÒÁÃÉÑ × ÐÒÏÃÅÓÓÅ ×ÙÐÏÌÎÅÎÉÑ +$ EALREADY +$ XXX??? +37 ïÐÅÒÁÃÉÑ ÕÖÅ ×ÙÐÏÌÎÑÅÔÓÑ +$ ENOTSOCK +38 ïÐÅÒÁÃÉÑ Ó ÓÏËÅÔÏÍ ÐÒÉÍÅÎÅÎÁ ÎÅ Ë ÓÏËÅÔÕ +$ EDESTADDRREQ +39 ôÒÅÂÕÅÔÓÑ ÃÅÌÅ×ÏÊ ÁÄÒÅÓ +$ EMSGSIZE +40 óÌÉÛËÏÍ ÄÌÉÎÎÏÅ ÓÏÏÂÝÅÎÉÅ +$ EPROTOTYPE +41 îÅ×ÅÒÎÙÊ ÔÉÐ ÐÒÏÔÏËÏÌÁ ÄÌÑ ÓÏËÅÔÁ +$ ENOPROTOOPT +42 ðÒÏÔÏËÏÌ ÎÅÄÏÓÔÕÐÅÎ +$ EPROTONOSUPPORT +43 ðÒÏÔÏËÏÌ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ +$ ESOCKTNOSUPPORT +44 üÔÏÔ ÔÉÐ ÓÏËÅÔÁ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ +$ EOPNOTSUPP +45 ïÐÅÒÁÃÉÑ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ +$ EPFNOSUPPORT +46 óÅÍÅÊÓÔ×Ï ÐÒÏÔÏËÏÌÏ× ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ +$ EAFNOSUPPORT +47 óÅÍÅÊÓÔ×Ï ÁÄÒÅÓÏ× ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÓÅÍÅÊÓÔ×ÏÍ ÐÒÏÔÏËÏÌÏ× +$ EADDRINUSE +48 áÄÒÅÓ ÕÖÅ ÉÓÐÏÌØÚÕÅÔÓÑ +$ EADDRNOTAVAIL +49 îÅ ÍÏÇÕ ÎÁÚÎÁÞÉÔØ ÕËÁÚÁÎÎÙÊ ÁÄÒÅÓ +$ ENETDOWN +50 óÅÔØ ÎÅ ÒÁÂÏÔÁÅÔ +$ ENETUNREACH +51 óÅÔØ ÎÅÄÏÓÔÉÖÉÍÁ +$ ENETRESET +52 óÅÔØ ÚÁËÒÙÌÁ ÐÏÄËÌÀÞÅÎÉÅ ÐÒÉ ÓÂÒÏÓÅ +$ ECONNABORTED +53 ðÒÏÇÒÁÍÍÁ ×ÙÚ×ÁÌÁ Á×ÁÒÉÊÎÏÅ ÐÒÅËÒÁÝÅÎÉÅ ÐÏÄËÌÀÞÅÎÉÑ +$ ECONNRESET +54 ðÏÄËÌÀÞÅÎÉÅ ÓÂÒÏÛÅÎÏ ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÊ ÓÔÏÒÏÎÏÊ +$ ENOBUFS +55 îÅ ÏÓÔÁÌÏÓØ ÍÅÓÔÁ ÐÏÄ ÂÕÆÅÒ +$ EISCONN +56 óÏËÅÔ ÕÖÅ ÐÏÄËÌÀÞÅÎ +$ ENOTCONN +57 óÏËÅÔ ÎÅ ÐÏÄËÌÀÞÅÎ +$ ESHUTDOWN +58 îÅ ÍÏÇÕ ÐÏÓÌÁÔØ ÐÏÓÌÅ ÚÁËÒÙÔÉÑ ÓÏËÅÔÁ +$ ETOOMANYREFS +59 óÌÉÛËÏÍ ÍÎÏÇÏ ÓÓÙÌÏË: ÎÅ ÍÏÇÕ ÓÏÅÄÉÎÉÔØ +$ ETIMEDOUT +60 ïÐÅÒÁÃÉÑ ÐÒÅ×ÙÓÉÌÁ ÌÉÍÉÔ ×ÒÅÍÅÎÉ +$ ECONNREFUSED +61 ðÏÄËÌÀÞÅÎÉÅ ÏÔ×ÅÒÇÎÕÔÏ +$ ELOOP +62 óÌÉÛËÏÍ ÍÎÏÇÏ ÕÒÏ×ÎÅÊ ÓÉÍ×ÏÌØÎÙÈ ÓÓÙÌÏË +$ ENAMETOOLONG +63 óÌÉÛËÏÍ ÄÌÉÎÎÏÅ ÉÍÑ ÆÁÊÌÁ +$ EHOSTDOWN +64 èÏÓÔ ÎÅ ÒÁÂÏÔÁÅÔ +$ EHOSTUNREACH +65 îÅÔ ÍÁÒÛÒÕÔÁ Ë ÈÏÓÔÕ +$ ENOTEMPTY +66 ëÁÔÁÌÏÇ ÎÅ ÐÕÓÔ +$ EPROCLIM +67 óÌÉÛËÏÍ ÍÎÏÇÏ ÐÒÏÃÅÓÓÏ× +$ EUSERS +68 óÌÉÛËÏÍ ÍÎÏÇÏ ÐÏÌØÚÏ×ÁÔÅÌÅÊ +$ EDQUOT +69 ðÒÅ×ÚÏÊÄÅÎÁ ÄÉÓËÏ×ÁÑ Ë×ÏÔÁ +$ ESTALE +70 õÓÔÁÒÅ×ÛÉÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ NFS +$ EREMOTE +71 óÌÉÛËÏÍ ÍÎÏÇÏ ÄÉÓÔÁÎÃÉÏÎÎÙÈ ÐÅÒÅÈÏÄÏ× × ÐÕÔÉ +$ EBADRPC +72 îÅËÏÒÒÅËÔÎÁÑ ÓÔÒÕËÔÕÒÁ RPC +$ ERPCMISMATCH +73 îÅ×ÅÒÎÁÑ ×ÅÒÓÉÑ RPC +$ EPROGUNAVAIL +74 ðÒÏÇÒÁÍÍÁ RPC ÎÅÄÏÓÔÕÐÎÁ +$ EPROGMISMATCH +75 îÅ×ÅÒÎÁÑ ×ÅÒÓÉÑ ÐÒÏÇÒÁÍÍÙ +$ EPROCUNAVAIL +76 îÅËÏÒÒÅËÔÎÁÑ ÐÒÏÃÅÄÕÒÁ ÄÌÑ ÐÒÏÇÒÁÍÍÙ +$ ENOLCK +77 âÌÏËÉÒÏ×ËÉ ÎÅÄÏÓÔÕÐÎÙ +$ ENOSYS +78 æÕÎËÃÉÑ ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁ +$ EFTYPE +79 îÅÐÏÄÈÏÄÑÝÉÊ ÔÉÐ ÉÌÉ ÆÏÒÍÁÔ ÆÁÊÌÁ +$ EAUTH +80 ïÛÉÂËÁ ÁÕÔÅÎÔÉÆÉËÁÃÉÉ +$ ENEEDAUTH +81 îÅÏÂÈÏÄÉÍÏ ÕÄÏÓÔÏ×ÅÒÅÎÉÅ +$ EIDRM +82 éÄÅÎÔÉÆÉËÁÔÏÒ ÕÄÁÌÅÎ +$ ENOMSG +83 îÅÔ ÓÏÏÂÝÅÎÉÑ ÔÒÅÂÕÅÍÏÇÏ ÔÉÐÁ +$ EOVERFLOW +84 óÌÉÛËÏÍ ÂÏÌØÛÏÅ ÚÎÁÞÅÎÉÅ ÄÌÑ ÈÒÁÎÅÎÉÑ × ÕËÁÚÁÎÎÏÍ ÔÉÐÅ ÄÁÎÎÙÈ +$ ECANCELED +85 ïÐÅÒÁÃÉÑ ÏÔÍÅÎÅÎÁ +$ EILSEQ +86 îÅÄÏÐÕÓÔÉÍÁÑ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ ÂÁÊÔÏ× +$ ENOATTR +87 áÔÒÉÂÕÔ ÎÅ ÎÁÊÄÅÎ +$ EDOOFUS +88 ïÛÉÂËÁ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ +$ EBADMSG +89 ðÌÏÈÏÊ ÆÏÒÍÁÔ ÓÏÏÂÝÅÎÉÑ +$ EMULTIHOP +90 ðÏÐÙÔËÁ ÍÕÌØÔÉÈÏÐÁ +$ ENOLINK +91 ëÁÎÁÌ ÒÁÚÏÒ×ÁÎ +$ EPROTO +92 ïÛÉÂËÁ ÐÒÏÔÏËÏÌÁ +$ ENOTCAPABLE +93 îÅÄÏÓÔÁÔÏÞÎÏ ×ÏÚÍÏÖÎÏÓÔÅÊ +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +$ XXX: ïÔËÌÀÞÅÎÉÅ? +1 òÁÚÒÙ× Ó×ÑÚÉ +$ SIGINT +2 ðÒÅÒÙ×ÁÎÉÅ ÐÏ ÓÉÇÎÁÌÕ +$ SIGQUIT +3 ÷ÙÈÏÄ +$ SIGILL +4 îÅÄÏÐÕÓÔÉÍÁÑ ÉÎÓÔÒÕËÃÉÑ +$ SIGTRAP +5 ìÏ×ÕÛËÁ ÔÒÁÓÓÉÒÏ×ËÉ/ÔÏÞËÉ ÏÓÔÁÎÏ×Á +$ SIGABRT +$ XXX: á×ÁÒÉÊÎÏÅ ÚÁ×ÅÒÛÅÎÉÅ +6 ìÏ×ÕÛËÁ Á×ÁÒÉÊÎÏÇÏ ÐÒÅËÒÁÝÅÎÉÑ +$ SIGEMT +7 ìÏ×ÕÛËÁ EMT +$ SIGFPE +$ XXX: ïÛÉÂËÁ ÏÐÅÒÁÃÉÉ Ó ÐÌÁ×ÁÀÝÅÊ ÔÏÞËÏÊ? +8 ïÛÉÂËÁ ÐÒÉ ÒÁÂÏÔÅ Ó ×ÅÝÅÓÔ×ÅÎÎÙÍ ÞÉÓÌÏÍ +$ SIGKILL +$ XXX: õÂÉÔ +9 ðÒÉÎÕÄÉÔÅÌØÎÏ ÐÒÅËÒÁÝÅÎ +$ SIGBUS +$ XXX: ïÛÉÂËÁ ÁÄÒÅÓÁÃÉÉ ÎÁ ÛÉÎÅ +10 ïÛÉÂËÁ ÛÉÎÙ +$ SIGSEGV +11 ïÛÉÂËÁ ÓÅÇÍÅÎÔÁÃÉÉ +$ SIGSYS +12 îÅÄÏÐÕÓÔÉÍÙÊ ÓÉÓÔÅÍÎÙÊ ×ÙÚÏ× +$ SIGPIPE +13 ëÁÎÁÌ ÒÁÚÒÕÛÅÎ +$ SIGALRM +14 óÒÁÂÏÔÁÌ ÔÁÊÍÅÒ +$ SIGTERM +15 úÁ×ÅÒÛÅÎ +$ SIGURG +16 îÅÏÂÈÏÄÉÍ ÓÒÏÞÎÙÊ ××ÏÄ-×Ù×ÏÄ +$ SIGSTOP +17 ðÒÉÏÓÔÁÎÏ×ËÁ (ÓÉÇÎÁÌ) +$ SIGTSTP +18 ðÒÉÏÓÔÁÎÏ×ËÁ +$ SIGCONT +19 ðÒÏÄÏÌÖÅÎÉÅ ÒÁÂÏÔÙ +$ SIGCHLD +20 úÁ×ÅÒÛÅÎÁ ÒÁÂÏÔÁ ÐÏÒÏÖÄÅÎÎÏÇÏ ÐÒÏÃÅÓÓÁ +$ SIGTTIN +21 ïÓÔÁÎÏ×ÌÅÎ (××ÏÄ Ó ÔÅÒÍÉÎÁÌÁ) +$ SIGTTOU +22 ïÓÔÁÎÏ×ÌÅÎ (×Ù×ÏÄ ÎÁ ÔÅÒÍÉÎÁÌ) +$ SIGIO +23 ÷×ÏÄ-×Ù×ÏÄ ×ÏÚÍÏÖÅÎ +$ SIGXCPU +24 ðÒÅ×ÙÛÅÎÏ ÏÇÒÁÎÉÞÅÎÉÅ ÐÒÏÃÅÓÓÏÒÎÏÇÏ ×ÒÅÍÅÎÉ +$ SIGXFSZ +25 ðÒÅ×ÙÛÅÎ ÍÁËÓÉÍÁÌØÎÙÊ ÒÁÚÍÅÒ ÆÁÊÌÁ +$ SIGVTALRM +26 éÓÔÅË ×ÉÒÔÕÁÌØÎÙÊ ÔÁÊÍÅÒ +$ SIGPROF +27 éÓÔÅË ÔÁÊÍÅÒ ÐÒÏÆÉÌÉÒÏ×ÁÎÉÑ +$ SIGWINCH +28 éÚÍÅÎÅÎÉÅ ÒÁÚÍÅÒÁ ÏËÎÁ +$ SIGINFO +29 úÁÐÒÏÓ ÉÎÆÏÒÍÁÃÉÉ +$ SIGUSR1 +30 ðÏÌØÚÏ×ÁÔÅÌØÓËÉÊ ÓÉÇÎÁÌ 1 +$ SIGUSR2 +31 ðÏÌØÚÏ×ÁÔÅÌØÓËÉÊ ÓÉÇÎÁÌ 2 diff --git a/lib/libc/nls/sk_SK.ISO8859-2.msg b/lib/libc/nls/sk_SK.ISO8859-2.msg new file mode 100644 index 0000000000..f2ae60f683 --- /dev/null +++ b/lib/libc/nls/sk_SK.ISO8859-2.msg @@ -0,0 +1,267 @@ +$ $FreeBSD: head/lib/libc/nls/sk_SK.ISO8859-2.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for sk_SK.ISO8859-2 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Operácia nie je povolená +$ ENOENT +2 Neexistujúci súbor alebo adresár +$ ESRCH +3 Proces neexistuje +$ EINTR +4 Systémové volanie preru¹ené +$ EIO +5 Chyba vstupu/výstupu +$ ENXIO +6 Zariadenie nie je nakonfigurované +$ E2BIG +7 Príli¹ dlhý zoznam argumentov +$ ENOEXEC +8 Chybný formát spusteného súboru +$ EBADF +9 Chybný deskriptor súboru +$ ECHILD +10 Neexistuje ¾iaden potomok procesu +$ EDEADLK +11 Bolo zabránené zablokovaniu prostriedku +$ ENOMEM +12 Nie je mo¾né prideli» pamä» +$ EACCES +13 Prístup odmietnutý +$ EFAULT +14 Chybná adresa +$ ENOTBLK +15 Vy¾adované blokové zariadenie +$ EBUSY +16 Zariadenie je pou¾ívané +$ EEXIST +17 Súbor existuje +$ EXDEV +18 Odkaz medzi zariadeniami +$ ENODEV +19 Operácia nie je zariadením podporovaná +$ ENOTDIR +20 Nie je adresár +$ EISDIR +21 Je adresár +$ EINVAL +22 Chybný argument +$ ENFILE +23 Priveµa otvorených súborov v systéme +$ EMFILE +24 Priveµa otvorených súborov +$ ENOTTY +25 Nevhodné ioctl pre dané zariadenie +$ ETXTBSY +26 Textový súbor je pou¾ívaný +$ EFBIG +27 Súbor je príli¹ veµký +$ ENOSPC +28 Na zariadení nie je voµné miesto +$ ESPIPE +29 Neprípustné nastavenie pozície +$ EROFS +30 Súborový systém je len na èítanie +$ EMLINK +31 Priveµa odkazov +$ EPIPE +32 Preru¹ená rúra +$ EDOM +33 Èíselný argument mimo definièný obor +$ ERANGE +34 Výsledok príli¹ veµký alebo príli¹ malý +$ EAGAIN, EWOULDBLOCK +35 Zdroj je doèasne nedostupný +$ EINPROGRESS +36 Operácia práve prebieha +$ EALREADY +37 Operácia u¾ prebieha +$ ENOTSOCK +38 Socketová operácia na objekte, ktorý nie je socket +$ EDESTADDRREQ +39 Vy¾adovaná cieµová adresa +$ EMSGSIZE +40 Príli¹ dlhá správa +$ EPROTOTYPE +41 Protokol nie je socketom podporovaný +$ ENOPROTOOPT +42 Protokol nie je k dispozícii +$ EPROTONOSUPPORT +43 Protokol nie je podporovaný +$ ESOCKTNOSUPPORT +44 Typ socketu nie je podporovaný +$ EOPNOTSUPP +45 Operácia nie je podporovaná +$ EPFNOSUPPORT +46 Rodina protokolov nie je podporovaná +$ EAFNOSUPPORT +47 Rodina adries nie je podporovaná rodinou protokolov +$ EADDRINUSE +48 Adresa je u¾ pou¾ívaná +$ EADDRNOTAVAIL +49 Nie je mo¾né prideli» po¾adovanú adresu +$ ENETDOWN +50 Sie» je nefunkèná +$ ENETUNREACH +51 Sie» je nedostupná +$ ENETRESET +52 Sie» zru¹ila spojenie po resete +$ ECONNABORTED +53 Program spôsobil ukonèenie spojenia +$ ECONNRESET +54 Spojenie zru¹ené druhou stranou +$ ENOBUFS +55 Vyrovnávacia pamä» nie je k dispozícii +$ EISCONN +56 Socket je u¾ pripojený +$ ENOTCONN +57 Socket nie je pripojený +$ ESHUTDOWN +58 Nie je mo¾né posiela» po uzavretí socketu +$ ETOOMANYREFS +59 Príli¹ mnoho odkazov: nie je mo¾né spoji» +$ ETIMEDOUT +60 Èasový limit pre spojenie vypr¹al +$ ECONNREFUSED +61 Spojenie odmietnuté +$ ELOOP +62 Priveµa úrovní symbolických odkazov +$ ENAMETOOLONG +63 Meno súboru príli¹ dlhé +$ EHOSTDOWN +64 Vzdialený uzol je odpojený +$ EHOSTUNREACH +65 Neexistuje cesta k vzdialenému uzlu +$ ENOTEMPTY +66 Adresár nie je prázdny +$ EPROCLIM +67 Priveµa procesov +$ EUSERS +68 Priveµa pou¾ívateµov +$ EDQUOT +69 Disková kvóta prekroèená +$ ESTALE +70 Zastaralý NFS súborový ukazateµ +$ EREMOTE +71 Priveµa úrovní vzdialeného v ceste +$ EBADRPC +72 RPC ¹truktúra je chybná +$ ERPCMISMATCH +73 Chybná verzia RPC +$ EPROGUNAVAIL +74 RPC program nie je k dispozícii +$ EPROGMISMATCH +75 Chybná verzia RPC programu +$ EPROCUNAVAIL +76 Chybná RPC procedúra pre program +$ ENOLCK +77 Zámky nie sú k dispozícii +$ ENOSYS +78 Funkcia nie je implementovaná +$ EFTYPE +79 Nevhodný typ alebo formát súboru +$ EAUTH +80 Overenie práv neúspe¹né +$ ENEEDAUTH +81 Vy¾adovaný overovací objekt +$ EIDRM +82 Identifikátor odstránený +$ ENOMSG +83 Neexistuje správa ¾elaného typu +$ EOVERFLOW +84 Hodnota je pre daný dátový typ priveµká +$ EILSEQ +85 Neprípustná postupnos» bajtov +$ ENOTSUP +86 Nie je podporované +$ ECANCELED +87 Operácia zru¹ená +$ EBADMSG +88 Chybná alebo poru¹ená správa +$ ENODATA +89 ®iadna správa nie je k dispozícii +$ ENOSR +90 ®iadne STREAM zdroje +$ ENOSTR +91 Nie je STREAM +$ ETIME +92 Èasový limit pre STREAM ioctl vypr¹al +$ ENOATTR +93 Atribút nenájdený +$ EMULTIHOP +94 Pokus o spojenie cez viacero uzlov +$ ENOLINK +95 Odkaz bol pretrhnutý +$ EPROTO +96 Chyba protokolu +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Terminál odpojený +$ SIGINT +2 Preru¹enie +$ SIGQUIT +3 Koniec +$ SIGILL +4 Chybná in¹trukcia +$ SIGTRAP +5 Trasovacia/ladiaca in¹trukcia +$ SIGABRT +6 Násilné ukonèenie +$ SIGEMT +7 Emulovaná in¹trukcia +$ SIGFPE +8 Výnimka pohyblivej rádovej èiarky +$ SIGKILL +9 Zabité +$ SIGBUS +10 Chyba na zbernici +$ SIGSEGV +11 Chyba segmentácie +$ SIGSYS +12 Chybné systémové volanie +$ SIGPIPE +13 Preru¹ená rúra +$ SIGALRM +14 Budík +$ SIGTERM +15 Ukonèené +$ SIGURG +16 Naliehavý vstupný/výstupný stav +$ SIGSTOP +17 Pozastavené (signál) +$ SIGTSTP +18 Pozastavené +$ SIGCONT +19 Pokraèovanie +$ SIGCHLD +20 Potomok procesu ukonèený +$ SIGTTIN +21 Pozastavené (terminálový vstup) +$ SIGTTOU +22 Pozastavené (terminálový výstup) +$ SIGIO +23 Vstup/výstup mo¾ný +$ SIGXCPU +24 Prekroèený èasový limit pre procesor +$ SIGXFSZ +25 Prekroèený limit veµkosti súboru +$ SIGVTALRM +26 Vypr¹al virtuálny èasovaè +$ SIGPROF +27 Vypr¹al profilovací èasovaè +$ SIGWINCH +28 Veµkos» okna zmenená +$ SIGINFO +29 ®iados» o informáciu +$ SIGUSR1 +30 Pou¾ívateµom definovaný signál 1 +$ SIGUSR2 +31 Pou¾ívateµom definovaný signál 2 +$ SIGPWR +32 Zlyhanie/opakované spustenie napájania diff --git a/lib/libc/nls/sv_SE.ISO8859-1.msg b/lib/libc/nls/sv_SE.ISO8859-1.msg new file mode 100644 index 0000000000..21b656437a --- /dev/null +++ b/lib/libc/nls/sv_SE.ISO8859-1.msg @@ -0,0 +1,233 @@ +$ $FreeBSD: head/lib/libc/nls/sv_SE.ISO8859-1.msg 189765 2009-03-13 10:40:38Z gabor $ +$ +$ Message catalog for sv_SE.ISO8859-1 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Otillåten operation +$ ENOENT +2 Filen eller katalogen finns ej +$ ESRCH +3 Denna process finns ej +$ EINTR +4 Avbrutet systemanrop +$ EIO +5 In-/utmatningsfel +$ ENXIO +6 Enheten är ej konfigurerad +$ E2BIG +7 Argumentlistan är för lång +$ ENOEXEC +8 Ej körbar fil +$ EBADF +9 Felaktigt filhandtag +$ ECHILD +10 Inga barnprocesser +$ EDEADLK +11 Undvek resursdödläge +$ ENOMEM +12 Kan ej erhålla minne +$ EACCES +13 Tillstånd nekas +$ EFAULT +14 Felaktig adress +$ ENOTBLK +15 Blockenhet krävs +$ EBUSY +16 Enheten är upptagen +$ EEXIST +17 Filen finns redan +$ EXDEV +18 Länken korsar enheter +$ ENODEV +19 Enheten stöder ej operationen +$ ENOTDIR +20 Är ej en katalog +$ EISDIR +21 Är en katalog +$ EINVAL +22 Ogiltigt argument +$ ENFILE +23 För många öppna filer i systemet +$ EMFILE +24 För många öppna filer +$ ENOTTY +25 Olämplig ioctl för enheten +$ ETXTBSY +26 Programfilen är upptagen +$ EFBIG +27 Filen är för stor +$ ENOSPC +28 Inget utrymme kvar på enheten +$ ESPIPE +29 Otillåten sökning +$ EROFS +30 Skrivskyddat filsystem +$ EMLINK +31 För många länkar +$ EPIPE +32 Avbruten kommunikationskanal +$ EDOM +33 Numeriskt argument utanför domänen +$ ERANGE +34 Resultatet är för stort +$ EAGAIN, EWOULDBLOCK +35 Resursen är tillfälligt otillgänglig +$ EINPROGRESS +36 Operationen är igång +$ EALREADY +37 Operationen är redan igång +$ ENOTSOCK +38 Sockeloperation på icke-sockel +$ EDESTADDRREQ +39 Destinationsadress erfordras +$ EMSGSIZE +40 För långt meddelande +$ EPROTOTYPE +41 Fel protokolltyp för sockeln +$ ENOPROTOOPT +42 Protokollet otillgängligt +$ EPROTONOSUPPORT +43 Protokollet är ej understött +$ ESOCKTNOSUPPORT +44 Sockeltypen är ej understödd +$ EOPNOTSUPP +45 Operationen är ej understödd +$ EPFNOSUPPORT +46 Protokollfamiljen är ej understödd +$ EAFNOSUPPORT +47 Adressfamiljen är ej understödd av protokollfamiljen +$ EADDRINUSE +48 Adressen är upptagen +$ EADDRNOTAVAIL +49 Kan ej tilldela den begärda adressen +$ ENETDOWN +50 Nätverket fungerar inte +$ ENETUNREACH +51 Nätverket är ej kontaktbart +$ ENETRESET +52 Nätverket tappade kontakten vid återställningen +$ ECONNABORTED +53 Mjukvara orsakade nedkoppling +$ ECONNRESET +54 Motparten avbröt uppkopplingen +$ ENOBUFS +55 Inget buffertutrymme tillgängligt +$ EISCONN +56 Sockeln är redan uppkopplad +$ ENOTCONN +57 Sockeln är ej uppkopplad +$ ESHUTDOWN +58 Kan ej sända efter att sockeln nedkopplats +$ ETOOMANYREFS +59 För många referenser: kan inte delas +$ ETIMEDOUT +60 Uppkopplingstiden tog slut +$ ECONNREFUSED +61 Uppkopplingen nekad +$ ELOOP +62 För många nivåer av symboliska länkar +$ ENAMETOOLONG +63 Alldeles för långt filnamn +$ EHOSTDOWN +64 Värddatorn är nere +$ EHOSTUNREACH +65 Väg till värddatorn saknas +$ ENOTEMPTY +66 Katalogen ej tom +$ EPROCLIM +67 För många processer +$ EUSERS +68 För många användare +$ EDQUOT +69 Diskkvot överskriden +$ ESTALE +70 Inaktuellt NFS-filhandtag +$ EREMOTE +71 För många fjärrnivåer i sökvägen +$ EBADRPC +72 Felaktig RPC-struktur +$ ERPCMISMATCH +73 Felaktig RPC-version +$ EPROGUNAVAIL +74 RPC-programmet otillgängligt +$ EPROGMISMATCH +75 Fel programversion +$ EPROCUNAVAIL +76 Felaktig procedur för programmet +$ ENOLCK +77 Inga lås tillgängliga +$ ENOSYS +78 Funktionen är ej implementerad +$ EFTYPE +79 Olämplig filtyp eller format +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Lägg på +$ SIGINT +2 Avbryt +$ SIGQUIT +3 Avsluta +$ SIGILL +4 Olaglig instruktion +$ SIGTRAP +5 Spår- eller brytpunktsfälla +$ SIGABRT +6 Avslutsfälla +$ SIGEMT +7 Emuleringsfälla +$ SIGFPE +8 Flyttalsavbrott +$ SIGKILL +9 Dräpt +$ SIGBUS +10 Bussfel +$ SIGSEGV +11 Segmentfel +$ SIGSYS +12 Felaktigt systemanrop +$ SIGPIPE +13 Avbruten kommunikationskanal +$ SIGALRM +14 Äggklocka +$ SIGTERM +15 Terminerad +$ SIGURG +16 Brådskande In/Ut-tillstånd +$ SIGSTOP +17 Stoppad (signal) +$ SIGTSTP +18 Stoppad +$ SIGCONT +19 Fortsätter +$ SIGCHLD +20 Barn avslutat +$ SIGTTIN +21 Stoppad (terminalinmatning) +$ SIGTTOU +22 Stoppad (terminalutmatning) +$ SIGIO +23 In- och utmatning möjlig +$ SIGXCPU +24 Cputidsgränsen överskriden +$ SIGXFSZ +25 Filstorleksgränsen överskriden +$ SIGVTALRM +26 Virtuella äggklockan ringde +$ SIGPROF +27 Profileringsäggklockan ringde +$ SIGWINCH +28 Fönsterstorleken ändras +$ SIGINFO +29 Informationsförfrågan +$ SIGUSR1 +30 Användardefinierad signal 1 +$ SIGUSR2 +31 Användardefinierad signal 2 +$ SIGPWR +32 Kraftbortfall/omstart diff --git a/lib/libc/nls/uk_UA.UTF-8.msg b/lib/libc/nls/uk_UA.UTF-8.msg new file mode 100644 index 0000000000..37c7359bd5 --- /dev/null +++ b/lib/libc/nls/uk_UA.UTF-8.msg @@ -0,0 +1,259 @@ +$ $FreeBSD: head/lib/libc/nls/uk_UA.UTF-8.msg 199044 2009-11-08 11:55:03Z gabor $ +$ +$ Message catalog for uk_UA.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 Операція не дозволена +$ ENOENT +2 Немає такого файлу або каталогу +$ ESRCH +3 Немає такого процесу +$ EINTR +4 Перервано виклик функції +$ EIO +5 Помилка вводу-виводу +$ ENXIO +6 Немає такого пристрою або адреси +$ E2BIG +7 Перелік аргументів надто довгий +$ ENOEXEC +8 Помилка формату виконуваного файлу +$ EBADF +9 Невірний дескриптор файлу +$ ECHILD +10 Немає дочірнього процесу +$ EDEADLK +11 Уникнуто взаємне блокування ресурсів +$ ENOMEM +12 Не достатньо пам'яті +$ EACCES +13 Відмова у доступі +$ EFAULT +14 Невірна адреса +$ ENOTBLK +15 Потрібен блочний пристрій +$ EBUSY +16 Ресурс зайнятий +$ EEXIST +17 Файл вже існує +$ EXDEV +18 Посилання за межі пристрою +$ ENODEV +19 Немає такого пристрою +$ ENOTDIR +20 Це не каталог +$ EISDIR +21 Це каталог +$ EINVAL +22 Недозволений аргумент +$ ENFILE +23 Забагато відкритих файлів у системі +$ EMFILE +24 Забагато відкритих файлів +$ ENOTTY +25 Це не термінал +$ ETXTBSY +26 Текстовий файл зайнятий +$ EFBIG +27 Файл надто великий +$ ENOSPC +28 Не залишилось місця на пристрої +$ ESPIPE +29 Недозволене позиціонування +$ EROFS +30 Файлова система лише для читання +$ EMLINK +31 Забагато посилань +$ EPIPE +32 Канал зруйновано +$ EDOM +33 Помилка області визначення +$ ERANGE +34 Результат надто великий +$ EAGAIN, EWOULDBLOCK +35 Ресурс тимчасово не доступний +$ EINPROGRESS +36 Операція у процесі виконання +$ EALREADY +37 Операція вже виконується +$ ENOTSOCK +38 Це не сокет +$ EDESTADDRREQ +39 Необхідна адреса призначення +$ EMSGSIZE +40 Повідомлення надто довге +$ EPROTOTYPE +41 Помилковий тип протоколу для сокету +$ ENOPROTOOPT +42 Немає такого протоколу +$ EPROTONOSUPPORT +43 Протокол не підтримується +$ ESOCKTNOSUPPORT +44 Цей тип сокету не підтримується +$ EOPNOTSUPP +45 Операція не підтримується +$ EPFNOSUPPORT +46 Родина протоколів не підтримується +$ EAFNOSUPPORT +47 Родина адрес не підтримується протоколом +$ EADDRINUSE +48 Адреса вже використовується +$ EADDRNOTAVAIL +49 Адреса недосяжна +$ ENETDOWN +50 Мережа не працює +$ ENETUNREACH +51 Мережа недосяжна +$ ENETRESET +52 З'єднання припинено мережею +$ ECONNABORTED +53 З'єднання припинено +$ ECONNRESET +54 З'єднання припинено протилежною стороною +$ ENOBUFS +55 Немає вільних буферів +$ EISCONN +56 Сокет вже під'єднано +$ ENOTCONN +57 Сокет не під'єднано +$ ESHUTDOWN +58 Не можу відіслати після закриття сокету протилежною стороною +$ ETOOMANYREFS +59 Забагато посилань: не можу з'єднати +$ ETIMEDOUT +60 Вийшов ліміт часу для з'єднання +$ ECONNREFUSED +61 Відмова у з'єднанні +$ ELOOP +62 Забагато рівнів символічних посилань +$ ENAMETOOLONG +63 Ім'я файлу надто довге +$ EHOSTDOWN +64 Хост не працює +$ EHOSTUNREACH +65 Хост недосяжний +$ ENOTEMPTY +66 Каталог не порожній +$ EPROCLIM +67 Забагато процесів +$ EUSERS +68 Забагато користувачів +$ EDQUOT +69 Перевищена дискова квота +$ ESTALE +70 Застарілий дескриптор файлу NFS +$ EREMOTE +71 Віддалений об'єкт +$ EBADRPC +72 Погана структура RPC +$ ERPCMISMATCH +73 Невірна версія RPC +$ EPROGUNAVAIL +74 Програма RPC недосяжна +$ EPROGMISMATCH +75 Невірна версія програми +$ EPROCUNAVAIL +76 Погана процедура для програми +$ ENOLCK +77 Блокування не доступне +$ ENOSYS +78 Функцію не реалізовано +$ EFTYPE +79 Непридатний тип чи формат файлу +$ EAUTH +80 Помилка аутентифікації +$ ENEEDAUTH +81 Потрібна аутентифікація +$ EIDRM +82 Ідентифікатор вилучено +$ ENOMSG +83 Немає повідомлення бажаного типу +$ EOVERFLOW +84 Завелике значення для цього типу даних +$ ECANCELED +85 Операцію скасовано +$ EILSEQ +86 Недозволена послідовність байтів +$ ENOATTR +87 Атрибут не знайдено +$ EDOOFUS +88 Помилка програмування +$ EBADMSG +89 Поганий формат повідомлення +$ EMULTIHOP XXX +90 Спроба мултіхопу +$ ENOLINK +91 Мережовий канал розірвано +$ EPROTO +92 Помилка протоколу +$ ENOTCAPABLE +93 Можливості недостатні +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 Відключення +$ SIGINT +2 Переривання +$ SIGQUIT +3 Вихід +$ SIGILL +4 Неприпустима інструкція +$ SIGTRAP +5 Пастка трасування +$ SIGABRT +6 Аварійне завершення +$ SIGEMT +7 Перехоплення емульованої інструкції +$ SIGFPE +8 Помилка роботи з плаваючою крапкою +$ SIGKILL +9 Вбито +$ SIGBUS +10 Помилка шини +$ SIGSEGV +11 Порушення сегментації +$ SIGSYS +12 Поганий системний виклик +$ SIGPIPE +13 Канал зруйновано +$ SIGALRM +14 Таймер вичерпано +$ SIGTERM +15 Завершення +$ SIGURG +16 Невідкладний стан на сокеті +$ SIGSTOP +17 Призупинено (сигнал) +$ SIGTSTP +18 Призупинено +$ SIGCONT +19 Продовження роботи +$ SIGCHLD +20 Зміна статусу дочірнього процесу +$ SIGTTIN +21 Зупинено (ввід з терміналу) +$ SIGTTOU +22 Зупинено (вивід на термінал) +$ SIGIO +23 Ввід-вивід можливий +$ SIGXCPU +24 Перевищено ліміт процесорного часу +$ SIGXFSZ +25 Перевищено ліміт максимального розміру файла +$ SIGVTALRM +26 Віртуальний таймер вичерпано +$ SIGPROF +27 Таймер профілювання вичерпано +$ SIGWINCH +28 Розмір вікна змінено +$ SIGINFO +29 Запит інформації +$ SIGUSR1 +30 Сигнал користувача 1 +$ SIGUSR2 +31 Сигнал користувача 2 diff --git a/lib/libc/nls/zh_CN.GB18030.msg b/lib/libc/nls/zh_CN.GB18030.msg new file mode 100644 index 0000000000..f03386185e --- /dev/null +++ b/lib/libc/nls/zh_CN.GB18030.msg @@ -0,0 +1,297 @@ +$ $FreeBSD: head/lib/libc/nls/zh_CN.GB18030.msg 244757 2012-12-28 01:23:12Z delphij $ +$ +$ Message catalog for zh_CN.GB18030 locale +$ +$ Derived from FreeBSD: head/lib/libc/nls/zh_CN.UTF-8.msg 244756 2012-12-28 01:09:30Z delphij +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 ²»ÔÊÐíµÄ²Ù×÷ +$ ENOENT +2 Îļþ»òĿ¼²»´æÔÚ +$ ESRCH +3 ½ø³Ì²»´æÔÚ +$ EINTR +4 ϵͳµ÷ÓÃÖÐÖ¹ +$ EIO +5 ÊäÈë/Êä³ö´íÎó +$ ENXIO +6 δÅäÖõÄÉ豸 +$ E2BIG +7 ²ÎÊý±í¹ý³¤ +$ ENOEXEC +8 ¿ÉÖ´ÐÐÎļþ¸ñʽ´íÎó +$ EBADF +9 ÎļþÃèÊö·ûÎÞЧ +$ ECHILD +10 Ö¸¶¨×Ó½ø³Ì²»´æÔÚ +$ EDEADLK +11 ´Ë²Ù×÷»áµ¼ÖÂËÀËø +$ ENOMEM +12 ÎÞ·¨·ÖÅäÄÚ´æ +$ EACCES +13 ¾Ü¾ø·ÃÎÊ +$ EFAULT +14 ÎÞЧµØÖ· +$ ENOTBLK +15 ¸Ã²Ù×÷ÐèÒª¿éÉ豸 +$ EBUSY +16 É豸ʹÓÃÖÐ +$ EEXIST +17 ÎļþÒÑ´æÔÚ +$ EXDEV +18 Á´½Ó¿çÉ豸 +$ ENODEV +19 É豸²»Ö§³Ö´Ë²Ù×÷ +$ ENOTDIR +20 ¶ÔÏó·ÇĿ¼ +$ EISDIR +21 ¶ÔÏóΪĿ¼ +$ EINVAL +22 ²ÎÊýÎÞЧ +$ ENFILE +23 ϵͳ´ò¿ªÎļþ¹ý¶à +$ EMFILE +24 ½ø³Ì´ò¿ªÎļþ¹ý¶à +$ ENOTTY +25 ÎÞЧÉ豸 ioctl +$ ETXTBSY +26 ¿ÉÖ´ÐÐÎļþæ +$ EFBIG +27 Îļþ¹ý´ó +$ ENOSPC +28 É豸ÎÞ¿ÉÓÿռä +$ ESPIPE +29 ²»ÔÊÐíÖ´ÐÐ seek ²Ù×÷ +$ EROFS +30 Îļþϵͳֻ¶Á +$ EMLINK +31 ÎļþÁ´½Ó¹ý¶à +$ EPIPE +32 ¹ÜµÀÒÑÖÐÖ¹ +$ EDOM +33 ÊýÖµ²ÎÊýÔ½½ç +$ ERANGE +34 ½á¹û¹ý´ó +$ EAGAIN, EWOULDBLOCK +35 ×ÊÔ´ÔÝʱ²»¿ÉÓà +$ EINPROGRESS +36 ²Ù×÷½øÐÐÖÐ +$ EALREADY +37 ²Ù×÷ÒÑ¿ªÊ¼ +$ ENOTSOCK +38 ³¢ÊÔÔÚ·Ç socket ÉÏÖ´ÐÐ socket ²Ù×÷ +$ EDESTADDRREQ +39 ÐèҪĿµÄµØÖ· +$ EMSGSIZE +40 ÏûÏ¢¹ý³¤ +$ EPROTOTYPE +41 socketЭÒéÀàÐÍ´íÎó +$ ENOPROTOOPT +42 ЭÒé²»¿ÉÓà +$ EPROTONOSUPPORT +43 ²»Ö§³ÖµÄЭÒé +$ ESOCKTNOSUPPORT +44 ²»Ö§³ÖµÄ socket ÀàÐÍ +$ EOPNOTSUPP +45 ²»Ö§³ÖµÄ²Ù×÷ +$ EPFNOSUPPORT +46 ²»Ö§³ÖµÄЭÒé×å +$ EAFNOSUPPORT +47 ЭÒé×å²»Ö§³ÖµÄµØÖ·×å +$ EADDRINUSE +48 µØÖ·Òѱ»Õ¼Óà +$ EADDRNOTAVAIL +49 ÎÞ·¨Ö¸¶¨ÇëÇóµÄµØÖ· +$ ENETDOWN +50 ÍøÂçÒÑ¹Ø±Õ +$ ENETUNREACH +51 ÍøÂç²»¿É´ï +$ ENETRESET +52 ¸´Î»µ¼ÖÂÍøÂçÁ¬½Ó¶ªÊ§ +$ ECONNABORTED +53 Èí¼þµ¼ÖµÄÁ¬½ÓÖÐÖ¹ +$ ECONNRESET +54 ¶Ô·½¸´Î»ÁËÁ¬½Ó +$ ENOBUFS +55 »º³åÇø¿Õ¼ä²»×ã +$ EISCONN +56 socket ÒÑÁ¬½Ó +$ ENOTCONN +57 socket δÁ¬½Ó +$ ESHUTDOWN +58 socket shutdown Ö®ºóÎÞ·¨·¢ËÍÊý¾Ý +$ ETOOMANYREFS +59 ÒýÓÃÊý¹ý¶à£ºÎÞ·¨Æ´½Ó +$ ETIMEDOUT +60 ²Ù×÷³¬Ê± +$ ECONNREFUSED +61 ¾Ü¾øÁ¬½Ó +$ ELOOP +62 ·ûºÅÁ´½Ó²ãÊý¹ý¶à +$ ENAMETOOLONG +63 ÎļþÃû¹ý³¤ +$ EHOSTDOWN +64 Ö÷»úÒÑ¹Ø±Õ +$ EHOSTUNREACH +65 ûÓе½Ö÷»úµÄ·ÓÉ +$ ENOTEMPTY +66 Ŀ¼·Ç¿Õ +$ EPROCLIM +67 ½ø³ÌÊý³¬ÏÞ +$ EUSERS +68 Óû§Êý³¬ÏÞ +$ EDQUOT +69 ´ÅÅÌ¿Õ¼äÅä¶î³¬ÏÞ +$ ESTALE +70 NFS Îļþ¾ä±úÒÑʧЧ +$ EREMOTE +71 Ô¶³ÌĿ¼²ãÊý¹ý¶à +$ EBADRPC +72 RPC ½á¹¹ÎÞЧ +$ ERPCMISMATCH +73 RPC °æ±¾´íÎó +$ EPROGUNAVAIL +74 RPC ³ÌÐò²»¿ÉÓà +$ EPROGMISMATCH +75 ³ÌÐò°æ±¾´íÎó +$ EPROCUNAVAIL +76 δÌṩµÄÔ¶³Ìº¯Êý +$ ENOLCK +77 ²»Ö§³ÖËø +$ ENOSYS +78 ¹¦ÄÜδʵÏÖ +$ EFTYPE +79 ÎļþÀàÐÍ»ò¸ñʽÎÞЧ +$ EAUTH +80 Éí·ÝÎÞЧ +$ ENEEDAUTH +81 ÎÞÐÅÈÎƾ¾Ý +$ EIDRM +82 ÎÞ±êʶ·û +$ ENOMSG +83 ÎÞÏûÏ¢ÀàÐÍ +$ EOVERFLOW +84 ÊýÖµÒç³ö +$ ECANCELED +85 ²Ù×÷ÒÑÈ¡Ïû +$ EILSEQ +86 ÎÞЧ×Ö·ûÐòÁÐ +$ ENOATTR +87 ÎÞÀ©Õ¹ÊôÐÔ +$ EDOOFUS +88 ³ÌÐòÉè¼Æ´íÎó +$ EBADMSG +89 ÎÞЧÏûÏ¢ +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 ЭÒé´íÎó +$ ENOTCAPABLE +93 ȨÄܲ»×ã +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 ÖÕ¶ËÏß·¹Ò¶Ï +$ SIGINT +2 ÖÐ¶Ï +$ SIGQUIT +3 Í˳ö +$ SIGILL +4 ÎÞЧָÁî +$ SIGTRAP +5 ¸ú×Ù/BPT ÏÝÚå +$ SIGABRT +6 ÖÕÖ¹ÏÝÚå +$ SIGEMT +7 EMT ÏÝÚå +$ SIGFPE +8 ¸¡µãÒì³£ +$ SIGKILL +9 Ç¿ÖÆÖÕÖ¹½ø³Ì +$ SIGBUS +10 ϵͳÄÚ´æ·ÃÎÊÔ½½ç +$ SIGSEGV +11 ÄÚ´æ·ÃÎÊÔ½½ç +$ SIGSYS +12 ÎÞЧϵͳµ÷Óà +$ SIGPIPE +13 д¹ÜµÀʱ¶ÁÈ¡Õß²»´æÔÚ +$ SIGALRM +14 ʵʱµ¹¼Æʱµ½ÆÚ +$ SIGTERM +15 ÖÕÖ¹ +$ SIGURG +16 ÐèÁ¢¼´´¦ÀíµÄ I/O ½ô¼±×´¿ö +$ SIGSTOP +17 ¹ÒÆð (ÐźÅ) +$ SIGTSTP +18 ¹ÒÆð +$ SIGCONT +19 ¼ÌÐøÔËÐÐ +$ SIGCHLD +20 ×Ó½ø³ÌÖÕÖ¹ +$ SIGTTIN +21 TTY ÊäÈë×èÈû +$ SIGTTOU +22 TTY Êä³ö×èÈû +$ SIGIO +23 I/O ¾ÍÐ÷ +$ SIGXCPU +24 CPU ʹÓÃʱ¼ä¹ý³¤ +$ SIGXFSZ +25 Îļþ³ß´ç¹ý´ó +$ SIGVTALRM +26 ÐéÄâµ¹¼Æʱµ½ÆÚ +$ SIGPROF +27 ÆÊÎöµ¹¼Æʱµ½ÆÚ +$ SIGWINCH +28 ´°¿Ú³ß´ç±ä»¯ +$ SIGINFO +29 ÇëÇóÐÅÏ¢ +$ SIGUSR1 +30 Óû§×Ô¶¨ÒåÐźŠ1 +$ SIGUSR2 +31 Óû§×Ô¶¨ÒåÐźŠ2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 Ö÷»úÃûʹÓÃÁ˲»Ö§³ÖµÄµØÖ·ÀàÐÍ +$ EAI_AGAIN +2 ÔÝʱÎÞ·¨½âÎöÃû³Æ +$ EAI_BADFLAGS +3 ÎÞЧµÄ ai_flags Öµ +$ EAI_FAIL +4 ½âÎöÃû³Æʱ³öÏÖÎÞ·¨»Ö¸´µÄ´íÎó +$ EAI_FAMILY +5 ²»Ö§³ÖµÄµØÖ·ÐÅÏ¢ÀàÐÍ +$ EAI_MEMORY +6 ÄÚ´æ·ÖÅäʧ°Ü +$ 7 (obsolete) +7 Ö÷»úÃûÎÞÏà¹ØÁªµÄµØÖ· +$ EAI_NONAME +8 δ֪µÄÖ÷»úÃû»ò·þÎñÃû +$ EAI_SERVICE +9 Ì×½Ó×ÖÀàÐͲ»Ö§³Ö´Ë·þÎñÃû +$ EAI_SOCKTYPE +10 ²»Ö§³ÖµÄÌ×½Ó×ÖÀàÐÍ +$ EAI_SYSTEM +11 ϵͳµ÷Ó÷µ»ØÁË errno ´íÎó +$ EAI_BADHINTS +12 ÎÞЧÌáʾ²ÎÊý +$ EAI_PROTOCOL +13 δ֪ЭÒé +$ EAI_OVERFLOW +14 ²ÎÊý»º³åÒç³ö +$ 0 +32766 ³É¹¦ +$ NL_MSGMAX +32767 δ֪´íÎó diff --git a/lib/libc/nls/zh_CN.GB2312.msg b/lib/libc/nls/zh_CN.GB2312.msg new file mode 100644 index 0000000000..40142f4bc7 --- /dev/null +++ b/lib/libc/nls/zh_CN.GB2312.msg @@ -0,0 +1,297 @@ +$ $FreeBSD: head/lib/libc/nls/zh_CN.GB2312.msg 244757 2012-12-28 01:23:12Z delphij $ +$ +$ Message catalog for zh_CN.GB2312 locale +$ +$ Derived from FreeBSD: head/lib/libc/nls/zh_CN.UTF-8.msg 244756 2012-12-28 01:09:30Z delphij +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 ²»ÔÊÐíµÄ²Ù×÷ +$ ENOENT +2 Îļþ»òĿ¼²»´æÔÚ +$ ESRCH +3 ½ø³Ì²»´æÔÚ +$ EINTR +4 ϵͳµ÷ÓÃÖÐÖ¹ +$ EIO +5 ÊäÈë/Êä³ö´íÎó +$ ENXIO +6 δÅäÖõÄÉ豸 +$ E2BIG +7 ²ÎÊý±í¹ý³¤ +$ ENOEXEC +8 ¿ÉÖ´ÐÐÎļþ¸ñʽ´íÎó +$ EBADF +9 ÎļþÃèÊö·ûÎÞЧ +$ ECHILD +10 Ö¸¶¨×Ó½ø³Ì²»´æÔÚ +$ EDEADLK +11 ´Ë²Ù×÷»áµ¼ÖÂËÀËø +$ ENOMEM +12 ÎÞ·¨·ÖÅäÄÚ´æ +$ EACCES +13 ¾Ü¾ø·ÃÎÊ +$ EFAULT +14 ÎÞЧµØÖ· +$ ENOTBLK +15 ¸Ã²Ù×÷ÐèÒª¿éÉ豸 +$ EBUSY +16 É豸ʹÓÃÖÐ +$ EEXIST +17 ÎļþÒÑ´æÔÚ +$ EXDEV +18 Á´½Ó¿çÉ豸 +$ ENODEV +19 É豸²»Ö§³Ö´Ë²Ù×÷ +$ ENOTDIR +20 ¶ÔÏó·ÇĿ¼ +$ EISDIR +21 ¶ÔÏóΪĿ¼ +$ EINVAL +22 ²ÎÊýÎÞЧ +$ ENFILE +23 ϵͳ´ò¿ªÎļþ¹ý¶à +$ EMFILE +24 ½ø³Ì´ò¿ªÎļþ¹ý¶à +$ ENOTTY +25 ÎÞЧÉ豸 ioctl +$ ETXTBSY +26 ¿ÉÖ´ÐÐÎļþæ +$ EFBIG +27 Îļþ¹ý´ó +$ ENOSPC +28 É豸ÎÞ¿ÉÓÿռä +$ ESPIPE +29 ²»ÔÊÐíÖ´ÐÐ seek ²Ù×÷ +$ EROFS +30 Îļþϵͳֻ¶Á +$ EMLINK +31 ÎļþÁ´½Ó¹ý¶à +$ EPIPE +32 ¹ÜµÀÒÑÖÐÖ¹ +$ EDOM +33 ÊýÖµ²ÎÊýÔ½½ç +$ ERANGE +34 ½á¹û¹ý´ó +$ EAGAIN, EWOULDBLOCK +35 ×ÊÔ´ÔÝʱ²»¿ÉÓà +$ EINPROGRESS +36 ²Ù×÷½øÐÐÖÐ +$ EALREADY +37 ²Ù×÷ÒÑ¿ªÊ¼ +$ ENOTSOCK +38 ³¢ÊÔÔÚ·Ç socket ÉÏÖ´ÐÐ socket ²Ù×÷ +$ EDESTADDRREQ +39 ÐèҪĿµÄµØÖ· +$ EMSGSIZE +40 ÏûÏ¢¹ý³¤ +$ EPROTOTYPE +41 socketЭÒéÀàÐÍ´íÎó +$ ENOPROTOOPT +42 ЭÒé²»¿ÉÓà +$ EPROTONOSUPPORT +43 ²»Ö§³ÖµÄЭÒé +$ ESOCKTNOSUPPORT +44 ²»Ö§³ÖµÄ socket ÀàÐÍ +$ EOPNOTSUPP +45 ²»Ö§³ÖµÄ²Ù×÷ +$ EPFNOSUPPORT +46 ²»Ö§³ÖµÄЭÒé×å +$ EAFNOSUPPORT +47 ЭÒé×å²»Ö§³ÖµÄµØÖ·×å +$ EADDRINUSE +48 µØÖ·Òѱ»Õ¼Óà +$ EADDRNOTAVAIL +49 ÎÞ·¨Ö¸¶¨ÇëÇóµÄµØÖ· +$ ENETDOWN +50 ÍøÂçÒÑ¹Ø±Õ +$ ENETUNREACH +51 ÍøÂç²»¿É´ï +$ ENETRESET +52 ¸´Î»µ¼ÖÂÍøÂçÁ¬½Ó¶ªÊ§ +$ ECONNABORTED +53 Èí¼þµ¼ÖµÄÁ¬½ÓÖÐÖ¹ +$ ECONNRESET +54 ¶Ô·½¸´Î»ÁËÁ¬½Ó +$ ENOBUFS +55 »º³åÇø¿Õ¼ä²»×ã +$ EISCONN +56 socket ÒÑÁ¬½Ó +$ ENOTCONN +57 socket δÁ¬½Ó +$ ESHUTDOWN +58 socket shutdown Ö®ºóÎÞ·¨·¢ËÍÊý¾Ý +$ ETOOMANYREFS +59 ÒýÓÃÊý¹ý¶à£ºÎÞ·¨Æ´½Ó +$ ETIMEDOUT +60 ²Ù×÷³¬Ê± +$ ECONNREFUSED +61 ¾Ü¾øÁ¬½Ó +$ ELOOP +62 ·ûºÅÁ´½Ó²ãÊý¹ý¶à +$ ENAMETOOLONG +63 ÎļþÃû¹ý³¤ +$ EHOSTDOWN +64 Ö÷»úÒÑ¹Ø±Õ +$ EHOSTUNREACH +65 ûÓе½Ö÷»úµÄ·ÓÉ +$ ENOTEMPTY +66 Ŀ¼·Ç¿Õ +$ EPROCLIM +67 ½ø³ÌÊý³¬ÏÞ +$ EUSERS +68 Óû§Êý³¬ÏÞ +$ EDQUOT +69 ´ÅÅÌ¿Õ¼äÅä¶î³¬ÏÞ +$ ESTALE +70 NFS Îļþ¾ä±úÒÑʧЧ +$ EREMOTE +71 Ô¶³ÌĿ¼²ãÊý¹ý¶à +$ EBADRPC +72 RPC ½á¹¹ÎÞЧ +$ ERPCMISMATCH +73 RPC °æ±¾´íÎó +$ EPROGUNAVAIL +74 RPC ³ÌÐò²»¿ÉÓà +$ EPROGMISMATCH +75 ³ÌÐò°æ±¾´íÎó +$ EPROCUNAVAIL +76 δÌṩµÄÔ¶³Ìº¯Êý +$ ENOLCK +77 ²»Ö§³ÖËø +$ ENOSYS +78 ¹¦ÄÜδʵÏÖ +$ EFTYPE +79 ÎļþÀàÐÍ»ò¸ñʽÎÞЧ +$ EAUTH +80 Éí·ÝÎÞЧ +$ ENEEDAUTH +81 ÎÞÐÅÈÎƾ¾Ý +$ EIDRM +82 ÎÞ±êʶ·û +$ ENOMSG +83 ÎÞÏûÏ¢ÀàÐÍ +$ EOVERFLOW +84 ÊýÖµÒç³ö +$ ECANCELED +85 ²Ù×÷ÒÑÈ¡Ïû +$ EILSEQ +86 ÎÞЧ×Ö·ûÐòÁÐ +$ ENOATTR +87 ÎÞÀ©Õ¹ÊôÐÔ +$ EDOOFUS +88 ³ÌÐòÉè¼Æ´íÎó +$ EBADMSG +89 ÎÞЧÏûÏ¢ +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 ЭÒé´íÎó +$ ENOTCAPABLE +93 ȨÄܲ»×ã +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 ÖÕ¶ËÏß·¹Ò¶Ï +$ SIGINT +2 ÖÐ¶Ï +$ SIGQUIT +3 Í˳ö +$ SIGILL +4 ÎÞЧָÁî +$ SIGTRAP +5 ¸ú×Ù/BPT ÏÝÚå +$ SIGABRT +6 ÖÕÖ¹ÏÝÚå +$ SIGEMT +7 EMT ÏÝÚå +$ SIGFPE +8 ¸¡µãÒì³£ +$ SIGKILL +9 Ç¿ÖÆÖÕÖ¹½ø³Ì +$ SIGBUS +10 ϵͳÄÚ´æ·ÃÎÊÔ½½ç +$ SIGSEGV +11 ÄÚ´æ·ÃÎÊÔ½½ç +$ SIGSYS +12 ÎÞЧϵͳµ÷Óà +$ SIGPIPE +13 д¹ÜµÀʱ¶ÁÈ¡Õß²»´æÔÚ +$ SIGALRM +14 ʵʱµ¹¼Æʱµ½ÆÚ +$ SIGTERM +15 ÖÕÖ¹ +$ SIGURG +16 ÐèÁ¢¼´´¦ÀíµÄ I/O ½ô¼±×´¿ö +$ SIGSTOP +17 ¹ÒÆð (ÐźÅ) +$ SIGTSTP +18 ¹ÒÆð +$ SIGCONT +19 ¼ÌÐøÔËÐÐ +$ SIGCHLD +20 ×Ó½ø³ÌÖÕÖ¹ +$ SIGTTIN +21 TTY ÊäÈë×èÈû +$ SIGTTOU +22 TTY Êä³ö×èÈû +$ SIGIO +23 I/O ¾ÍÐ÷ +$ SIGXCPU +24 CPU ʹÓÃʱ¼ä¹ý³¤ +$ SIGXFSZ +25 Îļþ³ß´ç¹ý´ó +$ SIGVTALRM +26 ÐéÄâµ¹¼Æʱµ½ÆÚ +$ SIGPROF +27 ÆÊÎöµ¹¼Æʱµ½ÆÚ +$ SIGWINCH +28 ´°¿Ú³ß´ç±ä»¯ +$ SIGINFO +29 ÇëÇóÐÅÏ¢ +$ SIGUSR1 +30 Óû§×Ô¶¨ÒåÐźŠ1 +$ SIGUSR2 +31 Óû§×Ô¶¨ÒåÐźŠ2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 Ö÷»úÃûʹÓÃÁ˲»Ö§³ÖµÄµØÖ·ÀàÐÍ +$ EAI_AGAIN +2 ÔÝʱÎÞ·¨½âÎöÃû³Æ +$ EAI_BADFLAGS +3 ÎÞЧµÄ ai_flags Öµ +$ EAI_FAIL +4 ½âÎöÃû³Æʱ³öÏÖÎÞ·¨»Ö¸´µÄ´íÎó +$ EAI_FAMILY +5 ²»Ö§³ÖµÄµØÖ·ÐÅÏ¢ÀàÐÍ +$ EAI_MEMORY +6 ÄÚ´æ·ÖÅäʧ°Ü +$ 7 (obsolete) +7 Ö÷»úÃûÎÞÏà¹ØÁªµÄµØÖ· +$ EAI_NONAME +8 δ֪µÄÖ÷»úÃû»ò·þÎñÃû +$ EAI_SERVICE +9 Ì×½Ó×ÖÀàÐͲ»Ö§³Ö´Ë·þÎñÃû +$ EAI_SOCKTYPE +10 ²»Ö§³ÖµÄÌ×½Ó×ÖÀàÐÍ +$ EAI_SYSTEM +11 ϵͳµ÷Ó÷µ»ØÁË errno ´íÎó +$ EAI_BADHINTS +12 ÎÞЧÌáʾ²ÎÊý +$ EAI_PROTOCOL +13 δ֪ЭÒé +$ EAI_OVERFLOW +14 ²ÎÊý»º³åÒç³ö +$ 0 +32766 ³É¹¦ +$ NL_MSGMAX +32767 δ֪´íÎó diff --git a/lib/libc/nls/zh_CN.UTF-8.msg b/lib/libc/nls/zh_CN.UTF-8.msg new file mode 100644 index 0000000000..3ff2bb22e5 --- /dev/null +++ b/lib/libc/nls/zh_CN.UTF-8.msg @@ -0,0 +1,295 @@ +$ $FreeBSD: head/lib/libc/nls/zh_CN.UTF-8.msg 244756 2012-12-28 01:09:30Z delphij $ +$ +$ Message catalog for zh_CN.UTF-8 locale +$ +$ strerror() support catalog +$ +$set 1 +$ EPERM +1 不允许的操作 +$ ENOENT +2 文件或目录不存在 +$ ESRCH +3 进程不存在 +$ EINTR +4 系统调用中止 +$ EIO +5 输入/输出错误 +$ ENXIO +6 未配置的设备 +$ E2BIG +7 参数表过长 +$ ENOEXEC +8 可执行文件格式错误 +$ EBADF +9 文件描述符无效 +$ ECHILD +10 指定子进程不存在 +$ EDEADLK +11 此操作会导致死锁 +$ ENOMEM +12 无法分配内存 +$ EACCES +13 拒绝访问 +$ EFAULT +14 无效地址 +$ ENOTBLK +15 该操作需要块设备 +$ EBUSY +16 设备使用中 +$ EEXIST +17 文件已存在 +$ EXDEV +18 链接跨设备 +$ ENODEV +19 设备不支持此操作 +$ ENOTDIR +20 对象非目录 +$ EISDIR +21 对象为目录 +$ EINVAL +22 参数无效 +$ ENFILE +23 系统打开文件过多 +$ EMFILE +24 进程打开文件过多 +$ ENOTTY +25 无效设备 ioctl +$ ETXTBSY +26 可执行文件忙 +$ EFBIG +27 文件过大 +$ ENOSPC +28 设备无可用空间 +$ ESPIPE +29 不允许执行 seek 操作 +$ EROFS +30 文件系统只读 +$ EMLINK +31 文件链接过多 +$ EPIPE +32 管道已中止 +$ EDOM +33 数值参数越界 +$ ERANGE +34 结果过大 +$ EAGAIN, EWOULDBLOCK +35 资源暂时不可用 +$ EINPROGRESS +36 操作进行中 +$ EALREADY +37 操作已开始 +$ ENOTSOCK +38 尝试在非 socket 上执行 socket 操作 +$ EDESTADDRREQ +39 需要目的地址 +$ EMSGSIZE +40 消息过长 +$ EPROTOTYPE +41 socket协议类型错误 +$ ENOPROTOOPT +42 协议不可用 +$ EPROTONOSUPPORT +43 不支持的协议 +$ ESOCKTNOSUPPORT +44 不支持的 socket 类型 +$ EOPNOTSUPP +45 不支持的操作 +$ EPFNOSUPPORT +46 不支持的协议族 +$ EAFNOSUPPORT +47 协议族不支持的地址族 +$ EADDRINUSE +48 地址已被占用 +$ EADDRNOTAVAIL +49 无法指定请求的地址 +$ ENETDOWN +50 网络已关闭 +$ ENETUNREACH +51 网络不可达 +$ ENETRESET +52 复位导致网络连接丢失 +$ ECONNABORTED +53 软件导致的连接中止 +$ ECONNRESET +54 对方复位了连接 +$ ENOBUFS +55 缓冲区空间不足 +$ EISCONN +56 socket 已连接 +$ ENOTCONN +57 socket 未连接 +$ ESHUTDOWN +58 socket shutdown 之后无法发送数据 +$ ETOOMANYREFS +59 引用数过多:无法拼接 +$ ETIMEDOUT +60 操作超时 +$ ECONNREFUSED +61 拒绝连接 +$ ELOOP +62 符号链接层数过多 +$ ENAMETOOLONG +63 文件名过长 +$ EHOSTDOWN +64 主机已关闭 +$ EHOSTUNREACH +65 没有到主机的路由 +$ ENOTEMPTY +66 目录非空 +$ EPROCLIM +67 进程数超限 +$ EUSERS +68 用户数超限 +$ EDQUOT +69 磁盘空间配额超限 +$ ESTALE +70 NFS 文件句柄已失效 +$ EREMOTE +71 远程目录层数过多 +$ EBADRPC +72 RPC 结构无效 +$ ERPCMISMATCH +73 RPC 版本错误 +$ EPROGUNAVAIL +74 RPC 程序不可用 +$ EPROGMISMATCH +75 程序版本错误 +$ EPROCUNAVAIL +76 未提供的远程函数 +$ ENOLCK +77 不支持锁 +$ ENOSYS +78 功能未实现 +$ EFTYPE +79 文件类型或格式无效 +$ EAUTH +80 身份无效 +$ ENEEDAUTH +81 无信任凭据 +$ EIDRM +82 无标识符 +$ ENOMSG +83 无消息类型 +$ EOVERFLOW +84 数值溢出 +$ ECANCELED +85 操作已取消 +$ EILSEQ +86 无效字符序列 +$ ENOATTR +87 无扩展属性 +$ EDOOFUS +88 程序设计错误 +$ EBADMSG +89 无效消息 +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 协议错误 +$ ENOTCAPABLE +93 权能不足 +$ +$ strsignal() support catalog +$ +$set 2 +$ SIGHUP +1 终端线路挂断 +$ SIGINT +2 中断 +$ SIGQUIT +3 退出 +$ SIGILL +4 无效指令 +$ SIGTRAP +5 跟踪/BPT 陷阱 +$ SIGABRT +6 终止陷阱 +$ SIGEMT +7 EMT 陷阱 +$ SIGFPE +8 浮点异常 +$ SIGKILL +9 强制终止进程 +$ SIGBUS +10 系统内存访问越界 +$ SIGSEGV +11 内存访问越界 +$ SIGSYS +12 无效系统调用 +$ SIGPIPE +13 写管道时读取者不存在 +$ SIGALRM +14 实时倒计时到期 +$ SIGTERM +15 终止 +$ SIGURG +16 需立即处理的 I/O 紧急状况 +$ SIGSTOP +17 挂起 (信号) +$ SIGTSTP +18 挂起 +$ SIGCONT +19 继续运行 +$ SIGCHLD +20 子进程终止 +$ SIGTTIN +21 TTY 输入阻塞 +$ SIGTTOU +22 TTY 输出阻塞 +$ SIGIO +23 I/O 就绪 +$ SIGXCPU +24 CPU 使用时间过长 +$ SIGXFSZ +25 文件尺寸过大 +$ SIGVTALRM +26 虚拟倒计时到期 +$ SIGPROF +27 剖析倒计时到期 +$ SIGWINCH +28 窗口尺寸变化 +$ SIGINFO +29 请求信息 +$ SIGUSR1 +30 用户自定义信号 1 +$ SIGUSR2 +31 用户自定义信号 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 主机名使用了不支持的地址类型 +$ EAI_AGAIN +2 暂时无法解析名称 +$ EAI_BADFLAGS +3 无效的 ai_flags 值 +$ EAI_FAIL +4 解析名称时出现无法恢复的错误 +$ EAI_FAMILY +5 不支持的地址信息类型 +$ EAI_MEMORY +6 内存分配失败 +$ 7 (obsolete) +7 主机名无相关联的地址 +$ EAI_NONAME +8 未知的主机名或服务名 +$ EAI_SERVICE +9 套接字类型不支持此服务名 +$ EAI_SOCKTYPE +10 不支持的套接字类型 +$ EAI_SYSTEM +11 系统调用返回了 errno 错误 +$ EAI_BADHINTS +12 无效提示参数 +$ EAI_PROTOCOL +13 未知协议 +$ EAI_OVERFLOW +14 参数缓冲溢出 +$ 0 +32766 成功 +$ NL_MSGMAX +32767 未知错误 diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index bb963c6f2a..18227a5c14 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -3,6 +3,11 @@ * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * This code is derived from software contributed to Berkeley by * Henry Spencer. * @@ -30,18 +35,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * @(#)regcomp.c 8.5 (Berkeley) 3/20/94 + * $FreeBSD: head/lib/libc/regex/regcomp.c 247596 2013-03-01 23:26:13Z delphij $ + * * @(#)regcomp.c 8.5 (Berkeley) 3/20/94 - * $FreeBSD: src/lib/libc/regex/regcomp.c,v 1.36 2007/06/11 03:05:54 delphij Exp $ */ #include #include #include #include -#include #include #include #include +#include #include #include @@ -76,10 +83,10 @@ extern "C" { #endif /* === regcomp.c === */ -static void p_ere(struct parse *p, wint_t stop); +static void p_ere(struct parse *p, int stop); static void p_ere_exp(struct parse *p); static void p_str(struct parse *p); -static void p_bre(struct parse *p, wint_t end1, wint_t end2); +static void p_bre(struct parse *p, int end1, int end2); static int p_simp_re(struct parse *p, int starordinary); static int p_count(struct parse *p); static void p_bracket(struct parse *p); @@ -104,7 +111,7 @@ static sopno dupl(struct parse *p, sopno start, sopno finish); static void doemit(struct parse *p, sop op, size_t opnd); static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos); static void dofwd(struct parse *p, sopno pos, sop value); -static void enlarge(struct parse *p, sopno size); +static int enlarge(struct parse *p, sopno size); static void stripsnug(struct parse *p, struct re_guts *g); static void findmust(struct parse *p, struct re_guts *g); static int altoffset(sop *scan, int offset); @@ -280,7 +287,7 @@ regcomp(regex_t * __restrict preg, /* - p_ere - ERE parser top level, concatenation and alternation - == static void p_ere(struct parse *p, int stop); + == static void p_ere(struct parse *p, int_t stop); */ static void p_ere(struct parse *p, @@ -488,7 +495,7 @@ p_str(struct parse *p) /* - p_bre - BRE parser top level, anchoring and concatenation - == static void p_bre(struct parse *p, int end1, \ + == static void p_bre(struct parse *p, int end1, \ == int end2); * Giving end1 as OUT essentially eliminates the end1/end2 check. * @@ -599,7 +606,7 @@ p_simp_re(struct parse *p, assert(p->pbegin[i] != 0); assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); assert(OP(p->strip[p->pend[i]]) == ORPAREN); - dupl(p, p->pbegin[i]+1, p->pend[i]); + (void) dupl(p, p->pbegin[i]+1, p->pend[i]); EMIT(O_BACK, i); } else SETERROR(REG_ESUBREG); @@ -725,6 +732,8 @@ p_b_term(struct parse *p, cset *cs) char c; wint_t start, finish; wint_t i; + struct xlocale_collate *table = + (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE]; /* classify what we've got */ switch ((MORE()) ? PEEK() : '\0') { @@ -773,14 +782,14 @@ p_b_term(struct parse *p, cset *cs) if (start == finish) CHadd(p, cs, start); else { - if (__collate_load_error) { + if (table->__collate_load_error) { (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE); CHaddrange(p, cs, start, finish); } else { - (void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE); + (void)REQUIRE(__collate_range_cmp(table, start, finish) <= 0, REG_ERANGE); for (i = 0; i <= UCHAR_MAX; i++) { - if ( __collate_range_cmp(start, i) <= 0 - && __collate_range_cmp(i, finish) <= 0 + if ( __collate_range_cmp(table, start, i) <= 0 + && __collate_range_cmp(table, i, finish) <= 0 ) CHadd(p, cs, i); } @@ -835,7 +844,7 @@ p_b_eclass(struct parse *p, cset *cs) /* - p_b_symbol - parse a character or [..]ed multicharacter collating symbol - == static char p_b_symbol(struct parse *p); + == static wint_t p_b_symbol(struct parse *p); */ static wint_t /* value of symbol */ p_b_symbol(struct parse *p) @@ -854,7 +863,7 @@ p_b_symbol(struct parse *p) /* - p_b_coll_elem - parse a collating-element name and look it up - == static char p_b_coll_elem(struct parse *p, int endc); + == static wint_t p_b_coll_elem(struct parse *p, wint_t endc); */ static wint_t /* value of collating element */ p_b_coll_elem(struct parse *p, @@ -889,7 +898,7 @@ p_b_coll_elem(struct parse *p, /* - othercase - return the case counterpart of an alphabetic - == static char othercase(int ch); + == static wint_t othercase(wint_t ch); */ static wint_t /* if no counterpart, return ch */ othercase(wint_t ch) @@ -905,7 +914,7 @@ othercase(wint_t ch) /* - bothcases - emit a dualcase version of a two-case character - == static void bothcases(struct parse *p, int ch); + == static void bothcases(struct parse *p, wint_t ch); * * Boy, is this implementation ever a kludge... */ @@ -934,7 +943,7 @@ bothcases(struct parse *p, wint_t ch) /* - ordinary - emit an ordinary character - == static void ordinary(struct parse *p, int ch); + == static void ordinary(struct parse *p, wint_t ch); */ static void ordinary(struct parse *p, wint_t ch) @@ -1241,9 +1250,9 @@ dupl(struct parse *p, assert(finish >= start); if (len == 0) return(ret); - enlarge(p, p->ssize + len); /* this many unexpected additions */ - assert(p->ssize >= p->slen + len); - memcpy((char *)(p->strip + p->slen), + if (!enlarge(p, p->ssize + len)) /* this many unexpected additions */ + return(ret); + (void) memcpy((char *)(p->strip + p->slen), (char *)(p->strip + start), (size_t)len*sizeof(sop)); p->slen += len; return(ret); @@ -1269,8 +1278,8 @@ doemit(struct parse *p, sop op, size_t opnd) /* deal with undersized strip */ if (p->slen >= p->ssize) - enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */ - assert(p->slen < p->ssize); + if (!enlarge(p, (p->ssize+1) / 2 * 3)) /* +50% */ + return; /* finally, it's all reduced to the easy case */ p->strip[p->slen++] = SOP(op, opnd); @@ -1329,23 +1338,24 @@ dofwd(struct parse *p, sopno pos, sop value) /* - enlarge - enlarge the strip - == static void enlarge(struct parse *p, sopno size); + == static int enlarge(struct parse *p, sopno size); */ -static void +static int enlarge(struct parse *p, sopno size) { sop *sp; if (p->ssize >= size) - return; + return 1; sp = (sop *)realloc(p->strip, size*sizeof(sop)); if (sp == NULL) { SETERROR(REG_ESPACE); - return; + return 0; } p->strip = sp; p->ssize = size; + return 1; } /* @@ -1397,7 +1407,7 @@ findmust(struct parse *p, struct re_guts *g) * UTF-8 (see RFC 3629). */ if (MB_CUR_MAX > 1 && - strcmp(nl_langinfo(CODESET), "UTF-8") != 0) + strcmp(_CurrentRuneLocale->__encoding, "UTF-8") != 0) return; /* find the longest OCHAR sequence in strip */ diff --git a/lib/libc/stdio/Symbol.map b/lib/libc/stdio/Symbol.map index 20e3a0df0c..63871833fb 100644 --- a/lib/libc/stdio/Symbol.map +++ b/lib/libc/stdio/Symbol.map @@ -1,5 +1,6 @@ DF306.0 { asprintf; + asprintf_l; clearerr; clearerr_unlocked; dprintf; @@ -18,22 +19,28 @@ DF306.0 { fgetpos; fgets; fgetwc; + fgetwc_l; fgetwln; fgetws; + fgetws_l; fileno; fileno_unlocked; flockfile; fmemopen; fopen; fprintf; + fprintf_l; fpurge; fputc; fputs; fputwc; + fputwc_l; fputws; + fputws_l; fread; freopen; fscanf; + fscanf_l; fseek; fseeko; fsetpos; @@ -44,8 +51,10 @@ DF306.0 { funopen; fwide; fwprintf; + fwprintf_l; fwrite; fwscanf; + fwscanf_l; getc; getc_unlocked; getchar; @@ -55,14 +64,21 @@ DF306.0 { gets; getw; getwc; + getwc_l; getwchar; + getwchar_l; mkdtemp; mktemp; + mkostemp; + mkostemps; mkstemp; mkstemps; + mktemp; open_memstream; + open_wmemstream; perror; printf; + printf_l; putc; putc_unlocked; putchar; @@ -70,41 +86,66 @@ DF306.0 { puts; putw; putwc; + putwc_l; putwchar; + putwchar_l; remove; rewind; scanf; + scanf_l; setbuf; setbuffer; setlinebuf; setvbuf; snprintf; + snprintf_l; sprintf; + sprintf_l; sscanf; + sscanf_l; swprintf; + swprintf_l; swscanf; + swscanf_l; tempnam; tmpfile; tmpnam; ungetc; ungetwc; + ungetwc_l; vasprintf; + vasprintf_l; vdprintf; vfprintf; + vfprintf_l; vfscanf; + vfscanf_l; vfwprintf; + vfwprintf_l; vfwscanf; + vfwscanf_l; vprintf; + vprintf_l; vscanf; + vscanf_l; vsnprintf; + vsnprintf_l; vsprintf; + vsprintf_l; vsscanf; + vsscanf_l; vswprintf; + vswprintf_l; vswscanf; + vswscanf_l; vwprintf; + vwprintf_l; vwscanf; + vwscanf_l; wprintf; + wprintf_l; wscanf; + wscanf_l; }; DFprivate_1.0 { diff --git a/lib/libc/stdio/__fpending.c b/lib/libc/stdio/__fpending.c index 0b0fae539f..4d5ada2e9b 100644 --- a/lib/libc/stdio/__fpending.c +++ b/lib/libc/stdio/__fpending.c @@ -30,13 +30,10 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/lib/libc/stdio/__fpending.c,v 1.2 2005/07/23 23:14:44 joerg Exp $ */ #include -#include "priv_stdio.h" #include "local.h" __ssize_t diff --git a/lib/libc/stdio/_flock_stub.c b/lib/libc/stdio/_flock_stub.c index 97ecc8b730..b90663c5f9 100644 --- a/lib/libc/stdio/_flock_stub.c +++ b/lib/libc/stdio/_flock_stub.c @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/stdio/_flock_stub.c,v 1.16 2008/04/17 22:17:53 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/_flock_stub.c,v 1.10 2005/07/23 23:14:44 joerg Exp $ */ /* @@ -43,7 +42,6 @@ #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" /* diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index dc4f4430e2..e3d9f6140d 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -29,15 +34,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/asprintf.c,v 1.15 2009/03/02 04:11:42 das Exp $ - * $DragonFly: src/lib/libc/stdio/asprintf.c,v 1.8 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/asprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ -#include + #include +#include +#include int -asprintf(char ** __restrict s, const char * __restrict fmt, ...) +asprintf(char ** __restrict s, char const * __restrict fmt, ...) { int ret; va_list ap; @@ -47,3 +53,15 @@ asprintf(char ** __restrict s, const char * __restrict fmt, ...) va_end(ap); return (ret); } +int +asprintf_l(char ** __restrict s, locale_t locale, char const * __restrict fmt, + ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vasprintf_l(s, locale, fmt, ap); + va_end(ap); + return (ret); +} diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c index 39382ccdc4..33e11439fc 100644 --- a/lib/libc/stdio/fclose.c +++ b/lib/libc/stdio/fclose.c @@ -31,7 +31,6 @@ * * @(#)fclose.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fclose.c,v 1.12 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fclose.c,v 1.9 2005/07/23 20:23:05 joerg Exp $ */ #include "namespace.h" @@ -42,7 +41,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" int fclose(FILE *fp) diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c index 58b1f1dae6..35926a71c4 100644 --- a/lib/libc/stdio/fdopen.c +++ b/lib/libc/stdio/fdopen.c @@ -31,7 +31,6 @@ * * @(#)fdopen.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fdopen.c,v 1.11 2008/05/10 18:39:20 antoine Exp $ - * $DragonFly: src/lib/libc/stdio/fdopen.c,v 1.6 2005/07/23 20:23:05 joerg Exp $ */ #include "namespace.h" @@ -43,7 +42,6 @@ #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" FILE * fdopen(int fd, const char *mode) diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index a38f1d6f3e..9905662d55 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -31,7 +31,6 @@ * * @(#)fflush.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fflush.c,v 1.14 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fflush.c,v 1.6 2005/07/23 20:23:05 joerg Exp $ */ #include "namespace.h" @@ -41,7 +40,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" static int sflush_locked(FILE *); diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c index 791ab33cac..30aeb03e48 100644 --- a/lib/libc/stdio/fgetln.c +++ b/lib/libc/stdio/fgetln.c @@ -31,7 +31,6 @@ * * @(#)fgetln.c 8.2 (Berkeley) 1/2/94 * $FreeBSD: src/lib/libc/stdio/fgetln.c,v 1.11 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fgetln.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -42,7 +41,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" /* * Expand the line buffer. Return -1 on error. diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c index b9eaf94235..27d084a851 100644 --- a/lib/libc/stdio/fgets.c +++ b/lib/libc/stdio/fgets.c @@ -31,7 +31,6 @@ * * @(#)fgets.c 8.2 (Berkeley) 12/22/93 * $FreeBSD: src/lib/libc/stdio/fgets.c,v 1.14 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fgets.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -40,7 +39,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" /* * Read at most n-1 characters from the given file. diff --git a/lib/libc/stdio/fgetwc.c b/lib/libc/stdio/fgetwc.c index 54991f3cb4..ee8d0649f2 100644 --- a/lib/libc/stdio/fgetwc.c +++ b/lib/libc/stdio/fgetwc.c @@ -1,9 +1,11 @@ -/* $NetBSD: fgetwc.c,v 1.8 2007/04/01 18:35:53 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fgetwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- - * Copyright (c)2001 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,76 +28,88 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Citrus$ + * $FreeBSD: head/lib/libc/stdio/fgetwc.c 234799 2012-04-29 16:28:39Z das $ */ + #include "namespace.h" -#include #include #include +#include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "mblocal.h" +#include "xlocale_private.h" +/* + * MT-safe version. + */ wint_t -__fgetwc_unlock(FILE *fp) +fgetwc_l(FILE *fp, locale_t locale) { - struct wchar_io_data *wcio; - wchar_t wc; - size_t nr; - - _DIAGASSERT(fp != NULL); - - _SET_ORIENTATION(fp, 1); - wcio = WCIO_GET(fp); - _DIAGASSERT(wcio != NULL); - - /* if there're ungetwc'ed wchars, use them */ - if (wcio->wcio_ungetwc_inbuf) - return(wcio->wcio_ungetwc_buf[--wcio->wcio_ungetwc_inbuf]); + wint_t r; + FIX_LOCALE(locale); - if (fp->pub._r <= 0) { -restart: - if (__srefill(fp) != 0) - return WEOF; - } - nr = mbrtowc(&wc, (const char *)fp->pub._p, - (size_t)fp->pub._r, &wcio->wcio_mbstate_in); - if (nr == (size_t)-1) { - fp->pub._flags |= __SERR; - return WEOF; - } else if (nr == (size_t)-2) { - fp->pub._p += fp->pub._r; - fp->pub._r = 0; - goto restart; - } - if (wc == L'\0') { - while (*fp->pub._p != '\0') { - ++fp->pub._p; - --fp->pub._r; - } - nr = 1; - } - fp->pub._p += nr; - fp->pub._r -= nr; + FLOCKFILE(fp); + ORIENT(fp, 1); + r = __fgetwc(fp, locale); + FUNLOCKFILE(fp); - return wc; + return (r); } wint_t fgetwc(FILE *fp) { - wint_t r; - - _DIAGASSERT(fp != NULL); + return fgetwc_l(fp, __get_locale()); +} - FLOCKFILE(fp); - r = __fgetwc_unlock(fp); - FUNLOCKFILE(fp); +/* + * Internal (non-MPSAFE) version of fgetwc(). This version takes an + * mbstate_t argument specifying the initial conversion state. For + * wide streams, this should always be fp->_mbstate. On return, *nread + * is set to the number of bytes read. + */ +wint_t +__fgetwc_mbs(FILE *fp, mbstate_t *mbs, int *nread, locale_t locale) +{ + wchar_t wc; + size_t nconv; + struct xlocale_ctype *l = XLOCALE_CTYPE(locale); - return (r); + if (fp->pub._r <= 0 && __srefill(fp)) { + *nread = 0; + return (WEOF); + } + if (MB_CUR_MAX == 1) { + /* Fast path for single-byte encodings. */ + wc = *fp->pub._p++; + fp->pub._r--; + *nread = 1; + return (wc); + } + *nread = 0; + do { + nconv = l->__mbrtowc(&wc, fp->pub._p, fp->pub._r, mbs); + if (nconv == (size_t)-1) + break; + else if (nconv == (size_t)-2) + continue; + else if (nconv == 0) { + fp->pub._p++; + fp->pub._r--; + (*nread)++; + return (L'\0'); + } else { + fp->pub._p += nconv; + fp->pub._r -= nconv; + *nread += nconv; + return (wc); + } + } while (__srefill(fp) == 0); + fp->pub._flags |= __SERR; + errno = EILSEQ; + return (WEOF); } - diff --git a/lib/libc/stdio/fgetwln.3 b/lib/libc/stdio/fgetwln.3 index 6d8af519b5..dc5a4e075e 100644 --- a/lib/libc/stdio/fgetwln.3 +++ b/lib/libc/stdio/fgetwln.3 @@ -26,8 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)fgetln.3 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/stdio/fgetwln.3,v 1.3 2007/01/09 00:28:06 imp Exp $ -.\" $DragonFly: src/lib/libc/stdio/fgetwln.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ +.\" $FreeBSD: head/lib/libc/stdio/fgetwln.3 165903 2007-01-09 00:28:16Z imp $ .\" .Dd July 16, 2004 .Dt FGETWLN 3 diff --git a/lib/libc/stdio/fgetwln.c b/lib/libc/stdio/fgetwln.c index 9c7113480d..a591966dff 100644 --- a/lib/libc/stdio/fgetwln.c +++ b/lib/libc/stdio/fgetwln.c @@ -1,10 +1,12 @@ -/* $NetBSD: fgetwln.c,v 1.2 2009/01/31 06:08:28 lukem Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fgetwln.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- * Copyright (c) 2002-2004 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -25,33 +27,36 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/stdio/fgetwln.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" #include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" wchar_t * -fgetwln(FILE * __restrict fp, size_t *lenp) +fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { wint_t wc; size_t len; + FIX_LOCALE(locale); FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); + ORIENT(fp, 1); len = 0; - while ((wc = __fgetwc_unlock(fp)) != WEOF) { + while ((wc = __fgetwc(fp, locale)) != WEOF) { #define GROW 512 - if (len * sizeof(wchar_t) >= (size_t)fp->_lb._size && + if (len * sizeof(wchar_t) >= fp->_lb._size && __slbexpand(fp, (len + GROW) * sizeof(wchar_t))) goto error; - *((wchar_t *)(void *)fp->_lb._base + len++) = wc; + *((wchar_t *)fp->_lb._base + len++) = wc; if (wc == L'\n') break; } @@ -60,10 +65,15 @@ fgetwln(FILE * __restrict fp, size_t *lenp) FUNLOCKFILE(fp); *lenp = len; - return ((wchar_t *)(void *)fp->_lb._base); + return ((wchar_t *)fp->_lb._base); error: FUNLOCKFILE(fp); *lenp = 0; return (NULL); } +wchar_t * +fgetwln(FILE * __restrict fp, size_t *lenp) +{ + return fgetwln_l(fp, lenp, __get_locale()); +} diff --git a/lib/libc/stdio/fgetws.3 b/lib/libc/stdio/fgetws.3 index 61be01bf07..360db4ed08 100644 --- a/lib/libc/stdio/fgetws.3 +++ b/lib/libc/stdio/fgetws.3 @@ -1,6 +1,3 @@ -.\" $NetBSD: fgetws.3,v 1.2 2003/08/07 16:43:23 agc Exp $ -.\" $DragonFly: src/lib/libc/stdio/fgetws.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ -.\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -33,10 +30,8 @@ .\" SUCH DAMAGE. .\" .\" @(#)fgets.3 8.1 (Berkeley) 6/4/93 -.\" -.\" Original version ID: .\" FreeBSD: src/lib/libc/stdio/fgets.3,v 1.16 2002/05/31 05:01:17 archie Exp -.\" FreeBSD: src/lib/libc/stdio/fgetws.3,v 1.2 2002/09/06 11:23:55 tjr Exp +.\" $FreeBSD: head/lib/libc/stdio/fgetws.3 165903 2007-01-09 00:28:16Z imp $ .\" .Dd August 6, 2002 .Dt FGETWS 3 @@ -91,6 +86,9 @@ and .Xr ferror 3 to determine which occurred. .Sh ERRORS +The +.Fn fgetws +function will fail if: .Bl -tag -width Er .It Bq Er EBADF The given diff --git a/lib/libc/stdio/fgetws.c b/lib/libc/stdio/fgetws.c index 31170da816..e661311bb9 100644 --- a/lib/libc/stdio/fgetws.c +++ b/lib/libc/stdio/fgetws.c @@ -1,9 +1,11 @@ -/* $NetBSD: fgetws.c,v 1.2 2006/07/03 17:06:36 tnozaki Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fgetws.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,58 +28,85 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Original version ID: - * FreeBSD: src/lib/libc/stdio/fgetws.c,v 1.4 2002/09/20 13:25:40 tjr Exp - * + * $FreeBSD: head/lib/libc/stdio/fgetws.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" -#include #include #include +#include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "mblocal.h" wchar_t * -fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp) +fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t locale) { + struct wchar_io_data *wcio; + mbstate_t *st; wchar_t *wsp; - wint_t wc; - - _DIAGASSERT(fp != NULL); - _DIAGASSERT(ws != NULL); + size_t nconv; + const char *src; + unsigned char *nl; + FIX_LOCALE(locale); + struct xlocale_ctype *l = XLOCALE_CTYPE(locale); FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); + ORIENT(fp, 1); + wcio = WCIO_GET(fp); + if (wcio == NULL) { + errno = ENOMEM; + goto error; + } if (n <= 0) { errno = EINVAL; goto error; } + wcio->wcio_ungetwc_inbuf = 0; + st = &wcio->wcio_mbstate_out; + + if (fp->pub._r <= 0 && __srefill(fp)) + /* EOF */ + goto error; wsp = ws; - while (n-- > 1) { - wc = __fgetwc_unlock(fp); - if (__sferror(fp) != 0) + do { + src = fp->pub._p; + nl = memchr(fp->pub._p, '\n', fp->pub._r); + nconv = l->__mbsnrtowcs(wsp, &src, + nl != NULL ? (nl - fp->pub._p + 1) : + fp->pub._r, n - 1, st); + if (nconv == (size_t)-1) + /* Conversion error */ goto error; - if (__sfeof(fp) != 0) { - if (wsp == ws) { - /* EOF/error, no characters read yet. */ - goto error; - } - break; + if (src == NULL) { + /* + * We hit a null byte. Increment the character count, + * since mbsnrtowcs()'s return value doesn't include + * the terminating null, then resume conversion + * after the null. + */ + nconv++; + src = memchr(fp->pub._p, '\0', fp->pub._r); + src++; } - *wsp++ = (wchar_t)wc; - if (wc == L'\n') { - break; - } - } - - *wsp++ = L'\0'; + fp->pub._r -= (unsigned char *)src - fp->pub._p; + fp->pub._p = (unsigned char *)src; + n -= nconv; + wsp += nconv; + } while (wsp[-1] != L'\n' && n > 1 && (fp->pub._r > 0 || + __srefill(fp) == 0)); + if (wsp == ws) + /* EOF */ + goto error; + if (!l->__mbsinit(st)) + /* Incomplete character */ + goto error; + *wsp = L'\0'; FUNLOCKFILE(fp); return (ws); @@ -86,3 +115,8 @@ error: FUNLOCKFILE(fp); return (NULL); } +wchar_t * +fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp) +{ + return fgetws_l(ws, n, fp, __get_locale()); +} diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c index c359348b01..02fb8e1f13 100644 --- a/lib/libc/stdio/findfp.c +++ b/lib/libc/stdio/findfp.c @@ -44,7 +44,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" int __sdidinit; diff --git a/lib/libc/stdio/fmemopen.c b/lib/libc/stdio/fmemopen.c index 4894e2de84..e8c1fb73c7 100644 --- a/lib/libc/stdio/fmemopen.c +++ b/lib/libc/stdio/fmemopen.c @@ -36,7 +36,6 @@ #include #include "local.h" -#include "priv_stdio.h" struct fmemopen_cookie { char *head, *tail, *cur, *eob; diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c index f44158ce28..fea41491b4 100644 --- a/lib/libc/stdio/fopen.c +++ b/lib/libc/stdio/fopen.c @@ -31,7 +31,6 @@ * * @(#)fopen.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fopen.c,v 1.14 2008/04/22 17:03:32 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/fopen.c,v 1.6 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -43,7 +42,6 @@ #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" FILE * fopen(const char * __restrict file, const char * __restrict mode) diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c index 279f619267..ba862c84a6 100644 --- a/lib/libc/stdio/fprintf.c +++ b/lib/libc/stdio/fprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,12 +35,13 @@ * SUCH DAMAGE. * * @(#)fprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/fprintf.c,v 1.11 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fprintf.c,v 1.4 2004/07/27 07:59:10 asmodai Exp $ + * $FreeBSD: head/lib/libc/stdio/fprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include #include +#include "xlocale_private.h" int fprintf(FILE * __restrict fp, const char * __restrict fmt, ...) @@ -44,7 +50,19 @@ fprintf(FILE * __restrict fp, const char * __restrict fmt, ...) va_list ap; va_start(ap, fmt); - ret = vfprintf(fp, fmt, ap); + ret = vfprintf_l(fp, __get_locale(), fmt, ap); + va_end(ap); + return (ret); +} +int +fprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt, ...) +{ + int ret; + va_list ap; + FIX_LOCALE(locale); + + va_start(ap, fmt); + ret = vfprintf_l(fp, locale, fmt, ap); va_end(ap); return (ret); } diff --git a/lib/libc/stdio/fpurge.c b/lib/libc/stdio/fpurge.c index f2917c9f1a..c9d4b7be21 100644 --- a/lib/libc/stdio/fpurge.c +++ b/lib/libc/stdio/fpurge.c @@ -31,7 +31,6 @@ * * @(#)fpurge.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fpurge.c,v 1.11 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fpurge.c,v 1.6 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" @@ -41,7 +40,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" /* * fpurge: like fflush, but without writing anything: leave the diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c index 552d32b18e..b26a982421 100644 --- a/lib/libc/stdio/fputs.c +++ b/lib/libc/stdio/fputs.c @@ -31,7 +31,6 @@ * * @(#)fputs.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fputs.c,v 1.12 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fputs.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" @@ -40,7 +39,6 @@ #include "un-namespace.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" /* * Write the given string to the given file. diff --git a/lib/libc/stdio/fputwc.c b/lib/libc/stdio/fputwc.c index 2fc90ba67c..fa472821e9 100644 --- a/lib/libc/stdio/fputwc.c +++ b/lib/libc/stdio/fputwc.c @@ -1,8 +1,11 @@ -/* $NetBSD: fputwc.c,v 1.4 2005/06/12 05:21:27 lukem Exp $ */ - /*- - * Copyright (c)2001 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,39 +28,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Citrus$ + * $FreeBSD: head/lib/libc/stdio/fputwc.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" -#include #include #include #include +#include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "mblocal.h" +/* + * Non-MT-safe version. + */ wint_t -__fputwc_unlock(wchar_t wc, FILE *fp) +__fputwc(wchar_t wc, FILE *fp, locale_t locale) { struct wchar_io_data *wcio; mbstate_t *st; - size_t size; char buf[MB_LEN_MAX]; - struct __suio uio; - struct __siov iov; - - _DIAGASSERT(fp != NULL); - - /* LINTED we don't play with buf */ - iov.iov_base = (void *)buf; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; + size_t i, len; + struct xlocale_ctype *l = XLOCALE_CTYPE(locale); - _SET_ORIENTATION(fp, 1); + ORIENT(fp, 1); wcio = WCIO_GET(fp); if (wcio == NULL) { errno = ENOMEM; @@ -67,32 +65,45 @@ __fputwc_unlock(wchar_t wc, FILE *fp) wcio->wcio_ungetwc_inbuf = 0; st = &wcio->wcio_mbstate_out; - size = wcrtomb(buf, wc, st); - if (size == (size_t)-1) { - errno = EILSEQ; - return WEOF; + if (MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX) { + /* + * Assume single-byte locale with no special encoding. + * A more careful test would be to check + * _CurrentRuneLocale->encoding. + */ + *buf = (unsigned char)wc; + len = 1; + } else { + if ((len = l->__wcrtomb(buf, wc, st)) == (size_t)-1) { + fp->pub._flags |= __SERR; + return (WEOF); + } } - _DIAGASSERT(size != 0); - - uio.uio_resid = iov.iov_len = size; - if (__sfvwrite(fp, &uio)) { - return WEOF; - } + for (i = 0; i < len; i++) + if (__sputc((unsigned char)buf[i], fp) == EOF) + return (WEOF); - return (wint_t)wc; + return ((wint_t)wc); } +/* + * MT-safe version. + */ wint_t -fputwc(wchar_t wc, FILE *fp) +fputwc_l(wchar_t wc, FILE *fp, locale_t locale) { wint_t r; - - _DIAGASSERT(fp != NULL); + FIX_LOCALE(locale); FLOCKFILE(fp); - r = __fputwc_unlock(wc, fp); + r = __fputwc(wc, fp, locale); FUNLOCKFILE(fp); return (r); } +wint_t +fputwc(wchar_t wc, FILE *fp) +{ + return fputwc_l(wc, fp, __get_locale()); +} diff --git a/lib/libc/stdio/fputws.3 b/lib/libc/stdio/fputws.3 index 826a29724d..d6bd5d8f3a 100644 --- a/lib/libc/stdio/fputws.3 +++ b/lib/libc/stdio/fputws.3 @@ -1,6 +1,3 @@ -.\" $NetBSD: fputws.3,v 1.2 2003/08/07 16:43:24 agc Exp $ -.\" $DragonFly: src/lib/libc/stdio/fputws.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ -.\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -33,10 +30,8 @@ .\" SUCH DAMAGE. .\" .\" @(#)fputs.3 8.1 (Berkeley) 6/4/93 -.\" -.\" Original version ID: .\" FreeBSD: src/lib/libc/stdio/fputs.3,v 1.8 2001/10/01 16:08:59 ru Exp -.\" FreeBSD: src/lib/libc/stdio/fputws.c,v 1.4 2002/09/20 13:25:40 tjr Exp +.\" $FreeBSD: head/lib/libc/stdio/fputws.3 165903 2007-01-09 00:28:16Z imp $ .\" .Dd August 6, 2002 .Dt FPUTWS 3 @@ -64,6 +59,9 @@ The function returns 0 on success and \-1 on error. .Sh ERRORS +The +.Fn fputws +function will fail if: .Bl -tag -width Er .It Bq Er EBADF The diff --git a/lib/libc/stdio/fputws.c b/lib/libc/stdio/fputws.c index 76bdf618e0..228721a424 100644 --- a/lib/libc/stdio/fputws.c +++ b/lib/libc/stdio/fputws.c @@ -1,9 +1,11 @@ -/* $NetBSD: fputws.c,v 1.1 2003/03/07 07:11:37 tshiozak Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fputws.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ - /*- - * Copyright (c) 2002 Tim J. Robbins. + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,38 +28,66 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Original version ID: - * FreeBSD: src/lib/libc/stdio/fputws.c,v 1.4 2002/09/20 13:25:40 tjr Exp + * $FreeBSD: head/lib/libc/stdio/fputws.c 234536 2012-04-21 07:31:27Z das $ */ + #include "namespace.h" -#include #include +#include #include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "mblocal.h" int -fputws(const wchar_t * __restrict ws, FILE * __restrict fp) +fputws_l(const wchar_t * __restrict ws, FILE * __restrict fp, locale_t locale) { - _DIAGASSERT(fp != NULL); - _DIAGASSERT(ws != NULL); + struct wchar_io_data *wcio; + mbstate_t *st; + size_t nbytes; + char buf[BUFSIZ]; + struct __suio uio; + struct __siov iov; + const wchar_t *wsp; + FIX_LOCALE(locale); + struct xlocale_ctype *l = XLOCALE_CTYPE(locale); FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); + ORIENT(fp, 1); + wcio = WCIO_GET(fp); + if (wcio == NULL) + goto error; + wcio->wcio_ungetwc_inbuf = 0; + st = &wcio->wcio_mbstate_out; - while (*ws != '\0') { - if (__fputwc_unlock(*ws++, fp) == WEOF) { - FUNLOCKFILE(fp); - return (-1); - } - } + if (prepwrite(fp) != 0) + goto error; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + iov.iov_base = buf; + wsp = ws; + do { + nbytes = l->__wcsnrtombs(buf, &wsp, SIZE_T_MAX, sizeof(buf), + st); + if (nbytes == (size_t)-1) + goto error; + iov.iov_len = uio.uio_resid = nbytes; + if (__sfvwrite(fp, &uio) != 0) + goto error; + } while (wsp != NULL); + FUNLOCKFILE(fp); + return (0); +error: FUNLOCKFILE(fp); + return (-1); +} - return (0); +int +fputws(const wchar_t * __restrict ws, FILE * __restrict fp) +{ + return fputws_l(ws, fp, __get_locale()); } diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c index 59062771ed..56f86a1796 100644 --- a/lib/libc/stdio/fread.c +++ b/lib/libc/stdio/fread.c @@ -31,7 +31,6 @@ * * @(#)fread.c 8.2 (Berkeley) 12/11/93 * $FreeBSD: src/lib/libc/stdio/fread.c,v 1.15 2008/12/01 14:33:34 ru Exp $ - * $DragonFly: src/lib/libc/stdio/fread.c,v 1.8 2005/12/20 00:21:53 davidxu Exp $ */ #include "namespace.h" @@ -40,7 +39,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" /* * MT-safe version diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c index e8f10f18e8..f196b89459 100644 --- a/lib/libc/stdio/freopen.c +++ b/lib/libc/stdio/freopen.c @@ -31,7 +31,6 @@ * * @(#)freopen.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/freopen.c,v 1.21 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/freopen.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -45,7 +44,6 @@ #include "un-namespace.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" /* * Re-direct an existing, open (probably) file to some other file. diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c index afbe6fb402..ccf5613975 100644 --- a/lib/libc/stdio/fscanf.c +++ b/lib/libc/stdio/fscanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,26 +35,41 @@ * SUCH DAMAGE. * * @(#)fscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/fscanf.c,v 1.13 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fscanf.c,v 1.4 2005/01/31 22:29:40 dillon Exp $ + * $FreeBSD: head/lib/libc/stdio/fscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include "namespace.h" #include #include #include "un-namespace.h" #include "libc_private.h" #include "local.h" +#include "xlocale_private.h" + +int +fscanf(FILE * __restrict fp, char const * __restrict fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + FLOCKFILE(fp); + ret = __svfscanf(fp, __get_locale(), fmt, ap); + va_end(ap); + FUNLOCKFILE(fp); + return (ret); +} int -fscanf(FILE * __restrict fp, const char * __restrict fmt, ...) +fscanf_l(FILE * __restrict fp, locale_t locale, char const * __restrict fmt, ...) { int ret; va_list ap; + FIX_LOCALE(locale); va_start(ap, fmt); FLOCKFILE(fp); - ret = __svfscanf(fp, fmt, ap); + ret = __svfscanf(fp, locale, fmt, ap); va_end(ap); FUNLOCKFILE(fp); return (ret); diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c index 4362291b08..ad43eedbdb 100644 --- a/lib/libc/stdio/fseek.c +++ b/lib/libc/stdio/fseek.c @@ -31,7 +31,6 @@ * * @(#)fseek.c 8.3 (Berkeley) 1/2/94 * $FreeBSD: src/lib/libc/stdio/fseek.c,v 1.44 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/fseek.c,v 1.10 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -45,7 +44,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" #define POS_ERR (-(fpos_t)1) diff --git a/lib/libc/stdio/ftell.c b/lib/libc/stdio/ftell.c index 2998333402..a3ab9caecc 100644 --- a/lib/libc/stdio/ftell.c +++ b/lib/libc/stdio/ftell.c @@ -31,7 +31,6 @@ * * @(#)ftell.c 8.2 (Berkeley) 5/4/95 * $FreeBSD: src/lib/libc/stdio/ftell.c,v 1.27 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/ftell.c,v 1.6 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" @@ -42,7 +41,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" /* * standard ftell function. diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c index 263a5db887..e18a98c45d 100644 --- a/lib/libc/stdio/funopen.c +++ b/lib/libc/stdio/funopen.c @@ -31,14 +31,12 @@ * * @(#)funopen.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/funopen.c,v 1.6 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/funopen.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include #include #include "local.h" -#include "priv_stdio.h" FILE * funopen(const void *cookie, int (*readfn)(void *, char *, int), diff --git a/lib/libc/stdio/fvwrite.c b/lib/libc/stdio/fvwrite.c index 5c8430911b..b6a07a6d80 100644 --- a/lib/libc/stdio/fvwrite.c +++ b/lib/libc/stdio/fvwrite.c @@ -30,15 +30,13 @@ * SUCH DAMAGE. * * @(#)fvwrite.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/fvwrite.c,v 1.18 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fvwrite.c,v 1.7 2005/07/23 20:23:06 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/fvwrite.c 249810 2013-04-23 14:36:44Z emaste $ */ #include #include #include #include "local.h" -#include "priv_stdio.h" /* * Write some memory regions. Return zero on success, EOF on error. @@ -56,25 +54,25 @@ __sfvwrite(FILE *fp, struct __suio *uio) char *nl; int nlknown, nldist; - if ((len = uio->uio_resid) == 0) + if (uio->uio_resid == 0) return (0); /* make sure we can write */ if (prepwrite(fp) != 0) return (EOF); -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define COPY(n) memcpy((void *)fp->pub._p, (void *)p, (size_t)(n)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define COPY(n) (void)memcpy((void *)fp->pub._p, (void *)p, (size_t)(n)) iov = uio->uio_iov; p = iov->iov_base; len = iov->iov_len; iov++; -#define GETIOV(extra_work) \ - while (len == 0) { \ - extra_work; \ - p = iov->iov_base; \ - len = iov->iov_len; \ - iov++; \ +#define GETIOV(extra_work) \ + while (len == 0) { \ + extra_work; \ + p = iov->iov_base; \ + len = iov->iov_len; \ + iov++; \ } if (fp->pub._flags & __SNBF) { /* @@ -123,7 +121,7 @@ __sfvwrite(FILE *fp, struct __suio *uio) if (len < w) w = len; if (w > 0) { - COPY(w); /* copy MIN(fp->pub._w, len), */ + COPY(w); /* copy MIN(fp->pub._w,len), */ fp->pub._w -= w; fp->pub._p += w; } diff --git a/lib/libc/stdio/fwalk.c b/lib/libc/stdio/fwalk.c index 13a3f135ad..e18a57864d 100644 --- a/lib/libc/stdio/fwalk.c +++ b/lib/libc/stdio/fwalk.c @@ -31,14 +31,12 @@ * * @(#)fwalk.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fwalk.c,v 1.10 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fwalk.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include #include #include #include "local.h" -#include "priv_stdio.h" int _fwalk(int (*function)(FILE *)) diff --git a/lib/libc/stdio/fwide.c b/lib/libc/stdio/fwide.c index 48a177759c..9cb337dbc3 100644 --- a/lib/libc/stdio/fwide.c +++ b/lib/libc/stdio/fwide.c @@ -1,5 +1,4 @@ /* $NetBSD: fwide.c,v 1.3 2005/06/12 05:21:27 lukem Exp $ */ -/* $DragonFly: src/lib/libc/stdio/fwide.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ */ /*- * Copyright (c)2001 Citrus Project, @@ -37,7 +36,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" int fwide(FILE *fp, int mode) diff --git a/lib/libc/stdio/fwprintf.c b/lib/libc/stdio/fwprintf.c index 479f9b3832..a71222fb7e 100644 --- a/lib/libc/stdio/fwprintf.c +++ b/lib/libc/stdio/fwprintf.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/fwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/fwprintf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/fwprintf.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include +#include int fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) @@ -43,3 +49,15 @@ fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) return (ret); } +int +fwprintf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vfwprintf_l(fp, locale, fmt, ap); + va_end(ap); + + return (ret); +} diff --git a/lib/libc/stdio/fwrite.c b/lib/libc/stdio/fwrite.c index 222bec500c..cb8502e11f 100644 --- a/lib/libc/stdio/fwrite.c +++ b/lib/libc/stdio/fwrite.c @@ -31,14 +31,12 @@ * * @(#)fwrite.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/fwrite.c,v 1.12 2007/01/09 00:28:06 imp Exp $ - * $DragonFly: src/lib/libc/stdio/fwrite.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" #include #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" #include "libc_private.h" /* diff --git a/lib/libc/stdio/fwscanf.c b/lib/libc/stdio/fwscanf.c index fd4ecdf3f8..37c4d42295 100644 --- a/lib/libc/stdio/fwscanf.c +++ b/lib/libc/stdio/fwscanf.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/fwscanf.c,v 1.1 2002/09/23 12:40:06 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/fwscanf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/fwscanf.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include +#include int fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) @@ -43,3 +49,15 @@ fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) return (r); } +int +fwscanf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...) +{ + va_list ap; + int r; + + va_start(ap, fmt); + r = vfwscanf_l(fp, locale, fmt, ap); + va_end(ap); + + return (r); +} diff --git a/lib/libc/stdio/getdelim.c b/lib/libc/stdio/getdelim.c index 48461577ee..bda9fd9549 100644 --- a/lib/libc/stdio/getdelim.c +++ b/lib/libc/stdio/getdelim.c @@ -37,7 +37,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" static inline size_t p2roundup(size_t n) diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c index afa575a4e4..bddc04fdd1 100644 --- a/lib/libc/stdio/gets.c +++ b/lib/libc/stdio/gets.c @@ -39,7 +39,6 @@ #include "un-namespace.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" __warn_references(gets, "warning: this program uses gets(), which is unsafe."); diff --git a/lib/libc/stdio/getwc.c b/lib/libc/stdio/getwc.c index 4eb88d0e5c..532280b141 100644 --- a/lib/libc/stdio/getwc.c +++ b/lib/libc/stdio/getwc.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/getwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/getwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/getwc.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" #include #include +#include #include "un-namespace.h" #include "libc_private.h" #include "local.h" @@ -46,3 +52,9 @@ getwc(FILE *fp) return (fgetwc(fp)); } +wint_t +getwc_l(FILE *fp, locale_t locale) +{ + + return (fgetwc_l(fp, locale)); +} diff --git a/lib/libc/stdio/getwchar.c b/lib/libc/stdio/getwchar.c index 00f40d8eaa..bc3dfc40e3 100644 --- a/lib/libc/stdio/getwchar.c +++ b/lib/libc/stdio/getwchar.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/getwchar.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/getwchar.c,v 1.2 2005/11/20 11:07:30 swildner Exp $ + * $FreeBSD: head/lib/libc/stdio/getwchar.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" #include #include +#include #include "un-namespace.h" #include "libc_private.h" #include "local.h" @@ -42,6 +48,10 @@ wint_t getwchar(void) { - return (fgetwc(stdin)); } +wint_t +getwchar_l(locale_t locale) +{ + return (fgetwc_l(stdin, locale)); +} diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index 6c8b010bcf..815343a05c 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -30,15 +35,17 @@ * SUCH DAMAGE. * * @(#)local.h 8.3 (Berkeley) 7/3/94 - * $FreeBSD: src/lib/libc/stdio/local.h,v 1.33 2008/05/05 16:03:52 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/local.h,v 1.11 2007/11/25 01:28:22 swildner Exp $ + * $FreeBSD: head/lib/libc/stdio/local.h 234799 2012-04-29 16:28:39Z das $ */ #include /* for off_t */ #include #include #include +#include +#include +#include "priv_stdio.h" #include "wcio.h" /* @@ -47,20 +54,20 @@ */ extern int _sread(FILE *, char *, int); -extern int _swrite(FILE *, const char *, int); +extern int _swrite(FILE *, char const *, int); extern fpos_t _sseek(FILE *, fpos_t, int); extern int _ftello(FILE *, fpos_t *); extern int _fseeko(FILE *, off_t, int, int); extern int __fflush(FILE *fp); extern void __fcloseall(void); -extern wint_t __fgetwc_unlock(FILE *); -extern wint_t __fputwc_unlock(wchar_t, FILE *); +extern wint_t __fgetwc_mbs(FILE *, mbstate_t *, int *, locale_t); +extern wint_t __fputwc(wchar_t, FILE *, locale_t); extern int __sflush(FILE *); extern FILE *__sfp(void); extern int __slbexpand(FILE *, size_t); extern int __srefill(FILE *); extern int __sread(void *, char *, int); -extern int __swrite(void *, const char *, int); +extern int __swrite(void *, char const *, int); extern fpos_t __sseek(void *, fpos_t, int); extern int __sclose(void *); extern void __sinit(void); @@ -68,19 +75,38 @@ extern void _cleanup(void); extern void __smakebuf(FILE *); extern int __swhatbuf(FILE *, size_t *, int *); extern int _fwalk(int (*)(FILE *)); -extern int __svfscanf(FILE *, const char *, __va_list); +extern int __svfscanf(FILE *, locale_t, const char *, __va_list); extern int __swsetup(FILE *); extern int __sflags(const char *, int *); extern int __ungetc(int, FILE *); -extern int __vfprintf(FILE *, const char *, __va_list); +extern wint_t __ungetwc(wint_t, FILE *, locale_t); +extern int __vfprintf(FILE *, locale_t, const char *, __va_list); extern int __vfscanf(FILE *, const char *, __va_list); -extern int __vfwprintf(FILE *, const wchar_t *, __va_list); -extern int __vfwscanf(FILE * __restrict, const wchar_t * __restrict, - __va_list); +extern int __vfwprintf(FILE *, locale_t, const wchar_t *, __va_list); +extern int __vfwscanf(FILE * __restrict, locale_t, const wchar_t * __restrict, + __va_list); extern size_t __fread(void * __restrict buf, size_t size, size_t count, - FILE * __restrict fp); + FILE * __restrict fp); extern int __sdidinit; +static inline wint_t +__fgetwc(FILE *fp, locale_t locale) +{ + int nread; + struct wchar_io_data *wcio; + mbstate_t *st; + + _SET_ORIENTATION(fp,1); + wcio = WCIO_GET(fp); + + if (wcio == NULL) { + return WEOF; + } + wcio->wcio_ungetwc_inbuf = 0; + st = &wcio->wcio_mbstate_out; + + return (__fgetwc_mbs(fp, st, &nread, locale)); +} /* * Prepare the given FILE for writing, and return 0 iff it @@ -111,6 +137,13 @@ extern int __sdidinit; (fp)->_lb._base = NULL; \ } +/* + * Structure initializations for 'fake' FILE objects. + */ +#define FAKE_FILE { \ + .pub._fileno = -1, \ +} + /* * Set the orientation for a stream. If o > 0, the stream has wide- * orientation. If o < 0, the stream has byte-orientation. diff --git a/lib/libc/stdio/makebuf.c b/lib/libc/stdio/makebuf.c index 06bbdf23e3..5ec30efcb8 100644 --- a/lib/libc/stdio/makebuf.c +++ b/lib/libc/stdio/makebuf.c @@ -31,7 +31,6 @@ * * @(#)makebuf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/makebuf.c,v 1.6 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/makebuf.c,v 1.6 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" @@ -44,7 +43,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" /* * Allocate a file buffer, or switch to unbuffered I/O. diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c index 98db44d7d7..c22584ba53 100644 --- a/lib/libc/stdio/perror.c +++ b/lib/libc/stdio/perror.c @@ -28,7 +28,6 @@ * * @(#)perror.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/perror.c,v 1.9 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/perror.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -42,7 +41,6 @@ #include "un-namespace.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" void perror(const char *s) diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c index cc3a28d2ad..56120d20ea 100644 --- a/lib/libc/stdio/printf.c +++ b/lib/libc/stdio/printf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,15 +35,16 @@ * SUCH DAMAGE. * * @(#)printf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/printf.c,v 1.11 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/printf.c,v 1.3 2004/06/07 20:35:41 hmp Exp $ + * $FreeBSD: head/lib/libc/stdio/printf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include #include +#include int -printf(const char * __restrict fmt, ...) +printf(char const * __restrict fmt, ...) { int ret; va_list ap; @@ -48,3 +54,14 @@ printf(const char * __restrict fmt, ...) va_end(ap); return (ret); } +int +printf_l(locale_t locale, char const * __restrict fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vfprintf_l(stdout, locale, fmt, ap); + va_end(ap); + return (ret); +} diff --git a/lib/libc/stdio/printfcommon.h b/lib/libc/stdio/printfcommon.h index bf2f7baa3e..9147bff126 100644 --- a/lib/libc/stdio/printfcommon.h +++ b/lib/libc/stdio/printfcommon.h @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -29,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/printfcommon.h,v 1.4 2009/01/22 08:14:28 das Exp $ + * $FreeBSD: head/lib/libc/stdio/printfcommon.h 227753 2011-11-20 14:45:42Z theraven $ */ /* @@ -79,14 +84,14 @@ io_init(struct io_state *iop, FILE *fp) * remain valid until io_flush() is called. */ static inline int -io_print(struct io_state *iop, const CHAR * __restrict ptr, int len) +io_print(struct io_state *iop, const CHAR * __restrict ptr, int len, locale_t locale) { - iop->iov[iop->uio.uio_iovcnt].iov_base = __DECONST(char *, ptr); + iop->iov[iop->uio.uio_iovcnt].iov_base = (char *)ptr; iop->iov[iop->uio.uio_iovcnt].iov_len = len; iop->uio.uio_resid += len; if (++iop->uio.uio_iovcnt >= NIOV) - return (__sprint(iop->fp, &iop->uio)); + return (__sprint(iop->fp, &iop->uio, locale)); else return (0); } @@ -107,13 +112,14 @@ static const CHAR zeroes[PADSIZE] = * or the zeroes array. */ static inline int -io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with) +io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with, + locale_t locale) { int n; while (howmany > 0) { n = (howmany >= PADSIZE) ? PADSIZE : howmany; - if (io_print(iop, with, n)) + if (io_print(iop, with, n, locale)) return (-1); howmany -= n; } @@ -126,7 +132,7 @@ io_pad(struct io_state *iop, int howmany, const CHAR * __restrict with) */ static inline int io_printandpad(struct io_state *iop, const CHAR *p, const CHAR *ep, - int len, const CHAR * __restrict with) + int len, const CHAR * __restrict with, locale_t locale) { int p_len; @@ -134,19 +140,19 @@ io_printandpad(struct io_state *iop, const CHAR *p, const CHAR *ep, if (p_len > len) p_len = len; if (p_len > 0) { - if (io_print(iop, p, p_len)) + if (io_print(iop, p, p_len, locale)) return (-1); } else { p_len = 0; } - return (io_pad(iop, len - p_len, with)); + return (io_pad(iop, len - p_len, with, locale)); } static inline int -io_flush(struct io_state *iop) +io_flush(struct io_state *iop, locale_t locale) { - return (__sprint(iop->fp, &iop->uio)); + return (__sprint(iop->fp, &iop->uio, locale)); } /* diff --git a/lib/libc/stdio/puts.c b/lib/libc/stdio/puts.c index 03ea7a950d..1d7d37333f 100644 --- a/lib/libc/stdio/puts.c +++ b/lib/libc/stdio/puts.c @@ -31,14 +31,12 @@ * * @(#)puts.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/puts.c,v 1.11 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/puts.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include "namespace.h" #include #include #include "un-namespace.h" -#include "priv_stdio.h" #include "libc_private.h" #include "local.h" diff --git a/lib/libc/stdio/putwc.c b/lib/libc/stdio/putwc.c index 6c0aebf93d..6e32969e08 100644 --- a/lib/libc/stdio/putwc.c +++ b/lib/libc/stdio/putwc.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,16 +28,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/putwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/putwc.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/putwc.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" #include #include #include "un-namespace.h" #include "libc_private.h" #include "local.h" +#include "xlocale_private.h" #undef putwc @@ -41,8 +47,13 @@ * macro, may evaluate `fp' more than once. */ wint_t +putwc_l(wchar_t wc, FILE *fp, locale_t locale) +{ + FIX_LOCALE(locale); + return (fputwc_l(wc, fp, locale)); +} +wint_t putwc(wchar_t wc, FILE *fp) { - - return (fputwc(wc, fp)); + return putwc_l(wc, fp, __get_locale()); } diff --git a/lib/libc/stdio/putwchar.c b/lib/libc/stdio/putwchar.c index 038a14eb81..901cd3c9da 100644 --- a/lib/libc/stdio/putwchar.c +++ b/lib/libc/stdio/putwchar.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,16 +28,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/putwchar.c,v 1.3 2004/05/25 10:42:52 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/putwchar.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/putwchar.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" #include #include #include "un-namespace.h" #include "libc_private.h" #include "local.h" +#include "xlocale_private.h" #undef putwchar @@ -40,8 +46,13 @@ * Synonym for fputwc(wc, stdout). */ wint_t +putwchar_l(wchar_t wc, locale_t locale) +{ + FIX_LOCALE(locale); + return (fputwc_l(wc, stdout, locale)); +} +wint_t putwchar(wchar_t wc) { - - return (fputwc(wc, stdout)); + return putwchar_l(wc, __get_locale()); } diff --git a/lib/libc/stdio/refill.c b/lib/libc/stdio/refill.c index e83a8c3e4a..8f8283f20e 100644 --- a/lib/libc/stdio/refill.c +++ b/lib/libc/stdio/refill.c @@ -31,7 +31,6 @@ * * @(#)refill.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/refill.c,v 1.20 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/refill.c,v 1.10 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -42,7 +41,6 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" static int lflush(FILE *); diff --git a/lib/libc/stdio/rget.c b/lib/libc/stdio/rget.c index 5434168fbd..bfa017244e 100644 --- a/lib/libc/stdio/rget.c +++ b/lib/libc/stdio/rget.c @@ -31,12 +31,10 @@ * * @(#)rget.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/rget.c,v 1.6 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/rget.c,v 1.3 2005/07/23 20:23:06 joerg Exp $ */ #include #include "local.h" -#include "priv_stdio.h" /* * Handle getc() when the buffer ran out: diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index 8cc58b6592..5e4328d02b 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)scanf.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/stdio/scanf.3,v 1.25 2007/01/09 00:28:07 imp Exp $ -.\" $DragonFly: src/lib/libc/stdio/scanf.3,v 1.3 2006/08/26 10:27:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/stdio/scanf.3 235363 2012-05-12 20:27:13Z joel $ .\" .Dd August 26, 2006 .Dt SCANF 3 @@ -371,10 +370,10 @@ The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket -.Cm [ +.Cm \&[ character and a close bracket -.Cm ] +.Cm \&] character. The set .Em excludes diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c index fd8286125c..1b740f1902 100644 --- a/lib/libc/stdio/scanf.c +++ b/lib/libc/stdio/scanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,26 +35,41 @@ * SUCH DAMAGE. * * @(#)scanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/scanf.c,v 1.13 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/scanf.c,v 1.4 2005/01/31 22:29:40 dillon Exp $ + * $FreeBSD: head/lib/libc/stdio/scanf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include "namespace.h" #include #include #include "un-namespace.h" #include "libc_private.h" #include "local.h" +#include "xlocale_private.h" + +int +scanf(char const * __restrict fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + FLOCKFILE(stdin); + ret = __svfscanf(stdin, __get_locale(), fmt, ap); + FUNLOCKFILE(stdin); + va_end(ap); + return (ret); +} int -scanf(const char * __restrict fmt, ...) +scanf_l(locale_t locale, char const * __restrict fmt, ...) { int ret; va_list ap; + FIX_LOCALE(locale); va_start(ap, fmt); FLOCKFILE(stdin); - ret = __svfscanf(stdin, fmt, ap); + ret = __svfscanf(stdin, locale, fmt, ap); FUNLOCKFILE(stdin); va_end(ap); return (ret); diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c index 0afad968c6..9f998d4ea1 100644 --- a/lib/libc/stdio/setvbuf.c +++ b/lib/libc/stdio/setvbuf.c @@ -31,7 +31,6 @@ * * @(#)setvbuf.c 8.2 (Berkeley) 11/16/93 * $FreeBSD: src/lib/libc/stdio/setvbuf.c,v 1.14 2007/01/09 00:28:07 imp Exp $ - * $DragonFly: src/lib/libc/stdio/setvbuf.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -40,7 +39,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" /* * Set one of the three kinds of buffering, optionally including diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 20d51905ba..3c8e8eff00 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -2,6 +2,11 @@ * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * This code is derived from software contributed to Berkeley by * Chris Torek. * @@ -30,37 +35,67 @@ * SUCH DAMAGE. * * @(#)snprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/snprintf.c,v 1.22 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/snprintf.c,v 1.7 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/snprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ + +#include #include #include #include +#include "xlocale_private.h" #include "local.h" -#include "priv_stdio.h" int -snprintf(char * __restrict str, size_t n, const char * __restrict fmt, ...) +snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) +{ + size_t on; + int ret; + va_list ap; + FILE f = FAKE_FILE; + + on = n; + if (n != 0) + n--; + if (n > INT_MAX) { + errno = EOVERFLOW; + *str = '\0'; + return (EOF); + } + va_start(ap, fmt); + f.pub._flags = __SWR | __SSTR; + f._bf._base = f.pub._p = (unsigned char *)str; + f._bf._size = f.pub._w = n; + ret = __vfprintf(&f, __get_locale(), fmt, ap); + if (on > 0) + *f.pub._p = '\0'; + va_end(ap); + return (ret); +} +int +snprintf_l(char * __restrict str, size_t n, locale_t locale, + char const * __restrict fmt, ...) { size_t on; int ret; va_list ap; - FILE f; + FILE f = FAKE_FILE; + FIX_LOCALE(locale); on = n; if (n != 0) n--; - if (n > INT_MAX) - n = INT_MAX; + if (n > INT_MAX) { + errno = EOVERFLOW; + *str = '\0'; + return (EOF); + } va_start(ap, fmt); - f.pub._fileno = -1; f.pub._flags = __SWR | __SSTR; f._bf._base = f.pub._p = (unsigned char *)str; f._bf._size = f.pub._w = n; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - ret = __vfprintf(&f, fmt, ap); + ret = __vfprintf(&f, locale, fmt, ap); if (on > 0) *f.pub._p = '\0'; va_end(ap); diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index 4186879827..b21b78d0c7 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,31 +35,37 @@ * SUCH DAMAGE. * * @(#)sprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/sprintf.c,v 1.16 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/sprintf.c,v 1.7 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/sprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" int -sprintf(char * __restrict str, const char * __restrict fmt, ...) +sprintf(char * __restrict str, char const * __restrict fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vsprintf(str, fmt, ap); + va_end(ap); + return (ret); +} +int +sprintf_l(char * __restrict str, locale_t locale, char const * __restrict fmt, + ...) { int ret; va_list ap; - FILE f; + FIX_LOCALE(locale); - f.pub._fileno = -1; - f.pub._flags = __SWR | __SSTR; - f._bf._base = f.pub._p = (unsigned char *)str; - f._bf._size = f.pub._w = INT_MAX; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); va_start(ap, fmt); - ret = __vfprintf(&f, fmt, ap); + ret = vsprintf_l(str, locale, fmt, ap); va_end(ap); - *f.pub._p = 0; return (ret); } diff --git a/lib/libc/stdio/sreadahead.c b/lib/libc/stdio/sreadahead.c index 1885171bdd..e683f6b2e8 100644 --- a/lib/libc/stdio/sreadahead.c +++ b/lib/libc/stdio/sreadahead.c @@ -30,8 +30,6 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/lib/libc/stdio/sreadahead.c,v 1.1 2008/04/15 01:16:14 dillon Exp $ */ /* * This is an externalized internal function that the M4 package needs. @@ -46,7 +44,6 @@ #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" size_t __sreadahead(FILE *fp) diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c index 49392f1745..07987c773b 100644 --- a/lib/libc/stdio/sscanf.c +++ b/lib/libc/stdio/sscanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,43 +35,36 @@ * SUCH DAMAGE. * * @(#)sscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/sscanf.c,v 1.13 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/sscanf.c,v 1.9 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/sscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include #include #include +#include #include "local.h" -#include "priv_stdio.h" - -static int eofread(void *, char *, int); -/* ARGSUSED */ -static int -eofread(void *cookie __unused, char *buf __unused, int len __unused) +int +sscanf(const char * __restrict str, char const * __restrict fmt, ...) { + int ret; + va_list ap; - return (0); + va_start(ap, fmt); + ret = vsscanf(str, fmt, ap); + va_end(ap); + return (ret); } - int -sscanf(const char * __restrict str, const char * __restrict fmt, ...) +sscanf_l(const char * __restrict str, locale_t locale, + char const * __restrict fmt, ...) { int ret; va_list ap; - FILE f; - f.pub._fileno = -1; - f.pub._flags = __SRD; - f._bf._base = f.pub._p = (unsigned char *)str; - f._bf._size = f.pub._r = strlen(str); - f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); va_start(ap, fmt); - ret = __svfscanf(&f, fmt, ap); + ret = vsscanf_l(str, locale, fmt, ap); va_end(ap); return (ret); } diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c index 76f8bf9fcd..6dd3a3448e 100644 --- a/lib/libc/stdio/stdio.c +++ b/lib/libc/stdio/stdio.c @@ -31,7 +31,6 @@ * * @(#)stdio.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/stdio.c,v 1.28 2008/05/05 16:14:02 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/stdio.c,v 1.7 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -43,7 +42,6 @@ #include #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" /* * Small standard I/O/seek/close functions. diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c index 78d6847a3f..c1d32fb9f9 100644 --- a/lib/libc/stdio/ungetc.c +++ b/lib/libc/stdio/ungetc.c @@ -31,7 +31,6 @@ * * @(#)ungetc.c 8.2 (Berkeley) 11/3/93 * $FreeBSD: src/lib/libc/stdio/ungetc.c,v 1.18 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/ungetc.c,v 1.8 2005/11/20 11:07:30 swildner Exp $ */ #include "namespace.h" @@ -41,7 +40,6 @@ #include "un-namespace.h" #include "local.h" #include "libc_private.h" -#include "priv_stdio.h" static int __submore(FILE *); diff --git a/lib/libc/stdio/ungetwc.3 b/lib/libc/stdio/ungetwc.3 index afcc277f55..0a1720ad47 100644 --- a/lib/libc/stdio/ungetwc.3 +++ b/lib/libc/stdio/ungetwc.3 @@ -1,5 +1,4 @@ -.\" $NetBSD: ungetwc.3,v 1.7 2003/09/08 17:54:32 wiz Exp $ -.\" $DragonFly: src/lib/libc/stdio/ungetwc.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ +.\" $NetBSD: ungetwc.3,v 1.3 2002/02/07 07:00:27 ross Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,13 +32,14 @@ .\" SUCH DAMAGE. .\" .\" @(#)ungetc.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/stdio/ungetwc.3 165903 2007-01-09 00:28:16Z imp $ .\" -.Dd October 24, 2001 +.Dd March 3, 2004 .Dt UNGETWC 3 .Os .Sh NAME .Nm ungetwc -.Nd un-get wide-character from input stream +.Nd un-get wide character from input stream .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -50,12 +50,13 @@ .Sh DESCRIPTION The .Fn ungetwc -function pushes the wide-character +function pushes the wide character .Fa wc -(converted to an wchar_t) +(converted to an +.Vt wchar_t ) back onto the input stream pointed to by .Fa stream . -The pushed-backed wide-characters will be returned by subsequent reads on the +The pushed-backed wide characters will be returned by subsequent reads on the stream (in reverse order). A successful intervening call, using the same stream, to one of the file positioning functions @@ -63,9 +64,9 @@ positioning functions .Xr fsetpos 3 , or .Xr rewind 3 -will discard the pushed back wide-characters. +will discard the pushed back wide characters. .Pp -One wide-character of push-back is guaranteed, +One wide character of push-back is guaranteed, but as long as there is sufficient memory, an effectively infinite amount of pushback is allowed. .Pp @@ -76,7 +77,7 @@ The .Fn ungetwc function returns -the wide-character pushed-back after the conversion, or +the wide character pushed-back after the conversion, or .Dv WEOF if the operation fails. If the value of the argument @@ -92,5 +93,3 @@ The .Fn ungetwc function conforms to .St -isoC-99 . -.Sh BUGS -The current implementation uses a fixed sized ungetwc-buffer. diff --git a/lib/libc/stdio/ungetwc.c b/lib/libc/stdio/ungetwc.c index 0373a94808..ca1f861fc9 100644 --- a/lib/libc/stdio/ungetwc.c +++ b/lib/libc/stdio/ungetwc.c @@ -1,8 +1,11 @@ -/* $NetBSD: ungetwc.c,v 1.3 2005/06/12 05:21:27 lukem Exp $ */ - /*- - * Copyright (c)2001 Citrus Project, + * Copyright (c) 2002-2004 Tim J. Robbins. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,53 +28,73 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Citrus$ + * $FreeBSD: head/lib/libc/stdio/ungetwc.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include "namespace.h" -#include #include +#include #include +#include #include #include "un-namespace.h" - #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "mblocal.h" +#include "xlocale_private.h" +/* + * Non-MT-safe version. + */ wint_t -ungetwc(wint_t wc, FILE *fp) +__ungetwc(wint_t wc, FILE *fp, locale_t locale) { + char buf[MB_LEN_MAX]; + size_t len; + struct xlocale_ctype *l = XLOCALE_CTYPE(locale); struct wchar_io_data *wcio; + mbstate_t *st; - _DIAGASSERT(fp); + ORIENT(fp,1); + wcio = WCIO_GET(fp); if (wc == WEOF) - return WEOF; - - FLOCKFILE(fp); - _SET_ORIENTATION(fp, 1); - /* - * XXX since we have no way to transform a wchar string to - * a char string in reverse order, we can't use ungetc. - */ - /* XXX should we flush ungetc buffer? */ - - wcio = WCIO_GET(fp); + return (WEOF); if (wcio == NULL) { - FUNLOCKFILE(fp); - errno = ENOMEM; /* XXX */ - return WEOF; + return (WEOF); } - - if (wcio->wcio_ungetwc_inbuf >= WCIO_UNGETWC_BUFSIZE) { - FUNLOCKFILE(fp); - return WEOF; + wcio->wcio_ungetwc_inbuf = 0; + st = &wcio->wcio_mbstate_out; + if ((len = l->__wcrtomb(buf, wc, st)) == (size_t)-1) { + fp->pub._flags |= __SERR; + return (WEOF); } + while (len-- != 0) + if (__ungetc((unsigned char)buf[len], fp) == EOF) + return (WEOF); + + return (wc); +} + +/* + * MT-safe version. + */ +wint_t +ungetwc_l(wint_t wc, FILE *fp, locale_t locale) +{ + wint_t r; + FIX_LOCALE(locale); - wcio->wcio_ungetwc_buf[wcio->wcio_ungetwc_inbuf++] = wc; - __sclearerr(fp); + FLOCKFILE(fp); + ORIENT(fp, 1); + r = __ungetwc(wc, fp, locale); FUNLOCKFILE(fp); - return wc; + return (r); +} +wint_t +ungetwc(wint_t wc, FILE *fp) +{ + return ungetwc_l(wc, fp, __get_locale()); } diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c index 4b1772cad7..3c5f2abfd8 100644 --- a/lib/libc/stdio/vasprintf.c +++ b/lib/libc/stdio/vasprintf.c @@ -4,6 +4,11 @@ * Copyright (c) 1997 Todd C. Miller * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,33 +31,32 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/vasprintf.c,v 1.19 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/vasprintf.c,v 1.8 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vasprintf.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include +#include "xlocale_private.h" #include "local.h" -#include "priv_stdio.h" int -vasprintf(char **str, const char *fmt, __va_list ap) +vasprintf_l(char **str, locale_t locale, const char *fmt, __va_list ap) { + FILE f = FAKE_FILE; int ret; - FILE f; + FIX_LOCALE(locale); - f.pub._fileno = -1; f.pub._flags = __SWR | __SSTR | __SALC; - f._bf._base = f.pub._p = (unsigned char *)malloc(128); + f._bf._base = f.pub._p = malloc(128); if (f._bf._base == NULL) { *str = NULL; errno = ENOMEM; return (-1); } f._bf._size = f.pub._w = 127; /* Leave room for the NUL */ - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - ret = __vfprintf(&f, fmt, ap); + ret = __vfprintf(&f, locale, fmt, ap); if (ret < 0) { free(f._bf._base); *str = NULL; @@ -63,3 +67,8 @@ vasprintf(char **str, const char *fmt, __va_list ap) *str = (char *)f._bf._base; return (ret); } +int +vasprintf(char **str, const char *fmt, __va_list ap) +{ + return vasprintf_l(str, __get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/vdprintf.c b/lib/libc/stdio/vdprintf.c index 18c5495d11..e272488c0d 100644 --- a/lib/libc/stdio/vdprintf.c +++ b/lib/libc/stdio/vdprintf.c @@ -2,6 +2,11 @@ * Copyright (c) 2009 David Schultz * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/vdprintf.c,v 1.1 2009/03/04 03:38:51 das Exp $ + * $FreeBSD: head/lib/libc/stdio/vdprintf.c 227753 2011-11-20 14:45:42Z theraven $ */ #include "namespace.h" @@ -34,12 +39,12 @@ #include "un-namespace.h" #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" int vdprintf(int fd, const char * __restrict fmt, va_list ap) { - FILE f; + FILE f = FAKE_FILE; unsigned char buf[BUFSIZ]; int ret; @@ -56,9 +61,8 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap) f._write = __swrite; f._bf._base = buf; f._bf._size = sizeof(buf); - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - if ((ret = __vfprintf(&f, fmt, ap)) < 0) + if ((ret = __vfprintf(&f, __get_locale(), fmt, ap)) < 0) return (ret); return (__fflush(&f) ? EOF : ret); diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index b0f1182132..20cecb5093 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,8 +35,7 @@ * SUCH DAMAGE. * * @(#)vfprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.90 2009/02/28 06:06:57 das Exp $ - * $DragonFly: src/lib/libc/stdio/vfprintf.c,v 1.16 2006/07/05 15:04:54 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vfprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ /* @@ -44,6 +48,7 @@ #include #include +#include #include #include #include @@ -55,16 +60,16 @@ #include #include +#include "xlocale_private.h" #include "un-namespace.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" #include "printflocal.h" -static int __sprint(FILE *, struct __suio *); -static int __sbprintf(FILE *, const char *, va_list) __printflike(2, 0) - __noinline; +static int __sprint(FILE *, struct __suio *, locale_t); +static int __sbprintf(FILE *, locale_t, const char *, va_list) __printflike(3, 0) + __noinline; static char *__wcsconv(wchar_t *, int); #define CHAR char @@ -85,11 +90,11 @@ struct grouping_state { * of bytes that will be needed. */ static int -grouping_init(struct grouping_state *gs, int ndigits) +grouping_init(struct grouping_state *gs, int ndigits, locale_t loc) { struct lconv *locale; - locale = localeconv(); + locale = localeconv_l(loc); gs->grouping = locale->grouping; gs->thousands_sep = locale->thousands_sep; gs->thousep_len = strlen(gs->thousands_sep); @@ -114,11 +119,11 @@ grouping_init(struct grouping_state *gs, int ndigits) */ static int grouping_print(struct grouping_state *gs, struct io_state *iop, - const CHAR *cp, const CHAR *ep) + const CHAR *cp, const CHAR *ep, locale_t locale) { const CHAR *cp0 = cp; - if (io_printandpad(iop, cp, ep, gs->lead, zeroes)) + if (io_printandpad(iop, cp, ep, gs->lead, zeroes, locale)) return (-1); cp += gs->lead; while (gs->nseps > 0 || gs->nrepeats > 0) { @@ -128,9 +133,9 @@ grouping_print(struct grouping_state *gs, struct io_state *iop, gs->grouping--; gs->nseps--; } - if (io_print(iop, gs->thousands_sep, gs->thousep_len)) + if (io_print(iop, gs->thousands_sep, gs->thousep_len, locale)) return (-1); - if (io_printandpad(iop, cp, ep, *gs->grouping, zeroes)) + if (io_printandpad(iop, cp, ep, *gs->grouping, zeroes, locale)) return (-1); cp += *gs->grouping; } @@ -144,7 +149,7 @@ grouping_print(struct grouping_state *gs, struct io_state *iop, * then reset it so that it can be reused. */ static int -__sprint(FILE *fp, struct __suio *uio) +__sprint(FILE *fp, struct __suio *uio, locale_t locale) { int err; @@ -164,10 +169,10 @@ __sprint(FILE *fp, struct __suio *uio) * worries about ungetc buffers and so forth. */ static int -__sbprintf(FILE *fp, const char *fmt, va_list ap) +__sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap) { int ret; - FILE fake; + FILE fake = FAKE_FILE; unsigned char buf[BUFSIZ]; /* XXX This is probably not needed. */ @@ -179,7 +184,6 @@ __sbprintf(FILE *fp, const char *fmt, va_list ap) fake.pub._fileno = fp->pub._fileno; fake._cookie = fp->_cookie; fake._write = fp->_write; - memcpy(WCIO_GET(&fake), WCIO_GET(fp), sizeof(struct wchar_io_data)); /* set up the buffer */ fake._bf._base = fake.pub._p = buf; @@ -187,7 +191,7 @@ __sbprintf(FILE *fp, const char *fmt, va_list ap) fake.pub._lbfsize = 0; /* not actually used, but Just In Case */ /* do the work, then copy any error status */ - ret = __vfprintf(&fake, fmt, ap); + ret = __vfprintf(&fake, locale, fmt, ap); if (ret >= 0 && __fflush(&fake)) ret = EOF; if (fake.pub._flags & __SERR) @@ -224,9 +228,9 @@ __wcsconv(wchar_t *wcsarg, int prec) * just allocate enough memory for the maximum instead of * scanning the string. */ - if (prec < 128) { + if (prec < 128) nbytes = prec; - } else { + else { nbytes = 0; p = wcsarg; mbs = initial; @@ -258,20 +262,27 @@ __wcsconv(wchar_t *wcsarg, int prec) * MT-safe version */ int -vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) +vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0, + va_list ap) { int ret; + FIX_LOCALE(locale); FLOCKFILE(fp); /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->pub._flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->pub._fileno >= 0) - ret = __sbprintf(fp, fmt0, ap); + ret = __sbprintf(fp, locale, fmt0, ap); else - ret = __vfprintf(fp, fmt0, ap); + ret = __vfprintf(fp, locale, fmt0, ap); FUNLOCKFILE(fp); return (ret); } +int +vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) +{ + return vfprintf_l(fp, __get_locale(), fmt0, ap); +} /* * The size of the buffer we use as scratch space for integer @@ -288,7 +299,7 @@ vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) * Non-MT-safe version */ int -__vfprintf(FILE *fp, const char *fmt0, va_list ap) +__vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) { char *fmt; /* format string */ int ch; /* character from fmt */ @@ -353,19 +364,19 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) /* BEWARE, these `goto error' on error. */ #define PRINT(ptr, len) { \ - if (io_print(&io, (ptr), (len))) \ + if (io_print(&io, (ptr), (len), locale)) \ goto error; \ } #define PAD(howmany, with) { \ - if (io_pad(&io, (howmany), (with))) \ + if (io_pad(&io, (howmany), (with), locale)) \ goto error; \ } #define PRINTANDPAD(p, ep, len, with) { \ - if (io_printandpad(&io, (p), (ep), (len), (with))) \ + if (io_printandpad(&io, (p), (ep), (len), (with), locale)) \ goto error; \ } #define FLUSH() { \ - if (io_flush(&io)) \ + if (io_flush(&io, locale)) \ goto error; \ } @@ -374,7 +385,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) * built, use it to get the argument. If its not, get the next * argument (and arguments must be gotten sequentially). */ -#define GETARG(type) \ +#define GETARG(type) \ ((argtable != NULL) ? *((type*)(&argtable[nextarg++])) : \ (nextarg++, va_arg(ap, type))) @@ -393,7 +404,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) flags&CHARINT ? (u_long)(u_char)GETARG(int) : \ (u_long)GETARG(u_int)) #define INTMAX_SIZE (INTMAXT|SIZET|PTRDIFFT|LLONGINT) -#define SJARG() \ +#define SJARG() \ (flags&INTMAXT ? GETARG(intmax_t) : \ flags&SIZET ? (intmax_t)GETARG(ssize_t) : \ flags&PTRDIFFT ? (intmax_t)GETARG(ptrdiff_t) : \ @@ -408,7 +419,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) * Get * arguments, including the form *nn$. Preserve the nextarg * that the argument can be gotten once the type is determined. */ -#define GETASTER(val) \ +#define GETASTER(val) \ n2 = 0; \ cp = fmt; \ while (is_digit(*cp)) { \ @@ -442,7 +453,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) return (EOF); convbuf = NULL; - fmt = __DECONST(char *, fmt0); + fmt = (char *)fmt0; argtable = NULL; nextarg = 1; va_copy(orgap, ap); @@ -450,7 +461,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) ret = 0; #ifndef NO_FLOATING_POINT dtoaresult = NULL; - decimal_point = localeconv()->decimal_point; + decimal_point = localeconv_l(locale)->decimal_point; /* The overwhelmingly common case is decpt_len == 1. */ decpt_len = (decimal_point[1] == '\0' ? 1 : strlen(decimal_point)); #endif @@ -464,6 +475,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap) if ((n = fmt - cp) != 0) { if ((unsigned)ret + n > INT_MAX) { ret = EOF; + errno = EOVERFLOW; goto error; } PRINT(cp, n); @@ -502,7 +514,7 @@ reswitch: switch (ch) { * -- ANSI X3J11 * They don't exclude field widths read from args. */ - GETASTER(width); + GETASTER (width); if (width >= 0) goto rflag; width = -width; @@ -518,7 +530,7 @@ reswitch: switch (ch) { goto rflag; case '.': if ((ch = *fmt++) == '*') { - GETASTER(prec); + GETASTER (prec); goto rflag; } prec = 0; @@ -746,7 +758,7 @@ fp_common: if (prec || flags & ALT) size += prec + decpt_len; if ((flags & GROUPING) && expt > 0) - size += grouping_init(&gs, expt); + size += grouping_init(&gs, expt, locale); } break; #endif /* !NO_FLOATING_POINT */ @@ -883,7 +895,7 @@ number: if ((dprec = prec) >= 0) if (size > BUF) /* should never happen */ abort(); if ((flags & GROUPING) && size != 0) - size += grouping_init(&gs, size); + size += grouping_init(&gs, size, locale); break; default: /* "%?" prints ?, unless ? is NUL */ if (ch == '\0') @@ -919,6 +931,7 @@ number: if ((dprec = prec) >= 0) prsize = width > realsz ? width : realsz; if ((unsigned)ret + prsize > INT_MAX) { ret = EOF; + errno = EOVERFLOW; goto error; } @@ -946,7 +959,7 @@ number: if ((dprec = prec) >= 0) /* leading zeroes from decimal precision */ PAD(dprec - size, zeroes); if (gs.grouping) { - if (grouping_print(&gs, &io, cp, buf+BUF) < 0) + if (grouping_print(&gs, &io, cp, buf+BUF, locale) < 0) goto error; } else { PRINT(cp, size); @@ -964,7 +977,7 @@ number: if ((dprec = prec) >= 0) } else { if (gs.grouping) { n = grouping_print(&gs, &io, - cp, dtoaend); + cp, dtoaend, locale); if (n < 0) goto error; cp += n; @@ -1011,7 +1024,7 @@ error: if (__sferror(fp)) ret = EOF; if ((argtable != NULL) && (argtable != statargtable)) - free(argtable); + free (argtable); return (ret); /* NOTREACHED */ } diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index e2c4dd677e..bcb9e64aa1 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -2,6 +2,11 @@ * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * This code is derived from software contributed to Berkeley by * Chris Torek. * @@ -30,16 +35,16 @@ * SUCH DAMAGE. * * @(#)vfscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vfscanf.c,v 1.43 2009/01/19 06:19:51 das Exp $ - * $DragonFly: src/lib/libc/stdio/vfscanf.c,v 1.11 2006/02/18 17:55:52 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vfscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include "namespace.h" #include #include -#include #include #include +#include #include #include #include @@ -49,7 +54,7 @@ #include "collate.h" #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" #ifndef NO_FLOATING_POINT #include @@ -94,21 +99,361 @@ static const u_char *__sccl(char *, const u_char *); #ifndef NO_FLOATING_POINT -static int parsefloat(FILE *, char *, char *); +static int parsefloat(FILE *, char *, char *, locale_t); #endif __weak_reference(__vfscanf, vfscanf); +/* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) + +static const mbstate_t initial_mbs; + +/* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * p, int width) +{ + int n; + + if (p == SUPPRESS_PTR) { + size_t sum = 0; + for (;;) { + if ((n = fp->pub._r) < width) { + sum += n; + width -= n; + fp->pub._p += n; + if (__srefill(fp)) { + if (sum == 0) + return (-1); + break; + } + } else { + sum += width; + fp->pub._r -= width; + fp->pub._p += width; + break; + } + } + return (sum); + } else { + size_t r = __fread(p, 1, width, fp); + + if (r == 0) + return (-1); + return (r); + } +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + mbstate_t mbs; + int n, nread; + wint_t wi; + + mbs = initial_mbs; + n = 0; + while (width-- != 0 && + (wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF) { + if (wcp != SUPPRESS_PTR) + *wcp++ = (wchar_t)wi; + n += nread; + } + if (n == 0) + return (-1); + return (n); +} + +static __inline int +convert_ccl(FILE *fp, char * p, int width, const char *ccltab) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (ccltab[*fp->pub._p]) { + n++, fp->pub._r--, fp->pub._p++; + if (--width == 0) + break; + if (fp->pub._r <= 0 && __srefill(fp)) { + if (n == 0) + return (-1); + break; + } + } + } else { + p0 = p; + while (ccltab[*fp->pub._p]) { + fp->pub._r--; + *p++ = *fp->pub._p++; + if (--width == 0) + break; + if (fp->pub._r <= 0 && __srefill(fp)) { + if (p == p0) + return (-1); + break; + } + } + n = p - p0; + if (n == 0) + return (0); + *p = 0; + } + return (n); +} + +static __inline int +convert_wccl(FILE *fp, wchar_t *wcp, int width, const char *ccltab, + locale_t locale) +{ + mbstate_t mbs; + wint_t wi; + int n, nread; + + mbs = initial_mbs; + n = 0; + if (wcp == SUPPRESS_PTR) { + while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF && + width-- != 0 && ccltab[wctob(wi)]) + n += nread; + if (wi != WEOF) + __ungetwc(wi, fp, __get_locale()); + } else { + while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF && + width-- != 0 && ccltab[wctob(wi)]) { + *wcp++ = (wchar_t)wi; + n += nread; + } + if (wi != WEOF) + __ungetwc(wi, fp, __get_locale()); + if (n == 0) + return (0); + *wcp = 0; + } + return (n); +} + +static __inline int +convert_string(FILE *fp, char * p, int width) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (!isspace(*fp->pub._p)) { + n++, fp->pub._r--, fp->pub._p++; + if (--width == 0) + break; + if (fp->pub._r <= 0 && __srefill(fp)) + break; + } + } else { + p0 = p; + while (!isspace(*fp->pub._p)) { + fp->pub._r--; + *p++ = *fp->pub._p++; + if (--width == 0) + break; + if (fp->pub._r <= 0 && __srefill(fp)) + break; + } + *p = 0; + n = p - p0; + } + return (n); +} + +static __inline int +convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + mbstate_t mbs; + wint_t wi; + int n, nread; + + mbs = initial_mbs; + n = 0; + if (wcp == SUPPRESS_PTR) { + while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF && + width-- != 0 && !iswspace(wi)) + n += nread; + if (wi != WEOF) + __ungetwc(wi, fp, __get_locale()); + } else { + while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF && + width-- != 0 && !iswspace(wi)) { + *wcp++ = (wchar_t)wi; + n += nread; + } + if (wi != WEOF) + __ungetwc(wi, fp, __get_locale()); + *wcp = '\0'; + } + return (n); +} + +/* + * Read an integer, storing it in buf. The only relevant bit in the + * flags argument is PFXOK. + * + * Return 0 on a match failure, and the number of characters read + * otherwise. + */ +static __inline int +parseint(FILE *fp, char * __restrict buf, int width, int base, int flags) +{ + /* `basefix' is used to avoid `if' tests */ + static const short basefix[17] = + { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char *p; + int c; + + flags |= SIGNOK | NDIGITS | NZDIGITS; + for (p = buf; width; width--) { + c = *fp->pub._p; + /* + * Switch on the character; `goto ok' if we accept it + * as a part of number. + */ + switch (c) { + + /* + * The digit 0 is always legal, but is special. For + * %i conversions, if no digits (zero or nonzero) have + * been scanned (only signs), we will have base==0. + * In that case, we should set it to 8 and enable 0x + * prefixing. Also, if we have not scanned zero + * digits before this, do not turn off prefixing + * (someone else will turn it off if we have scanned + * any nonzero digits). + */ + case '0': + if (base == 0) { + base = 8; + flags |= PFXOK; + } + if (flags & NZDIGITS) + flags &= ~(SIGNOK|NZDIGITS|NDIGITS); + else + flags &= ~(SIGNOK|PFXOK|NDIGITS); + goto ok; + + /* 1 through 7 always legal */ + case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + base = basefix[base]; + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* digits 8 and 9 ok iff decimal or hex */ + case '8': case '9': + base = basefix[base]; + if (base <= 8) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* letters ok iff hex */ + case 'A': case 'B': case 'C': + case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': + case 'd': case 'e': case 'f': + /* no need to fix base here */ + if (base <= 10) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* sign ok only as first character */ + case '+': case '-': + if (flags & SIGNOK) { + flags &= ~SIGNOK; + flags |= HAVESIGN; + goto ok; + } + break; + + /* + * x ok iff flag still set & 2nd char (or 3rd char if + * we have a sign). + */ + case 'x': case 'X': + if (flags & PFXOK && p == + buf + 1 + !!(flags & HAVESIGN)) { + base = 16; /* if %i */ + flags &= ~PFXOK; + goto ok; + } + break; + } + + /* + * If we got here, c is not a legal character for a + * number. Stop accumulating digits. + */ + break; + ok: + /* + * c is legal: store it and look at the next. + */ + *p++ = c; + if (--fp->pub._r > 0) + fp->pub._p++; + else if (__srefill(fp)) + break; /* EOF */ + } + /* + * If we had only a sign, it is no good; push back the sign. + * If the number ends in `x', it was [sign] '0' 'x', so push + * back the x and treat it as [sign] '0'. + */ + if (flags & NDIGITS) { + if (p > buf) + (void) __ungetc(*(u_char *)--p, fp); + return (0); + } + c = ((u_char *)p)[-1]; + if (c == 'x' || c == 'X') { + --p; + (void) __ungetc(c, fp); + } + return (p - buf); +} + /* * __vfscanf - MT-safe version */ int -__vfscanf(FILE *fp, const char *fmt0, va_list ap) +__vfscanf(FILE *fp, char const *fmt0, va_list ap) { int ret; FLOCKFILE(fp); - ret = __svfscanf(fp, fmt0, ap); + ret = __svfscanf(fp, __get_locale(), fmt0, ap); + FUNLOCKFILE(fp); + return (ret); +} +int +vfscanf_l(FILE *fp, locale_t locale, char const *fmt0, va_list ap) +{ + int ret; + FIX_LOCALE(locale); + + FLOCKFILE(fp); + ret = __svfscanf(fp, locale, fmt0, ap); FUNLOCKFILE(fp); return (ret); } @@ -117,31 +462,22 @@ __vfscanf(FILE *fp, const char *fmt0, va_list ap) * __svfscanf - non-MT-safe version of __vfscanf */ int -__svfscanf(FILE *fp, const char *fmt0, va_list ap) +__svfscanf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) { +#define GETARG(type) ((flags & SUPPRESS) ? SUPPRESS_PTR : va_arg(ap, type)) const u_char *fmt = (const u_char *)fmt0; int c; /* character from format, or conversion */ size_t width; /* field width, or 0 */ - char *p; /* points into all kinds of strings */ - int n; /* handy integer */ int flags; /* flags as defined above */ - char *p0; /* saves original value of p when necessary */ int nassigned; /* number of fields assigned */ int nconversions; /* number of conversions */ + int nr; /* characters read by the current conversion */ int nread; /* number of characters consumed from fp */ int base; /* base argument to conversion function */ char ccltab[256]; /* character class table for %[...] */ - char buf[BUF]; /* buffer for numeric and mb conversions */ - wchar_t *wcp; /* handy wide character pointer */ - size_t nconv; /* length of multibyte sequence converted */ - static const mbstate_t initial; - mbstate_t mbs; - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char buf[BUF]; /* buffer for numeric conversions */ - _SET_ORIENTATION(fp, -1); + ORIENT(fp, -1); nassigned = 0; nconversions = 0; @@ -151,8 +487,7 @@ __svfscanf(FILE *fp, const char *fmt0, va_list ap) if (c == 0) return (nassigned); if (isspace(c)) { - while ((fp->pub._r > 0 || __srefill(fp) == 0) && - isspace(*fp->pub._p)) + while ((fp->pub._r > 0 || __srefill(fp) == 0) && isspace(*fp->pub._p)) nread++, fp->pub._r--, fp->pub._p++; continue; } @@ -186,12 +521,11 @@ literal: if (flags & LONG) { flags &= ~LONG; flags |= LONGLONG; - } else { + } else flags |= LONG; - } goto again; case 'q': - flags |= LONGLONG; /* assume long long == quad */ + flags |= LONGLONG; /* not quite */ goto again; case 't': flags |= PTRDIFFT; @@ -206,9 +540,8 @@ literal: if (flags & SHORT) { flags &= ~SHORT; flags |= SHORTSHORT; - } else { + } else flags |= SHORT; - } goto again; case '0': case '1': case '2': case '3': case '4': @@ -285,7 +618,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) @@ -351,178 +683,32 @@ literal: if (width == 0) width = 1; if (flags & LONG) { - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = NULL; - n = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->pub._flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->pub._p; - fp->pub._p++; - fp->pub._r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->pub._flags |= __SERR; - goto input_failure; - } - if (nconv == 0 && !(flags & SUPPRESS)) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->pub._r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->pub._flags |= __SERR; - goto input_failure; - } - break; - } - } - if ((flags & SUPPRESS) == 0) - nassigned++; - } else if (flags & SUPPRESS) { - size_t sum = 0; - for (;;) { - if ((n = fp->pub._r) < width) { - sum += n; - width -= n; - fp->pub._p += n; - if (__srefill(fp)) { - if (sum == 0) - goto input_failure; - break; - } - } else { - sum += width; - fp->pub._r -= width; - fp->pub._p += width; - break; - } - } - nread += sum; + nr = convert_wchar(fp, GETARG(wchar_t *), + width, locale); } else { - size_t r = __fread((void *)va_arg(ap, char *), - 1, width, fp); - - if (r == 0) - goto input_failure; - nread += r; - nassigned++; + nr = convert_char(fp, GETARG(char *), width); } - nconversions++; + if (nr < 0) + goto input_failure; break; case CT_CCL: /* scan a (nonempty) character class (sets NOSKIP) */ if (width == 0) width = (size_t)~0; /* `infinity' */ - /* take only those things in the class */ if (flags & LONG) { - wchar_t twc; - int nchars; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - nchars = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->pub._flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->pub._p; - fp->pub._p++; - fp->pub._r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->pub._flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (wctob(*wcp) != EOF && - !ccltab[wctob(*wcp)]) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - nchars++; - n = 0; - } - if (fp->pub._r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->pub._flags |= __SERR; - goto input_failure; - } - break; - } - } - if (n != 0) { - fp->pub._flags |= __SERR; - goto input_failure; - } - n = nchars; - if (n == 0) - goto match_failure; - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (ccltab[*fp->pub._p]) { - n++, fp->pub._r--, fp->pub._p++; - if (--width == 0) - break; - if (fp->pub._r <= 0 && __srefill(fp)) { - if (n == 0) - goto input_failure; - break; - } - } - if (n == 0) - goto match_failure; + nr = convert_wccl(fp, GETARG(wchar_t *), width, + ccltab, locale); } else { - p0 = p = va_arg(ap, char *); - while (ccltab[*fp->pub._p]) { - fp->pub._r--; - *p++ = *fp->pub._p++; - if (--width == 0) - break; - if (fp->pub._r <= 0 && __srefill(fp)) { - if (p == p0) - goto input_failure; - break; - } - } - n = p - p0; - if (n == 0) + nr = convert_ccl(fp, GETARG(char *), width, + ccltab); + } + if (nr <= 0) { + if (nr < 0) + goto input_failure; + else /* nr == 0 */ goto match_failure; - *p = 0; - nassigned++; } - nread += n; - nconversions++; break; case CT_STRING: @@ -530,82 +716,14 @@ literal: if (width == 0) width = (size_t)~0; if (flags & LONG) { - wchar_t twc; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - while (!isspace(*fp->pub._p) && width != 0) { - if (n == MB_CUR_MAX) { - fp->pub._flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->pub._p; - fp->pub._p++; - fp->pub._r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->pub._flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (iswspace(*wcp)) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->pub._r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->pub._flags |= __SERR; - goto input_failure; - } - break; - } - } - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (!isspace(*fp->pub._p)) { - n++, fp->pub._r--, fp->pub._p++; - if (--width == 0) - break; - if (fp->pub._r <= 0 && __srefill(fp)) - break; - } - nread += n; + nr = convert_wstring(fp, GETARG(wchar_t *), + width, locale); } else { - p0 = p = va_arg(ap, char *); - while (!isspace(*fp->pub._p)) { - fp->pub._r--; - *p++ = *fp->pub._p++; - if (--width == 0) - break; - if (fp->pub._r <= 0 && __srefill(fp)) - break; - } - *p = 0; - nread += p - p0; - nassigned++; + nr = convert_string(fp, GETARG(char *), width); } - nconversions++; - continue; + if (nr < 0) + goto input_failure; + break; case CT_INT: /* scan an integer as if by the conversion function */ @@ -618,126 +736,17 @@ literal: width = sizeof(buf) - 2; width++; #endif - flags |= SIGNOK | NDIGITS | NZDIGITS; - for (p = buf; width; width--) { - c = *fp->pub._p; - /* - * Switch on the character; `goto ok' - * if we accept it as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is - * special. For %i conversions, if no - * digits (zero or nonzero) have been - * scanned (only signs), we will have - * base==0. In that case, we should set - * it to 8 and enable 0x prefixing. - * Also, if we have not scanned zero digits - * before this, do not turn off prefixing - * (someone else will turn it off if we - * have scanned any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } - break; - - /* - * x ok iff flag still set & 2nd char (or - * 3rd char if we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && p == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } - break; - } - - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = c; - if (--fp->pub._r > 0) - fp->pub._p++; - else if (__srefill(fp)) - break; /* EOF */ - } - /* - * If we had only a sign, it is no good; push - * back the sign. If the number ends in `x', - * it was [sign] '0' 'x', so push back the x - * and treat it as [sign] '0'. - */ - if (flags & NDIGITS) { - if (p > buf) - __ungetc(*(u_char *)--p, fp); + nr = parseint(fp, buf, width, base, flags); + if (nr == 0) goto match_failure; - } - c = ((u_char *)p)[-1]; - if (c == 'x' || c == 'X') { - --p; - __ungetc(c, fp); - } if ((flags & SUPPRESS) == 0) { uintmax_t res; - *p = 0; + buf[nr] = '\0'; if ((flags & UNSIGNED) == 0) - res = strtoimax(buf, NULL, base); + res = strtoimax_l(buf, (char **)NULL, base, locale); else - res = strtoumax(buf, NULL, base); + res = strtoumax_l(buf, (char **)NULL, base, locale); if (flags & POINTER) *va_arg(ap, void **) = (void *)(uintptr_t)res; @@ -757,10 +766,7 @@ literal: *va_arg(ap, size_t *) = res; else *va_arg(ap, int *) = res; - nassigned++; } - nread += p - buf; - nconversions++; break; #ifndef NO_FLOATING_POINT @@ -768,26 +774,30 @@ literal: /* scan a floating point number as if by strtod */ if (width == 0 || width > sizeof(buf) - 1) width = sizeof(buf) - 1; - if ((width = parsefloat(fp, buf, buf + width)) == 0) + nr = parsefloat(fp, buf, buf + width, locale); + if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { if (flags & LONGDBL) { - long double res = strtold(buf, &p); + long double res = strtold_l(buf, NULL, + locale); *va_arg(ap, long double *) = res; } else if (flags & LONG) { - double res = strtod(buf, &p); + double res = strtod_l(buf, NULL, + locale); *va_arg(ap, double *) = res; } else { - float res = strtof(buf, &p); + float res = strtof_l(buf, NULL, locale); *va_arg(ap, float *) = res; } - nassigned++; } - nread += width; - nconversions++; break; #endif /* !NO_FLOATING_POINT */ } + if (!(flags & SUPPRESS)) + nassigned++; + nread += nr; + nconversions++; } input_failure: return (nconversions != 0 ? nassigned : EOF); @@ -802,9 +812,13 @@ match_failure: * considered part of the scanset. */ static const u_char * -__sccl(char *tab, const u_char *fmt) +__sccl(tab, fmt) + char *tab; + const u_char *fmt; { int c, n, v, i; + struct xlocale_collate *table = + (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE]; /* first `clear' the whole table */ c = *fmt++; /* first char hat => negated scanset */ @@ -815,7 +829,7 @@ __sccl(char *tab, const u_char *fmt) v = 0; /* default => reject */ /* XXX: Will not work if sizeof(tab*) > sizeof(char) */ - memset(tab, v, 256); + (void) memset(tab, v, 256); if (c == 0) return (fmt - 1);/* format ended before closing ] */ @@ -858,8 +872,8 @@ doswitch: */ n = *fmt; if (n == ']' - || (__collate_load_error ? n < c : - __collate_range_cmp (n, c) < 0 + || (table->__collate_load_error ? n < c : + __collate_range_cmp (table, n, c) < 0 ) ) { c = '-'; @@ -867,14 +881,14 @@ doswitch: } fmt++; /* fill in the range */ - if (__collate_load_error) { + if (table->__collate_load_error) { do { tab[++c] = v; } while (c < n); } else { for (i = 0; i < 256; i ++) - if ( __collate_range_cmp (c, i) < 0 - && __collate_range_cmp (i, n) <= 0 + if ( __collate_range_cmp (table, c, i) < 0 + && __collate_range_cmp (table, i, n) <= 0 ) tab[i] = v; } @@ -908,7 +922,7 @@ doswitch: #ifndef NO_FLOATING_POINT static int -parsefloat(FILE *fp, char *buf, char *end) +parsefloat(FILE *fp, char *buf, char *end, locale_t locale) { char *commit, *p; int infnanpos = 0, decptpos = 0; @@ -917,7 +931,7 @@ parsefloat(FILE *fp, char *buf, char *end) S_DIGITS, S_DECPT, S_FRAC, S_EXP, S_EXPDIGITS } state = S_START; unsigned char c; - const char *decpt = localeconv()->decimal_point; + const char *decpt = localeconv_l(locale)->decimal_point; _Bool gotmantdig = 0, ishex = 0; /* diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index c70f85ee4a..112262dcfb 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,8 +35,7 @@ * SUCH DAMAGE. * * @(#)vfprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.41 2009/02/28 06:06:57 das Exp $ - * $DragonFly: src/lib/libc/stdio/vfwprintf.c,v 1.3 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vfwprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ /* @@ -45,6 +49,7 @@ #include #include +#include #include #include #include @@ -59,12 +64,12 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" #include "printflocal.h" +#include "xlocale_private.h" -static int __sprint(FILE *, struct __suio *); -static int __sbprintf(FILE *, const wchar_t *, va_list) __noinline; -static wint_t __xfputwc(wchar_t, FILE *); +static int __sprint(FILE *, struct __suio *, locale_t); +static int __sbprintf(FILE *, locale_t, const wchar_t *, va_list) __noinline; +static wint_t __xfputwc(wchar_t, FILE *, locale_t); static wchar_t *__mbsconv(char *, int); #define CHAR wchar_t @@ -81,28 +86,28 @@ struct grouping_state { static const mbstate_t initial_mbs; static inline wchar_t -get_decpt(void) +get_decpt(locale_t locale) { mbstate_t mbs; wchar_t decpt; int nconv; mbs = initial_mbs; - nconv = mbrtowc(&decpt, localeconv()->decimal_point, MB_CUR_MAX, &mbs); + nconv = mbrtowc(&decpt, localeconv_l(locale)->decimal_point, MB_CUR_MAX, &mbs); if (nconv == (size_t)-1 || nconv == (size_t)-2) decpt = '.'; /* failsafe */ return (decpt); } static inline wchar_t -get_thousep(void) +get_thousep(locale_t locale) { mbstate_t mbs; wchar_t thousep; int nconv; mbs = initial_mbs; - nconv = mbrtowc(&thousep, localeconv()->thousands_sep, + nconv = mbrtowc(&thousep, localeconv_l(locale)->thousands_sep, MB_CUR_MAX, &mbs); if (nconv == (size_t)-1 || nconv == (size_t)-2) thousep = '\0'; /* failsafe */ @@ -115,11 +120,11 @@ get_thousep(void) * of wide characters that will be printed. */ static int -grouping_init(struct grouping_state *gs, int ndigits) +grouping_init(struct grouping_state *gs, int ndigits, locale_t locale) { - gs->grouping = localeconv()->grouping; - gs->thousands_sep = get_thousep(); + gs->grouping = localeconv_l(locale)->grouping; + gs->thousands_sep = get_thousep(locale); gs->nseps = gs->nrepeats = 0; gs->lead = ndigits; @@ -141,11 +146,11 @@ grouping_init(struct grouping_state *gs, int ndigits) */ static int grouping_print(struct grouping_state *gs, struct io_state *iop, - const CHAR *cp, const CHAR *ep) + const CHAR *cp, const CHAR *ep, locale_t locale) { const CHAR *cp0 = cp; - if (io_printandpad(iop, cp, ep, gs->lead, zeroes)) + if (io_printandpad(iop, cp, ep, gs->lead, zeroes, locale)) return (-1); cp += gs->lead; while (gs->nseps > 0 || gs->nrepeats > 0) { @@ -155,9 +160,9 @@ grouping_print(struct grouping_state *gs, struct io_state *iop, gs->grouping--; gs->nseps--; } - if (io_print(iop, &gs->thousands_sep, 1)) + if (io_print(iop, &gs->thousands_sep, 1, locale)) return (-1); - if (io_printandpad(iop, cp, ep, *gs->grouping, zeroes)) + if (io_printandpad(iop, cp, ep, *gs->grouping, zeroes, locale)) return (-1); cp += *gs->grouping; } @@ -176,7 +181,7 @@ grouping_print(struct grouping_state *gs, struct io_state *iop, * string eclipses the benefits of buffering. */ static int -__sprint(FILE *fp, struct __suio *uio) +__sprint(FILE *fp, struct __suio *uio, locale_t locale) { struct __siov *iov; wchar_t *p; @@ -187,7 +192,7 @@ __sprint(FILE *fp, struct __suio *uio) p = (wchar_t *)iov->iov_base; len = iov->iov_len; for (i = 0; i < len; i++) { - if (__xfputwc(p[i], fp) == WEOF) + if (__xfputwc(p[i], fp, locale) == WEOF) return (-1); } } @@ -201,7 +206,7 @@ __sprint(FILE *fp, struct __suio *uio) * worries about ungetc buffers and so forth. */ static int -__sbprintf(FILE *fp, const wchar_t *fmt, va_list ap) +__sbprintf(FILE *fp, locale_t locale, const wchar_t *fmt, va_list ap) { int ret; FILE fake; @@ -216,7 +221,6 @@ __sbprintf(FILE *fp, const wchar_t *fmt, va_list ap) fake.pub._fileno = fp->pub._fileno; fake._cookie = fp->_cookie; fake._write = fp->_write; - memcpy(WCIO_GET(&fake), WCIO_GET(fp), sizeof(struct wchar_io_data)); /* set up the buffer */ fake._bf._base = fake.pub._p = buf; @@ -224,7 +228,7 @@ __sbprintf(FILE *fp, const wchar_t *fmt, va_list ap) fake.pub._lbfsize = 0; /* not actually used, but Just In Case */ /* do the work, then copy any error status */ - ret = __vfwprintf(&fake, fmt, ap); + ret = __vfwprintf(&fake, locale, fmt, ap); if (ret >= 0 && __fflush(&fake)) ret = WEOF; if (fake.pub._flags & __SERR) @@ -237,7 +241,7 @@ __sbprintf(FILE *fp, const wchar_t *fmt, va_list ap) * File must already be locked. */ static wint_t -__xfputwc(wchar_t wc, FILE *fp) +__xfputwc(wchar_t wc, FILE *fp, locale_t locale) { mbstate_t mbs; char buf[MB_LEN_MAX]; @@ -246,7 +250,7 @@ __xfputwc(wchar_t wc, FILE *fp) size_t len; if ((fp->pub._flags & __SSTR) == 0) - return (__fputwc_unlock(wc, fp)); + return (__fputwc(wc, fp, locale)); mbs = initial_mbs; if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) { @@ -288,7 +292,7 @@ __mbsconv(char *mbsarg, int prec) * number of characters to print. */ p = mbsarg; - insize = nchars = 0; + insize = nchars = nconv = 0; mbs = initial_mbs; while (nchars != (size_t)prec) { nconv = mbrlen(p, MB_CUR_MAX, &mbs); @@ -338,20 +342,27 @@ __mbsconv(char *mbsarg, int prec) * MT-safe version */ int -vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap) +vfwprintf_l(FILE * __restrict fp, locale_t locale, + const wchar_t * __restrict fmt0, va_list ap) + { int ret; - + FIX_LOCALE(locale); FLOCKFILE(fp); /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->pub._flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->pub._fileno >= 0) - ret = __sbprintf(fp, fmt0, ap); + ret = __sbprintf(fp, locale, fmt0, ap); else - ret = __vfwprintf(fp, fmt0, ap); + ret = __vfwprintf(fp, locale, fmt0, ap); FUNLOCKFILE(fp); return (ret); } +int +vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap) +{ + return vfwprintf_l(fp, __get_locale(), fmt0, ap); +} /* * The size of the buffer we use as scratch space for integer @@ -368,7 +379,7 @@ vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap) * Non-MT-safe version */ int -__vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) +__vfwprintf(FILE *fp, locale_t locale, const wchar_t *fmt0, va_list ap) { wchar_t *fmt; /* format string */ wchar_t ch; /* character from fmt */ @@ -431,19 +442,19 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) /* BEWARE, these `goto error' on error. */ #define PRINT(ptr, len) do { \ - if (io_print(&io, (ptr), (len))) \ + if (io_print(&io, (ptr), (len), locale)) \ goto error; \ } while (0) #define PAD(howmany, with) { \ - if (io_pad(&io, (howmany), (with))) \ + if (io_pad(&io, (howmany), (with), locale)) \ goto error; \ } #define PRINTANDPAD(p, ep, len, with) { \ - if (io_printandpad(&io, (p), (ep), (len), (with))) \ + if (io_printandpad(&io, (p), (ep), (len), (with), locale)) \ goto error; \ } #define FLUSH() { \ - if (io_flush(&io)) \ + if (io_flush(&io, locale)) \ goto error; \ } @@ -452,7 +463,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) * built, use it to get the argument. If its not, get the next * argument (and arguments must be gotten sequentially). */ -#define GETARG(type) \ +#define GETARG(type) \ ((argtable != NULL) ? *((type*)(&argtable[nextarg++])) : \ (nextarg++, va_arg(ap, type))) @@ -471,7 +482,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) flags&CHARINT ? (u_long)(u_char)GETARG(int) : \ (u_long)GETARG(u_int)) #define INTMAX_SIZE (INTMAXT|SIZET|PTRDIFFT|LLONGINT) -#define SJARG() \ +#define SJARG() \ (flags&INTMAXT ? GETARG(intmax_t) : \ flags&SIZET ? (intmax_t)GETARG(ssize_t) : \ flags&PTRDIFFT ? (intmax_t)GETARG(ptrdiff_t) : \ @@ -497,7 +508,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) int hold = nextarg; \ if (argtable == NULL) { \ argtable = statargtable; \ - if (__find_warguments(fmt0, orgap, &argtable)) { \ + if (__find_warguments (fmt0, orgap, &argtable)) { \ ret = EOF; \ goto error; \ } \ @@ -516,14 +527,14 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) return (EOF); convbuf = NULL; - fmt = __DECONST(wchar_t *, fmt0); + fmt = (wchar_t *)fmt0; argtable = NULL; nextarg = 1; va_copy(orgap, ap); io_init(&io, fp); ret = 0; #ifndef NO_FLOATING_POINT - decimal_point = get_decpt(); + decimal_point = get_decpt(locale); #endif /* @@ -535,6 +546,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) if ((n = fmt - cp) != 0) { if ((unsigned)ret + n > INT_MAX) { ret = EOF; + errno = EOVERFLOW; goto error; } PRINT(cp, n); @@ -573,7 +585,7 @@ reswitch: switch (ch) { * -- ANSI X3J11 * They don't exclude field widths read from args. */ - GETASTER(width); + GETASTER (width); if (width >= 0) goto rflag; width = -width; @@ -589,7 +601,7 @@ reswitch: switch (ch) { goto rflag; case '.': if ((ch = *fmt++) == '*') { - GETASTER(prec); + GETASTER (prec); goto rflag; } prec = 0; @@ -617,8 +629,8 @@ reswitch: switch (ch) { nextarg = n; if (argtable == NULL) { argtable = statargtable; - if (__find_warguments(fmt0, orgap, - &argtable)) { + if (__find_warguments (fmt0, orgap, + &argtable)) { ret = EOF; goto error; } @@ -636,9 +648,8 @@ reswitch: switch (ch) { if (flags & SHORTINT) { flags &= ~SHORTINT; flags |= CHARINT; - } else { + } else flags |= SHORTINT; - } goto rflag; case 'j': flags |= INTMAXT; @@ -647,9 +658,8 @@ reswitch: switch (ch) { if (flags & LONGINT) { flags &= ~LONGINT; flags |= LLONGINT; - } else { + } else flags |= LONGINT; - } goto rflag; case 'q': flags |= LLONGINT; /* not necessarily */ @@ -812,7 +822,7 @@ fp_common: if (prec || flags & ALT) size += prec + 1; if ((flags & GROUPING) && expt > 0) - size += grouping_init(&gs, expt); + size += grouping_init(&gs, expt, locale); } break; #endif /* !NO_FLOATING_POINT */ @@ -951,7 +961,7 @@ number: if ((dprec = prec) >= 0) if (size > BUF) /* should never happen */ abort(); if ((flags & GROUPING) && size != 0) - size += grouping_init(&gs, size); + size += grouping_init(&gs, size, locale); break; default: /* "%?" prints ?, unless ? is NUL */ if (ch == '\0') @@ -987,6 +997,7 @@ number: if ((dprec = prec) >= 0) prsize = width > realsz ? width : realsz; if ((unsigned)ret + prsize > INT_MAX) { ret = EOF; + errno = EOVERFLOW; goto error; } @@ -1014,7 +1025,7 @@ number: if ((dprec = prec) >= 0) /* leading zeroes from decimal precision */ PAD(dprec - size, zeroes); if (gs.grouping) { - if (grouping_print(&gs, &io, cp, buf+BUF) < 0) + if (grouping_print(&gs, &io, cp, buf+BUF, locale) < 0) goto error; } else { PRINT(cp, size); @@ -1032,7 +1043,7 @@ number: if ((dprec = prec) >= 0) } else { if (gs.grouping) { n = grouping_print(&gs, &io, - cp, convbuf + ndig); + cp, convbuf + ndig, locale); if (n < 0) goto error; cp += n; @@ -1076,7 +1087,7 @@ error: if (__sferror(fp)) ret = EOF; if ((argtable != NULL) && (argtable != statargtable)) - free(argtable); + free (argtable); return (ret); /* NOTREACHED */ } diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index 9c3cd87fcf..ac56f882e2 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,8 +35,7 @@ * SUCH DAMAGE. * * @(#)vfscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vfwscanf.c,v 1.17 2009/01/19 06:19:51 das Exp $ - * $DragonFly: src/lib/libc/stdio/vfwscanf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vfwscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ #include "namespace.h" @@ -49,11 +53,7 @@ #include "libc_private.h" #include "local.h" -#include "priv_stdio.h" - -#ifndef NO_FLOATING_POINT -#include -#endif +#include "xlocale_private.h" #define BUF 513 /* Maximum length of numeric string. */ @@ -93,74 +93,382 @@ #define CT_FLOAT 4 /* %[efgEFG] conversion */ #ifndef NO_FLOATING_POINT -static int parsefloat(FILE *, wchar_t *, wchar_t *); +static int parsefloat(FILE *, wchar_t *, wchar_t *, locale_t); #endif -#define INCCL(_c) \ - (cclcompl ? (wmemchr(ccls, (_c), ccle - ccls) == NULL) : \ - (wmemchr(ccls, (_c), ccle - ccls) != NULL)) +struct ccl { + const wchar_t *start; /* character class start */ + const wchar_t *end; /* character class end */ + int compl; /* ccl is complemented? */ +}; + +static __inline int +inccl(const struct ccl *ccl, wint_t wi) +{ + + if (ccl->compl) { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) + == NULL); + } else { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) != NULL); + } +} + +/* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) static const mbstate_t initial_mbs; +/* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * mbp, int width, locale_t locale) +{ + mbstate_t mbs; + size_t nconv; + wint_t wi; + int n; + + n = 0; + mbs = initial_mbs; + while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (mbp != SUPPRESS_PTR) { + nconv = wcrtomb(mbp, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + mbp += nconv; + } + n++; + } + if (n == 0) + return (-1); + return (n); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + wint_t wi; + int n; + + n = 0; + while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (wcp != SUPPRESS_PTR) + *wcp++ = (wchar_t)wi; + n++; + } + if (n == 0) + return (-1); + return (n); +} + +static __inline int +convert_ccl(FILE *fp, char * mbp, int width, const struct ccl *ccl, + locale_t locale) +{ + mbstate_t mbs; + size_t nconv; + wint_t wi; + int n; + + n = 0; + mbs = initial_mbs; + while ((wi = __fgetwc(fp, locale)) != WEOF && + width-- != 0 && inccl(ccl, wi)) { + if (mbp != SUPPRESS_PTR) { + nconv = wcrtomb(mbp, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + mbp += nconv; + } + n++; + } + if (wi != WEOF) + __ungetwc(wi, fp, locale); + if (mbp != SUPPRESS_PTR) + *mbp = 0; + return (n); +} + +static __inline int +convert_wccl(FILE *fp, wchar_t *wcp, int width, const struct ccl *ccl, + locale_t locale) +{ + wchar_t *wcp0; + wint_t wi; + int n; + + if (wcp == SUPPRESS_PTR) { + n = 0; + while ((wi = __fgetwc(fp, locale)) != WEOF && + width-- != 0 && inccl(ccl, wi)) + n++; + if (wi != WEOF) + __ungetwc(wi, fp, locale); + } else { + wcp0 = wcp; + while ((wi = __fgetwc(fp, locale)) != WEOF && + width-- != 0 && inccl(ccl, wi)) + *wcp++ = (wchar_t)wi; + if (wi != WEOF) + __ungetwc(wi, fp, locale); + n = wcp - wcp0; + if (n == 0) + return (0); + *wcp = 0; + } + return (n); +} + +static __inline int +convert_string(FILE *fp, char * mbp, int width, locale_t locale) +{ + mbstate_t mbs; + size_t nconv; + wint_t wi; + int nread; + + mbs = initial_mbs; + nread = 0; + while ((wi = __fgetwc(fp, locale)) != WEOF && width-- != 0 && + !iswspace(wi)) { + if (mbp != SUPPRESS_PTR) { + nconv = wcrtomb(mbp, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + mbp += nconv; + } + nread++; + } + if (wi != WEOF) + __ungetwc(wi, fp, locale); + if (mbp != SUPPRESS_PTR) + *mbp = 0; + return (nread); +} + +static __inline int +convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + wchar_t *wcp0; + wint_t wi; + int nread; + + nread = 0; + if (wcp == SUPPRESS_PTR) { + while ((wi = __fgetwc(fp, locale)) != WEOF && + width-- != 0 && !iswspace(wi)) + nread++; + if (wi != WEOF) + __ungetwc(wi, fp, locale); + } else { + wcp0 = wcp; + while ((wi = __fgetwc(fp, locale)) != WEOF && + width-- != 0 && !iswspace(wi)) { + *wcp++ = (wchar_t)wi; + nread++; + } + if (wi != WEOF) + __ungetwc(wi, fp, locale); + *wcp = '\0'; + } + return (nread); +} + +/* + * Read an integer, storing it in buf. The only relevant bit in the + * flags argument is PFXOK. + * + * Return 0 on a match failure, and the number of characters read + * otherwise. + */ +static __inline int +parseint(FILE *fp, wchar_t *buf, int width, int base, int flags, + locale_t locale) +{ + /* `basefix' is used to avoid `if' tests */ + static const short basefix[17] = + { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + wchar_t *wcp; + int c; + + flags |= SIGNOK | NDIGITS | NZDIGITS; + for (wcp = buf; width; width--) { + c = __fgetwc(fp, locale); + /* + * Switch on the character; `goto ok' if we accept it + * as a part of number. + */ + switch (c) { + + /* + * The digit 0 is always legal, but is special. For + * %i conversions, if no digits (zero or nonzero) have + * been scanned (only signs), we will have base==0. + * In that case, we should set it to 8 and enable 0x + * prefixing. Also, if we have not scanned zero + * digits before this, do not turn off prefixing + * (someone else will turn it off if we have scanned + * any nonzero digits). + */ + case '0': + if (base == 0) { + base = 8; + flags |= PFXOK; + } + if (flags & NZDIGITS) + flags &= ~(SIGNOK|NZDIGITS|NDIGITS); + else + flags &= ~(SIGNOK|PFXOK|NDIGITS); + goto ok; + + /* 1 through 7 always legal */ + case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + base = basefix[base]; + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* digits 8 and 9 ok iff decimal or hex */ + case '8': case '9': + base = basefix[base]; + if (base <= 8) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* letters ok iff hex */ + case 'A': case 'B': case 'C': + case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': + case 'd': case 'e': case 'f': + /* no need to fix base here */ + if (base <= 10) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* sign ok only as first character */ + case '+': case '-': + if (flags & SIGNOK) { + flags &= ~SIGNOK; + flags |= HAVESIGN; + goto ok; + } + break; + + /* + * x ok iff flag still set & 2nd char (or 3rd char if + * we have a sign). + */ + case 'x': case 'X': + if (flags & PFXOK && wcp == + buf + 1 + !!(flags & HAVESIGN)) { + base = 16; /* if %i */ + flags &= ~PFXOK; + goto ok; + } + break; + } + + /* + * If we got here, c is not a legal character for a + * number. Stop accumulating digits. + */ + if (c != WEOF) + __ungetwc(c, fp, locale); + break; + ok: + /* + * c is legal: store it and look at the next. + */ + *wcp++ = (wchar_t)c; + } + /* + * If we had only a sign, it is no good; push back the sign. + * If the number ends in `x', it was [sign] '0' 'x', so push + * back the x and treat it as [sign] '0'. + */ + if (flags & NDIGITS) { + if (wcp > buf) + __ungetwc(*--wcp, fp, locale); + return (0); + } + c = wcp[-1]; + if (c == 'x' || c == 'X') { + --wcp; + __ungetwc(c, fp, locale); + } + return (wcp - buf); +} + /* * MT-safe version. */ int -vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, va_list ap) +vfwscanf_l(FILE * __restrict fp, locale_t locale, + const wchar_t * __restrict fmt, va_list ap) { int ret; + FIX_LOCALE(locale); FLOCKFILE(fp); ORIENT(fp, 1); - ret = __vfwscanf(fp, fmt, ap); + ret = __vfwscanf(fp, locale, fmt, ap); FUNLOCKFILE(fp); return (ret); } +int +vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, va_list ap) +{ + return vfwscanf_l(fp, __get_locale(), fmt, ap); +} /* * Non-MT-safe version. */ int -__vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, va_list ap) +__vfwscanf(FILE * __restrict fp, locale_t locale, + const wchar_t * __restrict fmt, va_list ap) { +#define GETARG(type) ((flags & SUPPRESS) ? SUPPRESS_PTR : va_arg(ap, type)) wint_t c; /* character from format, or conversion */ size_t width; /* field width, or 0 */ - wchar_t *p; /* points into all kinds of strings */ - int n; /* handy integer */ int flags; /* flags as defined above */ - wchar_t *p0; /* saves original value of p when necessary */ int nassigned; /* number of fields assigned */ int nconversions; /* number of conversions */ + int nr; /* characters read by the current conversion */ int nread; /* number of characters consumed from fp */ int base; /* base argument to conversion function */ + struct ccl ccl; /* character class info */ wchar_t buf[BUF]; /* buffer for numeric conversions */ - const wchar_t *ccls; /* character class start */ - const wchar_t *ccle; /* character class end */ - int cclcompl; /* ccl is complemented? */ wint_t wi; /* handy wint_t */ - char *mbp; /* multibyte string pointer for %c %s %[ */ - size_t nconv; /* number of bytes in mb. conversion */ - char mbbuf[MB_LEN_MAX]; /* temporary mb. character buffer */ - mbstate_t mbs; - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; nassigned = 0; nconversions = 0; nread = 0; - ccls = ccle = NULL; + ccl.start = ccl.end = NULL; for (;;) { c = *fmt++; if (c == 0) return (nassigned); if (iswspace(c)) { - while ((c = __fgetwc_unlock(fp)) != WEOF && - iswspace(c)) - ; + while ((c = __fgetwc(fp, locale)) != WEOF && + iswspace_l(c, locale)) + nread++; if (c != WEOF) - ungetwc(c, fp); + __ungetwc(c, fp, locale); continue; } if (c != '%') @@ -175,10 +483,10 @@ again: c = *fmt++; switch (c) { case '%': literal: - if ((wi = __fgetwc_unlock(fp)) == WEOF) + if ((wi = __fgetwc(fp, locale)) == WEOF) goto input_failure; if (wi != c) { - ungetwc(wi, fp); + __ungetwc(wi, fp, locale); goto input_failure; } nread++; @@ -270,17 +578,17 @@ literal: break; case '[': - ccls = fmt; + ccl.start = fmt; if (*fmt == '^') { - cclcompl = 1; + ccl.compl = 1; fmt++; } else - cclcompl = 0; + ccl.compl = 0; if (*fmt == ']') fmt++; while (*fmt != '\0' && *fmt != ']') fmt++; - ccle = fmt; + ccl.end = fmt; fmt++; flags |= NOSKIP; c = CT_CCL; @@ -302,7 +610,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) @@ -338,11 +645,11 @@ literal: * that suppress this. */ if ((flags & NOSKIP) == 0) { - while ((wi = __fgetwc_unlock(fp)) != WEOF && iswspace(wi)) + while ((wi = __fgetwc(fp, locale)) != WEOF && iswspace(wi)) nread++; if (wi == WEOF) goto input_failure; - ungetwc(wi, fp); + __ungetwc(wi, fp, locale); } /* @@ -355,57 +662,14 @@ literal: if (width == 0) width = 1; if (flags & LONG) { - if (!(flags & SUPPRESS)) - p = va_arg(ap, wchar_t *); - n = 0; - while (width-- != 0 && - (wi = __fgetwc_unlock(fp)) != WEOF) { - if (!(flags & SUPPRESS)) - *p++ = (wchar_t)wi; - n++; - } - if (n == 0) - goto input_failure; - nread += n; - if (!(flags & SUPPRESS)) - nassigned++; + nr = convert_wchar(fp, GETARG(wchar_t *), width, + locale); } else { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - n = 0; - mbs = initial_mbs; - while (width != 0 && - (wi = __fgetwc_unlock(fp)) != WEOF) { - if (width >= MB_CUR_MAX && - !(flags & SUPPRESS)) { - nconv = wcrtomb(mbp, wi, &mbs); - if (nconv == (size_t)-1) - goto input_failure; - } else { - nconv = wcrtomb(mbbuf, wi, - &mbs); - if (nconv == (size_t)-1) - goto input_failure; - if (nconv > width) { - ungetwc(wi, fp); - break; - } - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, - nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - n++; - } - if (n == 0) - goto input_failure; - nread += n; - if (!(flags & SUPPRESS)) - nassigned++; + nr = convert_char(fp, GETARG(char *), width, + locale); } - nconversions++; + if (nr < 0) + goto input_failure; break; case CT_CCL: @@ -413,246 +677,49 @@ literal: if (width == 0) width = (size_t)~0; /* `infinity' */ /* take only those things in the class */ - if ((flags & SUPPRESS) && (flags & LONG)) { - n = 0; - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width-- != 0 && INCCL(wi)) - n++; - if (wi != WEOF) - ungetwc(wi, fp); - if (n == 0) - goto match_failure; - } else if (flags & LONG) { - p0 = p = va_arg(ap, wchar_t *); - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width-- != 0 && INCCL(wi)) - *p++ = (wchar_t)wi; - if (wi != WEOF) - ungetwc(wi, fp); - n = p - p0; - if (n == 0) - goto match_failure; - *p = 0; - nassigned++; + if (flags & LONG) { + nr = convert_wccl(fp, GETARG(wchar_t *), width, + &ccl, locale); } else { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - n = 0; - mbs = initial_mbs; - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width != 0 && INCCL(wi)) { - if (width >= MB_CUR_MAX && - !(flags & SUPPRESS)) { - nconv = wcrtomb(mbp, wi, &mbs); - if (nconv == (size_t)-1) - goto input_failure; - } else { - nconv = wcrtomb(mbbuf, wi, - &mbs); - if (nconv == (size_t)-1) - goto input_failure; - if (nconv > width) - break; - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, - nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - n++; - } - if (wi != WEOF) - ungetwc(wi, fp); - if (!(flags & SUPPRESS)) { - *mbp = 0; - nassigned++; - } + nr = convert_ccl(fp, GETARG(char *), width, + &ccl, locale); + } + if (nr <= 0) { + if (nr < 0) + goto input_failure; + else /* nr == 0 */ + goto match_failure; } - nread += n; - nconversions++; break; case CT_STRING: /* like CCL, but zero-length string OK, & no NOSKIP */ if (width == 0) width = (size_t)~0; - if ((flags & SUPPRESS) && (flags & LONG)) { - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width-- != 0 && - !iswspace(wi)) - nread++; - if (wi != WEOF) - ungetwc(wi, fp); - } else if (flags & LONG) { - p0 = p = va_arg(ap, wchar_t *); - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width-- != 0 && - !iswspace(wi)) { - *p++ = (wchar_t)wi; - nread++; - } - if (wi != WEOF) - ungetwc(wi, fp); - *p = '\0'; - nassigned++; + if (flags & LONG) { + nr = convert_wstring(fp, GETARG(wchar_t *), + width, locale); } else { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - mbs = initial_mbs; - while ((wi = __fgetwc_unlock(fp)) != WEOF && - width != 0 && - !iswspace(wi)) { - if (width >= MB_CUR_MAX && - !(flags & SUPPRESS)) { - nconv = wcrtomb(mbp, wi, &mbs); - if (nconv == (size_t)-1) - goto input_failure; - } else { - nconv = wcrtomb(mbbuf, wi, - &mbs); - if (nconv == (size_t)-1) - goto input_failure; - if (nconv > width) - break; - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, - nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - nread++; - } - if (wi != WEOF) - ungetwc(wi, fp); - if (!(flags & SUPPRESS)) { - *mbp = 0; - nassigned++; - } + nr = convert_string(fp, GETARG(char *), width, + locale); } - nconversions++; - continue; + if (nr < 0) + goto input_failure; + break; case CT_INT: /* scan an integer as if by the conversion function */ if (width == 0 || width > sizeof(buf) / sizeof(*buf) - 1) width = sizeof(buf) / sizeof(*buf) - 1; - flags |= SIGNOK | NDIGITS | NZDIGITS; - for (p = buf; width; width--) { - c = __fgetwc_unlock(fp); - /* - * Switch on the character; `goto ok' - * if we accept it as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is - * special. For %i conversions, if no - * digits (zero or nonzero) have been - * scanned (only signs), we will have - * base==0. In that case, we should set - * it to 8 and enable 0x prefixing. - * Also, if we have not scanned zero digits - * before this, do not turn off prefixing - * (someone else will turn it off if we - * have scanned any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } - break; - - /* - * x ok iff flag still set & 2nd char (or - * 3rd char if we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && p == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } - break; - } - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - if (c != WEOF) - ungetwc(c, fp); - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = (wchar_t)c; - } - /* - * If we had only a sign, it is no good; push - * back the sign. If the number ends in `x', - * it was [sign] '0' 'x', so push back the x - * and treat it as [sign] '0'. - */ - if (flags & NDIGITS) { - if (p > buf) - ungetwc(*--p, fp); + nr = parseint(fp, buf, width, base, flags, locale); + if (nr == 0) goto match_failure; - } - c = p[-1]; - if (c == 'x' || c == 'X') { - --p; - ungetwc(c, fp); - } if ((flags & SUPPRESS) == 0) { uintmax_t res; - *p = 0; + buf[nr] = L'\0'; if ((flags & UNSIGNED) == 0) res = wcstoimax(buf, NULL, base); else @@ -676,10 +743,7 @@ literal: *va_arg(ap, size_t *) = res; else *va_arg(ap, int *) = res; - nassigned++; } - nread += p - buf; - nconversions++; break; #ifndef NO_FLOATING_POINT @@ -688,26 +752,28 @@ literal: if (width == 0 || width > sizeof(buf) / sizeof(*buf) - 1) width = sizeof(buf) / sizeof(*buf) - 1; - if ((width = parsefloat(fp, buf, buf + width)) == 0) + nr = parsefloat(fp, buf, buf + width, locale); + if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { if (flags & LONGDBL) { - long double res = wcstold(buf, &p); + long double res = wcstold(buf, NULL); *va_arg(ap, long double *) = res; } else if (flags & LONG) { - double res = wcstod(buf, &p); + double res = wcstod(buf, NULL); *va_arg(ap, double *) = res; } else { - float res = wcstof(buf, &p); + float res = wcstof(buf, NULL); *va_arg(ap, float *) = res; } - nassigned++; } - nread += width; - nconversions++; break; #endif /* !NO_FLOATING_POINT */ } + if (!(flags & SUPPRESS)) + nassigned++; + nread += nr; + nconversions++; } input_failure: return (nconversions != 0 ? nassigned : EOF); @@ -717,7 +783,7 @@ match_failure: #ifndef NO_FLOATING_POINT static int -parsefloat(FILE *fp, wchar_t *buf, wchar_t *end) +parsefloat(FILE *fp, wchar_t *buf, wchar_t *end, locale_t locale) { mbstate_t mbs; size_t nconv; @@ -748,7 +814,7 @@ parsefloat(FILE *fp, wchar_t *buf, wchar_t *end) commit = buf - 1; c = WEOF; for (p = buf; p < end; ) { - if ((c = __fgetwc_unlock(fp)) == WEOF) + if ((c = __fgetwc(fp, locale)) == WEOF) break; reswitch: switch (state) { @@ -868,9 +934,9 @@ reswitch: parsedone: if (c != WEOF) - ungetwc(c, fp); + __ungetwc(c, fp, locale); while (commit < --p) - ungetwc(*p, fp); + __ungetwc(*p, fp, locale); *++commit = '\0'; return (commit - buf); } diff --git a/lib/libc/stdio/vscanf.c b/lib/libc/stdio/vscanf.c index e96466c110..ac7f7cfe34 100644 --- a/lib/libc/stdio/vscanf.c +++ b/lib/libc/stdio/vscanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Donn Seeley at UUNET Technologies, Inc. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,23 +35,30 @@ * SUCH DAMAGE. * * @(#)vscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vscanf.c,v 1.13 2007/01/09 00:28:08 imp Exp $ - * $DragonFly: src/lib/libc/stdio/vscanf.c,v 1.4 2005/01/31 22:29:40 dillon Exp $ + * $FreeBSD: head/lib/libc/stdio/vscanf.c 249810 2013-04-23 14:36:44Z emaste $ */ + #include "namespace.h" #include #include "un-namespace.h" #include "libc_private.h" #include "local.h" +#include "xlocale_private.h" int -vscanf(const char * __restrict fmt, __va_list ap) +vscanf_l(locale_t locale, const char * __restrict fmt, __va_list ap) { int retval; + FIX_LOCALE(locale); FLOCKFILE(stdin); - retval = __svfscanf(stdin, fmt, ap); + retval = __svfscanf(stdin, locale, fmt, ap); FUNLOCKFILE(stdin); return (retval); } +int +vscanf(const char * __restrict fmt, __va_list ap) +{ + return vscanf_l(__get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index b3246ea96e..1e46cd8e73 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,29 +35,34 @@ * SUCH DAMAGE. * * @(#)vsnprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.24 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/vsnprintf.c,v 1.9 2008/05/15 03:59:59 dillon Exp $ + * $FreeBSD: head/lib/libc/stdio/vsnprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ + +#include #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" int -vsnprintf(char * __restrict str, size_t n, const char * __restrict fmt, - __va_list ap) +vsnprintf_l(char * __restrict str, size_t n, locale_t locale, + const char * __restrict fmt, __va_list ap) { size_t on; int ret; char dummy[2]; - FILE f; + FILE f = FAKE_FILE; + FIX_LOCALE(locale); on = n; if (n != 0) n--; - if (n > INT_MAX) - n = INT_MAX; + if (n > INT_MAX) { + errno = EOVERFLOW; + *str = '\0'; + return (EOF); + } /* Stdio internals do not deal correctly with zero length buffer */ if (n == 0) { if (on > 0) @@ -60,13 +70,17 @@ vsnprintf(char * __restrict str, size_t n, const char * __restrict fmt, str = dummy; n = 1; } - f.pub._fileno = -1; f.pub._flags = __SWR | __SSTR; f._bf._base = f.pub._p = (unsigned char *)str; f._bf._size = f.pub._w = n; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - ret = __vfprintf(&f, fmt, ap); + ret = __vfprintf(&f, locale, fmt, ap); if (on > 0) *f.pub._p = '\0'; return (ret); } +int +vsnprintf(char * __restrict str, size_t n, const char * __restrict fmt, + __va_list ap) +{ + return vsnprintf_l(str, n, __get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index e56725fe9c..9efe08a2a4 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,27 +35,32 @@ * SUCH DAMAGE. * * @(#)vsprintf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vsprintf.c,v 1.16 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/vsprintf.c,v 1.8 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vsprintf.c 249808 2013-04-23 13:33:13Z emaste $ */ + #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" int -vsprintf(char * __restrict str, const char * __restrict fmt, __va_list ap) +vsprintf_l(char * __restrict str, locale_t locale, + const char * __restrict fmt, __va_list ap) { int ret; - FILE f; + FILE f = FAKE_FILE; + FIX_LOCALE(locale); - f.pub._fileno = -1; f.pub._flags = __SWR | __SSTR; f._bf._base = f.pub._p = (unsigned char *)str; f._bf._size = f.pub._w = INT_MAX; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - ret = __vfprintf(&f, fmt, ap); + ret = __vfprintf(&f, locale, fmt, ap); *f.pub._p = 0; return (ret); } +int +vsprintf(char * __restrict str, const char * __restrict fmt, __va_list ap) +{ + return vsprintf_l(str, __get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/vsscanf.c b/lib/libc/stdio/vsscanf.c index 4ac03139b5..55078ba47b 100644 --- a/lib/libc/stdio/vsscanf.c +++ b/lib/libc/stdio/vsscanf.c @@ -2,6 +2,11 @@ * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * This code is derived from software contributed to Berkeley by * Donn Seeley at UUNET Technologies, Inc. * @@ -30,14 +35,13 @@ * SUCH DAMAGE. * * @(#)vsscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vsscanf.c,v 1.14 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/vsscanf.c,v 1.10 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vsscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" static int eofread(void *, char *, int); @@ -51,17 +55,21 @@ eofread(void *cookie __unused, char *buf __unused, int len __unused) } int -vsscanf(const char * __restrict str, const char * __restrict fmt, __va_list ap) +vsscanf_l(const char * __restrict str, locale_t locale, + const char * __restrict fmt, __va_list ap) { - FILE f; + FILE f = FAKE_FILE; + FIX_LOCALE(locale); - f.pub._fileno = -1; f.pub._flags = __SRD; f._bf._base = f.pub._p = (unsigned char *)str; f._bf._size = f.pub._r = strlen(str); f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - return (__svfscanf(&f, fmt, ap)); + return (__svfscanf(&f, locale, fmt, ap)); +} +int +vsscanf(const char * __restrict str, const char * __restrict fmt, + __va_list ap) +{ + return vsscanf_l(str, __get_locale(), fmt, ap); } diff --git a/lib/libc/stdio/vswprintf.c b/lib/libc/stdio/vswprintf.c index 026d17f42c..4507a91f9d 100644 --- a/lib/libc/stdio/vswprintf.c +++ b/lib/libc/stdio/vswprintf.c @@ -4,6 +4,11 @@ * Copyright (c) 1997 Todd C. Miller * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,60 +31,67 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/vswprintf.c,v 1.7 2008/04/17 22:17:54 jhb Exp $ - * $DragonFly: src/lib/libc/stdio/vswprintf.c,v 1.2 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vswprintf.c 234531 2012-04-21 06:10:18Z das $ */ #include +#include #include #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" int -vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, - __va_list ap) +vswprintf_l(wchar_t * __restrict s, size_t n, locale_t locale, + const wchar_t * __restrict fmt, __va_list ap) { static const mbstate_t initial; mbstate_t mbs; - FILE f; + FILE f = FAKE_FILE; char *mbp; int ret, sverrno; size_t nwc; + FIX_LOCALE(locale); if (n == 0) { errno = EINVAL; return (-1); } + if (n - 1 > INT_MAX) { + errno = EOVERFLOW; + *s = L'\0'; + return (-1); + } - f.pub._fileno = -1; f.pub._flags = __SWR | __SSTR | __SALC; f._bf._base = f.pub._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { errno = ENOMEM; + *s = L'\0'; return (-1); } f._bf._size = f.pub._w = 127; /* Leave room for the NUL */ - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - ret = __vfwprintf(&f, fmt, ap); + ret = __vfwprintf(&f, locale, fmt, ap); if (ret < 0) { sverrno = errno; free(f._bf._base); errno = sverrno; + *s = L'\0'; return (-1); } *f.pub._p = '\0'; - mbp = (char *)f._bf._base; + mbp = f._bf._base; /* * XXX Undo the conversion from wide characters to multibyte that * fputwc() did in __vfwprintf(). */ mbs = initial; - nwc = mbsrtowcs(s, (const char **)&mbp, n, &mbs); + nwc = mbsrtowcs_l(s, (const char **)&mbp, n, &mbs, locale); free(f._bf._base); if (nwc == (size_t)-1) { errno = EILSEQ; + *s = L'\0'; return (-1); } if (nwc == n) { @@ -90,3 +102,9 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, return (ret); } +int +vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, + __va_list ap) +{ + return vswprintf_l(s, n, __get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/vswscanf.c b/lib/libc/stdio/vswscanf.c index f92922c1b0..84076e24dc 100644 --- a/lib/libc/stdio/vswscanf.c +++ b/lib/libc/stdio/vswscanf.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Donn Seeley at UUNET Technologies, Inc. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,8 +35,7 @@ * SUCH DAMAGE. * * @(#)vsscanf.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/stdio/vswscanf.c,v 1.6 2009/01/15 18:53:52 rdivacky Exp $ - * $DragonFly: src/lib/libc/stdio/vswscanf.c,v 1.3 2006/03/02 18:05:30 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/vswscanf.c 249808 2013-04-23 13:33:13Z emaste $ */ #include @@ -41,7 +45,7 @@ #include #include #include "local.h" -#include "priv_stdio.h" +#include "xlocale_private.h" static int eofread(void *, char *, int); @@ -53,16 +57,17 @@ eofread(void *cookie __unused, char *buf __unused, int len __unused) } int -vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, - va_list ap) +vswscanf_l(const wchar_t * __restrict str, locale_t locale, + const wchar_t * __restrict fmt, va_list ap) { static const mbstate_t initial; mbstate_t mbs; - FILE f; + FILE f = FAKE_FILE; char *mbstr; size_t mlen; int r; const wchar_t *strp; + FIX_LOCALE(locale); /* * XXX Convert the wide character string to multibyte, which @@ -72,20 +77,22 @@ vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, return (EOF); mbs = initial; strp = str; - if ((mlen = wcsrtombs(mbstr, &strp, SIZE_T_MAX, &mbs)) == (size_t)-1) { + if ((mlen = wcsrtombs_l(mbstr, &strp, SIZE_T_MAX, &mbs, locale)) == (size_t)-1) { free(mbstr); return (EOF); } - f.pub._fileno = -1; f.pub._flags = __SRD; f._bf._base = f.pub._p = (unsigned char *)mbstr; f._bf._size = f.pub._r = mlen; f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - memset(WCIO_GET(&f), 0, sizeof(struct wchar_io_data)); - r = __vfwscanf(&f, fmt, ap); + r = __vfwscanf(&f, locale, fmt, ap); free(mbstr); return (r); } +int +vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, + va_list ap) +{ + return vswscanf_l(str, __get_locale(), fmt, ap); +} diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c index 545e5648b0..cfd668f3f9 100644 --- a/lib/libc/stdio/wbuf.c +++ b/lib/libc/stdio/wbuf.c @@ -31,12 +31,10 @@ * * @(#)wbuf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/wbuf.c,v 1.12 2007/01/09 00:28:08 imp Exp $ - * $DragonFly: src/lib/libc/stdio/wbuf.c,v 1.6 2005/07/23 20:23:06 joerg Exp $ */ #include #include "local.h" -#include "priv_stdio.h" /* * Write the given character into the (probably full) buffer for diff --git a/lib/libc/stdio/wprintf.3 b/lib/libc/stdio/wprintf.3 index 4d9f582f64..2372c0c370 100644 --- a/lib/libc/stdio/wprintf.3 +++ b/lib/libc/stdio/wprintf.3 @@ -31,19 +31,14 @@ .\" .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" FreeBSD: src/lib/libc/stdio/printf.3,v 1.47 2002/09/06 11:23:55 tjr Exp -.\" $FreeBSD: src/lib/libc/stdio/wprintf.3,v 1.6 2007/01/09 00:28:08 imp Exp $ -.\" $DragonFly: src/lib/libc/stdio/wprintf.3,v 1.3 2007/11/04 16:23:23 swildner Exp $ +.\" $FreeBSD: head/lib/libc/stdio/wprintf.3 208027 2010-05-13 12:07:55Z uqs $ .\" .Dd July 5, 2003 .Dt WPRINTF 3 .Os .Sh NAME -.Nm wprintf , -.Nm fwprintf , -.Nm swprintf , -.Nm vwprintf , -.Nm vfwprintf , -.Nm vswprintf +.Nm wprintf , fwprintf , swprintf , +.Nm vwprintf , vfwprintf , vswprintf .Nd formatted wide character output conversion .Sh LIBRARY .Lb libc @@ -381,7 +376,7 @@ The .Vt double argument is rounded and converted in the style .Sm off -.Oo \- Oc Ar d Li \&. Ar ddd Li e \\*[Pm] Ar dd +.Oo \- Oc Ar d Li \&. Ar ddd Li e \(+- Ar dd .Sm on where there is one digit before the decimal-point character @@ -457,7 +452,7 @@ The .Vt double argument is converted to hexadecimal notation in the style .Sm off -.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \\*[Pm] Oc Ar d , +.Oo \- Oc Li 0x Ar h Li \&. Ar hhhp Oo \(+- Oc Ar d , .Sm on where the number of digits after the hexadecimal-point character is equal to the precision specification. @@ -593,9 +588,6 @@ In no case does a non-existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. -.Sh SECURITY CONSIDERATIONS -Refer to -.Xr printf 3 . .Sh SEE ALSO .Xr btowc 3 , .Xr fputws 3 , @@ -621,3 +613,6 @@ and functions conform to .St -isoC-99 . +.Sh SECURITY CONSIDERATIONS +Refer to +.Xr printf 3 . diff --git a/lib/libc/stdio/wprintf.c b/lib/libc/stdio/wprintf.c index 776fd62896..8135869d5f 100644 --- a/lib/libc/stdio/wprintf.c +++ b/lib/libc/stdio/wprintf.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/wprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/wprintf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/wprintf.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include +#include int wprintf(const wchar_t * __restrict fmt, ...) @@ -43,3 +49,15 @@ wprintf(const wchar_t * __restrict fmt, ...) return (ret); } +int +wprintf_l(locale_t locale, const wchar_t * __restrict fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = vfwprintf_l(stdout, locale, fmt, ap); + va_end(ap); + + return (ret); +} diff --git a/lib/libc/stdio/wscanf.3 b/lib/libc/stdio/wscanf.3 index 0fa785e688..422154fe7c 100644 --- a/lib/libc/stdio/wscanf.3 +++ b/lib/libc/stdio/wscanf.3 @@ -31,8 +31,7 @@ .\" .\" @(#)scanf.3 8.2 (Berkeley) 12/11/93 .\" FreeBSD: src/lib/libc/stdio/scanf.3,v 1.24 2003/06/28 09:03:25 das Exp -.\" $FreeBSD: src/lib/libc/stdio/wscanf.3,v 1.7 2007/01/09 00:28:08 imp Exp $ -.\" $DragonFly: src/lib/libc/stdio/wscanf.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ +.\" $FreeBSD: head/lib/libc/stdio/wscanf.3 235363 2012-05-12 20:27:13Z joel $ .\" .Dd July 5, 2003 .Dt WSCANF 3 @@ -366,10 +365,10 @@ The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket -.Cm [ +.Cm \&[ character and a close bracket -.Cm ] +.Cm \&] character. The set .Em excludes diff --git a/lib/libc/stdio/wscanf.c b/lib/libc/stdio/wscanf.c index cc33ffada6..dfb247dbe5 100644 --- a/lib/libc/stdio/wscanf.c +++ b/lib/libc/stdio/wscanf.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,13 +28,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/wscanf.c,v 1.1 2002/09/23 12:40:06 tjr Exp $ - * $DragonFly: src/lib/libc/stdio/wscanf.c,v 1.1 2005/07/25 00:37:41 joerg Exp $ + * $FreeBSD: head/lib/libc/stdio/wscanf.c 227753 2011-11-20 14:45:42Z theraven $ */ + #include #include #include +#include int wscanf(const wchar_t * __restrict fmt, ...) @@ -43,3 +49,15 @@ wscanf(const wchar_t * __restrict fmt, ...) return (r); } +int +wscanf_l(locale_t locale, const wchar_t * __restrict fmt, ...) +{ + va_list ap; + int r; + + va_start(ap, fmt); + r = vfwscanf_l(stdin, locale, fmt, ap); + va_end(ap); + + return (r); +} diff --git a/lib/libc/stdio/wsetup.c b/lib/libc/stdio/wsetup.c index 5f237b6172..695869a0ba 100644 --- a/lib/libc/stdio/wsetup.c +++ b/lib/libc/stdio/wsetup.c @@ -31,14 +31,12 @@ * * @(#)wsetup.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/wsetup.c,v 1.11 2009/01/08 06:38:06 das Exp $ - * $DragonFly: src/lib/libc/stdio/wsetup.c,v 1.5 2005/07/23 20:23:06 joerg Exp $ */ #include #include #include #include "local.h" -#include "priv_stdio.h" /* * Various output routines call wsetup to be sure it is safe to write, diff --git a/lib/libc/stdlib/strtoimax.c b/lib/libc/stdlib/strtoimax.c index d38c70f5c2..7b1ce8f098 100644 --- a/lib/libc/stdlib/strtoimax.c +++ b/lib/libc/stdlib/strtoimax.c @@ -1,9 +1,11 @@ -/* $DragonFly: src/lib/libc/stdlib/strtoimax.c,v 1.2 2008/08/19 15:50:24 joerg Exp $ */ - /*- - * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,19 +30,122 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * from @(#)strtol.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/stdlib/strtoimax.c 251672 2013-06-13 00:19:30Z emaste $ */ -#include + #include #include -#include -#include -#include #include +#include +#include "xlocale_private.h" + +/* + * Convert a string to an intmax_t integer. + * + * Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +intmax_t +strtoimax_l(const char * __restrict nptr, char ** __restrict endptr, int base, + locale_t locale) +{ + const char *s; + uintmax_t acc; + char c; + uintmax_t cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME strtoimax -#define __INT intmax_t -#define __INT_MIN INTMAX_MIN -#define __INT_MAX INTMAX_MAX + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + s = nptr; + do { + c = *s++; + } while (isspace_l((unsigned char)c, locale)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= 'a' && s[1] <= 'f'))) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_strtol.h" + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for intmax_t is + * [-9223372036854775808..9223372036854775807] and the input base + * is 10, cutoff will be set to 922337203685477580 and cutlim to + * either 7 (neg==0) or 8 (neg==1), meaning that if we have + * accumulated a value > 922337203685477580, or equal but the + * next digit is > 7 (or 8), the number is too big, and we will + * return a range error. + * + * Set 'any' if any `digits' consumed; make it negative to indicate + * overflow. + */ + cutoff = neg ? (uintmax_t)-(INTMAX_MIN + INTMAX_MAX) + INTMAX_MAX + : INTMAX_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { + if (c >= '0' && c <= '9') + c -= '0'; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? INTMAX_MIN : INTMAX_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} +intmax_t +strtoimax(const char * __restrict nptr, char ** __restrict endptr, int base) +{ + return strtoimax_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c index 6af9c7b334..2310b2fd8b 100644 --- a/lib/libc/stdlib/strtol.c +++ b/lib/libc/stdlib/strtol.c @@ -1,9 +1,11 @@ -/* $DragonFly: src/lib/libc/stdlib/strtol.c,v 1.5 2008/08/19 15:50:24 joerg Exp $ */ - /*- - * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,18 +30,127 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)strtol.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/stdlib/strtol.c 251672 2013-06-13 00:19:30Z emaste $ */ -#include + +#include #include #include -#include -#include #include +#include "xlocale_private.h" + + +/* + * Convert a string to a long integer. + * + * Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +long +strtol_l(const char * __restrict nptr, char ** __restrict endptr, int base, + locale_t locale) +{ + const char *s; + unsigned long acc; + char c; + unsigned long cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME strtol -#define __INT long -#define __INT_MIN LONG_MIN -#define __INT_MAX LONG_MAX + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + s = nptr; + do { + c = *s++; + } while (isspace_l((unsigned char)c, locale)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= 'a' && s[1] <= 'f'))) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_strtol.h" + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for longs is + * [-2147483648..2147483647] and the input base is 10, + * cutoff will be set to 214748364 and cutlim to either + * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated + * a value > 214748364, or equal but the next digit is > 7 (or 8), + * the number is too big, and we will return a range error. + * + * Set 'any' if any `digits' consumed; make it negative to indicate + * overflow. + */ + cutoff = neg ? (unsigned long)-(LONG_MIN + LONG_MAX) + LONG_MAX + : LONG_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { + if (c >= '0' && c <= '9') + c -= '0'; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? LONG_MIN : LONG_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} +long +strtol(const char * __restrict nptr, char ** __restrict endptr, int base) +{ + return strtol_l(nptr, endptr, base, __get_locale()); +} +long double +strtold(const char * __restrict nptr, char ** __restrict endptr) +{ + return strtold_l(nptr, endptr, __get_locale()); +} diff --git a/lib/libc/stdlib/strtoumax.c b/lib/libc/stdlib/strtoumax.c index 5c44be0c0f..3bd82abd27 100644 --- a/lib/libc/stdlib/strtoumax.c +++ b/lib/libc/stdlib/strtoumax.c @@ -1,9 +1,11 @@ -/* $DragonFly: src/lib/libc/stdlib/strtoumax.c,v 1.2 2008/08/19 15:50:24 joerg Exp $ */ - /*- - * Copyright (c) 2005 The DragonFly Project. All rights reserved. - * Copyright (c) 2003 Citrus Project, + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +15,14 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -25,18 +30,100 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * from @(#)strtoul.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/stdlib/strtoumax.c 251672 2013-06-13 00:19:30Z emaste $ */ -#include + #include #include -#include -#include -#include #include +#include +#include "xlocale_private.h" + +/* + * Convert a string to a uintmax_t integer. + * + * Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +uintmax_t +strtoumax_l(const char * __restrict nptr, char ** __restrict endptr, int base, + locale_t locale) +{ + const char *s; + uintmax_t acc; + char c; + uintmax_t cutoff; + int neg, any, cutlim; + FIX_LOCALE(locale); -#define _FUNCNAME strtoumax -#define __UINT uintmax_t -#define __UINT_MAX UINTMAX_MAX + /* + * See strtoimax for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (isspace_l((unsigned char)c, locale)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= 'a' && s[1] <= 'f'))) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; -#include "_strtoul.h" + cutoff = UINTMAX_MAX / base; + cutlim = UINTMAX_MAX % base; + for ( ; ; c = *s++) { + if (c >= '0' && c <= '9') + c -= '0'; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = UINTMAX_MAX; + errno = ERANGE; + } else if (!any) { +noconv: + errno = EINVAL; + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} +uintmax_t +strtoumax(const char * __restrict nptr, char ** __restrict endptr, int base) +{ + return strtoumax_l(nptr, endptr, base, __get_locale()); +} diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc index e931d36c57..a7f8a8e33b 100644 --- a/lib/libc/stdtime/Makefile.inc +++ b/lib/libc/stdtime/Makefile.inc @@ -1,11 +1,12 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp -# $FreeBSD: src/lib/libc/stdtime/Makefile.inc,v 1.9.2.3 2003/05/23 23:44:27 keramida Exp $ +# $FreeBSD: head/lib/libc/stdtime/Makefile.inc 248672 2013-03-24 01:35:37Z dim $ .PATH: ${.CURDIR}/../libc/stdtime ${.CURDIR}/../locale CMAPS+= ${.CURDIR}/stdtime/Symbol.map -SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c time32.c +SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ + time32.c .if ${LIB} == "c" MAN+= ctime.3 strftime.3 strptime.3 time2posix.3 @@ -15,5 +16,7 @@ MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \ ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \ ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \ ctime.3 asctime_r.3 +MLINKS+=strftime.3 strftime_l.3 +MLINKS+=strptime.3 strptime_l.3 MLINKS+=time2posix.3 posix2time.3 .endif diff --git a/lib/libc/stdtime/Symbol.map b/lib/libc/stdtime/Symbol.map index 093d386607..c1e38ae874 100644 --- a/lib/libc/stdtime/Symbol.map +++ b/lib/libc/stdtime/Symbol.map @@ -1,9 +1,16 @@ DF306.0 { + _int_to_time; + _long_to_time; + _time32_to_time; + _time64_to_time; + _time_to_int; + _time_to_long; + _time_to_time32; + _time_to_time64; asctime; asctime_r; ctime; ctime_r; - daylight; difftime; gmtime; gmtime_r; @@ -22,14 +29,3 @@ DF306.0 { tzset; tzsetwall; }; - -DFprivate_1.0 { - _int_to_time; - _long_to_time; - _time32_to_time; - _time64_to_time; - _time_to_int; - _time_to_long; - _time_to_time32; - _time_to_time64; -}; diff --git a/lib/libc/stdtime/asctime.c b/lib/libc/stdtime/asctime.c index 3ab6e779a7..e694eb2313 100644 --- a/lib/libc/stdtime/asctime.c +++ b/lib/libc/stdtime/asctime.c @@ -8,7 +8,7 @@ ** the output of strftime is supposed to be locale specific ** whereas the output of asctime is supposed to be constant. ** -** $FreeBSD: src/lib/libc/stdtime/asctime.c,v 1.7.6.1 2001/03/05 11:37:20 obrien Exp $ +** $FreeBSD: head/contrib/tzcode/stdtime/asctime.c 214411 2010-10-27 07:14:46Z edwin $ */ /*LINTLIBRARY*/ @@ -71,9 +71,10 @@ static char buf_asctime[MAX_ASCTIME_BUF_SIZE]; ** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. */ - char * -asctime_r(const struct tm *timeptr, char *buf) +asctime_r(timeptr, buf) +const struct tm * timeptr; +char * buf; { static const char wday_name[][3] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" @@ -82,10 +83,10 @@ asctime_r(const struct tm *timeptr, char *buf) "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - char year[INT_STRLEN_MAXIMUM(int) + 2]; - char result[MAX_ASCTIME_BUF_SIZE]; const char * wn; const char * mn; + char year[INT_STRLEN_MAXIMUM(int) + 2]; + char result[MAX_ASCTIME_BUF_SIZE]; if (timeptr == NULL) { errno = EINVAL; @@ -103,17 +104,24 @@ asctime_r(const struct tm *timeptr, char *buf) ** Assume that strftime is unaffected by other out-of-range members ** (e.g., timeptr->tm_mday) when processing "%Y". */ - strftime(year, sizeof year, "%Y", timeptr); - snprintf(result, sizeof result, + (void) strftime(year, sizeof year, "%Y", timeptr); + /* + ** We avoid using snprintf since it's not available on all systems. + */ + (void) sprintf(result, ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), wn, mn, timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, year); - if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) { + if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) return strcpy(buf, result); - } else { + else { +#ifdef EOVERFLOW errno = EOVERFLOW; +#else /* !defined EOVERFLOW */ + errno = EINVAL; +#endif /* !defined EOVERFLOW */ return NULL; } } @@ -123,7 +131,8 @@ asctime_r(const struct tm *timeptr, char *buf) */ char * -asctime(const struct tm *timeptr) +asctime(timeptr) +const struct tm * timeptr; { return asctime_r(timeptr, buf_asctime); } diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3 index d0949e17b6..d84ab4a164 100644 --- a/lib/libc/stdtime/ctime.3 +++ b/lib/libc/stdtime/ctime.3 @@ -11,7 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -27,9 +27,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/stdtime/ctime.3,v 1.11.2.7 2003/05/23 23:53:40 keramida Exp $ +.\" From: @(#)ctime.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/contrib/tzcode/stdtime/ctime.3 165903 2007-01-09 00:28:16Z imp $ .\" -.Dd October 19, 2008 +.Dd January 2, 1999 .Dt CTIME 3 .Os .Sh NAME @@ -81,7 +82,7 @@ and all take as an argument a time value representing the time in seconds since the Epoch (00:00:00 .Tn UTC , -1970-01-01; see +January 1, 1970; see .Xr time 3 ) . .Pp The function @@ -92,11 +93,18 @@ and returns a pointer to a .Dq Fa struct tm (described below) which contains the broken-out time information for the value after adjusting for the current -time zone and any time zone adjustments. +time zone (and any other factors such as Daylight Saving Time). Time zone adjustments are performed as specified by the .Ev TZ environment variable (see .Xr tzset 3 ) . +The function +.Fn localtime +uses +.Xr tzset 3 +to initialize time conversion information if +.Xr tzset 3 +has not already been called by the process. .Pp After filling in the tm structure, .Fn localtime @@ -106,7 +114,7 @@ element of .Fa tzname to a pointer to an .Tn ASCII -string that's the time zone abbreviation to be +string that is the time zone abbreviation to be used with .Fn localtime Ns 's return value. @@ -121,21 +129,12 @@ The function adjusts the time value for the current time zone in the same manner as .Fn localtime , -and returns a pointer to a string of the form: +and returns a pointer to a 26-character string of the form: .Bd -literal -offset indent Thu Nov 24 18:22:48 1986\en\e0 .Ed .Pp -Years requiring fewer than four characters are padded with leading zeroes. -For years longer than four characters, the string is of the form -.Bd -literal -offset indent -Thu Nov 24 18:22:48 81986\en\e0 -.Ed -.Pp -with five spaces before the year. -These unusual formats are designed to make it less likely that older -software that expects exactly 26 bytes of output will mistakenly output -misleading values for out-of-range years. +All the fields have constant width. .Pp The .Fn ctime_r @@ -226,9 +225,7 @@ A negative value for causes the .Fn mktime function to attempt to divine whether summer time is in effect for the -specified time; in this case it does not use a consistent -rule and may give a different answer when later -presented with the same argument. +specified time. The .Fa tm_isdst and @@ -293,27 +290,10 @@ is the offset (in seconds) of the time represented from .Tn UTC , with positive values indicating east of the Prime Meridian. -.Sh COMPATIBILITY -The -.Fn asctime -and -.Fn ctime -functions -behave strangely for years before 1000 or after 9999. -The 1989 and 1999 editions of the C Standard say -that years from -99 through 999 are converted without -extra spaces, but this conflicts with longstanding -tradition and with this implementation. -Traditional implementations of these two functions are -restricted to years in the range 1900 through 2099. -To avoid this portability mess, new programs should use -.Xr strftime 3 -instead. .Sh SEE ALSO .Xr date 1 , .Xr gettimeofday 2 , .Xr getenv 3 , -.Xr strftime 3 , .Xr time 3 , .Xr tzset 3 , .Xr tzfile 5 @@ -370,7 +350,8 @@ function will modify the same object. The C Standard provides no mechanism for a program to modify its current local timezone setting, and the .Tn POSIX Ns No \&-standard -method is not reentrant. (However, thread-safe implementations are provided +method is not reentrant. +(However, thread-safe implementations are provided in the .Tn POSIX threaded environment.) diff --git a/lib/libc/stdtime/difftime.c b/lib/libc/stdtime/difftime.c index df2bee60ae..6bce433c0f 100644 --- a/lib/libc/stdtime/difftime.c +++ b/lib/libc/stdtime/difftime.c @@ -2,16 +2,18 @@ ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. ** -** $FreeBSD: src/lib/libc/stdtime/difftime.c,v 1.4.8.1 2001/03/05 11:37:21 obrien Exp $ +** $FreeBSD: head/contrib/tzcode/stdtime/difftime.c 192625 2009-05-23 06:31:50Z edwin $ */ /*LINTLIBRARY*/ #include "namespace.h" -#include "private.h" +#include "private.h" /* for time_t, TYPE_INTEGRAL, and TYPE_SIGNED */ #include "un-namespace.h" double -difftime(const time_t time1, const time_t time0) +difftime(time1, time0) +const time_t time1; +const time_t time0; { /* ** If (sizeof (double) > sizeof (time_t)) simply convert and subtract diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c index b63adc43b8..6556ec17e0 100644 --- a/lib/libc/stdtime/localtime.c +++ b/lib/libc/stdtime/localtime.c @@ -2,7 +2,7 @@ ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. ** -** $FreeBSD: src/lib/libc/stdtime/localtime.c,v 1.25.2.2 2002/08/13 16:08:07 bmilekic Exp $ +** $FreeBSD: head/contrib/tzcode/stdtime/localtime.c 226828 2011-10-27 08:44:07Z trociny $ */ /* @@ -15,15 +15,28 @@ #include "namespace.h" #include #include - +#include #include -#include /* for FLT_MAX and DBL_MAX */ -#include #include #include "private.h" -#include +#include "libc_private.h" +#include "un-namespace.h" #include "tzfile.h" +#include "float.h" /* for FLT_MAX and DBL_MAX */ + +#ifndef TZ_ABBR_MAX_LEN +#define TZ_ABBR_MAX_LEN 16 +#endif /* !defined TZ_ABBR_MAX_LEN */ + +#ifndef TZ_ABBR_CHAR_SET +#define TZ_ABBR_CHAR_SET \ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._" +#endif /* !defined TZ_ABBR_CHAR_SET */ + +#ifndef TZ_ABBR_ERR_CHAR +#define TZ_ABBR_ERR_CHAR '_' +#endif /* !defined TZ_ABBR_ERR_CHAR */ #include "libc_private.h" @@ -45,19 +58,18 @@ if (__isthreaded) _pthread_rwlock_unlock(x); \ } while (0) -#ifndef TZ_ABBR_MAX_LEN -#define TZ_ABBR_MAX_LEN 16 -#endif /* !defined TZ_ABBR_MAX_LEN */ +/* +** SunOS 4.1.1 headers lack O_BINARY. +*/ -#ifndef TZ_ABBR_CHAR_SET -#define TZ_ABBR_CHAR_SET \ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._" -#endif /* !defined TZ_ABBR_CHAR_SET */ +#ifdef O_BINARY +#define OPEN_MODE (O_RDONLY | O_BINARY) +#endif /* defined O_BINARY */ +#ifndef O_BINARY +#define OPEN_MODE O_RDONLY +#endif /* !defined O_BINARY */ -#ifndef TZ_ABBR_ERR_CHAR -#define TZ_ABBR_ERR_CHAR '_' -#endif /* !defined TZ_ABBR_ERR_CHAR */ - +#ifndef WILDABBR /* ** Someone might make incorrect use of a time zone abbreviation: ** 1. They might reference tzname[0] before calling tzset (explicitly @@ -78,9 +90,15 @@ ** that tzname[0] has the "normal" length of three characters). */ #define WILDABBR " " +#endif /* !defined WILDABBR */ static char wildabbr[] = WILDABBR; +/* + * In June 2004 it was decided UTC was a more appropriate default time + * zone than GMT. + */ + static const char gmt[] = "UTC"; /* @@ -194,10 +212,17 @@ static int tzload(const char * name, struct state * sp, static int tzparse(const char * name, struct state * sp, int lastditch); +#ifdef ALL_STATE +static struct state * lclptr; +static struct state * gmtptr; +#endif /* defined ALL_STATE */ + +#ifndef ALL_STATE static struct state lclmem; static struct state gmtmem; #define lclptr (&lclmem) #define gmtptr (&gmtmem) +#endif /* State Farm */ #ifndef TZ_STRLEN_MAX #define TZ_STRLEN_MAX 255 @@ -205,9 +230,14 @@ static struct state gmtmem; static char lcl_TZname[TZ_STRLEN_MAX + 1]; static int lcl_is_set; -static int gmt_is_set; +static pthread_once_t gmt_once = PTHREAD_ONCE_INIT; static pthread_rwlock_t lcl_rwlock = PTHREAD_RWLOCK_INITIALIZER; -static pthread_mutex_t gmt_mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_once_t gmtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t gmtime_key; +static int gmtime_key_error; +static pthread_once_t localtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t localtime_key; +static int localtime_key_error; char * tzname[2] = { wildabbr, @@ -227,8 +257,13 @@ static struct tm tm; time_t timezone = 0; int daylight = 0; +#ifdef ALTZONE +time_t altzone = 0; +#endif /* defined ALTZONE */ + static long -detzcode(const char * const codep) +detzcode(codep) +const char * const codep; { long result; int i; @@ -240,10 +275,11 @@ detzcode(const char * const codep) } static time_t -detzcode64(const char * const codep) +detzcode64(codep) +const char * const codep; { - time_t result; - int i; + register time_t result; + register int i; result = (codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0; for (i = 0; i < 8; ++i) @@ -254,21 +290,27 @@ detzcode64(const char * const codep) static void settzname(void) { - struct state * const sp = lclptr; + struct state * sp = lclptr; int i; tzname[0] = wildabbr; tzname[1] = wildabbr; daylight = 0; timezone = 0; - +#ifdef ALTZONE + altzone = 0; +#endif /* defined ALTZONE */ +#ifdef ALL_STATE + if (sp == NULL) { + tzname[0] = tzname[1] = gmt; + return; + } +#endif /* defined ALL_STATE */ /* ** And to get the latest zone names into tzname. . . */ - for (i = 0; i < sp->timecnt; ++i) { - const struct ttinfo * const ttisp = - &sp->ttis[ - sp->types[i]]; + for (i = 0; i < sp->typecnt; ++i) { + const struct ttinfo * const ttisp = &sp->ttis[sp->types[i]]; tzname[ttisp->tt_isdst] = &sp->chars[ttisp->tt_abbrind]; @@ -276,6 +318,10 @@ settzname(void) daylight = 1; if (!ttisp->tt_isdst) timezone = -(ttisp->tt_gmtoff); +#ifdef ALTZONE + if (ttisp->tt_isdst) + altzone = -(ttisp->tt_gmtoff); +#endif /* defined ALTZONE */ } /* ** Finally, scrub the abbreviations. @@ -288,8 +334,8 @@ settzname(void) ** Second, truncate long abbreviations. */ for (i = 0; i < sp->typecnt; ++i) { - const struct ttinfo * const ttisp = &sp->ttis[i]; - char * cp = &sp->chars[ttisp->tt_abbrind]; + register const struct ttinfo * const ttisp = &sp->ttis[i]; + register char * cp = &sp->chars[ttisp->tt_abbrind]; if (strlen(cp) > TZ_ABBR_MAX_LEN && strcmp(cp, GRANDPARENTED) != 0) @@ -298,7 +344,9 @@ settzname(void) } static int -differ_by_repeat(const time_t t1, const time_t t0) +differ_by_repeat(t1, t0) +const time_t t1; +const time_t t0; { int_fast64_t _t0 = t0; int_fast64_t _t1 = t1; @@ -306,26 +354,31 @@ differ_by_repeat(const time_t t1, const time_t t0) if (TYPE_INTEGRAL(time_t) && TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) return 0; + //turn ((int_fast64_t)(t1 - t0) == SECSPERREPEAT); return _t1 - _t0 == SECSPERREPEAT; } static int -tzload(const char *name, struct state * const sp, const int doextend) +tzload(name, sp, doextend) +const char * name; +struct state * const sp; +register const int doextend; { - const char * p; - int i; - int fid; - int stored; - int nread; - typedef union { + const char * p; + int i; + int fid; + int stored; + int nread; + int res; + union { struct tzhead tzhead; char buf[2 * sizeof(struct tzhead) + 2 * sizeof *sp + 4 * TZ_MAX_TIMES]; - } u_t; - u_t u; - u_t * const up = &u; + } *u; + u = NULL; + res = -1; sp->goback = sp->goahead = FALSE; /* XXX The following is from OpenBSD, and I'm not sure it is correct */ @@ -334,7 +387,7 @@ tzload(const char *name, struct state * const sp, const int doextend) name[0] == '/' || strchr(name, '.')) name = NULL; if (name == NULL && (name = TZDEFAULT) == NULL) - goto oops; + return -1; { int doaccess; struct stat stab; @@ -345,19 +398,27 @@ tzload(const char *name, struct state * const sp, const int doextend) ** to hold the longest file name string that the implementation ** guarantees can be opened." */ - char fullname[FILENAME_MAX + 1]; + char *fullname; + + fullname = malloc(FILENAME_MAX + 1); + if (fullname == NULL) + goto out; if (name[0] == ':') ++name; doaccess = name[0] == '/'; if (!doaccess) { - if ((p = TZDIR) == NULL) - goto oops; - if ((strlen(p) + 1 + strlen(name) + 1) >= sizeof fullname) - goto oops; - strcpy(fullname, p); - strcat(fullname, "/"); - strcat(fullname, name); + if ((p = TZDIR) == NULL) { + free(fullname); + return -1; + } + if (strlen(p) + 1 + strlen(name) >= FILENAME_MAX) { + free(fullname); + return -1; + } + (void) strcpy(fullname, p); + (void) strcat(fullname, "/"); + (void) strcat(fullname, name); /* ** Set doaccess if '.' (as in "../") shows up in name. */ @@ -365,37 +426,46 @@ tzload(const char *name, struct state * const sp, const int doextend) doaccess = TRUE; name = fullname; } - if (doaccess && access(name, R_OK) != 0) - goto oops; - if ((fid = _open(name, O_RDONLY)) == -1) - goto oops; + if (doaccess && access(name, R_OK) != 0) { + free(fullname); + return -1; + } + if ((fid = _open(name, OPEN_MODE)) == -1) { + free(fullname); + return -1; + } if ((_fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode)) { + free(fullname); _close(fid); return -1; } + free(fullname); } - nread = _read(fid, up->buf, sizeof up->buf); + u = malloc(sizeof(*u)); + if (u == NULL) + goto out; + nread = _read(fid, u->buf, sizeof u->buf); if (_close(fid) < 0 || nread <= 0) - goto oops; + goto out; for (stored = 4; stored <= 8; stored *= 2) { int ttisstdcnt; int ttisgmtcnt; - ttisstdcnt = (int) detzcode(up->tzhead.tzh_ttisstdcnt); - ttisgmtcnt = (int) detzcode(up->tzhead.tzh_ttisgmtcnt); - sp->leapcnt = (int) detzcode(up->tzhead.tzh_leapcnt); - sp->timecnt = (int) detzcode(up->tzhead.tzh_timecnt); - sp->typecnt = (int) detzcode(up->tzhead.tzh_typecnt); - sp->charcnt = (int) detzcode(up->tzhead.tzh_charcnt); - p = up->tzhead.tzh_charcnt + sizeof up->tzhead.tzh_charcnt; + ttisstdcnt = (int) detzcode(u->tzhead.tzh_ttisstdcnt); + ttisgmtcnt = (int) detzcode(u->tzhead.tzh_ttisgmtcnt); + sp->leapcnt = (int) detzcode(u->tzhead.tzh_leapcnt); + sp->timecnt = (int) detzcode(u->tzhead.tzh_timecnt); + sp->typecnt = (int) detzcode(u->tzhead.tzh_typecnt); + sp->charcnt = (int) detzcode(u->tzhead.tzh_charcnt); + p = u->tzhead.tzh_charcnt + sizeof u->tzhead.tzh_charcnt; if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) || (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0)) - goto oops; - if (nread - (p - up->buf) < + goto out; + if (nread - (p - u->buf) < sp->timecnt * stored + /* ats */ sp->timecnt + /* types */ sp->typecnt * 6 + /* ttinfos */ @@ -403,7 +473,7 @@ tzload(const char *name, struct state * const sp, const int doextend) sp->leapcnt * (stored + 4) + /* lsinfos */ ttisstdcnt + /* ttisstds */ ttisgmtcnt) /* ttisgmts */ - goto oops; + goto out; for (i = 0; i < sp->timecnt; ++i) { sp->ats[i] = (stored == 4) ? detzcode(p) : detzcode64(p); @@ -412,7 +482,7 @@ tzload(const char *name, struct state * const sp, const int doextend) for (i = 0; i < sp->timecnt; ++i) { sp->types[i] = (unsigned char) *p++; if (sp->types[i] >= sp->typecnt) - goto oops; + goto out; } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; @@ -422,11 +492,11 @@ tzload(const char *name, struct state * const sp, const int doextend) p += 4; ttisp->tt_isdst = (unsigned char) *p++; if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) - goto oops; + goto out; ttisp->tt_abbrind = (unsigned char) *p++; if (ttisp->tt_abbrind < 0 || ttisp->tt_abbrind > sp->charcnt) - goto oops; + goto out; } for (i = 0; i < sp->charcnt; ++i) sp->chars[i] = *p++; @@ -451,7 +521,7 @@ tzload(const char *name, struct state * const sp, const int doextend) ttisp->tt_ttisstd = *p++; if (ttisp->tt_ttisstd != TRUE && ttisp->tt_ttisstd != FALSE) - goto oops; + goto out; } } for (i = 0; i < sp->typecnt; ++i) { @@ -464,7 +534,7 @@ tzload(const char *name, struct state * const sp, const int doextend) ttisp->tt_ttisgmt = *p++; if (ttisp->tt_ttisgmt != TRUE && ttisp->tt_ttisgmt != FALSE) - goto oops; + goto out; } } /* @@ -484,7 +554,7 @@ tzload(const char *name, struct state * const sp, const int doextend) /* ** Ignore the beginning (harder). */ - int j; + register int j; for (j = 0; j + i < sp->timecnt; ++j) { sp->ats[j] = sp->ats[j + i]; @@ -497,11 +567,11 @@ tzload(const char *name, struct state * const sp, const int doextend) /* ** If this is an old file, we're done. */ - if (up->tzhead.tzh_version[0] == '\0') + if (u->tzhead.tzh_version[0] == '\0') break; - nread -= p - up->buf; + nread -= p - u->buf; for (i = 0; i < nread; ++i) - up->buf[i] = p[i]; + u->buf[i] = p[i]; /* ** If this is a narrow integer time_t system, we're done. */ @@ -509,39 +579,43 @@ tzload(const char *name, struct state * const sp, const int doextend) break; } if (doextend && nread > 2 && - up->buf[0] == '\n' && up->buf[nread - 1] == '\n' && + u->buf[0] == '\n' && u->buf[nread - 1] == '\n' && sp->typecnt + 2 <= TZ_MAX_TYPES) { - struct state ts; - int result; - - up->buf[nread - 1] = '\0'; - result = tzparse(&up->buf[1], &ts, FALSE); - if (result == 0 && ts.typecnt == 2 && - sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) { + struct state *ts; + register int result; + + ts = malloc(sizeof(*ts)); + if (ts == NULL) + goto out; + u->buf[nread - 1] = '\0'; + result = tzparse(&u->buf[1], ts, FALSE); + if (result == 0 && ts->typecnt == 2 && + sp->charcnt + ts->charcnt <= TZ_MAX_CHARS) { for (i = 0; i < 2; ++i) - ts.ttis[i].tt_abbrind += + ts->ttis[i].tt_abbrind += sp->charcnt; - for (i = 0; i < ts.charcnt; ++i) + for (i = 0; i < ts->charcnt; ++i) sp->chars[sp->charcnt++] = - ts.chars[i]; + ts->chars[i]; i = 0; - while (i < ts.timecnt && - ts.ats[i] <= + while (i < ts->timecnt && + ts->ats[i] <= sp->ats[sp->timecnt - 1]) ++i; - while (i < ts.timecnt && + while (i < ts->timecnt && sp->timecnt < TZ_MAX_TIMES) { sp->ats[sp->timecnt] = - ts.ats[i]; + ts->ats[i]; sp->types[sp->timecnt] = sp->typecnt + - ts.types[i]; + ts->types[i]; ++sp->timecnt; ++i; } - sp->ttis[sp->typecnt++] = ts.ttis[0]; - sp->ttis[sp->typecnt++] = ts.ttis[1]; + sp->ttis[sp->typecnt++] = ts->ttis[0]; + sp->ttis[sp->typecnt++] = ts->ttis[1]; } + free(ts); } if (sp->timecnt > 1) { for (i = 1; i < sp->timecnt; ++i) @@ -559,23 +633,27 @@ tzload(const char *name, struct state * const sp, const int doextend) break; } } - return 0; -oops: - return -1; + res = 0; +out: + free(u); + return (res); } static int -typesequiv(const struct state * const sp, const int a, const int b) +typesequiv(sp, a, b) +const struct state * const sp; +const int a; +const int b; { - int result; + register int result; if (sp == NULL || a < 0 || a >= sp->typecnt || b < 0 || b >= sp->typecnt) result = FALSE; else { - const struct ttinfo * ap = &sp->ttis[a]; - const struct ttinfo * bp = &sp->ttis[b]; + register const struct ttinfo * ap = &sp->ttis[a]; + register const struct ttinfo * bp = &sp->ttis[b]; result = ap->tt_gmtoff == bp->tt_gmtoff && ap->tt_isdst == bp->tt_isdst && ap->tt_ttisstd == bp->tt_ttisstd && @@ -602,7 +680,8 @@ static const int year_lengths[2] = { */ static const char * -getzname(const char *strp) +getzname(strp) +const char * strp; { char c; @@ -622,9 +701,9 @@ getzname(const char *strp) */ static const char * -getqzname(const char *strp, const int delim) +getqzname(register const char *strp, const int delim) { - int c; + register int c; while ((c = *strp) != '\0' && c != delim) ++strp; @@ -639,7 +718,11 @@ getqzname(const char *strp, const int delim) */ static const char * -getnum(const char *strp, int * const nump, const int min, const int max) +getnum(strp, nump, min, max) +const char * strp; +int * const nump; +const int min; +const int max; { char c; int num; @@ -668,7 +751,9 @@ getnum(const char *strp, int * const nump, const int min, const int max) */ static const char * -getsecs(const char *strp, long * const secsp) +getsecs(strp, secsp) +const char * strp; +long * const secsp; { int num; @@ -708,7 +793,9 @@ getsecs(const char *strp, long * const secsp) */ static const char * -getoffset(const char *strp, long * const offsetp) +getoffset(strp, offsetp) +const char * strp; +long * const offsetp; { int neg = 0; @@ -733,7 +820,9 @@ getoffset(const char *strp, long * const offsetp) */ static const char * -getrule(const char *strp, struct rule * const rulep) +getrule(strp, rulep) +const char * strp; +struct rule * const rulep; { if (*strp == 'J') { /* @@ -785,8 +874,11 @@ getrule(const char *strp, struct rule * const rulep) */ static time_t -transtime(const time_t janfirst, const int year, - const struct rule * const rulep, const long offset) +transtime(janfirst, year, rulep, offset) +const time_t janfirst; +const int year; +const struct rule * const rulep; +const long offset; { int leapyear; time_t value; @@ -877,7 +969,10 @@ transtime(const time_t janfirst, const int year, */ static int -tzparse(const char *name, struct state * const sp, const int lastditch) +tzparse(name, sp, lastditch) +const char * name; +struct state * const sp; +const int lastditch; { const char * stdname; const char * dstname; @@ -885,11 +980,10 @@ tzparse(const char *name, struct state * const sp, const int lastditch) size_t dstlen; long stdoffset; long dstoffset; - time_t * atp; - unsigned char * typep; - char * cp; - int load_result; - static struct ttinfo zttinfo; + time_t * atp; + unsigned char * typep; + char * cp; + int load_result; INITIALIZE(dstname); stdname = name; @@ -913,10 +1007,12 @@ tzparse(const char *name, struct state * const sp, const int lastditch) stdlen = name - stdname; } if (*name == '\0') - return -1; - name = getoffset(name, &stdoffset); - if (name == NULL) - return -1; + return -1; /* was "stdoffset = 0;" */ + else { + name = getoffset(name, &stdoffset); + if (name == NULL) + return -1; + } } load_result = tzload(TZDEFRULES, sp, FALSE); if (load_result != 0) @@ -962,7 +1058,6 @@ tzparse(const char *name, struct state * const sp, const int lastditch) /* ** Two transitions per year, from EPOCH_YEAR forward. */ - sp->ttis[0] = sp->ttis[1] = zttinfo; sp->ttis[0].tt_gmtoff = -dstoffset; sp->ttis[0].tt_isdst = 1; sp->ttis[0].tt_abbrind = stdlen + 1; @@ -1076,8 +1171,8 @@ tzparse(const char *name, struct state * const sp, const int lastditch) } /* ** Finally, fill in ttis. + ** ttisstd and ttisgmt need not be handled. */ - sp->ttis[0] = sp->ttis[1] = zttinfo; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = FALSE; sp->ttis[0].tt_abbrind = 0; @@ -1090,7 +1185,6 @@ tzparse(const char *name, struct state * const sp, const int lastditch) dstlen = 0; sp->typecnt = 1; /* only standard time */ sp->timecnt = 0; - sp->ttis[0] = zttinfo; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; @@ -1101,21 +1195,22 @@ tzparse(const char *name, struct state * const sp, const int lastditch) if ((size_t) sp->charcnt > sizeof sp->chars) return -1; cp = sp->chars; - strncpy(cp, stdname, stdlen); + (void) strncpy(cp, stdname, stdlen); cp += stdlen; *cp++ = '\0'; if (dstlen != 0) { - strncpy(cp, dstname, dstlen); + (void) strncpy(cp, dstname, dstlen); *(cp + dstlen) = '\0'; } return 0; } static void -gmtload(struct state * const sp) +gmtload(sp) +struct state * const sp; { if (tzload(gmt, sp, TRUE) != 0) - tzparse(gmt, sp, TRUE); + (void) tzparse(gmt, sp, TRUE); } static void @@ -1133,7 +1228,19 @@ tzsetwall_basic(int rdlocked) _RWLOCK_WRLOCK(&lcl_rwlock); lcl_is_set = -1; - if (tzload(NULL, lclptr, TRUE) != 0) +#ifdef ALL_STATE + if (lclptr == NULL) { + lclptr = (struct state *) calloc(1, sizeof *lclptr); + if (lclptr == NULL) { + settzname(); /* all we can do */ + _RWLOCK_UNLOCK(&lcl_rwlock); + if (rdlocked) + _RWLOCK_RDLOCK(&lcl_rwlock); + return; + } + } +#endif /* defined ALL_STATE */ + if (tzload((char *) NULL, lclptr, TRUE) != 0) gmtload(lclptr); settzname(); _RWLOCK_UNLOCK(&lcl_rwlock); @@ -1171,8 +1278,20 @@ tzset_basic(int rdlocked) _RWLOCK_WRLOCK(&lcl_rwlock); lcl_is_set = strlen(name) < sizeof lcl_TZname; if (lcl_is_set) - strcpy(lcl_TZname, name); + (void) strcpy(lcl_TZname, name); +#ifdef ALL_STATE + if (lclptr == NULL) { + lclptr = (struct state *) calloc(1, sizeof *lclptr); + if (lclptr == NULL) { + settzname(); /* all we can do */ + _RWLOCK_UNLOCK(&lcl_rwlock); + if (rdlocked) + _RWLOCK_RDLOCK(&lcl_rwlock); + return; + } + } +#endif /* defined ALL_STATE */ if (*name == '\0') { /* ** User wants it fast rather than right. @@ -1183,10 +1302,10 @@ tzset_basic(int rdlocked) lclptr->ttis[0].tt_isdst = 0; lclptr->ttis[0].tt_gmtoff = 0; lclptr->ttis[0].tt_abbrind = 0; - strcpy(lclptr->chars, gmt); + (void) strcpy(lclptr->chars, gmt); } else if (tzload(name, lclptr, TRUE) != 0) if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0) - gmtload(lclptr); + (void) gmtload(lclptr); settzname(); _RWLOCK_UNLOCK(&lcl_rwlock); @@ -1211,8 +1330,10 @@ tzset(void) /*ARGSUSED*/ static struct tm * -localsub(const time_t * const timep, const long offset __unused, - struct tm * const tmp) +localsub(timep, offset, tmp) +const time_t * const timep; +const long offset; +struct tm * const tmp; { struct state * sp; const struct ttinfo * ttisp; @@ -1221,13 +1342,16 @@ localsub(const time_t * const timep, const long offset __unused, const time_t t = *timep; sp = lclptr; - +#ifdef ALL_STATE + if (sp == NULL) + return gmtsub(timep, offset, tmp); +#endif /* defined ALL_STATE */ if ((sp->goback && t < sp->ats[0]) || (sp->goahead && t > sp->ats[sp->timecnt - 1])) { - time_t newt = t; - time_t seconds; - time_t tcycles; - int_fast64_t icycles; + time_t newt = t; + register time_t seconds; + register time_t tcycles; + register int_fast64_t icycles; if (t < sp->ats[0]) seconds = sp->ats[0] - t; @@ -1249,7 +1373,7 @@ localsub(const time_t * const timep, const long offset __unused, return NULL; /* "cannot happen" */ result = localsub(&newt, offset, tmp); if (result == tmp) { - time_t newy; + register time_t newy; newy = tmp->tm_year; if (t < sp->ats[0]) @@ -1269,11 +1393,11 @@ localsub(const time_t * const timep, const long offset __unused, break; } } else { - int lo = 1; - int hi = sp->timecnt; + register int lo = 1; + register int hi = sp->timecnt; while (lo < hi) { - int mid = (lo + hi) >> 1; + register int mid = (lo + hi) >> 1; if (t < sp->ats[mid]) hi = mid; @@ -1297,33 +1421,24 @@ localsub(const time_t * const timep, const long offset __unused, return result; } -struct tm * -localtime_r(const time_t * const timep, struct tm *p_tm) +static void +localtime_key_init(void) { - _RWLOCK_RDLOCK(&lcl_rwlock); - tzset_basic(1); - localsub(timep, 0L, p_tm); - _RWLOCK_UNLOCK(&lcl_rwlock); - return(p_tm); + + localtime_key_error = _pthread_key_create(&localtime_key, free); } struct tm * -localtime(const time_t * const timep) +localtime(timep) +const time_t * const timep; { - static pthread_mutex_t localtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t localtime_key = -1; struct tm *p_tm; if (__isthreaded != 0) { - if (localtime_key < 0) { - _pthread_mutex_lock(&localtime_mutex); - if (localtime_key < 0) { - if (_pthread_key_create(&localtime_key, free) < 0) { - _pthread_mutex_unlock(&localtime_mutex); - return(NULL); - } - } - _pthread_mutex_unlock(&localtime_mutex); + _once(&localtime_once, localtime_key_init); + if (localtime_key_error != 0) { + errno = localtime_key_error; + return(NULL); } p_tm = _pthread_getspecific(localtime_key); if (p_tm == NULL) { @@ -1344,23 +1459,46 @@ localtime(const time_t * const timep) } } +/* +** Re-entrant version of localtime. +*/ + +struct tm * +localtime_r(timep, tmp) +const time_t * const timep; +struct tm * tmp; +{ + _RWLOCK_RDLOCK(&lcl_rwlock); + tzset_basic(1); + localsub(timep, 0L, tmp); + _RWLOCK_UNLOCK(&lcl_rwlock); + return tmp; +} + +static void +gmt_init(void) +{ + +#ifdef ALL_STATE + gmtptr = (struct state *) calloc(1, sizeof *gmtptr); + if (gmtptr != NULL) +#endif /* defined ALL_STATE */ + gmtload(gmtptr); +} + /* ** gmtsub is to gmtime as localsub is to localtime. */ static struct tm * -gmtsub(const time_t * const timep, const long offset, struct tm * const tmp) +gmtsub(timep, offset, tmp) +const time_t * const timep; +const long offset; +struct tm * const tmp; { - struct tm * result; + register struct tm * result; - if (!gmt_is_set) { - _MUTEX_LOCK(&gmt_mutex); - if (!gmt_is_set) { - gmtload(gmtptr); - gmt_is_set = TRUE; - } - _MUTEX_UNLOCK(&gmt_mutex); - } + _once(&gmt_once, gmt_init); result = timesub(timep, offset, gmtptr, tmp); #ifdef TM_ZONE /* @@ -1370,29 +1508,38 @@ gmtsub(const time_t * const timep, const long offset, struct tm * const tmp) */ if (offset != 0) tmp->TM_ZONE = wildabbr; - else + else { +#ifdef ALL_STATE + if (gmtptr == NULL) + tmp->TM_ZONE = gmt; + else tmp->TM_ZONE = gmtptr->chars; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE tmp->TM_ZONE = gmtptr->chars; +#endif /* State Farm */ + } #endif /* defined TM_ZONE */ return result; } +static void +gmtime_key_init(void) +{ + + gmtime_key_error = _pthread_key_create(&gmtime_key, free); +} + struct tm * -gmtime(const time_t * const timep) +gmtime(timep) +const time_t * const timep; { - static pthread_mutex_t gmtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t gmtime_key = -1; struct tm *p_tm; if (__isthreaded != 0) { - if (gmtime_key < 0) { - _pthread_mutex_lock(&gmtime_mutex); - if (gmtime_key < 0) { - if (_pthread_key_create(&gmtime_key, free) < 0) { - _pthread_mutex_unlock(&gmtime_mutex); - return(NULL); - } - } - _pthread_mutex_unlock(&gmtime_mutex); + _once(&gmtime_once, gmtime_key_init); + if (gmtime_key_error != 0) { + errno = gmtime_key_error; + return(NULL); } /* * Changed to follow POSIX.1 threads standard, which @@ -1405,39 +1552,58 @@ gmtime(const time_t * const timep) } _pthread_setspecific(gmtime_key, p_tm); } - return gmtsub(timep, 0L, p_tm); - } else { - return gmtsub(timep, 0L, &tm); + gmtsub(timep, 0L, p_tm); + return(p_tm); + } + else { + gmtsub(timep, 0L, &tm); + return(&tm); } } +/* +* Re-entrant version of gmtime. +*/ + struct tm * -gmtime_r(const time_t * timep, struct tm * tmp) +gmtime_r(timep, tmp) +const time_t * const timep; +struct tm * tmp; { return gmtsub(timep, 0L, tmp); } +#ifdef STD_INSPIRED + struct tm * -offtime(const time_t * const timep, const long offset) +offtime(timep, offset) +const time_t * const timep; +const long offset; { return gmtsub(timep, offset, &tm); } +#endif /* defined STD_INSPIRED */ + /* ** Return the number of leap years through the end of the given year ** where, to make the math easy, the answer for year zero is defined as zero. */ static int -leaps_thru_end_of(const int y) +leaps_thru_end_of(y) +register const int y; { return (y >= 0) ? (y / 4 - y / 100 + y / 400) : -(leaps_thru_end_of(-(y + 1)) + 1); } static struct tm * -timesub(const time_t * const timep, const long offset, - const struct state * const sp, struct tm * const tmp) +timesub(timep, offset, sp, tmp) +const time_t * const timep; +const long offset; +const struct state * const sp; +struct tm * const tmp; { const struct lsinfo * lp; time_t tdays; @@ -1451,8 +1617,12 @@ timesub(const time_t * const timep, const long offset, corr = 0; hit = 0; +#ifdef ALL_STATE + i = (sp == NULL) ? 0 : sp->leapcnt; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE i = sp->leapcnt; - +#endif /* State Farm */ while (--i >= 0) { lp = &sp->lsis[i]; if (*timep >= lp->ls_trans) { @@ -1477,10 +1647,10 @@ timesub(const time_t * const timep, const long offset, tdays = *timep / SECSPERDAY; rem = *timep - tdays * SECSPERDAY; while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { - int newy; - time_t tdelta; - int idelta; - int leapdays; + int newy; + register time_t tdelta; + register int idelta; + register int leapdays; tdelta = tdays / DAYSPERLYEAR; idelta = tdelta; @@ -1498,7 +1668,7 @@ timesub(const time_t * const timep, const long offset, y = newy; } { - long seconds; + register long seconds; seconds = tdays * SECSPERDAY + 0.5; tdays = seconds / SECSPERDAY; @@ -1563,7 +1733,8 @@ timesub(const time_t * const timep, const long offset, } char * -ctime(const time_t * const timep) +ctime(timep) +const time_t * const timep; { /* ** Section 4.12.3.2 of X3.159-1989 requires that @@ -1575,9 +1746,12 @@ ctime(const time_t * const timep) } char * -ctime_r(const time_t * const timep, char *buf) +ctime_r(timep, buf) +const time_t * const timep; +char * buf; { - struct tm mytm; + struct tm mytm; + return asctime_r(localtime_r(timep, &mytm), buf); } @@ -1595,39 +1769,38 @@ ctime_r(const time_t * const timep, char *buf) #endif /* !defined WRONG */ /* -** Normalize logic courtesy Paul Eggert. +** Simplified normalize logic courtesy Paul Eggert. */ static int -increment_overflow(int * const ip, int j) +increment_overflow(number, delta) +int * number; +int delta; { - int const i = *ip; + int number0; - /* - ** If i >= 0 there can only be overflow if i + j > INT_MAX - ** or if j > INT_MAX - i; given i >= 0, INT_MAX - i cannot overflow. - ** If i < 0 there can only be overflow if i + j < INT_MIN - ** or if j < INT_MIN - i; given i < 0, INT_MIN - i cannot overflow. - */ - if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) - return TRUE; - *ip += j; - return FALSE; + number0 = *number; + *number += delta; + return (*number < number0) != (delta < 0); } static int -long_increment_overflow(long * const lp, int const m) +long_increment_overflow(number, delta) +long * number; +int delta; { - long const l = *lp; + long number0; - if ((l >= 0) ? (m > LONG_MAX - l) : (m < LONG_MIN - l)) - return TRUE; - *lp += m; - return FALSE; + number0 = *number; + *number += delta; + return (*number < number0) != (delta < 0); } static int -normalize_overflow(int * const tensptr, int * const unitsptr, const int base) +normalize_overflow(tensptr, unitsptr, base) +int * const tensptr; +int * const unitsptr; +const int base; { int tensdelta; @@ -1639,10 +1812,12 @@ normalize_overflow(int * const tensptr, int * const unitsptr, const int base) } static int -long_normalize_overflow(long * const tensptr, int * const unitsptr, - const int base) +long_normalize_overflow(tensptr, unitsptr, base) +long * const tensptr; +int * const unitsptr; +const int base; { - int tensdelta; + register int tensdelta; tensdelta = (*unitsptr >= 0) ? (*unitsptr / base) : @@ -1652,7 +1827,9 @@ long_normalize_overflow(long * const tensptr, int * const unitsptr, } static int -tmcomp(const struct tm * const atmp, const struct tm * const btmp) +tmcomp(atmp, btmp) +const struct tm * const atmp; +const struct tm * const btmp; { int result; @@ -1666,9 +1843,12 @@ tmcomp(const struct tm * const atmp, const struct tm * const btmp) } static time_t -time2sub(struct tm * const tmp, - struct tm * (* const funcp)(const time_t *, long, struct tm *), - const long offset, int * const okayp, const int do_norm_secs) +time2sub(tmp, funcp, offset, okayp, do_norm_secs) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t*, long, struct tm*); +const long offset; +int * const okayp; +const int do_norm_secs; { const struct state * sp; int dir; @@ -1730,6 +1910,9 @@ time2sub(struct tm * const tmp, yourtm.tm_year = y; if (yourtm.tm_year != y) return WRONG; + /* Don't go below 1900 for POLA */ + if (yourtm.tm_year < 0) + return WRONG; if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) saved_seconds = 0; else if (y + TM_YEAR_BASE < EPOCH_YEAR) { @@ -1809,7 +1992,10 @@ time2sub(struct tm * const tmp, */ sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); - +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ for (i = sp->typecnt - 1; i >= 0; --i) { if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) continue; @@ -1844,9 +2030,11 @@ label: } static time_t -time2(struct tm * const tmp, - struct tm * (* const funcp)(const time_t *, long, struct tm *), - const long offset, int * const okayp) +time2(tmp, funcp, offset, okayp) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t*, long, struct tm*); +const long offset; +int * const okayp; { time_t t; @@ -1860,9 +2048,10 @@ time2(struct tm * const tmp, } static time_t -time1(struct tm * const tmp, - struct tm * (* const funcp)(const time_t *, long, struct tm *), - const long offset) +time1(tmp, funcp, offset) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t *, long, struct tm *); +const long offset; { time_t t; const struct state * sp; @@ -1870,18 +2059,19 @@ time1(struct tm * const tmp, int sameind, otherind; int i; int nseen; - int seen[TZ_MAX_TYPES]; - int types[TZ_MAX_TYPES]; - int okay; + int seen[TZ_MAX_TYPES]; + int types[TZ_MAX_TYPES]; + int okay; if (tmp == NULL) { errno = EINVAL; return WRONG; } + if (tmp->tm_isdst > 1) tmp->tm_isdst = 1; t = time2(tmp, funcp, offset, &okay); - +#ifdef PCTS /* ** PCTS code courtesy Grant Sullivan. */ @@ -1889,15 +2079,22 @@ time1(struct tm * const tmp, return t; if (tmp->tm_isdst < 0) tmp->tm_isdst = 0; /* reset to std and try again */ - +#endif /* defined PCTS */ +#ifndef PCTS + if (okay || tmp->tm_isdst < 0) + return t; +#endif /* !defined PCTS */ /* ** We're supposed to assume that somebody took a time of one type ** and did some math on it that yielded a "struct tm" that's bad. ** We try to divine the type they started from and adjust to the ** type they need. */ - sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); - + sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ for (i = 0; i < sp->typecnt; ++i) seen[i] = FALSE; nseen = 0; @@ -1929,7 +2126,8 @@ time1(struct tm * const tmp, } time_t -mktime(struct tm * const tmp) +mktime(tmp) +struct tm * const tmp; { time_t mktime_return_value; _RWLOCK_RDLOCK(&lcl_rwlock); @@ -1939,8 +2137,11 @@ mktime(struct tm * const tmp) return(mktime_return_value); } +#ifdef STD_INSPIRED + time_t -timelocal(struct tm * const tmp) +timelocal(tmp) +struct tm * const tmp; { if (tmp != NULL) tmp->tm_isdst = -1; /* in case it wasn't initialized */ @@ -1948,7 +2149,8 @@ timelocal(struct tm * const tmp) } time_t -timegm(struct tm * const tmp) +timegm(tmp) +struct tm * const tmp; { if (tmp != NULL) tmp->tm_isdst = 0; @@ -1956,13 +2158,17 @@ timegm(struct tm * const tmp) } time_t -timeoff(struct tm * const tmp, const long offset) +timeoff(tmp, offset) +struct tm * const tmp; +const long offset; { if (tmp != NULL) tmp->tm_isdst = 0; return time1(tmp, gmtsub, offset); } +#endif /* defined STD_INSPIRED */ + #ifdef CMUCS /* @@ -1971,7 +2177,8 @@ timeoff(struct tm * const tmp, const long offset) */ long -gtime(struct tm * const tmp) +gtime(tmp) +struct tm * const tmp; { const time_t t = mktime(tmp); @@ -1986,6 +2193,8 @@ gtime(struct tm * const tmp) ** XXX--is the below the right way to conditionalize?? */ +#ifdef STD_INSPIRED + /* ** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599 ** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which @@ -1995,7 +2204,8 @@ gtime(struct tm * const tmp) */ static long -leapcorr(time_t *timep) +leapcorr(timep) +time_t * timep; { struct state * sp; struct lsinfo * lp; @@ -2012,14 +2222,16 @@ leapcorr(time_t *timep) } time_t -time2posix(time_t t) +time2posix(t) +time_t t; { tzset(); return t - leapcorr(&t); } time_t -posix2time(time_t t) +posix2time(t) +time_t t; { time_t x; time_t y; @@ -2050,3 +2262,5 @@ posix2time(time_t t) } return x; } + +#endif /* defined STD_INSPIRED */ diff --git a/lib/libc/stdtime/private.h b/lib/libc/stdtime/private.h index 49c28b79fd..544dd807eb 100644 --- a/lib/libc/stdtime/private.h +++ b/lib/libc/stdtime/private.h @@ -1,19 +1,24 @@ -/* - * $FreeBSD: src/lib/libc/stdtime/private.h,v 1.6.8.1 2000/08/23 00:19:15 jhb Exp $ - */ - #ifndef PRIVATE_H #define PRIVATE_H + /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. +** +** $FreeBSD: head/contrib/tzcode/stdtime/private.h 192625 2009-05-23 06:31:50Z edwin $ */ /* Stuff moved from Makefile.inc to reduce clutter */ #ifndef TM_GMTOFF #define TM_GMTOFF tm_gmtoff #define TM_ZONE tm_zone +#define STD_INSPIRED 1 +#define PCTS 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_STRERROR 1 +#define HAVE_UNISTD_H 1 +#define LOCALE_HOME _PATH_LOCALE #define TZDIR "/usr/share/zoneinfo" #endif /* ndef TM_GMTOFF */ @@ -25,8 +30,70 @@ ** Thank you! */ +/* +** ID +*/ + +#ifndef lint +#ifndef NOID +/* +static char privatehid[] = "@(#)private.h 8.6"; +*/ +#endif /* !defined NOID */ +#endif /* !defined lint */ + #define GRANDPARENTED "Local time zone must be set--see zic manual page" +/* +** Defaults for preprocessor symbols. +** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'. +*/ + +#ifndef HAVE_ADJTIME +#define HAVE_ADJTIME 1 +#endif /* !defined HAVE_ADJTIME */ + +#ifndef HAVE_GETTEXT +#define HAVE_GETTEXT 0 +#endif /* !defined HAVE_GETTEXT */ + +#ifndef HAVE_INCOMPATIBLE_CTIME_R +#define HAVE_INCOMPATIBLE_CTIME_R 0 +#endif /* !defined INCOMPATIBLE_CTIME_R */ + +#ifndef HAVE_SETTIMEOFDAY +#define HAVE_SETTIMEOFDAY 3 +#endif /* !defined HAVE_SETTIMEOFDAY */ + +#ifndef HAVE_SYMLINK +#define HAVE_SYMLINK 1 +#endif /* !defined HAVE_SYMLINK */ + +#ifndef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 +#endif /* !defined HAVE_SYS_STAT_H */ + +#ifndef HAVE_SYS_WAIT_H +#define HAVE_SYS_WAIT_H 1 +#endif /* !defined HAVE_SYS_WAIT_H */ + +#ifndef HAVE_UNISTD_H +#define HAVE_UNISTD_H 1 +#endif /* !defined HAVE_UNISTD_H */ + +#ifndef HAVE_UTMPX_H +#define HAVE_UTMPX_H 0 +#endif /* !defined HAVE_UTMPX_H */ + +#ifndef LOCALE_HOME +#define LOCALE_HOME "/usr/lib/locale" +#endif /* !defined LOCALE_HOME */ + +#if HAVE_INCOMPATIBLE_CTIME_R +#define asctime_r _incompatible_asctime_r +#define ctime_r _incompatible_ctime_r +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + /* ** Nested includes */ @@ -39,14 +106,86 @@ #include "time.h" #include "stdlib.h" +#if HAVE_GETTEXT +#include "libintl.h" +#endif /* HAVE_GETTEXT */ + +#if HAVE_SYS_WAIT_H #include /* for WIFEXITED and WEXITSTATUS */ +#endif /* HAVE_SYS_WAIT_H */ + +#ifndef WIFEXITED +#define WIFEXITED(status) (((status) & 0xff) == 0) +#endif /* !defined WIFEXITED */ +#ifndef WEXITSTATUS +#define WEXITSTATUS(status) (((status) >> 8) & 0xff) +#endif /* !defined WEXITSTATUS */ +#if HAVE_UNISTD_H #include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */ +#endif /* HAVE_UNISTD_H */ + +#if !(HAVE_UNISTD_H) +#ifndef F_OK +#define F_OK 0 +#endif /* !defined F_OK */ +#ifndef R_OK +#define R_OK 4 +#endif /* !defined R_OK */ +#endif /* !(HAVE_UNISTD_H) */ /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) +/* +** Define HAVE_STDINT_H's default value here, rather than at the +** start, since __GLIBC__'s value depends on previously-included +** files. +** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.) +*/ +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H \ + (199901 <= __STDC_VERSION__ || \ + 2 < (__GLIBC__ + (0 < __GLIBC_MINOR__))) +#endif /* !defined HAVE_STDINT_H */ + +#if HAVE_STDINT_H #include "stdint.h" +#endif /* !HAVE_STDINT_H */ + +#ifndef INT_FAST64_MAX +/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */ +#if defined LLONG_MAX || defined __LONG_LONG_MAX__ +typedef long long int_fast64_t; +#else /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */ +#if (LONG_MAX >> 31) < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +#endif /* (LONG_MAX >> 31) < 0xffffffff */ +typedef long int_fast64_t; +#endif /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */ +#endif /* !defined INT_FAST64_MAX */ + +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif /* !defined INT32_MAX */ +#ifndef INT32_MIN +#define INT32_MIN (-1 - INT32_MAX) +#endif /* !defined INT32_MIN */ + +/* +** Workarounds for compilers/systems. +*/ + +/* +** Some time.h implementations don't declare asctime_r. +** Others might define it as a macro. +** Fix the former without affecting the latter. +*/ + +#ifndef asctime_r +extern char * asctime_r(struct tm const *, char *); +#endif /* ** Private function declarations. @@ -86,6 +225,15 @@ const char * scheck(const char * string, const char * format); ** it cannot be used in preprocessor directives. */ +#ifndef TYPE_INTEGRAL +#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) +#endif /* !defined TYPE_INTEGRAL */ + +/* +** Since the definition of TYPE_INTEGRAL contains floating point numbers, +** it cannot be used in preprocessor directives. +*/ + #ifndef TYPE_INTEGRAL #define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) #endif /* !defined TYPE_INTEGRAL */ @@ -133,22 +281,43 @@ const char * scheck(const char * string, const char * format); */ #ifndef _ +#if HAVE_GETTEXT +#define _(msgid) gettext(msgid) +#else /* !HAVE_GETTEXT */ #define _(msgid) msgid +#endif /* !HAVE_GETTEXT */ #endif /* !defined _ */ #ifndef TZ_DOMAIN #define TZ_DOMAIN "tz" #endif /* !defined TZ_DOMAIN */ +#if HAVE_INCOMPATIBLE_CTIME_R +#undef asctime_r +#undef ctime_r +char *asctime_r(struct tm const *, char *); +char *ctime_r(time_t const *, char *); +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +#ifndef YEARSPERREPEAT #define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ +#endif /* !defined YEARSPERREPEAT */ /* ** The Gregorian year averages 365.2425 days, which is 31556952 seconds. */ +#ifndef AVGSECSPERYEAR #define AVGSECSPERYEAR 31556952L +#endif /* !defined AVGSECSPERYEAR */ + +#ifndef SECSPERREPEAT #define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) +#endif /* !defined SECSPERREPEAT */ + +#ifndef SECSPERREPEAT_BITS #define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ +#endif /* !defined SECSPERREPEAT_BITS */ /* ** UNIX was a registered trademark of The Open Group in 2003. diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3 index c219255da3..472e17e5f8 100644 --- a/lib/libc/stdtime/strftime.3 +++ b/lib/libc/stdtime/strftime.3 @@ -13,7 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -29,9 +29,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/stdtime/strftime.3,v 1.18.2.10 2003/05/24 00:01:31 keramida Exp $ +.\" @(#)strftime.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: head/lib/libc/stdtime/strftime.3 237573 2012-06-25 21:51:40Z issyl0 $ .\" -.Dd October 19, 2008 +.Dd June 25, 2012 .Dt STRFTIME 3 .Os .Sh NAME @@ -48,6 +49,8 @@ .Fa "const char * restrict format" .Fa "const struct tm * restrict timeptr" .Fc +.Ft size_t +.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strftime @@ -57,6 +60,11 @@ into the buffer .Fa buf according to the string pointed to by .Fa format . +The function +.Fn strftime_l +does the same as +.Fn strftime +but takes an explicit locale rather than using the current locale. .Pp The .Fa format @@ -101,7 +109,7 @@ is equivalent to .Dq Li %m/%d/%y . .It Cm %d is replaced by the day of the month as a decimal number (01-31). -.It Cm \&%E* Cm \&%O* +.It Cm %E* %O* POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY @@ -114,10 +122,10 @@ Additionally %OB implemented to represent alternative months names (used standalone, without day mentioned). .It Cm %e -is replaced by the day of month as a decimal number (1-31); single +is replaced by the day of the month as a decimal number (1-31); single digits are preceded by a blank. .It Cm \&%F -is replaced by the date in the format +is equivalent to .Dq Li %Y-%m-%d . .It Cm \&%G is replaced by a year as a decimal number with century. @@ -130,7 +138,8 @@ but as a decimal number without century (00-99). .It Cm \&%H is replaced by the hour (24-hour clock) as a decimal number (00-23). .It Cm %h -the same as %b. +the same as +.Cm %b . .It Cm \&%I is replaced by the hour (12-hour clock) as a decimal number (01-12). .It Cm %j @@ -147,13 +156,14 @@ is replaced by the minute as a decimal number (00-59). is replaced by the month as a decimal number (01-12). .It Cm %n is replaced by a newline. -.It Cm \&%O* -the same as %E*. +.It Cm %O* +the same as +.Cm %E* . .It Cm %p is replaced by national representation of either -"ante meridiem" +"ante meridiem" (a.m.) or -"post meridiem" +"post meridiem" (p.m.) as appropriate. .It Cm \&%R is equivalent to @@ -179,7 +189,8 @@ is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7). .It Cm \&%V is replaced by the week number of the year (Monday as the first day of -the week) as a decimal number (01-53). If the week containing January +the week) as a decimal number (01-53). +If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1. .It Cm %v @@ -200,20 +211,25 @@ is replaced by the year with century as a decimal number. .It Cm %y is replaced by the year without century as a decimal number (00-99). .It Cm \&%Z -is replaced by the time zone name, -or by the empty string if this is not determinable. -.It Cm \&%z -is replaced by the offset from UTC in the format -.Li ++HHMM -or -.Li --HHMM -as appropriate, -with positive values representing locations east of Greenwich, -or by the empty string if this is not determinable. +is replaced by the time zone name. +.It Cm %z +is replaced by the time zone offset from UTC; a leading plus sign stands for +east of UTC, a minus sign for west of UTC, hours and minutes follow +with two digits each and no delimiter between them (common form for +RFC 822 date headers). .It Cm %+ is replaced by national representation of the date and time (the format is similar to that produced by .Xr date 1 ) . +.It Cm %-* +GNU libc extension. +Do not do any padding when performing numerical outputs. +.It Cm %_* +GNU libc extension. +Explicitly specify space for padding. +.It Cm %0* +GNU libc extension. +Explicitly specify zero for padding. .It Cm %% is replaced by .Ql % . @@ -223,7 +239,8 @@ is replaced by .Xr printf 1 , .Xr ctime 3 , .Xr printf 3 , -.Xr strptime 3 +.Xr strptime 3 , +.Xr wcsftime 3 .Sh STANDARDS The .Fn strftime @@ -258,5 +275,15 @@ The peculiar week number and year in the replacements of and .Ql \&%V are defined in ISO 8601: 1988. +The +.Fn strftime_l +function conforms to +.St -p1003.1-2008 . .Sh BUGS There is no conversion specification for the phase of the moon. +.Pp +The +.Fn strftime +function does not correctly handle multibyte characters in the +.Fa format +argument. diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c index 823235cf52..54c13cefe7 100644 --- a/lib/libc/stdtime/strftime.c +++ b/lib/libc/stdtime/strftime.c @@ -1,68 +1,45 @@ /* - * $NetBSD: strftime.c,v 1.19 2009/01/11 02:46:30 christos Exp $ + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)strftime.c 5.4 (Berkeley) 3/14/89 + * $FreeBSD: head/lib/libc/stdtime/strftime.c 237211 2012-06-17 21:40:13Z jilles $ */ -/* -** We don't use these extensions in strftime operation even when -** supported by the local tzcode configuration. A strictly -** conforming C application may leave them in undefined state. -*/ - -#ifdef _LIBC -#undef TM_ZONE -#undef TM_GMTOFF -#endif - -/* -** Copyright (c) 1989, 1993 -** The Regents of the University of California. All rights reserved. -** -** Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions -** are met: -** 1. Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** 2. Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in the -** documentation and/or other materials provided with the distribution. -** 3. All advertising materials mentioning features or use of this software -** must display the following acknowledgement: -** This product includes software developed by the University of -** California, Berkeley and its contributors. -** 4. Neither the name of the University nor the names of its contributors -** may be used to endorse or promote products derived from this software -** without specific prior written permission. -** -** THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -** ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -** SUCH DAMAGE. -*/ - -#include -#include -#include -#include +#include "namespace.h" #include "private.h" -#include "tzfile.h" -#define Locale _CurrentTimeLocale +#include "tzfile.h" +#include +#include +#include "un-namespace.h" +#include "timelocal.h" static char * _add(const char *, char *, const char *); static char * _conv(int, const char *, char *, const char *); -static char * _fmt(const char *, const struct tm *, char *, - const char *, int *); +static char * _fmt(const char *, const struct tm *, char *, const char *, + int *, locale_t); static char * _yconv(int, int, int, int, char *, const char *); -#define NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU +extern char * tzname[]; #ifndef YEAR_2000_NAME #define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS" @@ -73,30 +50,55 @@ static char * _yconv(int, int, int, int, char *, const char *); #define IN_THIS 2 #define IN_ALL 3 +#define PAD_DEFAULT 0 +#define PAD_LESS 1 +#define PAD_SPACE 2 +#define PAD_ZERO 3 + +static const char fmt_padding[][4][5] = { + /* DEFAULT, LESS, SPACE, ZERO */ +#define PAD_FMT_MONTHDAY 0 +#define PAD_FMT_HMS 0 +#define PAD_FMT_CENTURY 0 +#define PAD_FMT_SHORTYEAR 0 +#define PAD_FMT_MONTH 0 +#define PAD_FMT_WEEKOFYEAR 0 +#define PAD_FMT_DAYOFMONTH 0 + { "%02d", "%d", "%2d", "%02d" }, +#define PAD_FMT_SDAYOFMONTH 1 +#define PAD_FMT_SHMS 1 + { "%2d", "%d", "%2d", "%02d" }, +#define PAD_FMT_DAYOFYEAR 2 + { "%03d", "%d", "%3d", "%03d" }, +#define PAD_FMT_YEAR 3 + { "%04d", "%d", "%4d", "%04d" } +}; + size_t -strftime(char * __restrict s, size_t maxsize, const char * __restrict format, - const struct tm * __restrict t) +strftime_l(char * __restrict s, size_t maxsize, const char * __restrict format, + const struct tm * __restrict t, locale_t loc) { char * p; int warn; + FIX_LOCALE(loc); tzset(); warn = IN_NONE; - p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); + p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn, loc); #ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) { - fprintf(stderr, "\n"); + (void) fprintf_l(stderr, loc, "\n"); if (format == NULL) - fprintf(stderr, "NULL strftime format "); - else fprintf(stderr, "strftime format \"%s\" ", + (void) fprintf_l(stderr, loc, "NULL strftime format "); + else (void) fprintf_l(stderr, loc, "strftime format \"%s\" ", format); - fprintf(stderr, "yields only two digits of years in "); + (void) fprintf_l(stderr, loc, "yields only two digits of years in "); if (warn == IN_SOME) - fprintf(stderr, "some locales"); + (void) fprintf_l(stderr, loc, "some locales"); else if (warn == IN_THIS) - fprintf(stderr, "the current locale"); - else fprintf(stderr, "all locales"); - fprintf(stderr, "\n"); + (void) fprintf_l(stderr, loc, "the current locale"); + else (void) fprintf_l(stderr, loc, "all locales"); + (void) fprintf_l(stderr, loc, "\n"); } #endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ if (p == s + maxsize) @@ -105,12 +107,30 @@ strftime(char * __restrict s, size_t maxsize, const char * __restrict format, return p - s; } +size_t +strftime(char * __restrict s, size_t maxsize, const char * __restrict format, + const struct tm * __restrict t) +{ + return strftime_l(s, maxsize, format, t, __get_locale()); +} + static char * -_fmt(const char *format, const struct tm * const t, char *pt, - const char * const ptlim, int * warnp) +_fmt(format, t, pt, ptlim, warnp, loc) +const char * format; +const struct tm * const t; +char * pt; +const char * const ptlim; +int * warnp; +locale_t loc; { + int Ealternative, Oalternative, PadIndex; + struct lc_time_T *tptr = __get_current_time_locale(loc); + for ( ; *format; ++format) { if (*format == '%') { + Ealternative = 0; + Oalternative = 0; + PadIndex = PAD_DEFAULT; label: switch (*++format) { case '\0': @@ -119,26 +139,27 @@ label: case 'A': pt = _add((t->tm_wday < 0 || t->tm_wday >= DAYSPERWEEK) ? - "?" : Locale->day[t->tm_wday], + "?" : tptr->weekday[t->tm_wday], pt, ptlim); continue; case 'a': pt = _add((t->tm_wday < 0 || t->tm_wday >= DAYSPERWEEK) ? - "?" : Locale->abday[t->tm_wday], + "?" : tptr->wday[t->tm_wday], pt, ptlim); continue; case 'B': pt = _add((t->tm_mon < 0 || t->tm_mon >= MONSPERYEAR) ? - "?" : Locale->mon[t->tm_mon], + "?" : (Oalternative ? tptr->alt_month : + tptr->month)[t->tm_mon], pt, ptlim); continue; case 'b': case 'h': pt = _add((t->tm_mon < 0 || t->tm_mon >= MONSPERYEAR) ? - "?" : Locale->abmon[t->tm_mon], + "?" : tptr->mon[t->tm_mon], pt, ptlim); continue; case 'C': @@ -156,7 +177,7 @@ label: { int warn2 = IN_SOME; - pt = _fmt(Locale->d_t_fmt, t, pt, ptlim, &warn2); + pt = _fmt(tptr->c_fmt, t, pt, ptlim, &warn2, loc); if (warn2 == IN_ALL) warn2 = IN_THIS; if (warn2 > *warnp) @@ -164,12 +185,17 @@ label: } continue; case 'D': - pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp); + pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp, loc); continue; case 'd': - pt = _conv(t->tm_mday, "%02d", pt, ptlim); + pt = _conv(t->tm_mday, fmt_padding[PAD_FMT_DAYOFMONTH][PadIndex], + pt, ptlim); continue; case 'E': + if (Ealternative || Oalternative) + break; + Ealternative++; + goto label; case 'O': /* ** C99 locale modifiers. @@ -179,24 +205,33 @@ label: ** %OS %Ou %OU %OV %Ow %OW %Oy ** are supposed to provide alternate ** representations. + ** + ** FreeBSD extension + ** %OB */ + if (Ealternative || Oalternative) + break; + Oalternative++; goto label; case 'e': - pt = _conv(t->tm_mday, "%2d", pt, ptlim); + pt = _conv(t->tm_mday, + fmt_padding[PAD_FMT_SDAYOFMONTH][PadIndex], pt, ptlim); continue; case 'F': - pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp); + pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp, loc); continue; case 'H': - pt = _conv(t->tm_hour, "%02d", pt, ptlim); + pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_HMS][PadIndex], + pt, ptlim); continue; case 'I': pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - "%02d", pt, ptlim); + fmt_padding[PAD_FMT_HMS][PadIndex], pt, ptlim); continue; case 'j': - pt = _conv(t->tm_yday + 1, "%03d", pt, ptlim); + pt = _conv(t->tm_yday + 1, + fmt_padding[PAD_FMT_DAYOFYEAR][PadIndex], pt, ptlim); continue; case 'k': /* @@ -209,7 +244,8 @@ label: ** "%l" have been swapped. ** (ado, 1993-05-24) */ - pt = _conv(t->tm_hour, "%2d", pt, ptlim); + pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_SHMS][PadIndex], + pt, ptlim); continue; #ifdef KITCHEN_SINK case 'K': @@ -231,32 +267,35 @@ label: */ pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, - "%2d", pt, ptlim); + fmt_padding[PAD_FMT_SHMS][PadIndex], pt, ptlim); continue; case 'M': - pt = _conv(t->tm_min, "%02d", pt, ptlim); + pt = _conv(t->tm_min, fmt_padding[PAD_FMT_HMS][PadIndex], + pt, ptlim); continue; case 'm': - pt = _conv(t->tm_mon + 1, "%02d", pt, ptlim); + pt = _conv(t->tm_mon + 1, + fmt_padding[PAD_FMT_MONTH][PadIndex], pt, ptlim); continue; case 'n': pt = _add("\n", pt, ptlim); continue; case 'p': pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? - Locale->am_pm[1] : - Locale->am_pm[0], + tptr->pm : + tptr->am, pt, ptlim); continue; case 'R': - pt = _fmt("%H:%M", t, pt, ptlim, warnp); + pt = _fmt("%H:%M", t, pt, ptlim, warnp, loc); continue; case 'r': - pt = _fmt(Locale->t_fmt_ampm, t, pt, ptlim, - warnp); + pt = _fmt(tptr->ampm_fmt, t, pt, ptlim, + warnp, loc); continue; case 'S': - pt = _conv(t->tm_sec, "%02d", pt, ptlim); + pt = _conv(t->tm_sec, fmt_padding[PAD_FMT_HMS][PadIndex], + pt, ptlim); continue; case 's': { @@ -267,18 +306,16 @@ label: tm = *t; mkt = mktime(&tm); - /* CONSTCOND */ if (TYPE_SIGNED(time_t)) - snprintf(buf, sizeof(buf), - "%ld", (long) mkt); - else snprintf(buf, sizeof(buf), - "%lu", (unsigned long) - mkt); + (void) sprintf(buf, "%ld", + (long) mkt); + else (void) sprintf(buf, "%lu", + (unsigned long) mkt); pt = _add(buf, pt, ptlim); } continue; case 'T': - pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp); + pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp, loc); continue; case 't': pt = _add("\t", pt, ptlim); @@ -286,7 +323,7 @@ label: case 'U': pt = _conv((t->tm_yday + DAYSPERWEEK - t->tm_wday) / DAYSPERWEEK, - "%02d", pt, ptlim); + fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], pt, ptlim); continue; case 'u': /* @@ -377,7 +414,7 @@ label: w = 53; #endif /* defined XPG4_1994_04_09 */ if (*format == 'V') - pt = _conv(w, "%02d", + pt = _conv(w, fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], pt, ptlim); else if (*format == 'g') { *warnp = IN_ALL; @@ -393,26 +430,26 @@ label: ** "date as dd-bbb-YYYY" ** (ado, 1993-05-24) */ - pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp); + pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp, loc); continue; case 'W': pt = _conv((t->tm_yday + DAYSPERWEEK - (t->tm_wday ? (t->tm_wday - 1) : (DAYSPERWEEK - 1))) / DAYSPERWEEK, - "%02d", pt, ptlim); + fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], pt, ptlim); continue; case 'w': pt = _conv(t->tm_wday, "%d", pt, ptlim); continue; case 'X': - pt = _fmt(Locale->t_fmt, t, pt, ptlim, warnp); + pt = _fmt(tptr->X_fmt, t, pt, ptlim, warnp, loc); continue; case 'x': { int warn2 = IN_SOME; - pt = _fmt(Locale->d_fmt, t, pt, ptlim, &warn2); + pt = _fmt(tptr->x_fmt, t, pt, ptlim, &warn2, loc); if (warn2 == IN_ALL) warn2 = IN_THIS; if (warn2 > *warnp) @@ -451,7 +488,7 @@ label: if (t->tm_isdst < 0) continue; #ifdef TM_GMTOFF - diff = (int)t->TM_GMTOFF; + diff = t->TM_GMTOFF; #else /* !defined TM_GMTOFF */ /* ** C99 says that the UTC offset must @@ -472,33 +509,14 @@ label: ** determinable, so output nothing if the ** appropriate variables are not available. */ - { - struct tm tmp; - time_t lct, gct; - - /* - ** Get calendar time from t - ** being treated as local. - */ - tmp = *t; /* mktime discards const */ - lct = mktime(&tmp); - - if (lct == (time_t)-1) - continue; - - /* - ** Get calendar time from t - ** being treated as GMT. - **/ - tmp = *t; /* mktime discards const */ - gct = timegm(&tmp); - - if (gct == (time_t)-1) - continue; - - /* LINTED difference will fit int */ - diff = (intmax_t)gct - (intmax_t)lct; - } + if (t->tm_isdst == 0) + diff = -timezone; + else +#ifdef ALTZONE + diff = -altzone; +#else /* !defined ALTZONE */ + continue; +#endif /* !defined ALTZONE */ #endif /* !defined TM_GMTOFF */ if (diff < 0) { sign = "-"; @@ -508,13 +526,29 @@ label: diff /= SECSPERMIN; diff = (diff / MINSPERHOUR) * 100 + (diff % MINSPERHOUR); - pt = _conv(diff, "%04d", pt, ptlim); + pt = _conv(diff, + fmt_padding[PAD_FMT_YEAR][PadIndex], pt, ptlim); } continue; case '+': - pt = _fmt(Locale->d_t_fmt, t, pt, ptlim, - warnp); + pt = _fmt(tptr->date_fmt, t, pt, ptlim, + warnp, loc); continue; + case '-': + if (PadIndex != PAD_DEFAULT) + break; + PadIndex = PAD_LESS; + goto label; + case '_': + if (PadIndex != PAD_DEFAULT) + break; + PadIndex = PAD_SPACE; + goto label; + case '0': + if (PadIndex != PAD_DEFAULT) + break; + PadIndex = PAD_ZERO; + goto label; case '%': /* ** X311J/88-090 (4.12.3.5): if conversion char is @@ -533,17 +567,23 @@ label: } static char * -_conv(const int n, const char * const format, char * const pt, - const char * const ptlim) +_conv(n, format, pt, ptlim) +const int n; +const char * const format; +char * const pt; +const char * const ptlim; { char buf[INT_STRLEN_MAXIMUM(int) + 1]; - snprintf(buf, sizeof(buf), format, n); + (void) sprintf(buf, format, n); return _add(buf, pt, ptlim); } static char * -_add(const char *str, char *pt, const char * const ptlim) +_add(str, pt, ptlim) +const char * str; +char * pt; +const char * const ptlim; { while (pt < ptlim && (*pt = *str++) != '\0') ++pt; @@ -559,11 +599,16 @@ _add(const char *str, char *pt, const char * const ptlim) */ static char * -_yconv(const int a, const int b, const int convert_top, const int convert_yy, - char *pt, const char * const ptlim) +_yconv(a, b, convert_top, convert_yy, pt, ptlim) +const int a; +const int b; +const int convert_top; +const int convert_yy; +char * pt; +const char * const ptlim; { - int lead; - int trail; + register int lead; + register int trail; #define DIVISOR 100 trail = a % DIVISOR + b % DIVISOR; diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3 index be4d92d3e8..dd37b5901e 100644 --- a/lib/libc/stdtime/strptime.3 +++ b/lib/libc/stdtime/strptime.3 @@ -1,9 +1,7 @@ -.\" $NetBSD: strptime.3,v 1.22 2008/11/04 18:37:28 christos Exp $ .\" -.\" Copyright (c) 1997, 1998, 2008 The NetBSD Foundation, Inc. -.\" All rights reserved. +.\" Copyright (c) 1997 Joerg Wunsch .\" -.\" This file was contributed to The NetBSD Foundation by Klaus Klein. +.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -14,270 +12,174 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -.\" POSSIBILITY OF SUCH DAMAGE. +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2008 +.\" $FreeBSD: head/lib/libc/stdtime/strptime.3 237573 2012-06-25 21:51:40Z issyl0 $ +.\" " +.Dd June 25, 2012 .Dt STRPTIME 3 .Os .Sh NAME .Nm strptime -.Nd converts a character string to a time value +.Nd parse date and time string .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In time.h .Ft char * -.Fn strptime "const char * restrict buf" "const char * restrict format" "struct tm * restrict tm" +.Fo strptime +.Fa "const char * restrict buf" +.Fa "const char * restrict format" +.Fa "struct tm * restrict timeptr" +.Fc +.In time.h +.In xlocale.h +.Ft char * +.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strptime -function converts the character string pointed to by +function parses the string in the buffer .Fa buf -to values which are stored in the -.Va tm -structure pointed to by -.Fa tm , -using the format specified by -.Fa format . +according to the string pointed to by +.Fa format , +and fills in the elements of the structure pointed to by +.Fa timeptr . +The resulting values will be relative to the local time zone. +Thus, it can be considered the reverse operation of +.Xr strftime 3 . +The +.Fn strptime_l +function does the same as +.Fn strptime , +but takes an explicit locale rather than using the current locale. .Pp The .Fa format -string consists of zero or more conversion specifications, whitespace -characters as defined by -.Fn isspace , -and ordinary characters. -All ordinary characters in -.Fa format -are compared directly against the corresponding characters in -.Fa buf ; -comparisons which fail will cause -.Fn strptime -to fail. -Whitespace characters in -.Fa format -match any number of whitespace characters in -.Fa buf , -including none. -.Pp -A conversion specification consists of a percent sign -.Ql % -followed by one -or two conversion characters which specify the replacement required. -There must be white-space or other non-alphanumeric characters between any -two conversion specifications. -.Pp -Conversion of alphanumeric strings (such as month and weekday names) is -done without regard to case. -Conversion specifications which cannot be matched will cause -.Fn strptime -to fail. +string consists of zero or more conversion specifications and +ordinary characters. +All ordinary characters are matched exactly with the buffer, where +white space in the format string will match any amount of white space +in the buffer. +All conversion specifications are identical to those described in +.Xr strftime 3 . .Pp -The LC_TIME category defines the locale values for the conversion -specifications. -The following conversion specifications are supported: -.Bl -tag -width "xxxx" -.It Cm \&%a -the day of week, using the locale's weekday names; -either the abbreviated or full name may be specified. -.It Cm \&%A -the same as -.Cm \&%a . -.It Cm \&%b -the month, using the locale's month names; -either the abbreviated or full name may be specified. -.It Cm \&%B -the same as -.Cm \&%b . -.It Cm \&%c -the date and time, using the locale's date and time format. -.It Cm \&%C -the century number [0,99]; -leading zeros are permitted but not required. -This conversion should be used in conjunction with the \&%y conversion. -.It Cm \&%d -the day of month [1,31]; -leading zeros are permitted but not required. -.It Cm \&%D -the date as %m/%d/%y. -.It Cm \&%e -the same as -.Cm \&%d . -.It Cm \&%F -the date as %Y-%m-%d -(the ISO 8601 date format). -.It Cm \&%g -the year corresponding to the ISO week number, without the century. -.Po -A -.Nx -extension. -.Pc -.It Cm \&%G -the year corresponding to the ISO week number, with the century. -.Po -A -.Nx -extension. -.Pc -.It Cm \&%h -the same as -.Cm \&%b . -.It Cm \&%H -the hour (24-hour clock) [0,23]; -leading zeros are permitted but not required. -.It Cm \&%I -the hour (12-hour clock) [1,12]; -leading zeros are permitted but not required. -.It Cm \&%j -the day number of the year [1,366]; -leading zeros are permitted but not required. -.It Cm \&%k -the same as -.Cm \&%H . -.It Cm \&%l -the same as -.Cm \&%I . -.It Cm \&%m -the month number [1,12]; -leading zeros are permitted but not required. -.It Cm \&%M -the minute [0,59]; -leading zeros are permitted but not required. -.It Cm \&%n -any white-space, including none. -.It Cm \&%p -the locale's equivalent of a.m. or p.m. -.It Cm \&%r -the time (12-hour clock) with %p, using the locale's time format. -.It Cm \&%R -the time as %H:%M. -.It Cm \&%S -the seconds [0,61]; -leading zeros are permitted but not required. -.It Cm \&%t -any white-space, including none. -.It Cm \&%T -the time as %H:%M:%S. -.It Cm \&%u -the day of the week as a decimal number, where Monday = 1. -.Po -A -.Nx -extension. -.Pc -.It Cm \&%U -the week number of the year (Sunday as the first day of the week) -as a decimal number [0,53]; -leading zeros are permitted but not required. -All days in a year preceding the first Sunday are considered to be in week 0. -.It Cm \&%V -the ISO 8601:1988 week number as a decimal number. -If the week (starting on Monday) that contains January 1 has more than -three days in the new year, then it is considered the first week of the -year. -If it has fewer than four days in the new year, then it is considered -the last week of the previous year. -Weeks are numbered from 1 to 53. -A -.Nx -extension. -.It Cm \&%w -the weekday as a decimal number [0,6], with 0 representing Sunday; -leading zeros are permitted but not required. -.It Cm \&%W -the week number of the year (Monday as the first day of the week) -as a decimal number [0,53]; -leading zeros are permitted but not required. -All days in a year preceding the first Monday are considered to be in week 0. -.It Cm \&%x -the date, using the locale's date format. -.It Cm \&%X -the time, using the locale's time format. -.It Cm \&%y -the year within the 20th century [69,99] or the 21st century [0,68]; -leading zeros are permitted but not required. -If specified in conjunction -with \&%C, specifies the year [0,99] within that century. -.It Cm \&%Y -the year, including the century (i.e., 1996). -.It Cm \&%z -an ISO 8601 timezone specification. -This is either, -.Dq Z -for -.Ql UTC , -or the offset specified as: -.Dq [+-]hhmm -or -.Dq [+-]hh:mm -or -.Dq [+-]hh . -.Po -A -.Nx -extension. -.Pc -.It Cm \&%Z -timezone name or no characters when time zone information is unavailable. -.Po -A -.Nx -extension. -.Pc -.It Cm \&%% -matches a literal `%'. -No argument is converted. -.El -.Ss Modified conversion specifications -For compatibility, certain conversion specifications can be modified -by the -.Cm E +Two-digit year values, including formats +.Fa %y and -.Cm O -modifier characters to indicate that an alternative format or specification -should be used rather than the one normally used by the unmodified -conversion specification. -As there are currently neither alternative formats -nor specifications supported by the system, the behavior will be as if the -unmodified conversion specification were used. +.Fa \&%D , +are now interpreted as beginning at 1969 per POSIX requirements. +Years 69-00 are interpreted in the 20th century (1969-2000), years +01-68 in the 21st century (2001-2068). .Pp -Case is ignored when matching string items in -.Fa buf , -such as month and weekday names. +If the +.Fa format +string does not contain enough conversion specifications to completely +specify the resulting +.Vt struct tm , +the unspecified members of +.Va timeptr +are left untouched. +For example, if +.Fa format +is +.Dq Li "%H:%M:%S" , +only +.Va tm_hour , +.Va tm_sec +and +.Va tm_min +will be modified. +If time relative to today is desired, initialize the +.Fa timeptr +structure with today's date before passing it to +.Fn strptime . .Sh RETURN VALUES -If successful, the +Upon successful completion, .Fn strptime -function returns a pointer to the character following the last character -parsed. -Otherwise, a null pointer is returned. +returns the pointer to the first character in +.Fa buf +that has not been required to satisfy the specified conversions in +.Fa format . +It returns +.Dv NULL +if one of the conversions failed. +.Fn strptime_l +returns the same values as +.Fn strptime . .Sh SEE ALSO -.Xr ctime 3 , -.Xr isspace 3 , -.Xr localtime 3 , +.Xr date 1 , +.Xr scanf 3 , .Xr strftime 3 -.Sh STANDARDS +.Sh HISTORY +The +.Fn strptime +function appeared in +.Fx 3.0 . +.Sh AUTHORS The .Fn strptime -function conforms to -.St -xpg4 . +function has been contributed by Powerdog Industries. +.Pp +This man page was written by +.An J\(:org Wunsch . .Sh BUGS +Both the +.Fa %e +and +.Fa %l +format specifiers may incorrectly scan one too many digits +if the intended values comprise only a single digit +and that digit is followed immediately by another digit. +Both specifiers accept zero-padded values, +even though they are both defined as taking unpadded values. +.Pp +The +.Fa %p +format specifier has no effect unless it is parsed +.Em after +hour-related specifiers. +Specifying +.Fa %l +without +.Fa %p +will produce undefined results. +Note that 12AM +(ante meridiem) +is taken as midnight +and 12PM +(post meridiem) +is taken as noon. +.Pp The -.Cm \&%Z -format specifier only accepts timezone -abbreviations of the local timezone, -or the value -.Dq GMT . -This limitation is caused by the ambiguity -of overloaded timezone abbreviations, -for example EST is both Eastern Standard -Time and Eastern Australia Summer Time. +.Fa \&%U +and +.Fa %W +format specifiers accept any value within the range 00 to 53 +without validating against other values supplied (like month +or day of the year, for example). +.Pp +The +.Fa %Z +format specifier only accepts time zone abbreviations of the local time zone, +or the value "GMT". +This limitation is because of ambiguity due to of the over loading of time +zone abbreviations. +One such example is +.Fa EST +which is both Eastern Standard Time and Eastern Australia Summer Time. +.Pp +The +.Fn strptime +function does not correctly handle multibyte characters in the +.Fa format +argument. diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 9b4b01268b..03eef6910e 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -1,12 +1,31 @@ -/* $NetBSD: strptime.c,v 1.31 2008/11/04 21:08:33 christos Exp $ */ -/* $DragonFly: src/lib/libc/stdtime/strptime.c,v 1.5 2005/12/04 23:25:40 swildner Exp $ */ - -/*- - * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. - * All rights reserved. +/* + * Powerdog Industries kindly requests feedback from anyone modifying + * this function: + * + * Date: Thu, 05 Jun 1997 23:17:17 -0400 + * From: Kevin Ruddy + * To: James FitzGibbon + * Subject: Re: Use of your strptime(3) code (fwd) + * + * The reason for the "no mod" clause was so that modifications would + * come back and we could integrate them and reissue so that a wider + * audience could use it (thereby spreading the wealth). This has + * made it possible to get strptime to work on many operating systems. + * I'm not sure why that's "plain unacceptable" to the FreeBSD team. + * + * Anyway, you can change it to "with or without modification" as + * you see fit. Enjoy. + * + * Kevin Ruddy + * Powerdog Industries, Inc. + */ +/* + * Copyright (c) 1994 Powerdog Industries. All rights reserved. * - * This code was contributed to The NetBSD Foundation by Klaus Klein. - * Heavily optimised by David Laight + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,454 +33,576 @@ * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgement: + * This product includes software developed by Powerdog Industries. + * 4. The name of Powerdog Industries may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE POWERDOG INDUSTRIES BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @(#)strptime.c 0.1 (Powerdog) 94/03/27 + * @(#) Copyright (c) 1994 Powerdog Industries. All rights reserved. + * $FreeBSD: head/lib/libc/stdtime/strptime.c 227753 2011-11-20 14:45:42Z theraven $ */ -#include +#include "namespace.h" +#include #include -#include +#include +#include #include -#include -#include "private.h" -#include "tzfile.h" - -#define _ctloc(x) (_CurrentTimeLocale->x) - -/* - * We do not implement alternate representations. However, we always - * check whether a given modifier is allowed for a certain conversion. - */ -#define ALT_E 0x01 -#define ALT_O 0x02 -#define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; } +#include +#include "un-namespace.h" +#include "libc_private.h" +#include "timelocal.h" -static char gmt[] = { "GMT" }; -static char utc[] = { "UTC" }; +static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -static const u_char *conv_num(const unsigned char *, int *, uint, uint); -static const u_char *find_string(const u_char *, int *, const char * const *, - const char * const *, int); +#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) -char * -strptime(const char * __restrict buf, const char * __restrict fmt, - struct tm * __restrict tm) +static char * +_strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, + locale_t locale) { - unsigned char c; - const unsigned char *bp; - int alt_format, i, split_year = 0, neg, offs; - const char *new_fmt; - - bp = (const u_char *)buf; - - while (bp != NULL && (c = *fmt++) != '\0') { - /* Clear `alternate' modifier prior to new conversion. */ - alt_format = 0; - i = 0; - - /* Eat up white-space. */ - if (isspace(c)) { - while (isspace(*bp)) - bp++; + char c; + const char *ptr; + int i, + len; + int Ealternative, Oalternative; + struct lc_time_T *tptr = __get_current_time_locale(locale); + + ptr = fmt; + while (*ptr != 0) { + if (*buf == 0) + break; + + c = *ptr++; + + if (c != '%') { + if (isspace_l((unsigned char)c, locale)) + while (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + buf++; + else if (c != *buf++) + return 0; continue; } - if (c != '%') - goto literal; + Ealternative = 0; + Oalternative = 0; +label: + c = *ptr++; + switch (c) { + case 0: + case '%': + if (*buf++ != '%') + return 0; + break; + + case '+': + buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'C': + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + /* XXX This will break for 3-digit centuries. */ + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; + } + if (i < 19) + return 0; + + tm->tm_year = i * 100 - 1900; + break; + + case 'c': + buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'D': + buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'E': + if (Ealternative || Oalternative) + break; + Ealternative++; + goto label; + case 'O': + if (Ealternative || Oalternative) + break; + Oalternative++; + goto label; + + case 'F': + buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'R': + buf = _strptime(buf, "%H:%M", tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'r': + buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'T': + buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'X': + buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'x': + buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); + if (buf == 0) + return 0; + break; + + case 'j': + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = 3; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++){ + i *= 10; + i += *buf - '0'; + len--; + } + if (i < 1 || i > 366) + return 0; -again: switch (c = *fmt++) { - case '%': /* "%%" is converted to "%". */ -literal: - if (c != *bp++) - return NULL; - LEGAL_ALT(0); - continue; + tm->tm_yday = i - 1; + break; - /* - * "Alternative" modifiers. Just set the appropriate flag - * and start over again. - */ - case 'E': /* "%E?" alternative conversion modifier. */ - LEGAL_ALT(0); - alt_format |= ALT_E; - goto again; - - case 'O': /* "%O?" alternative conversion modifier. */ - LEGAL_ALT(0); - alt_format |= ALT_O; - goto again; - - /* - * "Complex" conversion rules, implemented through recursion. - */ - case 'c': /* Date and time, using the locale's format. */ - new_fmt = _ctloc(d_t_fmt); - goto recurse; - - case 'D': /* The date as "%m/%d/%y". */ - new_fmt = "%m/%d/%y"; - LEGAL_ALT(0); - goto recurse; - - case 'F': /* The date as "%Y-%m-%d". */ - new_fmt = "%Y-%m-%d"; - LEGAL_ALT(0); - goto recurse; - - case 'R': /* The time as "%H:%M". */ - new_fmt = "%H:%M"; - LEGAL_ALT(0); - goto recurse; - - case 'r': /* The time in 12-hour clock representation. */ - new_fmt =_ctloc(t_fmt_ampm); - LEGAL_ALT(0); - goto recurse; - - case 'T': /* The time as "%H:%M:%S". */ - new_fmt = "%H:%M:%S"; - LEGAL_ALT(0); - goto recurse; - - case 'X': /* The time, using the locale's format. */ - new_fmt =_ctloc(t_fmt); - goto recurse; - - case 'x': /* The date, using the locale's format. */ - new_fmt =_ctloc(d_fmt); - recurse: - bp = (const u_char *)strptime((const char *)bp, - new_fmt, tm); - LEGAL_ALT(ALT_E); - continue; + case 'M': + case 'S': + if (*buf == 0 || + isspace_l((unsigned char)*buf, locale)) + break; - /* - * "Elementary" conversion rules. - */ - case 'A': /* The day of week, using the locale's form. */ - case 'a': - bp = find_string(bp, &tm->tm_wday, _ctloc(day), - _ctloc(abday), 7); - LEGAL_ALT(0); - continue; + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; - case 'B': /* The month, using the locale's form. */ - case 'b': - case 'h': - bp = find_string(bp, &tm->tm_mon, _ctloc(mon), - _ctloc(abmon), 12); - LEGAL_ALT(0); - continue; - - case 'C': /* The century number. */ - i = 20; - bp = conv_num(bp, &i, 0, 99); + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++){ + i *= 10; + i += *buf - '0'; + len--; + } - i = i * 100 - TM_YEAR_BASE; - if (split_year) - i += tm->tm_year % 100; - split_year = 1; - tm->tm_year = i; - LEGAL_ALT(ALT_E); - continue; + if (c == 'M') { + if (i > 59) + return 0; + tm->tm_min = i; + } else { + if (i > 60) + return 0; + tm->tm_sec = i; + } - case 'd': /* The day of month. */ - case 'e': - bp = conv_num(bp, &tm->tm_mday, 1, 31); - LEGAL_ALT(ALT_O); - continue; + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; - case 'k': /* The hour (24-hour clock representation). */ - LEGAL_ALT(0); - /* FALLTHROUGH */ case 'H': - bp = conv_num(bp, &tm->tm_hour, 0, 23); - LEGAL_ALT(ALT_O); - continue; - - case 'l': /* The hour (12-hour clock representation). */ - LEGAL_ALT(0); - /* FALLTHROUGH */ case 'I': - bp = conv_num(bp, &tm->tm_hour, 1, 12); - if (tm->tm_hour == 12) - tm->tm_hour = 0; - LEGAL_ALT(ALT_O); - continue; - - case 'j': /* The day of year. */ - i = 1; - bp = conv_num(bp, &i, 1, 366); - tm->tm_yday = i - 1; - LEGAL_ALT(0); - continue; + case 'k': + case 'l': + /* + * Of these, %l is the only specifier explicitly + * documented as not being zero-padded. However, + * there is no harm in allowing zero-padding. + * + * XXX The %l specifier may gobble one too many + * digits if used incorrectly. + */ + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; + } + if (c == 'H' || c == 'k') { + if (i > 23) + return 0; + } else if (i > 12) + return 0; + + tm->tm_hour = i; + + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; + + case 'p': + /* + * XXX This is bogus if parsed before hour-related + * specifiers. + */ + len = strlen(tptr->am); + if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { + if (tm->tm_hour > 12) + return 0; + if (tm->tm_hour == 12) + tm->tm_hour = 0; + buf += len; + break; + } - case 'M': /* The minute. */ - bp = conv_num(bp, &tm->tm_min, 0, 59); - LEGAL_ALT(ALT_O); - continue; + len = strlen(tptr->pm); + if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { + if (tm->tm_hour > 12) + return 0; + if (tm->tm_hour != 12) + tm->tm_hour += 12; + buf += len; + break; + } - case 'm': /* The month. */ - i = 1; - bp = conv_num(bp, &i, 1, 12); - tm->tm_mon = i - 1; - LEGAL_ALT(ALT_O); - continue; + return 0; - case 'p': /* The locale's equivalent of AM/PM. */ - bp = find_string(bp, &i, _ctloc(am_pm), NULL, 2); - if (tm->tm_hour > 11) - return NULL; - tm->tm_hour += i * 12; - LEGAL_ALT(0); - continue; + case 'A': + case 'a': + for (i = 0; i < asizeof(tptr->weekday); i++) { + len = strlen(tptr->weekday[i]); + if (strncasecmp_l(buf, tptr->weekday[i], + len, locale) == 0) + break; + len = strlen(tptr->wday[i]); + if (strncasecmp_l(buf, tptr->wday[i], + len, locale) == 0) + break; + } + if (i == asizeof(tptr->weekday)) + return 0; - case 'S': /* The seconds. */ - bp = conv_num(bp, &tm->tm_sec, 0, 61); - LEGAL_ALT(ALT_O); - continue; + tm->tm_wday = i; + buf += len; + break; - case 'U': /* The week of year, beginning on sunday. */ - case 'W': /* The week of year, beginning on monday. */ + case 'U': + case 'W': /* * XXX This is bogus, as we can not assume any valid * information present in the tm structure at this * point to calculate a real value, so just check the * range for now. */ - bp = conv_num(bp, &i, 0, 53); - LEGAL_ALT(ALT_O); - continue; + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; + } + if (i > 53) + return 0; + + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; + + case 'w': + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + i = *buf - '0'; + if (i > 6) + return 0; + + tm->tm_wday = i; + + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; + + case 'd': + case 'e': + /* + * The %e specifier is explicitly documented as not + * being zero-padded but there is no harm in allowing + * such padding. + * + * XXX The %e specifier may gobble one too many + * digits if used incorrectly. + */ + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; + } + if (i > 31) + return 0; - case 'w': /* The day of week, beginning on sunday. */ - bp = conv_num(bp, &tm->tm_wday, 0, 6); - LEGAL_ALT(ALT_O); - continue; + tm->tm_mday = i; - case 'u': /* The day of week, monday = 1. */ - bp = conv_num(bp, &i, 1, 7); - tm->tm_wday = i % 7; - LEGAL_ALT(ALT_O); - continue; + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; - case 'g': /* The year corresponding to the ISO week - * number but without the century. - */ - bp = conv_num(bp, &i, 0, 99); - continue; + case 'B': + case 'b': + case 'h': + for (i = 0; i < asizeof(tptr->month); i++) { + if (Oalternative) { + if (c == 'B') { + len = strlen(tptr->alt_month[i]); + if (strncasecmp_l(buf, + tptr->alt_month[i], + len, locale) == 0) + break; + } + } else { + len = strlen(tptr->month[i]); + if (strncasecmp_l(buf, tptr->month[i], + len, locale) == 0) + break; + } + } + /* + * Try the abbreviated month name if the full name + * wasn't found and Oalternative was not requested. + */ + if (i == asizeof(tptr->month) && !Oalternative) { + for (i = 0; i < asizeof(tptr->month); i++) { + len = strlen(tptr->mon[i]); + if (strncasecmp_l(buf, tptr->mon[i], + len, locale) == 0) + break; + } + } + if (i == asizeof(tptr->month)) + return 0; + + tm->tm_mon = i; + buf += len; + break; + + case 'm': + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; + } + if (i < 1 || i > 12) + return 0; - case 'G': /* The year corresponding to the ISO week - * number with century. - */ - do - bp++; - while (isdigit(*bp)); - continue; + tm->tm_mon = i - 1; - case 'V': /* The ISO 8601:1988 week number as decimal */ - bp = conv_num(bp, &i, 0, 53); - continue; + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; + + case 's': + { + char *cp; + int sverrno; + long n; + time_t t; + + sverrno = errno; + errno = 0; + n = strtol_l(buf, &cp, 10, locale); + if (errno == ERANGE || (long)(t = n) != n) { + errno = sverrno; + return 0; + } + errno = sverrno; + buf = cp; + gmtime_r(&t, tm); + *GMTp = 1; + } + break; - case 'Y': /* The year. */ - i = TM_YEAR_BASE; /* just for data sanity... */ - bp = conv_num(bp, &i, 0, 9999); - tm->tm_year = i - TM_YEAR_BASE; - LEGAL_ALT(ALT_E); - continue; + case 'Y': + case 'y': + if (*buf == 0 || + isspace_l((unsigned char)*buf, locale)) + break; - case 'y': /* The year within 100 years of the epoch. */ - /* LEGAL_ALT(ALT_E | ALT_O); */ - bp = conv_num(bp, &i, 0, 99); - - if (split_year) - /* preserve century */ - i += (tm->tm_year / 100) * 100; - else { - split_year = 1; - if (i <= 68) - i = i + 2000 - TM_YEAR_BASE; - else - i = i + 1900 - TM_YEAR_BASE; + if (!isdigit_l((unsigned char)*buf, locale)) + return 0; + + len = (c == 'Y') ? 4 : 2; + for (i = 0; len && *buf != 0 && + isdigit_l((unsigned char)*buf, locale); buf++) { + i *= 10; + i += *buf - '0'; + len--; } + if (c == 'Y') + i -= 1900; + if (c == 'y' && i < 69) + i += 100; + if (i < 0) + return 0; + tm->tm_year = i; - continue; + + if (*buf != 0 && + isspace_l((unsigned char)*buf, locale)) + while (*ptr != 0 && + !isspace_l((unsigned char)*ptr, locale)) + ptr++; + break; case 'Z': - tzset(); - if (strncmp((const char *)bp, gmt, 3) == 0) { - tm->tm_isdst = 0; -#ifdef TM_GMTOFF - tm->TM_GMTOFF = 0; -#endif -#ifdef TM_ZONE - tm->TM_ZONE = gmt; -#endif - bp += 3; - } else { - const unsigned char *ep; - - ep = find_string(bp, &i, - (const char * const *)tzname, - NULL, 2); - if (ep != NULL) { - tm->tm_isdst = i; -#ifdef TM_GMTOFF - tm->TM_GMTOFF = -(timezone); -#endif -#ifdef TM_ZONE - tm->TM_ZONE = tzname[i]; -#endif + { + const char *cp; + char *zonestr; + + for (cp = buf; *cp && + isupper_l((unsigned char)*cp, locale); ++cp) { + /*empty*/} + if (cp - buf) { + zonestr = alloca(cp - buf + 1); + strncpy(zonestr, buf, cp - buf); + zonestr[cp - buf] = '\0'; + tzset(); + if (0 == strcmp(zonestr, "GMT")) { + *GMTp = 1; + } else if (0 == strcmp(zonestr, tzname[0])) { + tm->tm_isdst = 0; + } else if (0 == strcmp(zonestr, tzname[1])) { + tm->tm_isdst = 1; + } else { + return 0; } - bp = ep; + buf += cp - buf; } - continue; + } + break; case 'z': - /* - * We recognize all ISO 8601 formats: - * Z = Zulu time/UTC - * [+-]hhmm - * [+-]hh:mm - * [+-]hh - */ - while (isspace(*bp)) - bp++; - - switch (*bp++) { - case 'Z': - tm->tm_isdst = 0; -#ifdef TM_GMTOFF - tm->TM_GMTOFF = 0; -#endif -#ifdef TM_ZONE - tm->TM_ZONE = utc; -#endif - continue; - case '+': - neg = 0; - break; - case '-': - neg = 1; - break; - default: - return NULL; - } - offs = 0; - for (i = 0; i < 4; ) { - if (isdigit(*bp)) { - offs = offs * 10 + (*bp++ - '0'); - i++; - continue; - } - if (i == 2 && *bp == ':') { - bp++; - continue; - } - break; - } - switch (i) { - case 2: - offs *= 100; - break; - case 4: - i = offs % 100; - if (i >= 60) - return NULL; - /* Convert minutes into decimal */ - offs = (offs / 100) * 100 + (i * 50) / 30; - break; - default: - return NULL; - } - if (neg) - offs = -offs; - tm->tm_isdst = 0; /* XXX */ -#ifdef TM_GMTOFF - tm->TM_GMTOFF = offs; -#endif -#ifdef TM_ZONE - tm->TM_ZONE = NULL; /* XXX */ -#endif - continue; + { + int sign = 1; - /* - * Miscellaneous conversions. - */ - case 'n': /* Any kind of white-space. */ - case 't': - while (isspace(*bp)) - bp++; - LEGAL_ALT(0); - continue; + if (*buf != '+') { + if (*buf == '-') + sign = -1; + else + return 0; + } + buf++; + i = 0; + for (len = 4; len > 0; len--) { + if (isdigit_l((unsigned char)*buf, locale)) { + i *= 10; + i += *buf - '0'; + buf++; + } else + return 0; + } - default: /* Unknown/unsupported conversion. */ - return NULL; + tm->tm_hour -= sign * (i / 100); + tm->tm_min -= sign * (i % 100); + *GMTp = 1; + } + break; } } - - return __DECONST(char *, bp); + return (char *)buf; } -static const u_char * -conv_num(const unsigned char *buf, int *dest, uint llim, uint ulim) +char * +strptime_l(const char * __restrict buf, const char * __restrict fmt, + struct tm * __restrict tm, locale_t loc) { - uint result = 0; - unsigned char ch; - - /* The limit also determines the number of valid digits. */ - uint rulim = ulim; - - ch = *buf; - if (ch < '0' || ch > '9') - return NULL; - - do { - result *= 10; - result += ch - '0'; - rulim /= 10; - ch = *++buf; - } while ((result * 10 <= ulim) && rulim && ch >= '0' && ch <= '9'); - - if (result < llim || result > ulim) - return NULL; + char *ret; + int gmt; + FIX_LOCALE(loc); + + gmt = 0; + ret = _strptime(buf, fmt, tm, &gmt, loc); + if (ret && gmt) { + time_t t = timegm(tm); + localtime_r(&t, tm); + } - *dest = result; - return buf; + return (ret); } - -static const u_char * -find_string(const u_char *bp, int *tgt, const char * const *n1, - const char * const *n2, int c) +char * +strptime(const char * __restrict buf, const char * __restrict fmt, + struct tm * __restrict tm) { - int i; - unsigned int len; - - /* check full name - then abbreviated ones */ - for (; n1 != NULL; n1 = n2, n2 = NULL) { - for (i = 0; i < c; i++, n1++) { - len = strlen(*n1); - if (strncasecmp(*n1, (const char *)bp, len) == 0) { - *tgt = i; - return bp + len; - } - } - } - - /* Nothing matched */ - return NULL; + return strptime_l(buf, fmt, tm, __get_locale()); } diff --git a/lib/libc/stdtime/time2posix.3 b/lib/libc/stdtime/time2posix.3 index 92c6b380b9..189848ede7 100644 --- a/lib/libc/stdtime/time2posix.3 +++ b/lib/libc/stdtime/time2posix.3 @@ -1,6 +1,6 @@ -.\" $FreeBSD: src/lib/libc/stdtime/time2posix.3,v 1.9.2.4 2001/12/14 18:33:59 ru Exp $ +.\" $FreeBSD: head/contrib/tzcode/stdtime/time2posix.3 192890 2009-05-27 12:18:39Z edwin $ .\" -.Dd October 19, 2008 +.Dd September 11, 2005 .Dt TIME2POSIX 3 .Os .Sh NAME @@ -12,13 +12,13 @@ .Sh SYNOPSIS .In time.h .Ft time_t -.Fn time2posix "const time_t *t" +.Fn time2posix "time_t t" .Ft time_t -.Fn posix2time "const time_t *t" +.Fn posix2time "time_t t" .Sh DESCRIPTION .St -p1003.1-88 legislates that a time_t value of -536457599 shall correspond to "Wed Dec 31 23:59:59 UTC 1986." +536457599 shall correspond to "Wed Dec 31 23:59:59 GMT 1986." This effectively implies that POSIX time_t's cannot include leap seconds and, therefore, @@ -78,7 +78,7 @@ The function is less well-behaved: for a positive leap second hit the result is not unique, and for a negative leap second hit the corresponding -POSIX time_t doesn't exist so an adjacent value is returned. +POSIX time_t does not exist so an adjacent value is returned. Both of these are good indicators of the inferiority of the POSIX representation. .Pp @@ -118,5 +118,6 @@ degenerate to the identity function. .Xr localtime 3 , .Xr mktime 3 , .Xr time 3 +.\" @(#)time2posix.3 8.2 .\" This file is in the public domain, so clarified as of .\" 1996-06-05 by Arthur David Olson. diff --git a/lib/libc/stdtime/time32.c b/lib/libc/stdtime/time32.c index 6425836d90..f11caa2c29 100644 --- a/lib/libc/stdtime/time32.c +++ b/lib/libc/stdtime/time32.c @@ -10,7 +10,7 @@ * Redistribution and use under the terms of the COPYRIGHT file at the * base of the source tree. * - * $FreeBSD: src/lib/libc/stdtime/time32.c,v 1.5 2002/06/17 01:42:29 wollman Exp $ + * $FreeBSD: head/lib/libc/stdtime/time32.c 98313 2002-06-17 01:42:33Z wollman $ */ #include @@ -23,20 +23,18 @@ time_t _time32_to_time(__int32_t t32) { - - return((time_t)t32); + return((time_t)t32); } /* * Convert time_t to a 32 bit representation. If time_t is 64 bits we can - * simply chop it down. The resulting 32 bit representation can be + * simply chop it down. The resulting 32 bit representation can be * converted back to a temporally local 64 bit time_t using time32_to_time. */ __int32_t _time_to_time32(time_t t) { - - return((__int32_t)t); + return((__int32_t)t); } /* @@ -47,8 +45,7 @@ _time_to_time32(time_t t) time_t _time64_to_time(__int64_t t64) { - - return((time_t)t64); + return((time_t)t64); } /* @@ -58,50 +55,45 @@ _time64_to_time(__int64_t t64) __int64_t _time_to_time64(time_t t) { - - return((__int64_t)t); + return((__int64_t)t); } /* - * Convert to/from 'long'. Depending on the sizeof(long) this may or + * Convert to/from 'long'. Depending on the sizeof(long) this may or * may not require using the 50-year rule. */ long _time_to_long(time_t t) { - - if (sizeof(long) == sizeof(__int64_t)) - return(_time_to_time64(t)); - return((long)t); + if (sizeof(long) == sizeof(__int64_t)) + return(_time_to_time64(t)); + return((long)t); } time_t _long_to_time(long tlong) { - - if (sizeof(long) == sizeof(__int32_t)) - return(_time32_to_time(tlong)); - return((time_t)tlong); + if (sizeof(long) == sizeof(__int32_t)) + return(_time32_to_time(tlong)); + return((time_t)tlong); } /* - * Convert to/from 'int'. Depending on the sizeof(int) this may or + * Convert to/from 'int'. Depending on the sizeof(int) this may or * may not require using the 50-year rule. */ int _time_to_int(time_t t) { - - if (sizeof(int) == sizeof(__int64_t)) - return(_time_to_time64(t)); - return((int)t); + if (sizeof(int) == sizeof(__int64_t)) + return(_time_to_time64(t)); + return((int)t); } time_t _int_to_time(int tint) { - - if (sizeof(int) == sizeof(__int32_t)) - return(_time32_to_time(tint)); - return((time_t)tint); + if (sizeof(int) == sizeof(__int32_t)) + return(_time32_to_time(tint)); + return((time_t)tint); } diff --git a/lib/libc/stdtime/timelocal.c b/lib/libc/stdtime/timelocal.c new file mode 100644 index 0000000000..6b1ec4525f --- /dev/null +++ b/lib/libc/stdtime/timelocal.c @@ -0,0 +1,154 @@ +/*- + * Copyright (c) 2001 Alexey Zelkin + * Copyright (c) 1997 FreeBSD Inc. + * All rights reserved. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/stdtime/timelocal.c 227753 2011-11-20 14:45:42Z theraven $ + */ + + +#include + +#include "ldpart.h" +#include "timelocal.h" + +struct xlocale_time { + struct xlocale_component header; + char *buffer; + struct lc_time_T locale; +}; + +struct xlocale_time __xlocale_global_time; + +#define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) + +static const struct lc_time_T _C_time_locale = { + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }, { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }, { + "Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat" + }, { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday" + }, + + /* X_fmt */ + "%H:%M:%S", + + /* + * x_fmt + * Since the C language standard calls for + * "date, using locale's date format," anything goes. + * Using just numbers (as here) makes Quakers happier; + * it's also compatible with SVR4. + */ + "%m/%d/%y", + + /* + * c_fmt + */ + "%a %b %e %H:%M:%S %Y", + + /* am */ + "AM", + + /* pm */ + "PM", + + /* date_fmt */ + "%a %b %e %H:%M:%S %Z %Y", + + /* alt_month + * Standalone months forms for %OB + */ + { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }, + + /* md_order + * Month / day order in dates + */ + "md", + + /* ampm_fmt + * To determine 12-hour clock format time (empty, if N/A) + */ + "%I:%M:%S %p" +}; + +static void destruct_time(void *v) +{ + struct xlocale_time *l = v; + if (l->buffer) + free(l->buffer); + free(l); +} + +#include +struct lc_time_T * +__get_current_time_locale(locale_t loc) +{ + return (loc->using_time_locale + ? &((struct xlocale_time *)loc->components[XLC_TIME])->locale + : (struct lc_time_T *)&_C_time_locale); +} + +static int +time_load_locale(struct xlocale_time *l, int *using_locale, const char *name) +{ + struct lc_time_T *time_locale = &l->locale; + return (__part_load_locale(name, using_locale, + &l->buffer, "LC_TIME", + LCTIME_SIZE, LCTIME_SIZE, + (const char **)time_locale)); +} +int +__time_load_locale(const char *name) +{ + return time_load_locale(&__xlocale_global_time, + &__xlocale_global_locale.using_time_locale, name); +} +void* __time_load(const char* name, locale_t loc) +{ + struct xlocale_time *new = calloc(sizeof(struct xlocale_time), 1); + new->header.header.destructor = destruct_time; + if (time_load_locale(new, &loc->using_time_locale, name) == _LDP_ERROR) + { + xlocale_release(new); + return NULL; + } + return new; +} + diff --git a/lib/libc/gdtoa/machdep_ldisx.c b/lib/libc/stdtime/timelocal.h similarity index 59% copy from lib/libc/gdtoa/machdep_ldisx.c copy to lib/libc/stdtime/timelocal.h index aa49110196..cc4c568136 100644 --- a/lib/libc/gdtoa/machdep_ldisx.c +++ b/lib/libc/stdtime/timelocal.h @@ -1,7 +1,12 @@ /*- - * Copyright (c) 2003 David Schultz + * Copyright (c) 1997-2002 FreeBSD Project. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,24 +28,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/gdtoa/machdep_ldisx.c,v 1.3 2007/12/03 07:17:32 das Exp $ + * $FreeBSD: head/lib/libc/stdtime/timelocal.h 227753 2011-11-20 14:45:42Z theraven $ */ +#ifndef _TIMELOCAL_H_ +#define _TIMELOCAL_H_ +#include "xlocale_private.h" + /* - * Machine-dependent glue to integrate David Gay's gdtoa - * package into libc for architectures where a long double - * is an IEEE extended precision number. + * Private header file for the strftime and strptime localization + * stuff. */ +struct lc_time_T { + const char *mon[12]; + const char *month[12]; + const char *wday[7]; + const char *weekday[7]; + const char *X_fmt; + const char *x_fmt; + const char *c_fmt; + const char *am; + const char *pm; + const char *date_fmt; + const char *alt_month[12]; + const char *md_order; + const char *ampm_fmt; +}; -#include - -#include "gdtoaimp.h" - -long double -strtold(const char * __restrict s, char ** __restrict sp) -{ - long double result; +struct lc_time_T *__get_current_time_locale(locale_t); +int __time_load_locale(const char *); - strtorx(s, sp, FLT_ROUNDS, &result); - return result; -} +#endif /* !_TIMELOCAL_H_ */ diff --git a/lib/libc/stdtime/tzfile.5 b/lib/libc/stdtime/tzfile.5 index 4148cb8ddc..a80b108ef2 100644 --- a/lib/libc/stdtime/tzfile.5 +++ b/lib/libc/stdtime/tzfile.5 @@ -1,12 +1,12 @@ -.\" $FreeBSD: src/lib/libc/stdtime/tzfile.5,v 1.8.2.2 2001/08/17 15:42:43 ru Exp $ -.Dd October 19, 2008 +.\" $FreeBSD: head/contrib/tzcode/stdtime/tzfile.5 200832 2009-12-22 11:17:10Z edwin $ +.Dd September 13, 1994 .Dt TZFILE 5 .Os .Sh NAME .Nm tzfile .Nd timezone information .Sh SYNOPSIS -.In tzfile.h +.Fd #include \&"/usr/src/lib/libc/stdtime/tzfile.h\&" .Sh DESCRIPTION The time zone information files used by .Xr tzset 3 @@ -15,16 +15,10 @@ begin with the magic characters to identify them as time zone information files, followed by a character identifying the version of the file's format -(as of 2005, either an ASCII -.Dv NUL -or a -.Sq Li 2 ) +(as of 2005, either an ASCII NUL or a '2') followed by fifteen bytes containing zeroes reserved for future use, -followed by six four-byte values of type -.Vt long , -written in a -.Dq standard -byte order +followed by four four-byte values +written in a ``standard'' byte order (the high-order byte of the value is written first). These values are, in order: @@ -37,18 +31,13 @@ The number of standard/wall indicators stored in the file. .It Va tzh_leapcnt The number of leap seconds for which data is stored in the file. .It Va tzh_timecnt -The number of -.Dq transition times -for which data is stored +The number of ``transition times'' for which data is stored in the file. .It Va tzh_typecnt -The number of -.Dq local time types -for which data is stored +The number of ``local time types'' for which data is stored in the file (must not be zero). .It Va tzh_charcnt -The number of characters of -.Dq time zone abbreviation strings +The number of characters of ``time zone abbreviation strings'' stored in the file. .El .Pp @@ -57,9 +46,7 @@ The above header is followed by four-byte values of type .Fa long , sorted in ascending order. -These values are written in -.Dq standard -byte order. +These values are written in ``standard'' byte order. Each is used as a transition time (as returned by .Xr time 3 ) at which the rules for computing local time change. @@ -67,16 +54,15 @@ Next come .Va tzh_timecnt one-byte values of type .Fa "unsigned char" ; -each one tells which of the different types of -.Dq local time -types +each one tells which of the different types of ``local time'' types described in the file is associated with the same-indexed transition time. These values serve as indices into an array of .Fa ttinfo structures (with -.Va tzh_typecnt +.Fa tzh_typecnt entries) that appears next in the file; these structures are defined as follows: +.Pp .Bd -literal -offset indent struct ttinfo { long tt_gmtoff; @@ -149,9 +135,9 @@ is zero or the time argument is less than the first transition time recorded in the file. .Pp For version-2-format time zone files, -the above header and data are followed by a second header and data, -identical in format except that -eight bytes are used for each transition time or leap second time. +the above header and data is followed by a second header and data, +identical in format except that eight bytes are used for each +transition time or leap second time. After the second header and data comes a newline-enclosed, POSIX-TZ-environment-variable-style string for use in handling instants after the last transition time stored in the file @@ -161,5 +147,6 @@ such instants). .Xr ctime 3 , .Xr time2posix 3 , .Xr zic 8 +.\" @(#)tzfile.5 8.3 .\" This file is in the public domain, so clarified as of .\" 1996-06-05 by Arthur David Olson. diff --git a/lib/libc/stdtime/tzfile.h b/lib/libc/stdtime/tzfile.h index f3a0543f67..3078e15148 100644 --- a/lib/libc/stdtime/tzfile.h +++ b/lib/libc/stdtime/tzfile.h @@ -1,10 +1,12 @@ #ifndef TZFILE_H - #define TZFILE_H + /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. +** +** $FreeBSD: head/contrib/tzcode/stdtime/tzfile.h 192625 2009-05-23 06:31:50Z edwin $ */ /* @@ -15,6 +17,18 @@ ** Thank you! */ +/* +** ID +*/ + +#ifndef lint +#ifndef NOID +/* +static char tzfilehid[] = "@(#)tzfile.h 8.1"; +*/ +#endif /* !defined NOID */ +#endif /* !defined lint */ + /* ** Information about time zone files. */ diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 8b31567c31..985101e193 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/libc/string/Makefile.inc,v 1.42 2009/01/09 16:24:10 ru Exp $ +# $FreeBSD: head/lib/libc/string/Makefile.inc 247899 2013-03-06 19:59:42Z zeising $ .PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/string ${.CURDIR}/../libc/string @@ -10,19 +10,16 @@ CFLAGS+= -I${.CURDIR}/../libc/locale # machine-independent string sources MISRCS+=bcmp.c bcopy.c bzero.c ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \ index.c memccpy.c memchr.c memrchr.c memcmp.c \ - memcpy.c memmem.c memmove.c mempcpy.c memset.c rindex.c stpcpy.c \ - stpncpy.c \ - strcasecmp.c strcat.c strcasestr.c strchr.c strchrnul.c \ - strcmp.c strcoll.c \ - strcpy.c strcspn.c strdup.c strerror.c strlcat.c strlcpy.c strlen.c \ - strmode.c strncat.c strncmp.c strncpy.c strndup.c strnlen.c strnstr.c \ + memcpy.c memmem.c memmove.c mempcpy.c memset.c rindex.c \ + stpcpy.c stpncpy.c strcasecmp.c \ + strcat.c strcasestr.c strchr.c strchrnul.c strcmp.c strcoll.c strcpy.c\ + strcspn.c strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c \ + strncat.c strncmp.c strncpy.c strndup.c strnlen.c strnstr.c \ strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ - strxfrm.c swab.c wcscat.c wcschr.c wcscmp.c wcscoll.c wcscpy.c \ - wcscspn.c wcsdup.c \ - wcslcat.c wcslcpy.c wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcsnlen.c \ - wcspbrk.c \ - wcscasecmp.c \ - wcsncasecmp.c \ + strxfrm.c swab.c wcpcpy.c wcpncpy.c wcscasecmp.c wcscat.c \ + wcschr.c wcscmp.c wcscoll.c wcscpy.c wcscspn.c wcsdup.c \ + wcslcat.c wcslcpy.c wcslen.c wcsncasecmp.c wcsncat.c wcsncmp.c \ + wcsncpy.c wcsnlen.c wcspbrk.c \ wcsrchr.c wcsspn.c wcsstr.c wcstok.c wcswidth.c wcsxfrm.c wmemchr.c \ wmemcmp.c \ wmemcpy.c wmemmove.c wmemset.c @@ -48,11 +45,14 @@ MLINKS+=ffs.3 ffsl.3 \ MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=memcpy.3 mempcpy.3 -MLINKS+=strcasecmp.3 strncasecmp.3 +MLINKS+=strcasecmp.3 strncasecmp.3 \ + strcasecmp.3 strcasecmp_l.3 \ + strcasecmp.3 strncasecmp_l.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 \ strchr.3 strchrnul.3 MLINKS+=strcmp.3 strncmp.3 +MLINKS+=strcoll.3 strcoll_l.3 MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 stpncpy.3 \ strcpy.3 strncpy.3 @@ -64,9 +64,14 @@ MLINKS+=strerror.3 perror.3 \ MLINKS+=strlcpy.3 strlcat.3 MLINKS+=strlen.3 strnlen.3 MLINKS+=strstr.3 strcasestr.3 \ - strstr.3 strnstr.3 + strstr.3 strnstr.3 \ + strstr.3 strcasestr_l.3 MLINKS+=strtok.3 strtok_r.3 -MLINKS+=wmemchr.3 wcscat.3 \ +MLINKS+=strxfrm.3 strxfrm_l.3 +MLINKS+=wmemchr.3 wcpcpy.3 \ + wmemchr.3 wcpncpy.3 \ + wmemchr.3 wcscasecmp.3 \ + wmemchr.3 wcscat.3 \ wmemchr.3 wcschr.3 \ wmemchr.3 wcscmp.3 \ wmemchr.3 wcscpy.3 \ @@ -75,6 +80,7 @@ MLINKS+=wmemchr.3 wcscat.3 \ wmemchr.3 wcslcat.3 \ wmemchr.3 wcslcpy.3 \ wmemchr.3 wcslen.3 \ + wmemchr.3 wcsncasecmp.3 \ wmemchr.3 wcsncat.3 \ wmemchr.3 wcsncmp.3 \ wmemchr.3 wcsncpy.3 \ @@ -83,8 +89,6 @@ MLINKS+=wmemchr.3 wcscat.3 \ wmemchr.3 wcsrchr.3 \ wmemchr.3 wcsspn.3 \ wmemchr.3 wcsstr.3 \ - wmemchr.3 wcscasecmp.3 \ - wmemchr.3 wcsncasecmp.3 \ wmemchr.3 wmemcmp.3 \ wmemchr.3 wmemcpy.3 \ wmemchr.3 wmemmove.3 \ diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index 8910333f3f..6ff6bba4c3 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -15,14 +15,15 @@ DF306.0 { memcpy; memmem; memmove; - mempcpy; memrchr; memset; rindex; stpcpy; stpncpy; strcasecmp; + strcasecmp_l; strcasestr; + strcasestr_l; strcat; strchr; strchrnul; @@ -38,6 +39,7 @@ DF306.0 { strlen; strmode; strncasecmp; + strncasecmp_l; strncat; strncmp; strncpy; @@ -54,6 +56,8 @@ DF306.0 { strtok_r; strxfrm; swab; + wcpcpy; + wcpncpy; wcscasecmp; wcscat; wcschr; @@ -76,7 +80,9 @@ DF306.0 { wcsstr; wcstok; wcswidth; + wcswidth_l; wcsxfrm; + wcwidth_l; wmemchr; wmemcmp; wmemcpy; diff --git a/lib/libc/string/bcmp.3 b/lib/libc/string/bcmp.3 index 9135ce9a36..b854023111 100644 --- a/lib/libc/string/bcmp.3 +++ b/lib/libc/string/bcmp.3 @@ -28,8 +28,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bcmp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bcmp.3,v 1.11 2007/01/09 00:28:11 imp Exp $ -.\" $DragonFly: src/lib/libc/string/bcmp.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/bcmp.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt BCMP 3 diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c index e10d20fd9d..1b33aebaf7 100644 --- a/lib/libc/string/bcmp.c +++ b/lib/libc/string/bcmp.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)bcmp.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/bcmp.c,v 1.6 2007/01/09 00:28:11 imp Exp $ - * $DragonFly: src/lib/libc/string/bcmp.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/bcmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index 5a49624470..6c53a1fdc4 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -29,8 +29,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bcopy.3,v 1.10 2007/01/09 00:28:11 imp Exp $ -.\" $DragonFly: src/lib/libc/string/bcopy.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/bcopy.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt BCOPY 3 diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c index 69d22eaa04..91acab54d2 100644 --- a/lib/libc/string/bcopy.c +++ b/lib/libc/string/bcopy.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)bcopy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/bcopy.c,v 1.7 2007/01/09 00:28:11 imp Exp $ - * $DragonFly: src/lib/libc/string/bcopy.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/bcopy.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/bstring.3 b/lib/libc/string/bstring.3 index 0724fc446c..62efc1f215 100644 --- a/lib/libc/string/bstring.3 +++ b/lib/libc/string/bstring.3 @@ -28,8 +28,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bstring.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bstring.3,v 1.8 2007/01/09 00:28:11 imp Exp $ -.\" $DragonFly: src/lib/libc/string/bstring.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/bstring.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt BSTRING 3 diff --git a/lib/libc/string/bzero.3 b/lib/libc/string/bzero.3 index f630f06123..5a791a4c89 100644 --- a/lib/libc/string/bzero.3 +++ b/lib/libc/string/bzero.3 @@ -29,8 +29,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bzero.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bzero.3,v 1.10 2007/01/09 00:28:11 imp Exp $ -.\" $DragonFly: src/lib/libc/string/bzero.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/bzero.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt BZERO 3 diff --git a/lib/libc/string/ffs.3 b/lib/libc/string/ffs.3 index 4e89f938ae..33eb36fe1c 100644 --- a/lib/libc/string/ffs.3 +++ b/lib/libc/string/ffs.3 @@ -28,10 +28,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/string/ffs.3,v 1.13 2009/01/13 13:19:42 kib Exp $ -.\" $DragonFly: src/lib/libc/string/ffs.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/ffs.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd October 26, 2008 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -64,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -75,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c index 0ca0e34c19..a279290f56 100644 --- a/lib/libc/string/ffs.c +++ b/lib/libc/string/ffs.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)ffs.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/ffs.c,v 1.8 2007/01/09 00:28:11 imp Exp $ - * $DragonFly: src/lib/libc/string/ffs.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/ffs.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -42,7 +41,7 @@ ffs(int mask) int bit; if (mask == 0) - return (0); + return(0); for (bit = 1; !(mask & 1); bit++) mask = (unsigned int)mask >> 1; return (bit); diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c index 6c18983921..95233597dd 100644 --- a/lib/libc/string/ffsl.c +++ b/lib/libc/string/ffsl.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/ffsl.c,v 1.4 2008/11/03 10:14:47 kib Exp $ + * $FreeBSD: head/lib/libc/string/ffsl.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c index 4e8cc7b5cd..c4901a3664 100644 --- a/lib/libc/string/ffsll.c +++ b/lib/libc/string/ffsll.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/ffsll.c,v 1.1 2008/11/03 10:22:19 kib Exp $ + * $FreeBSD: head/lib/libc/string/ffsll.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/fls.c b/lib/libc/string/fls.c index d97c6082a2..bd6dde6da8 100644 --- a/lib/libc/string/fls.c +++ b/lib/libc/string/fls.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/fls.c,v 1.3 2007/01/09 00:28:12 imp Exp $ + * $FreeBSD: head/lib/libc/string/fls.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/flsl.c b/lib/libc/string/flsl.c index 4d93ef8338..f467667851 100644 --- a/lib/libc/string/flsl.c +++ b/lib/libc/string/flsl.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/flsl.c,v 1.3 2007/01/09 00:28:12 imp Exp $ + * $FreeBSD: head/lib/libc/string/flsl.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/flsll.c b/lib/libc/string/flsll.c index 013191e7e1..06ac00f117 100644 --- a/lib/libc/string/flsll.c +++ b/lib/libc/string/flsll.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/flsll.c,v 1.1 2008/11/03 10:22:19 kib Exp $ + * $FreeBSD: head/lib/libc/string/flsll.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/index.3 b/lib/libc/string/index.3 index ac5a67401c..683c7c477b 100644 --- a/lib/libc/string/index.3 +++ b/lib/libc/string/index.3 @@ -28,15 +28,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)index.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/index.3,v 1.12 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/index.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/index.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd June 4, 1993 +.Dd March 20, 2011 .Dt INDEX 3 .Os .Sh NAME -.Nm index , -.Nm rindex +.Nm index , rindex .Nd locate character in string .Sh LIBRARY .Lb libc @@ -47,6 +45,17 @@ .Ft "char *" .Fn rindex "const char *s" "int c" .Sh DESCRIPTION +.Bf -symbolic +The +.Fn index +and +.Fn rindex +functions have been deprecated in favor of +.Xr strchr 3 +and +.Xr strrchr 3 . +.Ef +.Pp The .Fn index function @@ -102,3 +111,5 @@ before they were moved to for .St -p1003.1-2001 compliance. +The functions are not specified by +.St -p1003.1-2008 . diff --git a/lib/libc/string/memccpy.3 b/lib/libc/string/memccpy.3 index bb5031118a..736ce5238a 100644 --- a/lib/libc/string/memccpy.3 +++ b/lib/libc/string/memccpy.3 @@ -26,8 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/memccpy.3,v 1.7 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/memccpy.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memccpy.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 9, 1993 .Dt MEMCCPY 3 @@ -51,7 +50,9 @@ to string .Fa dst . If the character .Fa c -(as converted to an unsigned char) occurs in the string +(as converted to an +.Vt "unsigned char" ) +occurs in the string .Fa src , the copy stops and a pointer to the byte after the copy of .Fa c diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c index cde5bde8e1..c97d38838a 100644 --- a/lib/libc/string/memccpy.c +++ b/lib/libc/string/memccpy.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)memccpy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/memccpy.c,v 1.6 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/memccpy.c,v 1.5 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/memccpy.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 index b133992146..a1d08f38ee 100644 --- a/lib/libc/string/memchr.3 +++ b/lib/libc/string/memchr.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memchr.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memchr.3,v 1.10 2008/04/10 00:12:44 delphij Exp $ -.\" $DragonFly: src/lib/libc/string/memchr.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memchr.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd April 9, 2008 .Dt MEMCHR 3 @@ -53,7 +52,8 @@ The function locates the first occurrence of .Fa c -(converted to an unsigned char) +(converted to an +.Vt "unsigned char" ) in string .Fa b . .Pp @@ -84,7 +84,8 @@ bytes. .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , -.Xr strtok 3 +.Xr strtok 3 , +.Xr wmemchr 3 .Sh STANDARDS The .Fn memchr @@ -100,6 +101,6 @@ The .Fn memrchr function first appeared in GNU libc 2.1.91, this implementation first appeared in -.Fx 8.0 , +.Fx 6.4 , coming from .Ox 4.3 . diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c index ad9e0b7863..87a657733b 100644 --- a/lib/libc/string/memchr.c +++ b/lib/libc/string/memchr.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)memchr.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/memchr.c,v 1.5 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/memchr.c,v 1.5 2005/09/20 15:00:45 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/memchr.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/memcmp.3 b/lib/libc/string/memcmp.3 index 90e23529a9..72a389c082 100644 --- a/lib/libc/string/memcmp.3 +++ b/lib/libc/string/memcmp.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memcmp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memcmp.3,v 1.9 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/memcmp.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memcmp.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt MEMCMP 3 @@ -62,7 +61,9 @@ The function returns zero if the two strings are identical, otherwise returns the difference between the first two differing bytes -(treated as unsigned char values, so that +(treated as +.Vt "unsigned char" +values, so that .Sq Li \e200 is greater than .Sq Li \&\e0 , @@ -73,7 +74,8 @@ Zero-length strings are always identical. .Xr strcasecmp 3 , .Xr strcmp 3 , .Xr strcoll 3 , -.Xr strxfrm 3 +.Xr strxfrm 3 , +.Xr wmemcmp 3 .Sh STANDARDS The .Fn memcmp diff --git a/lib/libc/string/memcmp.c b/lib/libc/string/memcmp.c index f993d02826..581277c8c9 100644 --- a/lib/libc/string/memcmp.c +++ b/lib/libc/string/memcmp.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)memcmp.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/memcmp.c,v 1.5 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/memcmp.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/memcmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3 index 8542ecf13e..1be84cbf81 100644 --- a/lib/libc/string/memcpy.3 +++ b/lib/libc/string/memcpy.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memcpy.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memcpy.3,v 1.8 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/memcpy.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memcpy.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt MEMCPY 3 @@ -45,15 +44,11 @@ .In string.h .Ft void * .Fn memcpy "void *dst" "const void *src" "size_t len" -.Ft void * -.Fn mempcpy "void *dst" "const void *src" "size_t len" .Sh DESCRIPTION The .Fn memcpy -and -.Fn mempcpy -functions -copy +function +copies .Fa len bytes from string .Fa src @@ -65,16 +60,12 @@ The function returns the original value of .Fa dst . -The -.Fn mempcpy -function -returns a pointer to the byte directly following the last byte written in -.Fa dst . .Sh SEE ALSO .Xr bcopy 3 , .Xr memccpy 3 , .Xr memmove 3 , -.Xr strcpy 3 +.Xr strcpy 3 , +.Xr wmemcpy 3 .Sh STANDARDS The .Fn memcpy diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index fa22b3f24c..4659af439c 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/memmem.3,v 1.3 2005/11/24 06:56:21 ru Exp $ +.\" $FreeBSD: head/lib/libc/string/memmem.3 152746 2005-11-24 06:56:21Z ru $ .\" .Dd August 24, 2005 .Dt MEMMEM 3 @@ -80,7 +80,7 @@ The function first appeared in .Fx 6.0 . .Sh AUTHORS -.An Pascal Gloor Aq Mt pascal.gloor@spale.com +.An Pascal Gloor Aq pascal.gloor@spale.com .Sh BUGS This function was broken in Linux libc up to and including version 5.0.9 and in GNU libc prior to version 2.1. diff --git a/lib/libc/string/memmem.c b/lib/libc/string/memmem.c index 4e6d8cdad8..8f0966a14c 100644 --- a/lib/libc/string/memmem.c +++ b/lib/libc/string/memmem.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/memmem.c,v 1.1 2005/08/25 18:26:58 andre Exp $ + * $FreeBSD: head/lib/libc/string/memmem.c 188080 2009-02-03 17:58:20Z danger $ */ #include @@ -37,28 +37,28 @@ void * memmem(const void *l, size_t l_len, const void *s, size_t s_len) { - char *cur, *last; + register char *cur, *last; const char *cl = (const char *)l; const char *cs = (const char *)s; /* we need something to compare */ if (l_len == 0 || s_len == 0) - return (NULL); + return NULL; /* "s" must be smaller or equal to "l" */ if (l_len < s_len) - return (NULL); + return NULL; /* special case where s_len == 1 */ if (s_len == 1) - return (memchr(l, (int)*cs, l_len)); + return memchr(l, (int)*cs, l_len); /* the last position where its possible to find "s" in "l" */ last = (char *)cl + l_len - s_len; for (cur = (char *)cl; cur <= last; cur++) if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) - return (cur); + return cur; - return (NULL); + return NULL; } diff --git a/lib/libc/string/memmove.3 b/lib/libc/string/memmove.3 index 95516ac779..c554245371 100644 --- a/lib/libc/string/memmove.3 +++ b/lib/libc/string/memmove.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memmove.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memmove.3,v 1.7 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/memmove.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memmove.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt MEMMOVE 3 @@ -66,7 +65,8 @@ function returns the original value of .Xr bcopy 3 , .Xr memccpy 3 , .Xr memcpy 3 , -.Xr strcpy 3 +.Xr strcpy 3 , +.Xr wmemmove 3 .Sh STANDARDS The .Fn memmove diff --git a/lib/libc/string/memrchr.c b/lib/libc/string/memrchr.c index 05d24df66b..bfb793892f 100644 --- a/lib/libc/string/memrchr.c +++ b/lib/libc/string/memrchr.c @@ -1,3 +1,5 @@ +/* $OpenBSD: memrchr.c,v 1.2 2007/11/27 16:22:12 martynas Exp $ */ + /* * Copyright (c) 2007 Todd C. Miller * @@ -13,8 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: memrchr.c,v 1.2 2007/11/27 16:22:12 martynas Exp $ - * $FreeBSD: src/lib/libc/string/memrchr.c,v 1.1 2008/04/10 00:12:44 delphij Exp $ + * $FreeBSD: head/lib/libc/string/memrchr.c 178051 2008-04-10 00:12:44Z delphij $ */ #include diff --git a/lib/libc/string/memset.3 b/lib/libc/string/memset.3 index d4e4a3af81..b955a3898f 100644 --- a/lib/libc/string/memset.3 +++ b/lib/libc/string/memset.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memset.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memset.3,v 1.8 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/memset.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/memset.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt MEMSET 3 @@ -53,7 +52,9 @@ writes .Fa len bytes of value .Fa c -(converted to an unsigned char) to the string +(converted to an +.Vt "unsigned char" ) +to the string .Fa b . .Sh RETURN VALUES The @@ -61,7 +62,8 @@ The function returns its first argument. .Sh SEE ALSO .Xr bzero 3 , -.Xr swab 3 +.Xr swab 3 , +.Xr wmemset 3 .Sh STANDARDS The .Fn memset diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c index 2cccd24d3d..8b0423b354 100644 --- a/lib/libc/string/memset.c +++ b/lib/libc/string/memset.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)memset.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/memset.c,v 1.9 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/memset.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/memset.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/stpcpy.c b/lib/libc/string/stpcpy.c index f1dc4baf12..61b4bbc8da 100644 --- a/lib/libc/string/stpcpy.c +++ b/lib/libc/string/stpcpy.c @@ -29,13 +29,13 @@ * SUCH DAMAGE. * * @(#)strcpy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/stpcpy.c,v 1.1 2002/10/03 19:39:20 obrien Exp $ + * $FreeBSD: head/lib/libc/string/stpcpy.c 189137 2009-02-28 06:05:37Z das $ */ #include char * -stpcpy(char *to, const char *from) +stpcpy(char * __restrict to, const char * __restrict from) { for (; (*to = *from); ++from, ++to); diff --git a/lib/libc/string/stpncpy.c b/lib/libc/string/stpncpy.c index b509c8fc2f..47057e9034 100644 --- a/lib/libc/string/stpncpy.c +++ b/lib/libc/string/stpncpy.c @@ -23,19 +23,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/stpncpy.c, SVN Rev. 189136 $ + * $FreeBSD: head/lib/libc/string/stpncpy.c 189136 2009-02-28 06:00:58Z das $ */ #include char * -stpncpy(char * __restrict dst, const char * __restrict src, size_t len) +stpncpy(char * __restrict dst, const char * __restrict src, size_t n) { - for (; len--; dst++, src++) { + for (; n--; dst++, src++) { if (!(*dst = *src)) { char *ret = dst; - while (len--) + while (n--) *++dst = '\0'; return (ret); } diff --git a/lib/libc/string/strcasecmp.3 b/lib/libc/string/strcasecmp.3 index a844f41fa5..0bdd7003a9 100644 --- a/lib/libc/string/strcasecmp.3 +++ b/lib/libc/string/strcasecmp.3 @@ -28,8 +28,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/strcasecmp.3,v 1.12 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strcasecmp.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strcasecmp.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 9, 1993 .Dt STRCASECMP 3 @@ -46,6 +45,12 @@ .Fn strcasecmp "const char *s1" "const char *s2" .Ft int .Fn strncasecmp "const char *s1" "const char *s2" "size_t len" +.In string.h +.In xlocale.h +.Ft int +.Fn strcasecmp_l "const char *s1" "const char *s2" "locale_t loc" +.Ft int +.Fn strncasecmp_l "const char *s1" "const char *s2" "site_t len" "locale_t loc" .Sh DESCRIPTION The .Fn strcasecmp @@ -59,16 +64,22 @@ and .Pp The .Fn strncasecmp -compares at most +function compares at most .Fa len characters. -.Sh RETURN VALUES The +.Fn strcasecmp_l +and +.Fn strncasecmp_l +functions do the same as their non-locale versions above, but take an +explicit locale rather than using the current locale. +.Sh RETURN VALUES +The functions .Fn strcasecmp and .Fn strncasecmp return an integer greater than, equal to, or less than 0, -according as +depending on whether .Fa s1 is lexicographically greater than, equal to, or less than .Fa s2 @@ -78,13 +89,19 @@ The comparison is done using unsigned characters, so that .Sq Li \e200 is greater than .Ql \e0 . +The functions +.Fn strcasecmp_l +and +.Fn strncasecmp_l +do the same but take explicit locales. .Sh SEE ALSO .Xr bcmp 3 , .Xr memcmp 3 , .Xr strcmp 3 , .Xr strcoll 3 , .Xr strxfrm 3 , -.Xr tolower 3 +.Xr tolower 3 , +.Xr wcscasecmp 3 .Sh HISTORY The .Fn strcasecmp diff --git a/lib/libc/string/strcasecmp.c b/lib/libc/string/strcasecmp.c index 46fc324cc2..6c3198141b 100644 --- a/lib/libc/string/strcasecmp.c +++ b/lib/libc/string/strcasecmp.c @@ -2,6 +2,11 @@ * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -27,33 +32,53 @@ * SUCH DAMAGE. * * @(#)strcasecmp.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strcasecmp.c,v 1.7 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strcasecmp.c,v 1.8 2005/04/29 16:12:52 dillon Exp $ + * $FreeBSD: head/lib/libc/string/strcasecmp.c 251069 2013-05-28 20:57:40Z emaste $ */ -#include #include #include +#include "xlocale_private.h" int -strcasecmp(const char *s1, const char *s2) +strcasecmp_l(const char *s1, const char *s2, locale_t locale) { - while (tolower((u_char)*s1) == tolower((u_char)*s2++)) - if (*s1++ == '\0') + const u_char + *us1 = (const u_char *)s1, + *us2 = (const u_char *)s2; + FIX_LOCALE(locale); + + while (tolower_l(*us1, locale) == tolower_l(*us2++, locale)) + if (*us1++ == '\0') return (0); - return (tolower((u_char)*s1) - tolower((u_char)*--s2)); + return (tolower_l(*us1, locale) - tolower_l(*--us2, locale)); +} +int +strcasecmp(const char *s1, const char *s2) +{ + return strcasecmp_l(s1, s2, __get_locale()); } int -strncasecmp(const char *s1, const char *s2, size_t n) +strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t locale) { + FIX_LOCALE(locale); if (n != 0) { + const u_char + *us1 = (const u_char *)s1, + *us2 = (const u_char *)s2; + do { - if (tolower((u_char)*s1) != tolower((u_char)*s2++)) - return (tolower((u_char)*s1) - tolower((u_char)*--s2)); - if (*s1++ == '\0') + if (tolower_l(*us1, locale) != tolower_l(*us2++, locale)) + return (tolower_l(*us1, locale) - tolower_l(*--us2, locale)); + if (*us1++ == '\0') break; } while (--n != 0); } return (0); } + +int +strncasecmp(const char *s1, const char *s2, size_t n) +{ + return strncasecmp_l(s1, s2, n, __get_locale()); +} diff --git a/lib/libc/string/strcasestr.c b/lib/libc/string/strcasestr.c index 5b3492e3b4..5ef0e8ca47 100644 --- a/lib/libc/string/strcasestr.c +++ b/lib/libc/string/strcasestr.c @@ -5,6 +5,11 @@ * This code is derived from software contributed to Berkeley by * Chris Torek. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -29,32 +34,38 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strcasestr.c,v 1.4 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strcasestr.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strcasestr.c 251069 2013-05-28 20:57:40Z emaste $ */ #include #include +#include "xlocale_private.h" /* * Find the first occurrence of find in s, ignore case. */ char * -strcasestr(const char *s, const char *find) +strcasestr_l(const char *s, const char *find, locale_t locale) { char c, sc; size_t len; + FIX_LOCALE(locale); if ((c = *find++) != 0) { - c = tolower((unsigned char)c); + c = tolower_l((unsigned char)c, locale); len = strlen(find); do { do { if ((sc = *s++) == 0) return (NULL); - } while ((char)tolower((unsigned char)sc) != c); - } while (strncasecmp(s, find, len) != 0); + } while ((char)tolower_l((unsigned char)sc, locale) != c); + } while (strncasecmp_l(s, find, len, locale) != 0); s--; } return ((char *)s); } +char * +strcasestr(const char *s, const char *find) +{ + return strcasestr_l(s, find, __get_locale()); +} diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3 index 8de083e2fd..2a540da403 100644 --- a/lib/libc/string/strcat.3 +++ b/lib/libc/string/strcat.3 @@ -30,10 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)strcat.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strcat.3,v 1.15 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strcat.3,v 1.3 2007/10/19 20:46:53 swildner Exp $ +.\" $FreeBSD: head/lib/libc/string/strcat.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd June 4, 1993 +.Dd December 1, 2009 .Dt STRCAT 3 .Os .Sh NAME @@ -81,6 +80,23 @@ and functions return the pointer .Fa s . +.Sh SEE ALSO +.Xr bcopy 3 , +.Xr memccpy 3 , +.Xr memcpy 3 , +.Xr memmove 3 , +.Xr strcpy 3 , +.Xr strlcat 3 , +.Xr strlcpy 3 , +.Xr wcscat 3 +.Sh STANDARDS +The +.Fn strcat +and +.Fn strncat +functions +conform to +.St -isoC . .Sh SECURITY CONSIDERATIONS The .Fn strcat @@ -118,13 +134,13 @@ foo(const char *arbitrary_string) /* * This first strcat is bad behavior. Do not use strcat! */ - strcat(onstack, arbitrary_string); /* BAD! */ + (void)strcat(onstack, arbitrary_string); /* BAD! */ #elif defined(BETTER) /* * The following two lines demonstrate better use of * strncat(). */ - strncat(onstack, arbitrary_string, + (void)strncat(onstack, arbitrary_string, sizeof(onstack) - strlen(onstack) - 1); #elif defined(BEST) /* @@ -134,24 +150,8 @@ foo(const char *arbitrary_string) if (strlen(arbitrary_string) + 1 > sizeof(onstack) - strlen(onstack)) err(1, "onstack would be truncated"); - strncat(onstack, arbitrary_string, + (void)strncat(onstack, arbitrary_string, sizeof(onstack) - strlen(onstack) - 1); #endif } .Ed -.Sh SEE ALSO -.Xr bcopy 3 , -.Xr memccpy 3 , -.Xr memcpy 3 , -.Xr memmove 3 , -.Xr strcpy 3 , -.Xr strlcat 3 , -.Xr strlcpy 3 -.Sh STANDARDS -The -.Fn strcat -and -.Fn strncat -functions -conform to -.St -isoC . diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c index 56055aca2e..bf1a8d9e61 100644 --- a/lib/libc/string/strcat.c +++ b/lib/libc/string/strcat.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)strcat.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strcat.c,v 1.8 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strcat.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strcat.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/strchr.3 b/lib/libc/string/strchr.3 index a9336f7287..d3faf209cc 100644 --- a/lib/libc/string/strchr.3 +++ b/lib/libc/string/strchr.3 @@ -30,15 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)strchr.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/string/strchr.3,v 1.13 2007/01/09 00:28:12 imp Exp $ +.\" $FreeBSD: head/lib/libc/string/strchr.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd March 3, 2013 +.Dd February 13, 2013 .Dt STRCHR 3 .Os .Sh NAME -.Nm strchr , -.Nm strrchr , -.Nm strchrnul +.Nm strchr , strrchr , strchrnul .Nd locate character in string .Sh LIBRARY .Lb libc @@ -59,7 +57,7 @@ function locates the first occurrence of .Vt char ) in the string pointed to by .Fa s . -The terminating nul character is considered part of the string; +The terminating null character is considered part of the string; therefore if .Fa c is @@ -78,13 +76,13 @@ The .Fn strchrnul function is identical to .Fn strchr -except that it returns a pointer to the terminating nul character of -.Fa s -instead of -.Dv NULL -if +except that if .Fa c -is not found. +is not found in +.Fa s +a pointer to the terminating +.Ql \e0 +is returned. .Sh RETURN VALUES The functions .Fn strchr @@ -93,13 +91,11 @@ and return a pointer to the located character, or .Dv NULL if the character does not appear in the string. +.Pp .Fn strchrnul -returns a pointer to the located character, or to the terminating nul -character of -.Fa s -if -.Fa c -is not found in the string. +returns a pointer to the terminating +.Ql \e0 +if the character does not appear in the string. .Sh SEE ALSO .Xr memchr 3 , .Xr memmem 3 , @@ -108,7 +104,8 @@ is not found in the string. .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , -.Xr strtok 3 +.Xr strtok 3 , +.Xr wcschr 3 .Sh STANDARDS The functions .Fn strchr @@ -116,7 +113,11 @@ and .Fn strrchr conform to .St -isoC . -.Pp The .Fn strchrnul -function first appeared in glibc 2.1.1 +is a GNU extension . +.Sh History +The +.Fn strchrnul +function first appeared in glibc 2.1.1 and was added in +.Fx 10.0 . diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c index ee33662442..5456a21c2a 100644 --- a/lib/libc/string/strchr.c +++ b/lib/libc/string/strchr.c @@ -1,2 +1,51 @@ -#define STRCHR -#include "index.c" +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)index.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/string/strchr.c 251069 2013-05-28 20:57:40Z emaste $ + */ + +#include +#include + +char * +strchr(const char *p, int ch) +{ + char c; + + c = ch; + for (;; ++p) { + if (*p == c) + return ((char *)p); + if (*p == '\0') + return (NULL); + } + /* NOTREACHED */ +} + +__weak_reference(strchr, index); diff --git a/lib/libc/string/strchrnul.c b/lib/libc/string/strchrnul.c index a1a6719327..eaf765c68a 100644 --- a/lib/libc/string/strchrnul.c +++ b/lib/libc/string/strchrnul.c @@ -23,13 +23,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strchrnul.c,v 1.1 2013/02/14 01:18:03 svnexp Exp $ + * $FreeBSD: head/lib/libc/string/strchrnul.c 246766 2013-02-13 15:46:33Z zeising $ */ +#include #include +__weak_reference(__strchrnul, strchrnul); + char * -strchrnul(const char *p, int ch) +__strchrnul(const char *p, int ch) { char c; @@ -40,3 +43,4 @@ strchrnul(const char *p, int ch) } /* NOTREACHED */ } + diff --git a/lib/libc/string/strcmp.3 b/lib/libc/string/strcmp.3 index f3e6e854fc..b1a0ee42e2 100644 --- a/lib/libc/string/strcmp.3 +++ b/lib/libc/string/strcmp.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strcmp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strcmp.3,v 1.11 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strcmp.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strcmp.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd October 11, 2001 .Dt STRCMP 3 @@ -76,7 +75,7 @@ The .Fn strcmp and .Fn strncmp -return an integer greater than, equal to, or less than 0, according +functions return an integer greater than, equal to, or less than 0, according as the string .Fa s1 is greater than, equal to, or less than the string @@ -90,7 +89,8 @@ is greater than .Xr memcmp 3 , .Xr strcasecmp 3 , .Xr strcoll 3 , -.Xr strxfrm 3 +.Xr strxfrm 3 , +.Xr wcscmp 3 .Sh STANDARDS The .Fn strcmp diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c index 416ae27036..7b4d818559 100644 --- a/lib/libc/string/strcmp.c +++ b/lib/libc/string/strcmp.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)strcmp.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strcmp.c,v 1.6 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strcmp.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strcmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -43,7 +42,7 @@ int strcmp(const char *s1, const char *s2) { while (*s1 == *s2++) - if (*s1++ == 0) + if (*s1++ == '\0') return (0); return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); } diff --git a/lib/libc/string/strcoll.3 b/lib/libc/string/strcoll.3 index a844eb0288..6c9cfb8c93 100644 --- a/lib/libc/string/strcoll.3 +++ b/lib/libc/string/strcoll.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strcoll.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strcoll.3,v 1.14 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strcoll.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strcoll.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt STRCOLL 3 @@ -45,6 +44,8 @@ .In string.h .Ft int .Fn strcoll "const char *s1" "const char *s2" +.Ft int +.Fn strcoll_l "const char *s1" "const char *s2" "locale_t loc" .Sh DESCRIPTION The .Fn strcoll @@ -55,7 +56,7 @@ and .Fa s2 according to the current locale collation and returns an integer greater than, equal to, or less than 0, -according as +depending on whether .Fa s1 is greater than, equal to, or less than .Fa s2 . @@ -63,6 +64,9 @@ If information about the current locale collation is not available, the value of .Fn strcmp s1 s2 is returned. +The +.Fn strcoll_l +function uses an explicit locale argument rather than the system locale. .Sh SEE ALSO .Xr setlocale 3 , .Xr strcmp 3 , @@ -71,6 +75,9 @@ is returned. .Sh STANDARDS The .Fn strcoll -function -conforms to +function conforms to .St -isoC . +The +.Fn strcoll_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c index 0af8f4a7c6..9749763997 100644 --- a/lib/libc/string/strcoll.c +++ b/lib/libc/string/strcoll.c @@ -3,6 +3,11 @@ * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,29 +29,33 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strcoll.c,v 1.11.2.1 2001/07/09 23:30:06 obrien Exp $ - * $DragonFly: src/lib/libc/string/strcoll.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strcoll.c 228202 2011-12-02 15:41:09Z eadler $ */ #include #include #include "collate.h" +#include + int -strcoll(const char *s, const char *s2) +strcoll_l(const char *s, const char *s2, locale_t locale) { int len, len2, prim, prim2, sec, sec2, ret, ret2; const char *t, *t2; char *tt, *tt2; + FIX_LOCALE(locale); + struct xlocale_collate *table = + (struct xlocale_collate*)locale->components[XLC_COLLATE]; - if (__collate_load_error) + if (table->__collate_load_error) return strcmp(s, s2); len = len2 = 1; ret = ret2 = 0; - if (__collate_substitute_nontrivial) { - t = tt = __collate_substitute(s); - t2 = tt2 = __collate_substitute(s2); + if (table->__collate_substitute_nontrivial) { + t = tt = __collate_substitute(table, s); + t2 = tt2 = __collate_substitute(table, s2); } else { tt = tt2 = NULL; t = s; @@ -55,11 +64,11 @@ strcoll(const char *s, const char *s2) while(*t && *t2) { prim = prim2 = 0; while(*t && !prim) { - __collate_lookup(t, &len, &prim, &sec); + __collate_lookup(table, t, &len, &prim, &sec); t += len; } while(*t2 && !prim2) { - __collate_lookup(t2, &len2, &prim2, &sec2); + __collate_lookup(table, t2, &len2, &prim2, &sec2); t2 += len2; } if(!prim || !prim2) @@ -83,3 +92,10 @@ strcoll(const char *s, const char *s2) return ret; } + +int +strcoll(const char *s, const char *s2) +{ + return strcoll_l(s, s2, __get_locale()); +} + diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3 index 776d980066..02a4b77bcd 100644 --- a/lib/libc/string/strcpy.3 +++ b/lib/libc/string/strcpy.3 @@ -30,22 +30,20 @@ .\" SUCH DAMAGE. .\" .\" @(#)strcpy.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strcpy.3,v 1.26 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strcpy.3,v 1.3 2005/08/05 22:35:10 swildner Exp $ +.\" $FreeBSD: head/lib/libc/string/strcpy.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd January 20, 2012 +.Dd February 28, 2009 .Dt STRCPY 3 .Os .Sh NAME -.Nm strcpy , -.Nm strncpy +.Nm stpcpy, stpncpy, strcpy , strncpy .Nd copy strings .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In string.h .Ft char * -.Fn stpcpy "char *dst" "const char *src" +.Fn stpcpy "char * restrict dst" "const char * restrict src" .Ft char * .Fn stpncpy "char * restrict dst" "const char * restrict src" "size_t len" .Ft char * @@ -109,15 +107,13 @@ character of .Fa dst . If .Fn stpncpy -does not null-terminate +does not terminate .Fa dst -because the length of -.Fa src -was greater than -.Fa len , -then it returns a pointer to -.Li dst[len] , -which may not be valid. +with a +.Dv NUL +character, it instead returns a pointer to +.Li dst[n] +(which does not necessarily refer to a valid memory location.) .Sh EXAMPLES The following sets .Va chararray @@ -178,22 +174,13 @@ Note that because .Xr strlcpy 3 is not defined in any standards, it should only be used when portability is not a concern. -.Sh SECURITY CONSIDERATIONS -The -.Fn strcpy -function is easily misused in a manner which enables malicious users -to arbitrarily change a running program's functionality through a -buffer overflow attack. -(See -the FSA -and -.Sx EXAMPLES . ) .Sh SEE ALSO .Xr bcopy 3 , .Xr memccpy 3 , .Xr memcpy 3 , .Xr memmove 3 , -.Xr strlcpy 3 +.Xr strlcpy 3 , +.Xr wcscpy 3 .Sh STANDARDS The .Fn strcpy @@ -213,8 +200,17 @@ The .Fn stpcpy function first appeared in .Fx 4.4 , -coming from 1998-vintage Linux and .Fn stpncpy -first appeared in -.Dx 2.13 . +was added in +.Fx 8.0 . +.Sh SECURITY CONSIDERATIONS +The +.Fn strcpy +function is easily misused in a manner which enables malicious users +to arbitrarily change a running program's functionality through a +buffer overflow attack. +(See +the FSA +and +.Sx EXAMPLES . ) diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3 index 0dc175a8e8..49e214c80d 100644 --- a/lib/libc/string/strdup.3 +++ b/lib/libc/string/strdup.3 @@ -26,8 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/strdup.3,v 1.13 2008/12/09 09:24:25 maxim Exp $ -.\" $DragonFly: src/lib/libc/string/strdup.3,v 1.5 2004/12/26 12:37:08 swildner Exp $ +.\" $FreeBSD: head/lib/libc/string/strdup.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd December 5, 2008 .Dt STRDUP 3 @@ -70,22 +69,10 @@ characters from the string always .Dv NUL terminating the copied string. -.Sh ERRORS -The -.Nm -function may fail if: -.Bl -tag -width Er -.It Bq Er ENOMEM -No memory could be allocated for the copy of the string. -.El .Sh SEE ALSO .Xr free 3 , -.Xr malloc 3 -.Sh STANDARDS -The -.Nm -function conforms to -.St -p1003.1-2004 . +.Xr malloc 3 , +.Xr wcsdup 3 .Sh HISTORY The .Fn strdup @@ -94,4 +81,4 @@ function first appeared in The .Fn strndup function was added in -.Fx 8.0 . +.Fx 7.2 . diff --git a/lib/libc/string/strdup.c b/lib/libc/string/strdup.c index fddc02a561..14ca1baa19 100644 --- a/lib/libc/string/strdup.c +++ b/lib/libc/string/strdup.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)strdup.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strdup.c,v 1.5 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strdup.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strdup.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index 07675176e9..edfb8176f3 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/strerror.3,v 1.24 2007/01/09 00:28:12 imp Exp $ +.\" $FreeBSD: head/lib/libc/string/strerror.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd October 12, 2004 +.Dd April 5, 2011 .Dt STRERROR 3 .Os .Sh NAME @@ -114,6 +114,9 @@ the range 0 < .Fa errnum < .Fa sys_nerr . +The number 0 is also recognized, although applications that take advantage of +this are likely to use unspecified values of +.Va errno . .Pp If insufficient storage is provided in .Fa strerrbuf @@ -144,6 +147,7 @@ or should be used instead. .Sh SEE ALSO .Xr intro 2 , +.Xr err 3 , .Xr psignal 3 .Sh STANDARDS The @@ -168,12 +172,12 @@ The function was implemented in .Fx 4.4 by -.An Wes Peters Aq Mt wes@FreeBSD.org . +.An Wes Peters Aq wes@FreeBSD.org . .Sh BUGS -For unknown error numbers, the +The .Fn strerror -function will return its result in a static buffer which -may be overwritten by subsequent calls. +function returns its result in a static buffer which +will be overwritten by subsequent calls. .Pp The return type for .Fn strerror diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 75d51b1c0b..55c422f4cc 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -27,7 +27,8 @@ * SUCH DAMAGE. * * @(#)strerror.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strerror.c,v 1.16 2007/01/09 00:28:12 imp Exp $ + * $FreeBSD: head/lib/libc/string/strerror.c 255108 2013-08-31 22:32:42Z jilles $ + * (errlst.h removed) */ #if defined(NLS) @@ -84,7 +85,7 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) catd = catopen("libc", NL_CAT_LOCALE); #endif - if (errnum < 1 || errnum >= sys_nerr) { + if (errnum < 0 || errnum >= sys_nerr) { errstr(errnum, #if defined(NLS) catgets(catd, 1, 0xffff, UPREFIX), diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c index 12a14d78b7..36b68c9b0d 100644 --- a/lib/libc/string/strlcat.c +++ b/lib/libc/string/strlcat.c @@ -1,3 +1,5 @@ +/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ + /* * Copyright (c) 1998 Todd C. Miller * @@ -13,9 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ - * $FreeBSD: src/lib/libc/string/strlcat.c,v 1.11 2009/01/12 06:09:34 delphij Exp $ - * $DragonFly: src/lib/libc/string/strlcat.c,v 1.4 2004/12/18 21:37:43 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strlcat.c 189133 2009-02-28 05:15:02Z das $ */ #include @@ -29,7 +29,7 @@ * If retval >= siz, truncation occurred. */ size_t -strlcat(char *dst, const char *src, size_t siz) +strlcat(char * __restrict dst, const char * __restrict src, size_t siz) { char *d = dst; const char *s = src; diff --git a/lib/libc/string/strlcpy.3 b/lib/libc/string/strlcpy.3 index 9932fded37..cbe0041e3b 100644 --- a/lib/libc/string/strlcpy.3 +++ b/lib/libc/string/strlcpy.3 @@ -25,8 +25,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/strlcpy.3,v 1.14 2009/01/12 06:10:48 delphij Exp $ -.\" $DragonFly: src/lib/libc/string/strlcpy.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strlcpy.3 235286 2012-05-11 20:06:46Z gjb $ .\" .Dd June 22, 1998 .Dt STRLCPY 3 @@ -40,9 +39,9 @@ .Sh SYNOPSIS .In string.h .Ft size_t -.Fn strlcpy "char *dst" "const char *src" "size_t size" +.Fn strlcpy "char * restrict dst" "const char * restrict src" "size_t size" .Ft size_t -.Fn strlcat "char *dst" "const char *src" "size_t size" +.Fn strlcat "char * restrict dst" "const char * restrict src" "size_t size" .Sh DESCRIPTION The .Fn strlcpy @@ -170,7 +169,7 @@ if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname)) .Ed .Pp Since it is known how many characters were copied the first time, things -can be sped up a bit by using a copy instead of an append +can be sped up a bit by using a copy instead of an append. .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; @@ -193,7 +192,8 @@ As a matter of fact, the first version of this manual page got it wrong. .Sh SEE ALSO .Xr snprintf 3 , .Xr strncat 3 , -.Xr strncpy 3 +.Xr strncpy 3 , +.Xr wcslcpy 3 .Sh HISTORY The .Fn strlcpy diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c index b5ada2d7fe..b101921f2c 100644 --- a/lib/libc/string/strlcpy.c +++ b/lib/libc/string/strlcpy.c @@ -1,3 +1,5 @@ +/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ + /* * Copyright (c) 1998 Todd C. Miller * @@ -13,9 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ - * $FreeBSD: src/lib/libc/string/strlcpy.c,v 1.10 2008/10/19 10:11:35 delphij Exp $ - * $DragonFly: src/lib/libc/string/strlcpy.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strlcpy.c 189133 2009-02-28 05:15:02Z das $ */ #include @@ -27,7 +27,7 @@ * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t -strlcpy(char *dst, const char *src, size_t siz) +strlcpy(char * __restrict dst, const char * __restrict src, size_t siz) { char *d = dst; const char *s = src; diff --git a/lib/libc/string/strncmp.c b/lib/libc/string/strncmp.c index ef192c6f5a..f78d808b0d 100644 --- a/lib/libc/string/strncmp.c +++ b/lib/libc/string/strncmp.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)strncmp.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strncmp.c,v 1.6 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strncmp.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strncmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -43,7 +42,7 @@ strncmp(const char *s1, const char *s2, size_t n) if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); - if (*s1++ == 0) + if (*s1++ == '\0') break; } while (--n != 0); return (0); diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c index 1de3b47648..b93663fcad 100644 --- a/lib/libc/string/strncpy.c +++ b/lib/libc/string/strncpy.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)strncpy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strncpy.c,v 1.7 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strncpy.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strncpy.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -48,10 +47,10 @@ strncpy(char * __restrict dst, const char * __restrict src, size_t n) const char *s = src; do { - if ((*d++ = *s++) == 0) { + if ((*d++ = *s++) == '\0') { /* NUL pad the remaining n-1 bytes */ while (--n != 0) - *d++ = 0; + *d++ = '\0'; break; } } while (--n != 0); diff --git a/lib/libc/string/strndup.c b/lib/libc/string/strndup.c index ce3fd821de..a8927b3a71 100644 --- a/lib/libc/string/strndup.c +++ b/lib/libc/string/strndup.c @@ -1,3 +1,5 @@ +/* $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ */ + /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -26,8 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ - * $FreeBSD: src/lib/libc/string/strndup.c,v 1.1 2008/12/06 09:37:54 kib Exp $ + * $FreeBSD: head/lib/libc/string/strndup.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -40,9 +41,7 @@ strndup(const char *str, size_t n) size_t len; char *copy; - for (len = 0; len < n && str[len]; len++) - continue; - + len = strnlen(str, n); if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); diff --git a/lib/libc/string/strnlen.c b/lib/libc/string/strnlen.c index aa62b6508c..5a37588c0c 100644 --- a/lib/libc/string/strnlen.c +++ b/lib/libc/string/strnlen.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strnlen.c,v 1.1 2009/02/28 06:00:58 das Exp $ + * $FreeBSD: head/lib/libc/string/strnlen.c 189136 2009-02-28 06:00:58Z das $ */ #include diff --git a/lib/libc/string/strnstr.c b/lib/libc/string/strnstr.c index cc8d7b061a..280cb0b890 100644 --- a/lib/libc/string/strnstr.c +++ b/lib/libc/string/strnstr.c @@ -31,11 +31,9 @@ * SUCH DAMAGE. * * @(#)strstr.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strnstr.c,v 1.4 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strnstr.c,v 1.4 2006/03/20 17:24:20 dillon Exp $ + * $FreeBSD: head/lib/libc/string/strnstr.c 251069 2013-05-28 20:57:40Z emaste $ */ -#include #include /* @@ -52,15 +50,13 @@ strnstr(const char *s, const char *find, size_t slen) len = strlen(find); do { do { - if (slen < 1 || (sc = *s) == '\0') + if (slen-- < 1 || (sc = *s++) == '\0') return (NULL); - --slen; - ++s; } while (sc != c); if (len > slen) return (NULL); } while (strncmp(s, find, len) != 0); s--; } - return (__DECONST(char *, s)); + return ((char *)s); } diff --git a/lib/libc/string/strpbrk.3 b/lib/libc/string/strpbrk.3 index 37dd436e0a..3ce98bdedb 100644 --- a/lib/libc/string/strpbrk.3 +++ b/lib/libc/string/strpbrk.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strpbrk.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strpbrk.3,v 1.8 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strpbrk.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strpbrk.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt STRPBRK 3 @@ -68,7 +67,8 @@ returns NULL. .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , -.Xr strtok 3 +.Xr strtok 3 , +.Xr wcspbrk 3 .Sh STANDARDS The .Fn strpbrk diff --git a/lib/libc/string/strpbrk.c b/lib/libc/string/strpbrk.c index c4636272c3..d0fe2f1d2a 100644 --- a/lib/libc/string/strpbrk.c +++ b/lib/libc/string/strpbrk.c @@ -27,11 +27,9 @@ * SUCH DAMAGE. * * @(#)strpbrk.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strpbrk.c,v 1.5 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strpbrk.c,v 1.5 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strpbrk.c 251069 2013-05-28 20:57:40Z emaste $ */ -#include #include /* @@ -44,9 +42,9 @@ strpbrk(const char *s1, const char *s2) int c, sc; while ((c = *s1++) != 0) { - for (scanp = s2; (sc = *scanp++) != 0;) + for (scanp = s2; (sc = *scanp++) != '\0';) if (sc == c) - return (__DECONST(char *, s1 - 1)); + return ((char *)(s1 - 1)); } return (NULL); } diff --git a/lib/libc/string/strrchr.c b/lib/libc/string/strrchr.c index 8fcf3a19f2..fbf6486896 100644 --- a/lib/libc/string/strrchr.c +++ b/lib/libc/string/strrchr.c @@ -1,2 +1,52 @@ -#define STRRCHR -#include "rindex.c" +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)rindex.c 8.1 (Berkeley) 6/4/93 + * $FreeBSD: head/lib/libc/string/strrchr.c 251069 2013-05-28 20:57:40Z emaste $ + */ + +#include +#include + +char * +strrchr(const char *p, int ch) +{ + char *save; + char c; + + c = ch; + for (save = NULL;; ++p) { + if (*p == c) + save = (char *)p; + if (*p == '\0') + return (save); + } + /* NOTREACHED */ +} + +__weak_reference(strrchr, rindex); diff --git a/lib/libc/string/strsep.3 b/lib/libc/string/strsep.3 index ebac119287..98508295bd 100644 --- a/lib/libc/string/strsep.3 +++ b/lib/libc/string/strsep.3 @@ -29,8 +29,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strsep.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/strsep.3,v 1.16 2008/12/05 15:50:59 pjd Exp $ -.\" $DragonFly: src/lib/libc/string/strsep.3,v 1.2 2003/06/17 04:26:46 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strsep.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd December 5, 2008 .Dt STRSEP 3 diff --git a/lib/libc/string/strsep.c b/lib/libc/string/strsep.c index ec65280c97..613ffc0dbb 100644 --- a/lib/libc/string/strsep.c +++ b/lib/libc/string/strsep.c @@ -27,8 +27,7 @@ * SUCH DAMAGE. * * @(#)strsep.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strsep.c,v 1.6 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strsep.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strsep.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/strsignal.c b/lib/libc/string/strsignal.c index 6c25fc2db9..a928e2ba26 100644 --- a/lib/libc/string/strsignal.c +++ b/lib/libc/string/strsignal.c @@ -27,26 +27,67 @@ * SUCH DAMAGE. * * @(#)strerror.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strsignal.c,v 1.8 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strsignal.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strsignal.c 251069 2013-05-28 20:57:40Z emaste $ */ +#include "namespace.h" #if defined(NLS) #include #endif - #include #include +#include #include #include +#include "reentrant.h" +#include "un-namespace.h" #define UPREFIX "Unknown signal" +static char sig_ebuf[NL_TEXTMAX]; +static char sig_ebuf_err[NL_TEXTMAX]; +static once_t sig_init_once = ONCE_INITIALIZER; +static thread_key_t sig_key; +static int sig_keycreated = 0; + +static void +sig_keycreate(void) +{ + sig_keycreated = (thr_keycreate(&sig_key, free) == 0); +} + +static char * +sig_tlsalloc(void) +{ + char *ebuf = NULL; + + if (thr_main() != 0) + ebuf = sig_ebuf; + else { + if (thr_once(&sig_init_once, sig_keycreate) != 0 || + !sig_keycreated) + goto thr_err; + if ((ebuf = thr_getspecific(sig_key)) == NULL) { + if ((ebuf = malloc(sizeof(sig_ebuf))) == NULL) + goto thr_err; + if (thr_setspecific(sig_key, ebuf) != 0) { + free(ebuf); + ebuf = NULL; + goto thr_err; + } + } + } +thr_err: + if (ebuf == NULL) + ebuf = sig_ebuf_err; + return (ebuf); +} + /* XXX: negative 'num' ? (REGR) */ char * strsignal(int num) { - static char ebuf[NL_TEXTMAX]; + char *ebuf; char tmp[20]; size_t n; int signum; @@ -58,6 +99,8 @@ strsignal(int num) catd = catopen("libc", NL_CAT_LOCALE); #endif + ebuf = sig_tlsalloc(); + if (num > 0 && num < sys_nsig) { n = strlcpy(ebuf, #if defined(NLS) @@ -65,7 +108,7 @@ strsignal(int num) #else sys_siglist[num], #endif - sizeof(ebuf)); + sizeof(sig_ebuf)); } else { n = strlcpy(ebuf, #if defined(NLS) @@ -73,30 +116,30 @@ strsignal(int num) #else UPREFIX, #endif - sizeof(ebuf)); - } + sizeof(sig_ebuf)); - signum = num; - if (num < 0) - signum = -signum; + signum = num; + if (num < 0) + signum = -signum; - t = tmp; - do { - *t++ = "0123456789"[signum % 10]; - } while (signum /= 10); - if (num < 0) - *t++ = '-'; + t = tmp; + do { + *t++ = "0123456789"[signum % 10]; + } while (signum /= 10); + if (num < 0) + *t++ = '-'; - p = (ebuf + n); - *p++ = ':'; - *p++ = ' '; + p = (ebuf + n); + *p++ = ':'; + *p++ = ' '; - for (;;) { - *p++ = *--t; - if (t <= tmp) - break; + for (;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + *p = '\0'; } - *p = '\0'; #if defined(NLS) catclose(catd); diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3 index c008a20436..6d9c43d58f 100644 --- a/lib/libc/string/strstr.3 +++ b/lib/libc/string/strstr.3 @@ -31,16 +31,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)strstr.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strstr.3,v 1.14 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strstr.3,v 1.5 2005/08/05 22:35:10 swildner Exp $ +.\" $FreeBSD: head/lib/libc/string/strstr.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd October 11, 2001 .Dt STRSTR 3 .Os .Sh NAME -.Nm strstr , -.Nm strcasestr , -.Nm strnstr +.Nm strstr , strcasestr , strnstr .Nd locate a substring in a string .Sh LIBRARY .Lb libc @@ -52,6 +49,10 @@ .Fn strcasestr "const char *big" "const char *little" .Ft char * .Fn strnstr "const char *big" "const char *little" "size_t len" +.In string.h +.In xlocale.h +.Ft char * +.Fn strcasestr_l "const char *big" "const char *little" "locale_t loc" .Sh DESCRIPTION The .Fn strstr @@ -68,6 +69,12 @@ function is similar to but ignores the case of both strings. .Pp The +.Fn strcasestr_l +function does the same as +.Fn strcasestr +but takes an explicit locale rather than using the current locale. +.Pp +The .Fn strnstr function locates the first occurrence of the null-terminated string @@ -84,8 +91,6 @@ Since the .Fn strnstr function is a .Fx -/ -.Dx specific API, it should only be used when portability is not a concern. .Sh RETURN VALUES If @@ -140,7 +145,8 @@ ptr = strnstr(largestring, smallstring, 4); .Xr strrchr 3 , .Xr strsep 3 , .Xr strspn 3 , -.Xr strtok 3 +.Xr strtok 3 , +.Xr wcsstr 3 .Sh STANDARDS The .Fn strstr diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c index 975531d80d..689cc514ad 100644 --- a/lib/libc/string/strstr.c +++ b/lib/libc/string/strstr.c @@ -30,11 +30,9 @@ * SUCH DAMAGE. * * @(#)strstr.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strstr.c,v 1.5 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/strstr.c,v 1.4 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/string/strstr.c 251069 2013-05-28 20:57:40Z emaste $ */ -#include #include /* @@ -46,15 +44,15 @@ strstr(const char *s, const char *find) char c, sc; size_t len; - if ((c = *find++) != 0) { + if ((c = *find++) != '\0') { len = strlen(find); do { do { - if ((sc = *s++) == 0) + if ((sc = *s++) == '\0') return (NULL); } while (sc != c); } while (strncmp(s, find, len) != 0); s--; } - return (__DECONST(char *, s)); + return ((char *)s); } diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3 index 33ca31cfab..a813e23798 100644 --- a/lib/libc/string/strtok.3 +++ b/lib/libc/string/strtok.3 @@ -22,7 +22,7 @@ .\" disclaimer in the documentation and/or other materials provided .\" with the distribution. .\" -.\" 4. Neither the name of Softweyr LLC, the University nor the names +.\" 3. Neither the name of Softweyr LLC, the University nor the names .\" of its contributors may be used to endorse or promote products .\" derived from this software without specific prior written .\" permission. @@ -42,14 +42,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)strtok.3 8.2 (Berkeley) 2/3/94 -.\" $FreeBSD: src/lib/libc/string/strtok.3,v 1.26 2007/12/12 18:33:06 wes Exp $ +.\" $FreeBSD: head/lib/libc/string/strtok.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd November 27, 1998 .Dt STRTOK 3 .Os .Sh NAME -.Nm strtok , -.Nm strtok_r +.Nm strtok , strtok_r .Nd string tokens .Sh LIBRARY .Lb libc @@ -151,8 +150,9 @@ function conforms to .St -isoC . .Sh AUTHORS -.An Wes Peters Aq Mt wes@softweyr.com , -Softweyr LLC +.An Wes Peters , +Softweyr LLC: +.Aq wes@softweyr.com .Pp Based on the .Fx 3.0 diff --git a/lib/libc/string/strtok.c b/lib/libc/string/strtok.c index 0d976d2724..e698fc688a 100644 --- a/lib/libc/string/strtok.c +++ b/lib/libc/string/strtok.c @@ -32,8 +32,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @(#)strtok.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/strtok.c,v 1.10 2007/12/12 18:33:06 wes Exp $ - * $DragonFly: src/lib/libc/string/strtok.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/string/strtok.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -49,9 +48,8 @@ __weak_reference(__strtok_r, strtok_r); char * __strtok_r(char *s, const char *delim, char **last) { - const char *spanp; + char *spanp, *tok; int c, sc; - char *tok; if (s == NULL && (s = *last) == NULL) return (NULL); @@ -61,7 +59,7 @@ __strtok_r(char *s, const char *delim, char **last) */ cont: c = *s++; - for (spanp = delim; (sc = *spanp++) != 0;) { + for (spanp = (char *)delim; (sc = *spanp++) != 0;) { if (c == sc) goto cont; } @@ -78,7 +76,7 @@ cont: */ for (;;) { c = *s++; - spanp = delim; + spanp = (char *)delim; do { if ((sc = *spanp++) == c) { if (c == 0) diff --git a/lib/libc/string/strxfrm.3 b/lib/libc/string/strxfrm.3 index 62373839de..7bbd247fed 100644 --- a/lib/libc/string/strxfrm.3 +++ b/lib/libc/string/strxfrm.3 @@ -30,8 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strxfrm.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/strxfrm.3,v 1.18 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/strxfrm.3,v 1.2 2003/06/17 04:26:47 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/strxfrm.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd June 4, 1993 .Dt STRXFRM 3 @@ -45,6 +44,8 @@ .In string.h .Ft size_t .Fn strxfrm "char * restrict dst" "const char * restrict src" "size_t n" +.Ft size_t +.Fn strxfrm_l "char * restrict dst" "const char *restrict src" "size_t n" "locale_t loc" .Sh DESCRIPTION The .Fn strxfrm @@ -74,10 +75,16 @@ after is equal to comparing two original strings with .Fn strcoll . +.Pp +.Fn strxfrm_l +does the same, however takes an explicit locale rather than the global +locale. .Sh RETURN VALUES Upon successful completion, .Fn strxfrm -returns the length of the transformed string not including +and +.Fn strxfrm_l +return the length of the transformed string not including the terminating null character. If this value is .Fa n @@ -95,3 +102,7 @@ The function conforms to .St -isoC . +The +.Fn strxfrm_l +function conforms to +.St -p1003.1-2008 . diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c index fecf7fa37d..41fa27e21c 100644 --- a/lib/libc/string/strxfrm.c +++ b/lib/libc/string/strxfrm.c @@ -3,6 +3,11 @@ * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,20 +29,30 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/strxfrm.c,v 1.17 2008/10/19 09:10:44 delphij Exp $ - * $DragonFly: src/lib/libc/string/strxfrm.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/strxfrm.c 227753 2011-11-20 14:45:42Z theraven $ */ #include #include #include "collate.h" +size_t +strxfrm_l(char * __restrict dest, const char * __restrict src, size_t len, locale_t loc); size_t strxfrm(char * __restrict dest, const char * __restrict src, size_t len) +{ + return strxfrm_l(dest, src, len, __get_locale()); +} + +size_t +strxfrm_l(char * __restrict dest, const char * __restrict src, size_t len, locale_t locale) { int prim, sec, l; size_t slen; char *s, *ss; + FIX_LOCALE(locale); + struct xlocale_collate *table = + (struct xlocale_collate*)locale->components[XLC_COLLATE]; if (!*src) { if (len > 0) @@ -45,15 +60,15 @@ strxfrm(char * __restrict dest, const char * __restrict src, size_t len) return 0; } - if (__collate_load_error) + if (table->__collate_load_error) return strlcpy(dest, src, len); slen = 0; prim = sec = 0; - ss = s = __collate_substitute(src); + ss = s = __collate_substitute(table, src); while (*s) { while (*s && !prim) { - __collate_lookup(s, &l, &prim, &sec); + __collate_lookup(table, s, &l, &prim, &sec); s += l; } if (prim) { diff --git a/lib/libc/string/swab.3 b/lib/libc/string/swab.3 index 6e6e9015b2..75da712055 100644 --- a/lib/libc/string/swab.3 +++ b/lib/libc/string/swab.3 @@ -26,10 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)swab.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.10 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/swab.3,v 1.2 2003/06/17 04:26:47 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/swab.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd December 10, 2004 +.Dd March 4, 2012 .Dt SWAB 3 .Os .Sh NAME @@ -55,6 +54,9 @@ swapping adjacent bytes. The argument .Fa len must be an even number. +If +.Fa len +is less than zero, nothing will be done. .Sh SEE ALSO .Xr bzero 3 , .Xr memset 3 diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c index 2a65664ebe..2bb7dfd411 100644 --- a/lib/libc/string/swab.c +++ b/lib/libc/string/swab.c @@ -30,8 +30,7 @@ * SUCH DAMAGE. * * @(#)swab.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/swab.c,v 1.7 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/swab.c,v 1.4 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/swab.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -43,6 +42,8 @@ swab(const void * __restrict from, void * __restrict to, ssize_t len) int n; char *fp, *tp; + if (len <= 0) + return; n = len >> 1; fp = (char *)from; tp = (char *)to; diff --git a/lib/libc/string/stpcpy.c b/lib/libc/string/wcpcpy.c similarity index 91% copy from lib/libc/string/stpcpy.c copy to lib/libc/string/wcpcpy.c index f1dc4baf12..72a068b539 100644 --- a/lib/libc/string/stpcpy.c +++ b/lib/libc/string/wcpcpy.c @@ -29,13 +29,13 @@ * SUCH DAMAGE. * * @(#)strcpy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/stpcpy.c,v 1.1 2002/10/03 19:39:20 obrien Exp $ + * $FreeBSD: head/lib/libc/string/wcpcpy.c 199096 2009-11-09 18:50:34Z jhb $ */ -#include +#include -char * -stpcpy(char *to, const char *from) +wchar_t * +wcpcpy(wchar_t * __restrict to, const wchar_t * __restrict from) { for (; (*to = *from); ++from, ++to); diff --git a/lib/libc/string/stpncpy.c b/lib/libc/string/wcpncpy.c similarity index 84% copy from lib/libc/string/stpncpy.c copy to lib/libc/string/wcpncpy.c index b509c8fc2f..33fa17b76d 100644 --- a/lib/libc/string/stpncpy.c +++ b/lib/libc/string/wcpncpy.c @@ -23,20 +23,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/stpncpy.c, SVN Rev. 189136 $ + * $FreeBSD: head/lib/libc/string/wcpncpy.c 199096 2009-11-09 18:50:34Z jhb $ */ -#include +#include -char * -stpncpy(char * __restrict dst, const char * __restrict src, size_t len) +wchar_t * +wcpncpy(wchar_t * __restrict dst, const wchar_t * __restrict src, size_t n) { - for (; len--; dst++, src++) { + for (; n--; dst++, src++) { if (!(*dst = *src)) { - char *ret = dst; - while (len--) - *++dst = '\0'; + wchar_t *ret = dst; + while (n--) + *++dst = L'\0'; return (ret); } } diff --git a/lib/libc/string/wcscasecmp.c b/lib/libc/string/wcscasecmp.c index 1f5630d96e..34095813fa 100644 --- a/lib/libc/string/wcscasecmp.c +++ b/lib/libc/string/wcscasecmp.c @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/string/wcscasecmp.c 189136 2009-02-28 06:00:58Z das $ */ #include diff --git a/lib/libc/string/wcscat.c b/lib/libc/string/wcscat.c index 127002fbd9..2c9dd72a2e 100644 --- a/lib/libc/string/wcscat.c +++ b/lib/libc/string/wcscat.c @@ -24,9 +24,7 @@ * SUCH DAMAGE. * * citrus Id: wcscat.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * $NetBSD: wcscat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcscat.c,v 1.8 2002/09/26 09:28:55 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcscat.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcscat.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcschr.c b/lib/libc/string/wcschr.c index 85c3fa697c..d28b3fd889 100644 --- a/lib/libc/string/wcschr.c +++ b/lib/libc/string/wcschr.c @@ -23,11 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcschr.c,v 1.3.2.2 2002/11/12 11:34:34 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcschr.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/string/wcschr.c 105785 2002-10-23 10:47:47Z tjr $ */ -#include #include wchar_t * @@ -37,6 +35,6 @@ wcschr(const wchar_t *s, wchar_t c) while (*s != c && *s != L'\0') s++; if (*s == c) - return (__DECONST(wchar_t *, s)); + return ((wchar_t *)s); return (NULL); } diff --git a/lib/libc/string/wcscmp.c b/lib/libc/string/wcscmp.c index 32e3034f8d..a568517a9b 100644 --- a/lib/libc/string/wcscmp.c +++ b/lib/libc/string/wcscmp.c @@ -30,9 +30,7 @@ * SUCH DAMAGE. * * @(#)strcmp.c 8.1 (Berkeley) 6/4/93 - * $NetBSD: wcscmp.c,v 1.3 2001/01/05 12:13:12 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcscmp.c,v 1.8 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/wcscmp.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcscmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include @@ -45,7 +43,7 @@ wcscmp(const wchar_t *s1, const wchar_t *s2) { while (*s1 == *s2++) - if (*s1++ == 0) + if (*s1++ == '\0') return (0); /* XXX assumes wchar_t = int */ return (*(const unsigned int *)s1 - *(const unsigned int *)--s2); diff --git a/lib/libc/string/wcscoll.3 b/lib/libc/string/wcscoll.3 index d905789756..0cecb79cc8 100644 --- a/lib/libc/string/wcscoll.3 +++ b/lib/libc/string/wcscoll.3 @@ -31,7 +31,7 @@ .\" .\" @(#)strcoll.3 8.1 (Berkeley) 6/4/93 .\" FreeBSD: src/lib/libc/string/strcoll.3,v 1.11 2001/10/01 16:09:00 ru Exp -.\" $FreeBSD: src/lib/libc/string/wcscoll.3,v 1.3 2007/01/09 00:28:12 imp Exp $ +.\" $FreeBSD: head/lib/libc/string/wcscoll.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd October 4, 2002 .Dt WCSCOLL 3 diff --git a/lib/libc/string/wcscoll.c b/lib/libc/string/wcscoll.c index 93329c869c..9907e282ca 100644 --- a/lib/libc/string/wcscoll.c +++ b/lib/libc/string/wcscoll.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcscoll.c,v 1.3 2004/04/07 09:47:56 tjr Exp $ + * $FreeBSD: head/lib/libc/string/wcscoll.c 227753 2011-11-20 14:45:42Z theraven $ */ #include @@ -40,12 +45,15 @@ static char *__mbsdup(const wchar_t *); * with extended character sets. */ int -wcscoll(const wchar_t *ws1, const wchar_t *ws2) +wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t locale) { char *mbs1, *mbs2; int diff, sverrno; + FIX_LOCALE(locale); + struct xlocale_collate *table = + (struct xlocale_collate*)locale->components[XLC_COLLATE]; - if (__collate_load_error || MB_CUR_MAX > 1) + if (table->__collate_load_error || MB_CUR_MAX > 1) /* * Locale has no special collating order, could not be * loaded, or has an extended character set; do a fast binary @@ -66,7 +74,7 @@ wcscoll(const wchar_t *ws1, const wchar_t *ws2) return (wcscmp(ws1, ws2)); } - diff = strcoll(mbs1, mbs2); + diff = strcoll_l(mbs1, mbs2, locale); sverrno = errno; free(mbs1); free(mbs2); @@ -75,6 +83,12 @@ wcscoll(const wchar_t *ws1, const wchar_t *ws2) return (diff); } +int +wcscoll(const wchar_t *ws1, const wchar_t *ws2) +{ + return wcscoll_l(ws1, ws2, __get_locale()); +} + static char * __mbsdup(const wchar_t *ws) { diff --git a/lib/libc/string/wcscpy.c b/lib/libc/string/wcscpy.c index 09ef18243c..23f2224d0d 100644 --- a/lib/libc/string/wcscpy.c +++ b/lib/libc/string/wcscpy.c @@ -24,10 +24,7 @@ * SUCH DAMAGE. * * citrus Id: wcscpy.c,v 1.2 2000/12/21 04:51:09 itojun Exp - * - * $NetBSD: wcscpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcscpy.c,v 1.8 2002/09/26 09:23:07 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcscpy.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcscpy.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcscspn.c b/lib/libc/string/wcscspn.c index 4fbc29b69b..4aa0a37562 100644 --- a/lib/libc/string/wcscspn.c +++ b/lib/libc/string/wcscspn.c @@ -24,10 +24,7 @@ * SUCH DAMAGE. * * citrus Id: wcscspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcscspn.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcscspn.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcscspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcscspn.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcsdup.c b/lib/libc/string/wcsdup.c index a8fb551307..8c8d54ad8c 100644 --- a/lib/libc/string/wcsdup.c +++ b/lib/libc/string/wcsdup.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsdup.c,v 1.1 2005/08/13 05:54:33 tjr Exp $ + * $FreeBSD: head/lib/libc/string/wcsdup.c 149011 2005-08-13 05:54:33Z tjr $ */ #include diff --git a/lib/libc/string/wcslcat.c b/lib/libc/string/wcslcat.c index 8ce3efc598..40249c448f 100644 --- a/lib/libc/string/wcslcat.c +++ b/lib/libc/string/wcslcat.c @@ -24,10 +24,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: strlcat.c,v 1.3 2000/11/24 11:10:02 itojun Exp $ - * $NetBSD: wcslcat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcslcat.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcslcat.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * from OpenBSD: strlcat.c,v 1.3 2000/11/24 11:10:02 itojun Exp + * $FreeBSD: head/lib/libc/string/wcslcat.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcslcpy.c b/lib/libc/string/wcslcpy.c index a567f72105..65c80c62eb 100644 --- a/lib/libc/string/wcslcpy.c +++ b/lib/libc/string/wcslcpy.c @@ -24,10 +24,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ - * $NetBSD: wcslcpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcslcpy.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcslcpy.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp + * $FreeBSD: head/lib/libc/string/wcslcpy.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcslen.c b/lib/libc/string/wcslen.c index 3a23812cce..cb40123273 100644 --- a/lib/libc/string/wcslen.c +++ b/lib/libc/string/wcslen.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * $NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcslen.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcslen.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp + * $FreeBSD: head/lib/libc/string/wcslen.c 188080 2009-02-03 17:58:20Z danger $ */ #include @@ -40,5 +38,5 @@ wcslen(const wchar_t *s) while (*p) p++; - return (p - s); + return p - s; } diff --git a/lib/libc/string/wcsncasecmp.c b/lib/libc/string/wcsncasecmp.c index 820068dddb..61bb4c7ad6 100644 --- a/lib/libc/string/wcsncasecmp.c +++ b/lib/libc/string/wcsncasecmp.c @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/lib/libc/string/wcsncasecmp.c 189136 2009-02-28 06:00:58Z das $ */ #include diff --git a/lib/libc/string/wcsncat.c b/lib/libc/string/wcsncat.c index 0535b73478..df4a3480d5 100644 --- a/lib/libc/string/wcsncat.c +++ b/lib/libc/string/wcsncat.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcsncat.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * $NetBSD: wcsncat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsncat.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsncat.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wcsncat.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp + * $FreeBSD: head/lib/libc/string/wcsncat.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcsncmp.c b/lib/libc/string/wcsncmp.c index 0a2e79691a..8637fe140b 100644 --- a/lib/libc/string/wcsncmp.c +++ b/lib/libc/string/wcsncmp.c @@ -26,10 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)strncmp.c 8.1 (Berkeley) 6/4/93 - * $NetBSD: wcsncmp.c,v 1.3 2001/01/05 12:13:13 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsncmp.c,v 1.8 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/wcsncmp.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcsncmp.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/wcsncpy.c b/lib/libc/string/wcsncpy.c index d745a12274..c46cc5fd74 100644 --- a/lib/libc/string/wcsncpy.c +++ b/lib/libc/string/wcsncpy.c @@ -29,9 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)strncpy.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/wcsncpy.c,v 1.10 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/wcsncpy.c,v 1.2 2003/06/17 04:26:47 dillon Exp $ + * $FreeBSD: head/lib/libc/string/wcsncpy.c 251069 2013-05-28 20:57:40Z emaste $ */ #include diff --git a/lib/libc/string/wcsnlen.c b/lib/libc/string/wcsnlen.c index 1cb7cde03c..8b62ad267c 100644 --- a/lib/libc/string/wcsnlen.c +++ b/lib/libc/string/wcsnlen.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsnlen.c,v 1.1 2009/02/28 06:00:58 das Exp $ + * $FreeBSD: head/lib/libc/string/wcsnlen.c 189136 2009-02-28 06:00:58Z das $ */ #include diff --git a/lib/libc/string/wcspbrk.c b/lib/libc/string/wcspbrk.c index dfcdd79d33..aae3c77b3e 100644 --- a/lib/libc/string/wcspbrk.c +++ b/lib/libc/string/wcspbrk.c @@ -23,13 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wcspbrk.c,v 1.2 2000/12/21 05:07:25 itojun Exp - * $NetBSD: wcspbrk.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcspbrk.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcspbrk.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * citrus Id: wcspbrk.c,v 1.2 2000/12/21 05:07:25 itojun Exp + * $FreeBSD: head/lib/libc/string/wcspbrk.c 188080 2009-02-03 17:58:20Z danger $ */ -#include #include wchar_t * @@ -44,7 +41,7 @@ wcspbrk(const wchar_t *s, const wchar_t *set) while (*q) { if (*p == *q) { /* LINTED interface specification */ - return(__DECONST(wchar_t *, p)); + return (wchar_t *)p; } q++; } diff --git a/lib/libc/string/wcsrchr.c b/lib/libc/string/wcsrchr.c index 741a018257..43d14e812c 100644 --- a/lib/libc/string/wcsrchr.c +++ b/lib/libc/string/wcsrchr.c @@ -23,11 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcsrchr.c,v 1.7 2002/10/23 10:52:04 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsrchr.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/string/wcsrchr.c 105786 2002-10-23 10:52:04Z tjr $ */ -#include #include wchar_t * @@ -44,5 +42,5 @@ wcsrchr(const wchar_t *s, wchar_t c) s++; } - return (__DECONST(wchar_t *, last)); + return ((wchar_t *)last); } diff --git a/lib/libc/string/wcsspn.c b/lib/libc/string/wcsspn.c index e6f8bbb0dc..e57371d83e 100644 --- a/lib/libc/string/wcsspn.c +++ b/lib/libc/string/wcsspn.c @@ -24,10 +24,7 @@ * SUCH DAMAGE. * * citrus Id: wcsspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp - * - * $NetBSD: wcsspn.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wcsspn.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wcsspn.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * $FreeBSD: head/lib/libc/string/wcsspn.c 188080 2009-02-03 17:58:20Z danger $ */ #include diff --git a/lib/libc/string/wcsstr.c b/lib/libc/string/wcsstr.c index db40e9d71e..6a5f5cf289 100644 --- a/lib/libc/string/wcsstr.c +++ b/lib/libc/string/wcsstr.c @@ -30,11 +30,9 @@ * SUCH DAMAGE. * * @(#)strstr.c 8.1 (Berkeley) 6/4/93 - * $FreeBSD: src/lib/libc/string/wcsstr.c,v 1.9 2007/01/09 00:28:12 imp Exp $ - * $DragonFly: src/lib/libc/string/wcsstr.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * $FreeBSD: head/lib/libc/string/wcsstr.c 251069 2013-05-28 20:57:40Z emaste $ */ -#include #include /* @@ -46,7 +44,7 @@ wcsstr(const wchar_t * __restrict s, const wchar_t * __restrict find) wchar_t c, sc; size_t len; - if ((c = *find++) != 0) { + if ((c = *find++) != L'\0') { len = wcslen(find); do { do { @@ -56,5 +54,5 @@ wcsstr(const wchar_t * __restrict s, const wchar_t * __restrict find) } while (wcsncmp(s, find, len) != 0); s--; } - return (__DECONST(wchar_t *, s)); + return ((wchar_t *)s); } diff --git a/lib/libc/string/wcstok.3 b/lib/libc/string/wcstok.3 index 4ddfb040e0..7b199b164e 100644 --- a/lib/libc/string/wcstok.3 +++ b/lib/libc/string/wcstok.3 @@ -47,7 +47,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp $ +.\" $FreeBSD: head/lib/libc/string/wcstok.3 105148 2002-10-15 09:49:54Z tjr $ .\" .Dd October 3, 2002 .Dt WCSTOK 3 diff --git a/lib/libc/string/wcstok.c b/lib/libc/string/wcstok.c index 2854b36938..1154e1f388 100644 --- a/lib/libc/string/wcstok.c +++ b/lib/libc/string/wcstok.c @@ -31,14 +31,14 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcstok.c,v 1.3 2007/12/12 18:33:06 wes Exp $ + * $FreeBSD: head/lib/libc/string/wcstok.c 251069 2013-05-28 20:57:40Z emaste $ */ #include wchar_t * wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim, - wchar_t ** __restrict last) + wchar_t ** __restrict last) { const wchar_t *spanp; wchar_t *tok; diff --git a/lib/libc/string/wcswidth.3 b/lib/libc/string/wcswidth.3 index 94573d7bfc..a1f049fec4 100644 --- a/lib/libc/string/wcswidth.3 +++ b/lib/libc/string/wcswidth.3 @@ -22,10 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/string/wcswidth.3,v 1.2 2002/12/09 14:04:05 ru Exp $ -.\" $DragonFly: src/lib/libc/string/wcswidth.3,v 1.1 2008/05/31 04:51:55 swildner Exp $ +.\" $FreeBSD: head/lib/libc/string/wcswidth.3 107706 2002-12-09 14:04:05Z ru $ .\" -.Dd May 30, 2008 +.Dd August 20, 2002 .Dt WCSWIDTH 3 .Os .Sh NAME diff --git a/lib/libc/string/wcswidth.c b/lib/libc/string/wcswidth.c index 7aff8211a1..06d1816916 100644 --- a/lib/libc/string/wcswidth.c +++ b/lib/libc/string/wcswidth.c @@ -10,6 +10,11 @@ * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,22 +39,30 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/string/wcswidth.c,v 1.7 2007/01/09 00:28:12 imp Exp $ + * $FreeBSD: head/lib/libc/string/wcswidth.c 251069 2013-05-28 20:57:40Z emaste $ */ #include +#include "xlocale_private.h" int -wcswidth(const wchar_t *pwcs, size_t n) +wcswidth_l(const wchar_t *pwcs, size_t n, locale_t locale) { wchar_t wc; int len, l; + FIX_LOCALE(locale); len = 0; while (n-- > 0 && (wc = *pwcs++) != L'\0') { - if ((l = wcwidth(wc)) < 0) + if ((l = wcwidth_l(wc, locale)) < 0) return (-1); len += l; } return (len); } + +int +wcswidth(const wchar_t *pwcs, size_t n) +{ + return wcswidth_l(pwcs, n, __get_locale()); +} diff --git a/lib/libc/string/wcsxfrm.3 b/lib/libc/string/wcsxfrm.3 index 48081be2f4..c69281d820 100644 --- a/lib/libc/string/wcsxfrm.3 +++ b/lib/libc/string/wcsxfrm.3 @@ -31,7 +31,7 @@ .\" .\" @(#)strxfrm.3 8.1 (Berkeley) 6/4/93 .\" FreeBSD: src/lib/libc/string/strxfrm.3,v 1.16 2002/09/06 11:24:06 tjr Exp -.\" $FreeBSD: src/lib/libc/string/wcsxfrm.3,v 1.3 2007/01/09 00:28:12 imp Exp $ +.\" $FreeBSD: head/lib/libc/string/wcsxfrm.3 251069 2013-05-28 20:57:40Z emaste $ .\" .Dd October 4, 2002 .Dt WCSXFRM 3 diff --git a/lib/libc/string/wcsxfrm.c b/lib/libc/string/wcsxfrm.c index f2def4f12a..61ba3f8575 100644 --- a/lib/libc/string/wcsxfrm.c +++ b/lib/libc/string/wcsxfrm.c @@ -3,6 +3,11 @@ * at Electronni Visti IA, Kiev, Ukraine. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * FreeBSD: src/lib/libc/string/strxfrm.c,v 1.15 2002/09/06 11:24:06 tjr Exp - * $FreeBSD: src/lib/libc/string/wcsxfrm.c,v 1.3 2004/04/07 09:47:56 tjr Exp $ + * $FreeBSD: head/lib/libc/string/wcsxfrm.c 227753 2011-11-20 14:45:42Z theraven $ */ #include @@ -40,11 +44,14 @@ static char *__mbsdup(const wchar_t *); * the logic used. */ size_t -wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) +wcsxfrm_l(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len, locale_t locale) { int prim, sec, l; size_t slen; char *mbsrc, *s, *ss; + FIX_LOCALE(locale); + struct xlocale_collate *table = + (struct xlocale_collate*)locale->components[XLC_COLLATE]; if (*src == L'\0') { if (len != 0) @@ -52,7 +59,7 @@ wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) return (0); } - if (__collate_load_error || MB_CUR_MAX > 1) { + if (table->__collate_load_error || MB_CUR_MAX > 1) { slen = wcslen(src); if (len > 0) { if (slen < len) @@ -68,10 +75,10 @@ wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) mbsrc = __mbsdup(src); slen = 0; prim = sec = 0; - ss = s = __collate_substitute(mbsrc); + ss = s = __collate_substitute(table, mbsrc); while (*s != '\0') { while (*s != '\0' && prim == 0) { - __collate_lookup(s, &l, &prim, &sec); + __collate_lookup(table, s, &l, &prim, &sec); s += l; } if (prim != 0) { @@ -90,6 +97,11 @@ wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) return (slen); } +size_t +wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) +{ + return wcsxfrm_l(dest, src, len, __get_locale()); +} static char * __mbsdup(const wchar_t *ws) diff --git a/lib/libc/string/wmemchr.3 b/lib/libc/string/wmemchr.3 index baad4e6ebc..5ec5336fce 100644 --- a/lib/libc/string/wmemchr.3 +++ b/lib/libc/string/wmemchr.3 @@ -33,10 +33,9 @@ .\" .\" from: @(#)strcpy.3 8.1 (Berkeley) 6/4/93 .\" -.\" $FreeBSD: src/lib/libc/string/wmemchr.3,v 1.8 2007/01/09 00:28:12 imp Exp $ -.\" $DragonFly: src/lib/libc/string/wmemchr.3,v 1.2 2003/06/17 04:26:47 dillon Exp $ +.\" $FreeBSD: head/lib/libc/string/wmemchr.3 251069 2013-05-28 20:57:40Z emaste $ .\" -.Dd November 21, 2011 +.Dd March 4, 2009 .Dt WMEMCHR 3 .Os .Sh NAME @@ -45,6 +44,8 @@ .Nm wmemcpy , .Nm wmemmove , .Nm wmemset , +.Nm wcpcpy , +.Nm wcpncpy , .Nm wcscasecmp , .Nm wcscat , .Nm wcschr , @@ -79,6 +80,10 @@ .Fn wmemmove "wchar_t *s1" "const wchar_t *s2" "size_t n" .Ft wchar_t * .Fn wmemset "wchar_t *s" "wchar_t c" "size_t n" +.Ft wchar_t * +.Fn wcpcpy "wchar_t *s1" "wchar_t *s2" +.Ft wchar_t * +.Fn wcpncpy "wchar_t *s1" "wchar_t *s2" "size_t n" .Ft int .Fn wcscasecmp "const wchar_t *s1" "const wchar_t *s2" .Ft wchar_t * @@ -130,6 +135,7 @@ counterpart, such as .Xr memmove 3 , .Xr memset 3 , .Xr stpcpy 3 , +.Xr stpncpy 3 , .Xr strcasecmp 3 , .Xr strcat 3 , .Xr strchr 3 , @@ -152,6 +158,8 @@ counterpart, such as These functions conform to .St -isoC-99 , with the exception of +.Fn wcpcpy , +.Fn wcpncpy , .Fn wcscasecmp , .Fn wcsdup , .Fn wcsncasecmp , diff --git a/lib/libc/string/wmemchr.c b/lib/libc/string/wmemchr.c index 5e1d15aae6..7f0f9d1e3f 100644 --- a/lib/libc/string/wmemchr.c +++ b/lib/libc/string/wmemchr.c @@ -23,13 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemchr.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemchr.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemchr.c,v 1.3 2005/04/28 13:25:12 joerg Exp $ + * citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp + * $FreeBSD: head/lib/libc/string/wmemchr.c 188080 2009-02-03 17:58:20Z danger $ */ -#include #include wchar_t * @@ -40,9 +37,9 @@ wmemchr(const wchar_t *s, wchar_t c, size_t n) for (i = 0; i < n; i++) { if (*s == c) { /* LINTED const castaway */ - return(__DECONST(wchar_t *, s)); + return (wchar_t *)s; } s++; } - return (NULL); + return NULL; } diff --git a/lib/libc/string/wmemcmp.c b/lib/libc/string/wmemcmp.c index 788425cf90..2452a60407 100644 --- a/lib/libc/string/wmemcmp.c +++ b/lib/libc/string/wmemcmp.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemcmp.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemcmp.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemcmp.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp + * $FreeBSD: head/lib/libc/string/wmemcmp.c 188080 2009-02-03 17:58:20Z danger $ */ #include @@ -39,10 +37,10 @@ wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) for (i = 0; i < n; i++) { if (*s1 != *s2) { /* wchar might be unsigned */ - return (*s1 > *s2 ? 1 : -1); + return *s1 > *s2 ? 1 : -1; } s1++; s2++; } - return (0); + return 0; } diff --git a/lib/libc/string/wmemcpy.c b/lib/libc/string/wmemcpy.c index 30c714bdca..0e81c2192a 100644 --- a/lib/libc/string/wmemcpy.c +++ b/lib/libc/string/wmemcpy.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemcpy.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemcpy.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemcpy.c,v 1.7 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemcpy.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wmemcpy.c,v 1.2 2000/12/20 14:08:31 itojun Exp + * $FreeBSD: head/lib/libc/string/wmemcpy.c 188080 2009-02-03 17:58:20Z danger $ */ #include @@ -35,6 +33,5 @@ wchar_t * wmemcpy(wchar_t * __restrict d, const wchar_t * __restrict s, size_t n) { - return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t)); } diff --git a/lib/libc/string/wmemmove.c b/lib/libc/string/wmemmove.c index ff65453e06..b3039dcc5b 100644 --- a/lib/libc/string/wmemmove.c +++ b/lib/libc/string/wmemmove.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemmove.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemmove.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemmove.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemmove.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wmemmove.c,v 1.2 2000/12/20 14:08:31 itojun Exp + * $FreeBSD: head/lib/libc/string/wmemmove.c 188080 2009-02-03 17:58:20Z danger $ */ #include @@ -35,6 +33,5 @@ wchar_t * wmemmove(wchar_t *d, const wchar_t *s, size_t n) { - return (wchar_t *)memmove(d, s, n * sizeof(wchar_t)); } diff --git a/lib/libc/string/wmemset.c b/lib/libc/string/wmemset.c index d43b75b0a7..53b8f7244e 100644 --- a/lib/libc/string/wmemset.c +++ b/lib/libc/string/wmemset.c @@ -23,10 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp - * $NetBSD: wmemset.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ - * $FreeBSD: src/lib/libc/string/wmemset.c,v 1.6 2002/09/21 00:29:23 tjr Exp $ - * $DragonFly: src/lib/libc/string/wmemset.c,v 1.3 2005/09/18 16:32:34 asmodai Exp $ + * citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp + * $FreeBSD: head/lib/libc/string/wmemset.c 188098 2009-02-03 20:25:36Z imp $ */ #include diff --git a/lib/libcompat/4.3/re_comp.3 b/lib/libcompat/4.3/re_comp.3 index 99eeb15ae5..1880a9fe11 100644 --- a/lib/libcompat/4.3/re_comp.3 +++ b/lib/libcompat/4.3/re_comp.3 @@ -101,15 +101,10 @@ returns \-1 for an internal error. The .Fn re_comp function -returns one of the following strings if an error occurs: -.Bd -unfilled -offset indent -No previous regular expression, -Regular expression too long, -unmatched \e(, -missing ], -too many \e(\e) pairs, -unmatched \e). -.Ed +returns +.Dq no previous regular expression +or one of the strings generated by +.Xr regerror 3 . .Sh SEE ALSO .Xr ed 1 , .Xr egrep 1 , diff --git a/lib/libcompat/4.3/regex.c b/lib/libcompat/4.3/re_comp.c similarity index 72% rename from lib/libcompat/4.3/regex.c rename to lib/libcompat/4.3/re_comp.c index 6b09cd9502..19bb2d6e8f 100644 --- a/lib/libcompat/4.3/regex.c +++ b/lib/libcompat/4.3/re_comp.c @@ -13,10 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -34,6 +30,7 @@ * SUCH DAMAGE. * * @(#)regex.c 5.1 (Berkeley) 3/29/92 + * $FreeBSD: head/lib/libcompat/4.3/re_comp.c 205146 2010-03-14 10:18:58Z ed $ */ /* @@ -43,48 +40,49 @@ * but most programs should be fine. */ -#include +#include #include -#include -#include -#include +#include -static regexp *re_regexp; -static int re_goterr; -static char *re_errstr; +static regex_t re_regexp; +static int re_gotexp; +static char re_errstr[100]; char * -re_comp(char *s) +re_comp(const char *s) { + int rc; + if (s == NULL || *s == '\0') { - if (re_regexp == NULL) - return "no previous regular expression"; + if (!re_gotexp) + return __DECONST(char *, + "no previous regular expression"); return (NULL); } - if (re_regexp) - free(re_regexp); - if (re_errstr) - free(re_errstr); - re_goterr = 0; - re_regexp = regcomp(s); - return (re_goterr ? re_errstr : NULL); + + if (re_gotexp) { + regfree(&re_regexp); + re_gotexp = 0; + } + + rc = regcomp(&re_regexp, s, REG_EXTENDED); + if (rc == 0) { + re_gotexp = 1; + return (NULL); + } + + regerror(rc, &re_regexp, re_errstr, sizeof(re_errstr)); + re_errstr[sizeof(re_errstr) - 1] = '\0'; + return (re_errstr); } int -re_exec(char *s) +re_exec(const char *s) { int rc; - re_goterr = 0; - rc = regexec(re_regexp, s); - return (re_goterr ? -1 : rc); -} - -void -regerror(const char *s) -{ - re_goterr = 1; - if (re_errstr) - free(re_errstr); - re_errstr = strdup(s); + if (!re_gotexp) + return (-1); + rc = regexec(&re_regexp, s, 0, NULL, 0); + return (rc == 0 ? 1 : 0); } diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile index 601c490e33..9bf7d351b7 100644 --- a/lib/libcompat/Makefile +++ b/lib/libcompat/Makefile @@ -7,13 +7,9 @@ CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH} NOPIC= WARNS?= 0 -.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \ - ${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \ - ${.CURDIR}/4.4/${MACHINE_ARCH} ${.CURDIR}/4.4 \ - ${.CURDIR}/regexp +.PATH: ${.CURDIR}/4.1 ${.CURDIR}/4.3 ${.CURDIR}/4.4 # compat 4.1 sources -# XXX MISSING: tell.c SRCS+= ascftime.c cftime.c ftime.c getpw.c gtty.c stty.c MAN+= 4.1/ftime.3 4.1/getpw.3 4.1/stty.3 @@ -23,15 +19,11 @@ MLINKS+=stty.3 gtty.3 MLINKS+=cftime.3 ascftime.3 # compat 4.3 sources -# XXX MISSING: ecvt.c gcvt.c sibuf.c sobuf.c strout.c -SRCS+= cfree.c regex.c rexec.c +SRCS+= cfree.c re_comp.c rexec.c SRCS+= insque.c remque.c -# XXX MISSING: ecvt.0 MAN+= 4.3/cfree.3 4.3/insque.3 4.3/re_comp.3 4.3/rexec.3 -# XXX MISSING: ecvt.3, so can't MLINK -#MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 MLINKS+=insque.3 remque.3 MLINKS+=re_comp.3 re_exec.3 @@ -39,13 +31,4 @@ MLINKS+=re_comp.3 re_exec.3 SRCS+= cuserid.c MAN+= 4.4/cuserid.3 -# regexp sources -SRCS+= regerror.c regexp.c regsub.c - -MAN+= regexp/regexp.3 - -# XXX name clash with libc -# MLINKS+=regexp.3 regcomp.3 regexp.3 regexec.3 regexp.3 regerror.3 -MLINKS+=regexp.3 regsub.3 - .include diff --git a/lib/libcompat/regexp/COPYRIGHT b/lib/libcompat/regexp/COPYRIGHT deleted file mode 100644 index 48b3f43391..0000000000 --- a/lib/libcompat/regexp/COPYRIGHT +++ /dev/null @@ -1,22 +0,0 @@ -This entire subtree is copyright the University of Toronto. -The following copyright notice applies to all files found here. None of -these files contain AT&T proprietary source code. -_____________________________________________________________________________ - - Copyright (c) 1986 by University of Toronto. - Written by Henry Spencer. Not derived from licensed software. - - Permission is granted to anyone to use this software for any - purpose on any computer system, and to redistribute it freely, - subject to the following restrictions: - - 1. The author is not responsible for the consequences of use of - this software, no matter how awful, even if they arise - from defects in it. - - 2. The origin of this software must not be misrepresented, either - by explicit claim or by omission. - - 3. Altered versions must be plainly marked as such, and must not - be misrepresented as being the original software. - diff --git a/lib/libcompat/regexp/README b/lib/libcompat/regexp/README deleted file mode 100644 index 37d6f51c71..0000000000 --- a/lib/libcompat/regexp/README +++ /dev/null @@ -1,84 +0,0 @@ -This is a nearly-public-domain reimplementation of the V8 regexp(3) package. -It gives C programs the ability to use egrep-style regular expressions, and -does it in a much cleaner fashion than the analogous routines in SysV. - - Copyright (c) 1986 by University of Toronto. - Written by Henry Spencer. Not derived from licensed software. - - Permission is granted to anyone to use this software for any - purpose on any computer system, and to redistribute it freely, - subject to the following restrictions: - - 1. The author is not responsible for the consequences of use of - this software, no matter how awful, even if they arise - from defects in it. - - 2. The origin of this software must not be misrepresented, either - by explicit claim or by omission. - - 3. Altered versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -Barring a couple of small items in the BUGS list, this implementation is -believed 100% compatible with V8. It should even be binary-compatible, -sort of, since the only fields in a "struct regexp" that other people have -any business touching are declared in exactly the same way at the same -location in the struct (the beginning). - -This implementation is *NOT* AT&T/Bell code, and is not derived from licensed -software. Even though U of T is a V8 licensee. This software is based on -a V8 manual page sent to me by Dennis Ritchie (the manual page enclosed -here is a complete rewrite and hence is not covered by AT&T copyright). -The software was nearly complete at the time of arrival of our V8 tape. -I haven't even looked at V8 yet, although a friend elsewhere at U of T has -been kind enough to run a few test programs using the V8 regexp(3) to resolve -a few fine points. I admit to some familiarity with regular-expression -implementations of the past, but the only one that this code traces any -ancestry to is the one published in Kernighan & Plauger (from which this -one draws ideas but not code). - -Simplistically: put this stuff into a source directory, copy regexp.h into -/usr/include, inspect Makefile for compilation options that need changing -to suit your local environment, and then do "make r". This compiles the -regexp(3) functions, compiles a test program, and runs a large set of -regression tests. If there are no complaints, then put regexp.o, regsub.o, -and regerror.o into your C library, and regexp.3 into your manual-pages -directory. - -Note that if you don't put regexp.h into /usr/include *before* compiling, -you'll have to add "-I." to CFLAGS before compiling. - -The files are: - -Makefile instructions to make everything -regexp.3 manual page -regexp.h header file, for /usr/include -regexp.c source for regcomp() and regexec() -regsub.c source for regsub() -regerror.c source for default regerror() -regmagic.h internal header file -try.c source for test program -timer.c source for timing program -tests test list for try and timer - -This implementation uses nondeterministic automata rather than the -deterministic ones found in some other implementations, which makes it -simpler, smaller, and faster at compiling regular expressions, but slower -at executing them. In theory, anyway. This implementation does employ -some special-case optimizations to make the simpler cases (which do make -up the bulk of regular expressions actually used) run quickly. In general, -if you want blazing speed you're in the wrong place. Replacing the insides -of egrep with this stuff is probably a mistake; if you want your own egrep -you're going to have to do a lot more work. But if you want to use regular -expressions a little bit in something else, you're in luck. Note that many -existing text editors use nondeterministic regular-expression implementations, -so you're in good company. - -This stuff should be pretty portable, given appropriate option settings. -If your chars have less than 8 bits, you're going to have to change the -internal representation of the automaton, although knowledge of the details -of this is fairly localized. There are no "reserved" char values except for -NUL, and no special significance is attached to the top bit of chars. -The string(3) functions are used a fair bit, on the grounds that they are -probably faster than coding the operations in line. Some attempts at code -tuning have been made, but this is invariably a bit machine-specific. diff --git a/lib/libcompat/regexp/regerror.c b/lib/libcompat/regexp/regerror.c deleted file mode 100644 index d16e5d8c9d..0000000000 --- a/lib/libcompat/regexp/regerror.c +++ /dev/null @@ -1,19 +0,0 @@ -/* $DragonFly: src/lib/libcompat/regexp/regerror.c,v 1.2 2008/09/30 16:57:04 swildner Exp $ */ - -#include -#include - -void -regerror(const char *s) -{ -#ifdef ERRAVAIL - error("regexp: %s", s); -#else -/* - fprintf(stderr, "regexp(3): %s\n", s); - exit(1); -*/ - return; /* let std. egrep handle errors */ -#endif - /* NOTREACHED */ -} diff --git a/lib/libcompat/regexp/regexp.3 b/lib/libcompat/regexp/regexp.3 deleted file mode 100644 index ddc2fd7a05..0000000000 --- a/lib/libcompat/regexp/regexp.3 +++ /dev/null @@ -1,320 +0,0 @@ -.\" Copyright (c) 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)regexp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libcompat/regexp/regexp.3,v 1.6.2.2 2001/12/17 10:08:29 ru Exp $ -.\" $DragonFly: src/lib/libcompat/regexp/regexp.3,v 1.3 2006/04/08 08:17:06 swildner Exp $ -.\" -.Dd June 4, 1993 -.Dt REGEXP 3 -.Os -.Sh NAME -.Nm regcomp , -.Nm regexec , -.Nm regsub , -.Nm regerror -.Nd regular expression handlers -.Sh LIBRARY -.Lb libcompat -.Sh SYNOPSIS -.In regexp.h -.Ft regexp * -.Fn regcomp "const char *exp" -.Ft int -.Fn regexec "const regexp *prog" "const char *string" -.Ft void -.Fn regsub "const regexp *prog" "const char *source" "char *dest" -.Sh DESCRIPTION -.Bf Sy -This interface is made obsolete by -.Xr regex 3 . -.Ef -.Pp -The -.Fn regcomp , -.Fn regexec , -.Fn regsub , -and -.Fn regerror -functions -implement -.Xr egrep 1 Ns -style -regular expressions and supporting facilities. -.Pp -The -.Fn regcomp -function -compiles a regular expression into a structure of type -.Vt regexp , -and returns a pointer to it. -The space has been allocated using -.Xr malloc 3 -and may be released by -.Xr free 3 . -.Pp -The -.Fn regexec -function -matches a -.Dv NUL Ns -terminated -.Fa string -against the compiled regular expression -in -.Fa prog . -It returns 1 for success and 0 for failure, and adjusts the contents of -.Fa prog Ns 's -.Em startp -and -.Em endp -(see below) accordingly. -.Pp -The members of a -.Vt regexp -structure include at least the following (not necessarily in order): -.Bd -literal -offset indent -char *startp[NSUBEXP]; -char *endp[NSUBEXP]; -.Ed -.Pp -where -.Dv NSUBEXP -is defined (as 10) in the header file. -Once a successful -.Fn regexec -has been done using the -.Fn regexp , -each -.Em startp Ns - Em endp -pair describes one substring -within the -.Fa string , -with the -.Em startp -pointing to the first character of the substring and -the -.Em endp -pointing to the first character following the substring. -The 0th substring is the substring of -.Fa string -that matched the whole -regular expression. -The others are those substrings that matched parenthesized expressions -within the regular expression, with parenthesized expressions numbered -in left-to-right order of their opening parentheses. -.Pp -The -.Fn regsub -function -copies -.Fa source -to -.Fa dest , -making substitutions according to the -most recent -.Fn regexec -performed using -.Fa prog . -Each instance of `&' in -.Fa source -is replaced by the substring -indicated by -.Em startp Ns Bq -and -.Em endp Ns Bq . -Each instance of -.Sq \e Ns Em n , -where -.Em n -is a digit, is replaced by -the substring indicated by -.Em startp Ns Bq Em n -and -.Em endp Ns Bq Em n . -To get a literal `&' or -.Sq \e Ns Em n -into -.Fa dest , -prefix it with `\e'; -to get a literal `\e' preceding `&' or -.Sq \e Ns Em n , -prefix it with -another `\e'. -.Pp -The -.Fn regerror -function -is called whenever an error is detected in -.Fn regcomp , -.Fn regexec , -or -.Fn regsub . -The default -.Fn regerror -writes the string -.Fa msg , -with a suitable indicator of origin, -on the standard -error output -and invokes -.Xr exit 3 . -The -.Fn regerror -function -can be replaced by the user if other actions are desirable. -.Sh REGULAR EXPRESSION SYNTAX -A regular expression is zero or more -.Em branches , -separated by `|'. -It matches anything that matches one of the branches. -.Pp -A branch is zero or more -.Em pieces , -concatenated. -It matches a match for the first, followed by a match for the second, etc. -.Pp -A piece is an -.Em atom -possibly followed by `*', `+', or `?'. -An atom followed by `*' matches a sequence of 0 or more matches of the atom. -An atom followed by `+' matches a sequence of 1 or more matches of the atom. -An atom followed by `?' matches a match of the atom, or the null string. -.Pp -An atom is a regular expression in parentheses (matching a match for the -regular expression), a -.Em range -(see below), `.' -(matching any single character), `^' (matching the null string at the -beginning of the input string), `$' (matching the null string at the -end of the input string), a `\e' followed by a single character (matching -that character), or a single character with no other significance -(matching that character). -.Pp -A -.Em range -is a sequence of characters enclosed in `[]'. -It normally matches any single character from the sequence. -If the sequence begins with `^', -it matches any single character -.Em not -from the rest of the sequence. -If two characters in the sequence are separated by `\-', this is shorthand -for the full list of -.Tn ASCII -characters between them -(e.g. `[0-9]' matches any decimal digit). -To include a literal `]' in the sequence, make it the first character -(following a possible `^'). -To include a literal `\-', make it the first or last character. -.Sh AMBIGUITY -If a regular expression could match two different parts of the input string, -it will match the one which begins earliest. -If both begin in the same place but match different lengths, or match -the same length in different ways, life gets messier, as follows. -.Pp -In general, the possibilities in a list of branches are considered in -left-to-right order, the possibilities for `*', `+', and `?' are -considered longest-first, nested constructs are considered from the -outermost in, and concatenated constructs are considered leftmost-first. -The match that will be chosen is the one that uses the earliest -possibility in the first choice that has to be made. -If there is more than one choice, the next will be made in the same manner -(earliest possibility) subject to the decision on the first choice. -And so forth. -.Pp -For example, -.Sq Li (ab|a)b*c -could match -`abc' in one of two ways. -The first choice is between `ab' and `a'; since `ab' is earlier, and does -lead to a successful overall match, it is chosen. -Since the `b' is already spoken for, -the `b*' must match its last possibility\(emthe empty string\(emsince -it must respect the earlier choice. -.Pp -In the particular case where no `|'s are present and there is only one -`*', `+', or `?', the net effect is that the longest possible -match will be chosen. -So -.Sq Li ab* , -presented with `xabbbby', will match `abbbb'. -Note that if -.Sq Li ab* , -is tried against `xabyabbbz', it -will match `ab' just after `x', due to the begins-earliest rule. -(In effect, the decision on where to start the match is the first choice -to be made, hence subsequent choices must respect it even if this leads them -to less-preferred alternatives.) -.Sh RETURN VALUES -The -.Fn regcomp -function -returns -.Dv NULL -for a failure -.Pf ( Fn regerror -permitting), -where failures are syntax errors, exceeding implementation limits, -or applying `+' or `*' to a possibly-null operand. -.Sh SEE ALSO -.Xr ed 1 , -.Xr egrep 1 , -.Xr ex 1 , -.Xr expr 1 , -.Xr fgrep 1 , -.Xr grep 1 , -.Xr regex 3 -.Sh HISTORY -Both code and manual page for -.Fn regcomp , -.Fn regexec , -.Fn regsub , -and -.Fn regerror -were written at the University of Toronto -and appeared in -.Bx 4.3 tahoe . -They are intended to be compatible with the Bell V8 -.Xr regexp 3 , -but are not derived from Bell code. -.Sh BUGS -Empty branches and empty regular expressions are not portable to V8. -.Pp -The restriction against -applying `*' or `+' to a possibly-null operand is an artifact of the -simplistic implementation. -.Pp -Does not support -.Xr egrep 1 Ns 's -newline-separated branches; -neither does the V8 -.Xr regexp 3 , -though. -.Pp -Due to emphasis on -compactness and simplicity, -it's not strikingly fast. -It does give special attention to handling simple cases quickly. diff --git a/lib/libcompat/regexp/regexp.c b/lib/libcompat/regexp/regexp.c deleted file mode 100644 index 16b9af83b4..0000000000 --- a/lib/libcompat/regexp/regexp.c +++ /dev/null @@ -1,1308 +0,0 @@ -/* - * regcomp and regexec -- regsub and regerror are elsewhere - * - * Copyright (c) 1986 by University of Toronto. - * Written by Henry Spencer. Not derived from licensed software. - * - * Permission is granted to anyone to use this software for any - * purpose on any computer system, and to redistribute it freely, - * subject to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of - * this software, no matter how awful, even if they arise - * from defects in it. - * - * 2. The origin of this software must not be misrepresented, either - * by explicit claim or by omission. - * - * 3. Altered versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, - *** hoptoad!gnu, on 27 Dec 1986, to add \n as an alternative to | - *** to assist in implementing egrep. - *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, - *** hoptoad!gnu, on 27 Dec 1986, to add \< and \> for word-matching - *** as in BSD grep and ex. - *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, - *** hoptoad!gnu, on 28 Dec 1986, to optimize characters quoted with \. - *** THIS IS AN ALTERED VERSION. It was altered by James A. Woods, - *** ames!jaw, on 19 June 1987, to quash a regcomp() redundancy. - * - * Beware that some of this code is subtly aware of the way operator - * precedence is structured in regular expressions. Serious changes in - * regular-expression syntax might require a total rethink. - */ -#include -#include -#include -#include -#include -#include -#include "collate.h" -#include "regmagic.h" - -/* - * The "internal use only" fields in regexp.h are present to pass info from - * compile to execute that permits the execute phase to run lots faster on - * simple cases. They are: - * - * regstart char that must begin a match; '\0' if none obvious - * reganch is the match anchored (at beginning-of-line only)? - * regmust string (pointer into program) that match must include, or NULL - * regmlen length of regmust string - * - * Regstart and reganch permit very fast decisions on suitable starting points - * for a match, cutting down the work a lot. Regmust permits fast rejection - * of lines that cannot possibly match. The regmust tests are costly enough - * that regcomp() supplies a regmust only if the r.e. contains something - * potentially expensive (at present, the only such thing detected is * or + - * at the start of the r.e., which can involve a lot of backup). Regmlen is - * supplied because the test in regexec() needs it and regcomp() is computing - * it anyway. - */ - -/* - * Structure for regexp "program". This is essentially a linear encoding - * of a nondeterministic finite-state machine (aka syntax charts or - * "railroad normal form" in parsing technology). Each node is an opcode - * plus a "next" pointer, possibly plus an operand. "Next" pointers of - * all nodes except BRANCH implement concatenation; a "next" pointer with - * a BRANCH on both ends of it is connecting two alternatives. (Here we - * have one of the subtle syntax dependencies: an individual BRANCH (as - * opposed to a collection of them) is never concatenated with anything - * because of operator precedence.) The operand of some types of node is - * a literal string; for others, it is a node leading into a sub-FSM. In - * particular, the operand of a BRANCH node is the first node of the branch. - * (NB this is *not* a tree structure: the tail of the branch connects - * to the thing following the set of BRANCHes.) The opcodes are: - */ - -/* definition number opnd? meaning */ -#define END 0 /* no End of program. */ -#define BOL 1 /* no Match "" at beginning of line. */ -#define EOL 2 /* no Match "" at end of line. */ -#define ANY 3 /* no Match any one character. */ -#define ANYOF 4 /* str Match any character in this string. */ -#define ANYBUT 5 /* str Match any character not in this string. */ -#define BRANCH 6 /* node Match this alternative, or the next... */ -#define BACK 7 /* no Match "", "next" ptr points backward. */ -#define EXACTLY 8 /* str Match this string. */ -#define NOTHING 9 /* no Match empty string. */ -#define STAR 10 /* node Match this (simple) thing 0 or more times. */ -#define PLUS 11 /* node Match this (simple) thing 1 or more times. */ -#define WORDA 12 /* no Match "" at wordchar, where prev is nonword */ -#define WORDZ 13 /* no Match "" at nonwordchar, where prev is word */ -#define OPEN 20 /* no Mark this point in input as start of #n. */ - /* OPEN+1 is number 1, etc. */ -#define CLOSE 30 /* no Analogous to OPEN. */ - -/* - * Opcode notes: - * - * BRANCH The set of branches constituting a single choice are hooked - * together with their "next" pointers, since precedence prevents - * anything being concatenated to any individual branch. The - * "next" pointer of the last BRANCH in a choice points to the - * thing following the whole choice. This is also where the - * final "next" pointer of each individual branch points; each - * branch starts with the operand node of a BRANCH node. - * - * BACK Normal "next" pointers all implicitly point forward; BACK - * exists to make loop structures possible. - * - * STAR,PLUS '?', and complex '*' and '+', are implemented as circular - * BRANCH structures using BACK. Simple cases (one character - * per match) are implemented with STAR and PLUS for speed - * and to minimize recursive plunges. - * - * OPEN,CLOSE ...are numbered at compile time. - */ - -/* - * A node is one char of opcode followed by two chars of "next" pointer. - * "Next" pointers are stored as two 8-bit pieces, high order first. The - * value is a positive offset from the opcode of the node containing it. - * An operand, if any, simply follows the node. (Note that much of the - * code generation knows about this implicit relationship.) - * - * Using two bytes for the "next" pointer is vast overkill for most things, - * but allows patterns to get big without disasters. - */ -#define OP(p) (*(p)) -#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) -#define OPERAND(p) ((p) + 3) - -/* - * See regmagic.h for one further detail of program structure. - */ - - -/* - * Utility definitions. - */ -#ifndef CHARBITS -#define UCHARAT(p) ((int)*(unsigned char *)(p)) -#else -#define UCHARAT(p) ((int)*(p)&CHARBITS) -#endif - -#define FAIL(m) { regerror(m); return(NULL); } -#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') - -/* - * Flags to be passed up and down. - */ -#define HASWIDTH 01 /* Known never to match null string. */ -#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ -#define SPSTART 04 /* Starts with * or +. */ -#define WORST 0 /* Worst case. */ - -/* - * Global work variables for regcomp(). - */ -static char *regparse; /* Input-scan pointer. */ -static int regnpar; /* () count. */ -static char regdummy; -static char *regcode; /* Code-emit pointer; ®dummy = don't. */ -static long regsize; /* Code size. */ - -/* - * Forward declarations for regcomp()'s friends. - */ -#ifndef STATIC -#define STATIC static -#endif -STATIC char *reg(int, int *); -STATIC char *regbranch(int *); -STATIC char *regpiece(int *); -STATIC char *regatom(int *); -STATIC char *regnode(char); -STATIC char *regnext(char *); -STATIC void regc(char); -STATIC void reginsert(char, char *); -STATIC void regtail(char *, char *); -STATIC void regoptail(char *, char *); -#ifdef STRCSPN -STATIC int strcspn(char *, char *); -#endif - -/* - - regcomp - compile a regular expression into internal code - * - * We can't allocate space until we know how big the compiled form will be, - * but we can't compile it (and thus know how big it is) until we've got a - * place to put the code. So we cheat: we compile it twice, once with code - * generation turned off and size counting turned on, and once "for real". - * This also means that we don't allocate space until we are sure that the - * thing really will compile successfully, and we never have to move the - * code and thus invalidate pointers into it. (Note that it has to be in - * one piece because free() must be able to free it all.) - * - * Beware that the optimization-preparation code in here knows about some - * of the structure of the compiled regexp. - */ -regexp * -regcomp(const char *exp) -{ - regexp *r; - char *scan; - char *longest; - int len; - int flags; - - if (exp == NULL) - FAIL("NULL argument"); - - /* First pass: determine size, legality. */ -#ifdef notdef - if (exp[0] == '.' && exp[1] == '*') exp += 2; /* aid grep */ -#endif - regparse = (char *)exp; - regnpar = 1; - regsize = 0L; - regcode = ®dummy; - regc(MAGIC); - if (reg(0, &flags) == NULL) - return(NULL); - - /* Small enough for pointer-storage convention? */ - if (regsize >= 32767L) /* Probably could be 65535L. */ - FAIL("regexp too big"); - - /* Allocate space. */ - r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize); - if (r == NULL) - FAIL("out of space"); - - /* Second pass: emit code. */ - regparse = (char *)exp; - regnpar = 1; - regcode = r->program; - regc(MAGIC); - if (reg(0, &flags) == NULL) - return(NULL); - - /* Dig out information for optimizations. */ - r->regstart = '\0'; /* Worst-case defaults. */ - r->reganch = 0; - r->regmust = NULL; - r->regmlen = 0; - scan = r->program+1; /* First BRANCH. */ - if (OP(regnext(scan)) == END) { /* Only one top-level choice. */ - scan = OPERAND(scan); - - /* Starting-point info. */ - if (OP(scan) == EXACTLY) - r->regstart = *OPERAND(scan); - else if (OP(scan) == BOL) - r->reganch++; - - /* - * If there's something expensive in the r.e., find the - * longest literal string that must appear and make it the - * regmust. Resolve ties in favor of later strings, since - * the regstart check works with the beginning of the r.e. - * and avoiding duplication strengthens checking. Not a - * strong reason, but sufficient in the absence of others. - */ - if (flags&SPSTART) { - longest = NULL; - len = 0; - for (; scan != NULL; scan = regnext(scan)) - if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { - longest = OPERAND(scan); - len = strlen(OPERAND(scan)); - } - r->regmust = longest; - r->regmlen = len; - } - } - - return(r); -} - -/* - - reg - regular expression, i.e. main body or parenthesized thing - * - * Caller must absorb opening parenthesis. - * - * Combining parenthesis handling with the base level of regular expression - * is a trifle forced, but the need to tie the tails of the branches to what - * follows makes it hard to avoid. - */ -static char * -reg(int paren, int *flagp) -{ - char *ret; - char *br; - char *ender; - int parno; - int flags; - - *flagp = HASWIDTH; /* Tentatively. */ - - /* Make an OPEN node, if parenthesized. */ - if (paren) { - if (regnpar >= NSUBEXP) - FAIL("too many ()"); - parno = regnpar; - regnpar++; - ret = regnode(OPEN+parno); - } else - ret = NULL; - - /* Pick up the branches, linking them together. */ - br = regbranch(&flags); - if (br == NULL) - return(NULL); - if (ret != NULL) - regtail(ret, br); /* OPEN -> first. */ - else - ret = br; - if (!(flags&HASWIDTH)) - *flagp &= ~HASWIDTH; - *flagp |= flags&SPSTART; - while (*regparse == '|' || *regparse == '\n') { - regparse++; - br = regbranch(&flags); - if (br == NULL) - return(NULL); - regtail(ret, br); /* BRANCH -> BRANCH. */ - if (!(flags&HASWIDTH)) - *flagp &= ~HASWIDTH; - *flagp |= flags&SPSTART; - } - - /* Make a closing node, and hook it on the end. */ - ender = regnode((paren) ? CLOSE+parno : END); - regtail(ret, ender); - - /* Hook the tails of the branches to the closing node. */ - for (br = ret; br != NULL; br = regnext(br)) - regoptail(br, ender); - - /* Check for proper termination. */ - if (paren && *regparse++ != ')') { - FAIL("unmatched ()"); - } else if (!paren && *regparse != '\0') { - if (*regparse == ')') { - FAIL("unmatched ()"); - } else - FAIL("junk on end"); /* "Can't happen". */ - /* NOTREACHED */ - } - - return(ret); -} - -/* - - regbranch - one alternative of an | operator - * - * Implements the concatenation operator. - */ -static char * -regbranch(int *flagp) -{ - char *ret; - char *chain; - char *latest; - int flags; - - *flagp = WORST; /* Tentatively. */ - - ret = regnode(BRANCH); - chain = NULL; - while (*regparse != '\0' && *regparse != ')' && - *regparse != '\n' && *regparse != '|') { - latest = regpiece(&flags); - if (latest == NULL) - return(NULL); - *flagp |= flags&HASWIDTH; - if (chain == NULL) /* First piece. */ - *flagp |= flags&SPSTART; - else - regtail(chain, latest); - chain = latest; - } - if (chain == NULL) /* Loop ran zero times. */ - (void) regnode(NOTHING); - - return(ret); -} - -/* - - regpiece - something followed by possible [*+?] - * - * Note that the branching code sequences used for ? and the general cases - * of * and + are somewhat optimized: they use the same NOTHING node as - * both the endmarker for their branch list and the body of the last branch. - * It might seem that this node could be dispensed with entirely, but the - * endmarker role is not redundant. - */ -static char * -regpiece(int *flagp) -{ - char *ret; - char op; - char *next; - int flags; - - ret = regatom(&flags); - if (ret == NULL) - return(NULL); - - op = *regparse; - if (!ISMULT(op)) { - *flagp = flags; - return(ret); - } - - if (!(flags&HASWIDTH) && op != '?') - FAIL("*+ operand could be empty"); - *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH); - - if (op == '*' && (flags&SIMPLE)) - reginsert(STAR, ret); - else if (op == '*') { - /* Emit x* as (x&|), where & means "self". */ - reginsert(BRANCH, ret); /* Either x */ - regoptail(ret, regnode(BACK)); /* and loop */ - regoptail(ret, ret); /* back */ - regtail(ret, regnode(BRANCH)); /* or */ - regtail(ret, regnode(NOTHING)); /* null. */ - } else if (op == '+' && (flags&SIMPLE)) - reginsert(PLUS, ret); - else if (op == '+') { - /* Emit x+ as x(&|), where & means "self". */ - next = regnode(BRANCH); /* Either */ - regtail(ret, next); - regtail(regnode(BACK), ret); /* loop back */ - regtail(next, regnode(BRANCH)); /* or */ - regtail(ret, regnode(NOTHING)); /* null. */ - } else if (op == '?') { - /* Emit x? as (x|) */ - reginsert(BRANCH, ret); /* Either x */ - regtail(ret, regnode(BRANCH)); /* or */ - next = regnode(NOTHING); /* null. */ - regtail(ret, next); - regoptail(ret, next); - } - regparse++; - if (ISMULT(*regparse)) - FAIL("nested *?+"); - - return(ret); -} - -/* - - regatom - the lowest level - * - * Optimization: gobbles an entire sequence of ordinary characters so that - * it can turn them into a single node, which is smaller to store and - * faster to run. Backslashed characters are exceptions, each becoming a - * separate node; the code is simpler that way and it's not worth fixing. - */ -static char * -regatom(int *flagp) -{ - char *ret; - int flags; - - *flagp = WORST; /* Tentatively. */ - - switch (*regparse++) { - /* FIXME: these chars only have meaning at beg/end of pat? */ - case '^': - ret = regnode(BOL); - break; - case '$': - ret = regnode(EOL); - break; - case '.': - ret = regnode(ANY); - *flagp |= HASWIDTH|SIMPLE; - break; - case '[': { - int class; - int classend; - int i; - - if (*regparse == '^') { /* Complement of range. */ - ret = regnode(ANYBUT); - regparse++; - } else - ret = regnode(ANYOF); - if (*regparse == ']' || *regparse == '-') - regc(*regparse++); - while (*regparse != '\0' && *regparse != ']') { - if (*regparse == '-') { - regparse++; - if (*regparse == ']' || *regparse == '\0') - regc('-'); - else { - class = UCHARAT(regparse-2); - classend = UCHARAT(regparse); - if (__collate_load_error) { - if (class > classend) - FAIL("invalid [] range"); - for (class++; class <= classend; class++) - regc(class); - } else { - if (__collate_range_cmp(class, classend) > 0) - FAIL("invalid [] range"); - for (i = 0; i <= UCHAR_MAX; i++) - if ( i != class - && __collate_range_cmp(class, i) <= 0 - && __collate_range_cmp(i, classend) <= 0 - ) - regc(i); - } - regparse++; - } - } else - regc(*regparse++); - } - regc('\0'); - if (*regparse != ']') - FAIL("unmatched []"); - regparse++; - *flagp |= HASWIDTH|SIMPLE; - } - break; - case '(': - ret = reg(1, &flags); - if (ret == NULL) - return(NULL); - *flagp |= flags&(HASWIDTH|SPSTART); - break; - case '\0': - case '|': - case '\n': - case ')': - FAIL("internal urp"); /* Supposed to be caught earlier. */ - break; - case '?': - case '+': - case '*': - FAIL("?+* follows nothing"); - break; - case '\\': - switch (*regparse++) { - case '\0': - FAIL("trailing \\"); - break; - case '<': - ret = regnode(WORDA); - break; - case '>': - ret = regnode(WORDZ); - break; - /* FIXME: Someday handle \1, \2, ... */ - default: - /* Handle general quoted chars in exact-match routine */ - goto de_fault; - } - break; - de_fault: - default: - /* - * Encode a string of characters to be matched exactly. - * - * This is a bit tricky due to quoted chars and due to - * '*', '+', and '?' taking the SINGLE char previous - * as their operand. - * - * On entry, the char at regparse[-1] is going to go - * into the string, no matter what it is. (It could be - * following a \ if we are entered from the '\' case.) - * - * Basic idea is to pick up a good char in ch and - * examine the next char. If it's *+? then we twiddle. - * If it's \ then we frozzle. If it's other magic char - * we push ch and terminate the string. If none of the - * above, we push ch on the string and go around again. - * - * regprev is used to remember where "the current char" - * starts in the string, if due to a *+? we need to back - * up and put the current char in a separate, 1-char, string. - * When regprev is NULL, ch is the only char in the - * string; this is used in *+? handling, and in setting - * flags |= SIMPLE at the end. - */ - { - char *regprev; - char ch; - - regparse--; /* Look at cur char */ - ret = regnode(EXACTLY); - for ( regprev = NULL ; ; ) { - ch = *regparse++; /* Get current char */ - switch (*regparse) { /* look at next one */ - - default: - regc(ch); /* Add cur to string */ - break; - - case '.': case '[': case '(': - case ')': case '|': case '\n': - case '$': case '^': - case '\0': - /* FIXME, $ and ^ should not always be magic */ - magic: - regc(ch); /* dump cur char */ - goto done; /* and we are done */ - - case '?': case '+': case '*': - if (!regprev) /* If just ch in str, */ - goto magic; /* use it */ - /* End mult-char string one early */ - regparse = regprev; /* Back up parse */ - goto done; - - case '\\': - regc(ch); /* Cur char OK */ - switch (regparse[1]){ /* Look after \ */ - case '\0': - case '<': - case '>': - /* FIXME: Someday handle \1, \2, ... */ - goto done; /* Not quoted */ - default: - /* Backup point is \, scan * point is after it. */ - regprev = regparse; - regparse++; - continue; /* NOT break; */ - } - } - regprev = regparse; /* Set backup point */ - } - done: - regc('\0'); - *flagp |= HASWIDTH; - if (!regprev) /* One char? */ - *flagp |= SIMPLE; - } - break; - } - - return(ret); -} - -/* - - regnode - emit a node - */ -static char * /* Location. */ -regnode(char op) -{ - char *ret; - char *ptr; - - ret = regcode; - if (ret == ®dummy) { - regsize += 3; - return(ret); - } - - ptr = ret; - *ptr++ = op; - *ptr++ = '\0'; /* Null "next" pointer. */ - *ptr++ = '\0'; - regcode = ptr; - - return(ret); -} - -/* - - regc - emit (if appropriate) a byte of code - */ -static void -regc(char b) -{ - if (regcode != ®dummy) - *regcode++ = b; - else - regsize++; -} - -/* - - reginsert - insert an operator in front of already-emitted operand - * - * Means relocating the operand. - */ -static void -reginsert(char op, char *opnd) -{ - char *src; - char *dst; - char *place; - - if (regcode == ®dummy) { - regsize += 3; - return; - } - - src = regcode; - regcode += 3; - dst = regcode; - while (src > opnd) - *--dst = *--src; - - place = opnd; /* Op node, where operand used to be. */ - *place++ = op; - *place++ = '\0'; - *place++ = '\0'; -} - -/* - - regtail - set the next-pointer at the end of a node chain - */ -static void -regtail(char *p, char *val) -{ - char *scan; - char *temp; - int offset; - - if (p == ®dummy) - return; - - /* Find last node. */ - scan = p; - for (;;) { - temp = regnext(scan); - if (temp == NULL) - break; - scan = temp; - } - - if (OP(scan) == BACK) - offset = scan - val; - else - offset = val - scan; - *(scan+1) = (offset>>8)&0377; - *(scan+2) = offset&0377; -} - -/* - - regoptail - regtail on operand of first argument; nop if operandless - */ -static void -regoptail(char *p, char *val) -{ - /* "Operandless" and "op != BRANCH" are synonymous in practice. */ - if (p == NULL || p == ®dummy || OP(p) != BRANCH) - return; - regtail(OPERAND(p), val); -} - -/* - * regexec and friends - */ - -/* - * Global work variables for regexec(). - */ -static char *reginput; /* String-input pointer. */ -static char *regbol; /* Beginning of input, for ^ check. */ -static char **regstartp; /* Pointer to startp array. */ -static char **regendp; /* Ditto for endp. */ - -/* - * Forwards. - */ -STATIC int regtry(); -STATIC int regmatch(); -STATIC int regrepeat(); - -#ifdef DEBUG -int regnarrate = 0; -void regdump(); -STATIC char *regprop(); -#endif - -/* - - regexec - match a regexp against a string - */ -int -regexec(const regexp *prog, const char *string) -{ - char *s; - extern char *strchr(); - - /* Be paranoid... */ - if (prog == NULL || string == NULL) { - regerror("NULL parameter"); - return(0); - } - - /* Check validity of program. */ - if (UCHARAT(prog->program) != MAGIC) { - regerror("corrupted program"); - return(0); - } - - /* If there is a "must appear" string, look for it. */ - if (prog->regmust != NULL) { - s = (char *)string; - while ((s = strchr(s, prog->regmust[0])) != NULL) { - if (strncmp(s, prog->regmust, prog->regmlen) == 0) - break; /* Found it. */ - s++; - } - if (s == NULL) /* Not present. */ - return(0); - } - - /* Mark beginning of line for ^ . */ - regbol = (char *)string; - - /* Simplest case: anchored match need be tried only once. */ - if (prog->reganch) - return(regtry(prog, string)); - - /* Messy cases: unanchored match. */ - s = (char *)string; - if (prog->regstart != '\0') - /* We know what char it must start with. */ - while ((s = strchr(s, prog->regstart)) != NULL) { - if (regtry(prog, s)) - return(1); - s++; - } - else - /* We don't -- general case. */ - do { - if (regtry(prog, s)) - return(1); - } while (*s++ != '\0'); - - /* Failure. */ - return(0); -} - -/* - - regtry - try match at specific point - */ -static int /* 0 failure, 1 success */ -regtry(regexp *prog, char *string) -{ - int i; - char **sp; - char **ep; - - reginput = string; - regstartp = prog->startp; - regendp = prog->endp; - - sp = prog->startp; - ep = prog->endp; - for (i = NSUBEXP; i > 0; i--) { - *sp++ = NULL; - *ep++ = NULL; - } - if (regmatch(prog->program + 1)) { - prog->startp[0] = string; - prog->endp[0] = reginput; - return(1); - } else - return(0); -} - -/* - - regmatch - main matching routine - * - * Conceptually the strategy is simple: check to see whether the current - * node matches, call self recursively to see whether the rest matches, - * and then act accordingly. In practice we make some effort to avoid - * recursion, in particular by going through "ordinary" nodes (that don't - * need to know whether the rest of the match failed) by a loop instead of - * by recursion. - */ -static int /* 0 failure, 1 success */ -regmatch(char *prog) -{ - char *scan; /* Current node. */ - char *next; /* Next node. */ - - scan = prog; -#ifdef DEBUG - if (scan != NULL && regnarrate) - fprintf(stderr, "%s(\n", regprop(scan)); -#endif - while (scan != NULL) { -#ifdef DEBUG - if (regnarrate) - fprintf(stderr, "%s...\n", regprop(scan)); -#endif - next = regnext(scan); - - switch (OP(scan)) { - case BOL: - if (reginput != regbol) - return(0); - break; - case EOL: - if (*reginput != '\0') - return(0); - break; - case WORDA: - /* Must be looking at a letter, digit, or _ */ - if ((!isalnum((unsigned char)*reginput)) && *reginput != '_') - return(0); - /* Prev must be BOL or nonword */ - if (reginput > regbol && - (isalnum((unsigned char)reginput[-1]) || reginput[-1] == '_')) - return(0); - break; - case WORDZ: - /* Must be looking at non letter, digit, or _ */ - if (isalnum((unsigned char)*reginput) || *reginput == '_') - return(0); - /* We don't care what the previous char was */ - break; - case ANY: - if (*reginput == '\0') - return(0); - reginput++; - break; - case EXACTLY: { - int len; - char *opnd; - - opnd = OPERAND(scan); - /* Inline the first character, for speed. */ - if (*opnd != *reginput) - return(0); - len = strlen(opnd); - if (len > 1 && strncmp(opnd, reginput, len) != 0) - return(0); - reginput += len; - } - break; - case ANYOF: - if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL) - return(0); - reginput++; - break; - case ANYBUT: - if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL) - return(0); - reginput++; - break; - case NOTHING: - break; - case BACK: - break; - case OPEN+1: - case OPEN+2: - case OPEN+3: - case OPEN+4: - case OPEN+5: - case OPEN+6: - case OPEN+7: - case OPEN+8: - case OPEN+9: { - int no; - char *save; - - no = OP(scan) - OPEN; - save = reginput; - - if (regmatch(next)) { - /* - * Don't set startp if some later - * invocation of the same parentheses - * already has. - */ - if (regstartp[no] == NULL) - regstartp[no] = save; - return(1); - } else - return(0); - } - break; - case CLOSE+1: - case CLOSE+2: - case CLOSE+3: - case CLOSE+4: - case CLOSE+5: - case CLOSE+6: - case CLOSE+7: - case CLOSE+8: - case CLOSE+9: { - int no; - char *save; - - no = OP(scan) - CLOSE; - save = reginput; - - if (regmatch(next)) { - /* - * Don't set endp if some later - * invocation of the same parentheses - * already has. - */ - if (regendp[no] == NULL) - regendp[no] = save; - return(1); - } else - return(0); - } - break; - case BRANCH: { - char *save; - - if (OP(next) != BRANCH) /* No choice. */ - next = OPERAND(scan); /* Avoid recursion. */ - else { - do { - save = reginput; - if (regmatch(OPERAND(scan))) - return(1); - reginput = save; - scan = regnext(scan); - } while (scan != NULL && OP(scan) == BRANCH); - return(0); - /* NOTREACHED */ - } - } - break; - case STAR: - case PLUS: { - char nextch; - int no; - char *save; - int min; - - /* - * Lookahead to avoid useless match attempts - * when we know what character comes next. - */ - nextch = '\0'; - if (OP(next) == EXACTLY) - nextch = *OPERAND(next); - min = (OP(scan) == STAR) ? 0 : 1; - save = reginput; - no = regrepeat(OPERAND(scan)); - while (no >= min) { - /* If it could work, try it. */ - if (nextch == '\0' || *reginput == nextch) - if (regmatch(next)) - return(1); - /* Couldn't or didn't -- back up. */ - no--; - reginput = save + no; - } - return(0); - } - break; - case END: - return(1); /* Success! */ - break; - default: - regerror("memory corruption"); - return(0); - break; - } - - scan = next; - } - - /* - * We get here only if there's trouble -- normally "case END" is - * the terminating point. - */ - regerror("corrupted pointers"); - return(0); -} - -/* - - regrepeat - repeatedly match something simple, report how many - */ -static int -regrepeat(char *p) -{ - int count = 0; - char *scan; - char *opnd; - - scan = reginput; - opnd = OPERAND(p); - switch (OP(p)) { - case ANY: - count = strlen(scan); - scan += count; - break; - case EXACTLY: - while (*opnd == *scan) { - count++; - scan++; - } - break; - case ANYOF: - while (*scan != '\0' && strchr(opnd, *scan) != NULL) { - count++; - scan++; - } - break; - case ANYBUT: - while (*scan != '\0' && strchr(opnd, *scan) == NULL) { - count++; - scan++; - } - break; - default: /* Oh dear. Called inappropriately. */ - regerror("internal foulup"); - count = 0; /* Best compromise. */ - break; - } - reginput = scan; - - return(count); -} - -/* - - regnext - dig the "next" pointer out of a node - */ -static char * -regnext(char *p) -{ - int offset; - - if (p == ®dummy) - return(NULL); - - offset = NEXT(p); - if (offset == 0) - return(NULL); - - if (OP(p) == BACK) - return(p-offset); - else - return(p+offset); -} - -#ifdef DEBUG - -STATIC char *regprop(); - -/* - - regdump - dump a regexp onto stdout in vaguely comprehensible form - */ -void -regdump(regexp *r) -{ - char *s; - char op = EXACTLY; /* Arbitrary non-END op. */ - char *next; - extern char *strchr(); - - - s = r->program + 1; - while (op != END) { /* While that wasn't END last time... */ - op = OP(s); - printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */ - next = regnext(s); - if (next == NULL) /* Next ptr. */ - printf("(0)"); - else - printf("(%d)", (s-r->program)+(next-s)); - s += 3; - if (op == ANYOF || op == ANYBUT || op == EXACTLY) { - /* Literal string, where present. */ - while (*s != '\0') { - putchar(*s); - s++; - } - s++; - } - putchar('\n'); - } - - /* Header fields of interest. */ - if (r->regstart != '\0') - printf("start `%c' ", r->regstart); - if (r->reganch) - printf("anchored "); - if (r->regmust != NULL) - printf("must have \"%s\"", r->regmust); - printf("\n"); -} - -/* - - regprop - printable representation of opcode - */ -static char * -regprop(char *op) -{ - char *p; - static char buf[50]; - - (void) strcpy(buf, ":"); - - switch (OP(op)) { - case BOL: - p = "BOL"; - break; - case EOL: - p = "EOL"; - break; - case ANY: - p = "ANY"; - break; - case ANYOF: - p = "ANYOF"; - break; - case ANYBUT: - p = "ANYBUT"; - break; - case BRANCH: - p = "BRANCH"; - break; - case EXACTLY: - p = "EXACTLY"; - break; - case NOTHING: - p = "NOTHING"; - break; - case BACK: - p = "BACK"; - break; - case END: - p = "END"; - break; - case OPEN+1: - case OPEN+2: - case OPEN+3: - case OPEN+4: - case OPEN+5: - case OPEN+6: - case OPEN+7: - case OPEN+8: - case OPEN+9: - sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); - p = NULL; - break; - case CLOSE+1: - case CLOSE+2: - case CLOSE+3: - case CLOSE+4: - case CLOSE+5: - case CLOSE+6: - case CLOSE+7: - case CLOSE+8: - case CLOSE+9: - sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); - p = NULL; - break; - case STAR: - p = "STAR"; - break; - case PLUS: - p = "PLUS"; - break; - case WORDA: - p = "WORDA"; - break; - case WORDZ: - p = "WORDZ"; - break; - default: - regerror("corrupted opcode"); - break; - } - if (p != NULL) - (void) strcat(buf, p); - return(buf); -} -#endif - -/* - * The following is provided for those people who do not have strcspn() in - * their C libraries. They should get off their butts and do something - * about it; at least one public-domain implementation of those (highly - * useful) string routines has been published on Usenet. - */ -#ifdef STRCSPN -/* - * strcspn - find length of initial segment of s1 consisting entirely - * of characters not from s2 - */ - -static int -strcspn(char *s1, char *s2) -{ - char *scan1; - char *scan2; - int count; - - count = 0; - for (scan1 = s1; *scan1 != '\0'; scan1++) { - for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */ - if (*scan1 == *scan2++) - return(count); - count++; - } - return(count); -} -#endif diff --git a/lib/libcompat/regexp/regmagic.h b/lib/libcompat/regexp/regmagic.h deleted file mode 100644 index 5acf4478ff..0000000000 --- a/lib/libcompat/regexp/regmagic.h +++ /dev/null @@ -1,5 +0,0 @@ -/* - * The first byte of the regexp internal "program" is actually this magic - * number; the start node begins in the second byte. - */ -#define MAGIC 0234 diff --git a/lib/libcompat/regexp/regsub.c b/lib/libcompat/regexp/regsub.c deleted file mode 100644 index 2593ab1b31..0000000000 --- a/lib/libcompat/regexp/regsub.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $DragonFly: src/lib/libcompat/regexp/regsub.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ -/* - * regsub - * - * Copyright (c) 1986 by University of Toronto. - * Written by Henry Spencer. Not derived from licensed software. - * - * Permission is granted to anyone to use this software for any - * purpose on any computer system, and to redistribute it freely, - * subject to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of - * this software, no matter how awful, even if they arise - * from defects in it. - * - * 2. The origin of this software must not be misrepresented, either - * by explicit claim or by omission. - * - * 3. Altered versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - */ -#include -#include -#include -#include "regmagic.h" - -#ifndef CHARBITS -#define UCHARAT(p) ((int)*(unsigned char *)(p)) -#else -#define UCHARAT(p) ((int)*(p)&CHARBITS) -#endif - -/* - - regsub - perform substitutions after a regexp match - */ -void -regsub(const regexp *prog, const char *source, char *dest) -{ - char *src; - char *dst; - char c; - int no; - int len; - extern char *strncpy(); - - if (prog == NULL || source == NULL || dest == NULL) { - regerror("NULL parm to regsub"); - return; - } - if (UCHARAT(prog->program) != MAGIC) { - regerror("damaged regexp fed to regsub"); - return; - } - - src = (char *)source; - dst = dest; - while ((c = *src++) != '\0') { - if (c == '&') - no = 0; - else if (c == '\\' && '0' <= *src && *src <= '9') - no = *src++ - '0'; - else - no = -1; - if (no < 0) { /* Ordinary character. */ - if (c == '\\' && (*src == '\\' || *src == '&')) - c = *src++; - *dst++ = c; - } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) { - len = prog->endp[no] - prog->startp[no]; - (void) strncpy(dst, prog->startp[no], len); - dst += len; - if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NUL. */ - regerror("damaged match string"); - return; - } - } - } - *dst++ = '\0'; -} diff --git a/lib/libkiconv/kiconv.3 b/lib/libkiconv/kiconv.3 index 28b9a79964..1c9ca18ad0 100644 --- a/lib/libkiconv/kiconv.3 +++ b/lib/libkiconv/kiconv.3 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libkiconv/kiconv.3,v 1.6.28.1 2009/04/15 03:14:26 kensmith Exp $ +.\" $FreeBSD: head/lib/libkiconv/kiconv.3 247337 2013-02-26 19:46:02Z jmg $ .\" .Dd July 17, 2003 .Dt KICONV 3 @@ -127,4 +127,3 @@ not using .Xr iconv 3 , .Xr tolower 3 , .Xr toupper 3 -.\".Xr iconv 9 diff --git a/lib/libkiconv/quirks.c b/lib/libkiconv/quirks.c index 01d0b5cc45..7f88def2f0 100644 --- a/lib/libkiconv/quirks.c +++ b/lib/libkiconv/quirks.c @@ -23,15 +23,22 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libkiconv/quirks.c,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $ + * $FreeBSD: head/lib/libkiconv/quirks.c 194637 2009-06-22 17:00:20Z delphij $ */ +/* + * kiconv(3) requires shared linked, and reduce module size + * when statically linked. + */ + +#ifdef PIC + /* * Why do we need quirks? * Since each vendors has their own Unicode mapping rules, * we need some quirks until iconv(3) supports them. * We can define Microsoft mappings here. - * + * * For example, the eucJP and Unocode mapping rule is based on * the JIS standard. Since Microsoft uses cp932 for Unicode mapping * witch is not truly based on the JIS standard, reading a file @@ -173,3 +180,17 @@ quirk_unix2vendor(uint16_t c, struct quirk_replace_list *replace_list, size_t nu return (c); } + +#else /* statically linked */ + +#include +#include + +const char * +kiconv_quirkcs(const char* base __unused, int vendor __unused) +{ + + return (base); +} + +#endif /* PIC */ diff --git a/lib/libkiconv/quirks.h b/lib/libkiconv/quirks.h index bec16fee3d..d61e4b5ca3 100644 --- a/lib/libkiconv/quirks.h +++ b/lib/libkiconv/quirks.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libkiconv/quirks.h,v 1.1.30.1 2009/04/15 03:14:26 kensmith Exp $ + * $FreeBSD: head/lib/libkiconv/quirks.h 120492 2003-09-26 20:26:25Z fjoe $ */ #ifndef _KICONV_QUIRKS_H_ diff --git a/lib/libkiconv/xlat16_iconv.c b/lib/libkiconv/xlat16_iconv.c index 8851bd506c..4c939cfadd 100644 --- a/lib/libkiconv/xlat16_iconv.c +++ b/lib/libkiconv/xlat16_iconv.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Ryuichiro Imura + * Copyright (c) 2003, 2005 Ryuichiro Imura * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +23,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libkiconv/xlat16_iconv.c,v 1.4.8.1 2009/04/15 03:14:26 kensmith Exp $ + * $FreeBSD: head/lib/libkiconv/xlat16_iconv.c 254273 2013-08-13 07:15:01Z peter $ */ /* * kiconv(3) requires shared linked, and reduce module size * when statically linked. */ + +#ifdef PIC + #include #include #include @@ -38,10 +41,11 @@ #include #include #include +#include #include #include #include -#include +#include #include "quirks.h" @@ -52,40 +56,51 @@ struct xlat16_table { }; static struct xlat16_table kiconv_xlat16_open(const char *, const char *, int); +static int chklocale(int, const char *); +#ifdef ICONV_DLOPEN +typedef void *iconv_t; static int my_iconv_init(void); static iconv_t (*my_iconv_open)(const char *, const char *); -static size_t (*my_iconv)(iconv_t, char **, size_t *, char **, size_t *); +static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); static int (*my_iconv_close)(iconv_t); +#else +#include +#define my_iconv_init() 0 +#define my_iconv_open iconv_open +#define my_iconv iconv +#define my_iconv_close iconv_close +#endif static size_t my_iconv_char(iconv_t, const u_char **, size_t *, u_char **, size_t *); int kiconv_add_xlat16_cspair(const char *tocode, const char *fromcode, int flag) { int error; - size_t i, size, idxsize; - struct iconv_cspair_info *csi; + size_t idxsize; struct xlat16_table xt; void *data; char *p; - if (sysctlbyname("kern.iconv.cslist", NULL, &size, NULL, 0) == -1) - return (-1); - if (size > 0) { - csi = malloc(size); - if (csi == NULL) + const char unicode[] = ENCODING_UNICODE; + + if ((flag & KICONV_WCTYPE) == 0 && + strcmp(unicode, tocode) != 0 && + strcmp(unicode, fromcode) != 0 && + kiconv_lookupconv(unicode) == 0) { + error = kiconv_add_xlat16_cspair(unicode, fromcode, flag); + if (error) return (-1); - if (sysctlbyname("kern.iconv.cslist", csi, &size, NULL, 0) == -1) { - free(csi); - return (-1); - } - for (i = 0; i < (size/sizeof(*csi)); i++, csi++){ - if (strcmp(csi->cs_to, tocode) == 0 && - strcmp(csi->cs_from, fromcode) == 0) - return (0); - } + error = kiconv_add_xlat16_cspair(tocode, unicode, flag); + return (error); } - xt = kiconv_xlat16_open(tocode, fromcode, flag); + if (kiconv_lookupcs(tocode, fromcode) == 0) + return (0); + + if (flag & KICONV_WCTYPE) + xt = kiconv_xlat16_open(fromcode, fromcode, flag); + else + xt = kiconv_xlat16_open(tocode, fromcode, flag); if (xt.size == 0) return (-1); @@ -105,13 +120,14 @@ kiconv_add_xlat16_cspair(const char *tocode, const char *fromcode, int flag) (int)(idxsize + xt.size)); return (error); } + return (-1); } int kiconv_add_xlat16_cspairs(const char *foreigncode, const char *localcode) { - int error; + int error, locale; error = kiconv_add_xlat16_cspair(foreigncode, localcode, KICONV_FROM_LOWER | KICONV_FROM_UPPER); @@ -121,6 +137,14 @@ kiconv_add_xlat16_cspairs(const char *foreigncode, const char *localcode) KICONV_LOWER | KICONV_UPPER); if (error) return (error); + locale = chklocale(LC_CTYPE, localcode); + if (locale == 0) { + error = kiconv_add_xlat16_cspair(KICONV_WCTYPE_NAME, localcode, + KICONV_WCTYPE); + if (error) + return (error); + } + return (0); } @@ -142,9 +166,11 @@ kiconv_xlat16_open(const char *tocode, const char *fromcode, int lcase) src[2] = '\0'; dst[3] = '\0'; + ret = my_iconv_init(); if (ret) return (xt); + cd = my_iconv_open(search_quirk(tocode, fromcode, &pre_q_list, &pre_q_size), search_quirk(fromcode, tocode, &post_q_list, &post_q_size)); if (cd == (iconv_t) (-1)) @@ -166,6 +192,31 @@ kiconv_xlat16_open(const char *tocode, const char *fromcode, int lcase) bzero(dst, outbytesleft); c = ((ls & 0x100 ? us | 0x80 : us) << 8) | (u_char)ls; + + if (lcase & KICONV_WCTYPE) { + if ((c & 0xff) == 0) + c >>= 8; + if (iswupper(c)) { + c = towlower(c); + if ((c & 0xff00) == 0) + c <<= 8; + table[us] = c | XLAT16_HAS_LOWER_CASE; + } else if (iswlower(c)) { + c = towupper(c); + if ((c & 0xff00) == 0) + c <<= 8; + table[us] = c | XLAT16_HAS_UPPER_CASE; + } else + table[us] = 0; + /* + * store not NULL + */ + if (table[us]) + xt.idx[ls] = table; + + continue; + } + c = quirk_vendor2unix(c, pre_q_list, pre_q_size); src[0] = (u_char)(c >> 8); src[1] = (u_char)c; @@ -248,13 +299,31 @@ kiconv_xlat16_open(const char *tocode, const char *fromcode, int lcase) return (xt); } +static int +chklocale(int category, const char *code) +{ + char *p; + int error = -1; + + p = strchr(setlocale(category, NULL), '.'); + if (p++) { + error = strcasecmp(code, p); + if (error) { + /* XXX - can't avoid calling quirk here... */ + error = strcasecmp(code, kiconv_quirkcs(p, + KICONV_VENDOR_MICSFT)); + } + } + return (error); +} + +#ifdef ICONV_DLOPEN static int my_iconv_init(void) { -#ifdef __PIC__ void *iconv_lib; - iconv_lib = dlopen("libc.so", RTLD_LAZY | RTLD_GLOBAL); + iconv_lib = dlopen("libiconv.so", RTLD_LAZY | RTLD_GLOBAL); if (iconv_lib == NULL) { warn("Unable to load iconv library: %s\n", dlerror()); errno = ENOENT; @@ -263,14 +332,10 @@ my_iconv_init(void) my_iconv_open = dlsym(iconv_lib, "iconv_open"); my_iconv = dlsym(iconv_lib, "iconv"); my_iconv_close = dlsym(iconv_lib, "iconv_close"); -#else - my_iconv_open = iconv_open; - my_iconv = iconv; - my_iconv_close = iconv_close; -#endif return (0); } +#endif static size_t my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, @@ -287,7 +352,7 @@ my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, ir = *ilen; bzero(*obuf, *olen); - ret = my_iconv(cd, (char **)&sp, ilen, (char **)&dp, olen); + ret = my_iconv(cd, (const char **)&sp, ilen, (char **)&dp, olen); c1 = (*obuf)[0]; c2 = (*obuf)[1]; @@ -310,7 +375,8 @@ my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, sp = ilocal; dp = olocal; - if ((my_iconv(cd, (char **)&sp, &ir, (char **)&dp, &or)) != (size_t)-1) { + if ((my_iconv(cd,(const char **)&sp, &ir, (char **)&dp, &or)) != + (size_t)-1) { if (olocal[0] != c1) return (ret); @@ -364,7 +430,8 @@ my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, sp = ilocal + 1; dp = olocal; - if ((my_iconv(cd, (char **)&sp, &ir, (char **)&dp, &or)) != (size_t)-1) { + if ((my_iconv(cd,(const char **)&sp, &ir, (char **)&dp, &or)) != + (size_t)-1) { if (olocal[0] == c2) /* * inbuf is a single byte char @@ -374,3 +441,27 @@ my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, return (ret); } + +#else /* statically linked */ + +#include +#include +#include + +int +kiconv_add_xlat16_cspair(const char *tocode __unused, const char *fromcode __unused, + int flag __unused) +{ + + errno = EINVAL; + return (-1); +} + +int +kiconv_add_xlat16_cspairs(const char *tocode __unused, const char *fromcode __unused) +{ + errno = EINVAL; + return (-1); +} + +#endif /* PIC */ diff --git a/lib/libkiconv/xlat16_sysctl.c b/lib/libkiconv/xlat16_sysctl.c index 83e9dc5b2e..cbb8e014bb 100644 --- a/lib/libkiconv/xlat16_sysctl.c +++ b/lib/libkiconv/xlat16_sysctl.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libkiconv/xlat16_sysctl.c,v 1.2.8.1 2009/04/15 03:14:26 kensmith Exp $ + * $FreeBSD: head/lib/libkiconv/xlat16_sysctl.c 194637 2009-06-22 17:00:20Z delphij $ */ /* @@ -37,6 +37,8 @@ * when statically linked. */ +#ifdef PIC + #include #include #include @@ -65,3 +67,19 @@ kiconv_add_xlat16_table(const char *to, const char *from, const void *data, int return (errno); return (0); } + +#else /* statically linked */ + +#include +#include +#include + +int +kiconv_add_xlat16_table(const char *to __unused, const char *from __unused, + const void *data __unused, int datalen __unused) +{ + + return (EINVAL); +} + +#endif /* PIC */ diff --git a/lib/libm/src/s_nan.c b/lib/libm/src/s_nan.c index bd1ab0681c..8055406af9 100644 --- a/lib/libm/src/s_nan.c +++ b/lib/libm/src/s_nan.c @@ -35,17 +35,6 @@ #include "math_private.h" -static int -digittoint(char c) -{ - - if (isdigit(c)) - return (c - '0'); - if (islower(c)) - return (c - 'a' + 10); - return (c - 'A' + 10); -} - /* * Scan a string of hexadecimal digits (the format nan(3) expects) and * make a bit array (using the local endianness). We stop when we diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index bb2c4a7d22..fd503e142b 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -8,8 +8,8 @@ WARNS?= 0 # Portability layer SRCS+= fmt_scaled.c -DPADD+= ${LIBEDIT} -LDADD+= -ledit +DPADD+= ${LIBEDIT} ${LIBNCURSES} +LDADD+= -ledit -lncurses .include "../../Makefile.ssh.common" .include diff --git a/share/Makefile b/share/Makefile index ef61493319..029f7d0f6d 100644 --- a/share/Makefile +++ b/share/Makefile @@ -4,7 +4,7 @@ # Do not include `info' in the SUBDIR list, it is handled separately. SUBDIR= colldef dict doc examples i18n initrd \ - locale man me misc mk monetdef msgdef \ + man me misc mk mklocale monetdef msgdef \ numericdef skel syscons tabset termcap terminfo timedef zoneinfo .if !defined(NO_SENDMAIL) diff --git a/share/colldef/Makefile b/share/colldef/Makefile index e156987b4e..fa441e4029 100644 --- a/share/colldef/Makefile +++ b/share/colldef/Makefile @@ -25,7 +25,6 @@ LOCALES= bg_BG.CP1251 \ la_LN.ISO8859-2 \ la_LN.ISO8859-4 \ la_LN.US-ASCII \ - la_LN.UTF-8 \ no_NO.ISO8859-1 \ no_NO.ISO8859-15 \ lt_LT.ISO8859-4 \ diff --git a/share/colldef/la_LN.UTF-8.src b/share/colldef/la_LN.UTF-8.src deleted file mode 100644 index 77e2a496d0..0000000000 --- a/share/colldef/la_LN.UTF-8.src +++ /dev/null @@ -1,6 +0,0 @@ -# UTF-8 -# -# $DragonFly: src/share/colldef/la_LN.UTF-8.src,v 1.1 2004/09/27 19:30:50 asmodai Exp $ -# -order \ - \x00;...;\xff diff --git a/share/locale/Makefile b/share/locale/Makefile deleted file mode 100644 index 58cb96217c..0000000000 --- a/share/locale/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: src/share/locale/Makefile,v 1.4 2004/07/21 19:02:17 tshiozak Exp $ -# $DragonFly: src/share/locale/Makefile,v 1.1 2005/03/11 15:57:42 joerg Exp $ - -.include - -NOOBJ= # defined -NOMAN= # defined - -SUBDIR= ctype - -FILES= locale.alias -FILESOWN= ${LOCALEOWN} -FILESGRP= ${LOCALEGRP} -FILESMODE= ${LOCALEMODE} -FILESDIR= ${LOCALEDIR} - -.include diff --git a/share/locale/ctype/Makefile b/share/locale/ctype/Makefile deleted file mode 100644 index 3c4149c4d0..0000000000 --- a/share/locale/ctype/Makefile +++ /dev/null @@ -1,353 +0,0 @@ -# $NetBSD: src/share/locale/ctype/Makefile,v 1.20 2005/02/10 18:03:02 tnozaki Exp $ - -NOMAN= # defined - -# pull LOCALEDIR and other declarations -.include - -FILESOWN= ${LOCALEOWN} -FILESGRP= ${LOCALEGRP} -FILESMODE= ${LOCALEMODE} - -LOCALES += af_ZA.ISO8859-1 - LOCALESRC_af_ZA.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += af_ZA.ISO8859-15 - LOCALESRC_af_ZA.ISO8859-15 = en_US.DIS_8859-15 - -#LOCALES += am_ET.UTF-8 -# LOCALESRC_am_ET.UTF-8 = en_US.UTF-8 - -LOCALES += be_BY.CP1131 - LOCALESRC_be_BY.CP1131 = be_BY.CP1131 - -LOCALES += be_BY.CP1251 - LOCALESRC_be_BY.CP1251 = bg_BG.CP1251 - -LOCALES += be_BY.ISO8859-5 - LOCALESRC_be_BY.ISO8859-5 = ru_RU.ISO_8859-5 - -LOCALES += bg_BG.CP1251 - LOCALESRC_bg_BG.CP1251 = bg_BG.CP1251 - -LOCALES += ca_ES.ISO8859-1 - LOCALESRC_ca_ES.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += ca_ES.ISO8859-15 - LOCALESRC_ca_ES.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += cs_CZ.ISO8859-2 - LOCALESRC_cs_CZ.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += da_DK.ISO8859-1 - LOCALESRC_da_DK.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += da_DK.ISO8859-15 - LOCALESRC_da_DK.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += de_AT.ISO8859-1 - LOCALESRC_de_AT.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += de_AT.ISO8859-15 - LOCALESRC_de_AT.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += de_CH.ISO8859-1 - LOCALESRC_de_CH.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += de_CH.ISO8859-15 - LOCALESRC_de_CH.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += de_DE.ISO8859-1 - LOCALESRC_de_DE.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += de_DE.ISO8859-15 - LOCALESRC_de_DE.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += el_GR.ISO8859-7 - LOCALESRC_el_GR.ISO8859-7 = el_GR.ISO8859-7 - -LOCALES += en_AU.ISO8859-1 - LOCALESRC_en_AU.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += en_AU.ISO8859-15 - LOCALESRC_en_AU.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += en_CA.ISO8859-1 - LOCALESRC_en_CA.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += en_CA.ISO8859-15 - LOCALESRC_en_CA.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += en_GB.ISO8859-1 - LOCALESRC_en_GB.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += en_GB.ISO8859-15 - LOCALESRC_en_GB.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += en_US.ISO8859-1 - LOCALESRC_en_US.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += en_US.ISO8859-15 - LOCALESRC_en_US.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += en_US.US-ASCII - LOCALESRC_en_US.US-ASCII = en_US.ASCII - -LOCALES += en_US.UTF-8 - LOCALESRC_en_US.UTF-8 = en_US.UTF-8 - -LOCALES += es_ES.ISO8859-1 - LOCALESRC_es_ES.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += es_ES.ISO8859-15 - LOCALESRC_es_ES.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += et_EE.ISO8859-15 - LOCALESRC_et_EE.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += eu_ES.ISO8859-1 - LOCALESRC_eu_ES.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += eu_ES.ISO8859-15 - LOCALESRC_eu_ES.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fi_FI.ISO8859-1 - LOCALESRC_fi_FI.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += fi_FI.ISO8859-15 - LOCALESRC_fi_FI.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fr_BE.ISO8859-1 - LOCALESRC_fr_BE.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += fr_BE.ISO8859-15 - LOCALESRC_fr_BE.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fr_CA.ISO8859-1 - LOCALESRC_fr_CA.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += fr_CA.ISO8859-15 - LOCALESRC_fr_CA.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fr_CA.UTF-8 - LOCALESRC_fr_CA.UTF-8 = en_US.UTF-8 - -LOCALES += fr_CH.ISO8859-1 - LOCALESRC_fr_CH.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += fr_CH.ISO8859-15 - LOCALESRC_fr_CH.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fr_CH.UTF-8 - LOCALESRC_fr_CH.UTF-8 = en_US.UTF-8 - -LOCALES += fr_FR.ISO8859-1 - LOCALESRC_fr_FR.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += fr_FR.ISO8859-15 - LOCALESRC_fr_FR.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += fr_FR.UTF-8 - LOCALESRC_fr_FR.UTF-8 = en_US.UTF-8 - -#LOCALES += he_IL.UTF-8 -# LOCALESRC_he_IL.UTF-8 = en_US.UTF-8 - -LOCALES += hr_HR.ISO8859-2 - LOCALESRC_hr_HR.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += hu_HU.ISO8859-2 - LOCALESRC_hu_HU.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += hy_AM.ARMSCII-8 - LOCALESRC_hy_AM.ARMSCII-8 = hy_AM.ARMSCII-8 - -LOCALES += is_IS.ISO8859-1 - LOCALESRC_is_IS.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += is_IS.ISO8859-15 - LOCALESRC_is_IS.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += it_CH.ISO8859-1 - LOCALESRC_it_CH.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += it_CH.ISO8859-15 - LOCALESRC_it_CH.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += it_IT.ISO8859-1 - LOCALESRC_it_IT.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += it_IT.ISO8859-15 - LOCALESRC_it_IT.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += ja_JP.ct - LOCALESRC_ja_JP.ct = ja_JP.CTEXT - -LOCALES += ja_JP.eucJP - LOCALESRC_ja_JP.eucJP = ja_JP.eucJP - -LOCALES += ja_JP.ISO2022-JP - LOCALESRC_ja_JP.ISO2022-JP = ja_JP.ISO-2022-JP - -LOCALES += ja_JP.ISO2022-JP2 - LOCALESRC_ja_JP.ISO2022-JP2 = ja_JP.ISO-2022-JP-2 - -LOCALES += ja_JP.SJIS - LOCALESRC_ja_JP.SJIS = ja_JP.SJIS - -LOCALES += kk_KZ.PT154 - LOCALESRC_kk_KZ.PT154 = kk_KZ.PT154 - -LOCALES += ko_KR.eucKR - LOCALESRC_ko_KR.eucKR = ko_KR.eucKR - -LOCALES += lt_LT.ISO8859-4 - LOCALESRC_lt_LT.ISO8859-4 = en_US.ISO_8859-4 - -LOCALES += lt_LT.ISO8859-13 - LOCALESRC_lt_LT.ISO8859-13 = lt_LT.ISO8859-13 - -#LOCALES += RC_mn_MN.UTF-8 -# LOCALESRC_mn_MN.UTF-8 = en_US.UTF-8 - -LOCALES += nl_BE.ISO8859-1 - LOCALESRC_nl_BE.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += nl_BE.ISO8859-15 - LOCALESRC_nl_BE.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += nl_NL.ISO8859-1 - LOCALESRC_nl_NL.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += nl_NL.ISO8859-15 - LOCALESRC_nl_NL.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += nn_NO.ISO8859-1 - LOCALESRC_nn_NO.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += nn_NO.ISO8859-15 - LOCALESRC_nn_NO.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += no_NO.ISO8859-1 - LOCALESRC_no_NO.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += no_NO.ISO8859-15 - LOCALESRC_no_NO.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += pl_PL.ISO8859-2 - LOCALESRC_pl_PL.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += pt_BR.ISO8859-1 - LOCALESRC_pt_BR.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += pt_PT.ISO8859-1 - LOCALESRC_pt_PT.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += pt_PT.ISO8859-15 - LOCALESRC_pt_PT.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += ro_RO.ISO8859-2 - LOCALESRC_ro_RO.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += ru_BY.CP1251 - LOCALESRC_ru_BY.CP1251 = bg_BG.CP1251 - -LOCALES += ru_RU.CP866 - LOCALESRC_ru_RU.CP866 = ru_RU.CP866 - -LOCALES += ru_RU.CP1251 - LOCALESRC_ru_RU.CP1251 = bg_BG.CP1251 - -LOCALES += ru_RU.KOI8-R - LOCALESRC_ru_RU.KOI8-R = ru_RU.KOI8-R - -LOCALES += ru_RU.ISO8859-5 - LOCALESRC_ru_RU.ISO8859-5 = ru_RU.ISO_8859-5 - -LOCALES += sk_SK.ISO8859-2 - LOCALESRC_sk_SK.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += sl_SI.ISO8859-2 - LOCALESRC_sl_SI.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += sr_ME.ISO8859-2 - LOCALESRC_sr_ME.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += sr_ME.ISO8859-5 - LOCALESRC_sr_ME.ISO8859-5 = ru_RU.ISO_8859-5 - -LOCALES += sr_RS.ISO8859-2 - LOCALESRC_sr_RS.ISO8859-2 = en_US.ISO_8859-2 - -LOCALES += sr_RS.ISO8859-5 - LOCALESRC_sr_RS.ISO8859-5 = ru_RU.ISO_8859-5 - -LOCALES += sv_SE.ISO8859-1 - LOCALESRC_sv_SE.ISO8859-1 = en_US.ISO_8859-1 - -LOCALES += sv_SE.ISO8859-15 - LOCALESRC_sv_SE.ISO8859-15 = en_US.DIS_8859-15 - -LOCALES += tr_TR.ISO8859-9 - LOCALESRC_tr_TR.ISO8859-9 = tr_TR.ISO8859-9 - -LOCALES += uk_UA.CP1251 - LOCALESRC_uk_UA.CP1251 = bg_BG.CP1251 - -LOCALES += uk_UA.ISO8859-5 - LOCALESRC_uk_UA.ISO8859-5 = ru_RU.ISO_8859-5 - -LOCALES += uk_UA.KOI8-U - LOCALESRC_uk_UA.KOI8-U = uk_UA.KOI8-U - -LOCALES += zh_CN.eucCN - LOCALESRC_zh_CN.eucCN = zh_CN.eucCN - -LOCALES += zh_CN.GB18030 - LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030 - -LOCALES += zh_HK.Big5HKSCS - LOCALESRC_zh_HK.Big5HKSCS = zh_HK.Big5-HKSCS - -LOCALES += zh_TW.Big5 - LOCALESRC_zh_TW.Big5 = zh_TW.BIG5 - -# XXX: EUC-TW is not EUC! -LOCALES += zh_TW.eucTW - LOCALESRC_zh_TW.eucTW = zh_TW.eucTW - -all: ${LOCALES:S/$/.out/g} -realall: ${LOCALES:S/$/.out/g} - -.for locale in ${LOCALES} -LOCALESRCS+= ${LOCALESRC_${locale}} -.endfor -CLEANFILES+= ${LOCALES:S/$/.out/g} - -# TODO: more use of symlinks? -FILES= ${LOCALES:S/$/.out/g} -.for locale in ${LOCALES} -FILESDIR_${locale}.out= ${LOCALEDIR}/${locale} -FILESNAME_${locale}.out= LC_CTYPE -.endfor - -# dependencies -.for locale in ${LOCALES} -${locale}.out: ${LOCALESRC_${locale}}.src \ - ${.CURDIR}/../../../lib/libc/locale/runetable.c - ${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \ - sed -e '/^#/d' | mklocale -o ${.TARGET} -.endfor - -.SUFFIXES: .src .out -.src.out: - ${CPP} -I${.CURDIR} < ${.IMPSRC} | sed -e '/^#/d' | \ - mklocale -o ${.TARGET} - -# does not work -#depend: -# ${MKDEP} -a ${MKDEPFLAGS} \ -# ${CPPFLAGS:M-[ID]*} ${CPPFLAGS} \ -# ${LOCALESRCS:S/$/.src/g:S/^/${.CURDIR}\//g} - -.include diff --git a/share/locale/ctype/charset/ASCII b/share/locale/ctype/charset/ASCII deleted file mode 100644 index f13f2f9285..0000000000 --- a/share/locale/ctype/charset/ASCII +++ /dev/null @@ -1,27 +0,0 @@ -/* $NetBSD: ASCII,v 1.1 2000/12/30 02:33:20 itojun Exp $ */ - -/* - * ASCII Code Set (ESC ( B) - */ -CHARSET "(B" - -ALPHA 'A' - 'Z' 'a' - 'z' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d 0x20 -UPPER 'A' - 'Z' -XDIGIT 'a' - 'f' 'A' - 'F' -BLANK ' ' '\t' -PRINT 0x20 - 0x7e -SWIDTH1 0x20 - 0x7e - -MAPLOWER < 'A' - 'Z' : 'a' > -MAPLOWER < 'a' - 'z' : 'a' > -MAPUPPER < 'A' - 'Z' : 'A' > -MAPUPPER < 'a' - 'z' : 'A' > -TODIGIT < '0' - '9' : 0 > -TODIGIT < 'A' - 'F' : 10 > -TODIGIT < 'a' - 'f' : 10 > diff --git a/share/locale/ctype/charset/GB2312 b/share/locale/ctype/charset/GB2312 deleted file mode 100644 index d534f76ded..0000000000 --- a/share/locale/ctype/charset/GB2312 +++ /dev/null @@ -1,235 +0,0 @@ -/* $NetBSD: GB2312,v 1.1 2000/12/30 02:33:20 itojun Exp $ */ - -/* - * GB2312 (ESC $ ( A or ESC $ A) - */ -CHARSET "$(A" - -/*- - * Copyright (c) 1998, Luoqi Chen - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/usr.bin/mklocale/data/zh_CN.EUC.src,v 1.2.2.1 1999/08/29 15:31:06 peter Exp $ - */ - -SPACE 0x2121 -BLANK 0x2121 -PUNCT 0x2122 - 0x217e -SWIDTH2 0x2121 - 0x217e - -DIGIT 0x2231 - 0x2262 0x2265 - 0x226e 0x2271 - 0x227c -SWIDTH2 0x2231 - 0x2262 0x2265 - 0x226e 0x2271 - 0x227c - -TODIGIT < 0x2231 - 0x2244 : 0 > -TODIGIT < 0x2245 - 0x2258 : 0 > -TODIGIT < 0x2259 - 0x2262 : 0 > -TODIGIT < 0x2265 - 0x226e : 0 > -TODIGIT < 0x2271 - 0x227c : 0 > - -ALPHA 0x2341 - 0x235a 0x2361 - 0x237a -SWIDTH2 0x2341 - 0x235a 0x2361 - 0x237a -DIGIT 0x2330 - 0x2339 -SWIDTH2 0x2330 - 0x2339 -UPPER 0x2341 - 0x235a -LOWER 0x2361 - 0x237a -PUNCT 0x2321 - 0x232f 0x233a - 0x2340 0x235b - 0x2360 0x237b - 0x237e -SWIDTH2 0x2321 - 0x232f 0x233a - 0x2340 0x235b - 0x2360 0x237b - 0x237e -XDIGIT 0x2330 - 0x2339 0x2341 - 0x2346 0x2361 - 0x2366 - -MAPLOWER < 0x2341 - 0x235a : 0x2361 > < 0x2361 - 0x237a : 0x2361 > -MAPUPPER < 0x2341 - 0x235a : 0x2341 > < 0x2330 - 0x2339 : 0x2341 > -TODIGIT < 0x2330 - 0x2339 : 0 > -TODIGIT < 0x2341 - 0x2346 : 10 > < 0x2361 - 0x2366 : 10 > - -PHONOGRAM 0x2421 - 0x2473 /* Hiragana */ -PHONOGRAM 0x2521 - 0x2576 /* Katakana */ -SWIDTH2 0x2421 - 0x2473 /* Hiragana */ -SWIDTH2 0x2521 - 0x2576 /* Katakana */ - -UPPER 0x2621 - 0x2638 /* Greek */ -LOWER 0x2641 - 0x2658 /* Greek */ -SWIDTH2 0x2621 - 0x2638 /* Greek */ -SWIDTH2 0x2641 - 0x2658 /* Greek */ -MAPLOWER < 0x2621 - 0x2638 : 0x2641 > < 0x2641 - 0x2658 : 0x2641 > -MAPUPPER < 0x2621 - 0x2638 : 0x2621 > < 0x2641 - 0x2658 : 0x2621 > - -UPPER 0x2721 - 0x2741 /* Cyrillic */ -LOWER 0x2751 - 0x2771 /* Cyrillic */ -SWIDTH2 0x2721 - 0x2741 /* Cyrillic */ -SWIDTH2 0x2751 - 0x2771 /* Cyrillic */ -MAPLOWER < 0x2721 - 0x2741 : 0x2751 > < 0x2751 - 0x2771 : 0x2751 > -MAPUPPER < 0x2721 - 0x2741 : 0x2721 > < 0x2751 - 0x2771 : 0x2721 > - -SPECIAL 0x2821 - 0x283a -SWIDTH2 0x2821 - 0x283a -PHONOGRAM 0x2845 - 0x2869 /* Pin yin */ -SWIDTH2 0x2845 - 0x2869 /* Pin yin */ -SPECIAL 0x2924 - 0x296f /* Box drawings */ -SWIDTH2 0x2924 - 0x296f /* Box drawings */ - -IDEOGRAM 0x3021 - 0x307e -IDEOGRAM 0x3121 - 0x317e -IDEOGRAM 0x3221 - 0x327e -IDEOGRAM 0x3321 - 0x337e -IDEOGRAM 0x3421 - 0x347e -IDEOGRAM 0x3521 - 0x357e -IDEOGRAM 0x3621 - 0x367e -IDEOGRAM 0x3721 - 0x377e -IDEOGRAM 0x3821 - 0x387e -IDEOGRAM 0x3921 - 0x397e -IDEOGRAM 0x3a21 - 0x3a7e -IDEOGRAM 0x3b21 - 0x3b7e -IDEOGRAM 0x3c21 - 0x3c7e -IDEOGRAM 0x3d21 - 0x3d7e -IDEOGRAM 0x3e21 - 0x3e7e -IDEOGRAM 0x3f21 - 0x3f7e -IDEOGRAM 0x4021 - 0x407e -IDEOGRAM 0x4121 - 0x417e -IDEOGRAM 0x4221 - 0x427e -IDEOGRAM 0x4321 - 0x437e -IDEOGRAM 0x4421 - 0x447e -IDEOGRAM 0x4521 - 0x457e -IDEOGRAM 0x4621 - 0x467e -IDEOGRAM 0x4721 - 0x477e -IDEOGRAM 0x4821 - 0x487e -IDEOGRAM 0x4921 - 0x497e -IDEOGRAM 0x4a21 - 0x4a7e -IDEOGRAM 0x4b21 - 0x4b7e -IDEOGRAM 0x4c21 - 0x4c7e -IDEOGRAM 0x4d21 - 0x4d7e -IDEOGRAM 0x4e21 - 0x4e7e -IDEOGRAM 0x4f21 - 0x4f53 -IDEOGRAM 0x5021 - 0x507e -IDEOGRAM 0x5121 - 0x517e -IDEOGRAM 0x5221 - 0x527e -IDEOGRAM 0x5321 - 0x537e -IDEOGRAM 0x5421 - 0x547e -IDEOGRAM 0x5521 - 0x557e -IDEOGRAM 0x5621 - 0x567e -IDEOGRAM 0x5721 - 0x577e -IDEOGRAM 0x5821 - 0x587e -IDEOGRAM 0x5921 - 0x597e -IDEOGRAM 0x5a21 - 0x5a7e -IDEOGRAM 0x5b21 - 0x5b7e -IDEOGRAM 0x5c21 - 0x5c7e -IDEOGRAM 0x5d21 - 0x5d7e -IDEOGRAM 0x5e21 - 0x5e7e -IDEOGRAM 0x5f21 - 0x5f7e -IDEOGRAM 0x6021 - 0x607e -IDEOGRAM 0x6121 - 0x617e -IDEOGRAM 0x6221 - 0x627e -IDEOGRAM 0x6321 - 0x637e -IDEOGRAM 0x6421 - 0x647e -IDEOGRAM 0x6521 - 0x657e -IDEOGRAM 0x6621 - 0x667e -IDEOGRAM 0x6721 - 0x677e -IDEOGRAM 0x6821 - 0x687e -IDEOGRAM 0x6921 - 0x697e -IDEOGRAM 0x6a21 - 0x6a7e -IDEOGRAM 0x6b21 - 0x6b7e -IDEOGRAM 0x6c21 - 0x6c7e -IDEOGRAM 0x6d21 - 0x6d7e -IDEOGRAM 0x6e21 - 0x6e7e -IDEOGRAM 0x6f21 - 0x6f7e -IDEOGRAM 0x7021 - 0x707e -IDEOGRAM 0x7121 - 0x717e -IDEOGRAM 0x7221 - 0x727e -IDEOGRAM 0x7321 - 0x737e -IDEOGRAM 0x7421 - 0x747e -IDEOGRAM 0x7521 - 0x757e -IDEOGRAM 0x7621 - 0x767e -IDEOGRAM 0x7721 - 0x777e - -SWIDTH2 0x3021 - 0x307e -SWIDTH2 0x3121 - 0x317e -SWIDTH2 0x3221 - 0x327e -SWIDTH2 0x3321 - 0x337e -SWIDTH2 0x3421 - 0x347e -SWIDTH2 0x3521 - 0x357e -SWIDTH2 0x3621 - 0x367e -SWIDTH2 0x3721 - 0x377e -SWIDTH2 0x3821 - 0x387e -SWIDTH2 0x3921 - 0x397e -SWIDTH2 0x3a21 - 0x3a7e -SWIDTH2 0x3b21 - 0x3b7e -SWIDTH2 0x3c21 - 0x3c7e -SWIDTH2 0x3d21 - 0x3d7e -SWIDTH2 0x3e21 - 0x3e7e -SWIDTH2 0x3f21 - 0x3f7e -SWIDTH2 0x4021 - 0x407e -SWIDTH2 0x4121 - 0x417e -SWIDTH2 0x4221 - 0x427e -SWIDTH2 0x4321 - 0x437e -SWIDTH2 0x4421 - 0x447e -SWIDTH2 0x4521 - 0x457e -SWIDTH2 0x4621 - 0x467e -SWIDTH2 0x4721 - 0x477e -SWIDTH2 0x4821 - 0x487e -SWIDTH2 0x4921 - 0x497e -SWIDTH2 0x4a21 - 0x4a7e -SWIDTH2 0x4b21 - 0x4b7e -SWIDTH2 0x4c21 - 0x4c7e -SWIDTH2 0x4d21 - 0x4d7e -SWIDTH2 0x4e21 - 0x4e7e -SWIDTH2 0x4f21 - 0x4f53 -SWIDTH2 0x5021 - 0x507e -SWIDTH2 0x5121 - 0x517e -SWIDTH2 0x5221 - 0x527e -SWIDTH2 0x5321 - 0x537e -SWIDTH2 0x5421 - 0x547e -SWIDTH2 0x5521 - 0x557e -SWIDTH2 0x5621 - 0x567e -SWIDTH2 0x5721 - 0x577e -SWIDTH2 0x5821 - 0x587e -SWIDTH2 0x5921 - 0x597e -SWIDTH2 0x5a21 - 0x5a7e -SWIDTH2 0x5b21 - 0x5b7e -SWIDTH2 0x5c21 - 0x5c7e -SWIDTH2 0x5d21 - 0x5d7e -SWIDTH2 0x5e21 - 0x5e7e -SWIDTH2 0x5f21 - 0x5f7e -SWIDTH2 0x6021 - 0x607e -SWIDTH2 0x6121 - 0x617e -SWIDTH2 0x6221 - 0x627e -SWIDTH2 0x6321 - 0x637e -SWIDTH2 0x6421 - 0x647e -SWIDTH2 0x6521 - 0x657e -SWIDTH2 0x6621 - 0x667e -SWIDTH2 0x6721 - 0x677e -SWIDTH2 0x6821 - 0x687e -SWIDTH2 0x6921 - 0x697e -SWIDTH2 0x6a21 - 0x6a7e -SWIDTH2 0x6b21 - 0x6b7e -SWIDTH2 0x6c21 - 0x6c7e -SWIDTH2 0x6d21 - 0x6d7e -SWIDTH2 0x6e21 - 0x6e7e -SWIDTH2 0x6f21 - 0x6f7e -SWIDTH2 0x7021 - 0x707e -SWIDTH2 0x7121 - 0x717e -SWIDTH2 0x7221 - 0x727e -SWIDTH2 0x7321 - 0x737e -SWIDTH2 0x7421 - 0x747e -SWIDTH2 0x7521 - 0x757e -SWIDTH2 0x7621 - 0x767e -SWIDTH2 0x7721 - 0x777e diff --git a/share/locale/ctype/charset/JISX0201-left b/share/locale/ctype/charset/JISX0201-left deleted file mode 100644 index 5013a23b8e..0000000000 --- a/share/locale/ctype/charset/JISX0201-left +++ /dev/null @@ -1,25 +0,0 @@ -/* $NetBSD: JISX0201-left,v 1.1 2000/12/30 02:33:20 itojun Exp $ */ - -/* - * JIS X0201 left Code Set (ESC ( J) - */ -CHARSET "(J" - -ALPHA 0x0041 - 0x005a 0x0061 - 0x007a -DIGIT 0x0030 - 0x0039 -GRAPH 0x0021 - 0x007e -LOWER 0x0061 - 0x007a -PUNCT 0x0021 - 0x002f 0x003a - 0x0040 -PUNCT 0x005b - 0x0060 0x007b - 0x007e -UPPER 0x0041 - 0x005a -XDIGIT 0x0041 - 0x0046 0x0061 - 0x0066 -PRINT 0x0021 - 0x007e -SWIDTH1 0x0021 - 0x007e - -MAPLOWER < 0x0041 - 0x005a : 0x0061 > -MAPLOWER < 0x0061 - 0x007a : 0x0061 > -MAPUPPER < 0x0041 - 0x005a : 0x0041 > -MAPUPPER < 0x0061 - 0x007a : 0x0041 > -TODIGIT < 0x0030 - 0x0039 : 0 > -TODIGIT < 0x0041 - 0x0046 : 10 > -TODIGIT < 0x0061 - 0x0066 : 10 > diff --git a/share/locale/ctype/charset/JISX0201-right b/share/locale/ctype/charset/JISX0201-right deleted file mode 100644 index cd2e525c57..0000000000 --- a/share/locale/ctype/charset/JISX0201-right +++ /dev/null @@ -1,13 +0,0 @@ -/* $NetBSD: JISX0201-right,v 1.2 2006/04/11 18:45:03 tnozaki Exp $ */ - -/* - * JIS X0201 right Code Set (ESC ( I) - */ -CHARSET "(I" - -PUNCT 0x0021 - 0x0025 -SPECIAL 0x0021 - 0x005f -PHONOGRAM 0x0026 - 0x005f -CONTROL 0x0004 - 0x0017 0x001b - 0x001f -CONTROL 0x0060 - 0x007e -SWIDTH1 0x0021 - 0x005f diff --git a/share/locale/ctype/charset/JISX0208-1978 b/share/locale/ctype/charset/JISX0208-1978 deleted file mode 100644 index 7f7eb7a433..0000000000 --- a/share/locale/ctype/charset/JISX0208-1978 +++ /dev/null @@ -1,167 +0,0 @@ -/* $NetBSD: JISX0208-1978,v 1.2 2006/04/11 18:45:03 tnozaki Exp $ */ - -/* - * JIS X0208-1978 - (ESC $ ( @ or ESC $ @) - * very obsolete. we should not use this one... - */ -CHARSET "$(@" - -SPACE 0x2121 -BLANK 0x2121 -PRINT 0x2121 -PHONOGRAM 0x213c -SPECIAL 0x2122 - 0x217e -PUNCT 0x2122 - 0x2178 /* A few too many in here... */ - -SPECIAL 0x2221 - 0x222e 0x223a - 0x2241 -SPECIAL 0x224a - 0x2250 0x225c - 0x226a -SPECIAL 0x2272 - 0x2279 0x227e - -DIGIT 0x2330 - 0x2339 -UPPER 0x2341 - 0x235a /* Romaji */ -LOWER 0x2361 - 0x237a /* Romaji */ -MAPLOWER < 0x2341 - 0x235a : 0x2361 > /* English */ -MAPLOWER < 0x2361 - 0x237a : 0x2361 > /* English */ -MAPUPPER < 0x2341 - 0x235a : 0x2341 > -MAPUPPER < 0x2361 - 0x237a : 0x2341 > - -XDIGIT 0x2341 - 0x2346 0x2361 - 0x2366 - -TODIGIT < 0x2330 - 0x2339 : 0 > -TODIGIT < 0x2341 - 0x2346 : 10 > -TODIGIT < 0x2361 - 0x2366 : 10 > - -PHONOGRAM 0x2421 - 0x2473 -PHONOGRAM 0x2521 - 0x2576 - -UPPER 0x2621 - 0x2638 /* Greek */ -LOWER 0x2641 - 0x2658 /* Greek */ -MAPLOWER < 0x2621 - 0x2638 : 0x2641 > -MAPLOWER < 0x2641 - 0x2658 : 0x2641 > -MAPUPPER < 0x2621 - 0x2638 : 0x2621 > -MAPUPPER < 0x2641 - 0x2658 : 0x2621 > - -UPPER 0x2721 - 0x2741 /* Cyrillic */ -LOWER 0x2751 - 0x2771 /* Cyrillic */ -MAPLOWER < 0x2721 - 0x2741 : 0x2751 > -MAPLOWER < 0x2751 - 0x2771 : 0x2751 > -MAPUPPER < 0x2721 - 0x2741 : 0x2721 > -MAPUPPER < 0x2751 - 0x2771 : 0x2721 > - -SPECIAL 0x2821 - 0x2840 - -IDEOGRAM 0x3021 - 0x307e -IDEOGRAM 0x3121 - 0x317e -IDEOGRAM 0x3221 - 0x327e -IDEOGRAM 0x3321 - 0x337e -IDEOGRAM 0x3421 - 0x347e -IDEOGRAM 0x3521 - 0x357e -IDEOGRAM 0x3621 - 0x367e -IDEOGRAM 0x3721 - 0x377e -IDEOGRAM 0x3821 - 0x387e -IDEOGRAM 0x3921 - 0x397e -IDEOGRAM 0x3a21 - 0x3a7e -IDEOGRAM 0x3b21 - 0x3b7e -IDEOGRAM 0x3c21 - 0x3c7e -IDEOGRAM 0x3d21 - 0x3d7e -IDEOGRAM 0x3e21 - 0x3e7e -IDEOGRAM 0x3f21 - 0x3f7e -IDEOGRAM 0x4021 - 0x407e -IDEOGRAM 0x4121 - 0x417e -IDEOGRAM 0x4221 - 0x427e -IDEOGRAM 0x4321 - 0x437e -IDEOGRAM 0x4421 - 0x447e -IDEOGRAM 0x4521 - 0x457e -IDEOGRAM 0x4621 - 0x467e -IDEOGRAM 0x4721 - 0x477e -IDEOGRAM 0x4821 - 0x487e -IDEOGRAM 0x4921 - 0x497e -IDEOGRAM 0x4a21 - 0x4a7e -IDEOGRAM 0x4b21 - 0x4b7e -IDEOGRAM 0x4c21 - 0x4c7e -IDEOGRAM 0x4d21 - 0x4d7e -IDEOGRAM 0x4e21 - 0x4e7e -IDEOGRAM 0x4f21 - 0x4f53 -IDEOGRAM 0x5021 - 0x507e -IDEOGRAM 0x5121 - 0x517e -IDEOGRAM 0x5221 - 0x527e -IDEOGRAM 0x5321 - 0x537e -IDEOGRAM 0x5421 - 0x547e -IDEOGRAM 0x5521 - 0x557e -IDEOGRAM 0x5621 - 0x567e -IDEOGRAM 0x5721 - 0x577e -IDEOGRAM 0x5821 - 0x587e -IDEOGRAM 0x5921 - 0x597e -IDEOGRAM 0x5a21 - 0x5a7e -IDEOGRAM 0x5b21 - 0x5b7e -IDEOGRAM 0x5c21 - 0x5c7e -IDEOGRAM 0x5d21 - 0x5d7e -IDEOGRAM 0x5e21 - 0x5e7e -IDEOGRAM 0x5f21 - 0x5f7e -IDEOGRAM 0x6021 - 0x607e -IDEOGRAM 0x6121 - 0x617e -IDEOGRAM 0x6221 - 0x627e -IDEOGRAM 0x6321 - 0x637e -IDEOGRAM 0x6421 - 0x647e -IDEOGRAM 0x6521 - 0x657e -IDEOGRAM 0x6621 - 0x667e -IDEOGRAM 0x6721 - 0x677e -IDEOGRAM 0x6821 - 0x687e -IDEOGRAM 0x6921 - 0x697e -IDEOGRAM 0x6a21 - 0x6a7e -IDEOGRAM 0x6b21 - 0x6b7e -IDEOGRAM 0x6c21 - 0x6c7e -IDEOGRAM 0x6d21 - 0x6d7e -IDEOGRAM 0x6e21 - 0x6e7e -IDEOGRAM 0x6f21 - 0x6f7e -IDEOGRAM 0x7021 - 0x707e -IDEOGRAM 0x7121 - 0x717e -IDEOGRAM 0x7221 - 0x727e -IDEOGRAM 0x7321 - 0x737e -IDEOGRAM 0x7421 - 0x7424 - -SWIDTH2 0x2121 - 0x217e -SWIDTH2 0x2221 - 0x222e 0x223a - 0x2241 -SWIDTH2 0x224a - 0x2250 0x225c - 0x226a -SWIDTH2 0x2272 - 0x2279 0x227e -SWIDTH2 0x2330 - 0x2339 -SWIDTH2 0x2341 - 0x235a 0x2361 - 0x237a /* Romaji */ -SWIDTH2 0x2421 - 0x2473 -SWIDTH2 0x2521 - 0x2576 -SWIDTH2 0x2621 - 0x2638 0x2641 - 0x2658 /* Greek */ -SWIDTH2 0x2721 - 0x2741 0x2751 - 0x2771 /* Cyrillic */ -SWIDTH2 0x2821 - 0x2840 0x3021 - 0x307e -SWIDTH2 0x3121 - 0x317e 0x3221 - 0x327e -SWIDTH2 0x3321 - 0x337e 0x3421 - 0x347e -SWIDTH2 0x3521 - 0x357e 0x3621 - 0x367e -SWIDTH2 0x3721 - 0x377e 0x3821 - 0x387e -SWIDTH2 0x3921 - 0x397e 0x3a21 - 0x3a7e -SWIDTH2 0x3b21 - 0x3b7e 0x3c21 - 0x3c7e -SWIDTH2 0x3d21 - 0x3d7e 0x3e21 - 0x3e7e -SWIDTH2 0x3f21 - 0x3f7e 0x4021 - 0x407e -SWIDTH2 0x4121 - 0x417e 0x4221 - 0x427e -SWIDTH2 0x4321 - 0x437e 0x4421 - 0x447e -SWIDTH2 0x4521 - 0x457e 0x4621 - 0x467e -SWIDTH2 0x4721 - 0x477e 0x4821 - 0x487e -SWIDTH2 0x4921 - 0x497e 0x4a21 - 0x4a7e -SWIDTH2 0x4b21 - 0x4b7e 0x4c21 - 0x4c7e -SWIDTH2 0x4d21 - 0x4d7e 0x4e21 - 0x4e7e -SWIDTH2 0x4f21 - 0x4f53 0x5021 - 0x507e -SWIDTH2 0x5121 - 0x517e 0x5221 - 0x527e -SWIDTH2 0x5321 - 0x537e 0x5421 - 0x547e -SWIDTH2 0x5521 - 0x557e 0x5621 - 0x567e -SWIDTH2 0x5721 - 0x577e 0x5821 - 0x587e -SWIDTH2 0x5921 - 0x597e 0x5a21 - 0x5a7e -SWIDTH2 0x5b21 - 0x5b7e 0x5c21 - 0x5c7e -SWIDTH2 0x5d21 - 0x5d7e 0x5e21 - 0x5e7e -SWIDTH2 0x5f21 - 0x5f7e 0x6021 - 0x607e -SWIDTH2 0x6121 - 0x617e 0x6221 - 0x627e -SWIDTH2 0x6321 - 0x637e 0x6421 - 0x647e -SWIDTH2 0x6521 - 0x657e 0x6621 - 0x667e -SWIDTH2 0x6721 - 0x677e 0x6821 - 0x687e -SWIDTH2 0x6921 - 0x697e 0x6a21 - 0x6a7e -SWIDTH2 0x6b21 - 0x6b7e 0x6c21 - 0x6c7e -SWIDTH2 0x6d21 - 0x6d7e 0x6e21 - 0x6e7e -SWIDTH2 0x6f21 - 0x6f7e 0x7021 - 0x707e -SWIDTH2 0x7121 - 0x717e 0x7221 - 0x727e -SWIDTH2 0x7321 - 0x737e 0x7421 - 0x7424 diff --git a/share/locale/ctype/charset/JISX0208-1983 b/share/locale/ctype/charset/JISX0208-1983 deleted file mode 100644 index e9860399d3..0000000000 --- a/share/locale/ctype/charset/JISX0208-1983 +++ /dev/null @@ -1,166 +0,0 @@ -/* $NetBSD: JISX0208-1983,v 1.2 2006/04/11 18:45:03 tnozaki Exp $ */ - -/* - * JIS X0208-1983 - (ESC $ ( B or ESC $ B) - */ -CHARSET "$(B" - -SPACE 0x2121 -BLANK 0x2121 -PRINT 0x2121 -PHONOGRAM 0x213c -SPECIAL 0x2122 - 0x217e -PUNCT 0x2122 - 0x2178 /* A few too many in here... */ - -SPECIAL 0x2221 - 0x222e 0x223a - 0x2241 -SPECIAL 0x224a - 0x2250 0x225c - 0x226a -SPECIAL 0x2272 - 0x2279 0x227e - -DIGIT 0x2330 - 0x2339 -UPPER 0x2341 - 0x235a /* Romaji */ -LOWER 0x2361 - 0x237a /* Romaji */ -MAPLOWER < 0x2341 - 0x235a : 0x2361 > /* English */ -MAPLOWER < 0x2361 - 0x237a : 0x2361 > /* English */ -MAPUPPER < 0x2341 - 0x235a : 0x2341 > -MAPUPPER < 0x2361 - 0x237a : 0x2341 > - -XDIGIT 0x2341 - 0x2346 0x2361 - 0x2366 - -TODIGIT < 0x2330 - 0x2339 : 0 > -TODIGIT < 0x2341 - 0x2346 : 10 > -TODIGIT < 0x2361 - 0x2366 : 10 > - -PHONOGRAM 0x2421 - 0x2473 -PHONOGRAM 0x2521 - 0x2576 - -UPPER 0x2621 - 0x2638 /* Greek */ -LOWER 0x2641 - 0x2658 /* Greek */ -MAPLOWER < 0x2621 - 0x2638 : 0x2641 > -MAPLOWER < 0x2641 - 0x2658 : 0x2641 > -MAPUPPER < 0x2621 - 0x2638 : 0x2621 > -MAPUPPER < 0x2641 - 0x2658 : 0x2621 > - -UPPER 0x2721 - 0x2741 /* Cyrillic */ -LOWER 0x2751 - 0x2771 /* Cyrillic */ -MAPLOWER < 0x2721 - 0x2741 : 0x2751 > -MAPLOWER < 0x2751 - 0x2771 : 0x2751 > -MAPUPPER < 0x2721 - 0x2741 : 0x2721 > -MAPUPPER < 0x2751 - 0x2771 : 0x2721 > - -SPECIAL 0x2821 - 0x2840 - -IDEOGRAM 0x3021 - 0x307e -IDEOGRAM 0x3121 - 0x317e -IDEOGRAM 0x3221 - 0x327e -IDEOGRAM 0x3321 - 0x337e -IDEOGRAM 0x3421 - 0x347e -IDEOGRAM 0x3521 - 0x357e -IDEOGRAM 0x3621 - 0x367e -IDEOGRAM 0x3721 - 0x377e -IDEOGRAM 0x3821 - 0x387e -IDEOGRAM 0x3921 - 0x397e -IDEOGRAM 0x3a21 - 0x3a7e -IDEOGRAM 0x3b21 - 0x3b7e -IDEOGRAM 0x3c21 - 0x3c7e -IDEOGRAM 0x3d21 - 0x3d7e -IDEOGRAM 0x3e21 - 0x3e7e -IDEOGRAM 0x3f21 - 0x3f7e -IDEOGRAM 0x4021 - 0x407e -IDEOGRAM 0x4121 - 0x417e -IDEOGRAM 0x4221 - 0x427e -IDEOGRAM 0x4321 - 0x437e -IDEOGRAM 0x4421 - 0x447e -IDEOGRAM 0x4521 - 0x457e -IDEOGRAM 0x4621 - 0x467e -IDEOGRAM 0x4721 - 0x477e -IDEOGRAM 0x4821 - 0x487e -IDEOGRAM 0x4921 - 0x497e -IDEOGRAM 0x4a21 - 0x4a7e -IDEOGRAM 0x4b21 - 0x4b7e -IDEOGRAM 0x4c21 - 0x4c7e -IDEOGRAM 0x4d21 - 0x4d7e -IDEOGRAM 0x4e21 - 0x4e7e -IDEOGRAM 0x4f21 - 0x4f53 -IDEOGRAM 0x5021 - 0x507e -IDEOGRAM 0x5121 - 0x517e -IDEOGRAM 0x5221 - 0x527e -IDEOGRAM 0x5321 - 0x537e -IDEOGRAM 0x5421 - 0x547e -IDEOGRAM 0x5521 - 0x557e -IDEOGRAM 0x5621 - 0x567e -IDEOGRAM 0x5721 - 0x577e -IDEOGRAM 0x5821 - 0x587e -IDEOGRAM 0x5921 - 0x597e -IDEOGRAM 0x5a21 - 0x5a7e -IDEOGRAM 0x5b21 - 0x5b7e -IDEOGRAM 0x5c21 - 0x5c7e -IDEOGRAM 0x5d21 - 0x5d7e -IDEOGRAM 0x5e21 - 0x5e7e -IDEOGRAM 0x5f21 - 0x5f7e -IDEOGRAM 0x6021 - 0x607e -IDEOGRAM 0x6121 - 0x617e -IDEOGRAM 0x6221 - 0x627e -IDEOGRAM 0x6321 - 0x637e -IDEOGRAM 0x6421 - 0x647e -IDEOGRAM 0x6521 - 0x657e -IDEOGRAM 0x6621 - 0x667e -IDEOGRAM 0x6721 - 0x677e -IDEOGRAM 0x6821 - 0x687e -IDEOGRAM 0x6921 - 0x697e -IDEOGRAM 0x6a21 - 0x6a7e -IDEOGRAM 0x6b21 - 0x6b7e -IDEOGRAM 0x6c21 - 0x6c7e -IDEOGRAM 0x6d21 - 0x6d7e -IDEOGRAM 0x6e21 - 0x6e7e -IDEOGRAM 0x6f21 - 0x6f7e -IDEOGRAM 0x7021 - 0x707e -IDEOGRAM 0x7121 - 0x717e -IDEOGRAM 0x7221 - 0x727e -IDEOGRAM 0x7321 - 0x737e -IDEOGRAM 0x7421 - 0x7424 - -SWIDTH2 0x2121 - 0x217e -SWIDTH2 0x2221 - 0x222e 0x223a - 0x2241 -SWIDTH2 0x224a - 0x2250 0x225c - 0x226a -SWIDTH2 0x2272 - 0x2279 0x227e -SWIDTH2 0x2330 - 0x2339 -SWIDTH2 0x2341 - 0x235a 0x2361 - 0x237a /* Romaji */ -SWIDTH2 0x2421 - 0x2473 -SWIDTH2 0x2521 - 0x2576 -SWIDTH2 0x2621 - 0x2638 0x2641 - 0x2658 /* Greek */ -SWIDTH2 0x2721 - 0x2741 0x2751 - 0x2771 /* Cyrillic */ -SWIDTH2 0x2821 - 0x2840 0x3021 - 0x307e -SWIDTH2 0x3121 - 0x317e 0x3221 - 0x327e -SWIDTH2 0x3321 - 0x337e 0x3421 - 0x347e -SWIDTH2 0x3521 - 0x357e 0x3621 - 0x367e -SWIDTH2 0x3721 - 0x377e 0x3821 - 0x387e -SWIDTH2 0x3921 - 0x397e 0x3a21 - 0x3a7e -SWIDTH2 0x3b21 - 0x3b7e 0x3c21 - 0x3c7e -SWIDTH2 0x3d21 - 0x3d7e 0x3e21 - 0x3e7e -SWIDTH2 0x3f21 - 0x3f7e 0x4021 - 0x407e -SWIDTH2 0x4121 - 0x417e 0x4221 - 0x427e -SWIDTH2 0x4321 - 0x437e 0x4421 - 0x447e -SWIDTH2 0x4521 - 0x457e 0x4621 - 0x467e -SWIDTH2 0x4721 - 0x477e 0x4821 - 0x487e -SWIDTH2 0x4921 - 0x497e 0x4a21 - 0x4a7e -SWIDTH2 0x4b21 - 0x4b7e 0x4c21 - 0x4c7e -SWIDTH2 0x4d21 - 0x4d7e 0x4e21 - 0x4e7e -SWIDTH2 0x4f21 - 0x4f53 0x5021 - 0x507e -SWIDTH2 0x5121 - 0x517e 0x5221 - 0x527e -SWIDTH2 0x5321 - 0x537e 0x5421 - 0x547e -SWIDTH2 0x5521 - 0x557e 0x5621 - 0x567e -SWIDTH2 0x5721 - 0x577e 0x5821 - 0x587e -SWIDTH2 0x5921 - 0x597e 0x5a21 - 0x5a7e -SWIDTH2 0x5b21 - 0x5b7e 0x5c21 - 0x5c7e -SWIDTH2 0x5d21 - 0x5d7e 0x5e21 - 0x5e7e -SWIDTH2 0x5f21 - 0x5f7e 0x6021 - 0x607e -SWIDTH2 0x6121 - 0x617e 0x6221 - 0x627e -SWIDTH2 0x6321 - 0x637e 0x6421 - 0x647e -SWIDTH2 0x6521 - 0x657e 0x6621 - 0x667e -SWIDTH2 0x6721 - 0x677e 0x6821 - 0x687e -SWIDTH2 0x6921 - 0x697e 0x6a21 - 0x6a7e -SWIDTH2 0x6b21 - 0x6b7e 0x6c21 - 0x6c7e -SWIDTH2 0x6d21 - 0x6d7e 0x6e21 - 0x6e7e -SWIDTH2 0x6f21 - 0x6f7e 0x7021 - 0x707e -SWIDTH2 0x7121 - 0x717e 0x7221 - 0x727e -SWIDTH2 0x7321 - 0x737e 0x7421 - 0x7424 diff --git a/share/locale/ctype/charset/KSC5601 b/share/locale/ctype/charset/KSC5601 deleted file mode 100644 index ae81666444..0000000000 --- a/share/locale/ctype/charset/KSC5601 +++ /dev/null @@ -1,154 +0,0 @@ -/* $NetBSD: KSC5601,v 1.2 2006/12/04 15:01:43 tnozaki Exp $ */ - -/* - * KSC5601 (ESC $ ( C) - */ -CHARSET "$(C" - -/* - * Derived from FreeBSD: /usr/src/usr.bin/mklocale/data/ko_KR.EUC.src: - * Korean LOCALE_CTYPE definitions using EUC-KR character sets - * - * Choi Jun Ho, junker@vishnu.snu.ac.kr - * NARAE, Seoul National Univ., CS Dept. - * 96.12.3 - * - * It is based on manpage mklocale(1), euc(4). - */ - -ALPHA 0x2341 - 0x235a 0x2361 - 0x237a -DIGIT 0x2330 - 0x2339 -UPPER 0x2341 - 0x235a -LOWER 0x2361 - 0x237a -PUNCT 0x2321 - 0x232f 0x233a - 0x2340 -PUNCT 0x235b - 0x2360 0x237b - 0x237e -SPACE 0x2121 -XDIGIT 0x2341 - 0x2346 0x2361 - 0x2366 -BLANK 0x2121 -SPECIAL 0x2122 - 0x2268 - -MAPLOWER < 0x2341 - 0x235a : 0x2361 > -MAPLOWER < 0x2361 - 0x237a : 0x2361 > -MAPUPPER < 0x2341 - 0x235a : 0x2341 > -MAPUPPER < 0x2330 - 0x2339 : 0x2341 > -TODIGIT < 0x2331 - 0x2339 : 0 > -TODIGIT < 0x2341 - 0x2346 : 10 > -TODIGIT < 0x2361 - 0x2366 : 10 > - -/* Greek */ -UPPER 0x2541 - 0x2558 -LOWER 0x2561 - 0x2578 -MAPLOWER < 0x2541 - 0x2558 : 0x2561 > -MAPLOWER < 0x2561 - 0x2578 : 0x2561 > -MAPUPPER < 0x2541 - 0x2558 : 0x2541 > -MAPUPPER < 0x2561 - 0x2578 : 0x2541 > - -/* Cyrillic */ -UPPER 0x2c21 - 0x2c41 -LOWER 0x2c51 - 0x2c71 -MAPLOWER < 0x2c21 - 0x2c41 : 0x2c51 > -MAPLOWER < 0x2c51 - 0x2c71 : 0x2c51 > -MAPUPPER < 0x2c21 - 0x2c41 : 0x2c21 > -MAPUPPER < 0x2c51 - 0x2c71 : 0x2c21 > - -/* greek digit */ -SPECIAL 0x2521 - 0x252a 0x2530 - 0x2539 -/* symbols */ -SPECIAL 0x2621 - 0x2664 0x2721 - 0x276f -/* circle symbols */ -SPECIAL 0x2821 - 0x287e 0x2921 - 0x297e - -PHONOGRAM 0x2421 - 0x247e /* no combined hangul */ -PHONOGRAM 0x2a21 - 0x2a73 /* hirakana */ -PHONOGRAM 0x2b21 - 0x2b73 /* katakana */ - -/* hangul composed */ -PHONOGRAM 0x3021 - 0x307e 0x3121 - 0x317e -PHONOGRAM 0x3221 - 0x327e 0x3321 - 0x337e -PHONOGRAM 0x3421 - 0x347e 0x3521 - 0x357e -PHONOGRAM 0x3621 - 0x367e 0x3721 - 0x377e -PHONOGRAM 0x3821 - 0x387e 0x3921 - 0x397e -PHONOGRAM 0x3a21 - 0x3a7e 0x3b21 - 0x3b7e -PHONOGRAM 0x3c21 - 0x3c7e 0x3d21 - 0x3d7e -PHONOGRAM 0x3e21 - 0x3e7e 0x3f21 - 0x3f7e -PHONOGRAM 0x4021 - 0x407e 0x4121 - 0x417e -PHONOGRAM 0x4221 - 0x427e 0x4321 - 0x437e -PHONOGRAM 0x4421 - 0x447e 0x4521 - 0x457e -PHONOGRAM 0x4621 - 0x467e 0x4721 - 0x477e -PHONOGRAM 0x4821 - 0x487e - -/* hanja */ -IDEOGRAM 0x4a21 - 0x4a7e 0x4b21 - 0x4b7e -IDEOGRAM 0x4c21 - 0x4c7e 0x4d21 - 0x4d7e -IDEOGRAM 0x4e21 - 0x4e7e 0x4f21 - 0x4f7e -IDEOGRAM 0x5021 - 0x507e 0x5121 - 0x517e -IDEOGRAM 0x5221 - 0x527e 0x5321 - 0x537e -IDEOGRAM 0x5421 - 0x547e 0x5521 - 0x557e -IDEOGRAM 0x5621 - 0x567e 0x5721 - 0x577e -IDEOGRAM 0x5821 - 0x587e 0x5921 - 0x597e -IDEOGRAM 0x5a21 - 0x5a7e 0x5b21 - 0x5b7e -IDEOGRAM 0x5c21 - 0x5c7e 0x5d21 - 0x5d7e -IDEOGRAM 0x5e21 - 0x5e7e 0x5f21 - 0x5f7e -IDEOGRAM 0x6021 - 0x607e 0x6121 - 0x617e -IDEOGRAM 0x6221 - 0x627e 0x6321 - 0x637e -IDEOGRAM 0x6421 - 0x647e 0x6521 - 0x657e -IDEOGRAM 0x6621 - 0x667e 0x6721 - 0x677e -IDEOGRAM 0x6821 - 0x687e 0x6921 - 0x697e -IDEOGRAM 0x6a21 - 0x6a7e 0x6b21 - 0x6b7e -IDEOGRAM 0x6c21 - 0x6c7e 0x6d21 - 0x6d7e -IDEOGRAM 0x6e21 - 0x6e7e 0x6f21 - 0x6f7e -IDEOGRAM 0x7021 - 0x707e 0x7121 - 0x717e -IDEOGRAM 0x7221 - 0x727e 0x7321 - 0x737e -IDEOGRAM 0x7421 - 0x747e 0x7521 - 0x757e -IDEOGRAM 0x7621 - 0x767e 0x7721 - 0x777e -IDEOGRAM 0x7821 - 0x787e 0x7921 - 0x797e -IDEOGRAM 0x7a21 - 0x7a7e 0x7b21 - 0x7b7e -IDEOGRAM 0x7c21 - 0x7c7e 0x7d21 - 0x7d7e - - -SWIDTH2 0x2121 - 0x2265 0x2321 - 0x237e -SWIDTH2 0x2421 - 0x247e 0x2521 - 0x252a -SWIDTH2 0x2530 - 0x2539 0x2541 - 0x2558 -SWIDTH2 0x2561 - 0x2578 0x2621 - 0x2664 -SWIDTH2 0x2721 - 0x276f 0x2821 - 0x287e -SWIDTH2 0x2921 - 0x297e 0x2a21 - 0x2a73 -SWIDTH2 0x2b21 - 0x2b73 0x2c21 - 0x2c41 -SWIDTH2 0x2c51 - 0x2c71 0x3021 - 0x307e -SWIDTH2 0x3121 - 0x317e 0x3221 - 0x327e -SWIDTH2 0x3321 - 0x337e 0x3421 - 0x347e -SWIDTH2 0x3521 - 0x357e 0x3621 - 0x367e -SWIDTH2 0x3721 - 0x377e 0x3821 - 0x387e -SWIDTH2 0x3921 - 0x397e 0x3a21 - 0x3a7e -SWIDTH2 0x3b21 - 0x3b7e 0x3c21 - 0x3c7e -SWIDTH2 0x3d21 - 0x3d7e 0x3e21 - 0x3e7e -SWIDTH2 0x3f21 - 0x3f7e 0x4021 - 0x407e -SWIDTH2 0x4121 - 0x417e 0x4221 - 0x427e -SWIDTH2 0x4321 - 0x437e 0x4421 - 0x447e -SWIDTH2 0x4521 - 0x457e 0x4621 - 0x467e -SWIDTH2 0x4721 - 0x477e 0x4821 - 0x487e -SWIDTH2 0x4a21 - 0x4a7e 0x4b21 - 0x4b7e -SWIDTH2 0x4c21 - 0x4c7e 0x4d21 - 0x4d7e -SWIDTH2 0x4e21 - 0x4e7e 0x4f21 - 0x4f7e -SWIDTH2 0x5021 - 0x507e 0x5121 - 0x517e -SWIDTH2 0x5221 - 0x527e 0x5321 - 0x537e -SWIDTH2 0x5421 - 0x547e 0x5521 - 0x557e -SWIDTH2 0x5621 - 0x567e 0x5721 - 0x577e -SWIDTH2 0x5821 - 0x587e 0x5921 - 0x597e -SWIDTH2 0x5a21 - 0x5a7e 0x5b21 - 0x5b7e -SWIDTH2 0x5c21 - 0x5c7e 0x5d21 - 0x5d7e -SWIDTH2 0x5e21 - 0x5e7e 0x5f21 - 0x5f7e -SWIDTH2 0x6021 - 0x607e 0x6121 - 0x617e -SWIDTH2 0x6221 - 0x627e 0x6321 - 0x637e -SWIDTH2 0x6421 - 0x647e 0x6521 - 0x657e -SWIDTH2 0x6621 - 0x667e 0x6721 - 0x677e -SWIDTH2 0x6821 - 0x687e 0x6921 - 0x697e -SWIDTH2 0x6a21 - 0x6a7e 0x6b21 - 0x6b7e -SWIDTH2 0x6c21 - 0x6c7e 0x6d21 - 0x6d7e -SWIDTH2 0x6e21 - 0x6e7e 0x6f21 - 0x6f7e -SWIDTH2 0x7021 - 0x707e 0x7121 - 0x717e -SWIDTH2 0x7221 - 0x727e 0x7321 - 0x737e -SWIDTH2 0x7421 - 0x747e 0x7521 - 0x757e -SWIDTH2 0x7621 - 0x767e 0x7721 - 0x777e -SWIDTH2 0x7821 - 0x787e 0x7921 - 0x797e -SWIDTH2 0x7a21 - 0x7a7e 0x7b21 - 0x7b7e -SWIDTH2 0x7c21 - 0x7c7e 0x7d21 - 0x7d7e diff --git a/share/locale/ctype/charset/Latin-1 b/share/locale/ctype/charset/Latin-1 deleted file mode 100644 index 226a8d87b6..0000000000 --- a/share/locale/ctype/charset/Latin-1 +++ /dev/null @@ -1,26 +0,0 @@ -/* $NetBSD: Latin-1,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-1, known as Latin 1 (ESC , A) - */ -CHARSET ",A" - -ALPHA 0x40 - 0x56 0x58 - 0x76 0x78 - 0x7f -GRAPH 0x21 - 0x7f -LOWER 0x60 - 0x76 0x78 - 0x7f -PUNCT 0x21 - 0x3f 0x57 0x77 -SPACE 0x09 - 0x0d 0x20 -UPPER 0x40 - 0x56 0x58 - 0x5f -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x40 - 0x56 : 0x60 > -MAPLOWER < 0x58 - 0x5f : 0x78 > -MAPLOWER < 0x60 - 0x76 : 0x60 > -MAPLOWER < 0x78 - 0x7f : 0x78 > - -MAPUPPER < 0x40 - 0x56 : 0x40 > -MAPUPPER < 0x58 - 0x5f : 0x58 > -MAPUPPER < 0x60 - 0x76 : 0x40 > -MAPUPPER < 0x78 - 0x7f : 0x58 > diff --git a/share/locale/ctype/charset/Latin-2 b/share/locale/ctype/charset/Latin-2 deleted file mode 100644 index 4cecb64934..0000000000 --- a/share/locale/ctype/charset/Latin-2 +++ /dev/null @@ -1,55 +0,0 @@ -/* $NetBSD: Latin-2,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-2, known as Latin 2 (ESC , B) - * - * XXX is it correct?? - */ -CHARSET ",B" - -ALPHA 0x21 0x23 0x25 - 0x26 0x29 - 0x2c 0x2e - 0x2f -ALPHA 0x31 0x33 0x35 - 0x36 0x39 - 0x3c 0x3e - 0x3f -ALPHA 0x40 - 0x56 0x58 - 0x5f -ALPHA 0x60 - 0x76 0x78 - 0x7e -GRAPH 0x21 - 0x7f -LOWER 0x31 0x33 0x35 - 0x36 0x39 - 0x3c 0x3e - 0x3f -LOWER 0x60 - 0x76 0x78 - 0x7e 0x5f -PUNCT 0x22 0x24 0x27 0x28 0x2d -PUNCT 0x30 0x32 0x34 0x37 0x38 0x3d -PUNCT 0x57 0x77 0x7f -SPACE 0x09 - 0x0d 0x20 -UPPER 0x21 0x23 0x25 - 0x26 0x29 - 0x2c 0x2e - 0x2f -UPPER 0x40 - 0x56 0x58 - 0x5e -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x21 : 0x31 > -MAPLOWER < 0x23 : 0x33 > -MAPLOWER < 0x25 - 0x26 : 0x35 > -MAPLOWER < 0x29 - 0x2c : 0x39 > -MAPLOWER < 0x2e - 0x2f : 0x3e > -MAPLOWER < 0x31 : 0x31 > -MAPLOWER < 0x33 : 0x33 > -MAPLOWER < 0x35 - 0x36 : 0x35 > -MAPLOWER < 0x39 - 0x3c : 0x39 > -MAPLOWER < 0x3e - 0x3f : 0x3e > -MAPLOWER < 0x40 - 0x56 : 0x60 > -MAPLOWER < 0x58 - 0x5e : 0x78 > -MAPLOWER < 0x60 - 0x76 : 0x60 > -MAPLOWER < 0x78 - 0x7e : 0x78 > - -MAPUPPER < 0x21 : 0x21 > -MAPUPPER < 0x23 : 0x23 > -MAPUPPER < 0x25 - 0x26 : 0x25 > -MAPUPPER < 0x29 - 0x2c : 0x29 > -MAPUPPER < 0x2e - 0x2f : 0x2e > -MAPUPPER < 0x31 : 0x21 > -MAPUPPER < 0x33 : 0x23 > -MAPUPPER < 0x35 - 0x36 : 0x25 > -MAPUPPER < 0x39 - 0x3c : 0x29 > -MAPUPPER < 0x3e - 0x3f : 0x2e > -MAPUPPER < 0x40 - 0x56 : 0x40 > -MAPUPPER < 0x58 - 0x5e : 0x58 > -MAPUPPER < 0x60 - 0x76 : 0x40 > -MAPUPPER < 0x78 - 0x7e : 0x58 > diff --git a/share/locale/ctype/charset/Latin-3 b/share/locale/ctype/charset/Latin-3 deleted file mode 100644 index 346bee194f..0000000000 --- a/share/locale/ctype/charset/Latin-3 +++ /dev/null @@ -1,64 +0,0 @@ -/* $NetBSD: Latin-3,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-3, known as Latin 3 (ESC , C) - * - * XXX is it correct?? I'm not sure... - * there are several undefined chars, which makes this definition file - * very complex. - */ -CHARSET ",C" - -ALPHA 0x21 0x26 0x29 - 0x2c 0x2f -ALPHA 0x31 0x36 0x39 - 0x3c 0x3f -ALPHA 0x40 - 0x42 0x44 - 0x4f 0x51 - 0x56 0x58 - 0x5f -ALPHA 0x60 - 0x62 0x64 - 0x6f 0x71 - 0x76 0x78 - 0x7e -GRAPH 0x21 - 0x7f -LOWER 0x31 0x36 0x39 - 0x3c 0x3f -LOWER 0x60 - 0x76 0x78 - 0x7e 0x5f -PUNCT 0x22 - 0x24 0x27 - 0x28 0x2d -PUNCT 0x30 0x32 - 0x34 0x37 - 0x38 0x3d -PUNCT 0x57 0x77 0x7f -SPACE 0x09 - 0x0d 0x20 -UPPER 0x21 0x26 0x29 - 0x2c 0x2f -UPPER 0x40 - 0x56 0x58 - 0x5e -BLANK 0x09 0x20 -PRINT 0x20 - 0x24 0x26 - 0x2d 0x2f -PRINT 0x30 - 0x3d 0x3f -PRINT 0x40 - 0x42 0x44 - 0x4f 0x51 - 0x5f -PRINT 0x60 - 0x62 0x64 - 0x6f 0x71 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x21 : 0x31 > -MAPLOWER < 0x26 : 0x36 > -MAPLOWER < 0x29 - 0x2c : 0x39 > -MAPLOWER < 0x2f : 0x3f > -MAPLOWER < 0x31 : 0x31 > -MAPLOWER < 0x36 : 0x36 > -MAPLOWER < 0x39 - 0x3c : 0x39 > -MAPLOWER < 0x3f : 0x3f > -MAPLOWER < 0x40 - 0x42 : 0x60 > -MAPLOWER < 0x44 - 0x4f : 0x64 > -MAPLOWER < 0x51 - 0x56 : 0x71 > -MAPLOWER < 0x58 - 0x5e : 0x78 > -MAPLOWER < 0x60 - 0x62 : 0x60 > -MAPLOWER < 0x64 - 0x6f : 0x64 > -MAPLOWER < 0x71 - 0x76 : 0x71 > -MAPLOWER < 0x78 - 0x7e : 0x78 > - -MAPUPPER < 0x21 : 0x21 > -MAPUPPER < 0x26 : 0x26 > -MAPUPPER < 0x29 - 0x2c : 0x29 > -MAPUPPER < 0x2f : 0x2f > -MAPUPPER < 0x31 : 0x21 > -MAPUPPER < 0x36 : 0x26 > -MAPUPPER < 0x39 - 0x3c : 0x29 > -MAPUPPER < 0x3f : 0x2f > -MAPUPPER < 0x40 - 0x42 : 0x40 > -MAPUPPER < 0x44 - 0x4f : 0x44 > -MAPUPPER < 0x51 - 0x56 : 0x51 > -MAPUPPER < 0x58 - 0x5e : 0x58 > -MAPUPPER < 0x60 - 0x62 : 0x40 > -MAPUPPER < 0x64 - 0x6f : 0x44 > -MAPUPPER < 0x71 - 0x76 : 0x51 > -MAPUPPER < 0x78 - 0x7e : 0x58 > diff --git a/share/locale/ctype/charset/Latin-4 b/share/locale/ctype/charset/Latin-4 deleted file mode 100644 index b5bc129bf5..0000000000 --- a/share/locale/ctype/charset/Latin-4 +++ /dev/null @@ -1,58 +0,0 @@ -/* $NetBSD: Latin-4,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-4, known as Latin 4 (ESC , D) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",D" - -ALPHA 0x21 0x22 0x23 0x25 - 0x26 0x29 - 0x2c 0x2e -ALPHA 0x31 0x33 0x35 - 0x36 0x39 - 0x3c 0x3e -ALPHA 0x3d 0x3f -ALPHA 0x40 - 0x56 0x58 - 0x76 0x78 - 0x7f -GRAPH 0x21 - 0x7f -LOWER 0x31 0x33 0x35 - 0x36 0x39 - 0x3c 0x3e 0x3f 0x22 -LOWER 0x60 - 0x76 0x78 - 0x7e 0x5f -PUNCT 0x24 0x27 - 0x28 0x2d 0x2f -PUNCT 0x30 0x32 0x34 0x37 - 0x38 -SPACE 0x09 - 0x0d 0x20 -UPPER 0x21 0x23 0x25 - 0x26 0x29 - 0x2c 0x2e 0x3d -UPPER 0x40 - 0x56 0x58 - 0x5e -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x21 : 0x31 > -MAPLOWER < 0x23 : 0x33 > -MAPLOWER < 0x25 - 0x26 : 0x35 > -MAPLOWER < 0x29 - 0x2c : 0x39 > -MAPLOWER < 0x2e : 0x3e > -MAPLOWER < 0x31 : 0x31 > -MAPLOWER < 0x33 : 0x33 > -MAPLOWER < 0x35 - 0x36 : 0x35 > -MAPLOWER < 0x39 - 0x3c : 0x39 > -MAPLOWER < 0x3e : 0x3e > -MAPLOWER < 0x3d : 0x3f > -MAPLOWER < 0x3f : 0x3f > -MAPLOWER < 0x40 - 0x56 : 0x60 > -MAPLOWER < 0x58 - 0x5e : 0x78 > -MAPLOWER < 0x60 - 0x76 : 0x60 > -MAPLOWER < 0x78 - 0x7e : 0x78 > - -MAPUPPER < 0x21 : 0x21 > -MAPUPPER < 0x23 : 0x23 > -MAPUPPER < 0x25 - 0x26 : 0x25 > -MAPUPPER < 0x29 - 0x2c : 0x29 > -MAPUPPER < 0x2e : 0x2e > -MAPUPPER < 0x31 : 0x21 > -MAPUPPER < 0x33 : 0x23 > -MAPUPPER < 0x35 - 0x36 : 0x25 > -MAPUPPER < 0x39 - 0x3c : 0x29 > -MAPUPPER < 0x3e : 0x2e > -MAPUPPER < 0x3d : 0x3d > -MAPUPPER < 0x3f : 0x3d > -MAPUPPER < 0x40 - 0x56 : 0x40 > -MAPUPPER < 0x58 - 0x5e : 0x58 > -MAPUPPER < 0x60 - 0x76 : 0x40 > -MAPUPPER < 0x78 - 0x7e : 0x58 > diff --git a/share/locale/ctype/charset/Latin-5 b/share/locale/ctype/charset/Latin-5 deleted file mode 100644 index d1fe5e7d4c..0000000000 --- a/share/locale/ctype/charset/Latin-5 +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: Latin-5,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-9, known as Latin-5 (ESC , M) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",M" - -ALPHA 0x40 - 0x56 0x58 - 0x5f -ALPHA 0x60 - 0x76 0x78 - 0x7f -GRAPH 0x21 - 0x7f -LOWER 0x60 - 0x76 0x78 - 0x7f -PUNCT 0x21 - 0x3f 0x57 0x77 -SPACE 0x09 - 0x0d 0x20 -UPPER 0x40 - 0x56 0x58 - 0x5f -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x40 - 0x56 : 0x60 > -MAPLOWER < 0x58 - 0x5e : 0x78 > -MAPLOWER < 0x60 - 0x76 : 0x60 > -MAPLOWER < 0x78 - 0x7e : 0x78 > - -MAPUPPER < 0x40 - 0x56 : 0x40 > -MAPUPPER < 0x58 - 0x5e : 0x58 > -MAPUPPER < 0x60 - 0x76 : 0x40 > -MAPUPPER < 0x78 - 0x7e : 0x58 > diff --git a/share/locale/ctype/charset/Latin-6 b/share/locale/ctype/charset/Latin-6 deleted file mode 100644 index 979439829b..0000000000 --- a/share/locale/ctype/charset/Latin-6 +++ /dev/null @@ -1,41 +0,0 @@ -/* $NetBSD: Latin-6,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-10, known as Latin-6 (ESC , V) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",V" - -ALPHA 0x21 - 0x26 0x28 - 0x2c 0x2e - 0x2f -ALPHA 0x31 - 0x36 0x38 - 0x3c 0x3e - 0x3f -ALPHA 0x40 - 0x5f -ALPHA 0x60 - 0x7f -GRAPH 0x21 - 0x7f -LOWER 0x31 - 0x36 0x38 - 0x3c 0x3e - 0x3f -LOWER 0x60 - 0x7f -PUNCT 0x27 0x2d 0x37 0x3d -SPACE 0x09 - 0x0d 0x20 -UPPER 0x21 - 0x26 0x28 - 0x2c 0x2e - 0x2f -UPPER 0x40 - 0x5f -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x21 - 0x26 : 0x31 > -MAPLOWER < 0x28 - 0x2c : 0x38 > -MAPLOWER < 0x2e - 0x2f : 0x3e > -MAPLOWER < 0x31 - 0x36 : 0x31 > -MAPLOWER < 0x38 - 0x3c : 0x38 > -MAPLOWER < 0x3e - 0x3f : 0x3e > -MAPLOWER < 0x40 - 0x5f : 0x60 > -MAPLOWER < 0x60 - 0x7f : 0x60 > - -MAPUPPER < 0x21 - 0x26 : 0x21 > -MAPUPPER < 0x28 - 0x2c : 0x28 > -MAPUPPER < 0x2e - 0x2f : 0x2e > -MAPUPPER < 0x31 - 0x36 : 0x21 > -MAPUPPER < 0x38 - 0x3c : 0x28 > -MAPUPPER < 0x3e - 0x3f : 0x2e > -MAPUPPER < 0x40 - 0x5f : 0x40 > -MAPUPPER < 0x60 - 0x7f : 0x40 > diff --git a/share/locale/ctype/charset/Latin-6+ b/share/locale/ctype/charset/Latin-6+ deleted file mode 100644 index 5038283b07..0000000000 --- a/share/locale/ctype/charset/Latin-6+ +++ /dev/null @@ -1,23 +0,0 @@ -/* $NetBSD: Latin-6+,v 1.1 2000/12/30 02:33:21 itojun Exp $ */ - -/* - * iso-8859-10 additions, known as Latin-6 (ESC , X) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",X" - -ALPHA 0x40 - 0x4f 0x60 - 0x6f -GRAPH 0x20 0x30 0x40 - 0x4f 0x60 - 0x6f -LOWER 0x60 - 0x6f -PUNCT 0x20 0x30 -UPPER 0x40 - 0x4f -BLANK 0x20 -PRINT 0x20 0x30 0x40 - 0x4f 0x60 - 0x6f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x40 - 0x4f : 0x60 > -MAPLOWER < 0x60 - 0x6f : 0x60 > - -MAPUPPER < 0x40 - 0x4f : 0x40 > -MAPUPPER < 0x60 - 0x6f : 0x40 > diff --git a/share/locale/ctype/charset/Latin-Cyrillic b/share/locale/ctype/charset/Latin-Cyrillic deleted file mode 100644 index cb8cfbb599..0000000000 --- a/share/locale/ctype/charset/Latin-Cyrillic +++ /dev/null @@ -1,35 +0,0 @@ -/* $NetBSD: Latin-Cyrillic,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-5, known as Cyrillic (ESC , L) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",L" - -ALPHA 0x30 - 0x4f -ALPHA 0x50 - 0x6f -ALPHA 0x21 - 0x2c 0x2e - 0x2f -ALPHA 0x71 - 0x7c 0x7e - 0x7f -GRAPH 0x21 - 0x7f -LOWER 0x50 - 0x6f 0x71 - 0x7c 0x7e - 0x7f -PUNCT 0x2d 0x70 0x7d -SPACE 0x09 - 0x0d 0x20 -UPPER 0x30 - 0x4f 0x21 - 0x2c 0x2e - 0x2f -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x21 - 0x2c : 0x71 > -MAPLOWER < 0x2e - 0x2f : 0x7e > -MAPLOWER < 0x30 - 0x4f : 0x50 > -MAPLOWER < 0x50 - 0x6f : 0x50 > -MAPLOWER < 0x71 - 0x7c : 0x71 > -MAPLOWER < 0x7e - 0x7f : 0x7e > - -MAPUPPER < 0x21 - 0x2c : 0x21 > -MAPUPPER < 0x2e - 0x2f : 0x2e > -MAPUPPER < 0x30 - 0x4f : 0x30 > -MAPUPPER < 0x50 - 0x6f : 0x30 > -MAPUPPER < 0x71 - 0x7c : 0x21 > -MAPUPPER < 0x7e - 0x7f : 0x2e > diff --git a/share/locale/ctype/charset/Latin-Greek b/share/locale/ctype/charset/Latin-Greek deleted file mode 100644 index 7e27400e2f..0000000000 --- a/share/locale/ctype/charset/Latin-Greek +++ /dev/null @@ -1,30 +0,0 @@ -/* $NetBSD: Latin-Greek,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-7, known as Latin-Greek (ESC , F) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",F" - -ALPHA 0x36 0x38 - 0x3a 0x3c 0x3e 0x3f -ALPHA 0x40 - 0x51 0x53 - 0x7e -GRAPH 0x21 - 0x23 0x26 - 0x29 0x2b - 0x2d 0x2f - 0x35 0x37 0x3b 0x3d -LOWER 0x61 - 0x71 0x73 - 0x7b 0x5c 0x5d - 0x5f 0x7c 0x7d - 0x7e -LOWER 0x72 0x40 0x60 -PUNCT 0x21 - 0x23 0x25 - 0x29 0x2b - 0x2d 0x2f - 0x35 0x37 0x3b 0x3d -SPACE 0x09 - 0x0d 0x20 -UPPER 0x41 - 0x51 0x53 - 0x5b 0x36 0x38 - 0x3a 0x3c 0x3e - 0x3f -BLANK 0x09 0x20 -PRINT 0x20 - 0x7f -SWIDTH1 0x20 - 0x7f - -MAPLOWER < 0x40 - 0x56 : 0x60 > -MAPLOWER < 0x58 - 0x5e : 0x78 > -MAPLOWER < 0x60 - 0x76 : 0x60 > -MAPLOWER < 0x78 - 0x7e : 0x78 > - -MAPUPPER < 0x40 - 0x56 : 0x40 > -MAPUPPER < 0x58 - 0x5e : 0x58 > -MAPUPPER < 0x60 - 0x76 : 0x40 > -MAPUPPER < 0x78 - 0x7e : 0x58 > diff --git a/share/locale/ctype/charset/Latin-Hebrew b/share/locale/ctype/charset/Latin-Hebrew deleted file mode 100644 index 5741504b71..0000000000 --- a/share/locale/ctype/charset/Latin-Hebrew +++ /dev/null @@ -1,16 +0,0 @@ -/* $NetBSD: Latin-Hebrew,v 1.2 2005/03/09 11:54:13 tshiozak Exp $ */ - -/* - * iso-8859-8, known as Latin-Hebrew (ESC , H) - * - * XXX is it correct? i'm not sure. - */ -CHARSET ",H" - -ALPHA 0x60 - 0x7a -GRAPH 0x22 - 0x3e 0x5f 0x60 - 0x7a -PUNCT 0x22 - 0x3e -SPACE 0x09 - 0x0d 0x20 -BLANK 0x09 0x20 -PRINT 0x20 0x22 - 0x3e 0x5f 0x60 - 0x7a -SWIDTH1 0x20 - 0x7f diff --git a/share/locale/ctype/ja_JP.CTEXT.src b/share/locale/ctype/ja_JP.CTEXT.src deleted file mode 100644 index 47857a1ae6..0000000000 --- a/share/locale/ctype/ja_JP.CTEXT.src +++ /dev/null @@ -1,21 +0,0 @@ -/* $NetBSD: ja_JP.CTEXT.src,v 1.2 2001/03/26 19:56:36 tshiozak Exp $ */ -/* @(#)Japanese 8.1 (Berkeley) 6/6/93 */ - -/* - * LOCALE_CTYPE definitions for ctext encoding, Japanese chars - */ - -ENCODING "ISO2022" - -/* - * In specification, 94x94 can be designated to G1 too. - * We omit that case for simplicity. - * For mbtowc(), we can accept G1 designated to 94x94, so it is safe to do so. - */ -VARIABLE 8BIT MAX1 INIT0=94B INIT1=96A 0=94 1=96 1=94I 0=94$ 1=96$ NOOLD CODESET=CTEXT - -#include "charset/ASCII" -#include "charset/Latin-1" -#include "charset/JISX0201-left" -#include "charset/JISX0201-right" -#include "charset/JISX0208-1983" diff --git a/share/locale/ctype/ja_JP.ISO-2022-JP-2.src b/share/locale/ctype/ja_JP.ISO-2022-JP-2.src deleted file mode 100644 index 9cadfe0ebb..0000000000 --- a/share/locale/ctype/ja_JP.ISO-2022-JP-2.src +++ /dev/null @@ -1,15 +0,0 @@ -/* $NetBSD: ja_JP.ISO-2022-JP-2.src,v 1.2 2001/03/26 19:56:36 tshiozak Exp $ */ -/* @(#)Japanese 8.1 (Berkeley) 6/6/93 */ - -/* - * LOCALE_CTYPE definitions using iso-2022-jp-2 (RFC1554) - */ - -ENCODING "ISO2022" - -VARIABLE MAX2 INIT0=94B 0=94 0=94$ 2=96 2=96$ SS2 CODESET=ISO2022-JP2 - -#include "charset/ASCII" -#include "charset/Latin-1" -#include "charset/JISX0201-left" -#include "charset/JISX0208-1983" diff --git a/share/locale/ctype/ja_JP.ISO-2022-JP.src b/share/locale/ctype/ja_JP.ISO-2022-JP.src deleted file mode 100644 index 1f73347459..0000000000 --- a/share/locale/ctype/ja_JP.ISO-2022-JP.src +++ /dev/null @@ -1,18 +0,0 @@ -/* $NetBSD: ja_JP.ISO-2022-JP.src,v 1.2 2001/03/26 19:56:36 tshiozak Exp $ */ -/* @(#)Japanese 8.1 (Berkeley) 6/6/93 */ - -/* - * LOCALE_CTYPE definitions using iso-2022-jp (RFC1468) - */ - -ENCODING "ISO2022" - -VARIABLE INIT0=94B CODESET=ISO2022-JP - -#include "charset/ASCII" -#include "charset/JISX0201-left" -#if 1 -/* obsolete, should not be used... */ -#include "charset/JISX0208-1978" -#endif -#include "charset/JISX0208-1983" diff --git a/share/locale/ctype/ja_JP.eucJP.src b/share/locale/ctype/ja_JP.eucJP.src deleted file mode 100644 index a2f8fc4e9c..0000000000 --- a/share/locale/ctype/ja_JP.eucJP.src +++ /dev/null @@ -1,421 +0,0 @@ -/* $NetBSD: ja_JP.eucJP.src,v 1.4 2006/04/11 18:45:03 tnozaki Exp $ */ -/* @(#)Japanese 8.1 (Berkeley) 6/6/93 */ - -/* - * Japanese LOCALE_CTYPE definitions using EUC of JIS character sets - */ - -ENCODING "EUC" - -/* ISO JIS JIS JIS */ -/* 8859-1 X208 X201 X212 */ -/* GL GR */ - -VARIABLE 1 0x0000 2 0x8080 2 0x800080 3 0x8000 0x808080 CODESET=eucJP - -/* - * Code Set 1 - */ -ALPHA 'A' - 'Z' 'a' - 'z' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d ' ' -UPPER 'A' - 'Z' -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' -BLANK ' ' '\t' -PRINT 0x20 - 0x7e -SWIDTH1 0x20 - 0x7e - -MAPLOWER <'A' - 'Z' : 'a'> -MAPLOWER <'a' - 'z' : 'a'> -MAPUPPER <'A' - 'Z' : 'A'> -MAPUPPER <'a' - 'z' : 'A'> -TODIGIT <'0' - '9' : 0> -TODIGIT <'A' - 'F' : 10> -TODIGIT <'a' - 'f' : 10> - -/* - * CR control characters - */ -CONTROL 0x80 - 0x9f - -/* - * Code Set 2 - */ - -SPACE 0xa1a1 -BLANK 0xa1a1 -PRINT 0xa1a1 -PHONOGRAM 0xa1bc -SPECIAL 0xa1a2 - 0xa1fe -PUNCT 0xa1a2 - 0xa1f8 /* A few too many in here... */ -SWIDTH2 0xa1a1 - 0xa1fe - -SPECIAL 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea -SPECIAL 0xa2f2 - 0xa2f9 0xa2fe -SWIDTH2 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea -SWIDTH2 0xa2f2 - 0xa2f9 0xa2fe - -DIGIT 0xa3b0 - 0xa3b9 /* Zenkaku Digit */ -UPPER 0xa3c1 - 0xa3da /* Zenkaku Alphabet */ -LOWER 0xa3e1 - 0xa3fa /* Zenkaku Alphabet */ -SWIDTH2 0xa3b0 - 0xa3b9 /* Zenkaku Digit */ -SWIDTH2 0xa3c1 - 0xa3da /* Zenkaku Alphabet */ -SWIDTH2 0xa3e1 - 0xa3fa /* Zenkaku Alphabet */ -MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > /* Zenkaku Alphabet */ -MAPLOWER < 0xa3e1 - 0xa3fa : 0xa3e1 > /* Zenkaku Alphabet */ -MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > /* Zenkaku Alphabet */ -MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 > /* Zenkaku Alphabet */ - -XDIGIT 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 - -TODIGIT < 0xa3b0 - 0xa3b9 : 0 > -TODIGIT < 0xa3c1 - 0xa3c6 : 10 > -TODIGIT < 0xa3e1 - 0xa3e6 : 10 > - -PHONOGRAM 0xa4a1 - 0xa4f3 -PHONOGRAM 0xa5a1 - 0xa5f6 -SWIDTH2 0xa4a1 - 0xa4f3 /* Zenkaku Hiragana */ -SWIDTH2 0xa5a1 - 0xa5f6 /* Zenkaku Katakana */ - -UPPER 0xa6a1 - 0xa6b8 /* Zenkaku Greek */ -LOWER 0xa6c1 - 0xa6d8 /* Zenkaku Greek */ -SWIDTH2 0xa6a1 - 0xa6b8 /* Zenkaku Greek */ -SWIDTH2 0xa6c1 - 0xa6d8 /* Zenkaku Greek */ -MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > -MAPLOWER < 0xa6c1 - 0xa6d8 : 0xa6c1 > -MAPUPPER < 0xa6a1 - 0xa6b8 : 0xa6a1 > -MAPUPPER < 0xa6c1 - 0xa6d8 : 0xa6a1 > - -UPPER 0xa7a1 - 0xa7c1 /* Zenkaku Cyrillic */ -LOWER 0xa7d1 - 0xa7f1 /* Zenkaku Cyrillic */ -SWIDTH2 0xa7a1 - 0xa7c1 /* Zenkaku Cyrillic */ -SWIDTH2 0xa7d1 - 0xa7f1 /* Zenkaku Cyrillic */ -MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > -MAPLOWER < 0xa7d1 - 0xa7f1 : 0xa7d1 > -MAPUPPER < 0xa7a1 - 0xa7c1 : 0xa7a1 > -MAPUPPER < 0xa7d1 - 0xa7f1 : 0xa7a1 > - -SPECIAL 0xa8a1 - 0xa8c0 -SWIDTH2 0xa8a1 - 0xa8c0 - -IDEOGRAM 0xb0a1 - 0xb0fe -IDEOGRAM 0xb1a1 - 0xb1fe -IDEOGRAM 0xb2a1 - 0xb2fe -IDEOGRAM 0xb3a1 - 0xb3fe -IDEOGRAM 0xb4a1 - 0xb4fe -IDEOGRAM 0xb5a1 - 0xb5fe -IDEOGRAM 0xb6a1 - 0xb6fe -IDEOGRAM 0xb7a1 - 0xb7fe -IDEOGRAM 0xb8a1 - 0xb8fe -IDEOGRAM 0xb9a1 - 0xb9fe -IDEOGRAM 0xbaa1 - 0xbafe -IDEOGRAM 0xbba1 - 0xbbfe -IDEOGRAM 0xbca1 - 0xbcfe -IDEOGRAM 0xbda1 - 0xbdfe -IDEOGRAM 0xbea1 - 0xbefe -IDEOGRAM 0xbfa1 - 0xbffe -IDEOGRAM 0xc0a1 - 0xc0fe -IDEOGRAM 0xc1a1 - 0xc1fe -IDEOGRAM 0xc2a1 - 0xc2fe -IDEOGRAM 0xc3a1 - 0xc3fe -IDEOGRAM 0xc4a1 - 0xc4fe -IDEOGRAM 0xc5a1 - 0xc5fe -IDEOGRAM 0xc6a1 - 0xc6fe -IDEOGRAM 0xc7a1 - 0xc7fe -IDEOGRAM 0xc8a1 - 0xc8fe -IDEOGRAM 0xc9a1 - 0xc9fe -IDEOGRAM 0xcaa1 - 0xcafe -IDEOGRAM 0xcba1 - 0xcbfe -IDEOGRAM 0xcca1 - 0xccfe -IDEOGRAM 0xcda1 - 0xcdfe -IDEOGRAM 0xcea1 - 0xcefe -IDEOGRAM 0xcfa1 - 0xcfd3 -IDEOGRAM 0xd0a1 - 0xd0fe -IDEOGRAM 0xd1a1 - 0xd1fe -IDEOGRAM 0xd2a1 - 0xd2fe -IDEOGRAM 0xd3a1 - 0xd3fe -IDEOGRAM 0xd4a1 - 0xd4fe -IDEOGRAM 0xd5a1 - 0xd5fe -IDEOGRAM 0xd6a1 - 0xd6fe -IDEOGRAM 0xd7a1 - 0xd7fe -IDEOGRAM 0xd8a1 - 0xd8fe -IDEOGRAM 0xd9a1 - 0xd9fe -IDEOGRAM 0xdaa1 - 0xdafe -IDEOGRAM 0xdba1 - 0xdbfe -IDEOGRAM 0xdca1 - 0xdcfe -IDEOGRAM 0xdda1 - 0xddfe -IDEOGRAM 0xdea1 - 0xdefe -IDEOGRAM 0xdfa1 - 0xdffe -IDEOGRAM 0xe0a1 - 0xe0fe -IDEOGRAM 0xe1a1 - 0xe1fe -IDEOGRAM 0xe2a1 - 0xe2fe -IDEOGRAM 0xe3a1 - 0xe3fe -IDEOGRAM 0xe4a1 - 0xe4fe -IDEOGRAM 0xe5a1 - 0xe5fe -IDEOGRAM 0xe6a1 - 0xe6fe -IDEOGRAM 0xe7a1 - 0xe7fe -IDEOGRAM 0xe8a1 - 0xe8fe -IDEOGRAM 0xe9a1 - 0xe9fe -IDEOGRAM 0xeaa1 - 0xeafe -IDEOGRAM 0xeba1 - 0xebfe -IDEOGRAM 0xeca1 - 0xecfe -IDEOGRAM 0xeda1 - 0xedfe -IDEOGRAM 0xeea1 - 0xeefe -IDEOGRAM 0xefa1 - 0xeffe -IDEOGRAM 0xf0a1 - 0xf0fe -IDEOGRAM 0xf1a1 - 0xf1fe -IDEOGRAM 0xf2a1 - 0xf2fe -IDEOGRAM 0xf3a1 - 0xf3fe -IDEOGRAM 0xf4a1 - 0xf4a6 - -SWIDTH2 0xb0a1 - 0xb0fe -SWIDTH2 0xb1a1 - 0xb1fe -SWIDTH2 0xb2a1 - 0xb2fe -SWIDTH2 0xb3a1 - 0xb3fe -SWIDTH2 0xb4a1 - 0xb4fe -SWIDTH2 0xb5a1 - 0xb5fe -SWIDTH2 0xb6a1 - 0xb6fe -SWIDTH2 0xb7a1 - 0xb7fe -SWIDTH2 0xb8a1 - 0xb8fe -SWIDTH2 0xb9a1 - 0xb9fe -SWIDTH2 0xbaa1 - 0xbafe -SWIDTH2 0xbba1 - 0xbbfe -SWIDTH2 0xbca1 - 0xbcfe -SWIDTH2 0xbda1 - 0xbdfe -SWIDTH2 0xbea1 - 0xbefe -SWIDTH2 0xbfa1 - 0xbffe -SWIDTH2 0xc0a1 - 0xc0fe -SWIDTH2 0xc1a1 - 0xc1fe -SWIDTH2 0xc2a1 - 0xc2fe -SWIDTH2 0xc3a1 - 0xc3fe -SWIDTH2 0xc4a1 - 0xc4fe -SWIDTH2 0xc5a1 - 0xc5fe -SWIDTH2 0xc6a1 - 0xc6fe -SWIDTH2 0xc7a1 - 0xc7fe -SWIDTH2 0xc8a1 - 0xc8fe -SWIDTH2 0xc9a1 - 0xc9fe -SWIDTH2 0xcaa1 - 0xcafe -SWIDTH2 0xcba1 - 0xcbfe -SWIDTH2 0xcca1 - 0xccfe -SWIDTH2 0xcda1 - 0xcdfe -SWIDTH2 0xcea1 - 0xcefe -SWIDTH2 0xcfa1 - 0xcfd3 -SWIDTH2 0xd0a1 - 0xd0fe -SWIDTH2 0xd1a1 - 0xd1fe -SWIDTH2 0xd2a1 - 0xd2fe -SWIDTH2 0xd3a1 - 0xd3fe -SWIDTH2 0xd4a1 - 0xd4fe -SWIDTH2 0xd5a1 - 0xd5fe -SWIDTH2 0xd6a1 - 0xd6fe -SWIDTH2 0xd7a1 - 0xd7fe -SWIDTH2 0xd8a1 - 0xd8fe -SWIDTH2 0xd9a1 - 0xd9fe -SWIDTH2 0xdaa1 - 0xdafe -SWIDTH2 0xdba1 - 0xdbfe -SWIDTH2 0xdca1 - 0xdcfe -SWIDTH2 0xdda1 - 0xddfe -SWIDTH2 0xdea1 - 0xdefe -SWIDTH2 0xdfa1 - 0xdffe -SWIDTH2 0xe0a1 - 0xe0fe -SWIDTH2 0xe1a1 - 0xe1fe -SWIDTH2 0xe2a1 - 0xe2fe -SWIDTH2 0xe3a1 - 0xe3fe -SWIDTH2 0xe4a1 - 0xe4fe -SWIDTH2 0xe5a1 - 0xe5fe -SWIDTH2 0xe6a1 - 0xe6fe -SWIDTH2 0xe7a1 - 0xe7fe -SWIDTH2 0xe8a1 - 0xe8fe -SWIDTH2 0xe9a1 - 0xe9fe -SWIDTH2 0xeaa1 - 0xeafe -SWIDTH2 0xeba1 - 0xebfe -SWIDTH2 0xeca1 - 0xecfe -SWIDTH2 0xeda1 - 0xedfe -SWIDTH2 0xeea1 - 0xeefe -SWIDTH2 0xefa1 - 0xeffe -SWIDTH2 0xf0a1 - 0xf0fe -SWIDTH2 0xf1a1 - 0xf1fe -SWIDTH2 0xf2a1 - 0xf2fe -SWIDTH2 0xf3a1 - 0xf3fe -SWIDTH2 0xf4a1 - 0xf4a6 - -/* - * This is for Code Set 3, half-width kana - */ -PUNCT 0x8000a1 - 0x8000a5 -SPECIAL 0x8000a1 - 0x8000df -PHONOGRAM 0x8000a6 - 0x8000df -SWIDTH1 0x8000a1 - 0x8000df -CONTROL 0x800084 - 0x800097 0x80009b - 0x80009f 0x8000e0 - 0x8000fe - -/* - * This is for Code Set 4, supplementary Japanese graphic charset - */ - -PHONOGRAM 0xa22f - 0xa239 -SWIDTH2 0xa22f - 0xa239 -GRAPH 0xa242 - 0xa244 -SWIDTH2 0xa242 - 0xa244 -GRAPH 0xa26b - 0xa271 -SWIDTH2 0xa26b - 0xa271 -ALPHA 0xa661 - 0xa66c -ALPHA 0xa671 - 0xa67c -SWIDTH2 0xa661 - 0xa66c -SWIDTH2 0xa671 - 0xa67c -MAPLOWER <0xa661 - 0xa66c : 0xa671> -MAPLOWER <0xa671 - 0xa67c : 0xa671> -MAPUPPER <0xa661 - 0xa66c : 0xa661> -MAPUPPER <0xa671 - 0xa67c : 0xa661> -ALPHA 0xa742 - 0xa74e -ALPHA 0xa772 - 0xa77e -SWIDTH2 0xa742 - 0xa74e -SWIDTH2 0xa772 - 0xa77e -MAPLOWER <0xa742 - 0xa74e : 0xa772> -MAPLOWER <0xa772 - 0xa77e : 0xa772> -MAPUPPER <0xa742 - 0xa74e : 0xa742> -MAPUPPER <0xa772 - 0xa77e : 0xa742> -ALPHA 0xa921 - 0xa92e -ALPHA 0xa941 - 0xa94e -SWIDTH2 0xa921 - 0xa92e -SWIDTH2 0xa941 - 0xa94e -MAPLOWER <0xa921 - 0xa92e : 0xa941> -MAPLOWER <0xa941 - 0xa94e : 0xa941> -MAPUPPER <0xa921 - 0xa92e : 0xa921> -MAPUPPER <0xa941 - 0xa94e : 0xa921> -ALPHA 0xaa21 - 0xaa57 -ALPHA 0xab21 - 0xab57 -SWIDTH2 0xaa21 - 0xaa57 -SWIDTH2 0xab21 - 0xab57 -MAPLOWER <0xaa21 - 0xaa57 : 0xab21> -MAPLOWER <0xab21 - 0xab57 : 0xab21> -MAPUPPER <0xaa21 - 0xaa57 : 0xaa21> -MAPUPPER <0xab21 - 0xab57 : 0xaa21> - -IDEOGRAM 0xb021 - 0xb07e -IDEOGRAM 0xb121 - 0xb17e -IDEOGRAM 0xb221 - 0xb27e -IDEOGRAM 0xb321 - 0xb37e -IDEOGRAM 0xb421 - 0xb47e -IDEOGRAM 0xb521 - 0xb57e -IDEOGRAM 0xb621 - 0xb67e -IDEOGRAM 0xb721 - 0xb77e -IDEOGRAM 0xb821 - 0xb87e -IDEOGRAM 0xb921 - 0xb97e -IDEOGRAM 0xba21 - 0xba7e -IDEOGRAM 0xbb21 - 0xbb7e -IDEOGRAM 0xbc21 - 0xbc7e -IDEOGRAM 0xbd21 - 0xbd7e -IDEOGRAM 0xbe21 - 0xbe7e -IDEOGRAM 0xbf21 - 0xbf7e -IDEOGRAM 0xc021 - 0xc07e -IDEOGRAM 0xc121 - 0xc17e -IDEOGRAM 0xc221 - 0xc27e -IDEOGRAM 0xc321 - 0xc37e -IDEOGRAM 0xc421 - 0xc47e -IDEOGRAM 0xc521 - 0xc57e -IDEOGRAM 0xc621 - 0xc67e -IDEOGRAM 0xc721 - 0xc77e -IDEOGRAM 0xc821 - 0xc87e -IDEOGRAM 0xc921 - 0xc97e -IDEOGRAM 0xca21 - 0xca7e -IDEOGRAM 0xcb21 - 0xcb7e -IDEOGRAM 0xcc21 - 0xcc7e -IDEOGRAM 0xcd21 - 0xcd7e -IDEOGRAM 0xce21 - 0xce7e -IDEOGRAM 0xcf21 - 0xcf7e -IDEOGRAM 0xd021 - 0xd07e -IDEOGRAM 0xd121 - 0xd17e -IDEOGRAM 0xd221 - 0xd27e -IDEOGRAM 0xd321 - 0xd37e -IDEOGRAM 0xd421 - 0xd47e -IDEOGRAM 0xd521 - 0xd57e -IDEOGRAM 0xd621 - 0xd67e -IDEOGRAM 0xd721 - 0xd77e -IDEOGRAM 0xd821 - 0xd87e -IDEOGRAM 0xd921 - 0xd97e -IDEOGRAM 0xda21 - 0xda7e -IDEOGRAM 0xdb21 - 0xdb7e -IDEOGRAM 0xdc21 - 0xdc7e -IDEOGRAM 0xdd21 - 0xdd7e -IDEOGRAM 0xde21 - 0xde7e -IDEOGRAM 0xdf21 - 0xdf7e -IDEOGRAM 0xe021 - 0xe07e -IDEOGRAM 0xe121 - 0xe17e -IDEOGRAM 0xe221 - 0xe27e -IDEOGRAM 0xe321 - 0xe37e -IDEOGRAM 0xe421 - 0xe47e -IDEOGRAM 0xe521 - 0xe57e -IDEOGRAM 0xe621 - 0xe67e -IDEOGRAM 0xe721 - 0xe77e -IDEOGRAM 0xe821 - 0xe87e -IDEOGRAM 0xe921 - 0xe97e -IDEOGRAM 0xea21 - 0xea7e -IDEOGRAM 0xeb21 - 0xeb7e -IDEOGRAM 0xec21 - 0xec7e -IDEOGRAM 0xed21 - 0xed63 - -SWIDTH2 0xb021 - 0xb07e -SWIDTH2 0xb121 - 0xb17e -SWIDTH2 0xb221 - 0xb27e -SWIDTH2 0xb321 - 0xb37e -SWIDTH2 0xb421 - 0xb47e -SWIDTH2 0xb521 - 0xb57e -SWIDTH2 0xb621 - 0xb67e -SWIDTH2 0xb721 - 0xb77e -SWIDTH2 0xb821 - 0xb87e -SWIDTH2 0xb921 - 0xb97e -SWIDTH2 0xba21 - 0xba7e -SWIDTH2 0xbb21 - 0xbb7e -SWIDTH2 0xbc21 - 0xbc7e -SWIDTH2 0xbd21 - 0xbd7e -SWIDTH2 0xbe21 - 0xbe7e -SWIDTH2 0xbf21 - 0xbf7e -SWIDTH2 0xc021 - 0xc07e -SWIDTH2 0xc121 - 0xc17e -SWIDTH2 0xc221 - 0xc27e -SWIDTH2 0xc321 - 0xc37e -SWIDTH2 0xc421 - 0xc47e -SWIDTH2 0xc521 - 0xc57e -SWIDTH2 0xc621 - 0xc67e -SWIDTH2 0xc721 - 0xc77e -SWIDTH2 0xc821 - 0xc87e -SWIDTH2 0xc921 - 0xc97e -SWIDTH2 0xca21 - 0xca7e -SWIDTH2 0xcb21 - 0xcb7e -SWIDTH2 0xcc21 - 0xcc7e -SWIDTH2 0xcd21 - 0xcd7e -SWIDTH2 0xce21 - 0xce7e -SWIDTH2 0xcf21 - 0xcf7e -SWIDTH2 0xd021 - 0xd07e -SWIDTH2 0xd121 - 0xd17e -SWIDTH2 0xd221 - 0xd27e -SWIDTH2 0xd321 - 0xd37e -SWIDTH2 0xd421 - 0xd47e -SWIDTH2 0xd521 - 0xd57e -SWIDTH2 0xd621 - 0xd67e -SWIDTH2 0xd721 - 0xd77e -SWIDTH2 0xd821 - 0xd87e -SWIDTH2 0xd921 - 0xd97e -SWIDTH2 0xda21 - 0xda7e -SWIDTH2 0xdb21 - 0xdb7e -SWIDTH2 0xdc21 - 0xdc7e -SWIDTH2 0xdd21 - 0xdd7e -SWIDTH2 0xde21 - 0xde7e -SWIDTH2 0xdf21 - 0xdf7e -SWIDTH2 0xe021 - 0xe07e -SWIDTH2 0xe121 - 0xe17e -SWIDTH2 0xe221 - 0xe27e -SWIDTH2 0xe321 - 0xe37e -SWIDTH2 0xe421 - 0xe47e -SWIDTH2 0xe521 - 0xe57e -SWIDTH2 0xe621 - 0xe67e -SWIDTH2 0xe721 - 0xe77e -SWIDTH2 0xe821 - 0xe87e -SWIDTH2 0xe921 - 0xe97e -SWIDTH2 0xea21 - 0xea7e -SWIDTH2 0xeb21 - 0xeb7e -SWIDTH2 0xec21 - 0xec7e -SWIDTH2 0xed21 - 0xed63 diff --git a/share/locale/ctype/kk_KZ.PT154.src b/share/locale/ctype/kk_KZ.PT154.src deleted file mode 100644 index dd7e5be9d7..0000000000 --- a/share/locale/ctype/kk_KZ.PT154.src +++ /dev/null @@ -1,89 +0,0 @@ -/* $NetBSD: kk_KZ.PT154.src,v 1.1 2006/03/28 14:44:01 tnozaki Exp $ */ - -/* - * LOCALE_CTYPE for PT154 character set (IANA PTCP154) - * - * Original version ID: - * FreeBSD: /repoman/r/ncvs/src/share/mklocale/kk_KZ.PT154.src,v 1.1 2004/01/29 16:28:20 ache Exp - */ -ENCODING "NONE" -VARIABLE PT154 character set by Birsh T ,CODESET=PT154 - -/* - * ASCII - */ -ALPHA 'A' - 'Z' 'a' - 'z' -BLANK ' ' '\t' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d 0x20 -UPPER 'A' - 'Z' -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' - -MAPLOWER <'A' - 'Z' : 'a'> -MAPUPPER <'A' - 'Z' : 'A'> -TODIGIT <'0' - '9' : 0> -TODIGIT <'A' - 'F' : 10> -TODIGIT <'a' - 'f' : 10> - -SWIDTH1 0x20 - 0x7e - -/* - * PTCP154 - */ -ALPHA 0x80 - 0x83 0x86 - 0x90 0x98 - 0x9f -ALPHA 0xa1 - 0xa6 0xa8 0xaa 0xad 0xaf 0xb1 - 0xb5 0xb8 0xba -ALPHA 0xbc - 0xff -BLANK 0xa0 -GRAPH 0x80 - 0x9f 0xa1 - 0xff -LOWER 0x83 0x89 0x90 0x98 - 0x9f 0xa2 0xad 0xb1 -LOWER 0xb3 - 0xb5 0xb8 0xba 0xbc 0xbe 0xbf 0xe0 - 0xff -PUNCT 0x84 0x85 -PUNCT 0x91 - 0x97 -PUNCT 0xa7 0xa9 0xab 0xac 0xae -PUNCT 0xb0 0xb6 0xb7 0xb9 0xbb -SPACE 0xa0 -UPPER 0x80 - 0x82 0x86 - 0x88 0x8a - 0x8f 0xa1 0xa3 - 0xa6 -UPPER 0xa8 0xaa 0xaf 0xb2 0xbd 0xc0 - 0xdf - -MAPLOWER <0x80 0x90> -MAPLOWER <0x81 0x83> -MAPLOWER <0x82 0xad> -MAPLOWER <0x86 0x99> -MAPLOWER <0x87 0x89> -MAPLOWER <0x88 0x98> -MAPLOWER <0x8a - 0x8f : 0x9a> -MAPLOWER <0xa1 0xa2> -MAPLOWER <0xa3 0xbc> -MAPLOWER <0xa4 0xb5> -MAPLOWER <0xa5 0xb4> -MAPLOWER <0xa6 0xb1> -MAPLOWER <0xa8 0xb8> -MAPLOWER <0xaa 0xba> -MAPLOWER <0xaf 0xbf> -MAPLOWER <0xb2 0xb3> -MAPLOWER <0xbd 0xbe> -MAPLOWER <0xc0 - 0xdf : 0xe0> -MAPUPPER <0x90 0x80> -MAPUPPER <0x83 0x81> -MAPUPPER <0xad 0x82> -MAPUPPER <0x99 0x86> -MAPUPPER <0x89 0x87> -MAPUPPER <0x98 0x88> -MAPUPPER <0x9a - 0x9f : 0x8a> -MAPUPPER <0xa2 0xa1> -MAPUPPER <0xbc 0xa3> -MAPUPPER <0xb5 0xa4> -MAPUPPER <0xb4 0xa5> -MAPUPPER <0xb1 0xa6> -MAPUPPER <0xb8 0xa8> -MAPUPPER <0xba 0xaa> -MAPUPPER <0xbf 0xaf> -MAPUPPER <0xb3 0xb2> -MAPUPPER <0xbe 0xbd> -MAPUPPER <0xe0 - 0xff : 0xc0> - -SWIDTH1 0x80 - 0xff diff --git a/share/locale/ctype/ru_RU.ISO_8859-5.src b/share/locale/ctype/ru_RU.ISO_8859-5.src deleted file mode 100644 index 490767d1f7..0000000000 --- a/share/locale/ctype/ru_RU.ISO_8859-5.src +++ /dev/null @@ -1,187 +0,0 @@ -/* $NetBSD: ru_RU.ISO_8859-5.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - -/* - * LOCALE_CTYPE for Russian part of ISO8859-5 set - */ - -ENCODING "NONE" -VARIABLE Russian part of CODESET=ISO8859-5 - -ALPHA 'A' - 'Z' 'a' - 'z' \ - 0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xf1 0xd6 \ - 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde \ - 0xdf 0xe0 0xe1 0xe2 0xe3 0xe4 0xe5 0xe6 \ - 0xe7 0xe8 0xe9 0xea 0xeb 0xec 0xed 0xee 0xef \ - 0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xa1 0xb6 \ - 0xb7 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe \ - 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 \ - 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf -BLANK ' ' '\t' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' \ - 0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xf1 0xd6 \ - 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde \ - 0xdf 0xe0 0xe1 0xe2 0xe3 0xe4 0xe5 0xe6 \ - 0xe7 0xe8 0xe9 0xea 0xeb 0xec 0xed 0xee 0xef -PRINT 0x20 - 0x7e -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d 0x20 -UPPER 'A' - 'Z' \ - 0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xa1 0xb6 \ - 0xb7 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe \ - 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 \ - 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff - -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ - -MAPLOWER <'A' - 'Z' : 'a'> -MAPLOWER <'a' - 'z' : 'a'> - -MAPLOWER <0xb0 0xd0> -MAPLOWER <0xb1 0xd1> -MAPLOWER <0xb2 0xd2> -MAPLOWER <0xb3 0xd3> -MAPLOWER <0xb4 0xd4> -MAPLOWER <0xb5 0xd5> -MAPLOWER <0xa1 0xf1> -MAPLOWER <0xb6 0xd6> -MAPLOWER <0xb7 0xd7> -MAPLOWER <0xb8 0xd8> -MAPLOWER <0xb9 0xd9> -MAPLOWER <0xba 0xda> -MAPLOWER <0xbb 0xdb> -MAPLOWER <0xbc 0xdc> -MAPLOWER <0xbd 0xdd> -MAPLOWER <0xbe 0xde> -MAPLOWER <0xbf 0xdf> -MAPLOWER <0xc0 0xe0> -MAPLOWER <0xc1 0xe1> -MAPLOWER <0xc2 0xe2> -MAPLOWER <0xc3 0xe3> -MAPLOWER <0xc4 0xe4> -MAPLOWER <0xc5 0xe5> -MAPLOWER <0xc6 0xe6> -MAPLOWER <0xc7 0xe7> -MAPLOWER <0xc8 0xe8> -MAPLOWER <0xc9 0xe9> -MAPLOWER <0xca 0xea> -MAPLOWER <0xcb 0xeb> -MAPLOWER <0xcc 0xec> -MAPLOWER <0xcd 0xed> -MAPLOWER <0xce 0xee> -MAPLOWER <0xcf 0xef> - -MAPLOWER <0xd0 0xd0> -MAPLOWER <0xd1 0xd1> -MAPLOWER <0xd2 0xd2> -MAPLOWER <0xd3 0xd3> -MAPLOWER <0xd4 0xd4> -MAPLOWER <0xd5 0xd5> -MAPLOWER <0xf1 0xf1> -MAPLOWER <0xd6 0xd6> -MAPLOWER <0xd7 0xd7> -MAPLOWER <0xd8 0xd8> -MAPLOWER <0xd9 0xd9> -MAPLOWER <0xda 0xda> -MAPLOWER <0xdb 0xdb> -MAPLOWER <0xdc 0xdc> -MAPLOWER <0xdd 0xdd> -MAPLOWER <0xde 0xde> -MAPLOWER <0xdf 0xdf> -MAPLOWER <0xe0 0xe0> -MAPLOWER <0xe1 0xe1> -MAPLOWER <0xe2 0xe2> -MAPLOWER <0xe3 0xe3> -MAPLOWER <0xe4 0xe4> -MAPLOWER <0xe5 0xe5> -MAPLOWER <0xe6 0xe6> -MAPLOWER <0xe7 0xe7> -MAPLOWER <0xe8 0xe8> -MAPLOWER <0xe9 0xe9> -MAPLOWER <0xea 0xea> -MAPLOWER <0xeb 0xeb> -MAPLOWER <0xec 0xec> -MAPLOWER <0xed 0xed> -MAPLOWER <0xee 0xee> -MAPLOWER <0xef 0xef> - -MAPUPPER <'A' - 'Z' : 'A'> -MAPUPPER <'a' - 'z' : 'A'> - -MAPUPPER <0xd0 0xb0> -MAPUPPER <0xd1 0xb1> -MAPUPPER <0xd2 0xb2> -MAPUPPER <0xd3 0xb3> -MAPUPPER <0xd4 0xb4> -MAPUPPER <0xd5 0xb5> -MAPUPPER <0xf1 0xa1> -MAPUPPER <0xd6 0xb6> -MAPUPPER <0xd7 0xb7> -MAPUPPER <0xd8 0xb8> -MAPUPPER <0xd9 0xb9> -MAPUPPER <0xda 0xba> -MAPUPPER <0xdb 0xbb> -MAPUPPER <0xdc 0xbc> -MAPUPPER <0xdd 0xbd> -MAPUPPER <0xde 0xbe> -MAPUPPER <0xdf 0xbf> -MAPUPPER <0xe0 0xc0> -MAPUPPER <0xe1 0xc1> -MAPUPPER <0xe2 0xc2> -MAPUPPER <0xe3 0xc3> -MAPUPPER <0xe4 0xc4> -MAPUPPER <0xe5 0xc5> -MAPUPPER <0xe6 0xc6> -MAPUPPER <0xe7 0xc7> -MAPUPPER <0xe8 0xc8> -MAPUPPER <0xe9 0xc9> -MAPUPPER <0xea 0xca> -MAPUPPER <0xeb 0xcb> -MAPUPPER <0xec 0xcc> -MAPUPPER <0xed 0xcd> -MAPUPPER <0xee 0xce> -MAPUPPER <0xef 0xcf> - -MAPUPPER <0xb0 0xb0> -MAPUPPER <0xb1 0xb1> -MAPUPPER <0xb2 0xb2> -MAPUPPER <0xb3 0xb3> -MAPUPPER <0xb4 0xb4> -MAPUPPER <0xb5 0xb5> -MAPUPPER <0xa1 0xa1> -MAPUPPER <0xb6 0xb6> -MAPUPPER <0xb7 0xb7> -MAPUPPER <0xb8 0xb8> -MAPUPPER <0xb9 0xb9> -MAPUPPER <0xba 0xba> -MAPUPPER <0xbb 0xbb> -MAPUPPER <0xbc 0xbc> -MAPUPPER <0xbd 0xbd> -MAPUPPER <0xbe 0xbe> -MAPUPPER <0xbf 0xbf> -MAPUPPER <0xc0 0xc0> -MAPUPPER <0xc1 0xc1> -MAPUPPER <0xc2 0xc2> -MAPUPPER <0xc3 0xc3> -MAPUPPER <0xc4 0xc4> -MAPUPPER <0xc5 0xc5> -MAPUPPER <0xc6 0xc6> -MAPUPPER <0xc7 0xc7> -MAPUPPER <0xc8 0xc8> -MAPUPPER <0xc9 0xc9> -MAPUPPER <0xca 0xca> -MAPUPPER <0xcb 0xcb> -MAPUPPER <0xcc 0xcc> -MAPUPPER <0xcd 0xcd> -MAPUPPER <0xce 0xce> -MAPUPPER <0xcf 0xcf> - -TODIGIT <'0' - '9' : 0> -TODIGIT <'A' - 'F' : 10> -TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/tr_TR.ISO8859-9.src b/share/locale/ctype/tr_TR.ISO8859-9.src deleted file mode 100644 index 484e15dddc..0000000000 --- a/share/locale/ctype/tr_TR.ISO8859-9.src +++ /dev/null @@ -1,71 +0,0 @@ -/* $NetBSD: tr_TR.ISO8859-9.src,v 1.1 2007/03/14 15:49:26 tnozaki Exp $ */ - -/*- - * Copyright (c)2007 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -ENCODING "NONE" -VARIABLE CODESET=ISO8859-9 - -ALPHA 'A' - 'Z' 'a' - 'z' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d ' ' -UPPER 'A' - 'Z' -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' -BLANK ' ' '\t' -PRINT 0x20 - 0x7e -SWIDTH1 0x20 - 0x7e - -MAPUPPER <'A' - 'Z' : 'A'> -MAPUPPER <'a' - 'z' : 'A'> -MAPLOWER <'A' - 'Z' : 'a'> -MAPLOWER <'a' - 'z' : 'a'> -TODIGIT <'0' - '9' : 0> -TODIGIT <'A' - 'F' : 10> -TODIGIT <'a' - 'f' : 10> - -ALPHA 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff -CONTROL 0x80 - 0x9f -GRAPH 0xa1 - 0xff -LOWER 0xdf - 0xf6 0xf8 - 0xff -PUNCT 0xa1 - 0xbf 0xd7 0xf7 -SPACE 0xa0 -UPPER 0xc0 - 0xd6 0xd8 - 0xde -BLANK 0xa0 -PRINT 0xa0 - 0xff -SWIDTH1 0xa0 - 0xff - -MAPLOWER <0xc0 - 0xd6 : 0xe0> -MAPLOWER <0xd8 - 0xde : 0xf8> -MAPLOWER <0xdf - 0xf6 : 0xdf> -MAPLOWER <0xf8 - 0xff : 0xf8> -MAPUPPER <0xc0 - 0xd6 : 0xc0> -MAPUPPER <0xd8 - 0xde : 0xd8> -MAPUPPER <0xe0 - 0xf6 : 0xc0> -MAPUPPER <0xf8 - 0xfe : 0xd8> diff --git a/share/locale/ctype/zh_CN.GB18030.src b/share/locale/ctype/zh_CN.GB18030.src deleted file mode 100644 index 2eb2577b1b..0000000000 --- a/share/locale/ctype/zh_CN.GB18030.src +++ /dev/null @@ -1,8489 +0,0 @@ -/* $NetBSD: zh_CN.GB18030.src,v 1.2 2003/04/06 18:33:23 tshiozak Exp $ */ - -/*- - * Copyright (c)2003 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -ENCODING "GBK2K" -VARIABLE CODESET=GB18030 - -/* - * ASCII compatible - */ -ALPHA 0x41 - 0x5a 0x61 - 0x7a -BLANK 0x9 0xb 0x20 -CONTROL 0x0 - 0x1f 0x7f -DIGIT 0x30 - 0x39 -LOWER 0x61 - 0x7a -MAPLOWER < 0x61 - 0x7a : 0x41 > -MAPUPPER < 0x41 - 0x5a : 0x61 > -PRINT 0x20 -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x9 - 0xd 0x20 -SWIDTH1 0x20 - 0x7e -TODIGIT < 0x30 - 0x39 : 0x0000 > -TODIGIT < 0x41 - 0x46 : 10 > -TODIGIT < 0x61 - 0x66 : 10 > -UPPER 0x41 - 0x5a -XDIGIT 0x30 - 0x39 0x41 - 0x46 0x61 - 0x66 - -/* - * GBK compatible - */ -ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa -ALPHA 0xa6a1 - 0xa6b8 0xa6c1 - 0xa6d8 -ALPHA 0xa7a1 - 0xa7c1 0xa7d1 - 0xa7f1 -ALPHA 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 -BLANK 0xa1a1 -DIGIT 0xa3b0 - 0xa3b9 -GRAPH 0xa140 - 0xa17e 0xa180 - 0xa1a0 0xa1a9 -GRAPH 0xa240 - 0xa27e 0xa280 - 0xa2a0 0xa2ab - 0xa2b0 0xa2e4 0xa2ef 0xa2f0 0xa2fd 0xa2fe -GRAPH 0xa340 - 0xa37e 0xa380 - 0xa3a0 -GRAPH 0xa440 - 0xa47e 0xa480 - 0xa4a0 0xa4f4 - 0xa4fe -GRAPH 0xa540 - 0xa57e 0xa580 - 0xa5a0 0xa5f7 - 0xa5fe -GRAPH 0xa640 - 0xa67e 0xa680 - 0xa6a0 0xa6b9 - 0xa6c0 0xa6d9 - 0xa6df 0xa6ec 0xa6ed 0xa6f3 0xa6f6 - 0xa6fe -GRAPH 0xa740 - 0xa77e 0xa780 - 0xa7a0 0xa7c2 - 0xa7d0 0xa7f2 - 0xa7fe -GRAPH 0xa896 - 0xa8a0 0xa8bc 0xa8c1 - 0xa8fe -GRAPH 0xa958 0xa95b 0xa95d - 0xa960 0xa963 0xa964 0xa966 0xa967 0xa997 - 0xa9a3 0xa9f0 - 0xa9fe -GRAPH 0xaaa1 - 0xaafe -GRAPH 0xaba1 - 0xabfe -GRAPH 0xaca1 - 0xacfe -GRAPH 0xada1 - 0xadfe -GRAPH 0xaea1 - 0xaefe -GRAPH 0xafa1 - 0xaffe -GRAPH 0xd7fa - 0xd7fe -GRAPH 0xf8a1 - 0xf8fe -GRAPH 0xf9a1 - 0xf9fe -GRAPH 0xfaa1 - 0xfafe -GRAPH 0xfba1 - 0xfbfe -GRAPH 0xfca1 - 0xfcfe -GRAPH 0xfda1 - 0xfdfe -GRAPH 0xfe51 - 0xfe53 0xfe59 0xfe61 0xfe66 0xfe67 0xfe6c 0xfe6d 0xfe76 0xfe7e 0xfe90 0xfe91 0xfea0 - 0xfefe -IDEOGRAM 0x8140 - 0x817e 0x8180 - 0x81fe -IDEOGRAM 0x8240 - 0x827e 0x8280 - 0x82fe -IDEOGRAM 0x8340 - 0x837e 0x8380 - 0x83fe -IDEOGRAM 0x8440 - 0x847e 0x8480 - 0x84fe -IDEOGRAM 0x8540 - 0x857e 0x8580 - 0x85fe -IDEOGRAM 0x8640 - 0x867e 0x8680 - 0x86fe -IDEOGRAM 0x8740 - 0x877e 0x8780 - 0x87fe -IDEOGRAM 0x8840 - 0x887e 0x8880 - 0x88fe -IDEOGRAM 0x8940 - 0x897e 0x8980 - 0x89fe -IDEOGRAM 0x8a40 - 0x8a7e 0x8a80 - 0x8afe -IDEOGRAM 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe -IDEOGRAM 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe -IDEOGRAM 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe -IDEOGRAM 0x8e40 - 0x8e7e 0x8e80 - 0x8efe -IDEOGRAM 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe -IDEOGRAM 0x9040 - 0x907e 0x9080 - 0x90fe -IDEOGRAM 0x9140 - 0x917e 0x9180 - 0x91fe -IDEOGRAM 0x9240 - 0x927e 0x9280 - 0x92fe -IDEOGRAM 0x9340 - 0x937e 0x9380 - 0x93fe -IDEOGRAM 0x9440 - 0x947e 0x9480 - 0x94fe -IDEOGRAM 0x9540 - 0x957e 0x9580 - 0x95fe -IDEOGRAM 0x9640 - 0x967e 0x9680 - 0x96fe -IDEOGRAM 0x9740 - 0x977e 0x9780 - 0x97fe -IDEOGRAM 0x9840 - 0x987e 0x9880 - 0x98fe -IDEOGRAM 0x9940 - 0x997e 0x9980 - 0x99fe -IDEOGRAM 0x9a40 - 0x9a7e 0x9a80 - 0x9afe -IDEOGRAM 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe -IDEOGRAM 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe -IDEOGRAM 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe -IDEOGRAM 0x9e40 - 0x9e7e 0x9e80 - 0x9efe -IDEOGRAM 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe -IDEOGRAM 0xa040 - 0xa07e 0xa080 - 0xa0fe -IDEOGRAM 0xa965 -IDEOGRAM 0xaa40 - 0xaa7e 0xaa80 - 0xaaa0 -IDEOGRAM 0xab40 - 0xab7e 0xab80 - 0xaba0 -IDEOGRAM 0xac40 - 0xac7e 0xac80 - 0xaca0 -IDEOGRAM 0xad40 - 0xad7e 0xad80 - 0xada0 -IDEOGRAM 0xae40 - 0xae7e 0xae80 - 0xaea0 -IDEOGRAM 0xaf40 - 0xaf7e 0xaf80 - 0xafa0 -IDEOGRAM 0xb040 - 0xb07e 0xb080 - 0xb0fe -IDEOGRAM 0xb140 - 0xb17e 0xb180 - 0xb1fe -IDEOGRAM 0xb240 - 0xb27e 0xb280 - 0xb2fe -IDEOGRAM 0xb340 - 0xb37e 0xb380 - 0xb3fe -IDEOGRAM 0xb440 - 0xb47e 0xb480 - 0xb4fe -IDEOGRAM 0xb540 - 0xb57e 0xb580 - 0xb5fe -IDEOGRAM 0xb640 - 0xb67e 0xb680 - 0xb6fe -IDEOGRAM 0xb740 - 0xb77e 0xb780 - 0xb7fe -IDEOGRAM 0xb840 - 0xb87e 0xb880 - 0xb8fe -IDEOGRAM 0xb940 - 0xb97e 0xb980 - 0xb9fe -IDEOGRAM 0xba40 - 0xba7e 0xba80 - 0xbafe -IDEOGRAM 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe -IDEOGRAM 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe -IDEOGRAM 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe -IDEOGRAM 0xbe40 - 0xbe7e 0xbe80 - 0xbefe -IDEOGRAM 0xbf40 - 0xbf7e 0xbf80 - 0xbffe -IDEOGRAM 0xc040 - 0xc07e 0xc080 - 0xc0fe -IDEOGRAM 0xc140 - 0xc17e 0xc180 - 0xc1fe -IDEOGRAM 0xc240 - 0xc27e 0xc280 - 0xc2fe -IDEOGRAM 0xc340 - 0xc37e 0xc380 - 0xc3fe -IDEOGRAM 0xc440 - 0xc47e 0xc480 - 0xc4fe -IDEOGRAM 0xc540 - 0xc57e 0xc580 - 0xc5fe -IDEOGRAM 0xc640 - 0xc67e 0xc680 - 0xc6fe -IDEOGRAM 0xc740 - 0xc77e 0xc780 - 0xc7fe -IDEOGRAM 0xc840 - 0xc87e 0xc880 - 0xc8fe -IDEOGRAM 0xc940 - 0xc97e 0xc980 - 0xc9fe -IDEOGRAM 0xca40 - 0xca7e 0xca80 - 0xcafe -IDEOGRAM 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe -IDEOGRAM 0xcc40 - 0xcc7e 0xcc80 - 0xccfe -IDEOGRAM 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe -IDEOGRAM 0xce40 - 0xce7e 0xce80 - 0xcefe -IDEOGRAM 0xcf40 - 0xcf7e 0xcf80 - 0xcffe -IDEOGRAM 0xd040 - 0xd07e 0xd080 - 0xd0fe -IDEOGRAM 0xd140 - 0xd17e 0xd180 - 0xd1fe -IDEOGRAM 0xd240 - 0xd27e 0xd280 - 0xd2fe -IDEOGRAM 0xd340 - 0xd37e 0xd380 - 0xd3fe -IDEOGRAM 0xd440 - 0xd47e 0xd480 - 0xd4fe -IDEOGRAM 0xd540 - 0xd57e 0xd580 - 0xd5fe -IDEOGRAM 0xd640 - 0xd67e 0xd680 - 0xd6fe -IDEOGRAM 0xd740 - 0xd77e 0xd780 - 0xd7f9 -IDEOGRAM 0xd840 - 0xd87e 0xd880 - 0xd8fe -IDEOGRAM 0xd940 - 0xd97e 0xd980 - 0xd9fe -IDEOGRAM 0xda40 - 0xda7e 0xda80 - 0xdafe -IDEOGRAM 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe -IDEOGRAM 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe -IDEOGRAM 0xdd40 - 0xdd7e 0xdd80 - 0xddfe -IDEOGRAM 0xde40 - 0xde7e 0xde80 - 0xdefe -IDEOGRAM 0xdf40 - 0xdf7e 0xdf80 - 0xdffe -IDEOGRAM 0xe040 - 0xe07e 0xe080 - 0xe0fe -IDEOGRAM 0xe140 - 0xe17e 0xe180 - 0xe1fe -IDEOGRAM 0xe240 - 0xe27e 0xe280 - 0xe2fe -IDEOGRAM 0xe340 - 0xe37e 0xe380 - 0xe3fe -IDEOGRAM 0xe440 - 0xe47e 0xe480 - 0xe4fe -IDEOGRAM 0xe540 - 0xe57e 0xe580 - 0xe5fe -IDEOGRAM 0xe640 - 0xe67e 0xe680 - 0xe6fe -IDEOGRAM 0xe740 - 0xe77e 0xe780 - 0xe7fe -IDEOGRAM 0xe840 - 0xe87e 0xe880 - 0xe8fe -IDEOGRAM 0xe940 - 0xe97e 0xe980 - 0xe9fe -IDEOGRAM 0xea40 - 0xea7e 0xea80 - 0xeafe -IDEOGRAM 0xeb40 - 0xeb7e 0xeb80 - 0xebfe -IDEOGRAM 0xec40 - 0xec7e 0xec80 - 0xecfe -IDEOGRAM 0xed40 - 0xed7e 0xed80 - 0xedfe -IDEOGRAM 0xee40 - 0xee7e 0xee80 - 0xeefe -IDEOGRAM 0xef40 - 0xef7e 0xef80 - 0xeffe -IDEOGRAM 0xf040 - 0xf07e 0xf080 - 0xf0fe -IDEOGRAM 0xf140 - 0xf17e 0xf180 - 0xf1fe -IDEOGRAM 0xf240 - 0xf27e 0xf280 - 0xf2fe -IDEOGRAM 0xf340 - 0xf37e 0xf380 - 0xf3fe -IDEOGRAM 0xf440 - 0xf47e 0xf480 - 0xf4fe -IDEOGRAM 0xf540 - 0xf57e 0xf580 - 0xf5fe -IDEOGRAM 0xf640 - 0xf67e 0xf680 - 0xf6fe -IDEOGRAM 0xf740 - 0xf77e 0xf780 - 0xf7fe -IDEOGRAM 0xf840 - 0xf87e 0xf880 - 0xf8a0 -IDEOGRAM 0xf940 - 0xf97e 0xf980 - 0xf9a0 -IDEOGRAM 0xfa40 - 0xfa7e 0xfa80 - 0xfaa0 -IDEOGRAM 0xfb40 - 0xfb7e 0xfb80 - 0xfba0 -IDEOGRAM 0xfc40 - 0xfc7e 0xfc80 - 0xfca0 -IDEOGRAM 0xfd40 - 0xfd7e 0xfd80 - 0xfda0 -IDEOGRAM 0xfe40 - 0xfe4f 0xfe55 0xfe56 0xfe5a - 0xfe5c 0xfe5f 0xfe60 0xfe62 - 0xfe65 0xfe68 - 0xfe6a 0xfe6f 0xfe70 0xfe72 0xfe77 0xfe78 0xfe7a - 0xfe7d 0xfe80 - 0xfe83 0xfe85 - 0xfe8f 0xfe92 - 0xfe9f -LOWER 0xa3e1 - 0xa3fa -LOWER 0xa6c1 - 0xa6d8 -LOWER 0xa7d1 - 0xa7f1 -LOWER 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 -MAPLOWER < 0xa2f1 - 0xa2fa : 0xa2a1 > -MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > -MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > -MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > -MAPUPPER < 0xa2a1 - 0xa2aa : 0xa2f1 > -MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 > -MAPUPPER < 0xa6c1 - 0xa6d8 : 0xa6a1 > -MAPUPPER < 0xa7d1 - 0xa7f1 : 0xa7a1 > -PHONOGRAM 0xa4a1 - 0xa4f3 -PHONOGRAM 0xa5a1 - 0xa5f6 -PRINT 0xa1a1 -PUNCT 0xa1a2 - 0xa1a8 0xa1aa - 0xa1fe -PUNCT 0xa2e3 -PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe -PUNCT 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 -PUNCT 0xa840 - 0xa87e 0xa880 - 0xa895 -PUNCT 0xa949 - 0xa957 0xa959 0xa95a 0xa95c 0xa961 0xa962 0xa968 - 0xa97e 0xa980 - 0xa995 0xa9a4 - 0xa9ef -PUNCT 0xfe50 0xfe54 0xfe57 0xfe58 0xfe5d 0xfe5e 0xfe6b 0xfe6e 0xfe71 0xfe73 - 0xfe75 0xfe79 0xfe84 -SPACE 0xa1a1 -SPECIAL 0xa2a1 - 0xa2aa 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc -SPECIAL 0xa940 - 0xa948 0xa996 -SWIDTH1 0xa140 - 0xa17e 0xa180 - 0xa1a0 0xa1a4 - 0xa1a7 0xa1aa 0xa1ac - 0xa1b1 0xa1c0 - 0xa1e6 0xa1e8 0xa1eb - 0xa1fd -SWIDTH1 0xa240 - 0xa27e 0xa280 - 0xa2e4 0xa2ef - 0xa2fe -SWIDTH1 0xa340 - 0xa37e 0xa380 - 0xa3a0 -SWIDTH1 0xa440 - 0xa47e 0xa480 - 0xa4a0 0xa4f4 - 0xa4fe -SWIDTH1 0xa540 - 0xa57e 0xa580 - 0xa5a0 0xa5f7 - 0xa5fe -SWIDTH1 0xa640 - 0xa67e 0xa680 - 0xa6df 0xa6ec 0xa6ed 0xa6f3 0xa6f6 - 0xa6fe -SWIDTH1 0xa740 - 0xa77e 0xa780 - 0xa7fe -SWIDTH1 0xa840 - 0xa87e 0xa880 - 0xa892 0xa896 - 0xa8c4 0xa8ea - 0xa8fe -SWIDTH1 0xa958 0xa959 0xa95b - 0xa95f 0xa997 - 0xa9fe -SWIDTH1 0xaaa1 - 0xaafe -SWIDTH1 0xaba1 - 0xabfe -SWIDTH1 0xaca1 - 0xacfe -SWIDTH1 0xada1 - 0xadfe -SWIDTH1 0xaea1 - 0xaefe -SWIDTH1 0xafa1 - 0xaffe -SWIDTH1 0xd7fa - 0xd7fe -SWIDTH1 0xf8a1 - 0xf8fe -SWIDTH1 0xf9a1 - 0xf9fe -SWIDTH1 0xfaa1 - 0xfafe -SWIDTH1 0xfba1 - 0xfbfe -SWIDTH1 0xfca1 - 0xfcfe -SWIDTH1 0xfda1 - 0xfdfe -SWIDTH1 0xfe51 - 0xfe53 0xfe59 0xfe61 0xfe66 0xfe67 0xfe6c 0xfe6d 0xfe76 0xfe7e 0xfe90 0xfe91 0xfea0 - 0xfefe -SWIDTH2 0x8140 - 0x817e 0x8180 - 0x81fe -SWIDTH2 0x8240 - 0x827e 0x8280 - 0x82fe -SWIDTH2 0x8440 - 0x847e 0x8480 - 0x84fe -SWIDTH2 0x8540 - 0x857e 0x8580 - 0x85fe -SWIDTH2 0x8640 - 0x867e 0x8680 - 0x86fe -SWIDTH2 0x8740 - 0x877e 0x8780 - 0x87fe -SWIDTH2 0x8840 - 0x887e 0x8880 - 0x88fe -SWIDTH2 0x8940 - 0x897e 0x8980 - 0x89fe -SWIDTH2 0x8a40 - 0x8a7e 0x8a80 - 0x8afe -SWIDTH2 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe -SWIDTH2 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe -SWIDTH2 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe -SWIDTH2 0x8e40 - 0x8e7e 0x8e80 - 0x8efe -SWIDTH2 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe -SWIDTH2 0x9040 - 0x907e 0x9080 - 0x90fe -SWIDTH2 0x9140 - 0x917e 0x9180 - 0x91fe -SWIDTH2 0x9240 - 0x927e 0x9280 - 0x92fe -SWIDTH2 0x9340 - 0x937e 0x9380 - 0x93fe -SWIDTH2 0x9440 - 0x947e 0x9480 - 0x94fe -SWIDTH2 0x9540 - 0x957e 0x9580 - 0x95fe -SWIDTH2 0x9640 - 0x967e 0x9680 - 0x96fe -SWIDTH2 0x9740 - 0x977e 0x9780 - 0x97fe -SWIDTH2 0x9840 - 0x987e 0x9880 - 0x98fe -SWIDTH2 0x9940 - 0x997e 0x9980 - 0x99fe -SWIDTH2 0x9a40 - 0x9a7e 0x9a80 - 0x9afe -SWIDTH2 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe -SWIDTH2 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe -SWIDTH2 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe -SWIDTH2 0x9e40 - 0x9e7e 0x9e80 - 0x9efe -SWIDTH2 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe -SWIDTH2 0xa040 - 0xa07e 0xa080 - 0xa0fe -SWIDTH2 0xa1a1 - 0xa1a3 0xa1a8 0xa1a9 0xa1ab 0xa1b2 - 0xa1bf 0xa1e7 0xa1e9 0xa1ea 0xa1fe -SWIDTH2 0xa2e5 - 0xa2ee -SWIDTH2 0xa3a1 - 0xa3fe -SWIDTH2 0xa4a1 - 0xa4f3 -SWIDTH2 0xa5a1 - 0xa5f6 -SWIDTH2 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 -SWIDTH2 0xa893 - 0xa895 0xa8c5 - 0xa8e9 -SWIDTH2 0xa940 - 0xa957 0xa95a 0xa960 - 0xa97e 0xa980 - 0xa996 -SWIDTH2 0xaa40 - 0xaa7e 0xaa80 - 0xaaa0 -SWIDTH2 0xab40 - 0xab7e 0xab80 - 0xaba0 -SWIDTH2 0xac40 - 0xac7e 0xac80 - 0xaca0 -SWIDTH2 0xad40 - 0xad7e 0xad80 - 0xada0 -SWIDTH2 0xae40 - 0xae7e 0xae80 - 0xaea0 -SWIDTH2 0xaf40 - 0xaf7e 0xaf80 - 0xafa0 -SWIDTH2 0xb040 - 0xb07e 0xb080 - 0xb0fe -SWIDTH2 0xb140 - 0xb17e 0xb180 - 0xb1fe -SWIDTH2 0xb240 - 0xb27e 0xb280 - 0xb2fe -SWIDTH2 0xb340 - 0xb37e 0xb380 - 0xb3fe -SWIDTH2 0xb440 - 0xb47e 0xb480 - 0xb4fe -SWIDTH2 0xb540 - 0xb57e 0xb580 - 0xb5fe -SWIDTH2 0xb640 - 0xb67e 0xb680 - 0xb6fe -SWIDTH2 0xb740 - 0xb77e 0xb780 - 0xb7fe -SWIDTH2 0xb840 - 0xb87e 0xb880 - 0xb8fe -SWIDTH2 0xb940 - 0xb97e 0xb980 - 0xb9fe -SWIDTH2 0xba40 - 0xba7e 0xba80 - 0xbafe -SWIDTH2 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe -SWIDTH2 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe -SWIDTH2 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe -SWIDTH2 0xbe40 - 0xbe7e 0xbe80 - 0xbefe -SWIDTH2 0xbf40 - 0xbf7e 0xbf80 - 0xbffe -SWIDTH2 0xc040 - 0xc07e 0xc080 - 0xc0fe -SWIDTH2 0xc140 - 0xc17e 0xc180 - 0xc1fe -SWIDTH2 0xc240 - 0xc27e 0xc280 - 0xc2fe -SWIDTH2 0xc340 - 0xc37e 0xc380 - 0xc3fe -SWIDTH2 0xc440 - 0xc47e 0xc480 - 0xc4fe -SWIDTH2 0xc540 - 0xc57e 0xc580 - 0xc5fe -SWIDTH2 0xc640 - 0xc67e 0xc680 - 0xc6fe -SWIDTH2 0xc740 - 0xc77e 0xc780 - 0xc7fe -SWIDTH2 0xc840 - 0xc87e 0xc880 - 0xc8fe -SWIDTH2 0xc940 - 0xc97e 0xc980 - 0xc9fe -SWIDTH2 0xca40 - 0xca7e 0xca80 - 0xcafe -SWIDTH2 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe -SWIDTH2 0xcc40 - 0xcc7e 0xcc80 - 0xccfe -SWIDTH2 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe -SWIDTH2 0xce40 - 0xce7e 0xce80 - 0xcefe -SWIDTH2 0xcf40 - 0xcf7e 0xcf80 - 0xcffe -SWIDTH2 0xd040 - 0xd07e 0xd080 - 0xd0fe -SWIDTH2 0xd140 - 0xd17e 0xd180 - 0xd1fe -SWIDTH2 0xd240 - 0xd27e 0xd280 - 0xd2fe -SWIDTH2 0xd340 - 0xd37e 0xd380 - 0xd3fe -SWIDTH2 0xd440 - 0xd47e 0xd480 - 0xd4fe -SWIDTH2 0xd540 - 0xd57e 0xd580 - 0xd5fe -SWIDTH2 0xd640 - 0xd67e 0xd680 - 0xd6fe -SWIDTH2 0xd740 - 0xd77e 0xd780 - 0xd7f9 -SWIDTH2 0xd840 - 0xd87e 0xd880 - 0xd8fe -SWIDTH2 0xd940 - 0xd97e 0xd980 - 0xd9fe -SWIDTH2 0xda40 - 0xda7e 0xda80 - 0xdafe -SWIDTH2 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe -SWIDTH2 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe -SWIDTH2 0xdd40 - 0xdd7e 0xdd80 - 0xddfe -SWIDTH2 0xde40 - 0xde7e 0xde80 - 0xdefe -SWIDTH2 0xdf40 - 0xdf7e 0xdf80 - 0xdffe -SWIDTH2 0xe040 - 0xe07e 0xe080 - 0xe0fe -SWIDTH2 0xe140 - 0xe17e 0xe180 - 0xe1fe -SWIDTH2 0xe240 - 0xe27e 0xe280 - 0xe2fe -SWIDTH2 0xe340 - 0xe37e 0xe380 - 0xe3fe -SWIDTH2 0xe440 - 0xe47e 0xe480 - 0xe4fe -SWIDTH2 0xe540 - 0xe57e 0xe580 - 0xe5fe -SWIDTH2 0xe640 - 0xe67e 0xe680 - 0xe6fe -SWIDTH2 0xe740 - 0xe77e 0xe780 - 0xe7fe -SWIDTH2 0xe840 - 0xe87e 0xe880 - 0xe8fe -SWIDTH2 0xe940 - 0xe97e 0xe980 - 0xe9fe -SWIDTH2 0xea40 - 0xea7e 0xea80 - 0xeafe -SWIDTH2 0xeb40 - 0xeb7e 0xeb80 - 0xebfe -SWIDTH2 0xec40 - 0xec7e 0xec80 - 0xecfe -SWIDTH2 0xed40 - 0xed7e 0xed80 - 0xedfe -SWIDTH2 0xee40 - 0xee7e 0xee80 - 0xeefe -SWIDTH2 0xef40 - 0xef7e 0xef80 - 0xeffe -SWIDTH2 0xf040 - 0xf07e 0xf080 - 0xf0fe -SWIDTH2 0xf140 - 0xf17e 0xf180 - 0xf1fe -SWIDTH2 0xf240 - 0xf27e 0xf280 - 0xf2fe -SWIDTH2 0xf340 - 0xf37e 0xf380 - 0xf3fe -SWIDTH2 0xf440 - 0xf47e 0xf480 - 0xf4fe -SWIDTH2 0xf540 - 0xf57e 0xf580 - 0xf5fe -SWIDTH2 0xf640 - 0xf67e 0xf680 - 0xf6fe -SWIDTH2 0xf740 - 0xf77e 0xf780 - 0xf7fe -SWIDTH2 0xf840 - 0xf87e 0xf880 - 0xf8a0 -SWIDTH2 0xf940 - 0xf97e 0xf980 - 0xf9a0 -SWIDTH2 0xfa40 - 0xfa7e 0xfa80 - 0xfaa0 -SWIDTH2 0xfb40 - 0xfb7e 0xfb80 - 0xfba0 -SWIDTH2 0xfc40 - 0xfc7e 0xfc80 - 0xfca0 -SWIDTH2 0xfd40 - 0xfd7e 0xfd80 - 0xfda0 -SWIDTH2 0xfe40 - 0xfe50 0xfe54 - 0xfe58 0xfe5a - 0xfe60 0xfe62 - 0xfe65 0xfe68 - 0xfe6b 0xfe6e - 0xfe75 0xfe77 - 0xfe7d 0xfe80 - 0xfe8f 0xfe92 - 0xfe9f -TODIGIT < 0xa3b0 - 0xa3b9 : 0x0000 > -UPPER 0xa3c1 - 0xa3da -UPPER 0xa6a1 - 0xa6b8 -UPPER 0xa7a1 - 0xa7c1 - -/* - * Unicode BMP compatible - */ -ALPHA 0x81308439 -ALPHA 0x81308538 -ALPHA 0x81308632 0x81308638 0x81308639 -ALPHA 0x81308730 - 0x81308739 -ALPHA 0x81308830 - 0x81308839 -ALPHA 0x81308930 - 0x81308939 -ALPHA 0x81308a30 - 0x81308a39 -ALPHA 0x81308b30 - 0x81308b39 -ALPHA 0x81308c30 - 0x81308c39 -ALPHA 0x81308d30 - 0x81308d39 -ALPHA 0x81308e30 - 0x81308e39 -ALPHA 0x81308f30 - 0x81308f39 -ALPHA 0x81309030 - 0x81309039 -ALPHA 0x81309130 - 0x81309139 -ALPHA 0x81309230 - 0x81309239 -ALPHA 0x81309330 - 0x81309339 -ALPHA 0x81309430 - 0x81309439 -ALPHA 0x81309530 - 0x81309539 -ALPHA 0x81309630 - 0x81309639 -ALPHA 0x81309730 - 0x81309739 -ALPHA 0x81309830 - 0x81309839 -ALPHA 0x81309930 - 0x81309939 -ALPHA 0x81309a30 - 0x81309a39 -ALPHA 0x81309b30 - 0x81309b39 -ALPHA 0x81309c30 - 0x81309c39 -ALPHA 0x81309d30 - 0x81309d36 0x81309d38 0x81309d39 -ALPHA 0x81309e30 0x81309e31 0x81309e36 - 0x81309e39 -ALPHA 0x81309f30 - 0x81309f39 -ALPHA 0x8130a030 - 0x8130a039 -ALPHA 0x8130a130 - 0x8130a139 -ALPHA 0x8130a230 - 0x8130a239 -ALPHA 0x8130a330 - 0x8130a339 -ALPHA 0x8130a430 - 0x8130a439 -ALPHA 0x8130a530 - 0x8130a539 -ALPHA 0x8130a630 - 0x8130a639 -ALPHA 0x8130a731 - 0x8130a739 -ALPHA 0x8130a830 - 0x8130a838 -ALPHA 0x8130ab37 - 0x8130ab39 -ALPHA 0x8130ac30 - 0x8130ac39 -ALPHA 0x8130ad30 - 0x8130ad39 -ALPHA 0x8130ae30 - 0x8130ae39 -ALPHA 0x8130af30 - 0x8130af39 -ALPHA 0x8130b030 - 0x8130b039 -ALPHA 0x8130b130 - 0x8130b139 -ALPHA 0x8130b230 - 0x8130b239 -ALPHA 0x8130b330 - 0x8130b339 -ALPHA 0x8130b430 - 0x8130b438 -ALPHA 0x8130ca30 0x8130ca32 - 0x8130ca34 0x8130ca36 0x8130ca38 0x8130ca39 -ALPHA 0x8130cb30 0x8130cb32 - 0x8130cb39 -ALPHA 0x8130cc30 - 0x8130cc34 0x8130cc36 - 0x8130cc39 -ALPHA 0x8130cd30 - 0x8130cd39 -ALPHA 0x8130ce30 - 0x8130ce39 -ALPHA 0x8130cf30 - 0x8130cf39 -ALPHA 0x8130d030 - 0x8130d033 -ALPHA 0x8130d134 - 0x8130d139 -ALPHA 0x8130d230 - 0x8130d239 -ALPHA 0x8130d330 - 0x8130d339 -ALPHA 0x8130d430 - 0x8130d439 -ALPHA 0x8130d530 - 0x8130d539 -ALPHA 0x8130d630 - 0x8130d639 -ALPHA 0x8130d730 - 0x8130d737 -ALPHA 0x8130d836 - 0x8130d839 -ALPHA 0x8130d930 - 0x8130d939 -ALPHA 0x8130da30 - 0x8130da39 -ALPHA 0x8130db30 - 0x8130db39 -ALPHA 0x8130dc30 - 0x8130dc39 -ALPHA 0x8130dd30 - 0x8130dd39 -ALPHA 0x8130de30 - 0x8130de39 -ALPHA 0x8130df30 - 0x8130df34 0x8130df36 - 0x8130df39 -ALPHA 0x8130e030 - 0x8130e039 -ALPHA 0x8130e130 - 0x8130e139 -ALPHA 0x8130e230 - 0x8130e239 -ALPHA 0x8130e330 - 0x8130e333 0x8130e336 0x8130e337 -ALPHA 0x8130e434 - 0x8130e439 -ALPHA 0x8130e530 - 0x8130e539 -ALPHA 0x8130e933 - 0x8130e939 -ALPHA 0x8130ea30 - 0x8130ea39 -ALPHA 0x8130eb30 - 0x8130eb39 -ALPHA 0x8130ec30 - 0x8130ec39 -ALPHA 0x8130ed30 -ALPHA 0x8130ee31 - 0x8130ee39 -ALPHA 0x8130ef30 - 0x8130ef39 -ALPHA 0x8130f030 - 0x8130f039 -ALPHA 0x8130f130 - 0x8130f139 -ALPHA 0x81339430 - 0x81339439 -ALPHA 0x81339530 - 0x81339539 -ALPHA 0x81339630 - 0x81339639 -ALPHA 0x81339730 - 0x81339737 -ALPHA 0x8135ee34 - 0x8135ee39 -ALPHA 0x8135ef30 - 0x8135ef39 -ALPHA 0x8135f030 - 0x8135f039 -ALPHA 0x8135f130 - 0x8135f139 -ALPHA 0x8135f230 - 0x8135f239 -ALPHA 0x8135f330 - 0x8135f339 -ALPHA 0x8135f430 - 0x8135f439 -ALPHA 0x8135f530 - 0x8135f539 -ALPHA 0x8135f630 - 0x8135f639 -ALPHA 0x8135f730 - 0x8135f739 -ALPHA 0x8135f830 - 0x8135f839 -ALPHA 0x8135f930 - 0x8135f939 -ALPHA 0x8135fa30 - 0x8135fa39 -ALPHA 0x8135fb30 - 0x8135fb39 -ALPHA 0x8135fc30 - 0x8135fc39 -ALPHA 0x8135fd30 - 0x8135fd39 -ALPHA 0x8135fe34 - 0x8135fe39 -ALPHA 0x81368130 - 0x81368139 -ALPHA 0x81368230 - 0x81368239 -ALPHA 0x81368330 - 0x81368339 -ALPHA 0x81368430 - 0x81368439 -ALPHA 0x81368530 - 0x81368539 -ALPHA 0x81368630 - 0x81368639 -ALPHA 0x81368730 - 0x81368739 -ALPHA 0x81368830 - 0x81368839 -ALPHA 0x81368930 - 0x81368933 -ALPHA 0x81368a30 - 0x81368a39 -ALPHA 0x81368b30 - 0x81368b39 -ALPHA 0x81368c30 0x81368c31 0x81368c34 - 0x81368c39 -ALPHA 0x81368d32 - 0x81368d39 -ALPHA 0x81368e30 - 0x81368e39 -ALPHA 0x81368f30 - 0x81368f39 -ALPHA 0x81369030 - 0x81369039 -ALPHA 0x81369132 - 0x81369137 -ALPHA 0x81369230 - 0x81369237 0x81369239 -ALPHA 0x81369331 0x81369333 0x81369335 - 0x81369339 -ALPHA 0x81369430 - 0x81369439 -ALPHA 0x81369530 - 0x81369539 -ALPHA 0x81369630 - 0x81369635 0x81369638 0x81369639 -ALPHA 0x81369730 - 0x81369739 -ALPHA 0x81369830 - 0x81369839 -ALPHA 0x81369930 - 0x81369939 -ALPHA 0x81369a30 - 0x81369a39 -ALPHA 0x81369b30 - 0x81369b39 -ALPHA 0x81369c30 0x81369c32 - 0x81369c38 -ALPHA 0x81369d30 0x81369d34 - 0x81369d36 0x81369d38 0x81369d39 -ALPHA 0x81369e30 - 0x81369e34 0x81369e38 0x81369e39 -ALPHA 0x81369f30 0x81369f31 0x81369f34 - 0x81369f39 -ALPHA 0x8136a034 - 0x8136a039 -ALPHA 0x8136a130 - 0x8136a136 -ALPHA 0x8136a232 - 0x8136a234 0x8136a236 - 0x8136a239 -ALPHA 0x8136a330 - 0x8136a332 -ALPHA 0x8136ad33 -ALPHA 0x8136ae37 -ALPHA 0x8136bb37 -ALPHA 0x8136bc30 0x8136bc32 - 0x8136bc39 -ALPHA 0x8136bd30 0x8136bd31 0x8136bd33 0x8136bd36 - 0x8136bd39 -ALPHA 0x8136be30 0x8136be36 0x8136be38 -ALPHA 0x8136bf30 0x8136bf32 - 0x8136bf35 0x8136bf37 - 0x8136bf39 -ALPHA 0x8136c031 0x8136c032 0x8136c037 -ALPHA 0x8136c131 - 0x8136c133 0x8136c139 -ALPHA 0x8136c230 - 0x8136c233 -ALPHA 0x8430b232 - 0x8430b238 -ALPHA 0x8430b431 - 0x8430b435 -BLANK 0x81308432 -BLANK 0x8134ac34 -BLANK 0x8136a336 - 0x8136a339 -BLANK 0x8136a430 - 0x8136a437 -BLANK 0x8136a732 -BLANK 0x8136ab35 -CONTROL 0x81308130 - 0x81308139 -CONTROL 0x81308230 - 0x81308239 -CONTROL 0x81308330 - 0x81308339 -CONTROL 0x81308430 0x81308431 -CONTROL 0x81319631 -CONTROL 0x81319b31 -CONTROL 0x8134d432 -CONTROL 0x8136a438 0x8136a439 -CONTROL 0x8136a530 0x8136a531 -CONTROL 0x8136a637 - 0x8136a639 -CONTROL 0x8136a730 0x8136a731 -CONTROL 0x8136ab36 - 0x8136ab39 -CONTROL 0x8136ac36 - 0x8136ac39 -CONTROL 0x8136ad30 0x8136ad31 -CONTROL 0x84319533 -CONTROL 0x8431a433 - 0x8431a435 -DIGIT 0x81318936 - 0x81318939 -DIGIT 0x81318a30 - 0x81318a35 -DIGIT 0x81319830 - 0x81319839 -DIGIT 0x8131d730 - 0x8131d739 -DIGIT 0x8131e338 0x8131e339 -DIGIT 0x8131e430 - 0x8131e437 -DIGIT 0x8131f036 - 0x8131f039 -DIGIT 0x8131f130 - 0x8131f135 -DIGIT 0x8131fd34 - 0x8131fd39 -DIGIT 0x8131fe30 - 0x8131fe33 -DIGIT 0x81328c32 - 0x81328c39 -DIGIT 0x81328d30 0x81328d31 -DIGIT 0x81329931 - 0x81329939 -DIGIT 0x8132a538 0x8132a539 -DIGIT 0x8132a630 - 0x8132a637 -DIGIT 0x8132b236 - 0x8132b239 -DIGIT 0x8132b330 - 0x8132b335 -DIGIT 0x8132bf34 - 0x8132bf39 -DIGIT 0x8132c030 - 0x8132c033 -DIGIT 0x8132d638 0x8132d639 -DIGIT 0x8132d730 - 0x8132d737 -DIGIT 0x8132e336 - 0x8132e339 -DIGIT 0x8132e430 - 0x8132e435 -DIGIT 0x8132eb36 - 0x8132eb39 -DIGIT 0x8132ec30 - 0x8132ec35 -DIGIT 0x81338a34 - 0x81338a39 -DIGIT 0x81338b30 - 0x81338b33 -DIGIT 0x8133db33 - 0x8133db39 -DIGIT 0x8133dc30 0x8133dc31 -DIGIT 0x8134cf36 - 0x8134cf39 -DIGIT 0x8134d030 - 0x8134d035 -DIGIT 0x8134d434 - 0x8134d439 -DIGIT 0x8134d530 - 0x8134d533 -GRAPH 0x81309d37 -GRAPH 0x81309e32 - 0x81309e35 -GRAPH 0x8130b531 - 0x8130b539 -GRAPH 0x8130b632 - 0x8130b638 -GRAPH 0x8130b739 -GRAPH 0x8130b830 -GRAPH 0x8130b934 - 0x8130b938 -GRAPH 0x8130ba38 -GRAPH 0x8130bc36 - 0x8130bc39 -GRAPH 0x8130bd30 - 0x8130bd39 -GRAPH 0x8130be30 - 0x8130be39 -GRAPH 0x8130bf30 - 0x8130bf39 -GRAPH 0x8130c030 - 0x8130c039 -GRAPH 0x8130c130 - 0x8130c139 -GRAPH 0x8130c230 - 0x8130c239 -GRAPH 0x8130c330 - 0x8130c339 -GRAPH 0x8130c430 - 0x8130c435 -GRAPH 0x8130c632 - 0x8130c639 -GRAPH 0x8130c730 - 0x8130c737 -GRAPH 0x8130c838 -GRAPH 0x8130d739 -GRAPH 0x8130d830 - 0x8130d832 0x8130d834 0x8130d835 -GRAPH 0x8130ed33 -GRAPH 0x8130f239 -GRAPH 0x8130f330 - 0x8130f339 -GRAPH 0x8130f430 - 0x8130f435 0x8130f437 - 0x8130f439 -GRAPH 0x8130f530 - 0x8130f539 -GRAPH 0x8130f630 - 0x8130f639 -GRAPH 0x8130f731 - 0x8130f733 0x8130f735 0x8130f737 0x8130f738 -GRAPH 0x8130f830 -GRAPH 0x8130f932 - 0x8130f939 -GRAPH 0x8130fa30 - 0x8130fa39 -GRAPH 0x8130fb30 - 0x8130fb38 -GRAPH 0x8130fc34 - 0x8130fc36 -GRAPH 0x81318333 - 0x81318339 -GRAPH 0x81318430 - 0x81318439 -GRAPH 0x81318530 - 0x81318538 -GRAPH 0x81318634 - 0x81318639 -GRAPH 0x81318730 - 0x81318739 -GRAPH 0x81318830 - 0x81318835 -GRAPH 0x81318b30 - 0x81318b39 -GRAPH 0x81318c30 - 0x81318c39 -GRAPH 0x81318d30 - 0x81318d39 -GRAPH 0x81318e30 - 0x81318e39 -GRAPH 0x81318f30 - 0x81318f39 -GRAPH 0x81319030 - 0x81319039 -GRAPH 0x81319130 - 0x81319139 -GRAPH 0x81319230 - 0x81319239 -GRAPH 0x81319330 - 0x81319339 -GRAPH 0x81319430 - 0x81319439 -GRAPH 0x81319530 0x81319531 0x81319533 - 0x81319539 -GRAPH 0x81319630 0x81319632 - 0x81319639 -GRAPH 0x81319730 - 0x81319732 0x81319734 - 0x81319737 -GRAPH 0x81319930 - 0x81319932 -GRAPH 0x81319b32 - 0x81319b39 -GRAPH 0x81319c30 - 0x81319c39 -GRAPH 0x81319d30 - 0x81319d39 -GRAPH 0x81319e30 0x81319e34 - 0x81319e39 -GRAPH 0x81319f30 - 0x81319f39 -GRAPH 0x8131a030 - 0x8131a039 -GRAPH 0x8131a130 -GRAPH 0x8131a634 - 0x8131a639 -GRAPH 0x8131a730 - 0x8131a739 -GRAPH 0x8131a830 - 0x8131a839 -GRAPH 0x8131a930 - 0x8131a939 -GRAPH 0x8131aa30 - 0x8131aa39 -GRAPH 0x8131ab30 - 0x8131ab33 -GRAPH 0x8131cc39 -GRAPH 0x8131cd30 0x8131cd31 0x8131cd33 - 0x8131cd39 -GRAPH 0x8131ce30 - 0x8131ce39 -GRAPH 0x8131cf30 - 0x8131cf39 -GRAPH 0x8131d030 - 0x8131d039 -GRAPH 0x8131d130 - 0x8131d139 -GRAPH 0x8131d230 - 0x8131d235 0x8131d238 0x8131d239 -GRAPH 0x8131d330 - 0x8131d339 -GRAPH 0x8131d430 - 0x8131d435 0x8131d438 0x8131d439 -GRAPH 0x8131d530 - 0x8131d532 0x8131d536 - 0x8131d539 -GRAPH 0x8131d630 - 0x8131d637 -GRAPH 0x8131d937 - 0x8131d939 -GRAPH 0x8131da31 - 0x8131da38 -GRAPH 0x8131db31 0x8131db32 0x8131db35 - 0x8131db39 -GRAPH 0x8131dc30 - 0x8131dc39 -GRAPH 0x8131dd30 - 0x8131dd36 0x8131dd38 0x8131dd39 -GRAPH 0x8131de30 - 0x8131de34 0x8131de36 -GRAPH 0x8131df30 - 0x8131df33 0x8131df36 0x8131df38 0x8131df39 -GRAPH 0x8131e030 - 0x8131e034 0x8131e037 0x8131e038 -GRAPH 0x8131e131 - 0x8131e133 -GRAPH 0x8131e233 0x8131e238 0x8131e239 -GRAPH 0x8131e331 - 0x8131e335 -GRAPH 0x8131e438 0x8131e439 -GRAPH 0x8131e636 0x8131e639 -GRAPH 0x8131e730 - 0x8131e734 0x8131e739 -GRAPH 0x8131e830 0x8131e833 - 0x8131e839 -GRAPH 0x8131e930 - 0x8131e939 -GRAPH 0x8131ea30 - 0x8131ea34 0x8131ea36 - 0x8131ea39 -GRAPH 0x8131eb30 - 0x8131eb32 0x8131eb34 0x8131eb35 0x8131eb37 0x8131eb38 -GRAPH 0x8131ec30 0x8131ec31 0x8131ec34 0x8131ec36 - 0x8131ec39 -GRAPH 0x8131ed30 0x8131ed35 0x8131ed36 0x8131ed39 -GRAPH 0x8131ee30 0x8131ee31 -GRAPH 0x8131ef33 - 0x8131ef36 0x8131ef38 -GRAPH 0x8131f136 - 0x8131f139 -GRAPH 0x8131f230 -GRAPH 0x8131f333 - 0x8131f335 0x8131f337 - 0x8131f339 -GRAPH 0x8131f430 - 0x8131f433 0x8131f435 0x8131f437 - 0x8131f439 -GRAPH 0x8131f531 - 0x8131f539 -GRAPH 0x8131f630 - 0x8131f639 -GRAPH 0x8131f730 - 0x8131f732 0x8131f734 - 0x8131f739 -GRAPH 0x8131f830 0x8131f832 0x8131f833 0x8131f835 - 0x8131f839 -GRAPH 0x8131f932 - 0x8131f939 -GRAPH 0x8131fa30 0x8131fa31 0x8131fa33 - 0x8131fa35 0x8131fa37 - 0x8131fa39 -GRAPH 0x8131fb32 -GRAPH 0x8131fc38 -GRAPH 0x81328231 - 0x81328233 0x81328235 - 0x81328239 -GRAPH 0x81328330 - 0x81328332 0x81328335 0x81328336 0x81328339 -GRAPH 0x81328430 - 0x81328439 -GRAPH 0x81328530 - 0x81328539 -GRAPH 0x81328630 0x81328632 - 0x81328638 -GRAPH 0x81328730 0x81328731 0x81328734 - 0x81328737 -GRAPH 0x81328830 - 0x81328837 -GRAPH 0x81328931 0x81328932 0x81328935 - 0x81328937 -GRAPH 0x81328a36 0x81328a37 -GRAPH 0x81328b32 0x81328b33 0x81328b35 - 0x81328b37 -GRAPH 0x81328f30 0x81328f31 0x81328f33 - 0x81328f38 -GRAPH 0x81329032 - 0x81329034 0x81329036 - 0x81329039 -GRAPH 0x81329133 0x81329134 0x81329136 0x81329138 0x81329139 -GRAPH 0x81329233 0x81329234 0x81329238 0x81329239 -GRAPH 0x81329330 0x81329334 - 0x81329339 -GRAPH 0x81329430 0x81329431 0x81329433 - 0x81329435 -GRAPH 0x81329530 - 0x81329534 0x81329538 0x81329539 -GRAPH 0x81329630 0x81329632 - 0x81329635 -GRAPH 0x81329735 -GRAPH 0x81329b37 - 0x81329b39 -GRAPH 0x81329c31 - 0x81329c38 -GRAPH 0x81329d30 - 0x81329d32 0x81329d34 - 0x81329d39 -GRAPH 0x81329e30 - 0x81329e39 -GRAPH 0x81329f30 - 0x81329f36 0x81329f38 0x81329f39 -GRAPH 0x8132a030 - 0x8132a037 0x8132a039 -GRAPH 0x8132a130 - 0x8132a133 0x8132a138 0x8132a139 -GRAPH 0x8132a230 - 0x8132a234 0x8132a236 - 0x8132a238 -GRAPH 0x8132a330 - 0x8132a333 -GRAPH 0x8132a431 0x8132a432 -GRAPH 0x8132a532 0x8132a533 -GRAPH 0x8132a836 0x8132a837 0x8132a839 -GRAPH 0x8132a930 - 0x8132a936 0x8132a938 0x8132a939 -GRAPH 0x8132aa30 0x8132aa32 - 0x8132aa39 -GRAPH 0x8132ab30 - 0x8132ab39 -GRAPH 0x8132ac30 - 0x8132ac34 0x8132ac36 - 0x8132ac39 -GRAPH 0x8132ad30 - 0x8132ad35 0x8132ad37 - 0x8132ad39 -GRAPH 0x8132ae30 0x8132ae31 0x8132ae36 - 0x8132ae39 -GRAPH 0x8132af30 - 0x8132af32 0x8132af34 - 0x8132af36 0x8132af38 0x8132af39 -GRAPH 0x8132b030 0x8132b031 0x8132b039 -GRAPH 0x8132b130 0x8132b138 -GRAPH 0x8132b230 0x8132b231 -GRAPH 0x8132b534 0x8132b535 0x8132b537 - 0x8132b539 -GRAPH 0x8132b630 - 0x8132b634 0x8132b636 - 0x8132b638 -GRAPH 0x8132b730 - 0x8132b739 -GRAPH 0x8132b830 - 0x8132b839 -GRAPH 0x8132b930 - 0x8132b932 0x8132b934 - 0x8132b939 -GRAPH 0x8132ba30 - 0x8132ba39 -GRAPH 0x8132bb34 - 0x8132bb39 -GRAPH 0x8132bc32 - 0x8132bc34 0x8132bc36 - 0x8132bc39 -GRAPH 0x8132bd39 -GRAPH 0x8132be38 0x8132be39 -GRAPH 0x8132c232 0x8132c233 0x8132c235 - 0x8132c239 -GRAPH 0x8132c330 - 0x8132c339 -GRAPH 0x8132c430 - 0x8132c432 0x8132c436 - 0x8132c439 -GRAPH 0x8132c530 - 0x8132c539 -GRAPH 0x8132c630 - 0x8132c639 -GRAPH 0x8132c731 - 0x8132c739 -GRAPH 0x8132c831 0x8132c834 - 0x8132c839 -GRAPH 0x8132c930 0x8132c934 0x8132c939 -GRAPH 0x8132ca30 - 0x8132ca34 0x8132ca36 0x8132ca38 0x8132ca39 -GRAPH 0x8132cb30 - 0x8132cb35 -GRAPH 0x8132cd34 0x8132cd35 -GRAPH 0x8132ce39 -GRAPH 0x8132cf30 - 0x8132cf39 -GRAPH 0x8132d030 - 0x8132d039 -GRAPH 0x8132d130 - 0x8132d139 -GRAPH 0x8132d230 - 0x8132d239 -GRAPH 0x8132d330 - 0x8132d339 -GRAPH 0x8132d430 - 0x8132d436 -GRAPH 0x8132d532 - 0x8132d539 -GRAPH 0x8132d630 - 0x8132d636 -GRAPH 0x8132db37 0x8132db38 -GRAPH 0x8132dc30 0x8132dc33 0x8132dc34 0x8132dc36 0x8132dc39 -GRAPH 0x8132dd36 - 0x8132dd39 -GRAPH 0x8132de31 - 0x8132de37 0x8132de39 -GRAPH 0x8132df30 0x8132df31 0x8132df33 0x8132df35 0x8132df38 0x8132df39 -GRAPH 0x8132e031 - 0x8132e039 -GRAPH 0x8132e130 - 0x8132e133 0x8132e135 - 0x8132e137 -GRAPH 0x8132e230 - 0x8132e234 0x8132e236 0x8132e238 0x8132e239 -GRAPH 0x8132e330 - 0x8132e333 -GRAPH 0x8132e438 0x8132e439 -GRAPH 0x8132ea38 0x8132ea39 -GRAPH 0x8132ed37 0x8132ed39 -GRAPH 0x8132ee31 0x8132ee36 - 0x8132ee39 -GRAPH 0x8132ef30 - 0x8132ef35 0x8132ef37 - 0x8132ef39 -GRAPH 0x8132f030 - 0x8132f039 -GRAPH 0x8132f130 - 0x8132f139 -GRAPH 0x8132f230 - 0x8132f239 -GRAPH 0x8132f330 0x8132f337 - 0x8132f339 -GRAPH 0x8132f430 - 0x8132f439 -GRAPH 0x8132f530 - 0x8132f536 0x8132f538 0x8132f539 -GRAPH 0x8132f630 - 0x8132f633 0x8132f638 0x8132f639 -GRAPH 0x8132f730 - 0x8132f735 0x8132f737 - 0x8132f739 -GRAPH 0x8132f830 - 0x8132f839 -GRAPH 0x8132f930 - 0x8132f939 -GRAPH 0x8132fa30 - 0x8132fa39 -GRAPH 0x8132fb30 - 0x8132fb32 -GRAPH 0x8132fc32 -GRAPH 0x81338430 - 0x81338439 -GRAPH 0x81338530 - 0x81338539 -GRAPH 0x81338630 - 0x81338639 -GRAPH 0x81338730 - 0x81338733 0x81338735 - 0x81338739 -GRAPH 0x81338831 0x81338832 0x81338834 - 0x81338839 -GRAPH 0x81338930 0x81338934 - 0x81338937 -GRAPH 0x81338c30 - 0x81338c39 -GRAPH 0x81339838 0x81339839 -GRAPH 0x81339930 - 0x81339939 -GRAPH 0x81339a30 - 0x81339a39 -GRAPH 0x81339b30 - 0x81339b39 -GRAPH 0x81339c30 - 0x81339c38 -GRAPH 0x81339d36 - 0x81339d39 -GRAPH 0x81339e30 - 0x81339e39 -GRAPH 0x81339f30 - 0x81339f39 -GRAPH 0x8133a030 - 0x8133a039 -GRAPH 0x8133a130 - 0x8133a139 -GRAPH 0x8133a230 - 0x8133a239 -GRAPH 0x8133a330 - 0x8133a339 -GRAPH 0x8133a430 - 0x8133a439 -GRAPH 0x8133a530 - 0x8133a539 -GRAPH 0x8133a630 - 0x8133a635 -GRAPH 0x8133a731 - 0x8133a739 -GRAPH 0x8133a830 - 0x8133a839 -GRAPH 0x8133a930 - 0x8133a939 -GRAPH 0x8133aa30 - 0x8133aa39 -GRAPH 0x8133ab30 - 0x8133ab39 -GRAPH 0x8133ac30 - 0x8133ac39 -GRAPH 0x8133ad30 - 0x8133ad38 -GRAPH 0x8133ae34 - 0x8133ae39 -GRAPH 0x8133af30 - 0x8133af39 -GRAPH 0x8133b030 - 0x8133b039 -GRAPH 0x8133b130 - 0x8133b139 -GRAPH 0x8133b230 - 0x8133b239 -GRAPH 0x8133b330 - 0x8133b339 -GRAPH 0x8133b430 - 0x8133b439 -GRAPH 0x8133b530 - 0x8133b539 -GRAPH 0x8133b630 - 0x8133b635 -GRAPH 0x8133e038 0x8133e039 -GRAPH 0x8133e130 - 0x8133e139 -GRAPH 0x8133e230 - 0x8133e239 -GRAPH 0x8133e330 - 0x8133e339 -GRAPH 0x8133e430 - 0x8133e439 -GRAPH 0x8133e530 - 0x8133e539 -GRAPH 0x8133e630 - 0x8133e639 -GRAPH 0x8133e730 - 0x8133e739 -GRAPH 0x8133e830 - 0x8133e839 -GRAPH 0x8133e930 - 0x8133e932 -GRAPH 0x8134ac35 - 0x8134ac39 -GRAPH 0x8134ad30 - 0x8134ad39 -GRAPH 0x8134ae30 - 0x8134ae39 -GRAPH 0x8134af30 0x8134af36 - 0x8134af39 -GRAPH 0x8134b030 - 0x8134b039 -GRAPH 0x8134b130 - 0x8134b139 -GRAPH 0x8134b230 - 0x8134b239 -GRAPH 0x8134b330 - 0x8134b339 -GRAPH 0x8134b430 - 0x8134b439 -GRAPH 0x8134b530 - 0x8134b539 -GRAPH 0x8134b630 - 0x8134b639 -GRAPH 0x8134b730 -GRAPH 0x8134b932 - 0x8134b939 -GRAPH 0x8134ba30 - 0x8134ba34 0x8134ba36 - 0x8134ba39 -GRAPH 0x8134bb30 - 0x8134bb32 -GRAPH 0x8134bc34 - 0x8134bc39 -GRAPH 0x8134bd30 - 0x8134bd39 -GRAPH 0x8134be30 - 0x8134be34 -GRAPH 0x8134bf36 - 0x8134bf39 -GRAPH 0x8134c030 - 0x8134c039 -GRAPH 0x8134c130 - 0x8134c135 -GRAPH 0x8134c238 0x8134c239 -GRAPH 0x8134c330 - 0x8134c339 -GRAPH 0x8134c430 0x8134c432 - 0x8134c434 0x8134c436 0x8134c437 -GRAPH 0x8134c630 - 0x8134c639 -GRAPH 0x8134c730 - 0x8134c739 -GRAPH 0x8134c830 - 0x8134c839 -GRAPH 0x8134c930 - 0x8134c939 -GRAPH 0x8134ca30 - 0x8134ca39 -GRAPH 0x8134cb30 - 0x8134cb39 -GRAPH 0x8134cc30 - 0x8134cc39 -GRAPH 0x8134cd30 - 0x8134cd39 -GRAPH 0x8134ce30 - 0x8134ce33 0x8134ce37 -GRAPH 0x8134cf32 -GRAPH 0x8134d339 -GRAPH 0x8134d430 0x8134d431 -GRAPH 0x8134d630 - 0x8134d639 -GRAPH 0x8134d730 - 0x8134d739 -GRAPH 0x8134d830 - 0x8134d839 -GRAPH 0x8134d930 - 0x8134d939 -GRAPH 0x8134da30 - 0x8134da39 -GRAPH 0x8134db30 - 0x8134db39 -GRAPH 0x8134dc30 - 0x8134dc39 -GRAPH 0x8134dd30 - 0x8134dd39 -GRAPH 0x8134de30 - 0x8134de37 -GRAPH 0x8134df36 - 0x8134df39 -GRAPH 0x8134e030 - 0x8134e039 -GRAPH 0x8134e130 - 0x8134e139 -GRAPH 0x8134e230 - 0x8134e239 -GRAPH 0x8134e330 - 0x8134e337 -GRAPH 0x8136b637 - 0x8136b639 -GRAPH 0x8136b730 - 0x8136b739 -GRAPH 0x8136b830 - 0x8136b839 -GRAPH 0x8136b930 - 0x8136b933 -GRAPH 0x8136c033 - 0x8136c036 -GRAPH 0x8139a434 - 0x8139a439 -GRAPH 0x8139a531 - 0x8139a535 -GRAPH 0x8139a631 0x8139a632 -GRAPH 0x8139a731 0x8139a732 -GRAPH 0x8139a836 - 0x8139a838 -GRAPH 0x8139ae34 -GRAPH 0x8139b434 - 0x8139b439 -GRAPH 0x8139b530 - 0x8139b539 -GRAPH 0x8139b630 - 0x8139b637 -GRAPH 0x8336c739 -GRAPH 0x8336c830 - 0x8336c839 -GRAPH 0x8336c930 - 0x8336c939 -GRAPH 0x8336ca30 - 0x8336ca39 -GRAPH 0x8336cb30 - 0x8336cb39 -GRAPH 0x8336cc30 - 0x8336cc39 -GRAPH 0x8336cd30 - 0x8336cd39 -GRAPH 0x8336ce30 - 0x8336ce39 -GRAPH 0x8336cf30 - 0x8336cf39 -GRAPH 0x8336d030 - 0x8336d039 -GRAPH 0x8336d130 - 0x8336d139 -GRAPH 0x8336d230 - 0x8336d239 -GRAPH 0x8336d330 - 0x8336d339 -GRAPH 0x8336d430 - 0x8336d439 -GRAPH 0x8336d530 - 0x8336d539 -GRAPH 0x8336d630 - 0x8336d639 -GRAPH 0x8336d730 - 0x8336d739 -GRAPH 0x8336d830 - 0x8336d839 -GRAPH 0x8336d930 - 0x8336d939 -GRAPH 0x8336da30 - 0x8336da39 -GRAPH 0x8336db30 - 0x8336db39 -GRAPH 0x8336dc30 - 0x8336dc39 -GRAPH 0x8336dd30 - 0x8336dd39 -GRAPH 0x8336de30 - 0x8336de39 -GRAPH 0x8336df30 - 0x8336df39 -GRAPH 0x8336e030 - 0x8336e039 -GRAPH 0x8336e130 - 0x8336e139 -GRAPH 0x8336e230 - 0x8336e239 -GRAPH 0x8336e330 - 0x8336e339 -GRAPH 0x8336e430 - 0x8336e439 -GRAPH 0x8336e530 - 0x8336e539 -GRAPH 0x8336e630 - 0x8336e639 -GRAPH 0x8336e730 - 0x8336e739 -GRAPH 0x8336e830 - 0x8336e839 -GRAPH 0x8336e930 - 0x8336e939 -GRAPH 0x8336ea30 - 0x8336ea39 -GRAPH 0x8336eb30 - 0x8336eb39 -GRAPH 0x8336ec30 - 0x8336ec39 -GRAPH 0x8336ed30 - 0x8336ed39 -GRAPH 0x8336ee30 - 0x8336ee39 -GRAPH 0x8336ef30 - 0x8336ef39 -GRAPH 0x8336f030 - 0x8336f039 -GRAPH 0x8336f130 - 0x8336f139 -GRAPH 0x8336f230 - 0x8336f239 -GRAPH 0x8336f330 - 0x8336f339 -GRAPH 0x8336f430 - 0x8336f439 -GRAPH 0x8336f530 - 0x8336f539 -GRAPH 0x8336f630 - 0x8336f639 -GRAPH 0x8336f730 - 0x8336f739 -GRAPH 0x8336f830 - 0x8336f839 -GRAPH 0x8336f930 - 0x8336f939 -GRAPH 0x8336fa30 - 0x8336fa39 -GRAPH 0x8336fb30 - 0x8336fb39 -GRAPH 0x8336fc30 - 0x8336fc39 -GRAPH 0x8336fd30 - 0x8336fd39 -GRAPH 0x8336fe30 - 0x8336fe39 -GRAPH 0x83378130 - 0x83378139 -GRAPH 0x83378230 - 0x83378239 -GRAPH 0x83378330 - 0x83378339 -GRAPH 0x83378430 - 0x83378439 -GRAPH 0x83378530 - 0x83378539 -GRAPH 0x83378630 - 0x83378639 -GRAPH 0x83378730 - 0x83378739 -GRAPH 0x83378830 - 0x83378839 -GRAPH 0x83378930 - 0x83378939 -GRAPH 0x83378a30 - 0x83378a39 -GRAPH 0x83378b30 - 0x83378b39 -GRAPH 0x83378c30 - 0x83378c39 -GRAPH 0x83378d30 - 0x83378d39 -GRAPH 0x83378e30 - 0x83378e39 -GRAPH 0x83378f30 - 0x83378f39 -GRAPH 0x83379030 - 0x83379039 -GRAPH 0x83379130 - 0x83379139 -GRAPH 0x83379230 - 0x83379239 -GRAPH 0x83379330 - 0x83379339 -GRAPH 0x83379430 - 0x83379439 -GRAPH 0x83379530 - 0x83379539 -GRAPH 0x83379630 - 0x83379639 -GRAPH 0x83379730 - 0x83379739 -GRAPH 0x83379830 - 0x83379839 -GRAPH 0x83379930 - 0x83379939 -GRAPH 0x83379a30 - 0x83379a39 -GRAPH 0x83379b30 - 0x83379b39 -GRAPH 0x83379c30 - 0x83379c39 -GRAPH 0x83379d30 - 0x83379d39 -GRAPH 0x83379e30 - 0x83379e39 -GRAPH 0x83379f30 - 0x83379f39 -GRAPH 0x8337a030 - 0x8337a039 -GRAPH 0x8337a130 - 0x8337a139 -GRAPH 0x8337a230 - 0x8337a239 -GRAPH 0x8337a330 - 0x8337a339 -GRAPH 0x8337a430 - 0x8337a439 -GRAPH 0x8337a530 - 0x8337a539 -GRAPH 0x8337a630 - 0x8337a639 -GRAPH 0x8337a730 - 0x8337a739 -GRAPH 0x8337a830 - 0x8337a839 -GRAPH 0x8337a930 - 0x8337a939 -GRAPH 0x8337aa30 - 0x8337aa39 -GRAPH 0x8337ab30 - 0x8337ab39 -GRAPH 0x8337ac30 - 0x8337ac39 -GRAPH 0x8337ad30 - 0x8337ad39 -GRAPH 0x8337ae30 - 0x8337ae39 -GRAPH 0x8337af30 - 0x8337af39 -GRAPH 0x8337b030 - 0x8337b039 -GRAPH 0x8337b130 - 0x8337b139 -GRAPH 0x8337b230 - 0x8337b239 -GRAPH 0x8337b330 - 0x8337b339 -GRAPH 0x8337b430 - 0x8337b439 -GRAPH 0x8337b530 - 0x8337b539 -GRAPH 0x8337b630 - 0x8337b639 -GRAPH 0x8337b730 - 0x8337b739 -GRAPH 0x8337b830 - 0x8337b839 -GRAPH 0x8337b930 - 0x8337b939 -GRAPH 0x8337ba30 - 0x8337ba39 -GRAPH 0x8337bb30 - 0x8337bb39 -GRAPH 0x8337bc30 - 0x8337bc39 -GRAPH 0x8337bd30 - 0x8337bd39 -GRAPH 0x8337be30 - 0x8337be39 -GRAPH 0x8337bf30 - 0x8337bf39 -GRAPH 0x8337c030 - 0x8337c039 -GRAPH 0x8337c130 - 0x8337c139 -GRAPH 0x8337c230 - 0x8337c239 -GRAPH 0x8337c330 - 0x8337c339 -GRAPH 0x8337c430 - 0x8337c439 -GRAPH 0x8337c530 - 0x8337c539 -GRAPH 0x8337c630 - 0x8337c639 -GRAPH 0x8337c730 - 0x8337c739 -GRAPH 0x8337c830 - 0x8337c839 -GRAPH 0x8337c930 - 0x8337c939 -GRAPH 0x8337ca30 - 0x8337ca39 -GRAPH 0x8337cb30 - 0x8337cb39 -GRAPH 0x8337cc30 - 0x8337cc39 -GRAPH 0x8337cd30 - 0x8337cd39 -GRAPH 0x8337ce30 - 0x8337ce39 -GRAPH 0x8337cf30 - 0x8337cf39 -GRAPH 0x8337d030 - 0x8337d039 -GRAPH 0x8337d130 - 0x8337d139 -GRAPH 0x8337d230 - 0x8337d239 -GRAPH 0x8337d330 - 0x8337d339 -GRAPH 0x8337d430 - 0x8337d439 -GRAPH 0x8337d530 - 0x8337d539 -GRAPH 0x8337d630 - 0x8337d639 -GRAPH 0x8337d730 - 0x8337d739 -GRAPH 0x8337d830 - 0x8337d839 -GRAPH 0x8337d930 - 0x8337d939 -GRAPH 0x8337da30 - 0x8337da39 -GRAPH 0x8337db30 - 0x8337db39 -GRAPH 0x8337dc30 - 0x8337dc39 -GRAPH 0x8337dd30 - 0x8337dd39 -GRAPH 0x8337de30 - 0x8337de39 -GRAPH 0x8337df30 - 0x8337df39 -GRAPH 0x8337e030 - 0x8337e039 -GRAPH 0x8337e130 - 0x8337e139 -GRAPH 0x8337e230 - 0x8337e239 -GRAPH 0x8337e330 - 0x8337e339 -GRAPH 0x8337e430 - 0x8337e439 -GRAPH 0x8337e530 - 0x8337e539 -GRAPH 0x8337e630 - 0x8337e639 -GRAPH 0x8337e730 - 0x8337e739 -GRAPH 0x8337e830 - 0x8337e839 -GRAPH 0x8337e930 - 0x8337e939 -GRAPH 0x8337ea30 - 0x8337ea39 -GRAPH 0x8337eb30 - 0x8337eb39 -GRAPH 0x8337ec30 - 0x8337ec39 -GRAPH 0x8337ed30 - 0x8337ed39 -GRAPH 0x8337ee30 - 0x8337ee39 -GRAPH 0x8337ef30 - 0x8337ef39 -GRAPH 0x8337f030 - 0x8337f039 -GRAPH 0x8337f130 - 0x8337f139 -GRAPH 0x8337f230 - 0x8337f239 -GRAPH 0x8337f330 - 0x8337f339 -GRAPH 0x8337f430 - 0x8337f439 -GRAPH 0x8337f530 - 0x8337f539 -GRAPH 0x8337f630 - 0x8337f639 -GRAPH 0x8337f730 - 0x8337f739 -GRAPH 0x8337f830 - 0x8337f839 -GRAPH 0x8337f930 - 0x8337f939 -GRAPH 0x8337fa30 - 0x8337fa39 -GRAPH 0x8337fb30 - 0x8337fb39 -GRAPH 0x8337fc30 - 0x8337fc39 -GRAPH 0x8337fd30 - 0x8337fd39 -GRAPH 0x8337fe30 - 0x8337fe39 -GRAPH 0x83388130 - 0x83388139 -GRAPH 0x83388230 - 0x83388239 -GRAPH 0x83388330 - 0x83388339 -GRAPH 0x83388430 - 0x83388439 -GRAPH 0x83388530 - 0x83388539 -GRAPH 0x83388630 - 0x83388639 -GRAPH 0x83388730 - 0x83388739 -GRAPH 0x83388830 - 0x83388839 -GRAPH 0x83388930 - 0x83388939 -GRAPH 0x83388a30 - 0x83388a39 -GRAPH 0x83388b30 - 0x83388b39 -GRAPH 0x83388c30 - 0x83388c39 -GRAPH 0x83388d30 - 0x83388d39 -GRAPH 0x83388e30 - 0x83388e39 -GRAPH 0x83388f30 - 0x83388f39 -GRAPH 0x83389030 - 0x83389039 -GRAPH 0x83389130 - 0x83389139 -GRAPH 0x83389230 - 0x83389239 -GRAPH 0x83389330 - 0x83389339 -GRAPH 0x83389430 - 0x83389439 -GRAPH 0x83389530 - 0x83389539 -GRAPH 0x83389630 - 0x83389639 -GRAPH 0x83389730 - 0x83389739 -GRAPH 0x83389830 - 0x83389839 -GRAPH 0x83389930 - 0x83389939 -GRAPH 0x83389a30 - 0x83389a39 -GRAPH 0x83389b30 - 0x83389b39 -GRAPH 0x83389c30 - 0x83389c39 -GRAPH 0x83389d30 - 0x83389d39 -GRAPH 0x83389e30 - 0x83389e39 -GRAPH 0x83389f30 - 0x83389f39 -GRAPH 0x8338a030 - 0x8338a039 -GRAPH 0x8338a130 - 0x8338a139 -GRAPH 0x8338a230 - 0x8338a239 -GRAPH 0x8338a330 - 0x8338a339 -GRAPH 0x8338a430 - 0x8338a439 -GRAPH 0x8338a530 - 0x8338a539 -GRAPH 0x8338a630 - 0x8338a639 -GRAPH 0x8338a730 - 0x8338a739 -GRAPH 0x8338a830 - 0x8338a839 -GRAPH 0x8338a930 - 0x8338a939 -GRAPH 0x8338aa30 - 0x8338aa39 -GRAPH 0x8338ab30 - 0x8338ab39 -GRAPH 0x8338ac30 - 0x8338ac39 -GRAPH 0x8338ad30 - 0x8338ad39 -GRAPH 0x8338ae30 - 0x8338ae39 -GRAPH 0x8338af30 - 0x8338af39 -GRAPH 0x8338b030 - 0x8338b039 -GRAPH 0x8338b130 - 0x8338b139 -GRAPH 0x8338b230 - 0x8338b239 -GRAPH 0x8338b330 - 0x8338b339 -GRAPH 0x8338b430 - 0x8338b439 -GRAPH 0x8338b530 - 0x8338b539 -GRAPH 0x8338b630 - 0x8338b639 -GRAPH 0x8338b730 - 0x8338b739 -GRAPH 0x8338b830 - 0x8338b839 -GRAPH 0x8338b930 - 0x8338b939 -GRAPH 0x8338ba30 - 0x8338ba39 -GRAPH 0x8338bb30 - 0x8338bb39 -GRAPH 0x8338bc30 - 0x8338bc39 -GRAPH 0x8338bd30 - 0x8338bd39 -GRAPH 0x8338be30 - 0x8338be39 -GRAPH 0x8338bf30 - 0x8338bf39 -GRAPH 0x8338c030 - 0x8338c039 -GRAPH 0x8338c130 - 0x8338c139 -GRAPH 0x8338c230 - 0x8338c239 -GRAPH 0x8338c330 - 0x8338c339 -GRAPH 0x8338c430 - 0x8338c439 -GRAPH 0x8338c530 - 0x8338c539 -GRAPH 0x8338c630 - 0x8338c639 -GRAPH 0x8338c730 - 0x8338c739 -GRAPH 0x8338c830 - 0x8338c839 -GRAPH 0x8338c930 - 0x8338c939 -GRAPH 0x8338ca30 - 0x8338ca39 -GRAPH 0x8338cb30 - 0x8338cb39 -GRAPH 0x8338cc30 - 0x8338cc39 -GRAPH 0x8338cd30 - 0x8338cd39 -GRAPH 0x8338ce30 - 0x8338ce39 -GRAPH 0x8338cf30 - 0x8338cf39 -GRAPH 0x8338d030 - 0x8338d039 -GRAPH 0x8338d130 - 0x8338d139 -GRAPH 0x8338d230 - 0x8338d239 -GRAPH 0x8338d330 - 0x8338d339 -GRAPH 0x8338d430 - 0x8338d439 -GRAPH 0x8338d530 - 0x8338d539 -GRAPH 0x8338d630 - 0x8338d639 -GRAPH 0x8338d730 - 0x8338d739 -GRAPH 0x8338d830 - 0x8338d839 -GRAPH 0x8338d930 - 0x8338d939 -GRAPH 0x8338da30 - 0x8338da39 -GRAPH 0x8338db30 - 0x8338db39 -GRAPH 0x8338dc30 - 0x8338dc39 -GRAPH 0x8338dd30 - 0x8338dd39 -GRAPH 0x8338de30 - 0x8338de39 -GRAPH 0x8338df30 - 0x8338df39 -GRAPH 0x8338e030 - 0x8338e039 -GRAPH 0x8338e130 - 0x8338e139 -GRAPH 0x8338e230 - 0x8338e239 -GRAPH 0x8338e330 - 0x8338e339 -GRAPH 0x8338e430 - 0x8338e439 -GRAPH 0x8338e530 - 0x8338e539 -GRAPH 0x8338e630 - 0x8338e639 -GRAPH 0x8338e730 - 0x8338e739 -GRAPH 0x8338e830 - 0x8338e839 -GRAPH 0x8338e930 - 0x8338e939 -GRAPH 0x8338ea30 - 0x8338ea39 -GRAPH 0x8338eb30 - 0x8338eb39 -GRAPH 0x8338ec30 - 0x8338ec39 -GRAPH 0x8338ed30 - 0x8338ed39 -GRAPH 0x8338ee30 - 0x8338ee39 -GRAPH 0x8338ef30 - 0x8338ef39 -GRAPH 0x8338f030 - 0x8338f039 -GRAPH 0x8338f130 - 0x8338f139 -GRAPH 0x8338f230 - 0x8338f239 -GRAPH 0x8338f330 - 0x8338f339 -GRAPH 0x8338f430 - 0x8338f439 -GRAPH 0x8338f530 - 0x8338f539 -GRAPH 0x8338f630 - 0x8338f639 -GRAPH 0x8338f730 - 0x8338f739 -GRAPH 0x8338f830 - 0x8338f839 -GRAPH 0x8338f930 - 0x8338f939 -GRAPH 0x8338fa30 - 0x8338fa39 -GRAPH 0x8338fb30 - 0x8338fb39 -GRAPH 0x8338fc30 - 0x8338fc39 -GRAPH 0x8338fd30 - 0x8338fd39 -GRAPH 0x8338fe30 - 0x8338fe39 -GRAPH 0x83398130 - 0x83398139 -GRAPH 0x83398230 - 0x83398239 -GRAPH 0x83398330 - 0x83398339 -GRAPH 0x83398430 - 0x83398439 -GRAPH 0x83398530 - 0x83398539 -GRAPH 0x83398630 - 0x83398639 -GRAPH 0x83398730 - 0x83398739 -GRAPH 0x83398830 - 0x83398839 -GRAPH 0x83398930 - 0x83398939 -GRAPH 0x83398a30 - 0x83398a39 -GRAPH 0x83398b30 - 0x83398b39 -GRAPH 0x83398c30 - 0x83398c39 -GRAPH 0x83398d30 - 0x83398d39 -GRAPH 0x83398e30 - 0x83398e39 -GRAPH 0x83398f30 - 0x83398f39 -GRAPH 0x83399030 - 0x83399039 -GRAPH 0x83399130 - 0x83399139 -GRAPH 0x83399230 - 0x83399239 -GRAPH 0x83399330 - 0x83399339 -GRAPH 0x83399430 - 0x83399439 -GRAPH 0x83399530 - 0x83399539 -GRAPH 0x83399630 - 0x83399639 -GRAPH 0x83399730 - 0x83399739 -GRAPH 0x83399830 - 0x83399839 -GRAPH 0x83399930 - 0x83399939 -GRAPH 0x83399a30 - 0x83399a39 -GRAPH 0x83399b30 - 0x83399b39 -GRAPH 0x83399c30 - 0x83399c39 -GRAPH 0x83399d30 - 0x83399d39 -GRAPH 0x83399e30 - 0x83399e39 -GRAPH 0x83399f30 - 0x83399f39 -GRAPH 0x8339a030 - 0x8339a039 -GRAPH 0x8339a130 - 0x8339a139 -GRAPH 0x8339a230 - 0x8339a239 -GRAPH 0x8339a330 - 0x8339a339 -GRAPH 0x8339a430 - 0x8339a439 -GRAPH 0x8339a530 - 0x8339a539 -GRAPH 0x8339a630 - 0x8339a639 -GRAPH 0x8339a730 - 0x8339a739 -GRAPH 0x8339a830 - 0x8339a839 -GRAPH 0x8339a930 - 0x8339a939 -GRAPH 0x8339aa30 - 0x8339aa39 -GRAPH 0x8339ab30 - 0x8339ab39 -GRAPH 0x8339ac30 - 0x8339ac39 -GRAPH 0x8339ad30 - 0x8339ad39 -GRAPH 0x8339ae30 - 0x8339ae39 -GRAPH 0x8339af30 - 0x8339af39 -GRAPH 0x8339b030 - 0x8339b039 -GRAPH 0x8339b130 - 0x8339b139 -GRAPH 0x8339b230 - 0x8339b239 -GRAPH 0x8339b330 - 0x8339b339 -GRAPH 0x8339b430 - 0x8339b439 -GRAPH 0x8339b530 - 0x8339b539 -GRAPH 0x8339b630 - 0x8339b639 -GRAPH 0x8339b730 - 0x8339b739 -GRAPH 0x8339b830 - 0x8339b839 -GRAPH 0x8339b930 - 0x8339b939 -GRAPH 0x8339ba30 - 0x8339ba39 -GRAPH 0x8339bb30 - 0x8339bb39 -GRAPH 0x8339bc30 - 0x8339bc39 -GRAPH 0x8339bd30 - 0x8339bd39 -GRAPH 0x8339be30 - 0x8339be39 -GRAPH 0x8339bf30 - 0x8339bf39 -GRAPH 0x8339c030 - 0x8339c039 -GRAPH 0x8339c130 - 0x8339c139 -GRAPH 0x8339c230 - 0x8339c239 -GRAPH 0x8339c330 - 0x8339c339 -GRAPH 0x8339c430 - 0x8339c439 -GRAPH 0x8339c530 - 0x8339c539 -GRAPH 0x8339c630 - 0x8339c639 -GRAPH 0x8339c730 - 0x8339c739 -GRAPH 0x8339c830 - 0x8339c839 -GRAPH 0x8339c930 - 0x8339c939 -GRAPH 0x8339ca30 - 0x8339ca39 -GRAPH 0x8339cb30 - 0x8339cb39 -GRAPH 0x8339cc30 - 0x8339cc39 -GRAPH 0x8339cd30 - 0x8339cd39 -GRAPH 0x8339ce30 - 0x8339ce39 -GRAPH 0x8339cf30 - 0x8339cf39 -GRAPH 0x8339d030 - 0x8339d039 -GRAPH 0x8339d130 - 0x8339d139 -GRAPH 0x8339d230 - 0x8339d239 -GRAPH 0x8339d330 - 0x8339d339 -GRAPH 0x8339d430 - 0x8339d439 -GRAPH 0x8339d530 - 0x8339d539 -GRAPH 0x8339d630 - 0x8339d639 -GRAPH 0x8339d730 - 0x8339d739 -GRAPH 0x8339d830 - 0x8339d839 -GRAPH 0x8339d930 - 0x8339d939 -GRAPH 0x8339da30 - 0x8339da39 -GRAPH 0x8339db30 - 0x8339db39 -GRAPH 0x8339dc30 - 0x8339dc39 -GRAPH 0x8339dd30 - 0x8339dd39 -GRAPH 0x8339de30 - 0x8339de39 -GRAPH 0x8339df30 - 0x8339df39 -GRAPH 0x8339e030 - 0x8339e039 -GRAPH 0x8339e130 - 0x8339e139 -GRAPH 0x8339e230 - 0x8339e239 -GRAPH 0x8339e330 - 0x8339e339 -GRAPH 0x8339e430 - 0x8339e439 -GRAPH 0x8339e530 - 0x8339e539 -GRAPH 0x8339e630 - 0x8339e639 -GRAPH 0x8339e730 - 0x8339e739 -GRAPH 0x8339e830 - 0x8339e839 -GRAPH 0x8339e930 - 0x8339e939 -GRAPH 0x8339ea30 - 0x8339ea39 -GRAPH 0x8339eb30 - 0x8339eb39 -GRAPH 0x8339ec30 - 0x8339ec39 -GRAPH 0x8339ed30 - 0x8339ed39 -GRAPH 0x8339ee30 - 0x8339ee39 -GRAPH 0x8339ef30 - 0x8339ef39 -GRAPH 0x8339f030 - 0x8339f039 -GRAPH 0x8339f130 - 0x8339f139 -GRAPH 0x8339f230 - 0x8339f239 -GRAPH 0x8339f330 - 0x8339f339 -GRAPH 0x8339f430 - 0x8339f439 -GRAPH 0x8339f530 - 0x8339f539 -GRAPH 0x8339f630 - 0x8339f639 -GRAPH 0x8339f730 - 0x8339f739 -GRAPH 0x8339f830 - 0x8339f839 -GRAPH 0x8339f930 - 0x8339f939 -GRAPH 0x8339fa30 - 0x8339fa39 -GRAPH 0x8339fb30 - 0x8339fb39 -GRAPH 0x8339fc30 - 0x8339fc39 -GRAPH 0x8339fd30 - 0x8339fd39 -GRAPH 0x8339fe30 - 0x8339fe39 -GRAPH 0x84308130 -GRAPH 0x8430b531 - 0x8430b539 -GRAPH 0x8430b630 - 0x8430b632 0x8430b634 - 0x8430b639 -GRAPH 0x8430b730 - 0x8430b736 0x8430b738 0x8430b739 -GRAPH 0x8430b830 - 0x8430b832 0x8430b834 0x8430b836 0x8430b837 0x8430b839 -GRAPH 0x8430b930 0x8430b932 - 0x8430b939 -GRAPH 0x8430ba30 - 0x8430ba39 -GRAPH 0x8430bb30 - 0x8430bb39 -GRAPH 0x8430bc30 - 0x8430bc39 -GRAPH 0x8430bd30 - 0x8430bd39 -GRAPH 0x8430be30 - 0x8430be39 -GRAPH 0x8430bf30 - 0x8430bf39 -GRAPH 0x8430c030 - 0x8430c039 -GRAPH 0x8430c130 - 0x8430c139 -GRAPH 0x8430c230 - 0x8430c239 -GRAPH 0x8430c330 - 0x8430c339 -GRAPH 0x8430c733 - 0x8430c739 -GRAPH 0x8430c830 - 0x8430c839 -GRAPH 0x8430c930 - 0x8430c939 -GRAPH 0x8430ca30 - 0x8430ca39 -GRAPH 0x8430cb30 - 0x8430cb39 -GRAPH 0x8430cc30 - 0x8430cc39 -GRAPH 0x8430cd30 - 0x8430cd39 -GRAPH 0x8430ce30 - 0x8430ce39 -GRAPH 0x8430cf30 - 0x8430cf39 -GRAPH 0x8430d030 - 0x8430d039 -GRAPH 0x8430d130 - 0x8430d139 -GRAPH 0x8430d230 - 0x8430d239 -GRAPH 0x8430d330 - 0x8430d339 -GRAPH 0x8430d430 - 0x8430d439 -GRAPH 0x8430d530 - 0x8430d539 -GRAPH 0x8430d630 - 0x8430d639 -GRAPH 0x8430d730 - 0x8430d739 -GRAPH 0x8430d830 - 0x8430d839 -GRAPH 0x8430d930 - 0x8430d939 -GRAPH 0x8430da30 - 0x8430da39 -GRAPH 0x8430db30 - 0x8430db39 -GRAPH 0x8430dc30 - 0x8430dc39 -GRAPH 0x8430dd30 - 0x8430dd39 -GRAPH 0x8430de30 - 0x8430de39 -GRAPH 0x8430df30 - 0x8430df39 -GRAPH 0x8430e030 - 0x8430e039 -GRAPH 0x8430e130 - 0x8430e139 -GRAPH 0x8430e230 - 0x8430e239 -GRAPH 0x8430e330 - 0x8430e339 -GRAPH 0x8430e430 - 0x8430e439 -GRAPH 0x8430e530 - 0x8430e539 -GRAPH 0x8430e630 - 0x8430e639 -GRAPH 0x8430e730 - 0x8430e739 -GRAPH 0x8430e830 - 0x8430e839 -GRAPH 0x8430e930 - 0x8430e939 -GRAPH 0x8430ea30 - 0x8430ea39 -GRAPH 0x8430eb30 - 0x8430eb35 -GRAPH 0x8430ed34 - 0x8430ed39 -GRAPH 0x8430ee30 - 0x8430ee39 -GRAPH 0x8430ef30 - 0x8430ef39 -GRAPH 0x8430f030 - 0x8430f039 -GRAPH 0x8430f130 - 0x8430f139 -GRAPH 0x8430f230 - 0x8430f239 -GRAPH 0x8430f330 - 0x8430f337 -GRAPH 0x8430f430 - 0x8430f439 -GRAPH 0x8430f530 - 0x8430f539 -GRAPH 0x8430f630 - 0x8430f639 -GRAPH 0x8430f730 - 0x8430f739 -GRAPH 0x8430f830 - 0x8430f839 -GRAPH 0x8430f930 - 0x8430f933 -GRAPH 0x8430fd34 - 0x8430fd39 -GRAPH 0x8430fe30 - 0x8430fe35 -GRAPH 0x84318130 - 0x84318139 -GRAPH 0x84318230 - 0x84318235 -GRAPH 0x84318432 - 0x84318435 -GRAPH 0x84318730 - 0x84318734 0x84318736 - 0x84318739 -GRAPH 0x84318830 - 0x84318839 -GRAPH 0x84318930 - 0x84318939 -GRAPH 0x84318a30 - 0x84318a39 -GRAPH 0x84318b30 - 0x84318b39 -GRAPH 0x84318c30 - 0x84318c39 -GRAPH 0x84318d30 - 0x84318d39 -GRAPH 0x84318e30 - 0x84318e39 -GRAPH 0x84318f30 - 0x84318f39 -GRAPH 0x84319030 - 0x84319039 -GRAPH 0x84319130 - 0x84319139 -GRAPH 0x84319230 - 0x84319239 -GRAPH 0x84319330 - 0x84319339 -GRAPH 0x84319430 - 0x84319439 -GRAPH 0x84319530 -GRAPH 0x84319732 -GRAPH 0x84319b38 0x84319b39 -GRAPH 0x84319c30 -IDEOGRAM 0x8139ee39 -IDEOGRAM 0x8139ef30 - 0x8139ef39 -IDEOGRAM 0x8139f030 - 0x8139f039 -IDEOGRAM 0x8139f130 - 0x8139f139 -IDEOGRAM 0x8139f230 - 0x8139f239 -IDEOGRAM 0x8139f330 - 0x8139f339 -IDEOGRAM 0x8139f430 - 0x8139f439 -IDEOGRAM 0x8139f530 - 0x8139f539 -IDEOGRAM 0x8139f630 - 0x8139f639 -IDEOGRAM 0x8139f730 - 0x8139f739 -IDEOGRAM 0x8139f830 - 0x8139f839 -IDEOGRAM 0x8139f930 - 0x8139f939 -IDEOGRAM 0x8139fa30 - 0x8139fa39 -IDEOGRAM 0x8139fb30 - 0x8139fb39 -IDEOGRAM 0x8139fc30 - 0x8139fc39 -IDEOGRAM 0x8139fd30 - 0x8139fd39 -IDEOGRAM 0x8139fe30 - 0x8139fe39 -IDEOGRAM 0x82308130 - 0x82308139 -IDEOGRAM 0x82308230 - 0x82308239 -IDEOGRAM 0x82308330 - 0x82308339 -IDEOGRAM 0x82308430 - 0x82308439 -IDEOGRAM 0x82308530 - 0x82308539 -IDEOGRAM 0x82308630 - 0x82308639 -IDEOGRAM 0x82308730 - 0x82308739 -IDEOGRAM 0x82308830 - 0x82308839 -IDEOGRAM 0x82308930 - 0x82308939 -IDEOGRAM 0x82308a30 - 0x82308a39 -IDEOGRAM 0x82308b30 - 0x82308b39 -IDEOGRAM 0x82308c30 - 0x82308c39 -IDEOGRAM 0x82308d30 - 0x82308d39 -IDEOGRAM 0x82308e30 - 0x82308e39 -IDEOGRAM 0x82308f30 - 0x82308f39 -IDEOGRAM 0x82309030 - 0x82309039 -IDEOGRAM 0x82309130 - 0x82309139 -IDEOGRAM 0x82309230 - 0x82309239 -IDEOGRAM 0x82309330 - 0x82309339 -IDEOGRAM 0x82309430 - 0x82309439 -IDEOGRAM 0x82309530 - 0x82309539 -IDEOGRAM 0x82309630 - 0x82309639 -IDEOGRAM 0x82309730 - 0x82309739 -IDEOGRAM 0x82309830 - 0x82309839 -IDEOGRAM 0x82309930 - 0x82309939 -IDEOGRAM 0x82309a30 - 0x82309a39 -IDEOGRAM 0x82309b30 - 0x82309b39 -IDEOGRAM 0x82309c30 - 0x82309c39 -IDEOGRAM 0x82309d30 - 0x82309d39 -IDEOGRAM 0x82309e30 - 0x82309e39 -IDEOGRAM 0x82309f30 - 0x82309f39 -IDEOGRAM 0x8230a030 - 0x8230a039 -IDEOGRAM 0x8230a130 - 0x8230a139 -IDEOGRAM 0x8230a230 - 0x8230a239 -IDEOGRAM 0x8230a330 - 0x8230a339 -IDEOGRAM 0x8230a430 - 0x8230a439 -IDEOGRAM 0x8230a530 - 0x8230a539 -IDEOGRAM 0x8230a630 - 0x8230a639 -IDEOGRAM 0x8230a730 - 0x8230a739 -IDEOGRAM 0x8230a830 - 0x8230a839 -IDEOGRAM 0x8230a930 - 0x8230a939 -IDEOGRAM 0x8230aa30 - 0x8230aa39 -IDEOGRAM 0x8230ab30 - 0x8230ab39 -IDEOGRAM 0x8230ac30 - 0x8230ac39 -IDEOGRAM 0x8230ad30 - 0x8230ad39 -IDEOGRAM 0x8230ae30 - 0x8230ae39 -IDEOGRAM 0x8230af30 - 0x8230af39 -IDEOGRAM 0x8230b030 - 0x8230b039 -IDEOGRAM 0x8230b130 - 0x8230b139 -IDEOGRAM 0x8230b230 - 0x8230b239 -IDEOGRAM 0x8230b330 - 0x8230b339 -IDEOGRAM 0x8230b430 - 0x8230b439 -IDEOGRAM 0x8230b530 - 0x8230b539 -IDEOGRAM 0x8230b630 - 0x8230b639 -IDEOGRAM 0x8230b730 - 0x8230b739 -IDEOGRAM 0x8230b830 - 0x8230b839 -IDEOGRAM 0x8230b930 - 0x8230b939 -IDEOGRAM 0x8230ba30 - 0x8230ba39 -IDEOGRAM 0x8230bb30 - 0x8230bb39 -IDEOGRAM 0x8230bc30 - 0x8230bc39 -IDEOGRAM 0x8230bd30 - 0x8230bd39 -IDEOGRAM 0x8230be30 - 0x8230be39 -IDEOGRAM 0x8230bf30 - 0x8230bf39 -IDEOGRAM 0x8230c030 - 0x8230c039 -IDEOGRAM 0x8230c130 - 0x8230c139 -IDEOGRAM 0x8230c230 - 0x8230c239 -IDEOGRAM 0x8230c330 - 0x8230c339 -IDEOGRAM 0x8230c430 - 0x8230c439 -IDEOGRAM 0x8230c530 - 0x8230c539 -IDEOGRAM 0x8230c630 - 0x8230c639 -IDEOGRAM 0x8230c730 - 0x8230c739 -IDEOGRAM 0x8230c830 - 0x8230c839 -IDEOGRAM 0x8230c930 - 0x8230c939 -IDEOGRAM 0x8230ca30 - 0x8230ca39 -IDEOGRAM 0x8230cb30 - 0x8230cb39 -IDEOGRAM 0x8230cc30 - 0x8230cc39 -IDEOGRAM 0x8230cd30 - 0x8230cd39 -IDEOGRAM 0x8230ce30 - 0x8230ce39 -IDEOGRAM 0x8230cf30 - 0x8230cf39 -IDEOGRAM 0x8230d030 - 0x8230d039 -IDEOGRAM 0x8230d130 - 0x8230d139 -IDEOGRAM 0x8230d230 - 0x8230d239 -IDEOGRAM 0x8230d330 - 0x8230d339 -IDEOGRAM 0x8230d430 - 0x8230d439 -IDEOGRAM 0x8230d530 - 0x8230d539 -IDEOGRAM 0x8230d630 - 0x8230d639 -IDEOGRAM 0x8230d730 - 0x8230d739 -IDEOGRAM 0x8230d830 - 0x8230d839 -IDEOGRAM 0x8230d930 - 0x8230d939 -IDEOGRAM 0x8230da30 - 0x8230da39 -IDEOGRAM 0x8230db30 - 0x8230db39 -IDEOGRAM 0x8230dc30 - 0x8230dc39 -IDEOGRAM 0x8230dd30 - 0x8230dd39 -IDEOGRAM 0x8230de30 - 0x8230de39 -IDEOGRAM 0x8230df30 - 0x8230df39 -IDEOGRAM 0x8230e030 - 0x8230e039 -IDEOGRAM 0x8230e130 - 0x8230e139 -IDEOGRAM 0x8230e230 - 0x8230e239 -IDEOGRAM 0x8230e330 - 0x8230e339 -IDEOGRAM 0x8230e430 - 0x8230e439 -IDEOGRAM 0x8230e530 - 0x8230e539 -IDEOGRAM 0x8230e630 - 0x8230e639 -IDEOGRAM 0x8230e730 - 0x8230e739 -IDEOGRAM 0x8230e830 - 0x8230e839 -IDEOGRAM 0x8230e930 - 0x8230e939 -IDEOGRAM 0x8230ea30 - 0x8230ea39 -IDEOGRAM 0x8230eb30 - 0x8230eb39 -IDEOGRAM 0x8230ec30 - 0x8230ec39 -IDEOGRAM 0x8230ed30 - 0x8230ed39 -IDEOGRAM 0x8230ee30 - 0x8230ee39 -IDEOGRAM 0x8230ef30 - 0x8230ef39 -IDEOGRAM 0x8230f030 - 0x8230f039 -IDEOGRAM 0x8230f130 - 0x8230f139 -IDEOGRAM 0x8230f230 - 0x8230f239 -IDEOGRAM 0x8230f330 - 0x8230f339 -IDEOGRAM 0x8230f430 - 0x8230f439 -IDEOGRAM 0x8230f530 - 0x8230f539 -IDEOGRAM 0x8230f630 - 0x8230f639 -IDEOGRAM 0x8230f730 - 0x8230f739 -IDEOGRAM 0x8230f830 - 0x8230f839 -IDEOGRAM 0x8230f930 - 0x8230f939 -IDEOGRAM 0x8230fa30 - 0x8230fa39 -IDEOGRAM 0x8230fb30 - 0x8230fb39 -IDEOGRAM 0x8230fc30 - 0x8230fc39 -IDEOGRAM 0x8230fd30 - 0x8230fd39 -IDEOGRAM 0x8230fe30 - 0x8230fe39 -IDEOGRAM 0x82318130 - 0x82318139 -IDEOGRAM 0x82318230 - 0x82318239 -IDEOGRAM 0x82318330 - 0x82318339 -IDEOGRAM 0x82318430 - 0x82318439 -IDEOGRAM 0x82318530 - 0x82318539 -IDEOGRAM 0x82318630 - 0x82318639 -IDEOGRAM 0x82318730 - 0x82318739 -IDEOGRAM 0x82318830 - 0x82318839 -IDEOGRAM 0x82318930 - 0x82318939 -IDEOGRAM 0x82318a30 - 0x82318a39 -IDEOGRAM 0x82318b30 - 0x82318b39 -IDEOGRAM 0x82318c30 - 0x82318c39 -IDEOGRAM 0x82318d30 - 0x82318d39 -IDEOGRAM 0x82318e30 - 0x82318e39 -IDEOGRAM 0x82318f30 - 0x82318f39 -IDEOGRAM 0x82319030 - 0x82319039 -IDEOGRAM 0x82319130 - 0x82319139 -IDEOGRAM 0x82319230 - 0x82319239 -IDEOGRAM 0x82319330 - 0x82319339 -IDEOGRAM 0x82319430 - 0x82319439 -IDEOGRAM 0x82319530 - 0x82319539 -IDEOGRAM 0x82319630 - 0x82319639 -IDEOGRAM 0x82319730 - 0x82319739 -IDEOGRAM 0x82319830 - 0x82319839 -IDEOGRAM 0x82319930 - 0x82319939 -IDEOGRAM 0x82319a30 - 0x82319a39 -IDEOGRAM 0x82319b30 - 0x82319b39 -IDEOGRAM 0x82319c30 - 0x82319c39 -IDEOGRAM 0x82319d30 - 0x82319d39 -IDEOGRAM 0x82319e30 - 0x82319e39 -IDEOGRAM 0x82319f30 - 0x82319f39 -IDEOGRAM 0x8231a030 - 0x8231a039 -IDEOGRAM 0x8231a130 - 0x8231a139 -IDEOGRAM 0x8231a230 - 0x8231a239 -IDEOGRAM 0x8231a330 - 0x8231a339 -IDEOGRAM 0x8231a430 - 0x8231a439 -IDEOGRAM 0x8231a530 - 0x8231a539 -IDEOGRAM 0x8231a630 - 0x8231a639 -IDEOGRAM 0x8231a730 - 0x8231a739 -IDEOGRAM 0x8231a830 - 0x8231a839 -IDEOGRAM 0x8231a930 - 0x8231a939 -IDEOGRAM 0x8231aa30 - 0x8231aa39 -IDEOGRAM 0x8231ab30 - 0x8231ab39 -IDEOGRAM 0x8231ac30 - 0x8231ac39 -IDEOGRAM 0x8231ad30 - 0x8231ad39 -IDEOGRAM 0x8231ae30 - 0x8231ae39 -IDEOGRAM 0x8231af30 - 0x8231af39 -IDEOGRAM 0x8231b030 - 0x8231b039 -IDEOGRAM 0x8231b130 - 0x8231b139 -IDEOGRAM 0x8231b230 - 0x8231b239 -IDEOGRAM 0x8231b330 - 0x8231b339 -IDEOGRAM 0x8231b430 - 0x8231b439 -IDEOGRAM 0x8231b530 - 0x8231b539 -IDEOGRAM 0x8231b630 - 0x8231b639 -IDEOGRAM 0x8231b730 - 0x8231b739 -IDEOGRAM 0x8231b830 - 0x8231b839 -IDEOGRAM 0x8231b930 - 0x8231b939 -IDEOGRAM 0x8231ba30 - 0x8231ba39 -IDEOGRAM 0x8231bb30 - 0x8231bb39 -IDEOGRAM 0x8231bc30 - 0x8231bc39 -IDEOGRAM 0x8231bd30 - 0x8231bd39 -IDEOGRAM 0x8231be30 - 0x8231be39 -IDEOGRAM 0x8231bf30 - 0x8231bf39 -IDEOGRAM 0x8231c030 - 0x8231c039 -IDEOGRAM 0x8231c130 - 0x8231c139 -IDEOGRAM 0x8231c230 - 0x8231c239 -IDEOGRAM 0x8231c330 - 0x8231c339 -IDEOGRAM 0x8231c430 - 0x8231c439 -IDEOGRAM 0x8231c530 - 0x8231c539 -IDEOGRAM 0x8231c630 - 0x8231c639 -IDEOGRAM 0x8231c730 - 0x8231c739 -IDEOGRAM 0x8231c830 - 0x8231c839 -IDEOGRAM 0x8231c930 - 0x8231c939 -IDEOGRAM 0x8231ca30 - 0x8231ca39 -IDEOGRAM 0x8231cb30 - 0x8231cb39 -IDEOGRAM 0x8231cc30 - 0x8231cc39 -IDEOGRAM 0x8231cd30 - 0x8231cd39 -IDEOGRAM 0x8231ce30 - 0x8231ce39 -IDEOGRAM 0x8231cf30 - 0x8231cf39 -IDEOGRAM 0x8231d030 - 0x8231d039 -IDEOGRAM 0x8231d130 - 0x8231d139 -IDEOGRAM 0x8231d230 - 0x8231d239 -IDEOGRAM 0x8231d330 - 0x8231d339 -IDEOGRAM 0x8231d430 - 0x8231d439 -IDEOGRAM 0x8231d530 - 0x8231d539 -IDEOGRAM 0x8231d630 - 0x8231d639 -IDEOGRAM 0x8231d730 - 0x8231d739 -IDEOGRAM 0x8231d830 - 0x8231d839 -IDEOGRAM 0x8231d930 - 0x8231d939 -IDEOGRAM 0x8231da30 - 0x8231da39 -IDEOGRAM 0x8231db30 - 0x8231db39 -IDEOGRAM 0x8231dc30 - 0x8231dc39 -IDEOGRAM 0x8231dd30 - 0x8231dd39 -IDEOGRAM 0x8231de30 - 0x8231de39 -IDEOGRAM 0x8231df30 - 0x8231df39 -IDEOGRAM 0x8231e030 - 0x8231e039 -IDEOGRAM 0x8231e130 - 0x8231e139 -IDEOGRAM 0x8231e230 - 0x8231e239 -IDEOGRAM 0x8231e330 - 0x8231e339 -IDEOGRAM 0x8231e430 - 0x8231e439 -IDEOGRAM 0x8231e530 - 0x8231e539 -IDEOGRAM 0x8231e630 - 0x8231e639 -IDEOGRAM 0x8231e730 - 0x8231e739 -IDEOGRAM 0x8231e830 - 0x8231e839 -IDEOGRAM 0x8231e930 - 0x8231e939 -IDEOGRAM 0x8231ea30 - 0x8231ea39 -IDEOGRAM 0x8231eb30 - 0x8231eb39 -IDEOGRAM 0x8231ec30 - 0x8231ec39 -IDEOGRAM 0x8231ed30 - 0x8231ed39 -IDEOGRAM 0x8231ee30 - 0x8231ee39 -IDEOGRAM 0x8231ef30 - 0x8231ef39 -IDEOGRAM 0x8231f030 - 0x8231f039 -IDEOGRAM 0x8231f130 - 0x8231f139 -IDEOGRAM 0x8231f230 - 0x8231f239 -IDEOGRAM 0x8231f330 - 0x8231f339 -IDEOGRAM 0x8231f430 - 0x8231f439 -IDEOGRAM 0x8231f530 - 0x8231f539 -IDEOGRAM 0x8231f630 - 0x8231f639 -IDEOGRAM 0x8231f730 - 0x8231f739 -IDEOGRAM 0x8231f830 - 0x8231f839 -IDEOGRAM 0x8231f930 - 0x8231f939 -IDEOGRAM 0x8231fa30 - 0x8231fa39 -IDEOGRAM 0x8231fb30 - 0x8231fb39 -IDEOGRAM 0x8231fc30 - 0x8231fc39 -IDEOGRAM 0x8231fd30 - 0x8231fd39 -IDEOGRAM 0x8231fe30 - 0x8231fe39 -IDEOGRAM 0x82328130 - 0x82328139 -IDEOGRAM 0x82328230 - 0x82328239 -IDEOGRAM 0x82328330 - 0x82328339 -IDEOGRAM 0x82328430 - 0x82328439 -IDEOGRAM 0x82328530 - 0x82328539 -IDEOGRAM 0x82328630 - 0x82328639 -IDEOGRAM 0x82328730 - 0x82328739 -IDEOGRAM 0x82328830 - 0x82328839 -IDEOGRAM 0x82328930 - 0x82328939 -IDEOGRAM 0x82328a30 - 0x82328a39 -IDEOGRAM 0x82328b30 - 0x82328b39 -IDEOGRAM 0x82328c30 - 0x82328c39 -IDEOGRAM 0x82328d30 - 0x82328d39 -IDEOGRAM 0x82328e30 - 0x82328e39 -IDEOGRAM 0x82328f30 - 0x82328f39 -IDEOGRAM 0x82329030 - 0x82329039 -IDEOGRAM 0x82329130 - 0x82329139 -IDEOGRAM 0x82329230 - 0x82329239 -IDEOGRAM 0x82329330 - 0x82329339 -IDEOGRAM 0x82329430 - 0x82329439 -IDEOGRAM 0x82329530 - 0x82329539 -IDEOGRAM 0x82329630 - 0x82329639 -IDEOGRAM 0x82329730 - 0x82329739 -IDEOGRAM 0x82329830 - 0x82329839 -IDEOGRAM 0x82329930 - 0x82329939 -IDEOGRAM 0x82329a30 - 0x82329a39 -IDEOGRAM 0x82329b30 - 0x82329b39 -IDEOGRAM 0x82329c30 - 0x82329c39 -IDEOGRAM 0x82329d30 - 0x82329d39 -IDEOGRAM 0x82329e30 - 0x82329e39 -IDEOGRAM 0x82329f30 - 0x82329f39 -IDEOGRAM 0x8232a030 - 0x8232a039 -IDEOGRAM 0x8232a130 - 0x8232a139 -IDEOGRAM 0x8232a230 - 0x8232a239 -IDEOGRAM 0x8232a330 - 0x8232a339 -IDEOGRAM 0x8232a430 - 0x8232a439 -IDEOGRAM 0x8232a530 - 0x8232a539 -IDEOGRAM 0x8232a630 - 0x8232a639 -IDEOGRAM 0x8232a730 - 0x8232a739 -IDEOGRAM 0x8232a830 - 0x8232a839 -IDEOGRAM 0x8232a930 - 0x8232a939 -IDEOGRAM 0x8232aa30 - 0x8232aa39 -IDEOGRAM 0x8232ab30 - 0x8232ab39 -IDEOGRAM 0x8232ac30 - 0x8232ac39 -IDEOGRAM 0x8232ad30 - 0x8232ad39 -IDEOGRAM 0x8232ae30 - 0x8232ae39 -IDEOGRAM 0x8232af30 - 0x8232af39 -IDEOGRAM 0x8232b030 - 0x8232b039 -IDEOGRAM 0x8232b130 - 0x8232b139 -IDEOGRAM 0x8232b230 - 0x8232b239 -IDEOGRAM 0x8232b330 - 0x8232b339 -IDEOGRAM 0x8232b430 - 0x8232b439 -IDEOGRAM 0x8232b530 - 0x8232b539 -IDEOGRAM 0x8232b630 - 0x8232b639 -IDEOGRAM 0x8232b730 - 0x8232b739 -IDEOGRAM 0x8232b830 - 0x8232b839 -IDEOGRAM 0x8232b930 - 0x8232b939 -IDEOGRAM 0x8232ba30 - 0x8232ba39 -IDEOGRAM 0x8232bb30 - 0x8232bb39 -IDEOGRAM 0x8232bc30 - 0x8232bc39 -IDEOGRAM 0x8232bd30 - 0x8232bd39 -IDEOGRAM 0x8232be30 - 0x8232be39 -IDEOGRAM 0x8232bf30 - 0x8232bf39 -IDEOGRAM 0x8232c030 - 0x8232c039 -IDEOGRAM 0x8232c130 - 0x8232c139 -IDEOGRAM 0x8232c230 - 0x8232c239 -IDEOGRAM 0x8232c330 - 0x8232c339 -IDEOGRAM 0x8232c430 - 0x8232c439 -IDEOGRAM 0x8232c530 - 0x8232c539 -IDEOGRAM 0x8232c630 - 0x8232c639 -IDEOGRAM 0x8232c730 - 0x8232c739 -IDEOGRAM 0x8232c830 - 0x8232c839 -IDEOGRAM 0x8232c930 - 0x8232c939 -IDEOGRAM 0x8232ca30 - 0x8232ca39 -IDEOGRAM 0x8232cb30 - 0x8232cb39 -IDEOGRAM 0x8232cc30 - 0x8232cc39 -IDEOGRAM 0x8232cd30 - 0x8232cd39 -IDEOGRAM 0x8232ce30 - 0x8232ce39 -IDEOGRAM 0x8232cf30 - 0x8232cf39 -IDEOGRAM 0x8232d030 - 0x8232d039 -IDEOGRAM 0x8232d130 - 0x8232d139 -IDEOGRAM 0x8232d230 - 0x8232d239 -IDEOGRAM 0x8232d330 - 0x8232d339 -IDEOGRAM 0x8232d430 - 0x8232d439 -IDEOGRAM 0x8232d530 - 0x8232d539 -IDEOGRAM 0x8232d630 - 0x8232d639 -IDEOGRAM 0x8232d730 - 0x8232d739 -IDEOGRAM 0x8232d830 - 0x8232d839 -IDEOGRAM 0x8232d930 - 0x8232d939 -IDEOGRAM 0x8232da30 - 0x8232da39 -IDEOGRAM 0x8232db30 - 0x8232db39 -IDEOGRAM 0x8232dc30 - 0x8232dc39 -IDEOGRAM 0x8232dd30 - 0x8232dd39 -IDEOGRAM 0x8232de30 - 0x8232de39 -IDEOGRAM 0x8232df30 - 0x8232df39 -IDEOGRAM 0x8232e030 - 0x8232e039 -IDEOGRAM 0x8232e130 - 0x8232e139 -IDEOGRAM 0x8232e230 - 0x8232e239 -IDEOGRAM 0x8232e330 - 0x8232e339 -IDEOGRAM 0x8232e430 - 0x8232e439 -IDEOGRAM 0x8232e530 - 0x8232e539 -IDEOGRAM 0x8232e630 - 0x8232e639 -IDEOGRAM 0x8232e730 - 0x8232e739 -IDEOGRAM 0x8232e830 - 0x8232e839 -IDEOGRAM 0x8232e930 - 0x8232e939 -IDEOGRAM 0x8232ea30 - 0x8232ea39 -IDEOGRAM 0x8232eb30 - 0x8232eb39 -IDEOGRAM 0x8232ec30 - 0x8232ec39 -IDEOGRAM 0x8232ed30 - 0x8232ed39 -IDEOGRAM 0x8232ee30 - 0x8232ee39 -IDEOGRAM 0x8232ef30 - 0x8232ef39 -IDEOGRAM 0x8232f030 - 0x8232f039 -IDEOGRAM 0x8232f130 - 0x8232f139 -IDEOGRAM 0x8232f230 - 0x8232f239 -IDEOGRAM 0x8232f330 - 0x8232f339 -IDEOGRAM 0x8232f430 - 0x8232f439 -IDEOGRAM 0x8232f530 - 0x8232f539 -IDEOGRAM 0x8232f630 - 0x8232f639 -IDEOGRAM 0x8232f730 - 0x8232f739 -IDEOGRAM 0x8232f830 - 0x8232f839 -IDEOGRAM 0x8232f930 - 0x8232f939 -IDEOGRAM 0x8232fa30 - 0x8232fa39 -IDEOGRAM 0x8232fb30 - 0x8232fb39 -IDEOGRAM 0x8232fc30 - 0x8232fc39 -IDEOGRAM 0x8232fd30 - 0x8232fd39 -IDEOGRAM 0x8232fe30 - 0x8232fe39 -IDEOGRAM 0x82338130 - 0x82338139 -IDEOGRAM 0x82338230 - 0x82338239 -IDEOGRAM 0x82338330 - 0x82338339 -IDEOGRAM 0x82338430 - 0x82338439 -IDEOGRAM 0x82338530 - 0x82338539 -IDEOGRAM 0x82338630 - 0x82338639 -IDEOGRAM 0x82338730 - 0x82338739 -IDEOGRAM 0x82338830 - 0x82338839 -IDEOGRAM 0x82338930 - 0x82338939 -IDEOGRAM 0x82338a30 - 0x82338a39 -IDEOGRAM 0x82338b30 - 0x82338b39 -IDEOGRAM 0x82338c30 - 0x82338c39 -IDEOGRAM 0x82338d30 - 0x82338d39 -IDEOGRAM 0x82338e30 - 0x82338e39 -IDEOGRAM 0x82338f30 - 0x82338f39 -IDEOGRAM 0x82339030 - 0x82339039 -IDEOGRAM 0x82339130 - 0x82339139 -IDEOGRAM 0x82339230 - 0x82339239 -IDEOGRAM 0x82339330 - 0x82339339 -IDEOGRAM 0x82339430 - 0x82339439 -IDEOGRAM 0x82339530 - 0x82339539 -IDEOGRAM 0x82339630 - 0x82339639 -IDEOGRAM 0x82339730 - 0x82339739 -IDEOGRAM 0x82339830 - 0x82339839 -IDEOGRAM 0x82339930 - 0x82339939 -IDEOGRAM 0x82339a30 - 0x82339a39 -IDEOGRAM 0x82339b30 - 0x82339b39 -IDEOGRAM 0x82339c30 - 0x82339c39 -IDEOGRAM 0x82339d30 - 0x82339d39 -IDEOGRAM 0x82339e30 - 0x82339e39 -IDEOGRAM 0x82339f30 - 0x82339f39 -IDEOGRAM 0x8233a030 - 0x8233a039 -IDEOGRAM 0x8233a130 - 0x8233a139 -IDEOGRAM 0x8233a230 - 0x8233a239 -IDEOGRAM 0x8233a330 - 0x8233a339 -IDEOGRAM 0x8233a430 - 0x8233a439 -IDEOGRAM 0x8233a530 - 0x8233a539 -IDEOGRAM 0x8233a630 - 0x8233a639 -IDEOGRAM 0x8233a730 - 0x8233a739 -IDEOGRAM 0x8233a830 - 0x8233a839 -IDEOGRAM 0x8233a930 - 0x8233a939 -IDEOGRAM 0x8233aa30 - 0x8233aa39 -IDEOGRAM 0x8233ab30 - 0x8233ab39 -IDEOGRAM 0x8233ac30 - 0x8233ac39 -IDEOGRAM 0x8233ad30 - 0x8233ad39 -IDEOGRAM 0x8233ae30 - 0x8233ae39 -IDEOGRAM 0x8233af30 - 0x8233af39 -IDEOGRAM 0x8233b030 - 0x8233b039 -IDEOGRAM 0x8233b130 - 0x8233b139 -IDEOGRAM 0x8233b230 - 0x8233b239 -IDEOGRAM 0x8233b330 - 0x8233b339 -IDEOGRAM 0x8233b430 - 0x8233b439 -IDEOGRAM 0x8233b530 - 0x8233b539 -IDEOGRAM 0x8233b630 - 0x8233b639 -IDEOGRAM 0x8233b730 - 0x8233b739 -IDEOGRAM 0x8233b830 - 0x8233b839 -IDEOGRAM 0x8233b930 - 0x8233b939 -IDEOGRAM 0x8233ba30 - 0x8233ba39 -IDEOGRAM 0x8233bb30 - 0x8233bb39 -IDEOGRAM 0x8233bc30 - 0x8233bc39 -IDEOGRAM 0x8233bd30 - 0x8233bd39 -IDEOGRAM 0x8233be30 - 0x8233be39 -IDEOGRAM 0x8233bf30 - 0x8233bf39 -IDEOGRAM 0x8233c030 - 0x8233c039 -IDEOGRAM 0x8233c130 - 0x8233c139 -IDEOGRAM 0x8233c230 - 0x8233c239 -IDEOGRAM 0x8233c330 - 0x8233c339 -IDEOGRAM 0x8233c430 - 0x8233c439 -IDEOGRAM 0x8233c530 - 0x8233c539 -IDEOGRAM 0x8233c630 - 0x8233c639 -IDEOGRAM 0x8233c730 - 0x8233c739 -IDEOGRAM 0x8233c830 - 0x8233c839 -IDEOGRAM 0x8233c930 - 0x8233c939 -IDEOGRAM 0x8233ca30 - 0x8233ca39 -IDEOGRAM 0x8233cb30 - 0x8233cb39 -IDEOGRAM 0x8233cc30 - 0x8233cc39 -IDEOGRAM 0x8233cd30 - 0x8233cd39 -IDEOGRAM 0x8233ce30 - 0x8233ce39 -IDEOGRAM 0x8233cf30 - 0x8233cf39 -IDEOGRAM 0x8233d030 - 0x8233d039 -IDEOGRAM 0x8233d130 - 0x8233d139 -IDEOGRAM 0x8233d230 - 0x8233d239 -IDEOGRAM 0x8233d330 - 0x8233d339 -IDEOGRAM 0x8233d430 - 0x8233d439 -IDEOGRAM 0x8233d530 - 0x8233d539 -IDEOGRAM 0x8233d630 - 0x8233d639 -IDEOGRAM 0x8233d730 - 0x8233d739 -IDEOGRAM 0x8233d830 - 0x8233d839 -IDEOGRAM 0x8233d930 - 0x8233d939 -IDEOGRAM 0x8233da30 - 0x8233da39 -IDEOGRAM 0x8233db30 - 0x8233db39 -IDEOGRAM 0x8233dc30 - 0x8233dc39 -IDEOGRAM 0x8233dd30 - 0x8233dd39 -IDEOGRAM 0x8233de30 - 0x8233de39 -IDEOGRAM 0x8233df30 - 0x8233df39 -IDEOGRAM 0x8233e030 - 0x8233e039 -IDEOGRAM 0x8233e130 - 0x8233e139 -IDEOGRAM 0x8233e230 - 0x8233e239 -IDEOGRAM 0x8233e330 - 0x8233e339 -IDEOGRAM 0x8233e430 - 0x8233e439 -IDEOGRAM 0x8233e530 - 0x8233e539 -IDEOGRAM 0x8233e630 - 0x8233e639 -IDEOGRAM 0x8233e730 - 0x8233e739 -IDEOGRAM 0x8233e830 - 0x8233e839 -IDEOGRAM 0x8233e930 - 0x8233e939 -IDEOGRAM 0x8233ea30 - 0x8233ea39 -IDEOGRAM 0x8233eb30 - 0x8233eb39 -IDEOGRAM 0x8233ec30 - 0x8233ec39 -IDEOGRAM 0x8233ed30 - 0x8233ed39 -IDEOGRAM 0x8233ee30 - 0x8233ee39 -IDEOGRAM 0x8233ef30 - 0x8233ef39 -IDEOGRAM 0x8233f030 - 0x8233f039 -IDEOGRAM 0x8233f130 - 0x8233f139 -IDEOGRAM 0x8233f230 - 0x8233f239 -IDEOGRAM 0x8233f330 - 0x8233f339 -IDEOGRAM 0x8233f430 - 0x8233f439 -IDEOGRAM 0x8233f530 - 0x8233f539 -IDEOGRAM 0x8233f630 - 0x8233f639 -IDEOGRAM 0x8233f730 - 0x8233f739 -IDEOGRAM 0x8233f830 - 0x8233f839 -IDEOGRAM 0x8233f930 - 0x8233f939 -IDEOGRAM 0x8233fa30 - 0x8233fa39 -IDEOGRAM 0x8233fb30 - 0x8233fb39 -IDEOGRAM 0x8233fc30 - 0x8233fc39 -IDEOGRAM 0x8233fd30 - 0x8233fd39 -IDEOGRAM 0x8233fe30 - 0x8233fe39 -IDEOGRAM 0x82348130 - 0x82348139 -IDEOGRAM 0x82348230 - 0x82348239 -IDEOGRAM 0x82348330 - 0x82348339 -IDEOGRAM 0x82348430 - 0x82348439 -IDEOGRAM 0x82348530 - 0x82348539 -IDEOGRAM 0x82348630 - 0x82348639 -IDEOGRAM 0x82348730 - 0x82348739 -IDEOGRAM 0x82348830 - 0x82348839 -IDEOGRAM 0x82348930 - 0x82348939 -IDEOGRAM 0x82348a30 - 0x82348a39 -IDEOGRAM 0x82348b30 - 0x82348b39 -IDEOGRAM 0x82348c30 - 0x82348c39 -IDEOGRAM 0x82348d30 - 0x82348d39 -IDEOGRAM 0x82348e30 - 0x82348e39 -IDEOGRAM 0x82348f30 - 0x82348f39 -IDEOGRAM 0x82349030 - 0x82349039 -IDEOGRAM 0x82349130 - 0x82349139 -IDEOGRAM 0x82349230 - 0x82349239 -IDEOGRAM 0x82349330 - 0x82349339 -IDEOGRAM 0x82349430 - 0x82349439 -IDEOGRAM 0x82349530 - 0x82349539 -IDEOGRAM 0x82349630 - 0x82349639 -IDEOGRAM 0x82349730 - 0x82349739 -IDEOGRAM 0x82349830 - 0x82349839 -IDEOGRAM 0x82349930 - 0x82349939 -IDEOGRAM 0x82349a30 - 0x82349a39 -IDEOGRAM 0x82349b30 - 0x82349b39 -IDEOGRAM 0x82349c30 - 0x82349c39 -IDEOGRAM 0x82349d30 - 0x82349d39 -IDEOGRAM 0x82349e30 - 0x82349e39 -IDEOGRAM 0x82349f30 - 0x82349f39 -IDEOGRAM 0x8234a030 - 0x8234a039 -IDEOGRAM 0x8234a130 - 0x8234a139 -IDEOGRAM 0x8234a230 - 0x8234a239 -IDEOGRAM 0x8234a330 - 0x8234a339 -IDEOGRAM 0x8234a430 - 0x8234a439 -IDEOGRAM 0x8234a530 - 0x8234a539 -IDEOGRAM 0x8234a630 - 0x8234a639 -IDEOGRAM 0x8234a730 - 0x8234a739 -IDEOGRAM 0x8234a830 - 0x8234a839 -IDEOGRAM 0x8234a930 - 0x8234a939 -IDEOGRAM 0x8234aa30 - 0x8234aa39 -IDEOGRAM 0x8234ab30 - 0x8234ab39 -IDEOGRAM 0x8234ac30 - 0x8234ac39 -IDEOGRAM 0x8234ad30 - 0x8234ad39 -IDEOGRAM 0x8234ae30 - 0x8234ae39 -IDEOGRAM 0x8234af30 - 0x8234af39 -IDEOGRAM 0x8234b030 - 0x8234b039 -IDEOGRAM 0x8234b130 - 0x8234b139 -IDEOGRAM 0x8234b230 - 0x8234b239 -IDEOGRAM 0x8234b330 - 0x8234b339 -IDEOGRAM 0x8234b430 - 0x8234b439 -IDEOGRAM 0x8234b530 - 0x8234b539 -IDEOGRAM 0x8234b630 - 0x8234b639 -IDEOGRAM 0x8234b730 - 0x8234b739 -IDEOGRAM 0x8234b830 - 0x8234b839 -IDEOGRAM 0x8234b930 - 0x8234b939 -IDEOGRAM 0x8234ba30 - 0x8234ba39 -IDEOGRAM 0x8234bb30 - 0x8234bb39 -IDEOGRAM 0x8234bc30 - 0x8234bc39 -IDEOGRAM 0x8234bd30 - 0x8234bd39 -IDEOGRAM 0x8234be30 - 0x8234be39 -IDEOGRAM 0x8234bf30 - 0x8234bf39 -IDEOGRAM 0x8234c030 - 0x8234c039 -IDEOGRAM 0x8234c130 - 0x8234c139 -IDEOGRAM 0x8234c230 - 0x8234c239 -IDEOGRAM 0x8234c330 - 0x8234c339 -IDEOGRAM 0x8234c430 - 0x8234c439 -IDEOGRAM 0x8234c530 - 0x8234c539 -IDEOGRAM 0x8234c630 - 0x8234c639 -IDEOGRAM 0x8234c730 - 0x8234c739 -IDEOGRAM 0x8234c830 - 0x8234c839 -IDEOGRAM 0x8234c930 - 0x8234c939 -IDEOGRAM 0x8234ca30 - 0x8234ca39 -IDEOGRAM 0x8234cb30 - 0x8234cb39 -IDEOGRAM 0x8234cc30 - 0x8234cc39 -IDEOGRAM 0x8234cd30 - 0x8234cd39 -IDEOGRAM 0x8234ce30 - 0x8234ce39 -IDEOGRAM 0x8234cf30 - 0x8234cf39 -IDEOGRAM 0x8234d030 - 0x8234d039 -IDEOGRAM 0x8234d130 - 0x8234d139 -IDEOGRAM 0x8234d230 - 0x8234d239 -IDEOGRAM 0x8234d330 - 0x8234d339 -IDEOGRAM 0x8234d430 - 0x8234d439 -IDEOGRAM 0x8234d530 - 0x8234d539 -IDEOGRAM 0x8234d630 - 0x8234d639 -IDEOGRAM 0x8234d730 - 0x8234d739 -IDEOGRAM 0x8234d830 - 0x8234d839 -IDEOGRAM 0x8234d930 - 0x8234d939 -IDEOGRAM 0x8234da30 - 0x8234da39 -IDEOGRAM 0x8234db30 - 0x8234db39 -IDEOGRAM 0x8234dc30 - 0x8234dc39 -IDEOGRAM 0x8234dd30 - 0x8234dd39 -IDEOGRAM 0x8234de30 - 0x8234de39 -IDEOGRAM 0x8234df30 - 0x8234df39 -IDEOGRAM 0x8234e030 - 0x8234e039 -IDEOGRAM 0x8234e130 - 0x8234e139 -IDEOGRAM 0x8234e230 - 0x8234e239 -IDEOGRAM 0x8234e330 - 0x8234e339 -IDEOGRAM 0x8234e430 - 0x8234e439 -IDEOGRAM 0x8234e530 - 0x8234e539 -IDEOGRAM 0x8234e630 - 0x8234e639 -IDEOGRAM 0x8234e730 - 0x8234e739 -IDEOGRAM 0x8234e830 - 0x8234e839 -IDEOGRAM 0x8234e930 - 0x8234e939 -IDEOGRAM 0x8234ea30 - 0x8234ea39 -IDEOGRAM 0x8234eb30 - 0x8234eb39 -IDEOGRAM 0x8234ec30 - 0x8234ec39 -IDEOGRAM 0x8234ed30 - 0x8234ed39 -IDEOGRAM 0x8234ee30 - 0x8234ee39 -IDEOGRAM 0x8234ef30 - 0x8234ef39 -IDEOGRAM 0x8234f030 - 0x8234f039 -IDEOGRAM 0x8234f130 - 0x8234f139 -IDEOGRAM 0x8234f230 - 0x8234f239 -IDEOGRAM 0x8234f330 - 0x8234f339 -IDEOGRAM 0x8234f430 - 0x8234f439 -IDEOGRAM 0x8234f530 - 0x8234f539 -IDEOGRAM 0x8234f630 - 0x8234f639 -IDEOGRAM 0x8234f730 - 0x8234f739 -IDEOGRAM 0x8234f830 - 0x8234f839 -IDEOGRAM 0x8234f930 - 0x8234f939 -IDEOGRAM 0x8234fa30 - 0x8234fa39 -IDEOGRAM 0x8234fb30 - 0x8234fb39 -IDEOGRAM 0x8234fc30 - 0x8234fc39 -IDEOGRAM 0x8234fd30 - 0x8234fd39 -IDEOGRAM 0x8234fe30 - 0x8234fe39 -IDEOGRAM 0x82358130 - 0x82358139 -IDEOGRAM 0x82358230 - 0x82358239 -IDEOGRAM 0x82358330 - 0x82358339 -IDEOGRAM 0x82358430 - 0x82358439 -IDEOGRAM 0x82358530 - 0x82358539 -IDEOGRAM 0x82358630 - 0x82358639 -IDEOGRAM 0x82358730 - 0x82358738 -IDEOGRAM 0x84308131 - 0x84308139 -IDEOGRAM 0x84308230 - 0x84308239 -IDEOGRAM 0x84308330 - 0x84308339 -IDEOGRAM 0x84308430 - 0x84308439 -IDEOGRAM 0x84308530 - 0x84308539 -IDEOGRAM 0x84308630 - 0x84308639 -IDEOGRAM 0x84308730 - 0x84308739 -IDEOGRAM 0x84308830 - 0x84308839 -IDEOGRAM 0x84308930 - 0x84308939 -IDEOGRAM 0x84308a30 - 0x84308a39 -IDEOGRAM 0x84308b30 - 0x84308b39 -IDEOGRAM 0x84308c30 - 0x84308c39 -IDEOGRAM 0x84308d30 - 0x84308d39 -IDEOGRAM 0x84308e30 - 0x84308e39 -IDEOGRAM 0x84308f30 - 0x84308f39 -IDEOGRAM 0x84309030 - 0x84309039 -IDEOGRAM 0x84309130 - 0x84309139 -IDEOGRAM 0x84309230 - 0x84309239 -IDEOGRAM 0x84309330 - 0x84309339 -IDEOGRAM 0x84309430 - 0x84309439 -IDEOGRAM 0x84309530 - 0x84309539 -IDEOGRAM 0x84309630 - 0x84309639 -IDEOGRAM 0x84309730 - 0x84309739 -IDEOGRAM 0x84309830 - 0x84309839 -IDEOGRAM 0x84309930 - 0x84309939 -IDEOGRAM 0x84309a30 - 0x84309a39 -IDEOGRAM 0x84309b30 - 0x84309b39 -IDEOGRAM 0x84309c30 - 0x84309c39 -IDEOGRAM 0x84309d30 0x84309d31 0x84309d34 - 0x84309d39 -IDEOGRAM 0x84309e30 - 0x84309e39 -IDEOGRAM 0x84309f30 - 0x84309f39 -IDEOGRAM 0x8430a030 - 0x8430a039 -IDEOGRAM 0x8430a130 - 0x8430a139 -IDEOGRAM 0x8430a230 - 0x8430a239 -IDEOGRAM 0x8430a330 - 0x8430a332 -LOWER 0x81308439 -LOWER 0x81308538 -LOWER 0x81308632 -LOWER 0x81308938 0x81308939 -LOWER 0x81308a30 - 0x81308a39 -LOWER 0x81308b30 - 0x81308b37 -LOWER 0x81308c30 0x81308c32 0x81308c34 0x81308c36 0x81308c38 -LOWER 0x81308d30 0x81308d32 0x81308d34 0x81308d37 0x81308d39 -LOWER 0x81308e31 0x81308e34 0x81308e36 0x81308e38 -LOWER 0x81308f30 0x81308f32 0x81308f34 0x81308f36 0x81308f39 -LOWER 0x81309031 0x81309033 0x81309035 0x81309037 0x81309039 -LOWER 0x81309130 0x81309132 0x81309134 0x81309136 0x81309138 -LOWER 0x81309230 0x81309233 0x81309235 0x81309237 -LOWER 0x81309330 0x81309332 0x81309334 0x81309336 0x81309338 -LOWER 0x81309430 0x81309432 0x81309434 0x81309436 0x81309438 -LOWER 0x81309530 0x81309532 0x81309534 0x81309536 0x81309539 -LOWER 0x81309631 0x81309633 0x81309635 0x81309637 0x81309639 -LOWER 0x81309732 0x81309734 0x81309736 - 0x81309738 -LOWER 0x81309831 0x81309833 0x81309836 -LOWER 0x81309930 0x81309931 0x81309936 0x81309939 -LOWER 0x81309a33 - 0x81309a35 0x81309a38 -LOWER 0x81309b31 0x81309b33 0x81309b35 0x81309b38 -LOWER 0x81309c30 0x81309c31 0x81309c33 0x81309c36 -LOWER 0x81309d30 0x81309d32 0x81309d35 0x81309d36 0x81309d39 -LOWER 0x81309e30 0x81309e31 0x81309e38 -LOWER 0x81309f31 0x81309f34 -LOWER 0x8130a033 0x8130a035 0x8130a037 0x8130a039 -LOWER 0x8130a131 0x8130a133 0x8130a135 0x8130a137 0x8130a139 -LOWER 0x8130a231 0x8130a232 0x8130a235 0x8130a237 -LOWER 0x8130a332 0x8130a334 0x8130a336 0x8130a338 -LOWER 0x8130a430 0x8130a432 0x8130a434 0x8130a436 0x8130a438 -LOWER 0x8130a530 0x8130a532 0x8130a534 0x8130a536 0x8130a538 -LOWER 0x8130a630 0x8130a632 0x8130a634 0x8130a636 0x8130a638 -LOWER 0x8130a732 0x8130a734 0x8130a736 0x8130a738 -LOWER 0x8130a830 0x8130a832 0x8130a834 0x8130a836 0x8130a838 -LOWER 0x8130ab37 - 0x8130ab39 -LOWER 0x8130ac30 - 0x8130ac39 -LOWER 0x8130ad30 - 0x8130ad39 -LOWER 0x8130ae30 - 0x8130ae39 -LOWER 0x8130af30 - 0x8130af39 -LOWER 0x8130b030 - 0x8130b039 -LOWER 0x8130b130 - 0x8130b139 -LOWER 0x8130b230 - 0x8130b239 -LOWER 0x8130b330 - 0x8130b339 -LOWER 0x8130b430 - 0x8130b438 -LOWER 0x8130cb30 0x8130cb34 - 0x8130cb39 -LOWER 0x8130cc30 - 0x8130cc34 0x8130cc36 0x8130cc37 -LOWER 0x8130cd31 - 0x8130cd33 0x8130cd35 0x8130cd37 0x8130cd39 -LOWER 0x8130ce31 0x8130ce33 0x8130ce35 0x8130ce37 0x8130ce39 -LOWER 0x8130cf31 0x8130cf33 0x8130cf35 0x8130cf37 - 0x8130cf39 -LOWER 0x8130d030 0x8130d031 0x8130d033 -LOWER 0x8130d239 -LOWER 0x8130d330 - 0x8130d339 -LOWER 0x8130d430 - 0x8130d433 0x8130d435 0x8130d437 0x8130d439 -LOWER 0x8130d531 0x8130d533 0x8130d535 0x8130d537 0x8130d539 -LOWER 0x8130d631 0x8130d633 0x8130d635 0x8130d637 0x8130d639 -LOWER 0x8130d731 0x8130d733 0x8130d735 0x8130d737 -LOWER 0x8130d837 0x8130d839 -LOWER 0x8130d931 0x8130d933 0x8130d935 0x8130d937 0x8130d939 -LOWER 0x8130da31 0x8130da33 0x8130da35 0x8130da37 0x8130da39 -LOWER 0x8130db31 0x8130db33 0x8130db35 0x8130db37 0x8130db39 -LOWER 0x8130dc31 0x8130dc33 0x8130dc35 0x8130dc37 0x8130dc39 -LOWER 0x8130dd31 0x8130dd33 0x8130dd35 0x8130dd37 0x8130dd39 -LOWER 0x8130de32 0x8130de34 0x8130de36 0x8130de38 -LOWER 0x8130df30 0x8130df32 0x8130df34 0x8130df37 0x8130df39 -LOWER 0x8130e031 0x8130e033 0x8130e035 0x8130e037 0x8130e039 -LOWER 0x8130e131 0x8130e133 0x8130e135 0x8130e137 0x8130e139 -LOWER 0x8130e231 0x8130e233 0x8130e235 0x8130e237 0x8130e239 -LOWER 0x8130e331 0x8130e333 0x8130e337 -LOWER 0x8130e435 0x8130e437 0x8130e439 -LOWER 0x8130e531 0x8130e533 0x8130e535 0x8130e537 0x8130e539 -LOWER 0x8130ee31 - 0x8130ee39 -LOWER 0x8130ef30 - 0x8130ef39 -LOWER 0x8130f030 - 0x8130f039 -LOWER 0x8130f130 - 0x8130f139 -LOWER 0x8135ee35 0x8135ee37 0x8135ee39 -LOWER 0x8135ef31 0x8135ef33 0x8135ef35 0x8135ef37 0x8135ef39 -LOWER 0x8135f031 0x8135f033 0x8135f035 0x8135f037 0x8135f039 -LOWER 0x8135f131 0x8135f133 0x8135f135 0x8135f137 0x8135f139 -LOWER 0x8135f231 0x8135f233 0x8135f235 0x8135f237 0x8135f239 -LOWER 0x8135f331 0x8135f333 0x8135f335 0x8135f337 0x8135f339 -LOWER 0x8135f431 0x8135f433 0x8135f435 0x8135f437 0x8135f439 -LOWER 0x8135f531 0x8135f533 0x8135f535 0x8135f537 0x8135f539 -LOWER 0x8135f631 0x8135f633 0x8135f635 0x8135f637 0x8135f639 -LOWER 0x8135f731 0x8135f733 0x8135f735 0x8135f737 0x8135f739 -LOWER 0x8135f831 0x8135f833 0x8135f835 0x8135f837 0x8135f839 -LOWER 0x8135f931 0x8135f933 0x8135f935 0x8135f937 0x8135f939 -LOWER 0x8135fa31 0x8135fa33 0x8135fa35 0x8135fa37 0x8135fa39 -LOWER 0x8135fb31 0x8135fb33 0x8135fb35 0x8135fb37 0x8135fb39 -LOWER 0x8135fc31 0x8135fc33 0x8135fc35 0x8135fc37 0x8135fc39 -LOWER 0x8135fd31 0x8135fd33 - 0x8135fd39 -LOWER 0x8135fe35 0x8135fe37 0x8135fe39 -LOWER 0x81368131 0x81368133 0x81368135 0x81368137 0x81368139 -LOWER 0x81368231 0x81368233 0x81368235 0x81368237 0x81368239 -LOWER 0x81368331 0x81368333 0x81368335 0x81368337 0x81368339 -LOWER 0x81368431 0x81368433 0x81368435 0x81368437 0x81368439 -LOWER 0x81368531 0x81368533 0x81368535 0x81368537 0x81368539 -LOWER 0x81368631 0x81368633 0x81368635 0x81368637 0x81368639 -LOWER 0x81368731 0x81368733 0x81368735 0x81368737 0x81368739 -LOWER 0x81368831 0x81368833 0x81368835 0x81368837 0x81368839 -LOWER 0x81368931 0x81368933 -LOWER 0x81368a30 - 0x81368a37 -LOWER 0x81368b36 - 0x81368b39 -LOWER 0x81368c30 0x81368c31 -LOWER 0x81368d32 - 0x81368d39 -LOWER 0x81368e38 0x81368e39 -LOWER 0x81368f30 - 0x81368f35 -LOWER 0x81369034 - 0x81369039 -LOWER 0x81369230 - 0x81369237 -LOWER 0x81369336 - 0x81369339 -LOWER 0x81369430 - 0x81369433 -LOWER 0x81369532 - 0x81369539 -LOWER 0x81369630 - 0x81369635 0x81369638 0x81369639 -LOWER 0x81369730 - 0x81369735 -LOWER 0x81369834 - 0x81369839 -LOWER 0x81369930 0x81369931 -LOWER 0x81369a30 - 0x81369a37 -LOWER 0x81369b36 - 0x81369b39 -LOWER 0x81369c30 0x81369c32 0x81369c33 -LOWER 0x81369d30 0x81369d34 - 0x81369d36 0x81369d38 0x81369d39 -LOWER 0x81369e38 0x81369e39 -LOWER 0x81369f30 0x81369f31 0x81369f34 0x81369f35 -LOWER 0x8136a034 - 0x8136a039 -LOWER 0x8136a130 0x8136a131 -LOWER 0x8136a232 - 0x8136a234 0x8136a236 0x8136a237 -LOWER 0x8136ad33 -LOWER 0x8136ae37 -LOWER 0x8136bc32 0x8136bc36 0x8136bc37 -LOWER 0x8136bd31 -LOWER 0x8136bf37 -LOWER 0x8136c032 0x8136c037 -LOWER 0x8136c131 -LOWER 0x8136c230 - 0x8136c233 -LOWER 0x8430b232 - 0x8430b238 -LOWER 0x8430b431 - 0x8430b435 -MAPLOWER < 0xa2fb - 0xa2fc : 0x8136c530 > -MAPLOWER < 0x81308638 0xa8a4 > -MAPLOWER < 0x81308639 0xa8a2 > -MAPLOWER < 0x81308730 0x81308939 > -MAPLOWER < 0x81308731 - 0x81308735 : 0x81308a30 > -MAPLOWER < 0x81308736 0xa8a8 > -MAPLOWER < 0x81308737 0xa8a6 > -MAPLOWER < 0x81308738 0xa8ba > -MAPLOWER < 0x81308739 0x81308a35 > -MAPLOWER < 0x81308830 0xa8ac > -MAPLOWER < 0x81308831 0xa8aa > -MAPLOWER < 0x81308832 - 0x81308835 : 0x81308a36 > -MAPLOWER < 0x81308836 0xa8b0 > -MAPLOWER < 0x81308837 0xa8ae > -MAPLOWER < 0x81308838 - 0x81308839 : 0x81308b30 > -MAPLOWER < 0x81308930 - 0x81308931 : 0x81308b32 > -MAPLOWER < 0x81308932 0xa8b4 > -MAPLOWER < 0x81308933 0xa8b2 > -MAPLOWER < 0x81308934 0x81308b34 > -MAPLOWER < 0x81308935 0xa8b9 > -MAPLOWER < 0x81308936 - 0x81308937 : 0x81308b35 > -MAPLOWER < 0x81308b38 0xa8a1 > -MAPLOWER < 0x81308b39 0x81308c30 > -MAPLOWER < 0x81308c31 0x81308c32 > -MAPLOWER < 0x81308c33 0x81308c34 > -MAPLOWER < 0x81308c35 0x81308c36 > -MAPLOWER < 0x81308c37 0x81308c38 > -MAPLOWER < 0x81308c39 0x81308d30 > -MAPLOWER < 0x81308d31 0x81308d32 > -MAPLOWER < 0x81308d33 0x81308d34 > -MAPLOWER < 0x81308d35 0xa8a5 > -MAPLOWER < 0x81308d36 0x81308d37 > -MAPLOWER < 0x81308d38 0x81308d39 > -MAPLOWER < 0x81308e30 0x81308e31 > -MAPLOWER < 0x81308e32 0xa8a7 > -MAPLOWER < 0x81308e33 0x81308e34 > -MAPLOWER < 0x81308e35 0x81308e36 > -MAPLOWER < 0x81308e37 0x81308e38 > -MAPLOWER < 0x81308e39 0x81308f30 > -MAPLOWER < 0x81308f31 0x81308f32 > -MAPLOWER < 0x81308f33 0x81308f34 > -MAPLOWER < 0x81308f35 0x81308f36 > -MAPLOWER < 0x81308f37 0xa8a9 > -MAPLOWER < 0x81308f38 0x81308f39 > -MAPLOWER < 0x81309030 0x81309031 > -MAPLOWER < 0x81309032 0x69 > -MAPLOWER < 0x81309034 0x81309035 > -MAPLOWER < 0x81309036 0x81309037 > -MAPLOWER < 0x81309038 0x81309039 > -MAPLOWER < 0x81309131 0x81309132 > -MAPLOWER < 0x81309133 0x81309134 > -MAPLOWER < 0x81309135 0x81309136 > -MAPLOWER < 0x81309137 0x81309138 > -MAPLOWER < 0x81309139 0x81309230 > -MAPLOWER < 0x81309231 0xa8bd > -MAPLOWER < 0x81309232 0x81309233 > -MAPLOWER < 0x81309234 0xa8be > -MAPLOWER < 0x81309236 0x81309237 > -MAPLOWER < 0x81309238 0xa8ad > -MAPLOWER < 0x81309239 0x81309330 > -MAPLOWER < 0x81309331 0x81309332 > -MAPLOWER < 0x81309333 0x81309334 > -MAPLOWER < 0x81309335 0x81309336 > -MAPLOWER < 0x81309337 0x81309338 > -MAPLOWER < 0x81309339 0x81309430 > -MAPLOWER < 0x81309431 0x81309432 > -MAPLOWER < 0x81309433 0x81309434 > -MAPLOWER < 0x81309435 0x81309436 > -MAPLOWER < 0x81309437 0x81309438 > -MAPLOWER < 0x81309439 0x81309530 > -MAPLOWER < 0x81309531 0x81309532 > -MAPLOWER < 0x81309533 0x81309534 > -MAPLOWER < 0x81309535 0x81309536 > -MAPLOWER < 0x81309537 0xa8b1 > -MAPLOWER < 0x81309538 0x81309539 > -MAPLOWER < 0x81309630 0x81309631 > -MAPLOWER < 0x81309632 0x81309633 > -MAPLOWER < 0x81309634 0x81309635 > -MAPLOWER < 0x81309636 0x81309637 > -MAPLOWER < 0x81309638 0x81309639 > -MAPLOWER < 0x81309730 0x81308b37 > -MAPLOWER < 0x81309731 0x81309732 > -MAPLOWER < 0x81309733 0x81309734 > -MAPLOWER < 0x81309735 0x81309736 > -MAPLOWER < 0x81309739 0x8130ab39 > -MAPLOWER < 0x81309830 0x81309831 > -MAPLOWER < 0x81309832 0x81309833 > -MAPLOWER < 0x81309834 0x8130ac30 > -MAPLOWER < 0x81309835 0x81309836 > -MAPLOWER < 0x81309837 - 0x81309838 : 0x8130ac32 > -MAPLOWER < 0x81309839 0x81309930 > -MAPLOWER < 0x81309932 0x8130a033 > -MAPLOWER < 0x81309933 0x8130ac35 > -MAPLOWER < 0x81309934 0x8130ac37 > -MAPLOWER < 0x81309935 0x81309936 > -MAPLOWER < 0x81309937 0x8130ad32 > -MAPLOWER < 0x81309938 0x8130ad34 > -MAPLOWER < 0x81309a30 0x8130ae30 > -MAPLOWER < 0x81309a31 0x8130ad39 > -MAPLOWER < 0x81309a32 0x81309a33 > -MAPLOWER < 0x81309a36 0x8130ae36 > -MAPLOWER < 0x81309a37 0x8130ae39 > -MAPLOWER < 0x81309a39 0x8130af32 > -MAPLOWER < 0x81309b30 0x81309b31 > -MAPLOWER < 0x81309b32 0x81309b33 > -MAPLOWER < 0x81309b34 0x81309b35 > -MAPLOWER < 0x81309b36 0x8130b033 > -MAPLOWER < 0x81309b37 0x81309b38 > -MAPLOWER < 0x81309b39 0x8130b036 > -MAPLOWER < 0x81309c32 0x81309c33 > -MAPLOWER < 0x81309c34 0x8130b131 > -MAPLOWER < 0x81309c35 0x81309c36 > -MAPLOWER < 0x81309c37 - 0x81309c38 : 0x8130b133 > -MAPLOWER < 0x81309c39 0x81309d30 > -MAPLOWER < 0x81309d31 0x81309d32 > -MAPLOWER < 0x81309d33 0x8130b231 > -MAPLOWER < 0x81309d34 0x81309d35 > -MAPLOWER < 0x81309d38 0x81309d39 > -MAPLOWER < 0x81309e36 0x81309e38 > -MAPLOWER < 0x81309e37 0x81309e38 > -MAPLOWER < 0x81309e39 0x81309f31 > -MAPLOWER < 0x81309f30 0x81309f31 > -MAPLOWER < 0x81309f32 0x81309f34 > -MAPLOWER < 0x81309f33 0x81309f34 > -MAPLOWER < 0x81309f35 0xa8a3 > -MAPLOWER < 0x81309f36 0xa8ab > -MAPLOWER < 0x81309f37 0xa8af > -MAPLOWER < 0x81309f38 0xa8b3 > -MAPLOWER < 0x81309f39 0xa8b5 > -MAPLOWER < 0x8130a030 - 0x8130a032 : 0xa8b6 > -MAPLOWER < 0x8130a034 0x8130a035 > -MAPLOWER < 0x8130a036 0x8130a037 > -MAPLOWER < 0x8130a038 0x8130a039 > -MAPLOWER < 0x8130a130 0x8130a131 > -MAPLOWER < 0x8130a132 0x8130a133 > -MAPLOWER < 0x8130a134 0x8130a135 > -MAPLOWER < 0x8130a136 0x8130a137 > -MAPLOWER < 0x8130a138 0x8130a139 > -MAPLOWER < 0x8130a230 0x8130a231 > -MAPLOWER < 0x8130a233 0x8130a235 > -MAPLOWER < 0x8130a234 0x8130a235 > -MAPLOWER < 0x8130a236 0x8130a237 > -MAPLOWER < 0x8130a238 0x81309939 > -MAPLOWER < 0x8130a239 0x81309e31 > -MAPLOWER < 0x8130a330 0xa8bf > -MAPLOWER < 0x8130a331 0x8130a332 > -MAPLOWER < 0x8130a333 0x8130a334 > -MAPLOWER < 0x8130a335 0x8130a336 > -MAPLOWER < 0x8130a337 0x8130a338 > -MAPLOWER < 0x8130a339 0x8130a430 > -MAPLOWER < 0x8130a431 0x8130a432 > -MAPLOWER < 0x8130a433 0x8130a434 > -MAPLOWER < 0x8130a435 0x8130a436 > -MAPLOWER < 0x8130a437 0x8130a438 > -MAPLOWER < 0x8130a439 0x8130a530 > -MAPLOWER < 0x8130a531 0x8130a532 > -MAPLOWER < 0x8130a533 0x8130a534 > -MAPLOWER < 0x8130a535 0x8130a536 > -MAPLOWER < 0x8130a537 0x8130a538 > -MAPLOWER < 0x8130a539 0x8130a630 > -MAPLOWER < 0x8130a631 0x8130a632 > -MAPLOWER < 0x8130a633 0x8130a634 > -MAPLOWER < 0x8130a635 0x8130a636 > -MAPLOWER < 0x8130a637 0x8130a638 > -MAPLOWER < 0x8130a639 0x81309a38 > -MAPLOWER < 0x8130a731 0x8130a732 > -MAPLOWER < 0x8130a733 0x8130a734 > -MAPLOWER < 0x8130a735 0x8130a736 > -MAPLOWER < 0x8130a737 0x8130a738 > -MAPLOWER < 0x8130a739 0x8130a830 > -MAPLOWER < 0x8130a831 0x8130a832 > -MAPLOWER < 0x8130a833 0x8130a834 > -MAPLOWER < 0x8130a835 0x8130a836 > -MAPLOWER < 0x8130a837 0x8130a838 > -MAPLOWER < 0x8130ca30 0x8130cb34 > -MAPLOWER < 0x8130ca32 - 0x8130ca34 : 0x8130cb35 > -MAPLOWER < 0x8130ca36 0x8130cc32 > -MAPLOWER < 0x8130ca38 - 0x8130ca39 : 0x8130cc33 > -MAPLOWER < 0x8130cb32 - 0x8130cb33 : 0x8130cc30 > -MAPLOWER < 0x8130cd34 0x8130cd35 > -MAPLOWER < 0x8130cd36 0x8130cd37 > -MAPLOWER < 0x8130cd38 0x8130cd39 > -MAPLOWER < 0x8130ce30 0x8130ce31 > -MAPLOWER < 0x8130ce32 0x8130ce33 > -MAPLOWER < 0x8130ce34 0x8130ce35 > -MAPLOWER < 0x8130ce36 0x8130ce37 > -MAPLOWER < 0x8130ce38 0x8130ce39 > -MAPLOWER < 0x8130cf30 0x8130cf31 > -MAPLOWER < 0x8130cf32 0x8130cf33 > -MAPLOWER < 0x8130cf34 0x8130cf35 > -MAPLOWER < 0x8130cf36 0x8130cf37 > -MAPLOWER < 0x8130d032 0xa6c8 > -MAPLOWER < 0x8130d134 0x8130d239 > -MAPLOWER < 0x8130d135 - 0x8130d139 : 0x8130d330 > -MAPLOWER < 0x8130d230 - 0x8130d234 : 0x8130d335 > -MAPLOWER < 0x8130d235 - 0x8130d238 : 0x8130d430 > -MAPLOWER < 0x8130d434 0x8130d435 > -MAPLOWER < 0x8130d436 0x8130d437 > -MAPLOWER < 0x8130d438 0x8130d439 > -MAPLOWER < 0x8130d530 0x8130d531 > -MAPLOWER < 0x8130d532 0x8130d533 > -MAPLOWER < 0x8130d534 0x8130d535 > -MAPLOWER < 0x8130d536 0x8130d537 > -MAPLOWER < 0x8130d538 0x8130d539 > -MAPLOWER < 0x8130d630 0x8130d631 > -MAPLOWER < 0x8130d632 0x8130d633 > -MAPLOWER < 0x8130d634 0x8130d635 > -MAPLOWER < 0x8130d636 0x8130d637 > -MAPLOWER < 0x8130d638 0x8130d639 > -MAPLOWER < 0x8130d730 0x8130d731 > -MAPLOWER < 0x8130d732 0x8130d733 > -MAPLOWER < 0x8130d734 0x8130d735 > -MAPLOWER < 0x8130d736 0x8130d737 > -MAPLOWER < 0x8130d836 0x8130d837 > -MAPLOWER < 0x8130d838 0x8130d839 > -MAPLOWER < 0x8130d930 0x8130d931 > -MAPLOWER < 0x8130d932 0x8130d933 > -MAPLOWER < 0x8130d934 0x8130d935 > -MAPLOWER < 0x8130d936 0x8130d937 > -MAPLOWER < 0x8130d938 0x8130d939 > -MAPLOWER < 0x8130da30 0x8130da31 > -MAPLOWER < 0x8130da32 0x8130da33 > -MAPLOWER < 0x8130da34 0x8130da35 > -MAPLOWER < 0x8130da36 0x8130da37 > -MAPLOWER < 0x8130da38 0x8130da39 > -MAPLOWER < 0x8130db30 0x8130db31 > -MAPLOWER < 0x8130db32 0x8130db33 > -MAPLOWER < 0x8130db34 0x8130db35 > -MAPLOWER < 0x8130db36 0x8130db37 > -MAPLOWER < 0x8130db38 0x8130db39 > -MAPLOWER < 0x8130dc30 0x8130dc31 > -MAPLOWER < 0x8130dc32 0x8130dc33 > -MAPLOWER < 0x8130dc34 0x8130dc35 > -MAPLOWER < 0x8130dc36 0x8130dc37 > -MAPLOWER < 0x8130dc38 0x8130dc39 > -MAPLOWER < 0x8130dd30 0x8130dd31 > -MAPLOWER < 0x8130dd32 0x8130dd33 > -MAPLOWER < 0x8130dd34 0x8130dd35 > -MAPLOWER < 0x8130dd36 0x8130dd37 > -MAPLOWER < 0x8130dd38 0x8130dd39 > -MAPLOWER < 0x8130de31 0x8130de32 > -MAPLOWER < 0x8130de33 0x8130de34 > -MAPLOWER < 0x8130de35 0x8130de36 > -MAPLOWER < 0x8130de37 0x8130de38 > -MAPLOWER < 0x8130de39 0x8130df30 > -MAPLOWER < 0x8130df31 0x8130df32 > -MAPLOWER < 0x8130df33 0x8130df34 > -MAPLOWER < 0x8130df36 0x8130df37 > -MAPLOWER < 0x8130df38 0x8130df39 > -MAPLOWER < 0x8130e030 0x8130e031 > -MAPLOWER < 0x8130e032 0x8130e033 > -MAPLOWER < 0x8130e034 0x8130e035 > -MAPLOWER < 0x8130e036 0x8130e037 > -MAPLOWER < 0x8130e038 0x8130e039 > -MAPLOWER < 0x8130e130 0x8130e131 > -MAPLOWER < 0x8130e132 0x8130e133 > -MAPLOWER < 0x8130e134 0x8130e135 > -MAPLOWER < 0x8130e136 0x8130e137 > -MAPLOWER < 0x8130e138 0x8130e139 > -MAPLOWER < 0x8130e230 0x8130e231 > -MAPLOWER < 0x8130e232 0x8130e233 > -MAPLOWER < 0x8130e234 0x8130e235 > -MAPLOWER < 0x8130e236 0x8130e237 > -MAPLOWER < 0x8130e238 0x8130e239 > -MAPLOWER < 0x8130e330 0x8130e331 > -MAPLOWER < 0x8130e332 0x8130e333 > -MAPLOWER < 0x8130e336 0x8130e337 > -MAPLOWER < 0x8130e434 0x8130e435 > -MAPLOWER < 0x8130e436 0x8130e437 > -MAPLOWER < 0x8130e438 0x8130e439 > -MAPLOWER < 0x8130e530 0x8130e531 > -MAPLOWER < 0x8130e532 0x8130e533 > -MAPLOWER < 0x8130e534 0x8130e535 > -MAPLOWER < 0x8130e536 0x8130e537 > -MAPLOWER < 0x8130e538 0x8130e539 > -MAPLOWER < 0x8130e933 - 0x8130e939 : 0x8130ee31 > -MAPLOWER < 0x8130ea30 - 0x8130ea31 : 0x8130ee38 > -MAPLOWER < 0x8130ea32 - 0x8130ea39 : 0x8130ef30 > -MAPLOWER < 0x8130eb30 - 0x8130eb31 : 0x8130ef38 > -MAPLOWER < 0x8130eb32 - 0x8130eb39 : 0x8130f030 > -MAPLOWER < 0x8130ec30 - 0x8130ec31 : 0x8130f038 > -MAPLOWER < 0x8130ec32 - 0x8130ec39 : 0x8130f130 > -MAPLOWER < 0x8130ed30 0x8130f138 > -MAPLOWER < 0x8135ee34 0x8135ee35 > -MAPLOWER < 0x8135ee36 0x8135ee37 > -MAPLOWER < 0x8135ee38 0x8135ee39 > -MAPLOWER < 0x8135ef30 0x8135ef31 > -MAPLOWER < 0x8135ef32 0x8135ef33 > -MAPLOWER < 0x8135ef34 0x8135ef35 > -MAPLOWER < 0x8135ef36 0x8135ef37 > -MAPLOWER < 0x8135ef38 0x8135ef39 > -MAPLOWER < 0x8135f030 0x8135f031 > -MAPLOWER < 0x8135f032 0x8135f033 > -MAPLOWER < 0x8135f034 0x8135f035 > -MAPLOWER < 0x8135f036 0x8135f037 > -MAPLOWER < 0x8135f038 0x8135f039 > -MAPLOWER < 0x8135f130 0x8135f131 > -MAPLOWER < 0x8135f132 0x8135f133 > -MAPLOWER < 0x8135f134 0x8135f135 > -MAPLOWER < 0x8135f136 0x8135f137 > -MAPLOWER < 0x8135f138 0x8135f139 > -MAPLOWER < 0x8135f230 0x8135f231 > -MAPLOWER < 0x8135f232 0x8135f233 > -MAPLOWER < 0x8135f234 0x8135f235 > -MAPLOWER < 0x8135f236 0x8135f237 > -MAPLOWER < 0x8135f238 0x8135f239 > -MAPLOWER < 0x8135f330 0x8135f331 > -MAPLOWER < 0x8135f332 0x8135f333 > -MAPLOWER < 0x8135f334 0x8135f335 > -MAPLOWER < 0x8135f336 0x8135f337 > -MAPLOWER < 0x8135f338 0x8135f339 > -MAPLOWER < 0x8135f430 0x8135f431 > -MAPLOWER < 0x8135f432 0x8135f433 > -MAPLOWER < 0x8135f434 0x8135f435 > -MAPLOWER < 0x8135f436 0x8135f437 > -MAPLOWER < 0x8135f438 0x8135f439 > -MAPLOWER < 0x8135f530 0x8135f531 > -MAPLOWER < 0x8135f532 0x8135f533 > -MAPLOWER < 0x8135f534 0x8135f535 > -MAPLOWER < 0x8135f536 0x8135f537 > -MAPLOWER < 0x8135f538 0x8135f539 > -MAPLOWER < 0x8135f630 0x8135f631 > -MAPLOWER < 0x8135f632 0x8135f633 > -MAPLOWER < 0x8135f634 0x8135f635 > -MAPLOWER < 0x8135f636 0x8135f637 > -MAPLOWER < 0x8135f638 0x8135f639 > -MAPLOWER < 0x8135f730 0x8135f731 > -MAPLOWER < 0x8135f732 0x8135f733 > -MAPLOWER < 0x8135f734 0x8135f735 > -MAPLOWER < 0x8135f736 0x8135f737 > -MAPLOWER < 0x8135f738 0x8135f739 > -MAPLOWER < 0x8135f830 0x8135f831 > -MAPLOWER < 0x8135f832 0x8135f833 > -MAPLOWER < 0x8135f834 0x8135f835 > -MAPLOWER < 0x8135f836 0x8135f837 > -MAPLOWER < 0x8135f838 0x8135f839 > -MAPLOWER < 0x8135f930 0x8135f931 > -MAPLOWER < 0x8135f932 0x8135f933 > -MAPLOWER < 0x8135f934 0x8135f935 > -MAPLOWER < 0x8135f936 0x8135f937 > -MAPLOWER < 0x8135f938 0x8135f939 > -MAPLOWER < 0x8135fa30 0x8135fa31 > -MAPLOWER < 0x8135fa32 0x8135fa33 > -MAPLOWER < 0x8135fa34 0x8135fa35 > -MAPLOWER < 0x8135fa36 0x8135fa37 > -MAPLOWER < 0x8135fa38 0x8135fa39 > -MAPLOWER < 0x8135fb30 0x8135fb31 > -MAPLOWER < 0x8135fb32 0x8135fb33 > -MAPLOWER < 0x8135fb34 0x8135fb35 > -MAPLOWER < 0x8135fb36 0x8135fb37 > -MAPLOWER < 0x8135fb38 0x8135fb39 > -MAPLOWER < 0x8135fc30 0x8135fc31 > -MAPLOWER < 0x8135fc32 0x8135fc33 > -MAPLOWER < 0x8135fc34 0x8135fc35 > -MAPLOWER < 0x8135fc36 0x8135fc37 > -MAPLOWER < 0x8135fc38 0x8135fc39 > -MAPLOWER < 0x8135fd30 0x8135fd31 > -MAPLOWER < 0x8135fd32 0x8135fd33 > -MAPLOWER < 0x8135fe34 0x8135fe35 > -MAPLOWER < 0x8135fe36 0x8135fe37 > -MAPLOWER < 0x8135fe38 0x8135fe39 > -MAPLOWER < 0x81368130 0x81368131 > -MAPLOWER < 0x81368132 0x81368133 > -MAPLOWER < 0x81368134 0x81368135 > -MAPLOWER < 0x81368136 0x81368137 > -MAPLOWER < 0x81368138 0x81368139 > -MAPLOWER < 0x81368230 0x81368231 > -MAPLOWER < 0x81368232 0x81368233 > -MAPLOWER < 0x81368234 0x81368235 > -MAPLOWER < 0x81368236 0x81368237 > -MAPLOWER < 0x81368238 0x81368239 > -MAPLOWER < 0x81368330 0x81368331 > -MAPLOWER < 0x81368332 0x81368333 > -MAPLOWER < 0x81368334 0x81368335 > -MAPLOWER < 0x81368336 0x81368337 > -MAPLOWER < 0x81368338 0x81368339 > -MAPLOWER < 0x81368430 0x81368431 > -MAPLOWER < 0x81368432 0x81368433 > -MAPLOWER < 0x81368434 0x81368435 > -MAPLOWER < 0x81368436 0x81368437 > -MAPLOWER < 0x81368438 0x81368439 > -MAPLOWER < 0x81368530 0x81368531 > -MAPLOWER < 0x81368532 0x81368533 > -MAPLOWER < 0x81368534 0x81368535 > -MAPLOWER < 0x81368536 0x81368537 > -MAPLOWER < 0x81368538 0x81368539 > -MAPLOWER < 0x81368630 0x81368631 > -MAPLOWER < 0x81368632 0x81368633 > -MAPLOWER < 0x81368634 0x81368635 > -MAPLOWER < 0x81368636 0x81368637 > -MAPLOWER < 0x81368638 0x81368639 > -MAPLOWER < 0x81368730 0x81368731 > -MAPLOWER < 0x81368732 0x81368733 > -MAPLOWER < 0x81368734 0x81368735 > -MAPLOWER < 0x81368736 0x81368737 > -MAPLOWER < 0x81368738 0x81368739 > -MAPLOWER < 0x81368830 0x81368831 > -MAPLOWER < 0x81368832 0x81368833 > -MAPLOWER < 0x81368834 0x81368835 > -MAPLOWER < 0x81368836 0x81368837 > -MAPLOWER < 0x81368838 0x81368839 > -MAPLOWER < 0x81368930 0x81368931 > -MAPLOWER < 0x81368932 0x81368933 > -MAPLOWER < 0x81368a38 - 0x81368a39 : 0x81368a30 > -MAPLOWER < 0x81368b30 - 0x81368b35 : 0x81368a32 > -MAPLOWER < 0x81368c34 - 0x81368c37 : 0x81368b36 > -MAPLOWER < 0x81368c38 - 0x81368c39 : 0x81368c30 > -MAPLOWER < 0x81368e30 - 0x81368e37 : 0x81368d32 > -MAPLOWER < 0x81368f36 - 0x81368f37 : 0x81368e38 > -MAPLOWER < 0x81368f38 - 0x81368f39 : 0x81368f30 > -MAPLOWER < 0x81369030 - 0x81369033 : 0x81368f32 > -MAPLOWER < 0x81369132 - 0x81369137 : 0x81369034 > -MAPLOWER < 0x81369239 0x81369231 > -MAPLOWER < 0x81369331 0x81369233 > -MAPLOWER < 0x81369333 0x81369235 > -MAPLOWER < 0x81369335 0x81369237 > -MAPLOWER < 0x81369434 - 0x81369437 : 0x81369336 > -MAPLOWER < 0x81369438 - 0x81369439 : 0x81369430 > -MAPLOWER < 0x81369530 - 0x81369531 : 0x81369432 > -MAPLOWER < 0x81369736 - 0x81369737 : 0x81369638 > -MAPLOWER < 0x81369738 - 0x81369739 : 0x81369730 > -MAPLOWER < 0x81369830 - 0x81369833 : 0x81369732 > -MAPLOWER < 0x81369932 - 0x81369937 : 0x81369834 > -MAPLOWER < 0x81369938 - 0x81369939 : 0x81369930 > -MAPLOWER < 0x81369a38 - 0x81369a39 : 0x81369a30 > -MAPLOWER < 0x81369b30 - 0x81369b35 : 0x81369a32 > -MAPLOWER < 0x81369c34 - 0x81369c35 : 0x81369b36 > -MAPLOWER < 0x81369c36 - 0x81369c37 : 0x81369532 > -MAPLOWER < 0x81369c38 0x81369b39 > -MAPLOWER < 0x81369e30 - 0x81369e33 : 0x81369534 > -MAPLOWER < 0x81369e34 0x81369d35 > -MAPLOWER < 0x81369f36 - 0x81369f37 : 0x81369e38 > -MAPLOWER < 0x81369f38 - 0x81369f39 : 0x81369538 > -MAPLOWER < 0x8136a132 - 0x8136a133 : 0x8136a034 > -MAPLOWER < 0x8136a134 - 0x8136a135 : 0x81369632 > -MAPLOWER < 0x8136a136 0x8136a039 > -MAPLOWER < 0x8136a238 - 0x8136a239 : 0x81369630 > -MAPLOWER < 0x8136a330 - 0x8136a331 : 0x81369634 > -MAPLOWER < 0x8136a332 0x8136a233 > -MAPLOWER < 0x8136be38 0xa6d8 > -MAPLOWER < 0x8136bf32 0x6b > -MAPLOWER < 0x8136bf33 0x81308a32 > -MAPLOWER < 0x8136c436 - 0x8136c439 : 0x8136c532 > -MAPLOWER < 0x81379032 - 0x81379033 : 0x81379238 > -MAPLOWER < 0x81379034 - 0x81379039 : 0x81379330 > -MAPLOWER < 0x81379130 - 0x81379133 : 0x81379336 > -MAPLOWER < 0x81379134 - 0x81379139 : 0x81379430 > -MAPLOWER < 0x81379230 - 0x81379233 : 0x81379436 > -MAPLOWER < 0x81379234 - 0x81379237 : 0x81379530 > -MAPUPPER < 0xa8a1 0x81308b38 > -MAPUPPER < 0xa8a2 0x81308639 > -MAPUPPER < 0xa8a3 0x81309f35 > -MAPUPPER < 0xa8a4 0x81308638 > -MAPUPPER < 0xa8a5 0x81308d35 > -MAPUPPER < 0xa8a6 0x81308737 > -MAPUPPER < 0xa8a7 0x81308e32 > -MAPUPPER < 0xa8a8 0x81308736 > -MAPUPPER < 0xa8a9 0x81308f37 > -MAPUPPER < 0xa8aa 0x81308831 > -MAPUPPER < 0xa8ab 0x81309f36 > -MAPUPPER < 0xa8ac 0x81308830 > -MAPUPPER < 0xa8ad 0x81309238 > -MAPUPPER < 0xa8ae 0x81308837 > -MAPUPPER < 0xa8af 0x81309f37 > -MAPUPPER < 0xa8b0 0x81308836 > -MAPUPPER < 0xa8b1 0x81309537 > -MAPUPPER < 0xa8b2 0x81308933 > -MAPUPPER < 0xa8b3 0x81309f38 > -MAPUPPER < 0xa8b4 0x81308932 > -MAPUPPER < 0xa8b5 0x81309f39 > -MAPUPPER < 0xa8b6 - 0xa8b8 : 0x8130a030 > -MAPUPPER < 0xa8b9 0x81308935 > -MAPUPPER < 0xa8ba 0x81308738 > -MAPUPPER < 0xa8bd 0x81309231 > -MAPUPPER < 0xa8be 0x81309234 > -MAPUPPER < 0xa8bf 0x8130a330 > -MAPUPPER < 0x81308538 0xa6ac > -MAPUPPER < 0x81308939 0x81308730 > -MAPUPPER < 0x81308a30 - 0x81308a34 : 0x81308731 > -MAPUPPER < 0x81308a35 0x81308739 > -MAPUPPER < 0x81308a36 - 0x81308a39 : 0x81308832 > -MAPUPPER < 0x81308b30 - 0x81308b31 : 0x81308838 > -MAPUPPER < 0x81308b32 - 0x81308b33 : 0x81308930 > -MAPUPPER < 0x81308b34 0x81308934 > -MAPUPPER < 0x81308b35 - 0x81308b36 : 0x81308936 > -MAPUPPER < 0x81308b37 0x81309730 > -MAPUPPER < 0x81308c30 0x81308b39 > -MAPUPPER < 0x81308c32 0x81308c31 > -MAPUPPER < 0x81308c34 0x81308c33 > -MAPUPPER < 0x81308c36 0x81308c35 > -MAPUPPER < 0x81308c38 0x81308c37 > -MAPUPPER < 0x81308d30 0x81308c39 > -MAPUPPER < 0x81308d32 0x81308d31 > -MAPUPPER < 0x81308d34 0x81308d33 > -MAPUPPER < 0x81308d37 0x81308d36 > -MAPUPPER < 0x81308d39 0x81308d38 > -MAPUPPER < 0x81308e31 0x81308e30 > -MAPUPPER < 0x81308e34 0x81308e33 > -MAPUPPER < 0x81308e36 0x81308e35 > -MAPUPPER < 0x81308e38 0x81308e37 > -MAPUPPER < 0x81308f30 0x81308e39 > -MAPUPPER < 0x81308f32 0x81308f31 > -MAPUPPER < 0x81308f34 0x81308f33 > -MAPUPPER < 0x81308f36 0x81308f35 > -MAPUPPER < 0x81308f39 0x81308f38 > -MAPUPPER < 0x81309031 0x81309030 > -MAPUPPER < 0x81309033 0x49 > -MAPUPPER < 0x81309035 0x81309034 > -MAPUPPER < 0x81309037 0x81309036 > -MAPUPPER < 0x81309039 0x81309038 > -MAPUPPER < 0x81309132 0x81309131 > -MAPUPPER < 0x81309134 0x81309133 > -MAPUPPER < 0x81309136 0x81309135 > -MAPUPPER < 0x81309138 0x81309137 > -MAPUPPER < 0x81309230 0x81309139 > -MAPUPPER < 0x81309233 0x81309232 > -MAPUPPER < 0x81309237 0x81309236 > -MAPUPPER < 0x81309330 0x81309239 > -MAPUPPER < 0x81309332 0x81309331 > -MAPUPPER < 0x81309334 0x81309333 > -MAPUPPER < 0x81309336 0x81309335 > -MAPUPPER < 0x81309338 0x81309337 > -MAPUPPER < 0x81309430 0x81309339 > -MAPUPPER < 0x81309432 0x81309431 > -MAPUPPER < 0x81309434 0x81309433 > -MAPUPPER < 0x81309436 0x81309435 > -MAPUPPER < 0x81309438 0x81309437 > -MAPUPPER < 0x81309530 0x81309439 > -MAPUPPER < 0x81309532 0x81309531 > -MAPUPPER < 0x81309534 0x81309533 > -MAPUPPER < 0x81309536 0x81309535 > -MAPUPPER < 0x81309539 0x81309538 > -MAPUPPER < 0x81309631 0x81309630 > -MAPUPPER < 0x81309633 0x81309632 > -MAPUPPER < 0x81309635 0x81309634 > -MAPUPPER < 0x81309637 0x81309636 > -MAPUPPER < 0x81309639 0x81309638 > -MAPUPPER < 0x81309732 0x81309731 > -MAPUPPER < 0x81309734 0x81309733 > -MAPUPPER < 0x81309736 0x81309735 > -MAPUPPER < 0x81309737 0x53 > -MAPUPPER < 0x81309831 0x81309830 > -MAPUPPER < 0x81309833 0x81309832 > -MAPUPPER < 0x81309836 0x81309835 > -MAPUPPER < 0x81309930 0x81309839 > -MAPUPPER < 0x81309936 0x81309935 > -MAPUPPER < 0x81309939 0x8130a238 > -MAPUPPER < 0x81309a33 0x81309a32 > -MAPUPPER < 0x81309a38 0x8130a639 > -MAPUPPER < 0x81309b31 0x81309b30 > -MAPUPPER < 0x81309b33 0x81309b32 > -MAPUPPER < 0x81309b35 0x81309b34 > -MAPUPPER < 0x81309b38 0x81309b37 > -MAPUPPER < 0x81309c33 0x81309c32 > -MAPUPPER < 0x81309c36 0x81309c35 > -MAPUPPER < 0x81309d30 0x81309c39 > -MAPUPPER < 0x81309d32 0x81309d31 > -MAPUPPER < 0x81309d35 0x81309d34 > -MAPUPPER < 0x81309d39 0x81309d38 > -MAPUPPER < 0x81309e31 0x8130a239 > -MAPUPPER < 0x81309e37 0x81309e36 > -MAPUPPER < 0x81309e38 0x81309e36 > -MAPUPPER < 0x81309f30 0x81309e39 > -MAPUPPER < 0x81309f31 0x81309e39 > -MAPUPPER < 0x81309f33 0x81309f32 > -MAPUPPER < 0x81309f34 0x81309f32 > -MAPUPPER < 0x8130a033 0x81309932 > -MAPUPPER < 0x8130a035 0x8130a034 > -MAPUPPER < 0x8130a037 0x8130a036 > -MAPUPPER < 0x8130a039 0x8130a038 > -MAPUPPER < 0x8130a131 0x8130a130 > -MAPUPPER < 0x8130a133 0x8130a132 > -MAPUPPER < 0x8130a135 0x8130a134 > -MAPUPPER < 0x8130a137 0x8130a136 > -MAPUPPER < 0x8130a139 0x8130a138 > -MAPUPPER < 0x8130a231 0x8130a230 > -MAPUPPER < 0x8130a234 0x8130a233 > -MAPUPPER < 0x8130a235 0x8130a233 > -MAPUPPER < 0x8130a237 0x8130a236 > -MAPUPPER < 0x8130a332 0x8130a331 > -MAPUPPER < 0x8130a334 0x8130a333 > -MAPUPPER < 0x8130a336 0x8130a335 > -MAPUPPER < 0x8130a338 0x8130a337 > -MAPUPPER < 0x8130a430 0x8130a339 > -MAPUPPER < 0x8130a432 0x8130a431 > -MAPUPPER < 0x8130a434 0x8130a433 > -MAPUPPER < 0x8130a436 0x8130a435 > -MAPUPPER < 0x8130a438 0x8130a437 > -MAPUPPER < 0x8130a530 0x8130a439 > -MAPUPPER < 0x8130a532 0x8130a531 > -MAPUPPER < 0x8130a534 0x8130a533 > -MAPUPPER < 0x8130a536 0x8130a535 > -MAPUPPER < 0x8130a538 0x8130a537 > -MAPUPPER < 0x8130a630 0x8130a539 > -MAPUPPER < 0x8130a632 0x8130a631 > -MAPUPPER < 0x8130a634 0x8130a633 > -MAPUPPER < 0x8130a636 0x8130a635 > -MAPUPPER < 0x8130a638 0x8130a637 > -MAPUPPER < 0x8130a732 0x8130a731 > -MAPUPPER < 0x8130a734 0x8130a733 > -MAPUPPER < 0x8130a736 0x8130a735 > -MAPUPPER < 0x8130a738 0x8130a737 > -MAPUPPER < 0x8130a830 0x8130a739 > -MAPUPPER < 0x8130a832 0x8130a831 > -MAPUPPER < 0x8130a834 0x8130a833 > -MAPUPPER < 0x8130a836 0x8130a835 > -MAPUPPER < 0x8130a838 0x8130a837 > -MAPUPPER < 0x8130ab39 0x81309739 > -MAPUPPER < 0x8130ac30 0x81309834 > -MAPUPPER < 0x8130ac32 - 0x8130ac33 : 0x81309837 > -MAPUPPER < 0x8130ac35 0x81309933 > -MAPUPPER < 0x8130ac37 0x81309934 > -MAPUPPER < 0x8130ad32 0x81309937 > -MAPUPPER < 0x8130ad34 0x81309938 > -MAPUPPER < 0x8130ad39 0x81309a31 > -MAPUPPER < 0x8130ae30 0x81309a30 > -MAPUPPER < 0x8130ae36 0x81309a36 > -MAPUPPER < 0x8130ae39 0x81309a37 > -MAPUPPER < 0x8130af32 0x81309a39 > -MAPUPPER < 0x8130b033 0x81309b36 > -MAPUPPER < 0x8130b036 0x81309b39 > -MAPUPPER < 0x8130b131 0x81309c34 > -MAPUPPER < 0x8130b133 - 0x8130b134 : 0x81309c37 > -MAPUPPER < 0x8130b231 0x81309d33 > -MAPUPPER < 0x8130c335 0xa6a9 > -MAPUPPER < 0x8130cb34 0x8130ca30 > -MAPUPPER < 0x8130cb35 - 0x8130cb37 : 0x8130ca32 > -MAPUPPER < 0x8130cb39 0xa6b2 > -MAPUPPER < 0x8130cc30 - 0x8130cc31 : 0x8130cb32 > -MAPUPPER < 0x8130cc32 0x8130ca36 > -MAPUPPER < 0x8130cc33 - 0x8130cc34 : 0x8130ca38 > -MAPUPPER < 0x8130cc36 0xa6a2 > -MAPUPPER < 0x8130cc37 0xa6a8 > -MAPUPPER < 0x8130cd31 0xa6b5 > -MAPUPPER < 0x8130cd32 0xa6b0 > -MAPUPPER < 0x8130cd35 0x8130cd34 > -MAPUPPER < 0x8130cd37 0x8130cd36 > -MAPUPPER < 0x8130cd39 0x8130cd38 > -MAPUPPER < 0x8130ce31 0x8130ce30 > -MAPUPPER < 0x8130ce33 0x8130ce32 > -MAPUPPER < 0x8130ce35 0x8130ce34 > -MAPUPPER < 0x8130ce37 0x8130ce36 > -MAPUPPER < 0x8130ce39 0x8130ce38 > -MAPUPPER < 0x8130cf31 0x8130cf30 > -MAPUPPER < 0x8130cf33 0x8130cf32 > -MAPUPPER < 0x8130cf35 0x8130cf34 > -MAPUPPER < 0x8130cf37 0x8130cf36 > -MAPUPPER < 0x8130cf38 0xa6aa > -MAPUPPER < 0x8130cf39 0xa6b1 > -MAPUPPER < 0x8130d030 0xa6b2 > -MAPUPPER < 0x8130d033 0xa6a5 > -MAPUPPER < 0x8130d239 0x8130d134 > -MAPUPPER < 0x8130d330 - 0x8130d334 : 0x8130d135 > -MAPUPPER < 0x8130d335 - 0x8130d339 : 0x8130d230 > -MAPUPPER < 0x8130d430 - 0x8130d433 : 0x8130d235 > -MAPUPPER < 0x8130d435 0x8130d434 > -MAPUPPER < 0x8130d437 0x8130d436 > -MAPUPPER < 0x8130d439 0x8130d438 > -MAPUPPER < 0x8130d531 0x8130d530 > -MAPUPPER < 0x8130d533 0x8130d532 > -MAPUPPER < 0x8130d535 0x8130d534 > -MAPUPPER < 0x8130d537 0x8130d536 > -MAPUPPER < 0x8130d539 0x8130d538 > -MAPUPPER < 0x8130d631 0x8130d630 > -MAPUPPER < 0x8130d633 0x8130d632 > -MAPUPPER < 0x8130d635 0x8130d634 > -MAPUPPER < 0x8130d637 0x8130d636 > -MAPUPPER < 0x8130d639 0x8130d638 > -MAPUPPER < 0x8130d731 0x8130d730 > -MAPUPPER < 0x8130d733 0x8130d732 > -MAPUPPER < 0x8130d735 0x8130d734 > -MAPUPPER < 0x8130d737 0x8130d736 > -MAPUPPER < 0x8130d837 0x8130d836 > -MAPUPPER < 0x8130d839 0x8130d838 > -MAPUPPER < 0x8130d931 0x8130d930 > -MAPUPPER < 0x8130d933 0x8130d932 > -MAPUPPER < 0x8130d935 0x8130d934 > -MAPUPPER < 0x8130d937 0x8130d936 > -MAPUPPER < 0x8130d939 0x8130d938 > -MAPUPPER < 0x8130da31 0x8130da30 > -MAPUPPER < 0x8130da33 0x8130da32 > -MAPUPPER < 0x8130da35 0x8130da34 > -MAPUPPER < 0x8130da37 0x8130da36 > -MAPUPPER < 0x8130da39 0x8130da38 > -MAPUPPER < 0x8130db31 0x8130db30 > -MAPUPPER < 0x8130db33 0x8130db32 > -MAPUPPER < 0x8130db35 0x8130db34 > -MAPUPPER < 0x8130db37 0x8130db36 > -MAPUPPER < 0x8130db39 0x8130db38 > -MAPUPPER < 0x8130dc31 0x8130dc30 > -MAPUPPER < 0x8130dc33 0x8130dc32 > -MAPUPPER < 0x8130dc35 0x8130dc34 > -MAPUPPER < 0x8130dc37 0x8130dc36 > -MAPUPPER < 0x8130dc39 0x8130dc38 > -MAPUPPER < 0x8130dd31 0x8130dd30 > -MAPUPPER < 0x8130dd33 0x8130dd32 > -MAPUPPER < 0x8130dd35 0x8130dd34 > -MAPUPPER < 0x8130dd37 0x8130dd36 > -MAPUPPER < 0x8130dd39 0x8130dd38 > -MAPUPPER < 0x8130de32 0x8130de31 > -MAPUPPER < 0x8130de34 0x8130de33 > -MAPUPPER < 0x8130de36 0x8130de35 > -MAPUPPER < 0x8130de38 0x8130de37 > -MAPUPPER < 0x8130df30 0x8130de39 > -MAPUPPER < 0x8130df32 0x8130df31 > -MAPUPPER < 0x8130df34 0x8130df33 > -MAPUPPER < 0x8130df37 0x8130df36 > -MAPUPPER < 0x8130df39 0x8130df38 > -MAPUPPER < 0x8130e031 0x8130e030 > -MAPUPPER < 0x8130e033 0x8130e032 > -MAPUPPER < 0x8130e035 0x8130e034 > -MAPUPPER < 0x8130e037 0x8130e036 > -MAPUPPER < 0x8130e039 0x8130e038 > -MAPUPPER < 0x8130e131 0x8130e130 > -MAPUPPER < 0x8130e133 0x8130e132 > -MAPUPPER < 0x8130e135 0x8130e134 > -MAPUPPER < 0x8130e137 0x8130e136 > -MAPUPPER < 0x8130e139 0x8130e138 > -MAPUPPER < 0x8130e231 0x8130e230 > -MAPUPPER < 0x8130e233 0x8130e232 > -MAPUPPER < 0x8130e235 0x8130e234 > -MAPUPPER < 0x8130e237 0x8130e236 > -MAPUPPER < 0x8130e239 0x8130e238 > -MAPUPPER < 0x8130e331 0x8130e330 > -MAPUPPER < 0x8130e333 0x8130e332 > -MAPUPPER < 0x8130e337 0x8130e336 > -MAPUPPER < 0x8130e435 0x8130e434 > -MAPUPPER < 0x8130e437 0x8130e436 > -MAPUPPER < 0x8130e439 0x8130e438 > -MAPUPPER < 0x8130e531 0x8130e530 > -MAPUPPER < 0x8130e533 0x8130e532 > -MAPUPPER < 0x8130e535 0x8130e534 > -MAPUPPER < 0x8130e537 0x8130e536 > -MAPUPPER < 0x8130e539 0x8130e538 > -MAPUPPER < 0x8130ee31 - 0x8130ee37 : 0x8130e933 > -MAPUPPER < 0x8130ee38 - 0x8130ee39 : 0x8130ea30 > -MAPUPPER < 0x8130ef30 - 0x8130ef37 : 0x8130ea32 > -MAPUPPER < 0x8130ef38 - 0x8130ef39 : 0x8130eb30 > -MAPUPPER < 0x8130f030 - 0x8130f037 : 0x8130eb32 > -MAPUPPER < 0x8130f038 - 0x8130f039 : 0x8130ec30 > -MAPUPPER < 0x8130f130 - 0x8130f137 : 0x8130ec32 > -MAPUPPER < 0x8130f138 0x8130ed30 > -MAPUPPER < 0x8135ee35 0x8135ee34 > -MAPUPPER < 0x8135ee37 0x8135ee36 > -MAPUPPER < 0x8135ee39 0x8135ee38 > -MAPUPPER < 0x8135ef31 0x8135ef30 > -MAPUPPER < 0x8135ef33 0x8135ef32 > -MAPUPPER < 0x8135ef35 0x8135ef34 > -MAPUPPER < 0x8135ef37 0x8135ef36 > -MAPUPPER < 0x8135ef39 0x8135ef38 > -MAPUPPER < 0x8135f031 0x8135f030 > -MAPUPPER < 0x8135f033 0x8135f032 > -MAPUPPER < 0x8135f035 0x8135f034 > -MAPUPPER < 0x8135f037 0x8135f036 > -MAPUPPER < 0x8135f039 0x8135f038 > -MAPUPPER < 0x8135f131 0x8135f130 > -MAPUPPER < 0x8135f133 0x8135f132 > -MAPUPPER < 0x8135f135 0x8135f134 > -MAPUPPER < 0x8135f137 0x8135f136 > -MAPUPPER < 0x8135f139 0x8135f138 > -MAPUPPER < 0x8135f231 0x8135f230 > -MAPUPPER < 0x8135f233 0x8135f232 > -MAPUPPER < 0x8135f235 0x8135f234 > -MAPUPPER < 0x8135f237 0x8135f236 > -MAPUPPER < 0x8135f239 0x8135f238 > -MAPUPPER < 0x8135f331 0x8135f330 > -MAPUPPER < 0x8135f333 0x8135f332 > -MAPUPPER < 0x8135f335 0x8135f334 > -MAPUPPER < 0x8135f337 0x8135f336 > -MAPUPPER < 0x8135f339 0x8135f338 > -MAPUPPER < 0x8135f431 0x8135f430 > -MAPUPPER < 0x8135f433 0x8135f432 > -MAPUPPER < 0x8135f435 0x8135f434 > -MAPUPPER < 0x8135f437 0x8135f436 > -MAPUPPER < 0x8135f439 0x8135f438 > -MAPUPPER < 0x8135f531 0x8135f530 > -MAPUPPER < 0x8135f533 0x8135f532 > -MAPUPPER < 0x8135f535 0x8135f534 > -MAPUPPER < 0x8135f537 0x8135f536 > -MAPUPPER < 0x8135f539 0x8135f538 > -MAPUPPER < 0x8135f631 0x8135f630 > -MAPUPPER < 0x8135f633 0x8135f632 > -MAPUPPER < 0x8135f635 0x8135f634 > -MAPUPPER < 0x8135f637 0x8135f636 > -MAPUPPER < 0x8135f639 0x8135f638 > -MAPUPPER < 0x8135f731 0x8135f730 > -MAPUPPER < 0x8135f733 0x8135f732 > -MAPUPPER < 0x8135f735 0x8135f734 > -MAPUPPER < 0x8135f737 0x8135f736 > -MAPUPPER < 0x8135f739 0x8135f738 > -MAPUPPER < 0x8135f831 0x8135f830 > -MAPUPPER < 0x8135f833 0x8135f832 > -MAPUPPER < 0x8135f835 0x8135f834 > -MAPUPPER < 0x8135f837 0x8135f836 > -MAPUPPER < 0x8135f839 0x8135f838 > -MAPUPPER < 0x8135f931 0x8135f930 > -MAPUPPER < 0x8135f933 0x8135f932 > -MAPUPPER < 0x8135f935 0x8135f934 > -MAPUPPER < 0x8135f937 0x8135f936 > -MAPUPPER < 0x8135f939 0x8135f938 > -MAPUPPER < 0x8135fa31 0x8135fa30 > -MAPUPPER < 0x8135fa33 0x8135fa32 > -MAPUPPER < 0x8135fa35 0x8135fa34 > -MAPUPPER < 0x8135fa37 0x8135fa36 > -MAPUPPER < 0x8135fa39 0x8135fa38 > -MAPUPPER < 0x8135fb31 0x8135fb30 > -MAPUPPER < 0x8135fb33 0x8135fb32 > -MAPUPPER < 0x8135fb35 0x8135fb34 > -MAPUPPER < 0x8135fb37 0x8135fb36 > -MAPUPPER < 0x8135fb39 0x8135fb38 > -MAPUPPER < 0x8135fc31 0x8135fc30 > -MAPUPPER < 0x8135fc33 0x8135fc32 > -MAPUPPER < 0x8135fc35 0x8135fc34 > -MAPUPPER < 0x8135fc37 0x8135fc36 > -MAPUPPER < 0x8135fc39 0x8135fc38 > -MAPUPPER < 0x8135fd31 0x8135fd30 > -MAPUPPER < 0x8135fd33 0x8135fd32 > -MAPUPPER < 0x8135fd39 0x8135f830 > -MAPUPPER < 0x8135fe35 0x8135fe34 > -MAPUPPER < 0x8135fe37 0x8135fe36 > -MAPUPPER < 0x8135fe39 0x8135fe38 > -MAPUPPER < 0x81368131 0x81368130 > -MAPUPPER < 0x81368133 0x81368132 > -MAPUPPER < 0x81368135 0x81368134 > -MAPUPPER < 0x81368137 0x81368136 > -MAPUPPER < 0x81368139 0x81368138 > -MAPUPPER < 0x81368231 0x81368230 > -MAPUPPER < 0x81368233 0x81368232 > -MAPUPPER < 0x81368235 0x81368234 > -MAPUPPER < 0x81368237 0x81368236 > -MAPUPPER < 0x81368239 0x81368238 > -MAPUPPER < 0x81368331 0x81368330 > -MAPUPPER < 0x81368333 0x81368332 > -MAPUPPER < 0x81368335 0x81368334 > -MAPUPPER < 0x81368337 0x81368336 > -MAPUPPER < 0x81368339 0x81368338 > -MAPUPPER < 0x81368431 0x81368430 > -MAPUPPER < 0x81368433 0x81368432 > -MAPUPPER < 0x81368435 0x81368434 > -MAPUPPER < 0x81368437 0x81368436 > -MAPUPPER < 0x81368439 0x81368438 > -MAPUPPER < 0x81368531 0x81368530 > -MAPUPPER < 0x81368533 0x81368532 > -MAPUPPER < 0x81368535 0x81368534 > -MAPUPPER < 0x81368537 0x81368536 > -MAPUPPER < 0x81368539 0x81368538 > -MAPUPPER < 0x81368631 0x81368630 > -MAPUPPER < 0x81368633 0x81368632 > -MAPUPPER < 0x81368635 0x81368634 > -MAPUPPER < 0x81368637 0x81368636 > -MAPUPPER < 0x81368639 0x81368638 > -MAPUPPER < 0x81368731 0x81368730 > -MAPUPPER < 0x81368733 0x81368732 > -MAPUPPER < 0x81368735 0x81368734 > -MAPUPPER < 0x81368737 0x81368736 > -MAPUPPER < 0x81368739 0x81368738 > -MAPUPPER < 0x81368831 0x81368830 > -MAPUPPER < 0x81368833 0x81368832 > -MAPUPPER < 0x81368835 0x81368834 > -MAPUPPER < 0x81368837 0x81368836 > -MAPUPPER < 0x81368839 0x81368838 > -MAPUPPER < 0x81368931 0x81368930 > -MAPUPPER < 0x81368933 0x81368932 > -MAPUPPER < 0x81368a30 - 0x81368a31 : 0x81368a38 > -MAPUPPER < 0x81368a32 - 0x81368a37 : 0x81368b30 > -MAPUPPER < 0x81368b36 - 0x81368b39 : 0x81368c34 > -MAPUPPER < 0x81368c30 - 0x81368c31 : 0x81368c38 > -MAPUPPER < 0x81368d32 - 0x81368d39 : 0x81368e30 > -MAPUPPER < 0x81368e38 - 0x81368e39 : 0x81368f36 > -MAPUPPER < 0x81368f30 - 0x81368f31 : 0x81368f38 > -MAPUPPER < 0x81368f32 - 0x81368f35 : 0x81369030 > -MAPUPPER < 0x81369034 - 0x81369039 : 0x81369132 > -MAPUPPER < 0x81369231 0x81369239 > -MAPUPPER < 0x81369233 0x81369331 > -MAPUPPER < 0x81369235 0x81369333 > -MAPUPPER < 0x81369237 0x81369335 > -MAPUPPER < 0x81369336 - 0x81369339 : 0x81369434 > -MAPUPPER < 0x81369430 - 0x81369431 : 0x81369438 > -MAPUPPER < 0x81369432 - 0x81369433 : 0x81369530 > -MAPUPPER < 0x81369532 - 0x81369533 : 0x81369c36 > -MAPUPPER < 0x81369534 - 0x81369537 : 0x81369e30 > -MAPUPPER < 0x81369538 - 0x81369539 : 0x81369f38 > -MAPUPPER < 0x81369630 - 0x81369631 : 0x8136a238 > -MAPUPPER < 0x81369632 - 0x81369633 : 0x8136a134 > -MAPUPPER < 0x81369634 - 0x81369635 : 0x8136a330 > -MAPUPPER < 0x81369638 - 0x81369639 : 0x81369736 > -MAPUPPER < 0x81369730 - 0x81369731 : 0x81369738 > -MAPUPPER < 0x81369732 - 0x81369735 : 0x81369830 > -MAPUPPER < 0x81369834 - 0x81369839 : 0x81369932 > -MAPUPPER < 0x81369930 - 0x81369931 : 0x81369938 > -MAPUPPER < 0x81369a30 - 0x81369a31 : 0x81369a38 > -MAPUPPER < 0x81369a32 - 0x81369a37 : 0x81369b30 > -MAPUPPER < 0x81369b36 - 0x81369b37 : 0x81369c34 > -MAPUPPER < 0x81369b39 0x81369c38 > -MAPUPPER < 0x81369d30 0xa6a9 > -MAPUPPER < 0x81369d35 0x81369e34 > -MAPUPPER < 0x81369e38 - 0x81369e39 : 0x81369f36 > -MAPUPPER < 0x8136a034 - 0x8136a035 : 0x8136a132 > -MAPUPPER < 0x8136a039 0x8136a136 > -MAPUPPER < 0x8136a233 0x8136a332 > -MAPUPPER < 0x8136c530 - 0x8136c531 : 0xa2fb > -MAPUPPER < 0x8136c532 - 0x8136c535 : 0x8136c436 > -MAPUPPER < 0x81379238 - 0x81379239 : 0x81379032 > -MAPUPPER < 0x81379330 - 0x81379335 : 0x81379034 > -MAPUPPER < 0x81379336 - 0x81379339 : 0x81379130 > -MAPUPPER < 0x81379430 - 0x81379435 : 0x81379134 > -MAPUPPER < 0x81379436 - 0x81379439 : 0x81379230 > -MAPUPPER < 0x81379530 - 0x81379533 : 0x81379234 > -PHONOGRAM 0x8132e834 -PHONOGRAM 0x8133b732 - 0x8133b738 -PHONOGRAM 0x8133b830 - 0x8133b839 -PHONOGRAM 0x8133b930 - 0x8133b939 -PHONOGRAM 0x8133ba30 - 0x8133ba39 -PHONOGRAM 0x8133bb30 - 0x8133bb39 -PHONOGRAM 0x8133bc30 - 0x8133bc39 -PHONOGRAM 0x8133bd30 - 0x8133bd39 -PHONOGRAM 0x8133be30 - 0x8133be32 0x8133be34 0x8133be36 - 0x8133be39 -PHONOGRAM 0x8133bf32 - 0x8133bf38 -PHONOGRAM 0x8133c030 0x8133c032 - 0x8133c035 0x8133c038 0x8133c039 -PHONOGRAM 0x8133c130 - 0x8133c139 -PHONOGRAM 0x8133c230 - 0x8133c239 -PHONOGRAM 0x8133c330 - 0x8133c339 -PHONOGRAM 0x8133c430 - 0x8133c436 0x8133c438 -PHONOGRAM 0x8133c530 - 0x8133c533 0x8133c536 - 0x8133c539 -PHONOGRAM 0x8133c630 - 0x8133c639 -PHONOGRAM 0x8133c730 - 0x8133c739 -PHONOGRAM 0x8133c830 - 0x8133c836 0x8133c838 -PHONOGRAM 0x8133c930 - 0x8133c933 0x8133c936 - 0x8133c939 -PHONOGRAM 0x8133ca30 - 0x8133ca32 0x8133ca34 0x8133ca36 - 0x8133ca39 -PHONOGRAM 0x8133cb32 - 0x8133cb38 -PHONOGRAM 0x8133cc30 - 0x8133cc36 0x8133cc38 0x8133cc39 -PHONOGRAM 0x8133cd30 - 0x8133cd39 -PHONOGRAM 0x8133ce30 - 0x8133ce39 -PHONOGRAM 0x8133cf30 0x8133cf32 - 0x8133cf39 -PHONOGRAM 0x8133d030 - 0x8133d039 -PHONOGRAM 0x8133d130 - 0x8133d139 -PHONOGRAM 0x8133d230 - 0x8133d232 0x8133d234 0x8133d236 - 0x8133d239 -PHONOGRAM 0x8133d332 - 0x8133d338 -PHONOGRAM 0x8133d430 - 0x8133d439 -PHONOGRAM 0x8133d530 - 0x8133d539 -PHONOGRAM 0x8133d630 - 0x8133d639 -PHONOGRAM 0x8133d730 - 0x8133d738 -PHONOGRAM 0x8133d830 - 0x8133d839 -PHONOGRAM 0x8133d930 - 0x8133d938 -PHONOGRAM 0x8133ea35 - 0x8133ea39 -PHONOGRAM 0x8133eb30 - 0x8133eb39 -PHONOGRAM 0x8133ec30 - 0x8133ec39 -PHONOGRAM 0x8133ed30 - 0x8133ed39 -PHONOGRAM 0x8133ee30 - 0x8133ee39 -PHONOGRAM 0x8133ef30 - 0x8133ef39 -PHONOGRAM 0x8133f030 - 0x8133f039 -PHONOGRAM 0x8133f130 - 0x8133f139 -PHONOGRAM 0x8133f230 - 0x8133f239 -PHONOGRAM 0x8133f330 - 0x8133f339 -PHONOGRAM 0x8133f430 - 0x8133f439 -PHONOGRAM 0x8133f530 - 0x8133f539 -PHONOGRAM 0x8133f630 - 0x8133f639 -PHONOGRAM 0x8133f730 - 0x8133f739 -PHONOGRAM 0x8133f830 - 0x8133f839 -PHONOGRAM 0x8133f930 - 0x8133f939 -PHONOGRAM 0x8133fa30 - 0x8133fa39 -PHONOGRAM 0x8133fb30 - 0x8133fb39 -PHONOGRAM 0x8133fc30 - 0x8133fc39 -PHONOGRAM 0x8133fd30 - 0x8133fd39 -PHONOGRAM 0x8133fe30 - 0x8133fe39 -PHONOGRAM 0x81348130 - 0x81348139 -PHONOGRAM 0x81348230 - 0x81348239 -PHONOGRAM 0x81348330 - 0x81348339 -PHONOGRAM 0x81348430 - 0x81348439 -PHONOGRAM 0x81348530 - 0x81348539 -PHONOGRAM 0x81348630 - 0x81348639 -PHONOGRAM 0x81348730 - 0x81348739 -PHONOGRAM 0x81348830 - 0x81348839 -PHONOGRAM 0x81348930 - 0x81348939 -PHONOGRAM 0x81348a30 - 0x81348a39 -PHONOGRAM 0x81348b30 - 0x81348b39 -PHONOGRAM 0x81348c30 - 0x81348c39 -PHONOGRAM 0x81348d30 - 0x81348d39 -PHONOGRAM 0x81348e30 - 0x81348e39 -PHONOGRAM 0x81348f30 - 0x81348f39 -PHONOGRAM 0x81349030 - 0x81349039 -PHONOGRAM 0x81349130 - 0x81349139 -PHONOGRAM 0x81349230 - 0x81349239 -PHONOGRAM 0x81349330 - 0x81349339 -PHONOGRAM 0x81349430 - 0x81349439 -PHONOGRAM 0x81349530 - 0x81349539 -PHONOGRAM 0x81349630 - 0x81349639 -PHONOGRAM 0x81349730 - 0x81349739 -PHONOGRAM 0x81349830 - 0x81349839 -PHONOGRAM 0x81349930 - 0x81349939 -PHONOGRAM 0x81349a30 - 0x81349a39 -PHONOGRAM 0x81349b30 - 0x81349b39 -PHONOGRAM 0x81349c30 - 0x81349c39 -PHONOGRAM 0x81349d30 - 0x81349d39 -PHONOGRAM 0x81349e30 - 0x81349e39 -PHONOGRAM 0x81349f30 - 0x81349f39 -PHONOGRAM 0x8134a030 - 0x8134a039 -PHONOGRAM 0x8134a130 - 0x8134a139 -PHONOGRAM 0x8134a230 - 0x8134a239 -PHONOGRAM 0x8134a330 - 0x8134a339 -PHONOGRAM 0x8134a430 - 0x8134a439 -PHONOGRAM 0x8134a530 - 0x8134a539 -PHONOGRAM 0x8134a630 - 0x8134a639 -PHONOGRAM 0x8134a730 - 0x8134a739 -PHONOGRAM 0x8134a830 - 0x8134a839 -PHONOGRAM 0x8134a930 - 0x8134a939 -PHONOGRAM 0x8134aa30 - 0x8134aa34 0x8134aa37 - 0x8134aa39 -PHONOGRAM 0x8134ab30 - 0x8134ab34 -PHONOGRAM 0x8139a636 - 0x8139a638 -PHONOGRAM 0x8139a733 0x8139a735 - 0x8139a738 -PHONOGRAM 0x8139a830 -PHONOGRAM 0x8139a933 - 0x8139a939 -PHONOGRAM 0x8139aa30 - 0x8139aa39 -PHONOGRAM 0x8139ab30 - 0x8139ab39 -PHONOGRAM 0x8139ac30 - 0x8139ac39 -PHONOGRAM 0x8139ad30 - 0x8139ad39 -PHONOGRAM 0x8139ae30 - 0x8139ae33 0x8139ae35 - 0x8139ae39 -PHONOGRAM 0x8139af30 - 0x8139af39 -PHONOGRAM 0x8139b030 - 0x8139b039 -PHONOGRAM 0x8139b130 - 0x8139b139 -PHONOGRAM 0x8139b230 - 0x8139b236 -PHONOGRAM 0x8139bc34 - 0x8139bc39 -PHONOGRAM 0x8139bd30 - 0x8139bd39 -PHONOGRAM 0x82359833 - 0x82359839 -PHONOGRAM 0x82359930 - 0x82359939 -PHONOGRAM 0x82359a30 - 0x82359a39 -PHONOGRAM 0x82359b30 - 0x82359b39 -PHONOGRAM 0x82359c30 - 0x82359c39 -PHONOGRAM 0x82359d30 - 0x82359d39 -PHONOGRAM 0x82359e30 - 0x82359e39 -PHONOGRAM 0x82359f30 - 0x82359f39 -PHONOGRAM 0x8235a030 - 0x8235a039 -PHONOGRAM 0x8235a130 - 0x8235a139 -PHONOGRAM 0x8235a230 - 0x8235a239 -PHONOGRAM 0x8235a330 - 0x8235a339 -PHONOGRAM 0x8235a430 - 0x8235a439 -PHONOGRAM 0x8235a530 - 0x8235a539 -PHONOGRAM 0x8235a630 - 0x8235a639 -PHONOGRAM 0x8235a730 - 0x8235a739 -PHONOGRAM 0x8235a830 - 0x8235a839 -PHONOGRAM 0x8235a930 - 0x8235a939 -PHONOGRAM 0x8235aa30 - 0x8235aa39 -PHONOGRAM 0x8235ab30 - 0x8235ab39 -PHONOGRAM 0x8235ac30 - 0x8235ac39 -PHONOGRAM 0x8235ad30 - 0x8235ad39 -PHONOGRAM 0x8235ae30 - 0x8235ae39 -PHONOGRAM 0x8235af30 - 0x8235af39 -PHONOGRAM 0x8235b030 - 0x8235b039 -PHONOGRAM 0x8235b130 - 0x8235b139 -PHONOGRAM 0x8235b230 - 0x8235b239 -PHONOGRAM 0x8235b330 - 0x8235b339 -PHONOGRAM 0x8235b430 - 0x8235b439 -PHONOGRAM 0x8235b530 - 0x8235b539 -PHONOGRAM 0x8235b630 - 0x8235b639 -PHONOGRAM 0x8235b730 - 0x8235b739 -PHONOGRAM 0x8235b830 - 0x8235b839 -PHONOGRAM 0x8235b930 - 0x8235b939 -PHONOGRAM 0x8235ba30 - 0x8235ba39 -PHONOGRAM 0x8235bb30 - 0x8235bb39 -PHONOGRAM 0x8235bc30 - 0x8235bc39 -PHONOGRAM 0x8235bd30 - 0x8235bd39 -PHONOGRAM 0x8235be30 - 0x8235be39 -PHONOGRAM 0x8235bf30 - 0x8235bf39 -PHONOGRAM 0x8235c030 - 0x8235c039 -PHONOGRAM 0x8235c130 - 0x8235c139 -PHONOGRAM 0x8235c230 - 0x8235c239 -PHONOGRAM 0x8235c330 - 0x8235c339 -PHONOGRAM 0x8235c430 - 0x8235c439 -PHONOGRAM 0x8235c530 - 0x8235c539 -PHONOGRAM 0x8235c630 - 0x8235c639 -PHONOGRAM 0x8235c730 - 0x8235c739 -PHONOGRAM 0x8235c830 - 0x8235c839 -PHONOGRAM 0x8235c930 - 0x8235c939 -PHONOGRAM 0x8235ca30 - 0x8235ca39 -PHONOGRAM 0x8235cb30 - 0x8235cb39 -PHONOGRAM 0x8235cc30 - 0x8235cc39 -PHONOGRAM 0x8235cd30 - 0x8235cd39 -PHONOGRAM 0x8235ce30 - 0x8235ce39 -PHONOGRAM 0x8235cf30 - 0x8235cf39 -PHONOGRAM 0x8235d030 - 0x8235d039 -PHONOGRAM 0x8235d130 - 0x8235d139 -PHONOGRAM 0x8235d230 - 0x8235d239 -PHONOGRAM 0x8235d330 - 0x8235d339 -PHONOGRAM 0x8235d430 - 0x8235d439 -PHONOGRAM 0x8235d530 - 0x8235d539 -PHONOGRAM 0x8235d630 - 0x8235d639 -PHONOGRAM 0x8235d730 - 0x8235d739 -PHONOGRAM 0x8235d830 - 0x8235d839 -PHONOGRAM 0x8235d930 - 0x8235d939 -PHONOGRAM 0x8235da30 - 0x8235da39 -PHONOGRAM 0x8235db30 - 0x8235db39 -PHONOGRAM 0x8235dc30 - 0x8235dc39 -PHONOGRAM 0x8235dd30 - 0x8235dd39 -PHONOGRAM 0x8235de30 - 0x8235de39 -PHONOGRAM 0x8235df30 - 0x8235df39 -PHONOGRAM 0x8235e030 - 0x8235e039 -PHONOGRAM 0x8235e130 - 0x8235e139 -PHONOGRAM 0x8235e230 - 0x8235e239 -PHONOGRAM 0x8235e330 - 0x8235e339 -PHONOGRAM 0x8235e430 - 0x8235e439 -PHONOGRAM 0x8235e530 - 0x8235e539 -PHONOGRAM 0x8235e630 - 0x8235e639 -PHONOGRAM 0x8235e730 - 0x8235e739 -PHONOGRAM 0x8235e830 - 0x8235e839 -PHONOGRAM 0x8235e930 - 0x8235e939 -PHONOGRAM 0x8235ea30 - 0x8235ea39 -PHONOGRAM 0x8235eb30 - 0x8235eb39 -PHONOGRAM 0x8235ec30 - 0x8235ec39 -PHONOGRAM 0x8235ed30 - 0x8235ed39 -PHONOGRAM 0x8235ee30 - 0x8235ee39 -PHONOGRAM 0x8235ef30 - 0x8235ef39 -PHONOGRAM 0x8235f030 - 0x8235f039 -PHONOGRAM 0x8235f130 - 0x8235f139 -PHONOGRAM 0x8235f230 - 0x8235f239 -PHONOGRAM 0x8235f330 - 0x8235f339 -PHONOGRAM 0x8235f430 - 0x8235f439 -PHONOGRAM 0x8235f530 - 0x8235f539 -PHONOGRAM 0x8235f630 - 0x8235f639 -PHONOGRAM 0x8235f730 - 0x8235f739 -PHONOGRAM 0x8235f830 - 0x8235f839 -PHONOGRAM 0x8235f930 - 0x8235f939 -PHONOGRAM 0x8235fa30 - 0x8235fa39 -PHONOGRAM 0x8235fb30 - 0x8235fb39 -PHONOGRAM 0x8235fc30 - 0x8235fc39 -PHONOGRAM 0x8235fd30 - 0x8235fd39 -PHONOGRAM 0x8235fe30 - 0x8235fe39 -PHONOGRAM 0x82368130 - 0x82368139 -PHONOGRAM 0x82368230 - 0x82368239 -PHONOGRAM 0x82368330 - 0x82368339 -PHONOGRAM 0x82368430 - 0x82368439 -PHONOGRAM 0x82368530 - 0x82368539 -PHONOGRAM 0x82368630 - 0x82368639 -PHONOGRAM 0x82368730 - 0x82368739 -PHONOGRAM 0x82368830 - 0x82368839 -PHONOGRAM 0x82368930 - 0x82368939 -PHONOGRAM 0x82368a30 - 0x82368a39 -PHONOGRAM 0x82368b30 - 0x82368b39 -PHONOGRAM 0x82368c30 - 0x82368c39 -PHONOGRAM 0x82368d30 - 0x82368d39 -PHONOGRAM 0x82368e30 - 0x82368e37 -PHONOGRAM 0x8237cf35 - 0x8237cf39 -PHONOGRAM 0x8237d030 - 0x8237d039 -PHONOGRAM 0x8237d130 - 0x8237d139 -PHONOGRAM 0x8237d230 - 0x8237d239 -PHONOGRAM 0x8237d330 - 0x8237d339 -PHONOGRAM 0x8237d430 - 0x8237d439 -PHONOGRAM 0x8237d530 - 0x8237d539 -PHONOGRAM 0x8237d630 - 0x8237d639 -PHONOGRAM 0x8237d730 - 0x8237d739 -PHONOGRAM 0x8237d830 - 0x8237d839 -PHONOGRAM 0x8237d930 - 0x8237d939 -PHONOGRAM 0x8237da30 - 0x8237da39 -PHONOGRAM 0x8237db30 - 0x8237db39 -PHONOGRAM 0x8237dc30 - 0x8237dc39 -PHONOGRAM 0x8237dd30 - 0x8237dd39 -PHONOGRAM 0x8237de30 - 0x8237de39 -PHONOGRAM 0x8237df30 - 0x8237df39 -PHONOGRAM 0x8237e030 - 0x8237e039 -PHONOGRAM 0x8237e130 - 0x8237e139 -PHONOGRAM 0x8237e230 - 0x8237e239 -PHONOGRAM 0x8237e330 - 0x8237e339 -PHONOGRAM 0x8237e430 - 0x8237e439 -PHONOGRAM 0x8237e530 - 0x8237e539 -PHONOGRAM 0x8237e630 - 0x8237e639 -PHONOGRAM 0x8237e730 - 0x8237e739 -PHONOGRAM 0x8237e830 - 0x8237e839 -PHONOGRAM 0x8237e930 - 0x8237e939 -PHONOGRAM 0x8237ea30 - 0x8237ea39 -PHONOGRAM 0x8237eb30 - 0x8237eb39 -PHONOGRAM 0x8237ec30 - 0x8237ec39 -PHONOGRAM 0x8237ed30 - 0x8237ed39 -PHONOGRAM 0x8237ee30 - 0x8237ee39 -PHONOGRAM 0x8237ef30 - 0x8237ef39 -PHONOGRAM 0x8237f030 - 0x8237f039 -PHONOGRAM 0x8237f130 - 0x8237f139 -PHONOGRAM 0x8237f230 - 0x8237f239 -PHONOGRAM 0x8237f330 - 0x8237f339 -PHONOGRAM 0x8237f430 - 0x8237f439 -PHONOGRAM 0x8237f530 - 0x8237f539 -PHONOGRAM 0x8237f630 - 0x8237f639 -PHONOGRAM 0x8237f730 - 0x8237f739 -PHONOGRAM 0x8237f830 - 0x8237f839 -PHONOGRAM 0x8237f930 - 0x8237f939 -PHONOGRAM 0x8237fa30 - 0x8237fa39 -PHONOGRAM 0x8237fb30 - 0x8237fb39 -PHONOGRAM 0x8237fc30 - 0x8237fc39 -PHONOGRAM 0x8237fd30 - 0x8237fd39 -PHONOGRAM 0x8237fe30 - 0x8237fe39 -PHONOGRAM 0x82388130 - 0x82388139 -PHONOGRAM 0x82388230 - 0x82388239 -PHONOGRAM 0x82388330 - 0x82388339 -PHONOGRAM 0x82388430 - 0x82388439 -PHONOGRAM 0x82388530 - 0x82388539 -PHONOGRAM 0x82388630 - 0x82388639 -PHONOGRAM 0x82388730 - 0x82388739 -PHONOGRAM 0x82388830 - 0x82388839 -PHONOGRAM 0x82388930 - 0x82388939 -PHONOGRAM 0x82388a30 - 0x82388a39 -PHONOGRAM 0x82388b30 - 0x82388b39 -PHONOGRAM 0x82388c30 - 0x82388c39 -PHONOGRAM 0x82388d30 - 0x82388d39 -PHONOGRAM 0x82388e30 - 0x82388e39 -PHONOGRAM 0x82388f30 - 0x82388f39 -PHONOGRAM 0x82389030 - 0x82389039 -PHONOGRAM 0x82389130 - 0x82389139 -PHONOGRAM 0x82389230 - 0x82389239 -PHONOGRAM 0x82389330 - 0x82389339 -PHONOGRAM 0x82389430 - 0x82389439 -PHONOGRAM 0x82389530 - 0x82389539 -PHONOGRAM 0x82389630 - 0x82389639 -PHONOGRAM 0x82389730 - 0x82389739 -PHONOGRAM 0x82389830 - 0x82389839 -PHONOGRAM 0x82389930 - 0x82389939 -PHONOGRAM 0x82389a30 - 0x82389a39 -PHONOGRAM 0x82389b30 - 0x82389b39 -PHONOGRAM 0x82389c30 - 0x82389c39 -PHONOGRAM 0x82389d30 - 0x82389d39 -PHONOGRAM 0x82389e30 - 0x82389e39 -PHONOGRAM 0x82389f30 - 0x82389f39 -PHONOGRAM 0x8238a030 - 0x8238a039 -PHONOGRAM 0x8238a130 - 0x8238a139 -PHONOGRAM 0x8238a230 - 0x8238a239 -PHONOGRAM 0x8238a330 - 0x8238a339 -PHONOGRAM 0x8238a430 - 0x8238a439 -PHONOGRAM 0x8238a530 - 0x8238a539 -PHONOGRAM 0x8238a630 - 0x8238a639 -PHONOGRAM 0x8238a730 - 0x8238a739 -PHONOGRAM 0x8238a830 - 0x8238a839 -PHONOGRAM 0x8238a930 - 0x8238a939 -PHONOGRAM 0x8238aa30 - 0x8238aa39 -PHONOGRAM 0x8238ab30 - 0x8238ab39 -PHONOGRAM 0x8238ac30 - 0x8238ac39 -PHONOGRAM 0x8238ad30 - 0x8238ad39 -PHONOGRAM 0x8238ae30 - 0x8238ae39 -PHONOGRAM 0x8238af30 - 0x8238af39 -PHONOGRAM 0x8238b030 - 0x8238b039 -PHONOGRAM 0x8238b130 - 0x8238b139 -PHONOGRAM 0x8238b230 - 0x8238b239 -PHONOGRAM 0x8238b330 - 0x8238b339 -PHONOGRAM 0x8238b430 - 0x8238b439 -PHONOGRAM 0x8238b530 - 0x8238b539 -PHONOGRAM 0x8238b630 - 0x8238b639 -PHONOGRAM 0x8238b730 - 0x8238b739 -PHONOGRAM 0x8238b830 - 0x8238b839 -PHONOGRAM 0x8238b930 - 0x8238b939 -PHONOGRAM 0x8238ba30 - 0x8238ba39 -PHONOGRAM 0x8238bb30 - 0x8238bb39 -PHONOGRAM 0x8238bc30 - 0x8238bc39 -PHONOGRAM 0x8238bd30 - 0x8238bd39 -PHONOGRAM 0x8238be30 - 0x8238be39 -PHONOGRAM 0x8238bf30 - 0x8238bf39 -PHONOGRAM 0x8238c030 - 0x8238c039 -PHONOGRAM 0x8238c130 - 0x8238c139 -PHONOGRAM 0x8238c230 - 0x8238c239 -PHONOGRAM 0x8238c330 - 0x8238c339 -PHONOGRAM 0x8238c430 - 0x8238c439 -PHONOGRAM 0x8238c530 - 0x8238c539 -PHONOGRAM 0x8238c630 - 0x8238c639 -PHONOGRAM 0x8238c730 - 0x8238c739 -PHONOGRAM 0x8238c830 - 0x8238c839 -PHONOGRAM 0x8238c930 - 0x8238c939 -PHONOGRAM 0x8238ca30 - 0x8238ca39 -PHONOGRAM 0x8238cb30 - 0x8238cb39 -PHONOGRAM 0x8238cc30 - 0x8238cc39 -PHONOGRAM 0x8238cd30 - 0x8238cd39 -PHONOGRAM 0x8238ce30 - 0x8238ce39 -PHONOGRAM 0x8238cf30 - 0x8238cf39 -PHONOGRAM 0x8238d030 - 0x8238d039 -PHONOGRAM 0x8238d130 - 0x8238d139 -PHONOGRAM 0x8238d230 - 0x8238d239 -PHONOGRAM 0x8238d330 - 0x8238d339 -PHONOGRAM 0x8238d430 - 0x8238d439 -PHONOGRAM 0x8238d530 - 0x8238d539 -PHONOGRAM 0x8238d630 - 0x8238d639 -PHONOGRAM 0x8238d730 - 0x8238d739 -PHONOGRAM 0x8238d830 - 0x8238d839 -PHONOGRAM 0x8238d930 - 0x8238d939 -PHONOGRAM 0x8238da30 - 0x8238da39 -PHONOGRAM 0x8238db30 - 0x8238db39 -PHONOGRAM 0x8238dc30 - 0x8238dc39 -PHONOGRAM 0x8238dd30 - 0x8238dd39 -PHONOGRAM 0x8238de30 - 0x8238de39 -PHONOGRAM 0x8238df30 - 0x8238df39 -PHONOGRAM 0x8238e030 - 0x8238e039 -PHONOGRAM 0x8238e130 - 0x8238e139 -PHONOGRAM 0x8238e230 - 0x8238e239 -PHONOGRAM 0x8238e330 - 0x8238e339 -PHONOGRAM 0x8238e430 - 0x8238e439 -PHONOGRAM 0x8238e530 - 0x8238e539 -PHONOGRAM 0x8238e630 - 0x8238e639 -PHONOGRAM 0x8238e730 - 0x8238e739 -PHONOGRAM 0x8238e830 - 0x8238e839 -PHONOGRAM 0x8238e930 - 0x8238e939 -PHONOGRAM 0x8238ea30 - 0x8238ea39 -PHONOGRAM 0x8238eb30 - 0x8238eb39 -PHONOGRAM 0x8238ec30 - 0x8238ec39 -PHONOGRAM 0x8238ed30 - 0x8238ed39 -PHONOGRAM 0x8238ee30 - 0x8238ee39 -PHONOGRAM 0x8238ef30 - 0x8238ef39 -PHONOGRAM 0x8238f030 - 0x8238f039 -PHONOGRAM 0x8238f130 - 0x8238f139 -PHONOGRAM 0x8238f230 - 0x8238f239 -PHONOGRAM 0x8238f330 - 0x8238f339 -PHONOGRAM 0x8238f430 - 0x8238f439 -PHONOGRAM 0x8238f530 - 0x8238f539 -PHONOGRAM 0x8238f630 - 0x8238f639 -PHONOGRAM 0x8238f730 - 0x8238f739 -PHONOGRAM 0x8238f830 - 0x8238f839 -PHONOGRAM 0x8238f930 - 0x8238f939 -PHONOGRAM 0x8238fa30 - 0x8238fa39 -PHONOGRAM 0x8238fb30 - 0x8238fb39 -PHONOGRAM 0x8238fc30 - 0x8238fc39 -PHONOGRAM 0x8238fd30 - 0x8238fd39 -PHONOGRAM 0x8238fe30 - 0x8238fe39 -PHONOGRAM 0x82398130 - 0x82398139 -PHONOGRAM 0x82398230 - 0x82398239 -PHONOGRAM 0x82398330 - 0x82398339 -PHONOGRAM 0x82398430 - 0x82398439 -PHONOGRAM 0x82398530 - 0x82398539 -PHONOGRAM 0x82398630 - 0x82398639 -PHONOGRAM 0x82398730 - 0x82398739 -PHONOGRAM 0x82398830 - 0x82398839 -PHONOGRAM 0x82398930 - 0x82398939 -PHONOGRAM 0x82398a30 - 0x82398a39 -PHONOGRAM 0x82398b30 - 0x82398b39 -PHONOGRAM 0x82398c30 - 0x82398c39 -PHONOGRAM 0x82398d30 - 0x82398d39 -PHONOGRAM 0x82398e30 - 0x82398e39 -PHONOGRAM 0x82398f30 - 0x82398f39 -PHONOGRAM 0x82399030 - 0x82399039 -PHONOGRAM 0x82399130 - 0x82399139 -PHONOGRAM 0x82399230 - 0x82399239 -PHONOGRAM 0x82399330 - 0x82399339 -PHONOGRAM 0x82399430 - 0x82399439 -PHONOGRAM 0x82399530 - 0x82399539 -PHONOGRAM 0x82399630 - 0x82399639 -PHONOGRAM 0x82399730 - 0x82399739 -PHONOGRAM 0x82399830 - 0x82399839 -PHONOGRAM 0x82399930 - 0x82399939 -PHONOGRAM 0x82399a30 - 0x82399a39 -PHONOGRAM 0x82399b30 - 0x82399b39 -PHONOGRAM 0x82399c30 - 0x82399c39 -PHONOGRAM 0x82399d30 - 0x82399d39 -PHONOGRAM 0x82399e30 - 0x82399e39 -PHONOGRAM 0x82399f30 - 0x82399f39 -PHONOGRAM 0x8239a030 - 0x8239a039 -PHONOGRAM 0x8239a130 - 0x8239a139 -PHONOGRAM 0x8239a230 - 0x8239a239 -PHONOGRAM 0x8239a330 - 0x8239a339 -PHONOGRAM 0x8239a430 - 0x8239a439 -PHONOGRAM 0x8239a530 - 0x8239a539 -PHONOGRAM 0x8239a630 - 0x8239a639 -PHONOGRAM 0x8239a730 - 0x8239a739 -PHONOGRAM 0x8239a830 - 0x8239a839 -PHONOGRAM 0x8239a930 - 0x8239a939 -PHONOGRAM 0x8239aa30 - 0x8239aa39 -PHONOGRAM 0x8239ab30 - 0x8239ab39 -PHONOGRAM 0x8239ac30 - 0x8239ac39 -PHONOGRAM 0x8239ad30 - 0x8239ad39 -PHONOGRAM 0x8239ae30 - 0x8239ae39 -PHONOGRAM 0x8239af30 - 0x8239af39 -PHONOGRAM 0x8239b030 - 0x8239b039 -PHONOGRAM 0x8239b130 - 0x8239b139 -PHONOGRAM 0x8239b230 - 0x8239b239 -PHONOGRAM 0x8239b330 - 0x8239b339 -PHONOGRAM 0x8239b430 - 0x8239b439 -PHONOGRAM 0x8239b530 - 0x8239b539 -PHONOGRAM 0x8239b630 - 0x8239b639 -PHONOGRAM 0x8239b730 - 0x8239b739 -PHONOGRAM 0x8239b830 - 0x8239b839 -PHONOGRAM 0x8239b930 - 0x8239b939 -PHONOGRAM 0x8239ba30 - 0x8239ba39 -PHONOGRAM 0x8239bb30 - 0x8239bb39 -PHONOGRAM 0x8239bc30 - 0x8239bc39 -PHONOGRAM 0x8239bd30 - 0x8239bd39 -PHONOGRAM 0x8239be30 - 0x8239be39 -PHONOGRAM 0x8239bf30 - 0x8239bf39 -PHONOGRAM 0x8239c030 - 0x8239c039 -PHONOGRAM 0x8239c130 - 0x8239c139 -PHONOGRAM 0x8239c230 - 0x8239c239 -PHONOGRAM 0x8239c330 - 0x8239c339 -PHONOGRAM 0x8239c430 - 0x8239c439 -PHONOGRAM 0x8239c530 - 0x8239c539 -PHONOGRAM 0x8239c630 - 0x8239c639 -PHONOGRAM 0x8239c730 - 0x8239c739 -PHONOGRAM 0x8239c830 - 0x8239c839 -PHONOGRAM 0x8239c930 - 0x8239c939 -PHONOGRAM 0x8239ca30 - 0x8239ca39 -PHONOGRAM 0x8239cb30 - 0x8239cb39 -PHONOGRAM 0x8239cc30 - 0x8239cc39 -PHONOGRAM 0x8239cd30 - 0x8239cd39 -PHONOGRAM 0x8239ce30 - 0x8239ce39 -PHONOGRAM 0x8239cf30 - 0x8239cf39 -PHONOGRAM 0x8239d030 - 0x8239d039 -PHONOGRAM 0x8239d130 - 0x8239d139 -PHONOGRAM 0x8239d230 - 0x8239d239 -PHONOGRAM 0x8239d330 - 0x8239d339 -PHONOGRAM 0x8239d430 - 0x8239d439 -PHONOGRAM 0x8239d530 - 0x8239d539 -PHONOGRAM 0x8239d630 - 0x8239d639 -PHONOGRAM 0x8239d730 - 0x8239d739 -PHONOGRAM 0x8239d830 - 0x8239d839 -PHONOGRAM 0x8239d930 - 0x8239d939 -PHONOGRAM 0x8239da30 - 0x8239da39 -PHONOGRAM 0x8239db30 - 0x8239db39 -PHONOGRAM 0x8239dc30 - 0x8239dc39 -PHONOGRAM 0x8239dd30 - 0x8239dd39 -PHONOGRAM 0x8239de30 - 0x8239de39 -PHONOGRAM 0x8239df30 - 0x8239df39 -PHONOGRAM 0x8239e030 - 0x8239e039 -PHONOGRAM 0x8239e130 - 0x8239e139 -PHONOGRAM 0x8239e230 - 0x8239e239 -PHONOGRAM 0x8239e330 - 0x8239e339 -PHONOGRAM 0x8239e430 - 0x8239e439 -PHONOGRAM 0x8239e530 - 0x8239e539 -PHONOGRAM 0x8239e630 - 0x8239e639 -PHONOGRAM 0x8239e730 - 0x8239e739 -PHONOGRAM 0x8239e830 - 0x8239e839 -PHONOGRAM 0x8239e930 - 0x8239e939 -PHONOGRAM 0x8239ea30 - 0x8239ea39 -PHONOGRAM 0x8239eb30 - 0x8239eb39 -PHONOGRAM 0x8239ec30 - 0x8239ec39 -PHONOGRAM 0x8239ed30 - 0x8239ed39 -PHONOGRAM 0x8239ee30 - 0x8239ee39 -PHONOGRAM 0x8239ef30 - 0x8239ef39 -PHONOGRAM 0x8239f030 - 0x8239f039 -PHONOGRAM 0x8239f130 - 0x8239f139 -PHONOGRAM 0x8239f230 - 0x8239f239 -PHONOGRAM 0x8239f330 - 0x8239f339 -PHONOGRAM 0x8239f430 - 0x8239f439 -PHONOGRAM 0x8239f530 - 0x8239f539 -PHONOGRAM 0x8239f630 - 0x8239f639 -PHONOGRAM 0x8239f730 - 0x8239f739 -PHONOGRAM 0x8239f830 - 0x8239f839 -PHONOGRAM 0x8239f930 - 0x8239f939 -PHONOGRAM 0x8239fa30 - 0x8239fa39 -PHONOGRAM 0x8239fb30 - 0x8239fb39 -PHONOGRAM 0x8239fc30 - 0x8239fc39 -PHONOGRAM 0x8239fd30 - 0x8239fd39 -PHONOGRAM 0x8239fe30 - 0x8239fe39 -PHONOGRAM 0x83308130 - 0x83308139 -PHONOGRAM 0x83308230 - 0x83308239 -PHONOGRAM 0x83308330 - 0x83308339 -PHONOGRAM 0x83308430 - 0x83308439 -PHONOGRAM 0x83308530 - 0x83308539 -PHONOGRAM 0x83308630 - 0x83308639 -PHONOGRAM 0x83308730 - 0x83308739 -PHONOGRAM 0x83308830 - 0x83308839 -PHONOGRAM 0x83308930 - 0x83308939 -PHONOGRAM 0x83308a30 - 0x83308a39 -PHONOGRAM 0x83308b30 - 0x83308b39 -PHONOGRAM 0x83308c30 - 0x83308c39 -PHONOGRAM 0x83308d30 - 0x83308d39 -PHONOGRAM 0x83308e30 - 0x83308e39 -PHONOGRAM 0x83308f30 - 0x83308f39 -PHONOGRAM 0x83309030 - 0x83309039 -PHONOGRAM 0x83309130 - 0x83309139 -PHONOGRAM 0x83309230 - 0x83309239 -PHONOGRAM 0x83309330 - 0x83309339 -PHONOGRAM 0x83309430 - 0x83309439 -PHONOGRAM 0x83309530 - 0x83309539 -PHONOGRAM 0x83309630 - 0x83309639 -PHONOGRAM 0x83309730 - 0x83309739 -PHONOGRAM 0x83309830 - 0x83309839 -PHONOGRAM 0x83309930 - 0x83309939 -PHONOGRAM 0x83309a30 - 0x83309a39 -PHONOGRAM 0x83309b30 - 0x83309b39 -PHONOGRAM 0x83309c30 - 0x83309c39 -PHONOGRAM 0x83309d30 - 0x83309d39 -PHONOGRAM 0x83309e30 - 0x83309e39 -PHONOGRAM 0x83309f30 - 0x83309f39 -PHONOGRAM 0x8330a030 - 0x8330a039 -PHONOGRAM 0x8330a130 - 0x8330a139 -PHONOGRAM 0x8330a230 - 0x8330a239 -PHONOGRAM 0x8330a330 - 0x8330a339 -PHONOGRAM 0x8330a430 - 0x8330a439 -PHONOGRAM 0x8330a530 - 0x8330a539 -PHONOGRAM 0x8330a630 - 0x8330a639 -PHONOGRAM 0x8330a730 - 0x8330a739 -PHONOGRAM 0x8330a830 - 0x8330a839 -PHONOGRAM 0x8330a930 - 0x8330a939 -PHONOGRAM 0x8330aa30 - 0x8330aa39 -PHONOGRAM 0x8330ab30 - 0x8330ab39 -PHONOGRAM 0x8330ac30 - 0x8330ac39 -PHONOGRAM 0x8330ad30 - 0x8330ad39 -PHONOGRAM 0x8330ae30 - 0x8330ae39 -PHONOGRAM 0x8330af30 - 0x8330af39 -PHONOGRAM 0x8330b030 - 0x8330b039 -PHONOGRAM 0x8330b130 - 0x8330b139 -PHONOGRAM 0x8330b230 - 0x8330b239 -PHONOGRAM 0x8330b330 - 0x8330b339 -PHONOGRAM 0x8330b430 - 0x8330b439 -PHONOGRAM 0x8330b530 - 0x8330b539 -PHONOGRAM 0x8330b630 - 0x8330b639 -PHONOGRAM 0x8330b730 - 0x8330b739 -PHONOGRAM 0x8330b830 - 0x8330b839 -PHONOGRAM 0x8330b930 - 0x8330b939 -PHONOGRAM 0x8330ba30 - 0x8330ba39 -PHONOGRAM 0x8330bb30 - 0x8330bb39 -PHONOGRAM 0x8330bc30 - 0x8330bc39 -PHONOGRAM 0x8330bd30 - 0x8330bd39 -PHONOGRAM 0x8330be30 - 0x8330be39 -PHONOGRAM 0x8330bf30 - 0x8330bf39 -PHONOGRAM 0x8330c030 - 0x8330c039 -PHONOGRAM 0x8330c130 - 0x8330c139 -PHONOGRAM 0x8330c230 - 0x8330c239 -PHONOGRAM 0x8330c330 - 0x8330c339 -PHONOGRAM 0x8330c430 - 0x8330c439 -PHONOGRAM 0x8330c530 - 0x8330c539 -PHONOGRAM 0x8330c630 - 0x8330c639 -PHONOGRAM 0x8330c730 - 0x8330c739 -PHONOGRAM 0x8330c830 - 0x8330c839 -PHONOGRAM 0x8330c930 - 0x8330c939 -PHONOGRAM 0x8330ca30 - 0x8330ca39 -PHONOGRAM 0x8330cb30 - 0x8330cb39 -PHONOGRAM 0x8330cc30 - 0x8330cc39 -PHONOGRAM 0x8330cd30 - 0x8330cd39 -PHONOGRAM 0x8330ce30 - 0x8330ce39 -PHONOGRAM 0x8330cf30 - 0x8330cf39 -PHONOGRAM 0x8330d030 - 0x8330d039 -PHONOGRAM 0x8330d130 - 0x8330d139 -PHONOGRAM 0x8330d230 - 0x8330d239 -PHONOGRAM 0x8330d330 - 0x8330d339 -PHONOGRAM 0x8330d430 - 0x8330d439 -PHONOGRAM 0x8330d530 - 0x8330d539 -PHONOGRAM 0x8330d630 - 0x8330d639 -PHONOGRAM 0x8330d730 - 0x8330d739 -PHONOGRAM 0x8330d830 - 0x8330d839 -PHONOGRAM 0x8330d930 - 0x8330d939 -PHONOGRAM 0x8330da30 - 0x8330da39 -PHONOGRAM 0x8330db30 - 0x8330db39 -PHONOGRAM 0x8330dc30 - 0x8330dc39 -PHONOGRAM 0x8330dd30 - 0x8330dd39 -PHONOGRAM 0x8330de30 - 0x8330de39 -PHONOGRAM 0x8330df30 - 0x8330df39 -PHONOGRAM 0x8330e030 - 0x8330e039 -PHONOGRAM 0x8330e130 - 0x8330e139 -PHONOGRAM 0x8330e230 - 0x8330e239 -PHONOGRAM 0x8330e330 - 0x8330e339 -PHONOGRAM 0x8330e430 - 0x8330e439 -PHONOGRAM 0x8330e530 - 0x8330e539 -PHONOGRAM 0x8330e630 - 0x8330e639 -PHONOGRAM 0x8330e730 - 0x8330e739 -PHONOGRAM 0x8330e830 - 0x8330e839 -PHONOGRAM 0x8330e930 - 0x8330e939 -PHONOGRAM 0x8330ea30 - 0x8330ea39 -PHONOGRAM 0x8330eb30 - 0x8330eb39 -PHONOGRAM 0x8330ec30 - 0x8330ec39 -PHONOGRAM 0x8330ed30 - 0x8330ed39 -PHONOGRAM 0x8330ee30 - 0x8330ee39 -PHONOGRAM 0x8330ef30 - 0x8330ef39 -PHONOGRAM 0x8330f030 - 0x8330f039 -PHONOGRAM 0x8330f130 - 0x8330f139 -PHONOGRAM 0x8330f230 - 0x8330f239 -PHONOGRAM 0x8330f330 - 0x8330f339 -PHONOGRAM 0x8330f430 - 0x8330f439 -PHONOGRAM 0x8330f530 - 0x8330f539 -PHONOGRAM 0x8330f630 - 0x8330f639 -PHONOGRAM 0x8330f730 - 0x8330f739 -PHONOGRAM 0x8330f830 - 0x8330f839 -PHONOGRAM 0x8330f930 - 0x8330f939 -PHONOGRAM 0x8330fa30 - 0x8330fa39 -PHONOGRAM 0x8330fb30 - 0x8330fb39 -PHONOGRAM 0x8330fc30 - 0x8330fc39 -PHONOGRAM 0x8330fd30 - 0x8330fd39 -PHONOGRAM 0x8330fe30 - 0x8330fe39 -PHONOGRAM 0x83318130 - 0x83318139 -PHONOGRAM 0x83318230 - 0x83318239 -PHONOGRAM 0x83318330 - 0x83318339 -PHONOGRAM 0x83318430 - 0x83318439 -PHONOGRAM 0x83318530 - 0x83318539 -PHONOGRAM 0x83318630 - 0x83318639 -PHONOGRAM 0x83318730 - 0x83318739 -PHONOGRAM 0x83318830 - 0x83318839 -PHONOGRAM 0x83318930 - 0x83318939 -PHONOGRAM 0x83318a30 - 0x83318a39 -PHONOGRAM 0x83318b30 - 0x83318b39 -PHONOGRAM 0x83318c30 - 0x83318c39 -PHONOGRAM 0x83318d30 - 0x83318d39 -PHONOGRAM 0x83318e30 - 0x83318e39 -PHONOGRAM 0x83318f30 - 0x83318f39 -PHONOGRAM 0x83319030 - 0x83319039 -PHONOGRAM 0x83319130 - 0x83319139 -PHONOGRAM 0x83319230 - 0x83319239 -PHONOGRAM 0x83319330 - 0x83319339 -PHONOGRAM 0x83319430 - 0x83319439 -PHONOGRAM 0x83319530 - 0x83319539 -PHONOGRAM 0x83319630 - 0x83319639 -PHONOGRAM 0x83319730 - 0x83319739 -PHONOGRAM 0x83319830 - 0x83319839 -PHONOGRAM 0x83319930 - 0x83319939 -PHONOGRAM 0x83319a30 - 0x83319a39 -PHONOGRAM 0x83319b30 - 0x83319b39 -PHONOGRAM 0x83319c30 - 0x83319c39 -PHONOGRAM 0x83319d30 - 0x83319d39 -PHONOGRAM 0x83319e30 - 0x83319e39 -PHONOGRAM 0x83319f30 - 0x83319f39 -PHONOGRAM 0x8331a030 - 0x8331a039 -PHONOGRAM 0x8331a130 - 0x8331a139 -PHONOGRAM 0x8331a230 - 0x8331a239 -PHONOGRAM 0x8331a330 - 0x8331a339 -PHONOGRAM 0x8331a430 - 0x8331a439 -PHONOGRAM 0x8331a530 - 0x8331a539 -PHONOGRAM 0x8331a630 - 0x8331a639 -PHONOGRAM 0x8331a730 - 0x8331a739 -PHONOGRAM 0x8331a830 - 0x8331a839 -PHONOGRAM 0x8331a930 - 0x8331a939 -PHONOGRAM 0x8331aa30 - 0x8331aa39 -PHONOGRAM 0x8331ab30 - 0x8331ab39 -PHONOGRAM 0x8331ac30 - 0x8331ac39 -PHONOGRAM 0x8331ad30 - 0x8331ad39 -PHONOGRAM 0x8331ae30 - 0x8331ae39 -PHONOGRAM 0x8331af30 - 0x8331af39 -PHONOGRAM 0x8331b030 - 0x8331b039 -PHONOGRAM 0x8331b130 - 0x8331b139 -PHONOGRAM 0x8331b230 - 0x8331b239 -PHONOGRAM 0x8331b330 - 0x8331b339 -PHONOGRAM 0x8331b430 - 0x8331b439 -PHONOGRAM 0x8331b530 - 0x8331b539 -PHONOGRAM 0x8331b630 - 0x8331b639 -PHONOGRAM 0x8331b730 - 0x8331b739 -PHONOGRAM 0x8331b830 - 0x8331b839 -PHONOGRAM 0x8331b930 - 0x8331b939 -PHONOGRAM 0x8331ba30 - 0x8331ba39 -PHONOGRAM 0x8331bb30 - 0x8331bb39 -PHONOGRAM 0x8331bc30 - 0x8331bc39 -PHONOGRAM 0x8331bd30 - 0x8331bd39 -PHONOGRAM 0x8331be30 - 0x8331be39 -PHONOGRAM 0x8331bf30 - 0x8331bf39 -PHONOGRAM 0x8331c030 - 0x8331c039 -PHONOGRAM 0x8331c130 - 0x8331c139 -PHONOGRAM 0x8331c230 - 0x8331c239 -PHONOGRAM 0x8331c330 - 0x8331c339 -PHONOGRAM 0x8331c430 - 0x8331c439 -PHONOGRAM 0x8331c530 - 0x8331c539 -PHONOGRAM 0x8331c630 - 0x8331c639 -PHONOGRAM 0x8331c730 - 0x8331c739 -PHONOGRAM 0x8331c830 - 0x8331c839 -PHONOGRAM 0x8331c930 - 0x8331c939 -PHONOGRAM 0x8331ca30 - 0x8331ca39 -PHONOGRAM 0x8331cb30 - 0x8331cb39 -PHONOGRAM 0x8331cc30 - 0x8331cc39 -PHONOGRAM 0x8331cd30 - 0x8331cd39 -PHONOGRAM 0x8331ce30 - 0x8331ce39 -PHONOGRAM 0x8331cf30 - 0x8331cf39 -PHONOGRAM 0x8331d030 - 0x8331d039 -PHONOGRAM 0x8331d130 - 0x8331d139 -PHONOGRAM 0x8331d230 - 0x8331d239 -PHONOGRAM 0x8331d330 - 0x8331d339 -PHONOGRAM 0x8331d430 - 0x8331d439 -PHONOGRAM 0x8331d530 - 0x8331d539 -PHONOGRAM 0x8331d630 - 0x8331d639 -PHONOGRAM 0x8331d730 - 0x8331d739 -PHONOGRAM 0x8331d830 - 0x8331d839 -PHONOGRAM 0x8331d930 - 0x8331d939 -PHONOGRAM 0x8331da30 - 0x8331da39 -PHONOGRAM 0x8331db30 - 0x8331db39 -PHONOGRAM 0x8331dc30 - 0x8331dc39 -PHONOGRAM 0x8331dd30 - 0x8331dd39 -PHONOGRAM 0x8331de30 - 0x8331de39 -PHONOGRAM 0x8331df30 - 0x8331df39 -PHONOGRAM 0x8331e030 - 0x8331e039 -PHONOGRAM 0x8331e130 - 0x8331e139 -PHONOGRAM 0x8331e230 - 0x8331e239 -PHONOGRAM 0x8331e330 - 0x8331e339 -PHONOGRAM 0x8331e430 - 0x8331e439 -PHONOGRAM 0x8331e530 - 0x8331e539 -PHONOGRAM 0x8331e630 - 0x8331e639 -PHONOGRAM 0x8331e730 - 0x8331e739 -PHONOGRAM 0x8331e830 - 0x8331e839 -PHONOGRAM 0x8331e930 - 0x8331e939 -PHONOGRAM 0x8331ea30 - 0x8331ea39 -PHONOGRAM 0x8331eb30 - 0x8331eb39 -PHONOGRAM 0x8331ec30 - 0x8331ec39 -PHONOGRAM 0x8331ed30 - 0x8331ed39 -PHONOGRAM 0x8331ee30 - 0x8331ee39 -PHONOGRAM 0x8331ef30 - 0x8331ef39 -PHONOGRAM 0x8331f030 - 0x8331f039 -PHONOGRAM 0x8331f130 - 0x8331f139 -PHONOGRAM 0x8331f230 - 0x8331f239 -PHONOGRAM 0x8331f330 - 0x8331f339 -PHONOGRAM 0x8331f430 - 0x8331f439 -PHONOGRAM 0x8331f530 - 0x8331f539 -PHONOGRAM 0x8331f630 - 0x8331f639 -PHONOGRAM 0x8331f730 - 0x8331f739 -PHONOGRAM 0x8331f830 - 0x8331f839 -PHONOGRAM 0x8331f930 - 0x8331f939 -PHONOGRAM 0x8331fa30 - 0x8331fa39 -PHONOGRAM 0x8331fb30 - 0x8331fb39 -PHONOGRAM 0x8331fc30 - 0x8331fc39 -PHONOGRAM 0x8331fd30 - 0x8331fd39 -PHONOGRAM 0x8331fe30 - 0x8331fe39 -PHONOGRAM 0x83328130 - 0x83328139 -PHONOGRAM 0x83328230 - 0x83328239 -PHONOGRAM 0x83328330 - 0x83328339 -PHONOGRAM 0x83328430 - 0x83328439 -PHONOGRAM 0x83328530 - 0x83328539 -PHONOGRAM 0x83328630 - 0x83328639 -PHONOGRAM 0x83328730 - 0x83328739 -PHONOGRAM 0x83328830 - 0x83328839 -PHONOGRAM 0x83328930 - 0x83328939 -PHONOGRAM 0x83328a30 - 0x83328a39 -PHONOGRAM 0x83328b30 - 0x83328b39 -PHONOGRAM 0x83328c30 - 0x83328c39 -PHONOGRAM 0x83328d30 - 0x83328d39 -PHONOGRAM 0x83328e30 - 0x83328e39 -PHONOGRAM 0x83328f30 - 0x83328f39 -PHONOGRAM 0x83329030 - 0x83329039 -PHONOGRAM 0x83329130 - 0x83329139 -PHONOGRAM 0x83329230 - 0x83329239 -PHONOGRAM 0x83329330 - 0x83329339 -PHONOGRAM 0x83329430 - 0x83329439 -PHONOGRAM 0x83329530 - 0x83329539 -PHONOGRAM 0x83329630 - 0x83329639 -PHONOGRAM 0x83329730 - 0x83329739 -PHONOGRAM 0x83329830 - 0x83329839 -PHONOGRAM 0x83329930 - 0x83329939 -PHONOGRAM 0x83329a30 - 0x83329a39 -PHONOGRAM 0x83329b30 - 0x83329b39 -PHONOGRAM 0x83329c30 - 0x83329c39 -PHONOGRAM 0x83329d30 - 0x83329d39 -PHONOGRAM 0x83329e30 - 0x83329e39 -PHONOGRAM 0x83329f30 - 0x83329f39 -PHONOGRAM 0x8332a030 - 0x8332a039 -PHONOGRAM 0x8332a130 - 0x8332a139 -PHONOGRAM 0x8332a230 - 0x8332a239 -PHONOGRAM 0x8332a330 - 0x8332a339 -PHONOGRAM 0x8332a430 - 0x8332a439 -PHONOGRAM 0x8332a530 - 0x8332a539 -PHONOGRAM 0x8332a630 - 0x8332a639 -PHONOGRAM 0x8332a730 - 0x8332a739 -PHONOGRAM 0x8332a830 - 0x8332a839 -PHONOGRAM 0x8332a930 - 0x8332a939 -PHONOGRAM 0x8332aa30 - 0x8332aa39 -PHONOGRAM 0x8332ab30 - 0x8332ab39 -PHONOGRAM 0x8332ac30 - 0x8332ac39 -PHONOGRAM 0x8332ad30 - 0x8332ad39 -PHONOGRAM 0x8332ae30 - 0x8332ae39 -PHONOGRAM 0x8332af30 - 0x8332af39 -PHONOGRAM 0x8332b030 - 0x8332b039 -PHONOGRAM 0x8332b130 - 0x8332b139 -PHONOGRAM 0x8332b230 - 0x8332b239 -PHONOGRAM 0x8332b330 - 0x8332b339 -PHONOGRAM 0x8332b430 - 0x8332b439 -PHONOGRAM 0x8332b530 - 0x8332b539 -PHONOGRAM 0x8332b630 - 0x8332b639 -PHONOGRAM 0x8332b730 - 0x8332b739 -PHONOGRAM 0x8332b830 - 0x8332b839 -PHONOGRAM 0x8332b930 - 0x8332b939 -PHONOGRAM 0x8332ba30 - 0x8332ba39 -PHONOGRAM 0x8332bb30 - 0x8332bb39 -PHONOGRAM 0x8332bc30 - 0x8332bc39 -PHONOGRAM 0x8332bd30 - 0x8332bd39 -PHONOGRAM 0x8332be30 - 0x8332be39 -PHONOGRAM 0x8332bf30 - 0x8332bf39 -PHONOGRAM 0x8332c030 - 0x8332c039 -PHONOGRAM 0x8332c130 - 0x8332c139 -PHONOGRAM 0x8332c230 - 0x8332c239 -PHONOGRAM 0x8332c330 - 0x8332c339 -PHONOGRAM 0x8332c430 - 0x8332c439 -PHONOGRAM 0x8332c530 - 0x8332c539 -PHONOGRAM 0x8332c630 - 0x8332c639 -PHONOGRAM 0x8332c730 - 0x8332c739 -PHONOGRAM 0x8332c830 - 0x8332c839 -PHONOGRAM 0x8332c930 - 0x8332c939 -PHONOGRAM 0x8332ca30 - 0x8332ca39 -PHONOGRAM 0x8332cb30 - 0x8332cb39 -PHONOGRAM 0x8332cc30 - 0x8332cc39 -PHONOGRAM 0x8332cd30 - 0x8332cd39 -PHONOGRAM 0x8332ce30 - 0x8332ce39 -PHONOGRAM 0x8332cf30 - 0x8332cf39 -PHONOGRAM 0x8332d030 - 0x8332d039 -PHONOGRAM 0x8332d130 - 0x8332d139 -PHONOGRAM 0x8332d230 - 0x8332d239 -PHONOGRAM 0x8332d330 - 0x8332d339 -PHONOGRAM 0x8332d430 - 0x8332d439 -PHONOGRAM 0x8332d530 - 0x8332d539 -PHONOGRAM 0x8332d630 - 0x8332d639 -PHONOGRAM 0x8332d730 - 0x8332d739 -PHONOGRAM 0x8332d830 - 0x8332d839 -PHONOGRAM 0x8332d930 - 0x8332d939 -PHONOGRAM 0x8332da30 - 0x8332da39 -PHONOGRAM 0x8332db30 - 0x8332db39 -PHONOGRAM 0x8332dc30 - 0x8332dc39 -PHONOGRAM 0x8332dd30 - 0x8332dd39 -PHONOGRAM 0x8332de30 - 0x8332de39 -PHONOGRAM 0x8332df30 - 0x8332df39 -PHONOGRAM 0x8332e030 - 0x8332e039 -PHONOGRAM 0x8332e130 - 0x8332e139 -PHONOGRAM 0x8332e230 - 0x8332e239 -PHONOGRAM 0x8332e330 - 0x8332e339 -PHONOGRAM 0x8332e430 - 0x8332e439 -PHONOGRAM 0x8332e530 - 0x8332e539 -PHONOGRAM 0x8332e630 - 0x8332e639 -PHONOGRAM 0x8332e730 - 0x8332e739 -PHONOGRAM 0x8332e830 - 0x8332e839 -PHONOGRAM 0x8332e930 - 0x8332e939 -PHONOGRAM 0x8332ea30 - 0x8332ea39 -PHONOGRAM 0x8332eb30 - 0x8332eb39 -PHONOGRAM 0x8332ec30 - 0x8332ec39 -PHONOGRAM 0x8332ed30 - 0x8332ed39 -PHONOGRAM 0x8332ee30 - 0x8332ee39 -PHONOGRAM 0x8332ef30 - 0x8332ef39 -PHONOGRAM 0x8332f030 - 0x8332f039 -PHONOGRAM 0x8332f130 - 0x8332f139 -PHONOGRAM 0x8332f230 - 0x8332f239 -PHONOGRAM 0x8332f330 - 0x8332f339 -PHONOGRAM 0x8332f430 - 0x8332f439 -PHONOGRAM 0x8332f530 - 0x8332f539 -PHONOGRAM 0x8332f630 - 0x8332f639 -PHONOGRAM 0x8332f730 - 0x8332f739 -PHONOGRAM 0x8332f830 - 0x8332f839 -PHONOGRAM 0x8332f930 - 0x8332f939 -PHONOGRAM 0x8332fa30 - 0x8332fa39 -PHONOGRAM 0x8332fb30 - 0x8332fb39 -PHONOGRAM 0x8332fc30 - 0x8332fc39 -PHONOGRAM 0x8332fd30 - 0x8332fd39 -PHONOGRAM 0x8332fe30 - 0x8332fe39 -PHONOGRAM 0x83338130 - 0x83338139 -PHONOGRAM 0x83338230 - 0x83338239 -PHONOGRAM 0x83338330 - 0x83338339 -PHONOGRAM 0x83338430 - 0x83338439 -PHONOGRAM 0x83338530 - 0x83338539 -PHONOGRAM 0x83338630 - 0x83338639 -PHONOGRAM 0x83338730 - 0x83338739 -PHONOGRAM 0x83338830 - 0x83338839 -PHONOGRAM 0x83338930 - 0x83338939 -PHONOGRAM 0x83338a30 - 0x83338a39 -PHONOGRAM 0x83338b30 - 0x83338b39 -PHONOGRAM 0x83338c30 - 0x83338c39 -PHONOGRAM 0x83338d30 - 0x83338d39 -PHONOGRAM 0x83338e30 - 0x83338e39 -PHONOGRAM 0x83338f30 - 0x83338f39 -PHONOGRAM 0x83339030 - 0x83339039 -PHONOGRAM 0x83339130 - 0x83339139 -PHONOGRAM 0x83339230 - 0x83339239 -PHONOGRAM 0x83339330 - 0x83339339 -PHONOGRAM 0x83339430 - 0x83339439 -PHONOGRAM 0x83339530 - 0x83339539 -PHONOGRAM 0x83339630 - 0x83339639 -PHONOGRAM 0x83339730 - 0x83339739 -PHONOGRAM 0x83339830 - 0x83339839 -PHONOGRAM 0x83339930 - 0x83339939 -PHONOGRAM 0x83339a30 - 0x83339a39 -PHONOGRAM 0x83339b30 - 0x83339b39 -PHONOGRAM 0x83339c30 - 0x83339c39 -PHONOGRAM 0x83339d30 - 0x83339d39 -PHONOGRAM 0x83339e30 - 0x83339e39 -PHONOGRAM 0x83339f30 - 0x83339f39 -PHONOGRAM 0x8333a030 - 0x8333a039 -PHONOGRAM 0x8333a130 - 0x8333a139 -PHONOGRAM 0x8333a230 - 0x8333a239 -PHONOGRAM 0x8333a330 - 0x8333a339 -PHONOGRAM 0x8333a430 - 0x8333a439 -PHONOGRAM 0x8333a530 - 0x8333a539 -PHONOGRAM 0x8333a630 - 0x8333a639 -PHONOGRAM 0x8333a730 - 0x8333a739 -PHONOGRAM 0x8333a830 - 0x8333a839 -PHONOGRAM 0x8333a930 - 0x8333a939 -PHONOGRAM 0x8333aa30 - 0x8333aa39 -PHONOGRAM 0x8333ab30 - 0x8333ab39 -PHONOGRAM 0x8333ac30 - 0x8333ac39 -PHONOGRAM 0x8333ad30 - 0x8333ad39 -PHONOGRAM 0x8333ae30 - 0x8333ae39 -PHONOGRAM 0x8333af30 - 0x8333af39 -PHONOGRAM 0x8333b030 - 0x8333b039 -PHONOGRAM 0x8333b130 - 0x8333b139 -PHONOGRAM 0x8333b230 - 0x8333b239 -PHONOGRAM 0x8333b330 - 0x8333b339 -PHONOGRAM 0x8333b430 - 0x8333b439 -PHONOGRAM 0x8333b530 - 0x8333b539 -PHONOGRAM 0x8333b630 - 0x8333b639 -PHONOGRAM 0x8333b730 - 0x8333b739 -PHONOGRAM 0x8333b830 - 0x8333b839 -PHONOGRAM 0x8333b930 - 0x8333b939 -PHONOGRAM 0x8333ba30 - 0x8333ba39 -PHONOGRAM 0x8333bb30 - 0x8333bb39 -PHONOGRAM 0x8333bc30 - 0x8333bc39 -PHONOGRAM 0x8333bd30 - 0x8333bd39 -PHONOGRAM 0x8333be30 - 0x8333be39 -PHONOGRAM 0x8333bf30 - 0x8333bf39 -PHONOGRAM 0x8333c030 - 0x8333c039 -PHONOGRAM 0x8333c130 - 0x8333c139 -PHONOGRAM 0x8333c230 - 0x8333c239 -PHONOGRAM 0x8333c330 - 0x8333c339 -PHONOGRAM 0x8333c430 - 0x8333c439 -PHONOGRAM 0x8333c530 - 0x8333c539 -PHONOGRAM 0x8333c630 - 0x8333c639 -PHONOGRAM 0x8333c730 - 0x8333c739 -PHONOGRAM 0x8333c830 - 0x8333c839 -PHONOGRAM 0x8333c930 - 0x8333c939 -PHONOGRAM 0x8333ca30 - 0x8333ca39 -PHONOGRAM 0x8333cb30 - 0x8333cb39 -PHONOGRAM 0x8333cc30 - 0x8333cc39 -PHONOGRAM 0x8333cd30 - 0x8333cd39 -PHONOGRAM 0x8333ce30 - 0x8333ce39 -PHONOGRAM 0x8333cf30 - 0x8333cf39 -PHONOGRAM 0x8333d030 - 0x8333d039 -PHONOGRAM 0x8333d130 - 0x8333d139 -PHONOGRAM 0x8333d230 - 0x8333d239 -PHONOGRAM 0x8333d330 - 0x8333d339 -PHONOGRAM 0x8333d430 - 0x8333d439 -PHONOGRAM 0x8333d530 - 0x8333d539 -PHONOGRAM 0x8333d630 - 0x8333d639 -PHONOGRAM 0x8333d730 - 0x8333d739 -PHONOGRAM 0x8333d830 - 0x8333d839 -PHONOGRAM 0x8333d930 - 0x8333d939 -PHONOGRAM 0x8333da30 - 0x8333da39 -PHONOGRAM 0x8333db30 - 0x8333db39 -PHONOGRAM 0x8333dc30 - 0x8333dc39 -PHONOGRAM 0x8333dd30 - 0x8333dd39 -PHONOGRAM 0x8333de30 - 0x8333de39 -PHONOGRAM 0x8333df30 - 0x8333df39 -PHONOGRAM 0x8333e030 - 0x8333e039 -PHONOGRAM 0x8333e130 - 0x8333e139 -PHONOGRAM 0x8333e230 - 0x8333e239 -PHONOGRAM 0x8333e330 - 0x8333e339 -PHONOGRAM 0x8333e430 - 0x8333e439 -PHONOGRAM 0x8333e530 - 0x8333e539 -PHONOGRAM 0x8333e630 - 0x8333e639 -PHONOGRAM 0x8333e730 - 0x8333e739 -PHONOGRAM 0x8333e830 - 0x8333e839 -PHONOGRAM 0x8333e930 - 0x8333e939 -PHONOGRAM 0x8333ea30 - 0x8333ea39 -PHONOGRAM 0x8333eb30 - 0x8333eb39 -PHONOGRAM 0x8333ec30 - 0x8333ec39 -PHONOGRAM 0x8333ed30 - 0x8333ed39 -PHONOGRAM 0x8333ee30 - 0x8333ee39 -PHONOGRAM 0x8333ef30 - 0x8333ef39 -PHONOGRAM 0x8333f030 - 0x8333f039 -PHONOGRAM 0x8333f130 - 0x8333f139 -PHONOGRAM 0x8333f230 - 0x8333f239 -PHONOGRAM 0x8333f330 - 0x8333f339 -PHONOGRAM 0x8333f430 - 0x8333f439 -PHONOGRAM 0x8333f530 - 0x8333f539 -PHONOGRAM 0x8333f630 - 0x8333f639 -PHONOGRAM 0x8333f730 - 0x8333f739 -PHONOGRAM 0x8333f830 - 0x8333f839 -PHONOGRAM 0x8333f930 - 0x8333f939 -PHONOGRAM 0x8333fa30 - 0x8333fa39 -PHONOGRAM 0x8333fb30 - 0x8333fb39 -PHONOGRAM 0x8333fc30 - 0x8333fc39 -PHONOGRAM 0x8333fd30 - 0x8333fd39 -PHONOGRAM 0x8333fe30 - 0x8333fe39 -PHONOGRAM 0x83348130 - 0x83348139 -PHONOGRAM 0x83348230 - 0x83348239 -PHONOGRAM 0x83348330 - 0x83348339 -PHONOGRAM 0x83348430 - 0x83348439 -PHONOGRAM 0x83348530 - 0x83348539 -PHONOGRAM 0x83348630 - 0x83348639 -PHONOGRAM 0x83348730 - 0x83348739 -PHONOGRAM 0x83348830 - 0x83348839 -PHONOGRAM 0x83348930 - 0x83348939 -PHONOGRAM 0x83348a30 - 0x83348a39 -PHONOGRAM 0x83348b30 - 0x83348b39 -PHONOGRAM 0x83348c30 - 0x83348c39 -PHONOGRAM 0x83348d30 - 0x83348d39 -PHONOGRAM 0x83348e30 - 0x83348e39 -PHONOGRAM 0x83348f30 - 0x83348f39 -PHONOGRAM 0x83349030 - 0x83349039 -PHONOGRAM 0x83349130 - 0x83349139 -PHONOGRAM 0x83349230 - 0x83349239 -PHONOGRAM 0x83349330 - 0x83349339 -PHONOGRAM 0x83349430 - 0x83349439 -PHONOGRAM 0x83349530 - 0x83349539 -PHONOGRAM 0x83349630 - 0x83349639 -PHONOGRAM 0x83349730 - 0x83349739 -PHONOGRAM 0x83349830 - 0x83349839 -PHONOGRAM 0x83349930 - 0x83349939 -PHONOGRAM 0x83349a30 - 0x83349a39 -PHONOGRAM 0x83349b30 - 0x83349b39 -PHONOGRAM 0x83349c30 - 0x83349c39 -PHONOGRAM 0x83349d30 - 0x83349d39 -PHONOGRAM 0x83349e30 - 0x83349e39 -PHONOGRAM 0x83349f30 - 0x83349f39 -PHONOGRAM 0x8334a030 - 0x8334a039 -PHONOGRAM 0x8334a130 - 0x8334a139 -PHONOGRAM 0x8334a230 - 0x8334a239 -PHONOGRAM 0x8334a330 - 0x8334a339 -PHONOGRAM 0x8334a430 - 0x8334a439 -PHONOGRAM 0x8334a530 - 0x8334a539 -PHONOGRAM 0x8334a630 - 0x8334a639 -PHONOGRAM 0x8334a730 - 0x8334a739 -PHONOGRAM 0x8334a830 - 0x8334a839 -PHONOGRAM 0x8334a930 - 0x8334a939 -PHONOGRAM 0x8334aa30 - 0x8334aa39 -PHONOGRAM 0x8334ab30 - 0x8334ab39 -PHONOGRAM 0x8334ac30 - 0x8334ac39 -PHONOGRAM 0x8334ad30 - 0x8334ad39 -PHONOGRAM 0x8334ae30 - 0x8334ae39 -PHONOGRAM 0x8334af30 - 0x8334af39 -PHONOGRAM 0x8334b030 - 0x8334b039 -PHONOGRAM 0x8334b130 - 0x8334b139 -PHONOGRAM 0x8334b230 - 0x8334b239 -PHONOGRAM 0x8334b330 - 0x8334b339 -PHONOGRAM 0x8334b430 - 0x8334b439 -PHONOGRAM 0x8334b530 - 0x8334b539 -PHONOGRAM 0x8334b630 - 0x8334b639 -PHONOGRAM 0x8334b730 - 0x8334b739 -PHONOGRAM 0x8334b830 - 0x8334b839 -PHONOGRAM 0x8334b930 - 0x8334b939 -PHONOGRAM 0x8334ba30 - 0x8334ba39 -PHONOGRAM 0x8334bb30 - 0x8334bb39 -PHONOGRAM 0x8334bc30 - 0x8334bc39 -PHONOGRAM 0x8334bd30 - 0x8334bd39 -PHONOGRAM 0x8334be30 - 0x8334be39 -PHONOGRAM 0x8334bf30 - 0x8334bf39 -PHONOGRAM 0x8334c030 - 0x8334c039 -PHONOGRAM 0x8334c130 - 0x8334c139 -PHONOGRAM 0x8334c230 - 0x8334c239 -PHONOGRAM 0x8334c330 - 0x8334c339 -PHONOGRAM 0x8334c430 - 0x8334c439 -PHONOGRAM 0x8334c530 - 0x8334c539 -PHONOGRAM 0x8334c630 - 0x8334c639 -PHONOGRAM 0x8334c730 - 0x8334c739 -PHONOGRAM 0x8334c830 - 0x8334c839 -PHONOGRAM 0x8334c930 - 0x8334c939 -PHONOGRAM 0x8334ca30 - 0x8334ca39 -PHONOGRAM 0x8334cb30 - 0x8334cb39 -PHONOGRAM 0x8334cc30 - 0x8334cc39 -PHONOGRAM 0x8334cd30 - 0x8334cd39 -PHONOGRAM 0x8334ce30 - 0x8334ce39 -PHONOGRAM 0x8334cf30 - 0x8334cf39 -PHONOGRAM 0x8334d030 - 0x8334d039 -PHONOGRAM 0x8334d130 - 0x8334d139 -PHONOGRAM 0x8334d230 - 0x8334d239 -PHONOGRAM 0x8334d330 - 0x8334d339 -PHONOGRAM 0x8334d430 - 0x8334d439 -PHONOGRAM 0x8334d530 - 0x8334d539 -PHONOGRAM 0x8334d630 - 0x8334d639 -PHONOGRAM 0x8334d730 - 0x8334d739 -PHONOGRAM 0x8334d830 - 0x8334d839 -PHONOGRAM 0x8334d930 - 0x8334d939 -PHONOGRAM 0x8334da30 - 0x8334da39 -PHONOGRAM 0x8334db30 - 0x8334db39 -PHONOGRAM 0x8334dc30 - 0x8334dc39 -PHONOGRAM 0x8334dd30 - 0x8334dd39 -PHONOGRAM 0x8334de30 - 0x8334de39 -PHONOGRAM 0x8334df30 - 0x8334df39 -PHONOGRAM 0x8334e030 - 0x8334e039 -PHONOGRAM 0x8334e130 - 0x8334e139 -PHONOGRAM 0x8334e230 - 0x8334e239 -PHONOGRAM 0x8334e330 - 0x8334e339 -PHONOGRAM 0x8334e430 - 0x8334e439 -PHONOGRAM 0x8334e530 - 0x8334e539 -PHONOGRAM 0x8334e630 - 0x8334e639 -PHONOGRAM 0x8334e730 - 0x8334e739 -PHONOGRAM 0x8334e830 - 0x8334e839 -PHONOGRAM 0x8334e930 - 0x8334e939 -PHONOGRAM 0x8334ea30 - 0x8334ea39 -PHONOGRAM 0x8334eb30 - 0x8334eb39 -PHONOGRAM 0x8334ec30 - 0x8334ec39 -PHONOGRAM 0x8334ed30 - 0x8334ed39 -PHONOGRAM 0x8334ee30 - 0x8334ee39 -PHONOGRAM 0x8334ef30 - 0x8334ef39 -PHONOGRAM 0x8334f030 - 0x8334f039 -PHONOGRAM 0x8334f130 - 0x8334f139 -PHONOGRAM 0x8334f230 - 0x8334f239 -PHONOGRAM 0x8334f330 - 0x8334f339 -PHONOGRAM 0x8334f430 - 0x8334f439 -PHONOGRAM 0x8334f530 - 0x8334f539 -PHONOGRAM 0x8334f630 - 0x8334f639 -PHONOGRAM 0x8334f730 - 0x8334f739 -PHONOGRAM 0x8334f830 - 0x8334f839 -PHONOGRAM 0x8334f930 - 0x8334f939 -PHONOGRAM 0x8334fa30 - 0x8334fa39 -PHONOGRAM 0x8334fb30 - 0x8334fb39 -PHONOGRAM 0x8334fc30 - 0x8334fc39 -PHONOGRAM 0x8334fd30 - 0x8334fd39 -PHONOGRAM 0x8334fe30 - 0x8334fe39 -PHONOGRAM 0x83358130 - 0x83358139 -PHONOGRAM 0x83358230 - 0x83358239 -PHONOGRAM 0x83358330 - 0x83358339 -PHONOGRAM 0x83358430 - 0x83358439 -PHONOGRAM 0x83358530 - 0x83358539 -PHONOGRAM 0x83358630 - 0x83358639 -PHONOGRAM 0x83358730 - 0x83358739 -PHONOGRAM 0x83358830 - 0x83358839 -PHONOGRAM 0x83358930 - 0x83358939 -PHONOGRAM 0x83358a30 - 0x83358a39 -PHONOGRAM 0x83358b30 - 0x83358b39 -PHONOGRAM 0x83358c30 - 0x83358c39 -PHONOGRAM 0x83358d30 - 0x83358d39 -PHONOGRAM 0x83358e30 - 0x83358e39 -PHONOGRAM 0x83358f30 - 0x83358f39 -PHONOGRAM 0x83359030 - 0x83359039 -PHONOGRAM 0x83359130 - 0x83359139 -PHONOGRAM 0x83359230 - 0x83359239 -PHONOGRAM 0x83359330 - 0x83359339 -PHONOGRAM 0x83359430 - 0x83359439 -PHONOGRAM 0x83359530 - 0x83359539 -PHONOGRAM 0x83359630 - 0x83359639 -PHONOGRAM 0x83359730 - 0x83359739 -PHONOGRAM 0x83359830 - 0x83359839 -PHONOGRAM 0x83359930 - 0x83359939 -PHONOGRAM 0x83359a30 - 0x83359a39 -PHONOGRAM 0x83359b30 - 0x83359b39 -PHONOGRAM 0x83359c30 - 0x83359c39 -PHONOGRAM 0x83359d30 - 0x83359d39 -PHONOGRAM 0x83359e30 - 0x83359e39 -PHONOGRAM 0x83359f30 - 0x83359f39 -PHONOGRAM 0x8335a030 - 0x8335a039 -PHONOGRAM 0x8335a130 - 0x8335a139 -PHONOGRAM 0x8335a230 - 0x8335a239 -PHONOGRAM 0x8335a330 - 0x8335a339 -PHONOGRAM 0x8335a430 - 0x8335a439 -PHONOGRAM 0x8335a530 - 0x8335a539 -PHONOGRAM 0x8335a630 - 0x8335a639 -PHONOGRAM 0x8335a730 - 0x8335a739 -PHONOGRAM 0x8335a830 - 0x8335a839 -PHONOGRAM 0x8335a930 - 0x8335a939 -PHONOGRAM 0x8335aa30 - 0x8335aa39 -PHONOGRAM 0x8335ab30 - 0x8335ab39 -PHONOGRAM 0x8335ac30 - 0x8335ac39 -PHONOGRAM 0x8335ad30 - 0x8335ad39 -PHONOGRAM 0x8335ae30 - 0x8335ae39 -PHONOGRAM 0x8335af30 - 0x8335af39 -PHONOGRAM 0x8335b030 - 0x8335b039 -PHONOGRAM 0x8335b130 - 0x8335b139 -PHONOGRAM 0x8335b230 - 0x8335b239 -PHONOGRAM 0x8335b330 - 0x8335b339 -PHONOGRAM 0x8335b430 - 0x8335b439 -PHONOGRAM 0x8335b530 - 0x8335b539 -PHONOGRAM 0x8335b630 - 0x8335b639 -PHONOGRAM 0x8335b730 - 0x8335b739 -PHONOGRAM 0x8335b830 - 0x8335b839 -PHONOGRAM 0x8335b930 - 0x8335b939 -PHONOGRAM 0x8335ba30 - 0x8335ba39 -PHONOGRAM 0x8335bb30 - 0x8335bb39 -PHONOGRAM 0x8335bc30 - 0x8335bc39 -PHONOGRAM 0x8335bd30 - 0x8335bd39 -PHONOGRAM 0x8335be30 - 0x8335be39 -PHONOGRAM 0x8335bf30 - 0x8335bf39 -PHONOGRAM 0x8335c030 - 0x8335c039 -PHONOGRAM 0x8335c130 - 0x8335c139 -PHONOGRAM 0x8335c230 - 0x8335c239 -PHONOGRAM 0x8335c330 - 0x8335c339 -PHONOGRAM 0x8335c430 - 0x8335c439 -PHONOGRAM 0x8335c530 - 0x8335c539 -PHONOGRAM 0x8335c630 - 0x8335c639 -PHONOGRAM 0x8335c730 - 0x8335c739 -PHONOGRAM 0x8335c830 - 0x8335c839 -PHONOGRAM 0x8335c930 - 0x8335c939 -PHONOGRAM 0x8335ca30 - 0x8335ca39 -PHONOGRAM 0x8335cb30 - 0x8335cb39 -PHONOGRAM 0x8335cc30 - 0x8335cc39 -PHONOGRAM 0x8335cd30 - 0x8335cd39 -PHONOGRAM 0x8335ce30 - 0x8335ce39 -PHONOGRAM 0x8335cf30 - 0x8335cf39 -PHONOGRAM 0x8335d030 - 0x8335d039 -PHONOGRAM 0x8335d130 - 0x8335d139 -PHONOGRAM 0x8335d230 - 0x8335d239 -PHONOGRAM 0x8335d330 - 0x8335d339 -PHONOGRAM 0x8335d430 - 0x8335d439 -PHONOGRAM 0x8335d530 - 0x8335d539 -PHONOGRAM 0x8335d630 - 0x8335d639 -PHONOGRAM 0x8335d730 - 0x8335d739 -PHONOGRAM 0x8335d830 - 0x8335d839 -PHONOGRAM 0x8335d930 - 0x8335d939 -PHONOGRAM 0x8335da30 - 0x8335da39 -PHONOGRAM 0x8335db30 - 0x8335db39 -PHONOGRAM 0x8335dc30 - 0x8335dc39 -PHONOGRAM 0x8335dd30 - 0x8335dd39 -PHONOGRAM 0x8335de30 - 0x8335de39 -PHONOGRAM 0x8335df30 - 0x8335df39 -PHONOGRAM 0x8335e030 - 0x8335e039 -PHONOGRAM 0x8335e130 - 0x8335e139 -PHONOGRAM 0x8335e230 - 0x8335e239 -PHONOGRAM 0x8335e330 - 0x8335e339 -PHONOGRAM 0x8335e430 - 0x8335e439 -PHONOGRAM 0x8335e530 - 0x8335e539 -PHONOGRAM 0x8335e630 - 0x8335e639 -PHONOGRAM 0x8335e730 - 0x8335e739 -PHONOGRAM 0x8335e830 - 0x8335e839 -PHONOGRAM 0x8335e930 - 0x8335e939 -PHONOGRAM 0x8335ea30 - 0x8335ea39 -PHONOGRAM 0x8335eb30 - 0x8335eb39 -PHONOGRAM 0x8335ec30 - 0x8335ec39 -PHONOGRAM 0x8335ed30 - 0x8335ed39 -PHONOGRAM 0x8335ee30 - 0x8335ee39 -PHONOGRAM 0x8335ef30 - 0x8335ef39 -PHONOGRAM 0x8335f030 - 0x8335f039 -PHONOGRAM 0x8335f130 - 0x8335f139 -PHONOGRAM 0x8335f230 - 0x8335f239 -PHONOGRAM 0x8335f330 - 0x8335f339 -PHONOGRAM 0x8335f430 - 0x8335f439 -PHONOGRAM 0x8335f530 - 0x8335f539 -PHONOGRAM 0x8335f630 - 0x8335f639 -PHONOGRAM 0x8335f730 - 0x8335f739 -PHONOGRAM 0x8335f830 - 0x8335f839 -PHONOGRAM 0x8335f930 - 0x8335f939 -PHONOGRAM 0x8335fa30 - 0x8335fa39 -PHONOGRAM 0x8335fb30 - 0x8335fb39 -PHONOGRAM 0x8335fc30 - 0x8335fc39 -PHONOGRAM 0x8335fd30 - 0x8335fd39 -PHONOGRAM 0x8335fe30 - 0x8335fe39 -PHONOGRAM 0x83368130 - 0x83368139 -PHONOGRAM 0x83368230 - 0x83368239 -PHONOGRAM 0x83368330 - 0x83368339 -PHONOGRAM 0x83368430 - 0x83368439 -PHONOGRAM 0x83368530 - 0x83368539 -PHONOGRAM 0x83368630 - 0x83368639 -PHONOGRAM 0x83368730 - 0x83368739 -PHONOGRAM 0x83368830 - 0x83368839 -PHONOGRAM 0x83368930 - 0x83368939 -PHONOGRAM 0x83368a30 - 0x83368a39 -PHONOGRAM 0x83368b30 - 0x83368b39 -PHONOGRAM 0x83368c30 - 0x83368c39 -PHONOGRAM 0x83368d30 - 0x83368d39 -PHONOGRAM 0x83368e30 - 0x83368e39 -PHONOGRAM 0x83368f30 - 0x83368f39 -PHONOGRAM 0x83369030 - 0x83369039 -PHONOGRAM 0x83369130 - 0x83369139 -PHONOGRAM 0x83369230 - 0x83369239 -PHONOGRAM 0x83369330 - 0x83369339 -PHONOGRAM 0x83369430 - 0x83369439 -PHONOGRAM 0x83369530 - 0x83369539 -PHONOGRAM 0x83369630 - 0x83369639 -PHONOGRAM 0x83369730 - 0x83369739 -PHONOGRAM 0x83369830 - 0x83369839 -PHONOGRAM 0x83369930 - 0x83369939 -PHONOGRAM 0x83369a30 - 0x83369a39 -PHONOGRAM 0x83369b30 - 0x83369b39 -PHONOGRAM 0x83369c30 - 0x83369c39 -PHONOGRAM 0x83369d30 - 0x83369d39 -PHONOGRAM 0x83369e30 - 0x83369e39 -PHONOGRAM 0x83369f30 - 0x83369f39 -PHONOGRAM 0x8336a030 - 0x8336a039 -PHONOGRAM 0x8336a130 - 0x8336a139 -PHONOGRAM 0x8336a230 - 0x8336a239 -PHONOGRAM 0x8336a330 - 0x8336a339 -PHONOGRAM 0x8336a430 - 0x8336a439 -PHONOGRAM 0x8336a530 - 0x8336a539 -PHONOGRAM 0x8336a630 - 0x8336a639 -PHONOGRAM 0x8336a730 - 0x8336a739 -PHONOGRAM 0x8336a830 - 0x8336a839 -PHONOGRAM 0x8336a930 - 0x8336a939 -PHONOGRAM 0x8336aa30 - 0x8336aa39 -PHONOGRAM 0x8336ab30 - 0x8336ab39 -PHONOGRAM 0x8336ac30 - 0x8336ac39 -PHONOGRAM 0x8336ad30 - 0x8336ad39 -PHONOGRAM 0x8336ae30 - 0x8336ae39 -PHONOGRAM 0x8336af30 - 0x8336af39 -PHONOGRAM 0x8336b030 - 0x8336b039 -PHONOGRAM 0x8336b130 - 0x8336b139 -PHONOGRAM 0x8336b230 - 0x8336b239 -PHONOGRAM 0x8336b330 - 0x8336b339 -PHONOGRAM 0x8336b430 - 0x8336b439 -PHONOGRAM 0x8336b530 - 0x8336b539 -PHONOGRAM 0x8336b630 - 0x8336b639 -PHONOGRAM 0x8336b730 - 0x8336b739 -PHONOGRAM 0x8336b830 - 0x8336b839 -PHONOGRAM 0x8336b930 - 0x8336b939 -PHONOGRAM 0x8336ba30 - 0x8336ba39 -PHONOGRAM 0x8336bb30 - 0x8336bb39 -PHONOGRAM 0x8336bc30 - 0x8336bc39 -PHONOGRAM 0x8336bd30 - 0x8336bd39 -PHONOGRAM 0x8336be30 - 0x8336be36 -PHONOGRAM 0x84319632 - 0x84319639 -PHONOGRAM 0x84319730 0x84319731 0x84319733 - 0x84319739 -PHONOGRAM 0x84319830 - 0x84319839 -PHONOGRAM 0x84319930 - 0x84319939 -PHONOGRAM 0x84319a30 - 0x84319a39 -PRINT 0x81308432 -PRINT 0x8134ac34 -PRINT 0x8136a336 - 0x8136a339 -PRINT 0x8136a430 - 0x8136a437 -PRINT 0x8136a635 0x8136a636 -PRINT 0x8136a732 -PRINT 0x8136ab35 -PUNCT 0x81308433 - 0x81308438 -PUNCT 0x81308530 - 0x81308534 0x81308537 0x81308539 -PUNCT 0x81308630 0x81308633 0x81308637 -PUNCT 0x8130b630 0x8130b631 0x8130b639 -PUNCT 0x8130b730 - 0x8130b738 -PUNCT 0x8130b831 - 0x8130b839 -PUNCT 0x8130b930 - 0x8130b933 0x8130b939 -PUNCT 0x8130ba30 - 0x8130ba37 -PUNCT 0x8130c832 0x8130c833 -PUNCT 0x8130c932 0x8130c938 0x8130c939 -PUNCT 0x8130ca31 -PUNCT 0x8130d034 -PUNCT 0x8130d738 -PUNCT 0x8130ed34 - 0x8130ed39 -PUNCT 0x8130f231 0x8130f232 -PUNCT 0x8130f734 0x8130f736 0x8130f739 -PUNCT 0x8130fc37 0x8130fc38 -PUNCT 0x81318132 -PUNCT 0x81318237 -PUNCT 0x81318331 -PUNCT 0x81318a36 - 0x81318a39 -PUNCT 0x81319532 -PUNCT 0x81319733 -PUNCT 0x81319933 0x81319934 0x81319936 - 0x81319939 -PUNCT 0x81319a30 - 0x81319a39 -PUNCT 0x8131d638 0x8131d639 -PUNCT 0x8131d830 -PUNCT 0x8131e530 0x8131e531 0x8131e538 -PUNCT 0x81328d32 -PUNCT 0x8132cd36 -PUNCT 0x8132d531 -PUNCT 0x8132d637 -PUNCT 0x8132d738 0x8132d739 -PUNCT 0x8132e835 - 0x8132e839 -PUNCT 0x8132e930 - 0x8132e939 -PUNCT 0x8132ea30 - 0x8132ea37 -PUNCT 0x8132eb30 - 0x8132eb35 -PUNCT 0x8132ed36 0x8132ed38 -PUNCT 0x8132ee30 0x8132ee32 - 0x8132ee35 -PUNCT 0x8132f537 -PUNCT 0x8132fb34 - 0x8132fb39 -PUNCT 0x8132fc30 0x8132fc31 0x8132fc33 - 0x8132fc38 -PUNCT 0x8132fd31 -PUNCT 0x81338b34 - 0x81338b39 -PUNCT 0x81339d31 -PUNCT 0x8133da35 - 0x8133da39 -PUNCT 0x8133db30 - 0x8133db32 -PUNCT 0x8134aa35 0x8134aa36 -PUNCT 0x8134af31 0x8134af32 -PUNCT 0x8134b731 - 0x8134b733 -PUNCT 0x8134be35 0x8134be36 -PUNCT 0x8134ce34 - 0x8134ce36 0x8134ce38 0x8134ce39 -PUNCT 0x8134cf30 0x8134cf31 -PUNCT 0x8134d238 0x8134d239 -PUNCT 0x8134d330 - 0x8134d338 -PUNCT 0x81369c39 -PUNCT 0x81369d31 - 0x81369d33 -PUNCT 0x81369e35 - 0x81369e37 -PUNCT 0x8136a031 - 0x8136a033 -PUNCT 0x8136a137 - 0x8136a139 -PUNCT 0x8136a333 0x8136a334 -PUNCT 0x8136a532 - 0x8136a539 -PUNCT 0x8136a630 - 0x8136a634 -PUNCT 0x8136a733 - 0x8136a739 -PUNCT 0x8136a830 - 0x8136a839 -PUNCT 0x8136a930 - 0x8136a939 -PUNCT 0x8136aa30 - 0x8136aa32 0x8136aa37 -PUNCT 0x8136ae32 - 0x8136ae36 -PUNCT 0x8136af38 0x8136af39 -PUNCT 0x8136b030 - 0x8136b032 -PUNCT 0x8136b230 - 0x8136b239 -PUNCT 0x8136b330 - 0x8136b336 -PUNCT 0x8136bb35 0x8136bb36 0x8136bb38 0x8136bb39 -PUNCT 0x8136bc31 -PUNCT 0x8136bd32 0x8136bd34 0x8136bd35 -PUNCT 0x8136be31 - 0x8136be35 0x8136be37 0x8136be39 -PUNCT 0x8136bf31 0x8136bf36 -PUNCT 0x8136c030 0x8136c038 -PUNCT 0x8136c134 - 0x8136c138 -PUNCT 0x8136c234 0x8136c235 -PUNCT 0x8136c732 - 0x8136c739 -PUNCT 0x8136c830 - 0x8136c839 -PUNCT 0x8136c930 - 0x8136c939 -PUNCT 0x8136ca30 - 0x8136ca39 -PUNCT 0x8136cb30 - 0x8136cb39 -PUNCT 0x8136cc30 - 0x8136cc39 -PUNCT 0x8136cd30 - 0x8136cd39 -PUNCT 0x8136ce30 - 0x8136ce39 -PUNCT 0x8136cf30 - 0x8136cf39 -PUNCT 0x8136d030 - 0x8136d039 -PUNCT 0x8136d130 - 0x8136d139 -PUNCT 0x8136d230 - 0x8136d239 -PUNCT 0x8136d330 - 0x8136d339 -PUNCT 0x8136d430 - 0x8136d439 -PUNCT 0x8136d530 - 0x8136d539 -PUNCT 0x8136d630 - 0x8136d639 -PUNCT 0x8136d730 - 0x8136d739 -PUNCT 0x8136d830 - 0x8136d839 -PUNCT 0x8136d930 - 0x8136d939 -PUNCT 0x8136da30 - 0x8136da39 -PUNCT 0x8136db30 - 0x8136db39 -PUNCT 0x8136dc30 - 0x8136dc39 -PUNCT 0x8136dd30 - 0x8136dd39 -PUNCT 0x8136de30 - 0x8136de39 -PUNCT 0x8136df30 - 0x8136df39 -PUNCT 0x8136e030 - 0x8136e039 -PUNCT 0x8136e130 - 0x8136e139 -PUNCT 0x8136e230 - 0x8136e239 -PUNCT 0x8136e330 - 0x8136e339 -PUNCT 0x8136e430 - 0x8136e439 -PUNCT 0x8136e530 - 0x8136e539 -PUNCT 0x8136e630 - 0x8136e639 -PUNCT 0x8136e730 - 0x8136e739 -PUNCT 0x8136e830 - 0x8136e839 -PUNCT 0x8136e930 - 0x8136e939 -PUNCT 0x8136ea30 - 0x8136ea39 -PUNCT 0x8136eb30 - 0x8136eb39 -PUNCT 0x8136ec30 - 0x8136ec39 -PUNCT 0x8136ed30 - 0x8136ed39 -PUNCT 0x8136ee30 - 0x8136ee39 -PUNCT 0x8136ef30 - 0x8136ef39 -PUNCT 0x8136f030 - 0x8136f039 -PUNCT 0x8136f130 - 0x8136f139 -PUNCT 0x8136f230 - 0x8136f239 -PUNCT 0x8136f330 - 0x8136f339 -PUNCT 0x8136f430 - 0x8136f439 -PUNCT 0x8136f530 - 0x8136f539 -PUNCT 0x8136f630 - 0x8136f639 -PUNCT 0x8136f730 - 0x8136f739 -PUNCT 0x8136f830 - 0x8136f839 -PUNCT 0x8136f930 - 0x8136f939 -PUNCT 0x8136fa30 - 0x8136fa39 -PUNCT 0x8136fb30 - 0x8136fb39 -PUNCT 0x8136fc30 -PUNCT 0x81378330 - 0x81378339 -PUNCT 0x81378430 - 0x81378439 -PUNCT 0x81378530 - 0x81378539 -PUNCT 0x81378630 - 0x81378638 -PUNCT 0x81378934 - 0x81378939 -PUNCT 0x81378a30 - 0x81378a34 -PUNCT 0x81378d36 - 0x81378d39 -PUNCT 0x81378e30 - 0x81378e39 -PUNCT 0x81378f30 - 0x81378f39 -PUNCT 0x81379030 - 0x81379039 -PUNCT 0x81379130 - 0x81379139 -PUNCT 0x81379230 - 0x81379239 -PUNCT 0x81379330 - 0x81379339 -PUNCT 0x81379430 - 0x81379439 -PUNCT 0x81379530 - 0x81379533 -PUNCT 0x81379736 - 0x81379739 -PUNCT 0x81379830 - 0x81379839 -PUNCT 0x81379930 - 0x81379939 -PUNCT 0x81379a30 - 0x81379a39 -PUNCT 0x81379b30 - 0x81379b39 -PUNCT 0x81379c30 - 0x81379c39 -PUNCT 0x81379d30 - 0x81379d39 -PUNCT 0x81379e30 - 0x81379e39 -PUNCT 0x81379f30 - 0x81379f39 -PUNCT 0x8137a030 - 0x8137a039 -PUNCT 0x8137a130 - 0x8137a139 -PUNCT 0x8137a230 - 0x8137a239 -PUNCT 0x8137a330 - 0x8137a339 -PUNCT 0x8137a430 - 0x8137a433 0x8137a436 0x8137a437 0x8137a439 -PUNCT 0x8137a530 - 0x8137a539 -PUNCT 0x8137a630 - 0x8137a639 -PUNCT 0x8137a730 - 0x8137a739 -PUNCT 0x8137a830 - 0x8137a839 -PUNCT 0x8137a930 - 0x8137a939 -PUNCT 0x8137aa30 - 0x8137aa39 -PUNCT 0x8137ab30 - 0x8137ab39 -PUNCT 0x8137ac30 - 0x8137ac39 -PUNCT 0x8137ad30 - 0x8137ad39 -PUNCT 0x8137ae30 - 0x8137ae37 -PUNCT 0x8137af30 - 0x8137af39 -PUNCT 0x8137bb39 -PUNCT 0x8137bc30 - 0x8137bc32 0x8137bc34 - 0x8137bc37 -PUNCT 0x8137bd30 - 0x8137bd39 -PUNCT 0x8137be30 - 0x8137be39 -PUNCT 0x8137bf30 - 0x8137bf37 0x8137bf39 -PUNCT 0x8137c030 - 0x8137c039 -PUNCT 0x8137c130 - 0x8137c139 -PUNCT 0x8137c230 - 0x8137c239 -PUNCT 0x8137c330 - 0x8137c333 0x8137c335 0x8137c337 - 0x8137c339 -PUNCT 0x8137c430 0x8137c434 0x8137c436 - 0x8137c439 -PUNCT 0x8137c530 - 0x8137c532 0x8137c535 - 0x8137c539 -PUNCT 0x8137c630 - 0x8137c639 -PUNCT 0x8137c730 - 0x8137c735 -PUNCT 0x8137ca36 -PUNCT 0x8137cb30 - 0x8137cb39 -PUNCT 0x8137cc30 - 0x8137cc39 -PUNCT 0x8137cd30 - 0x8137cd33 0x8137cd35 - 0x8137cd39 -PUNCT 0x8137ce30 - 0x8137ce38 -PUNCT 0x8137d036 - 0x8137d039 -PUNCT 0x8137d130 - 0x8137d139 -PUNCT 0x8137d230 - 0x8137d239 -PUNCT 0x8137d330 - 0x8137d333 0x8137d338 0x8137d339 -PUNCT 0x8137d430 - 0x8137d439 -PUNCT 0x8137d530 - 0x8137d539 -PUNCT 0x8137d630 - 0x8137d639 -PUNCT 0x8137d730 - 0x8137d739 -PUNCT 0x8137d830 - 0x8137d839 -PUNCT 0x8137d930 - 0x8137d939 -PUNCT 0x8137da30 - 0x8137da39 -PUNCT 0x8137db30 - 0x8137db39 -PUNCT 0x8137dc30 - 0x8137dc39 -PUNCT 0x8137dd30 - 0x8137dd39 -PUNCT 0x8137de30 - 0x8137de39 -PUNCT 0x8137df30 - 0x8137df39 -PUNCT 0x8137e030 - 0x8137e039 -PUNCT 0x8137e130 - 0x8137e139 -PUNCT 0x8137e230 - 0x8137e239 -PUNCT 0x8137e330 - 0x8137e339 -PUNCT 0x8137e430 - 0x8137e439 -PUNCT 0x8137e530 - 0x8137e539 -PUNCT 0x8137e630 - 0x8137e639 -PUNCT 0x8137e730 - 0x8137e739 -PUNCT 0x8137e830 - 0x8137e839 -PUNCT 0x8137e930 - 0x8137e939 -PUNCT 0x8137ea30 - 0x8137ea39 -PUNCT 0x8137eb30 - 0x8137eb39 -PUNCT 0x8137ec30 - 0x8137ec39 -PUNCT 0x8137ed30 - 0x8137ed39 -PUNCT 0x8137ee30 - 0x8137ee39 -PUNCT 0x8137ef30 - 0x8137ef39 -PUNCT 0x8137f030 - 0x8137f039 -PUNCT 0x8137f130 - 0x8137f139 -PUNCT 0x8137f230 - 0x8137f239 -PUNCT 0x8137f330 - 0x8137f339 -PUNCT 0x8137f430 - 0x8137f439 -PUNCT 0x8137f530 - 0x8137f539 -PUNCT 0x8137f630 - 0x8137f639 -PUNCT 0x8137f730 - 0x8137f739 -PUNCT 0x8137f830 - 0x8137f839 -PUNCT 0x8137f930 - 0x8137f939 -PUNCT 0x8137fa30 - 0x8137fa39 -PUNCT 0x8137fb30 - 0x8137fb39 -PUNCT 0x8137fc30 - 0x8137fc39 -PUNCT 0x8137fd30 - 0x8137fd39 -PUNCT 0x8137fe30 - 0x8137fe39 -PUNCT 0x81388130 - 0x81388139 -PUNCT 0x81388230 - 0x81388239 -PUNCT 0x81388330 - 0x81388339 -PUNCT 0x81388430 - 0x81388439 -PUNCT 0x81388530 - 0x81388539 -PUNCT 0x81388630 - 0x81388639 -PUNCT 0x81388730 - 0x81388739 -PUNCT 0x81388830 - 0x81388839 -PUNCT 0x81388930 - 0x81388939 -PUNCT 0x81388a30 - 0x81388a39 -PUNCT 0x81388b30 - 0x81388b39 -PUNCT 0x81388c30 - 0x81388c39 -PUNCT 0x81388d30 - 0x81388d39 -PUNCT 0x81388e30 - 0x81388e39 -PUNCT 0x81388f30 - 0x81388f39 -PUNCT 0x81389030 - 0x81389039 -PUNCT 0x81389130 - 0x81389139 -PUNCT 0x81389230 - 0x81389239 -PUNCT 0x81389330 - 0x81389339 -PUNCT 0x81389430 - 0x81389439 -PUNCT 0x81389530 - 0x81389539 -PUNCT 0x81389630 - 0x81389639 -PUNCT 0x81389730 - 0x81389739 -PUNCT 0x81389830 - 0x81389839 -PUNCT 0x81389930 - 0x81389939 -PUNCT 0x81389a30 - 0x81389a39 -PUNCT 0x81389b30 - 0x81389b39 -PUNCT 0x81389c30 - 0x81389c39 -PUNCT 0x81389d30 - 0x81389d39 -PUNCT 0x81389e30 - 0x81389e39 -PUNCT 0x81389f30 - 0x81389f39 -PUNCT 0x8138a030 - 0x8138a039 -PUNCT 0x8138a130 - 0x8138a139 -PUNCT 0x8138a230 - 0x8138a239 -PUNCT 0x8138a330 - 0x8138a339 -PUNCT 0x8138a430 0x8138a431 -PUNCT 0x8138fd38 0x8138fd39 -PUNCT 0x8138fe30 - 0x8138fe39 -PUNCT 0x81398130 - 0x81398137 0x81398139 -PUNCT 0x81398230 - 0x81398239 -PUNCT 0x81398330 - 0x81398339 -PUNCT 0x81398430 - 0x81398439 -PUNCT 0x81398530 - 0x81398539 -PUNCT 0x81398630 - 0x81398639 -PUNCT 0x81398730 - 0x81398739 -PUNCT 0x81398830 - 0x81398839 -PUNCT 0x81398930 - 0x81398939 -PUNCT 0x81398b32 - 0x81398b39 -PUNCT 0x81398c30 - 0x81398c39 -PUNCT 0x81398d30 - 0x81398d39 -PUNCT 0x81398e30 - 0x81398e39 -PUNCT 0x81398f30 - 0x81398f39 -PUNCT 0x81399030 - 0x81399039 -PUNCT 0x81399130 - 0x81399139 -PUNCT 0x81399230 - 0x81399239 -PUNCT 0x81399330 - 0x81399339 -PUNCT 0x81399430 - 0x81399439 -PUNCT 0x81399530 - 0x81399539 -PUNCT 0x81399630 - 0x81399639 -PUNCT 0x81399730 - 0x81399739 -PUNCT 0x81399830 - 0x81399839 -PUNCT 0x81399930 - 0x81399939 -PUNCT 0x81399a30 - 0x81399a39 -PUNCT 0x81399b30 - 0x81399b39 -PUNCT 0x81399c30 - 0x81399c39 -PUNCT 0x81399d30 - 0x81399d39 -PUNCT 0x81399e30 - 0x81399e39 -PUNCT 0x81399f30 - 0x81399f39 -PUNCT 0x8139a030 - 0x8139a035 -PUNCT 0x8139a336 - 0x8139a339 -PUNCT 0x8139a430 - 0x8139a433 -PUNCT 0x8139a530 0x8139a536 0x8139a537 -PUNCT 0x8139a633 0x8139a634 -PUNCT 0x8139a734 0x8139a739 -PUNCT 0x8139b238 0x8139b239 -PUNCT 0x8139b334 - 0x8139b339 -PUNCT 0x8139b430 - 0x8139b433 -PUNCT 0x8139be30 - 0x8139be39 -PUNCT 0x8139bf30 - 0x8139bf39 -PUNCT 0x8139c030 - 0x8139c038 -PUNCT 0x8139c132 - 0x8139c139 -PUNCT 0x8139c230 - 0x8139c239 -PUNCT 0x8139c330 - 0x8139c336 -PUNCT 0x8139c635 - 0x8139c639 -PUNCT 0x8139c730 - 0x8139c739 -PUNCT 0x8139c830 - 0x8139c839 -PUNCT 0x8139c930 - 0x8139c932 0x8139c936 -PUNCT 0x8139ca37 - 0x8139ca39 -PUNCT 0x8139cb30 - 0x8139cb39 -PUNCT 0x8139cc30 - 0x8139cc39 -PUNCT 0x8139cd30 - 0x8139cd39 -PUNCT 0x8139ce30 - 0x8139ce34 -PUNCT 0x8139d030 - 0x8139d039 -PUNCT 0x8139d130 0x8139d131 0x8139d136 - 0x8139d139 -PUNCT 0x8139d230 - 0x8139d239 -PUNCT 0x8139d330 - 0x8139d339 -PUNCT 0x8139d430 - 0x8139d439 -PUNCT 0x8139d530 - 0x8139d539 -PUNCT 0x8139d630 - 0x8139d632 0x8139d634 - 0x8139d639 -PUNCT 0x8139d730 - 0x8139d739 -PUNCT 0x8139d830 - 0x8139d839 -PUNCT 0x8139d930 - 0x8139d939 -PUNCT 0x8139da30 - 0x8139da39 -PUNCT 0x8139db30 - 0x8139db39 -PUNCT 0x8139dc30 - 0x8139dc39 -PUNCT 0x8139dd30 - 0x8139dd39 -PUNCT 0x8139de30 - 0x8139de39 -PUNCT 0x8139df30 - 0x8139df39 -PUNCT 0x8139e030 - 0x8139e039 -PUNCT 0x8139e130 - 0x8139e139 -PUNCT 0x8139e230 - 0x8139e232 0x8139e237 - 0x8139e239 -PUNCT 0x8139e330 - 0x8139e339 -PUNCT 0x8139e430 - 0x8139e439 -PUNCT 0x8139e530 - 0x8139e539 -PUNCT 0x8139e630 - 0x8139e639 -PUNCT 0x8139e730 - 0x8139e739 -PUNCT 0x8139e830 - 0x8139e839 -PUNCT 0x8139e930 - 0x8139e939 -PUNCT 0x8139ea30 - 0x8139ea39 -PUNCT 0x8139eb30 - 0x8139eb34 0x8139eb37 - 0x8139eb39 -PUNCT 0x8139ec30 - 0x8139ec39 -PUNCT 0x8139ed30 - 0x8139ed39 -PUNCT 0x8139ee30 - 0x8139ee37 -PUNCT 0x82368f31 - 0x82368f39 -PUNCT 0x82369030 - 0x82369039 -PUNCT 0x82369130 - 0x82369139 -PUNCT 0x82369230 - 0x82369239 -PUNCT 0x82369330 - 0x82369339 -PUNCT 0x82369430 - 0x82369435 -PUNCT 0x8430b633 -PUNCT 0x8430eb36 0x8430eb37 -PUNCT 0x8430fe36 -PUNCT 0x84318538 0x84318539 -PUNCT 0x84318630 0x84318634 -PUNCT 0x84319535 - 0x84319539 -PUNCT 0x84319630 0x84319631 -PUNCT 0x8431a234 0x8431a236 - 0x8431a239 -PUNCT 0x8431a330 - 0x8431a332 -PUNCT 0x8431a436 0x8431a437 -SPACE 0x81308135 -SPACE 0x81308432 -SPACE 0x8134ac34 -SPACE 0x8136a336 - 0x8136a339 -SPACE 0x8136a430 - 0x8136a437 -SPACE 0x8136a635 0x8136a636 -SPACE 0x8136a732 -SPACE 0x8136ab35 -SPECIAL 0x81308535 0x81308536 -SPECIAL 0x81308631 0x81308634 - 0x81308636 -SPECIAL 0x8131e532 - 0x8131e537 -SPECIAL 0x81329a30 - 0x81329a32 -SPECIAL 0x8132ec36 - 0x8132ec39 -SPECIAL 0x8132ed30 - 0x8132ed35 -SPECIAL 0x8133dc32 - 0x8133dc39 -SPECIAL 0x8133dd30 - 0x8133dd32 -SPECIAL 0x8134b734 - 0x8134b736 -SPECIAL 0x8136ad32 0x8136ad36 - 0x8136ad39 -SPECIAL 0x8136ae30 0x8136ae31 0x8136ae38 0x8136ae39 -SPECIAL 0x8136af30 - 0x8136af37 -SPECIAL 0x8136c333 - 0x8136c339 -SPECIAL 0x8136c430 - 0x8136c439 -SPECIAL 0x8136c530 - 0x8136c539 -SPECIAL 0x81378c36 - 0x81378c39 -SPECIAL 0x81378d30 - 0x81378d35 -SPECIAL 0x81379534 - 0x81379539 -SPECIAL 0x81379630 - 0x81379639 -SPECIAL 0x81379730 - 0x81379734 -SPECIAL 0x8137c736 - 0x8137c739 -SPECIAL 0x8137c830 - 0x8137c839 -SPECIAL 0x8137c930 - 0x8137c939 -SPECIAL 0x8137ca30 - 0x8137ca35 -SPECIAL 0x8139a538 0x8139a539 -SPECIAL 0x8139a630 -SPECIAL 0x8139b330 - 0x8139b333 -SPECIAL 0x8139c530 - 0x8139c539 -SPECIAL 0x8139c630 - 0x8139c634 -SPECIAL 0x8139c937 - 0x8139c939 -SPECIAL 0x8139ca30 - 0x8139ca36 -SPECIAL 0x8139ce35 - 0x8139ce39 -SPECIAL 0x8139cf30 - 0x8139cf39 -SWIDTH1 0x81308432 - 0x81308439 -SWIDTH1 0x81308530 - 0x81308539 -SWIDTH1 0x81308630 - 0x81308639 -SWIDTH1 0x81308730 - 0x81308739 -SWIDTH1 0x81308830 - 0x81308839 -SWIDTH1 0x81308930 - 0x81308939 -SWIDTH1 0x81308a30 - 0x81308a39 -SWIDTH1 0x81308b30 - 0x81308b39 -SWIDTH1 0x81308c30 - 0x81308c39 -SWIDTH1 0x81308d30 - 0x81308d39 -SWIDTH1 0x81308e30 - 0x81308e39 -SWIDTH1 0x81308f30 - 0x81308f39 -SWIDTH1 0x81309030 - 0x81309039 -SWIDTH1 0x81309130 - 0x81309139 -SWIDTH1 0x81309230 - 0x81309239 -SWIDTH1 0x81309330 - 0x81309339 -SWIDTH1 0x81309430 - 0x81309439 -SWIDTH1 0x81309530 - 0x81309539 -SWIDTH1 0x81309630 - 0x81309639 -SWIDTH1 0x81309730 - 0x81309739 -SWIDTH1 0x81309830 - 0x81309839 -SWIDTH1 0x81309930 - 0x81309939 -SWIDTH1 0x81309a30 - 0x81309a39 -SWIDTH1 0x81309b30 - 0x81309b39 -SWIDTH1 0x81309c30 - 0x81309c39 -SWIDTH1 0x81309d30 - 0x81309d39 -SWIDTH1 0x81309e30 - 0x81309e39 -SWIDTH1 0x81309f30 - 0x81309f39 -SWIDTH1 0x8130a030 - 0x8130a039 -SWIDTH1 0x8130a130 - 0x8130a139 -SWIDTH1 0x8130a230 - 0x8130a239 -SWIDTH1 0x8130a330 - 0x8130a339 -SWIDTH1 0x8130a430 - 0x8130a439 -SWIDTH1 0x8130a530 - 0x8130a539 -SWIDTH1 0x8130a630 - 0x8130a639 -SWIDTH1 0x8130a731 - 0x8130a739 -SWIDTH1 0x8130a830 - 0x8130a838 -SWIDTH1 0x8130ab37 - 0x8130ab39 -SWIDTH1 0x8130ac30 - 0x8130ac39 -SWIDTH1 0x8130ad30 - 0x8130ad39 -SWIDTH1 0x8130ae30 - 0x8130ae39 -SWIDTH1 0x8130af30 - 0x8130af39 -SWIDTH1 0x8130b030 - 0x8130b039 -SWIDTH1 0x8130b130 - 0x8130b139 -SWIDTH1 0x8130b230 - 0x8130b239 -SWIDTH1 0x8130b330 - 0x8130b339 -SWIDTH1 0x8130b430 - 0x8130b438 -SWIDTH1 0x8130b531 - 0x8130b539 -SWIDTH1 0x8130b630 - 0x8130b639 -SWIDTH1 0x8130b730 - 0x8130b739 -SWIDTH1 0x8130b830 - 0x8130b839 -SWIDTH1 0x8130b930 - 0x8130b939 -SWIDTH1 0x8130ba30 - 0x8130ba38 -SWIDTH1 0x8130bc36 - 0x8130bc39 -SWIDTH1 0x8130bd30 - 0x8130bd39 -SWIDTH1 0x8130be30 - 0x8130be39 -SWIDTH1 0x8130bf30 - 0x8130bf39 -SWIDTH1 0x8130c030 - 0x8130c039 -SWIDTH1 0x8130c130 - 0x8130c139 -SWIDTH1 0x8130c230 - 0x8130c239 -SWIDTH1 0x8130c330 - 0x8130c339 -SWIDTH1 0x8130c430 - 0x8130c435 -SWIDTH1 0x8130c632 - 0x8130c639 -SWIDTH1 0x8130c730 - 0x8130c737 -SWIDTH1 0x8130c832 0x8130c833 0x8130c838 -SWIDTH1 0x8130c932 0x8130c938 0x8130c939 -SWIDTH1 0x8130ca30 - 0x8130ca34 0x8130ca36 0x8130ca38 0x8130ca39 -SWIDTH1 0x8130cb30 0x8130cb32 - 0x8130cb39 -SWIDTH1 0x8130cc30 - 0x8130cc34 0x8130cc36 - 0x8130cc39 -SWIDTH1 0x8130cd30 - 0x8130cd39 -SWIDTH1 0x8130ce30 - 0x8130ce39 -SWIDTH1 0x8130cf30 - 0x8130cf39 -SWIDTH1 0x8130d030 - 0x8130d034 -SWIDTH1 0x8130d134 - 0x8130d139 -SWIDTH1 0x8130d230 - 0x8130d239 -SWIDTH1 0x8130d330 - 0x8130d339 -SWIDTH1 0x8130d430 - 0x8130d439 -SWIDTH1 0x8130d530 - 0x8130d539 -SWIDTH1 0x8130d630 - 0x8130d639 -SWIDTH1 0x8130d730 - 0x8130d739 -SWIDTH1 0x8130d830 - 0x8130d832 0x8130d834 - 0x8130d839 -SWIDTH1 0x8130d930 - 0x8130d939 -SWIDTH1 0x8130da30 - 0x8130da39 -SWIDTH1 0x8130db30 - 0x8130db39 -SWIDTH1 0x8130dc30 - 0x8130dc39 -SWIDTH1 0x8130dd30 - 0x8130dd39 -SWIDTH1 0x8130de30 - 0x8130de39 -SWIDTH1 0x8130df30 - 0x8130df34 0x8130df36 - 0x8130df39 -SWIDTH1 0x8130e030 - 0x8130e039 -SWIDTH1 0x8130e130 - 0x8130e139 -SWIDTH1 0x8130e230 - 0x8130e239 -SWIDTH1 0x8130e330 - 0x8130e333 0x8130e336 0x8130e337 -SWIDTH1 0x8130e434 - 0x8130e439 -SWIDTH1 0x8130e530 - 0x8130e539 -SWIDTH1 0x8130e933 - 0x8130e939 -SWIDTH1 0x8130ea30 - 0x8130ea39 -SWIDTH1 0x8130eb30 - 0x8130eb39 -SWIDTH1 0x8130ec30 - 0x8130ec39 -SWIDTH1 0x8130ed30 0x8130ed33 - 0x8130ed39 -SWIDTH1 0x8130ee31 - 0x8130ee39 -SWIDTH1 0x8130ef30 - 0x8130ef39 -SWIDTH1 0x8130f030 - 0x8130f039 -SWIDTH1 0x8130f130 - 0x8130f139 -SWIDTH1 0x8130f231 0x8130f232 0x8130f239 -SWIDTH1 0x8130f330 - 0x8130f339 -SWIDTH1 0x8130f430 - 0x8130f435 0x8130f437 - 0x8130f439 -SWIDTH1 0x8130f530 - 0x8130f539 -SWIDTH1 0x8130f630 - 0x8130f639 -SWIDTH1 0x8130f731 - 0x8130f739 -SWIDTH1 0x8130f830 -SWIDTH1 0x8130f932 - 0x8130f939 -SWIDTH1 0x8130fa30 - 0x8130fa39 -SWIDTH1 0x8130fb30 - 0x8130fb38 -SWIDTH1 0x8130fc34 - 0x8130fc38 -SWIDTH1 0x81318132 -SWIDTH1 0x81318237 -SWIDTH1 0x81318331 0x81318333 - 0x81318339 -SWIDTH1 0x81318430 - 0x81318439 -SWIDTH1 0x81318530 - 0x81318538 -SWIDTH1 0x81318634 - 0x81318639 -SWIDTH1 0x81318730 - 0x81318739 -SWIDTH1 0x81318830 - 0x81318835 -SWIDTH1 0x81318936 - 0x81318939 -SWIDTH1 0x81318a30 - 0x81318a39 -SWIDTH1 0x81318b30 - 0x81318b39 -SWIDTH1 0x81318c30 - 0x81318c39 -SWIDTH1 0x81318d30 - 0x81318d39 -SWIDTH1 0x81318e30 - 0x81318e39 -SWIDTH1 0x81318f30 - 0x81318f39 -SWIDTH1 0x81319030 - 0x81319039 -SWIDTH1 0x81319130 - 0x81319139 -SWIDTH1 0x81319230 - 0x81319239 -SWIDTH1 0x81319330 - 0x81319339 -SWIDTH1 0x81319430 - 0x81319439 -SWIDTH1 0x81319530 - 0x81319539 -SWIDTH1 0x81319630 0x81319632 - 0x81319639 -SWIDTH1 0x81319730 - 0x81319737 -SWIDTH1 0x81319830 - 0x81319839 -SWIDTH1 0x81319930 - 0x81319934 0x81319936 - 0x81319939 -SWIDTH1 0x81319a30 - 0x81319a39 -SWIDTH1 0x81319b32 - 0x81319b39 -SWIDTH1 0x81319c30 - 0x81319c39 -SWIDTH1 0x81319d30 - 0x81319d39 -SWIDTH1 0x81319e30 0x81319e34 - 0x81319e39 -SWIDTH1 0x81319f30 - 0x81319f39 -SWIDTH1 0x8131a030 - 0x8131a039 -SWIDTH1 0x8131a130 -SWIDTH1 0x8131a634 - 0x8131a639 -SWIDTH1 0x8131a730 - 0x8131a739 -SWIDTH1 0x8131a830 - 0x8131a839 -SWIDTH1 0x8131a930 - 0x8131a939 -SWIDTH1 0x8131aa30 - 0x8131aa39 -SWIDTH1 0x8131ab30 - 0x8131ab33 -SWIDTH1 0x8131cc39 -SWIDTH1 0x8131cd30 0x8131cd31 0x8131cd33 - 0x8131cd39 -SWIDTH1 0x8131ce30 - 0x8131ce39 -SWIDTH1 0x8131cf30 - 0x8131cf39 -SWIDTH1 0x8131d030 - 0x8131d039 -SWIDTH1 0x8131d130 - 0x8131d139 -SWIDTH1 0x8131d230 - 0x8131d235 0x8131d238 0x8131d239 -SWIDTH1 0x8131d330 - 0x8131d339 -SWIDTH1 0x8131d430 - 0x8131d435 0x8131d438 0x8131d439 -SWIDTH1 0x8131d530 - 0x8131d532 0x8131d536 - 0x8131d539 -SWIDTH1 0x8131d630 - 0x8131d639 -SWIDTH1 0x8131d730 - 0x8131d739 -SWIDTH1 0x8131d830 -SWIDTH1 0x8131d937 - 0x8131d939 -SWIDTH1 0x8131da31 - 0x8131da38 -SWIDTH1 0x8131db31 0x8131db32 0x8131db35 - 0x8131db39 -SWIDTH1 0x8131dc30 - 0x8131dc39 -SWIDTH1 0x8131dd30 - 0x8131dd36 0x8131dd38 0x8131dd39 -SWIDTH1 0x8131de30 - 0x8131de34 0x8131de36 -SWIDTH1 0x8131df30 - 0x8131df33 0x8131df36 0x8131df38 0x8131df39 -SWIDTH1 0x8131e030 - 0x8131e034 0x8131e037 0x8131e038 -SWIDTH1 0x8131e131 - 0x8131e133 -SWIDTH1 0x8131e233 0x8131e238 0x8131e239 -SWIDTH1 0x8131e331 - 0x8131e335 0x8131e338 0x8131e339 -SWIDTH1 0x8131e430 - 0x8131e439 -SWIDTH1 0x8131e530 - 0x8131e538 -SWIDTH1 0x8131e636 0x8131e639 -SWIDTH1 0x8131e730 - 0x8131e734 0x8131e739 -SWIDTH1 0x8131e830 0x8131e833 - 0x8131e839 -SWIDTH1 0x8131e930 - 0x8131e939 -SWIDTH1 0x8131ea30 - 0x8131ea34 0x8131ea36 - 0x8131ea39 -SWIDTH1 0x8131eb30 - 0x8131eb32 0x8131eb34 0x8131eb35 0x8131eb37 0x8131eb38 -SWIDTH1 0x8131ec30 0x8131ec31 0x8131ec34 0x8131ec36 - 0x8131ec39 -SWIDTH1 0x8131ed30 0x8131ed35 0x8131ed36 0x8131ed39 -SWIDTH1 0x8131ee30 0x8131ee31 -SWIDTH1 0x8131ef33 - 0x8131ef36 0x8131ef38 -SWIDTH1 0x8131f036 - 0x8131f039 -SWIDTH1 0x8131f130 - 0x8131f139 -SWIDTH1 0x8131f230 -SWIDTH1 0x8131f333 - 0x8131f335 0x8131f337 - 0x8131f339 -SWIDTH1 0x8131f430 - 0x8131f433 0x8131f435 0x8131f437 - 0x8131f439 -SWIDTH1 0x8131f531 - 0x8131f539 -SWIDTH1 0x8131f630 - 0x8131f639 -SWIDTH1 0x8131f730 - 0x8131f732 0x8131f734 - 0x8131f739 -SWIDTH1 0x8131f830 0x8131f832 0x8131f833 0x8131f835 - 0x8131f839 -SWIDTH1 0x8131f932 - 0x8131f939 -SWIDTH1 0x8131fa30 0x8131fa31 0x8131fa33 - 0x8131fa35 0x8131fa37 - 0x8131fa39 -SWIDTH1 0x8131fb32 -SWIDTH1 0x8131fc38 -SWIDTH1 0x8131fd34 - 0x8131fd39 -SWIDTH1 0x8131fe30 - 0x8131fe33 -SWIDTH1 0x81328231 - 0x81328233 0x81328235 - 0x81328239 -SWIDTH1 0x81328330 - 0x81328332 0x81328335 0x81328336 0x81328339 -SWIDTH1 0x81328430 - 0x81328439 -SWIDTH1 0x81328530 - 0x81328539 -SWIDTH1 0x81328630 0x81328632 - 0x81328638 -SWIDTH1 0x81328730 0x81328731 0x81328734 - 0x81328737 -SWIDTH1 0x81328830 - 0x81328837 -SWIDTH1 0x81328931 0x81328932 0x81328935 - 0x81328937 -SWIDTH1 0x81328a36 0x81328a37 -SWIDTH1 0x81328b32 0x81328b33 0x81328b35 - 0x81328b37 -SWIDTH1 0x81328c32 - 0x81328c39 -SWIDTH1 0x81328d30 - 0x81328d32 -SWIDTH1 0x81328f30 0x81328f31 0x81328f33 - 0x81328f38 -SWIDTH1 0x81329032 - 0x81329034 0x81329036 - 0x81329039 -SWIDTH1 0x81329133 0x81329134 0x81329136 0x81329138 0x81329139 -SWIDTH1 0x81329233 0x81329234 0x81329238 0x81329239 -SWIDTH1 0x81329330 0x81329334 - 0x81329339 -SWIDTH1 0x81329430 0x81329431 0x81329433 - 0x81329435 -SWIDTH1 0x81329530 - 0x81329534 0x81329538 0x81329539 -SWIDTH1 0x81329630 0x81329632 - 0x81329635 -SWIDTH1 0x81329735 -SWIDTH1 0x81329931 - 0x81329939 -SWIDTH1 0x81329a30 - 0x81329a32 -SWIDTH1 0x81329b37 - 0x81329b39 -SWIDTH1 0x81329c31 - 0x81329c38 -SWIDTH1 0x81329d30 - 0x81329d32 0x81329d34 - 0x81329d39 -SWIDTH1 0x81329e30 - 0x81329e39 -SWIDTH1 0x81329f30 - 0x81329f36 0x81329f38 0x81329f39 -SWIDTH1 0x8132a030 - 0x8132a037 0x8132a039 -SWIDTH1 0x8132a130 - 0x8132a133 0x8132a138 0x8132a139 -SWIDTH1 0x8132a230 - 0x8132a234 0x8132a236 - 0x8132a238 -SWIDTH1 0x8132a330 - 0x8132a333 -SWIDTH1 0x8132a431 0x8132a432 -SWIDTH1 0x8132a532 0x8132a533 0x8132a538 0x8132a539 -SWIDTH1 0x8132a630 - 0x8132a637 -SWIDTH1 0x8132a836 0x8132a837 0x8132a839 -SWIDTH1 0x8132a930 - 0x8132a936 0x8132a938 0x8132a939 -SWIDTH1 0x8132aa30 0x8132aa32 - 0x8132aa39 -SWIDTH1 0x8132ab30 - 0x8132ab39 -SWIDTH1 0x8132ac30 - 0x8132ac34 0x8132ac36 - 0x8132ac39 -SWIDTH1 0x8132ad30 - 0x8132ad35 0x8132ad37 - 0x8132ad39 -SWIDTH1 0x8132ae30 0x8132ae31 0x8132ae36 - 0x8132ae39 -SWIDTH1 0x8132af30 - 0x8132af32 0x8132af34 - 0x8132af36 0x8132af38 0x8132af39 -SWIDTH1 0x8132b030 0x8132b031 0x8132b039 -SWIDTH1 0x8132b130 0x8132b138 -SWIDTH1 0x8132b230 0x8132b231 0x8132b236 - 0x8132b239 -SWIDTH1 0x8132b330 - 0x8132b335 -SWIDTH1 0x8132b534 0x8132b535 0x8132b537 - 0x8132b539 -SWIDTH1 0x8132b630 - 0x8132b634 0x8132b636 - 0x8132b638 -SWIDTH1 0x8132b730 - 0x8132b739 -SWIDTH1 0x8132b830 - 0x8132b839 -SWIDTH1 0x8132b930 - 0x8132b932 0x8132b934 - 0x8132b939 -SWIDTH1 0x8132ba30 - 0x8132ba39 -SWIDTH1 0x8132bb34 - 0x8132bb39 -SWIDTH1 0x8132bc32 - 0x8132bc34 0x8132bc36 - 0x8132bc39 -SWIDTH1 0x8132bd39 -SWIDTH1 0x8132be38 0x8132be39 -SWIDTH1 0x8132bf34 - 0x8132bf39 -SWIDTH1 0x8132c030 - 0x8132c033 -SWIDTH1 0x8132c232 0x8132c233 0x8132c235 - 0x8132c239 -SWIDTH1 0x8132c330 - 0x8132c339 -SWIDTH1 0x8132c430 - 0x8132c432 0x8132c436 - 0x8132c439 -SWIDTH1 0x8132c530 - 0x8132c539 -SWIDTH1 0x8132c630 - 0x8132c639 -SWIDTH1 0x8132c731 - 0x8132c739 -SWIDTH1 0x8132c831 0x8132c834 - 0x8132c839 -SWIDTH1 0x8132c930 0x8132c934 0x8132c939 -SWIDTH1 0x8132ca30 - 0x8132ca34 0x8132ca36 0x8132ca38 0x8132ca39 -SWIDTH1 0x8132cb30 - 0x8132cb35 -SWIDTH1 0x8132cd34 - 0x8132cd36 -SWIDTH1 0x8132ce39 -SWIDTH1 0x8132cf30 - 0x8132cf39 -SWIDTH1 0x8132d030 - 0x8132d039 -SWIDTH1 0x8132d130 - 0x8132d139 -SWIDTH1 0x8132d230 - 0x8132d239 -SWIDTH1 0x8132d330 - 0x8132d339 -SWIDTH1 0x8132d430 - 0x8132d436 -SWIDTH1 0x8132d531 - 0x8132d539 -SWIDTH1 0x8132d630 - 0x8132d639 -SWIDTH1 0x8132d730 - 0x8132d739 -SWIDTH1 0x8132db37 0x8132db38 -SWIDTH1 0x8132dc30 0x8132dc33 0x8132dc34 0x8132dc36 0x8132dc39 -SWIDTH1 0x8132dd36 - 0x8132dd39 -SWIDTH1 0x8132de31 - 0x8132de37 0x8132de39 -SWIDTH1 0x8132df30 0x8132df31 0x8132df33 0x8132df35 0x8132df38 0x8132df39 -SWIDTH1 0x8132e031 - 0x8132e039 -SWIDTH1 0x8132e130 - 0x8132e133 0x8132e135 - 0x8132e137 -SWIDTH1 0x8132e230 - 0x8132e234 0x8132e236 0x8132e238 0x8132e239 -SWIDTH1 0x8132e330 - 0x8132e333 0x8132e336 - 0x8132e339 -SWIDTH1 0x8132e430 - 0x8132e435 0x8132e438 0x8132e439 -SWIDTH1 0x8132e834 - 0x8132e839 -SWIDTH1 0x8132e930 - 0x8132e939 -SWIDTH1 0x8132ea30 - 0x8132ea39 -SWIDTH1 0x8132eb30 - 0x8132eb39 -SWIDTH1 0x8132ec30 - 0x8132ec39 -SWIDTH1 0x8132ed30 - 0x8132ed39 -SWIDTH1 0x8132ee30 - 0x8132ee39 -SWIDTH1 0x8132ef30 - 0x8132ef35 0x8132ef37 - 0x8132ef39 -SWIDTH1 0x8132f030 - 0x8132f039 -SWIDTH1 0x8132f130 - 0x8132f139 -SWIDTH1 0x8132f230 - 0x8132f239 -SWIDTH1 0x8132f330 0x8132f337 - 0x8132f339 -SWIDTH1 0x8132f430 - 0x8132f439 -SWIDTH1 0x8132f530 - 0x8132f539 -SWIDTH1 0x8132f630 - 0x8132f633 0x8132f638 0x8132f639 -SWIDTH1 0x8132f730 - 0x8132f735 0x8132f737 - 0x8132f739 -SWIDTH1 0x8132f830 - 0x8132f839 -SWIDTH1 0x8132f930 - 0x8132f939 -SWIDTH1 0x8132fa30 - 0x8132fa39 -SWIDTH1 0x8132fb30 - 0x8132fb32 0x8132fb34 - 0x8132fb39 -SWIDTH1 0x8132fc30 - 0x8132fc38 -SWIDTH1 0x8132fd31 -SWIDTH1 0x81338430 - 0x81338439 -SWIDTH1 0x81338530 - 0x81338539 -SWIDTH1 0x81338630 - 0x81338639 -SWIDTH1 0x81338730 - 0x81338733 0x81338735 - 0x81338739 -SWIDTH1 0x81338831 0x81338832 0x81338834 - 0x81338839 -SWIDTH1 0x81338930 0x81338934 - 0x81338937 -SWIDTH1 0x81338a34 - 0x81338a39 -SWIDTH1 0x81338b30 - 0x81338b39 -SWIDTH1 0x81338c30 - 0x81338c39 -SWIDTH1 0x81339430 - 0x81339439 -SWIDTH1 0x81339530 - 0x81339539 -SWIDTH1 0x81339630 - 0x81339639 -SWIDTH1 0x81339730 - 0x81339737 -SWIDTH1 0x81339838 0x81339839 -SWIDTH1 0x81339930 - 0x81339939 -SWIDTH1 0x81339a30 - 0x81339a39 -SWIDTH1 0x81339b30 - 0x81339b39 -SWIDTH1 0x81339c30 - 0x81339c38 -SWIDTH1 0x81339d31 -SWIDTH1 0x8133a732 - 0x8133a739 -SWIDTH1 0x8133a830 - 0x8133a839 -SWIDTH1 0x8133a930 - 0x8133a939 -SWIDTH1 0x8133aa30 - 0x8133aa39 -SWIDTH1 0x8133ab30 - 0x8133ab39 -SWIDTH1 0x8133ac30 - 0x8133ac39 -SWIDTH1 0x8133ad30 - 0x8133ad38 -SWIDTH1 0x8133ae34 - 0x8133ae39 -SWIDTH1 0x8133af30 - 0x8133af39 -SWIDTH1 0x8133b030 - 0x8133b039 -SWIDTH1 0x8133b130 - 0x8133b139 -SWIDTH1 0x8133b230 - 0x8133b239 -SWIDTH1 0x8133b330 - 0x8133b339 -SWIDTH1 0x8133b430 - 0x8133b439 -SWIDTH1 0x8133b530 - 0x8133b539 -SWIDTH1 0x8133b630 - 0x8133b635 -SWIDTH1 0x8133b732 - 0x8133b738 -SWIDTH1 0x8133b830 - 0x8133b839 -SWIDTH1 0x8133b930 - 0x8133b939 -SWIDTH1 0x8133ba30 - 0x8133ba39 -SWIDTH1 0x8133bb30 - 0x8133bb39 -SWIDTH1 0x8133bc30 - 0x8133bc39 -SWIDTH1 0x8133bd30 - 0x8133bd39 -SWIDTH1 0x8133be30 - 0x8133be32 0x8133be34 0x8133be36 - 0x8133be39 -SWIDTH1 0x8133bf32 - 0x8133bf38 -SWIDTH1 0x8133c030 0x8133c032 - 0x8133c035 0x8133c038 0x8133c039 -SWIDTH1 0x8133c130 - 0x8133c139 -SWIDTH1 0x8133c230 - 0x8133c239 -SWIDTH1 0x8133c330 - 0x8133c339 -SWIDTH1 0x8133c430 - 0x8133c436 0x8133c438 -SWIDTH1 0x8133c530 - 0x8133c533 0x8133c536 - 0x8133c539 -SWIDTH1 0x8133c630 - 0x8133c639 -SWIDTH1 0x8133c730 - 0x8133c739 -SWIDTH1 0x8133c830 - 0x8133c836 0x8133c838 -SWIDTH1 0x8133c930 - 0x8133c933 0x8133c936 - 0x8133c939 -SWIDTH1 0x8133ca30 - 0x8133ca32 0x8133ca34 0x8133ca36 - 0x8133ca39 -SWIDTH1 0x8133cb32 - 0x8133cb38 -SWIDTH1 0x8133cc30 - 0x8133cc36 0x8133cc38 0x8133cc39 -SWIDTH1 0x8133cd30 - 0x8133cd39 -SWIDTH1 0x8133ce30 - 0x8133ce39 -SWIDTH1 0x8133cf30 0x8133cf32 - 0x8133cf39 -SWIDTH1 0x8133d030 - 0x8133d039 -SWIDTH1 0x8133d130 - 0x8133d139 -SWIDTH1 0x8133d230 - 0x8133d232 0x8133d234 0x8133d236 - 0x8133d239 -SWIDTH1 0x8133d332 - 0x8133d338 -SWIDTH1 0x8133d430 - 0x8133d439 -SWIDTH1 0x8133d530 - 0x8133d539 -SWIDTH1 0x8133d630 - 0x8133d639 -SWIDTH1 0x8133d730 - 0x8133d738 -SWIDTH1 0x8133d830 - 0x8133d839 -SWIDTH1 0x8133d930 - 0x8133d938 -SWIDTH1 0x8133da35 - 0x8133da39 -SWIDTH1 0x8133db30 - 0x8133db39 -SWIDTH1 0x8133dc30 - 0x8133dc39 -SWIDTH1 0x8133dd30 - 0x8133dd32 -SWIDTH1 0x8133e038 0x8133e039 -SWIDTH1 0x8133e130 - 0x8133e139 -SWIDTH1 0x8133e230 - 0x8133e239 -SWIDTH1 0x8133e330 - 0x8133e339 -SWIDTH1 0x8133e430 - 0x8133e439 -SWIDTH1 0x8133e530 - 0x8133e539 -SWIDTH1 0x8133e630 - 0x8133e639 -SWIDTH1 0x8133e730 - 0x8133e739 -SWIDTH1 0x8133e830 - 0x8133e839 -SWIDTH1 0x8133e930 - 0x8133e932 -SWIDTH1 0x8133ea35 - 0x8133ea39 -SWIDTH1 0x8133eb30 - 0x8133eb39 -SWIDTH1 0x8133ec30 - 0x8133ec39 -SWIDTH1 0x8133ed30 - 0x8133ed39 -SWIDTH1 0x8133ee30 - 0x8133ee39 -SWIDTH1 0x8133ef30 - 0x8133ef39 -SWIDTH1 0x8133f030 - 0x8133f039 -SWIDTH1 0x8133f130 - 0x8133f139 -SWIDTH1 0x8133f230 - 0x8133f239 -SWIDTH1 0x8133f330 - 0x8133f339 -SWIDTH1 0x8133f430 - 0x8133f439 -SWIDTH1 0x8133f530 - 0x8133f539 -SWIDTH1 0x8133f630 - 0x8133f639 -SWIDTH1 0x8133f730 - 0x8133f739 -SWIDTH1 0x8133f830 - 0x8133f839 -SWIDTH1 0x8133f930 - 0x8133f939 -SWIDTH1 0x8133fa30 - 0x8133fa39 -SWIDTH1 0x8133fb30 - 0x8133fb39 -SWIDTH1 0x8133fc30 - 0x8133fc39 -SWIDTH1 0x8133fd30 - 0x8133fd39 -SWIDTH1 0x8133fe30 - 0x8133fe39 -SWIDTH1 0x81348130 - 0x81348139 -SWIDTH1 0x81348230 - 0x81348239 -SWIDTH1 0x81348330 - 0x81348339 -SWIDTH1 0x81348430 - 0x81348439 -SWIDTH1 0x81348530 - 0x81348539 -SWIDTH1 0x81348630 - 0x81348639 -SWIDTH1 0x81348730 - 0x81348739 -SWIDTH1 0x81348830 - 0x81348839 -SWIDTH1 0x81348930 - 0x81348939 -SWIDTH1 0x81348a30 - 0x81348a39 -SWIDTH1 0x81348b30 - 0x81348b39 -SWIDTH1 0x81348c30 - 0x81348c39 -SWIDTH1 0x81348d30 - 0x81348d39 -SWIDTH1 0x81348e30 - 0x81348e39 -SWIDTH1 0x81348f30 - 0x81348f39 -SWIDTH1 0x81349030 - 0x81349039 -SWIDTH1 0x81349130 - 0x81349139 -SWIDTH1 0x81349230 - 0x81349239 -SWIDTH1 0x81349330 - 0x81349339 -SWIDTH1 0x81349430 - 0x81349439 -SWIDTH1 0x81349530 - 0x81349539 -SWIDTH1 0x81349630 - 0x81349639 -SWIDTH1 0x81349730 - 0x81349739 -SWIDTH1 0x81349830 - 0x81349839 -SWIDTH1 0x81349930 - 0x81349939 -SWIDTH1 0x81349a30 - 0x81349a39 -SWIDTH1 0x81349b30 - 0x81349b39 -SWIDTH1 0x81349c30 - 0x81349c39 -SWIDTH1 0x81349d30 - 0x81349d39 -SWIDTH1 0x81349e30 - 0x81349e39 -SWIDTH1 0x81349f30 - 0x81349f39 -SWIDTH1 0x8134a030 - 0x8134a039 -SWIDTH1 0x8134a130 - 0x8134a139 -SWIDTH1 0x8134a230 - 0x8134a239 -SWIDTH1 0x8134a330 - 0x8134a339 -SWIDTH1 0x8134a430 - 0x8134a439 -SWIDTH1 0x8134a530 - 0x8134a539 -SWIDTH1 0x8134a630 - 0x8134a639 -SWIDTH1 0x8134a730 - 0x8134a739 -SWIDTH1 0x8134a830 - 0x8134a839 -SWIDTH1 0x8134a930 - 0x8134a939 -SWIDTH1 0x8134aa30 - 0x8134aa39 -SWIDTH1 0x8134ab30 - 0x8134ab34 -SWIDTH1 0x8134ac34 - 0x8134ac39 -SWIDTH1 0x8134ad30 - 0x8134ad39 -SWIDTH1 0x8134ae30 - 0x8134ae39 -SWIDTH1 0x8134af30 - 0x8134af32 0x8134af36 - 0x8134af39 -SWIDTH1 0x8134b030 - 0x8134b039 -SWIDTH1 0x8134b130 - 0x8134b139 -SWIDTH1 0x8134b230 - 0x8134b239 -SWIDTH1 0x8134b330 - 0x8134b339 -SWIDTH1 0x8134b430 - 0x8134b439 -SWIDTH1 0x8134b530 - 0x8134b539 -SWIDTH1 0x8134b630 - 0x8134b639 -SWIDTH1 0x8134b730 - 0x8134b736 -SWIDTH1 0x8134b932 - 0x8134b939 -SWIDTH1 0x8134ba30 - 0x8134ba34 0x8134ba36 - 0x8134ba39 -SWIDTH1 0x8134bb30 - 0x8134bb32 -SWIDTH1 0x8134bc34 - 0x8134bc39 -SWIDTH1 0x8134bd30 - 0x8134bd39 -SWIDTH1 0x8134be30 - 0x8134be36 -SWIDTH1 0x8134bf36 - 0x8134bf39 -SWIDTH1 0x8134c030 - 0x8134c039 -SWIDTH1 0x8134c130 - 0x8134c135 -SWIDTH1 0x8134c238 0x8134c239 -SWIDTH1 0x8134c330 - 0x8134c339 -SWIDTH1 0x8134c430 0x8134c432 - 0x8134c434 0x8134c436 0x8134c437 -SWIDTH1 0x8134c630 - 0x8134c639 -SWIDTH1 0x8134c730 - 0x8134c739 -SWIDTH1 0x8134c830 - 0x8134c839 -SWIDTH1 0x8134c930 - 0x8134c939 -SWIDTH1 0x8134ca30 - 0x8134ca39 -SWIDTH1 0x8134cb30 - 0x8134cb39 -SWIDTH1 0x8134cc30 - 0x8134cc39 -SWIDTH1 0x8134cd30 - 0x8134cd39 -SWIDTH1 0x8134ce30 - 0x8134ce39 -SWIDTH1 0x8134cf30 - 0x8134cf32 0x8134cf36 - 0x8134cf39 -SWIDTH1 0x8134d030 - 0x8134d035 -SWIDTH1 0x8134d238 0x8134d239 -SWIDTH1 0x8134d330 - 0x8134d339 -SWIDTH1 0x8134d430 0x8134d431 0x8134d434 - 0x8134d439 -SWIDTH1 0x8134d530 - 0x8134d533 -SWIDTH1 0x8134d630 - 0x8134d639 -SWIDTH1 0x8134d730 - 0x8134d739 -SWIDTH1 0x8134d830 - 0x8134d839 -SWIDTH1 0x8134d930 - 0x8134d939 -SWIDTH1 0x8134da30 - 0x8134da39 -SWIDTH1 0x8134db30 - 0x8134db39 -SWIDTH1 0x8134dc30 - 0x8134dc39 -SWIDTH1 0x8134dd30 - 0x8134dd39 -SWIDTH1 0x8134de30 - 0x8134de37 -SWIDTH1 0x8134df36 - 0x8134df39 -SWIDTH1 0x8134e030 - 0x8134e039 -SWIDTH1 0x8134e130 - 0x8134e139 -SWIDTH1 0x8134e230 - 0x8134e239 -SWIDTH1 0x8134e330 - 0x8134e337 -SWIDTH1 0x8135ee34 - 0x8135ee39 -SWIDTH1 0x8135ef30 - 0x8135ef39 -SWIDTH1 0x8135f030 - 0x8135f039 -SWIDTH1 0x8135f130 - 0x8135f139 -SWIDTH1 0x8135f230 - 0x8135f239 -SWIDTH1 0x8135f330 - 0x8135f339 -SWIDTH1 0x8135f430 - 0x8135f439 -SWIDTH1 0x8135f530 - 0x8135f539 -SWIDTH1 0x8135f630 - 0x8135f639 -SWIDTH1 0x8135f730 - 0x8135f739 -SWIDTH1 0x8135f830 - 0x8135f839 -SWIDTH1 0x8135f930 - 0x8135f939 -SWIDTH1 0x8135fa30 - 0x8135fa39 -SWIDTH1 0x8135fb30 - 0x8135fb39 -SWIDTH1 0x8135fc30 - 0x8135fc39 -SWIDTH1 0x8135fd30 - 0x8135fd39 -SWIDTH1 0x8135fe34 - 0x8135fe39 -SWIDTH1 0x81368130 - 0x81368139 -SWIDTH1 0x81368230 - 0x81368239 -SWIDTH1 0x81368330 - 0x81368339 -SWIDTH1 0x81368430 - 0x81368439 -SWIDTH1 0x81368530 - 0x81368539 -SWIDTH1 0x81368630 - 0x81368639 -SWIDTH1 0x81368730 - 0x81368739 -SWIDTH1 0x81368830 - 0x81368839 -SWIDTH1 0x81368930 - 0x81368933 -SWIDTH1 0x81368a30 - 0x81368a39 -SWIDTH1 0x81368b30 - 0x81368b39 -SWIDTH1 0x81368c30 0x81368c31 0x81368c34 - 0x81368c39 -SWIDTH1 0x81368d32 - 0x81368d39 -SWIDTH1 0x81368e30 - 0x81368e39 -SWIDTH1 0x81368f30 - 0x81368f39 -SWIDTH1 0x81369030 - 0x81369039 -SWIDTH1 0x81369132 - 0x81369137 -SWIDTH1 0x81369230 - 0x81369237 0x81369239 -SWIDTH1 0x81369331 0x81369333 0x81369335 - 0x81369339 -SWIDTH1 0x81369430 - 0x81369439 -SWIDTH1 0x81369530 - 0x81369539 -SWIDTH1 0x81369630 - 0x81369635 0x81369638 0x81369639 -SWIDTH1 0x81369730 - 0x81369739 -SWIDTH1 0x81369830 - 0x81369839 -SWIDTH1 0x81369930 - 0x81369939 -SWIDTH1 0x81369a30 - 0x81369a39 -SWIDTH1 0x81369b30 - 0x81369b39 -SWIDTH1 0x81369c30 0x81369c32 - 0x81369c39 -SWIDTH1 0x81369d30 - 0x81369d36 0x81369d38 0x81369d39 -SWIDTH1 0x81369e30 - 0x81369e39 -SWIDTH1 0x81369f30 0x81369f31 0x81369f34 - 0x81369f39 -SWIDTH1 0x8136a031 - 0x8136a039 -SWIDTH1 0x8136a130 - 0x8136a139 -SWIDTH1 0x8136a232 - 0x8136a234 0x8136a236 - 0x8136a239 -SWIDTH1 0x8136a330 - 0x8136a334 0x8136a336 - 0x8136a339 -SWIDTH1 0x8136a430 - 0x8136a437 -SWIDTH1 0x8136a532 - 0x8136a539 -SWIDTH1 0x8136a630 - 0x8136a636 -SWIDTH1 0x8136a732 - 0x8136a739 -SWIDTH1 0x8136a830 - 0x8136a839 -SWIDTH1 0x8136a930 - 0x8136a939 -SWIDTH1 0x8136aa30 - 0x8136aa32 0x8136aa37 -SWIDTH1 0x8136ab35 -SWIDTH1 0x8136ad32 0x8136ad33 0x8136ad36 - 0x8136ad39 -SWIDTH1 0x8136ae30 - 0x8136ae39 -SWIDTH1 0x8136af30 - 0x8136af39 -SWIDTH1 0x8136b030 - 0x8136b032 -SWIDTH1 0x8136b230 - 0x8136b239 -SWIDTH1 0x8136b330 - 0x8136b336 -SWIDTH1 0x8136b637 - 0x8136b639 -SWIDTH1 0x8136b730 - 0x8136b739 -SWIDTH1 0x8136b830 - 0x8136b839 -SWIDTH1 0x8136b930 - 0x8136b933 -SWIDTH1 0x8136bb35 - 0x8136bb39 -SWIDTH1 0x8136bc30 - 0x8136bc39 -SWIDTH1 0x8136bd30 - 0x8136bd39 -SWIDTH1 0x8136be30 - 0x8136be39 -SWIDTH1 0x8136bf30 - 0x8136bf39 -SWIDTH1 0x8136c030 - 0x8136c038 -SWIDTH1 0x8136c131 - 0x8136c139 -SWIDTH1 0x8136c230 - 0x8136c235 -SWIDTH1 0x8136c333 - 0x8136c339 -SWIDTH1 0x8136c430 - 0x8136c439 -SWIDTH1 0x8136c530 - 0x8136c539 -SWIDTH1 0x8136c732 - 0x8136c739 -SWIDTH1 0x8136c830 - 0x8136c839 -SWIDTH1 0x8136c930 - 0x8136c939 -SWIDTH1 0x8136ca30 - 0x8136ca39 -SWIDTH1 0x8136cb30 - 0x8136cb39 -SWIDTH1 0x8136cc30 - 0x8136cc39 -SWIDTH1 0x8136cd30 - 0x8136cd39 -SWIDTH1 0x8136ce30 - 0x8136ce39 -SWIDTH1 0x8136cf30 - 0x8136cf39 -SWIDTH1 0x8136d030 - 0x8136d039 -SWIDTH1 0x8136d130 - 0x8136d139 -SWIDTH1 0x8136d230 - 0x8136d239 -SWIDTH1 0x8136d330 - 0x8136d339 -SWIDTH1 0x8136d430 - 0x8136d439 -SWIDTH1 0x8136d530 - 0x8136d539 -SWIDTH1 0x8136d630 - 0x8136d639 -SWIDTH1 0x8136d730 - 0x8136d739 -SWIDTH1 0x8136d830 - 0x8136d839 -SWIDTH1 0x8136d930 - 0x8136d939 -SWIDTH1 0x8136da30 - 0x8136da39 -SWIDTH1 0x8136db30 - 0x8136db39 -SWIDTH1 0x8136dc30 - 0x8136dc39 -SWIDTH1 0x8136dd30 - 0x8136dd39 -SWIDTH1 0x8136de30 - 0x8136de39 -SWIDTH1 0x8136df30 - 0x8136df39 -SWIDTH1 0x8136e030 - 0x8136e039 -SWIDTH1 0x8136e130 - 0x8136e139 -SWIDTH1 0x8136e230 - 0x8136e239 -SWIDTH1 0x8136e330 - 0x8136e339 -SWIDTH1 0x8136e430 - 0x8136e439 -SWIDTH1 0x8136e530 - 0x8136e539 -SWIDTH1 0x8136e630 - 0x8136e639 -SWIDTH1 0x8136e730 - 0x8136e739 -SWIDTH1 0x8136e830 - 0x8136e839 -SWIDTH1 0x8136e930 - 0x8136e939 -SWIDTH1 0x8136ea30 - 0x8136ea39 -SWIDTH1 0x8136eb30 - 0x8136eb34 0x8136eb37 - 0x8136eb39 -SWIDTH1 0x8136ec30 - 0x8136ec39 -SWIDTH1 0x8136ed30 - 0x8136ed39 -SWIDTH1 0x8136ee30 - 0x8136ee39 -SWIDTH1 0x8136ef30 - 0x8136ef39 -SWIDTH1 0x8136f030 - 0x8136f039 -SWIDTH1 0x8136f130 - 0x8136f139 -SWIDTH1 0x8136f230 - 0x8136f239 -SWIDTH1 0x8136f330 - 0x8136f339 -SWIDTH1 0x8136f430 - 0x8136f439 -SWIDTH1 0x8136f530 - 0x8136f539 -SWIDTH1 0x8136f630 - 0x8136f639 -SWIDTH1 0x8136f730 - 0x8136f739 -SWIDTH1 0x8136f830 - 0x8136f839 -SWIDTH1 0x8136f930 - 0x8136f939 -SWIDTH1 0x8136fa30 - 0x8136fa39 -SWIDTH1 0x8136fb30 - 0x8136fb39 -SWIDTH1 0x8136fc30 -SWIDTH1 0x81378330 - 0x81378339 -SWIDTH1 0x81378430 - 0x81378439 -SWIDTH1 0x81378530 - 0x81378539 -SWIDTH1 0x81378630 - 0x81378638 -SWIDTH1 0x81378934 - 0x81378939 -SWIDTH1 0x81378a30 - 0x81378a34 -SWIDTH1 0x81378c36 - 0x81378c39 -SWIDTH1 0x81378d30 - 0x81378d39 -SWIDTH1 0x81378e30 - 0x81378e39 -SWIDTH1 0x81378f30 - 0x81378f39 -SWIDTH1 0x81379030 - 0x81379039 -SWIDTH1 0x81379130 - 0x81379139 -SWIDTH1 0x81379230 - 0x81379239 -SWIDTH1 0x81379330 - 0x81379339 -SWIDTH1 0x81379430 - 0x81379439 -SWIDTH1 0x81379530 - 0x81379539 -SWIDTH1 0x81379630 - 0x81379639 -SWIDTH1 0x81379730 - 0x81379734 0x81379736 - 0x81379739 -SWIDTH1 0x81379830 - 0x81379839 -SWIDTH1 0x81379930 - 0x81379939 -SWIDTH1 0x81379a30 - 0x81379a39 -SWIDTH1 0x81379b30 - 0x81379b39 -SWIDTH1 0x81379c30 - 0x81379c39 -SWIDTH1 0x81379d30 - 0x81379d39 -SWIDTH1 0x81379e30 - 0x81379e39 -SWIDTH1 0x81379f30 - 0x81379f39 -SWIDTH1 0x8137a030 - 0x8137a039 -SWIDTH1 0x8137a130 - 0x8137a139 -SWIDTH1 0x8137a230 - 0x8137a239 -SWIDTH1 0x8137a330 - 0x8137a339 -SWIDTH1 0x8137a430 - 0x8137a433 0x8137a436 0x8137a437 0x8137a439 -SWIDTH1 0x8137a530 - 0x8137a539 -SWIDTH1 0x8137a630 - 0x8137a639 -SWIDTH1 0x8137a730 - 0x8137a739 -SWIDTH1 0x8137a830 - 0x8137a839 -SWIDTH1 0x8137a930 - 0x8137a939 -SWIDTH1 0x8137aa30 - 0x8137aa39 -SWIDTH1 0x8137ab30 - 0x8137ab39 -SWIDTH1 0x8137ac30 - 0x8137ac39 -SWIDTH1 0x8137ad30 - 0x8137ad39 -SWIDTH1 0x8137ae30 - 0x8137ae37 -SWIDTH1 0x8137af30 - 0x8137af39 -SWIDTH1 0x8137bb39 -SWIDTH1 0x8137bc30 - 0x8137bc32 0x8137bc34 - 0x8137bc37 -SWIDTH1 0x8137bd30 - 0x8137bd39 -SWIDTH1 0x8137be30 - 0x8137be39 -SWIDTH1 0x8137bf30 - 0x8137bf37 0x8137bf39 -SWIDTH1 0x8137c030 - 0x8137c039 -SWIDTH1 0x8137c130 - 0x8137c139 -SWIDTH1 0x8137c230 - 0x8137c239 -SWIDTH1 0x8137c330 - 0x8137c333 0x8137c335 0x8137c337 - 0x8137c339 -SWIDTH1 0x8137c430 0x8137c434 0x8137c436 - 0x8137c439 -SWIDTH1 0x8137c530 - 0x8137c532 0x8137c535 - 0x8137c539 -SWIDTH1 0x8137c630 - 0x8137c639 -SWIDTH1 0x8137c730 - 0x8137c739 -SWIDTH1 0x8137c830 - 0x8137c839 -SWIDTH1 0x8137c930 - 0x8137c939 -SWIDTH1 0x8137ca30 - 0x8137ca36 -SWIDTH1 0x8137cb30 - 0x8137cb39 -SWIDTH1 0x8137cc30 - 0x8137cc39 -SWIDTH1 0x8137cd30 - 0x8137cd33 0x8137cd35 - 0x8137cd39 -SWIDTH1 0x8137ce30 - 0x8137ce38 -SWIDTH1 0x8137d036 - 0x8137d039 -SWIDTH1 0x8137d130 - 0x8137d139 -SWIDTH1 0x8137d230 - 0x8137d239 -SWIDTH1 0x8137d330 - 0x8137d333 0x8137d338 0x8137d339 -SWIDTH1 0x8137d430 - 0x8137d439 -SWIDTH1 0x8137d530 - 0x8137d539 -SWIDTH1 0x8137d630 - 0x8137d639 -SWIDTH1 0x8137d730 - 0x8137d739 -SWIDTH1 0x8137d830 - 0x8137d839 -SWIDTH1 0x8137d930 - 0x8137d939 -SWIDTH1 0x8137da30 - 0x8137da39 -SWIDTH1 0x8137db30 - 0x8137db39 -SWIDTH1 0x8137dc30 - 0x8137dc39 -SWIDTH1 0x8137dd30 - 0x8137dd39 -SWIDTH1 0x8137de30 - 0x8137de39 -SWIDTH1 0x8137df30 - 0x8137df39 -SWIDTH1 0x8137e030 - 0x8137e039 -SWIDTH1 0x8137e130 - 0x8137e139 -SWIDTH1 0x8137e230 - 0x8137e239 -SWIDTH1 0x8137e330 - 0x8137e339 -SWIDTH1 0x8137e430 - 0x8137e439 -SWIDTH1 0x8137e530 - 0x8137e539 -SWIDTH1 0x8137e630 - 0x8137e639 -SWIDTH1 0x8137e730 - 0x8137e739 -SWIDTH1 0x8137e830 - 0x8137e839 -SWIDTH1 0x8137e930 - 0x8137e939 -SWIDTH1 0x8137ea30 - 0x8137ea39 -SWIDTH1 0x8137eb30 - 0x8137eb39 -SWIDTH1 0x8137ec30 - 0x8137ec39 -SWIDTH1 0x8137ed30 - 0x8137ed39 -SWIDTH1 0x8137ee30 - 0x8137ee39 -SWIDTH1 0x8137ef30 - 0x8137ef39 -SWIDTH1 0x8137f030 - 0x8137f039 -SWIDTH1 0x8137f130 - 0x8137f139 -SWIDTH1 0x8137f230 - 0x8137f239 -SWIDTH1 0x8137f330 - 0x8137f339 -SWIDTH1 0x8137f430 - 0x8137f439 -SWIDTH1 0x8137f530 - 0x8137f539 -SWIDTH1 0x8137f630 - 0x8137f639 -SWIDTH1 0x8137f730 - 0x8137f739 -SWIDTH1 0x8137f830 - 0x8137f839 -SWIDTH1 0x8137f930 - 0x8137f939 -SWIDTH1 0x8137fa30 - 0x8137fa39 -SWIDTH1 0x8137fb30 - 0x8137fb39 -SWIDTH1 0x8137fc30 - 0x8137fc39 -SWIDTH1 0x8137fd30 - 0x8137fd39 -SWIDTH1 0x8137fe30 - 0x8137fe39 -SWIDTH1 0x81388130 - 0x81388139 -SWIDTH1 0x81388230 - 0x81388239 -SWIDTH1 0x81388330 - 0x81388339 -SWIDTH1 0x81388430 - 0x81388439 -SWIDTH1 0x81388530 - 0x81388539 -SWIDTH1 0x81388630 - 0x81388639 -SWIDTH1 0x81388730 - 0x81388739 -SWIDTH1 0x81388830 - 0x81388839 -SWIDTH1 0x81388930 - 0x81388939 -SWIDTH1 0x81388a30 - 0x81388a39 -SWIDTH1 0x81388b30 - 0x81388b39 -SWIDTH1 0x81388c30 - 0x81388c39 -SWIDTH1 0x81388d30 - 0x81388d39 -SWIDTH1 0x81388e30 - 0x81388e39 -SWIDTH1 0x81388f30 - 0x81388f39 -SWIDTH1 0x81389030 - 0x81389039 -SWIDTH1 0x81389130 - 0x81389139 -SWIDTH1 0x81389230 - 0x81389239 -SWIDTH1 0x81389330 - 0x81389339 -SWIDTH1 0x81389430 - 0x81389439 -SWIDTH1 0x81389530 - 0x81389539 -SWIDTH1 0x81389630 - 0x81389639 -SWIDTH1 0x81389730 - 0x81389739 -SWIDTH1 0x81389830 - 0x81389839 -SWIDTH1 0x81389930 - 0x81389939 -SWIDTH1 0x81389a30 - 0x81389a39 -SWIDTH1 0x81389b30 - 0x81389b39 -SWIDTH1 0x81389c30 - 0x81389c39 -SWIDTH1 0x81389d30 - 0x81389d39 -SWIDTH1 0x81389e30 - 0x81389e39 -SWIDTH1 0x81389f30 - 0x81389f39 -SWIDTH1 0x8138a030 - 0x8138a039 -SWIDTH1 0x8138a130 - 0x8138a139 -SWIDTH1 0x8138a230 - 0x8138a239 -SWIDTH1 0x8138a330 - 0x8138a339 -SWIDTH1 0x8138a430 0x8138a431 -SWIDTH1 0x8139a634 -SWIDTH1 0x8336c739 -SWIDTH1 0x8336c830 - 0x8336c839 -SWIDTH1 0x8336c930 - 0x8336c939 -SWIDTH1 0x8336ca30 - 0x8336ca39 -SWIDTH1 0x8336cb30 - 0x8336cb39 -SWIDTH1 0x8336cc30 - 0x8336cc39 -SWIDTH1 0x8336cd30 - 0x8336cd39 -SWIDTH1 0x8336ce30 - 0x8336ce39 -SWIDTH1 0x8336cf30 - 0x8336cf39 -SWIDTH1 0x8336d030 - 0x8336d039 -SWIDTH1 0x8336d130 - 0x8336d139 -SWIDTH1 0x8336d230 - 0x8336d239 -SWIDTH1 0x8336d330 - 0x8336d339 -SWIDTH1 0x8336d430 - 0x8336d439 -SWIDTH1 0x8336d530 - 0x8336d539 -SWIDTH1 0x8336d630 - 0x8336d639 -SWIDTH1 0x8336d730 - 0x8336d739 -SWIDTH1 0x8336d830 - 0x8336d839 -SWIDTH1 0x8336d930 - 0x8336d939 -SWIDTH1 0x8336da30 - 0x8336da39 -SWIDTH1 0x8336db30 - 0x8336db39 -SWIDTH1 0x8336dc30 - 0x8336dc39 -SWIDTH1 0x8336dd30 - 0x8336dd39 -SWIDTH1 0x8336de30 - 0x8336de39 -SWIDTH1 0x8336df30 - 0x8336df39 -SWIDTH1 0x8336e030 - 0x8336e039 -SWIDTH1 0x8336e130 - 0x8336e139 -SWIDTH1 0x8336e230 - 0x8336e239 -SWIDTH1 0x8336e330 - 0x8336e339 -SWIDTH1 0x8336e430 - 0x8336e439 -SWIDTH1 0x8336e530 - 0x8336e539 -SWIDTH1 0x8336e630 - 0x8336e639 -SWIDTH1 0x8336e730 - 0x8336e739 -SWIDTH1 0x8336e830 - 0x8336e839 -SWIDTH1 0x8336e930 - 0x8336e939 -SWIDTH1 0x8336ea30 - 0x8336ea39 -SWIDTH1 0x8336eb30 - 0x8336eb39 -SWIDTH1 0x8336ec30 - 0x8336ec39 -SWIDTH1 0x8336ed30 - 0x8336ed39 -SWIDTH1 0x8336ee30 - 0x8336ee39 -SWIDTH1 0x8336ef30 - 0x8336ef39 -SWIDTH1 0x8336f030 - 0x8336f039 -SWIDTH1 0x8336f130 - 0x8336f139 -SWIDTH1 0x8336f230 - 0x8336f239 -SWIDTH1 0x8336f330 - 0x8336f339 -SWIDTH1 0x8336f430 - 0x8336f439 -SWIDTH1 0x8336f530 - 0x8336f539 -SWIDTH1 0x8336f630 - 0x8336f639 -SWIDTH1 0x8336f730 - 0x8336f739 -SWIDTH1 0x8336f830 - 0x8336f839 -SWIDTH1 0x8336f930 - 0x8336f939 -SWIDTH1 0x8336fa30 - 0x8336fa39 -SWIDTH1 0x8336fb30 - 0x8336fb39 -SWIDTH1 0x8336fc30 - 0x8336fc39 -SWIDTH1 0x8336fd30 - 0x8336fd39 -SWIDTH1 0x8336fe30 - 0x8336fe39 -SWIDTH1 0x83378130 - 0x83378139 -SWIDTH1 0x83378230 - 0x83378239 -SWIDTH1 0x83378330 - 0x83378339 -SWIDTH1 0x83378430 - 0x83378439 -SWIDTH1 0x83378530 - 0x83378539 -SWIDTH1 0x83378630 - 0x83378639 -SWIDTH1 0x83378730 - 0x83378739 -SWIDTH1 0x83378830 - 0x83378839 -SWIDTH1 0x83378930 - 0x83378939 -SWIDTH1 0x83378a30 - 0x83378a39 -SWIDTH1 0x83378b30 - 0x83378b39 -SWIDTH1 0x83378c30 - 0x83378c39 -SWIDTH1 0x83378d30 - 0x83378d39 -SWIDTH1 0x83378e30 - 0x83378e39 -SWIDTH1 0x83378f30 - 0x83378f39 -SWIDTH1 0x83379030 - 0x83379039 -SWIDTH1 0x83379130 - 0x83379139 -SWIDTH1 0x83379230 - 0x83379239 -SWIDTH1 0x83379330 - 0x83379339 -SWIDTH1 0x83379430 - 0x83379439 -SWIDTH1 0x83379530 - 0x83379539 -SWIDTH1 0x83379630 - 0x83379639 -SWIDTH1 0x83379730 - 0x83379739 -SWIDTH1 0x83379830 - 0x83379839 -SWIDTH1 0x83379930 - 0x83379939 -SWIDTH1 0x83379a30 - 0x83379a39 -SWIDTH1 0x83379b30 - 0x83379b39 -SWIDTH1 0x83379c30 - 0x83379c39 -SWIDTH1 0x83379d30 - 0x83379d39 -SWIDTH1 0x83379e30 - 0x83379e39 -SWIDTH1 0x83379f30 - 0x83379f39 -SWIDTH1 0x8337a030 - 0x8337a039 -SWIDTH1 0x8337a130 - 0x8337a139 -SWIDTH1 0x8337a230 - 0x8337a239 -SWIDTH1 0x8337a330 - 0x8337a339 -SWIDTH1 0x8337a430 - 0x8337a439 -SWIDTH1 0x8337a530 - 0x8337a539 -SWIDTH1 0x8337a630 - 0x8337a639 -SWIDTH1 0x8337a730 - 0x8337a739 -SWIDTH1 0x8337a830 - 0x8337a839 -SWIDTH1 0x8337a930 - 0x8337a939 -SWIDTH1 0x8337aa30 - 0x8337aa39 -SWIDTH1 0x8337ab30 - 0x8337ab39 -SWIDTH1 0x8337ac30 - 0x8337ac39 -SWIDTH1 0x8337ad30 - 0x8337ad39 -SWIDTH1 0x8337ae30 - 0x8337ae39 -SWIDTH1 0x8337af30 - 0x8337af39 -SWIDTH1 0x8337b030 - 0x8337b039 -SWIDTH1 0x8337b130 - 0x8337b139 -SWIDTH1 0x8337b230 - 0x8337b239 -SWIDTH1 0x8337b330 - 0x8337b339 -SWIDTH1 0x8337b430 - 0x8337b439 -SWIDTH1 0x8337b530 - 0x8337b539 -SWIDTH1 0x8337b630 - 0x8337b639 -SWIDTH1 0x8337b730 - 0x8337b739 -SWIDTH1 0x8337b830 - 0x8337b839 -SWIDTH1 0x8337b930 - 0x8337b939 -SWIDTH1 0x8337ba30 - 0x8337ba39 -SWIDTH1 0x8337bb30 - 0x8337bb39 -SWIDTH1 0x8337bc30 - 0x8337bc39 -SWIDTH1 0x8337bd30 - 0x8337bd39 -SWIDTH1 0x8337be30 - 0x8337be39 -SWIDTH1 0x8337bf30 - 0x8337bf39 -SWIDTH1 0x8337c030 - 0x8337c039 -SWIDTH1 0x8337c130 - 0x8337c139 -SWIDTH1 0x8337c230 - 0x8337c239 -SWIDTH1 0x8337c330 - 0x8337c339 -SWIDTH1 0x8337c430 - 0x8337c439 -SWIDTH1 0x8337c530 - 0x8337c539 -SWIDTH1 0x8337c630 - 0x8337c639 -SWIDTH1 0x8337c730 - 0x8337c739 -SWIDTH1 0x8337c830 - 0x8337c839 -SWIDTH1 0x8337c930 - 0x8337c939 -SWIDTH1 0x8337ca30 - 0x8337ca39 -SWIDTH1 0x8337cb30 - 0x8337cb39 -SWIDTH1 0x8337cc30 - 0x8337cc39 -SWIDTH1 0x8337cd30 - 0x8337cd39 -SWIDTH1 0x8337ce30 - 0x8337ce39 -SWIDTH1 0x8337cf30 - 0x8337cf39 -SWIDTH1 0x8337d030 - 0x8337d039 -SWIDTH1 0x8337d130 - 0x8337d139 -SWIDTH1 0x8337d230 - 0x8337d239 -SWIDTH1 0x8337d330 - 0x8337d339 -SWIDTH1 0x8337d430 - 0x8337d439 -SWIDTH1 0x8337d530 - 0x8337d539 -SWIDTH1 0x8337d630 - 0x8337d639 -SWIDTH1 0x8337d730 - 0x8337d739 -SWIDTH1 0x8337d830 - 0x8337d839 -SWIDTH1 0x8337d930 - 0x8337d939 -SWIDTH1 0x8337da30 - 0x8337da39 -SWIDTH1 0x8337db30 - 0x8337db39 -SWIDTH1 0x8337dc30 - 0x8337dc39 -SWIDTH1 0x8337dd30 - 0x8337dd39 -SWIDTH1 0x8337de30 - 0x8337de39 -SWIDTH1 0x8337df30 - 0x8337df39 -SWIDTH1 0x8337e030 - 0x8337e039 -SWIDTH1 0x8337e130 - 0x8337e139 -SWIDTH1 0x8337e230 - 0x8337e239 -SWIDTH1 0x8337e330 - 0x8337e339 -SWIDTH1 0x8337e430 - 0x8337e439 -SWIDTH1 0x8337e530 - 0x8337e539 -SWIDTH1 0x8337e630 - 0x8337e639 -SWIDTH1 0x8337e730 - 0x8337e739 -SWIDTH1 0x8337e830 - 0x8337e839 -SWIDTH1 0x8337e930 - 0x8337e939 -SWIDTH1 0x8337ea30 - 0x8337ea39 -SWIDTH1 0x8337eb30 - 0x8337eb39 -SWIDTH1 0x8337ec30 - 0x8337ec39 -SWIDTH1 0x8337ed30 - 0x8337ed39 -SWIDTH1 0x8337ee30 - 0x8337ee39 -SWIDTH1 0x8337ef30 - 0x8337ef39 -SWIDTH1 0x8337f030 - 0x8337f039 -SWIDTH1 0x8337f130 - 0x8337f139 -SWIDTH1 0x8337f230 - 0x8337f239 -SWIDTH1 0x8337f330 - 0x8337f339 -SWIDTH1 0x8337f430 - 0x8337f439 -SWIDTH1 0x8337f530 - 0x8337f539 -SWIDTH1 0x8337f630 - 0x8337f639 -SWIDTH1 0x8337f730 - 0x8337f739 -SWIDTH1 0x8337f830 - 0x8337f839 -SWIDTH1 0x8337f930 - 0x8337f939 -SWIDTH1 0x8337fa30 - 0x8337fa39 -SWIDTH1 0x8337fb30 - 0x8337fb39 -SWIDTH1 0x8337fc30 - 0x8337fc39 -SWIDTH1 0x8337fd30 - 0x8337fd39 -SWIDTH1 0x8337fe30 - 0x8337fe39 -SWIDTH1 0x83388130 - 0x83388139 -SWIDTH1 0x83388230 - 0x83388239 -SWIDTH1 0x83388330 - 0x83388339 -SWIDTH1 0x83388430 - 0x83388439 -SWIDTH1 0x83388530 - 0x83388539 -SWIDTH1 0x83388630 - 0x83388639 -SWIDTH1 0x83388730 - 0x83388739 -SWIDTH1 0x83388830 - 0x83388839 -SWIDTH1 0x83388930 - 0x83388939 -SWIDTH1 0x83388a30 - 0x83388a39 -SWIDTH1 0x83388b30 - 0x83388b39 -SWIDTH1 0x83388c30 - 0x83388c39 -SWIDTH1 0x83388d30 - 0x83388d39 -SWIDTH1 0x83388e30 - 0x83388e39 -SWIDTH1 0x83388f30 - 0x83388f39 -SWIDTH1 0x83389030 - 0x83389039 -SWIDTH1 0x83389130 - 0x83389139 -SWIDTH1 0x83389230 - 0x83389239 -SWIDTH1 0x83389330 - 0x83389339 -SWIDTH1 0x83389430 - 0x83389439 -SWIDTH1 0x83389530 - 0x83389539 -SWIDTH1 0x83389630 - 0x83389639 -SWIDTH1 0x83389730 - 0x83389739 -SWIDTH1 0x83389830 - 0x83389839 -SWIDTH1 0x83389930 - 0x83389939 -SWIDTH1 0x83389a30 - 0x83389a39 -SWIDTH1 0x83389b30 - 0x83389b39 -SWIDTH1 0x83389c30 - 0x83389c39 -SWIDTH1 0x83389d30 - 0x83389d39 -SWIDTH1 0x83389e30 - 0x83389e39 -SWIDTH1 0x83389f30 - 0x83389f39 -SWIDTH1 0x8338a030 - 0x8338a039 -SWIDTH1 0x8338a130 - 0x8338a139 -SWIDTH1 0x8338a230 - 0x8338a239 -SWIDTH1 0x8338a330 - 0x8338a339 -SWIDTH1 0x8338a430 - 0x8338a439 -SWIDTH1 0x8338a530 - 0x8338a539 -SWIDTH1 0x8338a630 - 0x8338a639 -SWIDTH1 0x8338a730 - 0x8338a739 -SWIDTH1 0x8338a830 - 0x8338a839 -SWIDTH1 0x8338a930 - 0x8338a939 -SWIDTH1 0x8338aa30 - 0x8338aa39 -SWIDTH1 0x8338ab30 - 0x8338ab39 -SWIDTH1 0x8338ac30 - 0x8338ac39 -SWIDTH1 0x8338ad30 - 0x8338ad39 -SWIDTH1 0x8338ae30 - 0x8338ae39 -SWIDTH1 0x8338af30 - 0x8338af39 -SWIDTH1 0x8338b030 - 0x8338b039 -SWIDTH1 0x8338b130 - 0x8338b139 -SWIDTH1 0x8338b230 - 0x8338b239 -SWIDTH1 0x8338b330 - 0x8338b339 -SWIDTH1 0x8338b430 - 0x8338b439 -SWIDTH1 0x8338b530 - 0x8338b539 -SWIDTH1 0x8338b630 - 0x8338b639 -SWIDTH1 0x8338b730 - 0x8338b739 -SWIDTH1 0x8338b830 - 0x8338b839 -SWIDTH1 0x8338b930 - 0x8338b939 -SWIDTH1 0x8338ba30 - 0x8338ba39 -SWIDTH1 0x8338bb30 - 0x8338bb39 -SWIDTH1 0x8338bc30 - 0x8338bc39 -SWIDTH1 0x8338bd30 - 0x8338bd39 -SWIDTH1 0x8338be30 - 0x8338be39 -SWIDTH1 0x8338bf30 - 0x8338bf39 -SWIDTH1 0x8338c030 - 0x8338c039 -SWIDTH1 0x8338c130 - 0x8338c139 -SWIDTH1 0x8338c230 - 0x8338c239 -SWIDTH1 0x8338c330 - 0x8338c339 -SWIDTH1 0x8338c430 - 0x8338c439 -SWIDTH1 0x8338c530 - 0x8338c539 -SWIDTH1 0x8338c630 - 0x8338c639 -SWIDTH1 0x8338c730 - 0x8338c739 -SWIDTH1 0x8338c830 - 0x8338c839 -SWIDTH1 0x8338c930 - 0x8338c939 -SWIDTH1 0x8338ca30 - 0x8338ca39 -SWIDTH1 0x8338cb30 - 0x8338cb39 -SWIDTH1 0x8338cc30 - 0x8338cc39 -SWIDTH1 0x8338cd30 - 0x8338cd39 -SWIDTH1 0x8338ce30 - 0x8338ce39 -SWIDTH1 0x8338cf30 - 0x8338cf39 -SWIDTH1 0x8338d030 - 0x8338d039 -SWIDTH1 0x8338d130 - 0x8338d139 -SWIDTH1 0x8338d230 - 0x8338d239 -SWIDTH1 0x8338d330 - 0x8338d339 -SWIDTH1 0x8338d430 - 0x8338d439 -SWIDTH1 0x8338d530 - 0x8338d539 -SWIDTH1 0x8338d630 - 0x8338d639 -SWIDTH1 0x8338d730 - 0x8338d739 -SWIDTH1 0x8338d830 - 0x8338d839 -SWIDTH1 0x8338d930 - 0x8338d939 -SWIDTH1 0x8338da30 - 0x8338da39 -SWIDTH1 0x8338db30 - 0x8338db39 -SWIDTH1 0x8338dc30 - 0x8338dc39 -SWIDTH1 0x8338dd30 - 0x8338dd39 -SWIDTH1 0x8338de30 - 0x8338de39 -SWIDTH1 0x8338df30 - 0x8338df39 -SWIDTH1 0x8338e030 - 0x8338e039 -SWIDTH1 0x8338e130 - 0x8338e139 -SWIDTH1 0x8338e230 - 0x8338e239 -SWIDTH1 0x8338e330 - 0x8338e339 -SWIDTH1 0x8338e430 - 0x8338e439 -SWIDTH1 0x8338e530 - 0x8338e539 -SWIDTH1 0x8338e630 - 0x8338e639 -SWIDTH1 0x8338e730 - 0x8338e739 -SWIDTH1 0x8338e830 - 0x8338e839 -SWIDTH1 0x8338e930 - 0x8338e939 -SWIDTH1 0x8338ea30 - 0x8338ea39 -SWIDTH1 0x8338eb30 - 0x8338eb39 -SWIDTH1 0x8338ec30 - 0x8338ec39 -SWIDTH1 0x8338ed30 - 0x8338ed39 -SWIDTH1 0x8338ee30 - 0x8338ee39 -SWIDTH1 0x8338ef30 - 0x8338ef39 -SWIDTH1 0x8338f030 - 0x8338f039 -SWIDTH1 0x8338f130 - 0x8338f139 -SWIDTH1 0x8338f230 - 0x8338f239 -SWIDTH1 0x8338f330 - 0x8338f339 -SWIDTH1 0x8338f430 - 0x8338f439 -SWIDTH1 0x8338f530 - 0x8338f539 -SWIDTH1 0x8338f630 - 0x8338f639 -SWIDTH1 0x8338f730 - 0x8338f739 -SWIDTH1 0x8338f830 - 0x8338f839 -SWIDTH1 0x8338f930 - 0x8338f939 -SWIDTH1 0x8338fa30 - 0x8338fa39 -SWIDTH1 0x8338fb30 - 0x8338fb39 -SWIDTH1 0x8338fc30 - 0x8338fc39 -SWIDTH1 0x8338fd30 - 0x8338fd39 -SWIDTH1 0x8338fe30 - 0x8338fe39 -SWIDTH1 0x83398130 - 0x83398139 -SWIDTH1 0x83398230 - 0x83398239 -SWIDTH1 0x83398330 - 0x83398339 -SWIDTH1 0x83398430 - 0x83398439 -SWIDTH1 0x83398530 - 0x83398539 -SWIDTH1 0x83398630 - 0x83398639 -SWIDTH1 0x83398730 - 0x83398739 -SWIDTH1 0x83398830 - 0x83398839 -SWIDTH1 0x83398930 - 0x83398939 -SWIDTH1 0x83398a30 - 0x83398a39 -SWIDTH1 0x83398b30 - 0x83398b39 -SWIDTH1 0x83398c30 - 0x83398c39 -SWIDTH1 0x83398d30 - 0x83398d39 -SWIDTH1 0x83398e30 - 0x83398e39 -SWIDTH1 0x83398f30 - 0x83398f39 -SWIDTH1 0x83399030 - 0x83399039 -SWIDTH1 0x83399130 - 0x83399139 -SWIDTH1 0x83399230 - 0x83399239 -SWIDTH1 0x83399330 - 0x83399339 -SWIDTH1 0x83399430 - 0x83399439 -SWIDTH1 0x83399530 - 0x83399539 -SWIDTH1 0x83399630 - 0x83399639 -SWIDTH1 0x83399730 - 0x83399739 -SWIDTH1 0x83399830 - 0x83399839 -SWIDTH1 0x83399930 - 0x83399939 -SWIDTH1 0x83399a30 - 0x83399a39 -SWIDTH1 0x83399b30 - 0x83399b39 -SWIDTH1 0x83399c30 - 0x83399c39 -SWIDTH1 0x83399d30 - 0x83399d39 -SWIDTH1 0x83399e30 - 0x83399e39 -SWIDTH1 0x83399f30 - 0x83399f39 -SWIDTH1 0x8339a030 - 0x8339a039 -SWIDTH1 0x8339a130 - 0x8339a139 -SWIDTH1 0x8339a230 - 0x8339a239 -SWIDTH1 0x8339a330 - 0x8339a339 -SWIDTH1 0x8339a430 - 0x8339a439 -SWIDTH1 0x8339a530 - 0x8339a539 -SWIDTH1 0x8339a630 - 0x8339a639 -SWIDTH1 0x8339a730 - 0x8339a739 -SWIDTH1 0x8339a830 - 0x8339a839 -SWIDTH1 0x8339a930 - 0x8339a939 -SWIDTH1 0x8339aa30 - 0x8339aa39 -SWIDTH1 0x8339ab30 - 0x8339ab39 -SWIDTH1 0x8339ac30 - 0x8339ac39 -SWIDTH1 0x8339ad30 - 0x8339ad39 -SWIDTH1 0x8339ae30 - 0x8339ae39 -SWIDTH1 0x8339af30 - 0x8339af39 -SWIDTH1 0x8339b030 - 0x8339b039 -SWIDTH1 0x8339b130 - 0x8339b139 -SWIDTH1 0x8339b230 - 0x8339b239 -SWIDTH1 0x8339b330 - 0x8339b339 -SWIDTH1 0x8339b430 - 0x8339b439 -SWIDTH1 0x8339b530 - 0x8339b539 -SWIDTH1 0x8339b630 - 0x8339b639 -SWIDTH1 0x8339b730 - 0x8339b739 -SWIDTH1 0x8339b830 - 0x8339b839 -SWIDTH1 0x8339b930 - 0x8339b939 -SWIDTH1 0x8339ba30 - 0x8339ba39 -SWIDTH1 0x8339bb30 - 0x8339bb39 -SWIDTH1 0x8339bc30 - 0x8339bc39 -SWIDTH1 0x8339bd30 - 0x8339bd39 -SWIDTH1 0x8339be30 - 0x8339be39 -SWIDTH1 0x8339bf30 - 0x8339bf39 -SWIDTH1 0x8339c030 - 0x8339c039 -SWIDTH1 0x8339c130 - 0x8339c139 -SWIDTH1 0x8339c230 - 0x8339c239 -SWIDTH1 0x8339c330 - 0x8339c339 -SWIDTH1 0x8339c430 - 0x8339c439 -SWIDTH1 0x8339c530 - 0x8339c539 -SWIDTH1 0x8339c630 - 0x8339c639 -SWIDTH1 0x8339c730 - 0x8339c739 -SWIDTH1 0x8339c830 - 0x8339c839 -SWIDTH1 0x8339c930 - 0x8339c939 -SWIDTH1 0x8339ca30 - 0x8339ca39 -SWIDTH1 0x8339cb30 - 0x8339cb39 -SWIDTH1 0x8339cc30 - 0x8339cc39 -SWIDTH1 0x8339cd30 - 0x8339cd39 -SWIDTH1 0x8339ce30 - 0x8339ce39 -SWIDTH1 0x8339cf30 - 0x8339cf39 -SWIDTH1 0x8339d030 - 0x8339d039 -SWIDTH1 0x8339d130 - 0x8339d139 -SWIDTH1 0x8339d230 - 0x8339d239 -SWIDTH1 0x8339d330 - 0x8339d339 -SWIDTH1 0x8339d430 - 0x8339d439 -SWIDTH1 0x8339d530 - 0x8339d539 -SWIDTH1 0x8339d630 - 0x8339d639 -SWIDTH1 0x8339d730 - 0x8339d739 -SWIDTH1 0x8339d830 - 0x8339d839 -SWIDTH1 0x8339d930 - 0x8339d939 -SWIDTH1 0x8339da30 - 0x8339da39 -SWIDTH1 0x8339db30 - 0x8339db39 -SWIDTH1 0x8339dc30 - 0x8339dc39 -SWIDTH1 0x8339dd30 - 0x8339dd39 -SWIDTH1 0x8339de30 - 0x8339de39 -SWIDTH1 0x8339df30 - 0x8339df39 -SWIDTH1 0x8339e030 - 0x8339e039 -SWIDTH1 0x8339e130 - 0x8339e139 -SWIDTH1 0x8339e230 - 0x8339e239 -SWIDTH1 0x8339e330 - 0x8339e339 -SWIDTH1 0x8339e430 - 0x8339e439 -SWIDTH1 0x8339e530 - 0x8339e539 -SWIDTH1 0x8339e630 - 0x8339e639 -SWIDTH1 0x8339e730 - 0x8339e739 -SWIDTH1 0x8339e830 - 0x8339e839 -SWIDTH1 0x8339e930 - 0x8339e939 -SWIDTH1 0x8339ea30 - 0x8339ea39 -SWIDTH1 0x8339eb30 - 0x8339eb39 -SWIDTH1 0x8339ec30 - 0x8339ec39 -SWIDTH1 0x8339ed30 - 0x8339ed39 -SWIDTH1 0x8339ee30 - 0x8339ee39 -SWIDTH1 0x8339ef30 - 0x8339ef39 -SWIDTH1 0x8339f030 - 0x8339f039 -SWIDTH1 0x8339f130 - 0x8339f139 -SWIDTH1 0x8339f230 - 0x8339f239 -SWIDTH1 0x8339f330 - 0x8339f339 -SWIDTH1 0x8339f430 - 0x8339f439 -SWIDTH1 0x8339f530 - 0x8339f539 -SWIDTH1 0x8339f630 - 0x8339f639 -SWIDTH1 0x8339f730 - 0x8339f739 -SWIDTH1 0x8339f830 - 0x8339f839 -SWIDTH1 0x8339f930 - 0x8339f939 -SWIDTH1 0x8339fa30 - 0x8339fa39 -SWIDTH1 0x8339fb30 - 0x8339fb39 -SWIDTH1 0x8339fc30 - 0x8339fc39 -SWIDTH1 0x8339fd30 - 0x8339fd39 -SWIDTH1 0x8339fe30 - 0x8339fe39 -SWIDTH1 0x84308130 -SWIDTH1 0x8430b232 - 0x8430b238 -SWIDTH1 0x8430b431 - 0x8430b435 -SWIDTH1 0x8430b531 - 0x8430b539 -SWIDTH1 0x8430b630 - 0x8430b639 -SWIDTH1 0x8430b730 - 0x8430b736 0x8430b738 0x8430b739 -SWIDTH1 0x8430b830 - 0x8430b832 0x8430b834 0x8430b836 0x8430b837 0x8430b839 -SWIDTH1 0x8430b930 0x8430b932 - 0x8430b939 -SWIDTH1 0x8430ba30 - 0x8430ba39 -SWIDTH1 0x8430bb30 - 0x8430bb39 -SWIDTH1 0x8430bc30 - 0x8430bc39 -SWIDTH1 0x8430bd30 - 0x8430bd39 -SWIDTH1 0x8430be30 - 0x8430be39 -SWIDTH1 0x8430bf30 - 0x8430bf39 -SWIDTH1 0x8430c030 - 0x8430c039 -SWIDTH1 0x8430c130 - 0x8430c139 -SWIDTH1 0x8430c230 - 0x8430c239 -SWIDTH1 0x8430c330 - 0x8430c339 -SWIDTH1 0x8430c733 - 0x8430c739 -SWIDTH1 0x8430c830 - 0x8430c839 -SWIDTH1 0x8430c930 - 0x8430c939 -SWIDTH1 0x8430ca30 - 0x8430ca39 -SWIDTH1 0x8430cb30 - 0x8430cb39 -SWIDTH1 0x8430cc30 - 0x8430cc39 -SWIDTH1 0x8430cd30 - 0x8430cd39 -SWIDTH1 0x8430ce30 - 0x8430ce39 -SWIDTH1 0x8430cf30 - 0x8430cf39 -SWIDTH1 0x8430d030 - 0x8430d039 -SWIDTH1 0x8430d130 - 0x8430d139 -SWIDTH1 0x8430d230 - 0x8430d239 -SWIDTH1 0x8430d330 - 0x8430d339 -SWIDTH1 0x8430d430 - 0x8430d439 -SWIDTH1 0x8430d530 - 0x8430d539 -SWIDTH1 0x8430d630 - 0x8430d639 -SWIDTH1 0x8430d730 - 0x8430d739 -SWIDTH1 0x8430d830 - 0x8430d839 -SWIDTH1 0x8430d930 - 0x8430d939 -SWIDTH1 0x8430da30 - 0x8430da39 -SWIDTH1 0x8430db30 - 0x8430db39 -SWIDTH1 0x8430dc30 - 0x8430dc39 -SWIDTH1 0x8430dd30 - 0x8430dd39 -SWIDTH1 0x8430de30 - 0x8430de39 -SWIDTH1 0x8430df30 - 0x8430df39 -SWIDTH1 0x8430e030 - 0x8430e039 -SWIDTH1 0x8430e130 - 0x8430e139 -SWIDTH1 0x8430e230 - 0x8430e239 -SWIDTH1 0x8430e330 - 0x8430e339 -SWIDTH1 0x8430e430 - 0x8430e439 -SWIDTH1 0x8430e530 - 0x8430e539 -SWIDTH1 0x8430e630 - 0x8430e639 -SWIDTH1 0x8430e730 - 0x8430e739 -SWIDTH1 0x8430e830 - 0x8430e839 -SWIDTH1 0x8430e930 - 0x8430e939 -SWIDTH1 0x8430ea30 - 0x8430ea39 -SWIDTH1 0x8430eb30 - 0x8430eb37 -SWIDTH1 0x8430ed34 - 0x8430ed39 -SWIDTH1 0x8430ee30 - 0x8430ee39 -SWIDTH1 0x8430ef30 - 0x8430ef39 -SWIDTH1 0x8430f030 - 0x8430f039 -SWIDTH1 0x8430f130 - 0x8430f139 -SWIDTH1 0x8430f230 - 0x8430f239 -SWIDTH1 0x8430f330 - 0x8430f337 -SWIDTH1 0x8430f430 - 0x8430f439 -SWIDTH1 0x8430f530 - 0x8430f539 -SWIDTH1 0x8430f630 - 0x8430f639 -SWIDTH1 0x8430f730 - 0x8430f739 -SWIDTH1 0x8430f830 - 0x8430f839 -SWIDTH1 0x8430f930 - 0x8430f933 -SWIDTH1 0x8430fd34 - 0x8430fd39 -SWIDTH1 0x8430fe30 - 0x8430fe36 -SWIDTH1 0x84318130 - 0x84318139 -SWIDTH1 0x84318230 - 0x84318235 -SWIDTH1 0x84318432 - 0x84318435 -SWIDTH1 0x84318730 - 0x84318734 0x84318736 - 0x84318739 -SWIDTH1 0x84318830 - 0x84318839 -SWIDTH1 0x84318930 - 0x84318939 -SWIDTH1 0x84318a30 - 0x84318a39 -SWIDTH1 0x84318b30 - 0x84318b39 -SWIDTH1 0x84318c30 - 0x84318c39 -SWIDTH1 0x84318d30 - 0x84318d39 -SWIDTH1 0x84318e30 - 0x84318e39 -SWIDTH1 0x84318f30 - 0x84318f39 -SWIDTH1 0x84319030 - 0x84319039 -SWIDTH1 0x84319130 - 0x84319139 -SWIDTH1 0x84319230 - 0x84319239 -SWIDTH1 0x84319330 - 0x84319339 -SWIDTH1 0x84319430 - 0x84319439 -SWIDTH1 0x84319530 0x84319537 - 0x84319539 -SWIDTH1 0x84319630 - 0x84319639 -SWIDTH1 0x84319730 - 0x84319739 -SWIDTH1 0x84319830 - 0x84319839 -SWIDTH1 0x84319930 - 0x84319939 -SWIDTH1 0x84319a30 - 0x84319a39 -SWIDTH1 0x84319b30 - 0x84319b39 -SWIDTH1 0x84319c30 - 0x84319c39 -SWIDTH1 0x84319d30 - 0x84319d39 -SWIDTH1 0x84319e30 - 0x84319e39 -SWIDTH1 0x84319f30 0x84319f34 - 0x84319f39 -SWIDTH1 0x8431a032 - 0x8431a037 -SWIDTH1 0x8431a130 - 0x8431a135 0x8431a138 0x8431a139 -SWIDTH1 0x8431a230 0x8431a236 - 0x8431a239 -SWIDTH1 0x8431a330 - 0x8431a332 -SWIDTH1 0x8431a436 0x8431a437 -SWIDTH2 0x81339d36 - 0x81339d39 -SWIDTH2 0x81339e30 - 0x81339e39 -SWIDTH2 0x81339f30 - 0x81339f39 -SWIDTH2 0x8133a030 - 0x8133a039 -SWIDTH2 0x8133a130 - 0x8133a139 -SWIDTH2 0x8133a230 - 0x8133a239 -SWIDTH2 0x8133a330 - 0x8133a339 -SWIDTH2 0x8133a430 - 0x8133a439 -SWIDTH2 0x8133a530 - 0x8133a539 -SWIDTH2 0x8133a630 - 0x8133a635 -SWIDTH2 0x8133a731 -SWIDTH2 0x8136eb35 0x8136eb36 -SWIDTH2 0x8138fd38 0x8138fd39 -SWIDTH2 0x8138fe30 - 0x8138fe39 -SWIDTH2 0x81398130 - 0x81398137 0x81398139 -SWIDTH2 0x81398230 - 0x81398239 -SWIDTH2 0x81398330 - 0x81398339 -SWIDTH2 0x81398430 - 0x81398439 -SWIDTH2 0x81398530 - 0x81398539 -SWIDTH2 0x81398630 - 0x81398639 -SWIDTH2 0x81398730 - 0x81398739 -SWIDTH2 0x81398830 - 0x81398839 -SWIDTH2 0x81398930 - 0x81398939 -SWIDTH2 0x81398b32 - 0x81398b39 -SWIDTH2 0x81398c30 - 0x81398c39 -SWIDTH2 0x81398d30 - 0x81398d39 -SWIDTH2 0x81398e30 - 0x81398e39 -SWIDTH2 0x81398f30 - 0x81398f39 -SWIDTH2 0x81399030 - 0x81399039 -SWIDTH2 0x81399130 - 0x81399139 -SWIDTH2 0x81399230 - 0x81399239 -SWIDTH2 0x81399330 - 0x81399339 -SWIDTH2 0x81399430 - 0x81399439 -SWIDTH2 0x81399530 - 0x81399539 -SWIDTH2 0x81399630 - 0x81399639 -SWIDTH2 0x81399730 - 0x81399739 -SWIDTH2 0x81399830 - 0x81399839 -SWIDTH2 0x81399930 - 0x81399939 -SWIDTH2 0x81399a30 - 0x81399a39 -SWIDTH2 0x81399b30 - 0x81399b39 -SWIDTH2 0x81399c30 - 0x81399c39 -SWIDTH2 0x81399d30 - 0x81399d39 -SWIDTH2 0x81399e30 - 0x81399e39 -SWIDTH2 0x81399f30 - 0x81399f39 -SWIDTH2 0x8139a030 - 0x8139a035 -SWIDTH2 0x8139a336 - 0x8139a339 -SWIDTH2 0x8139a430 - 0x8139a439 -SWIDTH2 0x8139a530 - 0x8139a539 -SWIDTH2 0x8139a630 - 0x8139a633 0x8139a636 - 0x8139a638 -SWIDTH2 0x8139a731 - 0x8139a739 -SWIDTH2 0x8139a830 0x8139a836 - 0x8139a838 -SWIDTH2 0x8139a933 - 0x8139a939 -SWIDTH2 0x8139aa30 - 0x8139aa39 -SWIDTH2 0x8139ab30 - 0x8139ab39 -SWIDTH2 0x8139ac30 - 0x8139ac39 -SWIDTH2 0x8139ad30 - 0x8139ad39 -SWIDTH2 0x8139ae30 - 0x8139ae39 -SWIDTH2 0x8139af30 - 0x8139af39 -SWIDTH2 0x8139b030 - 0x8139b039 -SWIDTH2 0x8139b130 - 0x8139b139 -SWIDTH2 0x8139b230 - 0x8139b236 0x8139b238 0x8139b239 -SWIDTH2 0x8139b330 - 0x8139b339 -SWIDTH2 0x8139b430 - 0x8139b439 -SWIDTH2 0x8139b530 - 0x8139b539 -SWIDTH2 0x8139b630 - 0x8139b637 -SWIDTH2 0x8139bc34 - 0x8139bc39 -SWIDTH2 0x8139bd30 - 0x8139bd39 -SWIDTH2 0x8139be30 - 0x8139be39 -SWIDTH2 0x8139bf30 - 0x8139bf39 -SWIDTH2 0x8139c030 - 0x8139c038 -SWIDTH2 0x8139c132 - 0x8139c139 -SWIDTH2 0x8139c230 - 0x8139c239 -SWIDTH2 0x8139c330 - 0x8139c336 -SWIDTH2 0x8139c530 - 0x8139c539 -SWIDTH2 0x8139c630 - 0x8139c639 -SWIDTH2 0x8139c730 - 0x8139c739 -SWIDTH2 0x8139c830 - 0x8139c839 -SWIDTH2 0x8139c930 - 0x8139c932 0x8139c936 - 0x8139c939 -SWIDTH2 0x8139ca30 - 0x8139ca39 -SWIDTH2 0x8139cb30 - 0x8139cb39 -SWIDTH2 0x8139cc30 - 0x8139cc39 -SWIDTH2 0x8139cd30 - 0x8139cd39 -SWIDTH2 0x8139ce30 - 0x8139ce39 -SWIDTH2 0x8139cf30 - 0x8139cf39 -SWIDTH2 0x8139d030 - 0x8139d039 -SWIDTH2 0x8139d130 0x8139d131 0x8139d136 - 0x8139d139 -SWIDTH2 0x8139d230 - 0x8139d239 -SWIDTH2 0x8139d330 - 0x8139d339 -SWIDTH2 0x8139d430 - 0x8139d439 -SWIDTH2 0x8139d530 - 0x8139d539 -SWIDTH2 0x8139d630 - 0x8139d632 0x8139d634 - 0x8139d639 -SWIDTH2 0x8139d730 - 0x8139d739 -SWIDTH2 0x8139d830 - 0x8139d839 -SWIDTH2 0x8139d930 - 0x8139d939 -SWIDTH2 0x8139da30 - 0x8139da39 -SWIDTH2 0x8139db30 - 0x8139db39 -SWIDTH2 0x8139dc30 - 0x8139dc39 -SWIDTH2 0x8139dd30 - 0x8139dd39 -SWIDTH2 0x8139de30 - 0x8139de39 -SWIDTH2 0x8139df30 - 0x8139df39 -SWIDTH2 0x8139e030 - 0x8139e039 -SWIDTH2 0x8139e130 - 0x8139e139 -SWIDTH2 0x8139e230 - 0x8139e232 0x8139e237 - 0x8139e239 -SWIDTH2 0x8139e330 - 0x8139e339 -SWIDTH2 0x8139e430 - 0x8139e439 -SWIDTH2 0x8139e530 - 0x8139e539 -SWIDTH2 0x8139e630 - 0x8139e639 -SWIDTH2 0x8139e730 - 0x8139e739 -SWIDTH2 0x8139e830 - 0x8139e839 -SWIDTH2 0x8139e930 - 0x8139e939 -SWIDTH2 0x8139ea30 - 0x8139ea39 -SWIDTH2 0x8139eb30 - 0x8139eb34 0x8139eb37 - 0x8139eb39 -SWIDTH2 0x8139ec30 - 0x8139ec39 -SWIDTH2 0x8139ed30 - 0x8139ed39 -SWIDTH2 0x8139ee30 - 0x8139ee37 0x8139ee39 -SWIDTH2 0x8139ef30 - 0x8139ef39 -SWIDTH2 0x8139f030 - 0x8139f039 -SWIDTH2 0x8139f130 - 0x8139f139 -SWIDTH2 0x8139f230 - 0x8139f239 -SWIDTH2 0x8139f330 - 0x8139f339 -SWIDTH2 0x8139f430 - 0x8139f439 -SWIDTH2 0x8139f530 - 0x8139f539 -SWIDTH2 0x8139f630 - 0x8139f639 -SWIDTH2 0x8139f730 - 0x8139f739 -SWIDTH2 0x8139f830 - 0x8139f839 -SWIDTH2 0x8139f930 - 0x8139f939 -SWIDTH2 0x8139fa30 - 0x8139fa39 -SWIDTH2 0x8139fb30 - 0x8139fb39 -SWIDTH2 0x8139fc30 - 0x8139fc39 -SWIDTH2 0x8139fd30 - 0x8139fd39 -SWIDTH2 0x8139fe30 - 0x8139fe39 -SWIDTH2 0x82308130 - 0x82308139 -SWIDTH2 0x82308230 - 0x82308239 -SWIDTH2 0x82308330 - 0x82308339 -SWIDTH2 0x82308430 - 0x82308439 -SWIDTH2 0x82308530 - 0x82308539 -SWIDTH2 0x82308630 - 0x82308639 -SWIDTH2 0x82308730 - 0x82308739 -SWIDTH2 0x82308830 - 0x82308839 -SWIDTH2 0x82308930 - 0x82308939 -SWIDTH2 0x82308a30 - 0x82308a39 -SWIDTH2 0x82308b30 - 0x82308b39 -SWIDTH2 0x82308c30 - 0x82308c39 -SWIDTH2 0x82308d30 - 0x82308d39 -SWIDTH2 0x82308e30 - 0x82308e39 -SWIDTH2 0x82308f30 - 0x82308f39 -SWIDTH2 0x82309030 - 0x82309039 -SWIDTH2 0x82309130 - 0x82309139 -SWIDTH2 0x82309230 - 0x82309239 -SWIDTH2 0x82309330 - 0x82309339 -SWIDTH2 0x82309430 - 0x82309439 -SWIDTH2 0x82309530 - 0x82309539 -SWIDTH2 0x82309630 - 0x82309639 -SWIDTH2 0x82309730 - 0x82309739 -SWIDTH2 0x82309830 - 0x82309839 -SWIDTH2 0x82309930 - 0x82309939 -SWIDTH2 0x82309a30 - 0x82309a39 -SWIDTH2 0x82309b30 - 0x82309b39 -SWIDTH2 0x82309c30 - 0x82309c39 -SWIDTH2 0x82309d30 - 0x82309d39 -SWIDTH2 0x82309e30 - 0x82309e39 -SWIDTH2 0x82309f30 - 0x82309f39 -SWIDTH2 0x8230a030 - 0x8230a039 -SWIDTH2 0x8230a130 - 0x8230a139 -SWIDTH2 0x8230a230 - 0x8230a239 -SWIDTH2 0x8230a330 - 0x8230a339 -SWIDTH2 0x8230a430 - 0x8230a439 -SWIDTH2 0x8230a530 - 0x8230a539 -SWIDTH2 0x8230a630 - 0x8230a639 -SWIDTH2 0x8230a730 - 0x8230a739 -SWIDTH2 0x8230a830 - 0x8230a839 -SWIDTH2 0x8230a930 - 0x8230a939 -SWIDTH2 0x8230aa30 - 0x8230aa39 -SWIDTH2 0x8230ab30 - 0x8230ab39 -SWIDTH2 0x8230ac30 - 0x8230ac39 -SWIDTH2 0x8230ad30 - 0x8230ad39 -SWIDTH2 0x8230ae30 - 0x8230ae39 -SWIDTH2 0x8230af30 - 0x8230af39 -SWIDTH2 0x8230b030 - 0x8230b039 -SWIDTH2 0x8230b130 - 0x8230b139 -SWIDTH2 0x8230b230 - 0x8230b239 -SWIDTH2 0x8230b330 - 0x8230b339 -SWIDTH2 0x8230b430 - 0x8230b439 -SWIDTH2 0x8230b530 - 0x8230b539 -SWIDTH2 0x8230b630 - 0x8230b639 -SWIDTH2 0x8230b730 - 0x8230b739 -SWIDTH2 0x8230b830 - 0x8230b839 -SWIDTH2 0x8230b930 - 0x8230b939 -SWIDTH2 0x8230ba30 - 0x8230ba39 -SWIDTH2 0x8230bb30 - 0x8230bb39 -SWIDTH2 0x8230bc30 - 0x8230bc39 -SWIDTH2 0x8230bd30 - 0x8230bd39 -SWIDTH2 0x8230be30 - 0x8230be39 -SWIDTH2 0x8230bf30 - 0x8230bf39 -SWIDTH2 0x8230c030 - 0x8230c039 -SWIDTH2 0x8230c130 - 0x8230c139 -SWIDTH2 0x8230c230 - 0x8230c239 -SWIDTH2 0x8230c330 - 0x8230c339 -SWIDTH2 0x8230c430 - 0x8230c439 -SWIDTH2 0x8230c530 - 0x8230c539 -SWIDTH2 0x8230c630 - 0x8230c639 -SWIDTH2 0x8230c730 - 0x8230c739 -SWIDTH2 0x8230c830 - 0x8230c839 -SWIDTH2 0x8230c930 - 0x8230c939 -SWIDTH2 0x8230ca30 - 0x8230ca39 -SWIDTH2 0x8230cb30 - 0x8230cb39 -SWIDTH2 0x8230cc30 - 0x8230cc39 -SWIDTH2 0x8230cd30 - 0x8230cd39 -SWIDTH2 0x8230ce30 - 0x8230ce39 -SWIDTH2 0x8230cf30 - 0x8230cf39 -SWIDTH2 0x8230d030 - 0x8230d039 -SWIDTH2 0x8230d130 - 0x8230d139 -SWIDTH2 0x8230d230 - 0x8230d239 -SWIDTH2 0x8230d330 - 0x8230d339 -SWIDTH2 0x8230d430 - 0x8230d439 -SWIDTH2 0x8230d530 - 0x8230d539 -SWIDTH2 0x8230d630 - 0x8230d639 -SWIDTH2 0x8230d730 - 0x8230d739 -SWIDTH2 0x8230d830 - 0x8230d839 -SWIDTH2 0x8230d930 - 0x8230d939 -SWIDTH2 0x8230da30 - 0x8230da39 -SWIDTH2 0x8230db30 - 0x8230db39 -SWIDTH2 0x8230dc30 - 0x8230dc39 -SWIDTH2 0x8230dd30 - 0x8230dd39 -SWIDTH2 0x8230de30 - 0x8230de39 -SWIDTH2 0x8230df30 - 0x8230df39 -SWIDTH2 0x8230e030 - 0x8230e039 -SWIDTH2 0x8230e130 - 0x8230e139 -SWIDTH2 0x8230e230 - 0x8230e239 -SWIDTH2 0x8230e330 - 0x8230e339 -SWIDTH2 0x8230e430 - 0x8230e439 -SWIDTH2 0x8230e530 - 0x8230e539 -SWIDTH2 0x8230e630 - 0x8230e639 -SWIDTH2 0x8230e730 - 0x8230e739 -SWIDTH2 0x8230e830 - 0x8230e839 -SWIDTH2 0x8230e930 - 0x8230e939 -SWIDTH2 0x8230ea30 - 0x8230ea39 -SWIDTH2 0x8230eb30 - 0x8230eb39 -SWIDTH2 0x8230ec30 - 0x8230ec39 -SWIDTH2 0x8230ed30 - 0x8230ed39 -SWIDTH2 0x8230ee30 - 0x8230ee39 -SWIDTH2 0x8230ef30 - 0x8230ef39 -SWIDTH2 0x8230f030 - 0x8230f039 -SWIDTH2 0x8230f130 - 0x8230f139 -SWIDTH2 0x8230f230 - 0x8230f239 -SWIDTH2 0x8230f330 - 0x8230f339 -SWIDTH2 0x8230f430 - 0x8230f439 -SWIDTH2 0x8230f530 - 0x8230f539 -SWIDTH2 0x8230f630 - 0x8230f639 -SWIDTH2 0x8230f730 - 0x8230f739 -SWIDTH2 0x8230f830 - 0x8230f839 -SWIDTH2 0x8230f930 - 0x8230f939 -SWIDTH2 0x8230fa30 - 0x8230fa39 -SWIDTH2 0x8230fb30 - 0x8230fb39 -SWIDTH2 0x8230fc30 - 0x8230fc39 -SWIDTH2 0x8230fd30 - 0x8230fd39 -SWIDTH2 0x8230fe30 - 0x8230fe39 -SWIDTH2 0x82318130 - 0x82318139 -SWIDTH2 0x82318230 - 0x82318239 -SWIDTH2 0x82318330 - 0x82318339 -SWIDTH2 0x82318430 - 0x82318439 -SWIDTH2 0x82318530 - 0x82318539 -SWIDTH2 0x82318630 - 0x82318639 -SWIDTH2 0x82318730 - 0x82318739 -SWIDTH2 0x82318830 - 0x82318839 -SWIDTH2 0x82318930 - 0x82318939 -SWIDTH2 0x82318a30 - 0x82318a39 -SWIDTH2 0x82318b30 - 0x82318b39 -SWIDTH2 0x82318c30 - 0x82318c39 -SWIDTH2 0x82318d30 - 0x82318d39 -SWIDTH2 0x82318e30 - 0x82318e39 -SWIDTH2 0x82318f30 - 0x82318f39 -SWIDTH2 0x82319030 - 0x82319039 -SWIDTH2 0x82319130 - 0x82319139 -SWIDTH2 0x82319230 - 0x82319239 -SWIDTH2 0x82319330 - 0x82319339 -SWIDTH2 0x82319430 - 0x82319439 -SWIDTH2 0x82319530 - 0x82319539 -SWIDTH2 0x82319630 - 0x82319639 -SWIDTH2 0x82319730 - 0x82319739 -SWIDTH2 0x82319830 - 0x82319839 -SWIDTH2 0x82319930 - 0x82319939 -SWIDTH2 0x82319a30 - 0x82319a39 -SWIDTH2 0x82319b30 - 0x82319b39 -SWIDTH2 0x82319c30 - 0x82319c39 -SWIDTH2 0x82319d30 - 0x82319d39 -SWIDTH2 0x82319e30 - 0x82319e39 -SWIDTH2 0x82319f30 - 0x82319f39 -SWIDTH2 0x8231a030 - 0x8231a039 -SWIDTH2 0x8231a130 - 0x8231a139 -SWIDTH2 0x8231a230 - 0x8231a239 -SWIDTH2 0x8231a330 - 0x8231a339 -SWIDTH2 0x8231a430 - 0x8231a439 -SWIDTH2 0x8231a530 - 0x8231a539 -SWIDTH2 0x8231a630 - 0x8231a639 -SWIDTH2 0x8231a730 - 0x8231a739 -SWIDTH2 0x8231a830 - 0x8231a839 -SWIDTH2 0x8231a930 - 0x8231a939 -SWIDTH2 0x8231aa30 - 0x8231aa39 -SWIDTH2 0x8231ab30 - 0x8231ab39 -SWIDTH2 0x8231ac30 - 0x8231ac39 -SWIDTH2 0x8231ad30 - 0x8231ad39 -SWIDTH2 0x8231ae30 - 0x8231ae39 -SWIDTH2 0x8231af30 - 0x8231af39 -SWIDTH2 0x8231b030 - 0x8231b039 -SWIDTH2 0x8231b130 - 0x8231b139 -SWIDTH2 0x8231b230 - 0x8231b239 -SWIDTH2 0x8231b330 - 0x8231b339 -SWIDTH2 0x8231b430 - 0x8231b439 -SWIDTH2 0x8231b530 - 0x8231b539 -SWIDTH2 0x8231b630 - 0x8231b639 -SWIDTH2 0x8231b730 - 0x8231b739 -SWIDTH2 0x8231b830 - 0x8231b839 -SWIDTH2 0x8231b930 - 0x8231b939 -SWIDTH2 0x8231ba30 - 0x8231ba39 -SWIDTH2 0x8231bb30 - 0x8231bb39 -SWIDTH2 0x8231bc30 - 0x8231bc39 -SWIDTH2 0x8231bd30 - 0x8231bd39 -SWIDTH2 0x8231be30 - 0x8231be39 -SWIDTH2 0x8231bf30 - 0x8231bf39 -SWIDTH2 0x8231c030 - 0x8231c039 -SWIDTH2 0x8231c130 - 0x8231c139 -SWIDTH2 0x8231c230 - 0x8231c239 -SWIDTH2 0x8231c330 - 0x8231c339 -SWIDTH2 0x8231c430 - 0x8231c439 -SWIDTH2 0x8231c530 - 0x8231c539 -SWIDTH2 0x8231c630 - 0x8231c639 -SWIDTH2 0x8231c730 - 0x8231c739 -SWIDTH2 0x8231c830 - 0x8231c839 -SWIDTH2 0x8231c930 - 0x8231c939 -SWIDTH2 0x8231ca30 - 0x8231ca39 -SWIDTH2 0x8231cb30 - 0x8231cb39 -SWIDTH2 0x8231cc30 - 0x8231cc39 -SWIDTH2 0x8231cd30 - 0x8231cd39 -SWIDTH2 0x8231ce30 - 0x8231ce39 -SWIDTH2 0x8231cf30 - 0x8231cf39 -SWIDTH2 0x8231d030 - 0x8231d039 -SWIDTH2 0x8231d130 - 0x8231d139 -SWIDTH2 0x8231d230 - 0x8231d239 -SWIDTH2 0x8231d330 - 0x8231d339 -SWIDTH2 0x8231d430 - 0x8231d439 -SWIDTH2 0x8231d530 - 0x8231d539 -SWIDTH2 0x8231d630 - 0x8231d639 -SWIDTH2 0x8231d730 - 0x8231d739 -SWIDTH2 0x8231d830 - 0x8231d839 -SWIDTH2 0x8231d930 - 0x8231d939 -SWIDTH2 0x8231da30 - 0x8231da39 -SWIDTH2 0x8231db30 - 0x8231db39 -SWIDTH2 0x8231dc30 - 0x8231dc39 -SWIDTH2 0x8231dd30 - 0x8231dd39 -SWIDTH2 0x8231de30 - 0x8231de39 -SWIDTH2 0x8231df30 - 0x8231df39 -SWIDTH2 0x8231e030 - 0x8231e039 -SWIDTH2 0x8231e130 - 0x8231e139 -SWIDTH2 0x8231e230 - 0x8231e239 -SWIDTH2 0x8231e330 - 0x8231e339 -SWIDTH2 0x8231e430 - 0x8231e439 -SWIDTH2 0x8231e530 - 0x8231e539 -SWIDTH2 0x8231e630 - 0x8231e639 -SWIDTH2 0x8231e730 - 0x8231e739 -SWIDTH2 0x8231e830 - 0x8231e839 -SWIDTH2 0x8231e930 - 0x8231e939 -SWIDTH2 0x8231ea30 - 0x8231ea39 -SWIDTH2 0x8231eb30 - 0x8231eb39 -SWIDTH2 0x8231ec30 - 0x8231ec39 -SWIDTH2 0x8231ed30 - 0x8231ed39 -SWIDTH2 0x8231ee30 - 0x8231ee39 -SWIDTH2 0x8231ef30 - 0x8231ef39 -SWIDTH2 0x8231f030 - 0x8231f039 -SWIDTH2 0x8231f130 - 0x8231f139 -SWIDTH2 0x8231f230 - 0x8231f239 -SWIDTH2 0x8231f330 - 0x8231f339 -SWIDTH2 0x8231f430 - 0x8231f439 -SWIDTH2 0x8231f530 - 0x8231f539 -SWIDTH2 0x8231f630 - 0x8231f639 -SWIDTH2 0x8231f730 - 0x8231f739 -SWIDTH2 0x8231f830 - 0x8231f839 -SWIDTH2 0x8231f930 - 0x8231f939 -SWIDTH2 0x8231fa30 - 0x8231fa39 -SWIDTH2 0x8231fb30 - 0x8231fb39 -SWIDTH2 0x8231fc30 - 0x8231fc39 -SWIDTH2 0x8231fd30 - 0x8231fd39 -SWIDTH2 0x8231fe30 - 0x8231fe39 -SWIDTH2 0x82328130 - 0x82328139 -SWIDTH2 0x82328230 - 0x82328239 -SWIDTH2 0x82328330 - 0x82328339 -SWIDTH2 0x82328430 - 0x82328439 -SWIDTH2 0x82328530 - 0x82328539 -SWIDTH2 0x82328630 - 0x82328639 -SWIDTH2 0x82328730 - 0x82328739 -SWIDTH2 0x82328830 - 0x82328839 -SWIDTH2 0x82328930 - 0x82328939 -SWIDTH2 0x82328a30 - 0x82328a39 -SWIDTH2 0x82328b30 - 0x82328b39 -SWIDTH2 0x82328c30 - 0x82328c39 -SWIDTH2 0x82328d30 - 0x82328d39 -SWIDTH2 0x82328e30 - 0x82328e39 -SWIDTH2 0x82328f30 - 0x82328f39 -SWIDTH2 0x82329030 - 0x82329039 -SWIDTH2 0x82329130 - 0x82329139 -SWIDTH2 0x82329230 - 0x82329239 -SWIDTH2 0x82329330 - 0x82329339 -SWIDTH2 0x82329430 - 0x82329439 -SWIDTH2 0x82329530 - 0x82329539 -SWIDTH2 0x82329630 - 0x82329639 -SWIDTH2 0x82329730 - 0x82329739 -SWIDTH2 0x82329830 - 0x82329839 -SWIDTH2 0x82329930 - 0x82329939 -SWIDTH2 0x82329a30 - 0x82329a39 -SWIDTH2 0x82329b30 - 0x82329b39 -SWIDTH2 0x82329c30 - 0x82329c39 -SWIDTH2 0x82329d30 - 0x82329d39 -SWIDTH2 0x82329e30 - 0x82329e39 -SWIDTH2 0x82329f30 - 0x82329f39 -SWIDTH2 0x8232a030 - 0x8232a039 -SWIDTH2 0x8232a130 - 0x8232a139 -SWIDTH2 0x8232a230 - 0x8232a239 -SWIDTH2 0x8232a330 - 0x8232a339 -SWIDTH2 0x8232a430 - 0x8232a439 -SWIDTH2 0x8232a530 - 0x8232a539 -SWIDTH2 0x8232a630 - 0x8232a639 -SWIDTH2 0x8232a730 - 0x8232a739 -SWIDTH2 0x8232a830 - 0x8232a839 -SWIDTH2 0x8232a930 - 0x8232a939 -SWIDTH2 0x8232aa30 - 0x8232aa39 -SWIDTH2 0x8232ab30 - 0x8232ab39 -SWIDTH2 0x8232ac30 - 0x8232ac39 -SWIDTH2 0x8232ad30 - 0x8232ad39 -SWIDTH2 0x8232ae30 - 0x8232ae39 -SWIDTH2 0x8232af30 - 0x8232af39 -SWIDTH2 0x8232b030 - 0x8232b039 -SWIDTH2 0x8232b130 - 0x8232b139 -SWIDTH2 0x8232b230 - 0x8232b239 -SWIDTH2 0x8232b330 - 0x8232b339 -SWIDTH2 0x8232b430 - 0x8232b439 -SWIDTH2 0x8232b530 - 0x8232b539 -SWIDTH2 0x8232b630 - 0x8232b639 -SWIDTH2 0x8232b730 - 0x8232b739 -SWIDTH2 0x8232b830 - 0x8232b839 -SWIDTH2 0x8232b930 - 0x8232b939 -SWIDTH2 0x8232ba30 - 0x8232ba39 -SWIDTH2 0x8232bb30 - 0x8232bb39 -SWIDTH2 0x8232bc30 - 0x8232bc39 -SWIDTH2 0x8232bd30 - 0x8232bd39 -SWIDTH2 0x8232be30 - 0x8232be39 -SWIDTH2 0x8232bf30 - 0x8232bf39 -SWIDTH2 0x8232c030 - 0x8232c039 -SWIDTH2 0x8232c130 - 0x8232c139 -SWIDTH2 0x8232c230 - 0x8232c239 -SWIDTH2 0x8232c330 - 0x8232c339 -SWIDTH2 0x8232c430 - 0x8232c439 -SWIDTH2 0x8232c530 - 0x8232c539 -SWIDTH2 0x8232c630 - 0x8232c639 -SWIDTH2 0x8232c730 - 0x8232c739 -SWIDTH2 0x8232c830 - 0x8232c839 -SWIDTH2 0x8232c930 - 0x8232c939 -SWIDTH2 0x8232ca30 - 0x8232ca39 -SWIDTH2 0x8232cb30 - 0x8232cb39 -SWIDTH2 0x8232cc30 - 0x8232cc39 -SWIDTH2 0x8232cd30 - 0x8232cd39 -SWIDTH2 0x8232ce30 - 0x8232ce39 -SWIDTH2 0x8232cf30 - 0x8232cf39 -SWIDTH2 0x8232d030 - 0x8232d039 -SWIDTH2 0x8232d130 - 0x8232d139 -SWIDTH2 0x8232d230 - 0x8232d239 -SWIDTH2 0x8232d330 - 0x8232d339 -SWIDTH2 0x8232d430 - 0x8232d439 -SWIDTH2 0x8232d530 - 0x8232d539 -SWIDTH2 0x8232d630 - 0x8232d639 -SWIDTH2 0x8232d730 - 0x8232d739 -SWIDTH2 0x8232d830 - 0x8232d839 -SWIDTH2 0x8232d930 - 0x8232d939 -SWIDTH2 0x8232da30 - 0x8232da39 -SWIDTH2 0x8232db30 - 0x8232db39 -SWIDTH2 0x8232dc30 - 0x8232dc39 -SWIDTH2 0x8232dd30 - 0x8232dd39 -SWIDTH2 0x8232de30 - 0x8232de39 -SWIDTH2 0x8232df30 - 0x8232df39 -SWIDTH2 0x8232e030 - 0x8232e039 -SWIDTH2 0x8232e130 - 0x8232e139 -SWIDTH2 0x8232e230 - 0x8232e239 -SWIDTH2 0x8232e330 - 0x8232e339 -SWIDTH2 0x8232e430 - 0x8232e439 -SWIDTH2 0x8232e530 - 0x8232e539 -SWIDTH2 0x8232e630 - 0x8232e639 -SWIDTH2 0x8232e730 - 0x8232e739 -SWIDTH2 0x8232e830 - 0x8232e839 -SWIDTH2 0x8232e930 - 0x8232e939 -SWIDTH2 0x8232ea30 - 0x8232ea39 -SWIDTH2 0x8232eb30 - 0x8232eb39 -SWIDTH2 0x8232ec30 - 0x8232ec39 -SWIDTH2 0x8232ed30 - 0x8232ed39 -SWIDTH2 0x8232ee30 - 0x8232ee39 -SWIDTH2 0x8232ef30 - 0x8232ef39 -SWIDTH2 0x8232f030 - 0x8232f039 -SWIDTH2 0x8232f130 - 0x8232f139 -SWIDTH2 0x8232f230 - 0x8232f239 -SWIDTH2 0x8232f330 - 0x8232f339 -SWIDTH2 0x8232f430 - 0x8232f439 -SWIDTH2 0x8232f530 - 0x8232f539 -SWIDTH2 0x8232f630 - 0x8232f639 -SWIDTH2 0x8232f730 - 0x8232f739 -SWIDTH2 0x8232f830 - 0x8232f839 -SWIDTH2 0x8232f930 - 0x8232f939 -SWIDTH2 0x8232fa30 - 0x8232fa39 -SWIDTH2 0x8232fb30 - 0x8232fb39 -SWIDTH2 0x8232fc30 - 0x8232fc39 -SWIDTH2 0x8232fd30 - 0x8232fd39 -SWIDTH2 0x8232fe30 - 0x8232fe39 -SWIDTH2 0x82338130 - 0x82338139 -SWIDTH2 0x82338230 - 0x82338239 -SWIDTH2 0x82338330 - 0x82338339 -SWIDTH2 0x82338430 - 0x82338439 -SWIDTH2 0x82338530 - 0x82338539 -SWIDTH2 0x82338630 - 0x82338639 -SWIDTH2 0x82338730 - 0x82338739 -SWIDTH2 0x82338830 - 0x82338839 -SWIDTH2 0x82338930 - 0x82338939 -SWIDTH2 0x82338a30 - 0x82338a39 -SWIDTH2 0x82338b30 - 0x82338b39 -SWIDTH2 0x82338c30 - 0x82338c39 -SWIDTH2 0x82338d30 - 0x82338d39 -SWIDTH2 0x82338e30 - 0x82338e39 -SWIDTH2 0x82338f30 - 0x82338f39 -SWIDTH2 0x82339030 - 0x82339039 -SWIDTH2 0x82339130 - 0x82339139 -SWIDTH2 0x82339230 - 0x82339239 -SWIDTH2 0x82339330 - 0x82339339 -SWIDTH2 0x82339430 - 0x82339439 -SWIDTH2 0x82339530 - 0x82339539 -SWIDTH2 0x82339630 - 0x82339639 -SWIDTH2 0x82339730 - 0x82339739 -SWIDTH2 0x82339830 - 0x82339839 -SWIDTH2 0x82339930 - 0x82339939 -SWIDTH2 0x82339a30 - 0x82339a39 -SWIDTH2 0x82339b30 - 0x82339b39 -SWIDTH2 0x82339c30 - 0x82339c39 -SWIDTH2 0x82339d30 - 0x82339d39 -SWIDTH2 0x82339e30 - 0x82339e39 -SWIDTH2 0x82339f30 - 0x82339f39 -SWIDTH2 0x8233a030 - 0x8233a039 -SWIDTH2 0x8233a130 - 0x8233a139 -SWIDTH2 0x8233a230 - 0x8233a239 -SWIDTH2 0x8233a330 - 0x8233a339 -SWIDTH2 0x8233a430 - 0x8233a439 -SWIDTH2 0x8233a530 - 0x8233a539 -SWIDTH2 0x8233a630 - 0x8233a639 -SWIDTH2 0x8233a730 - 0x8233a739 -SWIDTH2 0x8233a830 - 0x8233a839 -SWIDTH2 0x8233a930 - 0x8233a939 -SWIDTH2 0x8233aa30 - 0x8233aa39 -SWIDTH2 0x8233ab30 - 0x8233ab39 -SWIDTH2 0x8233ac30 - 0x8233ac39 -SWIDTH2 0x8233ad30 - 0x8233ad39 -SWIDTH2 0x8233ae30 - 0x8233ae39 -SWIDTH2 0x8233af30 - 0x8233af39 -SWIDTH2 0x8233b030 - 0x8233b039 -SWIDTH2 0x8233b130 - 0x8233b139 -SWIDTH2 0x8233b230 - 0x8233b239 -SWIDTH2 0x8233b330 - 0x8233b339 -SWIDTH2 0x8233b430 - 0x8233b439 -SWIDTH2 0x8233b530 - 0x8233b539 -SWIDTH2 0x8233b630 - 0x8233b639 -SWIDTH2 0x8233b730 - 0x8233b739 -SWIDTH2 0x8233b830 - 0x8233b839 -SWIDTH2 0x8233b930 - 0x8233b939 -SWIDTH2 0x8233ba30 - 0x8233ba39 -SWIDTH2 0x8233bb30 - 0x8233bb39 -SWIDTH2 0x8233bc30 - 0x8233bc39 -SWIDTH2 0x8233bd30 - 0x8233bd39 -SWIDTH2 0x8233be30 - 0x8233be39 -SWIDTH2 0x8233bf30 - 0x8233bf39 -SWIDTH2 0x8233c030 - 0x8233c039 -SWIDTH2 0x8233c130 - 0x8233c139 -SWIDTH2 0x8233c230 - 0x8233c239 -SWIDTH2 0x8233c330 - 0x8233c339 -SWIDTH2 0x8233c430 - 0x8233c439 -SWIDTH2 0x8233c530 - 0x8233c539 -SWIDTH2 0x8233c630 - 0x8233c639 -SWIDTH2 0x8233c730 - 0x8233c739 -SWIDTH2 0x8233c830 - 0x8233c839 -SWIDTH2 0x8233c930 - 0x8233c939 -SWIDTH2 0x8233ca30 - 0x8233ca39 -SWIDTH2 0x8233cb30 - 0x8233cb39 -SWIDTH2 0x8233cc30 - 0x8233cc39 -SWIDTH2 0x8233cd30 - 0x8233cd39 -SWIDTH2 0x8233ce30 - 0x8233ce39 -SWIDTH2 0x8233cf30 - 0x8233cf39 -SWIDTH2 0x8233d030 - 0x8233d039 -SWIDTH2 0x8233d130 - 0x8233d139 -SWIDTH2 0x8233d230 - 0x8233d239 -SWIDTH2 0x8233d330 - 0x8233d339 -SWIDTH2 0x8233d430 - 0x8233d439 -SWIDTH2 0x8233d530 - 0x8233d539 -SWIDTH2 0x8233d630 - 0x8233d639 -SWIDTH2 0x8233d730 - 0x8233d739 -SWIDTH2 0x8233d830 - 0x8233d839 -SWIDTH2 0x8233d930 - 0x8233d939 -SWIDTH2 0x8233da30 - 0x8233da39 -SWIDTH2 0x8233db30 - 0x8233db39 -SWIDTH2 0x8233dc30 - 0x8233dc39 -SWIDTH2 0x8233dd30 - 0x8233dd39 -SWIDTH2 0x8233de30 - 0x8233de39 -SWIDTH2 0x8233df30 - 0x8233df39 -SWIDTH2 0x8233e030 - 0x8233e039 -SWIDTH2 0x8233e130 - 0x8233e139 -SWIDTH2 0x8233e230 - 0x8233e239 -SWIDTH2 0x8233e330 - 0x8233e339 -SWIDTH2 0x8233e430 - 0x8233e439 -SWIDTH2 0x8233e530 - 0x8233e539 -SWIDTH2 0x8233e630 - 0x8233e639 -SWIDTH2 0x8233e730 - 0x8233e739 -SWIDTH2 0x8233e830 - 0x8233e839 -SWIDTH2 0x8233e930 - 0x8233e939 -SWIDTH2 0x8233ea30 - 0x8233ea39 -SWIDTH2 0x8233eb30 - 0x8233eb39 -SWIDTH2 0x8233ec30 - 0x8233ec39 -SWIDTH2 0x8233ed30 - 0x8233ed39 -SWIDTH2 0x8233ee30 - 0x8233ee39 -SWIDTH2 0x8233ef30 - 0x8233ef39 -SWIDTH2 0x8233f030 - 0x8233f039 -SWIDTH2 0x8233f130 - 0x8233f139 -SWIDTH2 0x8233f230 - 0x8233f239 -SWIDTH2 0x8233f330 - 0x8233f339 -SWIDTH2 0x8233f430 - 0x8233f439 -SWIDTH2 0x8233f530 - 0x8233f539 -SWIDTH2 0x8233f630 - 0x8233f639 -SWIDTH2 0x8233f730 - 0x8233f739 -SWIDTH2 0x8233f830 - 0x8233f839 -SWIDTH2 0x8233f930 - 0x8233f939 -SWIDTH2 0x8233fa30 - 0x8233fa39 -SWIDTH2 0x8233fb30 - 0x8233fb39 -SWIDTH2 0x8233fc30 - 0x8233fc39 -SWIDTH2 0x8233fd30 - 0x8233fd39 -SWIDTH2 0x8233fe30 - 0x8233fe39 -SWIDTH2 0x82348130 - 0x82348139 -SWIDTH2 0x82348230 - 0x82348239 -SWIDTH2 0x82348330 - 0x82348339 -SWIDTH2 0x82348430 - 0x82348439 -SWIDTH2 0x82348530 - 0x82348539 -SWIDTH2 0x82348630 - 0x82348639 -SWIDTH2 0x82348730 - 0x82348739 -SWIDTH2 0x82348830 - 0x82348839 -SWIDTH2 0x82348930 - 0x82348939 -SWIDTH2 0x82348a30 - 0x82348a39 -SWIDTH2 0x82348b30 - 0x82348b39 -SWIDTH2 0x82348c30 - 0x82348c39 -SWIDTH2 0x82348d30 - 0x82348d39 -SWIDTH2 0x82348e30 - 0x82348e39 -SWIDTH2 0x82348f30 - 0x82348f39 -SWIDTH2 0x82349030 - 0x82349039 -SWIDTH2 0x82349130 - 0x82349139 -SWIDTH2 0x82349230 - 0x82349239 -SWIDTH2 0x82349330 - 0x82349339 -SWIDTH2 0x82349430 - 0x82349439 -SWIDTH2 0x82349530 - 0x82349539 -SWIDTH2 0x82349630 - 0x82349639 -SWIDTH2 0x82349730 - 0x82349739 -SWIDTH2 0x82349830 - 0x82349839 -SWIDTH2 0x82349930 - 0x82349939 -SWIDTH2 0x82349a30 - 0x82349a39 -SWIDTH2 0x82349b30 - 0x82349b39 -SWIDTH2 0x82349c30 - 0x82349c39 -SWIDTH2 0x82349d30 - 0x82349d39 -SWIDTH2 0x82349e30 - 0x82349e39 -SWIDTH2 0x82349f30 - 0x82349f39 -SWIDTH2 0x8234a030 - 0x8234a039 -SWIDTH2 0x8234a130 - 0x8234a139 -SWIDTH2 0x8234a230 - 0x8234a239 -SWIDTH2 0x8234a330 - 0x8234a339 -SWIDTH2 0x8234a430 - 0x8234a439 -SWIDTH2 0x8234a530 - 0x8234a539 -SWIDTH2 0x8234a630 - 0x8234a639 -SWIDTH2 0x8234a730 - 0x8234a739 -SWIDTH2 0x8234a830 - 0x8234a839 -SWIDTH2 0x8234a930 - 0x8234a939 -SWIDTH2 0x8234aa30 - 0x8234aa39 -SWIDTH2 0x8234ab30 - 0x8234ab39 -SWIDTH2 0x8234ac30 - 0x8234ac39 -SWIDTH2 0x8234ad30 - 0x8234ad39 -SWIDTH2 0x8234ae30 - 0x8234ae39 -SWIDTH2 0x8234af30 - 0x8234af39 -SWIDTH2 0x8234b030 - 0x8234b039 -SWIDTH2 0x8234b130 - 0x8234b139 -SWIDTH2 0x8234b230 - 0x8234b239 -SWIDTH2 0x8234b330 - 0x8234b339 -SWIDTH2 0x8234b430 - 0x8234b439 -SWIDTH2 0x8234b530 - 0x8234b539 -SWIDTH2 0x8234b630 - 0x8234b639 -SWIDTH2 0x8234b730 - 0x8234b739 -SWIDTH2 0x8234b830 - 0x8234b839 -SWIDTH2 0x8234b930 - 0x8234b939 -SWIDTH2 0x8234ba30 - 0x8234ba39 -SWIDTH2 0x8234bb30 - 0x8234bb39 -SWIDTH2 0x8234bc30 - 0x8234bc39 -SWIDTH2 0x8234bd30 - 0x8234bd39 -SWIDTH2 0x8234be30 - 0x8234be39 -SWIDTH2 0x8234bf30 - 0x8234bf39 -SWIDTH2 0x8234c030 - 0x8234c039 -SWIDTH2 0x8234c130 - 0x8234c139 -SWIDTH2 0x8234c230 - 0x8234c239 -SWIDTH2 0x8234c330 - 0x8234c339 -SWIDTH2 0x8234c430 - 0x8234c439 -SWIDTH2 0x8234c530 - 0x8234c539 -SWIDTH2 0x8234c630 - 0x8234c639 -SWIDTH2 0x8234c730 - 0x8234c739 -SWIDTH2 0x8234c830 - 0x8234c839 -SWIDTH2 0x8234c930 - 0x8234c939 -SWIDTH2 0x8234ca30 - 0x8234ca39 -SWIDTH2 0x8234cb30 - 0x8234cb39 -SWIDTH2 0x8234cc30 - 0x8234cc39 -SWIDTH2 0x8234cd30 - 0x8234cd39 -SWIDTH2 0x8234ce30 - 0x8234ce39 -SWIDTH2 0x8234cf30 - 0x8234cf39 -SWIDTH2 0x8234d030 - 0x8234d039 -SWIDTH2 0x8234d130 - 0x8234d139 -SWIDTH2 0x8234d230 - 0x8234d239 -SWIDTH2 0x8234d330 - 0x8234d339 -SWIDTH2 0x8234d430 - 0x8234d439 -SWIDTH2 0x8234d530 - 0x8234d539 -SWIDTH2 0x8234d630 - 0x8234d639 -SWIDTH2 0x8234d730 - 0x8234d739 -SWIDTH2 0x8234d830 - 0x8234d839 -SWIDTH2 0x8234d930 - 0x8234d939 -SWIDTH2 0x8234da30 - 0x8234da39 -SWIDTH2 0x8234db30 - 0x8234db39 -SWIDTH2 0x8234dc30 - 0x8234dc39 -SWIDTH2 0x8234dd30 - 0x8234dd39 -SWIDTH2 0x8234de30 - 0x8234de39 -SWIDTH2 0x8234df30 - 0x8234df39 -SWIDTH2 0x8234e030 - 0x8234e039 -SWIDTH2 0x8234e130 - 0x8234e139 -SWIDTH2 0x8234e230 - 0x8234e239 -SWIDTH2 0x8234e330 - 0x8234e339 -SWIDTH2 0x8234e430 - 0x8234e439 -SWIDTH2 0x8234e530 - 0x8234e539 -SWIDTH2 0x8234e630 - 0x8234e639 -SWIDTH2 0x8234e730 - 0x8234e739 -SWIDTH2 0x8234e830 - 0x8234e839 -SWIDTH2 0x8234e930 - 0x8234e939 -SWIDTH2 0x8234ea30 - 0x8234ea39 -SWIDTH2 0x8234eb30 - 0x8234eb39 -SWIDTH2 0x8234ec30 - 0x8234ec39 -SWIDTH2 0x8234ed30 - 0x8234ed39 -SWIDTH2 0x8234ee30 - 0x8234ee39 -SWIDTH2 0x8234ef30 - 0x8234ef39 -SWIDTH2 0x8234f030 - 0x8234f039 -SWIDTH2 0x8234f130 - 0x8234f139 -SWIDTH2 0x8234f230 - 0x8234f239 -SWIDTH2 0x8234f330 - 0x8234f339 -SWIDTH2 0x8234f430 - 0x8234f439 -SWIDTH2 0x8234f530 - 0x8234f539 -SWIDTH2 0x8234f630 - 0x8234f639 -SWIDTH2 0x8234f730 - 0x8234f739 -SWIDTH2 0x8234f830 - 0x8234f839 -SWIDTH2 0x8234f930 - 0x8234f939 -SWIDTH2 0x8234fa30 - 0x8234fa39 -SWIDTH2 0x8234fb30 - 0x8234fb39 -SWIDTH2 0x8234fc30 - 0x8234fc39 -SWIDTH2 0x8234fd30 - 0x8234fd39 -SWIDTH2 0x8234fe30 - 0x8234fe39 -SWIDTH2 0x82358130 - 0x82358139 -SWIDTH2 0x82358230 - 0x82358239 -SWIDTH2 0x82358330 - 0x82358339 -SWIDTH2 0x82358430 - 0x82358439 -SWIDTH2 0x82358530 - 0x82358539 -SWIDTH2 0x82358630 - 0x82358639 -SWIDTH2 0x82358730 - 0x82358738 -SWIDTH2 0x82359833 - 0x82359839 -SWIDTH2 0x82359930 - 0x82359939 -SWIDTH2 0x82359a30 - 0x82359a39 -SWIDTH2 0x82359b30 - 0x82359b39 -SWIDTH2 0x82359c30 - 0x82359c39 -SWIDTH2 0x82359d30 - 0x82359d39 -SWIDTH2 0x82359e30 - 0x82359e39 -SWIDTH2 0x82359f30 - 0x82359f39 -SWIDTH2 0x8235a030 - 0x8235a039 -SWIDTH2 0x8235a130 - 0x8235a139 -SWIDTH2 0x8235a230 - 0x8235a239 -SWIDTH2 0x8235a330 - 0x8235a339 -SWIDTH2 0x8235a430 - 0x8235a439 -SWIDTH2 0x8235a530 - 0x8235a539 -SWIDTH2 0x8235a630 - 0x8235a639 -SWIDTH2 0x8235a730 - 0x8235a739 -SWIDTH2 0x8235a830 - 0x8235a839 -SWIDTH2 0x8235a930 - 0x8235a939 -SWIDTH2 0x8235aa30 - 0x8235aa39 -SWIDTH2 0x8235ab30 - 0x8235ab39 -SWIDTH2 0x8235ac30 - 0x8235ac39 -SWIDTH2 0x8235ad30 - 0x8235ad39 -SWIDTH2 0x8235ae30 - 0x8235ae39 -SWIDTH2 0x8235af30 - 0x8235af39 -SWIDTH2 0x8235b030 - 0x8235b039 -SWIDTH2 0x8235b130 - 0x8235b139 -SWIDTH2 0x8235b230 - 0x8235b239 -SWIDTH2 0x8235b330 - 0x8235b339 -SWIDTH2 0x8235b430 - 0x8235b439 -SWIDTH2 0x8235b530 - 0x8235b539 -SWIDTH2 0x8235b630 - 0x8235b639 -SWIDTH2 0x8235b730 - 0x8235b739 -SWIDTH2 0x8235b830 - 0x8235b839 -SWIDTH2 0x8235b930 - 0x8235b939 -SWIDTH2 0x8235ba30 - 0x8235ba39 -SWIDTH2 0x8235bb30 - 0x8235bb39 -SWIDTH2 0x8235bc30 - 0x8235bc39 -SWIDTH2 0x8235bd30 - 0x8235bd39 -SWIDTH2 0x8235be30 - 0x8235be39 -SWIDTH2 0x8235bf30 - 0x8235bf39 -SWIDTH2 0x8235c030 - 0x8235c039 -SWIDTH2 0x8235c130 - 0x8235c139 -SWIDTH2 0x8235c230 - 0x8235c239 -SWIDTH2 0x8235c330 - 0x8235c339 -SWIDTH2 0x8235c430 - 0x8235c439 -SWIDTH2 0x8235c530 - 0x8235c539 -SWIDTH2 0x8235c630 - 0x8235c639 -SWIDTH2 0x8235c730 - 0x8235c739 -SWIDTH2 0x8235c830 - 0x8235c839 -SWIDTH2 0x8235c930 - 0x8235c939 -SWIDTH2 0x8235ca30 - 0x8235ca39 -SWIDTH2 0x8235cb30 - 0x8235cb39 -SWIDTH2 0x8235cc30 - 0x8235cc39 -SWIDTH2 0x8235cd30 - 0x8235cd39 -SWIDTH2 0x8235ce30 - 0x8235ce39 -SWIDTH2 0x8235cf30 - 0x8235cf39 -SWIDTH2 0x8235d030 - 0x8235d039 -SWIDTH2 0x8235d130 - 0x8235d139 -SWIDTH2 0x8235d230 - 0x8235d239 -SWIDTH2 0x8235d330 - 0x8235d339 -SWIDTH2 0x8235d430 - 0x8235d439 -SWIDTH2 0x8235d530 - 0x8235d539 -SWIDTH2 0x8235d630 - 0x8235d639 -SWIDTH2 0x8235d730 - 0x8235d739 -SWIDTH2 0x8235d830 - 0x8235d839 -SWIDTH2 0x8235d930 - 0x8235d939 -SWIDTH2 0x8235da30 - 0x8235da39 -SWIDTH2 0x8235db30 - 0x8235db39 -SWIDTH2 0x8235dc30 - 0x8235dc39 -SWIDTH2 0x8235dd30 - 0x8235dd39 -SWIDTH2 0x8235de30 - 0x8235de39 -SWIDTH2 0x8235df30 - 0x8235df39 -SWIDTH2 0x8235e030 - 0x8235e039 -SWIDTH2 0x8235e130 - 0x8235e139 -SWIDTH2 0x8235e230 - 0x8235e239 -SWIDTH2 0x8235e330 - 0x8235e339 -SWIDTH2 0x8235e430 - 0x8235e439 -SWIDTH2 0x8235e530 - 0x8235e539 -SWIDTH2 0x8235e630 - 0x8235e639 -SWIDTH2 0x8235e730 - 0x8235e739 -SWIDTH2 0x8235e830 - 0x8235e839 -SWIDTH2 0x8235e930 - 0x8235e939 -SWIDTH2 0x8235ea30 - 0x8235ea39 -SWIDTH2 0x8235eb30 - 0x8235eb39 -SWIDTH2 0x8235ec30 - 0x8235ec39 -SWIDTH2 0x8235ed30 - 0x8235ed39 -SWIDTH2 0x8235ee30 - 0x8235ee39 -SWIDTH2 0x8235ef30 - 0x8235ef39 -SWIDTH2 0x8235f030 - 0x8235f039 -SWIDTH2 0x8235f130 - 0x8235f139 -SWIDTH2 0x8235f230 - 0x8235f239 -SWIDTH2 0x8235f330 - 0x8235f339 -SWIDTH2 0x8235f430 - 0x8235f439 -SWIDTH2 0x8235f530 - 0x8235f539 -SWIDTH2 0x8235f630 - 0x8235f639 -SWIDTH2 0x8235f730 - 0x8235f739 -SWIDTH2 0x8235f830 - 0x8235f839 -SWIDTH2 0x8235f930 - 0x8235f939 -SWIDTH2 0x8235fa30 - 0x8235fa39 -SWIDTH2 0x8235fb30 - 0x8235fb39 -SWIDTH2 0x8235fc30 - 0x8235fc39 -SWIDTH2 0x8235fd30 - 0x8235fd39 -SWIDTH2 0x8235fe30 - 0x8235fe39 -SWIDTH2 0x82368130 - 0x82368139 -SWIDTH2 0x82368230 - 0x82368239 -SWIDTH2 0x82368330 - 0x82368339 -SWIDTH2 0x82368430 - 0x82368439 -SWIDTH2 0x82368530 - 0x82368539 -SWIDTH2 0x82368630 - 0x82368639 -SWIDTH2 0x82368730 - 0x82368739 -SWIDTH2 0x82368830 - 0x82368839 -SWIDTH2 0x82368930 - 0x82368939 -SWIDTH2 0x82368a30 - 0x82368a39 -SWIDTH2 0x82368b30 - 0x82368b39 -SWIDTH2 0x82368c30 - 0x82368c39 -SWIDTH2 0x82368d30 - 0x82368d39 -SWIDTH2 0x82368e30 - 0x82368e37 -SWIDTH2 0x82368f31 - 0x82368f39 -SWIDTH2 0x82369030 - 0x82369039 -SWIDTH2 0x82369130 - 0x82369139 -SWIDTH2 0x82369230 - 0x82369239 -SWIDTH2 0x82369330 - 0x82369339 -SWIDTH2 0x82369430 - 0x82369435 -SWIDTH2 0x8237cf35 - 0x8237cf39 -SWIDTH2 0x8237d030 - 0x8237d039 -SWIDTH2 0x8237d130 - 0x8237d139 -SWIDTH2 0x8237d230 - 0x8237d239 -SWIDTH2 0x8237d330 - 0x8237d339 -SWIDTH2 0x8237d430 - 0x8237d439 -SWIDTH2 0x8237d530 - 0x8237d539 -SWIDTH2 0x8237d630 - 0x8237d639 -SWIDTH2 0x8237d730 - 0x8237d739 -SWIDTH2 0x8237d830 - 0x8237d839 -SWIDTH2 0x8237d930 - 0x8237d939 -SWIDTH2 0x8237da30 - 0x8237da39 -SWIDTH2 0x8237db30 - 0x8237db39 -SWIDTH2 0x8237dc30 - 0x8237dc39 -SWIDTH2 0x8237dd30 - 0x8237dd39 -SWIDTH2 0x8237de30 - 0x8237de39 -SWIDTH2 0x8237df30 - 0x8237df39 -SWIDTH2 0x8237e030 - 0x8237e039 -SWIDTH2 0x8237e130 - 0x8237e139 -SWIDTH2 0x8237e230 - 0x8237e239 -SWIDTH2 0x8237e330 - 0x8237e339 -SWIDTH2 0x8237e430 - 0x8237e439 -SWIDTH2 0x8237e530 - 0x8237e539 -SWIDTH2 0x8237e630 - 0x8237e639 -SWIDTH2 0x8237e730 - 0x8237e739 -SWIDTH2 0x8237e830 - 0x8237e839 -SWIDTH2 0x8237e930 - 0x8237e939 -SWIDTH2 0x8237ea30 - 0x8237ea39 -SWIDTH2 0x8237eb30 - 0x8237eb39 -SWIDTH2 0x8237ec30 - 0x8237ec39 -SWIDTH2 0x8237ed30 - 0x8237ed39 -SWIDTH2 0x8237ee30 - 0x8237ee39 -SWIDTH2 0x8237ef30 - 0x8237ef39 -SWIDTH2 0x8237f030 - 0x8237f039 -SWIDTH2 0x8237f130 - 0x8237f139 -SWIDTH2 0x8237f230 - 0x8237f239 -SWIDTH2 0x8237f330 - 0x8237f339 -SWIDTH2 0x8237f430 - 0x8237f439 -SWIDTH2 0x8237f530 - 0x8237f539 -SWIDTH2 0x8237f630 - 0x8237f639 -SWIDTH2 0x8237f730 - 0x8237f739 -SWIDTH2 0x8237f830 - 0x8237f839 -SWIDTH2 0x8237f930 - 0x8237f939 -SWIDTH2 0x8237fa30 - 0x8237fa39 -SWIDTH2 0x8237fb30 - 0x8237fb39 -SWIDTH2 0x8237fc30 - 0x8237fc39 -SWIDTH2 0x8237fd30 - 0x8237fd39 -SWIDTH2 0x8237fe30 - 0x8237fe39 -SWIDTH2 0x82388130 - 0x82388139 -SWIDTH2 0x82388230 - 0x82388239 -SWIDTH2 0x82388330 - 0x82388339 -SWIDTH2 0x82388430 - 0x82388439 -SWIDTH2 0x82388530 - 0x82388539 -SWIDTH2 0x82388630 - 0x82388639 -SWIDTH2 0x82388730 - 0x82388739 -SWIDTH2 0x82388830 - 0x82388839 -SWIDTH2 0x82388930 - 0x82388939 -SWIDTH2 0x82388a30 - 0x82388a39 -SWIDTH2 0x82388b30 - 0x82388b39 -SWIDTH2 0x82388c30 - 0x82388c39 -SWIDTH2 0x82388d30 - 0x82388d39 -SWIDTH2 0x82388e30 - 0x82388e39 -SWIDTH2 0x82388f30 - 0x82388f39 -SWIDTH2 0x82389030 - 0x82389039 -SWIDTH2 0x82389130 - 0x82389139 -SWIDTH2 0x82389230 - 0x82389239 -SWIDTH2 0x82389330 - 0x82389339 -SWIDTH2 0x82389430 - 0x82389439 -SWIDTH2 0x82389530 - 0x82389539 -SWIDTH2 0x82389630 - 0x82389639 -SWIDTH2 0x82389730 - 0x82389739 -SWIDTH2 0x82389830 - 0x82389839 -SWIDTH2 0x82389930 - 0x82389939 -SWIDTH2 0x82389a30 - 0x82389a39 -SWIDTH2 0x82389b30 - 0x82389b39 -SWIDTH2 0x82389c30 - 0x82389c39 -SWIDTH2 0x82389d30 - 0x82389d39 -SWIDTH2 0x82389e30 - 0x82389e39 -SWIDTH2 0x82389f30 - 0x82389f39 -SWIDTH2 0x8238a030 - 0x8238a039 -SWIDTH2 0x8238a130 - 0x8238a139 -SWIDTH2 0x8238a230 - 0x8238a239 -SWIDTH2 0x8238a330 - 0x8238a339 -SWIDTH2 0x8238a430 - 0x8238a439 -SWIDTH2 0x8238a530 - 0x8238a539 -SWIDTH2 0x8238a630 - 0x8238a639 -SWIDTH2 0x8238a730 - 0x8238a739 -SWIDTH2 0x8238a830 - 0x8238a839 -SWIDTH2 0x8238a930 - 0x8238a939 -SWIDTH2 0x8238aa30 - 0x8238aa39 -SWIDTH2 0x8238ab30 - 0x8238ab39 -SWIDTH2 0x8238ac30 - 0x8238ac39 -SWIDTH2 0x8238ad30 - 0x8238ad39 -SWIDTH2 0x8238ae30 - 0x8238ae39 -SWIDTH2 0x8238af30 - 0x8238af39 -SWIDTH2 0x8238b030 - 0x8238b039 -SWIDTH2 0x8238b130 - 0x8238b139 -SWIDTH2 0x8238b230 - 0x8238b239 -SWIDTH2 0x8238b330 - 0x8238b339 -SWIDTH2 0x8238b430 - 0x8238b439 -SWIDTH2 0x8238b530 - 0x8238b539 -SWIDTH2 0x8238b630 - 0x8238b639 -SWIDTH2 0x8238b730 - 0x8238b739 -SWIDTH2 0x8238b830 - 0x8238b839 -SWIDTH2 0x8238b930 - 0x8238b939 -SWIDTH2 0x8238ba30 - 0x8238ba39 -SWIDTH2 0x8238bb30 - 0x8238bb39 -SWIDTH2 0x8238bc30 - 0x8238bc39 -SWIDTH2 0x8238bd30 - 0x8238bd39 -SWIDTH2 0x8238be30 - 0x8238be39 -SWIDTH2 0x8238bf30 - 0x8238bf39 -SWIDTH2 0x8238c030 - 0x8238c039 -SWIDTH2 0x8238c130 - 0x8238c139 -SWIDTH2 0x8238c230 - 0x8238c239 -SWIDTH2 0x8238c330 - 0x8238c339 -SWIDTH2 0x8238c430 - 0x8238c439 -SWIDTH2 0x8238c530 - 0x8238c539 -SWIDTH2 0x8238c630 - 0x8238c639 -SWIDTH2 0x8238c730 - 0x8238c739 -SWIDTH2 0x8238c830 - 0x8238c839 -SWIDTH2 0x8238c930 - 0x8238c939 -SWIDTH2 0x8238ca30 - 0x8238ca39 -SWIDTH2 0x8238cb30 - 0x8238cb39 -SWIDTH2 0x8238cc30 - 0x8238cc39 -SWIDTH2 0x8238cd30 - 0x8238cd39 -SWIDTH2 0x8238ce30 - 0x8238ce39 -SWIDTH2 0x8238cf30 - 0x8238cf39 -SWIDTH2 0x8238d030 - 0x8238d039 -SWIDTH2 0x8238d130 - 0x8238d139 -SWIDTH2 0x8238d230 - 0x8238d239 -SWIDTH2 0x8238d330 - 0x8238d339 -SWIDTH2 0x8238d430 - 0x8238d439 -SWIDTH2 0x8238d530 - 0x8238d539 -SWIDTH2 0x8238d630 - 0x8238d639 -SWIDTH2 0x8238d730 - 0x8238d739 -SWIDTH2 0x8238d830 - 0x8238d839 -SWIDTH2 0x8238d930 - 0x8238d939 -SWIDTH2 0x8238da30 - 0x8238da39 -SWIDTH2 0x8238db30 - 0x8238db39 -SWIDTH2 0x8238dc30 - 0x8238dc39 -SWIDTH2 0x8238dd30 - 0x8238dd39 -SWIDTH2 0x8238de30 - 0x8238de39 -SWIDTH2 0x8238df30 - 0x8238df39 -SWIDTH2 0x8238e030 - 0x8238e039 -SWIDTH2 0x8238e130 - 0x8238e139 -SWIDTH2 0x8238e230 - 0x8238e239 -SWIDTH2 0x8238e330 - 0x8238e339 -SWIDTH2 0x8238e430 - 0x8238e439 -SWIDTH2 0x8238e530 - 0x8238e539 -SWIDTH2 0x8238e630 - 0x8238e639 -SWIDTH2 0x8238e730 - 0x8238e739 -SWIDTH2 0x8238e830 - 0x8238e839 -SWIDTH2 0x8238e930 - 0x8238e939 -SWIDTH2 0x8238ea30 - 0x8238ea39 -SWIDTH2 0x8238eb30 - 0x8238eb39 -SWIDTH2 0x8238ec30 - 0x8238ec39 -SWIDTH2 0x8238ed30 - 0x8238ed39 -SWIDTH2 0x8238ee30 - 0x8238ee39 -SWIDTH2 0x8238ef30 - 0x8238ef39 -SWIDTH2 0x8238f030 - 0x8238f039 -SWIDTH2 0x8238f130 - 0x8238f139 -SWIDTH2 0x8238f230 - 0x8238f239 -SWIDTH2 0x8238f330 - 0x8238f339 -SWIDTH2 0x8238f430 - 0x8238f439 -SWIDTH2 0x8238f530 - 0x8238f539 -SWIDTH2 0x8238f630 - 0x8238f639 -SWIDTH2 0x8238f730 - 0x8238f739 -SWIDTH2 0x8238f830 - 0x8238f839 -SWIDTH2 0x8238f930 - 0x8238f939 -SWIDTH2 0x8238fa30 - 0x8238fa39 -SWIDTH2 0x8238fb30 - 0x8238fb39 -SWIDTH2 0x8238fc30 - 0x8238fc39 -SWIDTH2 0x8238fd30 - 0x8238fd39 -SWIDTH2 0x8238fe30 - 0x8238fe39 -SWIDTH2 0x82398130 - 0x82398139 -SWIDTH2 0x82398230 - 0x82398239 -SWIDTH2 0x82398330 - 0x82398339 -SWIDTH2 0x82398430 - 0x82398439 -SWIDTH2 0x82398530 - 0x82398539 -SWIDTH2 0x82398630 - 0x82398639 -SWIDTH2 0x82398730 - 0x82398739 -SWIDTH2 0x82398830 - 0x82398839 -SWIDTH2 0x82398930 - 0x82398939 -SWIDTH2 0x82398a30 - 0x82398a39 -SWIDTH2 0x82398b30 - 0x82398b39 -SWIDTH2 0x82398c30 - 0x82398c39 -SWIDTH2 0x82398d30 - 0x82398d39 -SWIDTH2 0x82398e30 - 0x82398e39 -SWIDTH2 0x82398f30 - 0x82398f39 -SWIDTH2 0x82399030 - 0x82399039 -SWIDTH2 0x82399130 - 0x82399139 -SWIDTH2 0x82399230 - 0x82399239 -SWIDTH2 0x82399330 - 0x82399339 -SWIDTH2 0x82399430 - 0x82399439 -SWIDTH2 0x82399530 - 0x82399539 -SWIDTH2 0x82399630 - 0x82399639 -SWIDTH2 0x82399730 - 0x82399739 -SWIDTH2 0x82399830 - 0x82399839 -SWIDTH2 0x82399930 - 0x82399939 -SWIDTH2 0x82399a30 - 0x82399a39 -SWIDTH2 0x82399b30 - 0x82399b39 -SWIDTH2 0x82399c30 - 0x82399c39 -SWIDTH2 0x82399d30 - 0x82399d39 -SWIDTH2 0x82399e30 - 0x82399e39 -SWIDTH2 0x82399f30 - 0x82399f39 -SWIDTH2 0x8239a030 - 0x8239a039 -SWIDTH2 0x8239a130 - 0x8239a139 -SWIDTH2 0x8239a230 - 0x8239a239 -SWIDTH2 0x8239a330 - 0x8239a339 -SWIDTH2 0x8239a430 - 0x8239a439 -SWIDTH2 0x8239a530 - 0x8239a539 -SWIDTH2 0x8239a630 - 0x8239a639 -SWIDTH2 0x8239a730 - 0x8239a739 -SWIDTH2 0x8239a830 - 0x8239a839 -SWIDTH2 0x8239a930 - 0x8239a939 -SWIDTH2 0x8239aa30 - 0x8239aa39 -SWIDTH2 0x8239ab30 - 0x8239ab39 -SWIDTH2 0x8239ac30 - 0x8239ac39 -SWIDTH2 0x8239ad30 - 0x8239ad39 -SWIDTH2 0x8239ae30 - 0x8239ae39 -SWIDTH2 0x8239af30 - 0x8239af39 -SWIDTH2 0x8239b030 - 0x8239b039 -SWIDTH2 0x8239b130 - 0x8239b139 -SWIDTH2 0x8239b230 - 0x8239b239 -SWIDTH2 0x8239b330 - 0x8239b339 -SWIDTH2 0x8239b430 - 0x8239b439 -SWIDTH2 0x8239b530 - 0x8239b539 -SWIDTH2 0x8239b630 - 0x8239b639 -SWIDTH2 0x8239b730 - 0x8239b739 -SWIDTH2 0x8239b830 - 0x8239b839 -SWIDTH2 0x8239b930 - 0x8239b939 -SWIDTH2 0x8239ba30 - 0x8239ba39 -SWIDTH2 0x8239bb30 - 0x8239bb39 -SWIDTH2 0x8239bc30 - 0x8239bc39 -SWIDTH2 0x8239bd30 - 0x8239bd39 -SWIDTH2 0x8239be30 - 0x8239be39 -SWIDTH2 0x8239bf30 - 0x8239bf39 -SWIDTH2 0x8239c030 - 0x8239c039 -SWIDTH2 0x8239c130 - 0x8239c139 -SWIDTH2 0x8239c230 - 0x8239c239 -SWIDTH2 0x8239c330 - 0x8239c339 -SWIDTH2 0x8239c430 - 0x8239c439 -SWIDTH2 0x8239c530 - 0x8239c539 -SWIDTH2 0x8239c630 - 0x8239c639 -SWIDTH2 0x8239c730 - 0x8239c739 -SWIDTH2 0x8239c830 - 0x8239c839 -SWIDTH2 0x8239c930 - 0x8239c939 -SWIDTH2 0x8239ca30 - 0x8239ca39 -SWIDTH2 0x8239cb30 - 0x8239cb39 -SWIDTH2 0x8239cc30 - 0x8239cc39 -SWIDTH2 0x8239cd30 - 0x8239cd39 -SWIDTH2 0x8239ce30 - 0x8239ce39 -SWIDTH2 0x8239cf30 - 0x8239cf39 -SWIDTH2 0x8239d030 - 0x8239d039 -SWIDTH2 0x8239d130 - 0x8239d139 -SWIDTH2 0x8239d230 - 0x8239d239 -SWIDTH2 0x8239d330 - 0x8239d339 -SWIDTH2 0x8239d430 - 0x8239d439 -SWIDTH2 0x8239d530 - 0x8239d539 -SWIDTH2 0x8239d630 - 0x8239d639 -SWIDTH2 0x8239d730 - 0x8239d739 -SWIDTH2 0x8239d830 - 0x8239d839 -SWIDTH2 0x8239d930 - 0x8239d939 -SWIDTH2 0x8239da30 - 0x8239da39 -SWIDTH2 0x8239db30 - 0x8239db39 -SWIDTH2 0x8239dc30 - 0x8239dc39 -SWIDTH2 0x8239dd30 - 0x8239dd39 -SWIDTH2 0x8239de30 - 0x8239de39 -SWIDTH2 0x8239df30 - 0x8239df39 -SWIDTH2 0x8239e030 - 0x8239e039 -SWIDTH2 0x8239e130 - 0x8239e139 -SWIDTH2 0x8239e230 - 0x8239e239 -SWIDTH2 0x8239e330 - 0x8239e339 -SWIDTH2 0x8239e430 - 0x8239e439 -SWIDTH2 0x8239e530 - 0x8239e539 -SWIDTH2 0x8239e630 - 0x8239e639 -SWIDTH2 0x8239e730 - 0x8239e739 -SWIDTH2 0x8239e830 - 0x8239e839 -SWIDTH2 0x8239e930 - 0x8239e939 -SWIDTH2 0x8239ea30 - 0x8239ea39 -SWIDTH2 0x8239eb30 - 0x8239eb39 -SWIDTH2 0x8239ec30 - 0x8239ec39 -SWIDTH2 0x8239ed30 - 0x8239ed39 -SWIDTH2 0x8239ee30 - 0x8239ee39 -SWIDTH2 0x8239ef30 - 0x8239ef39 -SWIDTH2 0x8239f030 - 0x8239f039 -SWIDTH2 0x8239f130 - 0x8239f139 -SWIDTH2 0x8239f230 - 0x8239f239 -SWIDTH2 0x8239f330 - 0x8239f339 -SWIDTH2 0x8239f430 - 0x8239f439 -SWIDTH2 0x8239f530 - 0x8239f539 -SWIDTH2 0x8239f630 - 0x8239f639 -SWIDTH2 0x8239f730 - 0x8239f739 -SWIDTH2 0x8239f830 - 0x8239f839 -SWIDTH2 0x8239f930 - 0x8239f939 -SWIDTH2 0x8239fa30 - 0x8239fa39 -SWIDTH2 0x8239fb30 - 0x8239fb39 -SWIDTH2 0x8239fc30 - 0x8239fc39 -SWIDTH2 0x8239fd30 - 0x8239fd39 -SWIDTH2 0x8239fe30 - 0x8239fe39 -SWIDTH2 0x83308130 - 0x83308139 -SWIDTH2 0x83308230 - 0x83308239 -SWIDTH2 0x83308330 - 0x83308339 -SWIDTH2 0x83308430 - 0x83308439 -SWIDTH2 0x83308530 - 0x83308539 -SWIDTH2 0x83308630 - 0x83308639 -SWIDTH2 0x83308730 - 0x83308739 -SWIDTH2 0x83308830 - 0x83308839 -SWIDTH2 0x83308930 - 0x83308939 -SWIDTH2 0x83308a30 - 0x83308a39 -SWIDTH2 0x83308b30 - 0x83308b39 -SWIDTH2 0x83308c30 - 0x83308c39 -SWIDTH2 0x83308d30 - 0x83308d39 -SWIDTH2 0x83308e30 - 0x83308e39 -SWIDTH2 0x83308f30 - 0x83308f39 -SWIDTH2 0x83309030 - 0x83309039 -SWIDTH2 0x83309130 - 0x83309139 -SWIDTH2 0x83309230 - 0x83309239 -SWIDTH2 0x83309330 - 0x83309339 -SWIDTH2 0x83309430 - 0x83309439 -SWIDTH2 0x83309530 - 0x83309539 -SWIDTH2 0x83309630 - 0x83309639 -SWIDTH2 0x83309730 - 0x83309739 -SWIDTH2 0x83309830 - 0x83309839 -SWIDTH2 0x83309930 - 0x83309939 -SWIDTH2 0x83309a30 - 0x83309a39 -SWIDTH2 0x83309b30 - 0x83309b39 -SWIDTH2 0x83309c30 - 0x83309c39 -SWIDTH2 0x83309d30 - 0x83309d39 -SWIDTH2 0x83309e30 - 0x83309e39 -SWIDTH2 0x83309f30 - 0x83309f39 -SWIDTH2 0x8330a030 - 0x8330a039 -SWIDTH2 0x8330a130 - 0x8330a139 -SWIDTH2 0x8330a230 - 0x8330a239 -SWIDTH2 0x8330a330 - 0x8330a339 -SWIDTH2 0x8330a430 - 0x8330a439 -SWIDTH2 0x8330a530 - 0x8330a539 -SWIDTH2 0x8330a630 - 0x8330a639 -SWIDTH2 0x8330a730 - 0x8330a739 -SWIDTH2 0x8330a830 - 0x8330a839 -SWIDTH2 0x8330a930 - 0x8330a939 -SWIDTH2 0x8330aa30 - 0x8330aa39 -SWIDTH2 0x8330ab30 - 0x8330ab39 -SWIDTH2 0x8330ac30 - 0x8330ac39 -SWIDTH2 0x8330ad30 - 0x8330ad39 -SWIDTH2 0x8330ae30 - 0x8330ae39 -SWIDTH2 0x8330af30 - 0x8330af39 -SWIDTH2 0x8330b030 - 0x8330b039 -SWIDTH2 0x8330b130 - 0x8330b139 -SWIDTH2 0x8330b230 - 0x8330b239 -SWIDTH2 0x8330b330 - 0x8330b339 -SWIDTH2 0x8330b430 - 0x8330b439 -SWIDTH2 0x8330b530 - 0x8330b539 -SWIDTH2 0x8330b630 - 0x8330b639 -SWIDTH2 0x8330b730 - 0x8330b739 -SWIDTH2 0x8330b830 - 0x8330b839 -SWIDTH2 0x8330b930 - 0x8330b939 -SWIDTH2 0x8330ba30 - 0x8330ba39 -SWIDTH2 0x8330bb30 - 0x8330bb39 -SWIDTH2 0x8330bc30 - 0x8330bc39 -SWIDTH2 0x8330bd30 - 0x8330bd39 -SWIDTH2 0x8330be30 - 0x8330be39 -SWIDTH2 0x8330bf30 - 0x8330bf39 -SWIDTH2 0x8330c030 - 0x8330c039 -SWIDTH2 0x8330c130 - 0x8330c139 -SWIDTH2 0x8330c230 - 0x8330c239 -SWIDTH2 0x8330c330 - 0x8330c339 -SWIDTH2 0x8330c430 - 0x8330c439 -SWIDTH2 0x8330c530 - 0x8330c539 -SWIDTH2 0x8330c630 - 0x8330c639 -SWIDTH2 0x8330c730 - 0x8330c739 -SWIDTH2 0x8330c830 - 0x8330c839 -SWIDTH2 0x8330c930 - 0x8330c939 -SWIDTH2 0x8330ca30 - 0x8330ca39 -SWIDTH2 0x8330cb30 - 0x8330cb39 -SWIDTH2 0x8330cc30 - 0x8330cc39 -SWIDTH2 0x8330cd30 - 0x8330cd39 -SWIDTH2 0x8330ce30 - 0x8330ce39 -SWIDTH2 0x8330cf30 - 0x8330cf39 -SWIDTH2 0x8330d030 - 0x8330d039 -SWIDTH2 0x8330d130 - 0x8330d139 -SWIDTH2 0x8330d230 - 0x8330d239 -SWIDTH2 0x8330d330 - 0x8330d339 -SWIDTH2 0x8330d430 - 0x8330d439 -SWIDTH2 0x8330d530 - 0x8330d539 -SWIDTH2 0x8330d630 - 0x8330d639 -SWIDTH2 0x8330d730 - 0x8330d739 -SWIDTH2 0x8330d830 - 0x8330d839 -SWIDTH2 0x8330d930 - 0x8330d939 -SWIDTH2 0x8330da30 - 0x8330da39 -SWIDTH2 0x8330db30 - 0x8330db39 -SWIDTH2 0x8330dc30 - 0x8330dc39 -SWIDTH2 0x8330dd30 - 0x8330dd39 -SWIDTH2 0x8330de30 - 0x8330de39 -SWIDTH2 0x8330df30 - 0x8330df39 -SWIDTH2 0x8330e030 - 0x8330e039 -SWIDTH2 0x8330e130 - 0x8330e139 -SWIDTH2 0x8330e230 - 0x8330e239 -SWIDTH2 0x8330e330 - 0x8330e339 -SWIDTH2 0x8330e430 - 0x8330e439 -SWIDTH2 0x8330e530 - 0x8330e539 -SWIDTH2 0x8330e630 - 0x8330e639 -SWIDTH2 0x8330e730 - 0x8330e739 -SWIDTH2 0x8330e830 - 0x8330e839 -SWIDTH2 0x8330e930 - 0x8330e939 -SWIDTH2 0x8330ea30 - 0x8330ea39 -SWIDTH2 0x8330eb30 - 0x8330eb39 -SWIDTH2 0x8330ec30 - 0x8330ec39 -SWIDTH2 0x8330ed30 - 0x8330ed39 -SWIDTH2 0x8330ee30 - 0x8330ee39 -SWIDTH2 0x8330ef30 - 0x8330ef39 -SWIDTH2 0x8330f030 - 0x8330f039 -SWIDTH2 0x8330f130 - 0x8330f139 -SWIDTH2 0x8330f230 - 0x8330f239 -SWIDTH2 0x8330f330 - 0x8330f339 -SWIDTH2 0x8330f430 - 0x8330f439 -SWIDTH2 0x8330f530 - 0x8330f539 -SWIDTH2 0x8330f630 - 0x8330f639 -SWIDTH2 0x8330f730 - 0x8330f739 -SWIDTH2 0x8330f830 - 0x8330f839 -SWIDTH2 0x8330f930 - 0x8330f939 -SWIDTH2 0x8330fa30 - 0x8330fa39 -SWIDTH2 0x8330fb30 - 0x8330fb39 -SWIDTH2 0x8330fc30 - 0x8330fc39 -SWIDTH2 0x8330fd30 - 0x8330fd39 -SWIDTH2 0x8330fe30 - 0x8330fe39 -SWIDTH2 0x83318130 - 0x83318139 -SWIDTH2 0x83318230 - 0x83318239 -SWIDTH2 0x83318330 - 0x83318339 -SWIDTH2 0x83318430 - 0x83318439 -SWIDTH2 0x83318530 - 0x83318539 -SWIDTH2 0x83318630 - 0x83318639 -SWIDTH2 0x83318730 - 0x83318739 -SWIDTH2 0x83318830 - 0x83318839 -SWIDTH2 0x83318930 - 0x83318939 -SWIDTH2 0x83318a30 - 0x83318a39 -SWIDTH2 0x83318b30 - 0x83318b39 -SWIDTH2 0x83318c30 - 0x83318c39 -SWIDTH2 0x83318d30 - 0x83318d39 -SWIDTH2 0x83318e30 - 0x83318e39 -SWIDTH2 0x83318f30 - 0x83318f39 -SWIDTH2 0x83319030 - 0x83319039 -SWIDTH2 0x83319130 - 0x83319139 -SWIDTH2 0x83319230 - 0x83319239 -SWIDTH2 0x83319330 - 0x83319339 -SWIDTH2 0x83319430 - 0x83319439 -SWIDTH2 0x83319530 - 0x83319539 -SWIDTH2 0x83319630 - 0x83319639 -SWIDTH2 0x83319730 - 0x83319739 -SWIDTH2 0x83319830 - 0x83319839 -SWIDTH2 0x83319930 - 0x83319939 -SWIDTH2 0x83319a30 - 0x83319a39 -SWIDTH2 0x83319b30 - 0x83319b39 -SWIDTH2 0x83319c30 - 0x83319c39 -SWIDTH2 0x83319d30 - 0x83319d39 -SWIDTH2 0x83319e30 - 0x83319e39 -SWIDTH2 0x83319f30 - 0x83319f39 -SWIDTH2 0x8331a030 - 0x8331a039 -SWIDTH2 0x8331a130 - 0x8331a139 -SWIDTH2 0x8331a230 - 0x8331a239 -SWIDTH2 0x8331a330 - 0x8331a339 -SWIDTH2 0x8331a430 - 0x8331a439 -SWIDTH2 0x8331a530 - 0x8331a539 -SWIDTH2 0x8331a630 - 0x8331a639 -SWIDTH2 0x8331a730 - 0x8331a739 -SWIDTH2 0x8331a830 - 0x8331a839 -SWIDTH2 0x8331a930 - 0x8331a939 -SWIDTH2 0x8331aa30 - 0x8331aa39 -SWIDTH2 0x8331ab30 - 0x8331ab39 -SWIDTH2 0x8331ac30 - 0x8331ac39 -SWIDTH2 0x8331ad30 - 0x8331ad39 -SWIDTH2 0x8331ae30 - 0x8331ae39 -SWIDTH2 0x8331af30 - 0x8331af39 -SWIDTH2 0x8331b030 - 0x8331b039 -SWIDTH2 0x8331b130 - 0x8331b139 -SWIDTH2 0x8331b230 - 0x8331b239 -SWIDTH2 0x8331b330 - 0x8331b339 -SWIDTH2 0x8331b430 - 0x8331b439 -SWIDTH2 0x8331b530 - 0x8331b539 -SWIDTH2 0x8331b630 - 0x8331b639 -SWIDTH2 0x8331b730 - 0x8331b739 -SWIDTH2 0x8331b830 - 0x8331b839 -SWIDTH2 0x8331b930 - 0x8331b939 -SWIDTH2 0x8331ba30 - 0x8331ba39 -SWIDTH2 0x8331bb30 - 0x8331bb39 -SWIDTH2 0x8331bc30 - 0x8331bc39 -SWIDTH2 0x8331bd30 - 0x8331bd39 -SWIDTH2 0x8331be30 - 0x8331be39 -SWIDTH2 0x8331bf30 - 0x8331bf39 -SWIDTH2 0x8331c030 - 0x8331c039 -SWIDTH2 0x8331c130 - 0x8331c139 -SWIDTH2 0x8331c230 - 0x8331c239 -SWIDTH2 0x8331c330 - 0x8331c339 -SWIDTH2 0x8331c430 - 0x8331c439 -SWIDTH2 0x8331c530 - 0x8331c539 -SWIDTH2 0x8331c630 - 0x8331c639 -SWIDTH2 0x8331c730 - 0x8331c739 -SWIDTH2 0x8331c830 - 0x8331c839 -SWIDTH2 0x8331c930 - 0x8331c939 -SWIDTH2 0x8331ca30 - 0x8331ca39 -SWIDTH2 0x8331cb30 - 0x8331cb39 -SWIDTH2 0x8331cc30 - 0x8331cc39 -SWIDTH2 0x8331cd30 - 0x8331cd39 -SWIDTH2 0x8331ce30 - 0x8331ce39 -SWIDTH2 0x8331cf30 - 0x8331cf39 -SWIDTH2 0x8331d030 - 0x8331d039 -SWIDTH2 0x8331d130 - 0x8331d139 -SWIDTH2 0x8331d230 - 0x8331d239 -SWIDTH2 0x8331d330 - 0x8331d339 -SWIDTH2 0x8331d430 - 0x8331d439 -SWIDTH2 0x8331d530 - 0x8331d539 -SWIDTH2 0x8331d630 - 0x8331d639 -SWIDTH2 0x8331d730 - 0x8331d739 -SWIDTH2 0x8331d830 - 0x8331d839 -SWIDTH2 0x8331d930 - 0x8331d939 -SWIDTH2 0x8331da30 - 0x8331da39 -SWIDTH2 0x8331db30 - 0x8331db39 -SWIDTH2 0x8331dc30 - 0x8331dc39 -SWIDTH2 0x8331dd30 - 0x8331dd39 -SWIDTH2 0x8331de30 - 0x8331de39 -SWIDTH2 0x8331df30 - 0x8331df39 -SWIDTH2 0x8331e030 - 0x8331e039 -SWIDTH2 0x8331e130 - 0x8331e139 -SWIDTH2 0x8331e230 - 0x8331e239 -SWIDTH2 0x8331e330 - 0x8331e339 -SWIDTH2 0x8331e430 - 0x8331e439 -SWIDTH2 0x8331e530 - 0x8331e539 -SWIDTH2 0x8331e630 - 0x8331e639 -SWIDTH2 0x8331e730 - 0x8331e739 -SWIDTH2 0x8331e830 - 0x8331e839 -SWIDTH2 0x8331e930 - 0x8331e939 -SWIDTH2 0x8331ea30 - 0x8331ea39 -SWIDTH2 0x8331eb30 - 0x8331eb39 -SWIDTH2 0x8331ec30 - 0x8331ec39 -SWIDTH2 0x8331ed30 - 0x8331ed39 -SWIDTH2 0x8331ee30 - 0x8331ee39 -SWIDTH2 0x8331ef30 - 0x8331ef39 -SWIDTH2 0x8331f030 - 0x8331f039 -SWIDTH2 0x8331f130 - 0x8331f139 -SWIDTH2 0x8331f230 - 0x8331f239 -SWIDTH2 0x8331f330 - 0x8331f339 -SWIDTH2 0x8331f430 - 0x8331f439 -SWIDTH2 0x8331f530 - 0x8331f539 -SWIDTH2 0x8331f630 - 0x8331f639 -SWIDTH2 0x8331f730 - 0x8331f739 -SWIDTH2 0x8331f830 - 0x8331f839 -SWIDTH2 0x8331f930 - 0x8331f939 -SWIDTH2 0x8331fa30 - 0x8331fa39 -SWIDTH2 0x8331fb30 - 0x8331fb39 -SWIDTH2 0x8331fc30 - 0x8331fc39 -SWIDTH2 0x8331fd30 - 0x8331fd39 -SWIDTH2 0x8331fe30 - 0x8331fe39 -SWIDTH2 0x83328130 - 0x83328139 -SWIDTH2 0x83328230 - 0x83328239 -SWIDTH2 0x83328330 - 0x83328339 -SWIDTH2 0x83328430 - 0x83328439 -SWIDTH2 0x83328530 - 0x83328539 -SWIDTH2 0x83328630 - 0x83328639 -SWIDTH2 0x83328730 - 0x83328739 -SWIDTH2 0x83328830 - 0x83328839 -SWIDTH2 0x83328930 - 0x83328939 -SWIDTH2 0x83328a30 - 0x83328a39 -SWIDTH2 0x83328b30 - 0x83328b39 -SWIDTH2 0x83328c30 - 0x83328c39 -SWIDTH2 0x83328d30 - 0x83328d39 -SWIDTH2 0x83328e30 - 0x83328e39 -SWIDTH2 0x83328f30 - 0x83328f39 -SWIDTH2 0x83329030 - 0x83329039 -SWIDTH2 0x83329130 - 0x83329139 -SWIDTH2 0x83329230 - 0x83329239 -SWIDTH2 0x83329330 - 0x83329339 -SWIDTH2 0x83329430 - 0x83329439 -SWIDTH2 0x83329530 - 0x83329539 -SWIDTH2 0x83329630 - 0x83329639 -SWIDTH2 0x83329730 - 0x83329739 -SWIDTH2 0x83329830 - 0x83329839 -SWIDTH2 0x83329930 - 0x83329939 -SWIDTH2 0x83329a30 - 0x83329a39 -SWIDTH2 0x83329b30 - 0x83329b39 -SWIDTH2 0x83329c30 - 0x83329c39 -SWIDTH2 0x83329d30 - 0x83329d39 -SWIDTH2 0x83329e30 - 0x83329e39 -SWIDTH2 0x83329f30 - 0x83329f39 -SWIDTH2 0x8332a030 - 0x8332a039 -SWIDTH2 0x8332a130 - 0x8332a139 -SWIDTH2 0x8332a230 - 0x8332a239 -SWIDTH2 0x8332a330 - 0x8332a339 -SWIDTH2 0x8332a430 - 0x8332a439 -SWIDTH2 0x8332a530 - 0x8332a539 -SWIDTH2 0x8332a630 - 0x8332a639 -SWIDTH2 0x8332a730 - 0x8332a739 -SWIDTH2 0x8332a830 - 0x8332a839 -SWIDTH2 0x8332a930 - 0x8332a939 -SWIDTH2 0x8332aa30 - 0x8332aa39 -SWIDTH2 0x8332ab30 - 0x8332ab39 -SWIDTH2 0x8332ac30 - 0x8332ac39 -SWIDTH2 0x8332ad30 - 0x8332ad39 -SWIDTH2 0x8332ae30 - 0x8332ae39 -SWIDTH2 0x8332af30 - 0x8332af39 -SWIDTH2 0x8332b030 - 0x8332b039 -SWIDTH2 0x8332b130 - 0x8332b139 -SWIDTH2 0x8332b230 - 0x8332b239 -SWIDTH2 0x8332b330 - 0x8332b339 -SWIDTH2 0x8332b430 - 0x8332b439 -SWIDTH2 0x8332b530 - 0x8332b539 -SWIDTH2 0x8332b630 - 0x8332b639 -SWIDTH2 0x8332b730 - 0x8332b739 -SWIDTH2 0x8332b830 - 0x8332b839 -SWIDTH2 0x8332b930 - 0x8332b939 -SWIDTH2 0x8332ba30 - 0x8332ba39 -SWIDTH2 0x8332bb30 - 0x8332bb39 -SWIDTH2 0x8332bc30 - 0x8332bc39 -SWIDTH2 0x8332bd30 - 0x8332bd39 -SWIDTH2 0x8332be30 - 0x8332be39 -SWIDTH2 0x8332bf30 - 0x8332bf39 -SWIDTH2 0x8332c030 - 0x8332c039 -SWIDTH2 0x8332c130 - 0x8332c139 -SWIDTH2 0x8332c230 - 0x8332c239 -SWIDTH2 0x8332c330 - 0x8332c339 -SWIDTH2 0x8332c430 - 0x8332c439 -SWIDTH2 0x8332c530 - 0x8332c539 -SWIDTH2 0x8332c630 - 0x8332c639 -SWIDTH2 0x8332c730 - 0x8332c739 -SWIDTH2 0x8332c830 - 0x8332c839 -SWIDTH2 0x8332c930 - 0x8332c939 -SWIDTH2 0x8332ca30 - 0x8332ca39 -SWIDTH2 0x8332cb30 - 0x8332cb39 -SWIDTH2 0x8332cc30 - 0x8332cc39 -SWIDTH2 0x8332cd30 - 0x8332cd39 -SWIDTH2 0x8332ce30 - 0x8332ce39 -SWIDTH2 0x8332cf30 - 0x8332cf39 -SWIDTH2 0x8332d030 - 0x8332d039 -SWIDTH2 0x8332d130 - 0x8332d139 -SWIDTH2 0x8332d230 - 0x8332d239 -SWIDTH2 0x8332d330 - 0x8332d339 -SWIDTH2 0x8332d430 - 0x8332d439 -SWIDTH2 0x8332d530 - 0x8332d539 -SWIDTH2 0x8332d630 - 0x8332d639 -SWIDTH2 0x8332d730 - 0x8332d739 -SWIDTH2 0x8332d830 - 0x8332d839 -SWIDTH2 0x8332d930 - 0x8332d939 -SWIDTH2 0x8332da30 - 0x8332da39 -SWIDTH2 0x8332db30 - 0x8332db39 -SWIDTH2 0x8332dc30 - 0x8332dc39 -SWIDTH2 0x8332dd30 - 0x8332dd39 -SWIDTH2 0x8332de30 - 0x8332de39 -SWIDTH2 0x8332df30 - 0x8332df39 -SWIDTH2 0x8332e030 - 0x8332e039 -SWIDTH2 0x8332e130 - 0x8332e139 -SWIDTH2 0x8332e230 - 0x8332e239 -SWIDTH2 0x8332e330 - 0x8332e339 -SWIDTH2 0x8332e430 - 0x8332e439 -SWIDTH2 0x8332e530 - 0x8332e539 -SWIDTH2 0x8332e630 - 0x8332e639 -SWIDTH2 0x8332e730 - 0x8332e739 -SWIDTH2 0x8332e830 - 0x8332e839 -SWIDTH2 0x8332e930 - 0x8332e939 -SWIDTH2 0x8332ea30 - 0x8332ea39 -SWIDTH2 0x8332eb30 - 0x8332eb39 -SWIDTH2 0x8332ec30 - 0x8332ec39 -SWIDTH2 0x8332ed30 - 0x8332ed39 -SWIDTH2 0x8332ee30 - 0x8332ee39 -SWIDTH2 0x8332ef30 - 0x8332ef39 -SWIDTH2 0x8332f030 - 0x8332f039 -SWIDTH2 0x8332f130 - 0x8332f139 -SWIDTH2 0x8332f230 - 0x8332f239 -SWIDTH2 0x8332f330 - 0x8332f339 -SWIDTH2 0x8332f430 - 0x8332f439 -SWIDTH2 0x8332f530 - 0x8332f539 -SWIDTH2 0x8332f630 - 0x8332f639 -SWIDTH2 0x8332f730 - 0x8332f739 -SWIDTH2 0x8332f830 - 0x8332f839 -SWIDTH2 0x8332f930 - 0x8332f939 -SWIDTH2 0x8332fa30 - 0x8332fa39 -SWIDTH2 0x8332fb30 - 0x8332fb39 -SWIDTH2 0x8332fc30 - 0x8332fc39 -SWIDTH2 0x8332fd30 - 0x8332fd39 -SWIDTH2 0x8332fe30 - 0x8332fe39 -SWIDTH2 0x83338130 - 0x83338139 -SWIDTH2 0x83338230 - 0x83338239 -SWIDTH2 0x83338330 - 0x83338339 -SWIDTH2 0x83338430 - 0x83338439 -SWIDTH2 0x83338530 - 0x83338539 -SWIDTH2 0x83338630 - 0x83338639 -SWIDTH2 0x83338730 - 0x83338739 -SWIDTH2 0x83338830 - 0x83338839 -SWIDTH2 0x83338930 - 0x83338939 -SWIDTH2 0x83338a30 - 0x83338a39 -SWIDTH2 0x83338b30 - 0x83338b39 -SWIDTH2 0x83338c30 - 0x83338c39 -SWIDTH2 0x83338d30 - 0x83338d39 -SWIDTH2 0x83338e30 - 0x83338e39 -SWIDTH2 0x83338f30 - 0x83338f39 -SWIDTH2 0x83339030 - 0x83339039 -SWIDTH2 0x83339130 - 0x83339139 -SWIDTH2 0x83339230 - 0x83339239 -SWIDTH2 0x83339330 - 0x83339339 -SWIDTH2 0x83339430 - 0x83339439 -SWIDTH2 0x83339530 - 0x83339539 -SWIDTH2 0x83339630 - 0x83339639 -SWIDTH2 0x83339730 - 0x83339739 -SWIDTH2 0x83339830 - 0x83339839 -SWIDTH2 0x83339930 - 0x83339939 -SWIDTH2 0x83339a30 - 0x83339a39 -SWIDTH2 0x83339b30 - 0x83339b39 -SWIDTH2 0x83339c30 - 0x83339c39 -SWIDTH2 0x83339d30 - 0x83339d39 -SWIDTH2 0x83339e30 - 0x83339e39 -SWIDTH2 0x83339f30 - 0x83339f39 -SWIDTH2 0x8333a030 - 0x8333a039 -SWIDTH2 0x8333a130 - 0x8333a139 -SWIDTH2 0x8333a230 - 0x8333a239 -SWIDTH2 0x8333a330 - 0x8333a339 -SWIDTH2 0x8333a430 - 0x8333a439 -SWIDTH2 0x8333a530 - 0x8333a539 -SWIDTH2 0x8333a630 - 0x8333a639 -SWIDTH2 0x8333a730 - 0x8333a739 -SWIDTH2 0x8333a830 - 0x8333a839 -SWIDTH2 0x8333a930 - 0x8333a939 -SWIDTH2 0x8333aa30 - 0x8333aa39 -SWIDTH2 0x8333ab30 - 0x8333ab39 -SWIDTH2 0x8333ac30 - 0x8333ac39 -SWIDTH2 0x8333ad30 - 0x8333ad39 -SWIDTH2 0x8333ae30 - 0x8333ae39 -SWIDTH2 0x8333af30 - 0x8333af39 -SWIDTH2 0x8333b030 - 0x8333b039 -SWIDTH2 0x8333b130 - 0x8333b139 -SWIDTH2 0x8333b230 - 0x8333b239 -SWIDTH2 0x8333b330 - 0x8333b339 -SWIDTH2 0x8333b430 - 0x8333b439 -SWIDTH2 0x8333b530 - 0x8333b539 -SWIDTH2 0x8333b630 - 0x8333b639 -SWIDTH2 0x8333b730 - 0x8333b739 -SWIDTH2 0x8333b830 - 0x8333b839 -SWIDTH2 0x8333b930 - 0x8333b939 -SWIDTH2 0x8333ba30 - 0x8333ba39 -SWIDTH2 0x8333bb30 - 0x8333bb39 -SWIDTH2 0x8333bc30 - 0x8333bc39 -SWIDTH2 0x8333bd30 - 0x8333bd39 -SWIDTH2 0x8333be30 - 0x8333be39 -SWIDTH2 0x8333bf30 - 0x8333bf39 -SWIDTH2 0x8333c030 - 0x8333c039 -SWIDTH2 0x8333c130 - 0x8333c139 -SWIDTH2 0x8333c230 - 0x8333c239 -SWIDTH2 0x8333c330 - 0x8333c339 -SWIDTH2 0x8333c430 - 0x8333c439 -SWIDTH2 0x8333c530 - 0x8333c539 -SWIDTH2 0x8333c630 - 0x8333c639 -SWIDTH2 0x8333c730 - 0x8333c739 -SWIDTH2 0x8333c830 - 0x8333c839 -SWIDTH2 0x8333c930 - 0x8333c939 -SWIDTH2 0x8333ca30 - 0x8333ca39 -SWIDTH2 0x8333cb30 - 0x8333cb39 -SWIDTH2 0x8333cc30 - 0x8333cc39 -SWIDTH2 0x8333cd30 - 0x8333cd39 -SWIDTH2 0x8333ce30 - 0x8333ce39 -SWIDTH2 0x8333cf30 - 0x8333cf39 -SWIDTH2 0x8333d030 - 0x8333d039 -SWIDTH2 0x8333d130 - 0x8333d139 -SWIDTH2 0x8333d230 - 0x8333d239 -SWIDTH2 0x8333d330 - 0x8333d339 -SWIDTH2 0x8333d430 - 0x8333d439 -SWIDTH2 0x8333d530 - 0x8333d539 -SWIDTH2 0x8333d630 - 0x8333d639 -SWIDTH2 0x8333d730 - 0x8333d739 -SWIDTH2 0x8333d830 - 0x8333d839 -SWIDTH2 0x8333d930 - 0x8333d939 -SWIDTH2 0x8333da30 - 0x8333da39 -SWIDTH2 0x8333db30 - 0x8333db39 -SWIDTH2 0x8333dc30 - 0x8333dc39 -SWIDTH2 0x8333dd30 - 0x8333dd39 -SWIDTH2 0x8333de30 - 0x8333de39 -SWIDTH2 0x8333df30 - 0x8333df39 -SWIDTH2 0x8333e030 - 0x8333e039 -SWIDTH2 0x8333e130 - 0x8333e139 -SWIDTH2 0x8333e230 - 0x8333e239 -SWIDTH2 0x8333e330 - 0x8333e339 -SWIDTH2 0x8333e430 - 0x8333e439 -SWIDTH2 0x8333e530 - 0x8333e539 -SWIDTH2 0x8333e630 - 0x8333e639 -SWIDTH2 0x8333e730 - 0x8333e739 -SWIDTH2 0x8333e830 - 0x8333e839 -SWIDTH2 0x8333e930 - 0x8333e939 -SWIDTH2 0x8333ea30 - 0x8333ea39 -SWIDTH2 0x8333eb30 - 0x8333eb39 -SWIDTH2 0x8333ec30 - 0x8333ec39 -SWIDTH2 0x8333ed30 - 0x8333ed39 -SWIDTH2 0x8333ee30 - 0x8333ee39 -SWIDTH2 0x8333ef30 - 0x8333ef39 -SWIDTH2 0x8333f030 - 0x8333f039 -SWIDTH2 0x8333f130 - 0x8333f139 -SWIDTH2 0x8333f230 - 0x8333f239 -SWIDTH2 0x8333f330 - 0x8333f339 -SWIDTH2 0x8333f430 - 0x8333f439 -SWIDTH2 0x8333f530 - 0x8333f539 -SWIDTH2 0x8333f630 - 0x8333f639 -SWIDTH2 0x8333f730 - 0x8333f739 -SWIDTH2 0x8333f830 - 0x8333f839 -SWIDTH2 0x8333f930 - 0x8333f939 -SWIDTH2 0x8333fa30 - 0x8333fa39 -SWIDTH2 0x8333fb30 - 0x8333fb39 -SWIDTH2 0x8333fc30 - 0x8333fc39 -SWIDTH2 0x8333fd30 - 0x8333fd39 -SWIDTH2 0x8333fe30 - 0x8333fe39 -SWIDTH2 0x83348130 - 0x83348139 -SWIDTH2 0x83348230 - 0x83348239 -SWIDTH2 0x83348330 - 0x83348339 -SWIDTH2 0x83348430 - 0x83348439 -SWIDTH2 0x83348530 - 0x83348539 -SWIDTH2 0x83348630 - 0x83348639 -SWIDTH2 0x83348730 - 0x83348739 -SWIDTH2 0x83348830 - 0x83348839 -SWIDTH2 0x83348930 - 0x83348939 -SWIDTH2 0x83348a30 - 0x83348a39 -SWIDTH2 0x83348b30 - 0x83348b39 -SWIDTH2 0x83348c30 - 0x83348c39 -SWIDTH2 0x83348d30 - 0x83348d39 -SWIDTH2 0x83348e30 - 0x83348e39 -SWIDTH2 0x83348f30 - 0x83348f39 -SWIDTH2 0x83349030 - 0x83349039 -SWIDTH2 0x83349130 - 0x83349139 -SWIDTH2 0x83349230 - 0x83349239 -SWIDTH2 0x83349330 - 0x83349339 -SWIDTH2 0x83349430 - 0x83349439 -SWIDTH2 0x83349530 - 0x83349539 -SWIDTH2 0x83349630 - 0x83349639 -SWIDTH2 0x83349730 - 0x83349739 -SWIDTH2 0x83349830 - 0x83349839 -SWIDTH2 0x83349930 - 0x83349939 -SWIDTH2 0x83349a30 - 0x83349a39 -SWIDTH2 0x83349b30 - 0x83349b39 -SWIDTH2 0x83349c30 - 0x83349c39 -SWIDTH2 0x83349d30 - 0x83349d39 -SWIDTH2 0x83349e30 - 0x83349e39 -SWIDTH2 0x83349f30 - 0x83349f39 -SWIDTH2 0x8334a030 - 0x8334a039 -SWIDTH2 0x8334a130 - 0x8334a139 -SWIDTH2 0x8334a230 - 0x8334a239 -SWIDTH2 0x8334a330 - 0x8334a339 -SWIDTH2 0x8334a430 - 0x8334a439 -SWIDTH2 0x8334a530 - 0x8334a539 -SWIDTH2 0x8334a630 - 0x8334a639 -SWIDTH2 0x8334a730 - 0x8334a739 -SWIDTH2 0x8334a830 - 0x8334a839 -SWIDTH2 0x8334a930 - 0x8334a939 -SWIDTH2 0x8334aa30 - 0x8334aa39 -SWIDTH2 0x8334ab30 - 0x8334ab39 -SWIDTH2 0x8334ac30 - 0x8334ac39 -SWIDTH2 0x8334ad30 - 0x8334ad39 -SWIDTH2 0x8334ae30 - 0x8334ae39 -SWIDTH2 0x8334af30 - 0x8334af39 -SWIDTH2 0x8334b030 - 0x8334b039 -SWIDTH2 0x8334b130 - 0x8334b139 -SWIDTH2 0x8334b230 - 0x8334b239 -SWIDTH2 0x8334b330 - 0x8334b339 -SWIDTH2 0x8334b430 - 0x8334b439 -SWIDTH2 0x8334b530 - 0x8334b539 -SWIDTH2 0x8334b630 - 0x8334b639 -SWIDTH2 0x8334b730 - 0x8334b739 -SWIDTH2 0x8334b830 - 0x8334b839 -SWIDTH2 0x8334b930 - 0x8334b939 -SWIDTH2 0x8334ba30 - 0x8334ba39 -SWIDTH2 0x8334bb30 - 0x8334bb39 -SWIDTH2 0x8334bc30 - 0x8334bc39 -SWIDTH2 0x8334bd30 - 0x8334bd39 -SWIDTH2 0x8334be30 - 0x8334be39 -SWIDTH2 0x8334bf30 - 0x8334bf39 -SWIDTH2 0x8334c030 - 0x8334c039 -SWIDTH2 0x8334c130 - 0x8334c139 -SWIDTH2 0x8334c230 - 0x8334c239 -SWIDTH2 0x8334c330 - 0x8334c339 -SWIDTH2 0x8334c430 - 0x8334c439 -SWIDTH2 0x8334c530 - 0x8334c539 -SWIDTH2 0x8334c630 - 0x8334c639 -SWIDTH2 0x8334c730 - 0x8334c739 -SWIDTH2 0x8334c830 - 0x8334c839 -SWIDTH2 0x8334c930 - 0x8334c939 -SWIDTH2 0x8334ca30 - 0x8334ca39 -SWIDTH2 0x8334cb30 - 0x8334cb39 -SWIDTH2 0x8334cc30 - 0x8334cc39 -SWIDTH2 0x8334cd30 - 0x8334cd39 -SWIDTH2 0x8334ce30 - 0x8334ce39 -SWIDTH2 0x8334cf30 - 0x8334cf39 -SWIDTH2 0x8334d030 - 0x8334d039 -SWIDTH2 0x8334d130 - 0x8334d139 -SWIDTH2 0x8334d230 - 0x8334d239 -SWIDTH2 0x8334d330 - 0x8334d339 -SWIDTH2 0x8334d430 - 0x8334d439 -SWIDTH2 0x8334d530 - 0x8334d539 -SWIDTH2 0x8334d630 - 0x8334d639 -SWIDTH2 0x8334d730 - 0x8334d739 -SWIDTH2 0x8334d830 - 0x8334d839 -SWIDTH2 0x8334d930 - 0x8334d939 -SWIDTH2 0x8334da30 - 0x8334da39 -SWIDTH2 0x8334db30 - 0x8334db39 -SWIDTH2 0x8334dc30 - 0x8334dc39 -SWIDTH2 0x8334dd30 - 0x8334dd39 -SWIDTH2 0x8334de30 - 0x8334de39 -SWIDTH2 0x8334df30 - 0x8334df39 -SWIDTH2 0x8334e030 - 0x8334e039 -SWIDTH2 0x8334e130 - 0x8334e139 -SWIDTH2 0x8334e230 - 0x8334e239 -SWIDTH2 0x8334e330 - 0x8334e339 -SWIDTH2 0x8334e430 - 0x8334e439 -SWIDTH2 0x8334e530 - 0x8334e539 -SWIDTH2 0x8334e630 - 0x8334e639 -SWIDTH2 0x8334e730 - 0x8334e739 -SWIDTH2 0x8334e830 - 0x8334e839 -SWIDTH2 0x8334e930 - 0x8334e939 -SWIDTH2 0x8334ea30 - 0x8334ea39 -SWIDTH2 0x8334eb30 - 0x8334eb39 -SWIDTH2 0x8334ec30 - 0x8334ec39 -SWIDTH2 0x8334ed30 - 0x8334ed39 -SWIDTH2 0x8334ee30 - 0x8334ee39 -SWIDTH2 0x8334ef30 - 0x8334ef39 -SWIDTH2 0x8334f030 - 0x8334f039 -SWIDTH2 0x8334f130 - 0x8334f139 -SWIDTH2 0x8334f230 - 0x8334f239 -SWIDTH2 0x8334f330 - 0x8334f339 -SWIDTH2 0x8334f430 - 0x8334f439 -SWIDTH2 0x8334f530 - 0x8334f539 -SWIDTH2 0x8334f630 - 0x8334f639 -SWIDTH2 0x8334f730 - 0x8334f739 -SWIDTH2 0x8334f830 - 0x8334f839 -SWIDTH2 0x8334f930 - 0x8334f939 -SWIDTH2 0x8334fa30 - 0x8334fa39 -SWIDTH2 0x8334fb30 - 0x8334fb39 -SWIDTH2 0x8334fc30 - 0x8334fc39 -SWIDTH2 0x8334fd30 - 0x8334fd39 -SWIDTH2 0x8334fe30 - 0x8334fe39 -SWIDTH2 0x83358130 - 0x83358139 -SWIDTH2 0x83358230 - 0x83358239 -SWIDTH2 0x83358330 - 0x83358339 -SWIDTH2 0x83358430 - 0x83358439 -SWIDTH2 0x83358530 - 0x83358539 -SWIDTH2 0x83358630 - 0x83358639 -SWIDTH2 0x83358730 - 0x83358739 -SWIDTH2 0x83358830 - 0x83358839 -SWIDTH2 0x83358930 - 0x83358939 -SWIDTH2 0x83358a30 - 0x83358a39 -SWIDTH2 0x83358b30 - 0x83358b39 -SWIDTH2 0x83358c30 - 0x83358c39 -SWIDTH2 0x83358d30 - 0x83358d39 -SWIDTH2 0x83358e30 - 0x83358e39 -SWIDTH2 0x83358f30 - 0x83358f39 -SWIDTH2 0x83359030 - 0x83359039 -SWIDTH2 0x83359130 - 0x83359139 -SWIDTH2 0x83359230 - 0x83359239 -SWIDTH2 0x83359330 - 0x83359339 -SWIDTH2 0x83359430 - 0x83359439 -SWIDTH2 0x83359530 - 0x83359539 -SWIDTH2 0x83359630 - 0x83359639 -SWIDTH2 0x83359730 - 0x83359739 -SWIDTH2 0x83359830 - 0x83359839 -SWIDTH2 0x83359930 - 0x83359939 -SWIDTH2 0x83359a30 - 0x83359a39 -SWIDTH2 0x83359b30 - 0x83359b39 -SWIDTH2 0x83359c30 - 0x83359c39 -SWIDTH2 0x83359d30 - 0x83359d39 -SWIDTH2 0x83359e30 - 0x83359e39 -SWIDTH2 0x83359f30 - 0x83359f39 -SWIDTH2 0x8335a030 - 0x8335a039 -SWIDTH2 0x8335a130 - 0x8335a139 -SWIDTH2 0x8335a230 - 0x8335a239 -SWIDTH2 0x8335a330 - 0x8335a339 -SWIDTH2 0x8335a430 - 0x8335a439 -SWIDTH2 0x8335a530 - 0x8335a539 -SWIDTH2 0x8335a630 - 0x8335a639 -SWIDTH2 0x8335a730 - 0x8335a739 -SWIDTH2 0x8335a830 - 0x8335a839 -SWIDTH2 0x8335a930 - 0x8335a939 -SWIDTH2 0x8335aa30 - 0x8335aa39 -SWIDTH2 0x8335ab30 - 0x8335ab39 -SWIDTH2 0x8335ac30 - 0x8335ac39 -SWIDTH2 0x8335ad30 - 0x8335ad39 -SWIDTH2 0x8335ae30 - 0x8335ae39 -SWIDTH2 0x8335af30 - 0x8335af39 -SWIDTH2 0x8335b030 - 0x8335b039 -SWIDTH2 0x8335b130 - 0x8335b139 -SWIDTH2 0x8335b230 - 0x8335b239 -SWIDTH2 0x8335b330 - 0x8335b339 -SWIDTH2 0x8335b430 - 0x8335b439 -SWIDTH2 0x8335b530 - 0x8335b539 -SWIDTH2 0x8335b630 - 0x8335b639 -SWIDTH2 0x8335b730 - 0x8335b739 -SWIDTH2 0x8335b830 - 0x8335b839 -SWIDTH2 0x8335b930 - 0x8335b939 -SWIDTH2 0x8335ba30 - 0x8335ba39 -SWIDTH2 0x8335bb30 - 0x8335bb39 -SWIDTH2 0x8335bc30 - 0x8335bc39 -SWIDTH2 0x8335bd30 - 0x8335bd39 -SWIDTH2 0x8335be30 - 0x8335be39 -SWIDTH2 0x8335bf30 - 0x8335bf39 -SWIDTH2 0x8335c030 - 0x8335c039 -SWIDTH2 0x8335c130 - 0x8335c139 -SWIDTH2 0x8335c230 - 0x8335c239 -SWIDTH2 0x8335c330 - 0x8335c339 -SWIDTH2 0x8335c430 - 0x8335c439 -SWIDTH2 0x8335c530 - 0x8335c539 -SWIDTH2 0x8335c630 - 0x8335c639 -SWIDTH2 0x8335c730 - 0x8335c739 -SWIDTH2 0x8335c830 - 0x8335c839 -SWIDTH2 0x8335c930 - 0x8335c939 -SWIDTH2 0x8335ca30 - 0x8335ca39 -SWIDTH2 0x8335cb30 - 0x8335cb39 -SWIDTH2 0x8335cc30 - 0x8335cc39 -SWIDTH2 0x8335cd30 - 0x8335cd39 -SWIDTH2 0x8335ce30 - 0x8335ce39 -SWIDTH2 0x8335cf30 - 0x8335cf39 -SWIDTH2 0x8335d030 - 0x8335d039 -SWIDTH2 0x8335d130 - 0x8335d139 -SWIDTH2 0x8335d230 - 0x8335d239 -SWIDTH2 0x8335d330 - 0x8335d339 -SWIDTH2 0x8335d430 - 0x8335d439 -SWIDTH2 0x8335d530 - 0x8335d539 -SWIDTH2 0x8335d630 - 0x8335d639 -SWIDTH2 0x8335d730 - 0x8335d739 -SWIDTH2 0x8335d830 - 0x8335d839 -SWIDTH2 0x8335d930 - 0x8335d939 -SWIDTH2 0x8335da30 - 0x8335da39 -SWIDTH2 0x8335db30 - 0x8335db39 -SWIDTH2 0x8335dc30 - 0x8335dc39 -SWIDTH2 0x8335dd30 - 0x8335dd39 -SWIDTH2 0x8335de30 - 0x8335de39 -SWIDTH2 0x8335df30 - 0x8335df39 -SWIDTH2 0x8335e030 - 0x8335e039 -SWIDTH2 0x8335e130 - 0x8335e139 -SWIDTH2 0x8335e230 - 0x8335e239 -SWIDTH2 0x8335e330 - 0x8335e339 -SWIDTH2 0x8335e430 - 0x8335e439 -SWIDTH2 0x8335e530 - 0x8335e539 -SWIDTH2 0x8335e630 - 0x8335e639 -SWIDTH2 0x8335e730 - 0x8335e739 -SWIDTH2 0x8335e830 - 0x8335e839 -SWIDTH2 0x8335e930 - 0x8335e939 -SWIDTH2 0x8335ea30 - 0x8335ea39 -SWIDTH2 0x8335eb30 - 0x8335eb39 -SWIDTH2 0x8335ec30 - 0x8335ec39 -SWIDTH2 0x8335ed30 - 0x8335ed39 -SWIDTH2 0x8335ee30 - 0x8335ee39 -SWIDTH2 0x8335ef30 - 0x8335ef39 -SWIDTH2 0x8335f030 - 0x8335f039 -SWIDTH2 0x8335f130 - 0x8335f139 -SWIDTH2 0x8335f230 - 0x8335f239 -SWIDTH2 0x8335f330 - 0x8335f339 -SWIDTH2 0x8335f430 - 0x8335f439 -SWIDTH2 0x8335f530 - 0x8335f539 -SWIDTH2 0x8335f630 - 0x8335f639 -SWIDTH2 0x8335f730 - 0x8335f739 -SWIDTH2 0x8335f830 - 0x8335f839 -SWIDTH2 0x8335f930 - 0x8335f939 -SWIDTH2 0x8335fa30 - 0x8335fa39 -SWIDTH2 0x8335fb30 - 0x8335fb39 -SWIDTH2 0x8335fc30 - 0x8335fc39 -SWIDTH2 0x8335fd30 - 0x8335fd39 -SWIDTH2 0x8335fe30 - 0x8335fe39 -SWIDTH2 0x83368130 - 0x83368139 -SWIDTH2 0x83368230 - 0x83368239 -SWIDTH2 0x83368330 - 0x83368339 -SWIDTH2 0x83368430 - 0x83368439 -SWIDTH2 0x83368530 - 0x83368539 -SWIDTH2 0x83368630 - 0x83368639 -SWIDTH2 0x83368730 - 0x83368739 -SWIDTH2 0x83368830 - 0x83368839 -SWIDTH2 0x83368930 - 0x83368939 -SWIDTH2 0x83368a30 - 0x83368a39 -SWIDTH2 0x83368b30 - 0x83368b39 -SWIDTH2 0x83368c30 - 0x83368c39 -SWIDTH2 0x83368d30 - 0x83368d39 -SWIDTH2 0x83368e30 - 0x83368e39 -SWIDTH2 0x83368f30 - 0x83368f39 -SWIDTH2 0x83369030 - 0x83369039 -SWIDTH2 0x83369130 - 0x83369139 -SWIDTH2 0x83369230 - 0x83369239 -SWIDTH2 0x83369330 - 0x83369339 -SWIDTH2 0x83369430 - 0x83369439 -SWIDTH2 0x83369530 - 0x83369539 -SWIDTH2 0x83369630 - 0x83369639 -SWIDTH2 0x83369730 - 0x83369739 -SWIDTH2 0x83369830 - 0x83369839 -SWIDTH2 0x83369930 - 0x83369939 -SWIDTH2 0x83369a30 - 0x83369a39 -SWIDTH2 0x83369b30 - 0x83369b39 -SWIDTH2 0x83369c30 - 0x83369c39 -SWIDTH2 0x83369d30 - 0x83369d39 -SWIDTH2 0x83369e30 - 0x83369e39 -SWIDTH2 0x83369f30 - 0x83369f39 -SWIDTH2 0x8336a030 - 0x8336a039 -SWIDTH2 0x8336a130 - 0x8336a139 -SWIDTH2 0x8336a230 - 0x8336a239 -SWIDTH2 0x8336a330 - 0x8336a339 -SWIDTH2 0x8336a430 - 0x8336a439 -SWIDTH2 0x8336a530 - 0x8336a539 -SWIDTH2 0x8336a630 - 0x8336a639 -SWIDTH2 0x8336a730 - 0x8336a739 -SWIDTH2 0x8336a830 - 0x8336a839 -SWIDTH2 0x8336a930 - 0x8336a939 -SWIDTH2 0x8336aa30 - 0x8336aa39 -SWIDTH2 0x8336ab30 - 0x8336ab39 -SWIDTH2 0x8336ac30 - 0x8336ac39 -SWIDTH2 0x8336ad30 - 0x8336ad39 -SWIDTH2 0x8336ae30 - 0x8336ae39 -SWIDTH2 0x8336af30 - 0x8336af39 -SWIDTH2 0x8336b030 - 0x8336b039 -SWIDTH2 0x8336b130 - 0x8336b139 -SWIDTH2 0x8336b230 - 0x8336b239 -SWIDTH2 0x8336b330 - 0x8336b339 -SWIDTH2 0x8336b430 - 0x8336b439 -SWIDTH2 0x8336b530 - 0x8336b539 -SWIDTH2 0x8336b630 - 0x8336b639 -SWIDTH2 0x8336b730 - 0x8336b739 -SWIDTH2 0x8336b830 - 0x8336b839 -SWIDTH2 0x8336b930 - 0x8336b939 -SWIDTH2 0x8336ba30 - 0x8336ba39 -SWIDTH2 0x8336bb30 - 0x8336bb39 -SWIDTH2 0x8336bc30 - 0x8336bc39 -SWIDTH2 0x8336bd30 - 0x8336bd39 -SWIDTH2 0x8336be30 - 0x8336be36 -SWIDTH2 0x84308131 - 0x84308139 -SWIDTH2 0x84308230 - 0x84308239 -SWIDTH2 0x84308330 - 0x84308339 -SWIDTH2 0x84308430 - 0x84308439 -SWIDTH2 0x84308530 - 0x84308539 -SWIDTH2 0x84308630 - 0x84308639 -SWIDTH2 0x84308730 - 0x84308739 -SWIDTH2 0x84308830 - 0x84308839 -SWIDTH2 0x84308930 - 0x84308939 -SWIDTH2 0x84308a30 - 0x84308a39 -SWIDTH2 0x84308b30 - 0x84308b39 -SWIDTH2 0x84308c30 - 0x84308c39 -SWIDTH2 0x84308d30 - 0x84308d39 -SWIDTH2 0x84308e30 - 0x84308e39 -SWIDTH2 0x84308f30 - 0x84308f39 -SWIDTH2 0x84309030 - 0x84309039 -SWIDTH2 0x84309130 - 0x84309139 -SWIDTH2 0x84309230 - 0x84309239 -SWIDTH2 0x84309330 - 0x84309339 -SWIDTH2 0x84309430 - 0x84309439 -SWIDTH2 0x84309530 - 0x84309539 -SWIDTH2 0x84309630 - 0x84309639 -SWIDTH2 0x84309730 - 0x84309739 -SWIDTH2 0x84309830 - 0x84309839 -SWIDTH2 0x84309930 - 0x84309939 -SWIDTH2 0x84309a30 - 0x84309a39 -SWIDTH2 0x84309b30 - 0x84309b39 -SWIDTH2 0x84309c30 - 0x84309c39 -SWIDTH2 0x84309d30 0x84309d31 0x84309d34 - 0x84309d39 -SWIDTH2 0x84309e30 - 0x84309e39 -SWIDTH2 0x84309f30 - 0x84309f39 -SWIDTH2 0x8430a030 - 0x8430a039 -SWIDTH2 0x8430a130 - 0x8430a139 -SWIDTH2 0x8430a230 - 0x8430a239 -SWIDTH2 0x8430a330 - 0x8430a332 -SWIDTH2 0x84318538 0x84318539 -SWIDTH2 0x84318630 0x84318634 -SWIDTH2 0x84319535 0x84319536 -SWIDTH2 0x8431a234 -TODIGIT < 0x81308535 - 0x81308536 : 0x0002 > -TODIGIT < 0x81308631 0x0001 > -TODIGIT < 0x81318936 - 0x81318939 : 0x0000 > -TODIGIT < 0x81318a30 - 0x81318a35 : 0x0000 > -TODIGIT < 0x81319830 - 0x81319839 : 0x0000 > -TODIGIT < 0x8131d730 - 0x8131d739 : 0x0000 > -TODIGIT < 0x8131e338 - 0x8131e339 : 0x0000 > -TODIGIT < 0x8131e430 - 0x8131e437 : 0x0000 > -TODIGIT < 0x8131f036 - 0x8131f039 : 0x0000 > -TODIGIT < 0x8131f130 - 0x8131f135 : 0x0000 > -TODIGIT < 0x8131fd34 - 0x8131fd39 : 0x0000 > -TODIGIT < 0x8131fe30 - 0x8131fe33 : 0x0000 > -TODIGIT < 0x81328c32 - 0x81328c39 : 0x0000 > -TODIGIT < 0x81328d30 - 0x81328d31 : 0x0000 > -TODIGIT < 0x81329931 - 0x81329939 : 0x0001 > -TODIGIT < 0x8132a538 - 0x8132a539 : 0x0000 > -TODIGIT < 0x8132a630 - 0x8132a637 : 0x0000 > -TODIGIT < 0x8132b236 - 0x8132b239 : 0x0000 > -TODIGIT < 0x8132b330 - 0x8132b335 : 0x0000 > -TODIGIT < 0x8132bf34 - 0x8132bf39 : 0x0000 > -TODIGIT < 0x8132c030 - 0x8132c033 : 0x0000 > -TODIGIT < 0x8132d638 - 0x8132d639 : 0x0000 > -TODIGIT < 0x8132d730 - 0x8132d737 : 0x0000 > -TODIGIT < 0x8132e336 - 0x8132e339 : 0x0000 > -TODIGIT < 0x8132e430 - 0x8132e435 : 0x0000 > -TODIGIT < 0x8132eb36 - 0x8132eb39 : 0x0000 > -TODIGIT < 0x8132ec30 - 0x8132ec35 : 0x0000 > -TODIGIT < 0x81338a34 - 0x81338a39 : 0x0000 > -TODIGIT < 0x81338b30 - 0x81338b33 : 0x0000 > -TODIGIT < 0x8133db33 - 0x8133db39 : 0x0001 > -TODIGIT < 0x8133dc30 - 0x8133dc31 : 0x0001 > -TODIGIT < 0x8134cf36 - 0x8134cf39 : 0x0000 > -TODIGIT < 0x8134d030 - 0x8134d035 : 0x0000 > -TODIGIT < 0x8134d434 - 0x8134d439 : 0x0000 > -TODIGIT < 0x8134d530 - 0x8134d533 : 0x0000 > -TODIGIT < 0x8136ad32 0x0000 > -TODIGIT < 0x8136ad36 - 0x8136ad39 : 0x0004 > -TODIGIT < 0x8136ae30 - 0x8136ae31 : 0x0004 > -TODIGIT < 0x8136ae38 - 0x8136ae39 : 0x0000 > -TODIGIT < 0x8136af30 - 0x8136af37 : 0x0000 > -UPPER 0x81308638 0x81308639 -UPPER 0x81308730 - 0x81308739 -UPPER 0x81308830 - 0x81308839 -UPPER 0x81308930 - 0x81308937 -UPPER 0x81308b38 0x81308b39 -UPPER 0x81308c31 0x81308c33 0x81308c35 0x81308c37 0x81308c39 -UPPER 0x81308d31 0x81308d33 0x81308d35 0x81308d36 0x81308d38 -UPPER 0x81308e30 0x81308e32 0x81308e33 0x81308e35 0x81308e37 0x81308e39 -UPPER 0x81308f31 0x81308f33 0x81308f35 0x81308f37 0x81308f38 -UPPER 0x81309030 0x81309032 0x81309034 0x81309036 0x81309038 -UPPER 0x81309131 0x81309133 0x81309135 0x81309137 0x81309139 -UPPER 0x81309231 0x81309232 0x81309234 0x81309236 0x81309238 0x81309239 -UPPER 0x81309331 0x81309333 0x81309335 0x81309337 0x81309339 -UPPER 0x81309431 0x81309433 0x81309435 0x81309437 0x81309439 -UPPER 0x81309531 0x81309533 0x81309535 0x81309537 0x81309538 -UPPER 0x81309630 0x81309632 0x81309634 0x81309636 0x81309638 -UPPER 0x81309730 0x81309731 0x81309733 0x81309735 0x81309739 -UPPER 0x81309830 0x81309832 0x81309834 0x81309835 0x81309837 - 0x81309839 -UPPER 0x81309932 - 0x81309935 0x81309937 0x81309938 -UPPER 0x81309a30 - 0x81309a32 0x81309a36 0x81309a37 0x81309a39 -UPPER 0x81309b30 0x81309b32 0x81309b34 0x81309b36 0x81309b37 0x81309b39 -UPPER 0x81309c32 0x81309c34 0x81309c35 0x81309c37 - 0x81309c39 -UPPER 0x81309d31 0x81309d33 0x81309d34 0x81309d38 -UPPER 0x81309e36 0x81309e39 -UPPER 0x81309f32 0x81309f35 - 0x81309f39 -UPPER 0x8130a030 - 0x8130a032 0x8130a034 0x8130a036 0x8130a038 -UPPER 0x8130a130 0x8130a132 0x8130a134 0x8130a136 0x8130a138 -UPPER 0x8130a230 0x8130a233 0x8130a236 0x8130a238 0x8130a239 -UPPER 0x8130a330 0x8130a331 0x8130a333 0x8130a335 0x8130a337 0x8130a339 -UPPER 0x8130a431 0x8130a433 0x8130a435 0x8130a437 0x8130a439 -UPPER 0x8130a531 0x8130a533 0x8130a535 0x8130a537 0x8130a539 -UPPER 0x8130a631 0x8130a633 0x8130a635 0x8130a637 0x8130a639 -UPPER 0x8130a731 0x8130a733 0x8130a735 0x8130a737 0x8130a739 -UPPER 0x8130a831 0x8130a833 0x8130a835 0x8130a837 -UPPER 0x8130ca30 0x8130ca32 - 0x8130ca34 0x8130ca36 0x8130ca38 0x8130ca39 -UPPER 0x8130cb32 0x8130cb33 -UPPER 0x8130cc38 0x8130cc39 -UPPER 0x8130cd30 0x8130cd34 0x8130cd36 0x8130cd38 -UPPER 0x8130ce30 0x8130ce32 0x8130ce34 0x8130ce36 0x8130ce38 -UPPER 0x8130cf30 0x8130cf32 0x8130cf34 0x8130cf36 -UPPER 0x8130d032 -UPPER 0x8130d134 - 0x8130d139 -UPPER 0x8130d230 - 0x8130d238 -UPPER 0x8130d434 0x8130d436 0x8130d438 -UPPER 0x8130d530 0x8130d532 0x8130d534 0x8130d536 0x8130d538 -UPPER 0x8130d630 0x8130d632 0x8130d634 0x8130d636 0x8130d638 -UPPER 0x8130d730 0x8130d732 0x8130d734 0x8130d736 -UPPER 0x8130d836 0x8130d838 -UPPER 0x8130d930 0x8130d932 0x8130d934 0x8130d936 0x8130d938 -UPPER 0x8130da30 0x8130da32 0x8130da34 0x8130da36 0x8130da38 -UPPER 0x8130db30 0x8130db32 0x8130db34 0x8130db36 0x8130db38 -UPPER 0x8130dc30 0x8130dc32 0x8130dc34 0x8130dc36 0x8130dc38 -UPPER 0x8130dd30 0x8130dd32 0x8130dd34 0x8130dd36 0x8130dd38 -UPPER 0x8130de30 0x8130de31 0x8130de33 0x8130de35 0x8130de37 0x8130de39 -UPPER 0x8130df31 0x8130df33 0x8130df36 0x8130df38 -UPPER 0x8130e030 0x8130e032 0x8130e034 0x8130e036 0x8130e038 -UPPER 0x8130e130 0x8130e132 0x8130e134 0x8130e136 0x8130e138 -UPPER 0x8130e230 0x8130e232 0x8130e234 0x8130e236 0x8130e238 -UPPER 0x8130e330 0x8130e332 0x8130e336 -UPPER 0x8130e434 0x8130e436 0x8130e438 -UPPER 0x8130e530 0x8130e532 0x8130e534 0x8130e536 0x8130e538 -UPPER 0x8130e933 - 0x8130e939 -UPPER 0x8130ea30 - 0x8130ea39 -UPPER 0x8130eb30 - 0x8130eb39 -UPPER 0x8130ec30 - 0x8130ec39 -UPPER 0x8130ed30 -UPPER 0x81339430 - 0x81339439 -UPPER 0x81339530 - 0x81339539 -UPPER 0x81339630 - 0x81339639 -UPPER 0x81339730 - 0x81339737 -UPPER 0x8135ee34 0x8135ee36 0x8135ee38 -UPPER 0x8135ef30 0x8135ef32 0x8135ef34 0x8135ef36 0x8135ef38 -UPPER 0x8135f030 0x8135f032 0x8135f034 0x8135f036 0x8135f038 -UPPER 0x8135f130 0x8135f132 0x8135f134 0x8135f136 0x8135f138 -UPPER 0x8135f230 0x8135f232 0x8135f234 0x8135f236 0x8135f238 -UPPER 0x8135f330 0x8135f332 0x8135f334 0x8135f336 0x8135f338 -UPPER 0x8135f430 0x8135f432 0x8135f434 0x8135f436 0x8135f438 -UPPER 0x8135f530 0x8135f532 0x8135f534 0x8135f536 0x8135f538 -UPPER 0x8135f630 0x8135f632 0x8135f634 0x8135f636 0x8135f638 -UPPER 0x8135f730 0x8135f732 0x8135f734 0x8135f736 0x8135f738 -UPPER 0x8135f830 0x8135f832 0x8135f834 0x8135f836 0x8135f838 -UPPER 0x8135f930 0x8135f932 0x8135f934 0x8135f936 0x8135f938 -UPPER 0x8135fa30 0x8135fa32 0x8135fa34 0x8135fa36 0x8135fa38 -UPPER 0x8135fb30 0x8135fb32 0x8135fb34 0x8135fb36 0x8135fb38 -UPPER 0x8135fc30 0x8135fc32 0x8135fc34 0x8135fc36 0x8135fc38 -UPPER 0x8135fd30 0x8135fd32 -UPPER 0x8135fe34 0x8135fe36 0x8135fe38 -UPPER 0x81368130 0x81368132 0x81368134 0x81368136 0x81368138 -UPPER 0x81368230 0x81368232 0x81368234 0x81368236 0x81368238 -UPPER 0x81368330 0x81368332 0x81368334 0x81368336 0x81368338 -UPPER 0x81368430 0x81368432 0x81368434 0x81368436 0x81368438 -UPPER 0x81368530 0x81368532 0x81368534 0x81368536 0x81368538 -UPPER 0x81368630 0x81368632 0x81368634 0x81368636 0x81368638 -UPPER 0x81368730 0x81368732 0x81368734 0x81368736 0x81368738 -UPPER 0x81368830 0x81368832 0x81368834 0x81368836 0x81368838 -UPPER 0x81368930 0x81368932 -UPPER 0x81368a38 0x81368a39 -UPPER 0x81368b30 - 0x81368b35 -UPPER 0x81368c34 - 0x81368c39 -UPPER 0x81368e30 - 0x81368e37 -UPPER 0x81368f36 - 0x81368f39 -UPPER 0x81369030 - 0x81369033 -UPPER 0x81369132 - 0x81369137 -UPPER 0x81369239 -UPPER 0x81369331 0x81369333 0x81369335 -UPPER 0x81369434 - 0x81369439 -UPPER 0x81369530 0x81369531 -UPPER 0x81369c34 - 0x81369c37 -UPPER 0x81369e30 - 0x81369e33 -UPPER 0x81369f36 - 0x81369f39 -UPPER 0x8136a132 - 0x8136a136 -UPPER 0x8136a238 0x8136a239 -UPPER 0x8136a330 0x8136a331 -UPPER 0x8136bb37 -UPPER 0x8136bc30 0x8136bc33 - 0x8136bc35 0x8136bc38 0x8136bc39 -UPPER 0x8136bd30 0x8136bd33 0x8136bd36 - 0x8136bd39 -UPPER 0x8136be30 0x8136be36 0x8136be38 -UPPER 0x8136bf30 0x8136bf32 - 0x8136bf35 0x8136bf38 0x8136bf39 -UPPER 0x8136c031 -UPPER 0x8136c132 0x8136c133 0x8136c139 diff --git a/share/locale/ctype/zh_TW.eucTW.src b/share/locale/ctype/zh_TW.eucTW.src deleted file mode 100644 index cf79ccb9c9..0000000000 --- a/share/locale/ctype/zh_TW.eucTW.src +++ /dev/null @@ -1,659 +0,0 @@ -/* $NetBSD: zh_TW.eucTW.src,v 1.6 2006/07/16 10:42:26 tnozaki Exp $ */ -/* @(#)Japanese 8.1 (Berkeley) 6/6/93 */ - -/* - * LOCALE_CTYPE definitions using euc-tw - */ - -ENCODING "EUCTW" -VARIABLE CODESET=eucTW - -/* - * Code Set 1 - */ -ALPHA 'A' - 'Z' 'a' - 'z' -CONTROL 0x00 - 0x1f 0x7f -DIGIT '0' - '9' -GRAPH 0x21 - 0x7e -LOWER 'a' - 'z' -PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d ' ' -UPPER 'A' - 'Z' -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' -BLANK ' ' '\t' -PRINT 0x20 - 0x7e -SWIDTH1 0x20 - 0x7e - -MAPLOWER <'A' - 'Z' : 'a'> -MAPLOWER <'a' - 'z' : 'a'> -MAPUPPER <'A' - 'Z' : 'A'> -MAPUPPER <'a' - 'z' : 'A'> -TODIGIT <'0' - '9' : 0> -TODIGIT <'A' - 'F' : 10> -TODIGIT <'a' - 'f' : 10> - -/* - * CNS11643-1 - */ -CHARSET 0x47008080 0xFFFF - -ALPHA 0x2441 - 0x247E 0x2521 - 0x2546 - -BLANK 0x2121 - -DIGIT 0x2421 - 0x242A - -GRAPH 0x2547 - 0x256B - -IDEOGRAM 0x2279 - 0x227E 0x2321 - 0x2323 -IDEOGRAM 0x243F -IDEOGRAM 0x4421 - 0x447E 0x4521 - 0x457E -IDEOGRAM 0x4621 - 0x467E 0x4721 - 0x477E -IDEOGRAM 0x4821 - 0x487E 0x4921 - 0x497E -IDEOGRAM 0x4A21 - 0x4A7E 0x4B21 - 0x4B7E -IDEOGRAM 0x4C21 - 0x4C7E 0x4D21 - 0x4D7E -IDEOGRAM 0x4E21 - 0x4E7E 0x4F21 - 0x4F7E -IDEOGRAM 0x5021 - 0x507E 0x5121 - 0x517E -IDEOGRAM 0x5221 - 0x527E 0x5321 - 0x537E -IDEOGRAM 0x5421 - 0x547E 0x5521 - 0x557E -IDEOGRAM 0x5621 - 0x567E 0x5721 - 0x577E -IDEOGRAM 0x5821 - 0x587E 0x5921 - 0x597E -IDEOGRAM 0x5A21 - 0x5A7E 0x5B21 - 0x5B7E -IDEOGRAM 0x5C21 - 0x5C7E 0x5D21 - 0x5D7E -IDEOGRAM 0x5E21 - 0x5E7E 0x5F21 - 0x5F7E -IDEOGRAM 0x6021 - 0x607E 0x6121 - 0x617E -IDEOGRAM 0x6221 - 0x627E 0x6321 - 0x637E -IDEOGRAM 0x6421 - 0x647E 0x6521 - 0x657E -IDEOGRAM 0x6621 - 0x667E 0x6721 - 0x677E -IDEOGRAM 0x6821 - 0x687E 0x6921 - 0x697E -IDEOGRAM 0x6A21 - 0x6A7E 0x6B21 - 0x6B7E -IDEOGRAM 0x6C21 - 0x6C7E 0x6D21 - 0x6D7E -IDEOGRAM 0x6E21 - 0x6E7E 0x6F21 - 0x6F7E -IDEOGRAM 0x7021 - 0x707E 0x7121 - 0x717E -IDEOGRAM 0x7221 - 0x727E 0x7321 - 0x737E -IDEOGRAM 0x7421 - 0x747E 0x7521 - 0x757E -IDEOGRAM 0x7621 - 0x767E 0x7721 - 0x777E -IDEOGRAM 0x7821 - 0x787E 0x7921 - 0x797E -IDEOGRAM 0x7A21 - 0x7A7E 0x7B21 - 0x7B7E -IDEOGRAM 0x7C21 - 0x7C7E 0x7D21 - 0x7D4B - -LOWER 0x245B - 0x2474 0x252F - 0x2546 - -PRINT 0x2121 - -PUNCT 0x2122 - 0x2139 0x213E - 0x217E -PUNCT 0x2221 - 0x2223 0x2225 0x2227 - 0x2278 -PUNCT 0x2324 - 0x234E 0x256C - 0x2570 -PUNCT 0x4221 - 0x4242 - -SPACE 0x2121 - -SPECIAL 0x242B - 0x243D 0x2621 - 0x263E -SPECIAL 0x4243 - -SWIDTH1 0x212C 0x212D -SWIDTH1 0x2131 0x2137 0x2139 -SWIDTH1 0x2164 - 0x2167 0x216A 0x216B 0x216F -SWIDTH1 0x2170 0x2172 - 0x217E -SWIDTH1 0x2222 0x2223 -SWIDTH1 0x2232 - 0x2235 0x2239 - 0x223E -SWIDTH1 0x2244 - 0x224A 0x224D - 0x225D -SWIDTH1 0x2261 0x226A 0x226B -SWIDTH1 0x2278 -SWIDTH1 0x2324 - 0x234E -SWIDTH1 0x242B - 0x2434 0x2475 - 0x247E -SWIDTH1 0x2521 - 0x2546 0x256C - 0x2570 -SWIDTH1 0x2621 - 0x263E -SWIDTH1 0x4221 - 0x4242 - -SWIDTH2 0x2121 - 0x212B 0x212E - 0x2130 -SWIDTH2 0x2132 - 0x2136 0x2138 0x213E - 0x2163 -SWIDTH2 0x2168 0x2169 0x216C - 0x216E -SWIDTH2 0x2171 -SWIDTH2 0x2221 0x2225 0x2227 - 0x2231 -SWIDTH2 0x2236 - 0x2238 0x223F - 0x2243 -SWIDTH2 0x224B 0x224C -SWIDTH2 0x225E - 0x2260 -SWIDTH2 0x2262 - 0x2269 0x226C - 0x2277 -SWIDTH2 0x2279 - 0x227E -SWIDTH2 0x2321 - 0x2323 -SWIDTH2 0x2421 - 0x242A -SWIDTH2 0x2435 - 0x243D 0x243F -SWIDTH2 0x2441 - 0x2474 -SWIDTH2 0x2547 - 0x256B -SWIDTH2 0x4421 - 0x447E 0x4521 - 0x457E -SWIDTH2 0x4621 - 0x467E 0x4721 - 0x477E -SWIDTH2 0x4821 - 0x487E 0x4921 - 0x497E -SWIDTH2 0x4A21 - 0x4A7E 0x4B21 - 0x4B7E -SWIDTH2 0x4C21 - 0x4C7E 0x4D21 - 0x4D7E -SWIDTH2 0x4E21 - 0x4E7E 0x4F21 - 0x4F7E -SWIDTH2 0x5021 - 0x507E 0x5121 - 0x517E -SWIDTH2 0x5221 - 0x527E 0x5321 - 0x537E -SWIDTH2 0x5421 - 0x547E 0x5521 - 0x557E -SWIDTH2 0x5621 - 0x567E 0x5721 - 0x577E -SWIDTH2 0x5821 - 0x587E 0x5921 - 0x597E -SWIDTH2 0x5A21 - 0x5A7E 0x5B21 - 0x5B7E -SWIDTH2 0x5C21 - 0x5C7E 0x5D21 - 0x5D7E -SWIDTH2 0x5E21 - 0x5E7E 0x5F21 - 0x5F7E -SWIDTH2 0x6021 - 0x607E 0x6121 - 0x617E -SWIDTH2 0x6221 - 0x627E 0x6321 - 0x637E -SWIDTH2 0x6421 - 0x647E 0x6521 - 0x657E -SWIDTH2 0x6621 - 0x667E 0x6721 - 0x677E -SWIDTH2 0x6821 - 0x687E 0x6921 - 0x697E -SWIDTH2 0x6A21 - 0x6A7E 0x6B21 - 0x6B7E -SWIDTH2 0x6C21 - 0x6C7E 0x6D21 - 0x6D7E -SWIDTH2 0x6E21 - 0x6E7E 0x6F21 - 0x6F7E -SWIDTH2 0x7021 - 0x707E 0x7121 - 0x717E -SWIDTH2 0x7221 - 0x727E 0x7321 - 0x737E -SWIDTH2 0x7421 - 0x747E 0x7521 - 0x757E -SWIDTH2 0x7621 - 0x767E 0x7721 - 0x777E -SWIDTH2 0x7821 - 0x787E 0x7921 - 0x797E -SWIDTH2 0x7A21 - 0x7A7E 0x7B21 - 0x7B7E -SWIDTH2 0x7C21 - 0x7C7E 0x7D21 - 0x7D4B - -UPPER 0x2441 - 0x245A 0x2475 - 0x247E -UPPER 0x2521 - 0x252E - -MAPLOWER < 0x2475 - 0x247E : 0x252F > -MAPLOWER < 0x2521 - 0x245A : 0x2539 > -MAPUPPER < 0x252F - 0x2546 : 0x2475 > -MAPUPPER < 0x245B - 0x2474 : 0x2441 > -TODIGIT < 0x2421 - 0x242A : 0 > - -/* - * CNS11643-2 - */ -CHARSET 0x48008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x627E -IDEOGRAM 0x6321 - 0x637E 0x6421 - 0x647E -IDEOGRAM 0x6521 - 0x657E 0x6621 - 0x667E -IDEOGRAM 0x6721 - 0x677E 0x6821 - 0x687E -IDEOGRAM 0x6921 - 0x697E 0x6A21 - 0x6A7E -IDEOGRAM 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -IDEOGRAM 0x6D21 - 0x6D7E 0x6E21 - 0x6E7E -IDEOGRAM 0x6F21 - 0x6F7E 0x7021 - 0x707E -IDEOGRAM 0x7121 - 0x717E 0x7221 - 0x7244 - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x627E -SWIDTH2 0x6321 - 0x637E 0x6421 - 0x647E -SWIDTH2 0x6521 - 0x657E 0x6621 - 0x667E -SWIDTH2 0x6721 - 0x677E 0x6821 - 0x687E -SWIDTH2 0x6921 - 0x697E 0x6A21 - 0x6A7E -SWIDTH2 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -SWIDTH2 0x6D21 - 0x6D7E 0x6E21 - 0x6E7E -SWIDTH2 0x6F21 - 0x6F7E 0x7021 - 0x707E -SWIDTH2 0x7121 - 0x717E 0x7221 - 0x7244 - -/* - * CNS11643-3 - */ -CHARSET 0x49008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x6246 - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x6246 - -/* - * CNS11643-4 - */ -CHARSET 0x4A008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x627E -IDEOGRAM 0x6321 - 0x637E 0x6421 - 0x647E -IDEOGRAM 0x6521 - 0x657E 0x6621 - 0x667E -IDEOGRAM 0x6721 - 0x677E 0x6821 - 0x687E -IDEOGRAM 0x6921 - 0x697E 0x6A21 - 0x6A7E -IDEOGRAM 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -IDEOGRAM 0x6D21 - 0x6D7E 0x6E21 - 0x6E5C - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x627E -SWIDTH2 0x6321 - 0x637E 0x6421 - 0x647E -SWIDTH2 0x6521 - 0x657E 0x6621 - 0x667E -SWIDTH2 0x6721 - 0x677E 0x6821 - 0x687E -SWIDTH2 0x6921 - 0x697E 0x6A21 - 0x6A7E -SWIDTH2 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -SWIDTH2 0x6D21 - 0x6D7E 0x6E21 - 0x6E5C - -/* - * CNS11643-5 - */ -CHARSET 0x4B008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x627E -IDEOGRAM 0x6321 - 0x637E 0x6421 - 0x647E -IDEOGRAM 0x6521 - 0x657E 0x6621 - 0x667E -IDEOGRAM 0x6721 - 0x677E 0x6821 - 0x687E -IDEOGRAM 0x6921 - 0x697E 0x6A21 - 0x6A7E -IDEOGRAM 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -IDEOGRAM 0x6D21 - 0x6D7E 0x6E21 - 0x6E7E -IDEOGRAM 0x6F21 - 0x6F7E 0x7021 - 0x707E -IDEOGRAM 0x7121 - 0x717E 0x7221 - 0x727E -IDEOGRAM 0x7321 - 0x737E 0x7421 - 0x747E -IDEOGRAM 0x7521 - 0x757E 0x7621 - 0x767E -IDEOGRAM 0x7721 - 0x777E 0x7821 - 0x787E -IDEOGRAM 0x7921 - 0x797E 0x7A21 - 0x7A7E -IDEOGRAM 0x7B21 - 0x7B7E 0x7C21 - 0x7C51 - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x627E -SWIDTH2 0x6321 - 0x637E 0x6421 - 0x647E -SWIDTH2 0x6521 - 0x657E 0x6621 - 0x667E -SWIDTH2 0x6721 - 0x677E 0x6821 - 0x687E -SWIDTH2 0x6921 - 0x697E 0x6A21 - 0x6A7E -SWIDTH2 0x6B21 - 0x6B7E 0x6C21 - 0x6C7E -SWIDTH2 0x6D21 - 0x6D7E 0x6E21 - 0x6E7E -SWIDTH2 0x6F21 - 0x6F7E 0x7021 - 0x707E -SWIDTH2 0x7121 - 0x717E 0x7221 - 0x727E -SWIDTH2 0x7321 - 0x737E 0x7421 - 0x747E -SWIDTH2 0x7521 - 0x757E 0x7621 - 0x767E -SWIDTH2 0x7721 - 0x777E 0x7821 - 0x787E -SWIDTH2 0x7921 - 0x797E 0x7A21 - 0x7A7E -SWIDTH2 0x7B21 - 0x7B7E 0x7C21 - 0x7C51 - -/* - * CNS11643-6 - */ -CHARSET 0x4C008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x627E -IDEOGRAM 0x6321 - 0x637E 0x6421 - 0x647A - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x627E -SWIDTH2 0x6321 - 0x637E 0x6421 - 0x647A - -/* - * CNS11643-7 - */ -CHARSET 0x4D008080 0xFFFF - -IDEOGRAM 0x2121 - 0x217E 0x2221 - 0x227E -IDEOGRAM 0x2321 - 0x237E 0x2421 - 0x247E -IDEOGRAM 0x2521 - 0x257E 0x2621 - 0x267E -IDEOGRAM 0x2721 - 0x277E 0x2821 - 0x287E -IDEOGRAM 0x2921 - 0x297E 0x2A21 - 0x2A7E -IDEOGRAM 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -IDEOGRAM 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -IDEOGRAM 0x2F21 - 0x2F7E 0x3021 - 0x307E -IDEOGRAM 0x3121 - 0x317E 0x3221 - 0x327E -IDEOGRAM 0x3321 - 0x337E 0x3421 - 0x347E -IDEOGRAM 0x3521 - 0x357E 0x3621 - 0x367E -IDEOGRAM 0x3721 - 0x377E 0x3821 - 0x387E -IDEOGRAM 0x3921 - 0x397E 0x3A21 - 0x3A7E -IDEOGRAM 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -IDEOGRAM 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -IDEOGRAM 0x3F21 - 0x3F7E 0x4021 - 0x407E -IDEOGRAM 0x4121 - 0x417E 0x4221 - 0x427E -IDEOGRAM 0x4321 - 0x437E 0x4421 - 0x447E -IDEOGRAM 0x4521 - 0x457E 0x4621 - 0x467E -IDEOGRAM 0x4721 - 0x477E 0x4821 - 0x487E -IDEOGRAM 0x4921 - 0x497E 0x4A21 - 0x4A7E -IDEOGRAM 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -IDEOGRAM 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -IDEOGRAM 0x4F21 - 0x4F7E 0x5021 - 0x507E -IDEOGRAM 0x5121 - 0x517E 0x5221 - 0x527E -IDEOGRAM 0x5321 - 0x537E 0x5421 - 0x547E -IDEOGRAM 0x5521 - 0x557E 0x5621 - 0x567E -IDEOGRAM 0x5721 - 0x577E 0x5821 - 0x587E -IDEOGRAM 0x5921 - 0x597E 0x5A21 - 0x5A7E -IDEOGRAM 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -IDEOGRAM 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -IDEOGRAM 0x5F21 - 0x5F7E 0x6021 - 0x607E -IDEOGRAM 0x6121 - 0x617E 0x6221 - 0x627E -IDEOGRAM 0x6321 - 0x637E 0x6421 - 0x647E -IDEOGRAM 0x6521 - 0x657E 0x6621 - 0x6655 - -SWIDTH2 0x2121 - 0x217E 0x2221 - 0x227E -SWIDTH2 0x2321 - 0x237E 0x2421 - 0x247E -SWIDTH2 0x2521 - 0x257E 0x2621 - 0x267E -SWIDTH2 0x2721 - 0x277E 0x2821 - 0x287E -SWIDTH2 0x2921 - 0x297E 0x2A21 - 0x2A7E -SWIDTH2 0x2B21 - 0x2B7E 0x2C21 - 0x2C7E -SWIDTH2 0x2D21 - 0x2D7E 0x2E21 - 0x2E7E -SWIDTH2 0x2F21 - 0x2F7E 0x3021 - 0x307E -SWIDTH2 0x3121 - 0x317E 0x3221 - 0x327E -SWIDTH2 0x3321 - 0x337E 0x3421 - 0x347E -SWIDTH2 0x3521 - 0x357E 0x3621 - 0x367E -SWIDTH2 0x3721 - 0x377E 0x3821 - 0x387E -SWIDTH2 0x3921 - 0x397E 0x3A21 - 0x3A7E -SWIDTH2 0x3B21 - 0x3B7E 0x3C21 - 0x3C7E -SWIDTH2 0x3D21 - 0x3D7E 0x3E21 - 0x3E7E -SWIDTH2 0x3F21 - 0x3F7E 0x4021 - 0x407E -SWIDTH2 0x4121 - 0x417E 0x4221 - 0x427E -SWIDTH2 0x4321 - 0x437E 0x4421 - 0x447E -SWIDTH2 0x4521 - 0x457E 0x4621 - 0x467E -SWIDTH2 0x4721 - 0x477E 0x4821 - 0x487E -SWIDTH2 0x4921 - 0x497E 0x4A21 - 0x4A7E -SWIDTH2 0x4B21 - 0x4B7E 0x4C21 - 0x4C7E -SWIDTH2 0x4D21 - 0x4D7E 0x4E21 - 0x4E7E -SWIDTH2 0x4F21 - 0x4F7E 0x5021 - 0x507E -SWIDTH2 0x5121 - 0x517E 0x5221 - 0x527E -SWIDTH2 0x5321 - 0x537E 0x5421 - 0x547E -SWIDTH2 0x5521 - 0x557E 0x5621 - 0x567E -SWIDTH2 0x5721 - 0x577E 0x5821 - 0x587E -SWIDTH2 0x5921 - 0x597E 0x5A21 - 0x5A7E -SWIDTH2 0x5B21 - 0x5B7E 0x5C21 - 0x5C7E -SWIDTH2 0x5D21 - 0x5D7E 0x5E21 - 0x5E7E -SWIDTH2 0x5F21 - 0x5F7E 0x6021 - 0x607E -SWIDTH2 0x6121 - 0x617E 0x6221 - 0x627E -SWIDTH2 0x6321 - 0x637E 0x6421 - 0x647E -SWIDTH2 0x6521 - 0x657E 0x6621 - 0x6655 diff --git a/share/locale/locale.alias b/share/locale/locale.alias deleted file mode 100644 index 45cffa0f91..0000000000 --- a/share/locale/locale.alias +++ /dev/null @@ -1,134 +0,0 @@ -# $NetBSD: locale.alias,v 1.11 2009/01/02 00:20:21 tnozaki Exp $ - -# -# Locale aliases -# - -# UTF-8 ctypes - These are the same as en_US.UTF-8 for now. -af_ZA.UTF-8/LC_CTYPE en_US.UTF-8 -am_ET.UTF-8/LC_CTYPE en_US.UTF-8 -be_BY.UTF-8/LC_CTYPE en_US.UTF-8 -bg_BG.UTF-8/LC_CTYPE en_US.UTF-8 -ca_ES.UTF-8/LC_CTYPE en_US.UTF-8 -cs_CZ.UTF-8/LC_CTYPE en_US.UTF-8 -da_DK.UTF-8/LC_CTYPE en_US.UTF-8 -de_AT.UTF-8/LC_CTYPE en_US.UTF-8 -de_CH.UTF-8/LC_CTYPE en_US.UTF-8 -de_DE.UTF-8/LC_CTYPE en_US.UTF-8 -el_GR.UTF-8/LC_CTYPE en_US.UTF-8 -en_AU.UTF-8/LC_CTYPE en_US.UTF-8 -en_CA.UTF-8/LC_CTYPE en_US.UTF-8 -en_GB.UTF-8/LC_CTYPE en_US.UTF-8 -en_NZ.UTF-8/LC_CTYPE en_US.UTF-8 -es_ES.UTF-8/LC_CTYPE en_US.UTF-8 -et_EE.UTF-8/LC_CTYPE en_US.UTF-8 -eu_ES.UTF-8/LC_CTYPE en_US.UTF-8 -fi_FI.UTF-8/LC_CTYPE en_US.UTF-8 -fr_BE.UTF-8/LC_CTYPE en_US.UTF-8 -fr_CA.UTF-8/LC_CTYPE en_US.UTF-8 -fr_CH.UTF-8/LC_CTYPE en_US.UTF-8 -fr_FR.UTF-8/LC_CTYPE en_US.UTF-8 -he_IL.UTF-8/LC_CTYPE en_US.UTF-8 -hr_HR.UTF-8/LC_CTYPE en_US.UTF-8 -hu_HU.UTF-8/LC_CTYPE en_US.UTF-8 -hy_AM.UTF-8/LC_CTYPE en_US.UTF-8 -is_IS.UTF-8/LC_CTYPE en_US.UTF-8 -it_CH.UTF-8/LC_CTYPE en_US.UTF-8 -it_IT.UTF-8/LC_CTYPE en_US.UTF-8 -ja_JP.UTF-8/LC_CTYPE en_US.UTF-8 -kk_KZ.UTF-8/LC_CTYPE en_US.UTF-8 -ko_KR.UTF-8/LC_CTYPE en_US.UTF-8 -lt_LT.UTF-8/LC_CTYPE en_US.UTF-8 -mn_MN.UTF-8/LC_CTYPE en_US.UTF-8 -nb_NO.UTF-8/LC_CTYPE en_US.UTF-8 -nl_BE.UTF-8/LC_CTYPE en_US.UTF-8 -nl_NL.UTF-8/LC_CTYPE en_US.UTF-8 -nn_NO.UTF-8/LC_CTYPE en_US.UTF-8 -no_NO.UTF-8/LC_CTYPE en_US.UTF-8 -pl_PL.UTF-8/LC_CTYPE en_US.UTF-8 -pt_BR.UTF-8/LC_CTYPE en_US.UTF-8 -pt_PT.UTF-8/LC_CTYPE en_US.UTF-8 -ro_RO.UTF-8/LC_CTYPE en_US.UTF-8 -ru_RU.UTF-8/LC_CTYPE en_US.UTF-8 -sk_SK.UTF-8/LC_CTYPE en_US.UTF-8 -sl_SI.UTF-8/LC_CTYPE en_US.UTF-8 -sr_YU.UTF-8/LC_CTYPE en_US.UTF-8 -sv_SE.UTF-8/LC_CTYPE en_US.UTF-8 -tr_TR.UTF-8/LC_CTYPE en_US.UTF-8 -uk_UA.UTF-8/LC_CTYPE en_US.UTF-8 -zh_CN.UTF-8/LC_CTYPE en_US.UTF-8 -zh_HK.UTF-8/LC_CTYPE en_US.UTF-8 -zh_TW.UTF-8/LC_CTYPE en_US.UTF-8 - - -# LC_MESSAGES - These are conveniently enabled for NLS. -af_ZA.UTF-8/LC_MESSAGES /FORCE -be_BY.UTF-8/LC_MESSAGES /FORCE -bg_BG.UTF-8/LC_MESSAGES /FORCE -ca_ES.UTF-8/LC_MESSAGES /FORCE -cs_CZ.UTF-8/LC_MESSAGES /FORCE -da_DK.UTF-8/LC_MESSAGES /FORCE -de_AT.UTF-8/LC_MESSAGES /FORCE -de_CH.UTF-8/LC_MESSAGES /FORCE -de_DE.UTF-8/LC_MESSAGES /FORCE -el_GR.UTF-8/LC_MESSAGES /FORCE -en_AU.UTF-8/LC_MESSAGES /FORCE -en_CA.UTF-8/LC_MESSAGES /FORCE -en_GB.UTF-8/LC_MESSAGES /FORCE -en_NZ.UTF-8/LC_MESSAGES /FORCE -es_ES.UTF-8/LC_MESSAGES /FORCE -et_EE.UTF-8/LC_MESSAGES /FORCE -eu_ES.UTF-8/LC_MESSAGES /FORCE -fi_FI.UTF-8/LC_MESSAGES /FORCE -fr_BE.UTF-8/LC_MESSAGES /FORCE -fr_CA.UTF-8/LC_MESSAGES /FORCE -fr_CH.UTF-8/LC_MESSAGES /FORCE -fr_FR.UTF-8/LC_MESSAGES /FORCE -hr_HR.UTF-8/LC_MESSAGES /FORCE -hu_HU.UTF-8/LC_MESSAGES /FORCE -hy_AM.UTF-8/LC_MESSAGES /FORCE -is_IS.UTF-8/LC_MESSAGES /FORCE -it_CH.UTF-8/LC_MESSAGES /FORCE -it_IT.UTF-8/LC_MESSAGES /FORCE -ja_JP.UTF-8/LC_MESSAGES /FORCE -kk_KZ.UTF-8/LC_MESSAGES /FORCE -ko_KR.UTF-8/LC_MESSAGES /FORCE -lt_LT.UTF-8/LC_MESSAGES /FORCE -nb_NO.UTF-8/LC_MESSAGES /FORCE -nl_BE.UTF-8/LC_MESSAGES /FORCE -nl_NL.UTF-8/LC_MESSAGES /FORCE -nn_NO.UTF-8/LC_MESSAGES /FORCE -no_NO.UTF-8/LC_MESSAGES /FORCE -pl_PL.UTF-8/LC_MESSAGES /FORCE -pt_BR.UTF-8/LC_MESSAGES /FORCE -pt_PT.UTF-8/LC_MESSAGES /FORCE -ro_RO.UTF-8/LC_MESSAGES /FORCE -ru_RU.UTF-8/LC_MESSAGES /FORCE -sk_SK.UTF-8/LC_MESSAGES /FORCE -sl_SI.UTF-8/LC_MESSAGES /FORCE -sr_YU.UTF-8/LC_MESSAGES /FORCE -sv_SE.UTF-8/LC_MESSAGES /FORCE -tr_TR.UTF-8/LC_MESSAGES /FORCE -uk_UA.UTF-8/LC_MESSAGES /FORCE -zh_CN.UTF-8/LC_MESSAGES /FORCE -zh_HK.UTF-8/LC_MESSAGES /FORCE -zh_TW.UTF-8/LC_MESSAGES /FORCE - -# Pig locale -Pig/LC_MESSAGES /FORCE - -# Linux/FreeBSD compatibility, EUC-CN == GB2312 -zh_CN.GB2312 zh_CN.eucCN - -# NetBSD compatibility -zh_HK.Big5hkscs zh_HK.Big5HKSCS - -# nb(Bokmal, Norwegian) == no(Norwegian) -nb_NO.ISO8859-1 no_NO.ISO8859-1 -nb_NO.ISO8859-15 no_NO.ISO8859-15 - -# backward compatibility. -ja_JP.ISO2022-JP ja_JP.ISO-2022-JP -ja_JP.ISO2022-JP2 ja_JP.ISO-2022-JP-2 -zh_HK.Big5-HKSCS zh_HK.Big5HKSCS -zh_TW.BIG5 zh_TW.Big5 diff --git a/share/mklocale/Makefile b/share/mklocale/Makefile new file mode 100644 index 0000000000..6f188dc671 --- /dev/null +++ b/share/mklocale/Makefile @@ -0,0 +1,102 @@ +# $FreeBSD: head/share/mklocale/Makefile 196790 2009-09-03 17:12:45Z ache $ + +LOCALES= UTF-8 \ + am_ET.UTF-8 \ + be_BY.CP1131 \ + bg_BG.CP1251 \ + el_GR.ISO8859-7 \ + hi_IN.ISCII-DEV \ + hy_AM.ARMSCII-8 \ + ja_JP.SJIS \ + ja_JP.eucJP \ + kk_KZ.PT154 \ + ko_KR.CP949 \ + ko_KR.eucKR \ + la_LN.ISO8859-1 \ + la_LN.ISO8859-13 \ + la_LN.ISO8859-15 \ + la_LN.ISO8859-2 \ + la_LN.ISO8859-4 \ + la_LN.US-ASCII \ + ru_RU.CP866 \ + ru_RU.ISO8859-5 \ + ru_RU.KOI8-R \ + tr_TR.ISO8859-9 \ + uk_UA.KOI8-U \ + zh_CN.eucCN \ + zh_CN.GB18030 \ + zh_CN.GB2312 \ + zh_CN.GBK \ + zh_HK.Big5HKSCS \ + zh_TW.Big5 + +LOCALEDIR= /usr/share/locale + +.SUFFIXES: .src .out + +.src.out: + mklocale -o ${.TARGET} ${.IMPSRC} + +FILES= ${LOCALES:S/$/.out/} +FILESNAME= LC_CTYPE + +.for locale in ${LOCALES} +FILESDIR_${locale}.out= ${LOCALEDIR}/${locale} +.endfor + +CLEANFILES= ${FILES} + +ENCODINGS= CP1251 ISO8859-1 ISO8859-2 ISO8859-4 ISO8859-5 \ + ISO8859-13 ISO8859-15 US-ASCII UTF-8 + +ASCIILINKS= en_AU en_CA en_GB en_NZ en_US +US-ASCII_US-ASCII= ${ASCIILINKS:C/^/la_LN:/} + +LATIN1XLINKS= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ + en_AU en_CA en_GB en_NZ en_US es_ES eu_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH \ + it_IT nb_NO nl_BE nl_NL nn_NO no_NO pt_PT sv_SE +LATIN1LINKS= ${LATIN1XLINKS} pt_BR +ISO8859-1_ISO8859-1= ${LATIN1LINKS:C/^/la_LN:/} + +LATIN15LINKS= ${LATIN1XLINKS} et_EE +ISO8859-15_ISO8859-15= ${LATIN15LINKS:C/^/la_LN:/} + +LATIN2LINKS= cs_CZ hr_HR hu_HU pl_PL sl_SI sr_YU ro_RO sk_SK +ISO8859-2_ISO8859-2= ${LATIN2LINKS:C/^/la_LN:/} + +LATIN4LINKS= lt_LT +ISO8859-4_ISO8859-4= ${LATIN4LINKS:C/^/la_LN:/} + +LATIN5LINKS= sr_YU uk_UA be_BY +ISO8859-5_ISO8859-5= ${LATIN5LINKS:C/^/ru_RU:/} + +LATIN13LINKS= lt_LT lv_LV +ISO8859-13_ISO8859-13= ${LATIN13LINKS:C/^/la_LN:/} + +CP1251LINKS= ru_RU be_BY uk_UA +CP1251_CP1251= ${CP1251LINKS:C/^/bg_BG:/} + +UTF8LINKS= af_ZA be_BY bg_BG ca_AD ca_ES ca_FR ca_IT cs_CZ \ + da_DK de_AT de_CH de_DE el_GR \ + en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \ + fr_BE \ + fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \ + ja_JP kk_KZ ko_KR lt_LT lv_LV mn_MN \ + nb_NO nl_BE nl_NL nn_NO no_NO pl_PL pt_BR pt_PT \ + ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \ + zh_TW +UTF-8_UTF-8= ${UTF8LINKS:C/^/:/} + + +SYMLINKS= +.for enc1 in ${ENCODINGS} +.for enc2 in ${ENCODINGS} +.for lang_terr in ${${enc1}_${enc2}} +SYMLINKS+= ../${lang_terr:C/:.*$//:C/.+$/&./}${enc1}/${FILESNAME} \ + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} +.endfor +.endfor +.endfor + +.include diff --git a/share/mklocale/README.locale_name b/share/mklocale/README.locale_name new file mode 100644 index 0000000000..6dc89e7275 --- /dev/null +++ b/share/mklocale/README.locale_name @@ -0,0 +1,9 @@ +$FreeBSD: head/share/mklocale/README.locale_name 78020 2001-06-10 22:13:29Z ache $ + +Locale name string format must be compliant with XPG3 and +using following format. + ::= _. + ::= based on ISO 639 + ::= based on ISO 3166 (country code) + ::= X11 codeset preferred + diff --git a/share/locale/ctype/en_US.UTF-8.src b/share/mklocale/UTF-8.src similarity index 96% rename from share/locale/ctype/en_US.UTF-8.src rename to share/mklocale/UTF-8.src index 453342c665..33fb1fe11f 100644 --- a/share/locale/ctype/en_US.UTF-8.src +++ b/share/mklocale/UTF-8.src @@ -1,10 +1,12 @@ -/* $NetBSD: en_US.UTF-8.src,v 1.5 2012/08/08 18:40:37 tnozaki Exp $ */ -/* $FreeBSD: /repoman/r/ncvs/src/share/mklocale/UTF-8.src,v 1.1 2004/03/27 08:14:14 tjr Exp $ */ - /* - * UTF-8 locale table for Rune Locale + * Unicode 3.2 ctypes table * * Generated by Hye-Shik Chang + * + * WARNING: UCS-4 used here as the internal representation, not UTF-8. + * See lib/libc/locale/utf8.c. + * + * $FreeBSD: head/share/mklocale/UTF-8.src 172622 2007-10-14 02:18:52Z ache $ */ /* @@ -33,11 +35,10 @@ * disclaimer notice are retained. Information can be extracted from these * files and used in documentation or programs, as long as there is an * accompanying notice indicating the source. - * */ -ENCODING "UTF8" -VARIABLE CODESET=UTF-8 +ENCODING "UTF-8" +VARIABLE Unicode 3.2 Character Types /* @@ -87,8 +88,6 @@ MAPUPPER < 0x00f8 - 0x00fe : 0x00d8 > MAPUPPER < 0x00ff 0x0178 > MAPLOWER < 0x00c0 - 0x00d6 : 0x00e0 > MAPLOWER < 0x00d8 - 0x00de : 0x00f8 > -TODIGIT < 0x00b2 - 0x00b3 : 0x0002 > -TODIGIT < 0x00b9 0x0001 > /* @@ -491,9 +490,9 @@ SWIDTH1 0x02b0 - 0x02ee * U+0300 - U+036F : Combining Diacritical Marks */ -GRAPH 0x0300 - 0x034f 0x0360 - 0x036f -PRINT 0x0300 - 0x034f 0x0360 - 0x036f -SWIDTH0 0x0300 - 0x034f 0x0360 - 0x036f +GRAPH 0x0300 - 0x034E 0x0350 - 0x036f +PRINT 0x0300 - 0x034E 0x0350 - 0x036f +SWIDTH0 0x0300 - 0x034E 0x0350 - 0x036f MAPUPPER < 0x0345 0x0399 > @@ -583,7 +582,7 @@ LOWER 0x04b9 0x04bb 0x04bd 0x04bf 0x04c2 0x04c4 0x04c6 LOWER 0x04c8 0x04ca 0x04cc 0x04ce 0x04d1 0x04d3 0x04d5 LOWER 0x04d7 0x04d9 0x04db 0x04dd 0x04df 0x04e1 0x04e3 LOWER 0x04e5 0x04e7 0x04e9 0x04eb 0x04ed 0x04ef 0x04f1 -LOWER 0x04f3 0x04f5 0x04f9 +LOWER 0x04f3 0x04f5 0x04f7 0x04f9 PUNCT 0x0482 UPPER 0x0400 - 0x042f 0x0460 0x0462 0x0464 0x0466 0x0468 UPPER 0x046a 0x046c 0x046e 0x0470 0x0472 0x0474 0x0476 @@ -595,9 +594,10 @@ UPPER 0x04b8 0x04ba 0x04bc 0x04be 0x04c0 0x04c1 0x04c3 UPPER 0x04c5 0x04c7 0x04c9 0x04cb 0x04cd 0x04d0 0x04d2 UPPER 0x04d4 0x04d6 0x04d8 0x04da 0x04dc 0x04de 0x04e0 UPPER 0x04e2 0x04e4 0x04e6 0x04e8 0x04ea 0x04ec 0x04ee -UPPER 0x04f0 0x04f2 0x04f4 0x04f8 -PRINT 0x0400 - 0x0486 0x0488 - 0x04ce 0x04d0 - 0x04f5 0x04f8 0x04f9 -SWIDTH1 0x0400 - 0x0486 0x0488 - 0x04ce 0x04d0 - 0x04f5 0x04f8 0x04f9 +UPPER 0x04f0 0x04f2 0x04f4 0x04f6 0x04f8 +PRINT 0x0400 - 0x0486 0x0488 - 0x04ce 0x04d0 - 0x04f9 +SWIDTH0 0x0483 - 0x0486 0x0488 - 0x0489 +SWIDTH1 0x0400 - 0x0482 0x048a - 0x04ce 0x04d0 - 0x04f9 MAPUPPER < 0x0430 - 0x044f : 0x0410 > MAPUPPER < 0x0450 - 0x045f : 0x0400 > @@ -671,6 +671,7 @@ MAPUPPER < 0x04ef 0x04ee > MAPUPPER < 0x04f1 0x04f0 > MAPUPPER < 0x04f3 0x04f2 > MAPUPPER < 0x04f5 0x04f4 > +MAPUPPER < 0x04f7 0x04f6 > MAPUPPER < 0x04f9 0x04f8 > MAPLOWER < 0x0400 - 0x040f : 0x0450 > MAPLOWER < 0x0410 - 0x042f : 0x0430 > @@ -744,6 +745,7 @@ MAPLOWER < 0x04ee 0x04ef > MAPLOWER < 0x04f0 0x04f1 > MAPLOWER < 0x04f2 0x04f3 > MAPLOWER < 0x04f4 0x04f5 > +MAPLOWER < 0x04f6 0x04f7 > MAPLOWER < 0x04f8 0x04f9 > @@ -812,7 +814,6 @@ SWIDTH1 0x05f0 - 0x05f4 */ CONTROL 0x06dd -DIGIT 0x0660 - 0x0669 0x06f0 - 0x06f9 GRAPH 0x060c 0x061b 0x061f 0x0621 - 0x063a 0x0640 - 0x0655 GRAPH 0x0660 - 0x06dc 0x06de - 0x06ed 0x06f0 - 0x06fe PUNCT 0x060c 0x061b 0x061f 0x066a - 0x066d 0x06d4 0x06e9 @@ -822,9 +823,6 @@ PRINT 0x0660 - 0x06dc 0x06de - 0x06ed 0x06f0 - 0x06fe SWIDTH1 0x060c 0x061b 0x061f 0x0621 - 0x063a 0x0640 - 0x0655 SWIDTH1 0x0660 - 0x06dc 0x06de - 0x06ed 0x06f0 - 0x06fe -TODIGIT < 0x0660 - 0x0669 : 0x0000 > -TODIGIT < 0x06f0 - 0x06f9 : 0x0000 > - /* * U+0700 - U+074F : Syriac @@ -850,7 +848,6 @@ SWIDTH1 0x0780 - 0x07b1 * U+0900 - U+097F : Devanagari */ -DIGIT 0x0966 - 0x096f GRAPH 0x0901 - 0x0903 0x0905 - 0x0939 0x093c - 0x094d 0x0950 - 0x0954 GRAPH 0x0958 - 0x0970 PUNCT 0x0964 0x0965 0x0970 @@ -859,14 +856,11 @@ PRINT 0x0958 - 0x0970 SWIDTH1 0x0901 - 0x0903 0x0905 - 0x0939 0x093c - 0x094d 0x0950 - 0x0954 SWIDTH1 0x0958 - 0x0970 -TODIGIT < 0x0966 - 0x096f : 0x0000 > - /* * U+0980 - U+09FF : Bengali */ -DIGIT 0x09e6 - 0x09ef GRAPH 0x0981 - 0x0983 0x0985 - 0x098c 0x098f 0x0990 0x0993 - 0x09a8 GRAPH 0x09aa - 0x09b0 0x09b2 0x09b6 - 0x09b9 0x09bc 0x09be - 0x09c4 GRAPH 0x09c7 0x09c8 0x09cb - 0x09cd 0x09d7 0x09dc 0x09dd @@ -882,14 +876,11 @@ SWIDTH1 0x09aa - 0x09b0 0x09b2 0x09b6 - 0x09b9 0x09bc 0x09be - 0x09c4 SWIDTH1 0x09c7 0x09c8 0x09cb - 0x09cd 0x09d7 0x09dc 0x09dd SWIDTH1 0x09df - 0x09e3 0x09e6 - 0x09fa -TODIGIT < 0x09e6 - 0x09ef : 0x0000 > - /* * U+0A00 - U+0A7F : Gurmukhi */ -DIGIT 0x0a66 - 0x0a6f GRAPH 0x0a02 0x0a05 - 0x0a0a 0x0a0f 0x0a10 0x0a13 - 0x0a28 GRAPH 0x0a2a - 0x0a30 0x0a32 0x0a33 0x0a35 0x0a36 0x0a38 0x0a39 GRAPH 0x0a3c 0x0a3e - 0x0a42 0x0a47 0x0a48 0x0a4b - 0x0a4d @@ -903,14 +894,11 @@ SWIDTH1 0x0a2a - 0x0a30 0x0a32 0x0a33 0x0a35 0x0a36 0x0a38 0x0a39 SWIDTH1 0x0a3c 0x0a3e - 0x0a42 0x0a47 0x0a48 0x0a4b - 0x0a4d SWIDTH1 0x0a59 - 0x0a5c 0x0a5e 0x0a66 - 0x0a74 -TODIGIT < 0x0a66 - 0x0a6f : 0x0000 > - /* * U+0A80 - U+0AFF : Gujarati */ -DIGIT 0x0ae6 - 0x0aef GRAPH 0x0a81 - 0x0a83 0x0a85 - 0x0a8b 0x0a8d 0x0a8f - 0x0a91 GRAPH 0x0a93 - 0x0aa8 0x0aaa - 0x0ab0 0x0ab2 0x0ab3 0x0ab5 - 0x0ab9 GRAPH 0x0abc - 0x0ac5 0x0ac7 - 0x0ac9 0x0acb - 0x0acd 0x0ad0 @@ -924,14 +912,11 @@ SWIDTH1 0x0a93 - 0x0aa8 0x0aaa - 0x0ab0 0x0ab2 0x0ab3 0x0ab5 - 0x0ab9 SWIDTH1 0x0abc - 0x0ac5 0x0ac7 - 0x0ac9 0x0acb - 0x0acd 0x0ad0 SWIDTH1 0x0ae0 0x0ae6 - 0x0aef -TODIGIT < 0x0ae6 - 0x0aef : 0x0000 > - /* * U+0B00 - U+0B7F : Oriya */ -DIGIT 0x0b66 - 0x0b6f GRAPH 0x0b01 - 0x0b03 0x0b05 - 0x0b0c 0x0b0f 0x0b10 0x0b13 - 0x0b28 GRAPH 0x0b2a - 0x0b30 0x0b32 0x0b33 0x0b36 - 0x0b39 0x0b3c - 0x0b43 GRAPH 0x0b47 0x0b48 0x0b4b - 0x0b4d 0x0b56 0x0b57 0x0b5c 0x0b5d @@ -946,14 +931,11 @@ SWIDTH1 0x0b2a - 0x0b30 0x0b32 0x0b33 0x0b36 - 0x0b39 0x0b3c - 0x0b43 SWIDTH1 0x0b47 0x0b48 0x0b4b - 0x0b4d 0x0b56 0x0b57 0x0b5c 0x0b5d SWIDTH1 0x0b5f - 0x0b61 0x0b66 - 0x0b70 -TODIGIT < 0x0b66 - 0x0b6f : 0x0000 > - /* * U+0B80 - U+0BFF : Tamil */ -DIGIT 0x0be7 - 0x0bef GRAPH 0x0b82 0x0b83 0x0b85 - 0x0b8a 0x0b8e - 0x0b90 0x0b92 - 0x0b95 GRAPH 0x0b99 0x0b9a 0x0b9c 0x0b9e 0x0b9f 0x0ba3 0x0ba4 GRAPH 0x0ba8 - 0x0baa 0x0bae - 0x0bb5 0x0bb7 - 0x0bb9 0x0bbe - 0x0bc2 @@ -968,14 +950,11 @@ SWIDTH1 0x0b99 0x0b9a 0x0b9c 0x0b9e 0x0b9f 0x0ba3 0x0ba4 SWIDTH1 0x0ba8 - 0x0baa 0x0bae - 0x0bb5 0x0bb7 - 0x0bb9 0x0bbe - 0x0bc2 SWIDTH1 0x0bc6 - 0x0bc8 0x0bca - 0x0bcd 0x0bd7 0x0be7 - 0x0bf2 -TODIGIT < 0x0be7 - 0x0bef : 0x0001 > - /* * U+0C00 - U+0C7F : Telugu */ -DIGIT 0x0c66 - 0x0c6f GRAPH 0x0c01 - 0x0c03 0x0c05 - 0x0c0c 0x0c0e - 0x0c10 0x0c12 - 0x0c28 GRAPH 0x0c2a - 0x0c33 0x0c35 - 0x0c39 0x0c3e - 0x0c44 0x0c46 - 0x0c48 GRAPH 0x0c4a - 0x0c4d 0x0c55 0x0c56 0x0c60 0x0c61 0x0c66 - 0x0c6f @@ -986,14 +965,11 @@ SWIDTH1 0x0c01 - 0x0c03 0x0c05 - 0x0c0c 0x0c0e - 0x0c10 0x0c12 - 0x0c28 SWIDTH1 0x0c2a - 0x0c33 0x0c35 - 0x0c39 0x0c3e - 0x0c44 0x0c46 - 0x0c48 SWIDTH1 0x0c4a - 0x0c4d 0x0c55 0x0c56 0x0c60 0x0c61 0x0c66 - 0x0c6f -TODIGIT < 0x0c66 - 0x0c6f : 0x0000 > - /* * U+0C80 - U+0CFF : Kannada */ -DIGIT 0x0ce6 - 0x0cef GRAPH 0x0c82 0x0c83 0x0c85 - 0x0c8c 0x0c8e - 0x0c90 0x0c92 - 0x0ca8 GRAPH 0x0caa - 0x0cb3 0x0cb5 - 0x0cb9 0x0cbe - 0x0cc4 0x0cc6 - 0x0cc8 GRAPH 0x0cca - 0x0ccd 0x0cd5 0x0cd6 0x0cde 0x0ce0 0x0ce1 @@ -1007,14 +983,11 @@ SWIDTH1 0x0caa - 0x0cb3 0x0cb5 - 0x0cb9 0x0cbe - 0x0cc4 0x0cc6 - 0x0cc8 SWIDTH1 0x0cca - 0x0ccd 0x0cd5 0x0cd6 0x0cde 0x0ce0 0x0ce1 SWIDTH1 0x0ce6 - 0x0cef -TODIGIT < 0x0ce6 - 0x0cef : 0x0000 > - /* * U+0D00 - U+0D7F : Malayalam */ -DIGIT 0x0d66 - 0x0d6f GRAPH 0x0d02 0x0d03 0x0d05 - 0x0d0c 0x0d0e - 0x0d10 0x0d12 - 0x0d28 GRAPH 0x0d2a - 0x0d39 0x0d3e - 0x0d43 0x0d46 - 0x0d48 0x0d4a - 0x0d4d GRAPH 0x0d57 0x0d60 0x0d61 0x0d66 - 0x0d6f @@ -1025,8 +998,6 @@ SWIDTH1 0x0d02 0x0d03 0x0d05 - 0x0d0c 0x0d0e - 0x0d10 0x0d12 - 0x0d28 SWIDTH1 0x0d2a - 0x0d39 0x0d3e - 0x0d43 0x0d46 - 0x0d48 0x0d4a - 0x0d4d SWIDTH1 0x0d57 0x0d60 0x0d61 0x0d66 - 0x0d6f -TODIGIT < 0x0d66 - 0x0d6f : 0x0000 > - /* * U+0D80 - U+0DFF : Sinhala @@ -1048,20 +1019,17 @@ SWIDTH1 0x0dd8 - 0x0ddf 0x0df2 - 0x0df4 * U+0E00 - U+0E7F : Thai */ -DIGIT 0x0e50 - 0x0e59 GRAPH 0x0e01 - 0x0e3a 0x0e3f - 0x0e5b PUNCT 0x0e3f 0x0e4f 0x0e5a 0x0e5b PRINT 0x0e01 - 0x0e3a 0x0e3f - 0x0e5b -SWIDTH1 0x0e01 - 0x0e3a 0x0e3f - 0x0e5b - -TODIGIT < 0x0e50 - 0x0e59 : 0x0000 > +SWIDTH0 0x0e31 0x0e34 - 0x0e3a 0x0e47 - 0x0e4e +SWIDTH1 0x0e01 - 0x0e30 0x0e32 - 0x0e33 0x0e3f - 0x0e46 0x0e4f - 0x0e5b /* * U+0E80 - U+0EFF : Lao */ -DIGIT 0x0ed0 - 0x0ed9 GRAPH 0x0e81 0x0e82 0x0e84 0x0e87 0x0e88 0x0e8a 0x0e8d GRAPH 0x0e94 - 0x0e97 0x0e99 - 0x0e9f 0x0ea1 - 0x0ea3 0x0ea5 GRAPH 0x0ea7 0x0eaa 0x0eab 0x0ead - 0x0eb9 0x0ebb - 0x0ebd @@ -1078,14 +1046,11 @@ SWIDTH1 0x0ea7 0x0eaa 0x0eab 0x0ead - 0x0eb9 0x0ebb - 0x0ebd SWIDTH1 0x0ec0 - 0x0ec4 0x0ec6 0x0ec8 - 0x0ecd 0x0ed0 - 0x0ed9 SWIDTH1 0x0edc 0x0edd -TODIGIT < 0x0ed0 - 0x0ed9 : 0x0000 > - /* * U+0F00 - U+0FFF : Tibetan */ -DIGIT 0x0f20 - 0x0f29 GRAPH 0x0f00 - 0x0f47 0x0f49 - 0x0f6a 0x0f71 - 0x0f8b 0x0f90 - 0x0f97 GRAPH 0x0f99 - 0x0fbc 0x0fbe - 0x0fcc 0x0fcf PUNCT 0x0f01 - 0x0f17 0x0f1a - 0x0f1f 0x0f34 0x0f36 0x0f38 @@ -1098,14 +1063,11 @@ PHONOGRAM 0x0f00 SWIDTH1 0x0f00 - 0x0f47 0x0f49 - 0x0f6a 0x0f71 - 0x0f8b 0x0f90 - 0x0f97 SWIDTH1 0x0f99 - 0x0fbc 0x0fbe - 0x0fcc 0x0fcf -TODIGIT < 0x0f20 - 0x0f29 : 0x0000 > - /* * U+1000 - U+109F : Myanmar */ -DIGIT 0x1040 - 0x1049 GRAPH 0x1000 - 0x1021 0x1023 - 0x1027 0x1029 0x102a 0x102c - 0x1032 GRAPH 0x1036 - 0x1039 0x1040 - 0x1059 PUNCT 0x104a - 0x104f @@ -1114,8 +1076,6 @@ PRINT 0x1036 - 0x1039 0x1040 - 0x1059 SWIDTH1 0x1000 - 0x1021 0x1023 - 0x1027 0x1029 0x102a 0x102c - 0x1032 SWIDTH1 0x1036 - 0x1039 0x1040 - 0x1059 -TODIGIT < 0x1040 - 0x1049 : 0x0000 > - /* * U+10A0 - U+10FF : Georgian @@ -1143,7 +1103,6 @@ SWIDTH2 0x1100 - 0x1159 0x115f * U+1200 - U+137F : Ethiopic */ -DIGIT 0x1369 - 0x1371 GRAPH 0x1200 - 0x1206 0x1208 - 0x1246 0x1248 0x124a - 0x124d GRAPH 0x1250 - 0x1256 0x1258 0x125a - 0x125d 0x1260 - 0x1286 GRAPH 0x1288 0x128a - 0x128d 0x1290 - 0x12ae 0x12b0 0x12b2 - 0x12b5 @@ -1174,8 +1133,6 @@ SWIDTH1 0x12d0 - 0x12d6 0x12d8 - 0x12ee 0x12f0 - 0x130e 0x1310 SWIDTH1 0x1312 - 0x1315 0x1318 - 0x131e 0x1320 - 0x1346 0x1348 - 0x135a SWIDTH1 0x1361 - 0x137c -TODIGIT < 0x1369 - 0x1371 : 0x0001 > - /* * U+13A0 - U+13FF : Cherokee @@ -1261,27 +1218,30 @@ SWIDTH1 0x1760 - 0x176c 0x176e - 0x1770 0x1772 0x1773 * U+1780 - U+17FF : Khmer */ -DIGIT 0x17e0 - 0x17e9 GRAPH 0x1780 - 0x17dc 0x17e0 - 0x17e9 PUNCT 0x17d4 - 0x17d6 0x17d8 - 0x17db PRINT 0x1780 - 0x17dc 0x17e0 - 0x17e9 SWIDTH1 0x1780 - 0x17dc 0x17e0 - 0x17e9 -TODIGIT < 0x17e0 - 0x17e9 : 0x0000 > - /* * U+1800 - U+18AF : Mongolian */ CONTROL 0x180e -DIGIT 0x1810 - 0x1819 GRAPH 0x1800 - 0x180d 0x1810 - 0x1819 0x1820 - 0x1877 0x1880 - 0x18a9 PUNCT 0x1800 - 0x180a PRINT 0x1800 - 0x180d 0x1810 - 0x1819 0x1820 - 0x1877 0x1880 - 0x18a9 SWIDTH1 0x1800 - 0x180d 0x1810 - 0x1819 0x1820 - 0x1877 0x1880 - 0x18a9 -TODIGIT < 0x1810 - 0x1819 : 0x0000 > + +/* + * U+1DC0 - U+1DFF : Combining Diacritical Marks Supplement + */ + +GRAPH 0x1DC0 - 0x1DC3 +PRINT 0x1DC0 - 0x1DC3 +SWIDTH0 0x1DC0 - 0x1DC3 /* @@ -1688,10 +1648,6 @@ PRINT 0x2070 0x2071 0x2074 - 0x208e SPECIAL 0x2070 0x2074 - 0x2079 0x2080 - 0x2089 SWIDTH1 0x2070 0x2071 0x2074 - 0x208e -TODIGIT < 0x2070 0x0000 > -TODIGIT < 0x2074 - 0x2079 : 0x0004 > -TODIGIT < 0x2080 - 0x2089 : 0x0000 > - /* * U+20A0 - U+20CF : Currency Symbols @@ -1707,9 +1663,9 @@ SWIDTH1 0x20a0 - 0x20b1 * U+20D0 - U+20FF : Combining Diacritical Marks for Symbols */ -GRAPH 0x20d0 - 0x20ea -PRINT 0x20d0 - 0x20ea -SWIDTH1 0x20d0 - 0x20ea +GRAPH 0x20d0 - 0x20eb +PRINT 0x20d0 - 0x20eb +SWIDTH0 0x20d0 - 0x20eb /* @@ -1987,7 +1943,8 @@ GRAPH 0x3041 - 0x3096 0x3099 - 0x309f PUNCT 0x309b 0x309c PRINT 0x3041 - 0x3096 0x3099 - 0x309f PHONOGRAM 0x3041 - 0x3096 0x309f -SWIDTH2 0x3041 - 0x3096 0x3099 - 0x309f +SWIDTH0 0x3099 - 0x309a +SWIDTH2 0x3041 - 0x3096 0x309b - 0x309f /* @@ -2211,7 +2168,7 @@ SWIDTH1 0xfe00 - 0xfe0f GRAPH 0xfe20 - 0xfe23 PRINT 0xfe20 - 0xfe23 -SWIDTH1 0xfe20 - 0xfe23 +SWIDTH0 0xfe20 - 0xfe23 /* @@ -2249,7 +2206,6 @@ SWIDTH1 0xfe70 - 0xfe74 0xfe76 - 0xfefc */ ALPHA 0xff21 - 0xff3a 0xff41 - 0xff5a -DIGIT 0xff10 - 0xff19 GRAPH 0xff01 - 0xffbe 0xffc2 - 0xffc7 0xffca - 0xffcf 0xffd2 - 0xffd7 GRAPH 0xffda - 0xffdc 0xffe0 - 0xffe6 0xffe8 - 0xffee LOWER 0xff41 - 0xff5a @@ -2266,7 +2222,6 @@ SWIDTH2 0xff01 - 0xff60 0xffe0 - 0xffe6 MAPUPPER < 0xff41 - 0xff5a : 0xff21 > MAPLOWER < 0xff21 - 0xff3a : 0xff41 > -TODIGIT < 0xff10 - 0xff19 : 0x0000 > /* @@ -2333,8 +2288,13 @@ CONTROL 0x1d173 - 0x1d17a GRAPH 0x1d100 - 0x1d126 0x1d12a - 0x1d172 0x1d17b - 0x1d1dd PUNCT 0x1d100 - 0x1d126 0x1d12a - 0x1d164 0x1d16a - 0x1d16c PUNCT 0x1d183 0x1d184 0x1d18c - 0x1d1a9 0x1d1ae - 0x1d1dd -PRINT 0x1d100 - 0x1d126 0x1d12a - 0x1d172 0x1d17b - 0x1d1dd -SWIDTH1 0x1d100 - 0x1d126 0x1d12a - 0x1d172 0x1d17b - 0x1d1dd +PRINT 0x1d100 - 0x1d126 0x1d12a - 0x1d158 0x1d15a - 0x1d172 +PRINT 0x1d17b - 0x1d1dd +SWIDTH0 0x1d165 - 0x1d169 0x1d16d - 0x1d172 0x1d17b - 0x1d182 +SWIDTH0 0x1d185 - 0x1d18b 0x1d1aa - 0x1d1ad +SWIDTH1 0x1d100 - 0x1d126 0x1d12a - 0x1d158 0x1d15a - 0x1d164 +SWIDTH1 0x1d16a - 0x1d16c 0x1d183 0x1d184 0x1d18c - 0x1d1a9 +SWIDTH1 0x1d1ae - 0x1d1dd /* diff --git a/share/mklocale/am_ET.UTF-8.src b/share/mklocale/am_ET.UTF-8.src new file mode 100644 index 0000000000..953f9318c9 --- /dev/null +++ b/share/mklocale/am_ET.UTF-8.src @@ -0,0 +1,44 @@ +/* + * Amharic Language (Ethiopic) Locale with UTF-8 Encoding + * + * ሚካኤል ጥላሁን + * Last updated Mon Aug 04 02:06:00 EST 2003 + * + * $FreeBSD: head/share/mklocale/am_ET.UTF-8.src 118461 2003-08-05 06:34:16Z ache $ + */ + +ENCODING "UTF-8" + +/* ALPHA 'A' - 'Z' 'a' - 'z' 'ሀ' - 'ፚ' */ +ALPHA 'A' - 'Z' 'a' - 'z' 0xe18880 - 0xe18d9a +CONTROL 0x00 - 0x1f 0x7f - 0x9f + +/* DIGIT '0' - '9' '፩' - '፱' */ +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e 0xa1 - 0xfa +LOWER 'a' - 'z' + +/* + * PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e '።' - '፨' + */ +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e 0xe18da2 - 0xe18da8 +SPACE 0x09 - 0x0d 0x20 0xe18da1 +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' 0xe18da1 +PRINT 0x20 - 0x7e 0x1200 - 0x137c + +MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'a' - 'z' : 'a'> + +MAPUPPER <'A' - 'Z' : 'A'> +MAPUPPER <'a' - 'z' : 'A'> + +/* + * TODIGIT <0xe18da8'፨' - '፱' : 1> + * No Zero digit + */ +TODIGIT <0xe18da8 - 0xe18db1 : 1> +TODIGIT <'0' - '9' : 0> +TODIGIT <'A' - 'F' : 10> +TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/be_BY.CP1131.src b/share/mklocale/be_BY.CP1131.src similarity index 90% rename from share/locale/ctype/be_BY.CP1131.src rename to share/mklocale/be_BY.CP1131.src index 2cf93f9768..32a7fcfe5c 100644 --- a/share/locale/ctype/be_BY.CP1131.src +++ b/share/mklocale/be_BY.CP1131.src @@ -1,16 +1,15 @@ /* * Belarusian language. Modern/standard (1959) grammar. * Prepared by Yury Tarasievich - * $FreeBSD: src/share/mklocale/be_BY.CP1131.src,v 1.2 2005/04/21 09:15:19 ache Exp $ - * $DragonFly: src/share/locale/ctype/be_BY.CP1131.src,v 1.1 2006/11/12 21:15:46 swildner Exp $ + * $FreeBSD: head/share/mklocale/be_BY.CP1131.src 145353 2005-04-21 09:15:19Z ache $ */ ENCODING "NONE" VARIABLE Belarusian CP1131 (extending the and based on: Russian Alternative code table (CP866) by ) -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0x80 - 0xaf 0xe0 - 0xf7 CONTROL 0x00 - 0x1f 0x7f DIGIT '0' - '9' diff --git a/share/locale/ctype/bg_BG.CP1251.src b/share/mklocale/bg_BG.CP1251.src similarity index 91% rename from share/locale/ctype/bg_BG.CP1251.src rename to share/mklocale/bg_BG.CP1251.src index 2605c6d8cc..2621dc1450 100644 --- a/share/locale/ctype/bg_BG.CP1251.src +++ b/share/mklocale/bg_BG.CP1251.src @@ -1,16 +1,14 @@ -/* $NetBSD: bg_BG.CP1251.src,v 1.3 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for Bulgarian Cyrillic character set (CP1251) * - * FreeBSD: src/share/mklocale/bg_BG.CP1251.src,v 1.4 2002/03/28 01:13:04 ache Exp + * $FreeBSD: head/share/mklocale/bg_BG.CP1251.src 93303 2002-03-28 01:13:04Z ache $ */ ENCODING "NONE" -VARIABLE Bulgarian Cyrillic character set (CP1251) by , CODESET=CP1251 +VARIABLE Bulgarian Cyrillic character set (CP1251) by -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' ALPHA 0x80 0x81 0x83 0x8a 0x8c - 0x90 0x9a 0x9c - 0x9f ALPHA 0xa1 - 0xa3 0xa5 0xa8 0xaa 0xaf 0xb2 - 0xb4 0xb8 0xba @@ -29,7 +27,6 @@ UPPER 0xaa 0xaf 0xb2 0xbd 0xc0 - 0xdf XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0x80 - 0x97 0x99 - 0xff -SWIDTH1 0x20 - 0x7e 0x80 - 0x97 0x99 - 0xff MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> diff --git a/share/locale/ctype/el_GR.ISO8859-7.src b/share/mklocale/el_GR.ISO8859-7.src similarity index 84% rename from share/locale/ctype/el_GR.ISO8859-7.src rename to share/mklocale/el_GR.ISO8859-7.src index 039a75e32a..f7e03b7264 100644 --- a/share/locale/ctype/el_GR.ISO8859-7.src +++ b/share/mklocale/el_GR.ISO8859-7.src @@ -1,13 +1,11 @@ -/* $NetBSD: el_GR.ISO8859-7.src,v 1.1 2003/07/21 17:41:18 tshiozak Exp $ */ - /* * LOCALE_CTYPE for Greek/ISO8859-7 set * - * FreeBSD: src/share/mklocale/el_GR.ISO8859-7.src,v 1.3 2001/11/30 05:05:53 ache Exp + * $FreeBSD: head/share/mklocale/el_GR.ISO8859-7.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Greek/ISO8859-7 character set by , CODESET=ISO8859-7 +VARIABLE Greek/ISO8859-7 character set by ALPHA 'A' - 'Z' 'a' - 'z' 0xb6 0xb8 - 0xba 0xbc 0xbe - 0xfe BLANK ' ' '\t' 0xa0 @@ -15,7 +13,6 @@ CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' GRAPH 0x21 - 0x7e 0xa1 - 0xff PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e PUNCT 0xa1 - 0xb5 0xb7 0xbb 0xbd SPACE 0x09 - 0x0d ' ' 0xa0 diff --git a/share/mklocale/hi_IN.ISCII-DEV.src b/share/mklocale/hi_IN.ISCII-DEV.src new file mode 100644 index 0000000000..803376ece7 --- /dev/null +++ b/share/mklocale/hi_IN.ISCII-DEV.src @@ -0,0 +1,35 @@ +/* + * Hindi Language Locale with ISCII-DEV Encoding + * + * Arun Sharma + * Last updated Mon Nov 19 23:07:46 PST 2001 + * + * $FreeBSD: head/share/mklocale/hi_IN.ISCII-DEV.src 87117 2001-11-30 07:19:21Z ache $ + */ + +ENCODING "NONE" + +ALPHA 'A' - 'Z' 'a' - 'z' '¡' - 'ê' +CONTROL 0x00 - 0x1f 0x7f - 0x9f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e 0xa1 - 0xfa +LOWER 'a' - 'z' +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 0xa0 +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' 0xa0 +PRINT 0x20 - 0x7e 0xa0 - 0xfa + +/* ?DIGIT 'ñ' - 'ú' */ + +MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'a' - 'z' : 'a'> + +MAPUPPER <'A' - 'Z' : 'A'> +MAPUPPER <'a' - 'z' : 'A'> + +TODIGIT <'0' - '9' : 0> +TODIGIT <'ñ' - 'ú' : 0> +TODIGIT <'A' - 'F' : 10> +TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/hy_AM.ARMSCII-8.src b/share/mklocale/hy_AM.ARMSCII-8.src similarity index 94% rename from share/locale/ctype/hy_AM.ARMSCII-8.src rename to share/mklocale/hy_AM.ARMSCII-8.src index 4595800bfe..f5d706e09d 100644 --- a/share/locale/ctype/hy_AM.ARMSCII-8.src +++ b/share/mklocale/hy_AM.ARMSCII-8.src @@ -1,18 +1,16 @@ -/* $NetBSD: hy_AM.ARMSCII-8.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for Armenian armscii-8 character set * * Made available by Vahe Khachikyan * - * FreeBSD: src/share/mklocale/hy_AM.ARMSCII-8.src,v 1.1 2003/07/05 12:03:16 ache Exp + * $FreeBSD: head/share/mklocale/hy_AM.ARMSCII-8.src 117259 2003-07-05 12:03:16Z ache $ */ ENCODING "NONE" -VARIABLE Armenian ARMSCII-8 character set by , CODESET=ARMSCII-8 +VARIABLE Armenian ARMSCII-8 character set by -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xa2 0xb2 - 0xfd CONTROL 0x00 - 0x1f 0x7f DIGIT '0' - '9' @@ -24,13 +22,12 @@ UPPER 'A' - 'Z' 0xb2 0xb4 0xb6 0xb8 0xba 0xbc 0xbe 0xc0 0xc2 0xc4 0xc6 0xc8 0xc XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' PRINT 0x20 - 0x7e 0xa1 - 0xfe -SWIDTH1 0x20 - 0x7e 0xa1 - 0xfe MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> -/* - * Upper to lower - */ +# +# Upper to lower +# MAPLOWER <0xb2 0xb3> MAPLOWER <0xb4 0xb5> MAPLOWER <0xb6 0xb7> @@ -69,9 +66,9 @@ MAPLOWER <0xf6 0xf7> MAPLOWER <0xf8 0xf9> MAPLOWER <0xfa 0xfb> MAPLOWER <0xfc 0xfd> -/* - * Lowers to lower - */ +# +# Lowers to lower +# MAPLOWER <0xb3 0xb3> MAPLOWER <0xb5 0xb5> MAPLOWER <0xb7 0xb7> @@ -114,9 +111,9 @@ MAPLOWER <0xfd 0xfd> MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> -/* - * lower to upper - */ +# +# lower to upper +# MAPUPPER <0xb3 0xb2> MAPUPPER <0xb5 0xb4> MAPUPPER <0xb7 0xb6> @@ -155,9 +152,9 @@ MAPUPPER <0xf7 0xf6> MAPUPPER <0xf9 0xf8> MAPUPPER <0xfb 0xfa> MAPUPPER <0xfd 0xfc> -/* - * Upper to upper - */ +# +# Upper to upper +# MAPUPPER <0xb2 0xb2> MAPUPPER <0xb4 0xb4> MAPUPPER <0xb6 0xb6> diff --git a/share/locale/ctype/ja_JP.SJIS.src b/share/mklocale/ja_JP.SJIS.src similarity index 94% rename from share/locale/ctype/ja_JP.SJIS.src rename to share/mklocale/ja_JP.SJIS.src index 41ac4fb80a..be65989966 100644 --- a/share/locale/ctype/ja_JP.SJIS.src +++ b/share/mklocale/ja_JP.SJIS.src @@ -1,5 +1,3 @@ -/* $NetBSD: ja_JP.SJIS.src,v 1.4 2006/04/11 18:45:03 tnozaki Exp $ */ - /* * ja_JP.SJIS locale table for BSD4.4/rune * version 1.0 @@ -31,10 +29,11 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/share/mklocale/ja_JP.SJIS.src 194085 2009-06-12 23:15:36Z edwin $ */ ENCODING "MSKanji" -VARIABLE CODESET=SJIS /* * ASCII byte code @@ -47,7 +46,7 @@ LOWER 'a'-'z' PUNCT 0x21-0x2f 0x3a-0x40 0x5b-0x60 0x7b-0x7e SPACE 0x09-0x0d 0x20 UPPER 'A'-'Z' -XDIGIT '0' - '9' 'a'-'f' 'A'-'F' +XDIGIT '0'-'9' 'a'-'f' 'A'-'F' BLANK ' ' '\t' PRINT 0x20-0x7e SWIDTH1 0x20-0x7e @@ -63,7 +62,6 @@ TODIGIT <'A'-'F':10><'a'-'f':10> PUNCT 0xa1-0xa5 SPACE 0xa0 BLANK 0xa0 -PRINT 0xa0-0xdf SPECIAL 0xa1-0xdf PHONOGRAM 0xa6-0xdf SWIDTH1 0xa0-0xdf @@ -74,8 +72,7 @@ SWIDTH1 0xa0-0xdf /* 100 */ PUNCT 0x8141-0x8151 0x8159-0x815a 0x815c-0x817e 0x8180-0x819e SPACE 0x8140 -BLANK 0x8140 -PRINT 0x8140 +BLANK 0x8140 PHONOGRAM 0x8152-0x8158 0x815b /* 200 */ @@ -83,8 +80,8 @@ PUNCT 0x819f-0x81ac 0x81b8-0x81bf 0x81c8-0x81ce 0x81da-0x81e8 PUNCT 0x81f0-0x81f7 0x81fc /* 300 */ -DIGIT 0x824f-0x8258 -XDIGIT 0x8260-0x8265 0x8281-0x8286 +PRINT 0x824f-0x8258 */ +/* ?XDIGIT 0x8260-0x8265 0x8281-0x8286 */ ALPHA 0x8260-0x8279 0x8281-0x829a UPPER 0x8260-0x8279 LOWER 0x8281-0x829a @@ -208,6 +205,19 @@ IDEOGRAM 0xe940-0xe97e 0xe980-0xe99e /* 8100 */ IDEOGRAM 0xe99f-0xe9fc /* 8200 */ IDEOGRAM 0xea40-0xea7e 0xea80-0xea9e /* 8300 */ IDEOGRAM 0xea9f-0xeaa4 /* 8400 */ +IDEOGRAM 0xed40-0xed7e 0xed80-0xedfc +IDEOGRAM 0xee40-0xee7e 0xee80-0xeeeb +DIGIT 0xeeef-0xeef8 +TODIGIT <0xeeef-0xeef8:1> +PUNCT 0xeef9-0xeefc +DIGIT 0xfa40-0xfa49 +TODIGIT <0xfa40-0xfa49:1> +DIGIT 0xfa4a-0xfa53 +TODIGIT <0xfa4a-0xfa53:1> +PUNCT 0xfa54-0xfafb +IDEOGRAM 0xfa5c-0xfa7e 0xfa80-0xfafc +IDEOGRAM 0xfb40-0xfb7e 0xfb80-0xfbfc +IDEOGRAM 0xfc40-0xfc4b SWIDTH2 0x889f-0x88fc /* 1600 */ SWIDTH2 0x8940-0x897e 0x8980-0x899e /* 1700 */ diff --git a/share/mklocale/ja_JP.eucJP.src b/share/mklocale/ja_JP.eucJP.src new file mode 100644 index 0000000000..71a6cf0937 --- /dev/null +++ b/share/mklocale/ja_JP.eucJP.src @@ -0,0 +1,245 @@ +# @(#)Japanese 8.1 (Berkeley) 6/6/93 + +/* + * Japanese LOCALE_CTYPE definitions using EUC of JIS character sets + * + * $FreeBSD: head/share/mklocale/ja_JP.eucJP.src 194085 2009-06-12 23:15:36Z edwin $ + */ + +ENCODING "EUC" + +/* JIS JIS JIS */ +/* X201 X208 X201 */ +/* 00-7f 84-fe */ + +VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 + +/* + * Code Set 1 + */ +ALPHA 'A' - 'Z' 'a' - 'z' +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e +LOWER 'a' - 'z' +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' +PRINT 0x20 - 0x7e +SWIDTH1 0x20 - 0x7e + +MAPLOWER < 'A' - 'Z' : 'a' > +MAPLOWER < 'a' - 'z' : 'a' > +MAPUPPER < 'A' - 'Z' : 'A' > +MAPUPPER < 'a' - 'z' : 'A' > +TODIGIT < '0' - '9' : 0 > +TODIGIT < 'A' - 'F' : 10 > +TODIGIT < 'a' - 'f' : 10 > + +/* + * Code Set 2 + */ + +SPACE 0xa1a1 +BLANK 0xa1a1 +PHONOGRAM 0xa1bc +SPECIAL 0xa1a2 - 0xa1fe +PUNCT 0xa1a2 - 0xa1f8 /* A few too many in here... */ +SWIDTH2 0xa1a1 - 0xa1fe + +SPECIAL 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea +SPECIAL 0xa2f2 - 0xa2f9 0xa2fe +SWIDTH2 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea +SWIDTH2 0xa2f2 - 0xa2f9 0xa2fe + +PRINT 0xa3b0 - 0xa3b9 +UPPER 0xa3c1 - 0xa3da /* Romaji */ +LOWER 0xa3e1 - 0xa3fa /* Romaji */ +SWIDTH2 0xa3b0 - 0xa3b9 /* Zenkaku Digit */ +SWIDTH2 0xa3c1 - 0xa3da /* Zenkaku Alphabet */ +SWIDTH2 0xa3e1 - 0xa3fa /* Zenkaku Alphabet */ +MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > /* English */ +MAPLOWER < 0xa3e1 - 0xa3fa : 0xa3e1 > /* English */ +MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > +MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 > + +/* ?XDIGIT 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 */ + +TODIGIT < 0xa3b0 - 0xa3b9 : 0 > +TODIGIT < 0xa3c1 - 0xa3c6 : 10 > +TODIGIT < 0xa3e1 - 0xa3e6 : 10 > + +PHONOGRAM 0xa4a1 - 0xa4f3 +PHONOGRAM 0xa5a1 - 0xa5f6 +SWIDTH2 0xa4a1 - 0xa4f3 /* Zenkaku Hiragana */ +SWIDTH2 0xa5a1 - 0xa5f6 /* Zenkaku Katakana */ + +UPPER 0xa6a1 - 0xa6b8 /* Greek */ +LOWER 0xa6c1 - 0xa6d8 /* Greek */ +SWIDTH2 0xa6a1 - 0xa6b8 /* Zenkaku Greek */ +SWIDTH2 0xa6c1 - 0xa6d8 /* Zenkaku Greek */ +MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > +MAPLOWER < 0xa6c1 - 0xa6d8 : 0xa6c1 > +MAPUPPER < 0xa6a1 - 0xa6b8 : 0xa6a1 > +MAPUPPER < 0xa6c1 - 0xa6d8 : 0xa6a1 > + +UPPER 0xa7a1 - 0xa7c1 /* Cyrillic */ +LOWER 0xa7d1 - 0xa7f1 /* Cyrillic */ +SWIDTH2 0xa7a1 - 0xa7c1 /* Zenkaku Cyrillic */ +SWIDTH2 0xa7d1 - 0xa7f1 /* Zenkaku Cyrillic */ +MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > +MAPLOWER < 0xa7d1 - 0xa7f1 : 0xa7d1 > +MAPUPPER < 0xa7a1 - 0xa7c1 : 0xa7a1 > +MAPUPPER < 0xa7d1 - 0xa7f1 : 0xa7a1 > + +SPECIAL 0xa8a1 - 0xa8c0 +SWIDTH2 0xa8a1 - 0xa8c0 + +IDEOGRAM 0xb0a1 - 0xb0fe +IDEOGRAM 0xb1a1 - 0xb1fe +IDEOGRAM 0xb2a1 - 0xb2fe +IDEOGRAM 0xb3a1 - 0xb3fe +IDEOGRAM 0xb4a1 - 0xb4fe +IDEOGRAM 0xb5a1 - 0xb5fe +IDEOGRAM 0xb6a1 - 0xb6fe +IDEOGRAM 0xb7a1 - 0xb7fe +IDEOGRAM 0xb8a1 - 0xb8fe +IDEOGRAM 0xb9a1 - 0xb9fe +IDEOGRAM 0xbaa1 - 0xbafe +IDEOGRAM 0xbba1 - 0xbbfe +IDEOGRAM 0xbca1 - 0xbcfe +IDEOGRAM 0xbda1 - 0xbdfe +IDEOGRAM 0xbea1 - 0xbefe +IDEOGRAM 0xbfa1 - 0xbffe +IDEOGRAM 0xc0a1 - 0xc0fe +IDEOGRAM 0xc1a1 - 0xc1fe +IDEOGRAM 0xc2a1 - 0xc2fe +IDEOGRAM 0xc3a1 - 0xc3fe +IDEOGRAM 0xc4a1 - 0xc4fe +IDEOGRAM 0xc5a1 - 0xc5fe +IDEOGRAM 0xc6a1 - 0xc6fe +IDEOGRAM 0xc7a1 - 0xc7fe +IDEOGRAM 0xc8a1 - 0xc8fe +IDEOGRAM 0xc9a1 - 0xc9fe +IDEOGRAM 0xcaa1 - 0xcafe +IDEOGRAM 0xcba1 - 0xcbfe +IDEOGRAM 0xcca1 - 0xccfe +IDEOGRAM 0xcda1 - 0xcdfe +IDEOGRAM 0xcea1 - 0xcefe +IDEOGRAM 0xcfa1 - 0xcfd3 +IDEOGRAM 0xd0a1 - 0xd0fe +IDEOGRAM 0xd1a1 - 0xd1fe +IDEOGRAM 0xd2a1 - 0xd2fe +IDEOGRAM 0xd3a1 - 0xd3fe +IDEOGRAM 0xd4a1 - 0xd4fe +IDEOGRAM 0xd5a1 - 0xd5fe +IDEOGRAM 0xd6a1 - 0xd6fe +IDEOGRAM 0xd7a1 - 0xd7fe +IDEOGRAM 0xd8a1 - 0xd8fe +IDEOGRAM 0xd9a1 - 0xd9fe +IDEOGRAM 0xdaa1 - 0xdafe +IDEOGRAM 0xdba1 - 0xdbfe +IDEOGRAM 0xdca1 - 0xdcfe +IDEOGRAM 0xdda1 - 0xddfe +IDEOGRAM 0xdea1 - 0xdefe +IDEOGRAM 0xdfa1 - 0xdffe +IDEOGRAM 0xe0a1 - 0xe0fe +IDEOGRAM 0xe1a1 - 0xe1fe +IDEOGRAM 0xe2a1 - 0xe2fe +IDEOGRAM 0xe3a1 - 0xe3fe +IDEOGRAM 0xe4a1 - 0xe4fe +IDEOGRAM 0xe5a1 - 0xe5fe +IDEOGRAM 0xe6a1 - 0xe6fe +IDEOGRAM 0xe7a1 - 0xe7fe +IDEOGRAM 0xe8a1 - 0xe8fe +IDEOGRAM 0xe9a1 - 0xe9fe +IDEOGRAM 0xeaa1 - 0xeafe +IDEOGRAM 0xeba1 - 0xebfe +IDEOGRAM 0xeca1 - 0xecfe +IDEOGRAM 0xeda1 - 0xedfe +IDEOGRAM 0xeea1 - 0xeefe +IDEOGRAM 0xefa1 - 0xeffe +IDEOGRAM 0xf0a1 - 0xf0fe +IDEOGRAM 0xf1a1 - 0xf1fe +IDEOGRAM 0xf2a1 - 0xf2fe +IDEOGRAM 0xf3a1 - 0xf3fe +IDEOGRAM 0xf4a1 - 0xf4a4 + +SWIDTH2 0xb0a1 - 0xb0fe +SWIDTH2 0xb1a1 - 0xb1fe +SWIDTH2 0xb2a1 - 0xb2fe +SWIDTH2 0xb3a1 - 0xb3fe +SWIDTH2 0xb4a1 - 0xb4fe +SWIDTH2 0xb5a1 - 0xb5fe +SWIDTH2 0xb6a1 - 0xb6fe +SWIDTH2 0xb7a1 - 0xb7fe +SWIDTH2 0xb8a1 - 0xb8fe +SWIDTH2 0xb9a1 - 0xb9fe +SWIDTH2 0xbaa1 - 0xbafe +SWIDTH2 0xbba1 - 0xbbfe +SWIDTH2 0xbca1 - 0xbcfe +SWIDTH2 0xbda1 - 0xbdfe +SWIDTH2 0xbea1 - 0xbefe +SWIDTH2 0xbfa1 - 0xbffe +SWIDTH2 0xc0a1 - 0xc0fe +SWIDTH2 0xc1a1 - 0xc1fe +SWIDTH2 0xc2a1 - 0xc2fe +SWIDTH2 0xc3a1 - 0xc3fe +SWIDTH2 0xc4a1 - 0xc4fe +SWIDTH2 0xc5a1 - 0xc5fe +SWIDTH2 0xc6a1 - 0xc6fe +SWIDTH2 0xc7a1 - 0xc7fe +SWIDTH2 0xc8a1 - 0xc8fe +SWIDTH2 0xc9a1 - 0xc9fe +SWIDTH2 0xcaa1 - 0xcafe +SWIDTH2 0xcba1 - 0xcbfe +SWIDTH2 0xcca1 - 0xccfe +SWIDTH2 0xcda1 - 0xcdfe +SWIDTH2 0xcea1 - 0xcefe +SWIDTH2 0xcfa1 - 0xcfd3 +SWIDTH2 0xd0a1 - 0xd0fe +SWIDTH2 0xd1a1 - 0xd1fe +SWIDTH2 0xd2a1 - 0xd2fe +SWIDTH2 0xd3a1 - 0xd3fe +SWIDTH2 0xd4a1 - 0xd4fe +SWIDTH2 0xd5a1 - 0xd5fe +SWIDTH2 0xd6a1 - 0xd6fe +SWIDTH2 0xd7a1 - 0xd7fe +SWIDTH2 0xd8a1 - 0xd8fe +SWIDTH2 0xd9a1 - 0xd9fe +SWIDTH2 0xdaa1 - 0xdafe +SWIDTH2 0xdba1 - 0xdbfe +SWIDTH2 0xdca1 - 0xdcfe +SWIDTH2 0xdda1 - 0xddfe +SWIDTH2 0xdea1 - 0xdefe +SWIDTH2 0xdfa1 - 0xdffe +SWIDTH2 0xe0a1 - 0xe0fe +SWIDTH2 0xe1a1 - 0xe1fe +SWIDTH2 0xe2a1 - 0xe2fe +SWIDTH2 0xe3a1 - 0xe3fe +SWIDTH2 0xe4a1 - 0xe4fe +SWIDTH2 0xe5a1 - 0xe5fe +SWIDTH2 0xe6a1 - 0xe6fe +SWIDTH2 0xe7a1 - 0xe7fe +SWIDTH2 0xe8a1 - 0xe8fe +SWIDTH2 0xe9a1 - 0xe9fe +SWIDTH2 0xeaa1 - 0xeafe +SWIDTH2 0xeba1 - 0xebfe +SWIDTH2 0xeca1 - 0xecfe +SWIDTH2 0xeda1 - 0xedfe +SWIDTH2 0xeea1 - 0xeefe +SWIDTH2 0xefa1 - 0xeffe +SWIDTH2 0xf0a1 - 0xf0fe +SWIDTH2 0xf1a1 - 0xf1fe +SWIDTH2 0xf2a1 - 0xf2fe +SWIDTH2 0xf3a1 - 0xf3fe +SWIDTH2 0xf4a1 - 0xf4a4 + +/* We don't have codeset 3 and 4. + So codeset 3 is only dummy definition + */ +PRINT 0xa1 - 0xfe +SPECIAL 0xa1 - 0xfe +SWIDTH1 0xa1 - 0xfe diff --git a/share/mklocale/kk_KZ.PT154.src b/share/mklocale/kk_KZ.PT154.src new file mode 100644 index 0000000000..c5b8898e61 --- /dev/null +++ b/share/mklocale/kk_KZ.PT154.src @@ -0,0 +1,105 @@ +/* + * LOCALE_CTYPE for PT154 character set (IANA PTCP154) + * + * $FreeBSD: head/share/mklocale/kk_KZ.PT154.src 125208 2004-01-29 16:28:22Z ache $ + */ +ENCODING "NONE" +VARIABLE PT154 character set by Birsh T + +ALPHA 'A' - 'Z' 'a' - 'z' 0x80 - 0x83 0x86 - 0x90 0x98 - 0x9f +ALPHA 0xa1 - 0xa6 0xa8 0xaa 0xad 0xaf 0xb1 - 0xb5 0xb8 0xba +ALPHA 0xbc - 0xff +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e 0x80 - 0x9f 0xa1 - 0xff +LOWER 'a' - 'z' 0x83 0x89 0x90 0x98 - 0x9f 0xa2 0xad 0xb1 +LOWER 0xb3 - 0xb5 0xb8 0xba 0xbc 0xbe 0xbf 0xe0 - 0xff +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +PUNCT 0x84 0x85 0x91 - 0x97 0xa7 0xa9 0xab 0xac 0xae 0xb0 0xb6 0xb7 +PUNCT 0xb9 0xbb +SPACE 0x09 - 0x0d 0x20 0xa0 +UPPER 'A' - 'Z' 0x80 - 0x82 0x86 - 0x88 0x8a - 0x8f 0xa1 0xa3 - 0xa6 +UPPER 0xa8 0xaa 0xaf 0xb2 0xbd 0xc0 - 0xdf +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' 0xa0 +PRINT 0x20 - 0x7e 0x80 - 0xff + +MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'a' - 'z' : 'a'> +MAPLOWER <0x80 0x90> +MAPLOWER <0x90 0x90> +MAPLOWER <0x81 0x83> +MAPLOWER <0x83 0x83> +MAPLOWER <0x82 0xad> +MAPLOWER <0xad 0xad> +MAPLOWER <0x86 0x99> +MAPLOWER <0x99 0x99> +MAPLOWER <0x87 0x89> +MAPLOWER <0x89 0x89> +MAPLOWER <0x88 0x98> +MAPLOWER <0x98 0x98> +MAPLOWER <0x8a - 0x8f : 0x9a> +MAPLOWER <0x9a - 0x9f : 0x9a> +MAPLOWER <0xa1 0xa2> +MAPLOWER <0xa2 0xa2> +MAPLOWER <0xa3 0xbc> +MAPLOWER <0xbc 0xbc> +MAPLOWER <0xa4 0xb5> +MAPLOWER <0xb5 0xb5> +MAPLOWER <0xa5 0xb4> +MAPLOWER <0xb4 0xb4> +MAPLOWER <0xa6 0xb1> +MAPLOWER <0xb1 0xb1> +MAPLOWER <0xa8 0xb8> +MAPLOWER <0xb8 0xb8> +MAPLOWER <0xaa 0xba> +MAPLOWER <0xba 0xba> +MAPLOWER <0xaf 0xbf> +MAPLOWER <0xbf 0xbf> +MAPLOWER <0xb2 0xb3> +MAPLOWER <0xb3 0xb3> +MAPLOWER <0xbd 0xbe> +MAPLOWER <0xbe 0xbe> +MAPLOWER <0xc0 - 0xdf : 0xe0> +MAPLOWER <0xe0 - 0xff : 0xe0> +MAPUPPER <'A' - 'Z' : 'A'> +MAPUPPER <'a' - 'z' : 'A'> +MAPUPPER <0x80 0x80> +MAPUPPER <0x90 0x80> +MAPUPPER <0x81 0x81> +MAPUPPER <0x83 0x81> +MAPUPPER <0x82 0x82> +MAPUPPER <0xad 0x82> +MAPUPPER <0x86 0x86> +MAPUPPER <0x99 0x86> +MAPUPPER <0x87 0x87> +MAPUPPER <0x89 0x87> +MAPUPPER <0x88 0x88> +MAPUPPER <0x98 0x88> +MAPUPPER <0x8a - 0x8f : 0x8a> +MAPUPPER <0x9a - 0x9f : 0x8a> +MAPUPPER <0xa1 0xa1> +MAPUPPER <0xa2 0xa1> +MAPUPPER <0xa3 0xa3> +MAPUPPER <0xbc 0xa3> +MAPUPPER <0xa4 0xa4> +MAPUPPER <0xb5 0xa4> +MAPUPPER <0xa5 0xa5> +MAPUPPER <0xb4 0xa5> +MAPUPPER <0xa6 0xa6> +MAPUPPER <0xb1 0xa6> +MAPUPPER <0xa8 0xa8> +MAPUPPER <0xb8 0xa8> +MAPUPPER <0xaa 0xaa> +MAPUPPER <0xba 0xaa> +MAPUPPER <0xaf 0xaf> +MAPUPPER <0xbf 0xaf> +MAPUPPER <0xb2 0xb2> +MAPUPPER <0xb3 0xb2> +MAPUPPER <0xbd 0xbd> +MAPUPPER <0xbe 0xbd> +MAPUPPER <0xc0 - 0xdf : 0xc0> +MAPUPPER <0xe0 - 0xff : 0xc0> +TODIGIT <'0' - '9' : 0> +TODIGIT <'A' - 'F' : 10> +TODIGIT <'a' - 'f' : 10> diff --git a/share/mklocale/ko_KR.CP949.src b/share/mklocale/ko_KR.CP949.src new file mode 100644 index 0000000000..9cf1bfb9c1 --- /dev/null +++ b/share/mklocale/ko_KR.CP949.src @@ -0,0 +1,188 @@ +/* + * Korean LC_CTYPE definitions using CP949 character sets + * (ko_KR.CP949.src) + * + * CP949 contains four character sets: + * + * <0x00-0x7f> ASCII equivalent + * <0xa1-0xfd><0xa1-0xfe> EUC instance of KS X 1001:2002 + * <0x81-0xa0><0x41-0xfe> Hangul syllables GAGG-JWAK + * <0xa1-0xc6><0x41-0xa0> Hangul syllables JWAT-HIH (ends with C652) + * + * $FreeBSD: head/share/mklocale/ko_KR.CP949.src 118653 2003-08-08 14:02:20Z ache $ + */ + +ENCODING "GBK" /* CP949 isn't GBK, but they have same encoding method. */ + +/* + * ASCII equivalent + */ +ALPHA 'A' - 'Z' 'a' - 'z' +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e +LOWER 'a' - 'z' +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' +PRINT 0x20 - 0x7e + +MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' > +MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' > +TODIGIT < '0' - '9' : 0 > +TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 > + +/* + * KS X 1001:2002 + */ +ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa +UPPER 0xa3c1 - 0xa3da +LOWER 0xa3e1 - 0xa3fa +PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 +PUNCT 0xa3db - 0xa3e0 0xa3fb - 0xa3fe +SPACE 0xa1a1 +BLANK 0xa1a1 +PRINT 0xa1a1 - 0xfefe +SPECIAL 0xa1a2 - 0xa2e8 0xa3b0 - 0xa3b9 + +MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > < 0xa3e1 - 0xa3fa : 0xa3e1 > +MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > < 0xa3e1 - 0xa3fa : 0xa3c1 > +TODIGIT < 0xa3b0 - 0xa3b9 : 0 > +TODIGIT < 0xa3c1 - 0xa3c6 : 10 > < 0xa3e1 - 0xa3e6 : 10 > + +UPPER 0xa5c1 - 0xa5d8 /* Greek */ +LOWER 0xa5e1 - 0xa5f8 /* Greek */ +MAPLOWER < 0xa5c1 - 0xa5d8 : 0xa5e1 > < 0xa5e1 - 0xa5f8 : 0xa5e1 > +MAPUPPER < 0xa5c1 - 0xa5d8 : 0xa5c1 > < 0xa5e1 - 0xa5f8 : 0xa5c1 > + +UPPER 0xaca1 - 0xacc1 /* Cyrillic */ +LOWER 0xacd1 - 0xacf1 /* Cyrillic */ +MAPLOWER < 0xaca1 - 0xacc1 : 0xacd1 > < 0xacd1 - 0xacf1 : 0xacd1 > +MAPUPPER < 0xaca1 - 0xacc1 : 0xaca1 > < 0xacd1 - 0xacf1 : 0xaca1 > + +SPECIAL 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* Greek Digits */ +MAPLOWER < 0xa5a1 - 0xa5aa : 0xa5a1 > < 0xa5b0 - 0xa5b9 : 0xa5a1 > +MAPUPPER < 0xa5a1 - 0xa5aa : 0xa5b0 > < 0xa5b0 - 0xa5b9 : 0xa5b0 > +SPECIAL 0xa6a1 - 0xa6e4 0xa7a1 - 0xa7ef /* Symbols */ +SPECIAL 0xa8a1 - 0xa8fe 0xa9a1 - 0xa9fe /* Circled Symbols */ + +PHONOGRAM 0xa4a1 - 0xa4fe /* Full-width Hangul glyph */ +PHONOGRAM 0xaaa1 - 0xaaf3 /* Full-width Hirakana */ +PHONOGRAM 0xaba1 - 0xabf6 /* Full-width Katakana */ + +PHONOGRAM 0xb0a1 - 0xb0fe 0xb1a1 - 0xb1fe 0xb2a1 - 0xb2fe +PHONOGRAM 0xb3a1 - 0xb3fe 0xb4a1 - 0xb4fe 0xb5a1 - 0xb5fe +PHONOGRAM 0xb6a1 - 0xb6fe 0xb7a1 - 0xb7fe 0xb8a1 - 0xb8fe +PHONOGRAM 0xb9a1 - 0xb9fe 0xbaa1 - 0xbafe 0xbba1 - 0xbbfe +PHONOGRAM 0xbca1 - 0xbcfe 0xbda1 - 0xbdfe 0xbea1 - 0xbefe +PHONOGRAM 0xbfa1 - 0xbffe 0xc0a1 - 0xc0fe 0xc1a1 - 0xc1fe +PHONOGRAM 0xc2a1 - 0xc2fe 0xc3a1 - 0xc3fe 0xc4a1 - 0xc4fe +PHONOGRAM 0xc5a1 - 0xc5fe 0xc6a1 - 0xc6fe 0xc7a1 - 0xc7fe +PHONOGRAM 0xc8a1 - 0xc8fe /* Hangul composed */ + +IDEOGRAM 0xcaa1 - 0xcafe 0xcba1 - 0xcbfe 0xcca1 - 0xccfe +IDEOGRAM 0xcda1 - 0xcdfe 0xcea1 - 0xcefe 0xcfa1 - 0xcffe +IDEOGRAM 0xd0a1 - 0xd0fe 0xd1a1 - 0xd1fe 0xd2a1 - 0xd2fe +IDEOGRAM 0xd3a1 - 0xd3fe 0xd4a1 - 0xd4fe 0xd5a1 - 0xd5fe +IDEOGRAM 0xd6a1 - 0xd6fe 0xd7a1 - 0xd7fe 0xd8a1 - 0xd8fe +IDEOGRAM 0xd9a1 - 0xd9fe 0xdaa1 - 0xdafe 0xdba1 - 0xdbfe +IDEOGRAM 0xdca1 - 0xdcfe 0xdda1 - 0xddfe 0xdea1 - 0xdefe +IDEOGRAM 0xdfa1 - 0xdffe 0xe0a1 - 0xe0fe 0xe1a1 - 0xe1fe +IDEOGRAM 0xe2a1 - 0xe2fe 0xe3a1 - 0xe3fe 0xe4a1 - 0xe4fe +IDEOGRAM 0xe5a1 - 0xe5fe 0xe6a1 - 0xe6fe 0xe7a1 - 0xe7fe +IDEOGRAM 0xe8a1 - 0xe8fe 0xe9a1 - 0xe9fe 0xeaa1 - 0xeafe +IDEOGRAM 0xeba1 - 0xebfe 0xeca1 - 0xecfe 0xeda1 - 0xedfe +IDEOGRAM 0xeea1 - 0xeefe 0xefa1 - 0xeffe 0xf0a1 - 0xf0fe +IDEOGRAM 0xf1a1 - 0xf1fe 0xf2a1 - 0xf2fe 0xf3a1 - 0xf3fe +IDEOGRAM 0xf4a1 - 0xf4fe 0xf5a1 - 0xf5fe 0xf6a1 - 0xf6fe +IDEOGRAM 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe +IDEOGRAM 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe +IDEOGRAM 0xfda1 - 0xfdfe /* Hanja */ + +/* + * Hangul syllables GAGG-JWAK + */ + +PHONOGRAM 0x8141 - 0x815a 0x8161 - 0x817a 0x8181 - 0x81fe +PHONOGRAM 0x8241 - 0x825a 0x8261 - 0x827a 0x8281 - 0x82fe +PHONOGRAM 0x8341 - 0x835a 0x8361 - 0x837a 0x8381 - 0x83fe +PHONOGRAM 0x8441 - 0x845a 0x8461 - 0x847a 0x8481 - 0x84fe +PHONOGRAM 0x8541 - 0x855a 0x8561 - 0x857a 0x8581 - 0x85fe +PHONOGRAM 0x8641 - 0x865a 0x8661 - 0x867a 0x8681 - 0x86fe +PHONOGRAM 0x8741 - 0x875a 0x8761 - 0x877a 0x8781 - 0x87fe +PHONOGRAM 0x8841 - 0x885a 0x8861 - 0x887a 0x8881 - 0x88fe +PHONOGRAM 0x8941 - 0x895a 0x8961 - 0x897a 0x8981 - 0x89fe +PHONOGRAM 0x8a41 - 0x8a5a 0x8a61 - 0x8a7a 0x8a81 - 0x8afe +PHONOGRAM 0x8b41 - 0x8b5a 0x8b61 - 0x8b7a 0x8b81 - 0x8bfe +PHONOGRAM 0x8c41 - 0x8c5a 0x8c61 - 0x8c7a 0x8c81 - 0x8cfe +PHONOGRAM 0x8d41 - 0x8d5a 0x8d61 - 0x8d7a 0x8d81 - 0x8dfe +PHONOGRAM 0x8e41 - 0x8e5a 0x8e61 - 0x8e7a 0x8e81 - 0x8efe +PHONOGRAM 0x8f41 - 0x8f5a 0x8f61 - 0x8f7a 0x8f81 - 0x8ffe +PHONOGRAM 0x9041 - 0x905a 0x9061 - 0x907a 0x9081 - 0x90fe +PHONOGRAM 0x9141 - 0x915a 0x9161 - 0x917a 0x9181 - 0x91fe +PHONOGRAM 0x9241 - 0x925a 0x9261 - 0x927a 0x9281 - 0x92fe +PHONOGRAM 0x9341 - 0x935a 0x9361 - 0x937a 0x9381 - 0x93fe +PHONOGRAM 0x9441 - 0x945a 0x9461 - 0x947a 0x9481 - 0x94fe +PHONOGRAM 0x9541 - 0x955a 0x9561 - 0x957a 0x9581 - 0x95fe +PHONOGRAM 0x9641 - 0x965a 0x9661 - 0x967a 0x9681 - 0x96fe +PHONOGRAM 0x9741 - 0x975a 0x9761 - 0x977a 0x9781 - 0x97fe +PHONOGRAM 0x9841 - 0x985a 0x9861 - 0x987a 0x9881 - 0x98fe +PHONOGRAM 0x9941 - 0x995a 0x9961 - 0x997a 0x9981 - 0x99fe +PHONOGRAM 0x9a41 - 0x9a5a 0x9a61 - 0x9a7a 0x9a81 - 0x9afe +PHONOGRAM 0x9b41 - 0x9b5a 0x9b61 - 0x9b7a 0x9b81 - 0x9bfe +PHONOGRAM 0x9c41 - 0x9c5a 0x9c61 - 0x9c7a 0x9c81 - 0x9cfe +PHONOGRAM 0x9d41 - 0x9d5a 0x9d61 - 0x9d7a 0x9d81 - 0x9dfe +PHONOGRAM 0x9e41 - 0x9e5a 0x9e61 - 0x9e7a 0x9e81 - 0x9efe +PHONOGRAM 0x9f41 - 0x9f5a 0x9f61 - 0x9f7a 0x9f81 - 0x9ffe +PHONOGRAM 0xa041 - 0xa05a 0xa061 - 0xa07a 0xa081 - 0xa0fe + +/* + * Hangul syllables JWAT-HIH + */ + +PHONOGRAM 0xa141 - 0xa15a 0xa161 - 0xa17a 0xa181 - 0xa1a0 +PHONOGRAM 0xa241 - 0xa25a 0xa261 - 0xa27a 0xa281 - 0xa2a0 +PHONOGRAM 0xa341 - 0xa35a 0xa361 - 0xa37a 0xa381 - 0xa3a0 +PHONOGRAM 0xa441 - 0xa45a 0xa461 - 0xa47a 0xa481 - 0xa4a0 +PHONOGRAM 0xa541 - 0xa55a 0xa561 - 0xa57a 0xa581 - 0xa5a0 +PHONOGRAM 0xa641 - 0xa65a 0xa661 - 0xa67a 0xa681 - 0xa6a0 +PHONOGRAM 0xa741 - 0xa75a 0xa761 - 0xa77a 0xa781 - 0xa7a0 +PHONOGRAM 0xa841 - 0xa85a 0xa861 - 0xa87a 0xa881 - 0xa8a0 +PHONOGRAM 0xa941 - 0xa95a 0xa961 - 0xa97a 0xa981 - 0xa9a0 +PHONOGRAM 0xaa41 - 0xaa5a 0xaa61 - 0xaa7a 0xaa81 - 0xaaa0 +PHONOGRAM 0xab41 - 0xab5a 0xab61 - 0xab7a 0xab81 - 0xaba0 +PHONOGRAM 0xac41 - 0xac5a 0xac61 - 0xac7a 0xac81 - 0xaca0 +PHONOGRAM 0xad41 - 0xad5a 0xad61 - 0xad7a 0xad81 - 0xada0 +PHONOGRAM 0xae41 - 0xae5a 0xae61 - 0xae7a 0xae81 - 0xaea0 +PHONOGRAM 0xaf41 - 0xaf5a 0xaf61 - 0xaf7a 0xaf81 - 0xafa0 +PHONOGRAM 0xb041 - 0xb05a 0xb061 - 0xb07a 0xb081 - 0xb0a0 +PHONOGRAM 0xb141 - 0xb15a 0xb161 - 0xb17a 0xb181 - 0xb1a0 +PHONOGRAM 0xb241 - 0xb25a 0xb261 - 0xb27a 0xb281 - 0xb2a0 +PHONOGRAM 0xb341 - 0xb35a 0xb361 - 0xb37a 0xb381 - 0xb3a0 +PHONOGRAM 0xb441 - 0xb45a 0xb461 - 0xb47a 0xb481 - 0xb4a0 +PHONOGRAM 0xb541 - 0xb55a 0xb561 - 0xb57a 0xb581 - 0xb5a0 +PHONOGRAM 0xb641 - 0xb65a 0xb661 - 0xb67a 0xb681 - 0xb6a0 +PHONOGRAM 0xb741 - 0xb75a 0xb761 - 0xb77a 0xb781 - 0xb7a0 +PHONOGRAM 0xb841 - 0xb85a 0xb861 - 0xb87a 0xb881 - 0xb8a0 +PHONOGRAM 0xb941 - 0xb95a 0xb961 - 0xb97a 0xb981 - 0xb9a0 +PHONOGRAM 0xba41 - 0xba5a 0xba61 - 0xba7a 0xba81 - 0xbaa0 +PHONOGRAM 0xbb41 - 0xbb5a 0xbb61 - 0xbb7a 0xbb81 - 0xbba0 +PHONOGRAM 0xbc41 - 0xbc5a 0xbc61 - 0xbc7a 0xbc81 - 0xbca0 +PHONOGRAM 0xbd41 - 0xbd5a 0xbd61 - 0xbd7a 0xbd81 - 0xbda0 +PHONOGRAM 0xbe41 - 0xbe5a 0xbe61 - 0xbe7a 0xbe81 - 0xbea0 +PHONOGRAM 0xbf41 - 0xbf5a 0xbf61 - 0xbf7a 0xbf81 - 0xbfa0 +PHONOGRAM 0xc041 - 0xc05a 0xc061 - 0xc07a 0xc081 - 0xc0a0 +PHONOGRAM 0xc141 - 0xc15a 0xc161 - 0xc17a 0xc181 - 0xc1a0 +PHONOGRAM 0xc241 - 0xc25a 0xc261 - 0xc27a 0xc281 - 0xc2a0 +PHONOGRAM 0xc341 - 0xc35a 0xc361 - 0xc37a 0xc381 - 0xc3a0 +PHONOGRAM 0xc441 - 0xc45a 0xc461 - 0xc47a 0xc481 - 0xc4a0 +PHONOGRAM 0xc541 - 0xc55a 0xc561 - 0xc57a 0xc581 - 0xc5a0 +PHONOGRAM 0xc641 - 0xc652 + +/* Every real-world Korean softwares process all codepoints upper than + * 0x8000 (even invalid) as one full-width character per two bytes. */ +SWIDTH2 0x8000 - 0xffff + +/* End of LC_CTYPE definition */ diff --git a/share/locale/ctype/ko_KR.eucKR.src b/share/mklocale/ko_KR.eucKR.src similarity index 78% rename from share/locale/ctype/ko_KR.eucKR.src rename to share/mklocale/ko_KR.eucKR.src index 733f6fecce..b9b2ca2b46 100644 --- a/share/locale/ctype/ko_KR.eucKR.src +++ b/share/mklocale/ko_KR.eucKR.src @@ -1,5 +1,3 @@ -/* $NetBSD: ko_KR.eucKR.src,v 1.3 2006/12/04 15:01:43 tnozaki Exp $ */ - /* * Korean LC_CTYPE definitions using EUC-KR character sets * (ko_KR.EUC.src) @@ -9,7 +7,8 @@ * Last Updated on Mar 24 1997 * * It is based on manpage mklocale(1), euc(4), ja_JP.EUC.src. - * + * + * $FreeBSD: head/share/mklocale/ko_KR.eucKR.src 156002 2006-02-25 17:12:43Z ume $ */ ENCODING "EUC" @@ -23,7 +22,7 @@ ENCODING "EUC" /* We have only codeset 1 and 2, so others are dummy. But it must be defined to work in 2.2 xpg4 locale routine... */ -VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 CODESET=eucKR +VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 /* * Code Set 1, US-ASCII equivalent @@ -51,7 +50,7 @@ TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 > */ ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa SWIDTH2 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa -DIGIT 0xa3b0 - 0xa3b9 +/* ?DIGIT 0xa3b0 - 0xa3b9 */ SWIDTH2 0xa3b0 - 0xa3b9 UPPER 0xa3c1 - 0xa3da LOWER 0xa3e1 - 0xa3fa @@ -59,11 +58,11 @@ PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe SWIDTH2 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe SPACE 0xa1a1 SWIDTH2 0xa1a1 -XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 +/* ?XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 */ BLANK 0xa1a1 PRINT 0xa1a1 - 0xfefe -SPECIAL 0xa1a2 - 0xa2e8 -SWIDTH2 0xa1a1 - 0xa2e8 +SPECIAL 0xa1a2 - 0xa2e5 +SWIDTH2 0xa1a1 - 0xa2e5 MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > < 0xa3e1 - 0xa3fa : 0xa3e1 > MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > < 0xa3b0 - 0xa3b9 : 0xa3c1 > @@ -85,10 +84,10 @@ SWIDTH2 0xacd1 - 0xacf1 /* Cyrillic */ MAPLOWER < 0xaca1 - 0xacc1 : 0xacd1 > < 0xacd1 - 0xacf1 : 0xacd1 > MAPUPPER < 0xaca1 - 0xacc1 : 0xaca1 > < 0xacd1 - 0xacf1 : 0xaca1 > -DIGIT 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* Greek Digit */ +/* ?DIGIT 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 */ /* Greek Digit */ SPECIAL 0xa6a1 - 0xa6e4 0xa7a1 - 0xa7ef /* Symbols */ SPECIAL 0xa8a1 - 0xa8fe 0xa9a1 - 0xa9fe /* Circle Symbols */ -SWIDTH2 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* Greek Digit */ +SWIDTH2 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* Greek Digit */ SWIDTH2 0xa6a1 - 0xa6e4 0xa7a1 - 0xa7ef /* Symbols */ SWIDTH2 0xa8a1 - 0xa8fe 0xa9a1 - 0xa9fe /* Circle Symbols */ @@ -138,23 +137,23 @@ IDEOGRAM 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe IDEOGRAM 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe IDEOGRAM 0xfda1 - 0xfdfe /* Hanja */ -SWIDTH2 0xcaa1 - 0xcafe 0xcba1 - 0xcbfe 0xcca1 - 0xccfe -SWIDTH2 0xcda1 - 0xcdfe 0xcea1 - 0xcefe 0xcfa1 - 0xcffe -SWIDTH2 0xd0a1 - 0xd0fe 0xd1a1 - 0xd1fe 0xd2a1 - 0xd2fe -SWIDTH2 0xd3a1 - 0xd3fe 0xd4a1 - 0xd4fe 0xd5a1 - 0xd5fe -SWIDTH2 0xd6a1 - 0xd6fe 0xd7a1 - 0xd7fe 0xd8a1 - 0xd8fe -SWIDTH2 0xd9a1 - 0xd9fe 0xdaa1 - 0xdafe 0xdba1 - 0xdbfe -SWIDTH2 0xdca1 - 0xdcfe 0xdda1 - 0xddfe 0xdea1 - 0xdefe -SWIDTH2 0xdfa1 - 0xdffe 0xe0a1 - 0xe0fe 0xe1a1 - 0xe1fe -SWIDTH2 0xe2a1 - 0xe2fe 0xe3a1 - 0xe3fe 0xe4a1 - 0xe4fe -SWIDTH2 0xe5a1 - 0xe5fe 0xe6a1 - 0xe6fe 0xe7a1 - 0xe7fe -SWIDTH2 0xe8a1 - 0xe8fe 0xe9a1 - 0xe9fe 0xeaa1 - 0xeafe -SWIDTH2 0xeba1 - 0xebfe 0xeca1 - 0xecfe 0xeda1 - 0xedfe -SWIDTH2 0xeea1 - 0xeefe 0xefa1 - 0xeffe 0xf0a1 - 0xf0fe -SWIDTH2 0xf1a1 - 0xf1fe 0xf2a1 - 0xf2fe 0xf3a1 - 0xf3fe -SWIDTH2 0xf4a1 - 0xf4fe 0xf5a1 - 0xf5fe 0xf6a1 - 0xf6fe -SWIDTH2 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe -SWIDTH2 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe +SWIDTH2 0xcaa1 - 0xcafe 0xcba1 - 0xcbfe 0xcca1 - 0xccfe +SWIDTH2 0xcda1 - 0xcdfe 0xcea1 - 0xcefe 0xcfa1 - 0xcffe +SWIDTH2 0xd0a1 - 0xd0fe 0xd1a1 - 0xd1fe 0xd2a1 - 0xd2fe +SWIDTH2 0xd3a1 - 0xd3fe 0xd4a1 - 0xd4fe 0xd5a1 - 0xd5fe +SWIDTH2 0xd6a1 - 0xd6fe 0xd7a1 - 0xd7fe 0xd8a1 - 0xd8fe +SWIDTH2 0xd9a1 - 0xd9fe 0xdaa1 - 0xdafe 0xdba1 - 0xdbfe +SWIDTH2 0xdca1 - 0xdcfe 0xdda1 - 0xddfe 0xdea1 - 0xdefe +SWIDTH2 0xdfa1 - 0xdffe 0xe0a1 - 0xe0fe 0xe1a1 - 0xe1fe +SWIDTH2 0xe2a1 - 0xe2fe 0xe3a1 - 0xe3fe 0xe4a1 - 0xe4fe +SWIDTH2 0xe5a1 - 0xe5fe 0xe6a1 - 0xe6fe 0xe7a1 - 0xe7fe +SWIDTH2 0xe8a1 - 0xe8fe 0xe9a1 - 0xe9fe 0xeaa1 - 0xeafe +SWIDTH2 0xeba1 - 0xebfe 0xeca1 - 0xecfe 0xeda1 - 0xedfe +SWIDTH2 0xeea1 - 0xeefe 0xefa1 - 0xeffe 0xf0a1 - 0xf0fe +SWIDTH2 0xf1a1 - 0xf1fe 0xf2a1 - 0xf2fe 0xf3a1 - 0xf3fe +SWIDTH2 0xf4a1 - 0xf4fe 0xf5a1 - 0xf5fe 0xf6a1 - 0xf6fe +SWIDTH2 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe +SWIDTH2 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe SWIDTH2 0xfda1 - 0xfdfe /* Hanja */ /* We don't have codeset 3 and 4. diff --git a/share/locale/ctype/en_US.ISO_8859-1.src b/share/mklocale/la_LN.ISO8859-1.src similarity index 78% copy from share/locale/ctype/en_US.ISO_8859-1.src copy to share/mklocale/la_LN.ISO8859-1.src index b029dbb417..f889de5458 100644 --- a/share/locale/ctype/en_US.ISO_8859-1.src +++ b/share/mklocale/la_LN.ISO8859-1.src @@ -1,14 +1,14 @@ -/* $NetBSD: en_US.ISO_8859-1.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* - * Standard LOCALE_CTYPE for the iso_8859_1 Locale + * Standard LOCALE_CTYPE for the ISO 8859-1 Locale + * + * $FreeBSD: head/share/mklocale/la_LN.ISO8859-1.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Latin-1 character set, CODESET=ISO8859-1 +VARIABLE ISO 8859-1 Latin-1 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' @@ -20,10 +20,6 @@ UPPER 'A' - 'Z' 0xc0 - 0xd6 0xd8 - 0xde XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -31,12 +27,14 @@ MAPLOWER <0xc0 - 0xd6 : 0xe0> MAPLOWER <0xd8 - 0xde : 0xf8> MAPLOWER <0xdf - 0xf6 : 0xdf> MAPLOWER <0xf8 - 0xff : 0xf8> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xc0 - 0xd6 : 0xc0> MAPUPPER <0xd8 - 0xde : 0xd8> MAPUPPER <0xe0 - 0xf6 : 0xc0> MAPUPPER <0xf8 - 0xfe : 0xd8> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/lt_LT.ISO8859-13.src b/share/mklocale/la_LN.ISO8859-13.src similarity index 79% rename from share/locale/ctype/lt_LT.ISO8859-13.src rename to share/mklocale/la_LN.ISO8859-13.src index dc63a82488..aa761eeccb 100644 --- a/share/locale/ctype/lt_LT.ISO8859-13.src +++ b/share/mklocale/la_LN.ISO8859-13.src @@ -1,17 +1,15 @@ -/* $NetBSD: lt_LT.ISO8859-13.src,v 1.3 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for the iso_8859_13 Locale * - * FreeBSD: src/share/mklocale/lt_LT.ISO8859-13.src,v 1.1 2002/10/25 22:02:09 ache Exp + * $FreeBSD: head/share/mklocale/la_LN.ISO8859-13.src 196790 2009-09-03 17:12:45Z ache $ */ ENCODING "NONE" -VARIABLE ISO 8859-13 Latin-7 character set, CODESET=ISO8859-13 +VARIABLE ISO 8859-13 Latin-7 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' ALPHA 0xaa 0xba 0xc0 - 0xd6 0xd8 - 0xde 0xe0 - 0xf6 0xf8 - 0xfe CONTROL 0x00 - 0x1f 0x7f - 0x9f @@ -27,7 +25,6 @@ UPPER 0xaa 0xc0 - 0xd6 0xd8 - 0xde XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> diff --git a/share/locale/ctype/en_US.DIS_8859-15.src b/share/mklocale/la_LN.ISO8859-15.src similarity index 80% rename from share/locale/ctype/en_US.DIS_8859-15.src rename to share/mklocale/la_LN.ISO8859-15.src index 7f721e00e7..79c699c987 100644 --- a/share/locale/ctype/en_US.DIS_8859-15.src +++ b/share/mklocale/la_LN.ISO8859-15.src @@ -1,14 +1,14 @@ -/* $NetBSD: en_US.DIS_8859-15.src,v 1.5 2004/06/24 03:28:50 itojun Exp $ */ - /* - * Standard LOCALE_CTYPE for the dis_8859_15 Locale + * Standard LOCALE_CTYPE for the ISO 8859-15 Locale + * + * $FreeBSD: head/share/mklocale/la_LN.ISO8859-15.src 97782 2002-06-03 21:30:28Z tobez $ */ ENCODING "NONE" -VARIABLE Latin-9 character set, CODESET=ISO8859-15 +VARIABLE ISO 8859-15 Latin-9 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xa6 0xa8 0xb4 0xb8 0xbc - 0xbe 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' @@ -20,10 +20,6 @@ UPPER 'A' - 'Z' 0xa6 0xb4 0xbc 0xbe 0xc0 - 0xd6 0xd8 - 0xde XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -35,6 +31,7 @@ MAPLOWER <0xc0 - 0xd6 : 0xe0> MAPLOWER <0xd8 - 0xde : 0xf8> MAPLOWER <0xdf - 0xf6 : 0xdf> MAPLOWER <0xf8 - 0xff : 0xf8> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xa8 - 0xa8 : 0xa6> @@ -45,6 +42,7 @@ MAPUPPER <0xd8 - 0xde : 0xd8> MAPUPPER <0xe0 - 0xf6 : 0xc0> MAPUPPER <0xf8 - 0xfe : 0xd8> MAPUPPER <0xff - 0xff : 0xbe> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/en_US.ISO_8859-2.src b/share/mklocale/la_LN.ISO8859-2.src similarity index 66% rename from share/locale/ctype/en_US.ISO_8859-2.src rename to share/mklocale/la_LN.ISO8859-2.src index 5ec8d6a133..060e360a88 100644 --- a/share/locale/ctype/en_US.ISO_8859-2.src +++ b/share/mklocale/la_LN.ISO8859-2.src @@ -1,39 +1,35 @@ -/* $NetBSD: en_US.ISO_8859-2.src,v 1.5 2005/03/08 06:35:13 tshiozak Exp $ */ - /* * LOCALE_CTYPE for the iso_8859_2 Locale + * + * $FreeBSD: head/share/mklocale/la_LN.ISO8859-2.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Latin-2 character set, CODESET=ISO8859-2 +VARIABLE ISO 8859-2 Latin-2 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' - 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae 0xaf - 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf - 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xfe +ALPHA 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae 0xaf +ALPHA 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf +ALPHA 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xfe CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' -GRAPH 0x21 - 0x7e 0xa0 - 0xff +GRAPH 0x21 - 0x7e 0xa1 - 0xff LOWER 'a' - 'z' - 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf - 0xdf - 0xf6 0xf8 - 0xfe +LOWER 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf +LOWER 0xdf - 0xf6 0xf8 - 0xfe PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e - 0xa2 0xa4 0xa7 0xa8 0xad 0xb0 0xb2 0xb4 0xb7 0xb8 0xbd - 0xd7 0xf7 0xff +PUNCT 0xa2 0xa4 0xa7 0xa8 0xad 0xb0 0xb2 0xb4 0xb7 0xb8 0xbd +PUNCT 0xd7 0xf7 0xff SPACE 0x09 - 0x0d 0x20 0xa0 UPPER 'A' - 'Z' - 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae 0xaf - 0xc0 - 0xd6 0xd8 - 0xde -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +UPPER 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae 0xaf +UPPER 0xc0 - 0xd6 0xd8 - 0xde +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -55,6 +51,7 @@ MAPLOWER <0xc0 - 0xd6 : 0xe0> MAPLOWER <0xd8 - 0xde : 0xf8> MAPLOWER <0xdf - 0xf6 : 0xdf> MAPLOWER <0xf8 - 0xfe : 0xf8> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xa1 0xa1> @@ -75,6 +72,7 @@ MAPUPPER <0xc0 - 0xd6 : 0xc0> MAPUPPER <0xd8 - 0xdf : 0xd8> MAPUPPER <0xe0 - 0xf6 : 0xc0> MAPUPPER <0xf8 - 0xfe : 0xd8> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/en_US.ISO_8859-4.src b/share/mklocale/la_LN.ISO8859-4.src similarity index 69% rename from share/locale/ctype/en_US.ISO_8859-4.src rename to share/mklocale/la_LN.ISO8859-4.src index 939ff3a0c5..153fc48b17 100644 --- a/share/locale/ctype/en_US.ISO_8859-4.src +++ b/share/mklocale/la_LN.ISO8859-4.src @@ -1,38 +1,34 @@ -/* $NetBSD: en_US.ISO_8859-4.src,v 1.5 2005/03/08 06:35:13 tshiozak Exp $ */ - /* * LOCALE_CTYPE for the iso_8859_4 Locale + * + * $FreeBSD: head/share/mklocale/la_LN.ISO8859-4.src 87109 2001-11-30 05:24:09Z ache $ */ ENCODING "NONE" -VARIABLE Latin-4 character set, CODESET=ISO8859-4 +VARIABLE ISO 8859-4 Latin-4 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' - 0xa1 - 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae - 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xd6 0xd8 - 0xf6 0xf8 - 0xfe +ALPHA 0xa1 - 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae +ALPHA 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xd6 0xd8 - 0xf6 0xf8 - 0xfe CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' -GRAPH 0x21 - 0x7e 0xa0 - 0xff +GRAPH 0x21 - 0x7e 0xa1 - 0xff LOWER 'a' - 'z' - 0xa2 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf - 0xdf - 0xf6 0xf8 - 0xfe +LOWER 0xa2 0xb1 0xb3 0xb5 0xb6 0xb9 - 0xbc 0xbe 0xbf +LOWER 0xdf - 0xf6 0xf8 - 0xfe PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e - 0xa4 0xa7 0xa8 0xad 0xaf 0xb0 0xb2 0xb4 0xb7 0xb8 - 0xd7 0xf7 0xff +PUNCT 0xa4 0xa7 0xa8 0xad 0xaf 0xb0 0xb2 0xb4 0xb7 0xb8 +PUNCT 0xd7 0xf7 0xff SPACE 0x09 - 0x0d 0x20 0xa0 UPPER 'A' - 'Z' - 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae - 0xc0 - 0xd6 0xd8 - 0xde -XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +UPPER 0xa1 0xa3 0xa5 0xa6 0xa9 - 0xac 0xae +UPPER 0xc0 - 0xd6 0xd8 - 0xde +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -55,6 +51,7 @@ MAPLOWER <0xc0 - 0xd6 : 0xe0> MAPLOWER <0xd8 - 0xde : 0xf8> MAPLOWER <0xdf - 0xf6 : 0xdf> MAPLOWER <0xf8 - 0xfe : 0xf8> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xa1 0xa1> @@ -75,6 +72,7 @@ MAPUPPER <0xc0 - 0xd6 : 0xc0> MAPUPPER <0xd8 - 0xde : 0xd8> MAPUPPER <0xe0 - 0xf6 : 0xc0> MAPUPPER <0xf8 - 0xfe : 0xd8> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/en_US.ASCII.src b/share/mklocale/la_LN.US-ASCII.src similarity index 66% rename from share/locale/ctype/en_US.ASCII.src rename to share/mklocale/la_LN.US-ASCII.src index cf732ff65b..6a065637fe 100644 --- a/share/locale/ctype/en_US.ASCII.src +++ b/share/mklocale/la_LN.US-ASCII.src @@ -1,10 +1,10 @@ -/* $NetBSD: en_US.ASCII.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* - * Standard LOCALE_CTYPE for the ASCII Locale + * Standard LOCALE_CTYPE for the US-ASCII Locale + * + * $FreeBSD: head/share/mklocale/la_LN.US-ASCII.src 175588 2008-01-23 04:25:10Z ache $ */ -ENCODING "NONE" -VARIABLE Strict 7bit ASCII locale, CODESET=646 +ENCODING "ASCII" +VARIABLE Strict 7bit US-ASCII locale ALPHA 'A' - 'Z' 'a' - 'z' CONTROL 0x00 - 0x1f 0x7f @@ -17,15 +17,13 @@ UPPER 'A' - 'Z' XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' PRINT 0x20 - 0x7e -SWIDTH1 0x20 - 0x7e -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/ru_RU.CP866.src b/share/mklocale/ru_RU.CP866.src similarity index 50% rename from share/locale/ctype/ru_RU.CP866.src rename to share/mklocale/ru_RU.CP866.src index 72afc75b74..1962b293e6 100644 --- a/share/locale/ctype/ru_RU.CP866.src +++ b/share/mklocale/ru_RU.CP866.src @@ -1,45 +1,56 @@ -/* $NetBSD: ru_RU.CP866.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for Russian Alternative character set (CP866) + * + * $FreeBSD: head/share/mklocale/ru_RU.CP866.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Russian Alternative charset, CODESET=CP866 +VARIABLE Russian Alternative code table (CP866) by -/* - * This is a comment - */ -ALPHA 'A' - 'Z' 'a' - 'z' 0x80 - 0xaf 0xe0 - 0xf1 +# +# This is a comment +# +ALPHA 'A' - 'Z' 'a' - 'z' 0x80 - 0xaf 0xe0 - 0xf7 CONTROL 0x00 - 0x1f 0x7f DIGIT '0' - '9' -GRAPH 0x21 - 0x7e 0x80 - 0xff -LOWER 'a' - 'z' 0xa0 - 0xaf 0xe0 - 0xef 0xf1 +GRAPH 0x21 - 0x7e 0x80 - 0xfe +LOWER 'a' - 'z' 0xa0 - 0xaf 0xe0 - 0xef 0xf1 0xf3 0xf5 0xf7 PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e -SPACE 0x09 - 0x0d 0x20 -UPPER 'A' - 'Z' 0x80 - 0x9f 0xf0 +PUNCT 0xb0 - 0xdf 0xf8 - 0xfe +SPACE 0x09 - 0x0d 0x20 0xff +UPPER 'A' - 'Z' 0x80 - 0x9f 0xf0 0xf2 0xf4 0xf6 XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' -BLANK ' ' '\t' +BLANK ' ' '\t' 0xff PRINT 0x20 - 0x7e 0x80 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> MAPLOWER <0x80 - 0x8f : 0xa0> MAPLOWER <0x90 - 0x9f : 0xe0> -MAPLOWER <0xf0 0xf1> MAPLOWER <0xa0 - 0xaf : 0xa0> MAPLOWER <0xe0 - 0xef : 0xe0> +MAPLOWER <0xf0 0xf1> MAPLOWER <0xf1 0xf1> +MAPLOWER <0xf2 0xf3> +MAPLOWER <0xf3 0xf3> +MAPLOWER <0xf4 0xf5> +MAPLOWER <0xf5 0xf5> +MAPLOWER <0xf6 0xf7> +MAPLOWER <0xf7 0xf7> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0x80 - 0x9f : 0x80> -MAPUPPER <0xf0 0xf0> MAPUPPER <0xa0 - 0xaf : 0x80> MAPUPPER <0xe0 - 0xef : 0x90> +MAPUPPER <0xf0 0xf0> MAPUPPER <0xf1 0xf0> +MAPUPPER <0xf2 0xf2> +MAPUPPER <0xf3 0xf2> +MAPUPPER <0xf4 0xf4> +MAPUPPER <0xf5 0xf4> +MAPUPPER <0xf6 0xf6> +MAPUPPER <0xf7 0xf6> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/mklocale/ru_RU.ISO8859-5.src b/share/mklocale/ru_RU.ISO8859-5.src new file mode 100644 index 0000000000..4f822b7ba5 --- /dev/null +++ b/share/mklocale/ru_RU.ISO8859-5.src @@ -0,0 +1,46 @@ +/* + * LOCALE_CTYPE for ISO8859-5 set + * + * $FreeBSD: head/share/mklocale/ru_RU.ISO8859-5.src 88313 2001-12-20 20:33:30Z ache $ + */ + +ENCODING "NONE" +VARIABLE ISO8859-5 charset, initially submitted by + +ALPHA 'A' - 'Z' 'a' - 'z' +ALPHA 0xa1 - 0xac 0xae - 0xef 0xf1 - 0xfc 0xfe 0xff +BLANK ' ' '\t' 0xa0 +CONTROL 0x00 - 0x1f 0x7f - 0x9f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e 0xa1 - 0xff +LOWER 'a' - 'z' +LOWER 0xd0 - 0xef 0xf1 - 0xfc 0xfe 0xff +PRINT 0x20 - 0x7e 0xa0 - 0xff +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +PUNCT 0xad 0xf0 0xfd +SPACE 0x09 - 0x0d 0x20 0xa0 +UPPER 'A' - 'Z' +UPPER 0xa1 - 0xac 0xae - 0xcf +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' + +MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'a' - 'z' : 'a'> +MAPLOWER <0xb0 - 0xcf : 0xd0> +MAPLOWER <0xd0 - 0xef : 0xd0> +MAPLOWER <0xa1 - 0xac : 0xf1> +MAPLOWER <0xf1 - 0xfc : 0xf1> +MAPLOWER <0xae - 0xaf : 0xfe> +MAPLOWER <0xfe - 0xff : 0xfe> + +MAPUPPER <'A' - 'Z' : 'A'> +MAPUPPER <'a' - 'z' : 'A'> +MAPUPPER <0xb0 - 0xcf : 0xb0> +MAPUPPER <0xd0 - 0xef : 0xb0> +MAPUPPER <0xa1 - 0xac : 0xa1> +MAPUPPER <0xf1 - 0xfc : 0xa1> +MAPUPPER <0xae - 0xaf : 0xae> +MAPUPPER <0xfe - 0xff : 0xae> + +TODIGIT <'0' - '9' : 0> +TODIGIT <'A' - 'F' : 10> +TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/ru_RU.KOI8-R.src b/share/mklocale/ru_RU.KOI8-R.src similarity index 81% rename from share/locale/ctype/ru_RU.KOI8-R.src rename to share/mklocale/ru_RU.KOI8-R.src index e1e8609a65..c3ad7f874e 100644 --- a/share/locale/ctype/ru_RU.KOI8-R.src +++ b/share/mklocale/ru_RU.KOI8-R.src @@ -1,14 +1,14 @@ -/* $NetBSD: ru_RU.KOI8-R.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for Russian koi8-r character set (RFC1489) + * + * $FreeBSD: head/share/mklocale/ru_RU.KOI8-R.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Russian CODESET=KOI8-R +VARIABLE Russian KOI8-R character set by -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xa3 0xb3 0xc0 - 0xff CONTROL 0x00 - 0x1f 0x7f DIGIT '0' - '9' @@ -20,10 +20,6 @@ UPPER 'A' - 'Z' 0xb3 0xe0 - 0xff XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0x9a PRINT 0x20 - 0x7e 0x80 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -31,12 +27,14 @@ MAPLOWER <0xb3 0xa3> MAPLOWER <0xa3 0xa3> MAPLOWER <0xe0 - 0xff : 0xc0> MAPLOWER <0xc0 - 0xdf : 0xc0> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xb3 0xb3> MAPUPPER <0xa3 0xb3> MAPUPPER <0xe0 - 0xff : 0xe0> MAPUPPER <0xc0 - 0xdf : 0xe0> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/en_US.ISO_8859-1.src b/share/mklocale/tr_TR.ISO8859-9.src similarity index 59% rename from share/locale/ctype/en_US.ISO_8859-1.src rename to share/mklocale/tr_TR.ISO8859-9.src index b029dbb417..dc95096dee 100644 --- a/share/locale/ctype/en_US.ISO_8859-1.src +++ b/share/mklocale/tr_TR.ISO8859-9.src @@ -1,14 +1,14 @@ -/* $NetBSD: en_US.ISO_8859-1.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* - * Standard LOCALE_CTYPE for the iso_8859_1 Locale + * Standard LOCALE_CTYPE for the ISO 8859-9 Locale + * + * $FreeBSD: head/share/mklocale/tr_TR.ISO8859-9.src 174904 2007-12-25 20:30:36Z ache $ */ ENCODING "NONE" -VARIABLE Latin-1 character set, CODESET=ISO8859-1 +VARIABLE ISO 8859-9 Latin-5 character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff CONTROL 0x00 - 0x1f 0x7f - 0x9f DIGIT '0' - '9' @@ -20,23 +20,29 @@ UPPER 'A' - 'Z' 0xc0 - 0xd6 0xd8 - 0xde XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0xa0 PRINT 0x20 - 0x7e 0xa0 - 0xff -SWIDTH1 0x20 - 0x7e 0xa0 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ -MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'A' - 'H' : 'a'> +MAPLOWER <'I' 0xfd> +MAPLOWER <'J' - 'Z' : 'j'> MAPLOWER <'a' - 'z' : 'a'> MAPLOWER <0xc0 - 0xd6 : 0xe0> -MAPLOWER <0xd8 - 0xde : 0xf8> +MAPLOWER <0xd8 - 0xdc : 0xf8> +MAPLOWER <0xdd 'i'> +MAPLOWER <0xde 0xfe> MAPLOWER <0xdf - 0xf6 : 0xdf> MAPLOWER <0xf8 - 0xff : 0xf8> + MAPUPPER <'A' - 'Z' : 'A'> -MAPUPPER <'a' - 'z' : 'A'> +MAPUPPER <'a' - 'h' : 'A'> +MAPUPPER <'i' 0xdd> +MAPUPPER <'j' - 'z' : 'J'> MAPUPPER <0xc0 - 0xd6 : 0xc0> MAPUPPER <0xd8 - 0xde : 0xd8> MAPUPPER <0xe0 - 0xf6 : 0xc0> -MAPUPPER <0xf8 - 0xfe : 0xd8> +MAPUPPER <0xf8 - 0xfc : 0xd8> +MAPUPPER <0xfd 'I'> +MAPUPPER <0xfe 0xde> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/locale/ctype/uk_UA.KOI8-U.src b/share/mklocale/uk_UA.KOI8-U.src similarity index 81% rename from share/locale/ctype/uk_UA.KOI8-U.src rename to share/mklocale/uk_UA.KOI8-U.src index 2d6cc0e567..04f7bcc50f 100644 --- a/share/locale/ctype/uk_UA.KOI8-U.src +++ b/share/mklocale/uk_UA.KOI8-U.src @@ -1,16 +1,14 @@ -/* $NetBSD: uk_UA.KOI8-U.src,v 1.4 2004/06/24 03:28:50 itojun Exp $ */ - /* * LOCALE_CTYPE for Ukrainian koi8-u character set (RFC2319) * - * $FreeBSD: src/share/mklocale/uk_UA.KOI8-U.src,v 1.1 1999/10/18 21:49:02 ache Exp $ + * $FreeBSD: head/share/mklocale/uk_UA.KOI8-U.src 87108 2001-11-30 05:05:53Z ache $ */ ENCODING "NONE" -VARIABLE Ukrainian CODESET=KOI8-U character set +VARIABLE Ukrainian koi8-u character set -/* - * This is a comment - */ +# +# This is a comment +# ALPHA 'A' - 'Z' 'a' - 'z' 0xa3 0xb3 0xa4 0xb4 0xa6 0xb6 0xa7 0xb7 0xad 0xbd 0xc0 - 0xff CONTROL 0x00 - 0x1f 0x7f DIGIT '0' - '9' @@ -22,10 +20,6 @@ UPPER 'A' - 'Z' 0xb3 0xb4 0xb6 0xb7 0xbd 0xe0 - 0xff XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' BLANK ' ' '\t' 0x9a PRINT 0x20 - 0x7e 0x80 - 0xff -SWIDTH1 0x20 - 0x7e 0x80 - 0xff -/* IDEOGRAM */ -/* SPECIAL */ -/* PHONEGRAM */ MAPLOWER <'A' - 'Z' : 'a'> MAPLOWER <'a' - 'z' : 'a'> @@ -41,6 +35,7 @@ MAPLOWER <0xbd 0xad> MAPLOWER <0xad 0xad> MAPLOWER <0xe0 - 0xff : 0xc0> MAPLOWER <0xc0 - 0xdf : 0xc0> + MAPUPPER <'A' - 'Z' : 'A'> MAPUPPER <'a' - 'z' : 'A'> MAPUPPER <0xb3 0xb3> @@ -55,6 +50,7 @@ MAPUPPER <0xbd 0xbd> MAPUPPER <0xad 0xbd> MAPUPPER <0xe0 - 0xff : 0xe0> MAPUPPER <0xc0 - 0xdf : 0xe0> + TODIGIT <'0' - '9' : 0> TODIGIT <'A' - 'F' : 10> TODIGIT <'a' - 'f' : 10> diff --git a/share/mklocale/zh_CN.GB18030.src b/share/mklocale/zh_CN.GB18030.src new file mode 100644 index 0000000000..f90cd28e38 --- /dev/null +++ b/share/mklocale/zh_CN.GB18030.src @@ -0,0 +1,7100 @@ +/* + * This code is ported to FreeBSD by a group of Chinese FreeBSD Enthusiast: + * Robin Hu + * Kang Liu + * Xin Li + * Shen Chuan-Hsing + * + * Copyright (c)2003 Citrus Project, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/share/mklocale/zh_CN.GB18030.src 119246 2003-08-21 19:23:15Z ache $ + */ + +ENCODING "GB18030" + +/* + * ASCII compatible + */ +ALPHA 'A' - 'Z' 'a' - 'z' +BLANK ' ' '\t' '\v' +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e +LOWER 'a' - 'z' +MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' > +MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' > +PRINT 0x20 - 0x7e +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 +TODIGIT < '0' - '9' : 0 > +TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 > +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +/* + * GBK compatible + */ +ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa +ALPHA 0xa6a1 - 0xa6b8 0xa6c1 - 0xa6d8 +ALPHA 0xa7a1 - 0xa7c1 0xa7d1 - 0xa7f1 +ALPHA 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 +BLANK 0xa1a1 +GRAPH 0xa140 - 0xa17e 0xa180 - 0xa1a0 0xa1a9 +GRAPH 0xa240 - 0xa27e 0xa280 - 0xa2a0 0xa2ab - 0xa2b0 0xa2e4 0xa2ef 0xa2f0 0xa2fd 0xa2fe +GRAPH 0xa340 - 0xa37e 0xa380 - 0xa3a0 +GRAPH 0xa440 - 0xa47e 0xa480 - 0xa4a0 0xa4f4 - 0xa4fe +GRAPH 0xa540 - 0xa57e 0xa580 - 0xa5a0 0xa5f7 - 0xa5fe +GRAPH 0xa640 - 0xa67e 0xa680 - 0xa6a0 0xa6b9 - 0xa6c0 0xa6d9 - 0xa6df 0xa6ec 0xa6ed 0xa6f3 0xa6f6 - 0xa6fe +GRAPH 0xa740 - 0xa77e 0xa780 - 0xa7a0 0xa7c2 - 0xa7d0 0xa7f2 - 0xa7fe +GRAPH 0xa896 - 0xa8a0 0xa8bc 0xa8c1 - 0xa8fe +GRAPH 0xa958 0xa95b 0xa95d - 0xa960 0xa963 0xa964 0xa966 0xa967 0xa997 - 0xa9a3 0xa9f0 - 0xa9fe +GRAPH 0xaaa1 - 0xaafe +GRAPH 0xaba1 - 0xabfe +GRAPH 0xaca1 - 0xacfe +GRAPH 0xada1 - 0xadfe +GRAPH 0xaea1 - 0xaefe +GRAPH 0xafa1 - 0xaffe +GRAPH 0xd7fa - 0xd7fe +GRAPH 0xf8a1 - 0xf8fe +GRAPH 0xf9a1 - 0xf9fe +GRAPH 0xfaa1 - 0xfafe +GRAPH 0xfba1 - 0xfbfe +GRAPH 0xfca1 - 0xfcfe +GRAPH 0xfda1 - 0xfdfe +GRAPH 0xfe51 - 0xfe53 0xfe59 0xfe61 0xfe66 0xfe67 0xfe6c 0xfe6d 0xfe76 0xfe7e 0xfe90 0xfe91 0xfea0 - 0xfefe +IDEOGRAM 0x8140 - 0x817e 0x8180 - 0x81fe +IDEOGRAM 0x8240 - 0x827e 0x8280 - 0x82fe +IDEOGRAM 0x8340 - 0x837e 0x8380 - 0x83fe +IDEOGRAM 0x8440 - 0x847e 0x8480 - 0x84fe +IDEOGRAM 0x8540 - 0x857e 0x8580 - 0x85fe +IDEOGRAM 0x8640 - 0x867e 0x8680 - 0x86fe +IDEOGRAM 0x8740 - 0x877e 0x8780 - 0x87fe +IDEOGRAM 0x8840 - 0x887e 0x8880 - 0x88fe +IDEOGRAM 0x8940 - 0x897e 0x8980 - 0x89fe +IDEOGRAM 0x8a40 - 0x8a7e 0x8a80 - 0x8afe +IDEOGRAM 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe +IDEOGRAM 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe +IDEOGRAM 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe +IDEOGRAM 0x8e40 - 0x8e7e 0x8e80 - 0x8efe +IDEOGRAM 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe +IDEOGRAM 0x9040 - 0x907e 0x9080 - 0x90fe +IDEOGRAM 0x9140 - 0x917e 0x9180 - 0x91fe +IDEOGRAM 0x9240 - 0x927e 0x9280 - 0x92fe +IDEOGRAM 0x9340 - 0x937e 0x9380 - 0x93fe +IDEOGRAM 0x9440 - 0x947e 0x9480 - 0x94fe +IDEOGRAM 0x9540 - 0x957e 0x9580 - 0x95fe +IDEOGRAM 0x9640 - 0x967e 0x9680 - 0x96fe +IDEOGRAM 0x9740 - 0x977e 0x9780 - 0x97fe +IDEOGRAM 0x9840 - 0x987e 0x9880 - 0x98fe +IDEOGRAM 0x9940 - 0x997e 0x9980 - 0x99fe +IDEOGRAM 0x9a40 - 0x9a7e 0x9a80 - 0x9afe +IDEOGRAM 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe +IDEOGRAM 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe +IDEOGRAM 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe +IDEOGRAM 0x9e40 - 0x9e7e 0x9e80 - 0x9efe +IDEOGRAM 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe +IDEOGRAM 0xa040 - 0xa07e 0xa080 - 0xa0fe +IDEOGRAM 0xa965 +IDEOGRAM 0xaa40 - 0xaa7e 0xaa80 - 0xaaa0 +IDEOGRAM 0xab40 - 0xab7e 0xab80 - 0xaba0 +IDEOGRAM 0xac40 - 0xac7e 0xac80 - 0xaca0 +IDEOGRAM 0xad40 - 0xad7e 0xad80 - 0xada0 +IDEOGRAM 0xae40 - 0xae7e 0xae80 - 0xaea0 +IDEOGRAM 0xaf40 - 0xaf7e 0xaf80 - 0xafa0 +IDEOGRAM 0xb040 - 0xb07e 0xb080 - 0xb0fe +IDEOGRAM 0xb140 - 0xb17e 0xb180 - 0xb1fe +IDEOGRAM 0xb240 - 0xb27e 0xb280 - 0xb2fe +IDEOGRAM 0xb340 - 0xb37e 0xb380 - 0xb3fe +IDEOGRAM 0xb440 - 0xb47e 0xb480 - 0xb4fe +IDEOGRAM 0xb540 - 0xb57e 0xb580 - 0xb5fe +IDEOGRAM 0xb640 - 0xb67e 0xb680 - 0xb6fe +IDEOGRAM 0xb740 - 0xb77e 0xb780 - 0xb7fe +IDEOGRAM 0xb840 - 0xb87e 0xb880 - 0xb8fe +IDEOGRAM 0xb940 - 0xb97e 0xb980 - 0xb9fe +IDEOGRAM 0xba40 - 0xba7e 0xba80 - 0xbafe +IDEOGRAM 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe +IDEOGRAM 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe +IDEOGRAM 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe +IDEOGRAM 0xbe40 - 0xbe7e 0xbe80 - 0xbefe +IDEOGRAM 0xbf40 - 0xbf7e 0xbf80 - 0xbffe +IDEOGRAM 0xc040 - 0xc07e 0xc080 - 0xc0fe +IDEOGRAM 0xc140 - 0xc17e 0xc180 - 0xc1fe +IDEOGRAM 0xc240 - 0xc27e 0xc280 - 0xc2fe +IDEOGRAM 0xc340 - 0xc37e 0xc380 - 0xc3fe +IDEOGRAM 0xc440 - 0xc47e 0xc480 - 0xc4fe +IDEOGRAM 0xc540 - 0xc57e 0xc580 - 0xc5fe +IDEOGRAM 0xc640 - 0xc67e 0xc680 - 0xc6fe +IDEOGRAM 0xc740 - 0xc77e 0xc780 - 0xc7fe +IDEOGRAM 0xc840 - 0xc87e 0xc880 - 0xc8fe +IDEOGRAM 0xc940 - 0xc97e 0xc980 - 0xc9fe +IDEOGRAM 0xca40 - 0xca7e 0xca80 - 0xcafe +IDEOGRAM 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe +IDEOGRAM 0xcc40 - 0xcc7e 0xcc80 - 0xccfe +IDEOGRAM 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe +IDEOGRAM 0xce40 - 0xce7e 0xce80 - 0xcefe +IDEOGRAM 0xcf40 - 0xcf7e 0xcf80 - 0xcffe +IDEOGRAM 0xd040 - 0xd07e 0xd080 - 0xd0fe +IDEOGRAM 0xd140 - 0xd17e 0xd180 - 0xd1fe +IDEOGRAM 0xd240 - 0xd27e 0xd280 - 0xd2fe +IDEOGRAM 0xd340 - 0xd37e 0xd380 - 0xd3fe +IDEOGRAM 0xd440 - 0xd47e 0xd480 - 0xd4fe +IDEOGRAM 0xd540 - 0xd57e 0xd580 - 0xd5fe +IDEOGRAM 0xd640 - 0xd67e 0xd680 - 0xd6fe +IDEOGRAM 0xd740 - 0xd77e 0xd780 - 0xd7f9 +IDEOGRAM 0xd840 - 0xd87e 0xd880 - 0xd8fe +IDEOGRAM 0xd940 - 0xd97e 0xd980 - 0xd9fe +IDEOGRAM 0xda40 - 0xda7e 0xda80 - 0xdafe +IDEOGRAM 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe +IDEOGRAM 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe +IDEOGRAM 0xdd40 - 0xdd7e 0xdd80 - 0xddfe +IDEOGRAM 0xde40 - 0xde7e 0xde80 - 0xdefe +IDEOGRAM 0xdf40 - 0xdf7e 0xdf80 - 0xdffe +IDEOGRAM 0xe040 - 0xe07e 0xe080 - 0xe0fe +IDEOGRAM 0xe140 - 0xe17e 0xe180 - 0xe1fe +IDEOGRAM 0xe240 - 0xe27e 0xe280 - 0xe2fe +IDEOGRAM 0xe340 - 0xe37e 0xe380 - 0xe3fe +IDEOGRAM 0xe440 - 0xe47e 0xe480 - 0xe4fe +IDEOGRAM 0xe540 - 0xe57e 0xe580 - 0xe5fe +IDEOGRAM 0xe640 - 0xe67e 0xe680 - 0xe6fe +IDEOGRAM 0xe740 - 0xe77e 0xe780 - 0xe7fe +IDEOGRAM 0xe840 - 0xe87e 0xe880 - 0xe8fe +IDEOGRAM 0xe940 - 0xe97e 0xe980 - 0xe9fe +IDEOGRAM 0xea40 - 0xea7e 0xea80 - 0xeafe +IDEOGRAM 0xeb40 - 0xeb7e 0xeb80 - 0xebfe +IDEOGRAM 0xec40 - 0xec7e 0xec80 - 0xecfe +IDEOGRAM 0xed40 - 0xed7e 0xed80 - 0xedfe +IDEOGRAM 0xee40 - 0xee7e 0xee80 - 0xeefe +IDEOGRAM 0xef40 - 0xef7e 0xef80 - 0xeffe +IDEOGRAM 0xf040 - 0xf07e 0xf080 - 0xf0fe +IDEOGRAM 0xf140 - 0xf17e 0xf180 - 0xf1fe +IDEOGRAM 0xf240 - 0xf27e 0xf280 - 0xf2fe +IDEOGRAM 0xf340 - 0xf37e 0xf380 - 0xf3fe +IDEOGRAM 0xf440 - 0xf47e 0xf480 - 0xf4fe +IDEOGRAM 0xf540 - 0xf57e 0xf580 - 0xf5fe +IDEOGRAM 0xf640 - 0xf67e 0xf680 - 0xf6fe +IDEOGRAM 0xf740 - 0xf77e 0xf780 - 0xf7fe +IDEOGRAM 0xf840 - 0xf87e 0xf880 - 0xf8a0 +IDEOGRAM 0xf940 - 0xf97e 0xf980 - 0xf9a0 +IDEOGRAM 0xfa40 - 0xfa7e 0xfa80 - 0xfaa0 +IDEOGRAM 0xfb40 - 0xfb7e 0xfb80 - 0xfba0 +IDEOGRAM 0xfc40 - 0xfc7e 0xfc80 - 0xfca0 +IDEOGRAM 0xfd40 - 0xfd7e 0xfd80 - 0xfda0 +IDEOGRAM 0xfe40 - 0xfe4f 0xfe55 0xfe56 0xfe5a - 0xfe5c 0xfe5f 0xfe60 0xfe62 - 0xfe65 0xfe68 - 0xfe6a 0xfe6f 0xfe70 0xfe72 0xfe77 0xfe78 0xfe7a - 0xfe7d 0xfe80 - 0xfe83 0xfe85 - 0xfe8f 0xfe92 - 0xfe9f +LOWER 0xa3e1 - 0xa3fa +LOWER 0xa6c1 - 0xa6d8 +LOWER 0xa7d1 - 0xa7f1 +LOWER 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 +MAPLOWER < 0xa2f1 - 0xa2fa : 0xa2a1 > +MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > +MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > +MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > +MAPUPPER < 0xa2a1 - 0xa2aa : 0xa2f1 > +MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 > +MAPUPPER < 0xa6c1 - 0xa6d8 : 0xa6a1 > +MAPUPPER < 0xa7d1 - 0xa7f1 : 0xa7a1 > +PHONOGRAM 0xa4a1 - 0xa4f3 +PHONOGRAM 0xa5a1 - 0xa5f6 +PRINT 0xa1a1 +PUNCT 0xa1a2 - 0xa1a8 0xa1aa - 0xa1fe +PUNCT 0xa2e3 +PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe +PUNCT 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 +PUNCT 0xa840 - 0xa87e 0xa880 - 0xa895 +PUNCT 0xa949 - 0xa957 0xa959 0xa95a 0xa95c 0xa961 0xa962 0xa968 - 0xa97e 0xa980 - 0xa995 0xa9a4 - 0xa9ef +PUNCT 0xfe50 0xfe54 0xfe57 0xfe58 0xfe5d 0xfe5e 0xfe6b 0xfe6e 0xfe71 0xfe73 - 0xfe75 0xfe79 0xfe84 +SPACE 0xa1a1 +SPECIAL 0xa2a1 - 0xa2aa 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc +SPECIAL 0xa940 - 0xa948 0xa996 +SWIDTH2 0x8140 - 0x817e 0x8180 - 0x81fe +SWIDTH2 0x8240 - 0x827e 0x8280 - 0x82fe +SWIDTH2 0x8440 - 0x847e 0x8480 - 0x84fe +SWIDTH2 0x8540 - 0x857e 0x8580 - 0x85fe +SWIDTH2 0x8640 - 0x867e 0x8680 - 0x86fe +SWIDTH2 0x8740 - 0x877e 0x8780 - 0x87fe +SWIDTH2 0x8840 - 0x887e 0x8880 - 0x88fe +SWIDTH2 0x8940 - 0x897e 0x8980 - 0x89fe +SWIDTH2 0x8a40 - 0x8a7e 0x8a80 - 0x8afe +SWIDTH2 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe +SWIDTH2 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe +SWIDTH2 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe +SWIDTH2 0x8e40 - 0x8e7e 0x8e80 - 0x8efe +SWIDTH2 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe +SWIDTH2 0x9040 - 0x907e 0x9080 - 0x90fe +SWIDTH2 0x9140 - 0x917e 0x9180 - 0x91fe +SWIDTH2 0x9240 - 0x927e 0x9280 - 0x92fe +SWIDTH2 0x9340 - 0x937e 0x9380 - 0x93fe +SWIDTH2 0x9440 - 0x947e 0x9480 - 0x94fe +SWIDTH2 0x9540 - 0x957e 0x9580 - 0x95fe +SWIDTH2 0x9640 - 0x967e 0x9680 - 0x96fe +SWIDTH2 0x9740 - 0x977e 0x9780 - 0x97fe +SWIDTH2 0x9840 - 0x987e 0x9880 - 0x98fe +SWIDTH2 0x9940 - 0x997e 0x9980 - 0x99fe +SWIDTH2 0x9a40 - 0x9a7e 0x9a80 - 0x9afe +SWIDTH2 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe +SWIDTH2 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe +SWIDTH2 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe +SWIDTH2 0x9e40 - 0x9e7e 0x9e80 - 0x9efe +SWIDTH2 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe +SWIDTH2 0xa040 - 0xa07e 0xa080 - 0xa0fe +SWIDTH2 0xa1a1 - 0xa1a3 0xa1a8 0xa1a9 0xa1ab 0xa1b2 - 0xa1bf 0xa1e7 0xa1e9 0xa1ea 0xa1fe +SWIDTH2 0xa2e5 - 0xa2ee +SWIDTH2 0xa3a1 - 0xa3fe +SWIDTH2 0xa4a1 - 0xa4f3 +SWIDTH2 0xa5a1 - 0xa5f6 +SWIDTH2 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 +SWIDTH2 0xa893 - 0xa895 0xa8c5 - 0xa8e9 +SWIDTH2 0xa940 - 0xa957 0xa95a 0xa960 - 0xa97e 0xa980 - 0xa996 +SWIDTH2 0xaa40 - 0xaa7e 0xaa80 - 0xaaa0 +SWIDTH2 0xab40 - 0xab7e 0xab80 - 0xaba0 +SWIDTH2 0xac40 - 0xac7e 0xac80 - 0xaca0 +SWIDTH2 0xad40 - 0xad7e 0xad80 - 0xada0 +SWIDTH2 0xae40 - 0xae7e 0xae80 - 0xaea0 +SWIDTH2 0xaf40 - 0xaf7e 0xaf80 - 0xafa0 +SWIDTH2 0xb040 - 0xb07e 0xb080 - 0xb0fe +SWIDTH2 0xb140 - 0xb17e 0xb180 - 0xb1fe +SWIDTH2 0xb240 - 0xb27e 0xb280 - 0xb2fe +SWIDTH2 0xb340 - 0xb37e 0xb380 - 0xb3fe +SWIDTH2 0xb440 - 0xb47e 0xb480 - 0xb4fe +SWIDTH2 0xb540 - 0xb57e 0xb580 - 0xb5fe +SWIDTH2 0xb640 - 0xb67e 0xb680 - 0xb6fe +SWIDTH2 0xb740 - 0xb77e 0xb780 - 0xb7fe +SWIDTH2 0xb840 - 0xb87e 0xb880 - 0xb8fe +SWIDTH2 0xb940 - 0xb97e 0xb980 - 0xb9fe +SWIDTH2 0xba40 - 0xba7e 0xba80 - 0xbafe +SWIDTH2 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe +SWIDTH2 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe +SWIDTH2 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe +SWIDTH2 0xbe40 - 0xbe7e 0xbe80 - 0xbefe +SWIDTH2 0xbf40 - 0xbf7e 0xbf80 - 0xbffe +SWIDTH2 0xc040 - 0xc07e 0xc080 - 0xc0fe +SWIDTH2 0xc140 - 0xc17e 0xc180 - 0xc1fe +SWIDTH2 0xc240 - 0xc27e 0xc280 - 0xc2fe +SWIDTH2 0xc340 - 0xc37e 0xc380 - 0xc3fe +SWIDTH2 0xc440 - 0xc47e 0xc480 - 0xc4fe +SWIDTH2 0xc540 - 0xc57e 0xc580 - 0xc5fe +SWIDTH2 0xc640 - 0xc67e 0xc680 - 0xc6fe +SWIDTH2 0xc740 - 0xc77e 0xc780 - 0xc7fe +SWIDTH2 0xc840 - 0xc87e 0xc880 - 0xc8fe +SWIDTH2 0xc940 - 0xc97e 0xc980 - 0xc9fe +SWIDTH2 0xca40 - 0xca7e 0xca80 - 0xcafe +SWIDTH2 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe +SWIDTH2 0xcc40 - 0xcc7e 0xcc80 - 0xccfe +SWIDTH2 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe +SWIDTH2 0xce40 - 0xce7e 0xce80 - 0xcefe +SWIDTH2 0xcf40 - 0xcf7e 0xcf80 - 0xcffe +SWIDTH2 0xd040 - 0xd07e 0xd080 - 0xd0fe +SWIDTH2 0xd140 - 0xd17e 0xd180 - 0xd1fe +SWIDTH2 0xd240 - 0xd27e 0xd280 - 0xd2fe +SWIDTH2 0xd340 - 0xd37e 0xd380 - 0xd3fe +SWIDTH2 0xd440 - 0xd47e 0xd480 - 0xd4fe +SWIDTH2 0xd540 - 0xd57e 0xd580 - 0xd5fe +SWIDTH2 0xd640 - 0xd67e 0xd680 - 0xd6fe +SWIDTH2 0xd740 - 0xd77e 0xd780 - 0xd7f9 +SWIDTH2 0xd840 - 0xd87e 0xd880 - 0xd8fe +SWIDTH2 0xd940 - 0xd97e 0xd980 - 0xd9fe +SWIDTH2 0xda40 - 0xda7e 0xda80 - 0xdafe +SWIDTH2 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe +SWIDTH2 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe +SWIDTH2 0xdd40 - 0xdd7e 0xdd80 - 0xddfe +SWIDTH2 0xde40 - 0xde7e 0xde80 - 0xdefe +SWIDTH2 0xdf40 - 0xdf7e 0xdf80 - 0xdffe +SWIDTH2 0xe040 - 0xe07e 0xe080 - 0xe0fe +SWIDTH2 0xe140 - 0xe17e 0xe180 - 0xe1fe +SWIDTH2 0xe240 - 0xe27e 0xe280 - 0xe2fe +SWIDTH2 0xe340 - 0xe37e 0xe380 - 0xe3fe +SWIDTH2 0xe440 - 0xe47e 0xe480 - 0xe4fe +SWIDTH2 0xe540 - 0xe57e 0xe580 - 0xe5fe +SWIDTH2 0xe640 - 0xe67e 0xe680 - 0xe6fe +SWIDTH2 0xe740 - 0xe77e 0xe780 - 0xe7fe +SWIDTH2 0xe840 - 0xe87e 0xe880 - 0xe8fe +SWIDTH2 0xe940 - 0xe97e 0xe980 - 0xe9fe +SWIDTH2 0xea40 - 0xea7e 0xea80 - 0xeafe +SWIDTH2 0xeb40 - 0xeb7e 0xeb80 - 0xebfe +SWIDTH2 0xec40 - 0xec7e 0xec80 - 0xecfe +SWIDTH2 0xed40 - 0xed7e 0xed80 - 0xedfe +SWIDTH2 0xee40 - 0xee7e 0xee80 - 0xeefe +SWIDTH2 0xef40 - 0xef7e 0xef80 - 0xeffe +SWIDTH2 0xf040 - 0xf07e 0xf080 - 0xf0fe +SWIDTH2 0xf140 - 0xf17e 0xf180 - 0xf1fe +SWIDTH2 0xf240 - 0xf27e 0xf280 - 0xf2fe +SWIDTH2 0xf340 - 0xf37e 0xf380 - 0xf3fe +SWIDTH2 0xf440 - 0xf47e 0xf480 - 0xf4fe +SWIDTH2 0xf540 - 0xf57e 0xf580 - 0xf5fe +SWIDTH2 0xf640 - 0xf67e 0xf680 - 0xf6fe +SWIDTH2 0xf740 - 0xf77e 0xf780 - 0xf7fe +SWIDTH2 0xf840 - 0xf87e 0xf880 - 0xf8a0 +SWIDTH2 0xf940 - 0xf97e 0xf980 - 0xf9a0 +SWIDTH2 0xfa40 - 0xfa7e 0xfa80 - 0xfaa0 +SWIDTH2 0xfb40 - 0xfb7e 0xfb80 - 0xfba0 +SWIDTH2 0xfc40 - 0xfc7e 0xfc80 - 0xfca0 +SWIDTH2 0xfd40 - 0xfd7e 0xfd80 - 0xfda0 +SWIDTH2 0xfe40 - 0xfe50 0xfe54 - 0xfe58 0xfe5a - 0xfe60 0xfe62 - 0xfe65 0xfe68 - 0xfe6b 0xfe6e - 0xfe75 0xfe77 - 0xfe7d 0xfe80 - 0xfe8f 0xfe92 - 0xfe9f +TODIGIT < 0xa3b0 - 0xa3b9 : 0x0000 > +UPPER 0xa3c1 - 0xa3da +UPPER 0xa6a1 - 0xa6b8 +UPPER 0xa7a1 - 0xa7c1 + +/* + * Unicode BMP compatible + */ +ALPHA 0x01308439 +ALPHA 0x01308538 +ALPHA 0x01308632 0x01308638 0x01308639 +ALPHA 0x01308730 - 0x01308739 +ALPHA 0x01308830 - 0x01308839 +ALPHA 0x01308930 - 0x01308939 +ALPHA 0x01308a30 - 0x01308a39 +ALPHA 0x01308b30 - 0x01308b39 +ALPHA 0x01308c30 - 0x01308c39 +ALPHA 0x01308d30 - 0x01308d39 +ALPHA 0x01308e30 - 0x01308e39 +ALPHA 0x01308f30 - 0x01308f39 +ALPHA 0x01309030 - 0x01309039 +ALPHA 0x01309130 - 0x01309139 +ALPHA 0x01309230 - 0x01309239 +ALPHA 0x01309330 - 0x01309339 +ALPHA 0x01309430 - 0x01309439 +ALPHA 0x01309530 - 0x01309539 +ALPHA 0x01309630 - 0x01309639 +ALPHA 0x01309730 - 0x01309739 +ALPHA 0x01309830 - 0x01309839 +ALPHA 0x01309930 - 0x01309939 +ALPHA 0x01309a30 - 0x01309a39 +ALPHA 0x01309b30 - 0x01309b39 +ALPHA 0x01309c30 - 0x01309c39 +ALPHA 0x01309d30 - 0x01309d36 0x01309d38 0x01309d39 +ALPHA 0x01309e30 0x01309e31 0x01309e36 - 0x01309e39 +ALPHA 0x01309f30 - 0x01309f39 +ALPHA 0x0130a030 - 0x0130a039 +ALPHA 0x0130a130 - 0x0130a139 +ALPHA 0x0130a230 - 0x0130a239 +ALPHA 0x0130a330 - 0x0130a339 +ALPHA 0x0130a430 - 0x0130a439 +ALPHA 0x0130a530 - 0x0130a539 +ALPHA 0x0130a630 - 0x0130a639 +ALPHA 0x0130a731 - 0x0130a739 +ALPHA 0x0130a830 - 0x0130a838 +ALPHA 0x0130ab37 - 0x0130ab39 +ALPHA 0x0130ac30 - 0x0130ac39 +ALPHA 0x0130ad30 - 0x0130ad39 +ALPHA 0x0130ae30 - 0x0130ae39 +ALPHA 0x0130af30 - 0x0130af39 +ALPHA 0x0130b030 - 0x0130b039 +ALPHA 0x0130b130 - 0x0130b139 +ALPHA 0x0130b230 - 0x0130b239 +ALPHA 0x0130b330 - 0x0130b339 +ALPHA 0x0130b430 - 0x0130b438 +ALPHA 0x0130ca30 0x0130ca32 - 0x0130ca34 0x0130ca36 0x0130ca38 0x0130ca39 +ALPHA 0x0130cb30 0x0130cb32 - 0x0130cb39 +ALPHA 0x0130cc30 - 0x0130cc34 0x0130cc36 - 0x0130cc39 +ALPHA 0x0130cd30 - 0x0130cd39 +ALPHA 0x0130ce30 - 0x0130ce39 +ALPHA 0x0130cf30 - 0x0130cf39 +ALPHA 0x0130d030 - 0x0130d033 +ALPHA 0x0130d134 - 0x0130d139 +ALPHA 0x0130d230 - 0x0130d239 +ALPHA 0x0130d330 - 0x0130d339 +ALPHA 0x0130d430 - 0x0130d439 +ALPHA 0x0130d530 - 0x0130d539 +ALPHA 0x0130d630 - 0x0130d639 +ALPHA 0x0130d730 - 0x0130d737 +ALPHA 0x0130d836 - 0x0130d839 +ALPHA 0x0130d930 - 0x0130d939 +ALPHA 0x0130da30 - 0x0130da39 +ALPHA 0x0130db30 - 0x0130db39 +ALPHA 0x0130dc30 - 0x0130dc39 +ALPHA 0x0130dd30 - 0x0130dd39 +ALPHA 0x0130de30 - 0x0130de39 +ALPHA 0x0130df30 - 0x0130df34 0x0130df36 - 0x0130df39 +ALPHA 0x0130e030 - 0x0130e039 +ALPHA 0x0130e130 - 0x0130e139 +ALPHA 0x0130e230 - 0x0130e239 +ALPHA 0x0130e330 - 0x0130e333 0x0130e336 0x0130e337 +ALPHA 0x0130e434 - 0x0130e439 +ALPHA 0x0130e530 - 0x0130e539 +ALPHA 0x0130e933 - 0x0130e939 +ALPHA 0x0130ea30 - 0x0130ea39 +ALPHA 0x0130eb30 - 0x0130eb39 +ALPHA 0x0130ec30 - 0x0130ec39 +ALPHA 0x0130ed30 +ALPHA 0x0130ee31 - 0x0130ee39 +ALPHA 0x0130ef30 - 0x0130ef39 +ALPHA 0x0130f030 - 0x0130f039 +ALPHA 0x0130f130 - 0x0130f139 +ALPHA 0x01339430 - 0x01339439 +ALPHA 0x01339530 - 0x01339539 +ALPHA 0x01339630 - 0x01339639 +ALPHA 0x01339730 - 0x01339737 +ALPHA 0x0135ee34 - 0x0135ee39 +ALPHA 0x0135ef30 - 0x0135ef39 +ALPHA 0x0135f030 - 0x0135f039 +ALPHA 0x0135f130 - 0x0135f139 +ALPHA 0x0135f230 - 0x0135f239 +ALPHA 0x0135f330 - 0x0135f339 +ALPHA 0x0135f430 - 0x0135f439 +ALPHA 0x0135f530 - 0x0135f539 +ALPHA 0x0135f630 - 0x0135f639 +ALPHA 0x0135f730 - 0x0135f739 +ALPHA 0x0135f830 - 0x0135f839 +ALPHA 0x0135f930 - 0x0135f939 +ALPHA 0x0135fa30 - 0x0135fa39 +ALPHA 0x0135fb30 - 0x0135fb39 +ALPHA 0x0135fc30 - 0x0135fc39 +ALPHA 0x0135fd30 - 0x0135fd39 +ALPHA 0x0135fe34 - 0x0135fe39 +ALPHA 0x01368130 - 0x01368139 +ALPHA 0x01368230 - 0x01368239 +ALPHA 0x01368330 - 0x01368339 +ALPHA 0x01368430 - 0x01368439 +ALPHA 0x01368530 - 0x01368539 +ALPHA 0x01368630 - 0x01368639 +ALPHA 0x01368730 - 0x01368739 +ALPHA 0x01368830 - 0x01368839 +ALPHA 0x01368930 - 0x01368933 +ALPHA 0x01368a30 - 0x01368a39 +ALPHA 0x01368b30 - 0x01368b39 +ALPHA 0x01368c30 0x01368c31 0x01368c34 - 0x01368c39 +ALPHA 0x01368d32 - 0x01368d39 +ALPHA 0x01368e30 - 0x01368e39 +ALPHA 0x01368f30 - 0x01368f39 +ALPHA 0x01369030 - 0x01369039 +ALPHA 0x01369132 - 0x01369137 +ALPHA 0x01369230 - 0x01369237 0x01369239 +ALPHA 0x01369331 0x01369333 0x01369335 - 0x01369339 +ALPHA 0x01369430 - 0x01369439 +ALPHA 0x01369530 - 0x01369539 +ALPHA 0x01369630 - 0x01369635 0x01369638 0x01369639 +ALPHA 0x01369730 - 0x01369739 +ALPHA 0x01369830 - 0x01369839 +ALPHA 0x01369930 - 0x01369939 +ALPHA 0x01369a30 - 0x01369a39 +ALPHA 0x01369b30 - 0x01369b39 +ALPHA 0x01369c30 0x01369c32 - 0x01369c38 +ALPHA 0x01369d30 0x01369d34 - 0x01369d36 0x01369d38 0x01369d39 +ALPHA 0x01369e30 - 0x01369e34 0x01369e38 0x01369e39 +ALPHA 0x01369f30 0x01369f31 0x01369f34 - 0x01369f39 +ALPHA 0x0136a034 - 0x0136a039 +ALPHA 0x0136a130 - 0x0136a136 +ALPHA 0x0136a232 - 0x0136a234 0x0136a236 - 0x0136a239 +ALPHA 0x0136a330 - 0x0136a332 +ALPHA 0x0136ad33 +ALPHA 0x0136ae37 +ALPHA 0x0136bb37 +ALPHA 0x0136bc30 0x0136bc32 - 0x0136bc39 +ALPHA 0x0136bd30 0x0136bd31 0x0136bd33 0x0136bd36 - 0x0136bd39 +ALPHA 0x0136be30 0x0136be36 0x0136be38 +ALPHA 0x0136bf30 0x0136bf32 - 0x0136bf35 0x0136bf37 - 0x0136bf39 +ALPHA 0x0136c031 0x0136c032 0x0136c037 +ALPHA 0x0136c131 - 0x0136c133 0x0136c139 +ALPHA 0x0136c230 - 0x0136c233 +ALPHA 0x0430b232 - 0x0430b238 +ALPHA 0x0430b431 - 0x0430b435 +BLANK 0x01308432 +BLANK 0x0134ac34 +BLANK 0x0136a336 - 0x0136a339 +BLANK 0x0136a430 - 0x0136a437 +BLANK 0x0136a732 +BLANK 0x0136ab35 +CONTROL 0x01308130 - 0x01308139 +CONTROL 0x01308230 - 0x01308239 +CONTROL 0x01308330 - 0x01308339 +CONTROL 0x01308430 0x01308431 +CONTROL 0x01319631 +CONTROL 0x01319b31 +CONTROL 0x0134d432 +CONTROL 0x0136a438 0x0136a439 +CONTROL 0x0136a530 0x0136a531 +CONTROL 0x0136a637 - 0x0136a639 +CONTROL 0x0136a730 0x0136a731 +CONTROL 0x0136ab36 - 0x0136ab39 +CONTROL 0x0136ac36 - 0x0136ac39 +CONTROL 0x0136ad30 0x0136ad31 +CONTROL 0x04319533 +CONTROL 0x0431a433 - 0x0431a435 +GRAPH 0x01309d37 +GRAPH 0x01309e32 - 0x01309e35 +GRAPH 0x0130b531 - 0x0130b539 +GRAPH 0x0130b632 - 0x0130b638 +GRAPH 0x0130b739 +GRAPH 0x0130b830 +GRAPH 0x0130b934 - 0x0130b938 +GRAPH 0x0130ba38 +GRAPH 0x0130bc36 - 0x0130bc39 +GRAPH 0x0130bd30 - 0x0130bd39 +GRAPH 0x0130be30 - 0x0130be39 +GRAPH 0x0130bf30 - 0x0130bf39 +GRAPH 0x0130c030 - 0x0130c039 +GRAPH 0x0130c130 - 0x0130c139 +GRAPH 0x0130c230 - 0x0130c239 +GRAPH 0x0130c330 - 0x0130c339 +GRAPH 0x0130c430 - 0x0130c435 +GRAPH 0x0130c632 - 0x0130c639 +GRAPH 0x0130c730 - 0x0130c737 +GRAPH 0x0130c838 +GRAPH 0x0130d739 +GRAPH 0x0130d830 - 0x0130d832 0x0130d834 0x0130d835 +GRAPH 0x0130ed33 +GRAPH 0x0130f239 +GRAPH 0x0130f330 - 0x0130f339 +GRAPH 0x0130f430 - 0x0130f435 0x0130f437 - 0x0130f439 +GRAPH 0x0130f530 - 0x0130f539 +GRAPH 0x0130f630 - 0x0130f639 +GRAPH 0x0130f731 - 0x0130f733 0x0130f735 0x0130f737 0x0130f738 +GRAPH 0x0130f830 +GRAPH 0x0130f932 - 0x0130f939 +GRAPH 0x0130fa30 - 0x0130fa39 +GRAPH 0x0130fb30 - 0x0130fb38 +GRAPH 0x0130fc34 - 0x0130fc36 +GRAPH 0x01318333 - 0x01318339 +GRAPH 0x01318430 - 0x01318439 +GRAPH 0x01318530 - 0x01318538 +GRAPH 0x01318634 - 0x01318639 +GRAPH 0x01318730 - 0x01318739 +GRAPH 0x01318830 - 0x01318835 +GRAPH 0x01318b30 - 0x01318b39 +GRAPH 0x01318c30 - 0x01318c39 +GRAPH 0x01318d30 - 0x01318d39 +GRAPH 0x01318e30 - 0x01318e39 +GRAPH 0x01318f30 - 0x01318f39 +GRAPH 0x01319030 - 0x01319039 +GRAPH 0x01319130 - 0x01319139 +GRAPH 0x01319230 - 0x01319239 +GRAPH 0x01319330 - 0x01319339 +GRAPH 0x01319430 - 0x01319439 +GRAPH 0x01319530 0x01319531 0x01319533 - 0x01319539 +GRAPH 0x01319630 0x01319632 - 0x01319639 +GRAPH 0x01319730 - 0x01319732 0x01319734 - 0x01319737 +GRAPH 0x01319930 - 0x01319932 +GRAPH 0x01319b32 - 0x01319b39 +GRAPH 0x01319c30 - 0x01319c39 +GRAPH 0x01319d30 - 0x01319d39 +GRAPH 0x01319e30 0x01319e34 - 0x01319e39 +GRAPH 0x01319f30 - 0x01319f39 +GRAPH 0x0131a030 - 0x0131a039 +GRAPH 0x0131a130 +GRAPH 0x0131a634 - 0x0131a639 +GRAPH 0x0131a730 - 0x0131a739 +GRAPH 0x0131a830 - 0x0131a839 +GRAPH 0x0131a930 - 0x0131a939 +GRAPH 0x0131aa30 - 0x0131aa39 +GRAPH 0x0131ab30 - 0x0131ab33 +GRAPH 0x0131cc39 +GRAPH 0x0131cd30 0x0131cd31 0x0131cd33 - 0x0131cd39 +GRAPH 0x0131ce30 - 0x0131ce39 +GRAPH 0x0131cf30 - 0x0131cf39 +GRAPH 0x0131d030 - 0x0131d039 +GRAPH 0x0131d130 - 0x0131d139 +GRAPH 0x0131d230 - 0x0131d235 0x0131d238 0x0131d239 +GRAPH 0x0131d330 - 0x0131d339 +GRAPH 0x0131d430 - 0x0131d435 0x0131d438 0x0131d439 +GRAPH 0x0131d530 - 0x0131d532 0x0131d536 - 0x0131d539 +GRAPH 0x0131d630 - 0x0131d637 +GRAPH 0x0131d937 - 0x0131d939 +GRAPH 0x0131da31 - 0x0131da38 +GRAPH 0x0131db31 0x0131db32 0x0131db35 - 0x0131db39 +GRAPH 0x0131dc30 - 0x0131dc39 +GRAPH 0x0131dd30 - 0x0131dd36 0x0131dd38 0x0131dd39 +GRAPH 0x0131de30 - 0x0131de34 0x0131de36 +GRAPH 0x0131df30 - 0x0131df33 0x0131df36 0x0131df38 0x0131df39 +GRAPH 0x0131e030 - 0x0131e034 0x0131e037 0x0131e038 +GRAPH 0x0131e131 - 0x0131e133 +GRAPH 0x0131e233 0x0131e238 0x0131e239 +GRAPH 0x0131e331 - 0x0131e335 +GRAPH 0x0131e438 0x0131e439 +GRAPH 0x0131e636 0x0131e639 +GRAPH 0x0131e730 - 0x0131e734 0x0131e739 +GRAPH 0x0131e830 0x0131e833 - 0x0131e839 +GRAPH 0x0131e930 - 0x0131e939 +GRAPH 0x0131ea30 - 0x0131ea34 0x0131ea36 - 0x0131ea39 +GRAPH 0x0131eb30 - 0x0131eb32 0x0131eb34 0x0131eb35 0x0131eb37 0x0131eb38 +GRAPH 0x0131ec30 0x0131ec31 0x0131ec34 0x0131ec36 - 0x0131ec39 +GRAPH 0x0131ed30 0x0131ed35 0x0131ed36 0x0131ed39 +GRAPH 0x0131ee30 0x0131ee31 +GRAPH 0x0131ef33 - 0x0131ef36 0x0131ef38 +GRAPH 0x0131f136 - 0x0131f139 +GRAPH 0x0131f230 +GRAPH 0x0131f333 - 0x0131f335 0x0131f337 - 0x0131f339 +GRAPH 0x0131f430 - 0x0131f433 0x0131f435 0x0131f437 - 0x0131f439 +GRAPH 0x0131f531 - 0x0131f539 +GRAPH 0x0131f630 - 0x0131f639 +GRAPH 0x0131f730 - 0x0131f732 0x0131f734 - 0x0131f739 +GRAPH 0x0131f830 0x0131f832 0x0131f833 0x0131f835 - 0x0131f839 +GRAPH 0x0131f932 - 0x0131f939 +GRAPH 0x0131fa30 0x0131fa31 0x0131fa33 - 0x0131fa35 0x0131fa37 - 0x0131fa39 +GRAPH 0x0131fb32 +GRAPH 0x0131fc38 +GRAPH 0x01328231 - 0x01328233 0x01328235 - 0x01328239 +GRAPH 0x01328330 - 0x01328332 0x01328335 0x01328336 0x01328339 +GRAPH 0x01328430 - 0x01328439 +GRAPH 0x01328530 - 0x01328539 +GRAPH 0x01328630 0x01328632 - 0x01328638 +GRAPH 0x01328730 0x01328731 0x01328734 - 0x01328737 +GRAPH 0x01328830 - 0x01328837 +GRAPH 0x01328931 0x01328932 0x01328935 - 0x01328937 +GRAPH 0x01328a36 0x01328a37 +GRAPH 0x01328b32 0x01328b33 0x01328b35 - 0x01328b37 +GRAPH 0x01328f30 0x01328f31 0x01328f33 - 0x01328f38 +GRAPH 0x01329032 - 0x01329034 0x01329036 - 0x01329039 +GRAPH 0x01329133 0x01329134 0x01329136 0x01329138 0x01329139 +GRAPH 0x01329233 0x01329234 0x01329238 0x01329239 +GRAPH 0x01329330 0x01329334 - 0x01329339 +GRAPH 0x01329430 0x01329431 0x01329433 - 0x01329435 +GRAPH 0x01329530 - 0x01329534 0x01329538 0x01329539 +GRAPH 0x01329630 0x01329632 - 0x01329635 +GRAPH 0x01329735 +GRAPH 0x01329b37 - 0x01329b39 +GRAPH 0x01329c31 - 0x01329c38 +GRAPH 0x01329d30 - 0x01329d32 0x01329d34 - 0x01329d39 +GRAPH 0x01329e30 - 0x01329e39 +GRAPH 0x01329f30 - 0x01329f36 0x01329f38 0x01329f39 +GRAPH 0x0132a030 - 0x0132a037 0x0132a039 +GRAPH 0x0132a130 - 0x0132a133 0x0132a138 0x0132a139 +GRAPH 0x0132a230 - 0x0132a234 0x0132a236 - 0x0132a238 +GRAPH 0x0132a330 - 0x0132a333 +GRAPH 0x0132a431 0x0132a432 +GRAPH 0x0132a532 0x0132a533 +GRAPH 0x0132a836 0x0132a837 0x0132a839 +GRAPH 0x0132a930 - 0x0132a936 0x0132a938 0x0132a939 +GRAPH 0x0132aa30 0x0132aa32 - 0x0132aa39 +GRAPH 0x0132ab30 - 0x0132ab39 +GRAPH 0x0132ac30 - 0x0132ac34 0x0132ac36 - 0x0132ac39 +GRAPH 0x0132ad30 - 0x0132ad35 0x0132ad37 - 0x0132ad39 +GRAPH 0x0132ae30 0x0132ae31 0x0132ae36 - 0x0132ae39 +GRAPH 0x0132af30 - 0x0132af32 0x0132af34 - 0x0132af36 0x0132af38 0x0132af39 +GRAPH 0x0132b030 0x0132b031 0x0132b039 +GRAPH 0x0132b130 0x0132b138 +GRAPH 0x0132b230 0x0132b231 +GRAPH 0x0132b534 0x0132b535 0x0132b537 - 0x0132b539 +GRAPH 0x0132b630 - 0x0132b634 0x0132b636 - 0x0132b638 +GRAPH 0x0132b730 - 0x0132b739 +GRAPH 0x0132b830 - 0x0132b839 +GRAPH 0x0132b930 - 0x0132b932 0x0132b934 - 0x0132b939 +GRAPH 0x0132ba30 - 0x0132ba39 +GRAPH 0x0132bb34 - 0x0132bb39 +GRAPH 0x0132bc32 - 0x0132bc34 0x0132bc36 - 0x0132bc39 +GRAPH 0x0132bd39 +GRAPH 0x0132be38 0x0132be39 +GRAPH 0x0132c232 0x0132c233 0x0132c235 - 0x0132c239 +GRAPH 0x0132c330 - 0x0132c339 +GRAPH 0x0132c430 - 0x0132c432 0x0132c436 - 0x0132c439 +GRAPH 0x0132c530 - 0x0132c539 +GRAPH 0x0132c630 - 0x0132c639 +GRAPH 0x0132c731 - 0x0132c739 +GRAPH 0x0132c831 0x0132c834 - 0x0132c839 +GRAPH 0x0132c930 0x0132c934 0x0132c939 +GRAPH 0x0132ca30 - 0x0132ca34 0x0132ca36 0x0132ca38 0x0132ca39 +GRAPH 0x0132cb30 - 0x0132cb35 +GRAPH 0x0132cd34 0x0132cd35 +GRAPH 0x0132ce39 +GRAPH 0x0132cf30 - 0x0132cf39 +GRAPH 0x0132d030 - 0x0132d039 +GRAPH 0x0132d130 - 0x0132d139 +GRAPH 0x0132d230 - 0x0132d239 +GRAPH 0x0132d330 - 0x0132d339 +GRAPH 0x0132d430 - 0x0132d436 +GRAPH 0x0132d532 - 0x0132d539 +GRAPH 0x0132d630 - 0x0132d636 +GRAPH 0x0132db37 0x0132db38 +GRAPH 0x0132dc30 0x0132dc33 0x0132dc34 0x0132dc36 0x0132dc39 +GRAPH 0x0132dd36 - 0x0132dd39 +GRAPH 0x0132de31 - 0x0132de37 0x0132de39 +GRAPH 0x0132df30 0x0132df31 0x0132df33 0x0132df35 0x0132df38 0x0132df39 +GRAPH 0x0132e031 - 0x0132e039 +GRAPH 0x0132e130 - 0x0132e133 0x0132e135 - 0x0132e137 +GRAPH 0x0132e230 - 0x0132e234 0x0132e236 0x0132e238 0x0132e239 +GRAPH 0x0132e330 - 0x0132e333 +GRAPH 0x0132e438 0x0132e439 +GRAPH 0x0132ea38 0x0132ea39 +GRAPH 0x0132ed37 0x0132ed39 +GRAPH 0x0132ee31 0x0132ee36 - 0x0132ee39 +GRAPH 0x0132ef30 - 0x0132ef35 0x0132ef37 - 0x0132ef39 +GRAPH 0x0132f030 - 0x0132f039 +GRAPH 0x0132f130 - 0x0132f139 +GRAPH 0x0132f230 - 0x0132f239 +GRAPH 0x0132f330 0x0132f337 - 0x0132f339 +GRAPH 0x0132f430 - 0x0132f439 +GRAPH 0x0132f530 - 0x0132f536 0x0132f538 0x0132f539 +GRAPH 0x0132f630 - 0x0132f633 0x0132f638 0x0132f639 +GRAPH 0x0132f730 - 0x0132f735 0x0132f737 - 0x0132f739 +GRAPH 0x0132f830 - 0x0132f839 +GRAPH 0x0132f930 - 0x0132f939 +GRAPH 0x0132fa30 - 0x0132fa39 +GRAPH 0x0132fb30 - 0x0132fb32 +GRAPH 0x0132fc32 +GRAPH 0x01338430 - 0x01338439 +GRAPH 0x01338530 - 0x01338539 +GRAPH 0x01338630 - 0x01338639 +GRAPH 0x01338730 - 0x01338733 0x01338735 - 0x01338739 +GRAPH 0x01338831 0x01338832 0x01338834 - 0x01338839 +GRAPH 0x01338930 0x01338934 - 0x01338937 +GRAPH 0x01338c30 - 0x01338c39 +GRAPH 0x01339838 0x01339839 +GRAPH 0x01339930 - 0x01339939 +GRAPH 0x01339a30 - 0x01339a39 +GRAPH 0x01339b30 - 0x01339b39 +GRAPH 0x01339c30 - 0x01339c38 +GRAPH 0x01339d36 - 0x01339d39 +GRAPH 0x01339e30 - 0x01339e39 +GRAPH 0x01339f30 - 0x01339f39 +GRAPH 0x0133a030 - 0x0133a039 +GRAPH 0x0133a130 - 0x0133a139 +GRAPH 0x0133a230 - 0x0133a239 +GRAPH 0x0133a330 - 0x0133a339 +GRAPH 0x0133a430 - 0x0133a439 +GRAPH 0x0133a530 - 0x0133a539 +GRAPH 0x0133a630 - 0x0133a635 +GRAPH 0x0133a731 - 0x0133a739 +GRAPH 0x0133a830 - 0x0133a839 +GRAPH 0x0133a930 - 0x0133a939 +GRAPH 0x0133aa30 - 0x0133aa39 +GRAPH 0x0133ab30 - 0x0133ab39 +GRAPH 0x0133ac30 - 0x0133ac39 +GRAPH 0x0133ad30 - 0x0133ad38 +GRAPH 0x0133ae34 - 0x0133ae39 +GRAPH 0x0133af30 - 0x0133af39 +GRAPH 0x0133b030 - 0x0133b039 +GRAPH 0x0133b130 - 0x0133b139 +GRAPH 0x0133b230 - 0x0133b239 +GRAPH 0x0133b330 - 0x0133b339 +GRAPH 0x0133b430 - 0x0133b439 +GRAPH 0x0133b530 - 0x0133b539 +GRAPH 0x0133b630 - 0x0133b635 +GRAPH 0x0133e038 0x0133e039 +GRAPH 0x0133e130 - 0x0133e139 +GRAPH 0x0133e230 - 0x0133e239 +GRAPH 0x0133e330 - 0x0133e339 +GRAPH 0x0133e430 - 0x0133e439 +GRAPH 0x0133e530 - 0x0133e539 +GRAPH 0x0133e630 - 0x0133e639 +GRAPH 0x0133e730 - 0x0133e739 +GRAPH 0x0133e830 - 0x0133e839 +GRAPH 0x0133e930 - 0x0133e932 +GRAPH 0x0134ac35 - 0x0134ac39 +GRAPH 0x0134ad30 - 0x0134ad39 +GRAPH 0x0134ae30 - 0x0134ae39 +GRAPH 0x0134af30 0x0134af36 - 0x0134af39 +GRAPH 0x0134b030 - 0x0134b039 +GRAPH 0x0134b130 - 0x0134b139 +GRAPH 0x0134b230 - 0x0134b239 +GRAPH 0x0134b330 - 0x0134b339 +GRAPH 0x0134b430 - 0x0134b439 +GRAPH 0x0134b530 - 0x0134b539 +GRAPH 0x0134b630 - 0x0134b639 +GRAPH 0x0134b730 +GRAPH 0x0134b932 - 0x0134b939 +GRAPH 0x0134ba30 - 0x0134ba34 0x0134ba36 - 0x0134ba39 +GRAPH 0x0134bb30 - 0x0134bb32 +GRAPH 0x0134bc34 - 0x0134bc39 +GRAPH 0x0134bd30 - 0x0134bd39 +GRAPH 0x0134be30 - 0x0134be34 +GRAPH 0x0134bf36 - 0x0134bf39 +GRAPH 0x0134c030 - 0x0134c039 +GRAPH 0x0134c130 - 0x0134c135 +GRAPH 0x0134c238 0x0134c239 +GRAPH 0x0134c330 - 0x0134c339 +GRAPH 0x0134c430 0x0134c432 - 0x0134c434 0x0134c436 0x0134c437 +GRAPH 0x0134c630 - 0x0134c639 +GRAPH 0x0134c730 - 0x0134c739 +GRAPH 0x0134c830 - 0x0134c839 +GRAPH 0x0134c930 - 0x0134c939 +GRAPH 0x0134ca30 - 0x0134ca39 +GRAPH 0x0134cb30 - 0x0134cb39 +GRAPH 0x0134cc30 - 0x0134cc39 +GRAPH 0x0134cd30 - 0x0134cd39 +GRAPH 0x0134ce30 - 0x0134ce33 0x0134ce37 +GRAPH 0x0134cf32 +GRAPH 0x0134d339 +GRAPH 0x0134d430 0x0134d431 +GRAPH 0x0134d630 - 0x0134d639 +GRAPH 0x0134d730 - 0x0134d739 +GRAPH 0x0134d830 - 0x0134d839 +GRAPH 0x0134d930 - 0x0134d939 +GRAPH 0x0134da30 - 0x0134da39 +GRAPH 0x0134db30 - 0x0134db39 +GRAPH 0x0134dc30 - 0x0134dc39 +GRAPH 0x0134dd30 - 0x0134dd39 +GRAPH 0x0134de30 - 0x0134de37 +GRAPH 0x0134df36 - 0x0134df39 +GRAPH 0x0134e030 - 0x0134e039 +GRAPH 0x0134e130 - 0x0134e139 +GRAPH 0x0134e230 - 0x0134e239 +GRAPH 0x0134e330 - 0x0134e337 +GRAPH 0x0136b637 - 0x0136b639 +GRAPH 0x0136b730 - 0x0136b739 +GRAPH 0x0136b830 - 0x0136b839 +GRAPH 0x0136b930 - 0x0136b933 +GRAPH 0x0136c033 - 0x0136c036 +GRAPH 0x0139a434 - 0x0139a439 +GRAPH 0x0139a531 - 0x0139a535 +GRAPH 0x0139a631 0x0139a632 +GRAPH 0x0139a731 0x0139a732 +GRAPH 0x0139a836 - 0x0139a838 +GRAPH 0x0139ae34 +GRAPH 0x0139b434 - 0x0139b439 +GRAPH 0x0139b530 - 0x0139b539 +GRAPH 0x0139b630 - 0x0139b637 +GRAPH 0x0336c739 +GRAPH 0x0336c830 - 0x0336c839 +GRAPH 0x0336c930 - 0x0336c939 +GRAPH 0x0336ca30 - 0x0336ca39 +GRAPH 0x0336cb30 - 0x0336cb39 +GRAPH 0x0336cc30 - 0x0336cc39 +GRAPH 0x0336cd30 - 0x0336cd39 +GRAPH 0x0336ce30 - 0x0336ce39 +GRAPH 0x0336cf30 - 0x0336cf39 +GRAPH 0x0336d030 - 0x0336d039 +GRAPH 0x0336d130 - 0x0336d139 +GRAPH 0x0336d230 - 0x0336d239 +GRAPH 0x0336d330 - 0x0336d339 +GRAPH 0x0336d430 - 0x0336d439 +GRAPH 0x0336d530 - 0x0336d539 +GRAPH 0x0336d630 - 0x0336d639 +GRAPH 0x0336d730 - 0x0336d739 +GRAPH 0x0336d830 - 0x0336d839 +GRAPH 0x0336d930 - 0x0336d939 +GRAPH 0x0336da30 - 0x0336da39 +GRAPH 0x0336db30 - 0x0336db39 +GRAPH 0x0336dc30 - 0x0336dc39 +GRAPH 0x0336dd30 - 0x0336dd39 +GRAPH 0x0336de30 - 0x0336de39 +GRAPH 0x0336df30 - 0x0336df39 +GRAPH 0x0336e030 - 0x0336e039 +GRAPH 0x0336e130 - 0x0336e139 +GRAPH 0x0336e230 - 0x0336e239 +GRAPH 0x0336e330 - 0x0336e339 +GRAPH 0x0336e430 - 0x0336e439 +GRAPH 0x0336e530 - 0x0336e539 +GRAPH 0x0336e630 - 0x0336e639 +GRAPH 0x0336e730 - 0x0336e739 +GRAPH 0x0336e830 - 0x0336e839 +GRAPH 0x0336e930 - 0x0336e939 +GRAPH 0x0336ea30 - 0x0336ea39 +GRAPH 0x0336eb30 - 0x0336eb39 +GRAPH 0x0336ec30 - 0x0336ec39 +GRAPH 0x0336ed30 - 0x0336ed39 +GRAPH 0x0336ee30 - 0x0336ee39 +GRAPH 0x0336ef30 - 0x0336ef39 +GRAPH 0x0336f030 - 0x0336f039 +GRAPH 0x0336f130 - 0x0336f139 +GRAPH 0x0336f230 - 0x0336f239 +GRAPH 0x0336f330 - 0x0336f339 +GRAPH 0x0336f430 - 0x0336f439 +GRAPH 0x0336f530 - 0x0336f539 +GRAPH 0x0336f630 - 0x0336f639 +GRAPH 0x0336f730 - 0x0336f739 +GRAPH 0x0336f830 - 0x0336f839 +GRAPH 0x0336f930 - 0x0336f939 +GRAPH 0x0336fa30 - 0x0336fa39 +GRAPH 0x0336fb30 - 0x0336fb39 +GRAPH 0x0336fc30 - 0x0336fc39 +GRAPH 0x0336fd30 - 0x0336fd39 +GRAPH 0x0336fe30 - 0x0336fe39 +GRAPH 0x03378130 - 0x03378139 +GRAPH 0x03378230 - 0x03378239 +GRAPH 0x03378330 - 0x03378339 +GRAPH 0x03378430 - 0x03378439 +GRAPH 0x03378530 - 0x03378539 +GRAPH 0x03378630 - 0x03378639 +GRAPH 0x03378730 - 0x03378739 +GRAPH 0x03378830 - 0x03378839 +GRAPH 0x03378930 - 0x03378939 +GRAPH 0x03378a30 - 0x03378a39 +GRAPH 0x03378b30 - 0x03378b39 +GRAPH 0x03378c30 - 0x03378c39 +GRAPH 0x03378d30 - 0x03378d39 +GRAPH 0x03378e30 - 0x03378e39 +GRAPH 0x03378f30 - 0x03378f39 +GRAPH 0x03379030 - 0x03379039 +GRAPH 0x03379130 - 0x03379139 +GRAPH 0x03379230 - 0x03379239 +GRAPH 0x03379330 - 0x03379339 +GRAPH 0x03379430 - 0x03379439 +GRAPH 0x03379530 - 0x03379539 +GRAPH 0x03379630 - 0x03379639 +GRAPH 0x03379730 - 0x03379739 +GRAPH 0x03379830 - 0x03379839 +GRAPH 0x03379930 - 0x03379939 +GRAPH 0x03379a30 - 0x03379a39 +GRAPH 0x03379b30 - 0x03379b39 +GRAPH 0x03379c30 - 0x03379c39 +GRAPH 0x03379d30 - 0x03379d39 +GRAPH 0x03379e30 - 0x03379e39 +GRAPH 0x03379f30 - 0x03379f39 +GRAPH 0x0337a030 - 0x0337a039 +GRAPH 0x0337a130 - 0x0337a139 +GRAPH 0x0337a230 - 0x0337a239 +GRAPH 0x0337a330 - 0x0337a339 +GRAPH 0x0337a430 - 0x0337a439 +GRAPH 0x0337a530 - 0x0337a539 +GRAPH 0x0337a630 - 0x0337a639 +GRAPH 0x0337a730 - 0x0337a739 +GRAPH 0x0337a830 - 0x0337a839 +GRAPH 0x0337a930 - 0x0337a939 +GRAPH 0x0337aa30 - 0x0337aa39 +GRAPH 0x0337ab30 - 0x0337ab39 +GRAPH 0x0337ac30 - 0x0337ac39 +GRAPH 0x0337ad30 - 0x0337ad39 +GRAPH 0x0337ae30 - 0x0337ae39 +GRAPH 0x0337af30 - 0x0337af39 +GRAPH 0x0337b030 - 0x0337b039 +GRAPH 0x0337b130 - 0x0337b139 +GRAPH 0x0337b230 - 0x0337b239 +GRAPH 0x0337b330 - 0x0337b339 +GRAPH 0x0337b430 - 0x0337b439 +GRAPH 0x0337b530 - 0x0337b539 +GRAPH 0x0337b630 - 0x0337b639 +GRAPH 0x0337b730 - 0x0337b739 +GRAPH 0x0337b830 - 0x0337b839 +GRAPH 0x0337b930 - 0x0337b939 +GRAPH 0x0337ba30 - 0x0337ba39 +GRAPH 0x0337bb30 - 0x0337bb39 +GRAPH 0x0337bc30 - 0x0337bc39 +GRAPH 0x0337bd30 - 0x0337bd39 +GRAPH 0x0337be30 - 0x0337be39 +GRAPH 0x0337bf30 - 0x0337bf39 +GRAPH 0x0337c030 - 0x0337c039 +GRAPH 0x0337c130 - 0x0337c139 +GRAPH 0x0337c230 - 0x0337c239 +GRAPH 0x0337c330 - 0x0337c339 +GRAPH 0x0337c430 - 0x0337c439 +GRAPH 0x0337c530 - 0x0337c539 +GRAPH 0x0337c630 - 0x0337c639 +GRAPH 0x0337c730 - 0x0337c739 +GRAPH 0x0337c830 - 0x0337c839 +GRAPH 0x0337c930 - 0x0337c939 +GRAPH 0x0337ca30 - 0x0337ca39 +GRAPH 0x0337cb30 - 0x0337cb39 +GRAPH 0x0337cc30 - 0x0337cc39 +GRAPH 0x0337cd30 - 0x0337cd39 +GRAPH 0x0337ce30 - 0x0337ce39 +GRAPH 0x0337cf30 - 0x0337cf39 +GRAPH 0x0337d030 - 0x0337d039 +GRAPH 0x0337d130 - 0x0337d139 +GRAPH 0x0337d230 - 0x0337d239 +GRAPH 0x0337d330 - 0x0337d339 +GRAPH 0x0337d430 - 0x0337d439 +GRAPH 0x0337d530 - 0x0337d539 +GRAPH 0x0337d630 - 0x0337d639 +GRAPH 0x0337d730 - 0x0337d739 +GRAPH 0x0337d830 - 0x0337d839 +GRAPH 0x0337d930 - 0x0337d939 +GRAPH 0x0337da30 - 0x0337da39 +GRAPH 0x0337db30 - 0x0337db39 +GRAPH 0x0337dc30 - 0x0337dc39 +GRAPH 0x0337dd30 - 0x0337dd39 +GRAPH 0x0337de30 - 0x0337de39 +GRAPH 0x0337df30 - 0x0337df39 +GRAPH 0x0337e030 - 0x0337e039 +GRAPH 0x0337e130 - 0x0337e139 +GRAPH 0x0337e230 - 0x0337e239 +GRAPH 0x0337e330 - 0x0337e339 +GRAPH 0x0337e430 - 0x0337e439 +GRAPH 0x0337e530 - 0x0337e539 +GRAPH 0x0337e630 - 0x0337e639 +GRAPH 0x0337e730 - 0x0337e739 +GRAPH 0x0337e830 - 0x0337e839 +GRAPH 0x0337e930 - 0x0337e939 +GRAPH 0x0337ea30 - 0x0337ea39 +GRAPH 0x0337eb30 - 0x0337eb39 +GRAPH 0x0337ec30 - 0x0337ec39 +GRAPH 0x0337ed30 - 0x0337ed39 +GRAPH 0x0337ee30 - 0x0337ee39 +GRAPH 0x0337ef30 - 0x0337ef39 +GRAPH 0x0337f030 - 0x0337f039 +GRAPH 0x0337f130 - 0x0337f139 +GRAPH 0x0337f230 - 0x0337f239 +GRAPH 0x0337f330 - 0x0337f339 +GRAPH 0x0337f430 - 0x0337f439 +GRAPH 0x0337f530 - 0x0337f539 +GRAPH 0x0337f630 - 0x0337f639 +GRAPH 0x0337f730 - 0x0337f739 +GRAPH 0x0337f830 - 0x0337f839 +GRAPH 0x0337f930 - 0x0337f939 +GRAPH 0x0337fa30 - 0x0337fa39 +GRAPH 0x0337fb30 - 0x0337fb39 +GRAPH 0x0337fc30 - 0x0337fc39 +GRAPH 0x0337fd30 - 0x0337fd39 +GRAPH 0x0337fe30 - 0x0337fe39 +GRAPH 0x03388130 - 0x03388139 +GRAPH 0x03388230 - 0x03388239 +GRAPH 0x03388330 - 0x03388339 +GRAPH 0x03388430 - 0x03388439 +GRAPH 0x03388530 - 0x03388539 +GRAPH 0x03388630 - 0x03388639 +GRAPH 0x03388730 - 0x03388739 +GRAPH 0x03388830 - 0x03388839 +GRAPH 0x03388930 - 0x03388939 +GRAPH 0x03388a30 - 0x03388a39 +GRAPH 0x03388b30 - 0x03388b39 +GRAPH 0x03388c30 - 0x03388c39 +GRAPH 0x03388d30 - 0x03388d39 +GRAPH 0x03388e30 - 0x03388e39 +GRAPH 0x03388f30 - 0x03388f39 +GRAPH 0x03389030 - 0x03389039 +GRAPH 0x03389130 - 0x03389139 +GRAPH 0x03389230 - 0x03389239 +GRAPH 0x03389330 - 0x03389339 +GRAPH 0x03389430 - 0x03389439 +GRAPH 0x03389530 - 0x03389539 +GRAPH 0x03389630 - 0x03389639 +GRAPH 0x03389730 - 0x03389739 +GRAPH 0x03389830 - 0x03389839 +GRAPH 0x03389930 - 0x03389939 +GRAPH 0x03389a30 - 0x03389a39 +GRAPH 0x03389b30 - 0x03389b39 +GRAPH 0x03389c30 - 0x03389c39 +GRAPH 0x03389d30 - 0x03389d39 +GRAPH 0x03389e30 - 0x03389e39 +GRAPH 0x03389f30 - 0x03389f39 +GRAPH 0x0338a030 - 0x0338a039 +GRAPH 0x0338a130 - 0x0338a139 +GRAPH 0x0338a230 - 0x0338a239 +GRAPH 0x0338a330 - 0x0338a339 +GRAPH 0x0338a430 - 0x0338a439 +GRAPH 0x0338a530 - 0x0338a539 +GRAPH 0x0338a630 - 0x0338a639 +GRAPH 0x0338a730 - 0x0338a739 +GRAPH 0x0338a830 - 0x0338a839 +GRAPH 0x0338a930 - 0x0338a939 +GRAPH 0x0338aa30 - 0x0338aa39 +GRAPH 0x0338ab30 - 0x0338ab39 +GRAPH 0x0338ac30 - 0x0338ac39 +GRAPH 0x0338ad30 - 0x0338ad39 +GRAPH 0x0338ae30 - 0x0338ae39 +GRAPH 0x0338af30 - 0x0338af39 +GRAPH 0x0338b030 - 0x0338b039 +GRAPH 0x0338b130 - 0x0338b139 +GRAPH 0x0338b230 - 0x0338b239 +GRAPH 0x0338b330 - 0x0338b339 +GRAPH 0x0338b430 - 0x0338b439 +GRAPH 0x0338b530 - 0x0338b539 +GRAPH 0x0338b630 - 0x0338b639 +GRAPH 0x0338b730 - 0x0338b739 +GRAPH 0x0338b830 - 0x0338b839 +GRAPH 0x0338b930 - 0x0338b939 +GRAPH 0x0338ba30 - 0x0338ba39 +GRAPH 0x0338bb30 - 0x0338bb39 +GRAPH 0x0338bc30 - 0x0338bc39 +GRAPH 0x0338bd30 - 0x0338bd39 +GRAPH 0x0338be30 - 0x0338be39 +GRAPH 0x0338bf30 - 0x0338bf39 +GRAPH 0x0338c030 - 0x0338c039 +GRAPH 0x0338c130 - 0x0338c139 +GRAPH 0x0338c230 - 0x0338c239 +GRAPH 0x0338c330 - 0x0338c339 +GRAPH 0x0338c430 - 0x0338c439 +GRAPH 0x0338c530 - 0x0338c539 +GRAPH 0x0338c630 - 0x0338c639 +GRAPH 0x0338c730 - 0x0338c739 +GRAPH 0x0338c830 - 0x0338c839 +GRAPH 0x0338c930 - 0x0338c939 +GRAPH 0x0338ca30 - 0x0338ca39 +GRAPH 0x0338cb30 - 0x0338cb39 +GRAPH 0x0338cc30 - 0x0338cc39 +GRAPH 0x0338cd30 - 0x0338cd39 +GRAPH 0x0338ce30 - 0x0338ce39 +GRAPH 0x0338cf30 - 0x0338cf39 +GRAPH 0x0338d030 - 0x0338d039 +GRAPH 0x0338d130 - 0x0338d139 +GRAPH 0x0338d230 - 0x0338d239 +GRAPH 0x0338d330 - 0x0338d339 +GRAPH 0x0338d430 - 0x0338d439 +GRAPH 0x0338d530 - 0x0338d539 +GRAPH 0x0338d630 - 0x0338d639 +GRAPH 0x0338d730 - 0x0338d739 +GRAPH 0x0338d830 - 0x0338d839 +GRAPH 0x0338d930 - 0x0338d939 +GRAPH 0x0338da30 - 0x0338da39 +GRAPH 0x0338db30 - 0x0338db39 +GRAPH 0x0338dc30 - 0x0338dc39 +GRAPH 0x0338dd30 - 0x0338dd39 +GRAPH 0x0338de30 - 0x0338de39 +GRAPH 0x0338df30 - 0x0338df39 +GRAPH 0x0338e030 - 0x0338e039 +GRAPH 0x0338e130 - 0x0338e139 +GRAPH 0x0338e230 - 0x0338e239 +GRAPH 0x0338e330 - 0x0338e339 +GRAPH 0x0338e430 - 0x0338e439 +GRAPH 0x0338e530 - 0x0338e539 +GRAPH 0x0338e630 - 0x0338e639 +GRAPH 0x0338e730 - 0x0338e739 +GRAPH 0x0338e830 - 0x0338e839 +GRAPH 0x0338e930 - 0x0338e939 +GRAPH 0x0338ea30 - 0x0338ea39 +GRAPH 0x0338eb30 - 0x0338eb39 +GRAPH 0x0338ec30 - 0x0338ec39 +GRAPH 0x0338ed30 - 0x0338ed39 +GRAPH 0x0338ee30 - 0x0338ee39 +GRAPH 0x0338ef30 - 0x0338ef39 +GRAPH 0x0338f030 - 0x0338f039 +GRAPH 0x0338f130 - 0x0338f139 +GRAPH 0x0338f230 - 0x0338f239 +GRAPH 0x0338f330 - 0x0338f339 +GRAPH 0x0338f430 - 0x0338f439 +GRAPH 0x0338f530 - 0x0338f539 +GRAPH 0x0338f630 - 0x0338f639 +GRAPH 0x0338f730 - 0x0338f739 +GRAPH 0x0338f830 - 0x0338f839 +GRAPH 0x0338f930 - 0x0338f939 +GRAPH 0x0338fa30 - 0x0338fa39 +GRAPH 0x0338fb30 - 0x0338fb39 +GRAPH 0x0338fc30 - 0x0338fc39 +GRAPH 0x0338fd30 - 0x0338fd39 +GRAPH 0x0338fe30 - 0x0338fe39 +GRAPH 0x03398130 - 0x03398139 +GRAPH 0x03398230 - 0x03398239 +GRAPH 0x03398330 - 0x03398339 +GRAPH 0x03398430 - 0x03398439 +GRAPH 0x03398530 - 0x03398539 +GRAPH 0x03398630 - 0x03398639 +GRAPH 0x03398730 - 0x03398739 +GRAPH 0x03398830 - 0x03398839 +GRAPH 0x03398930 - 0x03398939 +GRAPH 0x03398a30 - 0x03398a39 +GRAPH 0x03398b30 - 0x03398b39 +GRAPH 0x03398c30 - 0x03398c39 +GRAPH 0x03398d30 - 0x03398d39 +GRAPH 0x03398e30 - 0x03398e39 +GRAPH 0x03398f30 - 0x03398f39 +GRAPH 0x03399030 - 0x03399039 +GRAPH 0x03399130 - 0x03399139 +GRAPH 0x03399230 - 0x03399239 +GRAPH 0x03399330 - 0x03399339 +GRAPH 0x03399430 - 0x03399439 +GRAPH 0x03399530 - 0x03399539 +GRAPH 0x03399630 - 0x03399639 +GRAPH 0x03399730 - 0x03399739 +GRAPH 0x03399830 - 0x03399839 +GRAPH 0x03399930 - 0x03399939 +GRAPH 0x03399a30 - 0x03399a39 +GRAPH 0x03399b30 - 0x03399b39 +GRAPH 0x03399c30 - 0x03399c39 +GRAPH 0x03399d30 - 0x03399d39 +GRAPH 0x03399e30 - 0x03399e39 +GRAPH 0x03399f30 - 0x03399f39 +GRAPH 0x0339a030 - 0x0339a039 +GRAPH 0x0339a130 - 0x0339a139 +GRAPH 0x0339a230 - 0x0339a239 +GRAPH 0x0339a330 - 0x0339a339 +GRAPH 0x0339a430 - 0x0339a439 +GRAPH 0x0339a530 - 0x0339a539 +GRAPH 0x0339a630 - 0x0339a639 +GRAPH 0x0339a730 - 0x0339a739 +GRAPH 0x0339a830 - 0x0339a839 +GRAPH 0x0339a930 - 0x0339a939 +GRAPH 0x0339aa30 - 0x0339aa39 +GRAPH 0x0339ab30 - 0x0339ab39 +GRAPH 0x0339ac30 - 0x0339ac39 +GRAPH 0x0339ad30 - 0x0339ad39 +GRAPH 0x0339ae30 - 0x0339ae39 +GRAPH 0x0339af30 - 0x0339af39 +GRAPH 0x0339b030 - 0x0339b039 +GRAPH 0x0339b130 - 0x0339b139 +GRAPH 0x0339b230 - 0x0339b239 +GRAPH 0x0339b330 - 0x0339b339 +GRAPH 0x0339b430 - 0x0339b439 +GRAPH 0x0339b530 - 0x0339b539 +GRAPH 0x0339b630 - 0x0339b639 +GRAPH 0x0339b730 - 0x0339b739 +GRAPH 0x0339b830 - 0x0339b839 +GRAPH 0x0339b930 - 0x0339b939 +GRAPH 0x0339ba30 - 0x0339ba39 +GRAPH 0x0339bb30 - 0x0339bb39 +GRAPH 0x0339bc30 - 0x0339bc39 +GRAPH 0x0339bd30 - 0x0339bd39 +GRAPH 0x0339be30 - 0x0339be39 +GRAPH 0x0339bf30 - 0x0339bf39 +GRAPH 0x0339c030 - 0x0339c039 +GRAPH 0x0339c130 - 0x0339c139 +GRAPH 0x0339c230 - 0x0339c239 +GRAPH 0x0339c330 - 0x0339c339 +GRAPH 0x0339c430 - 0x0339c439 +GRAPH 0x0339c530 - 0x0339c539 +GRAPH 0x0339c630 - 0x0339c639 +GRAPH 0x0339c730 - 0x0339c739 +GRAPH 0x0339c830 - 0x0339c839 +GRAPH 0x0339c930 - 0x0339c939 +GRAPH 0x0339ca30 - 0x0339ca39 +GRAPH 0x0339cb30 - 0x0339cb39 +GRAPH 0x0339cc30 - 0x0339cc39 +GRAPH 0x0339cd30 - 0x0339cd39 +GRAPH 0x0339ce30 - 0x0339ce39 +GRAPH 0x0339cf30 - 0x0339cf39 +GRAPH 0x0339d030 - 0x0339d039 +GRAPH 0x0339d130 - 0x0339d139 +GRAPH 0x0339d230 - 0x0339d239 +GRAPH 0x0339d330 - 0x0339d339 +GRAPH 0x0339d430 - 0x0339d439 +GRAPH 0x0339d530 - 0x0339d539 +GRAPH 0x0339d630 - 0x0339d639 +GRAPH 0x0339d730 - 0x0339d739 +GRAPH 0x0339d830 - 0x0339d839 +GRAPH 0x0339d930 - 0x0339d939 +GRAPH 0x0339da30 - 0x0339da39 +GRAPH 0x0339db30 - 0x0339db39 +GRAPH 0x0339dc30 - 0x0339dc39 +GRAPH 0x0339dd30 - 0x0339dd39 +GRAPH 0x0339de30 - 0x0339de39 +GRAPH 0x0339df30 - 0x0339df39 +GRAPH 0x0339e030 - 0x0339e039 +GRAPH 0x0339e130 - 0x0339e139 +GRAPH 0x0339e230 - 0x0339e239 +GRAPH 0x0339e330 - 0x0339e339 +GRAPH 0x0339e430 - 0x0339e439 +GRAPH 0x0339e530 - 0x0339e539 +GRAPH 0x0339e630 - 0x0339e639 +GRAPH 0x0339e730 - 0x0339e739 +GRAPH 0x0339e830 - 0x0339e839 +GRAPH 0x0339e930 - 0x0339e939 +GRAPH 0x0339ea30 - 0x0339ea39 +GRAPH 0x0339eb30 - 0x0339eb39 +GRAPH 0x0339ec30 - 0x0339ec39 +GRAPH 0x0339ed30 - 0x0339ed39 +GRAPH 0x0339ee30 - 0x0339ee39 +GRAPH 0x0339ef30 - 0x0339ef39 +GRAPH 0x0339f030 - 0x0339f039 +GRAPH 0x0339f130 - 0x0339f139 +GRAPH 0x0339f230 - 0x0339f239 +GRAPH 0x0339f330 - 0x0339f339 +GRAPH 0x0339f430 - 0x0339f439 +GRAPH 0x0339f530 - 0x0339f539 +GRAPH 0x0339f630 - 0x0339f639 +GRAPH 0x0339f730 - 0x0339f739 +GRAPH 0x0339f830 - 0x0339f839 +GRAPH 0x0339f930 - 0x0339f939 +GRAPH 0x0339fa30 - 0x0339fa39 +GRAPH 0x0339fb30 - 0x0339fb39 +GRAPH 0x0339fc30 - 0x0339fc39 +GRAPH 0x0339fd30 - 0x0339fd39 +GRAPH 0x0339fe30 - 0x0339fe39 +GRAPH 0x04308130 +GRAPH 0x0430b531 - 0x0430b539 +GRAPH 0x0430b630 - 0x0430b632 0x0430b634 - 0x0430b639 +GRAPH 0x0430b730 - 0x0430b736 0x0430b738 0x0430b739 +GRAPH 0x0430b830 - 0x0430b832 0x0430b834 0x0430b836 0x0430b837 0x0430b839 +GRAPH 0x0430b930 0x0430b932 - 0x0430b939 +GRAPH 0x0430ba30 - 0x0430ba39 +GRAPH 0x0430bb30 - 0x0430bb39 +GRAPH 0x0430bc30 - 0x0430bc39 +GRAPH 0x0430bd30 - 0x0430bd39 +GRAPH 0x0430be30 - 0x0430be39 +GRAPH 0x0430bf30 - 0x0430bf39 +GRAPH 0x0430c030 - 0x0430c039 +GRAPH 0x0430c130 - 0x0430c139 +GRAPH 0x0430c230 - 0x0430c239 +GRAPH 0x0430c330 - 0x0430c339 +GRAPH 0x0430c733 - 0x0430c739 +GRAPH 0x0430c830 - 0x0430c839 +GRAPH 0x0430c930 - 0x0430c939 +GRAPH 0x0430ca30 - 0x0430ca39 +GRAPH 0x0430cb30 - 0x0430cb39 +GRAPH 0x0430cc30 - 0x0430cc39 +GRAPH 0x0430cd30 - 0x0430cd39 +GRAPH 0x0430ce30 - 0x0430ce39 +GRAPH 0x0430cf30 - 0x0430cf39 +GRAPH 0x0430d030 - 0x0430d039 +GRAPH 0x0430d130 - 0x0430d139 +GRAPH 0x0430d230 - 0x0430d239 +GRAPH 0x0430d330 - 0x0430d339 +GRAPH 0x0430d430 - 0x0430d439 +GRAPH 0x0430d530 - 0x0430d539 +GRAPH 0x0430d630 - 0x0430d639 +GRAPH 0x0430d730 - 0x0430d739 +GRAPH 0x0430d830 - 0x0430d839 +GRAPH 0x0430d930 - 0x0430d939 +GRAPH 0x0430da30 - 0x0430da39 +GRAPH 0x0430db30 - 0x0430db39 +GRAPH 0x0430dc30 - 0x0430dc39 +GRAPH 0x0430dd30 - 0x0430dd39 +GRAPH 0x0430de30 - 0x0430de39 +GRAPH 0x0430df30 - 0x0430df39 +GRAPH 0x0430e030 - 0x0430e039 +GRAPH 0x0430e130 - 0x0430e139 +GRAPH 0x0430e230 - 0x0430e239 +GRAPH 0x0430e330 - 0x0430e339 +GRAPH 0x0430e430 - 0x0430e439 +GRAPH 0x0430e530 - 0x0430e539 +GRAPH 0x0430e630 - 0x0430e639 +GRAPH 0x0430e730 - 0x0430e739 +GRAPH 0x0430e830 - 0x0430e839 +GRAPH 0x0430e930 - 0x0430e939 +GRAPH 0x0430ea30 - 0x0430ea39 +GRAPH 0x0430eb30 - 0x0430eb35 +GRAPH 0x0430ed34 - 0x0430ed39 +GRAPH 0x0430ee30 - 0x0430ee39 +GRAPH 0x0430ef30 - 0x0430ef39 +GRAPH 0x0430f030 - 0x0430f039 +GRAPH 0x0430f130 - 0x0430f139 +GRAPH 0x0430f230 - 0x0430f239 +GRAPH 0x0430f330 - 0x0430f337 +GRAPH 0x0430f430 - 0x0430f439 +GRAPH 0x0430f530 - 0x0430f539 +GRAPH 0x0430f630 - 0x0430f639 +GRAPH 0x0430f730 - 0x0430f739 +GRAPH 0x0430f830 - 0x0430f839 +GRAPH 0x0430f930 - 0x0430f933 +GRAPH 0x0430fd34 - 0x0430fd39 +GRAPH 0x0430fe30 - 0x0430fe35 +GRAPH 0x04318130 - 0x04318139 +GRAPH 0x04318230 - 0x04318235 +GRAPH 0x04318432 - 0x04318435 +GRAPH 0x04318730 - 0x04318734 0x04318736 - 0x04318739 +GRAPH 0x04318830 - 0x04318839 +GRAPH 0x04318930 - 0x04318939 +GRAPH 0x04318a30 - 0x04318a39 +GRAPH 0x04318b30 - 0x04318b39 +GRAPH 0x04318c30 - 0x04318c39 +GRAPH 0x04318d30 - 0x04318d39 +GRAPH 0x04318e30 - 0x04318e39 +GRAPH 0x04318f30 - 0x04318f39 +GRAPH 0x04319030 - 0x04319039 +GRAPH 0x04319130 - 0x04319139 +GRAPH 0x04319230 - 0x04319239 +GRAPH 0x04319330 - 0x04319339 +GRAPH 0x04319430 - 0x04319439 +GRAPH 0x04319530 +GRAPH 0x04319732 +GRAPH 0x04319b38 0x04319b39 +GRAPH 0x04319c30 +IDEOGRAM 0x0139ee39 +IDEOGRAM 0x0139ef30 - 0x0139ef39 +IDEOGRAM 0x0139f030 - 0x0139f039 +IDEOGRAM 0x0139f130 - 0x0139f139 +IDEOGRAM 0x0139f230 - 0x0139f239 +IDEOGRAM 0x0139f330 - 0x0139f339 +IDEOGRAM 0x0139f430 - 0x0139f439 +IDEOGRAM 0x0139f530 - 0x0139f539 +IDEOGRAM 0x0139f630 - 0x0139f639 +IDEOGRAM 0x0139f730 - 0x0139f739 +IDEOGRAM 0x0139f830 - 0x0139f839 +IDEOGRAM 0x0139f930 - 0x0139f939 +IDEOGRAM 0x0139fa30 - 0x0139fa39 +IDEOGRAM 0x0139fb30 - 0x0139fb39 +IDEOGRAM 0x0139fc30 - 0x0139fc39 +IDEOGRAM 0x0139fd30 - 0x0139fd39 +IDEOGRAM 0x0139fe30 - 0x0139fe39 +IDEOGRAM 0x02308130 - 0x02308139 +IDEOGRAM 0x02308230 - 0x02308239 +IDEOGRAM 0x02308330 - 0x02308339 +IDEOGRAM 0x02308430 - 0x02308439 +IDEOGRAM 0x02308530 - 0x02308539 +IDEOGRAM 0x02308630 - 0x02308639 +IDEOGRAM 0x02308730 - 0x02308739 +IDEOGRAM 0x02308830 - 0x02308839 +IDEOGRAM 0x02308930 - 0x02308939 +IDEOGRAM 0x02308a30 - 0x02308a39 +IDEOGRAM 0x02308b30 - 0x02308b39 +IDEOGRAM 0x02308c30 - 0x02308c39 +IDEOGRAM 0x02308d30 - 0x02308d39 +IDEOGRAM 0x02308e30 - 0x02308e39 +IDEOGRAM 0x02308f30 - 0x02308f39 +IDEOGRAM 0x02309030 - 0x02309039 +IDEOGRAM 0x02309130 - 0x02309139 +IDEOGRAM 0x02309230 - 0x02309239 +IDEOGRAM 0x02309330 - 0x02309339 +IDEOGRAM 0x02309430 - 0x02309439 +IDEOGRAM 0x02309530 - 0x02309539 +IDEOGRAM 0x02309630 - 0x02309639 +IDEOGRAM 0x02309730 - 0x02309739 +IDEOGRAM 0x02309830 - 0x02309839 +IDEOGRAM 0x02309930 - 0x02309939 +IDEOGRAM 0x02309a30 - 0x02309a39 +IDEOGRAM 0x02309b30 - 0x02309b39 +IDEOGRAM 0x02309c30 - 0x02309c39 +IDEOGRAM 0x02309d30 - 0x02309d39 +IDEOGRAM 0x02309e30 - 0x02309e39 +IDEOGRAM 0x02309f30 - 0x02309f39 +IDEOGRAM 0x0230a030 - 0x0230a039 +IDEOGRAM 0x0230a130 - 0x0230a139 +IDEOGRAM 0x0230a230 - 0x0230a239 +IDEOGRAM 0x0230a330 - 0x0230a339 +IDEOGRAM 0x0230a430 - 0x0230a439 +IDEOGRAM 0x0230a530 - 0x0230a539 +IDEOGRAM 0x0230a630 - 0x0230a639 +IDEOGRAM 0x0230a730 - 0x0230a739 +IDEOGRAM 0x0230a830 - 0x0230a839 +IDEOGRAM 0x0230a930 - 0x0230a939 +IDEOGRAM 0x0230aa30 - 0x0230aa39 +IDEOGRAM 0x0230ab30 - 0x0230ab39 +IDEOGRAM 0x0230ac30 - 0x0230ac39 +IDEOGRAM 0x0230ad30 - 0x0230ad39 +IDEOGRAM 0x0230ae30 - 0x0230ae39 +IDEOGRAM 0x0230af30 - 0x0230af39 +IDEOGRAM 0x0230b030 - 0x0230b039 +IDEOGRAM 0x0230b130 - 0x0230b139 +IDEOGRAM 0x0230b230 - 0x0230b239 +IDEOGRAM 0x0230b330 - 0x0230b339 +IDEOGRAM 0x0230b430 - 0x0230b439 +IDEOGRAM 0x0230b530 - 0x0230b539 +IDEOGRAM 0x0230b630 - 0x0230b639 +IDEOGRAM 0x0230b730 - 0x0230b739 +IDEOGRAM 0x0230b830 - 0x0230b839 +IDEOGRAM 0x0230b930 - 0x0230b939 +IDEOGRAM 0x0230ba30 - 0x0230ba39 +IDEOGRAM 0x0230bb30 - 0x0230bb39 +IDEOGRAM 0x0230bc30 - 0x0230bc39 +IDEOGRAM 0x0230bd30 - 0x0230bd39 +IDEOGRAM 0x0230be30 - 0x0230be39 +IDEOGRAM 0x0230bf30 - 0x0230bf39 +IDEOGRAM 0x0230c030 - 0x0230c039 +IDEOGRAM 0x0230c130 - 0x0230c139 +IDEOGRAM 0x0230c230 - 0x0230c239 +IDEOGRAM 0x0230c330 - 0x0230c339 +IDEOGRAM 0x0230c430 - 0x0230c439 +IDEOGRAM 0x0230c530 - 0x0230c539 +IDEOGRAM 0x0230c630 - 0x0230c639 +IDEOGRAM 0x0230c730 - 0x0230c739 +IDEOGRAM 0x0230c830 - 0x0230c839 +IDEOGRAM 0x0230c930 - 0x0230c939 +IDEOGRAM 0x0230ca30 - 0x0230ca39 +IDEOGRAM 0x0230cb30 - 0x0230cb39 +IDEOGRAM 0x0230cc30 - 0x0230cc39 +IDEOGRAM 0x0230cd30 - 0x0230cd39 +IDEOGRAM 0x0230ce30 - 0x0230ce39 +IDEOGRAM 0x0230cf30 - 0x0230cf39 +IDEOGRAM 0x0230d030 - 0x0230d039 +IDEOGRAM 0x0230d130 - 0x0230d139 +IDEOGRAM 0x0230d230 - 0x0230d239 +IDEOGRAM 0x0230d330 - 0x0230d339 +IDEOGRAM 0x0230d430 - 0x0230d439 +IDEOGRAM 0x0230d530 - 0x0230d539 +IDEOGRAM 0x0230d630 - 0x0230d639 +IDEOGRAM 0x0230d730 - 0x0230d739 +IDEOGRAM 0x0230d830 - 0x0230d839 +IDEOGRAM 0x0230d930 - 0x0230d939 +IDEOGRAM 0x0230da30 - 0x0230da39 +IDEOGRAM 0x0230db30 - 0x0230db39 +IDEOGRAM 0x0230dc30 - 0x0230dc39 +IDEOGRAM 0x0230dd30 - 0x0230dd39 +IDEOGRAM 0x0230de30 - 0x0230de39 +IDEOGRAM 0x0230df30 - 0x0230df39 +IDEOGRAM 0x0230e030 - 0x0230e039 +IDEOGRAM 0x0230e130 - 0x0230e139 +IDEOGRAM 0x0230e230 - 0x0230e239 +IDEOGRAM 0x0230e330 - 0x0230e339 +IDEOGRAM 0x0230e430 - 0x0230e439 +IDEOGRAM 0x0230e530 - 0x0230e539 +IDEOGRAM 0x0230e630 - 0x0230e639 +IDEOGRAM 0x0230e730 - 0x0230e739 +IDEOGRAM 0x0230e830 - 0x0230e839 +IDEOGRAM 0x0230e930 - 0x0230e939 +IDEOGRAM 0x0230ea30 - 0x0230ea39 +IDEOGRAM 0x0230eb30 - 0x0230eb39 +IDEOGRAM 0x0230ec30 - 0x0230ec39 +IDEOGRAM 0x0230ed30 - 0x0230ed39 +IDEOGRAM 0x0230ee30 - 0x0230ee39 +IDEOGRAM 0x0230ef30 - 0x0230ef39 +IDEOGRAM 0x0230f030 - 0x0230f039 +IDEOGRAM 0x0230f130 - 0x0230f139 +IDEOGRAM 0x0230f230 - 0x0230f239 +IDEOGRAM 0x0230f330 - 0x0230f339 +IDEOGRAM 0x0230f430 - 0x0230f439 +IDEOGRAM 0x0230f530 - 0x0230f539 +IDEOGRAM 0x0230f630 - 0x0230f639 +IDEOGRAM 0x0230f730 - 0x0230f739 +IDEOGRAM 0x0230f830 - 0x0230f839 +IDEOGRAM 0x0230f930 - 0x0230f939 +IDEOGRAM 0x0230fa30 - 0x0230fa39 +IDEOGRAM 0x0230fb30 - 0x0230fb39 +IDEOGRAM 0x0230fc30 - 0x0230fc39 +IDEOGRAM 0x0230fd30 - 0x0230fd39 +IDEOGRAM 0x0230fe30 - 0x0230fe39 +IDEOGRAM 0x02318130 - 0x02318139 +IDEOGRAM 0x02318230 - 0x02318239 +IDEOGRAM 0x02318330 - 0x02318339 +IDEOGRAM 0x02318430 - 0x02318439 +IDEOGRAM 0x02318530 - 0x02318539 +IDEOGRAM 0x02318630 - 0x02318639 +IDEOGRAM 0x02318730 - 0x02318739 +IDEOGRAM 0x02318830 - 0x02318839 +IDEOGRAM 0x02318930 - 0x02318939 +IDEOGRAM 0x02318a30 - 0x02318a39 +IDEOGRAM 0x02318b30 - 0x02318b39 +IDEOGRAM 0x02318c30 - 0x02318c39 +IDEOGRAM 0x02318d30 - 0x02318d39 +IDEOGRAM 0x02318e30 - 0x02318e39 +IDEOGRAM 0x02318f30 - 0x02318f39 +IDEOGRAM 0x02319030 - 0x02319039 +IDEOGRAM 0x02319130 - 0x02319139 +IDEOGRAM 0x02319230 - 0x02319239 +IDEOGRAM 0x02319330 - 0x02319339 +IDEOGRAM 0x02319430 - 0x02319439 +IDEOGRAM 0x02319530 - 0x02319539 +IDEOGRAM 0x02319630 - 0x02319639 +IDEOGRAM 0x02319730 - 0x02319739 +IDEOGRAM 0x02319830 - 0x02319839 +IDEOGRAM 0x02319930 - 0x02319939 +IDEOGRAM 0x02319a30 - 0x02319a39 +IDEOGRAM 0x02319b30 - 0x02319b39 +IDEOGRAM 0x02319c30 - 0x02319c39 +IDEOGRAM 0x02319d30 - 0x02319d39 +IDEOGRAM 0x02319e30 - 0x02319e39 +IDEOGRAM 0x02319f30 - 0x02319f39 +IDEOGRAM 0x0231a030 - 0x0231a039 +IDEOGRAM 0x0231a130 - 0x0231a139 +IDEOGRAM 0x0231a230 - 0x0231a239 +IDEOGRAM 0x0231a330 - 0x0231a339 +IDEOGRAM 0x0231a430 - 0x0231a439 +IDEOGRAM 0x0231a530 - 0x0231a539 +IDEOGRAM 0x0231a630 - 0x0231a639 +IDEOGRAM 0x0231a730 - 0x0231a739 +IDEOGRAM 0x0231a830 - 0x0231a839 +IDEOGRAM 0x0231a930 - 0x0231a939 +IDEOGRAM 0x0231aa30 - 0x0231aa39 +IDEOGRAM 0x0231ab30 - 0x0231ab39 +IDEOGRAM 0x0231ac30 - 0x0231ac39 +IDEOGRAM 0x0231ad30 - 0x0231ad39 +IDEOGRAM 0x0231ae30 - 0x0231ae39 +IDEOGRAM 0x0231af30 - 0x0231af39 +IDEOGRAM 0x0231b030 - 0x0231b039 +IDEOGRAM 0x0231b130 - 0x0231b139 +IDEOGRAM 0x0231b230 - 0x0231b239 +IDEOGRAM 0x0231b330 - 0x0231b339 +IDEOGRAM 0x0231b430 - 0x0231b439 +IDEOGRAM 0x0231b530 - 0x0231b539 +IDEOGRAM 0x0231b630 - 0x0231b639 +IDEOGRAM 0x0231b730 - 0x0231b739 +IDEOGRAM 0x0231b830 - 0x0231b839 +IDEOGRAM 0x0231b930 - 0x0231b939 +IDEOGRAM 0x0231ba30 - 0x0231ba39 +IDEOGRAM 0x0231bb30 - 0x0231bb39 +IDEOGRAM 0x0231bc30 - 0x0231bc39 +IDEOGRAM 0x0231bd30 - 0x0231bd39 +IDEOGRAM 0x0231be30 - 0x0231be39 +IDEOGRAM 0x0231bf30 - 0x0231bf39 +IDEOGRAM 0x0231c030 - 0x0231c039 +IDEOGRAM 0x0231c130 - 0x0231c139 +IDEOGRAM 0x0231c230 - 0x0231c239 +IDEOGRAM 0x0231c330 - 0x0231c339 +IDEOGRAM 0x0231c430 - 0x0231c439 +IDEOGRAM 0x0231c530 - 0x0231c539 +IDEOGRAM 0x0231c630 - 0x0231c639 +IDEOGRAM 0x0231c730 - 0x0231c739 +IDEOGRAM 0x0231c830 - 0x0231c839 +IDEOGRAM 0x0231c930 - 0x0231c939 +IDEOGRAM 0x0231ca30 - 0x0231ca39 +IDEOGRAM 0x0231cb30 - 0x0231cb39 +IDEOGRAM 0x0231cc30 - 0x0231cc39 +IDEOGRAM 0x0231cd30 - 0x0231cd39 +IDEOGRAM 0x0231ce30 - 0x0231ce39 +IDEOGRAM 0x0231cf30 - 0x0231cf39 +IDEOGRAM 0x0231d030 - 0x0231d039 +IDEOGRAM 0x0231d130 - 0x0231d139 +IDEOGRAM 0x0231d230 - 0x0231d239 +IDEOGRAM 0x0231d330 - 0x0231d339 +IDEOGRAM 0x0231d430 - 0x0231d439 +IDEOGRAM 0x0231d530 - 0x0231d539 +IDEOGRAM 0x0231d630 - 0x0231d639 +IDEOGRAM 0x0231d730 - 0x0231d739 +IDEOGRAM 0x0231d830 - 0x0231d839 +IDEOGRAM 0x0231d930 - 0x0231d939 +IDEOGRAM 0x0231da30 - 0x0231da39 +IDEOGRAM 0x0231db30 - 0x0231db39 +IDEOGRAM 0x0231dc30 - 0x0231dc39 +IDEOGRAM 0x0231dd30 - 0x0231dd39 +IDEOGRAM 0x0231de30 - 0x0231de39 +IDEOGRAM 0x0231df30 - 0x0231df39 +IDEOGRAM 0x0231e030 - 0x0231e039 +IDEOGRAM 0x0231e130 - 0x0231e139 +IDEOGRAM 0x0231e230 - 0x0231e239 +IDEOGRAM 0x0231e330 - 0x0231e339 +IDEOGRAM 0x0231e430 - 0x0231e439 +IDEOGRAM 0x0231e530 - 0x0231e539 +IDEOGRAM 0x0231e630 - 0x0231e639 +IDEOGRAM 0x0231e730 - 0x0231e739 +IDEOGRAM 0x0231e830 - 0x0231e839 +IDEOGRAM 0x0231e930 - 0x0231e939 +IDEOGRAM 0x0231ea30 - 0x0231ea39 +IDEOGRAM 0x0231eb30 - 0x0231eb39 +IDEOGRAM 0x0231ec30 - 0x0231ec39 +IDEOGRAM 0x0231ed30 - 0x0231ed39 +IDEOGRAM 0x0231ee30 - 0x0231ee39 +IDEOGRAM 0x0231ef30 - 0x0231ef39 +IDEOGRAM 0x0231f030 - 0x0231f039 +IDEOGRAM 0x0231f130 - 0x0231f139 +IDEOGRAM 0x0231f230 - 0x0231f239 +IDEOGRAM 0x0231f330 - 0x0231f339 +IDEOGRAM 0x0231f430 - 0x0231f439 +IDEOGRAM 0x0231f530 - 0x0231f539 +IDEOGRAM 0x0231f630 - 0x0231f639 +IDEOGRAM 0x0231f730 - 0x0231f739 +IDEOGRAM 0x0231f830 - 0x0231f839 +IDEOGRAM 0x0231f930 - 0x0231f939 +IDEOGRAM 0x0231fa30 - 0x0231fa39 +IDEOGRAM 0x0231fb30 - 0x0231fb39 +IDEOGRAM 0x0231fc30 - 0x0231fc39 +IDEOGRAM 0x0231fd30 - 0x0231fd39 +IDEOGRAM 0x0231fe30 - 0x0231fe39 +IDEOGRAM 0x02328130 - 0x02328139 +IDEOGRAM 0x02328230 - 0x02328239 +IDEOGRAM 0x02328330 - 0x02328339 +IDEOGRAM 0x02328430 - 0x02328439 +IDEOGRAM 0x02328530 - 0x02328539 +IDEOGRAM 0x02328630 - 0x02328639 +IDEOGRAM 0x02328730 - 0x02328739 +IDEOGRAM 0x02328830 - 0x02328839 +IDEOGRAM 0x02328930 - 0x02328939 +IDEOGRAM 0x02328a30 - 0x02328a39 +IDEOGRAM 0x02328b30 - 0x02328b39 +IDEOGRAM 0x02328c30 - 0x02328c39 +IDEOGRAM 0x02328d30 - 0x02328d39 +IDEOGRAM 0x02328e30 - 0x02328e39 +IDEOGRAM 0x02328f30 - 0x02328f39 +IDEOGRAM 0x02329030 - 0x02329039 +IDEOGRAM 0x02329130 - 0x02329139 +IDEOGRAM 0x02329230 - 0x02329239 +IDEOGRAM 0x02329330 - 0x02329339 +IDEOGRAM 0x02329430 - 0x02329439 +IDEOGRAM 0x02329530 - 0x02329539 +IDEOGRAM 0x02329630 - 0x02329639 +IDEOGRAM 0x02329730 - 0x02329739 +IDEOGRAM 0x02329830 - 0x02329839 +IDEOGRAM 0x02329930 - 0x02329939 +IDEOGRAM 0x02329a30 - 0x02329a39 +IDEOGRAM 0x02329b30 - 0x02329b39 +IDEOGRAM 0x02329c30 - 0x02329c39 +IDEOGRAM 0x02329d30 - 0x02329d39 +IDEOGRAM 0x02329e30 - 0x02329e39 +IDEOGRAM 0x02329f30 - 0x02329f39 +IDEOGRAM 0x0232a030 - 0x0232a039 +IDEOGRAM 0x0232a130 - 0x0232a139 +IDEOGRAM 0x0232a230 - 0x0232a239 +IDEOGRAM 0x0232a330 - 0x0232a339 +IDEOGRAM 0x0232a430 - 0x0232a439 +IDEOGRAM 0x0232a530 - 0x0232a539 +IDEOGRAM 0x0232a630 - 0x0232a639 +IDEOGRAM 0x0232a730 - 0x0232a739 +IDEOGRAM 0x0232a830 - 0x0232a839 +IDEOGRAM 0x0232a930 - 0x0232a939 +IDEOGRAM 0x0232aa30 - 0x0232aa39 +IDEOGRAM 0x0232ab30 - 0x0232ab39 +IDEOGRAM 0x0232ac30 - 0x0232ac39 +IDEOGRAM 0x0232ad30 - 0x0232ad39 +IDEOGRAM 0x0232ae30 - 0x0232ae39 +IDEOGRAM 0x0232af30 - 0x0232af39 +IDEOGRAM 0x0232b030 - 0x0232b039 +IDEOGRAM 0x0232b130 - 0x0232b139 +IDEOGRAM 0x0232b230 - 0x0232b239 +IDEOGRAM 0x0232b330 - 0x0232b339 +IDEOGRAM 0x0232b430 - 0x0232b439 +IDEOGRAM 0x0232b530 - 0x0232b539 +IDEOGRAM 0x0232b630 - 0x0232b639 +IDEOGRAM 0x0232b730 - 0x0232b739 +IDEOGRAM 0x0232b830 - 0x0232b839 +IDEOGRAM 0x0232b930 - 0x0232b939 +IDEOGRAM 0x0232ba30 - 0x0232ba39 +IDEOGRAM 0x0232bb30 - 0x0232bb39 +IDEOGRAM 0x0232bc30 - 0x0232bc39 +IDEOGRAM 0x0232bd30 - 0x0232bd39 +IDEOGRAM 0x0232be30 - 0x0232be39 +IDEOGRAM 0x0232bf30 - 0x0232bf39 +IDEOGRAM 0x0232c030 - 0x0232c039 +IDEOGRAM 0x0232c130 - 0x0232c139 +IDEOGRAM 0x0232c230 - 0x0232c239 +IDEOGRAM 0x0232c330 - 0x0232c339 +IDEOGRAM 0x0232c430 - 0x0232c439 +IDEOGRAM 0x0232c530 - 0x0232c539 +IDEOGRAM 0x0232c630 - 0x0232c639 +IDEOGRAM 0x0232c730 - 0x0232c739 +IDEOGRAM 0x0232c830 - 0x0232c839 +IDEOGRAM 0x0232c930 - 0x0232c939 +IDEOGRAM 0x0232ca30 - 0x0232ca39 +IDEOGRAM 0x0232cb30 - 0x0232cb39 +IDEOGRAM 0x0232cc30 - 0x0232cc39 +IDEOGRAM 0x0232cd30 - 0x0232cd39 +IDEOGRAM 0x0232ce30 - 0x0232ce39 +IDEOGRAM 0x0232cf30 - 0x0232cf39 +IDEOGRAM 0x0232d030 - 0x0232d039 +IDEOGRAM 0x0232d130 - 0x0232d139 +IDEOGRAM 0x0232d230 - 0x0232d239 +IDEOGRAM 0x0232d330 - 0x0232d339 +IDEOGRAM 0x0232d430 - 0x0232d439 +IDEOGRAM 0x0232d530 - 0x0232d539 +IDEOGRAM 0x0232d630 - 0x0232d639 +IDEOGRAM 0x0232d730 - 0x0232d739 +IDEOGRAM 0x0232d830 - 0x0232d839 +IDEOGRAM 0x0232d930 - 0x0232d939 +IDEOGRAM 0x0232da30 - 0x0232da39 +IDEOGRAM 0x0232db30 - 0x0232db39 +IDEOGRAM 0x0232dc30 - 0x0232dc39 +IDEOGRAM 0x0232dd30 - 0x0232dd39 +IDEOGRAM 0x0232de30 - 0x0232de39 +IDEOGRAM 0x0232df30 - 0x0232df39 +IDEOGRAM 0x0232e030 - 0x0232e039 +IDEOGRAM 0x0232e130 - 0x0232e139 +IDEOGRAM 0x0232e230 - 0x0232e239 +IDEOGRAM 0x0232e330 - 0x0232e339 +IDEOGRAM 0x0232e430 - 0x0232e439 +IDEOGRAM 0x0232e530 - 0x0232e539 +IDEOGRAM 0x0232e630 - 0x0232e639 +IDEOGRAM 0x0232e730 - 0x0232e739 +IDEOGRAM 0x0232e830 - 0x0232e839 +IDEOGRAM 0x0232e930 - 0x0232e939 +IDEOGRAM 0x0232ea30 - 0x0232ea39 +IDEOGRAM 0x0232eb30 - 0x0232eb39 +IDEOGRAM 0x0232ec30 - 0x0232ec39 +IDEOGRAM 0x0232ed30 - 0x0232ed39 +IDEOGRAM 0x0232ee30 - 0x0232ee39 +IDEOGRAM 0x0232ef30 - 0x0232ef39 +IDEOGRAM 0x0232f030 - 0x0232f039 +IDEOGRAM 0x0232f130 - 0x0232f139 +IDEOGRAM 0x0232f230 - 0x0232f239 +IDEOGRAM 0x0232f330 - 0x0232f339 +IDEOGRAM 0x0232f430 - 0x0232f439 +IDEOGRAM 0x0232f530 - 0x0232f539 +IDEOGRAM 0x0232f630 - 0x0232f639 +IDEOGRAM 0x0232f730 - 0x0232f739 +IDEOGRAM 0x0232f830 - 0x0232f839 +IDEOGRAM 0x0232f930 - 0x0232f939 +IDEOGRAM 0x0232fa30 - 0x0232fa39 +IDEOGRAM 0x0232fb30 - 0x0232fb39 +IDEOGRAM 0x0232fc30 - 0x0232fc39 +IDEOGRAM 0x0232fd30 - 0x0232fd39 +IDEOGRAM 0x0232fe30 - 0x0232fe39 +IDEOGRAM 0x02338130 - 0x02338139 +IDEOGRAM 0x02338230 - 0x02338239 +IDEOGRAM 0x02338330 - 0x02338339 +IDEOGRAM 0x02338430 - 0x02338439 +IDEOGRAM 0x02338530 - 0x02338539 +IDEOGRAM 0x02338630 - 0x02338639 +IDEOGRAM 0x02338730 - 0x02338739 +IDEOGRAM 0x02338830 - 0x02338839 +IDEOGRAM 0x02338930 - 0x02338939 +IDEOGRAM 0x02338a30 - 0x02338a39 +IDEOGRAM 0x02338b30 - 0x02338b39 +IDEOGRAM 0x02338c30 - 0x02338c39 +IDEOGRAM 0x02338d30 - 0x02338d39 +IDEOGRAM 0x02338e30 - 0x02338e39 +IDEOGRAM 0x02338f30 - 0x02338f39 +IDEOGRAM 0x02339030 - 0x02339039 +IDEOGRAM 0x02339130 - 0x02339139 +IDEOGRAM 0x02339230 - 0x02339239 +IDEOGRAM 0x02339330 - 0x02339339 +IDEOGRAM 0x02339430 - 0x02339439 +IDEOGRAM 0x02339530 - 0x02339539 +IDEOGRAM 0x02339630 - 0x02339639 +IDEOGRAM 0x02339730 - 0x02339739 +IDEOGRAM 0x02339830 - 0x02339839 +IDEOGRAM 0x02339930 - 0x02339939 +IDEOGRAM 0x02339a30 - 0x02339a39 +IDEOGRAM 0x02339b30 - 0x02339b39 +IDEOGRAM 0x02339c30 - 0x02339c39 +IDEOGRAM 0x02339d30 - 0x02339d39 +IDEOGRAM 0x02339e30 - 0x02339e39 +IDEOGRAM 0x02339f30 - 0x02339f39 +IDEOGRAM 0x0233a030 - 0x0233a039 +IDEOGRAM 0x0233a130 - 0x0233a139 +IDEOGRAM 0x0233a230 - 0x0233a239 +IDEOGRAM 0x0233a330 - 0x0233a339 +IDEOGRAM 0x0233a430 - 0x0233a439 +IDEOGRAM 0x0233a530 - 0x0233a539 +IDEOGRAM 0x0233a630 - 0x0233a639 +IDEOGRAM 0x0233a730 - 0x0233a739 +IDEOGRAM 0x0233a830 - 0x0233a839 +IDEOGRAM 0x0233a930 - 0x0233a939 +IDEOGRAM 0x0233aa30 - 0x0233aa39 +IDEOGRAM 0x0233ab30 - 0x0233ab39 +IDEOGRAM 0x0233ac30 - 0x0233ac39 +IDEOGRAM 0x0233ad30 - 0x0233ad39 +IDEOGRAM 0x0233ae30 - 0x0233ae39 +IDEOGRAM 0x0233af30 - 0x0233af39 +IDEOGRAM 0x0233b030 - 0x0233b039 +IDEOGRAM 0x0233b130 - 0x0233b139 +IDEOGRAM 0x0233b230 - 0x0233b239 +IDEOGRAM 0x0233b330 - 0x0233b339 +IDEOGRAM 0x0233b430 - 0x0233b439 +IDEOGRAM 0x0233b530 - 0x0233b539 +IDEOGRAM 0x0233b630 - 0x0233b639 +IDEOGRAM 0x0233b730 - 0x0233b739 +IDEOGRAM 0x0233b830 - 0x0233b839 +IDEOGRAM 0x0233b930 - 0x0233b939 +IDEOGRAM 0x0233ba30 - 0x0233ba39 +IDEOGRAM 0x0233bb30 - 0x0233bb39 +IDEOGRAM 0x0233bc30 - 0x0233bc39 +IDEOGRAM 0x0233bd30 - 0x0233bd39 +IDEOGRAM 0x0233be30 - 0x0233be39 +IDEOGRAM 0x0233bf30 - 0x0233bf39 +IDEOGRAM 0x0233c030 - 0x0233c039 +IDEOGRAM 0x0233c130 - 0x0233c139 +IDEOGRAM 0x0233c230 - 0x0233c239 +IDEOGRAM 0x0233c330 - 0x0233c339 +IDEOGRAM 0x0233c430 - 0x0233c439 +IDEOGRAM 0x0233c530 - 0x0233c539 +IDEOGRAM 0x0233c630 - 0x0233c639 +IDEOGRAM 0x0233c730 - 0x0233c739 +IDEOGRAM 0x0233c830 - 0x0233c839 +IDEOGRAM 0x0233c930 - 0x0233c939 +IDEOGRAM 0x0233ca30 - 0x0233ca39 +IDEOGRAM 0x0233cb30 - 0x0233cb39 +IDEOGRAM 0x0233cc30 - 0x0233cc39 +IDEOGRAM 0x0233cd30 - 0x0233cd39 +IDEOGRAM 0x0233ce30 - 0x0233ce39 +IDEOGRAM 0x0233cf30 - 0x0233cf39 +IDEOGRAM 0x0233d030 - 0x0233d039 +IDEOGRAM 0x0233d130 - 0x0233d139 +IDEOGRAM 0x0233d230 - 0x0233d239 +IDEOGRAM 0x0233d330 - 0x0233d339 +IDEOGRAM 0x0233d430 - 0x0233d439 +IDEOGRAM 0x0233d530 - 0x0233d539 +IDEOGRAM 0x0233d630 - 0x0233d639 +IDEOGRAM 0x0233d730 - 0x0233d739 +IDEOGRAM 0x0233d830 - 0x0233d839 +IDEOGRAM 0x0233d930 - 0x0233d939 +IDEOGRAM 0x0233da30 - 0x0233da39 +IDEOGRAM 0x0233db30 - 0x0233db39 +IDEOGRAM 0x0233dc30 - 0x0233dc39 +IDEOGRAM 0x0233dd30 - 0x0233dd39 +IDEOGRAM 0x0233de30 - 0x0233de39 +IDEOGRAM 0x0233df30 - 0x0233df39 +IDEOGRAM 0x0233e030 - 0x0233e039 +IDEOGRAM 0x0233e130 - 0x0233e139 +IDEOGRAM 0x0233e230 - 0x0233e239 +IDEOGRAM 0x0233e330 - 0x0233e339 +IDEOGRAM 0x0233e430 - 0x0233e439 +IDEOGRAM 0x0233e530 - 0x0233e539 +IDEOGRAM 0x0233e630 - 0x0233e639 +IDEOGRAM 0x0233e730 - 0x0233e739 +IDEOGRAM 0x0233e830 - 0x0233e839 +IDEOGRAM 0x0233e930 - 0x0233e939 +IDEOGRAM 0x0233ea30 - 0x0233ea39 +IDEOGRAM 0x0233eb30 - 0x0233eb39 +IDEOGRAM 0x0233ec30 - 0x0233ec39 +IDEOGRAM 0x0233ed30 - 0x0233ed39 +IDEOGRAM 0x0233ee30 - 0x0233ee39 +IDEOGRAM 0x0233ef30 - 0x0233ef39 +IDEOGRAM 0x0233f030 - 0x0233f039 +IDEOGRAM 0x0233f130 - 0x0233f139 +IDEOGRAM 0x0233f230 - 0x0233f239 +IDEOGRAM 0x0233f330 - 0x0233f339 +IDEOGRAM 0x0233f430 - 0x0233f439 +IDEOGRAM 0x0233f530 - 0x0233f539 +IDEOGRAM 0x0233f630 - 0x0233f639 +IDEOGRAM 0x0233f730 - 0x0233f739 +IDEOGRAM 0x0233f830 - 0x0233f839 +IDEOGRAM 0x0233f930 - 0x0233f939 +IDEOGRAM 0x0233fa30 - 0x0233fa39 +IDEOGRAM 0x0233fb30 - 0x0233fb39 +IDEOGRAM 0x0233fc30 - 0x0233fc39 +IDEOGRAM 0x0233fd30 - 0x0233fd39 +IDEOGRAM 0x0233fe30 - 0x0233fe39 +IDEOGRAM 0x02348130 - 0x02348139 +IDEOGRAM 0x02348230 - 0x02348239 +IDEOGRAM 0x02348330 - 0x02348339 +IDEOGRAM 0x02348430 - 0x02348439 +IDEOGRAM 0x02348530 - 0x02348539 +IDEOGRAM 0x02348630 - 0x02348639 +IDEOGRAM 0x02348730 - 0x02348739 +IDEOGRAM 0x02348830 - 0x02348839 +IDEOGRAM 0x02348930 - 0x02348939 +IDEOGRAM 0x02348a30 - 0x02348a39 +IDEOGRAM 0x02348b30 - 0x02348b39 +IDEOGRAM 0x02348c30 - 0x02348c39 +IDEOGRAM 0x02348d30 - 0x02348d39 +IDEOGRAM 0x02348e30 - 0x02348e39 +IDEOGRAM 0x02348f30 - 0x02348f39 +IDEOGRAM 0x02349030 - 0x02349039 +IDEOGRAM 0x02349130 - 0x02349139 +IDEOGRAM 0x02349230 - 0x02349239 +IDEOGRAM 0x02349330 - 0x02349339 +IDEOGRAM 0x02349430 - 0x02349439 +IDEOGRAM 0x02349530 - 0x02349539 +IDEOGRAM 0x02349630 - 0x02349639 +IDEOGRAM 0x02349730 - 0x02349739 +IDEOGRAM 0x02349830 - 0x02349839 +IDEOGRAM 0x02349930 - 0x02349939 +IDEOGRAM 0x02349a30 - 0x02349a39 +IDEOGRAM 0x02349b30 - 0x02349b39 +IDEOGRAM 0x02349c30 - 0x02349c39 +IDEOGRAM 0x02349d30 - 0x02349d39 +IDEOGRAM 0x02349e30 - 0x02349e39 +IDEOGRAM 0x02349f30 - 0x02349f39 +IDEOGRAM 0x0234a030 - 0x0234a039 +IDEOGRAM 0x0234a130 - 0x0234a139 +IDEOGRAM 0x0234a230 - 0x0234a239 +IDEOGRAM 0x0234a330 - 0x0234a339 +IDEOGRAM 0x0234a430 - 0x0234a439 +IDEOGRAM 0x0234a530 - 0x0234a539 +IDEOGRAM 0x0234a630 - 0x0234a639 +IDEOGRAM 0x0234a730 - 0x0234a739 +IDEOGRAM 0x0234a830 - 0x0234a839 +IDEOGRAM 0x0234a930 - 0x0234a939 +IDEOGRAM 0x0234aa30 - 0x0234aa39 +IDEOGRAM 0x0234ab30 - 0x0234ab39 +IDEOGRAM 0x0234ac30 - 0x0234ac39 +IDEOGRAM 0x0234ad30 - 0x0234ad39 +IDEOGRAM 0x0234ae30 - 0x0234ae39 +IDEOGRAM 0x0234af30 - 0x0234af39 +IDEOGRAM 0x0234b030 - 0x0234b039 +IDEOGRAM 0x0234b130 - 0x0234b139 +IDEOGRAM 0x0234b230 - 0x0234b239 +IDEOGRAM 0x0234b330 - 0x0234b339 +IDEOGRAM 0x0234b430 - 0x0234b439 +IDEOGRAM 0x0234b530 - 0x0234b539 +IDEOGRAM 0x0234b630 - 0x0234b639 +IDEOGRAM 0x0234b730 - 0x0234b739 +IDEOGRAM 0x0234b830 - 0x0234b839 +IDEOGRAM 0x0234b930 - 0x0234b939 +IDEOGRAM 0x0234ba30 - 0x0234ba39 +IDEOGRAM 0x0234bb30 - 0x0234bb39 +IDEOGRAM 0x0234bc30 - 0x0234bc39 +IDEOGRAM 0x0234bd30 - 0x0234bd39 +IDEOGRAM 0x0234be30 - 0x0234be39 +IDEOGRAM 0x0234bf30 - 0x0234bf39 +IDEOGRAM 0x0234c030 - 0x0234c039 +IDEOGRAM 0x0234c130 - 0x0234c139 +IDEOGRAM 0x0234c230 - 0x0234c239 +IDEOGRAM 0x0234c330 - 0x0234c339 +IDEOGRAM 0x0234c430 - 0x0234c439 +IDEOGRAM 0x0234c530 - 0x0234c539 +IDEOGRAM 0x0234c630 - 0x0234c639 +IDEOGRAM 0x0234c730 - 0x0234c739 +IDEOGRAM 0x0234c830 - 0x0234c839 +IDEOGRAM 0x0234c930 - 0x0234c939 +IDEOGRAM 0x0234ca30 - 0x0234ca39 +IDEOGRAM 0x0234cb30 - 0x0234cb39 +IDEOGRAM 0x0234cc30 - 0x0234cc39 +IDEOGRAM 0x0234cd30 - 0x0234cd39 +IDEOGRAM 0x0234ce30 - 0x0234ce39 +IDEOGRAM 0x0234cf30 - 0x0234cf39 +IDEOGRAM 0x0234d030 - 0x0234d039 +IDEOGRAM 0x0234d130 - 0x0234d139 +IDEOGRAM 0x0234d230 - 0x0234d239 +IDEOGRAM 0x0234d330 - 0x0234d339 +IDEOGRAM 0x0234d430 - 0x0234d439 +IDEOGRAM 0x0234d530 - 0x0234d539 +IDEOGRAM 0x0234d630 - 0x0234d639 +IDEOGRAM 0x0234d730 - 0x0234d739 +IDEOGRAM 0x0234d830 - 0x0234d839 +IDEOGRAM 0x0234d930 - 0x0234d939 +IDEOGRAM 0x0234da30 - 0x0234da39 +IDEOGRAM 0x0234db30 - 0x0234db39 +IDEOGRAM 0x0234dc30 - 0x0234dc39 +IDEOGRAM 0x0234dd30 - 0x0234dd39 +IDEOGRAM 0x0234de30 - 0x0234de39 +IDEOGRAM 0x0234df30 - 0x0234df39 +IDEOGRAM 0x0234e030 - 0x0234e039 +IDEOGRAM 0x0234e130 - 0x0234e139 +IDEOGRAM 0x0234e230 - 0x0234e239 +IDEOGRAM 0x0234e330 - 0x0234e339 +IDEOGRAM 0x0234e430 - 0x0234e439 +IDEOGRAM 0x0234e530 - 0x0234e539 +IDEOGRAM 0x0234e630 - 0x0234e639 +IDEOGRAM 0x0234e730 - 0x0234e739 +IDEOGRAM 0x0234e830 - 0x0234e839 +IDEOGRAM 0x0234e930 - 0x0234e939 +IDEOGRAM 0x0234ea30 - 0x0234ea39 +IDEOGRAM 0x0234eb30 - 0x0234eb39 +IDEOGRAM 0x0234ec30 - 0x0234ec39 +IDEOGRAM 0x0234ed30 - 0x0234ed39 +IDEOGRAM 0x0234ee30 - 0x0234ee39 +IDEOGRAM 0x0234ef30 - 0x0234ef39 +IDEOGRAM 0x0234f030 - 0x0234f039 +IDEOGRAM 0x0234f130 - 0x0234f139 +IDEOGRAM 0x0234f230 - 0x0234f239 +IDEOGRAM 0x0234f330 - 0x0234f339 +IDEOGRAM 0x0234f430 - 0x0234f439 +IDEOGRAM 0x0234f530 - 0x0234f539 +IDEOGRAM 0x0234f630 - 0x0234f639 +IDEOGRAM 0x0234f730 - 0x0234f739 +IDEOGRAM 0x0234f830 - 0x0234f839 +IDEOGRAM 0x0234f930 - 0x0234f939 +IDEOGRAM 0x0234fa30 - 0x0234fa39 +IDEOGRAM 0x0234fb30 - 0x0234fb39 +IDEOGRAM 0x0234fc30 - 0x0234fc39 +IDEOGRAM 0x0234fd30 - 0x0234fd39 +IDEOGRAM 0x0234fe30 - 0x0234fe39 +IDEOGRAM 0x02358130 - 0x02358139 +IDEOGRAM 0x02358230 - 0x02358239 +IDEOGRAM 0x02358330 - 0x02358339 +IDEOGRAM 0x02358430 - 0x02358439 +IDEOGRAM 0x02358530 - 0x02358539 +IDEOGRAM 0x02358630 - 0x02358639 +IDEOGRAM 0x02358730 - 0x02358738 +IDEOGRAM 0x04308131 - 0x04308139 +IDEOGRAM 0x04308230 - 0x04308239 +IDEOGRAM 0x04308330 - 0x04308339 +IDEOGRAM 0x04308430 - 0x04308439 +IDEOGRAM 0x04308530 - 0x04308539 +IDEOGRAM 0x04308630 - 0x04308639 +IDEOGRAM 0x04308730 - 0x04308739 +IDEOGRAM 0x04308830 - 0x04308839 +IDEOGRAM 0x04308930 - 0x04308939 +IDEOGRAM 0x04308a30 - 0x04308a39 +IDEOGRAM 0x04308b30 - 0x04308b39 +IDEOGRAM 0x04308c30 - 0x04308c39 +IDEOGRAM 0x04308d30 - 0x04308d39 +IDEOGRAM 0x04308e30 - 0x04308e39 +IDEOGRAM 0x04308f30 - 0x04308f39 +IDEOGRAM 0x04309030 - 0x04309039 +IDEOGRAM 0x04309130 - 0x04309139 +IDEOGRAM 0x04309230 - 0x04309239 +IDEOGRAM 0x04309330 - 0x04309339 +IDEOGRAM 0x04309430 - 0x04309439 +IDEOGRAM 0x04309530 - 0x04309539 +IDEOGRAM 0x04309630 - 0x04309639 +IDEOGRAM 0x04309730 - 0x04309739 +IDEOGRAM 0x04309830 - 0x04309839 +IDEOGRAM 0x04309930 - 0x04309939 +IDEOGRAM 0x04309a30 - 0x04309a39 +IDEOGRAM 0x04309b30 - 0x04309b39 +IDEOGRAM 0x04309c30 - 0x04309c39 +IDEOGRAM 0x04309d30 0x04309d31 0x04309d34 - 0x04309d39 +IDEOGRAM 0x04309e30 - 0x04309e39 +IDEOGRAM 0x04309f30 - 0x04309f39 +IDEOGRAM 0x0430a030 - 0x0430a039 +IDEOGRAM 0x0430a130 - 0x0430a139 +IDEOGRAM 0x0430a230 - 0x0430a239 +IDEOGRAM 0x0430a330 - 0x0430a332 +LOWER 0x01308439 +LOWER 0x01308538 +LOWER 0x01308632 +LOWER 0x01308938 0x01308939 +LOWER 0x01308a30 - 0x01308a39 +LOWER 0x01308b30 - 0x01308b37 +LOWER 0x01308c30 0x01308c32 0x01308c34 0x01308c36 0x01308c38 +LOWER 0x01308d30 0x01308d32 0x01308d34 0x01308d37 0x01308d39 +LOWER 0x01308e31 0x01308e34 0x01308e36 0x01308e38 +LOWER 0x01308f30 0x01308f32 0x01308f34 0x01308f36 0x01308f39 +LOWER 0x01309031 0x01309033 0x01309035 0x01309037 0x01309039 +LOWER 0x01309130 0x01309132 0x01309134 0x01309136 0x01309138 +LOWER 0x01309230 0x01309233 0x01309235 0x01309237 +LOWER 0x01309330 0x01309332 0x01309334 0x01309336 0x01309338 +LOWER 0x01309430 0x01309432 0x01309434 0x01309436 0x01309438 +LOWER 0x01309530 0x01309532 0x01309534 0x01309536 0x01309539 +LOWER 0x01309631 0x01309633 0x01309635 0x01309637 0x01309639 +LOWER 0x01309732 0x01309734 0x01309736 - 0x01309738 +LOWER 0x01309831 0x01309833 0x01309836 +LOWER 0x01309930 0x01309931 0x01309936 0x01309939 +LOWER 0x01309a33 - 0x01309a35 0x01309a38 +LOWER 0x01309b31 0x01309b33 0x01309b35 0x01309b38 +LOWER 0x01309c30 0x01309c31 0x01309c33 0x01309c36 +LOWER 0x01309d30 0x01309d32 0x01309d35 0x01309d36 0x01309d39 +LOWER 0x01309e30 0x01309e31 0x01309e38 +LOWER 0x01309f31 0x01309f34 +LOWER 0x0130a033 0x0130a035 0x0130a037 0x0130a039 +LOWER 0x0130a131 0x0130a133 0x0130a135 0x0130a137 0x0130a139 +LOWER 0x0130a231 0x0130a232 0x0130a235 0x0130a237 +LOWER 0x0130a332 0x0130a334 0x0130a336 0x0130a338 +LOWER 0x0130a430 0x0130a432 0x0130a434 0x0130a436 0x0130a438 +LOWER 0x0130a530 0x0130a532 0x0130a534 0x0130a536 0x0130a538 +LOWER 0x0130a630 0x0130a632 0x0130a634 0x0130a636 0x0130a638 +LOWER 0x0130a732 0x0130a734 0x0130a736 0x0130a738 +LOWER 0x0130a830 0x0130a832 0x0130a834 0x0130a836 0x0130a838 +LOWER 0x0130ab37 - 0x0130ab39 +LOWER 0x0130ac30 - 0x0130ac39 +LOWER 0x0130ad30 - 0x0130ad39 +LOWER 0x0130ae30 - 0x0130ae39 +LOWER 0x0130af30 - 0x0130af39 +LOWER 0x0130b030 - 0x0130b039 +LOWER 0x0130b130 - 0x0130b139 +LOWER 0x0130b230 - 0x0130b239 +LOWER 0x0130b330 - 0x0130b339 +LOWER 0x0130b430 - 0x0130b438 +LOWER 0x0130cb30 0x0130cb34 - 0x0130cb39 +LOWER 0x0130cc30 - 0x0130cc34 0x0130cc36 0x0130cc37 +LOWER 0x0130cd31 - 0x0130cd33 0x0130cd35 0x0130cd37 0x0130cd39 +LOWER 0x0130ce31 0x0130ce33 0x0130ce35 0x0130ce37 0x0130ce39 +LOWER 0x0130cf31 0x0130cf33 0x0130cf35 0x0130cf37 - 0x0130cf39 +LOWER 0x0130d030 0x0130d031 0x0130d033 +LOWER 0x0130d239 +LOWER 0x0130d330 - 0x0130d339 +LOWER 0x0130d430 - 0x0130d433 0x0130d435 0x0130d437 0x0130d439 +LOWER 0x0130d531 0x0130d533 0x0130d535 0x0130d537 0x0130d539 +LOWER 0x0130d631 0x0130d633 0x0130d635 0x0130d637 0x0130d639 +LOWER 0x0130d731 0x0130d733 0x0130d735 0x0130d737 +LOWER 0x0130d837 0x0130d839 +LOWER 0x0130d931 0x0130d933 0x0130d935 0x0130d937 0x0130d939 +LOWER 0x0130da31 0x0130da33 0x0130da35 0x0130da37 0x0130da39 +LOWER 0x0130db31 0x0130db33 0x0130db35 0x0130db37 0x0130db39 +LOWER 0x0130dc31 0x0130dc33 0x0130dc35 0x0130dc37 0x0130dc39 +LOWER 0x0130dd31 0x0130dd33 0x0130dd35 0x0130dd37 0x0130dd39 +LOWER 0x0130de32 0x0130de34 0x0130de36 0x0130de38 +LOWER 0x0130df30 0x0130df32 0x0130df34 0x0130df37 0x0130df39 +LOWER 0x0130e031 0x0130e033 0x0130e035 0x0130e037 0x0130e039 +LOWER 0x0130e131 0x0130e133 0x0130e135 0x0130e137 0x0130e139 +LOWER 0x0130e231 0x0130e233 0x0130e235 0x0130e237 0x0130e239 +LOWER 0x0130e331 0x0130e333 0x0130e337 +LOWER 0x0130e435 0x0130e437 0x0130e439 +LOWER 0x0130e531 0x0130e533 0x0130e535 0x0130e537 0x0130e539 +LOWER 0x0130ee31 - 0x0130ee39 +LOWER 0x0130ef30 - 0x0130ef39 +LOWER 0x0130f030 - 0x0130f039 +LOWER 0x0130f130 - 0x0130f139 +LOWER 0x0135ee35 0x0135ee37 0x0135ee39 +LOWER 0x0135ef31 0x0135ef33 0x0135ef35 0x0135ef37 0x0135ef39 +LOWER 0x0135f031 0x0135f033 0x0135f035 0x0135f037 0x0135f039 +LOWER 0x0135f131 0x0135f133 0x0135f135 0x0135f137 0x0135f139 +LOWER 0x0135f231 0x0135f233 0x0135f235 0x0135f237 0x0135f239 +LOWER 0x0135f331 0x0135f333 0x0135f335 0x0135f337 0x0135f339 +LOWER 0x0135f431 0x0135f433 0x0135f435 0x0135f437 0x0135f439 +LOWER 0x0135f531 0x0135f533 0x0135f535 0x0135f537 0x0135f539 +LOWER 0x0135f631 0x0135f633 0x0135f635 0x0135f637 0x0135f639 +LOWER 0x0135f731 0x0135f733 0x0135f735 0x0135f737 0x0135f739 +LOWER 0x0135f831 0x0135f833 0x0135f835 0x0135f837 0x0135f839 +LOWER 0x0135f931 0x0135f933 0x0135f935 0x0135f937 0x0135f939 +LOWER 0x0135fa31 0x0135fa33 0x0135fa35 0x0135fa37 0x0135fa39 +LOWER 0x0135fb31 0x0135fb33 0x0135fb35 0x0135fb37 0x0135fb39 +LOWER 0x0135fc31 0x0135fc33 0x0135fc35 0x0135fc37 0x0135fc39 +LOWER 0x0135fd31 0x0135fd33 - 0x0135fd39 +LOWER 0x0135fe35 0x0135fe37 0x0135fe39 +LOWER 0x01368131 0x01368133 0x01368135 0x01368137 0x01368139 +LOWER 0x01368231 0x01368233 0x01368235 0x01368237 0x01368239 +LOWER 0x01368331 0x01368333 0x01368335 0x01368337 0x01368339 +LOWER 0x01368431 0x01368433 0x01368435 0x01368437 0x01368439 +LOWER 0x01368531 0x01368533 0x01368535 0x01368537 0x01368539 +LOWER 0x01368631 0x01368633 0x01368635 0x01368637 0x01368639 +LOWER 0x01368731 0x01368733 0x01368735 0x01368737 0x01368739 +LOWER 0x01368831 0x01368833 0x01368835 0x01368837 0x01368839 +LOWER 0x01368931 0x01368933 +LOWER 0x01368a30 - 0x01368a37 +LOWER 0x01368b36 - 0x01368b39 +LOWER 0x01368c30 0x01368c31 +LOWER 0x01368d32 - 0x01368d39 +LOWER 0x01368e38 0x01368e39 +LOWER 0x01368f30 - 0x01368f35 +LOWER 0x01369034 - 0x01369039 +LOWER 0x01369230 - 0x01369237 +LOWER 0x01369336 - 0x01369339 +LOWER 0x01369430 - 0x01369433 +LOWER 0x01369532 - 0x01369539 +LOWER 0x01369630 - 0x01369635 0x01369638 0x01369639 +LOWER 0x01369730 - 0x01369735 +LOWER 0x01369834 - 0x01369839 +LOWER 0x01369930 0x01369931 +LOWER 0x01369a30 - 0x01369a37 +LOWER 0x01369b36 - 0x01369b39 +LOWER 0x01369c30 0x01369c32 0x01369c33 +LOWER 0x01369d30 0x01369d34 - 0x01369d36 0x01369d38 0x01369d39 +LOWER 0x01369e38 0x01369e39 +LOWER 0x01369f30 0x01369f31 0x01369f34 0x01369f35 +LOWER 0x0136a034 - 0x0136a039 +LOWER 0x0136a130 0x0136a131 +LOWER 0x0136a232 - 0x0136a234 0x0136a236 0x0136a237 +LOWER 0x0136ad33 +LOWER 0x0136ae37 +LOWER 0x0136bc32 0x0136bc36 0x0136bc37 +LOWER 0x0136bd31 +LOWER 0x0136bf37 +LOWER 0x0136c032 0x0136c037 +LOWER 0x0136c131 +LOWER 0x0136c230 - 0x0136c233 +LOWER 0x0430b232 - 0x0430b238 +LOWER 0x0430b431 - 0x0430b435 +MAPLOWER < 0xa2fb - 0xa2fc : 0x0136c530 > +MAPLOWER < 0x01308638 0xa8a4 > +MAPLOWER < 0x01308639 0xa8a2 > +MAPLOWER < 0x01308730 0x01308939 > +MAPLOWER < 0x01308731 - 0x01308735 : 0x01308a30 > +MAPLOWER < 0x01308736 0xa8a8 > +MAPLOWER < 0x01308737 0xa8a6 > +MAPLOWER < 0x01308738 0xa8ba > +MAPLOWER < 0x01308739 0x01308a35 > +MAPLOWER < 0x01308830 0xa8ac > +MAPLOWER < 0x01308831 0xa8aa > +MAPLOWER < 0x01308832 - 0x01308835 : 0x01308a36 > +MAPLOWER < 0x01308836 0xa8b0 > +MAPLOWER < 0x01308837 0xa8ae > +MAPLOWER < 0x01308838 - 0x01308839 : 0x01308b30 > +MAPLOWER < 0x01308930 - 0x01308931 : 0x01308b32 > +MAPLOWER < 0x01308932 0xa8b4 > +MAPLOWER < 0x01308933 0xa8b2 > +MAPLOWER < 0x01308934 0x01308b34 > +MAPLOWER < 0x01308935 0xa8b9 > +MAPLOWER < 0x01308936 - 0x01308937 : 0x01308b35 > +MAPLOWER < 0x01308b38 0xa8a1 > +MAPLOWER < 0x01308b39 0x01308c30 > +MAPLOWER < 0x01308c31 0x01308c32 > +MAPLOWER < 0x01308c33 0x01308c34 > +MAPLOWER < 0x01308c35 0x01308c36 > +MAPLOWER < 0x01308c37 0x01308c38 > +MAPLOWER < 0x01308c39 0x01308d30 > +MAPLOWER < 0x01308d31 0x01308d32 > +MAPLOWER < 0x01308d33 0x01308d34 > +MAPLOWER < 0x01308d35 0xa8a5 > +MAPLOWER < 0x01308d36 0x01308d37 > +MAPLOWER < 0x01308d38 0x01308d39 > +MAPLOWER < 0x01308e30 0x01308e31 > +MAPLOWER < 0x01308e32 0xa8a7 > +MAPLOWER < 0x01308e33 0x01308e34 > +MAPLOWER < 0x01308e35 0x01308e36 > +MAPLOWER < 0x01308e37 0x01308e38 > +MAPLOWER < 0x01308e39 0x01308f30 > +MAPLOWER < 0x01308f31 0x01308f32 > +MAPLOWER < 0x01308f33 0x01308f34 > +MAPLOWER < 0x01308f35 0x01308f36 > +MAPLOWER < 0x01308f37 0xa8a9 > +MAPLOWER < 0x01308f38 0x01308f39 > +MAPLOWER < 0x01309030 0x01309031 > +MAPLOWER < 0x01309032 0x69 > +MAPLOWER < 0x01309034 0x01309035 > +MAPLOWER < 0x01309036 0x01309037 > +MAPLOWER < 0x01309038 0x01309039 > +MAPLOWER < 0x01309131 0x01309132 > +MAPLOWER < 0x01309133 0x01309134 > +MAPLOWER < 0x01309135 0x01309136 > +MAPLOWER < 0x01309137 0x01309138 > +MAPLOWER < 0x01309139 0x01309230 > +MAPLOWER < 0x01309231 0xa8bd > +MAPLOWER < 0x01309232 0x01309233 > +MAPLOWER < 0x01309234 0xa8be > +MAPLOWER < 0x01309236 0x01309237 > +MAPLOWER < 0x01309238 0xa8ad > +MAPLOWER < 0x01309239 0x01309330 > +MAPLOWER < 0x01309331 0x01309332 > +MAPLOWER < 0x01309333 0x01309334 > +MAPLOWER < 0x01309335 0x01309336 > +MAPLOWER < 0x01309337 0x01309338 > +MAPLOWER < 0x01309339 0x01309430 > +MAPLOWER < 0x01309431 0x01309432 > +MAPLOWER < 0x01309433 0x01309434 > +MAPLOWER < 0x01309435 0x01309436 > +MAPLOWER < 0x01309437 0x01309438 > +MAPLOWER < 0x01309439 0x01309530 > +MAPLOWER < 0x01309531 0x01309532 > +MAPLOWER < 0x01309533 0x01309534 > +MAPLOWER < 0x01309535 0x01309536 > +MAPLOWER < 0x01309537 0xa8b1 > +MAPLOWER < 0x01309538 0x01309539 > +MAPLOWER < 0x01309630 0x01309631 > +MAPLOWER < 0x01309632 0x01309633 > +MAPLOWER < 0x01309634 0x01309635 > +MAPLOWER < 0x01309636 0x01309637 > +MAPLOWER < 0x01309638 0x01309639 > +MAPLOWER < 0x01309730 0x01308b37 > +MAPLOWER < 0x01309731 0x01309732 > +MAPLOWER < 0x01309733 0x01309734 > +MAPLOWER < 0x01309735 0x01309736 > +MAPLOWER < 0x01309739 0x0130ab39 > +MAPLOWER < 0x01309830 0x01309831 > +MAPLOWER < 0x01309832 0x01309833 > +MAPLOWER < 0x01309834 0x0130ac30 > +MAPLOWER < 0x01309835 0x01309836 > +MAPLOWER < 0x01309837 - 0x01309838 : 0x0130ac32 > +MAPLOWER < 0x01309839 0x01309930 > +MAPLOWER < 0x01309932 0x0130a033 > +MAPLOWER < 0x01309933 0x0130ac35 > +MAPLOWER < 0x01309934 0x0130ac37 > +MAPLOWER < 0x01309935 0x01309936 > +MAPLOWER < 0x01309937 0x0130ad32 > +MAPLOWER < 0x01309938 0x0130ad34 > +MAPLOWER < 0x01309a30 0x0130ae30 > +MAPLOWER < 0x01309a31 0x0130ad39 > +MAPLOWER < 0x01309a32 0x01309a33 > +MAPLOWER < 0x01309a36 0x0130ae36 > +MAPLOWER < 0x01309a37 0x0130ae39 > +MAPLOWER < 0x01309a39 0x0130af32 > +MAPLOWER < 0x01309b30 0x01309b31 > +MAPLOWER < 0x01309b32 0x01309b33 > +MAPLOWER < 0x01309b34 0x01309b35 > +MAPLOWER < 0x01309b36 0x0130b033 > +MAPLOWER < 0x01309b37 0x01309b38 > +MAPLOWER < 0x01309b39 0x0130b036 > +MAPLOWER < 0x01309c32 0x01309c33 > +MAPLOWER < 0x01309c34 0x0130b131 > +MAPLOWER < 0x01309c35 0x01309c36 > +MAPLOWER < 0x01309c37 - 0x01309c38 : 0x0130b133 > +MAPLOWER < 0x01309c39 0x01309d30 > +MAPLOWER < 0x01309d31 0x01309d32 > +MAPLOWER < 0x01309d33 0x0130b231 > +MAPLOWER < 0x01309d34 0x01309d35 > +MAPLOWER < 0x01309d38 0x01309d39 > +MAPLOWER < 0x01309e36 0x01309e38 > +MAPLOWER < 0x01309e37 0x01309e38 > +MAPLOWER < 0x01309e39 0x01309f31 > +MAPLOWER < 0x01309f30 0x01309f31 > +MAPLOWER < 0x01309f32 0x01309f34 > +MAPLOWER < 0x01309f33 0x01309f34 > +MAPLOWER < 0x01309f35 0xa8a3 > +MAPLOWER < 0x01309f36 0xa8ab > +MAPLOWER < 0x01309f37 0xa8af > +MAPLOWER < 0x01309f38 0xa8b3 > +MAPLOWER < 0x01309f39 0xa8b5 > +MAPLOWER < 0x0130a030 - 0x0130a032 : 0xa8b6 > +MAPLOWER < 0x0130a034 0x0130a035 > +MAPLOWER < 0x0130a036 0x0130a037 > +MAPLOWER < 0x0130a038 0x0130a039 > +MAPLOWER < 0x0130a130 0x0130a131 > +MAPLOWER < 0x0130a132 0x0130a133 > +MAPLOWER < 0x0130a134 0x0130a135 > +MAPLOWER < 0x0130a136 0x0130a137 > +MAPLOWER < 0x0130a138 0x0130a139 > +MAPLOWER < 0x0130a230 0x0130a231 > +MAPLOWER < 0x0130a233 0x0130a235 > +MAPLOWER < 0x0130a234 0x0130a235 > +MAPLOWER < 0x0130a236 0x0130a237 > +MAPLOWER < 0x0130a238 0x01309939 > +MAPLOWER < 0x0130a239 0x01309e31 > +MAPLOWER < 0x0130a330 0xa8bf > +MAPLOWER < 0x0130a331 0x0130a332 > +MAPLOWER < 0x0130a333 0x0130a334 > +MAPLOWER < 0x0130a335 0x0130a336 > +MAPLOWER < 0x0130a337 0x0130a338 > +MAPLOWER < 0x0130a339 0x0130a430 > +MAPLOWER < 0x0130a431 0x0130a432 > +MAPLOWER < 0x0130a433 0x0130a434 > +MAPLOWER < 0x0130a435 0x0130a436 > +MAPLOWER < 0x0130a437 0x0130a438 > +MAPLOWER < 0x0130a439 0x0130a530 > +MAPLOWER < 0x0130a531 0x0130a532 > +MAPLOWER < 0x0130a533 0x0130a534 > +MAPLOWER < 0x0130a535 0x0130a536 > +MAPLOWER < 0x0130a537 0x0130a538 > +MAPLOWER < 0x0130a539 0x0130a630 > +MAPLOWER < 0x0130a631 0x0130a632 > +MAPLOWER < 0x0130a633 0x0130a634 > +MAPLOWER < 0x0130a635 0x0130a636 > +MAPLOWER < 0x0130a637 0x0130a638 > +MAPLOWER < 0x0130a639 0x01309a38 > +MAPLOWER < 0x0130a731 0x0130a732 > +MAPLOWER < 0x0130a733 0x0130a734 > +MAPLOWER < 0x0130a735 0x0130a736 > +MAPLOWER < 0x0130a737 0x0130a738 > +MAPLOWER < 0x0130a739 0x0130a830 > +MAPLOWER < 0x0130a831 0x0130a832 > +MAPLOWER < 0x0130a833 0x0130a834 > +MAPLOWER < 0x0130a835 0x0130a836 > +MAPLOWER < 0x0130a837 0x0130a838 > +MAPLOWER < 0x0130ca30 0x0130cb34 > +MAPLOWER < 0x0130ca32 - 0x0130ca34 : 0x0130cb35 > +MAPLOWER < 0x0130ca36 0x0130cc32 > +MAPLOWER < 0x0130ca38 - 0x0130ca39 : 0x0130cc33 > +MAPLOWER < 0x0130cb32 - 0x0130cb33 : 0x0130cc30 > +MAPLOWER < 0x0130cd34 0x0130cd35 > +MAPLOWER < 0x0130cd36 0x0130cd37 > +MAPLOWER < 0x0130cd38 0x0130cd39 > +MAPLOWER < 0x0130ce30 0x0130ce31 > +MAPLOWER < 0x0130ce32 0x0130ce33 > +MAPLOWER < 0x0130ce34 0x0130ce35 > +MAPLOWER < 0x0130ce36 0x0130ce37 > +MAPLOWER < 0x0130ce38 0x0130ce39 > +MAPLOWER < 0x0130cf30 0x0130cf31 > +MAPLOWER < 0x0130cf32 0x0130cf33 > +MAPLOWER < 0x0130cf34 0x0130cf35 > +MAPLOWER < 0x0130cf36 0x0130cf37 > +MAPLOWER < 0x0130d032 0xa6c8 > +MAPLOWER < 0x0130d134 0x0130d239 > +MAPLOWER < 0x0130d135 - 0x0130d139 : 0x0130d330 > +MAPLOWER < 0x0130d230 - 0x0130d234 : 0x0130d335 > +MAPLOWER < 0x0130d235 - 0x0130d238 : 0x0130d430 > +MAPLOWER < 0x0130d434 0x0130d435 > +MAPLOWER < 0x0130d436 0x0130d437 > +MAPLOWER < 0x0130d438 0x0130d439 > +MAPLOWER < 0x0130d530 0x0130d531 > +MAPLOWER < 0x0130d532 0x0130d533 > +MAPLOWER < 0x0130d534 0x0130d535 > +MAPLOWER < 0x0130d536 0x0130d537 > +MAPLOWER < 0x0130d538 0x0130d539 > +MAPLOWER < 0x0130d630 0x0130d631 > +MAPLOWER < 0x0130d632 0x0130d633 > +MAPLOWER < 0x0130d634 0x0130d635 > +MAPLOWER < 0x0130d636 0x0130d637 > +MAPLOWER < 0x0130d638 0x0130d639 > +MAPLOWER < 0x0130d730 0x0130d731 > +MAPLOWER < 0x0130d732 0x0130d733 > +MAPLOWER < 0x0130d734 0x0130d735 > +MAPLOWER < 0x0130d736 0x0130d737 > +MAPLOWER < 0x0130d836 0x0130d837 > +MAPLOWER < 0x0130d838 0x0130d839 > +MAPLOWER < 0x0130d930 0x0130d931 > +MAPLOWER < 0x0130d932 0x0130d933 > +MAPLOWER < 0x0130d934 0x0130d935 > +MAPLOWER < 0x0130d936 0x0130d937 > +MAPLOWER < 0x0130d938 0x0130d939 > +MAPLOWER < 0x0130da30 0x0130da31 > +MAPLOWER < 0x0130da32 0x0130da33 > +MAPLOWER < 0x0130da34 0x0130da35 > +MAPLOWER < 0x0130da36 0x0130da37 > +MAPLOWER < 0x0130da38 0x0130da39 > +MAPLOWER < 0x0130db30 0x0130db31 > +MAPLOWER < 0x0130db32 0x0130db33 > +MAPLOWER < 0x0130db34 0x0130db35 > +MAPLOWER < 0x0130db36 0x0130db37 > +MAPLOWER < 0x0130db38 0x0130db39 > +MAPLOWER < 0x0130dc30 0x0130dc31 > +MAPLOWER < 0x0130dc32 0x0130dc33 > +MAPLOWER < 0x0130dc34 0x0130dc35 > +MAPLOWER < 0x0130dc36 0x0130dc37 > +MAPLOWER < 0x0130dc38 0x0130dc39 > +MAPLOWER < 0x0130dd30 0x0130dd31 > +MAPLOWER < 0x0130dd32 0x0130dd33 > +MAPLOWER < 0x0130dd34 0x0130dd35 > +MAPLOWER < 0x0130dd36 0x0130dd37 > +MAPLOWER < 0x0130dd38 0x0130dd39 > +MAPLOWER < 0x0130de31 0x0130de32 > +MAPLOWER < 0x0130de33 0x0130de34 > +MAPLOWER < 0x0130de35 0x0130de36 > +MAPLOWER < 0x0130de37 0x0130de38 > +MAPLOWER < 0x0130de39 0x0130df30 > +MAPLOWER < 0x0130df31 0x0130df32 > +MAPLOWER < 0x0130df33 0x0130df34 > +MAPLOWER < 0x0130df36 0x0130df37 > +MAPLOWER < 0x0130df38 0x0130df39 > +MAPLOWER < 0x0130e030 0x0130e031 > +MAPLOWER < 0x0130e032 0x0130e033 > +MAPLOWER < 0x0130e034 0x0130e035 > +MAPLOWER < 0x0130e036 0x0130e037 > +MAPLOWER < 0x0130e038 0x0130e039 > +MAPLOWER < 0x0130e130 0x0130e131 > +MAPLOWER < 0x0130e132 0x0130e133 > +MAPLOWER < 0x0130e134 0x0130e135 > +MAPLOWER < 0x0130e136 0x0130e137 > +MAPLOWER < 0x0130e138 0x0130e139 > +MAPLOWER < 0x0130e230 0x0130e231 > +MAPLOWER < 0x0130e232 0x0130e233 > +MAPLOWER < 0x0130e234 0x0130e235 > +MAPLOWER < 0x0130e236 0x0130e237 > +MAPLOWER < 0x0130e238 0x0130e239 > +MAPLOWER < 0x0130e330 0x0130e331 > +MAPLOWER < 0x0130e332 0x0130e333 > +MAPLOWER < 0x0130e336 0x0130e337 > +MAPLOWER < 0x0130e434 0x0130e435 > +MAPLOWER < 0x0130e436 0x0130e437 > +MAPLOWER < 0x0130e438 0x0130e439 > +MAPLOWER < 0x0130e530 0x0130e531 > +MAPLOWER < 0x0130e532 0x0130e533 > +MAPLOWER < 0x0130e534 0x0130e535 > +MAPLOWER < 0x0130e536 0x0130e537 > +MAPLOWER < 0x0130e538 0x0130e539 > +MAPLOWER < 0x0130e933 - 0x0130e939 : 0x0130ee31 > +MAPLOWER < 0x0130ea30 - 0x0130ea31 : 0x0130ee38 > +MAPLOWER < 0x0130ea32 - 0x0130ea39 : 0x0130ef30 > +MAPLOWER < 0x0130eb30 - 0x0130eb31 : 0x0130ef38 > +MAPLOWER < 0x0130eb32 - 0x0130eb39 : 0x0130f030 > +MAPLOWER < 0x0130ec30 - 0x0130ec31 : 0x0130f038 > +MAPLOWER < 0x0130ec32 - 0x0130ec39 : 0x0130f130 > +MAPLOWER < 0x0130ed30 0x0130f138 > +MAPLOWER < 0x0135ee34 0x0135ee35 > +MAPLOWER < 0x0135ee36 0x0135ee37 > +MAPLOWER < 0x0135ee38 0x0135ee39 > +MAPLOWER < 0x0135ef30 0x0135ef31 > +MAPLOWER < 0x0135ef32 0x0135ef33 > +MAPLOWER < 0x0135ef34 0x0135ef35 > +MAPLOWER < 0x0135ef36 0x0135ef37 > +MAPLOWER < 0x0135ef38 0x0135ef39 > +MAPLOWER < 0x0135f030 0x0135f031 > +MAPLOWER < 0x0135f032 0x0135f033 > +MAPLOWER < 0x0135f034 0x0135f035 > +MAPLOWER < 0x0135f036 0x0135f037 > +MAPLOWER < 0x0135f038 0x0135f039 > +MAPLOWER < 0x0135f130 0x0135f131 > +MAPLOWER < 0x0135f132 0x0135f133 > +MAPLOWER < 0x0135f134 0x0135f135 > +MAPLOWER < 0x0135f136 0x0135f137 > +MAPLOWER < 0x0135f138 0x0135f139 > +MAPLOWER < 0x0135f230 0x0135f231 > +MAPLOWER < 0x0135f232 0x0135f233 > +MAPLOWER < 0x0135f234 0x0135f235 > +MAPLOWER < 0x0135f236 0x0135f237 > +MAPLOWER < 0x0135f238 0x0135f239 > +MAPLOWER < 0x0135f330 0x0135f331 > +MAPLOWER < 0x0135f332 0x0135f333 > +MAPLOWER < 0x0135f334 0x0135f335 > +MAPLOWER < 0x0135f336 0x0135f337 > +MAPLOWER < 0x0135f338 0x0135f339 > +MAPLOWER < 0x0135f430 0x0135f431 > +MAPLOWER < 0x0135f432 0x0135f433 > +MAPLOWER < 0x0135f434 0x0135f435 > +MAPLOWER < 0x0135f436 0x0135f437 > +MAPLOWER < 0x0135f438 0x0135f439 > +MAPLOWER < 0x0135f530 0x0135f531 > +MAPLOWER < 0x0135f532 0x0135f533 > +MAPLOWER < 0x0135f534 0x0135f535 > +MAPLOWER < 0x0135f536 0x0135f537 > +MAPLOWER < 0x0135f538 0x0135f539 > +MAPLOWER < 0x0135f630 0x0135f631 > +MAPLOWER < 0x0135f632 0x0135f633 > +MAPLOWER < 0x0135f634 0x0135f635 > +MAPLOWER < 0x0135f636 0x0135f637 > +MAPLOWER < 0x0135f638 0x0135f639 > +MAPLOWER < 0x0135f730 0x0135f731 > +MAPLOWER < 0x0135f732 0x0135f733 > +MAPLOWER < 0x0135f734 0x0135f735 > +MAPLOWER < 0x0135f736 0x0135f737 > +MAPLOWER < 0x0135f738 0x0135f739 > +MAPLOWER < 0x0135f830 0x0135f831 > +MAPLOWER < 0x0135f832 0x0135f833 > +MAPLOWER < 0x0135f834 0x0135f835 > +MAPLOWER < 0x0135f836 0x0135f837 > +MAPLOWER < 0x0135f838 0x0135f839 > +MAPLOWER < 0x0135f930 0x0135f931 > +MAPLOWER < 0x0135f932 0x0135f933 > +MAPLOWER < 0x0135f934 0x0135f935 > +MAPLOWER < 0x0135f936 0x0135f937 > +MAPLOWER < 0x0135f938 0x0135f939 > +MAPLOWER < 0x0135fa30 0x0135fa31 > +MAPLOWER < 0x0135fa32 0x0135fa33 > +MAPLOWER < 0x0135fa34 0x0135fa35 > +MAPLOWER < 0x0135fa36 0x0135fa37 > +MAPLOWER < 0x0135fa38 0x0135fa39 > +MAPLOWER < 0x0135fb30 0x0135fb31 > +MAPLOWER < 0x0135fb32 0x0135fb33 > +MAPLOWER < 0x0135fb34 0x0135fb35 > +MAPLOWER < 0x0135fb36 0x0135fb37 > +MAPLOWER < 0x0135fb38 0x0135fb39 > +MAPLOWER < 0x0135fc30 0x0135fc31 > +MAPLOWER < 0x0135fc32 0x0135fc33 > +MAPLOWER < 0x0135fc34 0x0135fc35 > +MAPLOWER < 0x0135fc36 0x0135fc37 > +MAPLOWER < 0x0135fc38 0x0135fc39 > +MAPLOWER < 0x0135fd30 0x0135fd31 > +MAPLOWER < 0x0135fd32 0x0135fd33 > +MAPLOWER < 0x0135fe34 0x0135fe35 > +MAPLOWER < 0x0135fe36 0x0135fe37 > +MAPLOWER < 0x0135fe38 0x0135fe39 > +MAPLOWER < 0x01368130 0x01368131 > +MAPLOWER < 0x01368132 0x01368133 > +MAPLOWER < 0x01368134 0x01368135 > +MAPLOWER < 0x01368136 0x01368137 > +MAPLOWER < 0x01368138 0x01368139 > +MAPLOWER < 0x01368230 0x01368231 > +MAPLOWER < 0x01368232 0x01368233 > +MAPLOWER < 0x01368234 0x01368235 > +MAPLOWER < 0x01368236 0x01368237 > +MAPLOWER < 0x01368238 0x01368239 > +MAPLOWER < 0x01368330 0x01368331 > +MAPLOWER < 0x01368332 0x01368333 > +MAPLOWER < 0x01368334 0x01368335 > +MAPLOWER < 0x01368336 0x01368337 > +MAPLOWER < 0x01368338 0x01368339 > +MAPLOWER < 0x01368430 0x01368431 > +MAPLOWER < 0x01368432 0x01368433 > +MAPLOWER < 0x01368434 0x01368435 > +MAPLOWER < 0x01368436 0x01368437 > +MAPLOWER < 0x01368438 0x01368439 > +MAPLOWER < 0x01368530 0x01368531 > +MAPLOWER < 0x01368532 0x01368533 > +MAPLOWER < 0x01368534 0x01368535 > +MAPLOWER < 0x01368536 0x01368537 > +MAPLOWER < 0x01368538 0x01368539 > +MAPLOWER < 0x01368630 0x01368631 > +MAPLOWER < 0x01368632 0x01368633 > +MAPLOWER < 0x01368634 0x01368635 > +MAPLOWER < 0x01368636 0x01368637 > +MAPLOWER < 0x01368638 0x01368639 > +MAPLOWER < 0x01368730 0x01368731 > +MAPLOWER < 0x01368732 0x01368733 > +MAPLOWER < 0x01368734 0x01368735 > +MAPLOWER < 0x01368736 0x01368737 > +MAPLOWER < 0x01368738 0x01368739 > +MAPLOWER < 0x01368830 0x01368831 > +MAPLOWER < 0x01368832 0x01368833 > +MAPLOWER < 0x01368834 0x01368835 > +MAPLOWER < 0x01368836 0x01368837 > +MAPLOWER < 0x01368838 0x01368839 > +MAPLOWER < 0x01368930 0x01368931 > +MAPLOWER < 0x01368932 0x01368933 > +MAPLOWER < 0x01368a38 - 0x01368a39 : 0x01368a30 > +MAPLOWER < 0x01368b30 - 0x01368b35 : 0x01368a32 > +MAPLOWER < 0x01368c34 - 0x01368c37 : 0x01368b36 > +MAPLOWER < 0x01368c38 - 0x01368c39 : 0x01368c30 > +MAPLOWER < 0x01368e30 - 0x01368e37 : 0x01368d32 > +MAPLOWER < 0x01368f36 - 0x01368f37 : 0x01368e38 > +MAPLOWER < 0x01368f38 - 0x01368f39 : 0x01368f30 > +MAPLOWER < 0x01369030 - 0x01369033 : 0x01368f32 > +MAPLOWER < 0x01369132 - 0x01369137 : 0x01369034 > +MAPLOWER < 0x01369239 0x01369231 > +MAPLOWER < 0x01369331 0x01369233 > +MAPLOWER < 0x01369333 0x01369235 > +MAPLOWER < 0x01369335 0x01369237 > +MAPLOWER < 0x01369434 - 0x01369437 : 0x01369336 > +MAPLOWER < 0x01369438 - 0x01369439 : 0x01369430 > +MAPLOWER < 0x01369530 - 0x01369531 : 0x01369432 > +MAPLOWER < 0x01369736 - 0x01369737 : 0x01369638 > +MAPLOWER < 0x01369738 - 0x01369739 : 0x01369730 > +MAPLOWER < 0x01369830 - 0x01369833 : 0x01369732 > +MAPLOWER < 0x01369932 - 0x01369937 : 0x01369834 > +MAPLOWER < 0x01369938 - 0x01369939 : 0x01369930 > +MAPLOWER < 0x01369a38 - 0x01369a39 : 0x01369a30 > +MAPLOWER < 0x01369b30 - 0x01369b35 : 0x01369a32 > +MAPLOWER < 0x01369c34 - 0x01369c35 : 0x01369b36 > +MAPLOWER < 0x01369c36 - 0x01369c37 : 0x01369532 > +MAPLOWER < 0x01369c38 0x01369b39 > +MAPLOWER < 0x01369e30 - 0x01369e33 : 0x01369534 > +MAPLOWER < 0x01369e34 0x01369d35 > +MAPLOWER < 0x01369f36 - 0x01369f37 : 0x01369e38 > +MAPLOWER < 0x01369f38 - 0x01369f39 : 0x01369538 > +MAPLOWER < 0x0136a132 - 0x0136a133 : 0x0136a034 > +MAPLOWER < 0x0136a134 - 0x0136a135 : 0x01369632 > +MAPLOWER < 0x0136a136 0x0136a039 > +MAPLOWER < 0x0136a238 - 0x0136a239 : 0x01369630 > +MAPLOWER < 0x0136a330 - 0x0136a331 : 0x01369634 > +MAPLOWER < 0x0136a332 0x0136a233 > +MAPLOWER < 0x0136be38 0xa6d8 > +MAPLOWER < 0x0136bf32 0x6b > +MAPLOWER < 0x0136bf33 0x01308a32 > +MAPLOWER < 0x0136c436 - 0x0136c439 : 0x0136c532 > +MAPLOWER < 0x01379032 - 0x01379033 : 0x01379238 > +MAPLOWER < 0x01379034 - 0x01379039 : 0x01379330 > +MAPLOWER < 0x01379130 - 0x01379133 : 0x01379336 > +MAPLOWER < 0x01379134 - 0x01379139 : 0x01379430 > +MAPLOWER < 0x01379230 - 0x01379233 : 0x01379436 > +MAPLOWER < 0x01379234 - 0x01379237 : 0x01379530 > +MAPUPPER < 0xa8a1 0x01308b38 > +MAPUPPER < 0xa8a2 0x01308639 > +MAPUPPER < 0xa8a3 0x01309f35 > +MAPUPPER < 0xa8a4 0x01308638 > +MAPUPPER < 0xa8a5 0x01308d35 > +MAPUPPER < 0xa8a6 0x01308737 > +MAPUPPER < 0xa8a7 0x01308e32 > +MAPUPPER < 0xa8a8 0x01308736 > +MAPUPPER < 0xa8a9 0x01308f37 > +MAPUPPER < 0xa8aa 0x01308831 > +MAPUPPER < 0xa8ab 0x01309f36 > +MAPUPPER < 0xa8ac 0x01308830 > +MAPUPPER < 0xa8ad 0x01309238 > +MAPUPPER < 0xa8ae 0x01308837 > +MAPUPPER < 0xa8af 0x01309f37 > +MAPUPPER < 0xa8b0 0x01308836 > +MAPUPPER < 0xa8b1 0x01309537 > +MAPUPPER < 0xa8b2 0x01308933 > +MAPUPPER < 0xa8b3 0x01309f38 > +MAPUPPER < 0xa8b4 0x01308932 > +MAPUPPER < 0xa8b5 0x01309f39 > +MAPUPPER < 0xa8b6 - 0xa8b8 : 0x0130a030 > +MAPUPPER < 0xa8b9 0x01308935 > +MAPUPPER < 0xa8ba 0x01308738 > +MAPUPPER < 0xa8bd 0x01309231 > +MAPUPPER < 0xa8be 0x01309234 > +MAPUPPER < 0xa8bf 0x0130a330 > +MAPUPPER < 0x01308538 0xa6ac > +MAPUPPER < 0x01308939 0x01308730 > +MAPUPPER < 0x01308a30 - 0x01308a34 : 0x01308731 > +MAPUPPER < 0x01308a35 0x01308739 > +MAPUPPER < 0x01308a36 - 0x01308a39 : 0x01308832 > +MAPUPPER < 0x01308b30 - 0x01308b31 : 0x01308838 > +MAPUPPER < 0x01308b32 - 0x01308b33 : 0x01308930 > +MAPUPPER < 0x01308b34 0x01308934 > +MAPUPPER < 0x01308b35 - 0x01308b36 : 0x01308936 > +MAPUPPER < 0x01308b37 0x01309730 > +MAPUPPER < 0x01308c30 0x01308b39 > +MAPUPPER < 0x01308c32 0x01308c31 > +MAPUPPER < 0x01308c34 0x01308c33 > +MAPUPPER < 0x01308c36 0x01308c35 > +MAPUPPER < 0x01308c38 0x01308c37 > +MAPUPPER < 0x01308d30 0x01308c39 > +MAPUPPER < 0x01308d32 0x01308d31 > +MAPUPPER < 0x01308d34 0x01308d33 > +MAPUPPER < 0x01308d37 0x01308d36 > +MAPUPPER < 0x01308d39 0x01308d38 > +MAPUPPER < 0x01308e31 0x01308e30 > +MAPUPPER < 0x01308e34 0x01308e33 > +MAPUPPER < 0x01308e36 0x01308e35 > +MAPUPPER < 0x01308e38 0x01308e37 > +MAPUPPER < 0x01308f30 0x01308e39 > +MAPUPPER < 0x01308f32 0x01308f31 > +MAPUPPER < 0x01308f34 0x01308f33 > +MAPUPPER < 0x01308f36 0x01308f35 > +MAPUPPER < 0x01308f39 0x01308f38 > +MAPUPPER < 0x01309031 0x01309030 > +MAPUPPER < 0x01309033 0x49 > +MAPUPPER < 0x01309035 0x01309034 > +MAPUPPER < 0x01309037 0x01309036 > +MAPUPPER < 0x01309039 0x01309038 > +MAPUPPER < 0x01309132 0x01309131 > +MAPUPPER < 0x01309134 0x01309133 > +MAPUPPER < 0x01309136 0x01309135 > +MAPUPPER < 0x01309138 0x01309137 > +MAPUPPER < 0x01309230 0x01309139 > +MAPUPPER < 0x01309233 0x01309232 > +MAPUPPER < 0x01309237 0x01309236 > +MAPUPPER < 0x01309330 0x01309239 > +MAPUPPER < 0x01309332 0x01309331 > +MAPUPPER < 0x01309334 0x01309333 > +MAPUPPER < 0x01309336 0x01309335 > +MAPUPPER < 0x01309338 0x01309337 > +MAPUPPER < 0x01309430 0x01309339 > +MAPUPPER < 0x01309432 0x01309431 > +MAPUPPER < 0x01309434 0x01309433 > +MAPUPPER < 0x01309436 0x01309435 > +MAPUPPER < 0x01309438 0x01309437 > +MAPUPPER < 0x01309530 0x01309439 > +MAPUPPER < 0x01309532 0x01309531 > +MAPUPPER < 0x01309534 0x01309533 > +MAPUPPER < 0x01309536 0x01309535 > +MAPUPPER < 0x01309539 0x01309538 > +MAPUPPER < 0x01309631 0x01309630 > +MAPUPPER < 0x01309633 0x01309632 > +MAPUPPER < 0x01309635 0x01309634 > +MAPUPPER < 0x01309637 0x01309636 > +MAPUPPER < 0x01309639 0x01309638 > +MAPUPPER < 0x01309732 0x01309731 > +MAPUPPER < 0x01309734 0x01309733 > +MAPUPPER < 0x01309736 0x01309735 > +MAPUPPER < 0x01309737 0x53 > +MAPUPPER < 0x01309831 0x01309830 > +MAPUPPER < 0x01309833 0x01309832 > +MAPUPPER < 0x01309836 0x01309835 > +MAPUPPER < 0x01309930 0x01309839 > +MAPUPPER < 0x01309936 0x01309935 > +MAPUPPER < 0x01309939 0x0130a238 > +MAPUPPER < 0x01309a33 0x01309a32 > +MAPUPPER < 0x01309a38 0x0130a639 > +MAPUPPER < 0x01309b31 0x01309b30 > +MAPUPPER < 0x01309b33 0x01309b32 > +MAPUPPER < 0x01309b35 0x01309b34 > +MAPUPPER < 0x01309b38 0x01309b37 > +MAPUPPER < 0x01309c33 0x01309c32 > +MAPUPPER < 0x01309c36 0x01309c35 > +MAPUPPER < 0x01309d30 0x01309c39 > +MAPUPPER < 0x01309d32 0x01309d31 > +MAPUPPER < 0x01309d35 0x01309d34 > +MAPUPPER < 0x01309d39 0x01309d38 > +MAPUPPER < 0x01309e31 0x0130a239 > +MAPUPPER < 0x01309e37 0x01309e36 > +MAPUPPER < 0x01309e38 0x01309e36 > +MAPUPPER < 0x01309f30 0x01309e39 > +MAPUPPER < 0x01309f31 0x01309e39 > +MAPUPPER < 0x01309f33 0x01309f32 > +MAPUPPER < 0x01309f34 0x01309f32 > +MAPUPPER < 0x0130a033 0x01309932 > +MAPUPPER < 0x0130a035 0x0130a034 > +MAPUPPER < 0x0130a037 0x0130a036 > +MAPUPPER < 0x0130a039 0x0130a038 > +MAPUPPER < 0x0130a131 0x0130a130 > +MAPUPPER < 0x0130a133 0x0130a132 > +MAPUPPER < 0x0130a135 0x0130a134 > +MAPUPPER < 0x0130a137 0x0130a136 > +MAPUPPER < 0x0130a139 0x0130a138 > +MAPUPPER < 0x0130a231 0x0130a230 > +MAPUPPER < 0x0130a234 0x0130a233 > +MAPUPPER < 0x0130a235 0x0130a233 > +MAPUPPER < 0x0130a237 0x0130a236 > +MAPUPPER < 0x0130a332 0x0130a331 > +MAPUPPER < 0x0130a334 0x0130a333 > +MAPUPPER < 0x0130a336 0x0130a335 > +MAPUPPER < 0x0130a338 0x0130a337 > +MAPUPPER < 0x0130a430 0x0130a339 > +MAPUPPER < 0x0130a432 0x0130a431 > +MAPUPPER < 0x0130a434 0x0130a433 > +MAPUPPER < 0x0130a436 0x0130a435 > +MAPUPPER < 0x0130a438 0x0130a437 > +MAPUPPER < 0x0130a530 0x0130a439 > +MAPUPPER < 0x0130a532 0x0130a531 > +MAPUPPER < 0x0130a534 0x0130a533 > +MAPUPPER < 0x0130a536 0x0130a535 > +MAPUPPER < 0x0130a538 0x0130a537 > +MAPUPPER < 0x0130a630 0x0130a539 > +MAPUPPER < 0x0130a632 0x0130a631 > +MAPUPPER < 0x0130a634 0x0130a633 > +MAPUPPER < 0x0130a636 0x0130a635 > +MAPUPPER < 0x0130a638 0x0130a637 > +MAPUPPER < 0x0130a732 0x0130a731 > +MAPUPPER < 0x0130a734 0x0130a733 > +MAPUPPER < 0x0130a736 0x0130a735 > +MAPUPPER < 0x0130a738 0x0130a737 > +MAPUPPER < 0x0130a830 0x0130a739 > +MAPUPPER < 0x0130a832 0x0130a831 > +MAPUPPER < 0x0130a834 0x0130a833 > +MAPUPPER < 0x0130a836 0x0130a835 > +MAPUPPER < 0x0130a838 0x0130a837 > +MAPUPPER < 0x0130ab39 0x01309739 > +MAPUPPER < 0x0130ac30 0x01309834 > +MAPUPPER < 0x0130ac32 - 0x0130ac33 : 0x01309837 > +MAPUPPER < 0x0130ac35 0x01309933 > +MAPUPPER < 0x0130ac37 0x01309934 > +MAPUPPER < 0x0130ad32 0x01309937 > +MAPUPPER < 0x0130ad34 0x01309938 > +MAPUPPER < 0x0130ad39 0x01309a31 > +MAPUPPER < 0x0130ae30 0x01309a30 > +MAPUPPER < 0x0130ae36 0x01309a36 > +MAPUPPER < 0x0130ae39 0x01309a37 > +MAPUPPER < 0x0130af32 0x01309a39 > +MAPUPPER < 0x0130b033 0x01309b36 > +MAPUPPER < 0x0130b036 0x01309b39 > +MAPUPPER < 0x0130b131 0x01309c34 > +MAPUPPER < 0x0130b133 - 0x0130b134 : 0x01309c37 > +MAPUPPER < 0x0130b231 0x01309d33 > +MAPUPPER < 0x0130c335 0xa6a9 > +MAPUPPER < 0x0130cb34 0x0130ca30 > +MAPUPPER < 0x0130cb35 - 0x0130cb37 : 0x0130ca32 > +MAPUPPER < 0x0130cb39 0xa6b2 > +MAPUPPER < 0x0130cc30 - 0x0130cc31 : 0x0130cb32 > +MAPUPPER < 0x0130cc32 0x0130ca36 > +MAPUPPER < 0x0130cc33 - 0x0130cc34 : 0x0130ca38 > +MAPUPPER < 0x0130cc36 0xa6a2 > +MAPUPPER < 0x0130cc37 0xa6a8 > +MAPUPPER < 0x0130cd31 0xa6b5 > +MAPUPPER < 0x0130cd32 0xa6b0 > +MAPUPPER < 0x0130cd35 0x0130cd34 > +MAPUPPER < 0x0130cd37 0x0130cd36 > +MAPUPPER < 0x0130cd39 0x0130cd38 > +MAPUPPER < 0x0130ce31 0x0130ce30 > +MAPUPPER < 0x0130ce33 0x0130ce32 > +MAPUPPER < 0x0130ce35 0x0130ce34 > +MAPUPPER < 0x0130ce37 0x0130ce36 > +MAPUPPER < 0x0130ce39 0x0130ce38 > +MAPUPPER < 0x0130cf31 0x0130cf30 > +MAPUPPER < 0x0130cf33 0x0130cf32 > +MAPUPPER < 0x0130cf35 0x0130cf34 > +MAPUPPER < 0x0130cf37 0x0130cf36 > +MAPUPPER < 0x0130cf38 0xa6aa > +MAPUPPER < 0x0130cf39 0xa6b1 > +MAPUPPER < 0x0130d030 0xa6b2 > +MAPUPPER < 0x0130d033 0xa6a5 > +MAPUPPER < 0x0130d239 0x0130d134 > +MAPUPPER < 0x0130d330 - 0x0130d334 : 0x0130d135 > +MAPUPPER < 0x0130d335 - 0x0130d339 : 0x0130d230 > +MAPUPPER < 0x0130d430 - 0x0130d433 : 0x0130d235 > +MAPUPPER < 0x0130d435 0x0130d434 > +MAPUPPER < 0x0130d437 0x0130d436 > +MAPUPPER < 0x0130d439 0x0130d438 > +MAPUPPER < 0x0130d531 0x0130d530 > +MAPUPPER < 0x0130d533 0x0130d532 > +MAPUPPER < 0x0130d535 0x0130d534 > +MAPUPPER < 0x0130d537 0x0130d536 > +MAPUPPER < 0x0130d539 0x0130d538 > +MAPUPPER < 0x0130d631 0x0130d630 > +MAPUPPER < 0x0130d633 0x0130d632 > +MAPUPPER < 0x0130d635 0x0130d634 > +MAPUPPER < 0x0130d637 0x0130d636 > +MAPUPPER < 0x0130d639 0x0130d638 > +MAPUPPER < 0x0130d731 0x0130d730 > +MAPUPPER < 0x0130d733 0x0130d732 > +MAPUPPER < 0x0130d735 0x0130d734 > +MAPUPPER < 0x0130d737 0x0130d736 > +MAPUPPER < 0x0130d837 0x0130d836 > +MAPUPPER < 0x0130d839 0x0130d838 > +MAPUPPER < 0x0130d931 0x0130d930 > +MAPUPPER < 0x0130d933 0x0130d932 > +MAPUPPER < 0x0130d935 0x0130d934 > +MAPUPPER < 0x0130d937 0x0130d936 > +MAPUPPER < 0x0130d939 0x0130d938 > +MAPUPPER < 0x0130da31 0x0130da30 > +MAPUPPER < 0x0130da33 0x0130da32 > +MAPUPPER < 0x0130da35 0x0130da34 > +MAPUPPER < 0x0130da37 0x0130da36 > +MAPUPPER < 0x0130da39 0x0130da38 > +MAPUPPER < 0x0130db31 0x0130db30 > +MAPUPPER < 0x0130db33 0x0130db32 > +MAPUPPER < 0x0130db35 0x0130db34 > +MAPUPPER < 0x0130db37 0x0130db36 > +MAPUPPER < 0x0130db39 0x0130db38 > +MAPUPPER < 0x0130dc31 0x0130dc30 > +MAPUPPER < 0x0130dc33 0x0130dc32 > +MAPUPPER < 0x0130dc35 0x0130dc34 > +MAPUPPER < 0x0130dc37 0x0130dc36 > +MAPUPPER < 0x0130dc39 0x0130dc38 > +MAPUPPER < 0x0130dd31 0x0130dd30 > +MAPUPPER < 0x0130dd33 0x0130dd32 > +MAPUPPER < 0x0130dd35 0x0130dd34 > +MAPUPPER < 0x0130dd37 0x0130dd36 > +MAPUPPER < 0x0130dd39 0x0130dd38 > +MAPUPPER < 0x0130de32 0x0130de31 > +MAPUPPER < 0x0130de34 0x0130de33 > +MAPUPPER < 0x0130de36 0x0130de35 > +MAPUPPER < 0x0130de38 0x0130de37 > +MAPUPPER < 0x0130df30 0x0130de39 > +MAPUPPER < 0x0130df32 0x0130df31 > +MAPUPPER < 0x0130df34 0x0130df33 > +MAPUPPER < 0x0130df37 0x0130df36 > +MAPUPPER < 0x0130df39 0x0130df38 > +MAPUPPER < 0x0130e031 0x0130e030 > +MAPUPPER < 0x0130e033 0x0130e032 > +MAPUPPER < 0x0130e035 0x0130e034 > +MAPUPPER < 0x0130e037 0x0130e036 > +MAPUPPER < 0x0130e039 0x0130e038 > +MAPUPPER < 0x0130e131 0x0130e130 > +MAPUPPER < 0x0130e133 0x0130e132 > +MAPUPPER < 0x0130e135 0x0130e134 > +MAPUPPER < 0x0130e137 0x0130e136 > +MAPUPPER < 0x0130e139 0x0130e138 > +MAPUPPER < 0x0130e231 0x0130e230 > +MAPUPPER < 0x0130e233 0x0130e232 > +MAPUPPER < 0x0130e235 0x0130e234 > +MAPUPPER < 0x0130e237 0x0130e236 > +MAPUPPER < 0x0130e239 0x0130e238 > +MAPUPPER < 0x0130e331 0x0130e330 > +MAPUPPER < 0x0130e333 0x0130e332 > +MAPUPPER < 0x0130e337 0x0130e336 > +MAPUPPER < 0x0130e435 0x0130e434 > +MAPUPPER < 0x0130e437 0x0130e436 > +MAPUPPER < 0x0130e439 0x0130e438 > +MAPUPPER < 0x0130e531 0x0130e530 > +MAPUPPER < 0x0130e533 0x0130e532 > +MAPUPPER < 0x0130e535 0x0130e534 > +MAPUPPER < 0x0130e537 0x0130e536 > +MAPUPPER < 0x0130e539 0x0130e538 > +MAPUPPER < 0x0130ee31 - 0x0130ee37 : 0x0130e933 > +MAPUPPER < 0x0130ee38 - 0x0130ee39 : 0x0130ea30 > +MAPUPPER < 0x0130ef30 - 0x0130ef37 : 0x0130ea32 > +MAPUPPER < 0x0130ef38 - 0x0130ef39 : 0x0130eb30 > +MAPUPPER < 0x0130f030 - 0x0130f037 : 0x0130eb32 > +MAPUPPER < 0x0130f038 - 0x0130f039 : 0x0130ec30 > +MAPUPPER < 0x0130f130 - 0x0130f137 : 0x0130ec32 > +MAPUPPER < 0x0130f138 0x0130ed30 > +MAPUPPER < 0x0135ee35 0x0135ee34 > +MAPUPPER < 0x0135ee37 0x0135ee36 > +MAPUPPER < 0x0135ee39 0x0135ee38 > +MAPUPPER < 0x0135ef31 0x0135ef30 > +MAPUPPER < 0x0135ef33 0x0135ef32 > +MAPUPPER < 0x0135ef35 0x0135ef34 > +MAPUPPER < 0x0135ef37 0x0135ef36 > +MAPUPPER < 0x0135ef39 0x0135ef38 > +MAPUPPER < 0x0135f031 0x0135f030 > +MAPUPPER < 0x0135f033 0x0135f032 > +MAPUPPER < 0x0135f035 0x0135f034 > +MAPUPPER < 0x0135f037 0x0135f036 > +MAPUPPER < 0x0135f039 0x0135f038 > +MAPUPPER < 0x0135f131 0x0135f130 > +MAPUPPER < 0x0135f133 0x0135f132 > +MAPUPPER < 0x0135f135 0x0135f134 > +MAPUPPER < 0x0135f137 0x0135f136 > +MAPUPPER < 0x0135f139 0x0135f138 > +MAPUPPER < 0x0135f231 0x0135f230 > +MAPUPPER < 0x0135f233 0x0135f232 > +MAPUPPER < 0x0135f235 0x0135f234 > +MAPUPPER < 0x0135f237 0x0135f236 > +MAPUPPER < 0x0135f239 0x0135f238 > +MAPUPPER < 0x0135f331 0x0135f330 > +MAPUPPER < 0x0135f333 0x0135f332 > +MAPUPPER < 0x0135f335 0x0135f334 > +MAPUPPER < 0x0135f337 0x0135f336 > +MAPUPPER < 0x0135f339 0x0135f338 > +MAPUPPER < 0x0135f431 0x0135f430 > +MAPUPPER < 0x0135f433 0x0135f432 > +MAPUPPER < 0x0135f435 0x0135f434 > +MAPUPPER < 0x0135f437 0x0135f436 > +MAPUPPER < 0x0135f439 0x0135f438 > +MAPUPPER < 0x0135f531 0x0135f530 > +MAPUPPER < 0x0135f533 0x0135f532 > +MAPUPPER < 0x0135f535 0x0135f534 > +MAPUPPER < 0x0135f537 0x0135f536 > +MAPUPPER < 0x0135f539 0x0135f538 > +MAPUPPER < 0x0135f631 0x0135f630 > +MAPUPPER < 0x0135f633 0x0135f632 > +MAPUPPER < 0x0135f635 0x0135f634 > +MAPUPPER < 0x0135f637 0x0135f636 > +MAPUPPER < 0x0135f639 0x0135f638 > +MAPUPPER < 0x0135f731 0x0135f730 > +MAPUPPER < 0x0135f733 0x0135f732 > +MAPUPPER < 0x0135f735 0x0135f734 > +MAPUPPER < 0x0135f737 0x0135f736 > +MAPUPPER < 0x0135f739 0x0135f738 > +MAPUPPER < 0x0135f831 0x0135f830 > +MAPUPPER < 0x0135f833 0x0135f832 > +MAPUPPER < 0x0135f835 0x0135f834 > +MAPUPPER < 0x0135f837 0x0135f836 > +MAPUPPER < 0x0135f839 0x0135f838 > +MAPUPPER < 0x0135f931 0x0135f930 > +MAPUPPER < 0x0135f933 0x0135f932 > +MAPUPPER < 0x0135f935 0x0135f934 > +MAPUPPER < 0x0135f937 0x0135f936 > +MAPUPPER < 0x0135f939 0x0135f938 > +MAPUPPER < 0x0135fa31 0x0135fa30 > +MAPUPPER < 0x0135fa33 0x0135fa32 > +MAPUPPER < 0x0135fa35 0x0135fa34 > +MAPUPPER < 0x0135fa37 0x0135fa36 > +MAPUPPER < 0x0135fa39 0x0135fa38 > +MAPUPPER < 0x0135fb31 0x0135fb30 > +MAPUPPER < 0x0135fb33 0x0135fb32 > +MAPUPPER < 0x0135fb35 0x0135fb34 > +MAPUPPER < 0x0135fb37 0x0135fb36 > +MAPUPPER < 0x0135fb39 0x0135fb38 > +MAPUPPER < 0x0135fc31 0x0135fc30 > +MAPUPPER < 0x0135fc33 0x0135fc32 > +MAPUPPER < 0x0135fc35 0x0135fc34 > +MAPUPPER < 0x0135fc37 0x0135fc36 > +MAPUPPER < 0x0135fc39 0x0135fc38 > +MAPUPPER < 0x0135fd31 0x0135fd30 > +MAPUPPER < 0x0135fd33 0x0135fd32 > +MAPUPPER < 0x0135fd39 0x0135f830 > +MAPUPPER < 0x0135fe35 0x0135fe34 > +MAPUPPER < 0x0135fe37 0x0135fe36 > +MAPUPPER < 0x0135fe39 0x0135fe38 > +MAPUPPER < 0x01368131 0x01368130 > +MAPUPPER < 0x01368133 0x01368132 > +MAPUPPER < 0x01368135 0x01368134 > +MAPUPPER < 0x01368137 0x01368136 > +MAPUPPER < 0x01368139 0x01368138 > +MAPUPPER < 0x01368231 0x01368230 > +MAPUPPER < 0x01368233 0x01368232 > +MAPUPPER < 0x01368235 0x01368234 > +MAPUPPER < 0x01368237 0x01368236 > +MAPUPPER < 0x01368239 0x01368238 > +MAPUPPER < 0x01368331 0x01368330 > +MAPUPPER < 0x01368333 0x01368332 > +MAPUPPER < 0x01368335 0x01368334 > +MAPUPPER < 0x01368337 0x01368336 > +MAPUPPER < 0x01368339 0x01368338 > +MAPUPPER < 0x01368431 0x01368430 > +MAPUPPER < 0x01368433 0x01368432 > +MAPUPPER < 0x01368435 0x01368434 > +MAPUPPER < 0x01368437 0x01368436 > +MAPUPPER < 0x01368439 0x01368438 > +MAPUPPER < 0x01368531 0x01368530 > +MAPUPPER < 0x01368533 0x01368532 > +MAPUPPER < 0x01368535 0x01368534 > +MAPUPPER < 0x01368537 0x01368536 > +MAPUPPER < 0x01368539 0x01368538 > +MAPUPPER < 0x01368631 0x01368630 > +MAPUPPER < 0x01368633 0x01368632 > +MAPUPPER < 0x01368635 0x01368634 > +MAPUPPER < 0x01368637 0x01368636 > +MAPUPPER < 0x01368639 0x01368638 > +MAPUPPER < 0x01368731 0x01368730 > +MAPUPPER < 0x01368733 0x01368732 > +MAPUPPER < 0x01368735 0x01368734 > +MAPUPPER < 0x01368737 0x01368736 > +MAPUPPER < 0x01368739 0x01368738 > +MAPUPPER < 0x01368831 0x01368830 > +MAPUPPER < 0x01368833 0x01368832 > +MAPUPPER < 0x01368835 0x01368834 > +MAPUPPER < 0x01368837 0x01368836 > +MAPUPPER < 0x01368839 0x01368838 > +MAPUPPER < 0x01368931 0x01368930 > +MAPUPPER < 0x01368933 0x01368932 > +MAPUPPER < 0x01368a30 - 0x01368a31 : 0x01368a38 > +MAPUPPER < 0x01368a32 - 0x01368a37 : 0x01368b30 > +MAPUPPER < 0x01368b36 - 0x01368b39 : 0x01368c34 > +MAPUPPER < 0x01368c30 - 0x01368c31 : 0x01368c38 > +MAPUPPER < 0x01368d32 - 0x01368d39 : 0x01368e30 > +MAPUPPER < 0x01368e38 - 0x01368e39 : 0x01368f36 > +MAPUPPER < 0x01368f30 - 0x01368f31 : 0x01368f38 > +MAPUPPER < 0x01368f32 - 0x01368f35 : 0x01369030 > +MAPUPPER < 0x01369034 - 0x01369039 : 0x01369132 > +MAPUPPER < 0x01369231 0x01369239 > +MAPUPPER < 0x01369233 0x01369331 > +MAPUPPER < 0x01369235 0x01369333 > +MAPUPPER < 0x01369237 0x01369335 > +MAPUPPER < 0x01369336 - 0x01369339 : 0x01369434 > +MAPUPPER < 0x01369430 - 0x01369431 : 0x01369438 > +MAPUPPER < 0x01369432 - 0x01369433 : 0x01369530 > +MAPUPPER < 0x01369532 - 0x01369533 : 0x01369c36 > +MAPUPPER < 0x01369534 - 0x01369537 : 0x01369e30 > +MAPUPPER < 0x01369538 - 0x01369539 : 0x01369f38 > +MAPUPPER < 0x01369630 - 0x01369631 : 0x0136a238 > +MAPUPPER < 0x01369632 - 0x01369633 : 0x0136a134 > +MAPUPPER < 0x01369634 - 0x01369635 : 0x0136a330 > +MAPUPPER < 0x01369638 - 0x01369639 : 0x01369736 > +MAPUPPER < 0x01369730 - 0x01369731 : 0x01369738 > +MAPUPPER < 0x01369732 - 0x01369735 : 0x01369830 > +MAPUPPER < 0x01369834 - 0x01369839 : 0x01369932 > +MAPUPPER < 0x01369930 - 0x01369931 : 0x01369938 > +MAPUPPER < 0x01369a30 - 0x01369a31 : 0x01369a38 > +MAPUPPER < 0x01369a32 - 0x01369a37 : 0x01369b30 > +MAPUPPER < 0x01369b36 - 0x01369b37 : 0x01369c34 > +MAPUPPER < 0x01369b39 0x01369c38 > +MAPUPPER < 0x01369d30 0xa6a9 > +MAPUPPER < 0x01369d35 0x01369e34 > +MAPUPPER < 0x01369e38 - 0x01369e39 : 0x01369f36 > +MAPUPPER < 0x0136a034 - 0x0136a035 : 0x0136a132 > +MAPUPPER < 0x0136a039 0x0136a136 > +MAPUPPER < 0x0136a233 0x0136a332 > +MAPUPPER < 0x0136c530 - 0x0136c531 : 0xa2fb > +MAPUPPER < 0x0136c532 - 0x0136c535 : 0x0136c436 > +MAPUPPER < 0x01379238 - 0x01379239 : 0x01379032 > +MAPUPPER < 0x01379330 - 0x01379335 : 0x01379034 > +MAPUPPER < 0x01379336 - 0x01379339 : 0x01379130 > +MAPUPPER < 0x01379430 - 0x01379435 : 0x01379134 > +MAPUPPER < 0x01379436 - 0x01379439 : 0x01379230 > +MAPUPPER < 0x01379530 - 0x01379533 : 0x01379234 > +PHONOGRAM 0x0132e834 +PHONOGRAM 0x0133b732 - 0x0133b738 +PHONOGRAM 0x0133b830 - 0x0133b839 +PHONOGRAM 0x0133b930 - 0x0133b939 +PHONOGRAM 0x0133ba30 - 0x0133ba39 +PHONOGRAM 0x0133bb30 - 0x0133bb39 +PHONOGRAM 0x0133bc30 - 0x0133bc39 +PHONOGRAM 0x0133bd30 - 0x0133bd39 +PHONOGRAM 0x0133be30 - 0x0133be32 0x0133be34 0x0133be36 - 0x0133be39 +PHONOGRAM 0x0133bf32 - 0x0133bf38 +PHONOGRAM 0x0133c030 0x0133c032 - 0x0133c035 0x0133c038 0x0133c039 +PHONOGRAM 0x0133c130 - 0x0133c139 +PHONOGRAM 0x0133c230 - 0x0133c239 +PHONOGRAM 0x0133c330 - 0x0133c339 +PHONOGRAM 0x0133c430 - 0x0133c436 0x0133c438 +PHONOGRAM 0x0133c530 - 0x0133c533 0x0133c536 - 0x0133c539 +PHONOGRAM 0x0133c630 - 0x0133c639 +PHONOGRAM 0x0133c730 - 0x0133c739 +PHONOGRAM 0x0133c830 - 0x0133c836 0x0133c838 +PHONOGRAM 0x0133c930 - 0x0133c933 0x0133c936 - 0x0133c939 +PHONOGRAM 0x0133ca30 - 0x0133ca32 0x0133ca34 0x0133ca36 - 0x0133ca39 +PHONOGRAM 0x0133cb32 - 0x0133cb38 +PHONOGRAM 0x0133cc30 - 0x0133cc36 0x0133cc38 0x0133cc39 +PHONOGRAM 0x0133cd30 - 0x0133cd39 +PHONOGRAM 0x0133ce30 - 0x0133ce39 +PHONOGRAM 0x0133cf30 0x0133cf32 - 0x0133cf39 +PHONOGRAM 0x0133d030 - 0x0133d039 +PHONOGRAM 0x0133d130 - 0x0133d139 +PHONOGRAM 0x0133d230 - 0x0133d232 0x0133d234 0x0133d236 - 0x0133d239 +PHONOGRAM 0x0133d332 - 0x0133d338 +PHONOGRAM 0x0133d430 - 0x0133d439 +PHONOGRAM 0x0133d530 - 0x0133d539 +PHONOGRAM 0x0133d630 - 0x0133d639 +PHONOGRAM 0x0133d730 - 0x0133d738 +PHONOGRAM 0x0133d830 - 0x0133d839 +PHONOGRAM 0x0133d930 - 0x0133d938 +PHONOGRAM 0x0133ea35 - 0x0133ea39 +PHONOGRAM 0x0133eb30 - 0x0133eb39 +PHONOGRAM 0x0133ec30 - 0x0133ec39 +PHONOGRAM 0x0133ed30 - 0x0133ed39 +PHONOGRAM 0x0133ee30 - 0x0133ee39 +PHONOGRAM 0x0133ef30 - 0x0133ef39 +PHONOGRAM 0x0133f030 - 0x0133f039 +PHONOGRAM 0x0133f130 - 0x0133f139 +PHONOGRAM 0x0133f230 - 0x0133f239 +PHONOGRAM 0x0133f330 - 0x0133f339 +PHONOGRAM 0x0133f430 - 0x0133f439 +PHONOGRAM 0x0133f530 - 0x0133f539 +PHONOGRAM 0x0133f630 - 0x0133f639 +PHONOGRAM 0x0133f730 - 0x0133f739 +PHONOGRAM 0x0133f830 - 0x0133f839 +PHONOGRAM 0x0133f930 - 0x0133f939 +PHONOGRAM 0x0133fa30 - 0x0133fa39 +PHONOGRAM 0x0133fb30 - 0x0133fb39 +PHONOGRAM 0x0133fc30 - 0x0133fc39 +PHONOGRAM 0x0133fd30 - 0x0133fd39 +PHONOGRAM 0x0133fe30 - 0x0133fe39 +PHONOGRAM 0x01348130 - 0x01348139 +PHONOGRAM 0x01348230 - 0x01348239 +PHONOGRAM 0x01348330 - 0x01348339 +PHONOGRAM 0x01348430 - 0x01348439 +PHONOGRAM 0x01348530 - 0x01348539 +PHONOGRAM 0x01348630 - 0x01348639 +PHONOGRAM 0x01348730 - 0x01348739 +PHONOGRAM 0x01348830 - 0x01348839 +PHONOGRAM 0x01348930 - 0x01348939 +PHONOGRAM 0x01348a30 - 0x01348a39 +PHONOGRAM 0x01348b30 - 0x01348b39 +PHONOGRAM 0x01348c30 - 0x01348c39 +PHONOGRAM 0x01348d30 - 0x01348d39 +PHONOGRAM 0x01348e30 - 0x01348e39 +PHONOGRAM 0x01348f30 - 0x01348f39 +PHONOGRAM 0x01349030 - 0x01349039 +PHONOGRAM 0x01349130 - 0x01349139 +PHONOGRAM 0x01349230 - 0x01349239 +PHONOGRAM 0x01349330 - 0x01349339 +PHONOGRAM 0x01349430 - 0x01349439 +PHONOGRAM 0x01349530 - 0x01349539 +PHONOGRAM 0x01349630 - 0x01349639 +PHONOGRAM 0x01349730 - 0x01349739 +PHONOGRAM 0x01349830 - 0x01349839 +PHONOGRAM 0x01349930 - 0x01349939 +PHONOGRAM 0x01349a30 - 0x01349a39 +PHONOGRAM 0x01349b30 - 0x01349b39 +PHONOGRAM 0x01349c30 - 0x01349c39 +PHONOGRAM 0x01349d30 - 0x01349d39 +PHONOGRAM 0x01349e30 - 0x01349e39 +PHONOGRAM 0x01349f30 - 0x01349f39 +PHONOGRAM 0x0134a030 - 0x0134a039 +PHONOGRAM 0x0134a130 - 0x0134a139 +PHONOGRAM 0x0134a230 - 0x0134a239 +PHONOGRAM 0x0134a330 - 0x0134a339 +PHONOGRAM 0x0134a430 - 0x0134a439 +PHONOGRAM 0x0134a530 - 0x0134a539 +PHONOGRAM 0x0134a630 - 0x0134a639 +PHONOGRAM 0x0134a730 - 0x0134a739 +PHONOGRAM 0x0134a830 - 0x0134a839 +PHONOGRAM 0x0134a930 - 0x0134a939 +PHONOGRAM 0x0134aa30 - 0x0134aa34 0x0134aa37 - 0x0134aa39 +PHONOGRAM 0x0134ab30 - 0x0134ab34 +PHONOGRAM 0x0139a636 - 0x0139a638 +PHONOGRAM 0x0139a733 0x0139a735 - 0x0139a738 +PHONOGRAM 0x0139a830 +PHONOGRAM 0x0139a933 - 0x0139a939 +PHONOGRAM 0x0139aa30 - 0x0139aa39 +PHONOGRAM 0x0139ab30 - 0x0139ab39 +PHONOGRAM 0x0139ac30 - 0x0139ac39 +PHONOGRAM 0x0139ad30 - 0x0139ad39 +PHONOGRAM 0x0139ae30 - 0x0139ae33 0x0139ae35 - 0x0139ae39 +PHONOGRAM 0x0139af30 - 0x0139af39 +PHONOGRAM 0x0139b030 - 0x0139b039 +PHONOGRAM 0x0139b130 - 0x0139b139 +PHONOGRAM 0x0139b230 - 0x0139b236 +PHONOGRAM 0x0139bc34 - 0x0139bc39 +PHONOGRAM 0x0139bd30 - 0x0139bd39 +PHONOGRAM 0x02359833 - 0x02359839 +PHONOGRAM 0x02359930 - 0x02359939 +PHONOGRAM 0x02359a30 - 0x02359a39 +PHONOGRAM 0x02359b30 - 0x02359b39 +PHONOGRAM 0x02359c30 - 0x02359c39 +PHONOGRAM 0x02359d30 - 0x02359d39 +PHONOGRAM 0x02359e30 - 0x02359e39 +PHONOGRAM 0x02359f30 - 0x02359f39 +PHONOGRAM 0x0235a030 - 0x0235a039 +PHONOGRAM 0x0235a130 - 0x0235a139 +PHONOGRAM 0x0235a230 - 0x0235a239 +PHONOGRAM 0x0235a330 - 0x0235a339 +PHONOGRAM 0x0235a430 - 0x0235a439 +PHONOGRAM 0x0235a530 - 0x0235a539 +PHONOGRAM 0x0235a630 - 0x0235a639 +PHONOGRAM 0x0235a730 - 0x0235a739 +PHONOGRAM 0x0235a830 - 0x0235a839 +PHONOGRAM 0x0235a930 - 0x0235a939 +PHONOGRAM 0x0235aa30 - 0x0235aa39 +PHONOGRAM 0x0235ab30 - 0x0235ab39 +PHONOGRAM 0x0235ac30 - 0x0235ac39 +PHONOGRAM 0x0235ad30 - 0x0235ad39 +PHONOGRAM 0x0235ae30 - 0x0235ae39 +PHONOGRAM 0x0235af30 - 0x0235af39 +PHONOGRAM 0x0235b030 - 0x0235b039 +PHONOGRAM 0x0235b130 - 0x0235b139 +PHONOGRAM 0x0235b230 - 0x0235b239 +PHONOGRAM 0x0235b330 - 0x0235b339 +PHONOGRAM 0x0235b430 - 0x0235b439 +PHONOGRAM 0x0235b530 - 0x0235b539 +PHONOGRAM 0x0235b630 - 0x0235b639 +PHONOGRAM 0x0235b730 - 0x0235b739 +PHONOGRAM 0x0235b830 - 0x0235b839 +PHONOGRAM 0x0235b930 - 0x0235b939 +PHONOGRAM 0x0235ba30 - 0x0235ba39 +PHONOGRAM 0x0235bb30 - 0x0235bb39 +PHONOGRAM 0x0235bc30 - 0x0235bc39 +PHONOGRAM 0x0235bd30 - 0x0235bd39 +PHONOGRAM 0x0235be30 - 0x0235be39 +PHONOGRAM 0x0235bf30 - 0x0235bf39 +PHONOGRAM 0x0235c030 - 0x0235c039 +PHONOGRAM 0x0235c130 - 0x0235c139 +PHONOGRAM 0x0235c230 - 0x0235c239 +PHONOGRAM 0x0235c330 - 0x0235c339 +PHONOGRAM 0x0235c430 - 0x0235c439 +PHONOGRAM 0x0235c530 - 0x0235c539 +PHONOGRAM 0x0235c630 - 0x0235c639 +PHONOGRAM 0x0235c730 - 0x0235c739 +PHONOGRAM 0x0235c830 - 0x0235c839 +PHONOGRAM 0x0235c930 - 0x0235c939 +PHONOGRAM 0x0235ca30 - 0x0235ca39 +PHONOGRAM 0x0235cb30 - 0x0235cb39 +PHONOGRAM 0x0235cc30 - 0x0235cc39 +PHONOGRAM 0x0235cd30 - 0x0235cd39 +PHONOGRAM 0x0235ce30 - 0x0235ce39 +PHONOGRAM 0x0235cf30 - 0x0235cf39 +PHONOGRAM 0x0235d030 - 0x0235d039 +PHONOGRAM 0x0235d130 - 0x0235d139 +PHONOGRAM 0x0235d230 - 0x0235d239 +PHONOGRAM 0x0235d330 - 0x0235d339 +PHONOGRAM 0x0235d430 - 0x0235d439 +PHONOGRAM 0x0235d530 - 0x0235d539 +PHONOGRAM 0x0235d630 - 0x0235d639 +PHONOGRAM 0x0235d730 - 0x0235d739 +PHONOGRAM 0x0235d830 - 0x0235d839 +PHONOGRAM 0x0235d930 - 0x0235d939 +PHONOGRAM 0x0235da30 - 0x0235da39 +PHONOGRAM 0x0235db30 - 0x0235db39 +PHONOGRAM 0x0235dc30 - 0x0235dc39 +PHONOGRAM 0x0235dd30 - 0x0235dd39 +PHONOGRAM 0x0235de30 - 0x0235de39 +PHONOGRAM 0x0235df30 - 0x0235df39 +PHONOGRAM 0x0235e030 - 0x0235e039 +PHONOGRAM 0x0235e130 - 0x0235e139 +PHONOGRAM 0x0235e230 - 0x0235e239 +PHONOGRAM 0x0235e330 - 0x0235e339 +PHONOGRAM 0x0235e430 - 0x0235e439 +PHONOGRAM 0x0235e530 - 0x0235e539 +PHONOGRAM 0x0235e630 - 0x0235e639 +PHONOGRAM 0x0235e730 - 0x0235e739 +PHONOGRAM 0x0235e830 - 0x0235e839 +PHONOGRAM 0x0235e930 - 0x0235e939 +PHONOGRAM 0x0235ea30 - 0x0235ea39 +PHONOGRAM 0x0235eb30 - 0x0235eb39 +PHONOGRAM 0x0235ec30 - 0x0235ec39 +PHONOGRAM 0x0235ed30 - 0x0235ed39 +PHONOGRAM 0x0235ee30 - 0x0235ee39 +PHONOGRAM 0x0235ef30 - 0x0235ef39 +PHONOGRAM 0x0235f030 - 0x0235f039 +PHONOGRAM 0x0235f130 - 0x0235f139 +PHONOGRAM 0x0235f230 - 0x0235f239 +PHONOGRAM 0x0235f330 - 0x0235f339 +PHONOGRAM 0x0235f430 - 0x0235f439 +PHONOGRAM 0x0235f530 - 0x0235f539 +PHONOGRAM 0x0235f630 - 0x0235f639 +PHONOGRAM 0x0235f730 - 0x0235f739 +PHONOGRAM 0x0235f830 - 0x0235f839 +PHONOGRAM 0x0235f930 - 0x0235f939 +PHONOGRAM 0x0235fa30 - 0x0235fa39 +PHONOGRAM 0x0235fb30 - 0x0235fb39 +PHONOGRAM 0x0235fc30 - 0x0235fc39 +PHONOGRAM 0x0235fd30 - 0x0235fd39 +PHONOGRAM 0x0235fe30 - 0x0235fe39 +PHONOGRAM 0x02368130 - 0x02368139 +PHONOGRAM 0x02368230 - 0x02368239 +PHONOGRAM 0x02368330 - 0x02368339 +PHONOGRAM 0x02368430 - 0x02368439 +PHONOGRAM 0x02368530 - 0x02368539 +PHONOGRAM 0x02368630 - 0x02368639 +PHONOGRAM 0x02368730 - 0x02368739 +PHONOGRAM 0x02368830 - 0x02368839 +PHONOGRAM 0x02368930 - 0x02368939 +PHONOGRAM 0x02368a30 - 0x02368a39 +PHONOGRAM 0x02368b30 - 0x02368b39 +PHONOGRAM 0x02368c30 - 0x02368c39 +PHONOGRAM 0x02368d30 - 0x02368d39 +PHONOGRAM 0x02368e30 - 0x02368e37 +PHONOGRAM 0x0237cf35 - 0x0237cf39 +PHONOGRAM 0x0237d030 - 0x0237d039 +PHONOGRAM 0x0237d130 - 0x0237d139 +PHONOGRAM 0x0237d230 - 0x0237d239 +PHONOGRAM 0x0237d330 - 0x0237d339 +PHONOGRAM 0x0237d430 - 0x0237d439 +PHONOGRAM 0x0237d530 - 0x0237d539 +PHONOGRAM 0x0237d630 - 0x0237d639 +PHONOGRAM 0x0237d730 - 0x0237d739 +PHONOGRAM 0x0237d830 - 0x0237d839 +PHONOGRAM 0x0237d930 - 0x0237d939 +PHONOGRAM 0x0237da30 - 0x0237da39 +PHONOGRAM 0x0237db30 - 0x0237db39 +PHONOGRAM 0x0237dc30 - 0x0237dc39 +PHONOGRAM 0x0237dd30 - 0x0237dd39 +PHONOGRAM 0x0237de30 - 0x0237de39 +PHONOGRAM 0x0237df30 - 0x0237df39 +PHONOGRAM 0x0237e030 - 0x0237e039 +PHONOGRAM 0x0237e130 - 0x0237e139 +PHONOGRAM 0x0237e230 - 0x0237e239 +PHONOGRAM 0x0237e330 - 0x0237e339 +PHONOGRAM 0x0237e430 - 0x0237e439 +PHONOGRAM 0x0237e530 - 0x0237e539 +PHONOGRAM 0x0237e630 - 0x0237e639 +PHONOGRAM 0x0237e730 - 0x0237e739 +PHONOGRAM 0x0237e830 - 0x0237e839 +PHONOGRAM 0x0237e930 - 0x0237e939 +PHONOGRAM 0x0237ea30 - 0x0237ea39 +PHONOGRAM 0x0237eb30 - 0x0237eb39 +PHONOGRAM 0x0237ec30 - 0x0237ec39 +PHONOGRAM 0x0237ed30 - 0x0237ed39 +PHONOGRAM 0x0237ee30 - 0x0237ee39 +PHONOGRAM 0x0237ef30 - 0x0237ef39 +PHONOGRAM 0x0237f030 - 0x0237f039 +PHONOGRAM 0x0237f130 - 0x0237f139 +PHONOGRAM 0x0237f230 - 0x0237f239 +PHONOGRAM 0x0237f330 - 0x0237f339 +PHONOGRAM 0x0237f430 - 0x0237f439 +PHONOGRAM 0x0237f530 - 0x0237f539 +PHONOGRAM 0x0237f630 - 0x0237f639 +PHONOGRAM 0x0237f730 - 0x0237f739 +PHONOGRAM 0x0237f830 - 0x0237f839 +PHONOGRAM 0x0237f930 - 0x0237f939 +PHONOGRAM 0x0237fa30 - 0x0237fa39 +PHONOGRAM 0x0237fb30 - 0x0237fb39 +PHONOGRAM 0x0237fc30 - 0x0237fc39 +PHONOGRAM 0x0237fd30 - 0x0237fd39 +PHONOGRAM 0x0237fe30 - 0x0237fe39 +PHONOGRAM 0x02388130 - 0x02388139 +PHONOGRAM 0x02388230 - 0x02388239 +PHONOGRAM 0x02388330 - 0x02388339 +PHONOGRAM 0x02388430 - 0x02388439 +PHONOGRAM 0x02388530 - 0x02388539 +PHONOGRAM 0x02388630 - 0x02388639 +PHONOGRAM 0x02388730 - 0x02388739 +PHONOGRAM 0x02388830 - 0x02388839 +PHONOGRAM 0x02388930 - 0x02388939 +PHONOGRAM 0x02388a30 - 0x02388a39 +PHONOGRAM 0x02388b30 - 0x02388b39 +PHONOGRAM 0x02388c30 - 0x02388c39 +PHONOGRAM 0x02388d30 - 0x02388d39 +PHONOGRAM 0x02388e30 - 0x02388e39 +PHONOGRAM 0x02388f30 - 0x02388f39 +PHONOGRAM 0x02389030 - 0x02389039 +PHONOGRAM 0x02389130 - 0x02389139 +PHONOGRAM 0x02389230 - 0x02389239 +PHONOGRAM 0x02389330 - 0x02389339 +PHONOGRAM 0x02389430 - 0x02389439 +PHONOGRAM 0x02389530 - 0x02389539 +PHONOGRAM 0x02389630 - 0x02389639 +PHONOGRAM 0x02389730 - 0x02389739 +PHONOGRAM 0x02389830 - 0x02389839 +PHONOGRAM 0x02389930 - 0x02389939 +PHONOGRAM 0x02389a30 - 0x02389a39 +PHONOGRAM 0x02389b30 - 0x02389b39 +PHONOGRAM 0x02389c30 - 0x02389c39 +PHONOGRAM 0x02389d30 - 0x02389d39 +PHONOGRAM 0x02389e30 - 0x02389e39 +PHONOGRAM 0x02389f30 - 0x02389f39 +PHONOGRAM 0x0238a030 - 0x0238a039 +PHONOGRAM 0x0238a130 - 0x0238a139 +PHONOGRAM 0x0238a230 - 0x0238a239 +PHONOGRAM 0x0238a330 - 0x0238a339 +PHONOGRAM 0x0238a430 - 0x0238a439 +PHONOGRAM 0x0238a530 - 0x0238a539 +PHONOGRAM 0x0238a630 - 0x0238a639 +PHONOGRAM 0x0238a730 - 0x0238a739 +PHONOGRAM 0x0238a830 - 0x0238a839 +PHONOGRAM 0x0238a930 - 0x0238a939 +PHONOGRAM 0x0238aa30 - 0x0238aa39 +PHONOGRAM 0x0238ab30 - 0x0238ab39 +PHONOGRAM 0x0238ac30 - 0x0238ac39 +PHONOGRAM 0x0238ad30 - 0x0238ad39 +PHONOGRAM 0x0238ae30 - 0x0238ae39 +PHONOGRAM 0x0238af30 - 0x0238af39 +PHONOGRAM 0x0238b030 - 0x0238b039 +PHONOGRAM 0x0238b130 - 0x0238b139 +PHONOGRAM 0x0238b230 - 0x0238b239 +PHONOGRAM 0x0238b330 - 0x0238b339 +PHONOGRAM 0x0238b430 - 0x0238b439 +PHONOGRAM 0x0238b530 - 0x0238b539 +PHONOGRAM 0x0238b630 - 0x0238b639 +PHONOGRAM 0x0238b730 - 0x0238b739 +PHONOGRAM 0x0238b830 - 0x0238b839 +PHONOGRAM 0x0238b930 - 0x0238b939 +PHONOGRAM 0x0238ba30 - 0x0238ba39 +PHONOGRAM 0x0238bb30 - 0x0238bb39 +PHONOGRAM 0x0238bc30 - 0x0238bc39 +PHONOGRAM 0x0238bd30 - 0x0238bd39 +PHONOGRAM 0x0238be30 - 0x0238be39 +PHONOGRAM 0x0238bf30 - 0x0238bf39 +PHONOGRAM 0x0238c030 - 0x0238c039 +PHONOGRAM 0x0238c130 - 0x0238c139 +PHONOGRAM 0x0238c230 - 0x0238c239 +PHONOGRAM 0x0238c330 - 0x0238c339 +PHONOGRAM 0x0238c430 - 0x0238c439 +PHONOGRAM 0x0238c530 - 0x0238c539 +PHONOGRAM 0x0238c630 - 0x0238c639 +PHONOGRAM 0x0238c730 - 0x0238c739 +PHONOGRAM 0x0238c830 - 0x0238c839 +PHONOGRAM 0x0238c930 - 0x0238c939 +PHONOGRAM 0x0238ca30 - 0x0238ca39 +PHONOGRAM 0x0238cb30 - 0x0238cb39 +PHONOGRAM 0x0238cc30 - 0x0238cc39 +PHONOGRAM 0x0238cd30 - 0x0238cd39 +PHONOGRAM 0x0238ce30 - 0x0238ce39 +PHONOGRAM 0x0238cf30 - 0x0238cf39 +PHONOGRAM 0x0238d030 - 0x0238d039 +PHONOGRAM 0x0238d130 - 0x0238d139 +PHONOGRAM 0x0238d230 - 0x0238d239 +PHONOGRAM 0x0238d330 - 0x0238d339 +PHONOGRAM 0x0238d430 - 0x0238d439 +PHONOGRAM 0x0238d530 - 0x0238d539 +PHONOGRAM 0x0238d630 - 0x0238d639 +PHONOGRAM 0x0238d730 - 0x0238d739 +PHONOGRAM 0x0238d830 - 0x0238d839 +PHONOGRAM 0x0238d930 - 0x0238d939 +PHONOGRAM 0x0238da30 - 0x0238da39 +PHONOGRAM 0x0238db30 - 0x0238db39 +PHONOGRAM 0x0238dc30 - 0x0238dc39 +PHONOGRAM 0x0238dd30 - 0x0238dd39 +PHONOGRAM 0x0238de30 - 0x0238de39 +PHONOGRAM 0x0238df30 - 0x0238df39 +PHONOGRAM 0x0238e030 - 0x0238e039 +PHONOGRAM 0x0238e130 - 0x0238e139 +PHONOGRAM 0x0238e230 - 0x0238e239 +PHONOGRAM 0x0238e330 - 0x0238e339 +PHONOGRAM 0x0238e430 - 0x0238e439 +PHONOGRAM 0x0238e530 - 0x0238e539 +PHONOGRAM 0x0238e630 - 0x0238e639 +PHONOGRAM 0x0238e730 - 0x0238e739 +PHONOGRAM 0x0238e830 - 0x0238e839 +PHONOGRAM 0x0238e930 - 0x0238e939 +PHONOGRAM 0x0238ea30 - 0x0238ea39 +PHONOGRAM 0x0238eb30 - 0x0238eb39 +PHONOGRAM 0x0238ec30 - 0x0238ec39 +PHONOGRAM 0x0238ed30 - 0x0238ed39 +PHONOGRAM 0x0238ee30 - 0x0238ee39 +PHONOGRAM 0x0238ef30 - 0x0238ef39 +PHONOGRAM 0x0238f030 - 0x0238f039 +PHONOGRAM 0x0238f130 - 0x0238f139 +PHONOGRAM 0x0238f230 - 0x0238f239 +PHONOGRAM 0x0238f330 - 0x0238f339 +PHONOGRAM 0x0238f430 - 0x0238f439 +PHONOGRAM 0x0238f530 - 0x0238f539 +PHONOGRAM 0x0238f630 - 0x0238f639 +PHONOGRAM 0x0238f730 - 0x0238f739 +PHONOGRAM 0x0238f830 - 0x0238f839 +PHONOGRAM 0x0238f930 - 0x0238f939 +PHONOGRAM 0x0238fa30 - 0x0238fa39 +PHONOGRAM 0x0238fb30 - 0x0238fb39 +PHONOGRAM 0x0238fc30 - 0x0238fc39 +PHONOGRAM 0x0238fd30 - 0x0238fd39 +PHONOGRAM 0x0238fe30 - 0x0238fe39 +PHONOGRAM 0x02398130 - 0x02398139 +PHONOGRAM 0x02398230 - 0x02398239 +PHONOGRAM 0x02398330 - 0x02398339 +PHONOGRAM 0x02398430 - 0x02398439 +PHONOGRAM 0x02398530 - 0x02398539 +PHONOGRAM 0x02398630 - 0x02398639 +PHONOGRAM 0x02398730 - 0x02398739 +PHONOGRAM 0x02398830 - 0x02398839 +PHONOGRAM 0x02398930 - 0x02398939 +PHONOGRAM 0x02398a30 - 0x02398a39 +PHONOGRAM 0x02398b30 - 0x02398b39 +PHONOGRAM 0x02398c30 - 0x02398c39 +PHONOGRAM 0x02398d30 - 0x02398d39 +PHONOGRAM 0x02398e30 - 0x02398e39 +PHONOGRAM 0x02398f30 - 0x02398f39 +PHONOGRAM 0x02399030 - 0x02399039 +PHONOGRAM 0x02399130 - 0x02399139 +PHONOGRAM 0x02399230 - 0x02399239 +PHONOGRAM 0x02399330 - 0x02399339 +PHONOGRAM 0x02399430 - 0x02399439 +PHONOGRAM 0x02399530 - 0x02399539 +PHONOGRAM 0x02399630 - 0x02399639 +PHONOGRAM 0x02399730 - 0x02399739 +PHONOGRAM 0x02399830 - 0x02399839 +PHONOGRAM 0x02399930 - 0x02399939 +PHONOGRAM 0x02399a30 - 0x02399a39 +PHONOGRAM 0x02399b30 - 0x02399b39 +PHONOGRAM 0x02399c30 - 0x02399c39 +PHONOGRAM 0x02399d30 - 0x02399d39 +PHONOGRAM 0x02399e30 - 0x02399e39 +PHONOGRAM 0x02399f30 - 0x02399f39 +PHONOGRAM 0x0239a030 - 0x0239a039 +PHONOGRAM 0x0239a130 - 0x0239a139 +PHONOGRAM 0x0239a230 - 0x0239a239 +PHONOGRAM 0x0239a330 - 0x0239a339 +PHONOGRAM 0x0239a430 - 0x0239a439 +PHONOGRAM 0x0239a530 - 0x0239a539 +PHONOGRAM 0x0239a630 - 0x0239a639 +PHONOGRAM 0x0239a730 - 0x0239a739 +PHONOGRAM 0x0239a830 - 0x0239a839 +PHONOGRAM 0x0239a930 - 0x0239a939 +PHONOGRAM 0x0239aa30 - 0x0239aa39 +PHONOGRAM 0x0239ab30 - 0x0239ab39 +PHONOGRAM 0x0239ac30 - 0x0239ac39 +PHONOGRAM 0x0239ad30 - 0x0239ad39 +PHONOGRAM 0x0239ae30 - 0x0239ae39 +PHONOGRAM 0x0239af30 - 0x0239af39 +PHONOGRAM 0x0239b030 - 0x0239b039 +PHONOGRAM 0x0239b130 - 0x0239b139 +PHONOGRAM 0x0239b230 - 0x0239b239 +PHONOGRAM 0x0239b330 - 0x0239b339 +PHONOGRAM 0x0239b430 - 0x0239b439 +PHONOGRAM 0x0239b530 - 0x0239b539 +PHONOGRAM 0x0239b630 - 0x0239b639 +PHONOGRAM 0x0239b730 - 0x0239b739 +PHONOGRAM 0x0239b830 - 0x0239b839 +PHONOGRAM 0x0239b930 - 0x0239b939 +PHONOGRAM 0x0239ba30 - 0x0239ba39 +PHONOGRAM 0x0239bb30 - 0x0239bb39 +PHONOGRAM 0x0239bc30 - 0x0239bc39 +PHONOGRAM 0x0239bd30 - 0x0239bd39 +PHONOGRAM 0x0239be30 - 0x0239be39 +PHONOGRAM 0x0239bf30 - 0x0239bf39 +PHONOGRAM 0x0239c030 - 0x0239c039 +PHONOGRAM 0x0239c130 - 0x0239c139 +PHONOGRAM 0x0239c230 - 0x0239c239 +PHONOGRAM 0x0239c330 - 0x0239c339 +PHONOGRAM 0x0239c430 - 0x0239c439 +PHONOGRAM 0x0239c530 - 0x0239c539 +PHONOGRAM 0x0239c630 - 0x0239c639 +PHONOGRAM 0x0239c730 - 0x0239c739 +PHONOGRAM 0x0239c830 - 0x0239c839 +PHONOGRAM 0x0239c930 - 0x0239c939 +PHONOGRAM 0x0239ca30 - 0x0239ca39 +PHONOGRAM 0x0239cb30 - 0x0239cb39 +PHONOGRAM 0x0239cc30 - 0x0239cc39 +PHONOGRAM 0x0239cd30 - 0x0239cd39 +PHONOGRAM 0x0239ce30 - 0x0239ce39 +PHONOGRAM 0x0239cf30 - 0x0239cf39 +PHONOGRAM 0x0239d030 - 0x0239d039 +PHONOGRAM 0x0239d130 - 0x0239d139 +PHONOGRAM 0x0239d230 - 0x0239d239 +PHONOGRAM 0x0239d330 - 0x0239d339 +PHONOGRAM 0x0239d430 - 0x0239d439 +PHONOGRAM 0x0239d530 - 0x0239d539 +PHONOGRAM 0x0239d630 - 0x0239d639 +PHONOGRAM 0x0239d730 - 0x0239d739 +PHONOGRAM 0x0239d830 - 0x0239d839 +PHONOGRAM 0x0239d930 - 0x0239d939 +PHONOGRAM 0x0239da30 - 0x0239da39 +PHONOGRAM 0x0239db30 - 0x0239db39 +PHONOGRAM 0x0239dc30 - 0x0239dc39 +PHONOGRAM 0x0239dd30 - 0x0239dd39 +PHONOGRAM 0x0239de30 - 0x0239de39 +PHONOGRAM 0x0239df30 - 0x0239df39 +PHONOGRAM 0x0239e030 - 0x0239e039 +PHONOGRAM 0x0239e130 - 0x0239e139 +PHONOGRAM 0x0239e230 - 0x0239e239 +PHONOGRAM 0x0239e330 - 0x0239e339 +PHONOGRAM 0x0239e430 - 0x0239e439 +PHONOGRAM 0x0239e530 - 0x0239e539 +PHONOGRAM 0x0239e630 - 0x0239e639 +PHONOGRAM 0x0239e730 - 0x0239e739 +PHONOGRAM 0x0239e830 - 0x0239e839 +PHONOGRAM 0x0239e930 - 0x0239e939 +PHONOGRAM 0x0239ea30 - 0x0239ea39 +PHONOGRAM 0x0239eb30 - 0x0239eb39 +PHONOGRAM 0x0239ec30 - 0x0239ec39 +PHONOGRAM 0x0239ed30 - 0x0239ed39 +PHONOGRAM 0x0239ee30 - 0x0239ee39 +PHONOGRAM 0x0239ef30 - 0x0239ef39 +PHONOGRAM 0x0239f030 - 0x0239f039 +PHONOGRAM 0x0239f130 - 0x0239f139 +PHONOGRAM 0x0239f230 - 0x0239f239 +PHONOGRAM 0x0239f330 - 0x0239f339 +PHONOGRAM 0x0239f430 - 0x0239f439 +PHONOGRAM 0x0239f530 - 0x0239f539 +PHONOGRAM 0x0239f630 - 0x0239f639 +PHONOGRAM 0x0239f730 - 0x0239f739 +PHONOGRAM 0x0239f830 - 0x0239f839 +PHONOGRAM 0x0239f930 - 0x0239f939 +PHONOGRAM 0x0239fa30 - 0x0239fa39 +PHONOGRAM 0x0239fb30 - 0x0239fb39 +PHONOGRAM 0x0239fc30 - 0x0239fc39 +PHONOGRAM 0x0239fd30 - 0x0239fd39 +PHONOGRAM 0x0239fe30 - 0x0239fe39 +PHONOGRAM 0x03308130 - 0x03308139 +PHONOGRAM 0x03308230 - 0x03308239 +PHONOGRAM 0x03308330 - 0x03308339 +PHONOGRAM 0x03308430 - 0x03308439 +PHONOGRAM 0x03308530 - 0x03308539 +PHONOGRAM 0x03308630 - 0x03308639 +PHONOGRAM 0x03308730 - 0x03308739 +PHONOGRAM 0x03308830 - 0x03308839 +PHONOGRAM 0x03308930 - 0x03308939 +PHONOGRAM 0x03308a30 - 0x03308a39 +PHONOGRAM 0x03308b30 - 0x03308b39 +PHONOGRAM 0x03308c30 - 0x03308c39 +PHONOGRAM 0x03308d30 - 0x03308d39 +PHONOGRAM 0x03308e30 - 0x03308e39 +PHONOGRAM 0x03308f30 - 0x03308f39 +PHONOGRAM 0x03309030 - 0x03309039 +PHONOGRAM 0x03309130 - 0x03309139 +PHONOGRAM 0x03309230 - 0x03309239 +PHONOGRAM 0x03309330 - 0x03309339 +PHONOGRAM 0x03309430 - 0x03309439 +PHONOGRAM 0x03309530 - 0x03309539 +PHONOGRAM 0x03309630 - 0x03309639 +PHONOGRAM 0x03309730 - 0x03309739 +PHONOGRAM 0x03309830 - 0x03309839 +PHONOGRAM 0x03309930 - 0x03309939 +PHONOGRAM 0x03309a30 - 0x03309a39 +PHONOGRAM 0x03309b30 - 0x03309b39 +PHONOGRAM 0x03309c30 - 0x03309c39 +PHONOGRAM 0x03309d30 - 0x03309d39 +PHONOGRAM 0x03309e30 - 0x03309e39 +PHONOGRAM 0x03309f30 - 0x03309f39 +PHONOGRAM 0x0330a030 - 0x0330a039 +PHONOGRAM 0x0330a130 - 0x0330a139 +PHONOGRAM 0x0330a230 - 0x0330a239 +PHONOGRAM 0x0330a330 - 0x0330a339 +PHONOGRAM 0x0330a430 - 0x0330a439 +PHONOGRAM 0x0330a530 - 0x0330a539 +PHONOGRAM 0x0330a630 - 0x0330a639 +PHONOGRAM 0x0330a730 - 0x0330a739 +PHONOGRAM 0x0330a830 - 0x0330a839 +PHONOGRAM 0x0330a930 - 0x0330a939 +PHONOGRAM 0x0330aa30 - 0x0330aa39 +PHONOGRAM 0x0330ab30 - 0x0330ab39 +PHONOGRAM 0x0330ac30 - 0x0330ac39 +PHONOGRAM 0x0330ad30 - 0x0330ad39 +PHONOGRAM 0x0330ae30 - 0x0330ae39 +PHONOGRAM 0x0330af30 - 0x0330af39 +PHONOGRAM 0x0330b030 - 0x0330b039 +PHONOGRAM 0x0330b130 - 0x0330b139 +PHONOGRAM 0x0330b230 - 0x0330b239 +PHONOGRAM 0x0330b330 - 0x0330b339 +PHONOGRAM 0x0330b430 - 0x0330b439 +PHONOGRAM 0x0330b530 - 0x0330b539 +PHONOGRAM 0x0330b630 - 0x0330b639 +PHONOGRAM 0x0330b730 - 0x0330b739 +PHONOGRAM 0x0330b830 - 0x0330b839 +PHONOGRAM 0x0330b930 - 0x0330b939 +PHONOGRAM 0x0330ba30 - 0x0330ba39 +PHONOGRAM 0x0330bb30 - 0x0330bb39 +PHONOGRAM 0x0330bc30 - 0x0330bc39 +PHONOGRAM 0x0330bd30 - 0x0330bd39 +PHONOGRAM 0x0330be30 - 0x0330be39 +PHONOGRAM 0x0330bf30 - 0x0330bf39 +PHONOGRAM 0x0330c030 - 0x0330c039 +PHONOGRAM 0x0330c130 - 0x0330c139 +PHONOGRAM 0x0330c230 - 0x0330c239 +PHONOGRAM 0x0330c330 - 0x0330c339 +PHONOGRAM 0x0330c430 - 0x0330c439 +PHONOGRAM 0x0330c530 - 0x0330c539 +PHONOGRAM 0x0330c630 - 0x0330c639 +PHONOGRAM 0x0330c730 - 0x0330c739 +PHONOGRAM 0x0330c830 - 0x0330c839 +PHONOGRAM 0x0330c930 - 0x0330c939 +PHONOGRAM 0x0330ca30 - 0x0330ca39 +PHONOGRAM 0x0330cb30 - 0x0330cb39 +PHONOGRAM 0x0330cc30 - 0x0330cc39 +PHONOGRAM 0x0330cd30 - 0x0330cd39 +PHONOGRAM 0x0330ce30 - 0x0330ce39 +PHONOGRAM 0x0330cf30 - 0x0330cf39 +PHONOGRAM 0x0330d030 - 0x0330d039 +PHONOGRAM 0x0330d130 - 0x0330d139 +PHONOGRAM 0x0330d230 - 0x0330d239 +PHONOGRAM 0x0330d330 - 0x0330d339 +PHONOGRAM 0x0330d430 - 0x0330d439 +PHONOGRAM 0x0330d530 - 0x0330d539 +PHONOGRAM 0x0330d630 - 0x0330d639 +PHONOGRAM 0x0330d730 - 0x0330d739 +PHONOGRAM 0x0330d830 - 0x0330d839 +PHONOGRAM 0x0330d930 - 0x0330d939 +PHONOGRAM 0x0330da30 - 0x0330da39 +PHONOGRAM 0x0330db30 - 0x0330db39 +PHONOGRAM 0x0330dc30 - 0x0330dc39 +PHONOGRAM 0x0330dd30 - 0x0330dd39 +PHONOGRAM 0x0330de30 - 0x0330de39 +PHONOGRAM 0x0330df30 - 0x0330df39 +PHONOGRAM 0x0330e030 - 0x0330e039 +PHONOGRAM 0x0330e130 - 0x0330e139 +PHONOGRAM 0x0330e230 - 0x0330e239 +PHONOGRAM 0x0330e330 - 0x0330e339 +PHONOGRAM 0x0330e430 - 0x0330e439 +PHONOGRAM 0x0330e530 - 0x0330e539 +PHONOGRAM 0x0330e630 - 0x0330e639 +PHONOGRAM 0x0330e730 - 0x0330e739 +PHONOGRAM 0x0330e830 - 0x0330e839 +PHONOGRAM 0x0330e930 - 0x0330e939 +PHONOGRAM 0x0330ea30 - 0x0330ea39 +PHONOGRAM 0x0330eb30 - 0x0330eb39 +PHONOGRAM 0x0330ec30 - 0x0330ec39 +PHONOGRAM 0x0330ed30 - 0x0330ed39 +PHONOGRAM 0x0330ee30 - 0x0330ee39 +PHONOGRAM 0x0330ef30 - 0x0330ef39 +PHONOGRAM 0x0330f030 - 0x0330f039 +PHONOGRAM 0x0330f130 - 0x0330f139 +PHONOGRAM 0x0330f230 - 0x0330f239 +PHONOGRAM 0x0330f330 - 0x0330f339 +PHONOGRAM 0x0330f430 - 0x0330f439 +PHONOGRAM 0x0330f530 - 0x0330f539 +PHONOGRAM 0x0330f630 - 0x0330f639 +PHONOGRAM 0x0330f730 - 0x0330f739 +PHONOGRAM 0x0330f830 - 0x0330f839 +PHONOGRAM 0x0330f930 - 0x0330f939 +PHONOGRAM 0x0330fa30 - 0x0330fa39 +PHONOGRAM 0x0330fb30 - 0x0330fb39 +PHONOGRAM 0x0330fc30 - 0x0330fc39 +PHONOGRAM 0x0330fd30 - 0x0330fd39 +PHONOGRAM 0x0330fe30 - 0x0330fe39 +PHONOGRAM 0x03318130 - 0x03318139 +PHONOGRAM 0x03318230 - 0x03318239 +PHONOGRAM 0x03318330 - 0x03318339 +PHONOGRAM 0x03318430 - 0x03318439 +PHONOGRAM 0x03318530 - 0x03318539 +PHONOGRAM 0x03318630 - 0x03318639 +PHONOGRAM 0x03318730 - 0x03318739 +PHONOGRAM 0x03318830 - 0x03318839 +PHONOGRAM 0x03318930 - 0x03318939 +PHONOGRAM 0x03318a30 - 0x03318a39 +PHONOGRAM 0x03318b30 - 0x03318b39 +PHONOGRAM 0x03318c30 - 0x03318c39 +PHONOGRAM 0x03318d30 - 0x03318d39 +PHONOGRAM 0x03318e30 - 0x03318e39 +PHONOGRAM 0x03318f30 - 0x03318f39 +PHONOGRAM 0x03319030 - 0x03319039 +PHONOGRAM 0x03319130 - 0x03319139 +PHONOGRAM 0x03319230 - 0x03319239 +PHONOGRAM 0x03319330 - 0x03319339 +PHONOGRAM 0x03319430 - 0x03319439 +PHONOGRAM 0x03319530 - 0x03319539 +PHONOGRAM 0x03319630 - 0x03319639 +PHONOGRAM 0x03319730 - 0x03319739 +PHONOGRAM 0x03319830 - 0x03319839 +PHONOGRAM 0x03319930 - 0x03319939 +PHONOGRAM 0x03319a30 - 0x03319a39 +PHONOGRAM 0x03319b30 - 0x03319b39 +PHONOGRAM 0x03319c30 - 0x03319c39 +PHONOGRAM 0x03319d30 - 0x03319d39 +PHONOGRAM 0x03319e30 - 0x03319e39 +PHONOGRAM 0x03319f30 - 0x03319f39 +PHONOGRAM 0x0331a030 - 0x0331a039 +PHONOGRAM 0x0331a130 - 0x0331a139 +PHONOGRAM 0x0331a230 - 0x0331a239 +PHONOGRAM 0x0331a330 - 0x0331a339 +PHONOGRAM 0x0331a430 - 0x0331a439 +PHONOGRAM 0x0331a530 - 0x0331a539 +PHONOGRAM 0x0331a630 - 0x0331a639 +PHONOGRAM 0x0331a730 - 0x0331a739 +PHONOGRAM 0x0331a830 - 0x0331a839 +PHONOGRAM 0x0331a930 - 0x0331a939 +PHONOGRAM 0x0331aa30 - 0x0331aa39 +PHONOGRAM 0x0331ab30 - 0x0331ab39 +PHONOGRAM 0x0331ac30 - 0x0331ac39 +PHONOGRAM 0x0331ad30 - 0x0331ad39 +PHONOGRAM 0x0331ae30 - 0x0331ae39 +PHONOGRAM 0x0331af30 - 0x0331af39 +PHONOGRAM 0x0331b030 - 0x0331b039 +PHONOGRAM 0x0331b130 - 0x0331b139 +PHONOGRAM 0x0331b230 - 0x0331b239 +PHONOGRAM 0x0331b330 - 0x0331b339 +PHONOGRAM 0x0331b430 - 0x0331b439 +PHONOGRAM 0x0331b530 - 0x0331b539 +PHONOGRAM 0x0331b630 - 0x0331b639 +PHONOGRAM 0x0331b730 - 0x0331b739 +PHONOGRAM 0x0331b830 - 0x0331b839 +PHONOGRAM 0x0331b930 - 0x0331b939 +PHONOGRAM 0x0331ba30 - 0x0331ba39 +PHONOGRAM 0x0331bb30 - 0x0331bb39 +PHONOGRAM 0x0331bc30 - 0x0331bc39 +PHONOGRAM 0x0331bd30 - 0x0331bd39 +PHONOGRAM 0x0331be30 - 0x0331be39 +PHONOGRAM 0x0331bf30 - 0x0331bf39 +PHONOGRAM 0x0331c030 - 0x0331c039 +PHONOGRAM 0x0331c130 - 0x0331c139 +PHONOGRAM 0x0331c230 - 0x0331c239 +PHONOGRAM 0x0331c330 - 0x0331c339 +PHONOGRAM 0x0331c430 - 0x0331c439 +PHONOGRAM 0x0331c530 - 0x0331c539 +PHONOGRAM 0x0331c630 - 0x0331c639 +PHONOGRAM 0x0331c730 - 0x0331c739 +PHONOGRAM 0x0331c830 - 0x0331c839 +PHONOGRAM 0x0331c930 - 0x0331c939 +PHONOGRAM 0x0331ca30 - 0x0331ca39 +PHONOGRAM 0x0331cb30 - 0x0331cb39 +PHONOGRAM 0x0331cc30 - 0x0331cc39 +PHONOGRAM 0x0331cd30 - 0x0331cd39 +PHONOGRAM 0x0331ce30 - 0x0331ce39 +PHONOGRAM 0x0331cf30 - 0x0331cf39 +PHONOGRAM 0x0331d030 - 0x0331d039 +PHONOGRAM 0x0331d130 - 0x0331d139 +PHONOGRAM 0x0331d230 - 0x0331d239 +PHONOGRAM 0x0331d330 - 0x0331d339 +PHONOGRAM 0x0331d430 - 0x0331d439 +PHONOGRAM 0x0331d530 - 0x0331d539 +PHONOGRAM 0x0331d630 - 0x0331d639 +PHONOGRAM 0x0331d730 - 0x0331d739 +PHONOGRAM 0x0331d830 - 0x0331d839 +PHONOGRAM 0x0331d930 - 0x0331d939 +PHONOGRAM 0x0331da30 - 0x0331da39 +PHONOGRAM 0x0331db30 - 0x0331db39 +PHONOGRAM 0x0331dc30 - 0x0331dc39 +PHONOGRAM 0x0331dd30 - 0x0331dd39 +PHONOGRAM 0x0331de30 - 0x0331de39 +PHONOGRAM 0x0331df30 - 0x0331df39 +PHONOGRAM 0x0331e030 - 0x0331e039 +PHONOGRAM 0x0331e130 - 0x0331e139 +PHONOGRAM 0x0331e230 - 0x0331e239 +PHONOGRAM 0x0331e330 - 0x0331e339 +PHONOGRAM 0x0331e430 - 0x0331e439 +PHONOGRAM 0x0331e530 - 0x0331e539 +PHONOGRAM 0x0331e630 - 0x0331e639 +PHONOGRAM 0x0331e730 - 0x0331e739 +PHONOGRAM 0x0331e830 - 0x0331e839 +PHONOGRAM 0x0331e930 - 0x0331e939 +PHONOGRAM 0x0331ea30 - 0x0331ea39 +PHONOGRAM 0x0331eb30 - 0x0331eb39 +PHONOGRAM 0x0331ec30 - 0x0331ec39 +PHONOGRAM 0x0331ed30 - 0x0331ed39 +PHONOGRAM 0x0331ee30 - 0x0331ee39 +PHONOGRAM 0x0331ef30 - 0x0331ef39 +PHONOGRAM 0x0331f030 - 0x0331f039 +PHONOGRAM 0x0331f130 - 0x0331f139 +PHONOGRAM 0x0331f230 - 0x0331f239 +PHONOGRAM 0x0331f330 - 0x0331f339 +PHONOGRAM 0x0331f430 - 0x0331f439 +PHONOGRAM 0x0331f530 - 0x0331f539 +PHONOGRAM 0x0331f630 - 0x0331f639 +PHONOGRAM 0x0331f730 - 0x0331f739 +PHONOGRAM 0x0331f830 - 0x0331f839 +PHONOGRAM 0x0331f930 - 0x0331f939 +PHONOGRAM 0x0331fa30 - 0x0331fa39 +PHONOGRAM 0x0331fb30 - 0x0331fb39 +PHONOGRAM 0x0331fc30 - 0x0331fc39 +PHONOGRAM 0x0331fd30 - 0x0331fd39 +PHONOGRAM 0x0331fe30 - 0x0331fe39 +PHONOGRAM 0x03328130 - 0x03328139 +PHONOGRAM 0x03328230 - 0x03328239 +PHONOGRAM 0x03328330 - 0x03328339 +PHONOGRAM 0x03328430 - 0x03328439 +PHONOGRAM 0x03328530 - 0x03328539 +PHONOGRAM 0x03328630 - 0x03328639 +PHONOGRAM 0x03328730 - 0x03328739 +PHONOGRAM 0x03328830 - 0x03328839 +PHONOGRAM 0x03328930 - 0x03328939 +PHONOGRAM 0x03328a30 - 0x03328a39 +PHONOGRAM 0x03328b30 - 0x03328b39 +PHONOGRAM 0x03328c30 - 0x03328c39 +PHONOGRAM 0x03328d30 - 0x03328d39 +PHONOGRAM 0x03328e30 - 0x03328e39 +PHONOGRAM 0x03328f30 - 0x03328f39 +PHONOGRAM 0x03329030 - 0x03329039 +PHONOGRAM 0x03329130 - 0x03329139 +PHONOGRAM 0x03329230 - 0x03329239 +PHONOGRAM 0x03329330 - 0x03329339 +PHONOGRAM 0x03329430 - 0x03329439 +PHONOGRAM 0x03329530 - 0x03329539 +PHONOGRAM 0x03329630 - 0x03329639 +PHONOGRAM 0x03329730 - 0x03329739 +PHONOGRAM 0x03329830 - 0x03329839 +PHONOGRAM 0x03329930 - 0x03329939 +PHONOGRAM 0x03329a30 - 0x03329a39 +PHONOGRAM 0x03329b30 - 0x03329b39 +PHONOGRAM 0x03329c30 - 0x03329c39 +PHONOGRAM 0x03329d30 - 0x03329d39 +PHONOGRAM 0x03329e30 - 0x03329e39 +PHONOGRAM 0x03329f30 - 0x03329f39 +PHONOGRAM 0x0332a030 - 0x0332a039 +PHONOGRAM 0x0332a130 - 0x0332a139 +PHONOGRAM 0x0332a230 - 0x0332a239 +PHONOGRAM 0x0332a330 - 0x0332a339 +PHONOGRAM 0x0332a430 - 0x0332a439 +PHONOGRAM 0x0332a530 - 0x0332a539 +PHONOGRAM 0x0332a630 - 0x0332a639 +PHONOGRAM 0x0332a730 - 0x0332a739 +PHONOGRAM 0x0332a830 - 0x0332a839 +PHONOGRAM 0x0332a930 - 0x0332a939 +PHONOGRAM 0x0332aa30 - 0x0332aa39 +PHONOGRAM 0x0332ab30 - 0x0332ab39 +PHONOGRAM 0x0332ac30 - 0x0332ac39 +PHONOGRAM 0x0332ad30 - 0x0332ad39 +PHONOGRAM 0x0332ae30 - 0x0332ae39 +PHONOGRAM 0x0332af30 - 0x0332af39 +PHONOGRAM 0x0332b030 - 0x0332b039 +PHONOGRAM 0x0332b130 - 0x0332b139 +PHONOGRAM 0x0332b230 - 0x0332b239 +PHONOGRAM 0x0332b330 - 0x0332b339 +PHONOGRAM 0x0332b430 - 0x0332b439 +PHONOGRAM 0x0332b530 - 0x0332b539 +PHONOGRAM 0x0332b630 - 0x0332b639 +PHONOGRAM 0x0332b730 - 0x0332b739 +PHONOGRAM 0x0332b830 - 0x0332b839 +PHONOGRAM 0x0332b930 - 0x0332b939 +PHONOGRAM 0x0332ba30 - 0x0332ba39 +PHONOGRAM 0x0332bb30 - 0x0332bb39 +PHONOGRAM 0x0332bc30 - 0x0332bc39 +PHONOGRAM 0x0332bd30 - 0x0332bd39 +PHONOGRAM 0x0332be30 - 0x0332be39 +PHONOGRAM 0x0332bf30 - 0x0332bf39 +PHONOGRAM 0x0332c030 - 0x0332c039 +PHONOGRAM 0x0332c130 - 0x0332c139 +PHONOGRAM 0x0332c230 - 0x0332c239 +PHONOGRAM 0x0332c330 - 0x0332c339 +PHONOGRAM 0x0332c430 - 0x0332c439 +PHONOGRAM 0x0332c530 - 0x0332c539 +PHONOGRAM 0x0332c630 - 0x0332c639 +PHONOGRAM 0x0332c730 - 0x0332c739 +PHONOGRAM 0x0332c830 - 0x0332c839 +PHONOGRAM 0x0332c930 - 0x0332c939 +PHONOGRAM 0x0332ca30 - 0x0332ca39 +PHONOGRAM 0x0332cb30 - 0x0332cb39 +PHONOGRAM 0x0332cc30 - 0x0332cc39 +PHONOGRAM 0x0332cd30 - 0x0332cd39 +PHONOGRAM 0x0332ce30 - 0x0332ce39 +PHONOGRAM 0x0332cf30 - 0x0332cf39 +PHONOGRAM 0x0332d030 - 0x0332d039 +PHONOGRAM 0x0332d130 - 0x0332d139 +PHONOGRAM 0x0332d230 - 0x0332d239 +PHONOGRAM 0x0332d330 - 0x0332d339 +PHONOGRAM 0x0332d430 - 0x0332d439 +PHONOGRAM 0x0332d530 - 0x0332d539 +PHONOGRAM 0x0332d630 - 0x0332d639 +PHONOGRAM 0x0332d730 - 0x0332d739 +PHONOGRAM 0x0332d830 - 0x0332d839 +PHONOGRAM 0x0332d930 - 0x0332d939 +PHONOGRAM 0x0332da30 - 0x0332da39 +PHONOGRAM 0x0332db30 - 0x0332db39 +PHONOGRAM 0x0332dc30 - 0x0332dc39 +PHONOGRAM 0x0332dd30 - 0x0332dd39 +PHONOGRAM 0x0332de30 - 0x0332de39 +PHONOGRAM 0x0332df30 - 0x0332df39 +PHONOGRAM 0x0332e030 - 0x0332e039 +PHONOGRAM 0x0332e130 - 0x0332e139 +PHONOGRAM 0x0332e230 - 0x0332e239 +PHONOGRAM 0x0332e330 - 0x0332e339 +PHONOGRAM 0x0332e430 - 0x0332e439 +PHONOGRAM 0x0332e530 - 0x0332e539 +PHONOGRAM 0x0332e630 - 0x0332e639 +PHONOGRAM 0x0332e730 - 0x0332e739 +PHONOGRAM 0x0332e830 - 0x0332e839 +PHONOGRAM 0x0332e930 - 0x0332e939 +PHONOGRAM 0x0332ea30 - 0x0332ea39 +PHONOGRAM 0x0332eb30 - 0x0332eb39 +PHONOGRAM 0x0332ec30 - 0x0332ec39 +PHONOGRAM 0x0332ed30 - 0x0332ed39 +PHONOGRAM 0x0332ee30 - 0x0332ee39 +PHONOGRAM 0x0332ef30 - 0x0332ef39 +PHONOGRAM 0x0332f030 - 0x0332f039 +PHONOGRAM 0x0332f130 - 0x0332f139 +PHONOGRAM 0x0332f230 - 0x0332f239 +PHONOGRAM 0x0332f330 - 0x0332f339 +PHONOGRAM 0x0332f430 - 0x0332f439 +PHONOGRAM 0x0332f530 - 0x0332f539 +PHONOGRAM 0x0332f630 - 0x0332f639 +PHONOGRAM 0x0332f730 - 0x0332f739 +PHONOGRAM 0x0332f830 - 0x0332f839 +PHONOGRAM 0x0332f930 - 0x0332f939 +PHONOGRAM 0x0332fa30 - 0x0332fa39 +PHONOGRAM 0x0332fb30 - 0x0332fb39 +PHONOGRAM 0x0332fc30 - 0x0332fc39 +PHONOGRAM 0x0332fd30 - 0x0332fd39 +PHONOGRAM 0x0332fe30 - 0x0332fe39 +PHONOGRAM 0x03338130 - 0x03338139 +PHONOGRAM 0x03338230 - 0x03338239 +PHONOGRAM 0x03338330 - 0x03338339 +PHONOGRAM 0x03338430 - 0x03338439 +PHONOGRAM 0x03338530 - 0x03338539 +PHONOGRAM 0x03338630 - 0x03338639 +PHONOGRAM 0x03338730 - 0x03338739 +PHONOGRAM 0x03338830 - 0x03338839 +PHONOGRAM 0x03338930 - 0x03338939 +PHONOGRAM 0x03338a30 - 0x03338a39 +PHONOGRAM 0x03338b30 - 0x03338b39 +PHONOGRAM 0x03338c30 - 0x03338c39 +PHONOGRAM 0x03338d30 - 0x03338d39 +PHONOGRAM 0x03338e30 - 0x03338e39 +PHONOGRAM 0x03338f30 - 0x03338f39 +PHONOGRAM 0x03339030 - 0x03339039 +PHONOGRAM 0x03339130 - 0x03339139 +PHONOGRAM 0x03339230 - 0x03339239 +PHONOGRAM 0x03339330 - 0x03339339 +PHONOGRAM 0x03339430 - 0x03339439 +PHONOGRAM 0x03339530 - 0x03339539 +PHONOGRAM 0x03339630 - 0x03339639 +PHONOGRAM 0x03339730 - 0x03339739 +PHONOGRAM 0x03339830 - 0x03339839 +PHONOGRAM 0x03339930 - 0x03339939 +PHONOGRAM 0x03339a30 - 0x03339a39 +PHONOGRAM 0x03339b30 - 0x03339b39 +PHONOGRAM 0x03339c30 - 0x03339c39 +PHONOGRAM 0x03339d30 - 0x03339d39 +PHONOGRAM 0x03339e30 - 0x03339e39 +PHONOGRAM 0x03339f30 - 0x03339f39 +PHONOGRAM 0x0333a030 - 0x0333a039 +PHONOGRAM 0x0333a130 - 0x0333a139 +PHONOGRAM 0x0333a230 - 0x0333a239 +PHONOGRAM 0x0333a330 - 0x0333a339 +PHONOGRAM 0x0333a430 - 0x0333a439 +PHONOGRAM 0x0333a530 - 0x0333a539 +PHONOGRAM 0x0333a630 - 0x0333a639 +PHONOGRAM 0x0333a730 - 0x0333a739 +PHONOGRAM 0x0333a830 - 0x0333a839 +PHONOGRAM 0x0333a930 - 0x0333a939 +PHONOGRAM 0x0333aa30 - 0x0333aa39 +PHONOGRAM 0x0333ab30 - 0x0333ab39 +PHONOGRAM 0x0333ac30 - 0x0333ac39 +PHONOGRAM 0x0333ad30 - 0x0333ad39 +PHONOGRAM 0x0333ae30 - 0x0333ae39 +PHONOGRAM 0x0333af30 - 0x0333af39 +PHONOGRAM 0x0333b030 - 0x0333b039 +PHONOGRAM 0x0333b130 - 0x0333b139 +PHONOGRAM 0x0333b230 - 0x0333b239 +PHONOGRAM 0x0333b330 - 0x0333b339 +PHONOGRAM 0x0333b430 - 0x0333b439 +PHONOGRAM 0x0333b530 - 0x0333b539 +PHONOGRAM 0x0333b630 - 0x0333b639 +PHONOGRAM 0x0333b730 - 0x0333b739 +PHONOGRAM 0x0333b830 - 0x0333b839 +PHONOGRAM 0x0333b930 - 0x0333b939 +PHONOGRAM 0x0333ba30 - 0x0333ba39 +PHONOGRAM 0x0333bb30 - 0x0333bb39 +PHONOGRAM 0x0333bc30 - 0x0333bc39 +PHONOGRAM 0x0333bd30 - 0x0333bd39 +PHONOGRAM 0x0333be30 - 0x0333be39 +PHONOGRAM 0x0333bf30 - 0x0333bf39 +PHONOGRAM 0x0333c030 - 0x0333c039 +PHONOGRAM 0x0333c130 - 0x0333c139 +PHONOGRAM 0x0333c230 - 0x0333c239 +PHONOGRAM 0x0333c330 - 0x0333c339 +PHONOGRAM 0x0333c430 - 0x0333c439 +PHONOGRAM 0x0333c530 - 0x0333c539 +PHONOGRAM 0x0333c630 - 0x0333c639 +PHONOGRAM 0x0333c730 - 0x0333c739 +PHONOGRAM 0x0333c830 - 0x0333c839 +PHONOGRAM 0x0333c930 - 0x0333c939 +PHONOGRAM 0x0333ca30 - 0x0333ca39 +PHONOGRAM 0x0333cb30 - 0x0333cb39 +PHONOGRAM 0x0333cc30 - 0x0333cc39 +PHONOGRAM 0x0333cd30 - 0x0333cd39 +PHONOGRAM 0x0333ce30 - 0x0333ce39 +PHONOGRAM 0x0333cf30 - 0x0333cf39 +PHONOGRAM 0x0333d030 - 0x0333d039 +PHONOGRAM 0x0333d130 - 0x0333d139 +PHONOGRAM 0x0333d230 - 0x0333d239 +PHONOGRAM 0x0333d330 - 0x0333d339 +PHONOGRAM 0x0333d430 - 0x0333d439 +PHONOGRAM 0x0333d530 - 0x0333d539 +PHONOGRAM 0x0333d630 - 0x0333d639 +PHONOGRAM 0x0333d730 - 0x0333d739 +PHONOGRAM 0x0333d830 - 0x0333d839 +PHONOGRAM 0x0333d930 - 0x0333d939 +PHONOGRAM 0x0333da30 - 0x0333da39 +PHONOGRAM 0x0333db30 - 0x0333db39 +PHONOGRAM 0x0333dc30 - 0x0333dc39 +PHONOGRAM 0x0333dd30 - 0x0333dd39 +PHONOGRAM 0x0333de30 - 0x0333de39 +PHONOGRAM 0x0333df30 - 0x0333df39 +PHONOGRAM 0x0333e030 - 0x0333e039 +PHONOGRAM 0x0333e130 - 0x0333e139 +PHONOGRAM 0x0333e230 - 0x0333e239 +PHONOGRAM 0x0333e330 - 0x0333e339 +PHONOGRAM 0x0333e430 - 0x0333e439 +PHONOGRAM 0x0333e530 - 0x0333e539 +PHONOGRAM 0x0333e630 - 0x0333e639 +PHONOGRAM 0x0333e730 - 0x0333e739 +PHONOGRAM 0x0333e830 - 0x0333e839 +PHONOGRAM 0x0333e930 - 0x0333e939 +PHONOGRAM 0x0333ea30 - 0x0333ea39 +PHONOGRAM 0x0333eb30 - 0x0333eb39 +PHONOGRAM 0x0333ec30 - 0x0333ec39 +PHONOGRAM 0x0333ed30 - 0x0333ed39 +PHONOGRAM 0x0333ee30 - 0x0333ee39 +PHONOGRAM 0x0333ef30 - 0x0333ef39 +PHONOGRAM 0x0333f030 - 0x0333f039 +PHONOGRAM 0x0333f130 - 0x0333f139 +PHONOGRAM 0x0333f230 - 0x0333f239 +PHONOGRAM 0x0333f330 - 0x0333f339 +PHONOGRAM 0x0333f430 - 0x0333f439 +PHONOGRAM 0x0333f530 - 0x0333f539 +PHONOGRAM 0x0333f630 - 0x0333f639 +PHONOGRAM 0x0333f730 - 0x0333f739 +PHONOGRAM 0x0333f830 - 0x0333f839 +PHONOGRAM 0x0333f930 - 0x0333f939 +PHONOGRAM 0x0333fa30 - 0x0333fa39 +PHONOGRAM 0x0333fb30 - 0x0333fb39 +PHONOGRAM 0x0333fc30 - 0x0333fc39 +PHONOGRAM 0x0333fd30 - 0x0333fd39 +PHONOGRAM 0x0333fe30 - 0x0333fe39 +PHONOGRAM 0x03348130 - 0x03348139 +PHONOGRAM 0x03348230 - 0x03348239 +PHONOGRAM 0x03348330 - 0x03348339 +PHONOGRAM 0x03348430 - 0x03348439 +PHONOGRAM 0x03348530 - 0x03348539 +PHONOGRAM 0x03348630 - 0x03348639 +PHONOGRAM 0x03348730 - 0x03348739 +PHONOGRAM 0x03348830 - 0x03348839 +PHONOGRAM 0x03348930 - 0x03348939 +PHONOGRAM 0x03348a30 - 0x03348a39 +PHONOGRAM 0x03348b30 - 0x03348b39 +PHONOGRAM 0x03348c30 - 0x03348c39 +PHONOGRAM 0x03348d30 - 0x03348d39 +PHONOGRAM 0x03348e30 - 0x03348e39 +PHONOGRAM 0x03348f30 - 0x03348f39 +PHONOGRAM 0x03349030 - 0x03349039 +PHONOGRAM 0x03349130 - 0x03349139 +PHONOGRAM 0x03349230 - 0x03349239 +PHONOGRAM 0x03349330 - 0x03349339 +PHONOGRAM 0x03349430 - 0x03349439 +PHONOGRAM 0x03349530 - 0x03349539 +PHONOGRAM 0x03349630 - 0x03349639 +PHONOGRAM 0x03349730 - 0x03349739 +PHONOGRAM 0x03349830 - 0x03349839 +PHONOGRAM 0x03349930 - 0x03349939 +PHONOGRAM 0x03349a30 - 0x03349a39 +PHONOGRAM 0x03349b30 - 0x03349b39 +PHONOGRAM 0x03349c30 - 0x03349c39 +PHONOGRAM 0x03349d30 - 0x03349d39 +PHONOGRAM 0x03349e30 - 0x03349e39 +PHONOGRAM 0x03349f30 - 0x03349f39 +PHONOGRAM 0x0334a030 - 0x0334a039 +PHONOGRAM 0x0334a130 - 0x0334a139 +PHONOGRAM 0x0334a230 - 0x0334a239 +PHONOGRAM 0x0334a330 - 0x0334a339 +PHONOGRAM 0x0334a430 - 0x0334a439 +PHONOGRAM 0x0334a530 - 0x0334a539 +PHONOGRAM 0x0334a630 - 0x0334a639 +PHONOGRAM 0x0334a730 - 0x0334a739 +PHONOGRAM 0x0334a830 - 0x0334a839 +PHONOGRAM 0x0334a930 - 0x0334a939 +PHONOGRAM 0x0334aa30 - 0x0334aa39 +PHONOGRAM 0x0334ab30 - 0x0334ab39 +PHONOGRAM 0x0334ac30 - 0x0334ac39 +PHONOGRAM 0x0334ad30 - 0x0334ad39 +PHONOGRAM 0x0334ae30 - 0x0334ae39 +PHONOGRAM 0x0334af30 - 0x0334af39 +PHONOGRAM 0x0334b030 - 0x0334b039 +PHONOGRAM 0x0334b130 - 0x0334b139 +PHONOGRAM 0x0334b230 - 0x0334b239 +PHONOGRAM 0x0334b330 - 0x0334b339 +PHONOGRAM 0x0334b430 - 0x0334b439 +PHONOGRAM 0x0334b530 - 0x0334b539 +PHONOGRAM 0x0334b630 - 0x0334b639 +PHONOGRAM 0x0334b730 - 0x0334b739 +PHONOGRAM 0x0334b830 - 0x0334b839 +PHONOGRAM 0x0334b930 - 0x0334b939 +PHONOGRAM 0x0334ba30 - 0x0334ba39 +PHONOGRAM 0x0334bb30 - 0x0334bb39 +PHONOGRAM 0x0334bc30 - 0x0334bc39 +PHONOGRAM 0x0334bd30 - 0x0334bd39 +PHONOGRAM 0x0334be30 - 0x0334be39 +PHONOGRAM 0x0334bf30 - 0x0334bf39 +PHONOGRAM 0x0334c030 - 0x0334c039 +PHONOGRAM 0x0334c130 - 0x0334c139 +PHONOGRAM 0x0334c230 - 0x0334c239 +PHONOGRAM 0x0334c330 - 0x0334c339 +PHONOGRAM 0x0334c430 - 0x0334c439 +PHONOGRAM 0x0334c530 - 0x0334c539 +PHONOGRAM 0x0334c630 - 0x0334c639 +PHONOGRAM 0x0334c730 - 0x0334c739 +PHONOGRAM 0x0334c830 - 0x0334c839 +PHONOGRAM 0x0334c930 - 0x0334c939 +PHONOGRAM 0x0334ca30 - 0x0334ca39 +PHONOGRAM 0x0334cb30 - 0x0334cb39 +PHONOGRAM 0x0334cc30 - 0x0334cc39 +PHONOGRAM 0x0334cd30 - 0x0334cd39 +PHONOGRAM 0x0334ce30 - 0x0334ce39 +PHONOGRAM 0x0334cf30 - 0x0334cf39 +PHONOGRAM 0x0334d030 - 0x0334d039 +PHONOGRAM 0x0334d130 - 0x0334d139 +PHONOGRAM 0x0334d230 - 0x0334d239 +PHONOGRAM 0x0334d330 - 0x0334d339 +PHONOGRAM 0x0334d430 - 0x0334d439 +PHONOGRAM 0x0334d530 - 0x0334d539 +PHONOGRAM 0x0334d630 - 0x0334d639 +PHONOGRAM 0x0334d730 - 0x0334d739 +PHONOGRAM 0x0334d830 - 0x0334d839 +PHONOGRAM 0x0334d930 - 0x0334d939 +PHONOGRAM 0x0334da30 - 0x0334da39 +PHONOGRAM 0x0334db30 - 0x0334db39 +PHONOGRAM 0x0334dc30 - 0x0334dc39 +PHONOGRAM 0x0334dd30 - 0x0334dd39 +PHONOGRAM 0x0334de30 - 0x0334de39 +PHONOGRAM 0x0334df30 - 0x0334df39 +PHONOGRAM 0x0334e030 - 0x0334e039 +PHONOGRAM 0x0334e130 - 0x0334e139 +PHONOGRAM 0x0334e230 - 0x0334e239 +PHONOGRAM 0x0334e330 - 0x0334e339 +PHONOGRAM 0x0334e430 - 0x0334e439 +PHONOGRAM 0x0334e530 - 0x0334e539 +PHONOGRAM 0x0334e630 - 0x0334e639 +PHONOGRAM 0x0334e730 - 0x0334e739 +PHONOGRAM 0x0334e830 - 0x0334e839 +PHONOGRAM 0x0334e930 - 0x0334e939 +PHONOGRAM 0x0334ea30 - 0x0334ea39 +PHONOGRAM 0x0334eb30 - 0x0334eb39 +PHONOGRAM 0x0334ec30 - 0x0334ec39 +PHONOGRAM 0x0334ed30 - 0x0334ed39 +PHONOGRAM 0x0334ee30 - 0x0334ee39 +PHONOGRAM 0x0334ef30 - 0x0334ef39 +PHONOGRAM 0x0334f030 - 0x0334f039 +PHONOGRAM 0x0334f130 - 0x0334f139 +PHONOGRAM 0x0334f230 - 0x0334f239 +PHONOGRAM 0x0334f330 - 0x0334f339 +PHONOGRAM 0x0334f430 - 0x0334f439 +PHONOGRAM 0x0334f530 - 0x0334f539 +PHONOGRAM 0x0334f630 - 0x0334f639 +PHONOGRAM 0x0334f730 - 0x0334f739 +PHONOGRAM 0x0334f830 - 0x0334f839 +PHONOGRAM 0x0334f930 - 0x0334f939 +PHONOGRAM 0x0334fa30 - 0x0334fa39 +PHONOGRAM 0x0334fb30 - 0x0334fb39 +PHONOGRAM 0x0334fc30 - 0x0334fc39 +PHONOGRAM 0x0334fd30 - 0x0334fd39 +PHONOGRAM 0x0334fe30 - 0x0334fe39 +PHONOGRAM 0x03358130 - 0x03358139 +PHONOGRAM 0x03358230 - 0x03358239 +PHONOGRAM 0x03358330 - 0x03358339 +PHONOGRAM 0x03358430 - 0x03358439 +PHONOGRAM 0x03358530 - 0x03358539 +PHONOGRAM 0x03358630 - 0x03358639 +PHONOGRAM 0x03358730 - 0x03358739 +PHONOGRAM 0x03358830 - 0x03358839 +PHONOGRAM 0x03358930 - 0x03358939 +PHONOGRAM 0x03358a30 - 0x03358a39 +PHONOGRAM 0x03358b30 - 0x03358b39 +PHONOGRAM 0x03358c30 - 0x03358c39 +PHONOGRAM 0x03358d30 - 0x03358d39 +PHONOGRAM 0x03358e30 - 0x03358e39 +PHONOGRAM 0x03358f30 - 0x03358f39 +PHONOGRAM 0x03359030 - 0x03359039 +PHONOGRAM 0x03359130 - 0x03359139 +PHONOGRAM 0x03359230 - 0x03359239 +PHONOGRAM 0x03359330 - 0x03359339 +PHONOGRAM 0x03359430 - 0x03359439 +PHONOGRAM 0x03359530 - 0x03359539 +PHONOGRAM 0x03359630 - 0x03359639 +PHONOGRAM 0x03359730 - 0x03359739 +PHONOGRAM 0x03359830 - 0x03359839 +PHONOGRAM 0x03359930 - 0x03359939 +PHONOGRAM 0x03359a30 - 0x03359a39 +PHONOGRAM 0x03359b30 - 0x03359b39 +PHONOGRAM 0x03359c30 - 0x03359c39 +PHONOGRAM 0x03359d30 - 0x03359d39 +PHONOGRAM 0x03359e30 - 0x03359e39 +PHONOGRAM 0x03359f30 - 0x03359f39 +PHONOGRAM 0x0335a030 - 0x0335a039 +PHONOGRAM 0x0335a130 - 0x0335a139 +PHONOGRAM 0x0335a230 - 0x0335a239 +PHONOGRAM 0x0335a330 - 0x0335a339 +PHONOGRAM 0x0335a430 - 0x0335a439 +PHONOGRAM 0x0335a530 - 0x0335a539 +PHONOGRAM 0x0335a630 - 0x0335a639 +PHONOGRAM 0x0335a730 - 0x0335a739 +PHONOGRAM 0x0335a830 - 0x0335a839 +PHONOGRAM 0x0335a930 - 0x0335a939 +PHONOGRAM 0x0335aa30 - 0x0335aa39 +PHONOGRAM 0x0335ab30 - 0x0335ab39 +PHONOGRAM 0x0335ac30 - 0x0335ac39 +PHONOGRAM 0x0335ad30 - 0x0335ad39 +PHONOGRAM 0x0335ae30 - 0x0335ae39 +PHONOGRAM 0x0335af30 - 0x0335af39 +PHONOGRAM 0x0335b030 - 0x0335b039 +PHONOGRAM 0x0335b130 - 0x0335b139 +PHONOGRAM 0x0335b230 - 0x0335b239 +PHONOGRAM 0x0335b330 - 0x0335b339 +PHONOGRAM 0x0335b430 - 0x0335b439 +PHONOGRAM 0x0335b530 - 0x0335b539 +PHONOGRAM 0x0335b630 - 0x0335b639 +PHONOGRAM 0x0335b730 - 0x0335b739 +PHONOGRAM 0x0335b830 - 0x0335b839 +PHONOGRAM 0x0335b930 - 0x0335b939 +PHONOGRAM 0x0335ba30 - 0x0335ba39 +PHONOGRAM 0x0335bb30 - 0x0335bb39 +PHONOGRAM 0x0335bc30 - 0x0335bc39 +PHONOGRAM 0x0335bd30 - 0x0335bd39 +PHONOGRAM 0x0335be30 - 0x0335be39 +PHONOGRAM 0x0335bf30 - 0x0335bf39 +PHONOGRAM 0x0335c030 - 0x0335c039 +PHONOGRAM 0x0335c130 - 0x0335c139 +PHONOGRAM 0x0335c230 - 0x0335c239 +PHONOGRAM 0x0335c330 - 0x0335c339 +PHONOGRAM 0x0335c430 - 0x0335c439 +PHONOGRAM 0x0335c530 - 0x0335c539 +PHONOGRAM 0x0335c630 - 0x0335c639 +PHONOGRAM 0x0335c730 - 0x0335c739 +PHONOGRAM 0x0335c830 - 0x0335c839 +PHONOGRAM 0x0335c930 - 0x0335c939 +PHONOGRAM 0x0335ca30 - 0x0335ca39 +PHONOGRAM 0x0335cb30 - 0x0335cb39 +PHONOGRAM 0x0335cc30 - 0x0335cc39 +PHONOGRAM 0x0335cd30 - 0x0335cd39 +PHONOGRAM 0x0335ce30 - 0x0335ce39 +PHONOGRAM 0x0335cf30 - 0x0335cf39 +PHONOGRAM 0x0335d030 - 0x0335d039 +PHONOGRAM 0x0335d130 - 0x0335d139 +PHONOGRAM 0x0335d230 - 0x0335d239 +PHONOGRAM 0x0335d330 - 0x0335d339 +PHONOGRAM 0x0335d430 - 0x0335d439 +PHONOGRAM 0x0335d530 - 0x0335d539 +PHONOGRAM 0x0335d630 - 0x0335d639 +PHONOGRAM 0x0335d730 - 0x0335d739 +PHONOGRAM 0x0335d830 - 0x0335d839 +PHONOGRAM 0x0335d930 - 0x0335d939 +PHONOGRAM 0x0335da30 - 0x0335da39 +PHONOGRAM 0x0335db30 - 0x0335db39 +PHONOGRAM 0x0335dc30 - 0x0335dc39 +PHONOGRAM 0x0335dd30 - 0x0335dd39 +PHONOGRAM 0x0335de30 - 0x0335de39 +PHONOGRAM 0x0335df30 - 0x0335df39 +PHONOGRAM 0x0335e030 - 0x0335e039 +PHONOGRAM 0x0335e130 - 0x0335e139 +PHONOGRAM 0x0335e230 - 0x0335e239 +PHONOGRAM 0x0335e330 - 0x0335e339 +PHONOGRAM 0x0335e430 - 0x0335e439 +PHONOGRAM 0x0335e530 - 0x0335e539 +PHONOGRAM 0x0335e630 - 0x0335e639 +PHONOGRAM 0x0335e730 - 0x0335e739 +PHONOGRAM 0x0335e830 - 0x0335e839 +PHONOGRAM 0x0335e930 - 0x0335e939 +PHONOGRAM 0x0335ea30 - 0x0335ea39 +PHONOGRAM 0x0335eb30 - 0x0335eb39 +PHONOGRAM 0x0335ec30 - 0x0335ec39 +PHONOGRAM 0x0335ed30 - 0x0335ed39 +PHONOGRAM 0x0335ee30 - 0x0335ee39 +PHONOGRAM 0x0335ef30 - 0x0335ef39 +PHONOGRAM 0x0335f030 - 0x0335f039 +PHONOGRAM 0x0335f130 - 0x0335f139 +PHONOGRAM 0x0335f230 - 0x0335f239 +PHONOGRAM 0x0335f330 - 0x0335f339 +PHONOGRAM 0x0335f430 - 0x0335f439 +PHONOGRAM 0x0335f530 - 0x0335f539 +PHONOGRAM 0x0335f630 - 0x0335f639 +PHONOGRAM 0x0335f730 - 0x0335f739 +PHONOGRAM 0x0335f830 - 0x0335f839 +PHONOGRAM 0x0335f930 - 0x0335f939 +PHONOGRAM 0x0335fa30 - 0x0335fa39 +PHONOGRAM 0x0335fb30 - 0x0335fb39 +PHONOGRAM 0x0335fc30 - 0x0335fc39 +PHONOGRAM 0x0335fd30 - 0x0335fd39 +PHONOGRAM 0x0335fe30 - 0x0335fe39 +PHONOGRAM 0x03368130 - 0x03368139 +PHONOGRAM 0x03368230 - 0x03368239 +PHONOGRAM 0x03368330 - 0x03368339 +PHONOGRAM 0x03368430 - 0x03368439 +PHONOGRAM 0x03368530 - 0x03368539 +PHONOGRAM 0x03368630 - 0x03368639 +PHONOGRAM 0x03368730 - 0x03368739 +PHONOGRAM 0x03368830 - 0x03368839 +PHONOGRAM 0x03368930 - 0x03368939 +PHONOGRAM 0x03368a30 - 0x03368a39 +PHONOGRAM 0x03368b30 - 0x03368b39 +PHONOGRAM 0x03368c30 - 0x03368c39 +PHONOGRAM 0x03368d30 - 0x03368d39 +PHONOGRAM 0x03368e30 - 0x03368e39 +PHONOGRAM 0x03368f30 - 0x03368f39 +PHONOGRAM 0x03369030 - 0x03369039 +PHONOGRAM 0x03369130 - 0x03369139 +PHONOGRAM 0x03369230 - 0x03369239 +PHONOGRAM 0x03369330 - 0x03369339 +PHONOGRAM 0x03369430 - 0x03369439 +PHONOGRAM 0x03369530 - 0x03369539 +PHONOGRAM 0x03369630 - 0x03369639 +PHONOGRAM 0x03369730 - 0x03369739 +PHONOGRAM 0x03369830 - 0x03369839 +PHONOGRAM 0x03369930 - 0x03369939 +PHONOGRAM 0x03369a30 - 0x03369a39 +PHONOGRAM 0x03369b30 - 0x03369b39 +PHONOGRAM 0x03369c30 - 0x03369c39 +PHONOGRAM 0x03369d30 - 0x03369d39 +PHONOGRAM 0x03369e30 - 0x03369e39 +PHONOGRAM 0x03369f30 - 0x03369f39 +PHONOGRAM 0x0336a030 - 0x0336a039 +PHONOGRAM 0x0336a130 - 0x0336a139 +PHONOGRAM 0x0336a230 - 0x0336a239 +PHONOGRAM 0x0336a330 - 0x0336a339 +PHONOGRAM 0x0336a430 - 0x0336a439 +PHONOGRAM 0x0336a530 - 0x0336a539 +PHONOGRAM 0x0336a630 - 0x0336a639 +PHONOGRAM 0x0336a730 - 0x0336a739 +PHONOGRAM 0x0336a830 - 0x0336a839 +PHONOGRAM 0x0336a930 - 0x0336a939 +PHONOGRAM 0x0336aa30 - 0x0336aa39 +PHONOGRAM 0x0336ab30 - 0x0336ab39 +PHONOGRAM 0x0336ac30 - 0x0336ac39 +PHONOGRAM 0x0336ad30 - 0x0336ad39 +PHONOGRAM 0x0336ae30 - 0x0336ae39 +PHONOGRAM 0x0336af30 - 0x0336af39 +PHONOGRAM 0x0336b030 - 0x0336b039 +PHONOGRAM 0x0336b130 - 0x0336b139 +PHONOGRAM 0x0336b230 - 0x0336b239 +PHONOGRAM 0x0336b330 - 0x0336b339 +PHONOGRAM 0x0336b430 - 0x0336b439 +PHONOGRAM 0x0336b530 - 0x0336b539 +PHONOGRAM 0x0336b630 - 0x0336b639 +PHONOGRAM 0x0336b730 - 0x0336b739 +PHONOGRAM 0x0336b830 - 0x0336b839 +PHONOGRAM 0x0336b930 - 0x0336b939 +PHONOGRAM 0x0336ba30 - 0x0336ba39 +PHONOGRAM 0x0336bb30 - 0x0336bb39 +PHONOGRAM 0x0336bc30 - 0x0336bc39 +PHONOGRAM 0x0336bd30 - 0x0336bd39 +PHONOGRAM 0x0336be30 - 0x0336be36 +PHONOGRAM 0x04319632 - 0x04319639 +PHONOGRAM 0x04319730 0x04319731 0x04319733 - 0x04319739 +PHONOGRAM 0x04319830 - 0x04319839 +PHONOGRAM 0x04319930 - 0x04319939 +PHONOGRAM 0x04319a30 - 0x04319a39 +PRINT 0x01308432 +PRINT 0x0134ac34 +PRINT 0x0136a336 - 0x0136a339 +PRINT 0x0136a430 - 0x0136a437 +PRINT 0x0136a635 0x0136a636 +PRINT 0x0136a732 +PRINT 0x0136ab35 +PUNCT 0x01308433 - 0x01308438 +PUNCT 0x01308530 - 0x01308534 0x01308537 0x01308539 +PUNCT 0x01308630 0x01308633 0x01308637 +PUNCT 0x0130b630 0x0130b631 0x0130b639 +PUNCT 0x0130b730 - 0x0130b738 +PUNCT 0x0130b831 - 0x0130b839 +PUNCT 0x0130b930 - 0x0130b933 0x0130b939 +PUNCT 0x0130ba30 - 0x0130ba37 +PUNCT 0x0130c832 0x0130c833 +PUNCT 0x0130c932 0x0130c938 0x0130c939 +PUNCT 0x0130ca31 +PUNCT 0x0130d034 +PUNCT 0x0130d738 +PUNCT 0x0130ed34 - 0x0130ed39 +PUNCT 0x0130f231 0x0130f232 +PUNCT 0x0130f734 0x0130f736 0x0130f739 +PUNCT 0x0130fc37 0x0130fc38 +PUNCT 0x01318132 +PUNCT 0x01318237 +PUNCT 0x01318331 +PUNCT 0x01318a36 - 0x01318a39 +PUNCT 0x01319532 +PUNCT 0x01319733 +PUNCT 0x01319933 0x01319934 0x01319936 - 0x01319939 +PUNCT 0x01319a30 - 0x01319a39 +PUNCT 0x0131d638 0x0131d639 +PUNCT 0x0131d830 +PUNCT 0x0131e530 0x0131e531 0x0131e538 +PUNCT 0x01328d32 +PUNCT 0x0132cd36 +PUNCT 0x0132d531 +PUNCT 0x0132d637 +PUNCT 0x0132d738 0x0132d739 +PUNCT 0x0132e835 - 0x0132e839 +PUNCT 0x0132e930 - 0x0132e939 +PUNCT 0x0132ea30 - 0x0132ea37 +PUNCT 0x0132eb30 - 0x0132eb35 +PUNCT 0x0132ed36 0x0132ed38 +PUNCT 0x0132ee30 0x0132ee32 - 0x0132ee35 +PUNCT 0x0132f537 +PUNCT 0x0132fb34 - 0x0132fb39 +PUNCT 0x0132fc30 0x0132fc31 0x0132fc33 - 0x0132fc38 +PUNCT 0x0132fd31 +PUNCT 0x01338b34 - 0x01338b39 +PUNCT 0x01339d31 +PUNCT 0x0133da35 - 0x0133da39 +PUNCT 0x0133db30 - 0x0133db32 +PUNCT 0x0134aa35 0x0134aa36 +PUNCT 0x0134af31 0x0134af32 +PUNCT 0x0134b731 - 0x0134b733 +PUNCT 0x0134be35 0x0134be36 +PUNCT 0x0134ce34 - 0x0134ce36 0x0134ce38 0x0134ce39 +PUNCT 0x0134cf30 0x0134cf31 +PUNCT 0x0134d238 0x0134d239 +PUNCT 0x0134d330 - 0x0134d338 +PUNCT 0x01369c39 +PUNCT 0x01369d31 - 0x01369d33 +PUNCT 0x01369e35 - 0x01369e37 +PUNCT 0x0136a031 - 0x0136a033 +PUNCT 0x0136a137 - 0x0136a139 +PUNCT 0x0136a333 0x0136a334 +PUNCT 0x0136a532 - 0x0136a539 +PUNCT 0x0136a630 - 0x0136a634 +PUNCT 0x0136a733 - 0x0136a739 +PUNCT 0x0136a830 - 0x0136a839 +PUNCT 0x0136a930 - 0x0136a939 +PUNCT 0x0136aa30 - 0x0136aa32 0x0136aa37 +PUNCT 0x0136ae32 - 0x0136ae36 +PUNCT 0x0136af38 0x0136af39 +PUNCT 0x0136b030 - 0x0136b032 +PUNCT 0x0136b230 - 0x0136b239 +PUNCT 0x0136b330 - 0x0136b336 +PUNCT 0x0136bb35 0x0136bb36 0x0136bb38 0x0136bb39 +PUNCT 0x0136bc31 +PUNCT 0x0136bd32 0x0136bd34 0x0136bd35 +PUNCT 0x0136be31 - 0x0136be35 0x0136be37 0x0136be39 +PUNCT 0x0136bf31 0x0136bf36 +PUNCT 0x0136c030 0x0136c038 +PUNCT 0x0136c134 - 0x0136c138 +PUNCT 0x0136c234 0x0136c235 +PUNCT 0x0136c732 - 0x0136c739 +PUNCT 0x0136c830 - 0x0136c839 +PUNCT 0x0136c930 - 0x0136c939 +PUNCT 0x0136ca30 - 0x0136ca39 +PUNCT 0x0136cb30 - 0x0136cb39 +PUNCT 0x0136cc30 - 0x0136cc39 +PUNCT 0x0136cd30 - 0x0136cd39 +PUNCT 0x0136ce30 - 0x0136ce39 +PUNCT 0x0136cf30 - 0x0136cf39 +PUNCT 0x0136d030 - 0x0136d039 +PUNCT 0x0136d130 - 0x0136d139 +PUNCT 0x0136d230 - 0x0136d239 +PUNCT 0x0136d330 - 0x0136d339 +PUNCT 0x0136d430 - 0x0136d439 +PUNCT 0x0136d530 - 0x0136d539 +PUNCT 0x0136d630 - 0x0136d639 +PUNCT 0x0136d730 - 0x0136d739 +PUNCT 0x0136d830 - 0x0136d839 +PUNCT 0x0136d930 - 0x0136d939 +PUNCT 0x0136da30 - 0x0136da39 +PUNCT 0x0136db30 - 0x0136db39 +PUNCT 0x0136dc30 - 0x0136dc39 +PUNCT 0x0136dd30 - 0x0136dd39 +PUNCT 0x0136de30 - 0x0136de39 +PUNCT 0x0136df30 - 0x0136df39 +PUNCT 0x0136e030 - 0x0136e039 +PUNCT 0x0136e130 - 0x0136e139 +PUNCT 0x0136e230 - 0x0136e239 +PUNCT 0x0136e330 - 0x0136e339 +PUNCT 0x0136e430 - 0x0136e439 +PUNCT 0x0136e530 - 0x0136e539 +PUNCT 0x0136e630 - 0x0136e639 +PUNCT 0x0136e730 - 0x0136e739 +PUNCT 0x0136e830 - 0x0136e839 +PUNCT 0x0136e930 - 0x0136e939 +PUNCT 0x0136ea30 - 0x0136ea39 +PUNCT 0x0136eb30 - 0x0136eb39 +PUNCT 0x0136ec30 - 0x0136ec39 +PUNCT 0x0136ed30 - 0x0136ed39 +PUNCT 0x0136ee30 - 0x0136ee39 +PUNCT 0x0136ef30 - 0x0136ef39 +PUNCT 0x0136f030 - 0x0136f039 +PUNCT 0x0136f130 - 0x0136f139 +PUNCT 0x0136f230 - 0x0136f239 +PUNCT 0x0136f330 - 0x0136f339 +PUNCT 0x0136f430 - 0x0136f439 +PUNCT 0x0136f530 - 0x0136f539 +PUNCT 0x0136f630 - 0x0136f639 +PUNCT 0x0136f730 - 0x0136f739 +PUNCT 0x0136f830 - 0x0136f839 +PUNCT 0x0136f930 - 0x0136f939 +PUNCT 0x0136fa30 - 0x0136fa39 +PUNCT 0x0136fb30 - 0x0136fb39 +PUNCT 0x0136fc30 +PUNCT 0x01378330 - 0x01378339 +PUNCT 0x01378430 - 0x01378439 +PUNCT 0x01378530 - 0x01378539 +PUNCT 0x01378630 - 0x01378638 +PUNCT 0x01378934 - 0x01378939 +PUNCT 0x01378a30 - 0x01378a34 +PUNCT 0x01378d36 - 0x01378d39 +PUNCT 0x01378e30 - 0x01378e39 +PUNCT 0x01378f30 - 0x01378f39 +PUNCT 0x01379030 - 0x01379039 +PUNCT 0x01379130 - 0x01379139 +PUNCT 0x01379230 - 0x01379239 +PUNCT 0x01379330 - 0x01379339 +PUNCT 0x01379430 - 0x01379439 +PUNCT 0x01379530 - 0x01379533 +PUNCT 0x01379736 - 0x01379739 +PUNCT 0x01379830 - 0x01379839 +PUNCT 0x01379930 - 0x01379939 +PUNCT 0x01379a30 - 0x01379a39 +PUNCT 0x01379b30 - 0x01379b39 +PUNCT 0x01379c30 - 0x01379c39 +PUNCT 0x01379d30 - 0x01379d39 +PUNCT 0x01379e30 - 0x01379e39 +PUNCT 0x01379f30 - 0x01379f39 +PUNCT 0x0137a030 - 0x0137a039 +PUNCT 0x0137a130 - 0x0137a139 +PUNCT 0x0137a230 - 0x0137a239 +PUNCT 0x0137a330 - 0x0137a339 +PUNCT 0x0137a430 - 0x0137a433 0x0137a436 0x0137a437 0x0137a439 +PUNCT 0x0137a530 - 0x0137a539 +PUNCT 0x0137a630 - 0x0137a639 +PUNCT 0x0137a730 - 0x0137a739 +PUNCT 0x0137a830 - 0x0137a839 +PUNCT 0x0137a930 - 0x0137a939 +PUNCT 0x0137aa30 - 0x0137aa39 +PUNCT 0x0137ab30 - 0x0137ab39 +PUNCT 0x0137ac30 - 0x0137ac39 +PUNCT 0x0137ad30 - 0x0137ad39 +PUNCT 0x0137ae30 - 0x0137ae37 +PUNCT 0x0137af30 - 0x0137af39 +PUNCT 0x0137bb39 +PUNCT 0x0137bc30 - 0x0137bc32 0x0137bc34 - 0x0137bc37 +PUNCT 0x0137bd30 - 0x0137bd39 +PUNCT 0x0137be30 - 0x0137be39 +PUNCT 0x0137bf30 - 0x0137bf37 0x0137bf39 +PUNCT 0x0137c030 - 0x0137c039 +PUNCT 0x0137c130 - 0x0137c139 +PUNCT 0x0137c230 - 0x0137c239 +PUNCT 0x0137c330 - 0x0137c333 0x0137c335 0x0137c337 - 0x0137c339 +PUNCT 0x0137c430 0x0137c434 0x0137c436 - 0x0137c439 +PUNCT 0x0137c530 - 0x0137c532 0x0137c535 - 0x0137c539 +PUNCT 0x0137c630 - 0x0137c639 +PUNCT 0x0137c730 - 0x0137c735 +PUNCT 0x0137ca36 +PUNCT 0x0137cb30 - 0x0137cb39 +PUNCT 0x0137cc30 - 0x0137cc39 +PUNCT 0x0137cd30 - 0x0137cd33 0x0137cd35 - 0x0137cd39 +PUNCT 0x0137ce30 - 0x0137ce38 +PUNCT 0x0137d036 - 0x0137d039 +PUNCT 0x0137d130 - 0x0137d139 +PUNCT 0x0137d230 - 0x0137d239 +PUNCT 0x0137d330 - 0x0137d333 0x0137d338 0x0137d339 +PUNCT 0x0137d430 - 0x0137d439 +PUNCT 0x0137d530 - 0x0137d539 +PUNCT 0x0137d630 - 0x0137d639 +PUNCT 0x0137d730 - 0x0137d739 +PUNCT 0x0137d830 - 0x0137d839 +PUNCT 0x0137d930 - 0x0137d939 +PUNCT 0x0137da30 - 0x0137da39 +PUNCT 0x0137db30 - 0x0137db39 +PUNCT 0x0137dc30 - 0x0137dc39 +PUNCT 0x0137dd30 - 0x0137dd39 +PUNCT 0x0137de30 - 0x0137de39 +PUNCT 0x0137df30 - 0x0137df39 +PUNCT 0x0137e030 - 0x0137e039 +PUNCT 0x0137e130 - 0x0137e139 +PUNCT 0x0137e230 - 0x0137e239 +PUNCT 0x0137e330 - 0x0137e339 +PUNCT 0x0137e430 - 0x0137e439 +PUNCT 0x0137e530 - 0x0137e539 +PUNCT 0x0137e630 - 0x0137e639 +PUNCT 0x0137e730 - 0x0137e739 +PUNCT 0x0137e830 - 0x0137e839 +PUNCT 0x0137e930 - 0x0137e939 +PUNCT 0x0137ea30 - 0x0137ea39 +PUNCT 0x0137eb30 - 0x0137eb39 +PUNCT 0x0137ec30 - 0x0137ec39 +PUNCT 0x0137ed30 - 0x0137ed39 +PUNCT 0x0137ee30 - 0x0137ee39 +PUNCT 0x0137ef30 - 0x0137ef39 +PUNCT 0x0137f030 - 0x0137f039 +PUNCT 0x0137f130 - 0x0137f139 +PUNCT 0x0137f230 - 0x0137f239 +PUNCT 0x0137f330 - 0x0137f339 +PUNCT 0x0137f430 - 0x0137f439 +PUNCT 0x0137f530 - 0x0137f539 +PUNCT 0x0137f630 - 0x0137f639 +PUNCT 0x0137f730 - 0x0137f739 +PUNCT 0x0137f830 - 0x0137f839 +PUNCT 0x0137f930 - 0x0137f939 +PUNCT 0x0137fa30 - 0x0137fa39 +PUNCT 0x0137fb30 - 0x0137fb39 +PUNCT 0x0137fc30 - 0x0137fc39 +PUNCT 0x0137fd30 - 0x0137fd39 +PUNCT 0x0137fe30 - 0x0137fe39 +PUNCT 0x01388130 - 0x01388139 +PUNCT 0x01388230 - 0x01388239 +PUNCT 0x01388330 - 0x01388339 +PUNCT 0x01388430 - 0x01388439 +PUNCT 0x01388530 - 0x01388539 +PUNCT 0x01388630 - 0x01388639 +PUNCT 0x01388730 - 0x01388739 +PUNCT 0x01388830 - 0x01388839 +PUNCT 0x01388930 - 0x01388939 +PUNCT 0x01388a30 - 0x01388a39 +PUNCT 0x01388b30 - 0x01388b39 +PUNCT 0x01388c30 - 0x01388c39 +PUNCT 0x01388d30 - 0x01388d39 +PUNCT 0x01388e30 - 0x01388e39 +PUNCT 0x01388f30 - 0x01388f39 +PUNCT 0x01389030 - 0x01389039 +PUNCT 0x01389130 - 0x01389139 +PUNCT 0x01389230 - 0x01389239 +PUNCT 0x01389330 - 0x01389339 +PUNCT 0x01389430 - 0x01389439 +PUNCT 0x01389530 - 0x01389539 +PUNCT 0x01389630 - 0x01389639 +PUNCT 0x01389730 - 0x01389739 +PUNCT 0x01389830 - 0x01389839 +PUNCT 0x01389930 - 0x01389939 +PUNCT 0x01389a30 - 0x01389a39 +PUNCT 0x01389b30 - 0x01389b39 +PUNCT 0x01389c30 - 0x01389c39 +PUNCT 0x01389d30 - 0x01389d39 +PUNCT 0x01389e30 - 0x01389e39 +PUNCT 0x01389f30 - 0x01389f39 +PUNCT 0x0138a030 - 0x0138a039 +PUNCT 0x0138a130 - 0x0138a139 +PUNCT 0x0138a230 - 0x0138a239 +PUNCT 0x0138a330 - 0x0138a339 +PUNCT 0x0138a430 0x0138a431 +PUNCT 0x0138fd38 0x0138fd39 +PUNCT 0x0138fe30 - 0x0138fe39 +PUNCT 0x01398130 - 0x01398137 0x01398139 +PUNCT 0x01398230 - 0x01398239 +PUNCT 0x01398330 - 0x01398339 +PUNCT 0x01398430 - 0x01398439 +PUNCT 0x01398530 - 0x01398539 +PUNCT 0x01398630 - 0x01398639 +PUNCT 0x01398730 - 0x01398739 +PUNCT 0x01398830 - 0x01398839 +PUNCT 0x01398930 - 0x01398939 +PUNCT 0x01398b32 - 0x01398b39 +PUNCT 0x01398c30 - 0x01398c39 +PUNCT 0x01398d30 - 0x01398d39 +PUNCT 0x01398e30 - 0x01398e39 +PUNCT 0x01398f30 - 0x01398f39 +PUNCT 0x01399030 - 0x01399039 +PUNCT 0x01399130 - 0x01399139 +PUNCT 0x01399230 - 0x01399239 +PUNCT 0x01399330 - 0x01399339 +PUNCT 0x01399430 - 0x01399439 +PUNCT 0x01399530 - 0x01399539 +PUNCT 0x01399630 - 0x01399639 +PUNCT 0x01399730 - 0x01399739 +PUNCT 0x01399830 - 0x01399839 +PUNCT 0x01399930 - 0x01399939 +PUNCT 0x01399a30 - 0x01399a39 +PUNCT 0x01399b30 - 0x01399b39 +PUNCT 0x01399c30 - 0x01399c39 +PUNCT 0x01399d30 - 0x01399d39 +PUNCT 0x01399e30 - 0x01399e39 +PUNCT 0x01399f30 - 0x01399f39 +PUNCT 0x0139a030 - 0x0139a035 +PUNCT 0x0139a336 - 0x0139a339 +PUNCT 0x0139a430 - 0x0139a433 +PUNCT 0x0139a530 0x0139a536 0x0139a537 +PUNCT 0x0139a633 0x0139a634 +PUNCT 0x0139a734 0x0139a739 +PUNCT 0x0139b238 0x0139b239 +PUNCT 0x0139b334 - 0x0139b339 +PUNCT 0x0139b430 - 0x0139b433 +PUNCT 0x0139be30 - 0x0139be39 +PUNCT 0x0139bf30 - 0x0139bf39 +PUNCT 0x0139c030 - 0x0139c038 +PUNCT 0x0139c132 - 0x0139c139 +PUNCT 0x0139c230 - 0x0139c239 +PUNCT 0x0139c330 - 0x0139c336 +PUNCT 0x0139c635 - 0x0139c639 +PUNCT 0x0139c730 - 0x0139c739 +PUNCT 0x0139c830 - 0x0139c839 +PUNCT 0x0139c930 - 0x0139c932 0x0139c936 +PUNCT 0x0139ca37 - 0x0139ca39 +PUNCT 0x0139cb30 - 0x0139cb39 +PUNCT 0x0139cc30 - 0x0139cc39 +PUNCT 0x0139cd30 - 0x0139cd39 +PUNCT 0x0139ce30 - 0x0139ce34 +PUNCT 0x0139d030 - 0x0139d039 +PUNCT 0x0139d130 0x0139d131 0x0139d136 - 0x0139d139 +PUNCT 0x0139d230 - 0x0139d239 +PUNCT 0x0139d330 - 0x0139d339 +PUNCT 0x0139d430 - 0x0139d439 +PUNCT 0x0139d530 - 0x0139d539 +PUNCT 0x0139d630 - 0x0139d632 0x0139d634 - 0x0139d639 +PUNCT 0x0139d730 - 0x0139d739 +PUNCT 0x0139d830 - 0x0139d839 +PUNCT 0x0139d930 - 0x0139d939 +PUNCT 0x0139da30 - 0x0139da39 +PUNCT 0x0139db30 - 0x0139db39 +PUNCT 0x0139dc30 - 0x0139dc39 +PUNCT 0x0139dd30 - 0x0139dd39 +PUNCT 0x0139de30 - 0x0139de39 +PUNCT 0x0139df30 - 0x0139df39 +PUNCT 0x0139e030 - 0x0139e039 +PUNCT 0x0139e130 - 0x0139e139 +PUNCT 0x0139e230 - 0x0139e232 0x0139e237 - 0x0139e239 +PUNCT 0x0139e330 - 0x0139e339 +PUNCT 0x0139e430 - 0x0139e439 +PUNCT 0x0139e530 - 0x0139e539 +PUNCT 0x0139e630 - 0x0139e639 +PUNCT 0x0139e730 - 0x0139e739 +PUNCT 0x0139e830 - 0x0139e839 +PUNCT 0x0139e930 - 0x0139e939 +PUNCT 0x0139ea30 - 0x0139ea39 +PUNCT 0x0139eb30 - 0x0139eb34 0x0139eb37 - 0x0139eb39 +PUNCT 0x0139ec30 - 0x0139ec39 +PUNCT 0x0139ed30 - 0x0139ed39 +PUNCT 0x0139ee30 - 0x0139ee37 +PUNCT 0x02368f31 - 0x02368f39 +PUNCT 0x02369030 - 0x02369039 +PUNCT 0x02369130 - 0x02369139 +PUNCT 0x02369230 - 0x02369239 +PUNCT 0x02369330 - 0x02369339 +PUNCT 0x02369430 - 0x02369435 +PUNCT 0x0430b633 +PUNCT 0x0430eb36 0x0430eb37 +PUNCT 0x0430fe36 +PUNCT 0x04318538 0x04318539 +PUNCT 0x04318630 0x04318634 +PUNCT 0x04319535 - 0x04319539 +PUNCT 0x04319630 0x04319631 +PUNCT 0x0431a234 0x0431a236 - 0x0431a239 +PUNCT 0x0431a330 - 0x0431a332 +PUNCT 0x0431a436 0x0431a437 +SPACE 0x01308135 +SPACE 0x01308432 +SPACE 0x0134ac34 +SPACE 0x0136a336 - 0x0136a339 +SPACE 0x0136a430 - 0x0136a437 +SPACE 0x0136a635 0x0136a636 +SPACE 0x0136a732 +SPACE 0x0136ab35 +SPECIAL 0x01308535 0x01308536 +SPECIAL 0x01308631 0x01308634 - 0x01308636 +SPECIAL 0x0131e532 - 0x0131e537 +SPECIAL 0x01329a30 - 0x01329a32 +SPECIAL 0x0132ec36 - 0x0132ec39 +SPECIAL 0x0132ed30 - 0x0132ed35 +SPECIAL 0x0133dc32 - 0x0133dc39 +SPECIAL 0x0133dd30 - 0x0133dd32 +SPECIAL 0x0134b734 - 0x0134b736 +SPECIAL 0x0136ad32 0x0136ad36 - 0x0136ad39 +SPECIAL 0x0136ae30 0x0136ae31 0x0136ae38 0x0136ae39 +SPECIAL 0x0136af30 - 0x0136af37 +SPECIAL 0x0136c333 - 0x0136c339 +SPECIAL 0x0136c430 - 0x0136c439 +SPECIAL 0x0136c530 - 0x0136c539 +SPECIAL 0x01378c36 - 0x01378c39 +SPECIAL 0x01378d30 - 0x01378d35 +SPECIAL 0x01379534 - 0x01379539 +SPECIAL 0x01379630 - 0x01379639 +SPECIAL 0x01379730 - 0x01379734 +SPECIAL 0x0137c736 - 0x0137c739 +SPECIAL 0x0137c830 - 0x0137c839 +SPECIAL 0x0137c930 - 0x0137c939 +SPECIAL 0x0137ca30 - 0x0137ca35 +SPECIAL 0x0139a538 0x0139a539 +SPECIAL 0x0139a630 +SPECIAL 0x0139b330 - 0x0139b333 +SPECIAL 0x0139c530 - 0x0139c539 +SPECIAL 0x0139c630 - 0x0139c634 +SPECIAL 0x0139c937 - 0x0139c939 +SPECIAL 0x0139ca30 - 0x0139ca36 +SPECIAL 0x0139ce35 - 0x0139ce39 +SPECIAL 0x0139cf30 - 0x0139cf39 +SWIDTH2 0x01339d36 - 0x01339d39 +SWIDTH2 0x01339e30 - 0x01339e39 +SWIDTH2 0x01339f30 - 0x01339f39 +SWIDTH2 0x0133a030 - 0x0133a039 +SWIDTH2 0x0133a130 - 0x0133a139 +SWIDTH2 0x0133a230 - 0x0133a239 +SWIDTH2 0x0133a330 - 0x0133a339 +SWIDTH2 0x0133a430 - 0x0133a439 +SWIDTH2 0x0133a530 - 0x0133a539 +SWIDTH2 0x0133a630 - 0x0133a635 +SWIDTH2 0x0133a731 +SWIDTH2 0x0136eb35 0x0136eb36 +SWIDTH2 0x0138fd38 0x0138fd39 +SWIDTH2 0x0138fe30 - 0x0138fe39 +SWIDTH2 0x01398130 - 0x01398137 0x01398139 +SWIDTH2 0x01398230 - 0x01398239 +SWIDTH2 0x01398330 - 0x01398339 +SWIDTH2 0x01398430 - 0x01398439 +SWIDTH2 0x01398530 - 0x01398539 +SWIDTH2 0x01398630 - 0x01398639 +SWIDTH2 0x01398730 - 0x01398739 +SWIDTH2 0x01398830 - 0x01398839 +SWIDTH2 0x01398930 - 0x01398939 +SWIDTH2 0x01398b32 - 0x01398b39 +SWIDTH2 0x01398c30 - 0x01398c39 +SWIDTH2 0x01398d30 - 0x01398d39 +SWIDTH2 0x01398e30 - 0x01398e39 +SWIDTH2 0x01398f30 - 0x01398f39 +SWIDTH2 0x01399030 - 0x01399039 +SWIDTH2 0x01399130 - 0x01399139 +SWIDTH2 0x01399230 - 0x01399239 +SWIDTH2 0x01399330 - 0x01399339 +SWIDTH2 0x01399430 - 0x01399439 +SWIDTH2 0x01399530 - 0x01399539 +SWIDTH2 0x01399630 - 0x01399639 +SWIDTH2 0x01399730 - 0x01399739 +SWIDTH2 0x01399830 - 0x01399839 +SWIDTH2 0x01399930 - 0x01399939 +SWIDTH2 0x01399a30 - 0x01399a39 +SWIDTH2 0x01399b30 - 0x01399b39 +SWIDTH2 0x01399c30 - 0x01399c39 +SWIDTH2 0x01399d30 - 0x01399d39 +SWIDTH2 0x01399e30 - 0x01399e39 +SWIDTH2 0x01399f30 - 0x01399f39 +SWIDTH2 0x0139a030 - 0x0139a035 +SWIDTH2 0x0139a336 - 0x0139a339 +SWIDTH2 0x0139a430 - 0x0139a439 +SWIDTH2 0x0139a530 - 0x0139a539 +SWIDTH2 0x0139a630 - 0x0139a633 0x0139a636 - 0x0139a638 +SWIDTH2 0x0139a731 - 0x0139a739 +SWIDTH2 0x0139a830 0x0139a836 - 0x0139a838 +SWIDTH2 0x0139a933 - 0x0139a939 +SWIDTH2 0x0139aa30 - 0x0139aa39 +SWIDTH2 0x0139ab30 - 0x0139ab39 +SWIDTH2 0x0139ac30 - 0x0139ac39 +SWIDTH2 0x0139ad30 - 0x0139ad39 +SWIDTH2 0x0139ae30 - 0x0139ae39 +SWIDTH2 0x0139af30 - 0x0139af39 +SWIDTH2 0x0139b030 - 0x0139b039 +SWIDTH2 0x0139b130 - 0x0139b139 +SWIDTH2 0x0139b230 - 0x0139b236 0x0139b238 0x0139b239 +SWIDTH2 0x0139b330 - 0x0139b339 +SWIDTH2 0x0139b430 - 0x0139b439 +SWIDTH2 0x0139b530 - 0x0139b539 +SWIDTH2 0x0139b630 - 0x0139b637 +SWIDTH2 0x0139bc34 - 0x0139bc39 +SWIDTH2 0x0139bd30 - 0x0139bd39 +SWIDTH2 0x0139be30 - 0x0139be39 +SWIDTH2 0x0139bf30 - 0x0139bf39 +SWIDTH2 0x0139c030 - 0x0139c038 +SWIDTH2 0x0139c132 - 0x0139c139 +SWIDTH2 0x0139c230 - 0x0139c239 +SWIDTH2 0x0139c330 - 0x0139c336 +SWIDTH2 0x0139c530 - 0x0139c539 +SWIDTH2 0x0139c630 - 0x0139c639 +SWIDTH2 0x0139c730 - 0x0139c739 +SWIDTH2 0x0139c830 - 0x0139c839 +SWIDTH2 0x0139c930 - 0x0139c932 0x0139c936 - 0x0139c939 +SWIDTH2 0x0139ca30 - 0x0139ca39 +SWIDTH2 0x0139cb30 - 0x0139cb39 +SWIDTH2 0x0139cc30 - 0x0139cc39 +SWIDTH2 0x0139cd30 - 0x0139cd39 +SWIDTH2 0x0139ce30 - 0x0139ce39 +SWIDTH2 0x0139cf30 - 0x0139cf39 +SWIDTH2 0x0139d030 - 0x0139d039 +SWIDTH2 0x0139d130 0x0139d131 0x0139d136 - 0x0139d139 +SWIDTH2 0x0139d230 - 0x0139d239 +SWIDTH2 0x0139d330 - 0x0139d339 +SWIDTH2 0x0139d430 - 0x0139d439 +SWIDTH2 0x0139d530 - 0x0139d539 +SWIDTH2 0x0139d630 - 0x0139d632 0x0139d634 - 0x0139d639 +SWIDTH2 0x0139d730 - 0x0139d739 +SWIDTH2 0x0139d830 - 0x0139d839 +SWIDTH2 0x0139d930 - 0x0139d939 +SWIDTH2 0x0139da30 - 0x0139da39 +SWIDTH2 0x0139db30 - 0x0139db39 +SWIDTH2 0x0139dc30 - 0x0139dc39 +SWIDTH2 0x0139dd30 - 0x0139dd39 +SWIDTH2 0x0139de30 - 0x0139de39 +SWIDTH2 0x0139df30 - 0x0139df39 +SWIDTH2 0x0139e030 - 0x0139e039 +SWIDTH2 0x0139e130 - 0x0139e139 +SWIDTH2 0x0139e230 - 0x0139e232 0x0139e237 - 0x0139e239 +SWIDTH2 0x0139e330 - 0x0139e339 +SWIDTH2 0x0139e430 - 0x0139e439 +SWIDTH2 0x0139e530 - 0x0139e539 +SWIDTH2 0x0139e630 - 0x0139e639 +SWIDTH2 0x0139e730 - 0x0139e739 +SWIDTH2 0x0139e830 - 0x0139e839 +SWIDTH2 0x0139e930 - 0x0139e939 +SWIDTH2 0x0139ea30 - 0x0139ea39 +SWIDTH2 0x0139eb30 - 0x0139eb34 0x0139eb37 - 0x0139eb39 +SWIDTH2 0x0139ec30 - 0x0139ec39 +SWIDTH2 0x0139ed30 - 0x0139ed39 +SWIDTH2 0x0139ee30 - 0x0139ee37 0x0139ee39 +SWIDTH2 0x0139ef30 - 0x0139ef39 +SWIDTH2 0x0139f030 - 0x0139f039 +SWIDTH2 0x0139f130 - 0x0139f139 +SWIDTH2 0x0139f230 - 0x0139f239 +SWIDTH2 0x0139f330 - 0x0139f339 +SWIDTH2 0x0139f430 - 0x0139f439 +SWIDTH2 0x0139f530 - 0x0139f539 +SWIDTH2 0x0139f630 - 0x0139f639 +SWIDTH2 0x0139f730 - 0x0139f739 +SWIDTH2 0x0139f830 - 0x0139f839 +SWIDTH2 0x0139f930 - 0x0139f939 +SWIDTH2 0x0139fa30 - 0x0139fa39 +SWIDTH2 0x0139fb30 - 0x0139fb39 +SWIDTH2 0x0139fc30 - 0x0139fc39 +SWIDTH2 0x0139fd30 - 0x0139fd39 +SWIDTH2 0x0139fe30 - 0x0139fe39 +SWIDTH2 0x02308130 - 0x02308139 +SWIDTH2 0x02308230 - 0x02308239 +SWIDTH2 0x02308330 - 0x02308339 +SWIDTH2 0x02308430 - 0x02308439 +SWIDTH2 0x02308530 - 0x02308539 +SWIDTH2 0x02308630 - 0x02308639 +SWIDTH2 0x02308730 - 0x02308739 +SWIDTH2 0x02308830 - 0x02308839 +SWIDTH2 0x02308930 - 0x02308939 +SWIDTH2 0x02308a30 - 0x02308a39 +SWIDTH2 0x02308b30 - 0x02308b39 +SWIDTH2 0x02308c30 - 0x02308c39 +SWIDTH2 0x02308d30 - 0x02308d39 +SWIDTH2 0x02308e30 - 0x02308e39 +SWIDTH2 0x02308f30 - 0x02308f39 +SWIDTH2 0x02309030 - 0x02309039 +SWIDTH2 0x02309130 - 0x02309139 +SWIDTH2 0x02309230 - 0x02309239 +SWIDTH2 0x02309330 - 0x02309339 +SWIDTH2 0x02309430 - 0x02309439 +SWIDTH2 0x02309530 - 0x02309539 +SWIDTH2 0x02309630 - 0x02309639 +SWIDTH2 0x02309730 - 0x02309739 +SWIDTH2 0x02309830 - 0x02309839 +SWIDTH2 0x02309930 - 0x02309939 +SWIDTH2 0x02309a30 - 0x02309a39 +SWIDTH2 0x02309b30 - 0x02309b39 +SWIDTH2 0x02309c30 - 0x02309c39 +SWIDTH2 0x02309d30 - 0x02309d39 +SWIDTH2 0x02309e30 - 0x02309e39 +SWIDTH2 0x02309f30 - 0x02309f39 +SWIDTH2 0x0230a030 - 0x0230a039 +SWIDTH2 0x0230a130 - 0x0230a139 +SWIDTH2 0x0230a230 - 0x0230a239 +SWIDTH2 0x0230a330 - 0x0230a339 +SWIDTH2 0x0230a430 - 0x0230a439 +SWIDTH2 0x0230a530 - 0x0230a539 +SWIDTH2 0x0230a630 - 0x0230a639 +SWIDTH2 0x0230a730 - 0x0230a739 +SWIDTH2 0x0230a830 - 0x0230a839 +SWIDTH2 0x0230a930 - 0x0230a939 +SWIDTH2 0x0230aa30 - 0x0230aa39 +SWIDTH2 0x0230ab30 - 0x0230ab39 +SWIDTH2 0x0230ac30 - 0x0230ac39 +SWIDTH2 0x0230ad30 - 0x0230ad39 +SWIDTH2 0x0230ae30 - 0x0230ae39 +SWIDTH2 0x0230af30 - 0x0230af39 +SWIDTH2 0x0230b030 - 0x0230b039 +SWIDTH2 0x0230b130 - 0x0230b139 +SWIDTH2 0x0230b230 - 0x0230b239 +SWIDTH2 0x0230b330 - 0x0230b339 +SWIDTH2 0x0230b430 - 0x0230b439 +SWIDTH2 0x0230b530 - 0x0230b539 +SWIDTH2 0x0230b630 - 0x0230b639 +SWIDTH2 0x0230b730 - 0x0230b739 +SWIDTH2 0x0230b830 - 0x0230b839 +SWIDTH2 0x0230b930 - 0x0230b939 +SWIDTH2 0x0230ba30 - 0x0230ba39 +SWIDTH2 0x0230bb30 - 0x0230bb39 +SWIDTH2 0x0230bc30 - 0x0230bc39 +SWIDTH2 0x0230bd30 - 0x0230bd39 +SWIDTH2 0x0230be30 - 0x0230be39 +SWIDTH2 0x0230bf30 - 0x0230bf39 +SWIDTH2 0x0230c030 - 0x0230c039 +SWIDTH2 0x0230c130 - 0x0230c139 +SWIDTH2 0x0230c230 - 0x0230c239 +SWIDTH2 0x0230c330 - 0x0230c339 +SWIDTH2 0x0230c430 - 0x0230c439 +SWIDTH2 0x0230c530 - 0x0230c539 +SWIDTH2 0x0230c630 - 0x0230c639 +SWIDTH2 0x0230c730 - 0x0230c739 +SWIDTH2 0x0230c830 - 0x0230c839 +SWIDTH2 0x0230c930 - 0x0230c939 +SWIDTH2 0x0230ca30 - 0x0230ca39 +SWIDTH2 0x0230cb30 - 0x0230cb39 +SWIDTH2 0x0230cc30 - 0x0230cc39 +SWIDTH2 0x0230cd30 - 0x0230cd39 +SWIDTH2 0x0230ce30 - 0x0230ce39 +SWIDTH2 0x0230cf30 - 0x0230cf39 +SWIDTH2 0x0230d030 - 0x0230d039 +SWIDTH2 0x0230d130 - 0x0230d139 +SWIDTH2 0x0230d230 - 0x0230d239 +SWIDTH2 0x0230d330 - 0x0230d339 +SWIDTH2 0x0230d430 - 0x0230d439 +SWIDTH2 0x0230d530 - 0x0230d539 +SWIDTH2 0x0230d630 - 0x0230d639 +SWIDTH2 0x0230d730 - 0x0230d739 +SWIDTH2 0x0230d830 - 0x0230d839 +SWIDTH2 0x0230d930 - 0x0230d939 +SWIDTH2 0x0230da30 - 0x0230da39 +SWIDTH2 0x0230db30 - 0x0230db39 +SWIDTH2 0x0230dc30 - 0x0230dc39 +SWIDTH2 0x0230dd30 - 0x0230dd39 +SWIDTH2 0x0230de30 - 0x0230de39 +SWIDTH2 0x0230df30 - 0x0230df39 +SWIDTH2 0x0230e030 - 0x0230e039 +SWIDTH2 0x0230e130 - 0x0230e139 +SWIDTH2 0x0230e230 - 0x0230e239 +SWIDTH2 0x0230e330 - 0x0230e339 +SWIDTH2 0x0230e430 - 0x0230e439 +SWIDTH2 0x0230e530 - 0x0230e539 +SWIDTH2 0x0230e630 - 0x0230e639 +SWIDTH2 0x0230e730 - 0x0230e739 +SWIDTH2 0x0230e830 - 0x0230e839 +SWIDTH2 0x0230e930 - 0x0230e939 +SWIDTH2 0x0230ea30 - 0x0230ea39 +SWIDTH2 0x0230eb30 - 0x0230eb39 +SWIDTH2 0x0230ec30 - 0x0230ec39 +SWIDTH2 0x0230ed30 - 0x0230ed39 +SWIDTH2 0x0230ee30 - 0x0230ee39 +SWIDTH2 0x0230ef30 - 0x0230ef39 +SWIDTH2 0x0230f030 - 0x0230f039 +SWIDTH2 0x0230f130 - 0x0230f139 +SWIDTH2 0x0230f230 - 0x0230f239 +SWIDTH2 0x0230f330 - 0x0230f339 +SWIDTH2 0x0230f430 - 0x0230f439 +SWIDTH2 0x0230f530 - 0x0230f539 +SWIDTH2 0x0230f630 - 0x0230f639 +SWIDTH2 0x0230f730 - 0x0230f739 +SWIDTH2 0x0230f830 - 0x0230f839 +SWIDTH2 0x0230f930 - 0x0230f939 +SWIDTH2 0x0230fa30 - 0x0230fa39 +SWIDTH2 0x0230fb30 - 0x0230fb39 +SWIDTH2 0x0230fc30 - 0x0230fc39 +SWIDTH2 0x0230fd30 - 0x0230fd39 +SWIDTH2 0x0230fe30 - 0x0230fe39 +SWIDTH2 0x02318130 - 0x02318139 +SWIDTH2 0x02318230 - 0x02318239 +SWIDTH2 0x02318330 - 0x02318339 +SWIDTH2 0x02318430 - 0x02318439 +SWIDTH2 0x02318530 - 0x02318539 +SWIDTH2 0x02318630 - 0x02318639 +SWIDTH2 0x02318730 - 0x02318739 +SWIDTH2 0x02318830 - 0x02318839 +SWIDTH2 0x02318930 - 0x02318939 +SWIDTH2 0x02318a30 - 0x02318a39 +SWIDTH2 0x02318b30 - 0x02318b39 +SWIDTH2 0x02318c30 - 0x02318c39 +SWIDTH2 0x02318d30 - 0x02318d39 +SWIDTH2 0x02318e30 - 0x02318e39 +SWIDTH2 0x02318f30 - 0x02318f39 +SWIDTH2 0x02319030 - 0x02319039 +SWIDTH2 0x02319130 - 0x02319139 +SWIDTH2 0x02319230 - 0x02319239 +SWIDTH2 0x02319330 - 0x02319339 +SWIDTH2 0x02319430 - 0x02319439 +SWIDTH2 0x02319530 - 0x02319539 +SWIDTH2 0x02319630 - 0x02319639 +SWIDTH2 0x02319730 - 0x02319739 +SWIDTH2 0x02319830 - 0x02319839 +SWIDTH2 0x02319930 - 0x02319939 +SWIDTH2 0x02319a30 - 0x02319a39 +SWIDTH2 0x02319b30 - 0x02319b39 +SWIDTH2 0x02319c30 - 0x02319c39 +SWIDTH2 0x02319d30 - 0x02319d39 +SWIDTH2 0x02319e30 - 0x02319e39 +SWIDTH2 0x02319f30 - 0x02319f39 +SWIDTH2 0x0231a030 - 0x0231a039 +SWIDTH2 0x0231a130 - 0x0231a139 +SWIDTH2 0x0231a230 - 0x0231a239 +SWIDTH2 0x0231a330 - 0x0231a339 +SWIDTH2 0x0231a430 - 0x0231a439 +SWIDTH2 0x0231a530 - 0x0231a539 +SWIDTH2 0x0231a630 - 0x0231a639 +SWIDTH2 0x0231a730 - 0x0231a739 +SWIDTH2 0x0231a830 - 0x0231a839 +SWIDTH2 0x0231a930 - 0x0231a939 +SWIDTH2 0x0231aa30 - 0x0231aa39 +SWIDTH2 0x0231ab30 - 0x0231ab39 +SWIDTH2 0x0231ac30 - 0x0231ac39 +SWIDTH2 0x0231ad30 - 0x0231ad39 +SWIDTH2 0x0231ae30 - 0x0231ae39 +SWIDTH2 0x0231af30 - 0x0231af39 +SWIDTH2 0x0231b030 - 0x0231b039 +SWIDTH2 0x0231b130 - 0x0231b139 +SWIDTH2 0x0231b230 - 0x0231b239 +SWIDTH2 0x0231b330 - 0x0231b339 +SWIDTH2 0x0231b430 - 0x0231b439 +SWIDTH2 0x0231b530 - 0x0231b539 +SWIDTH2 0x0231b630 - 0x0231b639 +SWIDTH2 0x0231b730 - 0x0231b739 +SWIDTH2 0x0231b830 - 0x0231b839 +SWIDTH2 0x0231b930 - 0x0231b939 +SWIDTH2 0x0231ba30 - 0x0231ba39 +SWIDTH2 0x0231bb30 - 0x0231bb39 +SWIDTH2 0x0231bc30 - 0x0231bc39 +SWIDTH2 0x0231bd30 - 0x0231bd39 +SWIDTH2 0x0231be30 - 0x0231be39 +SWIDTH2 0x0231bf30 - 0x0231bf39 +SWIDTH2 0x0231c030 - 0x0231c039 +SWIDTH2 0x0231c130 - 0x0231c139 +SWIDTH2 0x0231c230 - 0x0231c239 +SWIDTH2 0x0231c330 - 0x0231c339 +SWIDTH2 0x0231c430 - 0x0231c439 +SWIDTH2 0x0231c530 - 0x0231c539 +SWIDTH2 0x0231c630 - 0x0231c639 +SWIDTH2 0x0231c730 - 0x0231c739 +SWIDTH2 0x0231c830 - 0x0231c839 +SWIDTH2 0x0231c930 - 0x0231c939 +SWIDTH2 0x0231ca30 - 0x0231ca39 +SWIDTH2 0x0231cb30 - 0x0231cb39 +SWIDTH2 0x0231cc30 - 0x0231cc39 +SWIDTH2 0x0231cd30 - 0x0231cd39 +SWIDTH2 0x0231ce30 - 0x0231ce39 +SWIDTH2 0x0231cf30 - 0x0231cf39 +SWIDTH2 0x0231d030 - 0x0231d039 +SWIDTH2 0x0231d130 - 0x0231d139 +SWIDTH2 0x0231d230 - 0x0231d239 +SWIDTH2 0x0231d330 - 0x0231d339 +SWIDTH2 0x0231d430 - 0x0231d439 +SWIDTH2 0x0231d530 - 0x0231d539 +SWIDTH2 0x0231d630 - 0x0231d639 +SWIDTH2 0x0231d730 - 0x0231d739 +SWIDTH2 0x0231d830 - 0x0231d839 +SWIDTH2 0x0231d930 - 0x0231d939 +SWIDTH2 0x0231da30 - 0x0231da39 +SWIDTH2 0x0231db30 - 0x0231db39 +SWIDTH2 0x0231dc30 - 0x0231dc39 +SWIDTH2 0x0231dd30 - 0x0231dd39 +SWIDTH2 0x0231de30 - 0x0231de39 +SWIDTH2 0x0231df30 - 0x0231df39 +SWIDTH2 0x0231e030 - 0x0231e039 +SWIDTH2 0x0231e130 - 0x0231e139 +SWIDTH2 0x0231e230 - 0x0231e239 +SWIDTH2 0x0231e330 - 0x0231e339 +SWIDTH2 0x0231e430 - 0x0231e439 +SWIDTH2 0x0231e530 - 0x0231e539 +SWIDTH2 0x0231e630 - 0x0231e639 +SWIDTH2 0x0231e730 - 0x0231e739 +SWIDTH2 0x0231e830 - 0x0231e839 +SWIDTH2 0x0231e930 - 0x0231e939 +SWIDTH2 0x0231ea30 - 0x0231ea39 +SWIDTH2 0x0231eb30 - 0x0231eb39 +SWIDTH2 0x0231ec30 - 0x0231ec39 +SWIDTH2 0x0231ed30 - 0x0231ed39 +SWIDTH2 0x0231ee30 - 0x0231ee39 +SWIDTH2 0x0231ef30 - 0x0231ef39 +SWIDTH2 0x0231f030 - 0x0231f039 +SWIDTH2 0x0231f130 - 0x0231f139 +SWIDTH2 0x0231f230 - 0x0231f239 +SWIDTH2 0x0231f330 - 0x0231f339 +SWIDTH2 0x0231f430 - 0x0231f439 +SWIDTH2 0x0231f530 - 0x0231f539 +SWIDTH2 0x0231f630 - 0x0231f639 +SWIDTH2 0x0231f730 - 0x0231f739 +SWIDTH2 0x0231f830 - 0x0231f839 +SWIDTH2 0x0231f930 - 0x0231f939 +SWIDTH2 0x0231fa30 - 0x0231fa39 +SWIDTH2 0x0231fb30 - 0x0231fb39 +SWIDTH2 0x0231fc30 - 0x0231fc39 +SWIDTH2 0x0231fd30 - 0x0231fd39 +SWIDTH2 0x0231fe30 - 0x0231fe39 +SWIDTH2 0x02328130 - 0x02328139 +SWIDTH2 0x02328230 - 0x02328239 +SWIDTH2 0x02328330 - 0x02328339 +SWIDTH2 0x02328430 - 0x02328439 +SWIDTH2 0x02328530 - 0x02328539 +SWIDTH2 0x02328630 - 0x02328639 +SWIDTH2 0x02328730 - 0x02328739 +SWIDTH2 0x02328830 - 0x02328839 +SWIDTH2 0x02328930 - 0x02328939 +SWIDTH2 0x02328a30 - 0x02328a39 +SWIDTH2 0x02328b30 - 0x02328b39 +SWIDTH2 0x02328c30 - 0x02328c39 +SWIDTH2 0x02328d30 - 0x02328d39 +SWIDTH2 0x02328e30 - 0x02328e39 +SWIDTH2 0x02328f30 - 0x02328f39 +SWIDTH2 0x02329030 - 0x02329039 +SWIDTH2 0x02329130 - 0x02329139 +SWIDTH2 0x02329230 - 0x02329239 +SWIDTH2 0x02329330 - 0x02329339 +SWIDTH2 0x02329430 - 0x02329439 +SWIDTH2 0x02329530 - 0x02329539 +SWIDTH2 0x02329630 - 0x02329639 +SWIDTH2 0x02329730 - 0x02329739 +SWIDTH2 0x02329830 - 0x02329839 +SWIDTH2 0x02329930 - 0x02329939 +SWIDTH2 0x02329a30 - 0x02329a39 +SWIDTH2 0x02329b30 - 0x02329b39 +SWIDTH2 0x02329c30 - 0x02329c39 +SWIDTH2 0x02329d30 - 0x02329d39 +SWIDTH2 0x02329e30 - 0x02329e39 +SWIDTH2 0x02329f30 - 0x02329f39 +SWIDTH2 0x0232a030 - 0x0232a039 +SWIDTH2 0x0232a130 - 0x0232a139 +SWIDTH2 0x0232a230 - 0x0232a239 +SWIDTH2 0x0232a330 - 0x0232a339 +SWIDTH2 0x0232a430 - 0x0232a439 +SWIDTH2 0x0232a530 - 0x0232a539 +SWIDTH2 0x0232a630 - 0x0232a639 +SWIDTH2 0x0232a730 - 0x0232a739 +SWIDTH2 0x0232a830 - 0x0232a839 +SWIDTH2 0x0232a930 - 0x0232a939 +SWIDTH2 0x0232aa30 - 0x0232aa39 +SWIDTH2 0x0232ab30 - 0x0232ab39 +SWIDTH2 0x0232ac30 - 0x0232ac39 +SWIDTH2 0x0232ad30 - 0x0232ad39 +SWIDTH2 0x0232ae30 - 0x0232ae39 +SWIDTH2 0x0232af30 - 0x0232af39 +SWIDTH2 0x0232b030 - 0x0232b039 +SWIDTH2 0x0232b130 - 0x0232b139 +SWIDTH2 0x0232b230 - 0x0232b239 +SWIDTH2 0x0232b330 - 0x0232b339 +SWIDTH2 0x0232b430 - 0x0232b439 +SWIDTH2 0x0232b530 - 0x0232b539 +SWIDTH2 0x0232b630 - 0x0232b639 +SWIDTH2 0x0232b730 - 0x0232b739 +SWIDTH2 0x0232b830 - 0x0232b839 +SWIDTH2 0x0232b930 - 0x0232b939 +SWIDTH2 0x0232ba30 - 0x0232ba39 +SWIDTH2 0x0232bb30 - 0x0232bb39 +SWIDTH2 0x0232bc30 - 0x0232bc39 +SWIDTH2 0x0232bd30 - 0x0232bd39 +SWIDTH2 0x0232be30 - 0x0232be39 +SWIDTH2 0x0232bf30 - 0x0232bf39 +SWIDTH2 0x0232c030 - 0x0232c039 +SWIDTH2 0x0232c130 - 0x0232c139 +SWIDTH2 0x0232c230 - 0x0232c239 +SWIDTH2 0x0232c330 - 0x0232c339 +SWIDTH2 0x0232c430 - 0x0232c439 +SWIDTH2 0x0232c530 - 0x0232c539 +SWIDTH2 0x0232c630 - 0x0232c639 +SWIDTH2 0x0232c730 - 0x0232c739 +SWIDTH2 0x0232c830 - 0x0232c839 +SWIDTH2 0x0232c930 - 0x0232c939 +SWIDTH2 0x0232ca30 - 0x0232ca39 +SWIDTH2 0x0232cb30 - 0x0232cb39 +SWIDTH2 0x0232cc30 - 0x0232cc39 +SWIDTH2 0x0232cd30 - 0x0232cd39 +SWIDTH2 0x0232ce30 - 0x0232ce39 +SWIDTH2 0x0232cf30 - 0x0232cf39 +SWIDTH2 0x0232d030 - 0x0232d039 +SWIDTH2 0x0232d130 - 0x0232d139 +SWIDTH2 0x0232d230 - 0x0232d239 +SWIDTH2 0x0232d330 - 0x0232d339 +SWIDTH2 0x0232d430 - 0x0232d439 +SWIDTH2 0x0232d530 - 0x0232d539 +SWIDTH2 0x0232d630 - 0x0232d639 +SWIDTH2 0x0232d730 - 0x0232d739 +SWIDTH2 0x0232d830 - 0x0232d839 +SWIDTH2 0x0232d930 - 0x0232d939 +SWIDTH2 0x0232da30 - 0x0232da39 +SWIDTH2 0x0232db30 - 0x0232db39 +SWIDTH2 0x0232dc30 - 0x0232dc39 +SWIDTH2 0x0232dd30 - 0x0232dd39 +SWIDTH2 0x0232de30 - 0x0232de39 +SWIDTH2 0x0232df30 - 0x0232df39 +SWIDTH2 0x0232e030 - 0x0232e039 +SWIDTH2 0x0232e130 - 0x0232e139 +SWIDTH2 0x0232e230 - 0x0232e239 +SWIDTH2 0x0232e330 - 0x0232e339 +SWIDTH2 0x0232e430 - 0x0232e439 +SWIDTH2 0x0232e530 - 0x0232e539 +SWIDTH2 0x0232e630 - 0x0232e639 +SWIDTH2 0x0232e730 - 0x0232e739 +SWIDTH2 0x0232e830 - 0x0232e839 +SWIDTH2 0x0232e930 - 0x0232e939 +SWIDTH2 0x0232ea30 - 0x0232ea39 +SWIDTH2 0x0232eb30 - 0x0232eb39 +SWIDTH2 0x0232ec30 - 0x0232ec39 +SWIDTH2 0x0232ed30 - 0x0232ed39 +SWIDTH2 0x0232ee30 - 0x0232ee39 +SWIDTH2 0x0232ef30 - 0x0232ef39 +SWIDTH2 0x0232f030 - 0x0232f039 +SWIDTH2 0x0232f130 - 0x0232f139 +SWIDTH2 0x0232f230 - 0x0232f239 +SWIDTH2 0x0232f330 - 0x0232f339 +SWIDTH2 0x0232f430 - 0x0232f439 +SWIDTH2 0x0232f530 - 0x0232f539 +SWIDTH2 0x0232f630 - 0x0232f639 +SWIDTH2 0x0232f730 - 0x0232f739 +SWIDTH2 0x0232f830 - 0x0232f839 +SWIDTH2 0x0232f930 - 0x0232f939 +SWIDTH2 0x0232fa30 - 0x0232fa39 +SWIDTH2 0x0232fb30 - 0x0232fb39 +SWIDTH2 0x0232fc30 - 0x0232fc39 +SWIDTH2 0x0232fd30 - 0x0232fd39 +SWIDTH2 0x0232fe30 - 0x0232fe39 +SWIDTH2 0x02338130 - 0x02338139 +SWIDTH2 0x02338230 - 0x02338239 +SWIDTH2 0x02338330 - 0x02338339 +SWIDTH2 0x02338430 - 0x02338439 +SWIDTH2 0x02338530 - 0x02338539 +SWIDTH2 0x02338630 - 0x02338639 +SWIDTH2 0x02338730 - 0x02338739 +SWIDTH2 0x02338830 - 0x02338839 +SWIDTH2 0x02338930 - 0x02338939 +SWIDTH2 0x02338a30 - 0x02338a39 +SWIDTH2 0x02338b30 - 0x02338b39 +SWIDTH2 0x02338c30 - 0x02338c39 +SWIDTH2 0x02338d30 - 0x02338d39 +SWIDTH2 0x02338e30 - 0x02338e39 +SWIDTH2 0x02338f30 - 0x02338f39 +SWIDTH2 0x02339030 - 0x02339039 +SWIDTH2 0x02339130 - 0x02339139 +SWIDTH2 0x02339230 - 0x02339239 +SWIDTH2 0x02339330 - 0x02339339 +SWIDTH2 0x02339430 - 0x02339439 +SWIDTH2 0x02339530 - 0x02339539 +SWIDTH2 0x02339630 - 0x02339639 +SWIDTH2 0x02339730 - 0x02339739 +SWIDTH2 0x02339830 - 0x02339839 +SWIDTH2 0x02339930 - 0x02339939 +SWIDTH2 0x02339a30 - 0x02339a39 +SWIDTH2 0x02339b30 - 0x02339b39 +SWIDTH2 0x02339c30 - 0x02339c39 +SWIDTH2 0x02339d30 - 0x02339d39 +SWIDTH2 0x02339e30 - 0x02339e39 +SWIDTH2 0x02339f30 - 0x02339f39 +SWIDTH2 0x0233a030 - 0x0233a039 +SWIDTH2 0x0233a130 - 0x0233a139 +SWIDTH2 0x0233a230 - 0x0233a239 +SWIDTH2 0x0233a330 - 0x0233a339 +SWIDTH2 0x0233a430 - 0x0233a439 +SWIDTH2 0x0233a530 - 0x0233a539 +SWIDTH2 0x0233a630 - 0x0233a639 +SWIDTH2 0x0233a730 - 0x0233a739 +SWIDTH2 0x0233a830 - 0x0233a839 +SWIDTH2 0x0233a930 - 0x0233a939 +SWIDTH2 0x0233aa30 - 0x0233aa39 +SWIDTH2 0x0233ab30 - 0x0233ab39 +SWIDTH2 0x0233ac30 - 0x0233ac39 +SWIDTH2 0x0233ad30 - 0x0233ad39 +SWIDTH2 0x0233ae30 - 0x0233ae39 +SWIDTH2 0x0233af30 - 0x0233af39 +SWIDTH2 0x0233b030 - 0x0233b039 +SWIDTH2 0x0233b130 - 0x0233b139 +SWIDTH2 0x0233b230 - 0x0233b239 +SWIDTH2 0x0233b330 - 0x0233b339 +SWIDTH2 0x0233b430 - 0x0233b439 +SWIDTH2 0x0233b530 - 0x0233b539 +SWIDTH2 0x0233b630 - 0x0233b639 +SWIDTH2 0x0233b730 - 0x0233b739 +SWIDTH2 0x0233b830 - 0x0233b839 +SWIDTH2 0x0233b930 - 0x0233b939 +SWIDTH2 0x0233ba30 - 0x0233ba39 +SWIDTH2 0x0233bb30 - 0x0233bb39 +SWIDTH2 0x0233bc30 - 0x0233bc39 +SWIDTH2 0x0233bd30 - 0x0233bd39 +SWIDTH2 0x0233be30 - 0x0233be39 +SWIDTH2 0x0233bf30 - 0x0233bf39 +SWIDTH2 0x0233c030 - 0x0233c039 +SWIDTH2 0x0233c130 - 0x0233c139 +SWIDTH2 0x0233c230 - 0x0233c239 +SWIDTH2 0x0233c330 - 0x0233c339 +SWIDTH2 0x0233c430 - 0x0233c439 +SWIDTH2 0x0233c530 - 0x0233c539 +SWIDTH2 0x0233c630 - 0x0233c639 +SWIDTH2 0x0233c730 - 0x0233c739 +SWIDTH2 0x0233c830 - 0x0233c839 +SWIDTH2 0x0233c930 - 0x0233c939 +SWIDTH2 0x0233ca30 - 0x0233ca39 +SWIDTH2 0x0233cb30 - 0x0233cb39 +SWIDTH2 0x0233cc30 - 0x0233cc39 +SWIDTH2 0x0233cd30 - 0x0233cd39 +SWIDTH2 0x0233ce30 - 0x0233ce39 +SWIDTH2 0x0233cf30 - 0x0233cf39 +SWIDTH2 0x0233d030 - 0x0233d039 +SWIDTH2 0x0233d130 - 0x0233d139 +SWIDTH2 0x0233d230 - 0x0233d239 +SWIDTH2 0x0233d330 - 0x0233d339 +SWIDTH2 0x0233d430 - 0x0233d439 +SWIDTH2 0x0233d530 - 0x0233d539 +SWIDTH2 0x0233d630 - 0x0233d639 +SWIDTH2 0x0233d730 - 0x0233d739 +SWIDTH2 0x0233d830 - 0x0233d839 +SWIDTH2 0x0233d930 - 0x0233d939 +SWIDTH2 0x0233da30 - 0x0233da39 +SWIDTH2 0x0233db30 - 0x0233db39 +SWIDTH2 0x0233dc30 - 0x0233dc39 +SWIDTH2 0x0233dd30 - 0x0233dd39 +SWIDTH2 0x0233de30 - 0x0233de39 +SWIDTH2 0x0233df30 - 0x0233df39 +SWIDTH2 0x0233e030 - 0x0233e039 +SWIDTH2 0x0233e130 - 0x0233e139 +SWIDTH2 0x0233e230 - 0x0233e239 +SWIDTH2 0x0233e330 - 0x0233e339 +SWIDTH2 0x0233e430 - 0x0233e439 +SWIDTH2 0x0233e530 - 0x0233e539 +SWIDTH2 0x0233e630 - 0x0233e639 +SWIDTH2 0x0233e730 - 0x0233e739 +SWIDTH2 0x0233e830 - 0x0233e839 +SWIDTH2 0x0233e930 - 0x0233e939 +SWIDTH2 0x0233ea30 - 0x0233ea39 +SWIDTH2 0x0233eb30 - 0x0233eb39 +SWIDTH2 0x0233ec30 - 0x0233ec39 +SWIDTH2 0x0233ed30 - 0x0233ed39 +SWIDTH2 0x0233ee30 - 0x0233ee39 +SWIDTH2 0x0233ef30 - 0x0233ef39 +SWIDTH2 0x0233f030 - 0x0233f039 +SWIDTH2 0x0233f130 - 0x0233f139 +SWIDTH2 0x0233f230 - 0x0233f239 +SWIDTH2 0x0233f330 - 0x0233f339 +SWIDTH2 0x0233f430 - 0x0233f439 +SWIDTH2 0x0233f530 - 0x0233f539 +SWIDTH2 0x0233f630 - 0x0233f639 +SWIDTH2 0x0233f730 - 0x0233f739 +SWIDTH2 0x0233f830 - 0x0233f839 +SWIDTH2 0x0233f930 - 0x0233f939 +SWIDTH2 0x0233fa30 - 0x0233fa39 +SWIDTH2 0x0233fb30 - 0x0233fb39 +SWIDTH2 0x0233fc30 - 0x0233fc39 +SWIDTH2 0x0233fd30 - 0x0233fd39 +SWIDTH2 0x0233fe30 - 0x0233fe39 +SWIDTH2 0x02348130 - 0x02348139 +SWIDTH2 0x02348230 - 0x02348239 +SWIDTH2 0x02348330 - 0x02348339 +SWIDTH2 0x02348430 - 0x02348439 +SWIDTH2 0x02348530 - 0x02348539 +SWIDTH2 0x02348630 - 0x02348639 +SWIDTH2 0x02348730 - 0x02348739 +SWIDTH2 0x02348830 - 0x02348839 +SWIDTH2 0x02348930 - 0x02348939 +SWIDTH2 0x02348a30 - 0x02348a39 +SWIDTH2 0x02348b30 - 0x02348b39 +SWIDTH2 0x02348c30 - 0x02348c39 +SWIDTH2 0x02348d30 - 0x02348d39 +SWIDTH2 0x02348e30 - 0x02348e39 +SWIDTH2 0x02348f30 - 0x02348f39 +SWIDTH2 0x02349030 - 0x02349039 +SWIDTH2 0x02349130 - 0x02349139 +SWIDTH2 0x02349230 - 0x02349239 +SWIDTH2 0x02349330 - 0x02349339 +SWIDTH2 0x02349430 - 0x02349439 +SWIDTH2 0x02349530 - 0x02349539 +SWIDTH2 0x02349630 - 0x02349639 +SWIDTH2 0x02349730 - 0x02349739 +SWIDTH2 0x02349830 - 0x02349839 +SWIDTH2 0x02349930 - 0x02349939 +SWIDTH2 0x02349a30 - 0x02349a39 +SWIDTH2 0x02349b30 - 0x02349b39 +SWIDTH2 0x02349c30 - 0x02349c39 +SWIDTH2 0x02349d30 - 0x02349d39 +SWIDTH2 0x02349e30 - 0x02349e39 +SWIDTH2 0x02349f30 - 0x02349f39 +SWIDTH2 0x0234a030 - 0x0234a039 +SWIDTH2 0x0234a130 - 0x0234a139 +SWIDTH2 0x0234a230 - 0x0234a239 +SWIDTH2 0x0234a330 - 0x0234a339 +SWIDTH2 0x0234a430 - 0x0234a439 +SWIDTH2 0x0234a530 - 0x0234a539 +SWIDTH2 0x0234a630 - 0x0234a639 +SWIDTH2 0x0234a730 - 0x0234a739 +SWIDTH2 0x0234a830 - 0x0234a839 +SWIDTH2 0x0234a930 - 0x0234a939 +SWIDTH2 0x0234aa30 - 0x0234aa39 +SWIDTH2 0x0234ab30 - 0x0234ab39 +SWIDTH2 0x0234ac30 - 0x0234ac39 +SWIDTH2 0x0234ad30 - 0x0234ad39 +SWIDTH2 0x0234ae30 - 0x0234ae39 +SWIDTH2 0x0234af30 - 0x0234af39 +SWIDTH2 0x0234b030 - 0x0234b039 +SWIDTH2 0x0234b130 - 0x0234b139 +SWIDTH2 0x0234b230 - 0x0234b239 +SWIDTH2 0x0234b330 - 0x0234b339 +SWIDTH2 0x0234b430 - 0x0234b439 +SWIDTH2 0x0234b530 - 0x0234b539 +SWIDTH2 0x0234b630 - 0x0234b639 +SWIDTH2 0x0234b730 - 0x0234b739 +SWIDTH2 0x0234b830 - 0x0234b839 +SWIDTH2 0x0234b930 - 0x0234b939 +SWIDTH2 0x0234ba30 - 0x0234ba39 +SWIDTH2 0x0234bb30 - 0x0234bb39 +SWIDTH2 0x0234bc30 - 0x0234bc39 +SWIDTH2 0x0234bd30 - 0x0234bd39 +SWIDTH2 0x0234be30 - 0x0234be39 +SWIDTH2 0x0234bf30 - 0x0234bf39 +SWIDTH2 0x0234c030 - 0x0234c039 +SWIDTH2 0x0234c130 - 0x0234c139 +SWIDTH2 0x0234c230 - 0x0234c239 +SWIDTH2 0x0234c330 - 0x0234c339 +SWIDTH2 0x0234c430 - 0x0234c439 +SWIDTH2 0x0234c530 - 0x0234c539 +SWIDTH2 0x0234c630 - 0x0234c639 +SWIDTH2 0x0234c730 - 0x0234c739 +SWIDTH2 0x0234c830 - 0x0234c839 +SWIDTH2 0x0234c930 - 0x0234c939 +SWIDTH2 0x0234ca30 - 0x0234ca39 +SWIDTH2 0x0234cb30 - 0x0234cb39 +SWIDTH2 0x0234cc30 - 0x0234cc39 +SWIDTH2 0x0234cd30 - 0x0234cd39 +SWIDTH2 0x0234ce30 - 0x0234ce39 +SWIDTH2 0x0234cf30 - 0x0234cf39 +SWIDTH2 0x0234d030 - 0x0234d039 +SWIDTH2 0x0234d130 - 0x0234d139 +SWIDTH2 0x0234d230 - 0x0234d239 +SWIDTH2 0x0234d330 - 0x0234d339 +SWIDTH2 0x0234d430 - 0x0234d439 +SWIDTH2 0x0234d530 - 0x0234d539 +SWIDTH2 0x0234d630 - 0x0234d639 +SWIDTH2 0x0234d730 - 0x0234d739 +SWIDTH2 0x0234d830 - 0x0234d839 +SWIDTH2 0x0234d930 - 0x0234d939 +SWIDTH2 0x0234da30 - 0x0234da39 +SWIDTH2 0x0234db30 - 0x0234db39 +SWIDTH2 0x0234dc30 - 0x0234dc39 +SWIDTH2 0x0234dd30 - 0x0234dd39 +SWIDTH2 0x0234de30 - 0x0234de39 +SWIDTH2 0x0234df30 - 0x0234df39 +SWIDTH2 0x0234e030 - 0x0234e039 +SWIDTH2 0x0234e130 - 0x0234e139 +SWIDTH2 0x0234e230 - 0x0234e239 +SWIDTH2 0x0234e330 - 0x0234e339 +SWIDTH2 0x0234e430 - 0x0234e439 +SWIDTH2 0x0234e530 - 0x0234e539 +SWIDTH2 0x0234e630 - 0x0234e639 +SWIDTH2 0x0234e730 - 0x0234e739 +SWIDTH2 0x0234e830 - 0x0234e839 +SWIDTH2 0x0234e930 - 0x0234e939 +SWIDTH2 0x0234ea30 - 0x0234ea39 +SWIDTH2 0x0234eb30 - 0x0234eb39 +SWIDTH2 0x0234ec30 - 0x0234ec39 +SWIDTH2 0x0234ed30 - 0x0234ed39 +SWIDTH2 0x0234ee30 - 0x0234ee39 +SWIDTH2 0x0234ef30 - 0x0234ef39 +SWIDTH2 0x0234f030 - 0x0234f039 +SWIDTH2 0x0234f130 - 0x0234f139 +SWIDTH2 0x0234f230 - 0x0234f239 +SWIDTH2 0x0234f330 - 0x0234f339 +SWIDTH2 0x0234f430 - 0x0234f439 +SWIDTH2 0x0234f530 - 0x0234f539 +SWIDTH2 0x0234f630 - 0x0234f639 +SWIDTH2 0x0234f730 - 0x0234f739 +SWIDTH2 0x0234f830 - 0x0234f839 +SWIDTH2 0x0234f930 - 0x0234f939 +SWIDTH2 0x0234fa30 - 0x0234fa39 +SWIDTH2 0x0234fb30 - 0x0234fb39 +SWIDTH2 0x0234fc30 - 0x0234fc39 +SWIDTH2 0x0234fd30 - 0x0234fd39 +SWIDTH2 0x0234fe30 - 0x0234fe39 +SWIDTH2 0x02358130 - 0x02358139 +SWIDTH2 0x02358230 - 0x02358239 +SWIDTH2 0x02358330 - 0x02358339 +SWIDTH2 0x02358430 - 0x02358439 +SWIDTH2 0x02358530 - 0x02358539 +SWIDTH2 0x02358630 - 0x02358639 +SWIDTH2 0x02358730 - 0x02358738 +SWIDTH2 0x02359833 - 0x02359839 +SWIDTH2 0x02359930 - 0x02359939 +SWIDTH2 0x02359a30 - 0x02359a39 +SWIDTH2 0x02359b30 - 0x02359b39 +SWIDTH2 0x02359c30 - 0x02359c39 +SWIDTH2 0x02359d30 - 0x02359d39 +SWIDTH2 0x02359e30 - 0x02359e39 +SWIDTH2 0x02359f30 - 0x02359f39 +SWIDTH2 0x0235a030 - 0x0235a039 +SWIDTH2 0x0235a130 - 0x0235a139 +SWIDTH2 0x0235a230 - 0x0235a239 +SWIDTH2 0x0235a330 - 0x0235a339 +SWIDTH2 0x0235a430 - 0x0235a439 +SWIDTH2 0x0235a530 - 0x0235a539 +SWIDTH2 0x0235a630 - 0x0235a639 +SWIDTH2 0x0235a730 - 0x0235a739 +SWIDTH2 0x0235a830 - 0x0235a839 +SWIDTH2 0x0235a930 - 0x0235a939 +SWIDTH2 0x0235aa30 - 0x0235aa39 +SWIDTH2 0x0235ab30 - 0x0235ab39 +SWIDTH2 0x0235ac30 - 0x0235ac39 +SWIDTH2 0x0235ad30 - 0x0235ad39 +SWIDTH2 0x0235ae30 - 0x0235ae39 +SWIDTH2 0x0235af30 - 0x0235af39 +SWIDTH2 0x0235b030 - 0x0235b039 +SWIDTH2 0x0235b130 - 0x0235b139 +SWIDTH2 0x0235b230 - 0x0235b239 +SWIDTH2 0x0235b330 - 0x0235b339 +SWIDTH2 0x0235b430 - 0x0235b439 +SWIDTH2 0x0235b530 - 0x0235b539 +SWIDTH2 0x0235b630 - 0x0235b639 +SWIDTH2 0x0235b730 - 0x0235b739 +SWIDTH2 0x0235b830 - 0x0235b839 +SWIDTH2 0x0235b930 - 0x0235b939 +SWIDTH2 0x0235ba30 - 0x0235ba39 +SWIDTH2 0x0235bb30 - 0x0235bb39 +SWIDTH2 0x0235bc30 - 0x0235bc39 +SWIDTH2 0x0235bd30 - 0x0235bd39 +SWIDTH2 0x0235be30 - 0x0235be39 +SWIDTH2 0x0235bf30 - 0x0235bf39 +SWIDTH2 0x0235c030 - 0x0235c039 +SWIDTH2 0x0235c130 - 0x0235c139 +SWIDTH2 0x0235c230 - 0x0235c239 +SWIDTH2 0x0235c330 - 0x0235c339 +SWIDTH2 0x0235c430 - 0x0235c439 +SWIDTH2 0x0235c530 - 0x0235c539 +SWIDTH2 0x0235c630 - 0x0235c639 +SWIDTH2 0x0235c730 - 0x0235c739 +SWIDTH2 0x0235c830 - 0x0235c839 +SWIDTH2 0x0235c930 - 0x0235c939 +SWIDTH2 0x0235ca30 - 0x0235ca39 +SWIDTH2 0x0235cb30 - 0x0235cb39 +SWIDTH2 0x0235cc30 - 0x0235cc39 +SWIDTH2 0x0235cd30 - 0x0235cd39 +SWIDTH2 0x0235ce30 - 0x0235ce39 +SWIDTH2 0x0235cf30 - 0x0235cf39 +SWIDTH2 0x0235d030 - 0x0235d039 +SWIDTH2 0x0235d130 - 0x0235d139 +SWIDTH2 0x0235d230 - 0x0235d239 +SWIDTH2 0x0235d330 - 0x0235d339 +SWIDTH2 0x0235d430 - 0x0235d439 +SWIDTH2 0x0235d530 - 0x0235d539 +SWIDTH2 0x0235d630 - 0x0235d639 +SWIDTH2 0x0235d730 - 0x0235d739 +SWIDTH2 0x0235d830 - 0x0235d839 +SWIDTH2 0x0235d930 - 0x0235d939 +SWIDTH2 0x0235da30 - 0x0235da39 +SWIDTH2 0x0235db30 - 0x0235db39 +SWIDTH2 0x0235dc30 - 0x0235dc39 +SWIDTH2 0x0235dd30 - 0x0235dd39 +SWIDTH2 0x0235de30 - 0x0235de39 +SWIDTH2 0x0235df30 - 0x0235df39 +SWIDTH2 0x0235e030 - 0x0235e039 +SWIDTH2 0x0235e130 - 0x0235e139 +SWIDTH2 0x0235e230 - 0x0235e239 +SWIDTH2 0x0235e330 - 0x0235e339 +SWIDTH2 0x0235e430 - 0x0235e439 +SWIDTH2 0x0235e530 - 0x0235e539 +SWIDTH2 0x0235e630 - 0x0235e639 +SWIDTH2 0x0235e730 - 0x0235e739 +SWIDTH2 0x0235e830 - 0x0235e839 +SWIDTH2 0x0235e930 - 0x0235e939 +SWIDTH2 0x0235ea30 - 0x0235ea39 +SWIDTH2 0x0235eb30 - 0x0235eb39 +SWIDTH2 0x0235ec30 - 0x0235ec39 +SWIDTH2 0x0235ed30 - 0x0235ed39 +SWIDTH2 0x0235ee30 - 0x0235ee39 +SWIDTH2 0x0235ef30 - 0x0235ef39 +SWIDTH2 0x0235f030 - 0x0235f039 +SWIDTH2 0x0235f130 - 0x0235f139 +SWIDTH2 0x0235f230 - 0x0235f239 +SWIDTH2 0x0235f330 - 0x0235f339 +SWIDTH2 0x0235f430 - 0x0235f439 +SWIDTH2 0x0235f530 - 0x0235f539 +SWIDTH2 0x0235f630 - 0x0235f639 +SWIDTH2 0x0235f730 - 0x0235f739 +SWIDTH2 0x0235f830 - 0x0235f839 +SWIDTH2 0x0235f930 - 0x0235f939 +SWIDTH2 0x0235fa30 - 0x0235fa39 +SWIDTH2 0x0235fb30 - 0x0235fb39 +SWIDTH2 0x0235fc30 - 0x0235fc39 +SWIDTH2 0x0235fd30 - 0x0235fd39 +SWIDTH2 0x0235fe30 - 0x0235fe39 +SWIDTH2 0x02368130 - 0x02368139 +SWIDTH2 0x02368230 - 0x02368239 +SWIDTH2 0x02368330 - 0x02368339 +SWIDTH2 0x02368430 - 0x02368439 +SWIDTH2 0x02368530 - 0x02368539 +SWIDTH2 0x02368630 - 0x02368639 +SWIDTH2 0x02368730 - 0x02368739 +SWIDTH2 0x02368830 - 0x02368839 +SWIDTH2 0x02368930 - 0x02368939 +SWIDTH2 0x02368a30 - 0x02368a39 +SWIDTH2 0x02368b30 - 0x02368b39 +SWIDTH2 0x02368c30 - 0x02368c39 +SWIDTH2 0x02368d30 - 0x02368d39 +SWIDTH2 0x02368e30 - 0x02368e37 +SWIDTH2 0x02368f31 - 0x02368f39 +SWIDTH2 0x02369030 - 0x02369039 +SWIDTH2 0x02369130 - 0x02369139 +SWIDTH2 0x02369230 - 0x02369239 +SWIDTH2 0x02369330 - 0x02369339 +SWIDTH2 0x02369430 - 0x02369435 +SWIDTH2 0x0237cf35 - 0x0237cf39 +SWIDTH2 0x0237d030 - 0x0237d039 +SWIDTH2 0x0237d130 - 0x0237d139 +SWIDTH2 0x0237d230 - 0x0237d239 +SWIDTH2 0x0237d330 - 0x0237d339 +SWIDTH2 0x0237d430 - 0x0237d439 +SWIDTH2 0x0237d530 - 0x0237d539 +SWIDTH2 0x0237d630 - 0x0237d639 +SWIDTH2 0x0237d730 - 0x0237d739 +SWIDTH2 0x0237d830 - 0x0237d839 +SWIDTH2 0x0237d930 - 0x0237d939 +SWIDTH2 0x0237da30 - 0x0237da39 +SWIDTH2 0x0237db30 - 0x0237db39 +SWIDTH2 0x0237dc30 - 0x0237dc39 +SWIDTH2 0x0237dd30 - 0x0237dd39 +SWIDTH2 0x0237de30 - 0x0237de39 +SWIDTH2 0x0237df30 - 0x0237df39 +SWIDTH2 0x0237e030 - 0x0237e039 +SWIDTH2 0x0237e130 - 0x0237e139 +SWIDTH2 0x0237e230 - 0x0237e239 +SWIDTH2 0x0237e330 - 0x0237e339 +SWIDTH2 0x0237e430 - 0x0237e439 +SWIDTH2 0x0237e530 - 0x0237e539 +SWIDTH2 0x0237e630 - 0x0237e639 +SWIDTH2 0x0237e730 - 0x0237e739 +SWIDTH2 0x0237e830 - 0x0237e839 +SWIDTH2 0x0237e930 - 0x0237e939 +SWIDTH2 0x0237ea30 - 0x0237ea39 +SWIDTH2 0x0237eb30 - 0x0237eb39 +SWIDTH2 0x0237ec30 - 0x0237ec39 +SWIDTH2 0x0237ed30 - 0x0237ed39 +SWIDTH2 0x0237ee30 - 0x0237ee39 +SWIDTH2 0x0237ef30 - 0x0237ef39 +SWIDTH2 0x0237f030 - 0x0237f039 +SWIDTH2 0x0237f130 - 0x0237f139 +SWIDTH2 0x0237f230 - 0x0237f239 +SWIDTH2 0x0237f330 - 0x0237f339 +SWIDTH2 0x0237f430 - 0x0237f439 +SWIDTH2 0x0237f530 - 0x0237f539 +SWIDTH2 0x0237f630 - 0x0237f639 +SWIDTH2 0x0237f730 - 0x0237f739 +SWIDTH2 0x0237f830 - 0x0237f839 +SWIDTH2 0x0237f930 - 0x0237f939 +SWIDTH2 0x0237fa30 - 0x0237fa39 +SWIDTH2 0x0237fb30 - 0x0237fb39 +SWIDTH2 0x0237fc30 - 0x0237fc39 +SWIDTH2 0x0237fd30 - 0x0237fd39 +SWIDTH2 0x0237fe30 - 0x0237fe39 +SWIDTH2 0x02388130 - 0x02388139 +SWIDTH2 0x02388230 - 0x02388239 +SWIDTH2 0x02388330 - 0x02388339 +SWIDTH2 0x02388430 - 0x02388439 +SWIDTH2 0x02388530 - 0x02388539 +SWIDTH2 0x02388630 - 0x02388639 +SWIDTH2 0x02388730 - 0x02388739 +SWIDTH2 0x02388830 - 0x02388839 +SWIDTH2 0x02388930 - 0x02388939 +SWIDTH2 0x02388a30 - 0x02388a39 +SWIDTH2 0x02388b30 - 0x02388b39 +SWIDTH2 0x02388c30 - 0x02388c39 +SWIDTH2 0x02388d30 - 0x02388d39 +SWIDTH2 0x02388e30 - 0x02388e39 +SWIDTH2 0x02388f30 - 0x02388f39 +SWIDTH2 0x02389030 - 0x02389039 +SWIDTH2 0x02389130 - 0x02389139 +SWIDTH2 0x02389230 - 0x02389239 +SWIDTH2 0x02389330 - 0x02389339 +SWIDTH2 0x02389430 - 0x02389439 +SWIDTH2 0x02389530 - 0x02389539 +SWIDTH2 0x02389630 - 0x02389639 +SWIDTH2 0x02389730 - 0x02389739 +SWIDTH2 0x02389830 - 0x02389839 +SWIDTH2 0x02389930 - 0x02389939 +SWIDTH2 0x02389a30 - 0x02389a39 +SWIDTH2 0x02389b30 - 0x02389b39 +SWIDTH2 0x02389c30 - 0x02389c39 +SWIDTH2 0x02389d30 - 0x02389d39 +SWIDTH2 0x02389e30 - 0x02389e39 +SWIDTH2 0x02389f30 - 0x02389f39 +SWIDTH2 0x0238a030 - 0x0238a039 +SWIDTH2 0x0238a130 - 0x0238a139 +SWIDTH2 0x0238a230 - 0x0238a239 +SWIDTH2 0x0238a330 - 0x0238a339 +SWIDTH2 0x0238a430 - 0x0238a439 +SWIDTH2 0x0238a530 - 0x0238a539 +SWIDTH2 0x0238a630 - 0x0238a639 +SWIDTH2 0x0238a730 - 0x0238a739 +SWIDTH2 0x0238a830 - 0x0238a839 +SWIDTH2 0x0238a930 - 0x0238a939 +SWIDTH2 0x0238aa30 - 0x0238aa39 +SWIDTH2 0x0238ab30 - 0x0238ab39 +SWIDTH2 0x0238ac30 - 0x0238ac39 +SWIDTH2 0x0238ad30 - 0x0238ad39 +SWIDTH2 0x0238ae30 - 0x0238ae39 +SWIDTH2 0x0238af30 - 0x0238af39 +SWIDTH2 0x0238b030 - 0x0238b039 +SWIDTH2 0x0238b130 - 0x0238b139 +SWIDTH2 0x0238b230 - 0x0238b239 +SWIDTH2 0x0238b330 - 0x0238b339 +SWIDTH2 0x0238b430 - 0x0238b439 +SWIDTH2 0x0238b530 - 0x0238b539 +SWIDTH2 0x0238b630 - 0x0238b639 +SWIDTH2 0x0238b730 - 0x0238b739 +SWIDTH2 0x0238b830 - 0x0238b839 +SWIDTH2 0x0238b930 - 0x0238b939 +SWIDTH2 0x0238ba30 - 0x0238ba39 +SWIDTH2 0x0238bb30 - 0x0238bb39 +SWIDTH2 0x0238bc30 - 0x0238bc39 +SWIDTH2 0x0238bd30 - 0x0238bd39 +SWIDTH2 0x0238be30 - 0x0238be39 +SWIDTH2 0x0238bf30 - 0x0238bf39 +SWIDTH2 0x0238c030 - 0x0238c039 +SWIDTH2 0x0238c130 - 0x0238c139 +SWIDTH2 0x0238c230 - 0x0238c239 +SWIDTH2 0x0238c330 - 0x0238c339 +SWIDTH2 0x0238c430 - 0x0238c439 +SWIDTH2 0x0238c530 - 0x0238c539 +SWIDTH2 0x0238c630 - 0x0238c639 +SWIDTH2 0x0238c730 - 0x0238c739 +SWIDTH2 0x0238c830 - 0x0238c839 +SWIDTH2 0x0238c930 - 0x0238c939 +SWIDTH2 0x0238ca30 - 0x0238ca39 +SWIDTH2 0x0238cb30 - 0x0238cb39 +SWIDTH2 0x0238cc30 - 0x0238cc39 +SWIDTH2 0x0238cd30 - 0x0238cd39 +SWIDTH2 0x0238ce30 - 0x0238ce39 +SWIDTH2 0x0238cf30 - 0x0238cf39 +SWIDTH2 0x0238d030 - 0x0238d039 +SWIDTH2 0x0238d130 - 0x0238d139 +SWIDTH2 0x0238d230 - 0x0238d239 +SWIDTH2 0x0238d330 - 0x0238d339 +SWIDTH2 0x0238d430 - 0x0238d439 +SWIDTH2 0x0238d530 - 0x0238d539 +SWIDTH2 0x0238d630 - 0x0238d639 +SWIDTH2 0x0238d730 - 0x0238d739 +SWIDTH2 0x0238d830 - 0x0238d839 +SWIDTH2 0x0238d930 - 0x0238d939 +SWIDTH2 0x0238da30 - 0x0238da39 +SWIDTH2 0x0238db30 - 0x0238db39 +SWIDTH2 0x0238dc30 - 0x0238dc39 +SWIDTH2 0x0238dd30 - 0x0238dd39 +SWIDTH2 0x0238de30 - 0x0238de39 +SWIDTH2 0x0238df30 - 0x0238df39 +SWIDTH2 0x0238e030 - 0x0238e039 +SWIDTH2 0x0238e130 - 0x0238e139 +SWIDTH2 0x0238e230 - 0x0238e239 +SWIDTH2 0x0238e330 - 0x0238e339 +SWIDTH2 0x0238e430 - 0x0238e439 +SWIDTH2 0x0238e530 - 0x0238e539 +SWIDTH2 0x0238e630 - 0x0238e639 +SWIDTH2 0x0238e730 - 0x0238e739 +SWIDTH2 0x0238e830 - 0x0238e839 +SWIDTH2 0x0238e930 - 0x0238e939 +SWIDTH2 0x0238ea30 - 0x0238ea39 +SWIDTH2 0x0238eb30 - 0x0238eb39 +SWIDTH2 0x0238ec30 - 0x0238ec39 +SWIDTH2 0x0238ed30 - 0x0238ed39 +SWIDTH2 0x0238ee30 - 0x0238ee39 +SWIDTH2 0x0238ef30 - 0x0238ef39 +SWIDTH2 0x0238f030 - 0x0238f039 +SWIDTH2 0x0238f130 - 0x0238f139 +SWIDTH2 0x0238f230 - 0x0238f239 +SWIDTH2 0x0238f330 - 0x0238f339 +SWIDTH2 0x0238f430 - 0x0238f439 +SWIDTH2 0x0238f530 - 0x0238f539 +SWIDTH2 0x0238f630 - 0x0238f639 +SWIDTH2 0x0238f730 - 0x0238f739 +SWIDTH2 0x0238f830 - 0x0238f839 +SWIDTH2 0x0238f930 - 0x0238f939 +SWIDTH2 0x0238fa30 - 0x0238fa39 +SWIDTH2 0x0238fb30 - 0x0238fb39 +SWIDTH2 0x0238fc30 - 0x0238fc39 +SWIDTH2 0x0238fd30 - 0x0238fd39 +SWIDTH2 0x0238fe30 - 0x0238fe39 +SWIDTH2 0x02398130 - 0x02398139 +SWIDTH2 0x02398230 - 0x02398239 +SWIDTH2 0x02398330 - 0x02398339 +SWIDTH2 0x02398430 - 0x02398439 +SWIDTH2 0x02398530 - 0x02398539 +SWIDTH2 0x02398630 - 0x02398639 +SWIDTH2 0x02398730 - 0x02398739 +SWIDTH2 0x02398830 - 0x02398839 +SWIDTH2 0x02398930 - 0x02398939 +SWIDTH2 0x02398a30 - 0x02398a39 +SWIDTH2 0x02398b30 - 0x02398b39 +SWIDTH2 0x02398c30 - 0x02398c39 +SWIDTH2 0x02398d30 - 0x02398d39 +SWIDTH2 0x02398e30 - 0x02398e39 +SWIDTH2 0x02398f30 - 0x02398f39 +SWIDTH2 0x02399030 - 0x02399039 +SWIDTH2 0x02399130 - 0x02399139 +SWIDTH2 0x02399230 - 0x02399239 +SWIDTH2 0x02399330 - 0x02399339 +SWIDTH2 0x02399430 - 0x02399439 +SWIDTH2 0x02399530 - 0x02399539 +SWIDTH2 0x02399630 - 0x02399639 +SWIDTH2 0x02399730 - 0x02399739 +SWIDTH2 0x02399830 - 0x02399839 +SWIDTH2 0x02399930 - 0x02399939 +SWIDTH2 0x02399a30 - 0x02399a39 +SWIDTH2 0x02399b30 - 0x02399b39 +SWIDTH2 0x02399c30 - 0x02399c39 +SWIDTH2 0x02399d30 - 0x02399d39 +SWIDTH2 0x02399e30 - 0x02399e39 +SWIDTH2 0x02399f30 - 0x02399f39 +SWIDTH2 0x0239a030 - 0x0239a039 +SWIDTH2 0x0239a130 - 0x0239a139 +SWIDTH2 0x0239a230 - 0x0239a239 +SWIDTH2 0x0239a330 - 0x0239a339 +SWIDTH2 0x0239a430 - 0x0239a439 +SWIDTH2 0x0239a530 - 0x0239a539 +SWIDTH2 0x0239a630 - 0x0239a639 +SWIDTH2 0x0239a730 - 0x0239a739 +SWIDTH2 0x0239a830 - 0x0239a839 +SWIDTH2 0x0239a930 - 0x0239a939 +SWIDTH2 0x0239aa30 - 0x0239aa39 +SWIDTH2 0x0239ab30 - 0x0239ab39 +SWIDTH2 0x0239ac30 - 0x0239ac39 +SWIDTH2 0x0239ad30 - 0x0239ad39 +SWIDTH2 0x0239ae30 - 0x0239ae39 +SWIDTH2 0x0239af30 - 0x0239af39 +SWIDTH2 0x0239b030 - 0x0239b039 +SWIDTH2 0x0239b130 - 0x0239b139 +SWIDTH2 0x0239b230 - 0x0239b239 +SWIDTH2 0x0239b330 - 0x0239b339 +SWIDTH2 0x0239b430 - 0x0239b439 +SWIDTH2 0x0239b530 - 0x0239b539 +SWIDTH2 0x0239b630 - 0x0239b639 +SWIDTH2 0x0239b730 - 0x0239b739 +SWIDTH2 0x0239b830 - 0x0239b839 +SWIDTH2 0x0239b930 - 0x0239b939 +SWIDTH2 0x0239ba30 - 0x0239ba39 +SWIDTH2 0x0239bb30 - 0x0239bb39 +SWIDTH2 0x0239bc30 - 0x0239bc39 +SWIDTH2 0x0239bd30 - 0x0239bd39 +SWIDTH2 0x0239be30 - 0x0239be39 +SWIDTH2 0x0239bf30 - 0x0239bf39 +SWIDTH2 0x0239c030 - 0x0239c039 +SWIDTH2 0x0239c130 - 0x0239c139 +SWIDTH2 0x0239c230 - 0x0239c239 +SWIDTH2 0x0239c330 - 0x0239c339 +SWIDTH2 0x0239c430 - 0x0239c439 +SWIDTH2 0x0239c530 - 0x0239c539 +SWIDTH2 0x0239c630 - 0x0239c639 +SWIDTH2 0x0239c730 - 0x0239c739 +SWIDTH2 0x0239c830 - 0x0239c839 +SWIDTH2 0x0239c930 - 0x0239c939 +SWIDTH2 0x0239ca30 - 0x0239ca39 +SWIDTH2 0x0239cb30 - 0x0239cb39 +SWIDTH2 0x0239cc30 - 0x0239cc39 +SWIDTH2 0x0239cd30 - 0x0239cd39 +SWIDTH2 0x0239ce30 - 0x0239ce39 +SWIDTH2 0x0239cf30 - 0x0239cf39 +SWIDTH2 0x0239d030 - 0x0239d039 +SWIDTH2 0x0239d130 - 0x0239d139 +SWIDTH2 0x0239d230 - 0x0239d239 +SWIDTH2 0x0239d330 - 0x0239d339 +SWIDTH2 0x0239d430 - 0x0239d439 +SWIDTH2 0x0239d530 - 0x0239d539 +SWIDTH2 0x0239d630 - 0x0239d639 +SWIDTH2 0x0239d730 - 0x0239d739 +SWIDTH2 0x0239d830 - 0x0239d839 +SWIDTH2 0x0239d930 - 0x0239d939 +SWIDTH2 0x0239da30 - 0x0239da39 +SWIDTH2 0x0239db30 - 0x0239db39 +SWIDTH2 0x0239dc30 - 0x0239dc39 +SWIDTH2 0x0239dd30 - 0x0239dd39 +SWIDTH2 0x0239de30 - 0x0239de39 +SWIDTH2 0x0239df30 - 0x0239df39 +SWIDTH2 0x0239e030 - 0x0239e039 +SWIDTH2 0x0239e130 - 0x0239e139 +SWIDTH2 0x0239e230 - 0x0239e239 +SWIDTH2 0x0239e330 - 0x0239e339 +SWIDTH2 0x0239e430 - 0x0239e439 +SWIDTH2 0x0239e530 - 0x0239e539 +SWIDTH2 0x0239e630 - 0x0239e639 +SWIDTH2 0x0239e730 - 0x0239e739 +SWIDTH2 0x0239e830 - 0x0239e839 +SWIDTH2 0x0239e930 - 0x0239e939 +SWIDTH2 0x0239ea30 - 0x0239ea39 +SWIDTH2 0x0239eb30 - 0x0239eb39 +SWIDTH2 0x0239ec30 - 0x0239ec39 +SWIDTH2 0x0239ed30 - 0x0239ed39 +SWIDTH2 0x0239ee30 - 0x0239ee39 +SWIDTH2 0x0239ef30 - 0x0239ef39 +SWIDTH2 0x0239f030 - 0x0239f039 +SWIDTH2 0x0239f130 - 0x0239f139 +SWIDTH2 0x0239f230 - 0x0239f239 +SWIDTH2 0x0239f330 - 0x0239f339 +SWIDTH2 0x0239f430 - 0x0239f439 +SWIDTH2 0x0239f530 - 0x0239f539 +SWIDTH2 0x0239f630 - 0x0239f639 +SWIDTH2 0x0239f730 - 0x0239f739 +SWIDTH2 0x0239f830 - 0x0239f839 +SWIDTH2 0x0239f930 - 0x0239f939 +SWIDTH2 0x0239fa30 - 0x0239fa39 +SWIDTH2 0x0239fb30 - 0x0239fb39 +SWIDTH2 0x0239fc30 - 0x0239fc39 +SWIDTH2 0x0239fd30 - 0x0239fd39 +SWIDTH2 0x0239fe30 - 0x0239fe39 +SWIDTH2 0x03308130 - 0x03308139 +SWIDTH2 0x03308230 - 0x03308239 +SWIDTH2 0x03308330 - 0x03308339 +SWIDTH2 0x03308430 - 0x03308439 +SWIDTH2 0x03308530 - 0x03308539 +SWIDTH2 0x03308630 - 0x03308639 +SWIDTH2 0x03308730 - 0x03308739 +SWIDTH2 0x03308830 - 0x03308839 +SWIDTH2 0x03308930 - 0x03308939 +SWIDTH2 0x03308a30 - 0x03308a39 +SWIDTH2 0x03308b30 - 0x03308b39 +SWIDTH2 0x03308c30 - 0x03308c39 +SWIDTH2 0x03308d30 - 0x03308d39 +SWIDTH2 0x03308e30 - 0x03308e39 +SWIDTH2 0x03308f30 - 0x03308f39 +SWIDTH2 0x03309030 - 0x03309039 +SWIDTH2 0x03309130 - 0x03309139 +SWIDTH2 0x03309230 - 0x03309239 +SWIDTH2 0x03309330 - 0x03309339 +SWIDTH2 0x03309430 - 0x03309439 +SWIDTH2 0x03309530 - 0x03309539 +SWIDTH2 0x03309630 - 0x03309639 +SWIDTH2 0x03309730 - 0x03309739 +SWIDTH2 0x03309830 - 0x03309839 +SWIDTH2 0x03309930 - 0x03309939 +SWIDTH2 0x03309a30 - 0x03309a39 +SWIDTH2 0x03309b30 - 0x03309b39 +SWIDTH2 0x03309c30 - 0x03309c39 +SWIDTH2 0x03309d30 - 0x03309d39 +SWIDTH2 0x03309e30 - 0x03309e39 +SWIDTH2 0x03309f30 - 0x03309f39 +SWIDTH2 0x0330a030 - 0x0330a039 +SWIDTH2 0x0330a130 - 0x0330a139 +SWIDTH2 0x0330a230 - 0x0330a239 +SWIDTH2 0x0330a330 - 0x0330a339 +SWIDTH2 0x0330a430 - 0x0330a439 +SWIDTH2 0x0330a530 - 0x0330a539 +SWIDTH2 0x0330a630 - 0x0330a639 +SWIDTH2 0x0330a730 - 0x0330a739 +SWIDTH2 0x0330a830 - 0x0330a839 +SWIDTH2 0x0330a930 - 0x0330a939 +SWIDTH2 0x0330aa30 - 0x0330aa39 +SWIDTH2 0x0330ab30 - 0x0330ab39 +SWIDTH2 0x0330ac30 - 0x0330ac39 +SWIDTH2 0x0330ad30 - 0x0330ad39 +SWIDTH2 0x0330ae30 - 0x0330ae39 +SWIDTH2 0x0330af30 - 0x0330af39 +SWIDTH2 0x0330b030 - 0x0330b039 +SWIDTH2 0x0330b130 - 0x0330b139 +SWIDTH2 0x0330b230 - 0x0330b239 +SWIDTH2 0x0330b330 - 0x0330b339 +SWIDTH2 0x0330b430 - 0x0330b439 +SWIDTH2 0x0330b530 - 0x0330b539 +SWIDTH2 0x0330b630 - 0x0330b639 +SWIDTH2 0x0330b730 - 0x0330b739 +SWIDTH2 0x0330b830 - 0x0330b839 +SWIDTH2 0x0330b930 - 0x0330b939 +SWIDTH2 0x0330ba30 - 0x0330ba39 +SWIDTH2 0x0330bb30 - 0x0330bb39 +SWIDTH2 0x0330bc30 - 0x0330bc39 +SWIDTH2 0x0330bd30 - 0x0330bd39 +SWIDTH2 0x0330be30 - 0x0330be39 +SWIDTH2 0x0330bf30 - 0x0330bf39 +SWIDTH2 0x0330c030 - 0x0330c039 +SWIDTH2 0x0330c130 - 0x0330c139 +SWIDTH2 0x0330c230 - 0x0330c239 +SWIDTH2 0x0330c330 - 0x0330c339 +SWIDTH2 0x0330c430 - 0x0330c439 +SWIDTH2 0x0330c530 - 0x0330c539 +SWIDTH2 0x0330c630 - 0x0330c639 +SWIDTH2 0x0330c730 - 0x0330c739 +SWIDTH2 0x0330c830 - 0x0330c839 +SWIDTH2 0x0330c930 - 0x0330c939 +SWIDTH2 0x0330ca30 - 0x0330ca39 +SWIDTH2 0x0330cb30 - 0x0330cb39 +SWIDTH2 0x0330cc30 - 0x0330cc39 +SWIDTH2 0x0330cd30 - 0x0330cd39 +SWIDTH2 0x0330ce30 - 0x0330ce39 +SWIDTH2 0x0330cf30 - 0x0330cf39 +SWIDTH2 0x0330d030 - 0x0330d039 +SWIDTH2 0x0330d130 - 0x0330d139 +SWIDTH2 0x0330d230 - 0x0330d239 +SWIDTH2 0x0330d330 - 0x0330d339 +SWIDTH2 0x0330d430 - 0x0330d439 +SWIDTH2 0x0330d530 - 0x0330d539 +SWIDTH2 0x0330d630 - 0x0330d639 +SWIDTH2 0x0330d730 - 0x0330d739 +SWIDTH2 0x0330d830 - 0x0330d839 +SWIDTH2 0x0330d930 - 0x0330d939 +SWIDTH2 0x0330da30 - 0x0330da39 +SWIDTH2 0x0330db30 - 0x0330db39 +SWIDTH2 0x0330dc30 - 0x0330dc39 +SWIDTH2 0x0330dd30 - 0x0330dd39 +SWIDTH2 0x0330de30 - 0x0330de39 +SWIDTH2 0x0330df30 - 0x0330df39 +SWIDTH2 0x0330e030 - 0x0330e039 +SWIDTH2 0x0330e130 - 0x0330e139 +SWIDTH2 0x0330e230 - 0x0330e239 +SWIDTH2 0x0330e330 - 0x0330e339 +SWIDTH2 0x0330e430 - 0x0330e439 +SWIDTH2 0x0330e530 - 0x0330e539 +SWIDTH2 0x0330e630 - 0x0330e639 +SWIDTH2 0x0330e730 - 0x0330e739 +SWIDTH2 0x0330e830 - 0x0330e839 +SWIDTH2 0x0330e930 - 0x0330e939 +SWIDTH2 0x0330ea30 - 0x0330ea39 +SWIDTH2 0x0330eb30 - 0x0330eb39 +SWIDTH2 0x0330ec30 - 0x0330ec39 +SWIDTH2 0x0330ed30 - 0x0330ed39 +SWIDTH2 0x0330ee30 - 0x0330ee39 +SWIDTH2 0x0330ef30 - 0x0330ef39 +SWIDTH2 0x0330f030 - 0x0330f039 +SWIDTH2 0x0330f130 - 0x0330f139 +SWIDTH2 0x0330f230 - 0x0330f239 +SWIDTH2 0x0330f330 - 0x0330f339 +SWIDTH2 0x0330f430 - 0x0330f439 +SWIDTH2 0x0330f530 - 0x0330f539 +SWIDTH2 0x0330f630 - 0x0330f639 +SWIDTH2 0x0330f730 - 0x0330f739 +SWIDTH2 0x0330f830 - 0x0330f839 +SWIDTH2 0x0330f930 - 0x0330f939 +SWIDTH2 0x0330fa30 - 0x0330fa39 +SWIDTH2 0x0330fb30 - 0x0330fb39 +SWIDTH2 0x0330fc30 - 0x0330fc39 +SWIDTH2 0x0330fd30 - 0x0330fd39 +SWIDTH2 0x0330fe30 - 0x0330fe39 +SWIDTH2 0x03318130 - 0x03318139 +SWIDTH2 0x03318230 - 0x03318239 +SWIDTH2 0x03318330 - 0x03318339 +SWIDTH2 0x03318430 - 0x03318439 +SWIDTH2 0x03318530 - 0x03318539 +SWIDTH2 0x03318630 - 0x03318639 +SWIDTH2 0x03318730 - 0x03318739 +SWIDTH2 0x03318830 - 0x03318839 +SWIDTH2 0x03318930 - 0x03318939 +SWIDTH2 0x03318a30 - 0x03318a39 +SWIDTH2 0x03318b30 - 0x03318b39 +SWIDTH2 0x03318c30 - 0x03318c39 +SWIDTH2 0x03318d30 - 0x03318d39 +SWIDTH2 0x03318e30 - 0x03318e39 +SWIDTH2 0x03318f30 - 0x03318f39 +SWIDTH2 0x03319030 - 0x03319039 +SWIDTH2 0x03319130 - 0x03319139 +SWIDTH2 0x03319230 - 0x03319239 +SWIDTH2 0x03319330 - 0x03319339 +SWIDTH2 0x03319430 - 0x03319439 +SWIDTH2 0x03319530 - 0x03319539 +SWIDTH2 0x03319630 - 0x03319639 +SWIDTH2 0x03319730 - 0x03319739 +SWIDTH2 0x03319830 - 0x03319839 +SWIDTH2 0x03319930 - 0x03319939 +SWIDTH2 0x03319a30 - 0x03319a39 +SWIDTH2 0x03319b30 - 0x03319b39 +SWIDTH2 0x03319c30 - 0x03319c39 +SWIDTH2 0x03319d30 - 0x03319d39 +SWIDTH2 0x03319e30 - 0x03319e39 +SWIDTH2 0x03319f30 - 0x03319f39 +SWIDTH2 0x0331a030 - 0x0331a039 +SWIDTH2 0x0331a130 - 0x0331a139 +SWIDTH2 0x0331a230 - 0x0331a239 +SWIDTH2 0x0331a330 - 0x0331a339 +SWIDTH2 0x0331a430 - 0x0331a439 +SWIDTH2 0x0331a530 - 0x0331a539 +SWIDTH2 0x0331a630 - 0x0331a639 +SWIDTH2 0x0331a730 - 0x0331a739 +SWIDTH2 0x0331a830 - 0x0331a839 +SWIDTH2 0x0331a930 - 0x0331a939 +SWIDTH2 0x0331aa30 - 0x0331aa39 +SWIDTH2 0x0331ab30 - 0x0331ab39 +SWIDTH2 0x0331ac30 - 0x0331ac39 +SWIDTH2 0x0331ad30 - 0x0331ad39 +SWIDTH2 0x0331ae30 - 0x0331ae39 +SWIDTH2 0x0331af30 - 0x0331af39 +SWIDTH2 0x0331b030 - 0x0331b039 +SWIDTH2 0x0331b130 - 0x0331b139 +SWIDTH2 0x0331b230 - 0x0331b239 +SWIDTH2 0x0331b330 - 0x0331b339 +SWIDTH2 0x0331b430 - 0x0331b439 +SWIDTH2 0x0331b530 - 0x0331b539 +SWIDTH2 0x0331b630 - 0x0331b639 +SWIDTH2 0x0331b730 - 0x0331b739 +SWIDTH2 0x0331b830 - 0x0331b839 +SWIDTH2 0x0331b930 - 0x0331b939 +SWIDTH2 0x0331ba30 - 0x0331ba39 +SWIDTH2 0x0331bb30 - 0x0331bb39 +SWIDTH2 0x0331bc30 - 0x0331bc39 +SWIDTH2 0x0331bd30 - 0x0331bd39 +SWIDTH2 0x0331be30 - 0x0331be39 +SWIDTH2 0x0331bf30 - 0x0331bf39 +SWIDTH2 0x0331c030 - 0x0331c039 +SWIDTH2 0x0331c130 - 0x0331c139 +SWIDTH2 0x0331c230 - 0x0331c239 +SWIDTH2 0x0331c330 - 0x0331c339 +SWIDTH2 0x0331c430 - 0x0331c439 +SWIDTH2 0x0331c530 - 0x0331c539 +SWIDTH2 0x0331c630 - 0x0331c639 +SWIDTH2 0x0331c730 - 0x0331c739 +SWIDTH2 0x0331c830 - 0x0331c839 +SWIDTH2 0x0331c930 - 0x0331c939 +SWIDTH2 0x0331ca30 - 0x0331ca39 +SWIDTH2 0x0331cb30 - 0x0331cb39 +SWIDTH2 0x0331cc30 - 0x0331cc39 +SWIDTH2 0x0331cd30 - 0x0331cd39 +SWIDTH2 0x0331ce30 - 0x0331ce39 +SWIDTH2 0x0331cf30 - 0x0331cf39 +SWIDTH2 0x0331d030 - 0x0331d039 +SWIDTH2 0x0331d130 - 0x0331d139 +SWIDTH2 0x0331d230 - 0x0331d239 +SWIDTH2 0x0331d330 - 0x0331d339 +SWIDTH2 0x0331d430 - 0x0331d439 +SWIDTH2 0x0331d530 - 0x0331d539 +SWIDTH2 0x0331d630 - 0x0331d639 +SWIDTH2 0x0331d730 - 0x0331d739 +SWIDTH2 0x0331d830 - 0x0331d839 +SWIDTH2 0x0331d930 - 0x0331d939 +SWIDTH2 0x0331da30 - 0x0331da39 +SWIDTH2 0x0331db30 - 0x0331db39 +SWIDTH2 0x0331dc30 - 0x0331dc39 +SWIDTH2 0x0331dd30 - 0x0331dd39 +SWIDTH2 0x0331de30 - 0x0331de39 +SWIDTH2 0x0331df30 - 0x0331df39 +SWIDTH2 0x0331e030 - 0x0331e039 +SWIDTH2 0x0331e130 - 0x0331e139 +SWIDTH2 0x0331e230 - 0x0331e239 +SWIDTH2 0x0331e330 - 0x0331e339 +SWIDTH2 0x0331e430 - 0x0331e439 +SWIDTH2 0x0331e530 - 0x0331e539 +SWIDTH2 0x0331e630 - 0x0331e639 +SWIDTH2 0x0331e730 - 0x0331e739 +SWIDTH2 0x0331e830 - 0x0331e839 +SWIDTH2 0x0331e930 - 0x0331e939 +SWIDTH2 0x0331ea30 - 0x0331ea39 +SWIDTH2 0x0331eb30 - 0x0331eb39 +SWIDTH2 0x0331ec30 - 0x0331ec39 +SWIDTH2 0x0331ed30 - 0x0331ed39 +SWIDTH2 0x0331ee30 - 0x0331ee39 +SWIDTH2 0x0331ef30 - 0x0331ef39 +SWIDTH2 0x0331f030 - 0x0331f039 +SWIDTH2 0x0331f130 - 0x0331f139 +SWIDTH2 0x0331f230 - 0x0331f239 +SWIDTH2 0x0331f330 - 0x0331f339 +SWIDTH2 0x0331f430 - 0x0331f439 +SWIDTH2 0x0331f530 - 0x0331f539 +SWIDTH2 0x0331f630 - 0x0331f639 +SWIDTH2 0x0331f730 - 0x0331f739 +SWIDTH2 0x0331f830 - 0x0331f839 +SWIDTH2 0x0331f930 - 0x0331f939 +SWIDTH2 0x0331fa30 - 0x0331fa39 +SWIDTH2 0x0331fb30 - 0x0331fb39 +SWIDTH2 0x0331fc30 - 0x0331fc39 +SWIDTH2 0x0331fd30 - 0x0331fd39 +SWIDTH2 0x0331fe30 - 0x0331fe39 +SWIDTH2 0x03328130 - 0x03328139 +SWIDTH2 0x03328230 - 0x03328239 +SWIDTH2 0x03328330 - 0x03328339 +SWIDTH2 0x03328430 - 0x03328439 +SWIDTH2 0x03328530 - 0x03328539 +SWIDTH2 0x03328630 - 0x03328639 +SWIDTH2 0x03328730 - 0x03328739 +SWIDTH2 0x03328830 - 0x03328839 +SWIDTH2 0x03328930 - 0x03328939 +SWIDTH2 0x03328a30 - 0x03328a39 +SWIDTH2 0x03328b30 - 0x03328b39 +SWIDTH2 0x03328c30 - 0x03328c39 +SWIDTH2 0x03328d30 - 0x03328d39 +SWIDTH2 0x03328e30 - 0x03328e39 +SWIDTH2 0x03328f30 - 0x03328f39 +SWIDTH2 0x03329030 - 0x03329039 +SWIDTH2 0x03329130 - 0x03329139 +SWIDTH2 0x03329230 - 0x03329239 +SWIDTH2 0x03329330 - 0x03329339 +SWIDTH2 0x03329430 - 0x03329439 +SWIDTH2 0x03329530 - 0x03329539 +SWIDTH2 0x03329630 - 0x03329639 +SWIDTH2 0x03329730 - 0x03329739 +SWIDTH2 0x03329830 - 0x03329839 +SWIDTH2 0x03329930 - 0x03329939 +SWIDTH2 0x03329a30 - 0x03329a39 +SWIDTH2 0x03329b30 - 0x03329b39 +SWIDTH2 0x03329c30 - 0x03329c39 +SWIDTH2 0x03329d30 - 0x03329d39 +SWIDTH2 0x03329e30 - 0x03329e39 +SWIDTH2 0x03329f30 - 0x03329f39 +SWIDTH2 0x0332a030 - 0x0332a039 +SWIDTH2 0x0332a130 - 0x0332a139 +SWIDTH2 0x0332a230 - 0x0332a239 +SWIDTH2 0x0332a330 - 0x0332a339 +SWIDTH2 0x0332a430 - 0x0332a439 +SWIDTH2 0x0332a530 - 0x0332a539 +SWIDTH2 0x0332a630 - 0x0332a639 +SWIDTH2 0x0332a730 - 0x0332a739 +SWIDTH2 0x0332a830 - 0x0332a839 +SWIDTH2 0x0332a930 - 0x0332a939 +SWIDTH2 0x0332aa30 - 0x0332aa39 +SWIDTH2 0x0332ab30 - 0x0332ab39 +SWIDTH2 0x0332ac30 - 0x0332ac39 +SWIDTH2 0x0332ad30 - 0x0332ad39 +SWIDTH2 0x0332ae30 - 0x0332ae39 +SWIDTH2 0x0332af30 - 0x0332af39 +SWIDTH2 0x0332b030 - 0x0332b039 +SWIDTH2 0x0332b130 - 0x0332b139 +SWIDTH2 0x0332b230 - 0x0332b239 +SWIDTH2 0x0332b330 - 0x0332b339 +SWIDTH2 0x0332b430 - 0x0332b439 +SWIDTH2 0x0332b530 - 0x0332b539 +SWIDTH2 0x0332b630 - 0x0332b639 +SWIDTH2 0x0332b730 - 0x0332b739 +SWIDTH2 0x0332b830 - 0x0332b839 +SWIDTH2 0x0332b930 - 0x0332b939 +SWIDTH2 0x0332ba30 - 0x0332ba39 +SWIDTH2 0x0332bb30 - 0x0332bb39 +SWIDTH2 0x0332bc30 - 0x0332bc39 +SWIDTH2 0x0332bd30 - 0x0332bd39 +SWIDTH2 0x0332be30 - 0x0332be39 +SWIDTH2 0x0332bf30 - 0x0332bf39 +SWIDTH2 0x0332c030 - 0x0332c039 +SWIDTH2 0x0332c130 - 0x0332c139 +SWIDTH2 0x0332c230 - 0x0332c239 +SWIDTH2 0x0332c330 - 0x0332c339 +SWIDTH2 0x0332c430 - 0x0332c439 +SWIDTH2 0x0332c530 - 0x0332c539 +SWIDTH2 0x0332c630 - 0x0332c639 +SWIDTH2 0x0332c730 - 0x0332c739 +SWIDTH2 0x0332c830 - 0x0332c839 +SWIDTH2 0x0332c930 - 0x0332c939 +SWIDTH2 0x0332ca30 - 0x0332ca39 +SWIDTH2 0x0332cb30 - 0x0332cb39 +SWIDTH2 0x0332cc30 - 0x0332cc39 +SWIDTH2 0x0332cd30 - 0x0332cd39 +SWIDTH2 0x0332ce30 - 0x0332ce39 +SWIDTH2 0x0332cf30 - 0x0332cf39 +SWIDTH2 0x0332d030 - 0x0332d039 +SWIDTH2 0x0332d130 - 0x0332d139 +SWIDTH2 0x0332d230 - 0x0332d239 +SWIDTH2 0x0332d330 - 0x0332d339 +SWIDTH2 0x0332d430 - 0x0332d439 +SWIDTH2 0x0332d530 - 0x0332d539 +SWIDTH2 0x0332d630 - 0x0332d639 +SWIDTH2 0x0332d730 - 0x0332d739 +SWIDTH2 0x0332d830 - 0x0332d839 +SWIDTH2 0x0332d930 - 0x0332d939 +SWIDTH2 0x0332da30 - 0x0332da39 +SWIDTH2 0x0332db30 - 0x0332db39 +SWIDTH2 0x0332dc30 - 0x0332dc39 +SWIDTH2 0x0332dd30 - 0x0332dd39 +SWIDTH2 0x0332de30 - 0x0332de39 +SWIDTH2 0x0332df30 - 0x0332df39 +SWIDTH2 0x0332e030 - 0x0332e039 +SWIDTH2 0x0332e130 - 0x0332e139 +SWIDTH2 0x0332e230 - 0x0332e239 +SWIDTH2 0x0332e330 - 0x0332e339 +SWIDTH2 0x0332e430 - 0x0332e439 +SWIDTH2 0x0332e530 - 0x0332e539 +SWIDTH2 0x0332e630 - 0x0332e639 +SWIDTH2 0x0332e730 - 0x0332e739 +SWIDTH2 0x0332e830 - 0x0332e839 +SWIDTH2 0x0332e930 - 0x0332e939 +SWIDTH2 0x0332ea30 - 0x0332ea39 +SWIDTH2 0x0332eb30 - 0x0332eb39 +SWIDTH2 0x0332ec30 - 0x0332ec39 +SWIDTH2 0x0332ed30 - 0x0332ed39 +SWIDTH2 0x0332ee30 - 0x0332ee39 +SWIDTH2 0x0332ef30 - 0x0332ef39 +SWIDTH2 0x0332f030 - 0x0332f039 +SWIDTH2 0x0332f130 - 0x0332f139 +SWIDTH2 0x0332f230 - 0x0332f239 +SWIDTH2 0x0332f330 - 0x0332f339 +SWIDTH2 0x0332f430 - 0x0332f439 +SWIDTH2 0x0332f530 - 0x0332f539 +SWIDTH2 0x0332f630 - 0x0332f639 +SWIDTH2 0x0332f730 - 0x0332f739 +SWIDTH2 0x0332f830 - 0x0332f839 +SWIDTH2 0x0332f930 - 0x0332f939 +SWIDTH2 0x0332fa30 - 0x0332fa39 +SWIDTH2 0x0332fb30 - 0x0332fb39 +SWIDTH2 0x0332fc30 - 0x0332fc39 +SWIDTH2 0x0332fd30 - 0x0332fd39 +SWIDTH2 0x0332fe30 - 0x0332fe39 +SWIDTH2 0x03338130 - 0x03338139 +SWIDTH2 0x03338230 - 0x03338239 +SWIDTH2 0x03338330 - 0x03338339 +SWIDTH2 0x03338430 - 0x03338439 +SWIDTH2 0x03338530 - 0x03338539 +SWIDTH2 0x03338630 - 0x03338639 +SWIDTH2 0x03338730 - 0x03338739 +SWIDTH2 0x03338830 - 0x03338839 +SWIDTH2 0x03338930 - 0x03338939 +SWIDTH2 0x03338a30 - 0x03338a39 +SWIDTH2 0x03338b30 - 0x03338b39 +SWIDTH2 0x03338c30 - 0x03338c39 +SWIDTH2 0x03338d30 - 0x03338d39 +SWIDTH2 0x03338e30 - 0x03338e39 +SWIDTH2 0x03338f30 - 0x03338f39 +SWIDTH2 0x03339030 - 0x03339039 +SWIDTH2 0x03339130 - 0x03339139 +SWIDTH2 0x03339230 - 0x03339239 +SWIDTH2 0x03339330 - 0x03339339 +SWIDTH2 0x03339430 - 0x03339439 +SWIDTH2 0x03339530 - 0x03339539 +SWIDTH2 0x03339630 - 0x03339639 +SWIDTH2 0x03339730 - 0x03339739 +SWIDTH2 0x03339830 - 0x03339839 +SWIDTH2 0x03339930 - 0x03339939 +SWIDTH2 0x03339a30 - 0x03339a39 +SWIDTH2 0x03339b30 - 0x03339b39 +SWIDTH2 0x03339c30 - 0x03339c39 +SWIDTH2 0x03339d30 - 0x03339d39 +SWIDTH2 0x03339e30 - 0x03339e39 +SWIDTH2 0x03339f30 - 0x03339f39 +SWIDTH2 0x0333a030 - 0x0333a039 +SWIDTH2 0x0333a130 - 0x0333a139 +SWIDTH2 0x0333a230 - 0x0333a239 +SWIDTH2 0x0333a330 - 0x0333a339 +SWIDTH2 0x0333a430 - 0x0333a439 +SWIDTH2 0x0333a530 - 0x0333a539 +SWIDTH2 0x0333a630 - 0x0333a639 +SWIDTH2 0x0333a730 - 0x0333a739 +SWIDTH2 0x0333a830 - 0x0333a839 +SWIDTH2 0x0333a930 - 0x0333a939 +SWIDTH2 0x0333aa30 - 0x0333aa39 +SWIDTH2 0x0333ab30 - 0x0333ab39 +SWIDTH2 0x0333ac30 - 0x0333ac39 +SWIDTH2 0x0333ad30 - 0x0333ad39 +SWIDTH2 0x0333ae30 - 0x0333ae39 +SWIDTH2 0x0333af30 - 0x0333af39 +SWIDTH2 0x0333b030 - 0x0333b039 +SWIDTH2 0x0333b130 - 0x0333b139 +SWIDTH2 0x0333b230 - 0x0333b239 +SWIDTH2 0x0333b330 - 0x0333b339 +SWIDTH2 0x0333b430 - 0x0333b439 +SWIDTH2 0x0333b530 - 0x0333b539 +SWIDTH2 0x0333b630 - 0x0333b639 +SWIDTH2 0x0333b730 - 0x0333b739 +SWIDTH2 0x0333b830 - 0x0333b839 +SWIDTH2 0x0333b930 - 0x0333b939 +SWIDTH2 0x0333ba30 - 0x0333ba39 +SWIDTH2 0x0333bb30 - 0x0333bb39 +SWIDTH2 0x0333bc30 - 0x0333bc39 +SWIDTH2 0x0333bd30 - 0x0333bd39 +SWIDTH2 0x0333be30 - 0x0333be39 +SWIDTH2 0x0333bf30 - 0x0333bf39 +SWIDTH2 0x0333c030 - 0x0333c039 +SWIDTH2 0x0333c130 - 0x0333c139 +SWIDTH2 0x0333c230 - 0x0333c239 +SWIDTH2 0x0333c330 - 0x0333c339 +SWIDTH2 0x0333c430 - 0x0333c439 +SWIDTH2 0x0333c530 - 0x0333c539 +SWIDTH2 0x0333c630 - 0x0333c639 +SWIDTH2 0x0333c730 - 0x0333c739 +SWIDTH2 0x0333c830 - 0x0333c839 +SWIDTH2 0x0333c930 - 0x0333c939 +SWIDTH2 0x0333ca30 - 0x0333ca39 +SWIDTH2 0x0333cb30 - 0x0333cb39 +SWIDTH2 0x0333cc30 - 0x0333cc39 +SWIDTH2 0x0333cd30 - 0x0333cd39 +SWIDTH2 0x0333ce30 - 0x0333ce39 +SWIDTH2 0x0333cf30 - 0x0333cf39 +SWIDTH2 0x0333d030 - 0x0333d039 +SWIDTH2 0x0333d130 - 0x0333d139 +SWIDTH2 0x0333d230 - 0x0333d239 +SWIDTH2 0x0333d330 - 0x0333d339 +SWIDTH2 0x0333d430 - 0x0333d439 +SWIDTH2 0x0333d530 - 0x0333d539 +SWIDTH2 0x0333d630 - 0x0333d639 +SWIDTH2 0x0333d730 - 0x0333d739 +SWIDTH2 0x0333d830 - 0x0333d839 +SWIDTH2 0x0333d930 - 0x0333d939 +SWIDTH2 0x0333da30 - 0x0333da39 +SWIDTH2 0x0333db30 - 0x0333db39 +SWIDTH2 0x0333dc30 - 0x0333dc39 +SWIDTH2 0x0333dd30 - 0x0333dd39 +SWIDTH2 0x0333de30 - 0x0333de39 +SWIDTH2 0x0333df30 - 0x0333df39 +SWIDTH2 0x0333e030 - 0x0333e039 +SWIDTH2 0x0333e130 - 0x0333e139 +SWIDTH2 0x0333e230 - 0x0333e239 +SWIDTH2 0x0333e330 - 0x0333e339 +SWIDTH2 0x0333e430 - 0x0333e439 +SWIDTH2 0x0333e530 - 0x0333e539 +SWIDTH2 0x0333e630 - 0x0333e639 +SWIDTH2 0x0333e730 - 0x0333e739 +SWIDTH2 0x0333e830 - 0x0333e839 +SWIDTH2 0x0333e930 - 0x0333e939 +SWIDTH2 0x0333ea30 - 0x0333ea39 +SWIDTH2 0x0333eb30 - 0x0333eb39 +SWIDTH2 0x0333ec30 - 0x0333ec39 +SWIDTH2 0x0333ed30 - 0x0333ed39 +SWIDTH2 0x0333ee30 - 0x0333ee39 +SWIDTH2 0x0333ef30 - 0x0333ef39 +SWIDTH2 0x0333f030 - 0x0333f039 +SWIDTH2 0x0333f130 - 0x0333f139 +SWIDTH2 0x0333f230 - 0x0333f239 +SWIDTH2 0x0333f330 - 0x0333f339 +SWIDTH2 0x0333f430 - 0x0333f439 +SWIDTH2 0x0333f530 - 0x0333f539 +SWIDTH2 0x0333f630 - 0x0333f639 +SWIDTH2 0x0333f730 - 0x0333f739 +SWIDTH2 0x0333f830 - 0x0333f839 +SWIDTH2 0x0333f930 - 0x0333f939 +SWIDTH2 0x0333fa30 - 0x0333fa39 +SWIDTH2 0x0333fb30 - 0x0333fb39 +SWIDTH2 0x0333fc30 - 0x0333fc39 +SWIDTH2 0x0333fd30 - 0x0333fd39 +SWIDTH2 0x0333fe30 - 0x0333fe39 +SWIDTH2 0x03348130 - 0x03348139 +SWIDTH2 0x03348230 - 0x03348239 +SWIDTH2 0x03348330 - 0x03348339 +SWIDTH2 0x03348430 - 0x03348439 +SWIDTH2 0x03348530 - 0x03348539 +SWIDTH2 0x03348630 - 0x03348639 +SWIDTH2 0x03348730 - 0x03348739 +SWIDTH2 0x03348830 - 0x03348839 +SWIDTH2 0x03348930 - 0x03348939 +SWIDTH2 0x03348a30 - 0x03348a39 +SWIDTH2 0x03348b30 - 0x03348b39 +SWIDTH2 0x03348c30 - 0x03348c39 +SWIDTH2 0x03348d30 - 0x03348d39 +SWIDTH2 0x03348e30 - 0x03348e39 +SWIDTH2 0x03348f30 - 0x03348f39 +SWIDTH2 0x03349030 - 0x03349039 +SWIDTH2 0x03349130 - 0x03349139 +SWIDTH2 0x03349230 - 0x03349239 +SWIDTH2 0x03349330 - 0x03349339 +SWIDTH2 0x03349430 - 0x03349439 +SWIDTH2 0x03349530 - 0x03349539 +SWIDTH2 0x03349630 - 0x03349639 +SWIDTH2 0x03349730 - 0x03349739 +SWIDTH2 0x03349830 - 0x03349839 +SWIDTH2 0x03349930 - 0x03349939 +SWIDTH2 0x03349a30 - 0x03349a39 +SWIDTH2 0x03349b30 - 0x03349b39 +SWIDTH2 0x03349c30 - 0x03349c39 +SWIDTH2 0x03349d30 - 0x03349d39 +SWIDTH2 0x03349e30 - 0x03349e39 +SWIDTH2 0x03349f30 - 0x03349f39 +SWIDTH2 0x0334a030 - 0x0334a039 +SWIDTH2 0x0334a130 - 0x0334a139 +SWIDTH2 0x0334a230 - 0x0334a239 +SWIDTH2 0x0334a330 - 0x0334a339 +SWIDTH2 0x0334a430 - 0x0334a439 +SWIDTH2 0x0334a530 - 0x0334a539 +SWIDTH2 0x0334a630 - 0x0334a639 +SWIDTH2 0x0334a730 - 0x0334a739 +SWIDTH2 0x0334a830 - 0x0334a839 +SWIDTH2 0x0334a930 - 0x0334a939 +SWIDTH2 0x0334aa30 - 0x0334aa39 +SWIDTH2 0x0334ab30 - 0x0334ab39 +SWIDTH2 0x0334ac30 - 0x0334ac39 +SWIDTH2 0x0334ad30 - 0x0334ad39 +SWIDTH2 0x0334ae30 - 0x0334ae39 +SWIDTH2 0x0334af30 - 0x0334af39 +SWIDTH2 0x0334b030 - 0x0334b039 +SWIDTH2 0x0334b130 - 0x0334b139 +SWIDTH2 0x0334b230 - 0x0334b239 +SWIDTH2 0x0334b330 - 0x0334b339 +SWIDTH2 0x0334b430 - 0x0334b439 +SWIDTH2 0x0334b530 - 0x0334b539 +SWIDTH2 0x0334b630 - 0x0334b639 +SWIDTH2 0x0334b730 - 0x0334b739 +SWIDTH2 0x0334b830 - 0x0334b839 +SWIDTH2 0x0334b930 - 0x0334b939 +SWIDTH2 0x0334ba30 - 0x0334ba39 +SWIDTH2 0x0334bb30 - 0x0334bb39 +SWIDTH2 0x0334bc30 - 0x0334bc39 +SWIDTH2 0x0334bd30 - 0x0334bd39 +SWIDTH2 0x0334be30 - 0x0334be39 +SWIDTH2 0x0334bf30 - 0x0334bf39 +SWIDTH2 0x0334c030 - 0x0334c039 +SWIDTH2 0x0334c130 - 0x0334c139 +SWIDTH2 0x0334c230 - 0x0334c239 +SWIDTH2 0x0334c330 - 0x0334c339 +SWIDTH2 0x0334c430 - 0x0334c439 +SWIDTH2 0x0334c530 - 0x0334c539 +SWIDTH2 0x0334c630 - 0x0334c639 +SWIDTH2 0x0334c730 - 0x0334c739 +SWIDTH2 0x0334c830 - 0x0334c839 +SWIDTH2 0x0334c930 - 0x0334c939 +SWIDTH2 0x0334ca30 - 0x0334ca39 +SWIDTH2 0x0334cb30 - 0x0334cb39 +SWIDTH2 0x0334cc30 - 0x0334cc39 +SWIDTH2 0x0334cd30 - 0x0334cd39 +SWIDTH2 0x0334ce30 - 0x0334ce39 +SWIDTH2 0x0334cf30 - 0x0334cf39 +SWIDTH2 0x0334d030 - 0x0334d039 +SWIDTH2 0x0334d130 - 0x0334d139 +SWIDTH2 0x0334d230 - 0x0334d239 +SWIDTH2 0x0334d330 - 0x0334d339 +SWIDTH2 0x0334d430 - 0x0334d439 +SWIDTH2 0x0334d530 - 0x0334d539 +SWIDTH2 0x0334d630 - 0x0334d639 +SWIDTH2 0x0334d730 - 0x0334d739 +SWIDTH2 0x0334d830 - 0x0334d839 +SWIDTH2 0x0334d930 - 0x0334d939 +SWIDTH2 0x0334da30 - 0x0334da39 +SWIDTH2 0x0334db30 - 0x0334db39 +SWIDTH2 0x0334dc30 - 0x0334dc39 +SWIDTH2 0x0334dd30 - 0x0334dd39 +SWIDTH2 0x0334de30 - 0x0334de39 +SWIDTH2 0x0334df30 - 0x0334df39 +SWIDTH2 0x0334e030 - 0x0334e039 +SWIDTH2 0x0334e130 - 0x0334e139 +SWIDTH2 0x0334e230 - 0x0334e239 +SWIDTH2 0x0334e330 - 0x0334e339 +SWIDTH2 0x0334e430 - 0x0334e439 +SWIDTH2 0x0334e530 - 0x0334e539 +SWIDTH2 0x0334e630 - 0x0334e639 +SWIDTH2 0x0334e730 - 0x0334e739 +SWIDTH2 0x0334e830 - 0x0334e839 +SWIDTH2 0x0334e930 - 0x0334e939 +SWIDTH2 0x0334ea30 - 0x0334ea39 +SWIDTH2 0x0334eb30 - 0x0334eb39 +SWIDTH2 0x0334ec30 - 0x0334ec39 +SWIDTH2 0x0334ed30 - 0x0334ed39 +SWIDTH2 0x0334ee30 - 0x0334ee39 +SWIDTH2 0x0334ef30 - 0x0334ef39 +SWIDTH2 0x0334f030 - 0x0334f039 +SWIDTH2 0x0334f130 - 0x0334f139 +SWIDTH2 0x0334f230 - 0x0334f239 +SWIDTH2 0x0334f330 - 0x0334f339 +SWIDTH2 0x0334f430 - 0x0334f439 +SWIDTH2 0x0334f530 - 0x0334f539 +SWIDTH2 0x0334f630 - 0x0334f639 +SWIDTH2 0x0334f730 - 0x0334f739 +SWIDTH2 0x0334f830 - 0x0334f839 +SWIDTH2 0x0334f930 - 0x0334f939 +SWIDTH2 0x0334fa30 - 0x0334fa39 +SWIDTH2 0x0334fb30 - 0x0334fb39 +SWIDTH2 0x0334fc30 - 0x0334fc39 +SWIDTH2 0x0334fd30 - 0x0334fd39 +SWIDTH2 0x0334fe30 - 0x0334fe39 +SWIDTH2 0x03358130 - 0x03358139 +SWIDTH2 0x03358230 - 0x03358239 +SWIDTH2 0x03358330 - 0x03358339 +SWIDTH2 0x03358430 - 0x03358439 +SWIDTH2 0x03358530 - 0x03358539 +SWIDTH2 0x03358630 - 0x03358639 +SWIDTH2 0x03358730 - 0x03358739 +SWIDTH2 0x03358830 - 0x03358839 +SWIDTH2 0x03358930 - 0x03358939 +SWIDTH2 0x03358a30 - 0x03358a39 +SWIDTH2 0x03358b30 - 0x03358b39 +SWIDTH2 0x03358c30 - 0x03358c39 +SWIDTH2 0x03358d30 - 0x03358d39 +SWIDTH2 0x03358e30 - 0x03358e39 +SWIDTH2 0x03358f30 - 0x03358f39 +SWIDTH2 0x03359030 - 0x03359039 +SWIDTH2 0x03359130 - 0x03359139 +SWIDTH2 0x03359230 - 0x03359239 +SWIDTH2 0x03359330 - 0x03359339 +SWIDTH2 0x03359430 - 0x03359439 +SWIDTH2 0x03359530 - 0x03359539 +SWIDTH2 0x03359630 - 0x03359639 +SWIDTH2 0x03359730 - 0x03359739 +SWIDTH2 0x03359830 - 0x03359839 +SWIDTH2 0x03359930 - 0x03359939 +SWIDTH2 0x03359a30 - 0x03359a39 +SWIDTH2 0x03359b30 - 0x03359b39 +SWIDTH2 0x03359c30 - 0x03359c39 +SWIDTH2 0x03359d30 - 0x03359d39 +SWIDTH2 0x03359e30 - 0x03359e39 +SWIDTH2 0x03359f30 - 0x03359f39 +SWIDTH2 0x0335a030 - 0x0335a039 +SWIDTH2 0x0335a130 - 0x0335a139 +SWIDTH2 0x0335a230 - 0x0335a239 +SWIDTH2 0x0335a330 - 0x0335a339 +SWIDTH2 0x0335a430 - 0x0335a439 +SWIDTH2 0x0335a530 - 0x0335a539 +SWIDTH2 0x0335a630 - 0x0335a639 +SWIDTH2 0x0335a730 - 0x0335a739 +SWIDTH2 0x0335a830 - 0x0335a839 +SWIDTH2 0x0335a930 - 0x0335a939 +SWIDTH2 0x0335aa30 - 0x0335aa39 +SWIDTH2 0x0335ab30 - 0x0335ab39 +SWIDTH2 0x0335ac30 - 0x0335ac39 +SWIDTH2 0x0335ad30 - 0x0335ad39 +SWIDTH2 0x0335ae30 - 0x0335ae39 +SWIDTH2 0x0335af30 - 0x0335af39 +SWIDTH2 0x0335b030 - 0x0335b039 +SWIDTH2 0x0335b130 - 0x0335b139 +SWIDTH2 0x0335b230 - 0x0335b239 +SWIDTH2 0x0335b330 - 0x0335b339 +SWIDTH2 0x0335b430 - 0x0335b439 +SWIDTH2 0x0335b530 - 0x0335b539 +SWIDTH2 0x0335b630 - 0x0335b639 +SWIDTH2 0x0335b730 - 0x0335b739 +SWIDTH2 0x0335b830 - 0x0335b839 +SWIDTH2 0x0335b930 - 0x0335b939 +SWIDTH2 0x0335ba30 - 0x0335ba39 +SWIDTH2 0x0335bb30 - 0x0335bb39 +SWIDTH2 0x0335bc30 - 0x0335bc39 +SWIDTH2 0x0335bd30 - 0x0335bd39 +SWIDTH2 0x0335be30 - 0x0335be39 +SWIDTH2 0x0335bf30 - 0x0335bf39 +SWIDTH2 0x0335c030 - 0x0335c039 +SWIDTH2 0x0335c130 - 0x0335c139 +SWIDTH2 0x0335c230 - 0x0335c239 +SWIDTH2 0x0335c330 - 0x0335c339 +SWIDTH2 0x0335c430 - 0x0335c439 +SWIDTH2 0x0335c530 - 0x0335c539 +SWIDTH2 0x0335c630 - 0x0335c639 +SWIDTH2 0x0335c730 - 0x0335c739 +SWIDTH2 0x0335c830 - 0x0335c839 +SWIDTH2 0x0335c930 - 0x0335c939 +SWIDTH2 0x0335ca30 - 0x0335ca39 +SWIDTH2 0x0335cb30 - 0x0335cb39 +SWIDTH2 0x0335cc30 - 0x0335cc39 +SWIDTH2 0x0335cd30 - 0x0335cd39 +SWIDTH2 0x0335ce30 - 0x0335ce39 +SWIDTH2 0x0335cf30 - 0x0335cf39 +SWIDTH2 0x0335d030 - 0x0335d039 +SWIDTH2 0x0335d130 - 0x0335d139 +SWIDTH2 0x0335d230 - 0x0335d239 +SWIDTH2 0x0335d330 - 0x0335d339 +SWIDTH2 0x0335d430 - 0x0335d439 +SWIDTH2 0x0335d530 - 0x0335d539 +SWIDTH2 0x0335d630 - 0x0335d639 +SWIDTH2 0x0335d730 - 0x0335d739 +SWIDTH2 0x0335d830 - 0x0335d839 +SWIDTH2 0x0335d930 - 0x0335d939 +SWIDTH2 0x0335da30 - 0x0335da39 +SWIDTH2 0x0335db30 - 0x0335db39 +SWIDTH2 0x0335dc30 - 0x0335dc39 +SWIDTH2 0x0335dd30 - 0x0335dd39 +SWIDTH2 0x0335de30 - 0x0335de39 +SWIDTH2 0x0335df30 - 0x0335df39 +SWIDTH2 0x0335e030 - 0x0335e039 +SWIDTH2 0x0335e130 - 0x0335e139 +SWIDTH2 0x0335e230 - 0x0335e239 +SWIDTH2 0x0335e330 - 0x0335e339 +SWIDTH2 0x0335e430 - 0x0335e439 +SWIDTH2 0x0335e530 - 0x0335e539 +SWIDTH2 0x0335e630 - 0x0335e639 +SWIDTH2 0x0335e730 - 0x0335e739 +SWIDTH2 0x0335e830 - 0x0335e839 +SWIDTH2 0x0335e930 - 0x0335e939 +SWIDTH2 0x0335ea30 - 0x0335ea39 +SWIDTH2 0x0335eb30 - 0x0335eb39 +SWIDTH2 0x0335ec30 - 0x0335ec39 +SWIDTH2 0x0335ed30 - 0x0335ed39 +SWIDTH2 0x0335ee30 - 0x0335ee39 +SWIDTH2 0x0335ef30 - 0x0335ef39 +SWIDTH2 0x0335f030 - 0x0335f039 +SWIDTH2 0x0335f130 - 0x0335f139 +SWIDTH2 0x0335f230 - 0x0335f239 +SWIDTH2 0x0335f330 - 0x0335f339 +SWIDTH2 0x0335f430 - 0x0335f439 +SWIDTH2 0x0335f530 - 0x0335f539 +SWIDTH2 0x0335f630 - 0x0335f639 +SWIDTH2 0x0335f730 - 0x0335f739 +SWIDTH2 0x0335f830 - 0x0335f839 +SWIDTH2 0x0335f930 - 0x0335f939 +SWIDTH2 0x0335fa30 - 0x0335fa39 +SWIDTH2 0x0335fb30 - 0x0335fb39 +SWIDTH2 0x0335fc30 - 0x0335fc39 +SWIDTH2 0x0335fd30 - 0x0335fd39 +SWIDTH2 0x0335fe30 - 0x0335fe39 +SWIDTH2 0x03368130 - 0x03368139 +SWIDTH2 0x03368230 - 0x03368239 +SWIDTH2 0x03368330 - 0x03368339 +SWIDTH2 0x03368430 - 0x03368439 +SWIDTH2 0x03368530 - 0x03368539 +SWIDTH2 0x03368630 - 0x03368639 +SWIDTH2 0x03368730 - 0x03368739 +SWIDTH2 0x03368830 - 0x03368839 +SWIDTH2 0x03368930 - 0x03368939 +SWIDTH2 0x03368a30 - 0x03368a39 +SWIDTH2 0x03368b30 - 0x03368b39 +SWIDTH2 0x03368c30 - 0x03368c39 +SWIDTH2 0x03368d30 - 0x03368d39 +SWIDTH2 0x03368e30 - 0x03368e39 +SWIDTH2 0x03368f30 - 0x03368f39 +SWIDTH2 0x03369030 - 0x03369039 +SWIDTH2 0x03369130 - 0x03369139 +SWIDTH2 0x03369230 - 0x03369239 +SWIDTH2 0x03369330 - 0x03369339 +SWIDTH2 0x03369430 - 0x03369439 +SWIDTH2 0x03369530 - 0x03369539 +SWIDTH2 0x03369630 - 0x03369639 +SWIDTH2 0x03369730 - 0x03369739 +SWIDTH2 0x03369830 - 0x03369839 +SWIDTH2 0x03369930 - 0x03369939 +SWIDTH2 0x03369a30 - 0x03369a39 +SWIDTH2 0x03369b30 - 0x03369b39 +SWIDTH2 0x03369c30 - 0x03369c39 +SWIDTH2 0x03369d30 - 0x03369d39 +SWIDTH2 0x03369e30 - 0x03369e39 +SWIDTH2 0x03369f30 - 0x03369f39 +SWIDTH2 0x0336a030 - 0x0336a039 +SWIDTH2 0x0336a130 - 0x0336a139 +SWIDTH2 0x0336a230 - 0x0336a239 +SWIDTH2 0x0336a330 - 0x0336a339 +SWIDTH2 0x0336a430 - 0x0336a439 +SWIDTH2 0x0336a530 - 0x0336a539 +SWIDTH2 0x0336a630 - 0x0336a639 +SWIDTH2 0x0336a730 - 0x0336a739 +SWIDTH2 0x0336a830 - 0x0336a839 +SWIDTH2 0x0336a930 - 0x0336a939 +SWIDTH2 0x0336aa30 - 0x0336aa39 +SWIDTH2 0x0336ab30 - 0x0336ab39 +SWIDTH2 0x0336ac30 - 0x0336ac39 +SWIDTH2 0x0336ad30 - 0x0336ad39 +SWIDTH2 0x0336ae30 - 0x0336ae39 +SWIDTH2 0x0336af30 - 0x0336af39 +SWIDTH2 0x0336b030 - 0x0336b039 +SWIDTH2 0x0336b130 - 0x0336b139 +SWIDTH2 0x0336b230 - 0x0336b239 +SWIDTH2 0x0336b330 - 0x0336b339 +SWIDTH2 0x0336b430 - 0x0336b439 +SWIDTH2 0x0336b530 - 0x0336b539 +SWIDTH2 0x0336b630 - 0x0336b639 +SWIDTH2 0x0336b730 - 0x0336b739 +SWIDTH2 0x0336b830 - 0x0336b839 +SWIDTH2 0x0336b930 - 0x0336b939 +SWIDTH2 0x0336ba30 - 0x0336ba39 +SWIDTH2 0x0336bb30 - 0x0336bb39 +SWIDTH2 0x0336bc30 - 0x0336bc39 +SWIDTH2 0x0336bd30 - 0x0336bd39 +SWIDTH2 0x0336be30 - 0x0336be36 +SWIDTH2 0x04308131 - 0x04308139 +SWIDTH2 0x04308230 - 0x04308239 +SWIDTH2 0x04308330 - 0x04308339 +SWIDTH2 0x04308430 - 0x04308439 +SWIDTH2 0x04308530 - 0x04308539 +SWIDTH2 0x04308630 - 0x04308639 +SWIDTH2 0x04308730 - 0x04308739 +SWIDTH2 0x04308830 - 0x04308839 +SWIDTH2 0x04308930 - 0x04308939 +SWIDTH2 0x04308a30 - 0x04308a39 +SWIDTH2 0x04308b30 - 0x04308b39 +SWIDTH2 0x04308c30 - 0x04308c39 +SWIDTH2 0x04308d30 - 0x04308d39 +SWIDTH2 0x04308e30 - 0x04308e39 +SWIDTH2 0x04308f30 - 0x04308f39 +SWIDTH2 0x04309030 - 0x04309039 +SWIDTH2 0x04309130 - 0x04309139 +SWIDTH2 0x04309230 - 0x04309239 +SWIDTH2 0x04309330 - 0x04309339 +SWIDTH2 0x04309430 - 0x04309439 +SWIDTH2 0x04309530 - 0x04309539 +SWIDTH2 0x04309630 - 0x04309639 +SWIDTH2 0x04309730 - 0x04309739 +SWIDTH2 0x04309830 - 0x04309839 +SWIDTH2 0x04309930 - 0x04309939 +SWIDTH2 0x04309a30 - 0x04309a39 +SWIDTH2 0x04309b30 - 0x04309b39 +SWIDTH2 0x04309c30 - 0x04309c39 +SWIDTH2 0x04309d30 0x04309d31 0x04309d34 - 0x04309d39 +SWIDTH2 0x04309e30 - 0x04309e39 +SWIDTH2 0x04309f30 - 0x04309f39 +SWIDTH2 0x0430a030 - 0x0430a039 +SWIDTH2 0x0430a130 - 0x0430a139 +SWIDTH2 0x0430a230 - 0x0430a239 +SWIDTH2 0x0430a330 - 0x0430a332 +SWIDTH2 0x04318538 0x04318539 +SWIDTH2 0x04318630 0x04318634 +SWIDTH2 0x04319535 0x04319536 +SWIDTH2 0x0431a234 +TODIGIT < 0x01308535 - 0x01308536 : 0x0002 > +TODIGIT < 0x01308631 0x0001 > +TODIGIT < 0x01318936 - 0x01318939 : 0x0000 > +TODIGIT < 0x01318a30 - 0x01318a35 : 0x0000 > +TODIGIT < 0x01319830 - 0x01319839 : 0x0000 > +TODIGIT < 0x0131d730 - 0x0131d739 : 0x0000 > +TODIGIT < 0x0131e338 - 0x0131e339 : 0x0000 > +TODIGIT < 0x0131e430 - 0x0131e437 : 0x0000 > +TODIGIT < 0x0131f036 - 0x0131f039 : 0x0000 > +TODIGIT < 0x0131f130 - 0x0131f135 : 0x0000 > +TODIGIT < 0x0131fd34 - 0x0131fd39 : 0x0000 > +TODIGIT < 0x0131fe30 - 0x0131fe33 : 0x0000 > +TODIGIT < 0x01328c32 - 0x01328c39 : 0x0000 > +TODIGIT < 0x01328d30 - 0x01328d31 : 0x0000 > +TODIGIT < 0x01329931 - 0x01329939 : 0x0001 > +TODIGIT < 0x0132a538 - 0x0132a539 : 0x0000 > +TODIGIT < 0x0132a630 - 0x0132a637 : 0x0000 > +TODIGIT < 0x0132b236 - 0x0132b239 : 0x0000 > +TODIGIT < 0x0132b330 - 0x0132b335 : 0x0000 > +TODIGIT < 0x0132bf34 - 0x0132bf39 : 0x0000 > +TODIGIT < 0x0132c030 - 0x0132c033 : 0x0000 > +TODIGIT < 0x0132d638 - 0x0132d639 : 0x0000 > +TODIGIT < 0x0132d730 - 0x0132d737 : 0x0000 > +TODIGIT < 0x0132e336 - 0x0132e339 : 0x0000 > +TODIGIT < 0x0132e430 - 0x0132e435 : 0x0000 > +TODIGIT < 0x0132eb36 - 0x0132eb39 : 0x0000 > +TODIGIT < 0x0132ec30 - 0x0132ec35 : 0x0000 > +TODIGIT < 0x01338a34 - 0x01338a39 : 0x0000 > +TODIGIT < 0x01338b30 - 0x01338b33 : 0x0000 > +TODIGIT < 0x0133db33 - 0x0133db39 : 0x0001 > +TODIGIT < 0x0133dc30 - 0x0133dc31 : 0x0001 > +TODIGIT < 0x0134cf36 - 0x0134cf39 : 0x0000 > +TODIGIT < 0x0134d030 - 0x0134d035 : 0x0000 > +TODIGIT < 0x0134d434 - 0x0134d439 : 0x0000 > +TODIGIT < 0x0134d530 - 0x0134d533 : 0x0000 > +TODIGIT < 0x0136ad32 0x0000 > +TODIGIT < 0x0136ad36 - 0x0136ad39 : 0x0004 > +TODIGIT < 0x0136ae30 - 0x0136ae31 : 0x0004 > +TODIGIT < 0x0136ae38 - 0x0136ae39 : 0x0000 > +TODIGIT < 0x0136af30 - 0x0136af37 : 0x0000 > +UPPER 0x01308638 0x01308639 +UPPER 0x01308730 - 0x01308739 +UPPER 0x01308830 - 0x01308839 +UPPER 0x01308930 - 0x01308937 +UPPER 0x01308b38 0x01308b39 +UPPER 0x01308c31 0x01308c33 0x01308c35 0x01308c37 0x01308c39 +UPPER 0x01308d31 0x01308d33 0x01308d35 0x01308d36 0x01308d38 +UPPER 0x01308e30 0x01308e32 0x01308e33 0x01308e35 0x01308e37 0x01308e39 +UPPER 0x01308f31 0x01308f33 0x01308f35 0x01308f37 0x01308f38 +UPPER 0x01309030 0x01309032 0x01309034 0x01309036 0x01309038 +UPPER 0x01309131 0x01309133 0x01309135 0x01309137 0x01309139 +UPPER 0x01309231 0x01309232 0x01309234 0x01309236 0x01309238 0x01309239 +UPPER 0x01309331 0x01309333 0x01309335 0x01309337 0x01309339 +UPPER 0x01309431 0x01309433 0x01309435 0x01309437 0x01309439 +UPPER 0x01309531 0x01309533 0x01309535 0x01309537 0x01309538 +UPPER 0x01309630 0x01309632 0x01309634 0x01309636 0x01309638 +UPPER 0x01309730 0x01309731 0x01309733 0x01309735 0x01309739 +UPPER 0x01309830 0x01309832 0x01309834 0x01309835 0x01309837 - 0x01309839 +UPPER 0x01309932 - 0x01309935 0x01309937 0x01309938 +UPPER 0x01309a30 - 0x01309a32 0x01309a36 0x01309a37 0x01309a39 +UPPER 0x01309b30 0x01309b32 0x01309b34 0x01309b36 0x01309b37 0x01309b39 +UPPER 0x01309c32 0x01309c34 0x01309c35 0x01309c37 - 0x01309c39 +UPPER 0x01309d31 0x01309d33 0x01309d34 0x01309d38 +UPPER 0x01309e36 0x01309e39 +UPPER 0x01309f32 0x01309f35 - 0x01309f39 +UPPER 0x0130a030 - 0x0130a032 0x0130a034 0x0130a036 0x0130a038 +UPPER 0x0130a130 0x0130a132 0x0130a134 0x0130a136 0x0130a138 +UPPER 0x0130a230 0x0130a233 0x0130a236 0x0130a238 0x0130a239 +UPPER 0x0130a330 0x0130a331 0x0130a333 0x0130a335 0x0130a337 0x0130a339 +UPPER 0x0130a431 0x0130a433 0x0130a435 0x0130a437 0x0130a439 +UPPER 0x0130a531 0x0130a533 0x0130a535 0x0130a537 0x0130a539 +UPPER 0x0130a631 0x0130a633 0x0130a635 0x0130a637 0x0130a639 +UPPER 0x0130a731 0x0130a733 0x0130a735 0x0130a737 0x0130a739 +UPPER 0x0130a831 0x0130a833 0x0130a835 0x0130a837 +UPPER 0x0130ca30 0x0130ca32 - 0x0130ca34 0x0130ca36 0x0130ca38 0x0130ca39 +UPPER 0x0130cb32 0x0130cb33 +UPPER 0x0130cc38 0x0130cc39 +UPPER 0x0130cd30 0x0130cd34 0x0130cd36 0x0130cd38 +UPPER 0x0130ce30 0x0130ce32 0x0130ce34 0x0130ce36 0x0130ce38 +UPPER 0x0130cf30 0x0130cf32 0x0130cf34 0x0130cf36 +UPPER 0x0130d032 +UPPER 0x0130d134 - 0x0130d139 +UPPER 0x0130d230 - 0x0130d238 +UPPER 0x0130d434 0x0130d436 0x0130d438 +UPPER 0x0130d530 0x0130d532 0x0130d534 0x0130d536 0x0130d538 +UPPER 0x0130d630 0x0130d632 0x0130d634 0x0130d636 0x0130d638 +UPPER 0x0130d730 0x0130d732 0x0130d734 0x0130d736 +UPPER 0x0130d836 0x0130d838 +UPPER 0x0130d930 0x0130d932 0x0130d934 0x0130d936 0x0130d938 +UPPER 0x0130da30 0x0130da32 0x0130da34 0x0130da36 0x0130da38 +UPPER 0x0130db30 0x0130db32 0x0130db34 0x0130db36 0x0130db38 +UPPER 0x0130dc30 0x0130dc32 0x0130dc34 0x0130dc36 0x0130dc38 +UPPER 0x0130dd30 0x0130dd32 0x0130dd34 0x0130dd36 0x0130dd38 +UPPER 0x0130de30 0x0130de31 0x0130de33 0x0130de35 0x0130de37 0x0130de39 +UPPER 0x0130df31 0x0130df33 0x0130df36 0x0130df38 +UPPER 0x0130e030 0x0130e032 0x0130e034 0x0130e036 0x0130e038 +UPPER 0x0130e130 0x0130e132 0x0130e134 0x0130e136 0x0130e138 +UPPER 0x0130e230 0x0130e232 0x0130e234 0x0130e236 0x0130e238 +UPPER 0x0130e330 0x0130e332 0x0130e336 +UPPER 0x0130e434 0x0130e436 0x0130e438 +UPPER 0x0130e530 0x0130e532 0x0130e534 0x0130e536 0x0130e538 +UPPER 0x0130e933 - 0x0130e939 +UPPER 0x0130ea30 - 0x0130ea39 +UPPER 0x0130eb30 - 0x0130eb39 +UPPER 0x0130ec30 - 0x0130ec39 +UPPER 0x0130ed30 +UPPER 0x01339430 - 0x01339439 +UPPER 0x01339530 - 0x01339539 +UPPER 0x01339630 - 0x01339639 +UPPER 0x01339730 - 0x01339737 +UPPER 0x0135ee34 0x0135ee36 0x0135ee38 +UPPER 0x0135ef30 0x0135ef32 0x0135ef34 0x0135ef36 0x0135ef38 +UPPER 0x0135f030 0x0135f032 0x0135f034 0x0135f036 0x0135f038 +UPPER 0x0135f130 0x0135f132 0x0135f134 0x0135f136 0x0135f138 +UPPER 0x0135f230 0x0135f232 0x0135f234 0x0135f236 0x0135f238 +UPPER 0x0135f330 0x0135f332 0x0135f334 0x0135f336 0x0135f338 +UPPER 0x0135f430 0x0135f432 0x0135f434 0x0135f436 0x0135f438 +UPPER 0x0135f530 0x0135f532 0x0135f534 0x0135f536 0x0135f538 +UPPER 0x0135f630 0x0135f632 0x0135f634 0x0135f636 0x0135f638 +UPPER 0x0135f730 0x0135f732 0x0135f734 0x0135f736 0x0135f738 +UPPER 0x0135f830 0x0135f832 0x0135f834 0x0135f836 0x0135f838 +UPPER 0x0135f930 0x0135f932 0x0135f934 0x0135f936 0x0135f938 +UPPER 0x0135fa30 0x0135fa32 0x0135fa34 0x0135fa36 0x0135fa38 +UPPER 0x0135fb30 0x0135fb32 0x0135fb34 0x0135fb36 0x0135fb38 +UPPER 0x0135fc30 0x0135fc32 0x0135fc34 0x0135fc36 0x0135fc38 +UPPER 0x0135fd30 0x0135fd32 +UPPER 0x0135fe34 0x0135fe36 0x0135fe38 +UPPER 0x01368130 0x01368132 0x01368134 0x01368136 0x01368138 +UPPER 0x01368230 0x01368232 0x01368234 0x01368236 0x01368238 +UPPER 0x01368330 0x01368332 0x01368334 0x01368336 0x01368338 +UPPER 0x01368430 0x01368432 0x01368434 0x01368436 0x01368438 +UPPER 0x01368530 0x01368532 0x01368534 0x01368536 0x01368538 +UPPER 0x01368630 0x01368632 0x01368634 0x01368636 0x01368638 +UPPER 0x01368730 0x01368732 0x01368734 0x01368736 0x01368738 +UPPER 0x01368830 0x01368832 0x01368834 0x01368836 0x01368838 +UPPER 0x01368930 0x01368932 +UPPER 0x01368a38 0x01368a39 +UPPER 0x01368b30 - 0x01368b35 +UPPER 0x01368c34 - 0x01368c39 +UPPER 0x01368e30 - 0x01368e37 +UPPER 0x01368f36 - 0x01368f39 +UPPER 0x01369030 - 0x01369033 +UPPER 0x01369132 - 0x01369137 +UPPER 0x01369239 +UPPER 0x01369331 0x01369333 0x01369335 +UPPER 0x01369434 - 0x01369439 +UPPER 0x01369530 0x01369531 +UPPER 0x01369c34 - 0x01369c37 +UPPER 0x01369e30 - 0x01369e33 +UPPER 0x01369f36 - 0x01369f39 +UPPER 0x0136a132 - 0x0136a136 +UPPER 0x0136a238 0x0136a239 +UPPER 0x0136a330 0x0136a331 +UPPER 0x0136bb37 +UPPER 0x0136bc30 0x0136bc33 - 0x0136bc35 0x0136bc38 0x0136bc39 +UPPER 0x0136bd30 0x0136bd33 0x0136bd36 - 0x0136bd39 +UPPER 0x0136be30 0x0136be36 0x0136be38 +UPPER 0x0136bf30 0x0136bf32 - 0x0136bf35 0x0136bf38 0x0136bf39 +UPPER 0x0136c031 +UPPER 0x0136c132 0x0136c133 0x0136c139 diff --git a/share/mklocale/zh_CN.GB2312.src b/share/mklocale/zh_CN.GB2312.src new file mode 100644 index 0000000000..9498f8104a --- /dev/null +++ b/share/mklocale/zh_CN.GB2312.src @@ -0,0 +1,243 @@ +/* + * GB2312 first byte: A1-FE + * second byte: A1-FE + * + * $FreeBSD: head/share/mklocale/zh_CN.GB2312.src 122146 2003-11-05 22:54:54Z davidxu $ + */ + +ENCODING "GB2312" + +/* + * ASCII compatible + */ +ALPHA 'A' - 'Z' 'a' - 'z' +BLANK ' ' '\t' +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e +LOWER 'a' - 'z' +MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' > +MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' > +PRINT 0x20 - 0x7e +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 +TODIGIT < '0' - '9' : 0 > +TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 > +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' + +/* + * GB2312 data + */ +ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa +ALPHA 0xa6a1 - 0xa6b8 0xa6c1 - 0xa6d8 +ALPHA 0xa7a1 - 0xa7c1 0xa7d1 - 0xa7f1 +ALPHA 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 +BLANK 0xa1a1 +DIGIT 0xa2a1 - 0xa2aa 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc +DIGIT 0xa3b0 - 0xa3b9 +GRAPH 0xa1a9 +GRAPH 0xa2ab - 0xa2b0 0xa2e4 0xa2ef 0xa2f0 0xa2fd 0xa2fe +GRAPH 0xa4f4 - 0xa4fe +GRAPH 0xa5f7 - 0xa5fe +GRAPH 0xa6b9 - 0xa6c0 0xa6d9 - 0xa6df 0xa6ec 0xa6ed 0xa6f3 0xa6f6 - 0xa6fe +GRAPH 0xa7c2 - 0xa7d0 0xa7f2 - 0xa7fe +GRAPH 0xa8bc 0xa8c1 - 0xa8fe +GRAPH 0xa9a1-0xa9a3 0xa9f0 - 0xa9fe +GRAPH 0xaaa1 - 0xaafe +GRAPH 0xaba1 - 0xabfe +GRAPH 0xaca1 - 0xacfe +GRAPH 0xada1 - 0xadfe +GRAPH 0xaea1 - 0xaefe +GRAPH 0xafa1 - 0xaffe +GRAPH 0xd7fa - 0xd7fe +IDEOGRAM 0xb0a1 - 0xb0fe +IDEOGRAM 0xb1a1 - 0xb1fe +IDEOGRAM 0xb2a1 - 0xb2fe +IDEOGRAM 0xb3a1 - 0xb3fe +IDEOGRAM 0xb4a1 - 0xb4fe +IDEOGRAM 0xb5a1 - 0xb5fe +IDEOGRAM 0xb6a1 - 0xb6fe +IDEOGRAM 0xb7a1 - 0xb7fe +IDEOGRAM 0xb8a1 - 0xb8fe +IDEOGRAM 0xb9a1 - 0xb9fe +IDEOGRAM 0xbaa1 - 0xbafe +IDEOGRAM 0xbba1 - 0xbbfe +IDEOGRAM 0xbca1 - 0xbcfe +IDEOGRAM 0xbda1 - 0xbdfe +IDEOGRAM 0xbea1 - 0xbefe +IDEOGRAM 0xbfa1 - 0xbffe +IDEOGRAM 0xc0a1 - 0xc0fe +IDEOGRAM 0xc1a1 - 0xc1fe +IDEOGRAM 0xc2a1 - 0xc2fe +IDEOGRAM 0xc3a1 - 0xc3fe +IDEOGRAM 0xc4a1 - 0xc4fe +IDEOGRAM 0xc5a1 - 0xc5fe +IDEOGRAM 0xc6a1 - 0xc6fe +IDEOGRAM 0xc7a1 - 0xc7fe +IDEOGRAM 0xc8a1 - 0xc8fe +IDEOGRAM 0xc9a1 - 0xc9fe +IDEOGRAM 0xcaa1 - 0xcafe +IDEOGRAM 0xcba1 - 0xcbfe +IDEOGRAM 0xcca1 - 0xccfe +IDEOGRAM 0xcda1 - 0xcdfe +IDEOGRAM 0xcea1 - 0xcefe +IDEOGRAM 0xcfa1 - 0xcffe +IDEOGRAM 0xd0a1 - 0xd0fe +IDEOGRAM 0xd1a1 - 0xd1fe +IDEOGRAM 0xd2a1 - 0xd2fe +IDEOGRAM 0xd3a1 - 0xd3fe +IDEOGRAM 0xd4a1 - 0xd4fe +IDEOGRAM 0xd5a1 - 0xd5fe +IDEOGRAM 0xd6a1 - 0xd6fe +IDEOGRAM 0xd7a1 - 0xd7fe +IDEOGRAM 0xd8a1 - 0xd8fe +IDEOGRAM 0xd9a1 - 0xd9fe +IDEOGRAM 0xdaa1 - 0xdafe +IDEOGRAM 0xdba1 - 0xdbfe +IDEOGRAM 0xdca1 - 0xdcfe +IDEOGRAM 0xdda1 - 0xddfe +IDEOGRAM 0xdea1 - 0xdefe +IDEOGRAM 0xdfa1 - 0xdffe +IDEOGRAM 0xe0a1 - 0xe0fe +IDEOGRAM 0xe1a1 - 0xe1fe +IDEOGRAM 0xe2a1 - 0xe2fe +IDEOGRAM 0xe3a1 - 0xe3fe +IDEOGRAM 0xe4a1 - 0xe4fe +IDEOGRAM 0xe5a1 - 0xe5fe +IDEOGRAM 0xe6a1 - 0xe6fe +IDEOGRAM 0xe7a1 - 0xe7fe +IDEOGRAM 0xe8a1 - 0xe8fe +IDEOGRAM 0xe9a1 - 0xe9fe +IDEOGRAM 0xeaa1 - 0xeafe +IDEOGRAM 0xeba1 - 0xebfe +IDEOGRAM 0xeca1 - 0xecfe +IDEOGRAM 0xeda1 - 0xedfe +IDEOGRAM 0xeea1 - 0xeefe +IDEOGRAM 0xefa1 - 0xeffe +IDEOGRAM 0xf0a1 - 0xf0fe +IDEOGRAM 0xf1a1 - 0xf1fe +IDEOGRAM 0xf2a1 - 0xf2fe +IDEOGRAM 0xf3a1 - 0xf3fe +IDEOGRAM 0xf4a1 - 0xf4fe +IDEOGRAM 0xf5a1 - 0xf5fe +IDEOGRAM 0xf6a1 - 0xf6fe +IDEOGRAM 0xf7a1 - 0xf7fe +LOWER 0xa2a1 - 0xa2aa +LOWER 0xa3e1 - 0xa3fa +LOWER 0xa6c1 - 0xa6d8 +LOWER 0xa7d1 - 0xa7f1 +LOWER 0xa8a1 - 0xa8bb 0xa8bd - 0xa8c0 +MAPLOWER < 0xa2f1 - 0xa2fa : 0xa2a1 > < 0xa2a1 - 0xa2aa : 0xa2a1 > +MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > < 0xa3e1 - 0xa3fa : 0xa3e1 > +MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > < 0xa6c1 - 0xa6d8 : 0xa6c1 > +MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > < 0xa7d1 - 0xa7f1 : 0xa7d1 > +MAPUPPER < 0xa2a1 - 0xa2aa : 0xa2f1 > < 0xa2f1 - 0xa2fc : 0xa2f1 > +MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 > < 0xa3c1 - 0xa3da : 0xa3c1 > +MAPUPPER < 0xa6c1 - 0xa6d8 : 0xa6a1 > < 0xa6a1 - 0xa6b8 : 0xa6a1 > +MAPUPPER < 0xa7d1 - 0xa7f1 : 0xa7a1 > < 0xa7a1 - 0xa7c1 : 0xa7a1 > +PHONOGRAM 0xa4a1 - 0xa4f3 /* Hiragana */ +PHONOGRAM 0xa5a1 - 0xa5f6 /* Katakana */ +PHONOGRAM 0xa8c5 - 0xa8e9 /* Pin yin */ +PRINT 0xa1a1 +PUNCT 0xa1a2 - 0xa1a8 0xa1aa - 0xa1fe +PUNCT 0xa2e3 +PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe +PUNCT 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 +PUNCT 0xa9a4 - 0xa9ef +SPACE 0xa1a1 +SPECIAL 0xa2a1 - 0xa2aa 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc +SPECIAL 0xa8a1 - 0xa8c0 +SPECIAL 0xa9a4 - 0xa9ef /* Box drawings */ +SWIDTH2 0xa1a1 - 0xa1a3 0xa1a8 0xa1a9 0xa1ab 0xa1b2 - 0xa1bf 0xa1e7 0xa1e9 0xa1ea 0xa1fe +SWIDTH2 0xa2e5 - 0xa2ee +SWIDTH2 0xa3a1 - 0xa3fe +SWIDTH2 0xa4a1 - 0xa4f3 +SWIDTH2 0xa5a1 - 0xa5f6 +SWIDTH2 0xa6e0 - 0xa6eb 0xa6ee - 0xa6f2 0xa6f4 0xa6f5 +SWIDTH2 0xa8c5 - 0xa8e9 +SWIDTH2 0xb0a1 - 0xb0fe +SWIDTH2 0xb1a1 - 0xb1fe +SWIDTH2 0xb2a1 - 0xb2fe +SWIDTH2 0xb3a1 - 0xb3fe +SWIDTH2 0xb4a1 - 0xb4fe +SWIDTH2 0xb5a1 - 0xb5fe +SWIDTH2 0xb6a1 - 0xb6fe +SWIDTH2 0xb7a1 - 0xb7fe +SWIDTH2 0xb8a1 - 0xb8fe +SWIDTH2 0xb9a1 - 0xb9fe +SWIDTH2 0xbaa1 - 0xbafe +SWIDTH2 0xbba1 - 0xbbfe +SWIDTH2 0xbca1 - 0xbcfe +SWIDTH2 0xbda1 - 0xbdfe +SWIDTH2 0xbea1 - 0xbefe +SWIDTH2 0xbfa1 - 0xbffe +SWIDTH2 0xc0a1 - 0xc0fe +SWIDTH2 0xc1a1 - 0xc1fe +SWIDTH2 0xc2a1 - 0xc2fe +SWIDTH2 0xc3a1 - 0xc3fe +SWIDTH2 0xc4a1 - 0xc4fe +SWIDTH2 0xc5a1 - 0xc5fe +SWIDTH2 0xc6a1 - 0xc6fe +SWIDTH2 0xc7a1 - 0xc7fe +SWIDTH2 0xc8a1 - 0xc8fe +SWIDTH2 0xc9a1 - 0xc9fe +SWIDTH2 0xcaa1 - 0xcafe +SWIDTH2 0xcba1 - 0xcbfe +SWIDTH2 0xcca1 - 0xccfe +SWIDTH2 0xcda1 - 0xcdfe +SWIDTH2 0xcea1 - 0xcefe +SWIDTH2 0xcfa1 - 0xcffe +SWIDTH2 0xd0a1 - 0xd0fe +SWIDTH2 0xd1a1 - 0xd1fe +SWIDTH2 0xd2a1 - 0xd2fe +SWIDTH2 0xd3a1 - 0xd3fe +SWIDTH2 0xd4a1 - 0xd4fe +SWIDTH2 0xd5a1 - 0xd5fe +SWIDTH2 0xd6a1 - 0xd6fe +SWIDTH2 0xd7a1 - 0xd7f9 +SWIDTH2 0xd8a1 - 0xd8fe +SWIDTH2 0xd9a1 - 0xd9fe +SWIDTH2 0xdaa1 - 0xdafe +SWIDTH2 0xdba1 - 0xdbfe +SWIDTH2 0xdca1 - 0xdcfe +SWIDTH2 0xdda1 - 0xddfe +SWIDTH2 0xdea1 - 0xdefe +SWIDTH2 0xdfa1 - 0xdffe +SWIDTH2 0xe0a1 - 0xe0fe +SWIDTH2 0xe1a1 - 0xe1fe +SWIDTH2 0xe2a1 - 0xe2fe +SWIDTH2 0xe3a1 - 0xe3fe +SWIDTH2 0xe4a1 - 0xe4fe +SWIDTH2 0xe5a1 - 0xe5fe +SWIDTH2 0xe6a1 - 0xe6fe +SWIDTH2 0xe7a1 - 0xe7fe +SWIDTH2 0xe8a1 - 0xe8fe +SWIDTH2 0xe9a1 - 0xe9fe +SWIDTH2 0xeaa1 - 0xeafe +SWIDTH2 0xeba1 - 0xebfe +SWIDTH2 0xeca1 - 0xecfe +SWIDTH2 0xeda1 - 0xedfe +SWIDTH2 0xeea1 - 0xeefe +SWIDTH2 0xefa1 - 0xeffe +SWIDTH2 0xf0a1 - 0xf0fe +SWIDTH2 0xf1a1 - 0xf1fe +SWIDTH2 0xf2a1 - 0xf2fe +SWIDTH2 0xf3a1 - 0xf3fe +SWIDTH2 0xf4a1 - 0xf4fe +SWIDTH2 0xf5a1 - 0xf5fe +SWIDTH2 0xf6a1 - 0xf6fe +SWIDTH2 0xf7a1 - 0xf7fe +TODIGIT < 0xa2a1 - 0xa2aa : 1 > +TODIGIT < 0xa2b1 - 0xa2c4 : 1 > +TODIGIT < 0xa2c5 - 0xa2d8 : 1 > +TODIGIT < 0xa2d9 - 0xa2e2 : 1 > +TODIGIT < 0xa2e5 - 0xa2ee : 1 > +TODIGIT < 0xa2f1 - 0xa2fc : 1 > +TODIGIT < 0xa3b0 - 0xa3b9 : 0 > +TODIGIT < 0xa3c1 - 0xa3c6 : 10 > < 0xa3e1 - 0xa3e6 : 10 > +UPPER 0xa2f1 - 0xa2fc +UPPER 0xa3c1 - 0xa3da +UPPER 0xa6a1 - 0xa6b8 /* Greek */ +UPPER 0xa7a1 - 0xa7c1 /* Cyrillic */ +XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 diff --git a/share/mklocale/zh_CN.GBK.src b/share/mklocale/zh_CN.GBK.src new file mode 100644 index 0000000000..5a5bd88d48 --- /dev/null +++ b/share/mklocale/zh_CN.GBK.src @@ -0,0 +1,328 @@ +/* + * GBK first byte: 81-FE + * second byte: 40-7E, 80-FE + * + * $FreeBSD: head/share/mklocale/zh_CN.GBK.src 156026 2006-02-26 14:03:13Z delphij $ + */ + +ENCODING "GBK" +/* VARIABLE GBK character set */ + +/* + * ASCII + */ +ALPHA 'A' - 'Z' 'a' - 'z' +CONTROL 0x00 - 0x1f 0x7f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e +LOWER 'a' - 'z' +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +SPACE 0x09 - 0x0d 0x20 +UPPER 'A' - 'Z' +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' +PRINT 0x20 - 0x7e +SWIDTH1 0x20 - 0x7e + +MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' > +MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' > +TODIGIT < '0' - '9' : 0 > +TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 > + +/* + * the real thing + */ +IDEOGRAM 0x8140 - 0x817e 0x8180 - 0x81fe +IDEOGRAM 0x8240 - 0x827e 0x8280 - 0x82fe +IDEOGRAM 0x8340 - 0x837e 0x8380 - 0x83fe +IDEOGRAM 0x8440 - 0x847e 0x8480 - 0x84fe +IDEOGRAM 0x8540 - 0x857e 0x8580 - 0x85fe +IDEOGRAM 0x8640 - 0x867e 0x8680 - 0x86fe +IDEOGRAM 0x8740 - 0x877e 0x8780 - 0x87fe +IDEOGRAM 0x8840 - 0x887e 0x8880 - 0x88fe +IDEOGRAM 0x8940 - 0x897e 0x8980 - 0x89fe +IDEOGRAM 0x8a40 - 0x8a7e 0x8a80 - 0x8afe +IDEOGRAM 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe +IDEOGRAM 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe +IDEOGRAM 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe +IDEOGRAM 0x8e40 - 0x8e7e 0x8e80 - 0x8efe +IDEOGRAM 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe +IDEOGRAM 0x9040 - 0x907e 0x9080 - 0x90fe +IDEOGRAM 0x9140 - 0x917e 0x9180 - 0x91fe +IDEOGRAM 0x9240 - 0x927e 0x9280 - 0x92fe +IDEOGRAM 0x9340 - 0x937e 0x9380 - 0x93fe +IDEOGRAM 0x9440 - 0x947e 0x9480 - 0x94fe +IDEOGRAM 0x9540 - 0x957e 0x9580 - 0x95fe +IDEOGRAM 0x9640 - 0x967e 0x9680 - 0x96fe +IDEOGRAM 0x9740 - 0x977e 0x9780 - 0x97fe +IDEOGRAM 0x9840 - 0x987e 0x9880 - 0x98fe +IDEOGRAM 0x9940 - 0x997e 0x9980 - 0x99fe +IDEOGRAM 0x9a40 - 0x9a7e 0x9a80 - 0x9afe +IDEOGRAM 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe +IDEOGRAM 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe +IDEOGRAM 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe +IDEOGRAM 0x9e40 - 0x9e7e 0x9e80 - 0x9efe +IDEOGRAM 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe +IDEOGRAM 0xa040 - 0xa07e 0xa080 - 0xa0fe + +SPACE 0xa1a1 +BLANK 0xa1a1 +PUNCT 0xa1a2 - 0xa1fe + +/* full width 0 1 2 .. 9 */ +/* ?DIGIT 0xa2a1 - 0xa2aa 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc */ + +TODIGIT < 0xa2a1 - 0xa2aa : 1 > +TODIGIT < 0xa2b1 - 0xa2c4 : 1 > +TODIGIT < 0xa2c5 - 0xa2d8 : 1 > +TODIGIT < 0xa2d9 - 0xa2e2 : 1 > +TODIGIT < 0xa2e5 - 0xa2ee : 1 > +TODIGIT < 0xa2f1 - 0xa2fc : 1 > + +ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa +/* ?DIGIT 0xa3b0 - 0xa3b9 */ +UPPER 0xa3c1 - 0xa3da +LOWER 0xa3e1 - 0xa3fa +PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe +/* ?XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 */ + +MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > < 0xa3e1 - 0xa3fa : 0xa3e1 > +MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > < 0xa3b0 - 0xa3b9 : 0xa3c1 > +TODIGIT < 0xa3b0 - 0xa3b9 : 0 > +TODIGIT < 0xa3c1 - 0xa3c6 : 10 > < 0xa3e1 - 0xa3e6 : 10 > + +PHONOGRAM 0xa4a1 - 0xa4f3 /* Hiragana */ +PHONOGRAM 0xa5a1 - 0xa5f6 /* Katakana */ + +UPPER 0xa6a1 - 0xa6b8 /* Greek */ +LOWER 0xa6c1 - 0xa6d8 /* Greek */ +MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > < 0xa6c1 - 0xa6d8 : 0xa6c1 > +MAPUPPER < 0xa6a1 - 0xa6b8 : 0xa6a1 > < 0xa6c1 - 0xa6d8 : 0xa6a1 > + +UPPER 0xa7a1 - 0xa7c1 /* Cyrillic */ +LOWER 0xa7d1 - 0xa7f1 /* Cyrillic */ +MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > < 0xa7d1 - 0xa7f1 : 0xa7d1 > +MAPUPPER < 0xa7a1 - 0xa7c1 : 0xa7a1 > < 0xa7d1 - 0xa7f1 : 0xa7a1 > + +PUNCT 0xa840 - 0xa853 +SPECIAL 0xa854 - 0xa877 /* Box drawings */ +PUNCT 0xa878 - 0xa87e 0xa880 - 0xa895 +SPECIAL 0xa8a1 - 0xa8c0 +PHONOGRAM 0xa8c5 - 0xa8e9 /* Pin yin */ +TODIGIT < 0xa940 - 0xa948 : 1 > +SPECIAL 0xa949 - 0xa95a 0xa95c 0xa960 - 0xa97e 0xa980 - 0xa996 +SPECIAL 0xa9a4 - 0xa9ef /* Box drawings */ + +IDEOGRAM 0xaa40 - 0xaa7e 0xaa80 - 0xaaa0 +IDEOGRAM 0xab40 - 0xab7e 0xab80 - 0xaba0 +IDEOGRAM 0xac40 - 0xac7e 0xac80 - 0xaca0 +IDEOGRAM 0xad40 - 0xad7e 0xad80 - 0xada0 +IDEOGRAM 0xae40 - 0xae7e 0xae80 - 0xaea0 +IDEOGRAM 0xaf40 - 0xaf7e 0xaf80 - 0xafa0 +IDEOGRAM 0xb040 - 0xb07e 0xb080 - 0xb0fe +IDEOGRAM 0xb140 - 0xb17e 0xb180 - 0xb1fe +IDEOGRAM 0xb240 - 0xb27e 0xb280 - 0xb2fe +IDEOGRAM 0xb340 - 0xb37e 0xb380 - 0xb3fe +IDEOGRAM 0xb440 - 0xb47e 0xb480 - 0xb4fe +IDEOGRAM 0xb540 - 0xb57e 0xb580 - 0xb5fe +IDEOGRAM 0xb640 - 0xb67e 0xb680 - 0xb6fe +IDEOGRAM 0xb740 - 0xb77e 0xb780 - 0xb7fe +IDEOGRAM 0xb840 - 0xb87e 0xb880 - 0xb8fe +IDEOGRAM 0xb940 - 0xb97e 0xb980 - 0xb9fe +IDEOGRAM 0xba40 - 0xba7e 0xba80 - 0xbafe +IDEOGRAM 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe +IDEOGRAM 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe +IDEOGRAM 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe +IDEOGRAM 0xbe40 - 0xbe7e 0xbe80 - 0xbefe +IDEOGRAM 0xbf40 - 0xbf7e 0xbf80 - 0xbffe +IDEOGRAM 0xc040 - 0xc07e 0xc080 - 0xc0fe +IDEOGRAM 0xc140 - 0xc17e 0xc180 - 0xc1fe +IDEOGRAM 0xc240 - 0xc27e 0xc280 - 0xc2fe +IDEOGRAM 0xc340 - 0xc37e 0xc380 - 0xc3fe +IDEOGRAM 0xc440 - 0xc47e 0xc480 - 0xc4fe +IDEOGRAM 0xc540 - 0xc57e 0xc580 - 0xc5fe +IDEOGRAM 0xc640 - 0xc67e 0xc680 - 0xc6fe +IDEOGRAM 0xc740 - 0xc77e 0xc780 - 0xc7fe +IDEOGRAM 0xc840 - 0xc87e 0xc880 - 0xc8fe +IDEOGRAM 0xc940 - 0xc97e 0xc980 - 0xc9fe +IDEOGRAM 0xca40 - 0xca7e 0xca80 - 0xcafe +IDEOGRAM 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe +IDEOGRAM 0xcc40 - 0xcc7e 0xcc80 - 0xccfe +IDEOGRAM 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe +IDEOGRAM 0xce40 - 0xce7e 0xce80 - 0xcefe +IDEOGRAM 0xcf40 - 0xcf7e 0xcf80 - 0xcffe +IDEOGRAM 0xd040 - 0xd07e 0xd080 - 0xd0fe +IDEOGRAM 0xd140 - 0xd17e 0xd180 - 0xd1fe +IDEOGRAM 0xd240 - 0xd27e 0xd280 - 0xd2fe +IDEOGRAM 0xd340 - 0xd37e 0xd380 - 0xd3fe +IDEOGRAM 0xd440 - 0xd47e 0xd480 - 0xd4fe +IDEOGRAM 0xd540 - 0xd57e 0xd580 - 0xd5fe +IDEOGRAM 0xd640 - 0xd67e 0xd680 - 0xd6fe +IDEOGRAM 0xd740 - 0xd77e 0xd780 - 0xd7fe +IDEOGRAM 0xd840 - 0xd87e 0xd880 - 0xd8fe +IDEOGRAM 0xd940 - 0xd97e 0xd980 - 0xd9fe +IDEOGRAM 0xda40 - 0xda7e 0xda80 - 0xdafe +IDEOGRAM 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe +IDEOGRAM 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe +IDEOGRAM 0xdd40 - 0xdd7e 0xdd80 - 0xddfe +IDEOGRAM 0xde40 - 0xde7e 0xde80 - 0xdefe +IDEOGRAM 0xdf40 - 0xdf7e 0xdf80 - 0xdffe +IDEOGRAM 0xe040 - 0xe07e 0xe080 - 0xe0fe +IDEOGRAM 0xe140 - 0xe17e 0xe180 - 0xe1fe +IDEOGRAM 0xe240 - 0xe27e 0xe280 - 0xe2fe +IDEOGRAM 0xe340 - 0xe37e 0xe380 - 0xe3fe +IDEOGRAM 0xe440 - 0xe47e 0xe480 - 0xe4fe +IDEOGRAM 0xe540 - 0xe57e 0xe580 - 0xe5fe +IDEOGRAM 0xe640 - 0xe67e 0xe680 - 0xe6fe +IDEOGRAM 0xe740 - 0xe77e 0xe780 - 0xe7fe +IDEOGRAM 0xe840 - 0xe87e 0xe880 - 0xe8fe +IDEOGRAM 0xe940 - 0xe97e 0xe980 - 0xe9fe +IDEOGRAM 0xea40 - 0xea7e 0xea80 - 0xeafe +IDEOGRAM 0xeb40 - 0xeb7e 0xeb80 - 0xebfe +IDEOGRAM 0xec40 - 0xec7e 0xec80 - 0xecfe +IDEOGRAM 0xed40 - 0xed7e 0xed80 - 0xedfe +IDEOGRAM 0xee40 - 0xee7e 0xee80 - 0xeefe +IDEOGRAM 0xef40 - 0xef7e 0xef80 - 0xeffe +IDEOGRAM 0xf040 - 0xf07e 0xf080 - 0xf0fe +IDEOGRAM 0xf140 - 0xf17e 0xf180 - 0xf1fe +IDEOGRAM 0xf240 - 0xf27e 0xf280 - 0xf2fe +IDEOGRAM 0xf340 - 0xf37e 0xf380 - 0xf3fe +IDEOGRAM 0xf440 - 0xf47e 0xf480 - 0xf4fe +IDEOGRAM 0xf540 - 0xf57e 0xf580 - 0xf5fe +IDEOGRAM 0xf640 - 0xf67e 0xf680 - 0xf6fe +IDEOGRAM 0xf740 - 0xf77e 0xf780 - 0xf7fe +IDEOGRAM 0xf840 - 0xf87e 0xf880 - 0xf8a0 +IDEOGRAM 0xf940 - 0xf97e 0xf980 - 0xf9a0 +IDEOGRAM 0xfa40 - 0xfa7e 0xfa80 - 0xfaa0 +IDEOGRAM 0xfb40 - 0xfb7e 0xfb80 - 0xfba0 +IDEOGRAM 0xfc40 - 0xfc7e 0xfc80 - 0xfca0 +IDEOGRAM 0xfd40 - 0xfd7e 0xfd80 - 0xfda0 +IDEOGRAM 0xfe40 - 0xfe7e 0xfe80 - 0xfea0 + +/* The GBK characters are all full-width */ +SWIDTH2 0x8140 - 0x817e 0x8180 - 0x81fe +SWIDTH2 0x8240 - 0x827e 0x8280 - 0x82fe +SWIDTH2 0x8340 - 0x837e 0x8380 - 0x83fe +SWIDTH2 0x8440 - 0x847e 0x8480 - 0x84fe +SWIDTH2 0x8540 - 0x857e 0x8580 - 0x85fe +SWIDTH2 0x8640 - 0x867e 0x8680 - 0x86fe +SWIDTH2 0x8740 - 0x877e 0x8780 - 0x87fe +SWIDTH2 0x8840 - 0x887e 0x8880 - 0x88fe +SWIDTH2 0x8940 - 0x897e 0x8980 - 0x89fe +SWIDTH2 0x8a40 - 0x8a7e 0x8a80 - 0x8afe +SWIDTH2 0x8b40 - 0x8b7e 0x8b80 - 0x8bfe +SWIDTH2 0x8c40 - 0x8c7e 0x8c80 - 0x8cfe +SWIDTH2 0x8d40 - 0x8d7e 0x8d80 - 0x8dfe +SWIDTH2 0x8e40 - 0x8e7e 0x8e80 - 0x8efe +SWIDTH2 0x8f40 - 0x8f7e 0x8f80 - 0x8ffe +SWIDTH2 0x9040 - 0x907e 0x9080 - 0x90fe +SWIDTH2 0x9140 - 0x917e 0x9180 - 0x91fe +SWIDTH2 0x9240 - 0x927e 0x9280 - 0x92fe +SWIDTH2 0x9340 - 0x937e 0x9380 - 0x93fe +SWIDTH2 0x9440 - 0x947e 0x9480 - 0x94fe +SWIDTH2 0x9540 - 0x957e 0x9580 - 0x95fe +SWIDTH2 0x9640 - 0x967e 0x9680 - 0x96fe +SWIDTH2 0x9740 - 0x977e 0x9780 - 0x97fe +SWIDTH2 0x9840 - 0x987e 0x9880 - 0x98fe +SWIDTH2 0x9940 - 0x997e 0x9980 - 0x99fe +SWIDTH2 0x9a40 - 0x9a7e 0x9a80 - 0x9afe +SWIDTH2 0x9b40 - 0x9b7e 0x9b80 - 0x9bfe +SWIDTH2 0x9c40 - 0x9c7e 0x9c80 - 0x9cfe +SWIDTH2 0x9d40 - 0x9d7e 0x9d80 - 0x9dfe +SWIDTH2 0x9e40 - 0x9e7e 0x9e80 - 0x9efe +SWIDTH2 0x9f40 - 0x9f7e 0x9f80 - 0x9ffe +SWIDTH2 0xa040 - 0xa07e 0xa080 - 0xa0fe +SWIDTH2 0xa140 - 0xa17e 0xa180 - 0xa1fe +SWIDTH2 0xa240 - 0xa27e 0xa280 - 0xa2fe +SWIDTH2 0xa340 - 0xa37e 0xa380 - 0xa3fe +SWIDTH2 0xa440 - 0xa47e 0xa480 - 0xa4fe +SWIDTH2 0xa540 - 0xa57e 0xa580 - 0xa5fe +SWIDTH2 0xa640 - 0xa67e 0xa680 - 0xa6fe +SWIDTH2 0xa740 - 0xa77e 0xa780 - 0xa7fe +SWIDTH2 0xa840 - 0xa87e 0xa880 - 0xa8fe +SWIDTH2 0xa940 - 0xa97e 0xa980 - 0xa9fe +SWIDTH2 0xaa40 - 0xaa7e 0xaa80 - 0xaafe +SWIDTH2 0xab40 - 0xab7e 0xab80 - 0xabfe +SWIDTH2 0xac40 - 0xac7e 0xac80 - 0xacfe +SWIDTH2 0xad40 - 0xad7e 0xad80 - 0xadfe +SWIDTH2 0xae40 - 0xae7e 0xae80 - 0xaefe +SWIDTH2 0xaf40 - 0xaf7e 0xaf80 - 0xaffe +SWIDTH2 0xb040 - 0xb07e 0xb080 - 0xb0fe +SWIDTH2 0xb140 - 0xb17e 0xb180 - 0xb1fe +SWIDTH2 0xb240 - 0xb27e 0xb280 - 0xb2fe +SWIDTH2 0xb340 - 0xb37e 0xb380 - 0xb3fe +SWIDTH2 0xb440 - 0xb47e 0xb480 - 0xb4fe +SWIDTH2 0xb540 - 0xb57e 0xb580 - 0xb5fe +SWIDTH2 0xb640 - 0xb67e 0xb680 - 0xb6fe +SWIDTH2 0xb740 - 0xb77e 0xb780 - 0xb7fe +SWIDTH2 0xb840 - 0xb87e 0xb880 - 0xb8fe +SWIDTH2 0xb940 - 0xb97e 0xb980 - 0xb9fe +SWIDTH2 0xba40 - 0xba7e 0xba80 - 0xbafe +SWIDTH2 0xbb40 - 0xbb7e 0xbb80 - 0xbbfe +SWIDTH2 0xbc40 - 0xbc7e 0xbc80 - 0xbcfe +SWIDTH2 0xbd40 - 0xbd7e 0xbd80 - 0xbdfe +SWIDTH2 0xbe40 - 0xbe7e 0xbe80 - 0xbefe +SWIDTH2 0xbf40 - 0xbf7e 0xbf80 - 0xbffe +SWIDTH2 0xc040 - 0xc07e 0xc080 - 0xc0fe +SWIDTH2 0xc140 - 0xc17e 0xc180 - 0xc1fe +SWIDTH2 0xc240 - 0xc27e 0xc280 - 0xc2fe +SWIDTH2 0xc340 - 0xc37e 0xc380 - 0xc3fe +SWIDTH2 0xc440 - 0xc47e 0xc480 - 0xc4fe +SWIDTH2 0xc540 - 0xc57e 0xc580 - 0xc5fe +SWIDTH2 0xc640 - 0xc67e 0xc680 - 0xc6fe +SWIDTH2 0xc740 - 0xc77e 0xc780 - 0xc7fe +SWIDTH2 0xc840 - 0xc87e 0xc880 - 0xc8fe +SWIDTH2 0xc940 - 0xc97e 0xc980 - 0xc9fe +SWIDTH2 0xca40 - 0xca7e 0xca80 - 0xcafe +SWIDTH2 0xcb40 - 0xcb7e 0xcb80 - 0xcbfe +SWIDTH2 0xcc40 - 0xcc7e 0xcc80 - 0xccfe +SWIDTH2 0xcd40 - 0xcd7e 0xcd80 - 0xcdfe +SWIDTH2 0xce40 - 0xce7e 0xce80 - 0xcefe +SWIDTH2 0xcf40 - 0xcf7e 0xcf80 - 0xcffe +SWIDTH2 0xd040 - 0xd07e 0xd080 - 0xd0fe +SWIDTH2 0xd140 - 0xd17e 0xd180 - 0xd1fe +SWIDTH2 0xd240 - 0xd27e 0xd280 - 0xd2fe +SWIDTH2 0xd340 - 0xd37e 0xd380 - 0xd3fe +SWIDTH2 0xd440 - 0xd47e 0xd480 - 0xd4fe +SWIDTH2 0xd540 - 0xd57e 0xd580 - 0xd5fe +SWIDTH2 0xd640 - 0xd67e 0xd680 - 0xd6fe +SWIDTH2 0xd740 - 0xd77e 0xd780 - 0xd7fe +SWIDTH2 0xd840 - 0xd87e 0xd880 - 0xd8fe +SWIDTH2 0xd940 - 0xd97e 0xd980 - 0xd9fe +SWIDTH2 0xda40 - 0xda7e 0xda80 - 0xdafe +SWIDTH2 0xdb40 - 0xdb7e 0xdb80 - 0xdbfe +SWIDTH2 0xdc40 - 0xdc7e 0xdc80 - 0xdcfe +SWIDTH2 0xdd40 - 0xdd7e 0xdd80 - 0xddfe +SWIDTH2 0xde40 - 0xde7e 0xde80 - 0xdefe +SWIDTH2 0xdf40 - 0xdf7e 0xdf80 - 0xdffe +SWIDTH2 0xe040 - 0xe07e 0xe080 - 0xe0fe +SWIDTH2 0xe140 - 0xe17e 0xe180 - 0xe1fe +SWIDTH2 0xe240 - 0xe27e 0xe280 - 0xe2fe +SWIDTH2 0xe340 - 0xe37e 0xe380 - 0xe3fe +SWIDTH2 0xe440 - 0xe47e 0xe480 - 0xe4fe +SWIDTH2 0xe540 - 0xe57e 0xe580 - 0xe5fe +SWIDTH2 0xe640 - 0xe67e 0xe680 - 0xe6fe +SWIDTH2 0xe740 - 0xe77e 0xe780 - 0xe7fe +SWIDTH2 0xe840 - 0xe87e 0xe880 - 0xe8fe +SWIDTH2 0xe940 - 0xe97e 0xe980 - 0xe9fe +SWIDTH2 0xea40 - 0xea7e 0xea80 - 0xeafe +SWIDTH2 0xeb40 - 0xeb7e 0xeb80 - 0xebfe +SWIDTH2 0xec40 - 0xec7e 0xec80 - 0xecfe +SWIDTH2 0xed40 - 0xed7e 0xed80 - 0xedfe +SWIDTH2 0xee40 - 0xee7e 0xee80 - 0xeefe +SWIDTH2 0xef40 - 0xef7e 0xef80 - 0xeffe +SWIDTH2 0xf040 - 0xf07e 0xf080 - 0xf0fe +SWIDTH2 0xf140 - 0xf17e 0xf180 - 0xf1fe +SWIDTH2 0xf240 - 0xf27e 0xf280 - 0xf2fe +SWIDTH2 0xf340 - 0xf37e 0xf380 - 0xf3fe +SWIDTH2 0xf440 - 0xf47e 0xf480 - 0xf4fe +SWIDTH2 0xf540 - 0xf57e 0xf580 - 0xf5fe +SWIDTH2 0xf640 - 0xf67e 0xf680 - 0xf6fe +SWIDTH2 0xf740 - 0xf77e 0xf780 - 0xf7fe +SWIDTH2 0xf840 - 0xf87e 0xf880 - 0xf8fe +SWIDTH2 0xf940 - 0xf97e 0xf980 - 0xf9fe +SWIDTH2 0xfa40 - 0xfa7e 0xfa80 - 0xfafe +SWIDTH2 0xfb40 - 0xfb7e 0xfb80 - 0xfbfe +SWIDTH2 0xfc40 - 0xfc7e 0xfc80 - 0xfcfe +SWIDTH2 0xfd40 - 0xfd7e 0xfd80 - 0xfdfe +SWIDTH2 0xfe40 - 0xfe7e 0xfe80 - 0xfefe diff --git a/share/locale/ctype/zh_CN.eucCN.src b/share/mklocale/zh_CN.eucCN.src similarity index 95% rename from share/locale/ctype/zh_CN.eucCN.src rename to share/mklocale/zh_CN.eucCN.src index 8e090ba7bb..81baae8129 100644 --- a/share/locale/ctype/zh_CN.eucCN.src +++ b/share/mklocale/zh_CN.eucCN.src @@ -1,5 +1,3 @@ -/* $NetBSD: zh_CN.eucCN.src,v 1.2 2001/03/26 19:56:37 tshiozak Exp $ */ - /*- * Copyright (c) 1998, Luoqi Chen * All rights reserved. @@ -25,11 +23,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/mklocale/data/zh_CN.EUC.src,v 1.2.2.1 1999/08/29 15:31:06 peter Exp $ + * $FreeBSD: head/share/mklocale/zh_CN.eucCN.src 156056 2006-02-27 06:11:58Z delphij $ */ ENCODING "EUC" -VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 CODESET=eucCN +VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 /* * Code Set 1 @@ -60,7 +58,7 @@ BLANK 0xa1a1 PUNCT 0xa1a2 - 0xa1fe SWIDTH2 0xa1a1 - 0xa1fe -DIGIT 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc +/* ?DIGIT 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc */ SWIDTH2 0xa2b1 - 0xa2e2 0xa2e5 - 0xa2ee 0xa2f1 - 0xa2fc TODIGIT < 0xa2b1 - 0xa2c4 : 0 > @@ -71,13 +69,13 @@ TODIGIT < 0xa2f1 - 0xa2fc : 0 > ALPHA 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa SWIDTH2 0xa3c1 - 0xa3da 0xa3e1 - 0xa3fa -DIGIT 0xa3b0 - 0xa3b9 +/* ?DIGIT 0xa3b0 - 0xa3b9 */ SWIDTH2 0xa3b0 - 0xa3b9 UPPER 0xa3c1 - 0xa3da LOWER 0xa3e1 - 0xa3fa PUNCT 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe SWIDTH2 0xa3a1 - 0xa3af 0xa3ba - 0xa3c0 0xa3db - 0xa3e0 0xa3fb - 0xa3fe -XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 +/* ?XDIGIT 0xa3b0 - 0xa3b9 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6 */ MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > < 0xa3e1 - 0xa3fa : 0xa3e1 > MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 > < 0xa3b0 - 0xa3b9 : 0xa3c1 > diff --git a/share/locale/ctype/zh_HK.Big5-HKSCS.src b/share/mklocale/zh_HK.Big5HKSCS.src similarity index 55% rename from share/locale/ctype/zh_HK.Big5-HKSCS.src rename to share/mklocale/zh_HK.Big5HKSCS.src index a0fd233061..dd0cf67bfe 100644 --- a/share/locale/ctype/zh_HK.Big5-HKSCS.src +++ b/share/mklocale/zh_HK.Big5HKSCS.src @@ -1,15 +1,12 @@ -/* $NetBSD: zh_HK.Big5-HKSCS.src,v 1.1 2007/03/06 15:50:46 tnozaki Exp $ */ - /* * big5hkscs first byte: 81-FE * second byte: 40-7E, A1-FE * - * Original version ID: - * FreeBSD: src/share/mklocale/zh_HK.Big5HKSCS.src,v 1.2 2003/12/19 12:51:40 ache Exp + * $FreeBSD: head/share/mklocale/zh_HK.Big5HKSCS.src 123664 2003-12-19 12:51:40Z ache $ */ -ENCODING "BIG5" -VARIABLE row=0x81-0xFE;col=0x40-0x7E,0xA1-0xFE; CODESET=Big5-HKSCS +ENCODING "GBK" +/* VARIABLE BIG5 character set */ /* * ASCII @@ -84,65 +81,14 @@ IDEOGRAM 0xa064 - 0xa071 0xa073 - 0xa076 0xa078 - 0xa07e IDEOGRAM 0xa0a1 - 0xa0a4 0xa0a6 - 0xa0ac 0xa0ae 0xa0b0 - 0xa0d2 IDEOGRAM 0xa0d4 0xa0d6 - 0xa0de 0xa0e0 0xa0e2 0xa0e3 0xa0e5 - 0xa0fe -SWIDTH2 0x8840 - 0x887e 0x88a1 - 0x88aa -SWIDTH2 0x8940 - 0x8941 0x8943 0x8946 - 0x8949 0x894c - 0x897e -SWIDTH2 0x89a1 - 0x89a6 0x89ab - 0x89ae 0x89b0 - 0x89b2 0x89b5 - 0x89bf -SWIDTH2 0x89c1 - 0x89c3 0x89c5 - 0x89fe -SWIDTH2 0x8a40 0x8a41 0x8a43 - 0x8a62 0x8a64 - 0x8a74 0x8a76 - 0x8a7e -SWIDTH2 0x8aa1 - 0x8aaa 0x8aac - 0x8ab0 0x8ab2 - 0x8ab9 0x8abb - 0x8ac7 -SWIDTH2 0x8ac9 - 0x8acc 0x8ace - 0x8adc 0x8adf - 0x8af4 0x8af6 - 0x8afe -SWIDTH2 0x8b40 - 0x8b53 0x8b55 - 0x8b7e 0x8ba1 - 0x8bdc 0x8bde - 0x8bfd -SWIDTH2 0x8c40 - 0x8c61 0x8c63 - 0x8c7e 0x8ca1 - 0x8ca5 0x8ca7 - 0x8cdc -SWIDTH2 0x8d60 - 0x8d7e 0x8da1 - 0x8ddc -SWIDTH2 0x8e40 - 0x8e68 0x8e6a - 0x8e6e 0x8e70 - 0x8e7d 0x8ea1 - 0x8eaa -SWIDTH2 0x8eac - 0x8eb3 0x8eb5 - 0x8ecc 0x8ece 0x8ecf 0x8ed1 - 0x8efe -SWIDTH2 0x8f40 - 0x8f56 0x8f58 - 0x8f68 0x8f6a - 0x8f6d 0x8f6f - 0x8f7e -SWIDTH2 0x8fa1 - 0x8fca 0x8fcd - 0x8ffd -SWIDTH2 0x9040 - 0x906c 0x906e - 0x9079 0x907b - 0x907e 0x90a1 - 0x90db -SWIDTH2 0x90dd - 0x90f0 0x90f2 - 0x90fe -SWIDTH2 0x9140 - 0x917e 0x91a1 - 0x91be 0x91c0 - 0x91ef -SWIDTH2 0x9240 - 0x9242 0x9245 - 0x927e 0x92a1 - 0x92ae -SWIDTH2 0x92b3 - 0x92c7 0x92c8 - 0x92d0 0x92d2 - 0x92fe -SWIDTH2 0x9340 - 0x937e 0x93a1 - 0x93fe -SWIDTH2 0x9440 - 0x9446 0x9448 - 0x947e 0x94a1 - 0x94c9 0x94cb - 0x94fe -SWIDTH2 0x9540 - 0x957e 0x95a1 - 0x95d8 0x95da - 0x95fe -SWIDTH2 0x9640 - 0x9643 0x9645 - 0x967e 0x96a1 - 0x96ec -SWIDTH2 0x96ee - 0x96fb 0x96fd - 0x96fe -SWIDTH2 0x9740 - 0x977e 0x97a1 - 0x97fe -SWIDTH2 0x9840 - 0x987e 0x98a1 - 0x98fe -SWIDTH2 0x9940 - 0x997e 0x99a1 - 0x99fe -SWIDTH2 0x9a40 - 0x9a7e 0x9aa1 - 0x9afe -SWIDTH2 0x9b40 - 0x9b60 0x9b62 - 0x9b75 0x9b77 0x9b79 0x9b7a -SWIDTH2 0x9b7c - 0x9b7e 0x9ba1 - 0x9bc5 0x9bc7 - 0x9bdd -SWIDTH2 0x9bdf - 0x9beb 0x9bed - 0x9bf5 0x9bf7 - 0x9bfe -SWIDTH2 0x9c40 0x9c41 0x9c43 - 0x9c52 0x9c54 - 0x9c61 0x9c63 - 0x9c67 -SWIDTH2 0x9c69 0x9c6a 0x9c6c - 0x9c76 0x9c78 - 0x9c7e 0x9ca1 - 0x9cbb -SWIDTH2 0x9cbe - 0x9ccf 0x9cd1 - 0x9cfe -SWIDTH2 0x9d40 - 0x9d56 0x9d58 0x9d59 0x9d5b - 0x9d7e -SWIDTH2 0x9da1 - 0x9dc3 0x9dc5 - 0x9dfe -SWIDTH2 0x9e40 - 0x9e7e 0x9ea1 - 0x9ea8 0x9eaa 0x9eab 0x9ead - 0x9ec3 -SWIDTH2 0x9ec5 - 0x9eee 0x9ef0 - 0x9ef3 0x9ef5 - 0x9efc 0x9efe -SWIDTH2 0x9f40 - 0x9f4d 0x9f4f - 0x9f5f 0x9f61 - 0x9f65 0x9f67 - 0x9f7e -SWIDTH2 0x9fa1 - 0x9fac 0x9fae - 0x9fb0 0x9fb2 - 0x9fbf 0x9fc1 - 0x9fc7 -SWIDTH2 0x9fc9 0x9fca 0x9fcc - 0x9fd7 0x9fd9 0x9fdb - 0x9fe5 -SWIDTH2 0x9fe7 - 0x9fe9 0x9feb - 0x9fee 0x9ff0 - 0x9ffe -SWIDTH2 0xa040 - 0xa053 0xa055 0xa056 0xa058 0xa059 0xa05b - 0xa061 -SWIDTH2 0xa064 - 0xa071 0xa073 - 0xa076 0xa078 - 0xa07e -SWIDTH2 0xa0a1 - 0xa0a4 0xa0a6 - 0xa0ac 0xa0ae 0xa0b0 - 0xa0d2 -SWIDTH2 0xa0d4 0xa0d6 - 0xa0de 0xa0e0 0xa0e2 0xa0e3 0xa0e5 - 0xa0fe - PUNCT 0xa141 - 0xa17e 0xa1a1 - 0xa1ac -SWIDTH2 0xa141 - 0xa17e 0xa1a1 - 0xa1ac SPECIAL 0xa1ad - 0xa1fe 0xa240 - 0xa27e 0xa2a1 - 0xa2ae -SWIDTH2 0xa1ad - 0xa1fe 0xa240 - 0xa27e 0xa2a1 - 0xa2ae /* full width 0 1 2 .. 9 */ /* ?DIGIT 0xa2af - 0xa2b8 */ -SWIDTH2 0xa2af - 0xa2b8 /* map these (SuChou Code (12) and Roman (I II etc.) number (10)) to digits */ -SWIDTH2 0xa2b9 - 0xa2ce TODIGIT < 0xa2b9 - 0xa2c2 : 1 > TODIGIT < 0xa2c3 - 0xa2ce : 1 > @@ -150,8 +96,6 @@ TODIGIT < 0xa2c3 - 0xa2ce : 1 > /* note the lower case alphabets are not continuous */ UPPER 0xa2cf - 0xa2e8 LOWER 0xa2e9 - 0xa2fe 0xa340 - 0xa343 -SWIDTH2 0xa2cf - 0xa2e8 -SWIDTH2 0xa2e9 - 0xa2fe 0xa340 - 0xa343 /* we have to got two line for each 'cause they are not continuous */ MAPLOWER < 0xa2cf - 0xa2e4 : 0xa2e9 > < 0xa2e5 - 0xa2e8 : 0xa340 > @@ -163,29 +107,22 @@ MAPUPPER < 0xa2e9 - 0xa2fe : 0xa2cf > < 0xa340 - 0xa343 : 0xa2e5 > SPACE 0xa3bc BLANK 0xa3bc -SWIDTH2 0xa3bc /* bopomofo symbols */ PHONOGRAM 0xa374 - 0xa37e 0xa3a1 - 0xa3bb -SWIDTH2 0xa374 - 0xa37e 0xa3a1 - 0xa3bb /* tone symbols */ PHONOGRAM 0xa3bd - 0xa3bf -SWIDTH2 0xa3bd - 0xa3bf /* control */ CONTROL 0xa3c0 - 0xa3fe /* greek */ UPPER 0xa344 - 0xa35b LOWER 0xa35c - 0xa373 -SWIDTH2 0xa344 - 0xa35b -SWIDTH2 0xa35c - 0xa373 MAPUPPER < 0xa344 - 0xa35b : 0xa344 > < 0xa35c - 0xa373 : 0xa344 > MAPLOWER < 0xa344 - 0xa35b : 0xa35c > < 0xa35c - 0xa373 : 0xa35c > /* cyrillic (russian etc) */ UPPER 0xc7f3 - 0xc7fe 0xc840 - 0xc854 LOWER 0xc855 - 0xc875 -SWIDTH2 0xc7f3 - 0xc7fe 0xc840 - 0xc854 -SWIDTH2 0xc855 - 0xc875 MAPUPPER < 0xc7f3 - 0xc7fe : 0xc7f3 > < 0xc840 - 0xc854 : 0xc840 > MAPUPPER < 0xc855 - 0xc860 : 0xc7f3 > < 0xc861 - 0xc875 : 0xc840 > MAPLOWER < 0xc7f3 - 0xc7fe : 0xc855 > < 0xc840 - 0xc854 : 0xc861 > @@ -227,42 +164,6 @@ IDEOGRAM 0xc440 - 0xc47e 0xc4a1 - 0xc4fe IDEOGRAM 0xc540 - 0xc57e 0xc5a1 - 0xc5fe IDEOGRAM 0xc640 - 0xc67e -SWIDTH2 0xa440 - 0xa47e 0xa4a1 - 0xa4fe -SWIDTH2 0xa540 - 0xa57e 0xa5a1 - 0xa5fe -SWIDTH2 0xa640 - 0xa67e 0xa6a1 - 0xa6fe -SWIDTH2 0xa740 - 0xa77e 0xa7a1 - 0xa7fe -SWIDTH2 0xa840 - 0xa87e 0xa8a1 - 0xa8fe -SWIDTH2 0xa940 - 0xa97e 0xa9a1 - 0xa9fe -SWIDTH2 0xaa40 - 0xaa7e 0xaaa1 - 0xaafe -SWIDTH2 0xab40 - 0xab7e 0xaba1 - 0xabfe -SWIDTH2 0xac40 - 0xac7e 0xaca1 - 0xacfe -SWIDTH2 0xad40 - 0xad7e 0xada1 - 0xadfe -SWIDTH2 0xae40 - 0xae7e 0xaea1 - 0xaefe -SWIDTH2 0xaf40 - 0xaf7e 0xafa1 - 0xaffe -SWIDTH2 0xb040 - 0xb07e 0xb0a1 - 0xb0fe -SWIDTH2 0xb140 - 0xb17e 0xb1a1 - 0xb1fe -SWIDTH2 0xb240 - 0xb27e 0xb2a1 - 0xb2fe -SWIDTH2 0xb340 - 0xb37e 0xb3a1 - 0xb3fe -SWIDTH2 0xb440 - 0xb47e 0xb4a1 - 0xb4fe -SWIDTH2 0xb540 - 0xb57e 0xb5a1 - 0xb5fe -SWIDTH2 0xb640 - 0xb67e 0xb6a1 - 0xb6fe -SWIDTH2 0xb740 - 0xb77e 0xb7a1 - 0xb7fe -SWIDTH2 0xb840 - 0xb87e 0xb8a1 - 0xb8fe -SWIDTH2 0xb940 - 0xb97e 0xb9a1 - 0xb9fe -SWIDTH2 0xba40 - 0xba7e 0xbaa1 - 0xbafe -SWIDTH2 0xbb40 - 0xbb7e 0xbba1 - 0xbbfe -SWIDTH2 0xbc40 - 0xbc7e 0xbca1 - 0xbcfe -SWIDTH2 0xbd40 - 0xbd7e 0xbda1 - 0xbdfe -SWIDTH2 0xbe40 - 0xbe7e 0xbea1 - 0xbefe -SWIDTH2 0xbf40 - 0xbf7e 0xbfa1 - 0xbffe -SWIDTH2 0xc040 - 0xc07e 0xc0a1 - 0xc0fe -SWIDTH2 0xc140 - 0xc17e 0xc1a1 - 0xc1fe -SWIDTH2 0xc240 - 0xc27e 0xc2a1 - 0xc2fe -SWIDTH2 0xc340 - 0xc37e 0xc3a1 - 0xc3fe -SWIDTH2 0xc440 - 0xc47e 0xc4a1 - 0xc4fe -SWIDTH2 0xc540 - 0xc57e 0xc5a1 - 0xc5fe -SWIDTH2 0xc640 - 0xc67e - IDEOGRAM 0xc940 - 0xc97e 0xc9a1 - 0xc9fe IDEOGRAM 0xca40 - 0xca7e 0xcaa1 - 0xcafe IDEOGRAM 0xcb40 - 0xcb7e 0xcba1 - 0xcbfe @@ -313,61 +214,10 @@ IDEOGRAM 0xf740 - 0xf77e 0xf7a1 - 0xf7fe IDEOGRAM 0xf840 - 0xf87e 0xf8a1 - 0xf8fe IDEOGRAM 0xf940 - 0xf97e 0xf9a1 - 0xf9dc -SWIDTH2 0xc940 - 0xc97e 0xc9a1 - 0xc9fe -SWIDTH2 0xca40 - 0xca7e 0xcaa1 - 0xcafe -SWIDTH2 0xcb40 - 0xcb7e 0xcba1 - 0xcbfe -SWIDTH2 0xcc40 - 0xcc7e 0xcca1 - 0xccfe -SWIDTH2 0xcd40 - 0xcd7e 0xcda1 - 0xcdfe -SWIDTH2 0xce40 - 0xce7e 0xcea1 - 0xcefe -SWIDTH2 0xcf40 - 0xcf7e 0xcfa1 - 0xcffe -SWIDTH2 0xd040 - 0xd07e 0xd0a1 - 0xd0fe -SWIDTH2 0xd140 - 0xd17e 0xd1a1 - 0xd1fe -SWIDTH2 0xd240 - 0xd27e 0xd2a1 - 0xd2fe -SWIDTH2 0xd340 - 0xd37e 0xd3a1 - 0xd3fe -SWIDTH2 0xd440 - 0xd47e 0xd4a1 - 0xd4fe -SWIDTH2 0xd540 - 0xd57e 0xd5a1 - 0xd5fe -SWIDTH2 0xd640 - 0xd67e 0xd6a1 - 0xd6fe -SWIDTH2 0xd740 - 0xd77e 0xd7a1 - 0xd7fe -SWIDTH2 0xd840 - 0xd87e 0xd8a1 - 0xd8fe -SWIDTH2 0xd940 - 0xd97e 0xd9a1 - 0xd9fe -SWIDTH2 0xda40 - 0xda7e 0xdaa1 - 0xdafe -SWIDTH2 0xdb40 - 0xdb7e 0xdba1 - 0xdbfe -SWIDTH2 0xdc40 - 0xdc7e 0xdca1 - 0xdcfe -SWIDTH2 0xdd40 - 0xdd7e 0xdda1 - 0xddfe -SWIDTH2 0xde40 - 0xde7e 0xdea1 - 0xdefe -SWIDTH2 0xdf40 - 0xdf7e 0xdfa1 - 0xdffe -SWIDTH2 0xe040 - 0xe07e 0xe0a1 - 0xe0fe -SWIDTH2 0xe140 - 0xe17e 0xe1a1 - 0xe1fe -SWIDTH2 0xe240 - 0xe27e 0xe2a1 - 0xe2fe -SWIDTH2 0xe340 - 0xe37e 0xe3a1 - 0xe3fe -SWIDTH2 0xe440 - 0xe47e 0xe4a1 - 0xe4fe -SWIDTH2 0xe540 - 0xe57e 0xe5a1 - 0xe5fe -SWIDTH2 0xe640 - 0xe67e 0xe6a1 - 0xe6fe -SWIDTH2 0xe740 - 0xe77e 0xe7a1 - 0xe7fe -SWIDTH2 0xe840 - 0xe87e 0xe8a1 - 0xe8fe -SWIDTH2 0xe940 - 0xe97e 0xe9a1 - 0xe9fe -SWIDTH2 0xea40 - 0xea7e 0xeaa1 - 0xeafe -SWIDTH2 0xeb40 - 0xeb7e 0xeba1 - 0xebfe -SWIDTH2 0xec40 - 0xec7e 0xeca1 - 0xecfe -SWIDTH2 0xed40 - 0xed7e 0xeda1 - 0xedfe -SWIDTH2 0xee40 - 0xee7e 0xeea1 - 0xeefe -SWIDTH2 0xef40 - 0xef7e 0xefa1 - 0xeffe -SWIDTH2 0xf040 - 0xf07e 0xf0a1 - 0xf0fe -SWIDTH2 0xf140 - 0xf17e 0xf1a1 - 0xf1fe -SWIDTH2 0xf240 - 0xf27e 0xf2a1 - 0xf2fe -SWIDTH2 0xf340 - 0xf37e 0xf3a1 - 0xf3fe -SWIDTH2 0xf440 - 0xf47e 0xf4a1 - 0xf4fe -SWIDTH2 0xf540 - 0xf57e 0xf5a1 - 0xf5fe -SWIDTH2 0xf640 - 0xf67e 0xf6a1 - 0xf6fe -SWIDTH2 0xf740 - 0xf77e 0xf7a1 - 0xf7fe -SWIDTH2 0xf840 - 0xf87e 0xf8a1 - 0xf8fe -SWIDTH2 0xf940 - 0xf97e 0xf9a1 - 0xf9dc - /* Eten external charset 0xc6a1 - 0xc8d3 */ /* lots strange numbers */ SPECIAL 0xc6a1 - 0xc6be -SWIDTH2 0xc6a1 - 0xc6be TODIGIT < 0xc6a1 - 0xc6aa : 1 > < 0xc6ab - 0xc6b4 : 1 > TODIGIT < 0xc6b5 - 0xc6be : 1> @@ -375,31 +225,24 @@ TODIGIT < 0xc6b5 - 0xc6be : 1> /* these are HanZi Radicals */ SPECIAL 0xc6bf - 0xc6ce 0xc6d0 - 0xc6d2 0xc6d4 0xc6d6 SPECIAL 0xc879 - 0xc87e 0xc8a1 - 0xc8a4 0xc8d4 - 0xc8f1 -SWIDTH2 0xc6bf - 0xc6ce 0xc6d0 - 0xc6d2 0xc6d4 0xc6d6 -SWIDTH2 0xc879 - 0xc87e 0xc8a1 - 0xc8a4 0xc8d4 - 0xc8f1 /* who knows what these are ... */ SPECIAL 0xc6d8 - 0xc6dd 0xc6e0 - 0xc6e6 0xc876 - 0xc878 -SWIDTH2 0xc6d8 - 0xc6dd 0xc6e0 - 0xc6e6 0xc876 - 0xc878 /* hiragana */ SPECIAL 0xc6e7 - 0xc6fe 0xc740 - 0xc77a -SWIDTH2 0xc6e7 - 0xc6fe 0xc740 - 0xc77a /* katakana */ SPECIAL 0xc77b - 0xc77e 0xc7a1 - 0xc7f2 /* various Japanese symbols */ SPECIAL 0xc8cd - 0xc8d3 -SWIDTH2 0xc8cd - 0xc8d3 /* latin small letter */ SPECIAL 0xc8fe - 0xc8fe -SWIDTH2 0xc8fe - 0xc8fe /* line drawing glyphs */ SPECIAL 0xf9dd - 0xf9fe -SWIDTH2 0xf9dd - 0xf9fe IDEOGRAM 0xfa40 - 0xfa5e 0xfa60 - 0xfa65 0xfa67 - 0xfa7e 0xfaa1 - 0xfabc @@ -412,14 +255,3 @@ IDEOGRAM 0xfd40 - 0xfd7e 0xfda1 - 0xfdb6 0xfdb9 0xfdba 0xfdbc - 0xfdf0 IDEOGRAM 0xfdf2 - 0xfdfe IDEOGRAM 0xfe40 - 0xfe51 0xfe53 - 0xfe7e 0xfea1 - 0xfea9 0xfeab - 0xfbdc IDEOGRAM 0xfede - 0xfefe - -SWIDTH2 0xfa40 - 0xfa5e 0xfa60 - 0xfa65 0xfa67 - 0xfa7e 0xfaa1 - 0xfabc -SWIDTH2 0xfabd - 0xfac4 0xfac6 - 0xfad4 0xfad6 - 0xfafe -SWIDTH2 0xfb40 - 0xfb47 0xfb49 - 0xfb7e 0xfba1 - 0xfbb7 0xfbb9 - 0xfbf2 -SWIDTH2 0xfbf4 - 0xfbf8 0xfbfa - 0xfbfe -SWIDTH2 0xfc40 - 0xfc4e 0xfc50 - 0xfc6b 0xfc6d - 0xfc7e 0xfca1 - 0xfcb8 -SWIDTH2 0xfcba - 0xfce1 0xfce3 - 0xfcf0 0xfcf2 - 0xfcfe -SWIDTH2 0xfd40 - 0xfd7e 0xfda1 - 0xfdb6 0xfdb9 0xfdba 0xfdbc - 0xfdf0 -SWIDTH2 0xfdf2 - 0xfdfe -SWIDTH2 0xfe40 - 0xfe51 0xfe53 - 0xfe7e 0xfea1 - 0xfea9 0xfeab - 0xfbdc -SWIDTH2 0xfede - 0xfefe diff --git a/share/locale/ctype/zh_TW.BIG5.src b/share/mklocale/zh_TW.Big5.src similarity index 63% rename from share/locale/ctype/zh_TW.BIG5.src rename to share/mklocale/zh_TW.Big5.src index e7f6bad476..bf39cdefb5 100644 --- a/share/locale/ctype/zh_TW.BIG5.src +++ b/share/mklocale/zh_TW.Big5.src @@ -1,12 +1,12 @@ -/* $NetBSD: zh_TW.BIG5.src,v 1.4 2005/02/04 18:35:45 tnozaki Exp $ */ - /* * big5 first byte: A1-FE * second byte: 40-7E, A1-FE + * + * $FreeBSD: head/share/mklocale/zh_TW.Big5.src 156014 2006-02-25 23:28:19Z delphij $ */ ENCODING "BIG5" -VARIABLE CODESET=BIG5 +/* VARIABLE BIG5 character set */ /* * ASCII @@ -37,14 +37,14 @@ TODIGIT < 'a' - 'f' : 10 > */ PUNCT 0xa141 - 0xa17e 0xa1a1 - 0xa1ac -SWIDTH2 0xa141 - 0xa17e 0xa1a1 - 0xa1ac +SWIDTH2 0xa141 - 0xa17e 0xa1a1 - 0xa1ac SPECIAL 0xa1ad - 0xa1fe 0xa240 - 0xa27e 0xa2a1 - 0xa2ae SWIDTH2 0xa1ad - 0xa1fe 0xa240 - 0xa27e 0xa2a1 - 0xa2ae /* full width 0 1 2 .. 9 */ -DIGIT 0xa2af - 0xa2b8 -SWIDTH2 0xa2af - 0xa2b8 +/* ?DIGIT 0xa2af - 0xa2b8 */ +/* SWIDTH2 0xa2af - 0xa2b8 */ /* map these (SuChou Code (12) and Roman (I II etc.) number (10)) to digits */ TODIGIT < 0xa2b9 - 0xa2c2 : 1 > @@ -63,9 +63,11 @@ MAPLOWER < 0xa2e9 - 0xa2fe : 0xa2e9 > < 0xa340 - 0xa343 : 0xa340 > MAPUPPER < 0xa2cf - 0xa2e4 : 0xa2cf > < 0xa2e5 - 0xa2e8 : 0xa2e5 > MAPUPPER < 0xa2e9 - 0xa2fe : 0xa2cf > < 0xa340 - 0xa343 : 0xa2e5 > -XDIGIT 0xa2cf - 0xa2d4 0xa2e9 - 0xa2ee +/* ?XDIGIT 0xa2cf - 0xa2d4 0xa2e9 - 0xa2ee */ +/* SWIDTH2 0xa2cf - 0xa2d4 0xa2e9 - 0xa2ee */ SPACE 0xa3bc +BLANK 0xa3bc SWIDTH2 0xa3bc /* bopomofo symbols */ PHONOGRAM 0xa374 - 0xa37e 0xa3a1 - 0xa3bb @@ -73,6 +75,8 @@ SWIDTH2 0xa374 - 0xa37e 0xa3a1 - 0xa3bb /* tone symbols */ PHONOGRAM 0xa3bd - 0xa3bf SWIDTH2 0xa3bd - 0xa3bf +/* control */ +CONTROL 0xa3c0 - 0xa3fe /* greek */ UPPER 0xa344 - 0xa35b @@ -171,48 +175,48 @@ IDEOGRAM 0xcc40 - 0xcc7e 0xcca1 - 0xccfe IDEOGRAM 0xcd40 - 0xcd7e 0xcda1 - 0xcdfe IDEOGRAM 0xce40 - 0xce7e 0xcea1 - 0xcefe IDEOGRAM 0xcf40 - 0xcf7e 0xcfa1 - 0xcffe -IDEOGRAM 0xd040 - 0xd074 0xd0a1 - 0xd0fe -IDEOGRAM 0xd140 - 0xd174 0xd1a1 - 0xd1fe -IDEOGRAM 0xd240 - 0xd274 0xd2a1 - 0xd2fe -IDEOGRAM 0xd340 - 0xd374 0xd3a1 - 0xd3fe -IDEOGRAM 0xd440 - 0xd474 0xd4a1 - 0xd4fe -IDEOGRAM 0xd540 - 0xd574 0xd5a1 - 0xd5fe -IDEOGRAM 0xd640 - 0xd674 0xd6a1 - 0xd6fe -IDEOGRAM 0xd740 - 0xd774 0xd7a1 - 0xd7fe -IDEOGRAM 0xd840 - 0xd874 0xd8a1 - 0xd8fe -IDEOGRAM 0xd940 - 0xd974 0xd9a1 - 0xd9fe -IDEOGRAM 0xda40 - 0xda74 0xdaa1 - 0xdafe -IDEOGRAM 0xdb40 - 0xdb74 0xdba1 - 0xdbfe -IDEOGRAM 0xdc40 - 0xdc74 0xdca1 - 0xdcfe -IDEOGRAM 0xdd40 - 0xdd74 0xdda1 - 0xddfe -IDEOGRAM 0xde40 - 0xde74 0xdea1 - 0xdefe -IDEOGRAM 0xdf40 - 0xdf74 0xdfa1 - 0xdffe -IDEOGRAM 0xe040 - 0xe074 0xe0a1 - 0xe0fe -IDEOGRAM 0xe140 - 0xe174 0xe1a1 - 0xe1fe -IDEOGRAM 0xe240 - 0xe274 0xe2a1 - 0xe2fe -IDEOGRAM 0xe340 - 0xe374 0xe3a1 - 0xe3fe -IDEOGRAM 0xe440 - 0xe474 0xe4a1 - 0xe4fe -IDEOGRAM 0xe540 - 0xe574 0xe5a1 - 0xe5fe -IDEOGRAM 0xe640 - 0xe674 0xe6a1 - 0xe6fe -IDEOGRAM 0xe740 - 0xe774 0xe7a1 - 0xe7fe -IDEOGRAM 0xe840 - 0xe874 0xe8a1 - 0xe8fe -IDEOGRAM 0xe940 - 0xe974 0xe9a1 - 0xe9fe -IDEOGRAM 0xea40 - 0xea74 0xeaa1 - 0xeafe -IDEOGRAM 0xeb40 - 0xeb74 0xeba1 - 0xebfe -IDEOGRAM 0xec40 - 0xec74 0xeca1 - 0xecfe -IDEOGRAM 0xed40 - 0xed74 0xeda1 - 0xedfe -IDEOGRAM 0xee40 - 0xee74 0xeea1 - 0xeefe -IDEOGRAM 0xef40 - 0xef74 0xefa1 - 0xeffe -IDEOGRAM 0xf040 - 0xf074 0xf0a1 - 0xf0fe -IDEOGRAM 0xf140 - 0xf174 0xf1a1 - 0xf1fe -IDEOGRAM 0xf240 - 0xf274 0xf2a1 - 0xf2fe -IDEOGRAM 0xf340 - 0xf374 0xf3a1 - 0xf3fe -IDEOGRAM 0xf440 - 0xf474 0xf4a1 - 0xf4fe -IDEOGRAM 0xf540 - 0xf574 0xf5a1 - 0xf5fe -IDEOGRAM 0xf640 - 0xf674 0xf6a1 - 0xf6fe -IDEOGRAM 0xf740 - 0xf774 0xf7a1 - 0xf7fe -IDEOGRAM 0xf840 - 0xf874 0xf8a1 - 0xf8fe -IDEOGRAM 0xf940 - 0xf974 0xf9a1 - 0xf9dc +IDEOGRAM 0xd040 - 0xd07e 0xd0a1 - 0xd0fe +IDEOGRAM 0xd140 - 0xd17e 0xd1a1 - 0xd1fe +IDEOGRAM 0xd240 - 0xd27e 0xd2a1 - 0xd2fe +IDEOGRAM 0xd340 - 0xd37e 0xd3a1 - 0xd3fe +IDEOGRAM 0xd440 - 0xd47e 0xd4a1 - 0xd4fe +IDEOGRAM 0xd540 - 0xd57e 0xd5a1 - 0xd5fe +IDEOGRAM 0xd640 - 0xd67e 0xd6a1 - 0xd6fe +IDEOGRAM 0xd740 - 0xd77e 0xd7a1 - 0xd7fe +IDEOGRAM 0xd840 - 0xd87e 0xd8a1 - 0xd8fe +IDEOGRAM 0xd940 - 0xd97e 0xd9a1 - 0xd9fe +IDEOGRAM 0xda40 - 0xda7e 0xdaa1 - 0xdafe +IDEOGRAM 0xdb40 - 0xdb7e 0xdba1 - 0xdbfe +IDEOGRAM 0xdc40 - 0xdc7e 0xdca1 - 0xdcfe +IDEOGRAM 0xdd40 - 0xdd7e 0xdda1 - 0xddfe +IDEOGRAM 0xde40 - 0xde7e 0xdea1 - 0xdefe +IDEOGRAM 0xdf40 - 0xdf7e 0xdfa1 - 0xdffe +IDEOGRAM 0xe040 - 0xe07e 0xe0a1 - 0xe0fe +IDEOGRAM 0xe140 - 0xe17e 0xe1a1 - 0xe1fe +IDEOGRAM 0xe240 - 0xe27e 0xe2a1 - 0xe2fe +IDEOGRAM 0xe340 - 0xe37e 0xe3a1 - 0xe3fe +IDEOGRAM 0xe440 - 0xe47e 0xe4a1 - 0xe4fe +IDEOGRAM 0xe540 - 0xe57e 0xe5a1 - 0xe5fe +IDEOGRAM 0xe640 - 0xe67e 0xe6a1 - 0xe6fe +IDEOGRAM 0xe740 - 0xe77e 0xe7a1 - 0xe7fe +IDEOGRAM 0xe840 - 0xe87e 0xe8a1 - 0xe8fe +IDEOGRAM 0xe940 - 0xe97e 0xe9a1 - 0xe9fe +IDEOGRAM 0xea40 - 0xea7e 0xeaa1 - 0xeafe +IDEOGRAM 0xeb40 - 0xeb7e 0xeba1 - 0xebfe +IDEOGRAM 0xec40 - 0xec7e 0xeca1 - 0xecfe +IDEOGRAM 0xed40 - 0xed7e 0xeda1 - 0xedfe +IDEOGRAM 0xee40 - 0xee7e 0xeea1 - 0xeefe +IDEOGRAM 0xef40 - 0xef7e 0xefa1 - 0xeffe +IDEOGRAM 0xf040 - 0xf07e 0xf0a1 - 0xf0fe +IDEOGRAM 0xf140 - 0xf17e 0xf1a1 - 0xf1fe +IDEOGRAM 0xf240 - 0xf27e 0xf2a1 - 0xf2fe +IDEOGRAM 0xf340 - 0xf37e 0xf3a1 - 0xf3fe +IDEOGRAM 0xf440 - 0xf47e 0xf4a1 - 0xf4fe +IDEOGRAM 0xf540 - 0xf57e 0xf5a1 - 0xf5fe +IDEOGRAM 0xf640 - 0xf67e 0xf6a1 - 0xf6fe +IDEOGRAM 0xf740 - 0xf77e 0xf7a1 - 0xf7fe +IDEOGRAM 0xf840 - 0xf87e 0xf8a1 - 0xf8fe +IDEOGRAM 0xf940 - 0xf97e 0xf9a1 - 0xf9dc SWIDTH2 0xc940 - 0xc97e 0xc9a1 - 0xc9fe SWIDTH2 0xca40 - 0xca7e 0xcaa1 - 0xcafe @@ -221,48 +225,48 @@ SWIDTH2 0xcc40 - 0xcc7e 0xcca1 - 0xccfe SWIDTH2 0xcd40 - 0xcd7e 0xcda1 - 0xcdfe SWIDTH2 0xce40 - 0xce7e 0xcea1 - 0xcefe SWIDTH2 0xcf40 - 0xcf7e 0xcfa1 - 0xcffe -SWIDTH2 0xd040 - 0xd074 0xd0a1 - 0xd0fe -SWIDTH2 0xd140 - 0xd174 0xd1a1 - 0xd1fe -SWIDTH2 0xd240 - 0xd274 0xd2a1 - 0xd2fe -SWIDTH2 0xd340 - 0xd374 0xd3a1 - 0xd3fe -SWIDTH2 0xd440 - 0xd474 0xd4a1 - 0xd4fe -SWIDTH2 0xd540 - 0xd574 0xd5a1 - 0xd5fe -SWIDTH2 0xd640 - 0xd674 0xd6a1 - 0xd6fe -SWIDTH2 0xd740 - 0xd774 0xd7a1 - 0xd7fe -SWIDTH2 0xd840 - 0xd874 0xd8a1 - 0xd8fe -SWIDTH2 0xd940 - 0xd974 0xd9a1 - 0xd9fe -SWIDTH2 0xda40 - 0xda74 0xdaa1 - 0xdafe -SWIDTH2 0xdb40 - 0xdb74 0xdba1 - 0xdbfe -SWIDTH2 0xdc40 - 0xdc74 0xdca1 - 0xdcfe -SWIDTH2 0xdd40 - 0xdd74 0xdda1 - 0xddfe -SWIDTH2 0xde40 - 0xde74 0xdea1 - 0xdefe -SWIDTH2 0xdf40 - 0xdf74 0xdfa1 - 0xdffe -SWIDTH2 0xe040 - 0xe074 0xe0a1 - 0xe0fe -SWIDTH2 0xe140 - 0xe174 0xe1a1 - 0xe1fe -SWIDTH2 0xe240 - 0xe274 0xe2a1 - 0xe2fe -SWIDTH2 0xe340 - 0xe374 0xe3a1 - 0xe3fe -SWIDTH2 0xe440 - 0xe474 0xe4a1 - 0xe4fe -SWIDTH2 0xe540 - 0xe574 0xe5a1 - 0xe5fe -SWIDTH2 0xe640 - 0xe674 0xe6a1 - 0xe6fe -SWIDTH2 0xe740 - 0xe774 0xe7a1 - 0xe7fe -SWIDTH2 0xe840 - 0xe874 0xe8a1 - 0xe8fe -SWIDTH2 0xe940 - 0xe974 0xe9a1 - 0xe9fe -SWIDTH2 0xea40 - 0xea74 0xeaa1 - 0xeafe -SWIDTH2 0xeb40 - 0xeb74 0xeba1 - 0xebfe -SWIDTH2 0xec40 - 0xec74 0xeca1 - 0xecfe -SWIDTH2 0xed40 - 0xed74 0xeda1 - 0xedfe -SWIDTH2 0xee40 - 0xee74 0xeea1 - 0xeefe -SWIDTH2 0xef40 - 0xef74 0xefa1 - 0xeffe -SWIDTH2 0xf040 - 0xf074 0xf0a1 - 0xf0fe -SWIDTH2 0xf140 - 0xf174 0xf1a1 - 0xf1fe -SWIDTH2 0xf240 - 0xf274 0xf2a1 - 0xf2fe -SWIDTH2 0xf340 - 0xf374 0xf3a1 - 0xf3fe -SWIDTH2 0xf440 - 0xf474 0xf4a1 - 0xf4fe -SWIDTH2 0xf540 - 0xf574 0xf5a1 - 0xf5fe -SWIDTH2 0xf640 - 0xf674 0xf6a1 - 0xf6fe -SWIDTH2 0xf740 - 0xf774 0xf7a1 - 0xf7fe -SWIDTH2 0xf840 - 0xf874 0xf8a1 - 0xf8fe -SWIDTH2 0xf940 - 0xf974 0xf9a1 - 0xf9dc +SWIDTH2 0xd040 - 0xd07e 0xd0a1 - 0xd0fe +SWIDTH2 0xd140 - 0xd17e 0xd1a1 - 0xd1fe +SWIDTH2 0xd240 - 0xd27e 0xd2a1 - 0xd2fe +SWIDTH2 0xd340 - 0xd37e 0xd3a1 - 0xd3fe +SWIDTH2 0xd440 - 0xd47e 0xd4a1 - 0xd4fe +SWIDTH2 0xd540 - 0xd57e 0xd5a1 - 0xd5fe +SWIDTH2 0xd640 - 0xd67e 0xd6a1 - 0xd6fe +SWIDTH2 0xd740 - 0xd77e 0xd7a1 - 0xd7fe +SWIDTH2 0xd840 - 0xd87e 0xd8a1 - 0xd8fe +SWIDTH2 0xd940 - 0xd97e 0xd9a1 - 0xd9fe +SWIDTH2 0xda40 - 0xda7e 0xdaa1 - 0xdafe +SWIDTH2 0xdb40 - 0xdb7e 0xdba1 - 0xdbfe +SWIDTH2 0xdc40 - 0xdc7e 0xdca1 - 0xdcfe +SWIDTH2 0xdd40 - 0xdd7e 0xdda1 - 0xddfe +SWIDTH2 0xde40 - 0xde7e 0xdea1 - 0xdefe +SWIDTH2 0xdf40 - 0xdf7e 0xdfa1 - 0xdffe +SWIDTH2 0xe040 - 0xe07e 0xe0a1 - 0xe0fe +SWIDTH2 0xe140 - 0xe17e 0xe1a1 - 0xe1fe +SWIDTH2 0xe240 - 0xe27e 0xe2a1 - 0xe2fe +SWIDTH2 0xe340 - 0xe37e 0xe3a1 - 0xe3fe +SWIDTH2 0xe440 - 0xe47e 0xe4a1 - 0xe4fe +SWIDTH2 0xe540 - 0xe57e 0xe5a1 - 0xe5fe +SWIDTH2 0xe640 - 0xe67e 0xe6a1 - 0xe6fe +SWIDTH2 0xe740 - 0xe77e 0xe7a1 - 0xe7fe +SWIDTH2 0xe840 - 0xe87e 0xe8a1 - 0xe8fe +SWIDTH2 0xe940 - 0xe97e 0xe9a1 - 0xe9fe +SWIDTH2 0xea40 - 0xea7e 0xeaa1 - 0xeafe +SWIDTH2 0xeb40 - 0xeb7e 0xeba1 - 0xebfe +SWIDTH2 0xec40 - 0xec7e 0xeca1 - 0xecfe +SWIDTH2 0xed40 - 0xed7e 0xeda1 - 0xedfe +SWIDTH2 0xee40 - 0xee7e 0xeea1 - 0xeefe +SWIDTH2 0xef40 - 0xef7e 0xefa1 - 0xeffe +SWIDTH2 0xf040 - 0xf07e 0xf0a1 - 0xf0fe +SWIDTH2 0xf140 - 0xf17e 0xf1a1 - 0xf1fe +SWIDTH2 0xf240 - 0xf27e 0xf2a1 - 0xf2fe +SWIDTH2 0xf340 - 0xf37e 0xf3a1 - 0xf3fe +SWIDTH2 0xf440 - 0xf47e 0xf4a1 - 0xf4fe +SWIDTH2 0xf540 - 0xf57e 0xf5a1 - 0xf5fe +SWIDTH2 0xf640 - 0xf67e 0xf6a1 - 0xf6fe +SWIDTH2 0xf740 - 0xf77e 0xf7a1 - 0xf7fe +SWIDTH2 0xf840 - 0xf87e 0xf8a1 - 0xf8fe +SWIDTH2 0xf940 - 0xf97e 0xf9a1 - 0xf9dc /* Eten external charset 0xc6a1 - 0xc8d3 */ diff --git a/share/monetdef/Makefile b/share/monetdef/Makefile index b1000d862e..1079ac9b8f 100644 --- a/share/monetdef/Makefile +++ b/share/monetdef/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/monetdef/Makefile,v 1.68 2012/11/17 01:50:58 svnexp Exp $ +# $FreeBSD: head/share/monetdef/Makefile 253425 2013-07-17 14:00:51Z bapt $ LOCALES= af_ZA.ISO8859-1 \ am_ET.UTF-8 \ @@ -9,13 +9,17 @@ LOCALES= af_ZA.ISO8859-1 \ bg_BG.CP1251 \ bg_BG.UTF-8 \ ca_ES.ISO8859-1 \ + ca_ES.UTF-8 \ cs_CZ.ISO8859-2 \ cs_CZ.UTF-8 \ da_DK.ISO8859-1 \ de_AT.ISO8859-1 \ + de_AT.UTF-8 \ de_CH.ISO8859-1 \ de_DE.ISO8859-1 \ + de_DE.UTF-8 \ el_GR.ISO8859-7 \ + el_GR.UTF-8 \ en_AU.ISO8859-1 \ en_CA.ISO8859-1 \ en_GB.ISO8859-1 \ @@ -24,12 +28,15 @@ LOCALES= af_ZA.ISO8859-1 \ en_NZ.ISO8859-1 \ en_US.ISO8859-1 \ es_ES.ISO8859-1 \ + es_ES.UTF-8 \ et_EE.ISO8859-15 \ fi_FI.ISO8859-1 \ - fo_FO.ISO8859-1 \ + fi_FI.UTF-8 \ fr_BE.ISO8859-1 \ + fr_BE.UTF-8 \ fr_CA.ISO8859-1 \ fr_FR.ISO8859-1 \ + fr_FR.UTF-8 \ he_IL.UTF-8 \ hi_IN.ISCII-DEV \ hr_HR.ISO8859-2 \ @@ -38,6 +45,7 @@ LOCALES= af_ZA.ISO8859-1 \ hy_AM.UTF-8 \ is_IS.ISO8859-1 \ it_IT.ISO8859-1 \ + it_IT.UTF-8 \ ja_JP.eucJP \ ja_JP.UTF-8 \ kk_KZ.PT154 \ @@ -48,7 +56,9 @@ LOCALES= af_ZA.ISO8859-1 \ lv_LV.ISO8859-13 \ mn_MN.UTF-8 \ nl_BE.ISO8859-1 \ + nl_BE.UTF-8 \ nl_NL.ISO8859-1 \ + nl_NL.UTF-8 \ no_NO.ISO8859-1 \ pl_PL.ISO8859-2 \ pl_PL.UTF-8 \ @@ -111,12 +121,9 @@ ISO8859-1_ISO8859-15= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ fi_FI fr_BE fr_CA fr_CH fr_FR \ is_IS it_IT it_CH nl_BE nl_NL nb_NO nn_NO no_NO sv_SE ISO8859-1_US-ASCII= en_AU en_CA en_GB en_NZ en_US -ISO8859-1_UTF-8= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ - en_AU en_CA en_NZ en_US es_ES \ - fi_FI fr_BE fr_CA fr_FR is_IS it_IT nl_BE \ - nl_NL nb_NO nn_NO no_NO pt_BR sv_SE -ISO8859-2_UTF-8= hr_HR hu_HU ro_RO sk_SK sl_SI sr_YU -ISO8859-7_UTF-8= el_GR +ISO8859-1_UTF-8= af_ZA da_DK de_CH en_AU en_CA en_NZ en_US \ + fr_CA is_IS nb_NO nn_NO no_NO pt_BR sv_SE +ISO8859-2_UTF-8= hr_HR hu_HU ro_RO sk_SK sl_SI ISO8859-9_UTF-8= tr_TR ISO8859-13_ISO8859-4= lt_LT ISO8859-13_UTF-8= lt_LT lv_LV diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/ca_ES.UTF-8.src similarity index 78% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/ca_ES.UTF-8.src index 511f885893..41fb9c13d1 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/ca_ES.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/ca_ES.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -18,19 +18,19 @@ kr # negative_sign - # int_frac_digits -2 +0 # frac_digits -2 +0 # p_cs_precedes 1 # p_sep_by_space -2 +1 # n_cs_precedes 1 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/de_AT.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/de_AT.UTF-8.src index 511f885893..5253d97a99 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/de_AT.UTF-8.src @@ -1,16 +1,16 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/de_AT.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep -. + # mon_grouping, separated by ; 3;3 # positive_sign @@ -24,13 +24,13 @@ kr # p_cs_precedes 1 # p_sep_by_space -2 +1 # n_cs_precedes 1 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/de_DE.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/de_DE.UTF-8.src index 511f885893..b27f1c9bc5 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/de_DE.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/de_DE.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -24,13 +24,13 @@ kr # p_cs_precedes 1 # p_sep_by_space -2 +0 # n_cs_precedes 1 # n_sep_by_space -2 +0 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/el_GR.UTF-8.src similarity index 73% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/el_GR.UTF-8.src index 511f885893..eb28f6bd5c 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/el_GR.UTF-8.src @@ -1,17 +1,17 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/el_GR.UTF-8.src 253419 2013-07-17 11:51:24Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep . -# mon_grouping, separated by ; +# mon_grouping 3;3 # positive_sign @@ -22,15 +22,15 @@ kr # frac_digits 2 # p_cs_precedes -1 +0 # p_sep_by_space -2 -# n_cs_precedes 1 +# n_cs_precedes +0 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/es_ES.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/es_ES.UTF-8.src index 511f885893..ae0bba5c35 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/es_ES.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/es_ES.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -24,13 +24,13 @@ kr # p_cs_precedes 1 # p_sep_by_space -2 +1 # n_cs_precedes 1 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/fi_FI.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/fi_FI.UTF-8.src index 511f885893..d7d0a4a5cc 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/fi_FI.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/fi_FI.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -22,15 +22,15 @@ kr # frac_digits 2 # p_cs_precedes -1 +0 # p_sep_by_space 2 # n_cs_precedes -1 +0 # n_sep_by_space 2 # p_sign_posn -4 +1 # n_sign_posn -4 +2 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/fr_BE.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/fr_BE.UTF-8.src index 511f885893..028c7ba2a5 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/fr_BE.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/fr_BE.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -22,15 +22,15 @@ kr # frac_digits 2 # p_cs_precedes -1 +0 # p_sep_by_space -2 -# n_cs_precedes 1 +# n_cs_precedes +0 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/fr_FR.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/fr_FR.UTF-8.src index 511f885893..7bed8b5f52 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/fr_FR.UTF-8.src @@ -1,16 +1,16 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/fr_FR.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep -. + # mon_grouping, separated by ; 3;3 # positive_sign @@ -22,15 +22,15 @@ kr # frac_digits 2 # p_cs_precedes -1 +0 # p_sep_by_space -2 -# n_cs_precedes 1 +# n_cs_precedes +0 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +2 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/it_IT.UTF-8.src similarity index 78% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/it_IT.UTF-8.src index 511f885893..d6cea74b52 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/it_IT.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/it_IT.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -18,19 +18,19 @@ kr # negative_sign - # int_frac_digits -2 +0 # frac_digits -2 +0 # p_cs_precedes 1 # p_sep_by_space -2 +1 # n_cs_precedes 1 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/nl_BE.UTF-8.src similarity index 79% copy from share/monetdef/fo_FO.ISO8859-1.src copy to share/monetdef/nl_BE.UTF-8.src index 511f885893..a441879adf 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/nl_BE.UTF-8.src @@ -1,12 +1,12 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/nl_BE.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep @@ -22,15 +22,15 @@ kr # frac_digits 2 # p_cs_precedes -1 +0 # p_sep_by_space -2 -# n_cs_precedes 1 +# n_cs_precedes +0 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +1 # EOF diff --git a/share/monetdef/fo_FO.ISO8859-1.src b/share/monetdef/nl_NL.UTF-8.src similarity index 79% rename from share/monetdef/fo_FO.ISO8859-1.src rename to share/monetdef/nl_NL.UTF-8.src index 511f885893..fd86fb7073 100644 --- a/share/monetdef/fo_FO.ISO8859-1.src +++ b/share/monetdef/nl_NL.UTF-8.src @@ -1,16 +1,16 @@ -# $DragonFly: src/share/monetdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ +# $FreeBSD: head/share/monetdef/nl_NL.UTF-8.src 253414 2013-07-17 10:12:31Z bapt $ # # WARNING: spaces may be essential at the end of lines # WARNING: empty lines are essential too # # int_curr_symbol (last character always SPACE) -DKK +EUR # currency_symbol -kr +€ # mon_decimal_point , # mon_thousands_sep -. + # mon_grouping, separated by ; 3;3 # positive_sign @@ -24,13 +24,13 @@ kr # p_cs_precedes 1 # p_sep_by_space -2 +1 # n_cs_precedes 1 # n_sep_by_space -2 +1 # p_sign_posn -4 +1 # n_sign_posn -4 +2 # EOF diff --git a/share/numericdef/Makefile b/share/numericdef/Makefile index 85a9599707..8087a582b3 100644 --- a/share/numericdef/Makefile +++ b/share/numericdef/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/numericdef/Makefile,v 1.65 2012/11/17 01:51:00 svnexp Exp $ +# $FreeBSD: head/share/numericdef/Makefile 245889 2013-01-24 17:00:11Z brooks $ LOCALES= af_ZA.ISO8859-1 \ am_ET.UTF-8 \ @@ -15,7 +15,6 @@ LOCALES= af_ZA.ISO8859-1 \ et_EE.ISO8859-15 \ eu_ES.ISO8859-1 \ fi_FI.ISO8859-1 \ - fo_FO.ISO8859-1 \ fr_BE.ISO8859-1 \ fr_FR.ISO8859-1 \ hi_IN.ISCII-DEV \ @@ -94,7 +93,7 @@ eucJP_UTF-8= ja_JP eucKR_CP949= ko_KR eucKR_UTF-8= ko_KR ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_CH de_DE en_US es_ES eu_ES \ - fi_FI fr_BE fr_FR is_IS it_CH it_IT nl_NL no_NO pt_PT sv_SE \ + fi_FI fr_BE fr_FR is_IS it_IT nl_NL no_NO pt_PT sv_SE \ ${BE_LINKS} ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ ${IT_LINKS} ${NO_LINKS} ${US_LINKS} ISO8859-1_ISO8859-1= ${BE_LINKS} ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} \ diff --git a/share/numericdef/fo_FO.ISO8859-1.src b/share/numericdef/fo_FO.ISO8859-1.src deleted file mode 100644 index c21f3eb8f9..0000000000 --- a/share/numericdef/fo_FO.ISO8859-1.src +++ /dev/null @@ -1,12 +0,0 @@ -# $DragonFly: src/share/numericdef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ -# -# WARNING: spaces may be essential at the end of lines -# WARNING: empty lines are essential too -# -# decimal_point -, -# thousands_sep -. -# grouping, separated by ; -3;3 -# EOF diff --git a/share/timedef/Makefile b/share/timedef/Makefile index af68fe8df7..887ababde3 100644 --- a/share/timedef/Makefile +++ b/share/timedef/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/timedef/Makefile,v 1.56 2012/11/17 01:51:02 svnexp Exp $ +# $FreeBSD: head/share/timedef/Makefile 196814 2009-09-04 06:26:40Z ache $ LOCALES= am_ET.UTF-8 \ be_BY.CP1131 \ @@ -28,7 +28,6 @@ LOCALES= am_ET.UTF-8 \ eu_ES.ISO8859-1 \ fi_FI.ISO8859-1 \ fi_FI.UTF-8 \ - fo_FO.ISO8859-1 \ fr_FR.ISO8859-1 \ fr_FR.UTF-8 \ he_IL.UTF-8 \ diff --git a/share/timedef/fo_FO.ISO8859-1.src b/share/timedef/fo_FO.ISO8859-1.src deleted file mode 100644 index e46d29892c..0000000000 --- a/share/timedef/fo_FO.ISO8859-1.src +++ /dev/null @@ -1,102 +0,0 @@ -# $DragonFly: src/share/timedef/fo_FO.ISO8859-1.src,v 1.1 2004/08/29 16:14:25 asmodai Exp $ -# -# WARNING: spaces may be essential at the end of lines -# WARNING: empty lines are essential too -# -# Short months names -# -jan -feb -mar -apr -mai -jun -jul -aug -sep -okt -nov -des -# -# Long months names -# -januar -februar -mars -apríl -mai -juni -juli -august -september -oktober -november -desember -# -# Short weekdays names -# -sun -mán -týs -mik -hós -frí -ley -# -# Long weekdays names -# -sunnudagur -mánadagur -týsdagur -mikudagur -hósdagur -fríggjadagur -leygardagur -# -# X_fmt -# -%H:%M:%S -# -# x_fmt -# -%d/%m-%Y -# -# c_fmt -# -%a %d %b %T %Y -# -# am -# -am -# -# pm -# -pm -# -# date_fmt -# -%a %d %b %Y %T %Z -# -# Long months names (alternative) -# -januar -februar -mars -apríl -mai -juni -juli -august -september -oktober -november -desember -# -# md_order -# -dm -# -# ampm_fmt -# -%I:%M:%S %p -# EOF diff --git a/sys/dev/disk/aic7xxx/aicasm/Makefile b/sys/dev/disk/aic7xxx/aicasm/Makefile index e9bea00e7b..c004691ad6 100644 --- a/sys/dev/disk/aic7xxx/aicasm/Makefile +++ b/sys/dev/disk/aic7xxx/aicasm/Makefile @@ -11,11 +11,14 @@ LSRCS= aicasm_scan.l aicasm_macro_scan.l GENHDRS= aicasm_gram.h aicasm_macro_gram.h .ORDER: aicasm_gram.c aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS} -CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} -DPADD+= ${LIBL} -LDADD+= -ll -WARNS?= 6 +SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS} +SRCS+= sys/types.h ctype.h +CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} +CLEANFILES+= ctype.h +CLEANDIRS+= sys +DPADD+= ${LIBL} +LDADD+= -ll +WARNS?= 6 # Correct path for kernel builds # Don't rely on the kernel's .depend file @@ -24,7 +27,7 @@ WARNS?= 6 DEPENDFILE= .endif -CFLAGS+= -nostdinc -I/usr/include -I. -I${.CURDIR} +CFLAGS+= -I. -I${.CURDIR} .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} .endif @@ -38,6 +41,13 @@ YFLAGS+= -t -v LFLAGS+= -d .endif +sys/types.h: /usr/include/sys/types.h + mkdir -p sys + cp ${.ALLSRC} ${.TARGET} + +ctype.h: /usr/include/ctype.h + cp ${.ALLSRC} ${.TARGET} + # aicasm is used in place, it is not installed anywhere # install: diff --git a/sys/sys/_posix.h b/sys/sys/_posix.h index f7de6d4f50..8d5d77e31f 100644 --- a/sys/sys/_posix.h +++ b/sys/sys/_posix.h @@ -73,7 +73,7 @@ /* Default to existing user space version. */ #ifndef _POSIX_VERSION -#define _POSIX_VERSION 200112L +#define _POSIX_VERSION 200809L #endif /* Test for visibility of P1003.1B features: diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 028500d5d6..7f4204d6b9 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -564,11 +564,16 @@ #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 +#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ +#define __POSIX_VISIBLE 0 +#define __XSI_VISIBLE 0 +#define __BSD_VISIBLE 0 +#define __ISO_C_VISIBLE 2011 #else /* Default environment: show everything. */ -#define __POSIX_VISIBLE 200112 -#define __XSI_VISIBLE 600 +#define __POSIX_VISIBLE 200809 +#define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 1999 +#define __ISO_C_VISIBLE 2011 #endif #endif diff --git a/sys/sys/iconv.h b/sys/sys/iconv.h index eed14772ab..756b2dfbaa 100644 --- a/sys/sys/iconv.h +++ b/sys/sys/iconv.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2000-2001, Boris Popov +/*- + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -29,16 +23,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/iconv.h,v 1.12.8.1 2009/04/15 03:14:26 kensmith Exp $ - * $DragonFly: src/sys/sys/iconv.h,v 1.6 2007/10/03 18:58:20 dillon Exp $ + * $FreeBSD: head/sys/sys/iconv.h 235711 2012-05-21 02:30:22Z kevlo $ */ #ifndef _SYS_ICONV_H_ #define _SYS_ICONV_H_ -#ifndef _SYS_MODULE_H_ -#include -#endif - #define ICONV_CSNMAXLEN 31 /* maximum length of charset name */ #define ICONV_CNVNMAXLEN 31 /* maximum length of converter name */ /* maximum size of data associated with cs pair */ @@ -56,6 +45,10 @@ #define KICONV_UPPER 2 /* toupper converted character */ #define KICONV_FROM_LOWER 4 /* tolower source character, then convert */ #define KICONV_FROM_UPPER 8 /* toupper source character, then convert */ +#define KICONV_WCTYPE 16 /* towlower/towupper characters */ + +#define ENCODING_UNICODE "UTF-16BE" +#define KICONV_WCTYPE_NAME "_wctype" /* * Entry for cslist sysctl @@ -93,13 +86,14 @@ struct iconv_add_out { __BEGIN_DECLS -#define ENCODING_UNICODE "UTF-16BE" #define KICONV_VENDOR_MICSFT 1 /* Microsoft Vendor Code for quirk */ int kiconv_add_xlat_table(const char *, const char *, const u_char *); int kiconv_add_xlat16_cspair(const char *, const char *, int); int kiconv_add_xlat16_cspairs(const char *, const char *); int kiconv_add_xlat16_table(const char *, const char *, const void *, int); +int kiconv_lookupconv(const char *drvname); +int kiconv_lookupcs(const char *tocode, const char *fromcode); const char *kiconv_quirkcs(const char *, int); __END_DECLS @@ -107,6 +101,7 @@ __END_DECLS #else /* !_KERNEL */ #include +#include /* can't avoid that */ #include /* can't avoid that */ #include /* can't avoid that */ @@ -132,7 +127,7 @@ struct iconv_cspair { TAILQ_ENTRY(iconv_cspair) cp_link; }; -#define KICONV_CONVERTER(name,size) \ +#define KICONV_CONVERTER(name,size) \ static struct iconv_converter_class iconv_ ## name ## _class = { \ "iconv_"#name, iconv_ ## name ## _methods, size, NULL \ }; \ @@ -142,7 +137,7 @@ struct iconv_cspair { }; \ DECLARE_MODULE(iconv_ ## name, iconv_ ## name ## _mod, SI_SUB_DRIVERS, SI_ORDER_ANY); -#define KICONV_CES(name,size) \ +#define KICONV_CES(name,size) \ static DEFINE_CLASS(iconv_ces_ ## name, iconv_ces_ ## name ## _methods, (size)); \ static moduledata_t iconv_ces_ ## name ## _mod = { \ "iconv_ces_"#name, iconv_cesmod_handler, \ @@ -167,10 +162,14 @@ int iconv_convchr(void *handle, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); int iconv_convchr_case(void *handle, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype); +int iconv_add(const char *converter, const char *to, const char *from); char* iconv_convstr(void *handle, char *dst, const char *src); void* iconv_convmem(void *handle, void *dst, const void *src, int size); int iconv_vfs_refcount(const char *fsname); +int towlower(int c, void *handle); +int towupper(int c, void *handle); + /* * Bridge struct of iconv functions */ @@ -208,7 +207,7 @@ struct iconv_functions { fsname ## _iconv = & fsname ## _iconv_core; \ break; \ case MOD_UNLOAD: \ - error = iconv_vfs_refcount(#fsname); \ + error = iconv_vfs_refcount(#fsname); \ if (error) \ return (EBUSY); \ fsname ## _iconv = NULL; \ @@ -237,10 +236,11 @@ int iconv_lookupcp(char **cpp, const char *s); int iconv_converter_initstub(struct iconv_converter_class *dp); int iconv_converter_donestub(struct iconv_converter_class *dp); +int iconv_converter_tolowerstub(int c, void *handle); int iconv_converter_handler(module_t mod, int type, void *data); #ifdef ICONV_DEBUG -#define ICDEBUG(format, ...) kprintf("%s: "format, __func__ , __VA_ARGS__) +#define ICDEBUG(format, ...) printf("%s: "format, __func__ , ## __VA_ARGS__) #else #define ICDEBUG(format, ...) #endif diff --git a/sys/sys/param.h b/sys/sys/param.h index 15b940f20d..cc3df42c43 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -101,9 +101,10 @@ * 300500 - 3.5 master * 300501 - Convert libm to FreeBSD's version * 300502 - GEM and i915 KMS support in kernel + * 300503 - Upgrade libiconv, locales, and associated libc functions */ #undef __DragonFly_version -#define __DragonFly_version 300502 /* propagated to newvers */ +#define __DragonFly_version 300503 /* propagated to newvers */ #include diff --git a/sys/sys/time.h b/sys/sys/time.h index ce1337bd08..d9d2b9b705 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,7 +28,6 @@ * * @(#)time.h 8.5 (Berkeley) 5/4/95 * $FreeBSD: src/sys/sys/time.h,v 1.42 1999/12/29 04:24:48 peter Exp $ - * $DragonFly: src/sys/sys/time.h,v 1.20 2008/06/18 09:36:07 hasso Exp $ */ #ifndef _SYS_TIME_H_ @@ -99,7 +94,7 @@ struct timezone { /* Operations on timevals. */ -#define timevalclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 +#define timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timevalcmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ @@ -112,7 +107,7 @@ struct timezone { #ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 +#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ @@ -153,8 +148,6 @@ struct itimerval { /* * Getkerninfo clock information structure - * - * XXX Should be removed, use kinfo_clockinfo insteada. */ struct clockinfo { int hz; /* clock frequency */ @@ -238,14 +231,21 @@ int nanosleep1(struct timespec *rqt, struct timespec *rmt); #endif /* !_KERNEL */ __BEGIN_DECLS -int adjtime (const struct timeval *, struct timeval *); -int futimes (int, const struct timeval *); -int getitimer (int, struct itimerval *); -int gettimeofday (struct timeval *, struct timezone *); -int lutimes (const char *, const struct timeval *); -int setitimer (int, const struct itimerval *, struct itimerval *); -int settimeofday (const struct timeval *, const struct timezone *); -int utimes (const char *, const struct timeval *); + +#if __BSD_VISIBLE +int adjtime(const struct timeval *, struct timeval *); +int futimes(int, const struct timeval *); +int lutimes(const char *, const struct timeval *); +int setitimer(int, const struct itimerval *, struct itimerval *); +int settimeofday(const struct timeval *, const struct timezone *); +int utimes(const char *, const struct timeval *); +#endif + +#if __XSI_VISIBLE +int getitimer(int, struct itimerval *); +int gettimeofday(struct timeval *, struct timezone *); +#endif + __END_DECLS diff --git a/usr.bin/mklocale/ldef.h b/sys/sys/timespec.h similarity index 64% copy from usr.bin/mklocale/ldef.h copy to sys/sys/timespec.h index 8ad765c4f9..2b8822af8a 100644 --- a/usr.bin/mklocale/ldef.h +++ b/sys/sys/timespec.h @@ -1,12 +1,7 @@ -/* $NetBSD: src/usr.bin/mklocale/ldef.h,v 1.4 2003/08/07 11:15:14 agc Exp $ */ - /*- - * Copyright (c) 1993 + * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * - * This code is derived from software contributed to Berkeley by - * Paul Borman at Krystal Technologies. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -31,24 +26,38 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ldef.h 8.1 (Berkeley) 6/6/93 - * $DragonFly: src/usr.bin/mklocale/ldef.h,v 1.3 2005/04/21 16:36:35 joerg Exp $ + * @(#)time.h 8.5 (Berkeley) 5/4/95 + * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp + * $FreeBSD: head/sys/sys/timespec.h 205792 2010-03-28 13:13:22Z ed $ */ -#include "locale/runetype.h" +#ifndef _SYS_TIMESPEC_H_ +#define _SYS_TIMESPEC_H_ + +#include +#include + +#if __BSD_VISIBLE +#define TIMEVAL_TO_TIMESPEC(tv, ts) \ + do { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ + } while (0) +#define TIMESPEC_TO_TIMEVAL(tv, ts) \ + do { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ + } while (0) + +#endif /* __BSD_VISIBLE */ /* - * This should look a LOT like a _RuneEntry + * Structure defined by POSIX.1b to be like a itimerval, but with + * timespecs. Used in the timer_*() system calls. */ -typedef struct rune_list { - __nbrune_t min; - __nbrune_t max; - __nbrune_t map; - u_int32_t *types; - struct rune_list *next; -} rune_list; +struct itimerspec { + struct timespec it_interval; + struct timespec it_value; +}; -typedef struct rune_map { - u_int32_t map[_NB_CACHED_RUNES]; - rune_list *root; -} rune_map; +#endif /* _SYS_TIMESPEC_H_ */ diff --git a/sys/sys/types.h b/sys/sys/types.h index eb79afcd54..e5c641f412 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -242,4 +242,34 @@ __END_DECLS #endif /* __BSD_VISIBLE */ +/* + * rune_t is declared to be an ``int'' instead of the more natural + * ``unsigned long'' or ``long''. Two things are happening here. It is not + * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, + * it looks like 10646 will be a 31 bit standard. This means that if your + * ints cannot hold 32 bits, you will be in trouble. The reason an int was + * chosen over a long is that the is*() and to*() routines take ints (says + * ANSI C), but they use __ct_rune_t instead of int. + * + * NOTE: rune_t is not covered by ANSI nor other standards, and should not + * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and + * rune_t must be the same type. Also, wint_t should be able to hold all + * members of the largest character set plus one extra value (WEOF), and + * must be at least 16 bits. + */ +typedef int __ct_rune_t; /* arg type for ctype funcs */ +typedef __ct_rune_t __rune_t; /* rune_t (see above) */ +typedef __ct_rune_t __wint_t; /* wint_t (see above) */ + +/* + * Also required for locale support + */ +typedef int __nl_item; + +/* Clang already provides these types as built-ins, but only in c++ mode. */ +#if !defined(__clang__) || !defined(__cplusplus) +typedef __uint_least16_t __char16_t; +typedef __uint_least32_t __char32_t; +#endif + #endif /* !_SYS_TYPES_H_ */ diff --git a/usr.bin/colldef/Makefile b/usr.bin/colldef/Makefile index cc70a0fddb..2a8122035e 100644 --- a/usr.bin/colldef/Makefile +++ b/usr.bin/colldef/Makefile @@ -4,14 +4,23 @@ PROG= colldef SRCS= parse.y scan.l y.tab.h LFLAGS= -8 -i CFLAGS+=-I. -I${.CURDIR} +CFLAGS+=-I${.CURDIR}/../../include +CFLAGS+=-I${.CURDIR}/../../lib/libc/locale CFLAGS+=-DCOLLATE_DEBUG LDADD= -ll DPADD= ${LIBL} -SRCS+= collate.h -CLEANFILES+= collate.h +.if defined(BOOTSTRAPPING) +SRCS+= sys/types.h ctype.h +CLEANFILES+= ctype.h +CLEANDIRS+= sys +.endif -collate.h: ${.CURDIR}/../../lib/libc/locale/collate.h - cp ${.CURDIR}/../../lib/libc/locale/collate.h ${.TARGET} +sys/types.h: /usr/include/sys/types.h + mkdir -p sys + cp ${.ALLSRC} ${.TARGET} + +ctype.h: /usr/include/ctype.h + cp ${.ALLSRC} ${.TARGET} .include diff --git a/usr.bin/colldef/colldef.1 b/usr.bin/colldef/colldef.1 index 71a8b30d6c..1c95a5650c 100644 --- a/usr.bin/colldef/colldef.1 +++ b/usr.bin/colldef/colldef.1 @@ -23,8 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.bin/colldef/colldef.1,v 1.8.2.6 2003/02/24 23:04:38 trhodes Exp $ -.\" $DragonFly: src/usr.bin/colldef/colldef.1,v 1.3 2006/02/17 19:38:58 swildner Exp $ +.\" $FreeBSD: head/usr.bin/colldef/colldef.1 213573 2010-10-08 12:40:16Z uqs $ .\" .Dd January 27, 1995 .Dt COLLDEF 1 @@ -48,8 +47,9 @@ and functions. It is used to define the many ways in which strings can be ordered and collated. +The .Fn strxfrm -transforms +function transforms its first argument and places the result in its second argument. The transformed string is such that it can be @@ -58,8 +58,9 @@ correctly ordered with other transformed strings by using .Fn strncmp , or .Fn memcmp . +The .Fn strcoll -transforms its arguments and does a +function transforms its arguments and does a comparison. .Pp The @@ -70,14 +71,14 @@ The output file produced contains the database with collating sequence information in a form usable by system commands and routines. .Pp -Options list: -.Bl -tag -width 4n +The following options are available: +.Bl -tag -width indent .It Fl I Ar map_dir -This option set directory name where +Set directory name where .Ar charmap files can be found, current directory by default. .It Fl o Ar out_file -This option set output file name, +Set output file name, .Ar LC_COLLATE by default. .El @@ -105,15 +106,15 @@ Any statements after the order statement are ignored. .Pp Lines in the specification file beginning with a -.Ar # +.Ql # are treated as comments and are ignored. Blank lines are also ignored. .Pp -.Ar charmap charmapfile +.Dl "charmap charmapfile" .Pp -.Ar charmap +.Ar Charmap defines where a mapping of the character and collating element symbols to the actual character encoding can be found. @@ -123,23 +124,26 @@ The format of is shown below. Symbol names are separated from their values by TAB or -SPACE characters. symbol-value can be specified in +SPACE characters. +Symbol-value can be specified in a hexadecimal (\ex\fI??\fR) or octal (\e\fI???\fR) representation, and can be only one character in length. -.Bd -literal -.Ar symbol-name1 symbol-value1 -.Ar symbol-name2 symbol-value2 -.Ar ... +.Bd -literal -offset indent +symbol-name1 symbol-value1 +symbol-name2 symbol-value2 +\&... .Ed .Pp +Symbol names cannot be specified in +.Ar substitute +fields. +.Pp The .Ar charmap statement is optional. -.Pp -.Ar substitute -\fIsymbol\fR -.Ar with -"\fIrepl_string\fR" +.Bd -literal -offset indent +substitute "symbol" with "repl_string" +.Ed .Pp The .Ar substitute @@ -154,9 +158,9 @@ The .Ar substitute statement is optional. .Pp -.Ar order order_list +.Dl "order order_list" .Pp -.Ar order_list +.Ar Order_list is a list of symbols, separated by semi colons, that defines the collating sequence. The @@ -174,17 +178,17 @@ ways: The symbol itself (for example, .Ar a for the lower-case letter -.Ar a ) +.Ar a ) . .It The symbol in octal representation (for example, .Ar \e141 for the letter -.Ar a ) +.Ar a ) . .It The symbol in hexadecimal representation (for example, .Ar \ex61 for the letter -.Ar a ) +.Ar a ) . .It The symbol name as defined in the .Ar charmap @@ -210,7 +214,7 @@ Symbols .Ar \en , .Ar \er , .Ar \ev -are permitted in its usual C-language meaning +are permitted in its usual C-language meaning. .It The symbol chain (for example: .Ar abc , @@ -218,7 +222,7 @@ The symbol chain (for example: .Ar \exf1b\exf2 ) .It The symbol range (for example, -.Ar a;...;z ) +.Ar a;...;z ) . .It Comma-separated symbols, ranges and chains enclosed in parenthesis (for example .Ar \&( @@ -245,12 +249,13 @@ is used for continuation. In this case, no characters are permitted after the backslash character. .Sh FILES -.Bl -tag -width ".Pa /usr/share/locale//LC_COLLATE" -compact -.It Pa /usr/share/locale//LC_COLLATE -standard shared location for collation orders under the locale +.Bl -tag -width indent +.It Pa /usr/share/locale/ Ns Ao Ar language Ac Ns Pa /LC_COLLATE +The standard shared location for collation orders +under the locale .Aq Ar language . .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS The .Nm utility exits with the following values: diff --git a/usr.bin/colldef/common.h b/usr.bin/colldef/common.h index b21ab2fb80..4e48b336d6 100644 --- a/usr.bin/colldef/common.h +++ b/usr.bin/colldef/common.h @@ -1,6 +1,5 @@ /* - * $FreeBSD: src/usr.bin/colldef/common.h,v 1.2.2.1 2002/08/17 18:57:10 ache Exp $ - * $DragonFly: src/usr.bin/colldef/common.h,v 1.2 2003/06/17 04:29:25 dillon Exp $ + * $FreeBSD: head/usr.bin/colldef/common.h 87052 2001-11-28 09:50:24Z ache $ */ #define CHARMAP_SYMBOL_LEN 64 diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index 04244a1c27..dcfe79d432 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -25,17 +25,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/colldef/parse.y,v 1.15.2.5 2002/10/11 10:43:45 ache Exp $ - * $DragonFly: src/usr.bin/colldef/parse.y,v 1.6 2008/07/10 18:29:51 swildner Exp $ + * $FreeBSD: head/usr.bin/colldef/parse.y 175038 2008-01-01 10:04:10Z imp $ */ + #include -#include +#include #include #include #include #include -#include #include #include #include "collate.h" @@ -59,7 +58,7 @@ u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN]; struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1]; struct __collate_st_chain_pri *__collate_chain_pri_table; -int chain_index; +int chain_index = 0; int prim_pri = 1, sec_pri = 1; #ifdef COLLATE_DEBUG int debug; @@ -119,49 +118,59 @@ order : ORDER order_list { if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table, sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL) yyerror("can't grow chain table"); - (void)memset(__collate_chain_pri_table[chain_index].str, 0, - sizeof(__collate_chain_pri_table[0].str)); - __collate_chain_pri_table[chain_index].prim = 0; - __collate_chain_pri_table[chain_index].sec = 0; + (void)memset(&__collate_chain_pri_table[chain_index], 0, + sizeof(__collate_chain_pri_table[0])); chain_index++; +#ifdef COLLATE_DEBUG + if (debug) + collate_print_tables(); +#endif if ((fp = fopen(out_file, "w")) == NULL) err(EX_UNAVAILABLE, "can't open destination file %s", out_file); - strcpy(__collate_version, COLLATE_VERSION1_1); + strcpy(__collate_version, COLLATE_VERSION1_2); if (fwrite(__collate_version, sizeof(__collate_version), 1, fp) != 1) err(EX_IOERR, - "IO error writing collate version to destination file %s", + "IO error writting collate version to destination file %s", out_file); u32 = htonl(chain_index); if (fwrite(&u32, sizeof(u32), 1, fp) != 1) err(EX_IOERR, - "IO error writing chains number to destination file %s", + "IO error writting chains number to destination file %s", out_file); if (fwrite(__collate_substitute_table, sizeof(__collate_substitute_table), 1, fp) != 1) err(EX_IOERR, - "IO error writing substitute table to destination file %s", + "IO error writting substitute table to destination file %s", out_file); + for (ch = 0; ch < UCHAR_MAX + 1; ch++) { + __collate_char_pri_table[ch].prim = + htonl(__collate_char_pri_table[ch].prim); + __collate_char_pri_table[ch].sec = + htonl(__collate_char_pri_table[ch].sec); + } if (fwrite(__collate_char_pri_table, sizeof(__collate_char_pri_table), 1, fp) != 1) err(EX_IOERR, - "IO error writing char table to destination file %s", + "IO error writting char table to destination file %s", out_file); + for (ch = 0; ch < chain_index; ch++) { + __collate_chain_pri_table[ch].prim = + htonl(__collate_chain_pri_table[ch].prim); + __collate_chain_pri_table[ch].sec = + htonl(__collate_chain_pri_table[ch].sec); + } if (fwrite(__collate_chain_pri_table, sizeof(*__collate_chain_pri_table), chain_index, fp) != (size_t)chain_index) err(EX_IOERR, - "IO error writing chain table to destination file %s", + "IO error writting chain table to destination file %s", out_file); if (fclose(fp) != 0) err(EX_IOERR, "IO error closing destination file %s", out_file); -#ifdef COLLATE_DEBUG - if (debug) - collate_print_tables(); -#endif exit(EX_OK); } ; @@ -195,11 +204,10 @@ item : CHAR { if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table, sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL) yyerror("can't grow chain table"); - (void)memset(__collate_chain_pri_table[chain_index].str, 0, - sizeof(__collate_chain_pri_table[0].str)); + (void)memset(&__collate_chain_pri_table[chain_index], 0, + sizeof(__collate_chain_pri_table[0])); (void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain); __collate_chain_pri_table[chain_index].prim = prim_pri++; - __collate_chain_pri_table[chain_index].sec = 0; chain_index++; } | CHAR RANGE CHAR { @@ -250,11 +258,10 @@ prim_sub_item : CHAR { if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table, sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL) yyerror("can't grow chain table"); - (void)memset(__collate_chain_pri_table[chain_index].str, 0, - sizeof(__collate_chain_pri_table[0].str)); + (void)memset(&__collate_chain_pri_table[chain_index], 0, + sizeof(__collate_chain_pri_table[0])); (void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain); __collate_chain_pri_table[chain_index].prim = prim_pri; - __collate_chain_pri_table[chain_index].sec = 0; chain_index++; } ; @@ -282,8 +289,8 @@ sec_sub_item : CHAR { if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table, sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL) yyerror("can't grow chain table"); - (void)memset(__collate_chain_pri_table[chain_index].str, 0, - sizeof(__collate_chain_pri_table[0].str)); + (void)memset(&__collate_chain_pri_table[chain_index], 0, + sizeof(__collate_chain_pri_table[0])); (void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain); __collate_chain_pri_table[chain_index].prim = prim_pri; __collate_chain_pri_table[chain_index].sec = sec_pri++; @@ -335,7 +342,7 @@ main(int ac, char **av) static void usage(void) { - fprintf(stderr, "usage: colldef [-o out_file] [-I map_dir] [filename]\n"); + fprintf(stderr, "usage: colldef [-I map_dir] [-o out_file] [filename]\n"); exit(EX_USAGE); } @@ -356,7 +363,6 @@ static void collate_print_tables(void) { int i; - struct __collate_st_chain_pri *p2; printf("Substitute table:\n"); for (i = 0; i < UCHAR_MAX + 1; i++) @@ -364,8 +370,11 @@ collate_print_tables(void) printf("\t'%c' --> \"%s\"\n", i, __collate_substitute_table[i]); printf("Chain priority table:\n"); - for (p2 = __collate_chain_pri_table; p2->str[0] != '\0'; p2++) - printf("\t\"%s\" : %d %d\n", p2->str, p2->prim, p2->sec); + for (i = 0; i < chain_index - 1; i++) + printf("\t\"%s\" : %d %d\n", + __collate_chain_pri_table[i].str, + __collate_chain_pri_table[i].prim, + __collate_chain_pri_table[i].sec); printf("Char priority table:\n"); for (i = 0; i < UCHAR_MAX + 1; i++) printf("\t'%c' : %d %d\n", i, __collate_char_pri_table[i].prim, diff --git a/usr.bin/colldef/scan.l b/usr.bin/colldef/scan.l index 51926afb9d..a123c772a2 100644 --- a/usr.bin/colldef/scan.l +++ b/usr.bin/colldef/scan.l @@ -26,36 +26,36 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/colldef/scan.l,v 1.11.2.2 2002/10/11 10:43:45 ache Exp $ + * $FreeBSD: head/usr.bin/colldef/scan.l 175038 2008-01-01 10:04:10Z imp $ */ + #include #include #include +#include #include #include -#include #include "common.h" #include "y.tab.h" #pragma GCC diagnostic ignored "-Wsign-compare" int line_no = 1, save_no, fromsubs; -static u_char buffer[BUFSIZE], *buf_ptr; +u_char buff[BUFSIZE], *zptr; FILE *map_fp; YY_BUFFER_STATE main_buf, map_buf; #ifdef FLEX_DEBUG YYSTYPE yylval; #endif /* FLEX_DEBUG */ - %} %option noinput %option nounput %% [ \t]+ ; -\" { buf_ptr = buffer; BEGIN(string); } -\< { buf_ptr = buffer; fromsubs = 1; BEGIN(name); } -\< { buf_ptr = buffer; fromsubs = 0; BEGIN(name); } +\" { zptr = buff; BEGIN(string); } +\< { zptr = buff; fromsubs = 1; BEGIN(name); } +\< { zptr = buff; fromsubs = 0; BEGIN(name); } ^#.*\n line_no++; ^\n line_no++; \\\n line_no++; @@ -74,7 +74,7 @@ YYSTYPE yylval; \n { line_no++; if (map_fp != NULL) { - buf_ptr = buffer; + zptr = buff; BEGIN(defn); } return '\n'; @@ -103,45 +103,45 @@ YYSTYPE yylval; . { yylval.ch = *yytext; return CHAR; } ^#.*\n line_no++; [ \t]+ { - if (buf_ptr == buffer) + if (zptr == buff) errx(EX_UNAVAILABLE, "map expected near line %u of %s", line_no, map_name); - *buf_ptr = '\0'; - strcpy(yylval.str, buffer); + *zptr = '\0'; + strcpy(yylval.str, buff); BEGIN(nchar); return DEFN; } \/\/ { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "name buffer overflow near line %u, character '/'", line_no); - *buf_ptr++ = '/'; + *zptr++ = '/'; } \/\> { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "name buffer overflow near line %u, character '>'", line_no); - *buf_ptr++ = '>'; + *zptr++ = '>'; } \\\" { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\"'", line_no); - *buf_ptr++ = '"'; + *zptr++ = '"'; } \> { u_int i; - if (buf_ptr == buffer) + if (zptr == buff) errx(EX_UNAVAILABLE, "non-empty name expected near line %u", line_no); - *buf_ptr = '\0'; + *zptr = '\0'; for (i = 0; i <= UCHAR_MAX; i++) { - if (strcmp(charmap_table[i], buffer) == 0) + if (strcmp(charmap_table[i], buff) == 0) goto findit; } errx(EX_UNAVAILABLE, "name <%s> not 'charmap'-defined near line %u", - buffer, line_no); + buff, line_no); findit: yylval.ch = i; if (fromsubs) @@ -151,8 +151,8 @@ YYSTYPE yylval; return CHAR; } \" { - *buf_ptr = '\0'; - strcpy(yylval.str, buffer); + *zptr = '\0'; + strcpy(yylval.str, buff); BEGIN(subs2); return STRING; } @@ -162,52 +162,52 @@ YYSTYPE yylval; if (!isascii(*yytext) || !isprint(*yytext)) errx(EX_UNAVAILABLE, "non-ASCII or non-printable character 0x%02x not allowed in the map/name near line %u of %s", *yytext, line_no, s); - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "map/name buffer overflow near line %u of %s, character '%c'", line_no, s, *yytext); - *buf_ptr++ = *yytext; + *zptr++ = *yytext; } \\t { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\t'", line_no); - *buf_ptr++ = '\t'; + *zptr++ = '\t'; } \\b { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\b'", line_no); - *buf_ptr++ = '\b'; + *zptr++ = '\b'; } \\f { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\f'", line_no); - *buf_ptr++ = '\f'; + *zptr++ = '\f'; } \\v { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\v'", line_no); - *buf_ptr++ = '\v'; + *zptr++ = '\v'; } \\n { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\n'", line_no); - *buf_ptr++ = '\n'; + *zptr++ = '\n'; } \\r { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\r'", line_no); - *buf_ptr++ = '\r'; + *zptr++ = '\r'; } \\a { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\a'", line_no); - *buf_ptr++ = '\a'; + *zptr++ = '\a'; } \n { const char *s = (map_fp != NULL) ? map_name : "input"; @@ -223,25 +223,25 @@ YYSTYPE yylval; u_int v; sscanf(&yytext[2], "%x", &v); - *buf_ptr++ = (u_char)v; + *zptr++ = (u_char)v; } \\[0-7]{3} { u_int v; sscanf(&yytext[1], "%o", &v); - *buf_ptr++ = (u_char)v; + *zptr++ = (u_char)v; } \\. { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '%c'", line_no, yytext[1]); - *buf_ptr++ = yytext[1]; + *zptr++ = yytext[1]; } . { - if(buf_ptr >= buffer + sizeof(buffer) - 1) + if(zptr >= buff + sizeof(buff) - 1) errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '%c'", line_no, *yytext); - *buf_ptr++ = *yytext; + *zptr++ = *yytext; } [^ \t\n]+ { strcat(map_name, "/"); @@ -254,7 +254,7 @@ YYSTYPE yylval; map_buf = yy_new_buffer(map_fp, YY_BUF_SIZE); main_buf = YY_CURRENT_BUFFER; yy_switch_to_buffer(map_buf); - buf_ptr = buffer; + zptr = buff; BEGIN(defn); } \n { @@ -267,7 +267,7 @@ YYSTYPE yylval; } <> { if(map_fp != NULL) { - if (buf_ptr != buffer) + if (zptr != buff) errx(EX_UNAVAILABLE, "premature EOF in the map near line %u of %s", line_no, map_name); yy_switch_to_buffer(main_buf); yy_delete_buffer(map_buf); @@ -280,7 +280,7 @@ YYSTYPE yylval; } %% #ifdef FLEX_DEBUG -main(void) +main() { while(yylex()) ; diff --git a/usr.bin/gencat/Makefile b/usr.bin/gencat/Makefile index b237a798da..cfc5fd784d 100644 --- a/usr.bin/gencat/Makefile +++ b/usr.bin/gencat/Makefile @@ -8,9 +8,15 @@ WARNS?= 2 .if defined(BOOTSTRAPPING) nl_types.h: ../../include/nl_types.h cp ${.CURDIR}/../../include/nl_types.h ${.TARGET} -SRCS+= nl_types.h + +types.h: ${.CURDIR}/../../sys/sys/types.h + mkdir sys + cp ${.ALLSRC} sys/${.TARGET} + +SRCS+= nl_types.h types.h CFLAGS+= -I${.OBJDIR} CLEANFILES+= nl_types.h +CLEANDIRS+= sys .endif .include diff --git a/usr.bin/gencat/gencat.1 b/usr.bin/gencat/gencat.1 index 11e837765b..8a177a6847 100644 --- a/usr.bin/gencat/gencat.1 +++ b/usr.bin/gencat/gencat.1 @@ -1,104 +1,191 @@ -.\" $NetBSD: src/usr.bin/gencat/gencat.1,v 1.8 2003/05/02 08:35:42 gmcgarry Exp $ +.\" $OpenBSD: gencat.1,v 1.3 1997/06/11 15:39:54 kstailey Exp $ .\" -.\" Written by Kee Hinckley +.\" Copyright (c) 1997 Ken Stailey .\" -.Dd April 29, 1999 +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD: head/usr.bin/gencat/gencat.1 213573 2010-10-08 12:40:16Z uqs $ +.\" +.Dd June 11, 1997 .Dt GENCAT 1 .Os .Sh NAME .Nm gencat -.Nd generates a Native Language Support (NLS) message catalog file +.Nd NLS catalog compiler .Sh SYNOPSIS .Nm -.Ar catalog-file -.Ar message-file -.Op Ar message-file ... +.Ar "output-file" +.Ar "input-files..." .Sh DESCRIPTION The .Nm -command reads one or more files containing message strings that will -be displayed using the -.Xr catgets 3 -library call. -From these files it generates a message catalog which -is loaded dynamically by the Native Language Support (NLS) library at run time. -.Pp -The message description files are text files in the format described below. +utility merges the text NLS input files +.Ar "input-files..." +into a formatted message catalog file +.Ar "output-file" . +The file +.Ar "output-file" +will be created if it does not already exist. +If +.Ar "output-file" +does exist, its messages will be included in the new +.Ar "output-file" . +If set and message numbers collide, the new message text defined in +.Ar "input-files..." +will replace the old message text currently contained in +.Ar "output-file" . +.Sh INPUT FILES +The format of a message text source file is defined below. +Note that +the fields of a message text source line are separated by a single space +character: any other space characters are considered to be part of the +field contents. +.Bl -tag -width 3n +.It Li $set Ar n comment +This line specifies the set identifier of the following messages until +the next +.Li $set +or end-of-file appears. +The argument +.Ar n +is the set identifier which is defined as a number in the range +[1, (NL_SETMAX)]. +Set identifiers must occur in ascending order within +a single source file, but need not be contiguous. +Any string following +a space following the set identifier is treated as a comment. +If no +.Li $set +directive is specified in a given source file, all messages will +be located in the default message set NL_SETD. +.It Li $del Ar n comment +This line deletes messages from set +.Ar n +from a message catalog. +The +.Ar n +specifies a set number. +Any string following a space following the set +number is treated as a comment. +.It Li $ Ar comment +A line beginning with +.Li $ +followed by a space is treated as a comment. +.It Ar m message-text +A message line consists of a message identifier +.Ar m +in the range [1, (NL_MSGMAX)]. +The +.Ar message-text +is stored in the message catalog with the set identifier specified by +the last +.Li $set +directive, and the message identifier +.Ar m . +If the +.Ar message-text +is empty, and there is a space character following the message identifier, +an empty string is stored in the message catalog. +If the +.Ar message-text +is empty, and if there is no space character following the message +identifier, then the existing message in the current set with the +specified message identifier is deleted from the catalog. +Message +identifiers must be in ascending order within a single set, but +need not be contiguous. +The +.Ar message-text +length must be in the range [0, (NL_TEXTMAX)]. +.It Li $quote Ar c +This line specifies an optional quote character +.Ar c +which can be used to surround +.Ar message-text +so that trailing space or empty messages are visible in message +source files. +By default, or if an empty +.Li $quote +directive is specified, no quoting of +.Ar message-text +will be recognized. +.El .Pp -The message catalog file is a binary file. -If it already exists, it will be truncated when -.Nm -is run. +Empty lines in message source files are ignored. +The effect of lines +beginning with any character other than those described above is +undefined. .Pp -Error messages are grouped into sets, and a program can load a -particular set depending on which type, or language, of messages -is desired. -.Sh MESSAGE FILE FORMAT -Empty lines and leading blanks are ignored. -.Bl -tag -width "NN message" -.It Em "$set NN" -Determines the set to be used for all subsequent messages. -.Ar "NN" -is an integer greater than 0. -.It Em "$delset NN" -Removes a set from the catalog. -.Ar "NN" -is an integer greater than 0. +Text strings can contain the following special characters and escape +sequences. +In addition, if a quote character is defined, it may be +escaped as well to embed a literal quote character. .Pp -If a set was created earlier in the -current file, or in a file previously read by the -.Nm -command, this command will remove it. -.It Em "$quote C" -Sets a quote character to be used around the messages. -.Ar "C" -may be any character other than white space. +.Bl -tag -width "\eooo" -offset indent -compact +.It Li \en +line feed +.It Li \et +horizontal tab +.It Li \ev +vertical tab +.It Li \eb +backspace +.It Li \er +carriage return +.It Li \ef +form feed +.It Li \e\e +backslash +.It Li \eooo +octal number in the range [000, 377] +.El .Pp -If this is specified, then messages must begin and end with the -quote character. -By default no quote character is used. -If none is specified, then the current quote character is unset. -This is useful when messages must contain leading white space. -.It Em "NN message" -Defines a message. -.Ar "NN" -is an integer greater than 0. +A backslash character immediately before the end of the line in a file +is used to continue the line onto the next line, e.g.: .Pp -The message is read until the end of the line or a quote character (if one is -specified). -If no message is provided, the message with the number -.Ar "NN" -is removed from the catalog. -If no "set" has been created, this command generates an error. -.El +.Dl 1 This line is continued \e +.Dl on this line. .Pp -Messages may contain any characters, however the "\\" -is special as an escape character, where the following instances -are allowed: -.Bd -literal -offset indent -\&\\\\ Generates a single backslash. -\&\\n Generates a newline (as defined by the C compiler). -\&\\t Generates a tab (as defined by the C compiler). -\&\\v Generates a vertical tab (as defined by the C compiler). -\&\\b Generates a backspace (as defined by the C compiler). -\&\\r Generates a carriage return (as defined by the C compiler). -\&\\f Generates a form feed (as defined by the C compiler). -\&\\NNN Generates the character corresponding to the specified - octal number. -\&\\EOL A backslash at the end of line continues the message onto - the next line. -\&\\quote A backslash preceding the current quote character generates - the quote character. -.Ed +If the character following the backslash is not one of those specified, +the backslash is ignored. +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr catclose 3 , .Xr catgets 3 , -.Xr catopen 3 , -.Xr nls 7 +.Xr catopen 3 +.Sh STANDARDS +The +.Nm +utility is compliant with the +.St -xpg4 +standard. .Sh AUTHORS .An -nosplit -The Native Language Support (NLS) message catalog facility was -contributed by -.An J.T. Conklin Aq Mt jtc@NetBSD.org . -This page was written by -.An Kee Hinckley Aq Mt nazgul@somewhere.com . +This manual page was originally written by +.An Ken Stailey +and later revised by +.An Terry Lambert . +.Sh BUGS +A message catalog file created from a blank input file cannot be revised; +it must be deleted and recreated. diff --git a/usr.bin/gencat/gencat.c b/usr.bin/gencat/gencat.c index b461aa8fd2..a15817015a 100644 --- a/usr.bin/gencat/gencat.c +++ b/usr.bin/gencat/gencat.c @@ -1,5 +1,7 @@ -/* $NetBSD: src/usr.bin/gencat/gencat.c,v 1.19 2004/01/05 23:23:34 jmmv Exp $ */ -/* $DragonFly: src/usr.bin/gencat/gencat.c,v 1.5 2008/10/16 01:52:32 swildner Exp $ */ +/* ex:ts=4 + */ + +/* $NetBSD: gencat.c,v 1.18 2003/10/27 00:12:43 lukem Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -16,13 +18,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -35,6 +30,8 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: head/usr.bin/gencat/gencat.c 241737 2012-10-19 14:49:42Z ed $ */ /*********************************************************** @@ -69,69 +66,61 @@ up-to-date. Many thanks. ******************************************************************/ + +#define _NLS_PRIVATE + #include #include -#include +#include /* for htonl() */ #include #include #include #include +#include #include #include #include #include -#define _NLS_PRIVATE -#include - -#ifndef NL_SETMAX -#define NL_SETMAX 255 -#endif -#ifndef NL_MSGMAX -#define NL_MSGMAX 2048 -#endif - struct _msgT { long msgId; char *str; - LIST_ENTRY(_msgT) entries; + LIST_ENTRY(_msgT) entries; }; struct _setT { long setId; - LIST_HEAD(msghead, _msgT) msghead; - LIST_ENTRY(_setT) entries; + LIST_HEAD(msghead, _msgT) msghead; + LIST_ENTRY(_setT) entries; }; -LIST_HEAD(sethead, _setT) sethead; +static LIST_HEAD(sethead, _setT) sethead; static struct _setT *curSet; static char *curline = NULL; static long lineno = 0; -static char *cskip(char *); -static void error(char *, char *); -static void nomem(void); -static char *getline(int); -static char *getmsg(int, char *, char); -static void warning(char *, char *); -static char *wskip(char *); -static char *xstrdup(const char *); -static void *xmalloc(size_t); -static void *xrealloc(void *, size_t); - -void MCParse(int fd); -void MCReadCat(int fd); -void MCWriteCat(int fd); -void MCDelMsg(int msgId); -void MCAddMsg(int msgId, const char *msg); -void MCAddSet(int setId); -void MCDelSet(int setId); -int main(int, char **); +static char *cskip(char *); +static void error(const char *); +static char *getline(int); +static char *getmsg(int, char *, char); +static void warning(const char *, const char *); +static char *wskip(char *); +static char *xstrdup(const char *); +static void *xmalloc(size_t); +static void *xrealloc(void *, size_t); + +void MCParse(int); +void MCReadCat(int); +void MCWriteCat(int); +void MCDelMsg(int); +void MCAddMsg(int, const char *); +void MCAddSet(int); +void MCDelSet(int); void usage(void); - +int main(int, char **); void usage(void) @@ -141,14 +130,28 @@ usage(void) } int -main(int argc, char *argv[]) +main(int argc, char **argv) { int ofd, ifd; - char *catfile = NULL; + char *catfile = NULL; int c; +#define DEPRECATEDMSG 1 + +#ifdef DEPRECATEDMSG + while ((c = getopt(argc, argv, "new")) != -1) { +#else while ((c = getopt(argc, argv, "")) != -1) { +#endif switch (c) { +#ifdef DEPRECATEDMSG + case 'n': + fprintf(stderr, "WARNING: Usage of \"-new\" argument is deprecated.\n"); + case 'e': + case 'w': + break; +#endif + case '?': default: usage(); /* NOTREACHED */ @@ -177,7 +180,7 @@ main(int argc, char *argv[]) } static void -warning(char *cptr, char *msg) +warning(const char *cptr, const char *msg) { fprintf(stderr, "%s: %s on line %ld\n", getprogname(), msg, lineno); fprintf(stderr, "%s\n", curline); @@ -189,25 +192,14 @@ warning(char *cptr, char *msg) } } -static void -error(char *cptr, char *msg) -{ - warning(cptr, msg); - exit(1); -} - -#if 0 /* XXX unused */ -static void -corrupt(void) -{ - error(NULL, "corrupt message catalog"); -} -#endif +#define CORRUPT() { error("corrupt message catalog"); } +#define NOMEM() { error("out of memory"); } static void -nomem(void) +error(const char *msg) { - error(NULL, "out of memory"); + warning(NULL, msg); + exit(1); } static void * @@ -216,7 +208,7 @@ xmalloc(size_t len) void *p; if ((p = malloc(len)) == NULL) - nomem(); + NOMEM(); return (p); } @@ -224,7 +216,7 @@ static void * xrealloc(void *ptr, size_t size) { if ((ptr = realloc(ptr, size)) == NULL) - nomem(); + NOMEM(); return (ptr); } @@ -234,7 +226,7 @@ xstrdup(const char *str) char *nstr; if ((nstr = strdup(str)) == NULL) - nomem(); + NOMEM(); return (nstr); } @@ -344,40 +336,28 @@ getmsg(int fd, char *cptr, char quote) case '\0': cptr = getline(fd); if (!cptr) - error(NULL, "premature end of file"); + error("premature end of file"); msglen += strlen(cptr); i = tptr - msg; msg = xrealloc(msg, msglen); tptr = msg + i; break; - case 'n': - *tptr++ = '\n'; - ++cptr; - break; - case 't': - *tptr++ = '\t'; - ++cptr; - break; - case 'v': - *tptr++ = '\v'; - ++cptr; - break; - case 'b': - *tptr++ = '\b'; - ++cptr; - break; - case 'r': - *tptr++ = '\r'; - ++cptr; - break; - case 'f': - *tptr++ = '\f'; - ++cptr; - break; - case '\\': - *tptr++ = '\\'; - ++cptr; - break; + + #define CASEOF(CS, CH) \ + case CS: \ + *tptr++ = CH; \ + ++cptr; \ + break; \ + + CASEOF('n', '\n'); + CASEOF('t', '\t'); + CASEOF('v', '\v'); + CASEOF('b', '\b'); + CASEOF('r', '\r'); + CASEOF('f', '\f'); + CASEOF('"', '"'); + CASEOF('\\', '\\'); + default: if (quote && *cptr == quote) { *tptr++ = *cptr++; @@ -482,88 +462,6 @@ MCParse(int fd) } } -void -MCReadCat(int fd) -{ -#if 0 - MCHeaderT mcHead; - MCMsgT mcMsg; - MCSetT mcSet; - msgT *msg; - setT *set; - int i; - char *data; - - /* XXX init sethead? */ - - if (read(fd, &mcHead, sizeof(mcHead)) != sizeof(mcHead)) - corrupt(); - if (strncmp(mcHead.magic, MCMagic, MCMagicLen) != 0) - corrupt(); - if (mcHead.majorVer != MCMajorVer) - error(NULL, "unrecognized catalog version"); - if ((mcHead.flags & MCGetByteOrder()) == 0) - error(NULL, "wrong byte order"); - - if (lseek(fd, mcHead.firstSet, SEEK_SET) == -1) - corrupt(); - - for (;;) { - if (read(fd, &mcSet, sizeof(mcSet)) != sizeof(mcSet)) - corrupt(); - if (mcSet.invalid) - continue; - - set = xmalloc(sizeof(setT)); - memset(set, '\0', sizeof(*set)); - if (cat->first) { - cat->last->next = set; - set->prev = cat->last; - cat->last = set; - } else - cat->first = cat->last = set; - - set->setId = mcSet.setId; - - /* Get the data */ - if (mcSet.dataLen) { - data = xmalloc(mcSet.dataLen); - if (lseek(fd, mcSet.data.off, SEEK_SET) == -1) - corrupt(); - if (read(fd, data, mcSet.dataLen) != mcSet.dataLen) - corrupt(); - if (lseek(fd, mcSet.u.firstMsg, SEEK_SET) == -1) - corrupt(); - - for (i = 0; i < mcSet.numMsgs; ++i) { - if (read(fd, &mcMsg, sizeof(mcMsg)) != sizeof(mcMsg)) - corrupt(); - if (mcMsg.invalid) { - --i; - continue; - } - msg = xmalloc(sizeof(msgT)); - memset(msg, '\0', sizeof(*msg)); - if (set->first) { - set->last->next = msg; - msg->prev = set->last; - set->last = msg; - } else - set->first = set->last = msg; - - msg->msgId = mcMsg.msgId; - msg->str = xstrdup((char *) (data + mcMsg.msg.off)); - } - free(data); - } - if (!mcSet.nextSet) - break; - if (lseek(fd, mcSet.nextSet, SEEK_SET) == -1) - corrupt(); - } -#endif -} - /* * Write message catalog. * @@ -635,9 +533,9 @@ MCWriteCat(int fd) nmsgs * sizeof(struct _nls_msg_hdr)); /* compute offsets for set & msg header tables and string pool */ - set_hdr = (struct _nls_set_hdr *) ((char *) msgcat + + set_hdr = (struct _nls_set_hdr *)(void *)((char *)msgcat + sizeof(struct _nls_cat_hdr)); - msg_hdr = (struct _nls_msg_hdr *) ((char *) msgcat + + msg_hdr = (struct _nls_msg_hdr *)(void *)((char *)msgcat + sizeof(struct _nls_cat_hdr) + nsets * sizeof(struct _nls_set_hdr)); strings = (char *) msgcat + @@ -684,11 +582,11 @@ MCAddSet(int setId) struct _setT *p, *q; if (setId <= 0) { - error(NULL, "setId's must be greater than zero"); + error("setId's must be greater than zero"); /* NOTREACHED */ } if (setId > NL_SETMAX) { - error(NULL, "setId exceeds limit"); + error("setId exceeds limit"); /* NOTREACHED */ } @@ -721,14 +619,14 @@ MCAddMsg(int msgId, const char *str) struct _msgT *p, *q; if (!curSet) - error(NULL, "can't specify a message when no set exists"); + error("can't specify a message when no set exists"); if (msgId <= 0) { - error(NULL, "msgId's must be greater than zero"); + error("msgId's must be greater than zero"); /* NOTREACHED */ } if (msgId > NL_MSGMAX) { - error(NULL, "msgID exceeds limit"); + error("msgID exceeds limit"); /* NOTREACHED */ } @@ -782,7 +680,7 @@ MCDelMsg(int msgId) struct _msgT *msg; if (!curSet) - error(NULL, "you can't delete a message before defining the set"); + error("you can't delete a message before defining the set"); msg = curSet->msghead.lh_first; for (; msg != NULL && msg->msgId < msgId; msg = msg->entries.le_next); diff --git a/usr.bin/iconv/iconv.1 b/usr.bin/iconv/iconv.1 index ef59462af9..f01df45b2c 100644 --- a/usr.bin/iconv/iconv.1 +++ b/usr.bin/iconv/iconv.1 @@ -1,5 +1,5 @@ -.\" $NetBSD: iconv.1,v 1.1 2003/07/04 06:59:55 tshiozak Exp $ -.\" $DragonFly: src/usr.bin/iconv/iconv.1,v 1.3 2007/05/17 08:19:02 swildner Exp $ +.\" $FreeBSD: head/usr.bin/iconv/iconv.1 219019 2011-02-25 00:04:39Z gabor $ +.\" $NetBSD: iconv.1,v 1.3 2008/03/20 11:35:44 tnozaki Exp $ .\" .\" Copyright (c)2003 Citrus Project, .\" All rights reserved. @@ -25,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 4, 2003 +.Dd October 22, 2009 .Dt ICONV 1 .Os -.\" ---------------------------------------------------------------------- .Sh NAME .Nm iconv .Nd codeset conversion utility -.\" ---------------------------------------------------------------------- .Sh SYNOPSIS .Nm .Op Fl cs @@ -42,8 +40,19 @@ .Ar to_name .Op Ar file ... .Nm +.Fl f +.Ar from_name +.Op Fl cs +.Op Fl t Ar to_name +.Op Ar file ... +.Nm +.Fl t +.Ar to_name +.Op Fl cs +.Op Fl f Ar from_name +.Op Ar file ... +.Nm .Fl l -.\" ---------------------------------------------------------------------- .Sh DESCRIPTION The .Nm @@ -66,7 +75,7 @@ outputs an .Dq invalid character specified by the .Ar to_name -codeset when it encounters a character which is valid in the +codeset when it encounts a character which is valid in the .Ar from_name codeset but does not have a corresponding character in the .Ar to_name @@ -93,19 +102,18 @@ This option prevents this behaviour. Specifies the destination codeset name as .Ar to_name . .El -.\" ---------------------------------------------------------------------- .Sh EXIT STATUS .Ex -std iconv -.\" ---------------------------------------------------------------------- .Sh SEE ALSO +.Xr mkcsmapper 1 , +.Xr mkesdb 1 , .Xr iconv 3 -.\" ---------------------------------------------------------------------- .Sh STANDARDS .Nm conform to -.St -p1003.1-2001 . -.\" ---------------------------------------------------------------------- +.St -p1003.1-2008 . .Sh HISTORY .Nm first appeared in -.Nx 2.0 . +.Nx 2.0 , and made its appearance in +.Dx 1.2 . diff --git a/usr.bin/iconv/iconv.c b/usr.bin/iconv/iconv.c index d7ec20873e..66811107c5 100644 --- a/usr.bin/iconv/iconv.c +++ b/usr.bin/iconv/iconv.c @@ -1,5 +1,5 @@ -/* $NetBSD: iconv.c,v 1.4 2003/10/20 12:56:18 yamt Exp $ */ -/* $DragonFly: src/usr.bin/iconv/iconv.c,v 1.2 2008/07/10 18:29:51 swildner Exp $ */ +/* $FreeBSD: head/usr.bin/iconv/iconv.c 252583 2013-07-03 18:27:45Z peter $ */ +/* $NetBSD: iconv.c,v 1.16 2009/02/20 15:28:21 yamt Exp $ */ /*- * Copyright (c)2003 Citrus Project, @@ -27,190 +27,193 @@ * SUCH DAMAGE. */ -#include +#include + #include #include +#include #include +#include +#include +#include #include #include #include #include -static void -usage(void) -{ - fprintf(stderr, - "usage:\n" - "\t%s [-cs] -f -t [file ...]\n" - "\t%s -l\n", - getprogname(), getprogname()); - exit(1); -} +static unsigned long long invalids; -/* - * qsort() helper function - */ -static int -scmp(const void *v1, const void *v2) -{ - const char * const *s1 = v1; - const char * const *s2 = v2; +static void do_conv(FILE *, const char *, const char *, bool, bool); +static int do_list(unsigned int, const char * const *, void *); +static void usage(void); - return(strcasecmp(*s1, *s2)); -} +static struct option long_options[] = { + {"from-code", required_argument, NULL, 'f'}, + {"list", no_argument, NULL, 'l'}, + {"silent", no_argument, NULL, 's'}, + {"to-code", required_argument, NULL, 't'}, + {NULL, no_argument, NULL, 0} +}; static void -show_codesets(void) +usage(void) { - char **list; - size_t sz, i; - - if (__iconv_get_list(&list, &sz)) - err(EXIT_FAILURE, "__iconv_get_list()"); - - qsort(list, sz, sizeof(char *), scmp); - - for (i=0; i -t [file ...]\n" + "\t%1$s -f [-cs] [-t ] [file ...]\n" + "\t%1$s -t [-cs] [-f ] [file ...]\n" + "\t%1$s -l\n", getprogname()); + exit(1); } #define INBUFSIZE 1024 -#define OUTBUFSIZE (INBUFSIZE*2) - +#define OUTBUFSIZE (INBUFSIZE * 2) static void -do_conv(FILE *fp, const char *from, const char *to, int silent, - int hide_invalid) +do_conv(FILE *fp, const char *from, const char *to, bool silent, + bool hide_invalid) { + iconv_t cd; char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *out; const char *in; - size_t inbytes, outbytes, invalids; - ssize_t ret; - iconv_t cd; - u_int32_t flags = 0; + size_t inbytes, outbytes, ret; - if (hide_invalid) - flags |= __ICONV_F_HIDE_INVALID; - cd = iconv_open(to, from); - if (cd == (iconv_t)-1) + if ((cd = iconv_open(to, from)) == (iconv_t)-1) err(EXIT_FAILURE, "iconv_open(%s, %s)", to, from); - invalids = 0; + if (hide_invalid) { + int arg = 1; + + if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&arg) == -1) + err(1, NULL); + } while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) { in = inbuf; - while (inbytes>0) { + while (inbytes > 0) { size_t inval; out = outbuf; outbytes = OUTBUFSIZE; ret = __iconv(cd, &in, &inbytes, &out, &outbytes, - flags, &inval); + 0, &inval); invalids += inval; - if (ret == -1 && errno != E2BIG) { - /* - * XXX: iconv(3) is bad interface. - * invalid character count is lost here. - * instead, we just provide __iconv function. - */ + if (outbytes < OUTBUFSIZE) + (void)fwrite(outbuf, 1, OUTBUFSIZE - outbytes, + stdout); + if (ret == (size_t)-1 && errno != E2BIG) { if (errno != EINVAL || in == inbuf) err(EXIT_FAILURE, "iconv()"); /* incomplete input character */ - memmove(inbuf, in, inbytes); - ret = fread(inbuf+inbytes, 1, - INBUFSIZE-inbytes, fp); + (void)memmove(inbuf, in, inbytes); + ret = fread(inbuf + inbytes, 1, + INBUFSIZE - inbytes, fp); if (ret == 0) { + fflush(stdout); if (feof(fp)) errx(EXIT_FAILURE, - "iconv(): %s", - strerror(EINVAL)); + "unexpected end of file; " + "the last character is " + "incomplete."); else err(EXIT_FAILURE, "fread()"); } in = inbuf; inbytes += ret; } - if (outbytes < OUTBUFSIZE) - fwrite(outbuf, 1, OUTBUFSIZE-outbytes, stdout); } } /* reset the shift state of the output buffer */ outbytes = OUTBUFSIZE; out = outbuf; ret = iconv(cd, NULL, NULL, &out, &outbytes); - if (ret == -1) + if (ret == (size_t)-1) err(EXIT_FAILURE, "iconv()"); if (outbytes < OUTBUFSIZE) - fwrite(outbuf, 1, OUTBUFSIZE-outbytes, stdout); + (void)fwrite(outbuf, 1, OUTBUFSIZE - outbytes, stdout); if (invalids > 0 && !silent) - warnx("warning: invalid characters: %lu", - (unsigned long)invalids); + warnx("warning: invalid characters: %llu", invalids); iconv_close(cd); } +static int +do_list(unsigned int n, const char * const *list, void *data __unused) +{ + unsigned int i; + + for(i = 0; i < n; i++) { + printf("%s", list[i]); + if (i < n - 1) + printf(" "); + } + printf("\n"); + + return (1); +} + int main(int argc, char **argv) { - int ch, i; - int opt_l = 0, opt_s = 0, opt_c = 0; - char *opt_f = NULL, *opt_t = NULL; FILE *fp; + char *opt_f, *opt_t; + int ch, i; + bool opt_c = false, opt_s = false; - while ((ch=getopt(argc, argv, "cslf:t:")) != -1) { + opt_f = opt_t = strdup(""); + + setlocale(LC_ALL, ""); + setprogname(argv[0]); + + while ((ch = getopt_long(argc, argv, "csLlf:t:", + long_options, NULL)) != -1) { switch (ch) { case 'c': - opt_c = 1; + opt_c = true; break; case 's': - opt_s = 1; + opt_s = true; break; case 'l': /* list */ - opt_l = 1; - break; + if (opt_s || opt_c || strcmp(opt_f, "") != 0 || + strcmp(opt_t, "") != 0) { + warnx("-l is not allowed with other flags."); + usage(); + } + iconvlist(do_list, NULL); + return (EXIT_SUCCESS); case 'f': /* from */ - opt_f = strdup(optarg); + if (optarg != NULL) + opt_f = strdup(optarg); break; case 't': /* to */ - opt_t = strdup(optarg); + if (optarg != NULL) + opt_t = strdup(optarg); break; default: usage(); } } - argc-=optind; - argv+=optind; - if (opt_l) { - if (argc>0 || opt_s || opt_f != NULL || opt_t != NULL) { - warnx("%s: -l should be specified solely.", - getprogname()); - usage(); - } - show_codesets(); - } else { - if (opt_f == NULL || opt_t == NULL) - usage(); - - if (argc == 0) - do_conv(stdin, opt_f, opt_t, opt_s, opt_c); - else { - for (i=0; i diff --git a/usr.bin/mkcsmapper/ldef.h b/usr.bin/mkcsmapper/ldef.h index 9bd505823d..8616a967be 100644 --- a/usr.bin/mkcsmapper/ldef.h +++ b/usr.bin/mkcsmapper/ldef.h @@ -1,4 +1,5 @@ -/* $NetBSD: ldef.h,v 1.2 2006/09/09 14:35:17 tnozaki Exp $ */ +/* $FreeBSD: head/usr.bin/mkcsmapper/ldef.h 250984 2013-05-25 15:36:15Z ed $ */ +/* $NetBSD: ldef.h,v 1.2 2006/09/09 14:35:17 tnozaki Exp $ */ /*- * Copyright (c)2003, 2006 Citrus Project, @@ -26,13 +27,15 @@ * SUCH DAMAGE. */ +#include + typedef struct { - uint32_t begin; - uint32_t end; - uint32_t width; + u_int32_t begin; + u_int32_t end; + u_int32_t width; } linear_zone_t; -extern int aline_number; -extern int debug; - -int yyerror(const char *); +extern int debug; +extern int linenumber; +extern int yyerror(const char *); +extern int yylex(void); diff --git a/usr.bin/mkcsmapper/lex.l b/usr.bin/mkcsmapper/lex.l index d508e327f3..8623e37848 100644 --- a/usr.bin/mkcsmapper/lex.l +++ b/usr.bin/mkcsmapper/lex.l @@ -1,4 +1,5 @@ -/* $NetBSD: lex.l,v 1.4 2006/02/09 22:03:15 dogcow Exp $ */ +/* $FreeBSD: head/usr.bin/mkcsmapper/lex.l 252582 2013-07-03 18:25:27Z peter $ */ +/* $NetBSD: lex.l,v 1.4 2006/02/09 22:03:15 dogcow Exp $ */ %{ /*- @@ -28,7 +29,9 @@ */ #pragma GCC diagnostic ignored "-Wsign-compare" -#include +#include +#include + #include #include #include @@ -39,33 +42,34 @@ #include "ldef.h" #include "yacc.h" -int aline_number = 1; -%} +#define YY_DECL int yylex(void) -%option noinput -%option nounput +int linenumber = 1; +%} +%option noinput +%option nounput %x COMMENT %% [ \t]+ { } -#.*[\n]|"//".*[\n]|[\n] { aline_number++; return (R_LN); } +#.*[\n]|"//".*[\n]|[\n] { linenumber++; return (R_LN); } "/*" { BEGIN COMMENT; } "*/" { BEGIN 0; } -[\n] { aline_number++; } +[\n] { linenumber++; } . { } <> { - yyerror("unexpected file end (unterminate comment)\n"); + yyerror("unexpected file end (unterminated comment)\n"); exit(1); } -"="|"/"|"-" { return (int)yytext[0]; } +"="|"/"|"-" { return ((int)yytext[0]); } ([1-9][0-9]*)|(0[0-9]*)|(0[xX][0-9A-Fa-f]+) { yylval.i_value = strtoul(yytext, NULL, 0); - return L_IMM; + return (L_IMM); } "TYPE" { return (R_TYPE); } @@ -83,14 +87,15 @@ int aline_number = 1; \"([^\"\n]*(\\\")?)*\"|\'([^\'\n]*(\\\')?)*\' { size_t len; + len = strlen(yytext); - yylval.s_value = malloc(len-1); - strlcpy(yylval.s_value, yytext+1, len-1); - return L_STRING; + yylval.s_value = malloc(len - 1); + strlcpy(yylval.s_value, yytext + 1, len - 1); + return (L_STRING); } [^ =/\-0-9\t\n][^ \t\n]* { yylval.s_value = strdup(yytext); - return L_STRING; + return (L_STRING); } %% @@ -99,6 +104,7 @@ int aline_number = 1; int yywrap(void) { + return (1); } #endif diff --git a/usr.bin/mkcsmapper/mkcsmapper.1 b/usr.bin/mkcsmapper/mkcsmapper.1 index 5b751daf82..c2a41de7c5 100644 --- a/usr.bin/mkcsmapper/mkcsmapper.1 +++ b/usr.bin/mkcsmapper/mkcsmapper.1 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD: src/usr.bin/mkcsmapper/mkcsmapper.1,v 1.2 2011/05/25 14:13:53 ru Exp $ +.\" $FreeBSD: head/usr.bin/mkcsmapper/mkcsmapper.1 222286 2011-05-25 14:13:53Z ru $ .\" .Dd June 2, 2011 .Dt MKCSMAPPER 1 @@ -77,14 +77,13 @@ Generate pivot data from .Ex -std mkcsmapper .Sh SEE ALSO .Xr iconv 1 , -.Xr mkesdb 1 , -.Xr iconv 3 +.Xr iconv 3 , +.Xr mkesdb 1 .Sh HISTORY .Nm first appeared in -.Nx 2.0 -and was ported to +.Nx 2.0 , and made its appearance in .Dx 1.1 . .Sh AUTHORS This manual page was written by -.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org . +.An Gabor Kovesdan Aq gabor@FreeBSD.org . diff --git a/usr.bin/mkcsmapper/yacc.y b/usr.bin/mkcsmapper/yacc.y index cb6718edef..bbb488d3df 100644 --- a/usr.bin/mkcsmapper/yacc.y +++ b/usr.bin/mkcsmapper/yacc.y @@ -1,4 +1,5 @@ -/* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */ +/* $FreeBSD: head/usr.bin/mkcsmapper/yacc.y 250984 2013-05-25 15:36:15Z ed $ */ +/* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */ %{ /*- @@ -27,7 +28,9 @@ * SUCH DAMAGE. */ +#include #include + #include #include #include @@ -36,11 +39,14 @@ #include #include #include - -#include +#include #include "ldef.h" +#ifndef __packed +#define __packed +#endif + #include "citrus_namespace.h" #include "citrus_types.h" #include "citrus_mapper_std_file.h" @@ -50,20 +56,23 @@ #include "citrus_lookup_factory.h" #include "citrus_pivot_factory.h" -extern FILE * yyin; +extern FILE *yyin; -int debug = 0; +int debug = 0; + +static linear_zone_t rowcol[_CITRUS_MAPPER_STD_ROWCOL_MAX]; +static char *map_name; static char *output = NULL; static void *table = NULL; -static size_t table_size; -static char *map_name; -static int map_type; -static u_int32_t dst_invalid, dst_ilseq, oob_mode, dst_unit_bits; -static void (*putfunc)(void *, size_t, u_int32_t) = 0; +static size_t rowcol_len = 0; +static size_t table_size; +static u_int32_t done_flag = 0; +static u_int32_t dst_ilseq, dst_invalid, dst_unit_bits, oob_mode; +static u_int32_t rowcol_bits = 0, rowcol_mask = 0; +static u_int32_t src_next; +static int map_type; +static void (*putfunc)(void *, size_t, u_int32_t) = NULL; -static u_int32_t src_next; - -static u_int32_t done_flag = 0; #define DF_TYPE 0x00000001 #define DF_NAME 0x00000002 #define DF_SRC_ZONE 0x00000004 @@ -72,10 +81,6 @@ static u_int32_t done_flag = 0; #define DF_DST_UNIT_BITS 0x00000020 #define DF_OOB_MODE 0x00000040 -static linear_zone_t rowcol[_CITRUS_MAPPER_STD_ROWCOL_MAX]; -static size_t rowcol_len = 0; -static u_int32_t rowcol_bits = 0, rowcol_mask = 0; - static void dump_file(void); static void setup_map(void); static void set_type(int); @@ -92,14 +97,12 @@ static void put16(void *, size_t, u_int32_t); static void put32(void *, size_t, u_int32_t); static void set_range(u_int32_t, u_int32_t); static void set_src(linear_zone_t *, u_int32_t, u_int32_t); - -int yylex (void); %} %union { - u_int32_t i_value; + u_int32_t i_value; char *s_value; - linear_zone_t lz_value; + linear_zone_t lz_value; } %token R_TYPE R_NAME R_SRC_ZONE R_DST_UNIT_BITS @@ -199,12 +202,14 @@ lns : R_LN static void warning(const char *s) { - fprintf(stderr, "%s in %d\n", s, aline_number); + + fprintf(stderr, "%s in %d\n", s, linenumber); } int yyerror(const char *s) { + warning(s); exit(1); } @@ -212,12 +217,14 @@ yyerror(const char *s) void put8(void *ptr, size_t ofs, u_int32_t val) { + *((u_int8_t *)ptr + ofs) = val; } void put16(void *ptr, size_t ofs, u_int32_t val) { + u_int16_t oval = htons(val); memcpy((u_int16_t *)ptr + ofs, &oval, 2); } @@ -225,6 +232,7 @@ put16(void *ptr, size_t ofs, u_int32_t val) void put32(void *ptr, size_t ofs, u_int32_t val) { + u_int32_t oval = htonl(val); memcpy((u_int32_t *)ptr + ofs, &oval, 4); } @@ -232,9 +240,9 @@ put32(void *ptr, size_t ofs, u_int32_t val) static void alloc_table(void) { - size_t i; - u_int32_t val = 0; linear_zone_t *p; + size_t i; + uint32_t val = 0; i = rowcol_len; p = &rowcol[--i]; @@ -257,7 +265,7 @@ alloc_table(void) val = dst_ilseq; break; default: - ; + break; } for (i = 0; i < table_size; i++) (*putfunc)(table, i, val); @@ -290,7 +298,7 @@ static void create_rowcol_info(struct _region *r) { void *ptr; - size_t ofs, i, len; + size_t i, len, ofs; ofs = 0; ptr = malloc(_CITRUS_MAPPER_STD_ROWCOL_INFO_SIZE); @@ -330,7 +338,7 @@ create_rowcol_ext_ilseq_info(struct _region *r) ofs = 0; ptr = malloc(_CITRUS_MAPPER_STD_ROWCOL_EXT_ILSEQ_SIZE); - if (ptr==NULL) + if (ptr == NULL) err(EXIT_FAILURE, "malloc"); put32(ptr, ofs, oob_mode); ofs++; @@ -349,12 +357,12 @@ do { \ static void dump_file(void) { - FILE *fp; - int ret; struct _db_factory *df; struct _region data; void *serialized; + FILE *fp; size_t size; + int ret; /* * build database @@ -363,31 +371,27 @@ dump_file(void) /* store type */ CHKERR(ret, _db_factory_addstr_by_s, - (df, _CITRUS_MAPPER_STD_SYM_TYPE, - _CITRUS_MAPPER_STD_TYPE_ROWCOL)); + (df, _CITRUS_MAPPER_STD_SYM_TYPE, _CITRUS_MAPPER_STD_TYPE_ROWCOL)); /* store info */ create_rowcol_info(&data); CHKERR(ret, _db_factory_add_by_s, - (df, _CITRUS_MAPPER_STD_SYM_INFO, &data, 1)); + (df, _CITRUS_MAPPER_STD_SYM_INFO, &data, 1)); /* ilseq extension */ create_rowcol_ext_ilseq_info(&data); CHKERR(ret, _db_factory_add_by_s, - (df, _CITRUS_MAPPER_STD_SYM_ROWCOL_EXT_ILSEQ, &data, 1)); + (df, _CITRUS_MAPPER_STD_SYM_ROWCOL_EXT_ILSEQ, &data, 1)); /* store table */ _region_init(&data, table, table_size*dst_unit_bits/8); CHKERR(ret, _db_factory_add_by_s, - (df, _CITRUS_MAPPER_STD_SYM_TABLE, &data, 1)); + (df, _CITRUS_MAPPER_STD_SYM_TABLE, &data, 1)); /* * dump database to file */ - if (output) - fp = fopen(output, "wb"); - else - fp = stdout; + fp = output ? fopen(output, "wb") : stdout; if (fp == NULL) { perror("fopen"); @@ -399,7 +403,7 @@ dump_file(void) serialized = malloc(size); _region_init(&data, serialized, size); CHKERR(ret, _db_factory_serialize, - (df, _CITRUS_MAPPER_STD_MAGIC, &data)); + (df, _CITRUS_MAPPER_STD_MAGIC, &data)); if (fwrite(serialized, size, 1, fp) != 1) err(EXIT_FAILURE, "fwrite"); @@ -420,6 +424,7 @@ set_type(int type) done_flag |= DF_TYPE; } + static void /*ARGSUSED*/ set_name(char *str) @@ -434,11 +439,12 @@ set_name(char *str) done_flag |= DF_NAME; } + static void set_src_zone(u_int32_t val) { - size_t i; linear_zone_t *p; + size_t i; if (done_flag & DF_SRC_ZONE) { warning("SRC_ZONE is duplicated. ignored this one"); @@ -459,7 +465,6 @@ set_src_zone(u_int32_t val) rowcol_mask |= rowcol_mask - 1; for (i = 0; i < rowcol_len; ++i) { p = &rowcol[i]; - _DIAGASSERT(p->begin <= p->end); if (p->end > rowcol_mask) goto bad; } @@ -469,6 +474,7 @@ set_src_zone(u_int32_t val) bad: yyerror("Illegal argument for SRC_ZONE"); } + static void set_dst_invalid(u_int32_t val) { @@ -482,6 +488,7 @@ set_dst_invalid(u_int32_t val) done_flag |= DF_DST_INVALID; } + static void set_dst_ilseq(u_int32_t val) { @@ -495,6 +502,7 @@ set_dst_ilseq(u_int32_t val) done_flag |= DF_DST_ILSEQ; } + static void set_oob_mode(u_int32_t val) { @@ -508,6 +516,7 @@ set_oob_mode(u_int32_t val) done_flag |= DF_OOB_MODE; } + static void set_dst_unit_bits(u_int32_t val) { @@ -535,41 +544,42 @@ set_dst_unit_bits(u_int32_t val) } done_flag |= DF_DST_UNIT_BITS; } + static int check_src(u_int32_t begin, u_int32_t end) { - size_t i; linear_zone_t *p; + size_t i; u_int32_t m, n; if (begin > end) - return 1; + return (1); if (begin < end) { m = begin & ~rowcol_mask; n = end & ~rowcol_mask; if (m != n) - return 1; + return (1); } for (i = rowcol_len * rowcol_bits, p = &rowcol[0]; i > 0; ++p) { i -= rowcol_bits; m = (begin >> i) & rowcol_mask; if (m < p->begin || m > p->end) - return 1; + return (1); } if (begin < end) { n = end & rowcol_mask; - _DIAGASSERT(p > rowcol); --p; if (n < p->begin || n > p->end) - return 1; + return (1); } - return 0; + return (0); } + static void store(const linear_zone_t *lz, u_int32_t dst, int inc) { - size_t i, ofs; linear_zone_t *p; + size_t i, ofs; u_int32_t n; ofs = 0; @@ -585,6 +595,7 @@ store(const linear_zone_t *lz, u_int32_t dst, int inc) dst++; } } + static void set_range(u_int32_t begin, u_int32_t end) { @@ -604,10 +615,10 @@ set_range(u_int32_t begin, u_int32_t end) bad: yyerror("Illegal argument for SRC_ZONE"); } + static void set_src(linear_zone_t *lz, u_int32_t begin, u_int32_t end) { - _DIAGASSERT(lz != NULL); if (check_src(begin, end) != 0) yyerror("illegal zone"); @@ -621,16 +632,13 @@ set_src(linear_zone_t *lz, u_int32_t begin, u_int32_t end) static void do_mkdb(FILE *in) { - int ret; FILE *out; + int ret; /* dump DB to file */ - if (output) - out = fopen(output, "wb"); - else - out = stdout; + out = output ? fopen(output, "wb") : stdout; - if (out==NULL) + if (out == NULL) err(EXIT_FAILURE, "fopen"); ret = _lookup_factory_convert(out, in); @@ -642,16 +650,13 @@ do_mkdb(FILE *in) static void do_mkpv(FILE *in) { - int ret; FILE *out; + int ret; /* dump pivot to file */ - if (output) - out = fopen(output, "wb"); - else - out = stdout; + out = output ? fopen(output, "wb") : stdout; - if (out==NULL) + if (out == NULL) err(EXIT_FAILURE, "fopen"); ret = _pivot_factory_convert(out, in); @@ -666,24 +671,23 @@ static void usage(void) { warnx("usage: \n" - "\t%s [-d] [-o outfile] [infile]\n" - "\t%s -m [-d] [-o outfile] [infile]\n" - "\t%s -p [-d] [-o outfile] [infile]\n", - getprogname(), getprogname(), getprogname()); + "\t%s [-d] [-o outfile] [infile]\n" + "\t%s -m [-d] [-o outfile] [infile]\n" + "\t%s -p [-d] [-o outfile] [infile]\n", + getprogname(), getprogname(), getprogname()); exit(1); } int main(int argc, char **argv) { - int ch; FILE *in = NULL; - int mkdb = 0, mkpv = 0; + int ch, mkdb = 0, mkpv = 0; - while ((ch = getopt(argc, argv, "do:mp")) != -1) { + while ((ch = getopt(argc, argv, "do:mp")) != EOF) { switch (ch) { case 'd': - debug=1; + debug = 1; break; case 'o': output = strdup(optarg); @@ -699,8 +703,8 @@ main(int argc, char **argv) } } - argc-=optind; - argv+=optind; + argc -= optind; + argv += optind; switch (argc) { case 0: in = stdin; @@ -708,7 +712,7 @@ main(int argc, char **argv) case 1: in = fopen(argv[0], "r"); if (!in) - err(EXIT_FAILURE, argv[0]); + err(EXIT_FAILURE, "%s", argv[0]); break; default: usage(); diff --git a/usr.bin/mklocale/Makefile b/usr.bin/mklocale/Makefile index 8c5eb3b459..e914dd1fa6 100644 --- a/usr.bin/mklocale/Makefile +++ b/usr.bin/mklocale/Makefile @@ -1,10 +1,22 @@ # @(#)Makefile 8.1 (Berkeley) 6/7/93 # $FreeBSD: src/usr.bin/mklocale/Makefile,v 1.21.2.2 2001/04/25 11:29:28 ru Exp $ -# $DragonFly: src/usr.bin/mklocale/Makefile,v 1.5 2007/08/27 16:50:56 pavalos Exp $ -PROG= mklocale -SRCS= yacc.y lex.l -CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc -YFLAGS= -d +PROG= mklocale +SRCS= yacc.y lex.l y.tab.h +CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale +CFLAGS+=-I${.CURDIR}/../../include + +.if defined(BOOTSTRAPPING) +SRCS+= sys/types.h ctype.h +CLEANFILES+= ctype.h +CLEANDIRS+= sys +.endif + +sys/types.h: /usr/include/sys/types.h + mkdir -p sys + cp ${.ALLSRC} ${.TARGET} + +ctype.h: /usr/include/ctype.h + cp ${.ALLSRC} ${.TARGET} .include diff --git a/usr.bin/mklocale/ldef.h b/usr.bin/mklocale/extern.h similarity index 59% copy from usr.bin/mklocale/ldef.h copy to usr.bin/mklocale/extern.h index 8ad765c4f9..35e8d41db7 100644 --- a/usr.bin/mklocale/ldef.h +++ b/usr.bin/mklocale/extern.h @@ -1,5 +1,3 @@ -/* $NetBSD: src/usr.bin/mklocale/ldef.h,v 1.4 2003/08/07 11:15:14 agc Exp $ */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -15,7 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,24 +29,30 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ldef.h 8.1 (Berkeley) 6/6/93 - * $DragonFly: src/usr.bin/mklocale/ldef.h,v 1.3 2005/04/21 16:36:35 joerg Exp $ + * $FreeBSD: head/usr.bin/mklocale/extern.h 235789 2012-05-22 16:33:10Z bapt $ */ -#include "locale/runetype.h" - -/* - * This should look a LOT like a _RuneEntry - */ -typedef struct rune_list { - __nbrune_t min; - __nbrune_t max; - __nbrune_t map; - u_int32_t *types; - struct rune_list *next; -} rune_list; +int yylex(void); -typedef struct rune_map { - u_int32_t map[_NB_CACHED_RUNES]; - rune_list *root; -} rune_map; +#ifndef _CTYPE_S +#define _CTYPE_A 0x00000100L /* Alpha */ +#define _CTYPE_C 0x00000200L /* Control */ +#define _CTYPE_D 0x00000400L /* Digit */ +#define _CTYPE_G 0x00000800L /* Graph */ +#define _CTYPE_L 0x00001000L /* Lower */ +#define _CTYPE_P 0x00002000L /* Punct */ +#define _CTYPE_S 0x00004000L /* Space */ +#define _CTYPE_U 0x00008000L /* Upper */ +#define _CTYPE_X 0x00010000L /* X digit */ +#define _CTYPE_B 0x00020000L /* Blank */ +#define _CTYPE_R 0x00040000L /* Print */ +#define _CTYPE_I 0x00080000L /* Ideogram */ +#define _CTYPE_T 0x00100000L /* Special */ +#define _CTYPE_Q 0x00200000L /* Phonogram */ +#define _CTYPE_SW0 0x20000000L /* 0 width character */ +#define _CTYPE_SW1 0x40000000L /* 1 width character */ +#define _CTYPE_SW2 0x80000000L /* 2 width character */ +#define _CTYPE_SW3 0xc0000000L /* 3 width character */ +#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ +#define _CTYPE_SWS 30 /* Bits to shift to get width */ +#endif diff --git a/usr.bin/mklocale/ldef.h b/usr.bin/mklocale/ldef.h index 8ad765c4f9..b1b93b495b 100644 --- a/usr.bin/mklocale/ldef.h +++ b/usr.bin/mklocale/ldef.h @@ -1,5 +1,3 @@ -/* $NetBSD: src/usr.bin/mklocale/ldef.h,v 1.4 2003/08/07 11:15:14 agc Exp $ */ - /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -32,23 +30,24 @@ * SUCH DAMAGE. * * @(#)ldef.h 8.1 (Berkeley) 6/6/93 - * $DragonFly: src/usr.bin/mklocale/ldef.h,v 1.3 2005/04/21 16:36:35 joerg Exp $ + * $FreeBSD: head/usr.bin/mklocale/ldef.h 216370 2010-12-11 08:32:16Z joel $ */ -#include "locale/runetype.h" +#include +#include "runefile.h" /* * This should look a LOT like a _RuneEntry */ typedef struct rune_list { - __nbrune_t min; - __nbrune_t max; - __nbrune_t map; - u_int32_t *types; + int32_t min; + int32_t max; + int32_t map; + uint32_t *types; struct rune_list *next; } rune_list; typedef struct rune_map { - u_int32_t map[_NB_CACHED_RUNES]; + uint32_t map[_CACHED_RUNES]; rune_list *root; } rune_map; diff --git a/usr.bin/mklocale/lex.l b/usr.bin/mklocale/lex.l index 403bccceef..acf1001ebb 100644 --- a/usr.bin/mklocale/lex.l +++ b/usr.bin/mklocale/lex.l @@ -1,5 +1,3 @@ -/* $NetBSD: src/usr.bin/mklocale/lex.l,v 1.13 2003/10/27 00:12:43 lukem Exp $ */ - %{ /*- * Copyright (c) 1993 @@ -31,17 +29,21 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)lex.l 8.1 (Berkeley) 6/6/93 + * $FreeBSD: head/usr.bin/mklocale/lex.l 250926 2013-05-23 05:42:35Z jkim $ */ #pragma GCC diagnostic ignored "-Wsign-compare" +#include #include #include -#include -#include "locale/runetype.h" #include "ldef.h" -#include "yacc.h" +#include "y.tab.h" +#include "extern.h" +#define YY_DECL int yylex(void) %} ODIGIT [0-7] @@ -68,11 +70,11 @@ W [\t\n\r ] '\\v' { yylval.rune = '\v'; return(RUNE); } -0x{XDIGIT}+ { yylval.rune = strtoul(yytext, 0, 16); +0x{XDIGIT}+ { yylval.rune = strtol(yytext, 0, 16); return(RUNE); } -0{ODIGIT}+ { yylval.rune = strtoul(yytext, 0, 8); +0{ODIGIT}+ { yylval.rune = strtol(yytext, 0, 8); return(RUNE); } -{DIGIT}+ { yylval.rune = strtoul(yytext, 0, 10); +{DIGIT}+ { yylval.rune = strtol(yytext, 0, 10); return(RUNE); } @@ -81,38 +83,38 @@ MAPUPPER { return(MAPUPPER); } TODIGIT { return(DIGITMAP); } INVALID { return(INVALID); } -ALPHA { yylval.i = _RUNETYPE_A|_RUNETYPE_R|_RUNETYPE_G; +ALPHA { yylval.i = _CTYPE_A|_CTYPE_R|_CTYPE_G; return(LIST); } -CONTROL { yylval.i = _RUNETYPE_C; +CONTROL { yylval.i = _CTYPE_C; return(LIST); } -DIGIT { yylval.i = _RUNETYPE_D|_RUNETYPE_R|_RUNETYPE_G; +DIGIT { yylval.i = _CTYPE_D|_CTYPE_R|_CTYPE_G; return(LIST); } -GRAPH { yylval.i = _RUNETYPE_G|_RUNETYPE_R; +GRAPH { yylval.i = _CTYPE_G|_CTYPE_R; return(LIST); } -LOWER { yylval.i = _RUNETYPE_L|_RUNETYPE_R|_RUNETYPE_G; +LOWER { yylval.i = _CTYPE_L|_CTYPE_R|_CTYPE_G; return(LIST); } -PUNCT { yylval.i = _RUNETYPE_P|_RUNETYPE_R|_RUNETYPE_G; +PUNCT { yylval.i = _CTYPE_P|_CTYPE_R|_CTYPE_G; return(LIST); } -SPACE { yylval.i = _RUNETYPE_S; +SPACE { yylval.i = _CTYPE_S; return(LIST); } -UPPER { yylval.i = _RUNETYPE_U|_RUNETYPE_R|_RUNETYPE_G; +UPPER { yylval.i = _CTYPE_U|_CTYPE_R|_CTYPE_G; return(LIST); } -XDIGIT { yylval.i = _RUNETYPE_X|_RUNETYPE_R|_RUNETYPE_G; +XDIGIT { yylval.i = _CTYPE_X|_CTYPE_R|_CTYPE_G; return(LIST); } -BLANK { yylval.i = _RUNETYPE_B; +BLANK { yylval.i = _CTYPE_B; return(LIST); } -PRINT { yylval.i = _RUNETYPE_R; +PRINT { yylval.i = _CTYPE_R; return(LIST); } -IDEOGRAM { yylval.i = _RUNETYPE_I|_RUNETYPE_R|_RUNETYPE_G; +IDEOGRAM { yylval.i = _CTYPE_I|_CTYPE_R|_CTYPE_G; return(LIST); } -SPECIAL { yylval.i = _RUNETYPE_T|_RUNETYPE_R|_RUNETYPE_G; +SPECIAL { yylval.i = _CTYPE_T|_CTYPE_R|_CTYPE_G; return(LIST); } -PHONOGRAM { yylval.i = _RUNETYPE_Q|_RUNETYPE_R|_RUNETYPE_G; +PHONOGRAM { yylval.i = _CTYPE_Q|_CTYPE_R|_CTYPE_G; return(LIST); } -SWIDTH0 { yylval.i = _RUNETYPE_SW0; return(LIST); } -SWIDTH1 { yylval.i = _RUNETYPE_SW1; return(LIST); } -SWIDTH2 { yylval.i = _RUNETYPE_SW2; return(LIST); } -SWIDTH3 { yylval.i = _RUNETYPE_SW3; return(LIST); } +SWIDTH0 { yylval.i = _CTYPE_SW0; return(LIST); } +SWIDTH1 { yylval.i = _CTYPE_SW1; return(LIST); } +SWIDTH2 { yylval.i = _CTYPE_SW2; return(LIST); } +SWIDTH3 { yylval.i = _CTYPE_SW3; return(LIST); } VARIABLE[\t ] { static char vbuf[1024]; char *v = vbuf; @@ -126,8 +128,6 @@ VARIABLE[\t ] { static char vbuf[1024]; return(VARIABLE); } -CHARSET { return(CHARSET); } - ENCODING { return(ENCODING); } \".*\" { char *e = yytext + 1; diff --git a/usr.bin/mklocale/mklocale.1 b/usr.bin/mklocale/mklocale.1 index d064a8c2c6..78216115e1 100644 --- a/usr.bin/mklocale/mklocale.1 +++ b/usr.bin/mklocale/mklocale.1 @@ -1,7 +1,3 @@ -.\" $NetBSD: src/usr.bin/mklocale/mklocale.1,v 1.13 2004/01/24 17:03:26 wiz Exp $ -.\" FreeBSD: src/usr.bin/mklocale/mklocale.1,v 1.6 1999/09/20 09:15:21 phantom Exp -.\" $DragonFly: src/usr.bin/mklocale/mklocale.1,v 1.7 2007/07/29 17:27:45 swildner Exp $ -.\" .\" Copyright (c) 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" @@ -16,7 +12,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors +.\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -33,8 +29,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)mklocale.1 8.2 (Berkeley) 4/18/94 +.\" $FreeBSD: head/usr.bin/mklocale/mklocale.1 235400 2012-05-13 14:16:04Z joel $ .\" -.Dd April 18, 1994 +.Dd October 17, 2004 .Dt MKLOCALE 1 .Os .Sh NAME @@ -43,8 +40,8 @@ .Sh SYNOPSIS .Nm .Op Fl d -.Ar \& Ns Ao src-file -.Ar \& Ac Ns language/LC_CTYPE +.Ar "< src-file" +.Ar "> language/LC_CTYPE" .Nm .Op Fl d .Fl o @@ -53,9 +50,9 @@ .Sh DESCRIPTION The .Nm -utility reads an +utility reads a .Dv LC_CTYPE -source file from standard input and produces an +source file from standard input and produces a .Dv LC_CTYPE binary file on standard output suitable for placement in .Pa /usr/share/locale/ Ns Ar language Ns Pa /LC_CTYPE . @@ -69,7 +66,7 @@ C style comments are used to place comments in the file. .Pp Following options are available: -.Bl -tag -width XXX +.Bl -tag -width indent .It Fl d Turns on debugging messages. .It Fl o @@ -79,12 +76,12 @@ Specify output file. Besides the keywords which will be listed below, the following are valid tokens in .Ar src-file : -.Bl -tag -width literal +.Bl -tag -width ".Ar literal" .It Dv RUNE A .Dv RUNE may be any of the following: -.Bl -tag -width 0x[0-9a-z]* +.Bl -tag -width ".Ar 0x[0-9a-z]*" .It Ar 'x' The ASCII character .Ar x . @@ -119,38 +116,61 @@ or Used to indicate ranges. .It Ar literal The follow characters are taken literally: -.Bl -tag -width "\*[Lt]\|\|(\|\|[" -.It Dv "\*[Lt]\|(\|[" +.Bl -tag -width ".Dv <\|\|(\|\|[" +.It Dv "<\|(\|[" Used to start a mapping. All are equivalent. -.It Dv "\*[Gt]\|\^)\|]" +.It Dv ">\|\^)\|]" Used to end a mapping. All are equivalent. -.It Dv \&: +.It Dv ":" Used as a delimiter in mappings. .El .El .Pp Key words which should only appear once are: -.Bl -tag -width PHONOGRAM +.Bl -tag -width ".Dv PHONOGRAM" .It Dv ENCODING Followed by a .Dv STRING which indicates the encoding mechanism to be used for this locale. The current encodings are: -.Bl -tag -width NONE -.It Dv NONE -No translation and the default. -.It Dv UTF2 -.Dv "Universal character set Transformation Format" -adopted from -.Nm "Plan 9 from Bell Labs" . +.Bl -tag -width ".Dv MSKanji" +.It Dv ASCII +American Standard Code for Information Interchange. +.It Dv BIG5 +The +.Dq Big5 +encoding of Chinese. .It Dv EUC .Dv EUC encoding as used by several vendors of .Ux systems. +.It Dv GB18030 +PRC national standard for encoding of Chinese text. +.It Dv GB2312 +Older PRC national standard for encoding Chinese text. +.It Dv GBK +A widely used encoding method for Chinese text, +backwards compatible with GB\ 2312-1980. +.It Dv MSKanji +The method of encoding Japanese used by Microsoft, +loosely based on JIS. +Also known as +.Dq "Shift JIS" +and +.Dq SJIS . +.It Dv NONE +No translation and the default. +.It Dv UTF-8 +The +.Dv UTF-8 +transformation format of +.Tn ISO +10646 +as defined by RFC 2279. .El .It Dv VARIABLE This keyword must be followed by a single tab or space character, @@ -162,18 +182,20 @@ See .Xr euc 5 for further details. .It Dv INVALID +(obsolete) A single .Dv RUNE +follows and is used as the invalid rune for this locale. .El .Pp The following keywords may appear multiple times and have the following format for data: -.Bl -tag -width "XXRUNE1 THRU RUNEn : RUNE2XX" -offset indent -.It Aq Dv RUNE1 RUNE2 +.Bl -tag -width ".Dv " -offset indent +.It Dv .Dv RUNE1 is mapped to .Dv RUNE2 . -.It Aq Dv RUNE1 THRU RUNEn : RUNE2 +.It Dv Runes .Dv RUNE1 through @@ -182,9 +204,9 @@ are mapped to .Dv RUNE2 through .Dv RUNE2 -+ n\-1. ++ n-1. .El -.Bl -tag -width PHONOGRAM +.Bl -tag -width ".Dv PHONOGRAM" .It Dv MAPLOWER Defines the tolower mappings. .Dv RUNE2 @@ -201,14 +223,15 @@ Defines a map from runes to their digit value. is the integer value represented by .Dv RUNE1 . For example, the ASCII character -.Sq 0 +.Ql 0 would map to the decimal value 0. -Only values up to 255 are allowed. +Only values up to 255 +are allowed. .El .Pp The following keywords may appear multiple times and have the following format for data: -.Bl -tag -width "RUNE1 THRU RUNEn" -offset indent +.Bl -tag -width ".Dv RUNE1 THRU RUNEn" -offset indent .It Dv RUNE This rune has the property defined by the keyword. .It Dv "RUNE1 THRU RUNEn" @@ -218,51 +241,58 @@ and .Dv RUNEn have the property defined by the keyword. .El -.Bl -tag -width PHONOGRAM +.Bl -tag -width ".Dv PHONOGRAM" .It Dv ALPHA -Defines runes which are alphabetic, printable, and graphic. +Defines runes which are alphabetic, printable and graphic. .It Dv CONTROL Defines runes which are control characters. .It Dv DIGIT -Defines runes which are decimal digits, printable, and graphic. +Defines runes which are decimal digits, printable and graphic. .It Dv GRAPH Defines runes which are graphic and printable. .It Dv LOWER -Defines runes which are lower case, printable, and graphic. +Defines runes which are lower case, printable and graphic. .It Dv PUNCT -Defines runes which are punctuation, printable, and graphic. +Defines runes which are punctuation, printable and graphic. .It Dv SPACE Defines runes which are spaces. .It Dv UPPER -Defines runes which are upper case, printable, and graphic. +Defines runes which are upper case, printable and graphic. .It Dv XDIGIT -Defines runes which are hexadecimal digits, printable, and graphic. +Defines runes which are hexadecimal digits, printable and graphic. .It Dv BLANK Defines runes which are blank. .It Dv PRINT Defines runes which are printable. .It Dv IDEOGRAM -Defines runes which are ideograms, printable, and graphic. +Defines runes which are ideograms, printable and graphic. .It Dv SPECIAL -Defines runes which are special characters, printable, and graphic. +Defines runes which are special characters, printable and graphic. .It Dv PHONOGRAM -Defines runes which are phonograms, printable, and graphic. -.It Dv SWIDTHn -Defines runes with specific glyph width. -.Ar n -takes 0 to 3. -.It Dv CHARSET -Controls character set for subsequent runes. -.\" To support -.\" .Xr iso2022 4 -.\" locale definitions. +Defines runes which are phonograms, printable and graphic. +.It Dv SWIDTH0 +Defines runes with display width 0. +.It Dv SWIDTH1 +Defines runes with display width 1. +.It Dv SWIDTH2 +Defines runes with display width 2. +.It Dv SWIDTH3 +Defines runes with display width 3. .El +.Pp +If no display width explicitly defined, width 1 assumed +for printable runes by default. .Sh SEE ALSO .Xr colldef 1 , .Xr setlocale 3 , +.Xr wcwidth 3 , +.Xr big5 5 , .Xr euc 5 , -.Xr utf8 5 , -.Xr nls 7 +.Xr gb18030 5 , +.Xr gb2312 5 , +.Xr gbk 5 , +.Xr mskanji 5 , +.Xr utf8 5 .Sh HISTORY The .Nm @@ -272,7 +302,3 @@ utility first appeared in The .Nm utility is overly simplistic. -.Pp -We should switch to -.Nm localedef -and its file format, which is more standard. diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y index 1ca37bbb93..15655751a4 100644 --- a/usr.bin/mklocale/yacc.y +++ b/usr.bin/mklocale/yacc.y @@ -1,6 +1,3 @@ -/* $NetBSD: src/usr.bin/mklocale/yacc.y,v 1.24 2004/01/05 23:23:36 jmmv Exp $ */ -/* $DragonFly: src/usr.bin/mklocale/yacc.y,v 1.8 2008/07/10 18:29:52 swildner Exp $ */ - %{ /*- * Copyright (c) 1993 @@ -32,11 +29,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#)yacc.y 8.1 (Berkeley) 6/6/93 + * $FreeBSD: head/usr.bin/mklocale/yacc.y 216370 2010-12-11 08:32:16Z joel $ */ -#include -#include /* Needed for htonl on POSIX systems. */ - +#include #include #include #include @@ -44,40 +42,34 @@ #include #include #include - -#include "locale/runetype.h" - #include "ldef.h" +#include "extern.h" +#include "runefile.h" + +static void *xmalloc(unsigned int sz); +static uint32_t *xlalloc(unsigned int sz); +void yyerror(const char *s); +static uint32_t *xrelalloc(uint32_t *old, unsigned int sz); +static void dump_tables(void); +static void cleanout(void); const char *locale_file = ""; -rune_map maplower = { { 0, }, NULL }; -rune_map mapupper = { { 0, }, NULL }; -rune_map types = { { 0, }, NULL }; - -_NBRuneLocale new_locale; - -__nbrune_t charsetbits = (__nbrune_t)0x00000000; -#if 0 -__nbrune_t charsetmask = (__nbrune_t)0x0000007f; -#endif -__nbrune_t charsetmask = (__nbrune_t)0xffffffff; - -void set_map(rune_map *, rune_list *, uint32_t); -void set_digitmap(rune_map *, rune_list *); -void add_map(rune_map *, rune_list *, uint32_t); - -int main(int, char *[]); -int yyerror(const char *s); -void *xmalloc(unsigned int sz); -uint32_t *xlalloc(unsigned int sz); -uint32_t *xrelalloc(uint32_t *old, unsigned int sz); -void dump_tables(void); -extern int yylex(void); +rune_map maplower = { { 0 }, NULL }; +rune_map mapupper = { { 0 }, NULL }; +rune_map types = { { 0 }, NULL }; + +_FileRuneLocale new_locale = { "", "", {}, {}, {}, 0, 0, 0, 0 }; +char *variable = NULL; + +void set_map(rune_map *, rune_list *, uint32_t); +void set_digitmap(rune_map *, rune_list *); +void add_map(rune_map *, rune_list *, uint32_t); +static void usage(void); %} %union { - __nbrune_t rune; + int32_t rune; int i; char *str; @@ -93,7 +85,6 @@ extern int yylex(void); %token DIGITMAP %token LIST %token VARIABLE -%token CHARSET %token ENCODING %token INVALID %token STRING @@ -114,49 +105,25 @@ table : entry ; entry : ENCODING STRING - { strncpy(new_locale.rl_encoding, $2, sizeof(new_locale.rl_encoding)); } + { if (strcmp($2, "NONE") && + strcmp($2, "ASCII") && + strcmp($2, "UTF-8") && + strcmp($2, "EUC") && + strcmp($2, "GBK") && + strcmp($2, "GB18030") && + strcmp($2, "GB2312") && + strcmp($2, "BIG5") && + strcmp($2, "MSKanji")) + warnx("ENCODING %s is not supported by libc", $2); + strncpy(new_locale.encoding, $2, + sizeof(new_locale.encoding)); } | VARIABLE - { new_locale.rl_variable_len = strlen($1) + 1; - new_locale.rl_variable = strdup($1); - } - | CHARSET RUNE - { charsetbits = $2; charsetmask = 0x0000007f; } - | CHARSET RUNE RUNE - { charsetbits = $2; charsetmask = $3; } - | CHARSET STRING - { int final = $2[strlen($2) - 1] & 0x7f; - charsetbits = final << 24; - if ($2[0] == '$') { - charsetmask = 0x00007f7f; - if (strchr(",-./", $2[1])) - charsetbits |= 0x80; - if (0xd0 <= final && final <= 0xdf) - charsetmask |= 0x007f0000; - } else { - charsetmask = 0x0000007f; - if (strchr(",-./", $2[0])) - charsetbits |= 0x80; - if (strlen($2) == 2 && $2[0] == '!') - charsetbits |= ((0x80 | $2[0]) << 16); - } - - /* - * special rules - */ - if (charsetbits == ('B' << 24) - && charsetmask == 0x0000007f) { - /*ASCII: 94B*/ - charsetbits = 0; - charsetmask = 0x0000007f; - } else if (charsetbits == (('A' << 24) | 0x80) - && charsetmask == 0x0000007f) { - /*Latin1: 96A*/ - charsetbits = 0x80; - charsetmask = 0x0000007f; - } + { new_locale.variable_len = strlen($1) + 1; + variable = xmalloc(new_locale.variable_len); + strcpy(variable, $1); } | INVALID RUNE - { new_locale.rl_invalid_rune = $2; } + { warnx("the INVALID keyword is deprecated"); } | LIST list { set_map(&types, $2, $1); } | MAPLOWER map @@ -169,77 +136,86 @@ entry : ENCODING STRING list : RUNE { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($1 & charsetmask) | charsetbits; - $$->max = ($1 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $1; + $$->max = $1; $$->next = 0; } | RUNE THRU RUNE { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($1 & charsetmask) | charsetbits; - $$->max = ($3 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $1; + $$->max = $3; $$->next = 0; } | list RUNE { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($2 & charsetmask) | charsetbits; - $$->max = ($2 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $2; + $$->max = $2; $$->next = $1; } | list RUNE THRU RUNE { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($2 & charsetmask) | charsetbits; - $$->max = ($4 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $2; + $$->max = $4; $$->next = $1; } ; map : LBRK RUNE RUNE RBRK { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($2 & charsetmask) | charsetbits; - $$->max = ($2 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $2; + $$->max = $2; $$->map = $3; $$->next = 0; } | map LBRK RUNE RUNE RBRK { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($3 & charsetmask) | charsetbits; - $$->max = ($3 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $3; + $$->max = $3; $$->map = $4; $$->next = $1; } | LBRK RUNE THRU RUNE ':' RUNE RBRK { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($2 & charsetmask) | charsetbits; - $$->max = ($4 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $2; + $$->max = $4; $$->map = $6; $$->next = 0; } | map LBRK RUNE THRU RUNE ':' RUNE RBRK { - $$ = (rune_list *)malloc(sizeof(rune_list)); - $$->min = ($3 & charsetmask) | charsetbits; - $$->max = ($5 & charsetmask) | charsetbits; + $$ = (rune_list *)xmalloc(sizeof(rune_list)); + $$->min = $3; + $$->max = $5; $$->map = $7; $$->next = $1; } ; %% -int debug = 0; -FILE *ofile; +int debug; +FILE *fp; + +static void +cleanout(void) +{ + if (fp != NULL) + unlink(locale_file); +} int main(int ac, char *av[]) { int x; + fp = stdout; + while ((x = getopt(ac, av, "do:")) != -1) { switch(x) { case 'd': @@ -247,13 +223,12 @@ main(int ac, char *av[]) break; case 'o': locale_file = optarg; - if ((ofile = fopen(locale_file, "w")) == 0) - err(1, "unable to open output file %s", locale_file); + if ((fp = fopen(locale_file, "w")) == NULL) + err(1, "%s", locale_file); + atexit(cleanout); break; default: - usage: - fprintf(stderr, "usage: mklocale [-d] [-o output] [source]\n"); - exit(1); + usage(); } } @@ -262,69 +237,66 @@ main(int ac, char *av[]) break; case 1: if (freopen(av[optind], "r", stdin) == 0) - err(1, "unable to open input file %s", av[optind]); + err(1, "%s", av[optind]); break; default: - goto usage; + usage(); } - for (x = 0; x < _NB_CACHED_RUNES; ++x) { + for (x = 0; x < _CACHED_RUNES; ++x) { mapupper.map[x] = x; maplower.map[x] = x; } - new_locale.rl_invalid_rune = _NB_DEFAULT_INVALID_RUNE; - memcpy(new_locale.rl_magic, _NB_RUNE_MAGIC_1, sizeof(new_locale.rl_magic)); + memcpy(new_locale.magic, _FILE_RUNE_MAGIC_1, sizeof(new_locale.magic)); yyparse(); - return 0; + return(0); } -int +static void +usage(void) +{ + fprintf(stderr, "usage: mklocale [-d] [-o output] [source]\n"); + exit(1); +} + +void yyerror(const char *s) { fprintf(stderr, "%s\n", s); - - return 0; } -void * +static void * xmalloc(unsigned int sz) { void *r = malloc(sz); - if (!r) { - perror("xmalloc"); - abort(); - } + if (!r) + errx(1, "xmalloc"); return(r); } -uint32_t * +static uint32_t * xlalloc(unsigned int sz) { uint32_t *r = (uint32_t *)malloc(sz * sizeof(uint32_t)); - if (!r) { - perror("xlalloc"); - abort(); - } + if (!r) + errx(1, "xlalloc"); return(r); } -uint32_t * +static uint32_t * xrelalloc(uint32_t *old, unsigned int sz) { - uint32_t *r = (uint32_t *)realloc((char *)old, sz * sizeof(uint32_t)); - if (!r) { - perror("xrelalloc"); - abort(); - } + uint32_t *r = (uint32_t *)realloc((char *)old, + sz * sizeof(uint32_t)); + if (!r) + errx(1, "xrelalloc"); return(r); } void -set_map(rune_map *map, rune_list *list, uint32_t flag) +set_map(rune_map *map, rune_list *list, uint32_t flag) { - list->map &= charsetmask; - list->map |= charsetbits; while (list) { rune_list *nlist = list->next; add_map(map, list, flag); @@ -335,7 +307,7 @@ set_map(rune_map *map, rune_list *list, uint32_t flag) void set_digitmap(rune_map *map, rune_list *list) { - __nbrune_t i; + int32_t i; while (list) { rune_list *nlist = list->next; @@ -355,12 +327,12 @@ set_digitmap(rune_map *map, rune_list *list) void add_map(rune_map *map, rune_list *list, uint32_t flag) { - __nbrune_t i; + int32_t i; rune_list *lr = 0; rune_list *r; - __nbrune_t run; + int32_t run; - while (list->min < _NB_CACHED_RUNES && list->min <= list->max) { + while (list->min < _CACHED_RUNES && list->min <= list->max) { if (flag) map->map[list->min++] |= flag; else @@ -440,8 +412,7 @@ add_map(rune_map *map, rune_list *list, uint32_t flag) r->next = list; return; } - fprintf(stderr, "Error: conflicting map entries\n"); - exit(1); + errx(1, "error: conflicting map entries"); } if (list->min >= r->min && list->max <= r->max) { @@ -558,16 +529,11 @@ add_map(rune_map *map, rune_list *list, uint32_t flag) } } -void +static void dump_tables(void) { - int n; - __nbrune_t x; + int x, first_d, curr_d; rune_list *list; - _FileRuneLocale file_new_locale; - FILE *fp = (ofile ? ofile : stdout); - - memset(&file_new_locale, 0, sizeof(file_new_locale)); /* * See if we can compress some of the istype arrays @@ -575,19 +541,35 @@ dump_tables(void) for(list = types.root; list; list = list->next) { list->map = list->types[0]; for (x = 1; x < list->max - list->min + 1; ++x) { - if (list->types[x] != list->map) { + if ((int32_t)list->types[x] != list->map) { list->map = 0; break; } } } - memcpy(&file_new_locale.frl_magic, new_locale.rl_magic, - sizeof(file_new_locale.frl_magic)); - memcpy(&file_new_locale.frl_encoding, new_locale.rl_encoding, - sizeof(file_new_locale.frl_encoding)); + first_d = curr_d = -1; + for (x = 0; x < _CACHED_RUNES; ++x) { + uint32_t r = types.map[x]; - file_new_locale.frl_invalid_rune = htonl(new_locale.rl_invalid_rune); + if (r & _CTYPE_D) { + if (first_d < 0) + first_d = curr_d = x; + else if (x != curr_d + 1) + errx(1, "error: DIGIT range is not contiguous"); + else if (x - first_d > 9) + errx(1, "error: DIGIT range is too big"); + else + curr_d++; + if (!(r & _CTYPE_X)) + errx(1, + "error: DIGIT range is not a subset of XDIGIT range"); + } + } + if (first_d < 0) + errx(1, "error: no DIGIT range defined in the single byte area"); + else if (curr_d - first_d < 9) + errx(1, "error: DIGIT range is too small in the single byte area"); /* * Fill in our tables. Do this in network order so that @@ -595,10 +577,10 @@ dump_tables(void) * (Machines like Crays cannot share with little machines due to * word size. Sigh. We tried.) */ - for (x = 0; x < _NB_CACHED_RUNES; ++x) { - file_new_locale.frl_runetype[x] = htonl(types.map[x]); - file_new_locale.frl_maplower[x] = htonl(maplower.map[x]); - file_new_locale.frl_mapupper[x] = htonl(mapupper.map[x]); + for (x = 0; x < _CACHED_RUNES; ++x) { + new_locale.runetype[x] = htonl(types.map[x]); + new_locale.maplower[x] = htonl(maplower.map[x]); + new_locale.mapupper[x] = htonl(mapupper.map[x]); } /* @@ -607,118 +589,144 @@ dump_tables(void) list = types.root; while (list) { - new_locale.rl_runetype_ext.rr_nranges++; + new_locale.runetype_ext_nranges++; list = list->next; } - file_new_locale.frl_runetype_ext.frr_nranges = - htonl(new_locale.rl_runetype_ext.rr_nranges); + new_locale.runetype_ext_nranges = + htonl(new_locale.runetype_ext_nranges); list = maplower.root; while (list) { - new_locale.rl_maplower_ext.rr_nranges++; + new_locale.maplower_ext_nranges++; list = list->next; } - file_new_locale.frl_maplower_ext.frr_nranges = - htonl(new_locale.rl_maplower_ext.rr_nranges); + new_locale.maplower_ext_nranges = + htonl(new_locale.maplower_ext_nranges); list = mapupper.root; while (list) { - new_locale.rl_mapupper_ext.rr_nranges++; + new_locale.mapupper_ext_nranges++; list = list->next; } - file_new_locale.frl_mapupper_ext.frr_nranges = - htonl(new_locale.rl_mapupper_ext.rr_nranges); + new_locale.mapupper_ext_nranges = + htonl(new_locale.mapupper_ext_nranges); - file_new_locale.frl_variable_len = htonl(new_locale.rl_variable_len); + new_locale.variable_len = htonl(new_locale.variable_len); /* * Okay, we are now ready to write the new locale file. */ /* - * PART 1: The _RuneLocale structure + * PART 1: The _FileRuneLocale structure */ - if (fwrite((char *)&file_new_locale, sizeof(file_new_locale), 1, fp) != 1) - err(1, "writing _RuneLocale to %s", locale_file); + if (fwrite((char *)&new_locale, sizeof(new_locale), 1, fp) != 1) { + perror(locale_file); + exit(1); + } /* * PART 2: The runetype_ext structures (not the actual tables) */ - for (list = types.root, n = 0; list != NULL; list = list->next, n++) { + list = types.root; + + while (list) { _FileRuneEntry re; - memset(&re, 0, sizeof(re)); - re.fre_min = htonl(list->min); - re.fre_max = htonl(list->max); - re.fre_map = htonl(list->map); + re.min = htonl(list->min); + re.max = htonl(list->max); + re.map = htonl(list->map); - if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) - err(1, "writing runetype_ext #%d to %s", n, locale_file); + if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) { + perror(locale_file); + exit(1); + } + + list = list->next; } /* * PART 3: The maplower_ext structures */ - for (list = maplower.root, n = 0; list != NULL; list = list->next, n++) { + list = maplower.root; + + while (list) { _FileRuneEntry re; - memset(&re, 0, sizeof(re)); - re.fre_min = htonl(list->min); - re.fre_max = htonl(list->max); - re.fre_map = htonl(list->map); + re.min = htonl(list->min); + re.max = htonl(list->max); + re.map = htonl(list->map); + + if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) { + perror(locale_file); + exit(1); + } - if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) - err(1, "writing maplower_ext #%d to %s", n, locale_file); + list = list->next; } /* * PART 4: The mapupper_ext structures */ - for (list = mapupper.root, n = 0; list != NULL; list = list->next, n++) { + list = mapupper.root; + + while (list) { _FileRuneEntry re; - memset(&re, 0, sizeof(re)); - re.fre_min = htonl(list->min); - re.fre_max = htonl(list->max); - re.fre_map = htonl(list->map); + re.min = htonl(list->min); + re.max = htonl(list->max); + re.map = htonl(list->map); - if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) - err(1, "writing mapupper_ext #%d to %s", n, locale_file); + if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) { + perror(locale_file); + exit(1); + } + + list = list->next; } /* * PART 5: The runetype_ext tables */ - for (list = types.root, n = 0; list != NULL; list = list->next, n++) { + list = types.root; + + while (list) { for (x = 0; x < list->max - list->min + 1; ++x) list->types[x] = htonl(list->types[x]); if (!list->map) { if (fwrite((char *)list->types, (list->max - list->min + 1) * sizeof(uint32_t), - 1, fp) != 1) - err(1, "writing runetype_ext table #%d to %s", n, locale_file); + 1, fp) != 1) { + perror(locale_file); + exit(1); + } } + list = list->next; } /* - * PART 5: And finally the variable data + * PART 6: And finally the variable data */ - if (new_locale.rl_variable_len != 0 && - fwrite((char *)new_locale.rl_variable, - new_locale.rl_variable_len, 1, fp) != 1) - err(1, "writing variable data to %s", locale_file); - fclose(fp); + if (new_locale.variable_len != 0 && + fwrite(variable, ntohl(new_locale.variable_len), 1, fp) != 1) { + perror(locale_file); + exit(1); + } + if (fclose(fp) != 0) { + perror(locale_file); + exit(1); + } + fp = NULL; if (!debug) return; - if (new_locale.rl_encoding[0]) - fprintf(stderr, "ENCODING %s\n", new_locale.rl_encoding); - if (new_locale.rl_variable) - fprintf(stderr, "VARIABLE %s\n", - (char *)new_locale.rl_variable); + if (new_locale.encoding[0]) + fprintf(stderr, "ENCODING %s\n", new_locale.encoding); + if (variable) + fprintf(stderr, "VARIABLE %s\n", variable); fprintf(stderr, "\nMAPLOWER:\n\n"); - for (x = 0; x < _NB_CACHED_RUNES; ++x) { + for (x = 0; x < _CACHED_RUNES; ++x) { if (isprint(maplower.map[x])) fprintf(stderr, " '%c'", (int)maplower.map[x]); else if (maplower.map[x]) @@ -737,7 +745,7 @@ dump_tables(void) fprintf(stderr, "\nMAPUPPER:\n\n"); - for (x = 0; x < _NB_CACHED_RUNES; ++x) { + for (x = 0; x < _CACHED_RUNES; ++x) { if (isprint(mapupper.map[x])) fprintf(stderr, " '%c'", (int)mapupper.map[x]); else if (mapupper.map[x]) @@ -757,29 +765,29 @@ dump_tables(void) fprintf(stderr, "\nTYPES:\n\n"); - for (x = 0; x < _NB_CACHED_RUNES; ++x) { + for (x = 0; x < _CACHED_RUNES; ++x) { uint32_t r = types.map[x]; if (r) { if (isprint(x)) - fprintf(stderr, " '%c':%2d", x, (int)(r & 0xff)); + fprintf(stderr, " '%c': %2d", x, (int)(r & 0xff)); else - fprintf(stderr, "%04x:%2d", x, (int)(r & 0xff)); - - fprintf(stderr, " %4s", (r & _RUNETYPE_A) ? "alph" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_C) ? "ctrl" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_D) ? "dig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_G) ? "graf" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_L) ? "low" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_P) ? "punc" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_S) ? "spac" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_U) ? "upp" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_X) ? "xdig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_B) ? "blnk" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_R) ? "prnt" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_I) ? "ideo" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_T) ? "spec" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_Q) ? "phon" : ""); + fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff)); + + fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : ""); fprintf(stderr, "\n"); } } @@ -788,64 +796,64 @@ dump_tables(void) if (list->map && list->min + 3 < list->max) { uint32_t r = list->map; - fprintf(stderr, "%04x:%2d", list->min, r & 0xff); - - fprintf(stderr, " %4s", (r & _RUNETYPE_A) ? "alph" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_C) ? "ctrl" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_D) ? "dig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_G) ? "graf" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_L) ? "low" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_P) ? "punc" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_S) ? "spac" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_U) ? "upp" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_X) ? "xdig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_B) ? "blnk" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_R) ? "prnt" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_I) ? "ideo" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_T) ? "spec" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_Q) ? "phon" : ""); + fprintf(stderr, "%04x: %2d", + (uint32_t)list->min, (int)(r & 0xff)); + + fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : ""); fprintf(stderr, "\n...\n"); - fprintf(stderr, "%04x:%2d", list->max, r & 0xff); - - fprintf(stderr, " %4s", (r & _RUNETYPE_A) ? "alph" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_C) ? "ctrl" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_D) ? "dig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_G) ? "graf" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_L) ? "low" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_P) ? "punc" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_S) ? "spac" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_U) ? "upp" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_X) ? "xdig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_B) ? "blnk" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_R) ? "prnt" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_I) ? "ideo" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_T) ? "spec" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_Q) ? "phon" : ""); - fprintf(stderr, " %1u", (unsigned)((r & _RUNETYPE_SWM)>>_RUNETYPE_SWS)); + fprintf(stderr, "%04x: %2d", + (uint32_t)list->max, (int)(r & 0xff)); + + fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : ""); fprintf(stderr, "\n"); } else for (x = list->min; x <= list->max; ++x) { uint32_t r = ntohl(list->types[x - list->min]); if (r) { - fprintf(stderr, "%04x:%2d", x, (int)(r & 0xff)); - - fprintf(stderr, " %4s", (r & _RUNETYPE_A) ? "alph" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_C) ? "ctrl" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_D) ? "dig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_G) ? "graf" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_L) ? "low" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_P) ? "punc" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_S) ? "spac" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_U) ? "upp" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_X) ? "xdig" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_B) ? "blnk" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_R) ? "prnt" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_I) ? "ideo" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_T) ? "spec" : ""); - fprintf(stderr, " %4s", (r & _RUNETYPE_Q) ? "phon" : ""); - fprintf(stderr, " %1u", (unsigned)((r & _RUNETYPE_SWM)>>_RUNETYPE_SWS)); + fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff)); + + fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : ""); + fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : ""); fprintf(stderr, "\n"); } } -- 2.41.0