diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-21 16:18:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-21 16:18:25 +0000 |
commit | fc390ff3f226de8ab205d632e190100023030fef (patch) | |
tree | 7f75f8da00d371d2c94ae5fb40b6e4aa4fc32bb9 /mandocdb.c | |
parent | 37fc9452eae26c51be7df689f984abae6d78ccea (diff) | |
download | mandoc-fc390ff3f226de8ab205d632e190100023030fef.tar.gz |
Prefix messages about bad command line options and arguments
with "mandoc: " or "makewhatis: ", respectively,
similar to what we already do for other messages.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -355,7 +355,8 @@ main(int argc, char *argv[]) */ #define CHECKOP(_op, _ch) do \ if (OP_DEFAULT != (_op)) { \ - fprintf(stderr, "-%c: Conflicting option\n", (_ch)); \ + fprintf(stderr, "%s: -%c: Conflicting option\n", \ + progname, (_ch)); \ goto usage; \ } while (/*CONSTCOND*/0) @@ -391,8 +392,9 @@ main(int argc, char *argv[]) break; case 'T': if (strcmp(optarg, "utf8")) { - fprintf(stderr, "-T%s: Unsupported " - "output format\n", optarg); + fprintf(stderr, "%s: -T%s: " + "Unsupported output format\n", + progname, optarg); goto usage; } write_utf8 = 1; @@ -419,7 +421,8 @@ main(int argc, char *argv[]) argv += optind; if (OP_CONFFILE == op && argc > 0) { - fprintf(stderr, "-C: Too many arguments\n"); + fprintf(stderr, "%s: -C: Too many arguments\n", + progname); goto usage; } |