4e6b157062
'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. ----------------------------------------------------- |
||
---|---|---|
.. | ||
abort.3 | ||
abort.c | ||
abs.3 | ||
abs.c | ||
alloca.3 | ||
atexit.3 | ||
atexit.c | ||
atexit.h | ||
atof.3 | ||
atof.c | ||
atoi.3 | ||
atoi.c | ||
atol.3 | ||
atol.c | ||
bsearch.3 | ||
bsearch.c | ||
calloc.c | ||
div.3 | ||
div.c | ||
exit.3 | ||
exit.c | ||
getenv.3 | ||
getenv.c | ||
getopt.3 | ||
getopt.c | ||
getsubopt.3 | ||
getsubopt.c | ||
hcreate.3 | ||
hcreate.c | ||
heapsort.c | ||
labs.3 | ||
labs.c | ||
ldiv.3 | ||
ldiv.c | ||
Makefile.inc | ||
malloc.3 | ||
malloc.c | ||
memory.3 | ||
merge.c | ||
netbsd_strtod.c | ||
putenv.c | ||
qsort.3 | ||
qsort.c | ||
radixsort.3 | ||
radixsort.c | ||
rand.3 | ||
rand.c | ||
random.3 | ||
random.c | ||
reallocf.c | ||
realpath.3 | ||
realpath.c | ||
setenv.c | ||
strhash.c | ||
strtod.3 | ||
strtod.c | ||
strtol.3 | ||
strtol.c | ||
strtoll.c | ||
strtoq.c | ||
strtoul.3 | ||
strtoul.c | ||
strtoull.c | ||
strtouq.c | ||
system.3 | ||
system.c | ||
tdelete.c | ||
tfind.c | ||
tsearch.3 | ||
tsearch.c | ||
twalk.c |