Age | Commit message (Collapse) | Author |
|
Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
|
|
(__xstrtol): Rewrite to avoid casts.
|
|
|
|
|
|
|
|
|
|
is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
Accept 'K' as well as 'k'.
|
|
(strtoul): Do not declare if HAVE_DECL_STRTOUL.
(strtoimax, strtoumax): Do not declare if already defined as a macro.
|
|
`#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
have their own, conflicting declaration of strtoimax in sys/inttypes.h.
(strtoumax): Likewise, for completeness (it wasn't necessary).
|
|
|
|
't' for compatibility with Solaris 8 sort.
|
|
|
|
|
|
expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
(strtol, strtoul): New decls (for pre-ANSI hosts), to replace
the above decl.
|
|
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.
|
|
LONGINT_INVALID for strings that begin with `-'.
|
|
|
|
From Paul Eggert.
|
|
From Kaveh Ghazi.
|
|
|
|
|
|
unsigned long to double without losing information.
(bkm_scale_by_power): New function.
* lib/xstrtol.c (__xstrtol), src/dd.c (parse_integer):
Add support for SI-like suffixes like "GB" and "TD".
* src/dd.c (usage): Describe it.
|
|
|
|
(TYPE_MAXIMUM): Define.
(ULONG_MAX): Use TYPE_MAXIMUM.
(LONG_MAX): Use TYPE_MAXIMUM.
|
|
VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
when any suffix is valid, the later when no suffix is allowed.
|
|
|
|
|
|
|
|
Before, e.g., `split -b 1M' would be silently accepted and treated
like `split -b 1'. Reported by Franc,ois.
|
|
|
|
|
|
Move inclusion of xstrtol.h back so that it follows system headers.
|
|
|
|
|
|
a subset of master list), each with a hard-coded value.
|
|
|