(__strtol, __strtol_t, __xstrtol):
authorJim Meyering <jim@meyering.net>
Sun, 18 Apr 1999 23:15:34 +0000 (23:15 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 18 Apr 1999 23:15:34 +0000 (23:15 +0000)
commitc52f4d0c41899100db967176f1c983c01fe9786a
tree3b7d1f0add147593b440ecf0fea4f12a7f65fc77
parenta49ce97378329d929adc9faaaf31ebece5d046bd
(__strtol, __strtol_t, __xstrtol):
New macros to specify the
underlying function, its returned type, and our function.  Default to
values suitable for xstrtol.

Include <ctype.h>, since we use its macros.

(ULONG_MAX, LONG_MAX, ISBLANK): Remove: no longer needed.
(ISSPACE): New macro.

(bkm_scale, bkm_scale_by_power, __xstrtol, main): __unsigned long int
-> __strtol_t.

(__xstrtol): Depend on whether __strtol_t is an unsigned type, not on
whether STRING_TO_UNSIGNED is defined.  Skip isspace chars, not
isblank chars, to match strtol.  When returning
LONGINT_INVALID_SUFFIX_CHAR, store the value that we computed into
*val.
lib/xstrtol.c