From: Paul Eggert Date: Sun, 11 Aug 2024 01:51:50 +0000 (-0700) Subject: nl: support -l counts > 2**64 X-Git-Tag: v9.6~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67eff6359de2b25330dc0a693066430add7edcae;p=thirdparty%2Fcoreutils.git nl: support -l counts > 2**64 * src/nl.c (main): Allow -l arg to exceed 2**64. --- diff --git a/NEWS b/NEWS index 725064c9d4..af9b88961f 100644 --- a/NEWS +++ b/NEWS @@ -34,8 +34,8 @@ GNU coreutils NEWS -*- outline -*- ** Improvements - 'head -c NUM' and 'head -n NUM' no longer fail merely because NUM - stands for 2**64 or more. + 'head -c NUM', 'head -n NUM' and 'nl -l NUM' no longer fail merely + because NUM stands for 2**64 or more. sort operates more efficiently when used on pseudo files with an apparent size of 0, like those in /proc. diff --git a/src/nl.c b/src/nl.c index b30579b4b3..bf72373a89 100644 --- a/src/nl.c +++ b/src/nl.c @@ -533,7 +533,7 @@ main (int argc, char **argv) case 'l': blank_join = xnumtoimax (optarg, 10, 1, INTMAX_MAX, "", _("invalid line number of blank lines"), - 0, XTOINT_MIN_RANGE); + 0, XTOINT_MIN_RANGE | XTOINT_MAX_QUIET); break; case 's': separator_str = optarg;