summaryrefslogtreecommitdiff
path: root/lib/xstrtol.c
AgeCommit message (Collapse)Author
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert
2006-07-09Update from gnulib.Paul Eggert
2005-09-22Sync from gnulib.Paul Eggert
2005-05-14Update FSF postal mail address.Jim Meyering
2005-03-09Include xstrtol.h first, to test interface.Paul Eggert
Include intprops.h. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
2004-08-02(errno): Remove decl; we now assume C89 or better.Paul Eggert
(__xstrtol): Rewrite to avoid casts.
2003-11-13Update from gnulib.Jim Meyering
2003-10-15Sync with gnulib.Jim Meyering
2003-09-13Update from gnulib.Jim Meyering
2003-06-06Update from gnulib.Jim Meyering
2001-12-19(__xstrtol): If there is no number but thereJim Meyering
is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary. Accept 'K' as well as 'k'.
2001-09-28(strtol): Do not declare if HAVE_DECL_STRTOL.Jim Meyering
(strtoul): Do not declare if HAVE_DECL_STRTOUL. (strtoimax, strtoumax): Do not declare if already defined as a macro.
2001-09-20(strtoimax): Guard declaration withJim Meyering
`#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).
2001-08-31(strtoimax): New decl.Jim Meyering
2000-12-19(__xstrtol): Add undocumented suffixes 'g' andJim Meyering
't' for compatibility with Solaris 8 sort.
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