diff options
author | B. Watson <urchlay@slackware.uk> | 2024-02-03 01:16:13 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-02-03 01:16:13 -0500 |
commit | 7f6cf7419ff7a9757dc3677c23e4d21b91ec7668 (patch) | |
tree | f14c3e21f53545a88f1a59e42631fde4a0154e53 | |
parent | 6ff7f20633bd60e6a4a71170d6837659547ef068 (diff) | |
download | xdeadzone-7f6cf7419ff7a9757dc3677c23e4d21b91ec7668.tar.gz |
Blank line between error message and usage; get rid of "try --help" since it shows the usage already.
-rw-r--r-- | xdeadzone.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xdeadzone.c b/xdeadzone.c index 376794f..35fece6 100644 --- a/xdeadzone.c +++ b/xdeadzone.c @@ -54,7 +54,7 @@ void usage(const int ret) { } void errmsg(const char *msg) { - fprintf(stderr, "%s: %s\n", exe_name, msg); + fprintf(stderr, "%s: %s\n\n", exe_name, msg); usage(1); } @@ -125,18 +125,18 @@ int main(int argc, char **argv) { check_mode(mode); mode = M_SW; } else if(a[0] == '-') { - fprintf(stderr, "%s: invalid option: %s (try --help)\n", exe_name, a); - exit(1); + fprintf(stderr, "%s: invalid option: %s\n\n", exe_name, a); + usage(1); } else { /* no dash, must be geometry */ if(gflags == -1) gflags = XParseGeometry(a, &x, &y, &width, &height); else - errmsg("multiple geometry arguments given (try --help)"); + errmsg("multiple geometry arguments given"); } } if(gflags == -1) - errmsg("missing required geometry argument (try --help)"); + errmsg("missing required geometry argument"); else DBG(printf("XParseGeometry got %d %d %d %d\n", x, y, width, height)); |