diff options
author | Jim Meyering <jim@meyering.net> | 1994-12-31 18:32:47 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-12-31 18:32:47 +0000 |
commit | 81f671740ec55999a9726526d05cce132872069a (patch) | |
tree | c1343a88a8762df786aef8cb2da399a54f277e7b /src/seq.c | |
parent | d6b36e21cb3537d19f8f8eede726c30198ae1d9d (diff) | |
download | coreutils-81f671740ec55999a9726526d05cce132872069a.tar.xz |
Include "system.h".
Don't explicitly include headers that it includes.
Use error, not `fprintf (stderr'.
Diffstat (limited to 'src/seq.c')
-rw-r--r-- | src/seq.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -17,13 +17,12 @@ /* Ulrich Drepper */ -#include <ctype.h> #include <getopt.h> #include <math.h> #include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "system.h" +#include "error.h" #include "version.h" static double scan_double_arg (); @@ -161,6 +160,7 @@ main (argc, argv) if (optind >= argc) { + /* FIXME Give reason for failure. */ usage (2); /* NOTREACHED */ } @@ -194,7 +194,7 @@ main (argc, argv) { if (!check_format (format_str)) { - fprintf (stderr, "illegal format string\n"); + error (0, 0, "invalid format string: `%s'", format_str); usage (4); } } @@ -225,7 +225,7 @@ scan_double_arg (arg) ret_val = strtod (arg, &end_ptr); if (end_ptr == arg || *end_ptr != '\0') { - fprintf (stderr, "illegal float argument: %s\n", arg); + error (0, 0, "invalid float argument: %s\n", arg); usage (2); /* NOTREACHED */ } @@ -366,7 +366,7 @@ print_numbers (format_str) { if (step >= 0) { - (void) fprintf (stderr, "illegal increment: %g\n", step); + error (0, 0, "invalid increment: %g\n", step); usage (2); /* NOTREACHED */ } @@ -386,7 +386,7 @@ print_numbers (format_str) { if (step <= 0) { - (void) fprintf (stderr, "illegal increment: %g\n", step); + error (0, 0, "invalid increment: %g\n", step); usage (2); /* NOTREACHED */ } |