Commit Graph

68 Commits

Author SHA1 Message Date
ache
a6b4cd1cf1 Comment out PATH_LOCALE reference
Should go into 2.2
1997-02-06 09:29:02 +00:00
ache
1fbffa765c Use symbolic constants instead of hardcoded digits
Add range check for setrunelocale since it can be called
directly.
Remove _startup_setlocale compatibility function

Should go into 2.2
1997-02-06 09:11:06 +00:00
pst
b7c9a718d5 Fix yet another setlocale() bug.
Submitted by:	Wojtek Pilorz <wpilorz@celebris.bdk.lublin.pl>
1997-02-06 08:31:42 +00:00
ache
b7803f6c96 Update the comment why range checking not needed
Fix setrunelocale fail if called directly without prior setlocale
call

Should go in 2.2
1997-02-05 19:17:10 +00:00
dg
70bc38a8e7 Killed getenv of PATH_LOCALE per Andrey's suggestion. It was intended
for debugging locale stuff, but was rarely if ever used...and of course
just bit a big chunk out of our collective hind-ends.
1997-02-05 09:53:25 +00:00
ache
c71c1ef7da Add yet one comment saying that range checking already done
to stop people "fixing" it by snprintf
1997-02-03 08:29:32 +00:00
mpp
6732dc3675 Don't use hardcoded *roff font change requests. Do it
via mdoc macros instead.
1997-01-31 01:00:12 +00:00
mpp
1511fd26d0 Very minor mdoc cleanup. 1997-01-31 00:25:12 +00:00
wosch
6d0dbd7455 Sort cross references. 1997-01-20 23:23:22 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
mpp
51ed145a4f Add a couple of additional xrefs. 1997-01-11 19:57:27 +00:00
ache
1eac53090b Add comment that range checking is already done at upper level
Kill snprintf left in collate.c from previous backout

Should go in 2.2
1996-12-28 05:04:24 +00:00
joerg
0f3bc141ec Back out rev 1.5: the overflow condition is already handled elsewhere. 1996-12-22 15:48:06 +00:00
joerg
971f474616 Fix yet another buffer overflow. :-(
Vulnerable: all programs that use setlocale(LC_COLLATE),
setlocale(LC_CTYPE), or setlocale(LC_ALL).  The only setuid/setgid
binary i've found for this is w(1).

Should go into 2.2.
1996-12-16 17:32:58 +00:00
ache
e27f332f23 Add rcsid[]
Since locale reading code not resistent against stack overflowing or
similar intruder attacks, don't allow PATH_LOCALE env variable action
for s-bit programs (non-standard locale path setting)
1996-11-27 22:30:44 +00:00
ache
21606c3294 Add Id
Optimize/improve recently added locale restoration on failure
1996-11-26 08:00:17 +00:00
ache
de0f02e3b7 PATH_LOCALE: use this non-standard env variable first time only, i.e.
strdup() it to prevent unsetenv() or setenv() effects. Check its length to
not allow user to overflow internal locale buffer. Move PATH_LOCALE
handling code into one place.

POSIX: make better stub for LC_MONETARY & LC_NUMERIC, now it check
locale directory existance instead of refusing all non-C non-POSIX
locales. POSIX treats empty locale env variable as unset variable
while our old code treats it as "C" locale, fix it. Implement previous locale
restoring, if locale setting fails. Old code assumes success if some
of LC_ALL subset is successed even other fails, POSIX treats it as
failure with previous locale restoring, fix it.

Remove unneccessary length checking in currentlocale()
1996-11-26 02:49:53 +00:00
ache
411def8ac0 Rename collate_range_cmp to __collate_range_cmp for internal usage
inside libc. Add collate_range_cmp as alias to __collate_range_cmp
for temp. backward compatibility.
collate_range_cmp will be replaced with direct code for each
external program for compatibility with the rest of world
1996-10-31 04:25:14 +00:00
ache
30ce15b191 Simplify debug output
Simplify collate_range_cmp for ASCII-compatible collate we have now
1996-10-23 15:35:46 +00:00
ache
5b6e3c50cb Save half of space in LC_COLLATE and remove unneded code.
This change is not compatible with previous variant, however proper
error code returned in both cases.
Colldef changes will follows.
1996-10-15 21:53:23 +00:00
ache
cf052c0bed Add comment explaining what function does
Cover strcoll return 0 case too
1996-09-17 19:27:06 +00:00
bde
6ed5ccfb8f Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6.  Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
1996-09-14 03:00:32 +00:00
mpp
5e0b8a5234 Correctly use .Fn instead of .Nm to reference function names
in a bunch of man pages.

Use the correct .Bx  (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
1996-08-22 23:31:07 +00:00
ache
767f6dad9a Add Id
Move comment up to place
1996-08-20 21:16:53 +00:00
ache
cab84bd971 Add isblank attr to non-break space
Add comment describing how upper half of table made
1996-08-20 14:43:58 +00:00
ache
153cc35e34 Remove isgraph attr from non-break space 1996-08-20 14:27:26 +00:00
ache
f29675f59d Add Id 1996-08-14 19:47:02 +00:00
ache
01dde070a3 simplify/speedup/extend 1996-08-13 13:38:35 +00:00
ache
bc4e65eedc Remove old version hooks 1996-08-12 19:18:47 +00:00
ache
956383bed8 There is so many places where range comparation (using collate)
needed (much more than I think initially), so I forced to add
new user-visible non-standard function to libc.
1996-08-12 18:38:49 +00:00
ache
378240cb4b Add internal function __collcmp once instead of adding it statically
to many places in the libc
1996-08-12 03:40:37 +00:00
mpp
87f551bb52 Remove some hardcode *roff font change escape codes from
this man page to prevent half of it from coming out with underlines.

This man page needs to be gone over to fully convert it to mdoc format.

This closes PR#1440.

Submitted by:	Jens Schweikhardt <schweikhardt@rus.uni-stuttgart.de>
1996-08-06 22:42:23 +00:00
bde
7dbb860b71 Fixed longstanding namespace convolution involving rune_t vs wchar_t.
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to
be included before <stddef.h> or <stdlib.h> to get rune_t declared.
Now rune_t is declared perfectly bogusly in all cases when <ctype.h>
is included.

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:40:10 +00:00
bde
b0b36003dc Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
ache
6d0f739b3c Fix error in wcstombs: byte count not counted
Remove unneded casts in sgetrune/sputrune
Submitted by: wcstombs fix by Mihoko Tanaka <m_tonaka@pa.yokogawa.co.jp>
1996-04-18 07:01:46 +00:00
mpp
822fdcab93 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
ache
5ae177135b Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:43:24 +00:00
ache
5719077b9b Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:35:36 +00:00
mpp
3aeb7f1d49 Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
mpp
6f1e1c35e7 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
peter
ab124e78b0 recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
gpalmer
0c3911acb2 Oops. I seem to have over-corrected with my last commit. It should be
right this time
1995-12-29 08:23:59 +00:00
gpalmer
a14b8b0651 Correct what seem to me to be some mistakes in the references and
standards sections. Also add a missing `,' to each file.
1995-12-28 21:06:07 +00:00
ache
94bfe4fc2d Move more stuff out to XPG4
Handle negative chars inside runetype/tolower/toupper
1995-11-03 08:59:02 +00:00
ache
e9ce2479b9 Treat empty encoding as "C" encoding 1995-10-23 20:20:11 +00:00
ache
83a985d5f2 Optimize PathLocale handling.
Handle C/POSIX/"" properly.
Don't reset collate to C when it is unnecessary
1995-10-23 20:08:24 +00:00
ache
973d5505ac Use fake (empty) startup_setlocale for XPG4 1995-10-23 02:25:53 +00:00
ache
04162007d2 Reduce static binaries bloat by splitting out normally unused
setinvalidrune()
1995-10-23 02:13:05 +00:00
ache
6ee0412bd8 Migrate from XPG4 to XPG3 (libxpg4 will be added soon)
Remove big part of my startup_setlocale hack.
Add missing manpage links.
1995-10-23 01:34:17 +00:00
phk
8c71abfa80 As above.
Oh I also put in a couple of compile-time warnings for the crypt stuff.
1995-10-22 14:38:48 +00:00