* cfg.mk (sc_standard_outputs): Add a grep command for source files.
* src/du.c (main): Use standard input instead of stdin, standard output
instead of stdout, and standard error instead of stderr in messages.
* src/nohup.c (main): Likewise.
* src/sort.c (main): Likewise.
* src/split.c (main): Likewise.
* src/stdbuf.c (main): Likewise.
* src/wc.c (main): Likewise.
* tests/du/files0-from.pl (@Tests): Adjust test case to new messages.
* tests/sort/sort-files0-from.pl: Likewise.
* tests/wc/wc-files0-from.pl: Likewise.
&& { echo 1>&2 '$@: use "standard ....." in user docs'; exit 1; } || :
@grep -E '[Ss]tandard (in|out|err)([^op]|$$)' man/*.1 doc/*.texi \
&& { echo 1>&2 '$@: use "standard ..put" in user docs'; exit 1; } || :
+ @grep -E '_\("[^"]*std(in|out|err)' src/*.c \
+ && { echo 1>&2 '$@: use "standard ..put" in messages'; exit 1; } || :
# Option descriptions should not start with a capital letter.
# One could grep source directly as follows:
{
/* Give a better diagnostic in an unusual case:
printf - | du --files0-from=- */
- error (0, 0, _("when reading file names from stdin, "
+ error (0, 0, _("when reading file names from standard input, "
"no file name of %s allowed"),
quoteaf (file_name));
skip_file = true;
if (!redirecting_stdout)
error (0, 0,
_(ignoring_input
- ? N_("ignoring input and redirecting stderr to stdout")
- : N_("redirecting stderr to stdout")));
+ ? N_("ignoring input and redirecting standard error "
+ "to standard output")
+ : N_("redirecting standard error to standard output")));
if (dup2 (out_fd, STDERR_FILENO) < 0)
error (exit_internal_failure, errno,
for (size_t i = 0; i < nfiles; i++)
{
if (STREQ (files[i], "-"))
- error (SORT_FAILURE, 0, _("when reading file names from stdin, "
+ error (SORT_FAILURE, 0, _("when reading file names from "
+ "standard input, "
"no file name of %s allowed"),
quoteaf (files[i]));
else if (files[i][0] == '\0')
if (k_units != 0 && filter_command)
{
- error (0, 0, _("--filter does not process a chunk extracted to stdout"));
+ error (0, 0, _("--filter does not process a chunk extracted to "
+ "standard output"));
usage (EXIT_FAILURE);
}
/* -oL will be by far the most common use of this utility,
but one could easily think -iL might have the same affect,
so disallow it as it could be confusing. */
- error (0, 0, _("line buffering stdin is meaningless"));
+ error (0, 0, _("line buffering standard input is meaningless"));
usage (EXIT_CANCELED);
}
{
/* Give a better diagnostic in an unusual case:
printf - | wc --files0-from=- */
- error (0, 0, _("when reading file names from stdin, "
+ error (0, 0, _("when reading file names from standard input, "
"no file name of %s allowed"),
quoteaf (file_name));
skip_file = true;
# input file name of '-'
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>1},
- {ERR => "$prog: when reading file names from stdin, no file name of"
- . " '-' allowed\n"}],
+ {ERR => "$prog: when reading file names from standard input, "
+ . "no file name of '-' allowed\n"}],
# empty input, regular file
['empty', '--files0-from=@AUX@', {AUX=>''}],
# input file name of '-'
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>2},
- {ERR => "$prog: when reading file names from stdin, no file name of"
- . " '-' allowed\n"}],
+ {ERR => "$prog: when reading file names from standard input, "
+ . "no file name of '-' allowed\n"}],
# empty input, regular file
['empty', '--files0-from=@AUX@', {AUX=>''}, {EXIT=>2},
# input file name of '-'
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>1},
- {ERR => "$prog: when reading file names from stdin, no file name of"
- . " '-' allowed\n"}],
+ {ERR => "$prog: when reading file names from standard input, "
+ . "no file name of '-' allowed\n"}],
# empty input, regular file
['empty', '--files0-from=@AUX@', {AUX=>''}],