diff options
author | Ruediger Meier | 2017-06-29 15:52:16 +0200 |
---|---|---|
committer | Ruediger Meier | 2017-06-29 16:54:33 +0200 |
commit | f45f3ec34a37e2779d09625b93be5eb91174f8fc (patch) | |
tree | cba0a6875b5998436a63ac0f45fb8d98b1be47f1 /text-utils | |
parent | blockdev: correct man page name in --help (diff) | |
download | kernel-qcow2-util-linux-f45f3ec34a37e2779d09625b93be5eb91174f8fc.tar.gz kernel-qcow2-util-linux-f45f3ec34a37e2779d09625b93be5eb91174f8fc.tar.xz kernel-qcow2-util-linux-f45f3ec34a37e2779d09625b93be5eb91174f8fc.zip |
misc: consolidate macro style USAGE_HELP_OPTIONS
changed in include/c.h and applied via sed:
sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c")
sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c")
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'text-utils')
-rw-r--r-- | text-utils/col.c | 2 | ||||
-rw-r--r-- | text-utils/colcrt.c | 4 | ||||
-rw-r--r-- | text-utils/colrm.c | 4 | ||||
-rw-r--r-- | text-utils/column.c | 4 | ||||
-rw-r--r-- | text-utils/hexdump.c | 4 | ||||
-rw-r--r-- | text-utils/line.c | 4 | ||||
-rw-r--r-- | text-utils/more.c | 2 | ||||
-rw-r--r-- | text-utils/pg.c | 4 | ||||
-rw-r--r-- | text-utils/rev.c | 4 | ||||
-rw-r--r-- | text-utils/ul.c | 4 |
10 files changed, 18 insertions, 18 deletions
diff --git a/text-utils/col.c b/text-utils/col.c index 01ee61b27..3d9e15d26 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -151,7 +151,7 @@ static void __attribute__((__noreturn__)) usage(void) "%s reads from standard input and writes to standard output\n\n"), program_invocation_short_name); - fprintf(out, USAGE_MAN_TAIL("col(1)")); + printf(USAGE_MAN_TAIL("col(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/colcrt.c b/text-utils/colcrt.c index cb6d4456e..6113880e4 100644 --- a/text-utils/colcrt.c +++ b/text-utils/colcrt.c @@ -89,9 +89,9 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -2, --half-lines print all half-lines\n"), out); fputs(USAGE_SEPARATOR, out); - print_usage_help_options(25); + printf(USAGE_HELP_OPTIONS(25)); - fprintf(out, USAGE_MAN_TAIL("colcrt(1)")); + printf(USAGE_MAN_TAIL("colcrt(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/colrm.c b/text-utils/colrm.c index c2ff039ff..8bb0ee9cc 100644 --- a/text-utils/colrm.c +++ b/text-utils/colrm.c @@ -65,10 +65,10 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Filter out the specified columns.\n"), out); fputs(USAGE_OPTIONS, out); - print_usage_help_options(16); + printf(USAGE_HELP_OPTIONS(16)); fprintf(out, _("%s reads from standard input and writes to standard output\n\n"), program_invocation_short_name); - fprintf(out, USAGE_MAN_TAIL("colrm(1)")); + printf(USAGE_MAN_TAIL("colrm(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/column.c b/text-utils/column.c index fb57b4748..2bb6335cf 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -589,8 +589,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -x, --fillrows fill rows before columns\n"), out); fputs(USAGE_SEPARATOR, out); - print_usage_help_options(34); - fprintf(out, USAGE_MAN_TAIL("column(1)")); + printf(USAGE_HELP_OPTIONS(34)); + printf(USAGE_MAN_TAIL("column(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c index 57deddaf1..94c53b8e5 100644 --- a/text-utils/hexdump.c +++ b/text-utils/hexdump.c @@ -174,8 +174,8 @@ void __attribute__((__noreturn__)) usage(void) fputs(_(" -s, --skip <offset> skip offset bytes from the beginning\n"), out); fputs(_(" -v, --no-squeezing output identical lines\n"), out); fputs(USAGE_SEPARATOR, out); - print_usage_help_options(27); - fprintf(out, USAGE_MAN_TAIL("hexdump(1)")); + printf(USAGE_HELP_OPTIONS(27)); + printf(USAGE_MAN_TAIL("hexdump(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/line.c b/text-utils/line.c index a9b3696cf..63c001261 100644 --- a/text-utils/line.c +++ b/text-utils/line.c @@ -34,8 +34,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Read one line.\n"), out); fputs(USAGE_OPTIONS, out); - print_usage_help_options(16); - fprintf(out, USAGE_MAN_TAIL("line(1)")); + printf(USAGE_HELP_OPTIONS(16)); + printf(USAGE_MAN_TAIL("line(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/more.c b/text-utils/more.c index 2a7917120..cbff39b11 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -249,7 +249,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_SEPARATOR, out); printf( " --help %s\n", USAGE_OPTSTR_HELP); printf( " -V, --version %s\n", USAGE_OPTSTR_VERSION); - fprintf(out, USAGE_MAN_TAIL("more(1)")); + printf(USAGE_MAN_TAIL("more(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/pg.c b/text-utils/pg.c index 5c378915a..ed9eb415a 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -247,9 +247,9 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" +/pattern/ start at the line containing pattern\n"), out); fputs(USAGE_SEPARATOR, out); - print_usage_help_options(16); + printf(USAGE_HELP_OPTIONS(16)); - fprintf(out, USAGE_MAN_TAIL("pg(1)")); + printf(USAGE_MAN_TAIL("pg(1)")); exit(0); } diff --git a/text-utils/rev.c b/text-utils/rev.c index 3c2bd1f20..84d116d8c 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -81,8 +81,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Reverse lines characterwise.\n"), out); fputs(USAGE_OPTIONS, out); - print_usage_help_options(16); - fprintf(out, USAGE_MAN_TAIL("rev(1)")); + printf(USAGE_HELP_OPTIONS(16)); + printf(USAGE_MAN_TAIL("rev(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/ul.c b/text-utils/ul.c index 8f1f89e46..b5ce4db84 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -148,9 +148,9 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, -T, --terminal TERMINAL override the TERM environment variable\n"), out); fputs(_(" -i, --indicated underlining is indicated via a separate line\n"), out); fputs(USAGE_SEPARATOR, out); - print_usage_help_options(30); + printf(USAGE_HELP_OPTIONS(30)); - fprintf(out, USAGE_MAN_TAIL("ul(1)")); + printf(USAGE_MAN_TAIL("ul(1)")); exit(EXIT_SUCCESS); } |