From 5c67064016426f7d797c4b686f3bf65d4381e633 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Thu, 18 Sep 2014 14:37:37 +0100
Subject: [PATCH 1/2] doc: ensure the correct texinfo nodes are referenced in
 --help

* src/system.h (emit_ancillary_info): For commands that don't have
a 1:1 mapping with the texinfo node names, provide a mapping to
the correct node.
* doc/coreutils.texi: Add some extra cross references noticed while
checking this.
Fixes http://bugs.debian.org/762092
---
 doc/coreutils.texi |    5 ++++-
 src/system.h       |   25 ++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index fb083f0..1519fcb 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4206,7 +4206,8 @@ The commands @command{sha224sum}, @command{sha256sum},
 @command{sha384sum} and @command{sha512sum} compute checksums of
 various lengths (respectively 224, 256, 384 and 512 bits),
 collectively known as the SHA-2 hashes.  The usage and options of
-these commands are precisely the same as for @command{md5sum}.
+these commands are precisely the same as for @command{md5sum}
+and @command{sha1sum}.
 @xref{md5sum invocation}.
 
 Note: The SHA384 and SHA512 digests are considerably slower to
@@ -7961,6 +7962,8 @@ and special characters are represented by backslash escape sequences.
 -b}; that is, by default files are listed in long format and special
 characters are represented by backslash escape sequences.
 
+@xref{ls invocation, @command{ls}}.
+
 @node dircolors invocation
 @section @command{dircolors}: Color setup for @command{ls}
 
diff --git a/src/system.h b/src/system.h
index 1682b32..b5bbec2 100644
--- a/src/system.h
+++ b/src/system.h
@@ -567,7 +567,26 @@ Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\
 static inline void
 emit_ancillary_info (void)
 {
-  char const * program = last_component (program_name);
+  char const *program = last_component (program_name);
+
+  struct infomap { char const *program; char const *node; } const infomap[] = {
+    { "[", "test invocation" },
+    { "coreutils", "Multi-call invocation" },
+    { "sha224sum", "sha2 utilities" },
+    { "sha256sum", "sha2 utilities" },
+    { "sha384sum", "sha2 utilities" },
+    { "sha512sum", "sha2 utilities" },
+    { NULL, NULL }
+  };
+
+  char const *node = program;
+  struct infomap const *map_prog = infomap;
+
+  while (map_prog->program && ! STREQ (program, map_prog->program))
+    map_prog++;
+
+  if (map_prog->node)
+    node = map_prog->node;
 
   printf (_("\n%s online help: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
 
@@ -585,8 +604,8 @@ emit_ancillary_info (void)
     }
   printf (_("Full documentation at: <%s%s>\n"),
           PACKAGE_URL, program);
-  printf (_("or available locally via: info '(coreutils) %s invocation'\n"),
-          program);
+  printf (_("or available locally via: info '(coreutils) %s%s'\n"),
+          node, node == program ? " invocation" : "");
 }
 
 static inline void
-- 
1.7.7.6


From 9d6878c7abaa91fea92d612c7c0a3d699efca106 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Thu, 18 Sep 2014 14:50:47 +0100
Subject: [PATCH 2/2] doc: output correct --help references with
 --program-prefix

* src/system.h (emit_ancillary_info): Take the invariant PROGRAM_NAME
as a parameter, so that consistent references are made to online docs
and texinfo nodes, when a --program-prefix is in place.  Note the
man pages don't need this fix as they're generated before the program
prefix is used.
* NEWS: Mention the improvements in references to online documentation.
---
 NEWS            |    6 ++++++
 src/base64.c    |    2 +-
 src/basename.c  |    2 +-
 src/cat.c       |    2 +-
 src/chcon.c     |    2 +-
 src/chgrp.c     |    2 +-
 src/chmod.c     |    2 +-
 src/chown.c     |    2 +-
 src/chroot.c    |    2 +-
 src/cksum.c     |    2 +-
 src/comm.c      |    2 +-
 src/coreutils.c |    2 +-
 src/cp.c        |    2 +-
 src/csplit.c    |    2 +-
 src/cut.c       |    2 +-
 src/date.c      |    2 +-
 src/dd.c        |    2 +-
 src/df.c        |    2 +-
 src/dircolors.c |    2 +-
 src/dirname.c   |    2 +-
 src/du.c        |    2 +-
 src/echo.c      |    2 +-
 src/env.c       |    2 +-
 src/expand.c    |    2 +-
 src/expr.c      |    2 +-
 src/factor.c    |    2 +-
 src/fmt.c       |    2 +-
 src/fold.c      |    2 +-
 src/getlimits.c |    2 +-
 src/groups.c    |    2 +-
 src/head.c      |    2 +-
 src/hostid.c    |    2 +-
 src/hostname.c  |    2 +-
 src/id.c        |    2 +-
 src/install.c   |    2 +-
 src/join.c      |    2 +-
 src/kill.c      |    2 +-
 src/link.c      |    2 +-
 src/ln.c        |    2 +-
 src/logname.c   |    2 +-
 src/ls.c        |    2 +-
 src/md5sum.c    |    2 +-
 src/mkdir.c     |    2 +-
 src/mkfifo.c    |    2 +-
 src/mknod.c     |    2 +-
 src/mktemp.c    |    2 +-
 src/mv.c        |    2 +-
 src/nice.c      |    2 +-
 src/nl.c        |    2 +-
 src/nohup.c     |    2 +-
 src/nproc.c     |    2 +-
 src/numfmt.c    |    2 +-
 src/od.c        |    2 +-
 src/paste.c     |    2 +-
 src/pathchk.c   |    2 +-
 src/pinky.c     |    2 +-
 src/pr.c        |    2 +-
 src/printenv.c  |    2 +-
 src/printf.c    |    2 +-
 src/ptx.c       |    2 +-
 src/pwd.c       |    2 +-
 src/readlink.c  |    2 +-
 src/realpath.c  |    2 +-
 src/rm.c        |    2 +-
 src/rmdir.c     |    2 +-
 src/runcon.c    |    2 +-
 src/seq.c       |    2 +-
 src/shred.c     |    2 +-
 src/shuf.c      |    2 +-
 src/sleep.c     |    2 +-
 src/sort.c      |    2 +-
 src/split.c     |    2 +-
 src/stat.c      |    2 +-
 src/stdbuf.c    |    2 +-
 src/stty.c      |    2 +-
 src/sum.c       |    2 +-
 src/sync.c      |    2 +-
 src/system.h    |    4 +---
 src/tac.c       |    2 +-
 src/tail.c      |    2 +-
 src/tee.c       |    2 +-
 src/test.c      |    2 +-
 src/timeout.c   |    2 +-
 src/touch.c     |    2 +-
 src/tr.c        |    2 +-
 src/true.c      |    2 +-
 src/truncate.c  |    2 +-
 src/tsort.c     |    2 +-
 src/tty.c       |    2 +-
 src/uname.c     |    2 +-
 src/unexpand.c  |    2 +-
 src/uniq.c      |    2 +-
 src/unlink.c    |    2 +-
 src/uptime.c    |    2 +-
 src/users.c     |    2 +-
 src/wc.c        |    2 +-
 src/who.c       |    2 +-
 src/whoami.c    |    2 +-
 src/yes.c       |    2 +-
 99 files changed, 104 insertions(+), 100 deletions(-)

diff --git a/NEWS b/NEWS
index ba0d3d7..0908f7b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,12 @@ GNU coreutils NEWS                                    -*- outline -*-
   --skip-chdir option is specified.
   [bug introduced in coreutils-8.23]
 
+** Improvements
+
+  References from --help and the man pages of utilities have been corrected
+  in various cases, and more direct links to the corresponding online
+  documentation are provided.
+
 
 * Noteworthy changes in release 8.23 (2014-07-18) [stable]
 
diff --git a/src/base64.c b/src/base64.c
index 7b4ffda..cc1e6a7 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -83,7 +83,7 @@ When decoding, the input may contain newlines in addition to the bytes of\n\
 the formal base64 alphabet.  Use --ignore-garbage to attempt to recover\n\
 from any other non-alphabet bytes in the encoded stream.\n"),
              stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/basename.c b/src/basename.c
index 9bd54d5..d98ad2f 100644
--- a/src/basename.c
+++ b/src/basename.c
@@ -73,7 +73,7 @@ Examples:\n\
   %s -a any/str1 any/str2   -> \"str1\" followed by \"str2\"\n\
 "),
               program_name, program_name, program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/cat.c b/src/cat.c
index 267864f..c7bb7e1 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -118,7 +118,7 @@ Examples:\n\
   %s        Copy standard input to standard output.\n\
 "),
               program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/chcon.c b/src/chcon.c
index 21375bc..675c2b1 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -401,7 +401,7 @@ one takes effect.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/chgrp.c b/src/chgrp.c
index 8da6a36..cec51db 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -162,7 +162,7 @@ Examples:\n\
   %s -hR staff /u  Change the group of /u and subfiles to \"staff\".\n\
 "),
               program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/chmod.c b/src/chmod.c
index a37075c..6ad8767 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -403,7 +403,7 @@ With --reference, change the mode of each FILE to that of RFILE.\n\
 \n\
 Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/chown.c b/src/chown.c
index 8036d1a..e3f931d 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -147,7 +147,7 @@ Examples:\n\
   %s -hR root /u    Change the owner of /u and subfiles to \"root\".\n\
 "),
               program_name, program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/chroot.c b/src/chroot.c
index 757573a..171ced9 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -211,7 +211,7 @@ Run COMMAND with root directory set to NEWROOT.\n\
 \n\
 If no command is given, run '${SHELL} -i' (default: '/bin/sh -i').\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/cksum.c b/src/cksum.c
index baae55a..bf37596 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -271,7 +271,7 @@ Print CRC checksum and byte counts of each FILE.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/comm.c b/src/comm.c
index b5c6840..ddb739d 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -141,7 +141,7 @@ Examples:\n\
   %s -3 file1 file2  Print lines in file1 not in file2, and vice versa.\n\
 "),
               program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/coreutils.c b/src/coreutils.c
index 57dc784..d841ae0 100644
--- a/src/coreutils.c
+++ b/src/coreutils.c
@@ -84,7 +84,7 @@ Built-in programs:\n"
 \n\
 Use: '%s --coreutils-prog=PROGRAM_NAME --help' for individual program help.\n"),
               program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/cp.c b/src/cp.c
index 60be688..791a744 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -268,7 +268,7 @@ As a special case, cp makes a backup of SOURCE when the force and backup\n\
 options are given and SOURCE and DEST are the same name for an existing,\n\
 regular file.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/csplit.c b/src/csplit.c
index f8062ea..af72d8f 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -1516,7 +1516,7 @@ Read standard input if FILE is -.  Each PATTERN may be:\n\
 \n\
 A line OFFSET is a required '+' or '-' followed by a positive integer.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/cut.c b/src/cut.c
index bdc723b..ca26f24 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -217,7 +217,7 @@ Each range is one of:\n\
 \n\
 With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/date.c b/src/date.c
index ba1918f..c39aa9a 100644
--- a/src/date.c
+++ b/src/date.c
@@ -255,7 +255,7 @@ Show the time on the west coast of the US (use tzselect(1) to find TZ)\n\
 Show the local time for 9AM next Friday on the west coast of the US\n\
   $ date --date='TZ=\"America/Los_Angeles\" 09:00 next Fri'\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/dd.c b/src/dd.c
index 71c334c..c17f7d8 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -647,7 +647,7 @@ Options are:\n\
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/df.c b/src/df.c
index a777665..ccb1f5e 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1430,7 +1430,7 @@ FIELD_LIST is a comma-separated list of columns to be included.  Valid\n\
 field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',\n\
 'size', 'used', 'avail', 'pcent', 'file' and 'target' (see info page).\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/dircolors.c b/src/dircolors.c
index 5544419..a6487ad 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -111,7 +111,7 @@ If FILE is specified, read it to determine which colors to use for which\n\
 file types and extensions.  Otherwise, a precompiled database is used.\n\
 For details on the format of these files, run 'dircolors --print-database'.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/dirname.c b/src/dirname.c
index 5a268e1..0211050 100644
--- a/src/dirname.c
+++ b/src/dirname.c
@@ -69,7 +69,7 @@ Examples:\n\
   %s stdio.h            -> \".\"\n\
 "),
               program_name, program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/du.c b/src/du.c
index 5466e17..ba20120 100644
--- a/src/du.c
+++ b/src/du.c
@@ -351,7 +351,7 @@ Summarize disk usage of each FILE, recursively for directories.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       emit_blocksize_note ("DU");
       emit_size_note ();
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/echo.c b/src/echo.c
index 63b263e..70ccb61 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -79,7 +79,7 @@ If -e is in effect, the following sequences are recognized:\n\
   \\xHH    byte with hexadecimal value HH (1 to 2 digits)\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/env.c b/src/env.c
index b776052..269c9cd 100644
--- a/src/env.c
+++ b/src/env.c
@@ -69,7 +69,7 @@ Set each NAME to VALUE in the environment and run COMMAND.\n\
 \n\
 A mere - implies -i.  If no COMMAND, print the resulting environment.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/expand.c b/src/expand.c
index bbaf0e7..a29414b 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -120,7 +120,7 @@ With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/expr.c b/src/expr.c
index bbf3251..98f52e7 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -265,7 +265,7 @@ Pattern matches return the string matched between \\( and \\) or null; if\n\
 Exit status is 0 if EXPRESSION is neither null nor 0, 1 if EXPRESSION is null\n\
 or 0, 2 if EXPRESSION is syntactically invalid, and 3 if an error occurred.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/factor.c b/src/factor.c
index f636e36..c5daf1d 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -2447,7 +2447,7 @@ are specified on the command line, read them from standard input.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/fmt.c b/src/fmt.c
index 3ee04d9..f235da9 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -296,7 +296,7 @@ The option -WIDTH is an abbreviated form of --width=DIGITS.\n\
 \n\
 With no FILE, or when FILE is -, read standard input.\n"),
              stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/fold.c b/src/fold.c
index 1f03c2e..3bc9ba2 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -81,7 +81,7 @@ standard output.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/getlimits.c b/src/getlimits.c
index 3a7d7e1..bf6c921 100644
--- a/src/getlimits.c
+++ b/src/getlimits.c
@@ -73,7 +73,7 @@ Output platform dependent limits in a format useful for shell scripts.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/groups.c b/src/groups.c
index c904f32..cce79f5 100644
--- a/src/groups.c
+++ b/src/groups.c
@@ -58,7 +58,7 @@ the current process (which may differ if the groups database has changed).\n"),
              stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/head.c b/src/head.c
index 09bc33d..d2f1fce 100644
--- a/src/head.c
+++ b/src/head.c
@@ -134,7 +134,7 @@ K may have a multiplier suffix:\n\
 b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
 GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/hostid.c b/src/hostid.c
index 8671812..a08a299 100644
--- a/src/hostid.c
+++ b/src/hostid.c
@@ -46,7 +46,7 @@ Print the numeric identifier (in hexadecimal) for the current host.\n\
 "), program_name);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/hostname.c b/src/hostname.c
index 9ef7598..2168170 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -62,7 +62,7 @@ Print or set the hostname of the current system.\n\
              program_name, program_name);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/id.c b/src/id.c
index 33445a0..653b8e5 100644
--- a/src/id.c
+++ b/src/id.c
@@ -104,7 +104,7 @@ or (when USER omitted) for the current user.\n\
 \n\
 Without any OPTION, print some useful set of identified information.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/install.c b/src/install.c
index db4ee45..43a735d 100644
--- a/src/install.c
+++ b/src/install.c
@@ -668,7 +668,7 @@ the VERSION_CONTROL environment variable.  Here are the values:\n\
   existing, nil   numbered if numbered backups exist, simple otherwise\n\
   simple, never   always make simple backups\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/join.c b/src/join.c
index 965ab49..4bb27c8 100644
--- a/src/join.c
+++ b/src/join.c
@@ -239,7 +239,7 @@ Note, comparisons honor the rules specified by 'LC_COLLATE'.\n\
 If the input is not sorted and some lines cannot be joined, a\n\
 warning message will be given.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/kill.c b/src/kill.c
index 4ab86a4..e25cadf 100644
--- a/src/kill.c
+++ b/src/kill.c
@@ -99,7 +99,7 @@ or the exit status of a process terminated by a signal.\n\
 PID is an integer; if negative it identifies a process group.\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/link.c b/src/link.c
index 6f3a297..d47cef2 100644
--- a/src/link.c
+++ b/src/link.c
@@ -50,7 +50,7 @@ Usage: %s FILE1 FILE2\n\
              stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/ln.c b/src/ln.c
index 5140e92..ce812cc 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -452,7 +452,7 @@ the VERSION_CONTROL environment variable.  Here are the values:\n\
 Using -s ignores -L and -P.  Otherwise, the last option specified controls\n\
 behavior when a TARGET is a symbolic link, defaulting to %s.\n\
 "), LINK_FOLLOWS_SYMLINKS ? "-L" : "-P");
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/logname.c b/src/logname.c
index 368c4c9..e6281ec 100644
--- a/src/logname.c
+++ b/src/logname.c
@@ -43,7 +43,7 @@ Print the name of the current user.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/ls.c b/src/ls.c
index 94276b6..8b5b2cf 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4948,7 +4948,7 @@ Exit status:\n\
  1  if minor problems (e.g., cannot access subdirectory),\n\
  2  if serious trouble (e.g., cannot access command-line argument).\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/md5sum.c b/src/md5sum.c
index cd27e80..5167f8b 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -210,7 +210,7 @@ should be a former output of this program.  The default mode is to print\n\
 a line with checksum, a character indicating input mode ('*' for binary,\n\
 space for text), and name for each FILE.\n"),
               DIGEST_REFERENCE);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/mkdir.c b/src/mkdir.c
index 70bca07..7b96e1c 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -75,7 +75,7 @@ Create the DIRECTORY(ies), if they do not already exist.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 6324729..0a611e9 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -67,7 +67,7 @@ Create named pipes (FIFOs) with the given NAMEs.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/mknod.c b/src/mknod.c
index 797e6bb..0298385 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -83,7 +83,7 @@ otherwise, as decimal.  TYPE may be:\n\
   p      create a FIFO\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/mktemp.c b/src/mktemp.c
index d36e502..00174c7 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -96,7 +96,7 @@ Files are created u+rw, and directories u+rwx, minus umask restrictions.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/mv.c b/src/mv.c
index b71d210..6112419 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -336,7 +336,7 @@ the VERSION_CONTROL environment variable.  Here are the values:\n\
   existing, nil   numbered if numbered backups exist, simple otherwise\n\
   simple, never   always make simple backups\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/nice.c b/src/nice.c
index 91e8f99..985c124 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -85,7 +85,7 @@ With no COMMAND, print the current niceness.  Niceness values range from\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/nl.c b/src/nl.c
index d45dcbd..7fc1134 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -223,7 +223,7 @@ FORMAT is one of:\n\
   rz   right justified, leading zeros\n\
 \n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/nohup.c b/src/nohup.c
index 13bb045..85bd805 100644
--- a/src/nohup.c
+++ b/src/nohup.c
@@ -70,7 +70,7 @@ If standard error is a terminal, redirect it to standard output.\n\
 To save output to FILE, use '%s COMMAND > FILE'.\n"),
               program_name);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/nproc.c b/src/nproc.c
index 44ee483..e1bc1d0 100644
--- a/src/nproc.c
+++ b/src/nproc.c
@@ -67,7 +67,7 @@ which may be less than the number of online processors\n\
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/numfmt.c b/src/numfmt.c
index ff2e41d..2ad441f 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -938,7 +938,7 @@ Examples:\n\
               program_name, program_name, program_name,
               program_name, program_name, program_name,
               program_name, program_name, program_name);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/od.c b/src/od.c
index c32d785..18b1683 100644
--- a/src/od.c
+++ b/src/od.c
@@ -414,7 +414,7 @@ BYTES is hex with 0x or 0X prefix, and may have a multiplier suffix:\n\
   M    1024*1024\n\
 and so on for G, T, P, E, Z, Y.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/paste.c b/src/paste.c
index 8f8f465..2ca75d0 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -451,7 +451,7 @@ With no FILE, or when FILE is -, read standard input.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       /* FIXME: add a couple of examples.  */
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/pathchk.c b/src/pathchk.c
index 3cb8bef..b287864 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -96,7 +96,7 @@ Diagnose invalid or unportable file names.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/pinky.c b/src/pinky.c
index 154b6aa..4e8a3e1 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -515,7 +515,7 @@ usage (int status)
 A lightweight 'finger' program;  print user information.\n\
 The utmp file will be %s.\n\
 "), UTMP_FILE);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/pr.c b/src/pr.c
index a3dc9bf..39be8be 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -2853,7 +2853,7 @@ Paginate or columnate FILE(s) for printing.\n\
 -t is implied if PAGE_LENGTH <= 10.  With no FILE, or when FILE is -, read\n\
 standard input.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/printenv.c b/src/printenv.c
index 0646c70..20ec2be 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -72,7 +72,7 @@ If no VARIABLE is specified, print name and value pairs for them all.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/printf.c b/src/printf.c
index 3d303be..4dd70aa 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -129,7 +129,7 @@ and all C format specifications ending with one of diouxXfeEgGcs, with\n\
 ARGUMENTs converted to proper type first.  Variable widths are handled.\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/ptx.c b/src/ptx.c
index 39ac5e4..c1429eb 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -1858,7 +1858,7 @@ Output a permuted index, including context, of the words in the input files.\n\
 \n\
 With no FILE, or when FILE is -, read standard input.  Default is '-F /'.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/pwd.c b/src/pwd.c
index 9bbd787..831cc05 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -68,7 +68,7 @@ Print the full filename of the current working directory.\n\
 If no option is specified, -P is assumed.\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/readlink.c b/src/readlink.c
index d63f07b..184f8f0 100644
--- a/src/readlink.c
+++ b/src/readlink.c
@@ -85,7 +85,7 @@ usage (int status)
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/realpath.c b/src/realpath.c
index 930530c..38edb9f 100644
--- a/src/realpath.c
+++ b/src/realpath.c
@@ -88,7 +88,7 @@ all but the last component must exist\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/rm.c b/src/rm.c
index 7ab1c07..f7adf5b 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -180,7 +180,7 @@ Note that if you use rm to remove a file, it might be possible to recover\n\
 some of its contents, given sufficient expertise and/or time.  For greater\n\
 assurance that the contents are truly unrecoverable, consider using shred.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/rmdir.c b/src/rmdir.c
index 6bdfb0f..961fea8 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -177,7 +177,7 @@ Remove the DIRECTORY(ies), if they are empty.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/runcon.c b/src/runcon.c
index efe83f2..e5cf8c7 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -102,7 +102,7 @@ With neither CONTEXT nor COMMAND, print the current security context.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/seq.c b/src/seq.c
index 7943824..39a3001 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -98,7 +98,7 @@ FORMAT must be suitable for printing one argument of type 'double';\n\
 it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed point\n\
 decimal numbers with maximum precision PREC, and to %g otherwise.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/shred.c b/src/shred.c
index d17c870..b235b29 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -243,7 +243,7 @@ In addition, file system backups and remote mirrors may contain copies\n\
 of the file that cannot be removed, and that will allow a shredded file\n\
 to be recovered later.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/shuf.c b/src/shuf.c
index 915f7b7..df0092b 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -87,7 +87,7 @@ Write a random permutation of the input lines to standard output.\n\
 \n\
 With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/sleep.c b/src/sleep.c
index 10fd989..027546f 100644
--- a/src/sleep.c
+++ b/src/sleep.c
@@ -54,7 +54,7 @@ specified by the sum of their values.\n\
               program_name, program_name);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/sort.c b/src/sort.c
index deb7c3a..2e697dd 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -531,7 +531,7 @@ The locale specified by the environment affects sort order.\n\
 Set LC_ALL=C to get the traditional sort order that uses\n\
 native byte values.\n\
 "), stdout );
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/split.c b/src/split.c
index 36295c4..9b238e4 100644
--- a/src/split.c
+++ b/src/split.c
@@ -241,7 +241,7 @@ l/K/N   output Kth of N to stdout without splitting lines\n\
 r/N     like 'l' but use round robin distribution\n\
 r/K/N   likewise but only output Kth of N to stdout\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/stat.c b/src/stat.c
index c78ab70..a739ae7 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1491,7 +1491,7 @@ Valid format sequences for file systems:\n\
   %T   file system type in human readable form\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/stdbuf.c b/src/stdbuf.c
index c8398ab..d9cf02b 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -119,7 +119,7 @@ for e.g.) then that will override corresponding settings changed by 'stdbuf'.\n\
 Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O,\n\
 and are thus unaffected by 'stdbuf' settings.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/stty.c b/src/stty.c
index 4843b9b..9e4c530 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -732,7 +732,7 @@ prints baud rate, line discipline, and deviations from stty sane.  In\n\
 settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or\n\
 127; special values ^- or undef used to disable special characters.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/sum.c b/src/sum.c
index 5c502ce..f7a19f1 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -71,7 +71,7 @@ Print checksum and block counts for each FILE.\n\
 \n\
 With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/sync.c b/src/sync.c
index b706fbe..17e792e 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -44,7 +44,7 @@ Force changed blocks to disk, update the super block.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/system.h b/src/system.h
index b5bbec2..8b3f768 100644
--- a/src/system.h
+++ b/src/system.h
@@ -565,10 +565,8 @@ Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\
 }
 
 static inline void
-emit_ancillary_info (void)
+emit_ancillary_info (char const *program)
 {
-  char const *program = last_component (program_name);
-
   struct infomap { char const *program; char const *node; } const infomap[] = {
     { "[", "test invocation" },
     { "coreutils", "Multi-call invocation" },
diff --git a/src/tac.c b/src/tac.c
index ba055a0..192dbd3 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -148,7 +148,7 @@ With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/tail.c b/src/tail.c
index 7dd3f4a..f5d2585 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -321,7 +321,7 @@ track the actual name of the file, not the file descriptor (e.g., log\n\
 rotation).  Use --follow=name in that case.  That causes tail to track the\n\
 named file in a way that accommodates renaming, removal and creation.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/tee.c b/src/tee.c
index 821d825..9144f4f 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -72,7 +72,7 @@ Copy standard input to each FILE, and also to standard output.\n\
 \n\
 If a FILE is -, copy again to standard output.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/test.c b/src/test.c
index 24bcb93..cee90ff 100644
--- a/src/test.c
+++ b/src/test.c
@@ -791,7 +791,7 @@ NOTE: [ honors the --help and --version options, but test does not.\n\
 test treats each of those as it treats any other nonempty STRING.\n\
 "), stdout);
       printf (USAGE_BUILTIN_WARNING, _("test and/or ["));
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/timeout.c b/src/timeout.c
index c4cc074..9501ba8 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -266,7 +266,7 @@ is specified, send the TERM signal upon timeout.  The TERM signal kills\n\
 any process that does not block or catch that signal.  It may be necessary\n\
 to use the KILL (9) signal, since this signal cannot be caught, in which\n\
 case the exit status is 128+9 rather than 124.\n"), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/touch.c b/src/touch.c
index b128e88..1f8d8b6 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -247,7 +247,7 @@ change the times of the file associated with standard output.\n\
 \n\
 Note that the -d and -t options accept different time-date formats.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/tr.c b/src/tr.c
index 5905a63..3ceb2e0 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -346,7 +346,7 @@ only be used in pairs to specify case conversion.  -s uses SET1 if not\n\
 translating nor deleting; else squeezing uses SET2 and occurs after\n\
 translation or deletion.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/true.c b/src/true.c
index ea4833a..0008198 100644
--- a/src/true.c
+++ b/src/true.c
@@ -47,7 +47,7 @@ Usage: %s [ignored command line arguments]\n\
   fputs (HELP_OPTION_DESCRIPTION, stdout);
   fputs (VERSION_OPTION_DESCRIPTION, stdout);
   printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
-  emit_ancillary_info ();
+  emit_ancillary_info (PROGRAM_NAME);
   exit (status);
 }
 
diff --git a/src/truncate.c b/src/truncate.c
index 44d0b96..f06668d 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -122,7 +122,7 @@ reads as zero bytes.\n\
 SIZE may also be prefixed by one of the following modifying characters:\n\
 '+' extend by, '-' reduce by, '<' at most, '>' at least,\n\
 '/' round down to multiple of, '%' round up to multiple of.\n"), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/tsort.c b/src/tsort.c
index 8380ce8..02e7797 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -87,7 +87,7 @@ With no FILE, or when FILE is -, read standard input.\n\
 "), program_name);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
 
   exit (status);
diff --git a/src/tty.c b/src/tty.c
index f8c2554..d6aed19 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -69,7 +69,7 @@ Print the file name of the terminal connected to standard input.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/uname.c b/src/uname.c
index 3cc3cba..1ddaa34 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -148,7 +148,7 @@ Print machine architecture.\n\
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/unexpand.c b/src/unexpand.c
index 03c9a2e..e39cb9a 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -129,7 +129,7 @@ With no FILE, or when FILE is -, read standard input.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/uniq.c b/src/uniq.c
index 358d06c..08281b8 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -220,7 +220,7 @@ Note: 'uniq' does not detect repeated lines unless they are adjacent.\n\
 You may want to sort the input first, or use 'sort -u' without 'uniq'.\n\
 Also, comparisons honor the rules specified by 'LC_COLLATE'.\n\
 "), stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/unlink.c b/src/unlink.c
index a05aa32..c1e282d 100644
--- a/src/unlink.c
+++ b/src/unlink.c
@@ -49,7 +49,7 @@ Usage: %s FILE\n\
              stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/uptime.c b/src/uptime.c
index 93931d2..30d6221 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -217,7 +217,7 @@ If FILE is not specified, use %s.  %s as FILE is common.\n\
               UTMP_FILE, WTMP_FILE);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/users.c b/src/users.c
index a0dce19..5ce5e8b 100644
--- a/src/users.c
+++ b/src/users.c
@@ -111,7 +111,7 @@ If FILE is not specified, use %s.  %s as FILE is common.\n\
               UTMP_FILE, WTMP_FILE);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/wc.c b/src/wc.c
index 2048025..1ff007d 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -134,7 +134,7 @@ the following order: newline, word, character, byte, maximum line length.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/who.c b/src/who.c
index 23e2511..b86bde6 100644
--- a/src/who.c
+++ b/src/who.c
@@ -675,7 +675,7 @@ Print information about users who are currently logged in.\n\
 If FILE is not specified, use %s.  %s as FILE is common.\n\
 If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.\n\
 "), UTMP_FILE, WTMP_FILE);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/whoami.c b/src/whoami.c
index 5ec0dc1..3836317 100644
--- a/src/whoami.c
+++ b/src/whoami.c
@@ -49,7 +49,7 @@ Same as id -un.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
diff --git a/src/yes.c b/src/yes.c
index e5957b9..c950c05 100644
--- a/src/yes.c
+++ b/src/yes.c
@@ -50,7 +50,7 @@ Repeatedly output a line with all specified STRING(s), or 'y'.\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-      emit_ancillary_info ();
+      emit_ancillary_info (PROGRAM_NAME);
     }
   exit (status);
 }
-- 
1.7.7.6

