aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-11-04 20:11:34 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-11-04 20:11:34 +0100
commitef5fcf36e9a852669c6db43352cac5d841ae210d (patch)
tree9145acceddec94ea8c6afc555f1f8a958da45565
parent0a25a86c098a2a06d8f6948bdb074e2bc0dcaf4e (diff)
Move the flags in the usage string to PROG_ARGS
This allows us to wrap the code to 80 columns while still remaining rather readable.
-rw-r--r--center.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/center.c b/center.c
index 61193a1..d02dcfc 100644
--- a/center.c
+++ b/center.c
@@ -29,6 +29,7 @@
#include <unistd.h>
#define ESC 033
+#define PROG_ARGS "[-elr] [-t width] [-w width] [file ...]\n"
#define die(...) err(EXIT_FAILURE, __VA_ARGS__)
#define diex(...) errx(EXIT_FAILURE, __VA_ARGS__)
@@ -92,11 +93,7 @@ main(int argc, char **argv)
width = polong(optarg, "output width");
break;
default:
- fprintf(
- stderr,
- "Usage: %s [-elr] [-t width] [-w width] [file ...]\n",
- argv[0]
- );
+ fprintf(stderr, "Usage: %s " PROG_ARGS, argv[0]);
exit(EXIT_FAILURE);
}
}