From 101d1203c667ec3ab54a026dde43117563d4e944 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 7 Jan 2012 16:54:26 +0100 Subject: [PATCH] maint: use new emit_try_help in place of equivalent fprintf Run this command: perl -0777 -pi -e \ 's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\ src/*.c --- src/base64.c | 3 +-- src/basename.c | 3 +-- src/cat.c | 3 +-- src/chcon.c | 3 +-- src/chgrp.c | 3 +-- src/chmod.c | 3 +-- src/chown.c | 3 +-- src/chroot.c | 3 +-- src/cksum.c | 3 +-- src/comm.c | 3 +-- src/cp.c | 3 +-- src/csplit.c | 3 +-- src/cut.c | 3 +-- src/date.c | 3 +-- src/dd.c | 3 +-- src/df.c | 3 +-- src/dircolors.c | 3 +-- src/dirname.c | 3 +-- src/du.c | 3 +-- src/echo.c | 3 +-- src/env.c | 3 +-- src/expand.c | 3 +-- src/expr.c | 3 +-- src/factor.c | 3 +-- src/fmt.c | 3 +-- src/fold.c | 3 +-- src/getlimits.c | 3 +-- src/groups.c | 3 +-- src/head.c | 3 +-- src/hostid.c | 3 +-- src/hostname.c | 3 +-- src/id.c | 3 +-- src/install.c | 3 +-- src/join.c | 3 +-- src/kill.c | 3 +-- src/link.c | 3 +-- src/ln.c | 3 +-- src/logname.c | 3 +-- src/ls.c | 3 +-- src/md5sum.c | 3 +-- src/mkdir.c | 3 +-- src/mkfifo.c | 3 +-- src/mknod.c | 3 +-- src/mktemp.c | 3 +-- src/mv.c | 3 +-- src/nice.c | 3 +-- src/nl.c | 3 +-- src/nohup.c | 3 +-- src/nproc.c | 3 +-- src/od.c | 3 +-- src/paste.c | 3 +-- src/pathchk.c | 3 +-- src/pinky.c | 3 +-- src/pr.c | 3 +-- src/printenv.c | 3 +-- src/printf.c | 3 +-- src/ptx.c | 3 +-- src/pwd.c | 3 +-- src/readlink.c | 3 +-- src/realpath.c | 3 +-- src/rm.c | 3 +-- src/rmdir.c | 3 +-- src/runcon.c | 3 +-- src/seq.c | 3 +-- src/setuidgid.c | 3 +-- src/shred.c | 3 +-- src/shuf.c | 3 +-- src/sleep.c | 3 +-- src/sort.c | 3 +-- src/split.c | 3 +-- src/stat.c | 3 +-- src/stdbuf.c | 3 +-- src/stty.c | 3 +-- src/su.c | 3 +-- src/sum.c | 3 +-- src/sync.c | 3 +-- src/tac.c | 3 +-- src/tail.c | 3 +-- src/tee.c | 3 +-- src/test.c | 3 +-- src/timeout.c | 3 +-- src/touch.c | 3 +-- src/tr.c | 3 +-- src/truncate.c | 3 +-- src/tsort.c | 3 +-- src/tty.c | 3 +-- src/uname.c | 3 +-- src/unexpand.c | 3 +-- src/uniq.c | 3 +-- src/unlink.c | 3 +-- src/uptime.c | 3 +-- src/users.c | 3 +-- src/wc.c | 3 +-- src/who.c | 3 +-- src/whoami.c | 3 +-- src/yes.c | 3 +-- 96 files changed, 96 insertions(+), 192 deletions(-) diff --git a/src/base64.c b/src/base64.c index 70422670b..caf4141db 100644 --- a/src/base64.c +++ b/src/base64.c @@ -54,8 +54,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/basename.c b/src/basename.c index 5d339c222..a8e59c2e1 100644 --- a/src/basename.c +++ b/src/basename.c @@ -43,8 +43,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/cat.c b/src/cat.c index 33a94b67b..9352fb222 100644 --- a/src/cat.c +++ b/src/cat.c @@ -82,8 +82,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/chcon.c b/src/chcon.c index 9066122b6..b62ed3a7d 100644 --- a/src/chcon.c +++ b/src/chcon.c @@ -345,8 +345,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/chgrp.c b/src/chgrp.c index c4e7b139d..f4a2bf660 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -102,8 +102,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/chmod.c b/src/chmod.c index 316ee73d1..3fb9a8251 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -365,8 +365,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/chown.c b/src/chown.c index 9e936a4d2..2f23b33cc 100644 --- a/src/chown.c +++ b/src/chown.c @@ -73,8 +73,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/chroot.c b/src/chroot.c index ec1879413..4e3468076 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -126,8 +126,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/cksum.c b/src/cksum.c index f529ccda5..086d4e1f8 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -257,8 +257,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/comm.c b/src/comm.c index a95893312..8fd6cb1b8 100644 --- a/src/comm.c +++ b/src/comm.c @@ -98,8 +98,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/cp.c b/src/cp.c index be4f25bae..10ffc9c1f 100644 --- a/src/cp.c +++ b/src/cp.c @@ -150,8 +150,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/csplit.c b/src/csplit.c index 22c513ace..607092adf 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -1443,8 +1443,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/cut.c b/src/cut.c index 624e6ac0b..a820189f3 100644 --- a/src/cut.c +++ b/src/cut.c @@ -183,8 +183,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/date.c b/src/date.c index a7917cd06..216d5db78 100644 --- a/src/date.c +++ b/src/date.c @@ -117,8 +117,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/dd.c b/src/dd.c index d19043969..261aee614 100644 --- a/src/dd.c +++ b/src/dd.c @@ -475,8 +475,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/df.c b/src/df.c index fae32cd93..e3d55c443 100644 --- a/src/df.c +++ b/src/df.c @@ -840,8 +840,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); diff --git a/src/dircolors.c b/src/dircolors.c index 392c6efdb..617e6d982 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -91,8 +91,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name); diff --git a/src/dirname.c b/src/dirname.c index 5cb28098e..07ac9d854 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -38,8 +38,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/du.c b/src/du.c index 07a339a9d..689e9bc33 100644 --- a/src/du.c +++ b/src/du.c @@ -253,8 +253,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/echo.c b/src/echo.c index 89943a4e2..b90965677 100644 --- a/src/echo.c +++ b/src/echo.c @@ -36,8 +36,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/env.c b/src/env.c index 0ca7d359a..b725b4124 100644 --- a/src/env.c +++ b/src/env.c @@ -46,8 +46,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/expand.c b/src/expand.c index c362d111b..0eb6955ae 100644 --- a/src/expand.c +++ b/src/expand.c @@ -98,8 +98,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/expr.c b/src/expr.c index 9502ab30f..f17d7360d 100644 --- a/src/expr.c +++ b/src/expr.c @@ -197,8 +197,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/factor.c b/src/factor.c index 43fbaa6c0..8a9720db9 100644 --- a/src/factor.c +++ b/src/factor.c @@ -488,8 +488,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/fmt.c b/src/fmt.c index 61d5386cb..e8aaebfd6 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -263,8 +263,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [-WIDTH] [OPTION]... [FILE]...\n"), program_name); diff --git a/src/fold.c b/src/fold.c index acfa38737..243156a26 100644 --- a/src/fold.c +++ b/src/fold.c @@ -60,8 +60,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/getlimits.c b/src/getlimits.c index 749c26367..1403ee58f 100644 --- a/src/getlimits.c +++ b/src/getlimits.c @@ -59,8 +59,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/groups.c b/src/groups.c index c54621421..aae6357f7 100644 --- a/src/groups.c +++ b/src/groups.c @@ -47,8 +47,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [USERNAME]...\n"), program_name); diff --git a/src/head.c b/src/head.c index c0f2bac98..2ef3e9281 100644 --- a/src/head.c +++ b/src/head.c @@ -99,8 +99,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/hostid.c b/src/hostid.c index 7f6a1f301..807363c05 100644 --- a/src/hostid.c +++ b/src/hostid.c @@ -36,8 +36,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/hostname.c b/src/hostname.c index b18208ebf..27d8bbee6 100644 --- a/src/hostname.c +++ b/src/hostname.c @@ -50,8 +50,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/id.c b/src/id.c index a01a1cc95..8e0ca0b66 100644 --- a/src/id.c +++ b/src/id.c @@ -75,8 +75,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [USERNAME]\n"), program_name); diff --git a/src/install.c b/src/install.c index ca34e7781..45d5e0aae 100644 --- a/src/install.c +++ b/src/install.c @@ -587,8 +587,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/join.c b/src/join.c index 763be6d57..84736230a 100644 --- a/src/join.c +++ b/src/join.c @@ -181,8 +181,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/kill.c b/src/kill.c index 0d09c2b58..bdb1c5e70 100644 --- a/src/kill.c +++ b/src/kill.c @@ -70,8 +70,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/link.c b/src/link.c index bfe89a9a4..74dfeb62d 100644 --- a/src/link.c +++ b/src/link.c @@ -39,8 +39,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/ln.c b/src/ln.c index 7cceb5f66..0c1cd8562 100644 --- a/src/ln.c +++ b/src/ln.c @@ -329,8 +329,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/logname.c b/src/logname.c index 9418f6635..62a6e9d1e 100644 --- a/src/logname.c +++ b/src/logname.c @@ -33,8 +33,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]\n"), program_name); diff --git a/src/ls.c b/src/ls.c index ec3bf562d..b12f8773d 100644 --- a/src/ls.c +++ b/src/ls.c @@ -4642,8 +4642,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); diff --git a/src/md5sum.c b/src/md5sum.c index 5f8e55b99..7024866a1 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -156,8 +156,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/mkdir.c b/src/mkdir.c index bedda69af..a46684162 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -50,8 +50,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name); diff --git a/src/mkfifo.c b/src/mkfifo.c index b2d8db27f..743ac4a35 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -45,8 +45,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... NAME...\n"), program_name); diff --git a/src/mknod.c b/src/mknod.c index 57d866442..dd98b420b 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -46,8 +46,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"), diff --git a/src/mktemp.c b/src/mktemp.c index 7dd377f83..9ae6538e2 100644 --- a/src/mktemp.c +++ b/src/mktemp.c @@ -62,8 +62,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [TEMPLATE]\n"), program_name); diff --git a/src/mv.c b/src/mv.c index 0c38de3e0..ef398833f 100644 --- a/src/mv.c +++ b/src/mv.c @@ -278,8 +278,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/nice.c b/src/nice.c index e5c4a99e4..56b8249f9 100644 --- a/src/nice.c +++ b/src/nice.c @@ -66,8 +66,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION] [COMMAND [ARG]...]\n"), program_name); diff --git a/src/nl.c b/src/nl.c index 7546aaa42..f3a529876 100644 --- a/src/nl.c +++ b/src/nl.c @@ -176,8 +176,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/nohup.c b/src/nohup.c index 159ff1246..e19d2940e 100644 --- a/src/nohup.c +++ b/src/nohup.c @@ -47,8 +47,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/nproc.c b/src/nproc.c index 66fb2f188..d33605454 100644 --- a/src/nproc.c +++ b/src/nproc.c @@ -50,8 +50,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]...\n"), program_name); diff --git a/src/od.c b/src/od.c index 8ef77bfcb..171e6c8c1 100644 --- a/src/od.c +++ b/src/od.c @@ -288,8 +288,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/paste.c b/src/paste.c index 789a9a0df..3989f6679 100644 --- a/src/paste.c +++ b/src/paste.c @@ -429,8 +429,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/pathchk.c b/src/pathchk.c index d35d60956..b337a3ba5 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -83,8 +83,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... NAME...\n"), program_name); diff --git a/src/pinky.c b/src/pinky.c index 00d62069e..6f0874dc1 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -496,8 +496,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [USER]...\n"), program_name); diff --git a/src/pr.c b/src/pr.c index 6a5b7d15f..3e473fcb0 100644 --- a/src/pr.c +++ b/src/pr.c @@ -2762,8 +2762,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/printenv.c b/src/printenv.c index b23639636..809f0e0e6 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -56,8 +56,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/printf.c b/src/printf.c index d95695577..91091fd63 100644 --- a/src/printf.c +++ b/src/printf.c @@ -82,8 +82,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/ptx.c b/src/ptx.c index 3d3907686..668a31d05 100644 --- a/src/ptx.c +++ b/src/ptx.c @@ -1811,8 +1811,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/pwd.c b/src/pwd.c index 593dce30f..7b3ab73e4 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -50,8 +50,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]...\n"), program_name); diff --git a/src/readlink.c b/src/readlink.c index 4df0d09f1..5d8cfd973 100644 --- a/src/readlink.c +++ b/src/readlink.c @@ -56,8 +56,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE\n"), program_name); diff --git a/src/realpath.c b/src/realpath.c index cb0ef2f1f..130a66505 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -64,8 +64,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE...\n"), program_name); diff --git a/src/rm.c b/src/rm.c index d1904a899..a5edfcf8f 100644 --- a/src/rm.c +++ b/src/rm.c @@ -128,8 +128,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE...\n"), program_name); diff --git a/src/rmdir.c b/src/rmdir.c index c628ed0cd..f966ba2ae 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -158,8 +158,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name); diff --git a/src/runcon.c b/src/runcon.c index 98a0bb048..a70ed7935 100644 --- a/src/runcon.c +++ b/src/runcon.c @@ -77,8 +77,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/seq.c b/src/seq.c index 598c5a0aa..32766145c 100644 --- a/src/seq.c +++ b/src/seq.c @@ -62,8 +62,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/setuidgid.c b/src/setuidgid.c index b339bda4f..39044ce90 100644 --- a/src/setuidgid.c +++ b/src/setuidgid.c @@ -43,8 +43,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/shred.c b/src/shred.c index 2f7da9ed0..5494c2a21 100644 --- a/src/shred.c +++ b/src/shred.c @@ -141,8 +141,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE...\n"), program_name); diff --git a/src/shuf.c b/src/shuf.c index f57d31f72..1f1fe9750 100644 --- a/src/shuf.c +++ b/src/shuf.c @@ -42,8 +42,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/sleep.c b/src/sleep.c index d2a64c24f..bae6fd5b8 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -39,8 +39,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/sort.c b/src/sort.c index 62db87d4a..dd7d56355 100644 --- a/src/sort.c +++ b/src/sort.c @@ -386,8 +386,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/split.c b/src/split.c index 2eb343b15..d0abd65fb 100644 --- a/src/split.c +++ b/src/split.c @@ -175,8 +175,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/stat.c b/src/stat.c index 3cbc0cbf8..0d40d9952 100644 --- a/src/stat.c +++ b/src/stat.c @@ -1323,8 +1323,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE...\n"), program_name); diff --git a/src/stdbuf.c b/src/stdbuf.c index cc6bd564f..a4ec52e06 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -84,8 +84,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s OPTION... COMMAND\n"), program_name); diff --git a/src/stty.c b/src/stty.c index 855aebcea..fa48dbbef 100644 --- a/src/stty.c +++ b/src/stty.c @@ -503,8 +503,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/su.c b/src/su.c index 7ad9c43fb..adac19f4c 100644 --- a/src/su.c +++ b/src/su.c @@ -365,8 +365,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name); diff --git a/src/sum.c b/src/sum.c index 12f3daf06..5a03e4fad 100644 --- a/src/sum.c +++ b/src/sum.c @@ -53,8 +53,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/sync.c b/src/sync.c index f3958748c..2a84f3d9b 100644 --- a/src/sync.c +++ b/src/sync.c @@ -34,8 +34,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]\n"), program_name); diff --git a/src/tac.c b/src/tac.c index 02c67c9ef..5c183f59a 100644 --- a/src/tac.c +++ b/src/tac.c @@ -127,8 +127,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/tail.c b/src/tail.c index eae57415e..123cfba26 100644 --- a/src/tail.c +++ b/src/tail.c @@ -252,8 +252,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/tee.c b/src/tee.c index 9f85659cc..c832c7c2b 100644 --- a/src/tee.c +++ b/src/tee.c @@ -56,8 +56,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); diff --git a/src/test.c b/src/test.c index 51b6ee87a..5bf712aa8 100644 --- a/src/test.c +++ b/src/test.c @@ -698,8 +698,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { fputs (_("\ diff --git a/src/timeout.c b/src/timeout.c index 17c5f21f8..ca8f0eb08 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -198,8 +198,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/touch.c b/src/touch.c index 2fc15fe23..70d7567a4 100644 --- a/src/touch.c +++ b/src/touch.c @@ -210,8 +210,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... FILE...\n"), program_name); diff --git a/src/tr.c b/src/tr.c index d2e70b584..5dc065cf8 100644 --- a/src/tr.c +++ b/src/tr.c @@ -280,8 +280,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/truncate.c b/src/truncate.c index 95df4f0c4..29cb2fa36 100644 --- a/src/truncate.c +++ b/src/truncate.c @@ -90,8 +90,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s OPTION... FILE...\n"), program_name); diff --git a/src/tsort.c b/src/tsort.c index 73d9a10cd..d3532f949 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -76,8 +76,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/tty.c b/src/tty.c index bf7500541..b5c163e34 100644 --- a/src/tty.c +++ b/src/tty.c @@ -58,8 +58,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]...\n"), program_name); diff --git a/src/uname.c b/src/uname.c index a283df901..cb290e822 100644 --- a/src/uname.c +++ b/src/uname.c @@ -115,8 +115,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]...\n"), program_name); diff --git a/src/unexpand.c b/src/unexpand.c index 264d114c5..bdc6cbbca 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -108,8 +108,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/uniq.c b/src/uniq.c index c05572b59..e4a2d157a 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -128,8 +128,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/unlink.c b/src/unlink.c index fd0be8246..d246a86fa 100644 --- a/src/unlink.c +++ b/src/unlink.c @@ -39,8 +39,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/uptime.c b/src/uptime.c index b3b8fb11b..16852e81a 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -190,8 +190,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name); diff --git a/src/users.c b/src/users.c index 810ce9114..e95607117 100644 --- a/src/users.c +++ b/src/users.c @@ -99,8 +99,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name); diff --git a/src/wc.c b/src/wc.c index bdd893aec..924732d8e 100644 --- a/src/wc.c +++ b/src/wc.c @@ -106,8 +106,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ diff --git a/src/who.c b/src/who.c index 68d679cdd..00d463747 100644 --- a/src/who.c +++ b/src/who.c @@ -643,8 +643,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]... [ FILE | ARG1 ARG2 ]\n"), program_name); diff --git a/src/whoami.c b/src/whoami.c index fd093f78f..1525ec552 100644 --- a/src/whoami.c +++ b/src/whoami.c @@ -39,8 +39,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("Usage: %s [OPTION]...\n"), program_name); diff --git a/src/yes.c b/src/yes.c index 41dc5c300..535c13fe0 100644 --- a/src/yes.c +++ b/src/yes.c @@ -35,8 +35,7 @@ void usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); + emit_try_help (); else { printf (_("\ -- 2.11.4.GIT