From: Jim Meyering Date: Sat, 7 Jan 2012 15:54:26 +0000 (+0100) Subject: maint: use new emit_try_help in place of equivalent fprintf X-Git-Tag: v8.16~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=101d1203c667ec3ab54a026dde43117563d4e944;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/src/base64.c b/src/base64.c index 70422670bf..caf4141dbd 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 5d339c222a..a8e59c2e11 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 33a94b67be..9352fb2228 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 9066122b66..b62ed3a7dc 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 c4e7b139dd..f4a2bf6604 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 316ee73d17..3fb9a8251a 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 9e936a4d25..2f23b33cc3 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 ec18794130..4e34680766 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 f529ccda5b..086d4e1f8f 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 a95893312b..8fd6cb1b86 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 be4f25baea..10ffc9c1fd 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 22c513ace8..607092adfb 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 624e6ac0b8..a820189f31 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 a7917cd060..216d5db78b 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 d190439692..261aee6148 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 fae32cd938..e3d55c443a 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 392c6efdb9..617e6d9827 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 5cb28098ec..07ac9d854f 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 07a339a9dd..689e9bc33f 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 89943a4e24..b909656778 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 0ca7d359ab..b725b41242 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 c362d111b1..0eb6955aea 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 9502ab30f5..f17d7360d8 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 43fbaa6c09..8a9720db92 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 61d5386cba..e8aaebfd6b 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 acfa38737b..243156a26e 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 749c263672..1403ee58f5 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 c54621421e..aae6357f7d 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 c0f2bac980..2ef3e9281f 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 7f6a1f3016..807363c05f 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 b18208ebf4..27d8bbee67 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 a01a1cc952..8e0ca0b66f 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 ca34e77810..45d5e0aae0 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 763be6d573..84736230ac 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 0d09c2b582..bdb1c5e703 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 bfe89a9a46..74dfeb62de 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 7cceb5f668..0c1cd8562d 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 9418f66359..62a6e9d1ea 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 ec3bf562d9..b12f8773d7 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 5f8e55b99b..7024866a1b 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 bedda69af3..a466841621 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 b2d8db27f7..743ac4a359 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 57d8664427..dd98b420b2 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 7dd377f833..9ae6538e2d 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 0c38de3e08..ef398833fa 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 e5c4a99e41..56b8249f92 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 7546aaa42a..f3a5298769 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 159ff1246b..e19d2940e4 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 66fb2f1889..d336054541 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 8ef77bfcb8..171e6c8c11 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 789a9a0dfc..3989f66796 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 d35d609567..b337a3ba59 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 00d62069e4..6f0874dc1a 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 6a5b7d15fb..3e473fcb0f 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 b236396368..809f0e0e64 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 d956955770..91091fd634 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 3d39076866..668a31d055 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 593dce30f2..7b3ab73e4c 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 4df0d09f17..5d8cfd9737 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 cb0ef2f1f1..130a665059 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 d1904a8994..a5edfcf8f6 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 c628ed0cd5..f966ba2ae0 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 98a0bb0486..a70ed79353 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 598c5a0aaa..32766145cf 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 b339bda4f5..39044ce900 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 2f7da9ed0d..5494c2a215 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 f57d31f725..1f1fe97508 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 d2a64c24fe..bae6fd5b83 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 62db87d4a7..dd7d563550 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 2eb343b15c..d0abd65fb0 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 3cbc0cbf8e..0d40d99524 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 cc6bd564f2..a4ec52e061 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 855aebcea0..fa48dbbeff 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 7ad9c43fba..adac19f4c8 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 12f3daf069..5a03e4fad7 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 f3958748c4..2a84f3d9b4 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 02c67c9ef3..5c183f59a0 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 eae57415e3..123cfba269 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 9f85659cc1..c832c7c2bb 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 51b6ee87ae..5bf712aa81 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 17c5f21f86..ca8f0eb081 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 2fc15fe233..70d7567a40 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 d2e70b584d..5dc065cf82 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 95df4f0c40..29cb2fa36f 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 73d9a10cdd..d3532f949b 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 bf75005413..b5c163e346 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 a283df901b..cb290e8226 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 264d114c58..bdc6cbbca1 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 c05572b598..e4a2d157aa 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 fd0be8246d..d246a86fa0 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 b3b8fb11ba..16852e81aa 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 810ce9114a..e956071178 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 bdd893aec8..924732d8e0 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 68d679cdd7..00d4637470 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 fd093f78fa..1525ec552c 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 41dc5c3002..535c13fe0d 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 (_("\