29 Commits

Author SHA1 Message Date
lukem
64d3d6de80 sign-compare fixes 2009-02-12 05:06:54 +00:00
junyoung
931a89e75c Rearrange headers for better portability. 2007-02-09 23:44:18 +00:00
junyoung
9641e3f094 ANSIfy. 2007-02-08 05:44:18 +00:00
junyoung
19690e9aea Nuke __P. 2007-02-08 05:07:23 +00:00
christos
dcd8e4c853 remove unused label. 2006-03-19 04:43:17 +00:00
christos
def2a8d763 revert previous error check. 2006-03-19 04:17:42 +00:00
christos
2b86a068b9 Coverity CID 769: Avoid NULL deref. 2006-03-19 02:51:30 +00:00
christos
3b66d5d2eb Coverity CID 770: Avoid NULL deref. 2006-03-19 02:48:30 +00:00
yamt
d2e4059844 constify and remove __UNCONST. 2005-12-02 12:12:29 +00:00
christos
03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
jdolecek
62b15febd3 make othercase() return int rather than char, to avoid sign extension
bug with character codes >= 128

fixes PR lib/26986 by Alexander Becher
2004-09-18 11:47:37 +00:00
agc
eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
itohy
7daefc5a5a Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems.  On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems.  However, we leave the isascii()
untouched for now, so as not to change the current behavior.
2000-07-07 08:03:36 +00:00
mycroft
605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19: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
drochner
b6581ead5f Minor size_t!=int related cleanup, only effective on the alpha.
btw: the maximum length of an RE is limited by the "int" range, also
on the alpha. "sopno" is "int", and "int"s are used as counters within
the code, so it would need some work to change this. I only don't know
how one could test it...
1998-12-13 12:21:46 +00:00
drochner
64a8986fc2 Change some function arguments to appropriate types. This makes lint
happy without casts.
1998-12-08 13:52:48 +00:00
christos
4523c05fa8 Delint:
- we don't need to use longs; convert to use int32_t.
	- remove break statements after returns.
	- cast things properly.
1998-11-14 16:43:49 +00:00
mycroft
44436bf77f constify some tables. 1998-07-26 11:11:07 +00:00
perry
c8bafd6265 remove obsolete register declarations 1998-02-03 18:38:12 +00:00
jtc
43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos
3127e6a7cf Fix RCSID's
Fix gcc warnings.
Add missing prototypes
#if 0 unused functions
1997-07-13 20:04:32 +00:00
cgd
2c84ad3a41 add unintrusive Ids 1995-02-27 13:22:58 +00:00
cgd
7c6ed81dae clean up import; kill old cruft. 1995-01-30 12:19:13 +00:00
jtc
b7744e07bd Upgrade regex routines to alpha3.4. 1994-03-22 00:39:48 +00:00
jtc
3ed83140b4 Upgrade regex routines to alpha3.3. 1994-02-23 21:17:36 +00:00
jtc
6931099e77 Update to Henry's Nov 2, 1993 alpha3.2 release. 1993-11-11 02:02:57 +00:00
jtc
b90ff8310a Henry Spencer's POSIX.2 compatibile regular expression matching routines. 1993-11-10 23:34:55 +00:00