opnsense-src/lib/libc/stdlib
Andrey A. Chernov 4e6b157062 Locale *is* used in strto*l*(), at least for isspace(), so remove
'locale not used' statement from comments and BUGS section of manpage.

strtol(): fix non-portable 'cutoff' calculation using the same method as
in strtoll().

Cleanup 'cutoff' calculation, remove unneded casts. Misc. cleanup to
make all functions looks the same.

Implement EINVAL reaction per POSIX, document it in manpage, corresponding
POSIX example quotes here:

------------------------------------------------
If the subject sequence is empty or does not have the expected form, no
conversion is performed; the value of str is stored in the object pointed
to by endptr, provided that endptr is not a null pointer.

If no conversion could be performed, 0 shall be returned and errno may be
set to [EINVAL].

[EINVAL] The value of base is not supported.

Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are
returned on error and are also valid returns on success, an application
wishing to check for error situations should set errno to 0, then call
strtol( ) or strtoll ( ), then check errno.
-----------------------------------------------------
2001-09-04 16:39:11 +00:00
..
abort.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
abort.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
abs.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
abs.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
alloca.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
atexit.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atexit.c Merge Lite2 changes 1997-03-11 11:39:58 +00:00
atexit.h Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
atof.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atof.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
atoi.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atoi.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
atol.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atol.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
bsearch.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
bsearch.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
calloc.c malloc_sysv used before initialized, reported in PR4002 by 1997-07-01 18:39:38 +00:00
div.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
div.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
exit.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
exit.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getenv.3 Use ``.Rv -std'' wherever possible. 2001-08-31 09:57:38 +00:00
getenv.c Doubled the performance of getenv()/__findenv() by rewriting it to not 1995-10-17 21:37:41 +00:00
getopt.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
getopt.c If the string specifying the allowed options starts with a leading `:', 2001-08-16 03:27:03 +00:00
getsubopt.3 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
getsubopt.c General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
hcreate.3 mdoc(7) police: eliminate -ww warnings. 2001-07-09 15:54:36 +00:00
hcreate.c Add new, from scratch implementation of hsearch() et al that actually works. 2001-05-15 07:08:20 +00:00
heapsort.c Don't include <sys/types.h> when it isn't used. 1996-04-19 18:40:25 +00:00
labs.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
labs.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
ldiv.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
ldiv.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
Makefile.inc Only pull in the MD files if they exist. This allows for progressive 2001-07-31 16:34:52 +00:00
malloc.3 Markup nits: use diagnostic type lists for error and warning messages. 2001-08-10 11:41:55 +00:00
malloc.c Fixed style bugs (dot `.' at the end of error and warning messages). 2001-08-10 11:46:37 +00:00
memory.3 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
merge.c Drop unused labels. 1998-11-04 09:22:07 +00:00
netbsd_strtod.c Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
putenv.c BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
qsort.3 Use ``.Rv -std'' wherever possible. 2001-08-31 09:57:38 +00:00
qsort.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
radixsort.3 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases. 2001-08-09 13:32:13 +00:00
radixsort.c Merge Lite2 changes 1997-03-11 11:39:58 +00:00
rand.3 mdoc(7) police: expand plain text xrefs. 2001-08-08 11:48:28 +00:00
rand.c urandom(4) -> random(4) in comments. 2001-06-07 02:32:18 +00:00
random.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
random.c urandom(4) -> random(4) in comments. 2001-06-07 02:32:18 +00:00
reallocf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
realpath.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
realpath.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setenv.c Only realloc() environ if we're sure that we know where it came from. 2000-09-20 03:05:37 +00:00
strhash.c Tidy up $Log$ debris. 1999-09-05 17:42:45 +00:00
strtod.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
strtod.c Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
strtol.3 Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtol.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtoll.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtoq.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtoul.3 Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtoul.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtoull.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
strtouq.c Locale *is* used in strto*l*(), at least for isspace(), so remove 2001-09-04 16:39:11 +00:00
system.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
system.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tdelete.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
tfind.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
tsearch.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
tsearch.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
twalk.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00