lib/xstrtol.c


Log

Author Commit Date CI Message
Jim Meyering 0f56340c 2001-09-28T19:34:31 (strtol): Do not declare if HAVE_DECL_STRTOL. (strtoul): Do not declare if HAVE_DECL_STRTOUL. (strtoimax, strtoumax): Do not declare if already defined as a macro.
Jim Meyering 94e77b06 2001-09-20T14:46:55 (strtoimax): Guard declaration with `#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).
Jim Meyering 2fb2cf55 2001-08-31T08:17:45 (strtoimax): New decl.
Jim Meyering 74ca0b1c 2000-12-19T08:35:20 (__xstrtol): Add undocumented suffixes 'g' and 't' for compatibility with Solaris 8 sort.
Jim Meyering d0a51a71 2000-01-07T07:03:01 tweak copyright line
Jim Meyering f60f9281 1999-07-04T10:40:04 [!defined strtoumax]: Declare strtoumax.
Jim Meyering e911cfd7 1999-07-04T08:34:31 (__strtol): Remove decl; it doesn't work if __strtol 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.
Jim Meyering c52f4d0c 1999-04-18T23:15:34 (__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.
Jim Meyering 3bf75404 1998-09-26T19:11:23 (__xstrtol) [STRING_TO_UNSIGNED]: Return LONGINT_INVALID for strings that begin with `-'.
Jim Meyering 0ba789ce 1998-07-29T04:00:36 Remove duplicate include of <stdio.h>.
Jim Meyering 6ce9913b 1998-07-22T16:57:15 Include <stdio.h> if NDEBUG is not defined; needed on SunOS 4. From Paul Eggert.
Jim Meyering f4f0b655 1998-07-04T17:15:08 Include stdio.h. Required on some systems when using assert. From Kaveh Ghazi.
Jim Meyering 6fdecf95 1998-07-01T12:44:22 Don't define NDEBUG, now that it's done via configure's --disable-assert option.
Jim Meyering 42b5becc 1998-06-29T20:29:28 protoize
Jim Meyering 70f6f1ad 1998-06-29T15:24:43 * lib/xstrtol.c (bkm_scale): Don't assume that you can convert 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.
Jim Meyering fa39892b 1998-03-31T13:14:22 Merge with the version from textutils.
Jim Meyering 5472ac42 1998-02-24T23:33:41 (TYPE_SIGNED): Define. (TYPE_MAXIMUM): Define. (ULONG_MAX): Use TYPE_MAXIMUM. (LONG_MAX): Use TYPE_MAXIMUM.
Jim Meyering 555837e8 1997-01-25T06:13:46 (__xstrtol): Change interpretation of VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former when any suffix is valid, the later when no suffix is allowed.
Jim Meyering f820ac46 1996-10-29T13:56:39 .
Jim Meyering 1b727760 1996-10-17T02:46:33 .
Jim Meyering f318d7fc 1996-10-17T02:45:32 libitize
Jim Meyering 06560e9c 1996-10-13T17:58:50 (__xstrtol): Return an error for invalid suffix. Before, e.g., `split -b 1M' would be silently accepted and treated like `split -b 1'. Reported by Franc,ois.
Jim Meyering 33128a49 1996-05-22T12:37:29 Add copyright header.
Jim Meyering 9228fe6a 1995-10-09T03:48:08 Indent cpp directives to reflect nesting.
Jim Meyering e5bf58c3 1995-05-22T04:43:36 (__strtol): Remove prototype altogether. Move inclusion of xstrtol.h back so that it follows system headers.
Jim Meyering 9b8ea954 1995-05-21T11:44:25 merge with 1.11.1b
Jim Meyering fd6a9293 1995-01-27T05:22:23 .
Jim Meyering 7237f669 1994-12-22T05:10:32 Rearrange to accept a user-specified set of suffix chars (must be a subset of master list), each with a hard-coded value.
Jim Meyering 3af47ca3 1994-12-20T04:17:23 .