From ef5fcf36e9a852669c6db43352cac5d841ae210d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 4 Nov 2022 20:11:34 +0100 Subject: 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. --- center.c | 7 ++----- 1 file 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 #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); } } -- cgit v1.2.3