The NetBSD Project

CVS log for src/lib/libc/locale/setlocale.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / locale

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.65 / (download) - annotate - [select for diffs], Thu Jan 4 20:57:29 2018 UTC (4 years ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Changes since 1.64: +3 -2 lines
Diff to previous 1.64 (colored)

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>

Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 13 13:13:32 2013 UTC (8 years, 4 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: perseant-stdc-iso10646
Changes since 1.63: +83 -5 lines
Diff to previous 1.63 (colored)

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.

Revision 1.63 / (download) - annotate - [select for diffs], Fri May 17 12:55:57 2013 UTC (8 years, 8 months ago) by joerg
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

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.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Apr 30 00:45:05 2013 UTC (8 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.61: +12 -6 lines
Diff to previous 1.61 (colored)

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.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Apr 14 23:30:16 2013 UTC (8 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

Rename struct _locale_impl_t to struct _locale, since it will end up as
locale_t later.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Mar 4 21:14:56 2012 UTC (9 years, 10 months ago) by tnozaki
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.59: +24 -39 lines
Diff to previous 1.59 (colored)

don't use __link_set_* stuff for locale implementation.
patch reviewed by matt@, thanks.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 20 16:31:30 2012 UTC (10 years ago) by joerg
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.58: +2 -18 lines
Diff to previous 1.58 (colored)

Remove code for CITRUS!=yes.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jun 7 13:52:30 2010 UTC (11 years, 7 months ago) by tnozaki
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.57: +13 -5 lines
Diff to previous 1.57 (colored)

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.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Mar 9 02:22:25 2009 UTC (12 years, 10 months ago) by tnozaki
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.56: +31 -9 lines
Diff to previous 1.56 (colored)

fix static linking setlocale(3) problem, reported by Aran Clauson
at current-users, thanks a lot!

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jan 11 02:46:29 2009 UTC (13 years ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

merge christos-time_t

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jan 2 00:20:20 2009 UTC (13 years ago) by tnozaki
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.54: +55 -404 lines
Diff to previous 1.54 (colored)

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.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 12 20:33:23 2008 UTC (13 years, 7 months ago) by ginsbach
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, netbsd-5-base, matt-mips64-base2
Branch point for: netbsd-5, christos-time_t
Changes since 1.53: +19 -10 lines
Diff to previous 1.53 (colored)

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.

Revision 1.53 / (download) - annotate - [select for diffs], Sat May 17 03:49:54 2008 UTC (13 years, 8 months ago) by ginsbach
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, hpcarm-cleanup-nbase
Changes since 1.52: +35 -6 lines
Diff to previous 1.52 (colored)

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.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Sep 29 07:55:45 2007 UTC (14 years, 4 months ago) by tnozaki
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42, wrstuden-revivesa
Changes since 1.51: +2 -8 lines
Diff to previous 1.51 (colored)

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!

Revision 1.51 / (download) - annotate - [select for diffs], Wed Mar 28 19:05:53 2007 UTC (14 years, 10 months ago) by manu
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.50: +13 -4 lines
Diff to previous 1.50 (colored)

Add support for LC_TIME, from  Joachim Kuebart, through PR lib/10877

Revision 1.50 / (download) - annotate - [select for diffs], Thu Feb 16 19:19:49 2006 UTC (15 years, 11 months ago) by tnozaki
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.49: +2 -3 lines
Diff to previous 1.49 (colored)

make "locale -a" read locale.alias file.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Dec 2 11:10:45 2005 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.48: +3 -4 lines
Diff to previous 1.48 (colored)

constify and remove an __UNCONST.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Nov 29 03:11:59 2005 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

WARNS=4

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 21 20:27:46 2004 UTC (17 years, 6 months ago) by tshiozak
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.46: +8 -2 lines
Diff to previous 1.46 (colored)

make sure CITRUS=no to work.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 21 18:51:30 2004 UTC (17 years, 6 months ago) by tshiozak
Branch: MAIN
Changes since 1.45: +69 -47 lines
Diff to previous 1.45 (colored)

- add support for "/force" symbol on locale.alias.
- a bit clean-up.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 21 17:49:49 2004 UTC (17 years, 6 months ago) by tshiozak
Branch: MAIN
Changes since 1.44: +3 -2 lines
Diff to previous 1.44 (colored)

add prototype for load_locale_sub().

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jul 21 14:18:16 2004 UTC (17 years, 6 months ago) by tshiozak
Branch: MAIN
Changes since 1.43: +91 -42 lines
Diff to previous 1.43 (colored)

add support for locale.alias file.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 7 16:43:06 2003 UTC (18 years, 5 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.42: +3 -7 lines
Diff to previous 1.42 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Aug 7 04:42:42 2002 UTC (19 years, 5 months ago) by enami
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.41: +20 -20 lines
Diff to previous 1.41 (colored)

Rearrange code to avoid core dump and just return an error instead
when parsing a locale string previously returned by setlocale.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Aug 3 06:12:30 2002 UTC (19 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.40: +2 -9 lines
Diff to previous 1.40 (colored)

remove a global variable "saved_categories" as it isn't necessary anymore.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Aug 2 12:27:32 2002 UTC (19 years, 5 months ago) by tshiozak
Branch: MAIN
Changes since 1.39: +3 -5 lines
Diff to previous 1.39 (colored)

remove an obstructive ?: operator of the check added in the last commit by
itojun-san.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Aug 2 08:02:36 2002 UTC (19 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.38: +7 -4 lines
Diff to previous 1.38 (colored)

correct use of strlcpy (really need to enforce length, so use memcpy)

Revision 1.38 / (download) - annotate - [select for diffs], Fri Aug 2 07:12:51 2002 UTC (19 years, 5 months ago) by tshiozak
Branch: MAIN
Changes since 1.37: +9 -5 lines
Diff to previous 1.37 (colored)

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.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Feb 13 07:59:45 2002 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.36: +64 -29 lines
Diff to previous 1.36 (colored)

- 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.)

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 22 17:08:02 2002 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

fix a long standing bug that setlocale(LC_ALL, NULL)
returns only 5 categories while we have 6 categories.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Apr 17 20:12:32 2001 UTC (20 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

Need <limits.h> in _CTYPE_PRIVATE environments.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jan 25 01:25:07 2001 UTC (21 years ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.33: +4 -19 lines
Diff to previous 1.33 (colored)

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.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jan 22 00:29:46 2001 UTC (21 years ago) by itojun
Branch: MAIN
Changes since 1.32: +2 -3 lines
Diff to previous 1.32 (colored)

move __mb_cur_max to dedicated *.o, so that we do not pull in
locale stuff just by calling printf().

Revision 1.32 / (download) - annotate - [select for diffs], Mon Dec 25 23:30:58 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.31: +33 -2 lines
Diff to previous 1.31 (colored)

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.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 24 22:24:04 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

fix LC_ALL behavior again...

Revision 1.30 / (download) - annotate - [select for diffs], Sat Dec 23 08:22:40 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

error code check mistake in LC_CTYPE handling

Revision 1.29 / (download) - annotate - [select for diffs], Fri Dec 22 22:51:22 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.28: +14 -25 lines
Diff to previous 1.28 (colored)

cope with runeglue.c failure better

Revision 1.28 / (download) - annotate - [select for diffs], Fri Dec 22 22:28:09 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.27: +6 -5 lines
Diff to previous 1.27 (colored)

for setlocale(LC_CTYPE) failure, make sure to return NULL.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Dec 22 16:50:08 2000 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.26: +14 -12 lines
Diff to previous 1.26 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Fri Dec 22 15:25:11 2000 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored)

__setlocale(): ignore errors in locale category load for LC_ALL - doing so
is not useful. This is same change as in rev 1.17.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 21 17:16:20 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.24: +4 -3 lines
Diff to previous 1.24 (colored)

handle $LANG and $LC_xx consistently (slash is forbidden).

Revision 1.24 / (download) - annotate - [select for diffs], Thu Dec 21 11:29:47 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.23: +23 -9 lines
Diff to previous 1.23 (colored)

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.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Dec 20 11:48:58 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.22: +26 -23 lines
Diff to previous 1.22 (colored)

use strlcpy to guarantee string termination

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 20 11:44:36 2000 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.21: +22 -6 lines
Diff to previous 1.21 (colored)

on setlocale() failure, back out changes made to current_locale[],
and return NULL.  from: From: Shingo WATANABE <nabe@nabechan.org>

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 9 20:50:33 2000 UTC (21 years, 4 months ago) by veego
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

Include <unistd.h> for the issetugid prototype.
Fix a compile problem on the alpha.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 8 20:56:36 2000 UTC (21 years, 4 months ago) by tshiozak
Branch: MAIN
Changes since 1.19: +5 -8 lines
Diff to previous 1.19 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 10 10:03:43 2000 UTC (21 years, 5 months ago) by kleink
Branch: MAIN
Changes since 1.18: +4 -3 lines
Diff to previous 1.18 (colored)

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.)

Revision 1.18 / (download) - annotate - [select for diffs], Tue Aug 8 22:31:14 2000 UTC (21 years, 5 months ago) by tshiozak
Branch: MAIN
Changes since 1.17: +5 -3 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Oct 15 17:17:07 1999 UTC (22 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, netbsd-1-5-base, minoura-xpg4dl-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: netbsd-1-5, minoura-xpg4dl
Changes since 1.16: +3 -4 lines
Diff to previous 1.16 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Fri Nov 13 15:49:04 1998 UTC (23 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001
Branch point for: wrstuden-devbsize, netbsd-1-4
Changes since 1.15: +7 -3 lines
Diff to previous 1.15 (colored)

delint

Revision 1.15 / (download) - annotate - [select for diffs], Fri Oct 23 09:44:34 1998 UTC (23 years, 3 months ago) by kleink
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Declaration vs. definition consistency.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 13 14:19:21 1998 UTC (23 years, 3 months ago) by kleink
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

Need internal names for snprintf() and vsnprintf().

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 26 11:17:28 1998 UTC (23 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

constify some tables.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 13 19:54:57 1997 UTC (24 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

Fix RCSID's

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 2 09:52:50 1997 UTC (24 years, 7 months ago) by kleink
Branch: MAIN
Changes since 1.10: +45 -21 lines
Diff to previous 1.10 (colored)

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!

Revision 1.10 / (download) - annotate - [select for diffs], Tue Apr 29 16:40:19 1997 UTC (24 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.9: +6 -0 lines
Diff to previous 1.9 (colored)

RCSid police.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Apr 29 13:30:17 1997 UTC (24 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.8: +9 -11 lines
Diff to previous 1.8 (colored)

* Handle cases when 'lang' and friends have been set to "" correctly.
* Fix botch when setting the locale for no specific category.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Apr 22 12:27:34 1997 UTC (24 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.7: +6 -2 lines
Diff to previous 1.7 (colored)

KNF.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jan 23 14:02:01 1997 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.6: +10 -6 lines
Diff to previous 1.6 (colored)

- convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.

Revision 1.6 / (download) - annotate - [select for diffs], Sat May 13 06:59:57 1995 UTC (26 years, 8 months ago) by jtc
Branch: MAIN
CVS Tags: nsswitch, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1, ivory_soap2
Changes since 1.5: +1 -0 lines
Diff to previous 1.5 (colored)

#include appropriate header files to bring prototypes into scope

Revision 1.5 / (download) - annotate - [select for diffs], Fri Sep 30 02:20:50 1994 UTC (27 years, 4 months ago) by jtc
Branch: MAIN
CVS Tags: ivory_soap
Changes since 1.4: +184 -14 lines
Diff to previous 1.4 (colored)

New setlocale() that does everything except actually load new locales;
and that's coming in the next week.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Aug 26 00:45:44 1993 UTC (28 years, 5 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Declare rcsid strings so they are stored in text segment.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 6 22:56:18 1993 UTC (28 years, 5 months ago) by jtc
Branch: MAIN
Changes since 1.2: +5 -3 lines
Diff to previous 1.2 (colored)

setlocale(category, "") is supposed to set locale to the default.
The "C" locale in our case, since we have no other locale support.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:39:59 1993 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

Add RCS identifiers.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (28 years, 10 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>