History log of /src/lib/libc/locale/setlocale.c |
Revision | | Date | Author | Comments |
1.66 |
| 08-Jun-2024 |
joerg | Redo l10n support in the strerror family.
Instead of opening the message catelog whenever strerror is called, keep track of the translations in the locale cache. For the C locale, the builtin sys_errlist is used directly. Other locales will open the catalog file on the first strerror call and build a translation table, so that further calls in this locale can just use an array lookup.
|
1.65 |
| 04-Jan-2018 |
kamil | branches: 1.65.14; Add bunch of missing includes of namespace.h in libc
The NetBSD Standard C Library uses internally some of its functions with a mangled symbol name, usually "_symbol". The internal functions shall not use the global (public) symbols.
This change eliminates usage of the global changes of the following symbols: - strlcat -> _strlcat - sysconf -> __sysconf - closedir -> _closedir - fparseln -> _fparseln - kill -> _kill - mkstemp -> _mkstemp - reallocarr -> _reallocarr - strcasecmp -> _strcasecmp - strncasecmp -> _strncasecmp - strptime -> _strptime - strtok_r -> _strtok_r - sysctl -> _sysctl - dlopen -> __dlopen - dlclose -> __dlclose - dlsym -> __dlsym
Sponsored by <The NetBSD Foundation>
|
1.64 |
| 13-Sep-2013 |
joerg | branches: 1.64.20; Redo the locale cache to be constant. It now contains the localeconv() data and which LC_MONETARY and LC_NUMERIC values it is derived from. In newlocale(3) and setlocale(3), check for the existing entries and on miss, create a new entry. This is currently not using a lock for the list as the worst case is a small memory leak.
|
1.63 |
| 17-May-2013 |
joerg | Provide explicit LC_C_LOCALE accessor and drop the various NULL checks. Provide LC_GLOBAL_LOCALE in a way that works with all locale functions. Merge constant data used by the initial global locale and the C locale. Drop function call layer for _current_locale() and directly return the locale reference, not a pointer to it. Use protected access for global variables, so that libc references can avoid the GOT overhead.
|
1.62 |
| 30-Apr-2013 |
joerg | Make that to process PATH_LOCALE the first time _find_category is called. Use this to implement newlocale and provide duplocale/freelocale as well. Based on patches by Takehiko Nozaki with simplications and fix for the init order by myself.
|
1.61 |
| 14-Apr-2013 |
joerg | Rename struct _locale_impl_t to struct _locale, since it will end up as locale_t later.
|
1.60 |
| 04-Mar-2012 |
tnozaki | branches: 1.60.2; don't use __link_set_* stuff for locale implementation. patch reviewed by matt@, thanks.
|
1.59 |
| 20-Jan-2012 |
joerg | Remove code for CITRUS!=yes.
|
1.58 |
| 07-Jun-2010 |
tnozaki | branches: 1.58.6; 1. MB_LEN_MAX switch MD to MI. 2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32 so we have to add more setlocale(3) __RENAME func, __setlocale50. 3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/* prepareing for next libc major crunk. 4. bump libc minor version.
|
1.57 |
| 09-Mar-2009 |
tnozaki | fix static linking setlocale(3) problem, reported by Aran Clauson at current-users, thanks a lot!
|
1.56 |
| 11-Jan-2009 |
christos | branches: 1.56.2; merge christos-time_t
|
1.55 |
| 02-Jan-2009 |
tnozaki | Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format. ok'ed by core and releng. (thanks for agc@, snj@ and i'm sorry for long time patience).
[libc] - localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by new locale-db implementation using citrus_db backend, see src/lib/libc/citrus/citrus_lc_*.[ch]. - add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation internally, because they're locale-aware function. - add some stubs for multi-locale issue, see {current,global}_locale.c. - remove some obsolete file, setrunelocale.c, ___runetype_mb.c. - remove __savectype() from ctypeio.[ch].
[tools] - mklocale(1): add new option ``-t'' that generates new style LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format. - chrtbl(1): added ctypeio.[ch] for __savectype().
[locale-db] - added en_US.US-ASCII locale. - removed some shareable locale definition file: en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8 zh_CN.eucCN -> zh_CN.GB18030 and more...see src/share/locale/*/Makefile. - remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS. - change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP* for X11's locale.alias file alignments. - fix regression test, wrong wcs?width(3), NAN/INF usage.
i tested release-build following arch: i386, amd64, hpc{mips,arm,sh}, sparc64, vax.
citrus_lc_*.[ch] also can read old-plain-text style locale-db. so that backward compatibility is keeped, but lc*.[ch] can't read new citrus_db'ed locale-db and localeio.c never check sanity, so forward compatibility is broken ;-<
old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
|
1.54 |
| 12-Jun-2008 |
ginsbach | branches: 1.54.4; 1.54.6; The category LC_MESSAGES is already a directory possibly containing gencat(1) generated message catalogs. Make sure that it is handled properly. (I missed this previously.)
Add some additional sanity checks on the locale path as the value may come from the envrionment.
|
1.53 |
| 17-May-2008 |
ginsbach | Add support for additional locale categories: LC_MESSAGES, LC_MONETARY, LC_NUMERIC.
The code used to load LC_TIME was refactored in to a more general routine. This common routine is now used to load LC_TIME along with the newly added categories.
Changes discussed with/reviewed by christos.
|
1.52 |
| 29-Sep-2007 |
tnozaki | branches: 1.52.6; 1.52.8; 1. add workaround for ctype.h is* funcs problem. isspace((int)0xA0) should return false under LC_CTYPE=en_US.UTF-8, see: http://www.freebsd.org/cgi/query-pr.cgi?pr=116363&cat=gnu 2. change __runtable_to_netbsd_ctype() as reentrant.
patch ok'ed by tshiozak-san, thanks!
|
1.51 |
| 28-Mar-2007 |
manu | branches: 1.51.4; Add support for LC_TIME, from Joachim Kuebart, through PR lib/10877
|
1.50 |
| 16-Feb-2006 |
tnozaki | make "locale -a" read locale.alias file.
|
1.49 |
| 02-Dec-2005 |
yamt | constify and remove an __UNCONST.
|
1.48 |
| 29-Nov-2005 |
christos | WARNS=4
|
1.47 |
| 21-Jul-2004 |
tshiozak | make sure CITRUS=no to work.
|
1.46 |
| 21-Jul-2004 |
tshiozak | - add support for "/force" symbol on locale.alias. - a bit clean-up.
|
1.45 |
| 21-Jul-2004 |
tshiozak | add prototype for load_locale_sub().
|
1.44 |
| 21-Jul-2004 |
tshiozak | add support for locale.alias file.
|
1.43 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
|
1.42 |
| 07-Aug-2002 |
enami | Rearrange code to avoid core dump and just return an error instead when parsing a locale string previously returned by setlocale.
|
1.41 |
| 03-Aug-2002 |
yamt | remove a global variable "saved_categories" as it isn't necessary anymore.
|
1.40 |
| 02-Aug-2002 |
tshiozak | remove an obstructive ?: operator of the check added in the last commit by itojun-san.
|
1.39 |
| 02-Aug-2002 |
itojun | correct use of strlcpy (really need to enforce length, so use memcpy)
|
1.38 |
| 02-Aug-2002 |
tshiozak | fix a bug of setlocale when changing locales with LC_ALL for the first argunemt and with a string containing many slashes for the second argument. This bug may cause setlocale() to destroy static datas.
If a setuid program calls this function as 'setlocale(LC_ALL, "");', this might be vulnerable, although there are few programs having such vulnerability. This bug probably affects every versions of NetBSD, including 1.4, 1.5 and 1.6.
XXX: This part of setlocale is unseemly, thus we had better rewrite it in the future.
|
1.37 |
| 13-Feb-2002 |
yamt | branches: 1.37.2; - give the precedence to LC_ALL environment variable than other LC_* variables. - add a hack for LC_MESSAGES for nls. (this will be removed when we have a real LC_MESSAGES support.)
|
1.36 |
| 22-Jan-2002 |
yamt | fix a long standing bug that setlocale(LC_ALL, NULL) returns only 5 categories while we have 6 categories.
|
1.35 |
| 17-Apr-2001 |
kleink | Need <limits.h> in _CTYPE_PRIVATE environments.
|
1.34 |
| 25-Jan-2001 |
itojun | branches: 1.34.2; split setlocale.c for smaller footprint (do not pull things in too much). have magic number check in locale modules. rename: lib/libc/locale/setlocale_sb.c -> setlocale1.c
NOTE: this commit does not enable multibyte locale support, yet.
|
1.33 |
| 22-Jan-2001 |
itojun | move __mb_cur_max to dedicated *.o, so that we do not pull in locale stuff just by calling printf().
|
1.32 |
| 25-Dec-2000 |
itojun | byte default, use (non-citrus) singlebyte locale. if we compile ld.elf_so with citrus locale, it bombs. XXX this is shortterm workaround. if you are willing to test citrus locale, use RUNE=yes in libc/locale/Makefile.inc.
|
1.31 |
| 24-Dec-2000 |
itojun | fix LC_ALL behavior again...
|
1.30 |
| 23-Dec-2000 |
itojun | error code check mistake in LC_CTYPE handling
|
1.29 |
| 22-Dec-2000 |
itojun | cope with runeglue.c failure better
|
1.28 |
| 22-Dec-2000 |
itojun | for setlocale(LC_CTYPE) failure, make sure to return NULL.
|
1.27 |
| 22-Dec-2000 |
jdolecek | previous change was not complete enough, so finish and make more correct: for LC_ALL, return success if at least on of categories was loaded successfully, error if no category was loaded; in the latter case, we don't need to back off locale changes, since none happened
|
1.26 |
| 22-Dec-2000 |
jdolecek | __setlocale(): ignore errors in locale category load for LC_ALL - doing so is not useful. This is same change as in rev 1.17.
|
1.25 |
| 21-Dec-2000 |
itojun | handle $LANG and $LC_xx consistently (slash is forbidden).
|
1.24 |
| 21-Dec-2000 |
itojun | first import of citrus LC_CTYPE locale. singlebyte only at this moment. shot-term TODO: - enable multibyte locales. this includes loadable locale modules (#ifdef DLRUNE). - populate LC_CTYPE definition files. - other functions such as iconv() - make libc functions more friendly with multibyte. - multilingualize other LC_xx - torture tests
XXX don't forget to "make depend" when you rebuild libc, multibyte.c is moved from lib/libc/stdlib to lib/libc/locale.
|
1.23 |
| 20-Dec-2000 |
itojun | use strlcpy to guarantee string termination
|
1.22 |
| 20-Dec-2000 |
itojun | on setlocale() failure, back out changes made to current_locale[], and return NULL. from: From: Shingo WATANABE <nabe@nabechan.org>
|
1.21 |
| 09-Sep-2000 |
veego | Include <unistd.h> for the issetugid prototype. Fix a compile problem on the alpha.
|
1.20 |
| 08-Sep-2000 |
tshiozak | Disallow '/' character in LC_* and LANG environment variable, and prevent to look up PATH_LOCALE and NLSPATH on setuid/setgid executable. This is important to prevent to cause some kind of security hole.
|
1.19 |
| 10-Aug-2000 |
kleink | ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer expression with type size_t (not int).
(Incompatible ABI change, ignored due to a window of just two days.)
|
1.18 |
| 08-Aug-2000 |
tshiozak | Preparation for the future introduction of multibyte locale. - MB_LEN_MAX is increased to 32. - To ensure binary compatibility for old executables under multibyte locale, versioned setlocale is added. - __mb_len_cur definision is added in setlocale.c and enable it in stdlib.h . It is also important for multibyte locale stuffs, but I just forgot.
|
1.17 |
| 15-Oct-1999 |
jdolecek | branches: 1.17.4; 1.17.6; when loading all locale categories (called with LC_ALL), ignore if loadlocale() fails - since only LC_CTYPE is implemented and all other categories return error, code never got to actually load the ctype locales, as first category tried was LC_COLLATE and it always failed
|
1.16 |
| 13-Nov-1998 |
christos | branches: 1.16.2; 1.16.4; delint
|
1.15 |
| 23-Oct-1998 |
kleink | Declaration vs. definition consistency.
|
1.14 |
| 13-Oct-1998 |
kleink | Need internal names for snprintf() and vsnprintf().
|
1.13 |
| 26-Jul-1998 |
mycroft | constify some tables.
|
1.12 |
| 13-Jul-1997 |
christos | Fix RCSID's
|
1.11 |
| 02-Jun-1997 |
kleink | Add support for localized character sets (a.k.a. LC_CTYPE).
Thanks go to Matthias Scheler <tron@lyssa.owl.de> for contributing his initial work in PR/3592, and to Christos Zoulas for refining it!
|
1.10 |
| 29-Apr-1997 |
kleink | RCSid police.
|
1.9 |
| 29-Apr-1997 |
kleink | * Handle cases when 'lang' and friends have been set to "" correctly. * Fix botch when setting the locale for no specific category.
|
1.8 |
| 22-Apr-1997 |
mrg | KNF.
|
1.7 |
| 23-Jan-1997 |
mrg | - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions. - some KNF.
|
1.6 |
| 13-May-1995 |
jtc | #include appropriate header files to bring prototypes into scope
|
1.5 |
| 30-Sep-1994 |
jtc | New setlocale() that does everything except actually load new locales; and that's coming in the next week.
|
1.4 |
| 26-Aug-1993 |
jtc | Declare rcsid strings so they are stored in text segment.
|
1.3 |
| 06-Aug-1993 |
jtc | setlocale(category, "") is supposed to set locale to the default. The "C" locale in our case, since we have no other locale support.
|
1.2 |
| 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.16.4.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.16.2.2 |
| 04-Oct-2000 |
he | Pull up revisions 1.20-1.21 (requested by sommerfeld): Ignore NLSPATH, PATH_LOCALE if issetugid(). Disallow `/' in LC_* and LANG environment variables. Close one-byte buffer-overrun in catopen().
|
1.16.2.1 |
| 08-Feb-2000 |
he | Pull up revision 1.17 (requested by jdolecek): When setlocale() is called with LC_ALL, try to initialize every locale category even if the initialization for some of them fails. Fixes problem where e.g. LC_CTYPE category won't be initialized if the locale doesn't implement the LC_COLLATE category.
|
1.17.6.5 |
| 04-Sep-2002 |
itojun | pullup lib/libc/locale/setlocale.c 1.38-1.40 (tshiozak)
fix a bug of setlocale when changing locales with LC_ALL for the first argunemt and with a string containing many slashes for the second argument. This bug may cause setlocale() to destroy static datas.
|
1.17.6.4 |
| 25-Jan-2001 |
jhawk | Pull up revisions 1.23, 1.25-1.27, 1.31 via patch (requested by itojun): Updates to setlocale(): return NULL for nonexistant locales, ignore some errors, and handle environment vars consistently (no slashes).
|
1.17.6.3 |
| 26-Oct-2000 |
sommerfeld | Pull up catopen.c 1.17,1.18 setlocale.c 1.20,1.21
Avoid security problems when these are used in setuid programs. Approved by jhawk (a while ago)
|
1.17.6.2 |
| 10-Aug-2000 |
kleink | Pull up rev. 1.19 (approved by thorpej): ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer expression with type size_t.
|
1.17.6.1 |
| 09-Aug-2000 |
tshiozak | pull up the following changes (approved by thorpej): > cvs rdiff -r1.9 -r1.10 basesrc/include/locale.h > cvs rdiff -r1.45 -r1.46 basesrc/include/stdlib.h > cvs rdiff -r1.16 -r1.17 basesrc/lib/libc/locale/Makefile.inc > cvs rdiff -r1.17 -r1.18 basesrc/lib/libc/locale/setlocale.c > cvs rdiff -r0 -r1.2 basesrc/lib/libc/locale/setlocale_sb.c > cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/alpha/include/limits.h > cvs rdiff -r1.1 -r1.2 syssrc/sys/arch/arm26/include/limits.h > cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/arm32/include/limits.h > cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/i386/include/limits.h > cvs rdiff -r1.12 -r1.13 syssrc/sys/arch/m68k/include/limits.h > cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/mips/include/limits.h > cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/pc532/include/limits.h > cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/powerpc/include/limits.h > cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/sh3/include/limits.h > cvs rdiff -r1.11 -r1.12 syssrc/sys/arch/sparc/include/limits.h > cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/sparc64/include/limits.h > cvs rdiff -r1.9 -r1.10 syssrc/sys/arch/vax/include/limits.h > > Outline: > > Preparation for the future introduction of multibyte locale. > - MB_LEN_MAX is increased to 32. > - To ensure binary compatibility for old executables > under multibyte locale, versioned setlocale is added. > - __mb_len_cur definision is added in setlocale.c > and enable it in stdlib.h . > It is also important for multibyte locale stuffs, > but I just forgot.
|
1.17.4.2 |
| 23-Jun-2000 |
minoura | Import of most recent XPG4DL dated 2000.06.23.
|
1.17.4.1 |
| 28-May-2000 |
minoura | Citrus Project XPG4DL, an implementation of I18N (locale) framework, is imported.
|
1.34.2.5 |
| 13-Aug-2002 |
nathanw | Catch up to -current.
|
1.34.2.4 |
| 22-Mar-2002 |
nathanw | Catch up to -current.
|
1.34.2.3 |
| 08-Mar-2002 |
nathanw | Catch up to -current.
|
1.34.2.2 |
| 28-Jan-2002 |
nathanw | Catch up to -current.
|
1.34.2.1 |
| 08-Oct-2001 |
nathanw | Catch up to -current.
|
1.37.2.5 |
| 07-Aug-2002 |
lukem | Pull up revision 1.42 (requested by enami in ticket #639): Rearrange code to avoid core dump and just return an error instead when parsing a locale string previously returned by setlocale.
|
1.37.2.4 |
| 07-Aug-2002 |
lukem | Pull up revision 1.41 (requested by lukem): remove a global variable "saved_categories" as it isn't necessary anymore.
|
1.37.2.3 |
| 03-Aug-2002 |
lukem | Pull up revision 1.40 (requested by tshiozak in ticket #619): remove an obstructive ?: operator of the check added in the last commit by itojun-san.
|
1.37.2.2 |
| 03-Aug-2002 |
lukem | Pull up revision 1.39 (requested by tshiozak in ticket #619): correct use of strlcpy (really need to enforce length, so use memcpy)
|
1.37.2.1 |
| 03-Aug-2002 |
lukem | Pull up revision 1.38 (requested by tshiozak in ticket #619): fix a bug of setlocale when changing locales with LC_ALL for the first argunemt and with a string containing many slashes for the second argument. This bug may cause setlocale() to destroy static datas. If a setuid program calls this function as 'setlocale(LC_ALL, "");', this might be vulnerable, although there are few programs having such vulnerability. This bug probably affects every versions of NetBSD, including 1.4, 1.5 and 1.6. XXX: This part of setlocale is unseemly, thus we had better rewrite it in the future.
|
1.51.4.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.52.8.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.52.6.2 |
| 17-Jun-2008 |
yamt | sync with head.
|
1.52.6.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.54.6.2 |
| 04-Jan-2009 |
christos | merge with head.
|
1.54.6.1 |
| 12-Jun-2008 |
christos | file setlocale.c was added on branch christos-time_t on 2009-01-04 17:02:20 +0000
|
1.54.4.2 |
| 12-Mar-2009 |
snj | Pull up following revision(s) (requested by tnozaki in ticket #556): lib/libc/locale/generic_lc_template.h: revision 1.3 lib/libc/locale/setlocale.c: revision 1.57 fix static linking setlocale(3) problem, reported by Aran Clauson at current-users, thanks a lot!
|
1.54.4.1 |
| 15-Jan-2009 |
snj | Pull up following revision(s) (requested by tnozaki in ticket #222): distrib/sets/lists/base/mi: revision 1.788 distrib/utils/libhack/Makefile.inc: revision 1.23 distrib/utils/libhack/Makefile: revision 1.22 etc/mtree/NetBSD.dist: revision 1.387 include/locale.h: revision 1.15 lib/libc/citrus/Makefile.inc: revision 1.6 lib/libc/citrus/citrus_aliasname_local.h: revision 1.1 lib/libc/citrus/citrus_bcs.h: revision 1.5 lib/libc/citrus/citrus_bcs_strtol.c: revision 1.1 lib/libc/citrus/citrus_bcs_strtoul.c: revision 1.1 lib/libc/citrus/citrus_csmapper.c: revision 1.9 lib/libc/citrus/citrus_fix_grouping.h: revision 1.1 lib/libc/citrus/citrus_lc_ctype.c: revision 1.1 lib/libc/citrus/citrus_lc_messages.c: revision 1.1 lib/libc/citrus/citrus_lc_messages.h: revision 1.1 lib/libc/citrus/citrus_lc_monetary.c: revision 1.1 lib/libc/citrus/citrus_lc_monetary.h: revision 1.1 lib/libc/citrus/citrus_lc_numeric.c: revision 1.1 lib/libc/citrus/citrus_lc_numeric.h: revision 1.1 lib/libc/citrus/citrus_lc_template.h: revision 1.1 lib/libc/citrus/citrus_lc_template_decl.h: revision 1.1 lib/libc/citrus/citrus_lc_time.c: revision 1.1 lib/libc/citrus/citrus_lc_time.h: revision 1.1 lib/libc/citrus/citrus_module.c: revision 1.8 lib/libc/citrus/citrus_namespace.h: revision 1.7 lib/libc/citrus/modules/citrus_euc.c: revision 1.13 lib/libc/gen/Makefile.inc: revision 1.166 lib/libc/gen/isctype.c: revision 1.17 via patch lib/libc/gen/tolower_.c: revision 1.10 lib/libc/gen/toupper_.c: revision 1.10 lib/libc/iconv/Makefile.inc: revision 1.3 lib/libc/iconv/iconv.c: revision 1.7 lib/libc/locale/Makefile.inc: revision 1.53 lib/libc/locale/___runetype_mb.c: file removal lib/libc/locale/_wctrans.c: revision 1.7 lib/libc/locale/_wctrans_local.h: revision 1.3 lib/libc/locale/_wctype.c: revision 1.1 lib/libc/locale/_wctype_local.h: revision 1.1 lib/libc/locale/aliasname.c: revision 1.3 lib/libc/locale/aliasname_local.h: revision 1.2 lib/libc/locale/bsdctype.c: revision 1.1 lib/libc/locale/bsdctype.h: revision 1.1 lib/libc/locale/ctypeio.c: revision 1.8 lib/libc/locale/ctypeio.h: revision 1.2 lib/libc/locale/current_locale.c: revision 1.1 lib/libc/locale/dummy_lc_collate.c: revision 1.1 lib/libc/locale/dummy_lc_template.h: revision 1.1 lib/libc/locale/fix_grouping.c: revision 1.1 lib/libc/locale/fix_grouping.h: revision 1.1 lib/libc/locale/generic_lc_all.c: revision 1.1 lib/libc/locale/generic_lc_template.h: revision 1.1 lib/libc/locale/generic_lc_template_decl.h: revision 1.1 lib/libc/locale/global_locale.c: revision 1.1 lib/libc/locale/iswctype.c: file removal lib/libc/locale/iswctype_mb.c: revision 1.1 lib/libc/locale/iswctype_sb.c: revision 1.6 lib/libc/locale/lcmessages.c: file removal lib/libc/locale/lcmessages.h: file removal lib/libc/locale/lcmonetary.c: file removal lib/libc/locale/lcmonetary.h: file removal lib/libc/locale/lcnumeric.c: file removal lib/libc/locale/lcnumeric.h: file removal lib/libc/locale/lctime.c: file removal lib/libc/locale/lctime.h: file removal lib/libc/locale/localeconv.c: revision 1.15 lib/libc/locale/localeio.c: revision 1.2 lib/libc/locale/localeio.h: revision 1.2 lib/libc/locale/localeio_lc_ctype.c: revision 1.1 lib/libc/locale/localeio_lc_messages.c: revision 1.1 lib/libc/locale/localeio_lc_monetary.c: revision 1.1 lib/libc/locale/localeio_lc_numeric.c: revision 1.1 lib/libc/locale/localeio_lc_time.c: revision 1.1 lib/libc/locale/multibyte.h: revision 1.4 lib/libc/locale/multibyte_amd1.c: revision 1.6 lib/libc/locale/multibyte_c90.c: revision 1.5 lib/libc/locale/nb_lc_messages_misc.h: revision 1.1 lib/libc/locale/nb_lc_monetary_misc.h: revision 1.1 lib/libc/locale/nb_lc_numeric_misc.h: revision 1.1 lib/libc/locale/nb_lc_template.h: revision 1.1 lib/libc/locale/nb_lc_template_decl.h: revision 1.1 lib/libc/locale/nb_lc_time_misc.h: revision 1.1 lib/libc/locale/nl_langinfo.c: revision 1.12 lib/libc/locale/rune.c: revision 1.31 lib/libc/locale/rune.h: revision 1.13 lib/libc/locale/rune_local.h: revision 1.11 lib/libc/locale/runeglue.c: revision 1.14 lib/libc/locale/runetable.c: revision 1.18 lib/libc/locale/setlocale.c: revision 1.55 via patch lib/libc/locale/setlocale_local.h: revision 1.1 lib/libc/locale/setrunelocale.c: file removal lib/libc/nls/Makefile.inc: revision 1.9 lib/libc/nls/catopen.c: revision 1.26 lib/libc/string/Makefile.inc: revision 1.68 lib/libc/string/wcscmp.c: revision 1.6 lib/libc/string/wcsncmp.c: revision 1.6 lib/libc/string/wcswidth.c: file removal lib/libc/string/wmemcmp.c: revision 1.4 regress/lib/libc/locale/Makefile: revision 1.4 regress/lib/libc/locale/ctype1/Makefile: revision 1.4 regress/lib/libc/locale/ctype1/en_US.UTF-8.exp.uue: revision 1.2 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.exp.uue: revision 1.1 regress/lib/libc/locale/ctype1/ja_JP.ISO-2022-JP.in.uue: revision 1.1 regress/lib/libc/locale/ctype1/ja_JP.ISO2022-JP.exp.uue: file removal regress/lib/libc/locale/ctype1/ja_JP.ISO2022-JP.in.uue: file removal regress/lib/libc/locale/ctype1/ja_JP.SJIS.exp.uue: revision 1.2 regress/lib/libc/locale/ctype1/ja_JP.eucJP.exp.uue: revision 1.2 regress/lib/libc/locale/ctype2/Makefile: revision 1.5 regress/lib/libc/locale/ctype2/ja_JP.ISO-2022-JP-2.in.uue: revision 1.1 regress/lib/libc/locale/ctype2/ja_JP.ISO2022-JP2.in.uue: file removal regress/lib/libc/locale/ctype3/Makefile: revision 1.5 regress/lib/libc/locale/mbtowc/Makefile: revision 1.3 regress/lib/libc/locale/mbtowc/ja_JP.ISO-2022-JP: revision 1.1 regress/lib/libc/locale/mbtowc/ja_JP.ISO2022-JP: file removal regress/lib/libc/locale/wcstod/wcstod_test.c: revision 1.2 share/locale/Makefile.locale: revision 1.1 share/locale/Makefile: revision 1.5 share/locale/ctype/Makefile: revision 1.28 share/locale/locale.alias: revision 1.11 share/locale/messages/Makefile: revision 1.5 share/locale/messages/en_US.ISO8859-1.src: file removal share/locale/messages/en_US.US-ASCII.src: revision 1.1 share/locale/messages/ja_JP.ISO-2022-JP.src: revision 1.1 share/locale/messages/ja_JP.ct.src: revision 1.1 share/locale/messages/sr_ME.ISO8859-2.src: revision 1.1 share/locale/messages/sr_ME.ISO8859-5.src: revision 1.1 share/locale/messages/sr_YU.ISO8859-2.src: file removal share/locale/messages/sr_YU.ISO8859-5.src: file removal share/locale/messages/sr_YU.UTF-8.src: file removal share/locale/messages/zh_CN.GB18030.src: file removal share/locale/messages/zh_TW.eucTW.src: revision 1.1 share/locale/monetary/Makefile: revision 1.5 share/locale/monetary/af_ZA.ISO8859-1.src: revision 1.2 share/locale/monetary/am_ET.UTF-8.src: revision 1.2 share/locale/monetary/be_BY.CP1131.src: file removal share/locale/monetary/be_BY.CP1251.src: revision 1.2 share/locale/monetary/be_BY.ISO8859-5.src: revision 1.2 share/locale/monetary/be_BY.UTF-8.src: revision 1.2 share/locale/monetary/bg_BG.CP1251.src: revision 1.2 share/locale/monetary/bg_BG.UTF-8.src: revision 1.2 share/locale/monetary/ca_ES.ISO8859-1.src: revision 1.2 share/locale/monetary/cs_CZ.ISO8859-2.src: revision 1.2 share/locale/monetary/cs_CZ.UTF-8.src: revision 1.2 share/locale/monetary/da_DK.ISO8859-1.src: revision 1.2 share/locale/monetary/de_AT.ISO8859-1.src: revision 1.2 share/locale/monetary/de_CH.ISO8859-1.src: revision 1.2 share/locale/monetary/de_DE.ISO8859-1.src: revision 1.2 share/locale/monetary/el_GR.ISO8859-7.src: revision 1.2 share/locale/monetary/en_AU.ISO8859-1.src: revision 1.2 share/locale/monetary/en_CA.ISO8859-1.src: revision 1.2 share/locale/monetary/en_GB.ISO8859-1.src: revision 1.2 share/locale/monetary/en_GB.UTF-8.src: revision 1.2 share/locale/monetary/en_IE.UTF-8.src: revision 1.2 share/locale/monetary/en_NZ.ISO8859-1.src: revision 1.2 share/locale/monetary/en_US.ISO8859-1.src: revision 1.2 share/locale/monetary/en_US.US-ASCII.src: revision 1.1 share/locale/monetary/es_ES.ISO8859-1.src: revision 1.2 share/locale/monetary/et_EE.ISO8859-15.src: revision 1.2 share/locale/monetary/fi_FI.ISO8859-1.src: revision 1.2 share/locale/monetary/fr_BE.ISO8859-1.src: revision 1.2 share/locale/monetary/fr_CA.ISO8859-1.src: revision 1.2 share/locale/monetary/fr_FR.ISO8859-1.src: revision 1.2 share/locale/monetary/he_IL.UTF-8.src: revision 1.2 share/locale/monetary/hi_IN.ISCII-DEV.src: revision 1.2 share/locale/monetary/hr_HR.ISO8859-2.src: revision 1.2 share/locale/monetary/hu_HU.ISO8859-2.src: revision 1.2 share/locale/monetary/hy_AM.ARMSCII-8.src: revision 1.2 share/locale/monetary/hy_AM.UTF-8.src: revision 1.2 share/locale/monetary/is_IS.ISO8859-1.src: revision 1.2 share/locale/monetary/it_IT.ISO8859-1.src: revision 1.2 share/locale/monetary/ja_JP.ISO-2022-JP.src: revision 1.1 share/locale/monetary/ja_JP.UTF-8.src: revision 1.2 share/locale/monetary/ja_JP.eucJP.src: revision 1.2 share/locale/monetary/kk_KZ.PT154.src: revision 1.2 share/locale/monetary/kk_KZ.UTF-8.src: revision 1.2 share/locale/monetary/ko_KR.UTF-8.src: revision 1.2 share/locale/monetary/ko_KR.eucKR.src: revision 1.2 share/locale/monetary/lt_LT.ISO8859-13.src: revision 1.2 share/locale/monetary/mn_MN.UTF-8.src: revision 1.2 share/locale/monetary/nl_BE.ISO8859-1.src: revision 1.2 share/locale/monetary/nl_NL.ISO8859-1.src: revision 1.2 share/locale/monetary/no_NO.ISO8859-1.src: revision 1.2 share/locale/monetary/pl_PL.ISO8859-2.src: revision 1.2 share/locale/monetary/pl_PL.UTF-8.src: revision 1.2 share/locale/monetary/pt_BR.ISO8859-1.src: revision 1.2 share/locale/monetary/pt_PT.ISO8859-1.src: revision 1.2 share/locale/monetary/ro_RO.ISO8859-2.src: revision 1.2 share/locale/monetary/ru_RU.CP1251.src: revision 1.2 share/locale/monetary/ru_RU.CP866.src: revision 1.2 share/locale/monetary/ru_RU.ISO8859-5.src: revision 1.2 share/locale/monetary/ru_RU.KOI8-R.src: revision 1.2 share/locale/monetary/ru_RU.UTF-8.src: revision 1.2 share/locale/monetary/sk_SK.ISO8859-2.src: revision 1.2 share/locale/monetary/sl_SI.ISO8859-2.src: revision 1.2 share/locale/monetary/sr_ME.ISO8859-2.src: revision 1.1 share/locale/monetary/sr_RS.ISO8859-2.src: revision 1.1 share/locale/monetary/sr_YU.ISO8859-2.src: revision 1.2 share/locale/monetary/sr_YU.ISO8859-5.src: revision 1.2 share/locale/monetary/sr_YU.UTF-8.src: revision 1.2 share/locale/monetary/sv_SE.ISO8859-1.src: revision 1.2 share/locale/monetary/tr_TR.ISO8859-9.src: revision 1.2 share/locale/monetary/uk_UA.CP1251.src: revision 1.2 share/locale/monetary/uk_UA.ISO8859-5.src: revision 1.2 share/locale/monetary/uk_UA.KOI8-U.src: revision 1.2 share/locale/monetary/uk_UA.UTF-8.src: revision 1.2 share/locale/monetary/zh_CN.GB18030.src: revision 1.2 share/locale/monetary/zh_CN.UTF-8.src: revision 1.2 share/locale/monetary/zh_CN.eucCN.src: revision 1.2 share/locale/monetary/zh_HK.Big5hkscs.src: revision 1.1 share/locale/monetary/zh_HK.UTF-8.src: revision 1.2 share/locale/monetary/zh_TW.Big5.src: revision 1.2 share/locale/numeric/Makefile: revision 1.4 share/locale/numeric/am_ET.UTF-8.src: file removal share/locale/numeric/en_US.ISO8859-1.src: file removal share/locale/numeric/en_US.US-ASCII.src: revision 1.1 share/locale/numeric/ja_JP.eucJP.src: file removal share/locale/numeric/ko_KR.eucKR.src: file removal share/locale/numeric/mn_MN.UTF-8.src: file removal share/locale/numeric/sr_ME.ISO8859-2.src: revision 1.1 share/locale/numeric/sr_YU.ISO8859-2.src: file removal share/locale/numeric/sr_YU.ISO8859-5.src: file removal share/locale/numeric/zh_CN.eucCN.src: file removal share/locale/time/Makefile: revision 1.5 share/locale/time/en_US.ISO8859-1.src: file removal share/locale/time/en_US.US-ASCII.src: revision 1.1 share/locale/time/ja_JP.ISO-2022-JP.src: revision 1.1 share/locale/time/ja_JP.ct.src: revision 1.1 share/locale/time/sr_ME.ISO8859-2.src: revision 1.1 share/locale/time/sr_ME.ISO8859-5.src: revision 1.1 share/locale/time/sr_ME.UTF-8.src: revision 1.1 share/locale/time/sr_YU.ISO8859-2.src: file removal share/locale/time/sr_YU.ISO8859-5.src: file removal share/locale/time/sr_YU.UTF-8.src: file removal share/locale/time/zh_CN.GB18030.src: file removal share/locale/time/zh_TW.eucTW.src: revision 1.1 usr.bin/locale/locale.c: revision 1.6 usr.bin/mklocale/Makefile: revision 1.12 usr.bin/mklocale/lex.l: revision 1.14 usr.bin/mklocale/mklocaledb.c: revision 1.1 usr.bin/mklocale/yacc.y: revision 1.25 usr.sbin/chrtbl/Makefile: revision 1.8 usr.sbin/chrtbl/ctypeio.c: revision 1.1 usr.sbin/chrtbl/ctypeio.h: revision 1.1 Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format. ok'ed by core and releng. (thanks for agc@, snj@ and i'm sorry for long time patience). [libc] - localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by new locale-db implementation using citrus_db backend, see src/lib/libc/citrus/citrus_lc_*.[ch]. - add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation internally, because they're locale-aware function. - add some stubs for multi-locale issue, see {current,global}_locale.c. - remove some obsolete file, setrunelocale.c, ___runetype_mb.c. - remove __savectype() from ctypeio.[ch]. [tools] - mklocale(1): add new option ``-t'' that generates new style LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format. - chrtbl(1): added ctypeio.[ch] for __savectype(). [locale-db] - added en_US.US-ASCII locale. - removed some shareable locale definition file: en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8 zh_CN.eucCN -> zh_CN.GB18030 and more...see src/share/locale/*/Makefile. - remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS. - change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP* for X11's locale.alias file alignments. - fix regression test, wrong wcs?width(3), NAN/INF usage.
i tested release-build following arch: i386, amd64, hpc{mips,arm,sh}, sparc64, vax.
citrus_lc_*.[ch] also can read old-plain-text style locale-db. so that backward compatibility is keeped, but lc*.[ch] can't read new citrus_db'ed locale-db and localeio.c never check sanity, so forward compatibility is broken ;-< old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
|
1.56.2.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.58.6.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.58.6.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.60.2.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.60.2.1 |
| 23-Jun-2013 |
tls | resync from head
|
1.64.20.1 |
| 14-Jul-2017 |
perseant | Initial commit of a mostly-working implementation of __STDC_ISO_10646__, with collation support using the Unicode Collation Algorithm.
The conversion from men/ku/ten form to Unicode is a gross hack at present. Fixing this, and fleshing out the LC_COLLATE locale component, are next on the agenda.
|
1.65.14.1 |
| 13-Oct-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #971):
lib/libc/locale/setlocale_local.h: revision 1.18 lib/libc/string/strerror_r.c: revision 1.6 lib/libc/locale/setlocale.c: revision 1.66 lib/libc/string/Makefile.inc: revision 1.90 lib/libc/locale/global_locale.c: revision 1.29
Redo l10n support in the strerror family.
Instead of opening the message catelog whenever strerror is called, keep track of the translations in the locale cache. For the C locale, the builtin sys_errlist is used directly. Other locales will open the catalog file on the first strerror call and build a translation table, so that further calls in this locale can just use an array lookup.
|