summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2023-02-13 20:23:54 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2023-02-13 20:46:48 +0100
commit7836aa1defdec563bed2434f03543f1d054017b8 (patch)
treed6cbf4b24685d5b778ea5c2c8b533ebf74a845d1
parentda65ab1e6987bb706d67b8f5b3dccfc7164d0df1 (diff)
downloadfindutils-7836aa1defdec563bed2434f03543f1d054017b8.tar.gz
doc: use "end-of-file" with hyphenation consistently
* cfg.mk (sc_prohibit_unhyphenated_eof): Add syntax-check rule. * doc/find.texi: Change "end of file" to "end-of-file" in several places. * xargs/xargs.1: Likewise. * xargs/xargs.c (eof_str): Change comment to adhere to the new rule.
-rw-r--r--cfg.mk6
-rw-r--r--doc/find.texi12
-rw-r--r--xargs/xargs.110
-rw-r--r--xargs/xargs.c3
4 files changed, 18 insertions, 13 deletions
diff --git a/cfg.mk b/cfg.mk
index 3926bbe8..a98c2f99 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -273,6 +273,12 @@ sc_preprocessor_indentation:
exclude_file_name_regexp--sc_prohibit_test_backticks = \
^tests/(local\.mk|init\.sh)$$
+# Ensure to use hyphenated "end-of-file".
+sc_prohibit_unhyphenated_eof:
+ @prohibit='end[^-]of[^-]file' \
+ halt='use "end-of-file", not "e''nd of file"' \
+ $(_sc_search_regexp)
+
# Now that we have better tests, make this the default.
export VERBOSE = yes
diff --git a/doc/find.texi b/doc/find.texi
index c634fa72..e43eede7 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -3890,7 +3890,7 @@ file string, which is treated like any other argument.
Input file names are terminated by the specified character @var{delim}
instead of by whitespace, and any quotes and backslash characters are
not considered special (every character is taken literally). Disables
-the logical end of file marker string, which is treated like any other
+the logical end-of-file marker string, which is treated like any other
argument.
The specified delimiter may be a single character, a C-style character
@@ -3902,17 +3902,17 @@ Octal and hexadecimal escape codes are understood as for the
@itemx --eof@r{[}=@var{eof-str}@r{]}
@itemx -e@r{[}@var{eof-str}@r{]}
-Set the logical end of file marker string to @var{eof-str}. If the
-logical end of file marker string occurs as a line of input, the rest of
+Set the logical end-of-file marker string to @var{eof-str}. If the
+logical end-of-file marker string occurs as a line of input, the rest of
the input is ignored. If @var{eof-str} is omitted (@samp{-e}) or blank
-(either @samp{-e} or @samp{-E}), there is no logical end of file marker
+(either @samp{-e} or @samp{-E}), there is no logical end-of-file marker
string. The @samp{-e} form of this option is deprecated in favour of
the POSIX-compliant @samp{-E} option, which you should use instead. As
of GNU @code{xargs} version 4.2.9, the default behaviour of @code{xargs}
-is not to have a logical end of file marker string. The POSIX standard
+is not to have a logical end-of-file marker string. The POSIX standard
(IEEE Std 1003.1, 2004 Edition) allows this.
-The logical end of file marker string is not treated specially if the
+The logical end-of-file marker string is not treated specially if the
@samp{-d} or the @samp{-0} options are in effect. That is, when either
of these options are in effect, the whole input file will be read even
if @samp{-E} was used.
diff --git a/xargs/xargs.1 b/xargs/xargs.1
index 2d6f4901..87450992 100644
--- a/xargs/xargs.1
+++ b/xargs/xargs.1
@@ -68,7 +68,7 @@ message is issued on stderr when this happens.
.B \-0, \-\-null
Input items are terminated by a null character instead of by
whitespace, and the quotes and backslash are not special (every
-character is taken literally). Disables the end of file string, which
+character is taken literally). Disables the end-of-file string, which
is treated like any other argument. Useful when input items might
contain white space, quote marks, or backslashes. The GNU find
\-print0 option produces input suitable for this mode.
@@ -104,13 +104,13 @@ where this is possible.
.TP
.BI \-E " eof-str"
-Set the end of file string to \fIeof-str\fR. If the end of file
+Set the end-of-file string to \fIeof-str\fR. If the end-of-file
string occurs as a line of input, the rest of the input is ignored.
If neither
.B \-E
nor
.B \-e
-is used, no end of file string is used.
+is used, no end-of-file string is used.
.TP
.BR \-e "[\fIeof-str\fR], " "\-\-eof" [\fI=eof-str\fR]
This option is a synonym for the
@@ -119,11 +119,11 @@ option. Use
.B \-E
instead,
because it is POSIX compliant while this option is not. If
-\fIeof-str\fR is omitted, there is no end of file string. If neither
+\fIeof-str\fR is omitted, there is no end-of-file string. If neither
.B \-E
nor
.B \-e
-is used, no end of file string is used.
+is used, no end-of-file string is used.
.TP
.BI \-I " replace-str"
Replace occurrences of \fIreplace-str\fR in the initial-arguments with
diff --git a/xargs/xargs.c b/xargs/xargs.c
index e09fda81..bced9e73 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -101,8 +101,7 @@ static struct buildcmd_control bc_ctl;
static int nullwarning_given = 0;
-/* If nonzero, when this string is read on stdin it is treated as
- end of file.
+/* If nonzero, when this string is read on stdin, then it is treated as EOF.
IEEE Std 1003.1, 2004 Edition allows this to be NULL.
In findutils releases up to and including 4.2.8, this was "_".
*/