(main): Handle the case in which seq is given no args.
authorJim Meyering <jim@meyering.net>
Mon, 26 Apr 1999 00:39:47 +0000 (00:39 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 26 Apr 1999 00:39:47 +0000 (00:39 +0000)
src/seq.c

index 27ebc9d..af2be47 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -140,6 +140,12 @@ main (int argc, char **argv)
   }
 #endif
 
+  if (argc == 1)
+    {
+      error (0, 0, _("too few arguments"));
+      usage (1);
+    }
+
   /* We have to handle negative numbers in the command line but this
      conflicts with the command line arguments.  So explicitly check first
      whether the next argument looks like a negative number.  */