1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00
freebsd/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
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
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
atexit.h
atof.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atof.c
atoi.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atoi.c
atol.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
atol.c
bsearch.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
bsearch.c
calloc.c
div.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
div.c
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
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
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
labs.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
labs.c
ldiv.3 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
ldiv.c
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
netbsd_strtod.c Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
putenv.c
qsort.3 Use ``.Rv -std'' wherever possible. 2001-08-31 09:57:38 +00:00
qsort.c
radixsort.3 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases. 2001-08-09 13:32:13 +00:00
radixsort.c
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
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
strhash.c
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
tfind.c
tsearch.3 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
tsearch.c
twalk.c