Commit Graph

71 Commits

Author SHA1 Message Date
Andrey A. Chernov
21b4da0751 Restore PATH_LOCALE functionality using issetugid() call now 1997-04-07 08:54:38 +00:00
Bruce Evans
09589ca82e FIxed arg types (mostly missing consts) in synopsis. 1997-03-19 00:52:58 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Andrey A. Chernov
e799281533 Move _PathLocale to data-only file, so setrunelocale() not pick up
whole setlocale.c module now.

Should go into 2.2
1997-02-09 09:29:27 +00:00
Joerg Wunsch
cc551f25f4 Do Andrey's homework :) before merging this into 2.2:
. add idempotency #ifdef
. avoid sloppy common-style external declaration.
1997-02-08 14:04:30 +00:00
Andrey A. Chernov
939aed4fb5 Comment out PATH_LOCALE reference
Should go into 2.2
1997-02-06 09:29:02 +00:00
Andrey A. Chernov
63407d3487 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
Paul Traina
b6b0d266cd Fix yet another setlocale() bug.
Submitted by:	Wojtek Pilorz <wpilorz@celebris.bdk.lublin.pl>
1997-02-06 08:31:42 +00:00
Andrey A. Chernov
d81a091605 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
David Greenman
5979500afc 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
Andrey A. Chernov
2b3e51b901 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
Mike Pritchard
6a145130de Don't use hardcoded *roff font change requests. Do it
via mdoc macros instead.
1997-01-31 01:00:12 +00:00
Mike Pritchard
c492ccdb9a Very minor mdoc cleanup. 1997-01-31 00:25:12 +00:00
Wolfram Schneider
75141cc987 Sort cross references. 1997-01-20 23:23:22 +00:00
Jordan K. Hubbard
1130b656e5 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
Mike Pritchard
8c9c6676cf Add a couple of additional xrefs. 1997-01-11 19:57:27 +00:00
Andrey A. Chernov
af155bdff3 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 Wunsch
42ceaa809f Back out rev 1.5: the overflow condition is already handled elsewhere. 1996-12-22 15:48:06 +00:00
Joerg Wunsch
120e62ec50 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
Andrey A. Chernov
e2900279d2 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
Andrey A. Chernov
40c0625e97 Add Id
Optimize/improve recently added locale restoration on failure
1996-11-26 08:00:17 +00:00
Andrey A. Chernov
c8f931a80e 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
Andrey A. Chernov
38aa46cdf0 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
Andrey A. Chernov
967a5cb181 Simplify debug output
Simplify collate_range_cmp for ASCII-compatible collate we have now
1996-10-23 15:35:46 +00:00
Andrey A. Chernov
1642f84deb 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
Andrey A. Chernov
cb07d7668c Add comment explaining what function does
Cover strcoll return 0 case too
1996-09-17 19:27:06 +00:00
Bruce Evans
eaa86f9d7f 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
Mike Pritchard
7bdf80e571 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
Andrey A. Chernov
9d6a993656 Add Id
Move comment up to place
1996-08-20 21:16:53 +00:00
Andrey A. Chernov
a540d32bde Add isblank attr to non-break space
Add comment describing how upper half of table made
1996-08-20 14:43:58 +00:00
Andrey A. Chernov
59460dc4ff Remove isgraph attr from non-break space 1996-08-20 14:27:26 +00:00
Andrey A. Chernov
5feb86a405 Add Id 1996-08-14 19:47:02 +00:00
Andrey A. Chernov
83d8106e1a simplify/speedup/extend 1996-08-13 13:38:35 +00:00
Andrey A. Chernov
b339a4060f Remove old version hooks 1996-08-12 19:18:47 +00:00
Andrey A. Chernov
883a3266d1 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
Andrey A. Chernov
2eecfbac3a Add internal function __collcmp once instead of adding it statically
to many places in the libc
1996-08-12 03:40:37 +00:00
Mike Pritchard
2ce08cb20b 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
Bruce Evans
cdd84b0211 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
Bruce Evans
8a4599117b 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
Andrey A. Chernov
c0ea8ed12f 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
Mike Pritchard
064f007493 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
Andrey A. Chernov
7871e36865 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:43:24 +00:00
Andrey A. Chernov
bf93970596 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:35:36 +00:00
Mike Pritchard
78b0b234eb 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
Mike Pritchard
c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Gary Palmer
b3d64ab72f 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
Gary Palmer
d28b4295fd 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
Andrey A. Chernov
f9cbdf410e Move more stuff out to XPG4
Handle negative chars inside runetype/tolower/toupper
1995-11-03 08:59:02 +00:00
Andrey A. Chernov
34d08e870e Treat empty encoding as "C" encoding 1995-10-23 20:20:11 +00:00