From: Jim Meyering Date: Thu, 4 Sep 2003 22:21:25 +0000 (+0000) Subject: This makes seq's --width (-w) option work properly even when the X-Git-Tag: v5.0.91~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=221e569fbfeafc27b579b9e96d7d42d83ae0fc97;p=thirdparty%2Fcoreutils.git This makes seq's --width (-w) option work properly even when the endpoint requiring the largest width is negative and smaller than the other endpoint. (get_width_format): Include `-' in the set of bytes allowed in a `simple' number (no decimal point, no exponent). --- diff --git a/src/seq.c b/src/seq.c index b073c3c01a..6e640a4a7a 100644 --- a/src/seq.c +++ b/src/seq.c @@ -259,7 +259,7 @@ get_width_format () } sprintf (buffer, "%g", rint (max_val)); - if (buffer[strspn (buffer, "0123456789")] != '\0') + if (buffer[strspn (buffer, "-0123456789")] != '\0') return "%g"; width1 = strlen (buffer);