mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-13 10:52:09 +02:00
Also, prepare for allowing some arguments to overflow without that being an error. * gl/lib/xdectoint.c: Do not include stddef.h, since we no longer use ‘unreachable’. (xnumtoimax, xnumtoumax, __xnumtoint): New arg FLAGS. All callers changed. Stop using __xdectoint_signed. All definers removed. * gl/lib/xdectoint.h (XTOINT_MIN_QUIET, XTOINT_MAX_QUIET) (XTOINT_MIN_RANGE, XTOINT_MAX_RANGE): New flag constants. * src/fmt.c (main): * src/fold.c (main): * src/nl.c (main): * src/pr.c (getoptnum): * src/split.c (main): Use XTOINT_MIN_RANGE and XTOINT_MAX_RANGE if appropriate. * src/pr.c (getoptnum): Return int rather than returning void and storing through int *. * src/stty.c (apply_settings): Use ckd_add to check for overflow instead of doing it by hand. (integer_arg): Accept and return uintmax_t, not unsigned long.
6 lines
146 B
C
6 lines
146 B
C
#define __xdectoint xdectoumax
|
|
#define __xnumtoint xnumtoumax
|
|
#define __xdectoint_t uintmax_t
|
|
#define __xstrtol xstrtoumax
|
|
#include "xdectoint.c"
|