commit: c45ddc01a447dbb3ad519a08e38287e96504d55e
parent 67b622fb99a712af1c65a5c1900ec365cfe4841a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 20 Sep 2024 03:58:45 +0200
cmd/seq: unify error message formatting
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmd/seq.c b/cmd/seq.c
@@ -39,7 +39,7 @@ seq(double i, double step, double last)
printf("%s", term);
if(opt_w && i != g_last)
- fprintf(stderr, "seq: Failed to guess last, got: %g; expected: %g\n", i, g_last);
+ fprintf(stderr, "seq: error: Failed to guess last, got: %g; expected: %g\n", i, g_last);
}
static double
@@ -53,14 +53,14 @@ get_num(char *str)
if(errno != 0)
{
- fprintf(stderr, "seq: Error strtod(\"%s\"): %s\n", str, strerror(errno));
+ fprintf(stderr, "seq: error: strtod(\"%s\"): %s\n", str, strerror(errno));
exit(1);
}
if(!(endptr == NULL || endptr[0] == 0))
{
fprintf(stderr,
- "seq: Error strtod(\"%s\"), invalid remaining characters found '%s'\n",
+ "seq: error: strtod(\"%s\"), invalid remaining characters found '%s'\n",
str,
endptr);
exit(1);
@@ -94,14 +94,14 @@ main(int argc, char *argv[])
term = optarg;
break;
case ':':
- fprintf(stderr, "seq: Option -%c requires an operand\n", optopt);
+ fprintf(stderr, "seq: error: Option -%c requires an operand\n", optopt);
usage();
return 1;
case '?':
if(isdigit(optopt))
{
fprintf(stderr,
- "seq: Warning: Pass -- if the first non-option argument starts with a dash(-)\n");
+ "seq: warning: Pass -- if the first non-option argument starts with a dash(-)\n");
optind--;
goto getopt_end;
}