doc: mention the texinfo documentation in --help

* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
This commit is contained in:
Pádraig Brady 2009-09-18 23:06:21 +01:00
parent c48003a53c
commit 5d4f09d83a
97 changed files with 116 additions and 99 deletions

View File

@ -373,6 +373,7 @@ my $PAT_AUTHOR = _('Written +by');
my $PAT_OPTIONS = _('Options');
my $PAT_EXAMPLES = _('Examples');
my $PAT_FREE_SOFTWARE = _('This +is +free +software');
my $PAT_INFO = _('For +complete +documentation');
# Start a new paragraph (if required) for these.
s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR)/$1\n\n$2/og;
@ -392,6 +393,11 @@ while (length)
$sect = _('EXAMPLES');
next;
}
# Skip any texinfo reference as that's handled separately
if (s/($PAT_INFO).*\n//o)
{
next;
}
# Copyright section
if (/^Copyright +[(\xa9]/)

View File

@ -81,7 +81,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -66,7 +66,7 @@ Examples:\n\
%s include/stdio.h .h Output \"stdio\".\n\
"),
program_name, program_name);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -119,7 +119,7 @@ Examples:\n\
%s Copy standard input to standard output.\n\
"),
program_name, program_name);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -380,7 +380,7 @@ one takes effect.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -158,7 +158,7 @@ Examples:\n\
%s -hR staff /u Change the group of /u and subfiles to \"staff\".\n\
"),
program_name, program_name);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -379,7 +379,7 @@ Change the mode of each FILE to MODE.\n\
\n\
Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -153,7 +153,7 @@ Examples:\n\
%s -hR root /u Change the owner of /u and subfiles to \"root\".\n\
"),
program_name, program_name, program_name);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -142,7 +142,7 @@ Run COMMAND with root directory set to NEWROOT.\n\
\n\
If no command is given, run ``${SHELL} -i'' (default: /bin/sh).\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -269,7 +269,7 @@ Print CRC checksum and byte counts of each FILE.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -23,6 +23,7 @@
#include "system.h"
#include "linebuffer.h"
#include "error.h"
#include "hard-locale.h"
#include "quote.h"
#include "stdio--.h"
#include "memcmp2.h"
@ -140,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -257,7 +257,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -1481,7 +1481,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -235,7 +235,7 @@ Each range is one of:\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -236,7 +236,7 @@ then an optional modifier, which is either\n\
E to use the locale's alternate representations if available, or\n\
O to use the locale's alternate numeric symbols if available.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -575,7 +575,7 @@ Options are:\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -835,7 +835,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_blocksize_note ("DF");
emit_size_note ();
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -112,7 +112,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -61,7 +61,7 @@ Examples:\n\
%s stdio.h Output \".\".\n\
"),
program_name, program_name);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -332,7 +332,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_blocksize_note ("DU");
emit_size_note ();
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -77,7 +77,7 @@ If -e is in effect, the following sequences are recognized:\n\
\\v vertical tab\n\
"), stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -125,7 +125,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -121,7 +121,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -502,7 +502,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -293,7 +293,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
\n\
With no FILE, or when FILE is -, read standard input.\n"),
stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -82,7 +82,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -138,7 +138,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -48,7 +48,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -63,7 +63,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -98,7 +98,7 @@ or (when USERNAME omitted) for the current user.\n\
\n\
Without any OPTION, print some useful set of identified information.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -1005,7 +1005,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -24,6 +24,7 @@
#include "system.h"
#include "error.h"
#include "hard-locale.h"
#include "linebuffer.h"
#include "memcasecmp.h"
#include "quote.h"
@ -208,7 +209,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -111,7 +111,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -51,7 +51,7 @@ Usage: %s FILE1 FILE2\n\
stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -397,7 +397,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -44,7 +44,7 @@ Print the name of the current user.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -93,6 +93,7 @@
#include "dev-ino.h"
#include "error.h"
#include "filenamecat.h"
#include "hard-locale.h"
#include "hash.h"
#include "human.h"
#include "filemode.h"
@ -4681,7 +4682,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -195,7 +195,7 @@ should be a former output of this program. The default mode is to print\n\
a line with checksum, a character indicating type (`*' for binary, ` ' for\n\
text), and name for each FILE.\n"),
DIGEST_REFERENCE);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -71,7 +71,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -65,7 +65,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -81,7 +81,7 @@ otherwise, as decimal. TYPE may be:\n\
p create a FIFO\n\
"), stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -95,7 +95,7 @@ If TEMPLATE is not specified, use tmp.XXXXXXXXXX.\n\
fputs ("\n", stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -330,7 +330,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -81,7 +81,7 @@ With no COMMAND, print the current niceness. Nicenesses range from\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -231,7 +231,7 @@ FORMAT is one of:\n\
rz right justified, leading zeros\n\
\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -71,7 +71,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -394,7 +394,7 @@ output line.\n\
Option --string without a number implies 3; option --width without a number\n\
implies 32. By default, od uses -A o -t oS -w16.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -450,7 +450,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
/* FIXME: add a couple of examples. */
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -104,7 +104,7 @@ Diagnose invalid or unportable file names.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -26,6 +26,7 @@
#include "canon-host.h"
#include "error.h"
#include "hard-locale.h"
#include "readutmp.h"
/* The official name of this program (e.g., no `g' prefix). */
@ -526,7 +527,7 @@ usage (int status)
A lightweight `finger' program; print user information.\n\
The utmp file will be %s.\n\
"), UTMP_FILE);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -314,6 +314,7 @@
#include <sys/types.h>
#include "system.h"
#include "error.h"
#include "hard-locale.h"
#include "mbswidth.h"
#include "quote.h"
#include "stat-time.h"
@ -2870,7 +2871,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-t is implied if PAGE_LENGTH <= 10. With no FILE, or when\n\
FILE is -, read standard input.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -66,7 +66,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -130,7 +130,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -1923,7 +1923,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
\n\
With no FILE or if FILE is -, read Standard Input. `-F /' by default.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -66,7 +66,7 @@ Print the full filename of the current working directory.\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -82,7 +82,7 @@ usage (int status)
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -180,7 +180,7 @@ Note that if you use rm to remove a file, it is usually possible to recover\n\
the contents of that file. If you want more assurance that the contents are\n\
truly unrecoverable, consider using shred.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -99,7 +99,7 @@ With neither CONTEXT nor COMMAND, print the current security context.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -94,7 +94,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -67,7 +67,7 @@ This program is useful only when run by root (user ID zero).\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -229,7 +229,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -71,7 +71,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -56,7 +56,7 @@ specified by the sum of their values.\n\
program_name, program_name);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -30,6 +30,7 @@
#include "argmatch.h"
#include "error.h"
#include "filevercmp.h"
#include "hard-locale.h"
#include "hash.h"
#include "md5.h"
#include "physmem.h"
@ -414,7 +415,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -127,7 +127,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_size_note ();
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -983,7 +983,7 @@ Valid format sequences for file systems:\n\
%T Type in human readable form\n\
"), stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -125,7 +125,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -724,7 +724,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -395,7 +395,7 @@ Change the effective user id and group id to that of USER.\n\
\n\
A mere - implies -l. If USER not given, assume root.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -72,7 +72,7 @@ Print checksum and block counts for each FILE.\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -45,7 +45,7 @@ Force changed blocks to disk, update the super block.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -635,9 +635,8 @@ Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\
"), program);
}
#include "hard-locale.h"
static inline void
emit_bug_reporting_address (void)
emit_ancillary_info (void)
{
printf (_("\nReport %s bugs to %s\n"), last_component (program_name),
PACKAGE_BUGREPORT);
@ -646,8 +645,10 @@ emit_bug_reporting_address (void)
PACKAGE_NAME, PACKAGE);
fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
stdout);
if (hard_locale (LC_MESSAGES))
/* Don't output this redundant message for English locales.
Note we still output for 'C' so that it gets included in the man page. */
const char *lc_messages = setlocale (LC_MESSAGES, NULL);
if (lc_messages && strncmp (lc_messages, "en_", 3))
{
/* TRANSLATORS: Replace LANG_CODE in this URL with your language code
<http://translationproject.org/team/LANG_CODE.html> to form one of
@ -657,6 +658,8 @@ emit_bug_reporting_address (void)
"<http://translationproject.org/team/>\n"),
last_component (program_name));
}
printf (_("For complete documentation, run: "
"info coreutils '%s invocation'\n"), last_component (program_name));
}
#include "inttostr.h"

View File

@ -149,7 +149,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -317,7 +317,7 @@ rotation). Use --follow=name in that case. That causes tail to track the\n\
named file by reopening it periodically to see if it has been removed and\n\
recreated by some other program.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -770,7 +770,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -158,7 +158,7 @@ with the status of COMMAND. If no signal is specified, send the TERM\n\
signal upon timeout. The TERM signal kills any process that does not\n\
block or catch that signal. For other processes, it may be necessary to\n\
use the KILL (9) signal, since this signal cannot be caught.\n"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -263,7 +263,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
\n\
Note that the -d and -t options accept different time-date formats.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
exit (status);
}

View File

@ -133,7 +133,7 @@ SIZE may also be prefixed by one of the following modifying characters:\n\
\n\
Note that the -r and -s options are mutually exclusive.\n\
"), stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);

View File

@ -70,7 +70,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -150,7 +150,7 @@ Print machine architecture.\n\
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -130,7 +130,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -26,6 +26,7 @@
#include "argmatch.h"
#include "linebuffer.h"
#include "error.h"
#include "hard-locale.h"
#include "posixver.h"
#include "quote.h"
#include "xmemcoll.h"
@ -174,7 +175,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -50,7 +50,7 @@ Usage: %s FILE\n\
stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -216,7 +216,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -112,7 +112,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -131,7 +131,7 @@ read standard input.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -34,6 +34,7 @@
#include "canon-host.h"
#include "readutmp.h"
#include "error.h"
#include "hard-locale.h"
#include "quote.h"
/* The official name of this program (e.g., no `g' prefix). */
@ -665,7 +666,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -51,7 +51,7 @@ Same as id -un.\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}

View File

@ -51,7 +51,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_bug_reporting_address ();
emit_ancillary_info ();
}
exit (status);
}