Commit Graph

103 Commits

Author SHA1 Message Date
tshiozak fcc188c19e 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.
2000-09-08 20:56:36 +00:00
kleink bc3eaa0a03 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.)
2000-08-10 10:03:43 +00:00
kleink e12dc92808 RCS Id police: add NetBSD tag, restore unexpanded Id tag from Citrus. 2000-08-10 09:55:32 +00:00
tshiozak 51a53de0d5 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.
2000-08-08 22:31:13 +00:00
matt 6465109449 include <string.h> for mem* 2000-07-01 00:05:27 +00:00
kleink 48e66c2b14 XSH5/C99: in the C/POSIX locale, change the day of month format used in d_t_fmt
(locale's appropriate date and time representation) from %d (single digits
are preceded by 0) to %e (single digits are preceded by a blank).
1999-11-10 09:15:11 +00:00
jdolecek 9fc25cf0bc 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
1999-10-15 17:17:07 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
kleink 65f6a76c52 Xref nl_langinfo(3). 1999-09-05 09:19:35 +00:00
kleink a7e5956b53 Don't require inclusion of <nl_types.h>. 1999-09-05 09:18:11 +00:00
garbled 38c96853cf Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Wheee!
1999-03-22 19:44:33 +00:00
drochner a34eb7c1b7 use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
1999-02-24 15:05:20 +00:00
christos 2c89343c25 delint 1998-11-13 15:46:52 +00:00
kleink 044e791152 Declaration vs. definition consistency. 1998-10-23 09:44:34 +00:00
kleink ee1afe8b7c Need internal names for snprintf() and vsnprintf(). 1998-10-13 14:19:21 +00:00
mycroft 44436bf77f constify some tables. 1998-07-26 11:11:07 +00:00
fair 1628920950 Fix man to mdoc conversion mistakes, mostly of the form ^\.[A-Z][A-Z] 1998-04-28 07:19:28 +00:00
perry 312aca536f add LIBRARY section to man page 1998-02-05 18:45:17 +00:00
mikel 665f5a78af fix typo; something called 'yesexpr' shouldn't have a 'n' in it 1997-10-18 05:08:32 +00:00
kleink 2d176dda6e Link localeconv(3) to setlocale(3). 1997-07-15 09:22:31 +00:00
kleink c213a3af8b Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
1997-07-14 23:19:39 +00:00
christos 450aa90e6e Fix RCSID's 1997-07-13 19:54:55 +00:00
kleink 691ce5a662 Sync with reality (some facilities are not available yet and will not be
implemented as described in this file);  .Bx police.
1997-07-12 19:13:12 +00:00
perry 4b51b76bec add setlocale.3 man page 1997-07-12 17:52:31 +00:00
perry 371c2f6c48 imported from 4.4-Lite2 1997-07-12 17:50:04 +00:00
kleink dbda158f1f 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!
1997-06-02 09:52:36 +00:00
kleink 4fd0a6d595 RCSid police. 1997-04-29 16:40:13 +00:00
kleink b678625d16 * Handle cases when 'lang' and friends have been set to "" correctly.
* Fix botch when setting the locale for no specific category.
1997-04-29 13:30:17 +00:00
mrg 071eac5167 KNF. 1997-04-22 12:27:34 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
jtc 6117b03a03 Fix embarassing typo 1996-02-14 19:21:54 +00:00
jtc 3ba2c075cf #include appropriate header files to bring prototypes into scope 1995-05-13 06:58:18 +00:00
jtc 528957a005 Winning Strategies has placed this code into the Public Domain 1995-04-28 23:19:22 +00:00
cgd ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
jtc 797d32eb10 New setlocale() that does everything except actually load new locales;
and that's coming in the next week.
1994-09-30 02:20:50 +00:00
jtc 9be3c7f228 Minor tweaks to prepare for checkin of real i18n code. 1994-09-29 04:57:04 +00:00
jtc bd275e8fe1 Added a nl_langinfo(3) man page. 1994-07-16 05:12:26 +00:00
jtc bafe42ae48 Add nl_langinfo(), a SysV-X/Open function that provides access to some
of the locale info.

Some of the POSIX.2 utilities require this information, and I thought it
was better to use an existing interface rather than rolling my own.
1994-06-21 04:14:00 +00:00
deraadt 1dc628861d fix typo 1994-05-26 00:31:53 +00:00
mycroft d1584360d9 Clean up deleted files. 1994-05-25 01:49:34 +00:00
jtc 3518e0a880 New localeconv() implementation that constructs it's return value from
the current numeric and current monetary locale data.
1994-05-25 01:49:32 +00:00
jtc 962cf82dd8 Compile the default locale data for LC_NUMERIC, LC_MONETARY, and LC_TIME. 1994-05-25 01:17:14 +00:00
jtc faab9fa25d Fixed major bogon: What happened to Wednesday! 1994-05-25 01:11:45 +00:00
jtc 438e938546 Default Locale Data 1994-05-24 23:40:06 +00:00
cgd a686a9cf52 make empty static 1993-12-22 09:38:20 +00:00
cgd 0ada107897 update for .S and MACHINE_ARCH 1993-12-04 02:33:35 +00:00
cgd 0b9f50897e make an arch directory in libc, and move all machine dirs into it 1993-10-07 00:17:24 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
jtc a4bacdfbad setlocale(category, "") is supposed to set locale to the default.
The "C" locale in our case, since we have no other locale support.
1993-08-06 22:56:18 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00