Commit Graph

9 Commits

Author SHA1 Message Date
enami 6e75e4cb47 - Don't update the size of allocated storage until realloc successes.
- KNF left over.
2000-01-25 16:24:40 +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 46a687b139 * sl_init(); if malloc() fails return NULL instead of calling err(1,...)
* sl_add(); if realloc() fails return -1 instead of calling err(1,...).
  otherwise, return 0.

NOTE: this change resulted in sl_add() changing from returning void to int.
this shouldn't be a problem because a) it returns 0 if ok (aka `void', b)
all invokers of sl_add() in the tree have been changed (mainly code i've
written).
1999-11-28 03:44:09 +00:00
lukem 9f731168f6 convert to TNFi copyright (requested by christos) 1999-11-27 06:19:32 +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
enami 9512162b01 Delete `: %m' from a format string passed to err(). 1997-09-29 06:52:40 +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 47d1af8a89 Fix RCSID's
Use namespace.h
1997-07-13 19:31:49 +00:00
lukem f694f3b120 Add stringlist implementation
Convert getnetgrent from private stringlist to public version
1997-01-17 07:26:18 +00:00