From 73eca9182dfd7c2d52775ca24da6a7a0d55b3cee Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 5 Sep 2015 05:46:35 -0500 Subject: Add seq -f tests, tweak help text, and catch one more error case. --- toys/lsb/seq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/lsb') diff --git a/toys/lsb/seq.c b/toys/lsb/seq.c index 322940b3..f1ca0d00 100644 --- a/toys/lsb/seq.c +++ b/toys/lsb/seq.c @@ -17,7 +17,7 @@ config SEQ to 1. Two arguments are used as first and last. Arguments can be negative or floating point. - -f Use fmt_str as a floating point format string + -f Use fmt_str as a printf-style floating point format string -s Use sep_str as separator, default is a newline character */ @@ -47,7 +47,7 @@ static void insanitize(char *f) } // The @ is a byte offset, not utf8 chars. Waiting for somebody to complain... - if (*s) error_exit("bad -f '%s'@%d", f, s-f+1); + if (*s || !found) error_exit("bad -f '%s'@%d", f, s-f+1); } void seq_main(void) -- cgit v1.2.3