summaryrefslogtreecommitdiff
path: root/lib/xstrtol.c
AgeCommit message (Collapse)Author
2000-01-07tweak copyright lineJim Meyering
1999-07-04[!defined strtoumax]: Declare strtoumax.Jim Meyering
1999-07-04(__strtol): Remove decl; it doesn't work if __strtolJim Meyering
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.
1999-04-18(__strtol, __strtol_t, __xstrtol):Jim Meyering
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.
1998-09-26(__xstrtol) [STRING_TO_UNSIGNED]: ReturnJim Meyering
LONGINT_INVALID for strings that begin with `-'.
1998-07-29Remove duplicate include of <stdio.h>.Jim Meyering
1998-07-22Include <stdio.h> if NDEBUG is not defined; needed on SunOS 4.Jim Meyering
From Paul Eggert.
1998-07-04Include stdio.h. Required on some systems when using assert.Jim Meyering
From Kaveh Ghazi.
1998-07-01Don't define NDEBUG, now that it's done via configure's --disable-assert option.Jim Meyering
1998-06-29protoizeJim Meyering
1998-06-29 * lib/xstrtol.c (bkm_scale): Don't assume that you can convertJim Meyering
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.
1998-03-31Merge with the version from textutils.Jim Meyering
1998-02-24(TYPE_SIGNED): Define.Jim Meyering
(TYPE_MAXIMUM): Define. (ULONG_MAX): Use TYPE_MAXIMUM. (LONG_MAX): Use TYPE_MAXIMUM.
1997-01-25(__xstrtol): Change interpretation ofJim Meyering
VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former when any suffix is valid, the later when no suffix is allowed.
1996-10-29.Jim Meyering
1996-10-17.Jim Meyering
1996-10-17libitizeJim Meyering
1996-10-13(__xstrtol): Return an error for invalid suffix.Jim Meyering
Before, e.g., `split -b 1M' would be silently accepted and treated like `split -b 1'. Reported by Franc,ois.
1996-05-22Add copyright header.Jim Meyering
1995-10-09Indent cpp directives to reflect nesting.Jim Meyering
1995-05-22(__strtol): Remove prototype altogether.Jim Meyering
Move inclusion of xstrtol.h back so that it follows system headers.
1995-05-21merge with 1.11.1bJim Meyering
1995-01-27.Jim Meyering
1994-12-22Rearrange to accept a user-specified set of suffix chars (must beJim Meyering
a subset of master list), each with a hard-coded value.
1994-12-20.Jim Meyering