]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
coreutils: keep lines within 80-column limits
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Dec 2010 20:28:48 +0000 (12:28 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Dec 2010 20:30:42 +0000 (12:30 -0800)
* cfg.mk (LINE_LEN_MAX, FILTER_LONG_LINES): New macros.
(sc_long_lines): New rule.
* HACKING: Use shorter URLs to the same material.
* doc/Makefile.am, doc/coreutils.texi, m4/boottime.m4:
* man/help2man, man/stdbuf.x, src/Makefile.am, src/cat.c, src/copy.c:
* src/cp.c, src/dd.c, src/df.c, src/du.c, src/groups.c, src/install.c:
* src/ls.c, src/md5sum.c, src/mv.c, src/od.c, src/pinky.c, src/ptx.c:
* src/readlink.c, src/remove.c, src/rmdir.c, src/setuidgid.c:
* src/sort.c, src/tail.c, src/touch.c, tests/Coreutils.pm:
* tests/cp/existing-perm-race, tests/cp/perm, tests/cp/preserve-gid:
* tests/du/2g, tests/du/long-from-unreadable, tests/init.sh:
* tests/install/basic-1, tests/ls/nameless-uid:
* tests/ls/readdir-mountpoint-inode, tests/misc/chroot-credentials:
* tests/misc/cut, tests/misc/date, tests/misc/join, tests/misc/md5sum:
* tests/misc/sha1sum, tests/misc/sha224sum, tests/misc/sort:
* tests/misc/sort-continue, tests/misc/sort-files0-from:
* tests/misc/sort-rand, tests/misc/stdbuf, tests/misc/tr:
* tests/misc/uniq, tests/mv/atomic, tests/mv/part-fail:
* tests/mv/part-symlink, tests/mv/sticky-to-xpart, tests/pr/pr-tests:
* tests/rm/fail-2eperm, tests/rm/interactive-always:
Reformat to fit within 80 columns.
* doc/Makefile.am (BAD_POSIX_PERL): New macro.
* doc/coreutils.texi: Reword slightly, to make menus and
index lines shorter.
* src/md5sum.c: Redo --help output so that it fits within 79
columns, since that's a bit more portable and all the other --help
strings fit in 79 columns.

60 files changed:
HACKING
cfg.mk
doc/Makefile.am
doc/coreutils.texi
m4/boottime.m4
man/help2man
man/stdbuf.x
src/Makefile.am
src/cat.c
src/copy.c
src/cp.c
src/dd.c
src/df.c
src/du.c
src/groups.c
src/install.c
src/ls.c
src/md5sum.c
src/mv.c
src/od.c
src/pinky.c
src/ptx.c
src/readlink.c
src/remove.c
src/rmdir.c
src/setuidgid.c
src/sort.c
src/tail.c
src/touch.c
tests/Coreutils.pm
tests/cp/existing-perm-race
tests/cp/perm
tests/cp/preserve-gid
tests/du/2g
tests/du/long-from-unreadable
tests/init.sh
tests/install/basic-1
tests/ls/nameless-uid
tests/ls/readdir-mountpoint-inode
tests/misc/chroot-credentials
tests/misc/cut
tests/misc/date
tests/misc/join
tests/misc/md5sum
tests/misc/sha1sum
tests/misc/sha224sum
tests/misc/sort
tests/misc/sort-continue
tests/misc/sort-files0-from
tests/misc/sort-rand
tests/misc/stdbuf
tests/misc/tr
tests/misc/uniq
tests/mv/atomic
tests/mv/part-fail
tests/mv/part-symlink
tests/mv/sticky-to-xpart
tests/pr/pr-tests
tests/rm/fail-2eperm
tests/rm/interactive-always

diff --git a/HACKING b/HACKING
index fe8ac431d53f5ba30e84f9cf4e1be9a3ac4b052f..0f5ef25cd79c2d2961b1785777fb9a5b6cb4b1ca 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -439,12 +439,12 @@ The forms to choose from are in gnulib's doc/Copyright/ directory.
 If you want to assign a single change, you should use the file,
 doc/Copyright/request-assign.changes:
 
-    http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.changes;hb=HEAD
+    http://www.gnu.org/software/gnulib/Copyright/request-assign.changes
 
 If you would like to assign past and future contributions to a project,
 you'd use doc/Copyright/request-assign.future:
 
-    http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.future;hb=HEAD
+    http://www.gnu.org/software/gnulib/Copyright/request-assign.future
 
 You may make assignments for up to four projects at a time.
 
diff --git a/cfg.mk b/cfg.mk
index 38da21e46420d27c9158ed26f07843e5b6cb3601..7690c481d01b675413af12dc91ad64028b5c5285 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -149,6 +149,23 @@ ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
 sc_check-AUTHORS:
        @$(MAKE) -s -C src $@
 
+# Look for lines longer than 80 characters, except omit:
+# - program-generated long lines in diff headers,
+# - tests involving long checksum lines, and
+# - the 'pr' test cases.
+LINE_LEN_MAX = 80
+FILTER_LONG_LINES =                                            \
+  /^[^:]*\.diff:[^:]*:@@ / d;                                  \
+  \|^[^:]*tests/misc/sha[0-9]*sum[-:]| d;                      \
+  \|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
+sc_long_lines:
+       @files=$$($(VC_LIST_EXCEPT))                                    \
+       halt='line(s) with more than $(LINE_LEN_MAX) characters; reindent'; \
+       for file in $$files; do                                         \
+         expand $$file | grep -nE '^.{$(LINE_LEN_MAX)}.' |             \
+         sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';              \
+       done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
+
 # Option descriptions should not start with a capital letter
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
@@ -222,7 +239,8 @@ sc_prohibit_emacs__indent_tabs_mode__setting:
          $(_sc_search_regexp)
 
 # Ensure that each file that contains fail=1 also contains fail=0.
-# Otherwise, setting file=1 in the environment would make tests fail unexpectedly.
+# Otherwise, setting file=1 in the environment would make tests fail
+# unexpectedly.
 sc_prohibit_fail_0:
        @prohibit='\<fail=0\>'                                          \
        halt='fail=0 initialization'                                    \
index d627b630ee6ce732e3a25f6b4b381d54667dc488..5240f0358eba7ebec9c8c004e9fe151e4d83e944 100644 (file)
@@ -33,7 +33,8 @@ constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
        $(AM_V_GEN)LC_ALL=C; export LC_ALL; \
        { sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
            $(top_srcdir)/src/tail.c && \
-         sed -n -e 's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
+         sed -n -e \
+             's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
            $(top_srcdir)/src/shred.c; } > t-$@ \
          && mv t-$@ $@
 
@@ -60,6 +61,7 @@ syntax_checks =               \
 .PHONY: $(syntax_checks) check-texinfo
 
 # List words/regexps here that should not appear in the texinfo documentation.
+BAD_POSIX_PERL = /\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/
 check-texinfo: $(syntax_checks)
        $(AM_V_GEN)fail=0;                                              \
        grep '@url{' $(srcdir)/*.texi && fail=1;                        \
@@ -69,7 +71,7 @@ check-texinfo: $(syntax_checks)
            | $(EGREP) -v 'setfilename|[{]filename[}]'                  \
          && fail=1;                                                    \
        $(PERL) -e 1 2> /dev/null && { $(PERL) -ne                      \
-         '/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
+         '$(BAD_POSIX_PERL) and print,exit 1'                          \
          $(srcdir)/*.texi 2> /dev/null || fail=1; };                   \
        exit $$fail
 
@@ -108,7 +110,8 @@ sc-avoid-non-zero:
 
 # Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
 sc-avoid-zeroes:
-       $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && exit 1 || :
+       $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
+         && exit 1 || :
 
 # ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 ME = doc/Makefile
index a74f64599d331d94a7af3e755d4c46dca1d23526..5411bd1a6b7a3e2cc1bb6cf520f04a4481966cf2 100644 (file)
@@ -736,7 +736,7 @@ name.
 * Trailing slashes::            --strip-trailing-slashes, in some programs.
 * Traversing symlinks::         -H, -L, or -P, in some programs.
 * Treating / specially::        --preserve-root and --no-preserve-root.
-* Special built-in utilities::  @command{break}, @command{:}, @command{eval}, @dots{}
+* Special built-in utilities::  @command{break}, @command{:}, @dots{}
 * Standards conformance::       Conformance to the @acronym{POSIX} standard.
 @end menu
 
@@ -1316,7 +1316,7 @@ a symlink or its referent.
 @macro choptH
 @item -H
 @opindex -H
-@cindex symbolic link to directory, traverse each that is specified on the command line
+@cindex symbolic link to directory, traverse if on the command line
 If @option{--recursive} (@option{-R}) is specified and
 a command line argument is a symbolic link to a directory, traverse it.
 @end macro
@@ -1778,7 +1778,8 @@ Synopses:
 @smallexample
 od [@var{option}]@dots{} [@var{file}]@dots{}
 od [-abcdfilosx]@dots{} [@var{file}] [[+]@var{offset}[.][b]]
-od [@var{option}]@dots{} --traditional [@var{file}] [[+]@var{offset}[.][b] [[+]@var{label}[.][b]]]
+od [@var{option}]@dots{} --traditional [@var{file}]@c
+ [[+]@var{offset}[.][b] [[+]@var{label}[.][b]]]
 @end smallexample
 
 Each line of output consists of the offset in the input, followed by
@@ -3408,10 +3409,11 @@ length limitation.
 In such cases, running @command{\cmd\} via @command{xargs} is undesirable
 because it splits the list into pieces and makes @command{\cmd\} print
 \subListOutput\ for each sublist rather than for the entire list.
-One way to produce a list of @acronym{ASCII} @sc{nul} terminated file names is with @sc{gnu}
+One way to produce a list of @acronym{ASCII} @sc{nul} terminated file
+names is with @sc{gnu}
 @command{find}, using its @option{-print0} predicate.
-If @var{file} is @samp{-} then the @acronym{ASCII} @sc{nul} terminated file names
-are read from standard input.
+If @var{file} is @samp{-} then the @acronym{ASCII} @sc{nul} terminated
+file names are read from standard input.
 @end macro
 @filesZeroFromOption{wc,,a total}
 
@@ -4234,7 +4236,8 @@ or other special characters).
 
 Historical (BSD and System V) implementations of @command{sort} have
 differed in their interpretation of some options, particularly
-@option{-b}, @option{-f}, and @option{-n}.  @sc{gnu} sort follows the @acronym{POSIX}
+@option{-b}, @option{-f}, and @option{-n}.
+@sc{gnu} sort follows the @acronym{POSIX}
 behavior, which is usually (but not always!) like the System V behavior.
 According to @acronym{POSIX}, @option{-n} no longer implies @option{-b}.  For
 consistency, @option{-M} has been changed in the same way.  This may
@@ -4404,7 +4407,10 @@ by the sort operation.
 @c and converting each @samp{\0} back to the original record delimiter.
 @c
 @c @example
-@c printf 'c\n\nb\n\na\n'|perl -0pe 's/\n\n/\n\0/g'|sort -z|perl -0pe 's/\0/\n/g'
+@c printf 'c\n\nb\n\na\n' |
+@c perl -0pe 's/\n\n/\n\0/g' |
+@c sort -z |
+@c perl -0pe 's/\0/\n/g'
 @c @end example
 
 @item
@@ -5118,7 +5124,8 @@ Choose an output format suitable for @command{nroff} or @command{troff}
 processing.  Each output line will look like:
 
 @smallexample
-.xx "@var{tail}" "@var{before}" "@var{keyword_and_after}" "@var{head}" "@var{ref}"
+.xx "@var{tail}" "@var{before}" "@var{keyword_and_after}"@c
+ "@var{head}" "@var{ref}"
 @end smallexample
 
 so it will be possible to write a @samp{.xx} roff macro to take care of
@@ -5138,7 +5145,8 @@ Choose an output format suitable for @TeX{} processing.  Each output
 line will look like:
 
 @smallexample
-\xx @{@var{tail}@}@{@var{before}@}@{@var{keyword}@}@{@var{after}@}@{@var{head}@}@{@var{ref}@}
+\xx @{@var{tail}@}@{@var{before}@}@{@var{keyword}@}@c
+@{@var{after}@}@{@var{head}@}@{@var{ref}@}
 @end smallexample
 
 @noindent
@@ -6017,7 +6025,8 @@ newlines.
 @noindent
 By the way, the above idiom is not portable because it uses ranges, and
 it assumes that the octal code for newline is 012.
-Assuming a @acronym{POSIX} compliant @command{tr}, here is a better way to write it:
+Assuming a @acronym{POSIX} compliant @command{tr}, here is a better
+way to write it:
 
 @example
 tr -cs '[:alnum:]' '[\n*]'
@@ -8454,7 +8463,8 @@ response is not affirmative, the file is skipped.
 when it might be a symlink to a directory.
 Otherwise, @command{mv} may do something very surprising, since
 its behavior depends on the underlying rename system call.
-On a system with a modern Linux-based kernel, it fails with @code{errno=ENOTDIR}.
+On a system with a modern Linux-based kernel, it fails with
+@code{errno=ENOTDIR}.
 However, on other systems (at least FreeBSD 6.1 and Solaris 10) it silently
 renames not the symlink but rather the directory referenced by the symlink.
 @xref{Trailing slashes}.
@@ -8845,7 +8855,8 @@ Display to standard error all status updates as sterilization proceeds.
 @opindex -x
 @opindex --exact
 By default, @command{shred} rounds the size of a regular file up to the next
-multiple of the file system block size to fully erase the last block of the file.
+multiple of the file system block size to fully erase the last block
+of the file.
 Use @option{--exact} to suppress that behavior.
 Thus, by default if you shred a 10-byte regular file on a system with 512-byte
 blocks, the resulting file will be 512 bytes long.  With this option,
@@ -9628,7 +9639,8 @@ to @var{new-owner} or to the user and group of an existing reference file.
 Synopsis:
 
 @example
-chown [@var{option}]@dots{} @{@var{new-owner} | --reference=@var{ref_file}@} @var{file}@dots{}
+chown [@var{option}]@dots{} @{@var{new-owner} | --reference=@var{ref_file}@}@c
+ @var{file}@dots{}
 @end example
 
 If used, @var{new-owner} specifies the new owner and/or group as follows
@@ -9843,7 +9855,8 @@ to @var{group} (which can be either a group name or a numeric group ID)
 or to the group of an existing reference file.  Synopsis:
 
 @example
-chgrp [@var{option}]@dots{} @{@var{group} | --reference=@var{ref_file}@} @var{file}@dots{}
+chgrp [@var{option}]@dots{} @{@var{group} | --reference=@var{ref_file}@}@c
+ @var{file}@dots{}
 @end example
 
 If @var{group} is intended to represent a
@@ -9964,7 +9977,8 @@ chgrp -hR staff /u
 @command{chmod} changes the access permissions of the named files.  Synopsis:
 
 @example
-chmod [@var{option}]@dots{} @{@var{mode} | --reference=@var{ref_file}@} @var{file}@dots{}
+chmod [@var{option}]@dots{} @{@var{mode} | --reference=@var{ref_file}@}@c
+ @var{file}@dots{}
 @end example
 
 @cindex symbolic links, permissions of
@@ -10264,7 +10278,8 @@ Non-integer quantities are rounded up to the next higher unit.
 If an argument @var{file} is a disk device file containing a mounted
 file system, @command{df} shows the space available on that file system
 rather than on the file system containing the device node (i.e., the root
-file system).  @sc{gnu} @command{df} does not attempt to determine the disk usage
+file system).  @sc{gnu} @command{df} does not attempt to determine the
+disk usage
 on unmounted file systems, because on most kinds of systems doing so
 requires extremely nonportable intimate knowledge of file system
 structures.
@@ -11390,7 +11405,8 @@ test
 
 If @var{expression} is omitted, @command{test} returns false.
 If @var{expression} is a single argument,
-@command{test} returns false if the argument is null and true otherwise.  The argument
+@command{test} returns false if the argument is null and true
+otherwise.  The argument
 can be any string, including strings like @samp{-d}, @samp{-1},
 @samp{--}, @samp{--help}, and @samp{--version} that most other
 programs would treat as options.  To get help and version information,
@@ -12586,8 +12602,9 @@ be used in combination with any line settings.
 @opindex --file
 Set the line opened by the file name specified in @var{device} instead of
 the tty line connected to standard input.  This option is necessary
-because opening a @acronym{POSIX} tty requires use of the @code{O_NONDELAY} flag to
-prevent a @acronym{POSIX} tty from blocking until the carrier detect line is high if
+because opening a @acronym{POSIX} tty requires use of the
+@code{O_NONDELAY} flag to prevent a @acronym{POSIX} tty from blocking
+until the carrier detect line is high if
 the @code{clocal} flag is not set.  Hence, it is not always possible
 to allow the shell to open the device in the traditional manner.
 
@@ -12609,8 +12626,9 @@ case, that is, when @emph{not} negated (unless stated otherwise,
 of course).
 
 Some settings are not available on all @acronym{POSIX} systems, since they use
-extensions.  Such arguments are marked below with ``Non-@acronym{POSIX}'' in their
-description.  On non-@acronym{POSIX} systems, those or other settings also may not
+extensions.  Such arguments are marked below with
+``Non-@acronym{POSIX}'' in their description.  On non-@acronym{POSIX}
+systems, those or other settings also may not
 be available, but it's not feasible to document all the variations: just
 try it and see.
 
@@ -12817,7 +12835,8 @@ Newline performs a carriage return.  Non-@acronym{POSIX}.  May be negated.
 @item ofill
 @opindex ofill
 @cindex pad instead of timing for delaying
-Use fill (padding) characters instead of timing for delays.  Non-@acronym{POSIX}.
+Use fill (padding) characters instead of timing for delays.
+Non-@acronym{POSIX}.
 May be negated.
 
 @item ofdel
@@ -12945,7 +12964,8 @@ of literally.  Non-@acronym{POSIX}.  May be negated.
 @opindex crtkill
 Echo the @code{kill} special character by erasing each character on
 the line as indicated by the @code{echoprt} and @code{echoe} settings,
-instead of by the @code{echoctl} and @code{echok} settings.  Non-@acronym{POSIX}.
+instead of by the @code{echoctl} and @code{echok} settings.
+Non-@acronym{POSIX}.
 May be negated.
 @end table
 
@@ -13169,7 +13189,8 @@ Set the output speed to @var{n}.
 
 @item rows @var{n}
 @opindex rows
-Tell the tty kernel driver that the terminal has @var{n} rows.  Non-@acronym{POSIX}.
+Tell the tty kernel driver that the terminal has @var{n} rows.
+Non-@acronym{POSIX}.
 
 @item cols @var{n}
 @itemx columns @var{n}
@@ -14386,7 +14407,8 @@ parsed reliably.  In the following example, @var{release} is
 
 @smallexample
 uname -a
-@result{} Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux
+@result{} Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686@c
+ unknown unknown GNU/Linux
 @end smallexample
 
 
@@ -14592,7 +14614,8 @@ Synopses:
 
 @smallexample
 chcon [@var{option}]@dots{} @var{context} @var{file}@dots{}
-chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{}
+chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}]@c
+ [-t @var{type}] @var{file}@dots{}
 chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{}
 @end smallexample
 
@@ -14678,7 +14701,8 @@ Set range @var{range} in the target security context.
 Synopses:
 @smallexample
 runcon @var{context} @var{command} [@var{args}]
-runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}]
+runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}]@c
+ [-l @var{range}] @var{command} [@var{args}]
 @end smallexample
 
 Run @var{command} with completely-specified @var{context}, or with
@@ -14690,7 +14714,8 @@ is specified, the first argument is used as the complete context.
 Any additional arguments after @var{command}
 are interpreted as arguments to the command.
 
-With neither @var{context} nor @var{command}, print the current security context.
+With neither @var{context} nor @var{command}, print the current
+security context.
 
 The program accepts the following options.  Also see @ref{Common options}.
 
@@ -15853,7 +15878,8 @@ It was written by Arnold Robbins.
 @unnumberedsec Toolbox Introduction
 
 This month's column is only peripherally related to the GNU Project, in
-that it describes a number of the GNU tools on your GNU/Linux system and how they
+that it describes a number of the GNU tools on your GNU/Linux system
+and how they
 might be used.  What it's really about is the ``Software Tools'' philosophy
 of program development and usage.
 
@@ -16053,7 +16079,8 @@ by a count of the number of times that line occurred in the input.
 @unnumberedsec Putting the Tools Together
 
 Now, let's suppose this is a large ISP server system with dozens of users
-logged in.  The management wants the system administrator to write a program that will
+logged in.  The management wants the system administrator to write a
+program that will
 generate a sorted list of logged in users.  Furthermore, even if a user
 is logged in multiple times, his or her name should only show up in the
 output once.
@@ -16095,7 +16122,8 @@ The @command{sort} command actually has a @option{-u} option that does what
 @command{uniq} does.  However, @command{uniq} has other uses for which one
 cannot substitute @samp{sort -u}.
 
-The administrator puts this pipeline into a shell script, and makes it available for
+The administrator puts this pipeline into a shell script, and makes it
+available for
 all the users on the system (@samp{#} is the system administrator,
 or @code{root}, prompt):
 
index 3bca40f9712f4e0cfe91dc24ffe6eee8cd1dd0b6..4e73171580486cf5fe2e1cdd35d927d968ab9dd1 100644 (file)
@@ -52,7 +52,9 @@ AC_DEFUN([GNULIB_BOOT_TIME],
 #endif
 ],
 [[
-#if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME) || HAVE_OS_H
+#if (defined BOOT_TIME                              \
+     || (defined CTL_KERN && defined KERN_BOOTTIME) \
+     || HAVE_OS_H)
 /* your system *does* have the infrastructure to determine boot time */
 #else
 please_tell_us_how_to_determine_boot_time_on_your_system
index 8e42f3cd111c77956c0a9a532e2fea1bd1625672..75cc4932ab9d47f8349874642b0d356345675799 100755 (executable)
@@ -316,7 +316,10 @@ unless ($manual)
 # Extract usage clause(s) [if any] for SYNOPSIS.
 my $PAT_USAGE = _('Usage');
 my $PAT_USAGE_CONT = _('or');
-if ($help_text =~ s/^($PAT_USAGE):( +(\S+))(.*)((?:\n(?: {6}\1| *($PAT_USAGE_CONT): +\S).*)*)//om)
+if ($help_text =~ s/^($PAT_USAGE):
+                     ([ ]+(\S+))
+                     (.*)
+                     ((?:\n(?:[ ]{6}\1|[ ]*($PAT_USAGE_CONT):[ ]+\S).*)*)//omx)
 {
     my @syn = $3 . $4;
 
index 1ef2d9e43acb8db75eb84c5d62b9d129036bf5ec..94425f5b647c45b36f13a292e90b11c706a81f60 100644 (file)
@@ -4,7 +4,8 @@
 '\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 '\" There is NO WARRANTY, to the extent permitted by law.
 [NAME]
-stdbuf \- Run COMMAND, with modified buffering operations for its standard streams.
+stdbuf \-
+Run COMMAND, with modified buffering operations for its standard streams.
 [DESCRIPTION]
 .\" Add any additional description here
 [EXAMPLES]
index 00c7ff713ebe08a3a7a4180c0b0ba40bf7be702b..fd08303b98290a2c4d06cd6e6fb23a5acc1f08f7 100644 (file)
@@ -726,7 +726,7 @@ sc_tight_scope: $(bin_PROGRAMS)
        ( printf 'main\nusage\n_.*\n';                                  \
          grep -h -A1 '^extern .*[^;]$$' $$src                          \
            | grep -vE '^(extern |--)' | sed 's/ .*//';                 \
-         perl -ne '/^extern (?:enum )?\S+ (\S*) \(/ and print "$$1\n"' $$hdr;  \
+         perl -ne '/^extern (?:enum )?\S+ (\S*) \(/ and print "$$1\n"' $$hdr; \
        ) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t;                 \
        nm -e *.$(OBJEXT)                                               \
            | sed -n 's/.* T //p'                                       \
index 47b50535258db466cc47eb77473518c7e88a7277..1295d8341601b3a7e51f73f2f73654373fbeab97 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -323,7 +323,8 @@ cat (
                     use_fionread = false;
                   else
                     {
-                      error (0, errno, _("cannot do ioctl on %s"), quote (infile));
+                      error (0, errno, _("cannot do ioctl on %s"),
+                             quote (infile));
                       newlines2 = newlines;
                       return false;
                     }
index 42d6d924984e1696346a4ae14d8ac83870499f54..a6621c22ead21f013420523ee6668109fa626284 100644 (file)
@@ -354,7 +354,8 @@ set_owner (const struct cp_options *x, char const *dst_name, int dest_desc,
           && qset_acl (dst_name, dest_desc, restrictive_temp_mode) != 0)
         {
           if (! owner_failure_ok (x))
-            error (0, errno, _("clearing permissions for %s"), quote (dst_name));
+            error (0, errno, _("clearing permissions for %s"),
+                   quote (dst_name));
           return -x->require_preserve;
         }
     }
index 3d00b5f7ff8e98b6ec11939b9cfcf0df71cc9717..c103a82a90e7dc43ee94450ff566b0622c2ebfeb 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -170,16 +170,19 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (_("\
   -a, --archive                same as -dR --preserve=all\n\
       --attributes-only        don't copy the file data, just the attributes\n\
-      --backup[=CONTROL]       make a backup of each existing destination file\n\
+      --backup[=CONTROL]       make a backup of each existing destination file\
+\n\
   -b                           like --backup but does not accept an argument\n\
       --copy-contents          copy contents of special files when recursive\n\
   -d                           same as --no-dereference --preserve=links\n\
 "), stdout);
       fputs (_("\
   -f, --force                  if an existing destination file cannot be\n\
-                                 opened, remove it and try again (redundant if\n\
+                                 opened, remove it and try again (redundant if\
+\n\
                                  the -n option is used)\n\
-  -i, --interactive            prompt before overwrite (overrides a previous -n\n\
+  -i, --interactive            prompt before overwrite (overrides a previous -n\
+\n\
                                   option)\n\
   -H                           follow command-line symbolic links in SOURCE\n\
 "), stdout);
@@ -196,7 +199,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -p                           same as --preserve=mode,ownership,timestamps\n\
       --preserve[=ATTR_LIST]   preserve the specified attributes (default:\n\
                                  mode,ownership,timestamps), if possible\n\
-                                 additional attributes: context, links, xattr,\n\
+                                 additional attributes: context, links, xattr,\
+\n\
                                  all\n\
 "), stdout);
       fputs (_("\
@@ -207,8 +211,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -R, -r, --recursive          copy directories recursively\n\
       --reflink[=WHEN]         control clone/CoW copies. See below\n\
       --remove-destination     remove each existing destination file before\n\
-                                 attempting to open it (contrast with --force)\n\
-"), stdout);
+                                 attempting to open it (contrast with --force)\
+\n"), stdout);
       fputs (_("\
       --sparse=WHEN            control creation of sparse files. See below\n\
       --strip-trailing-slashes  remove any trailing slashes from each SOURCE\n\
@@ -948,7 +952,8 @@ main (int argc, char **argv)
                                        reflink_type_string, reflink_type);
           break;
 
-        case 'a':              /* Like -dR --preserve=all with reduced failure diagnostics. */
+        case 'a':
+          /* Like -dR --preserve=all with reduced failure diagnostics.  */
           x.dereference = DEREF_NEVER;
           x.preserve_links = true;
           x.preserve_ownership = true;
index b6643e2e11cf6cea37970cee405d0a0c232494bc..004cdfe273ae9e04cd5957db96ffb4e212ba9d20 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -1939,7 +1939,8 @@ main (int argc, char **argv)
                   || S_ISDIR (stdout_stat.st_mode)
                   || S_TYPEISSHM (&stdout_stat))
                 error (EXIT_FAILURE, ftruncate_errno,
-                   _("failed to truncate to %"PRIuMAX" bytes in output file %s"),
+                       _("failed to truncate to %"PRIuMAX" bytes"
+                         " in output file %s"),
                        size, quote (output_file));
             }
         }
index 749ce1a120654fb76d6a6f835146829ae1e9ceca..d54d081b6c8cfcf827673d540f420c677013f354 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -715,14 +715,16 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                            `-BM' prints sizes in units of 1,048,576 bytes.\n\
                            See SIZE format below.\n\
       --total           produce a grand total\n\
-  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\n\
+  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\
+\n\
   -H, --si              likewise, but use powers of 1000 not 1024\n\
 "), stdout);
       fputs (_("\
   -i, --inodes          list inode information instead of block usage\n\
   -k                    like --block-size=1K\n\
   -l, --local           limit listing to local file systems\n\
-      --no-sync         do not invoke sync before getting usage info (default)\n\
+      --no-sync         do not invoke sync before getting usage info (default)\
+\n\
 "), stdout);
       fputs (_("\
   -P, --portability     use the POSIX output format\n\
index 4951826eae209e022cb8990379bfd7e58efb4860..bde017a2e8ee5f3dd9339492e91e4e1e41b160fb 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -267,7 +267,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
   -a, --all             write counts for all files, not just directories\n\
-      --apparent-size   print apparent sizes, rather than disk usage; although\n\
+      --apparent-size   print apparent sizes, rather than disk usage; although\
+\n\
                           the apparent size is usually smaller, it may be\n\
                           larger due to holes in (`sparse') files, internal\n\
                           fragmentation, indirect blocks, and the like\n\
@@ -286,7 +287,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                           names specified in file F;\n\
                           If F is - then read names from standard input\n\
   -H                    equivalent to --dereference-args (-D)\n\
-  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\n\
+  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\
+\n\
       --si              like -h, but use powers of 1000 not 1024\n\
 "), stdout);
       fputs (_("\
index c05da37d2bdaba1962d5610f741e33b16cbe42a5..0f4c4ce2d0b91333339566a31a7fd67ec1bccc5e 100644 (file)
@@ -53,7 +53,8 @@ usage (int status)
     {
       printf (_("Usage: %s [OPTION]... [USERNAME]...\n"), program_name);
       fputs (_("\
-Print group memberships for each USERNAME or, if no USERNAME is specified, for\n\
+Print group memberships for each USERNAME or, if no USERNAME is specified, for\
+\n\
 the current process (which may differ if the groups database has changed).\n"),
              stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
index 467e50046adbb2a143bee83eba1011ab55fd8283..5cfc0e2e88406d31c9b65ca9159f268fdb95b99b 100644 (file)
@@ -986,7 +986,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
       --preserve-context  preserve SELinux security context\n\
-  -Z, --context=CONTEXT  set SELinux security context of files and directories\n\
+  -Z, --context=CONTEXT  set SELinux security context of files and directories\
+\n\
 "), stdout);
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
index f861df91a9abe47f67643473d81d936fd10256cc..e5da0d7970be9c3929e9069c30a1cd252c9f67a4 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2048,7 +2048,8 @@ decode_switches (int argc, char **argv)
               }
           }
       /* Note we leave %5b etc. alone so user widths/flags are honored.  */
-      if (strstr (long_time_format[0],"%b") || strstr (long_time_format[1],"%b"))
+      if (strstr (long_time_format[0], "%b")
+          || strstr (long_time_format[1], "%b"))
         if (!abmon_init ())
           error (0, 0, _("error initializing month strings"));
     }
@@ -4628,15 +4629,18 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       --dereference-command-line-symlink-to-dir\n\
                              follow each command line symbolic link\n\
                              that points to a directory\n\
-      --hide=PATTERN         do not list implied entries matching shell PATTERN\n\
+      --hide=PATTERN         do not list implied entries matching shell PATTERN\
+\n\
                                (overridden by -a or -A)\n\
 "), stdout);
       fputs (_("\
-      --indicator-style=WORD  append indicator with style WORD to entry names:\n\
+      --indicator-style=WORD  append indicator with style WORD to entry names:\
+\n\
                                none (default), slash (-p),\n\
                                file-type (--file-type), classify (-F)\n\
   -i, --inode                print the index number of each file\n\
-  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN\n\
+  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN\
+\n\
   -k                         like --block-size=1K\n\
 "), stdout);
       fputs (_("\
@@ -4644,7 +4648,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -L, --dereference          when showing file information for a symbolic\n\
                                link, show information for the file the link\n\
                                references rather than for the link itself\n\
-  -m                         fill width with a comma separated list of entries\n\
+  -m                         fill width with a comma separated list of entries\
+\n\
 "), stdout);
       fputs (_("\
   -n, --numeric-uid-gid      like -l, but list numeric user and group IDs\n\
@@ -4660,7 +4665,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                              unless program is `ls' and output is a terminal)\n\
   -Q, --quote-name           enclose entry names in double quotes\n\
       --quoting-style=WORD   use quoting style WORD for entry names:\n\
-                               literal, locale, shell, shell-always, c, escape\n\
+                               literal, locale, shell, shell-always, c, escape\
+\n\
 "), stdout);
       fputs (_("\
   -r, --reverse              reverse order while sorting\n\
@@ -4671,7 +4677,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -S                         sort by file size\n\
       --sort=WORD            sort by WORD instead of name: none -U,\n\
                              extension -X, size -S, time -t, version -v\n\
-      --time=WORD            with -l, show time as WORD instead of modification\n\
+      --time=WORD            with -l, show time as WORD instead of modification\
+\n\
                              time: atime -u, access -u, use -u, ctime -c,\n\
                              or status -c; use specified time as sort key\n\
                              if --sort=time\n\
index a660e3b2cd65001d079841bd0e49db19437cf3ce..50bb0a1b48bd6f654a29eeea20d32d42dfa34bde 100644 (file)
@@ -1,4 +1,4 @@
-/* Compute MD5, SHA1, SHA224, SHA256, SHA384 or SHA512 checksum of files or strings
+/* Compute checksums of files or strings.
    Copyright (C) 1995-2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -162,29 +162,29 @@ With no FILE, or when FILE is -, read standard input.\n\
               DIGEST_BITS);
       if (O_BINARY)
         fputs (_("\
-  -b, --binary            read in binary mode (default unless reading tty stdin)\n\
+  -b, --binary         read in binary mode (default unless reading tty stdin)\n\
 "), stdout);
       else
         fputs (_("\
-  -b, --binary            read in binary mode\n\
+  -b, --binary         read in binary mode\n\
 "), stdout);
       printf (_("\
-  -c, --check             read %s sums from the FILEs and check them\n"),
+  -c, --check          read %s sums from the FILEs and check them\n"),
               DIGEST_TYPE_STRING);
       if (O_BINARY)
         fputs (_("\
-  -t, --text              read in text mode (default if reading tty stdin)\n\
+  -t, --text           read in text mode (default if reading tty stdin)\n\
 "), stdout);
       else
         fputs (_("\
-  -t, --text              read in text mode (default)\n\
+  -t, --text           read in text mode (default)\n\
 "), stdout);
       fputs (_("\
 \n\
 The following three options are useful only when verifying checksums:\n\
-      --quiet             don't print OK for each successfully verified file\n\
-      --status            don't output anything, status code shows success\n\
-  -w, --warn              warn about improperly formatted checksum lines\n\
+      --quiet          don't print OK for each successfully verified file\n\
+      --status         don't output anything, status code shows success\n\
+  -w, --warn           warn about improperly formatted checksum lines\n\
 \n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -209,7 +209,8 @@ text), and name for each FILE.\n"),
    name.  S is modified.  Return true if successful.  */
 
 static bool
-bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest, char **file_name)
+bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
+             char **file_name)
 {
   size_t i;
 
@@ -576,23 +577,26 @@ digest_check (const char *checkfile_name)
         {
           if (n_misformatted_lines != 0)
             error (0, 0,
-                   ngettext ("WARNING: %" PRIuMAX " line is improperly formatted",
-                             "WARNING: %" PRIuMAX " lines are improperly formatted",
-                             select_plural (n_misformatted_lines)),
+                   (ngettext
+                    ("WARNING: %" PRIuMAX " line is improperly formatted",
+                     "WARNING: %" PRIuMAX " lines are improperly formatted",
+                     select_plural (n_misformatted_lines))),
                    n_misformatted_lines);
 
           if (n_open_or_read_failures != 0)
             error (0, 0,
-                   ngettext ("WARNING: %" PRIuMAX " listed file could not be read",
-                             "WARNING: %" PRIuMAX " listed files could not be read",
-                             select_plural (n_open_or_read_failures)),
+                   (ngettext
+                    ("WARNING: %" PRIuMAX " listed file could not be read",
+                     "WARNING: %" PRIuMAX " listed files could not be read",
+                     select_plural (n_open_or_read_failures))),
                    n_open_or_read_failures);
 
           if (n_mismatched_checksums != 0)
             error (0, 0,
-                   ngettext ("WARNING: %" PRIuMAX " computed checksum did NOT match",
-                             "WARNING: %" PRIuMAX " computed checksums did NOT match",
-                             select_plural (n_mismatched_checksums)),
+                   (ngettext
+                    ("WARNING: %" PRIuMAX " computed checksum did NOT match",
+                     "WARNING: %" PRIuMAX " computed checksums did NOT match",
+                     select_plural (n_mismatched_checksums))),
                    n_mismatched_checksums);
         }
     }
index 91aadfa0e8139764cdcab77f49ab539792122b08..e3230a888739d64ae99a69a61073075572f05d26 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -296,7 +296,8 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
 Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
-      --backup[=CONTROL]       make a backup of each existing destination file\n\
+      --backup[=CONTROL]       make a backup of each existing destination file\
+\n\
   -b                           like --backup but does not accept an argument\n\
   -f, --force                  do not prompt before overwriting\n\
   -i, --interactive            prompt before overwrite\n\
index 2f7ef000a8d6c5aa150a1ee9c2aebd1fb34728b5..ef2356e2053d36fcbea9ee0247247a172bd6fe2b 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -374,7 +374,8 @@ RADIX is d for decimal, o for octal, x for hexadecimal or n for none.\n\
 BYTES is hexadecimal with 0x or 0X prefix, and 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\
-Adding a z suffix to any type displays printable characters at the end of each\n\
+Adding a z suffix to any type displays printable characters at the end of each\
+\n\
 output line.\n\
 "), stdout);
       fputs (_("\
@@ -1046,7 +1047,8 @@ skip (uintmax_t n_skip)
 }
 
 static void
-format_address_none (uintmax_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED)
+format_address_none (uintmax_t address ATTRIBUTE_UNUSED,
+                     char c ATTRIBUTE_UNUSED)
 {
 }
 
index e9b4d1bca9c32a392cbb85bdfc75f43178f3230f..b19c4d8d8f20802d7e153464e5e3347ccc65da9f 100644 (file)
@@ -220,7 +220,7 @@ print_entry (const STRUCT_UTMP *utmp_ent)
   else
     {
       strcpy (line, DEV_DIR_WITH_TRAILING_SLASH);
-      strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
+      strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line, sizeof utmp_ent->ut_line);
       line[DEV_DIR_LEN + sizeof (utmp_ent->ut_line)] = '\0';
     }
 
index ba5aec5192e185daa7c7fe5b31fa221a0e362107..56bb988f7f10106ba0968e1d60aa27ed1fcfe2f0 100644 (file)
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -89,7 +89,7 @@ static enum Format output_format = UNKNOWN_FORMAT;
                                 /* output format */
 
 static bool ignore_case = false;       /* fold lower to upper for sorting */
-static const char *break_file = NULL;  /* name of the `Break characters' file */
+static const char *break_file = NULL;  /* name of the `Break chars' file */
 static const char *only_file = NULL;   /* name of the `Only words' file */
 static const char *ignore_file = NULL; /* name of the `Ignore words' file */
 
@@ -254,7 +254,7 @@ static char edited_flag[CHAR_SET_SIZE];
 static int half_line_width;    /* half of line width, reference excluded */
 static int before_max_width;   /* maximum width of before field */
 static int keyafter_max_width; /* maximum width of keyword-and-after field */
-static int truncation_string_length;/* length of string used to flag truncation */
+static int truncation_string_length;/* length of string that flags truncation */
 
 /* When context is limited by lines, wraparound may happen on final output:
    the `head' pointer gives access to some supplementary left context which
@@ -1019,8 +1019,9 @@ find_occurs_in_text (void)
                   < occurs_alloc[0])
                 xalloc_die ();
               occurs_alloc[0] = occurs_alloc[0] * 2 + 1;
-              occurs_table[0] = xrealloc (occurs_table[0],
-                                          occurs_alloc[0] * sizeof *occurs_table[0]);
+              occurs_table[0] =
+                xrealloc (occurs_table[0],
+                          occurs_alloc[0] * sizeof *occurs_table[0]);
             }
 
           occurs_cursor = occurs_table[0] + number_of_occurs[0];
index a0f9173fbf4d195cf8a960e1542fe864286d2841..eea307c3afeff07acea34431f25cffb8fda6f7d9 100644 (file)
@@ -65,15 +65,18 @@ usage (int status)
              stdout);
       fputs (_("\
   -f, --canonicalize            canonicalize by following every symlink in\n\
-                                every component of the given name recursively;\n\
+                                every component of the given name recursively;\
+\n\
                                 all but the last component must exist\n\
   -e, --canonicalize-existing   canonicalize by following every symlink in\n\
-                                every component of the given name recursively,\n\
+                                every component of the given name recursively,\
+\n\
                                 all components must exist\n\
 "), stdout);
       fputs (_("\
   -m, --canonicalize-missing    canonicalize by following every symlink in\n\
-                                every component of the given name recursively,\n\
+                                every component of the given name recursively,\
+\n\
                                 without requirements on components existence\n\
   -n, --no-newline              do not output the trailing newline\n\
   -q, --quiet,\n\
index d0b2dae2f479f9e4e8f969d349c153b095a7e7d3..a827a64538d08cb40b3615a1abaceea0f970c00e 100644 (file)
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Extracted from rm.c and librarified, then rewritten twice by Jim Meyering.  */
+/* Extracted from rm.c, librarified, then rewritten twice by Jim Meyering.  */
 
 #include <config.h>
 #include <stdio.h>
index 90a80a602ab1b922020415f1faa90fe50541ade7..452a027ede2cfb7f3ba37ee1a182ef8277cf9381 100644 (file)
@@ -171,7 +171,8 @@ Remove the DIRECTORY(ies), if they are empty.\n\
                     is non-empty\n\
 "), stdout);
       fputs (_("\
-  -p, --parents   remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is\n\
+  -p, --parents   remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is\
+\n\
                     similar to `rmdir a/b/c a/b a'\n\
   -v, --verbose   output a diagnostic for every directory processed\n\
 "), stdout);
index 4881b46d70310efdf341218bdba3fe1c62062652..59ed4782d2221f89a9ea755b50c7bfb51ef6b804 100644 (file)
@@ -54,7 +54,8 @@ Usage: %s [SHORT-OPTION]... USER COMMAND [ARGUMENT]...\n\
               program_name, program_name);
 
       fputs (_("\
-Drop any supplemental groups, assume the user-ID and group-ID of the specified\n\
+Drop any supplemental groups, assume the user-ID and group-ID of the specified\
+\n\
 USER (numeric ID or user name), and run COMMAND with any specified ARGUMENTs.\n\
 Exit with status 111 if unable to assume the required user and group ID.\n\
 Otherwise, exit with the exit status of COMMAND.\n\
index 96e06960d2183177d017a68159fa17ec7d5d37cd..ec925465fcde4a7ab67f00f505a61bea71d58c53 100644 (file)
@@ -400,7 +400,8 @@ Ordering options:\n\
 "), stdout);
       fputs (_("\
   -b, --ignore-leading-blanks  ignore leading blanks\n\
-  -d, --dictionary-order      consider only blanks and alphanumeric characters\n\
+  -d, --dictionary-order      consider only blanks and alphanumeric characters\
+\n\
   -f, --ignore-case           fold lower case to upper case characters\n\
 "), stdout);
       fputs (_("\
@@ -419,7 +420,8 @@ Ordering options:\n\
 "), stdout);
       fputs (_("\
       --sort=WORD             sort according to WORD:\n\
-                                general-numeric -g, human-numeric -h, month -M,\n\
+                                general-numeric -g, human-numeric -h, month -M,\
+\n\
                                 numeric -n, random -R, version -V\n\
   -V, --version-sort          natural sort of (version) numbers within text\n\
 \n\
@@ -434,7 +436,8 @@ Other options:\n\
 "), stdout);
       fputs (_("\
   -c, --check, --check=diagnose-first  check for sorted input; do not sort\n\
-  -C, --check=quiet, --check=silent  like -c, but do not report first bad line\n\
+  -C, --check=quiet, --check=silent  like -c, but do not report first bad line\
+\n\
       --compress-program=PROG  compress temporaries with PROG;\n\
                               decompress them with PROG -d\n\
 "), stdout);
@@ -452,7 +455,8 @@ Other options:\n\
 "), stdout);
       fputs (_("\
   -o, --output=FILE         write result to FILE instead of standard output\n\
-  -s, --stable              stabilize sort by disabling last-resort comparison\n\
+  -s, --stable              stabilize sort by disabling last-resort comparison\
+\n\
   -S, --buffer-size=SIZE    use SIZE for main memory buffer\n\
 "), stdout);
       printf (_("\
@@ -461,7 +465,8 @@ Other options:\n\
                               multiple options specify multiple directories\n\
       --parallel=N          change the number of sorts run concurrently to N\n\
   -u, --unique              with -c, check for strict ordering;\n\
-                              without -c, output only the first of an equal run\n\
+                              without -c, output only the first of an equal run\
+\n\
 "), DEFAULT_TMPDIR);
       fputs (_("\
   -z, --zero-terminated     end lines with 0 byte, not newline\n\
@@ -471,8 +476,10 @@ Other options:\n\
       fputs (_("\
 \n\
 POS is F[.C][OPTS], where F is the field number and C the character position\n\
-in the field; both are origin 1.  If neither -t nor -b is in effect, characters\n\
-in a field are counted from the beginning of the preceding whitespace.  OPTS is\n\
+in the field; both are origin 1.  If neither -t nor -b is in effect, characters\
+\n\
+in a field are counted from the beginning of the preceding whitespace.  OPTS is\
+\n\
 one or more single-letter ordering options, which override global ordering\n\
 options for that key.  If no key is given, use the entire line as the key.\n\
 \n\
@@ -4481,8 +4488,8 @@ main (int argc, char **argv)
               else if (files[i][0] == '\0')
                 {
                   /* Using the standard `filename:line-number:' prefix here is
-                     not totally appropriate, since NUL is the separator, not NL,
-                     but it might be better than nothing.  */
+                     not totally appropriate, since NUL is the separator,
+                     not NL, but it might be better than nothing.  */
                   unsigned long int file_number = i + 1;
                   error (SORT_FAILURE, 0,
                          _("%s:%lu: invalid zero-length file name"),
index 2af9693de6c72562e0d6498dec438052d38d2ef9..47a3ba4f98a09a52b71195381dd48d2b194dc55a 100644 (file)
@@ -1546,7 +1546,8 @@ tail_forever_inotify (int wd, struct File_spec *f, size_t n_files,
              must continue to watch the file.  It's only when following
              by file descriptor that we must remove the watch.  */
           if ((ev->mask & IN_DELETE_SELF)
-              || ((ev->mask & IN_MOVE_SELF) && follow_mode == Follow_descriptor))
+              || ((ev->mask & IN_MOVE_SELF)
+                  && follow_mode == Follow_descriptor))
             {
               inotify_rm_watch (wd, fspec->wd);
               hash_delete (wd_to_name, fspec);
index f9374c07adc98029730b9b44b8079fff91748c2d..8c816e4b4b4d54631111c58571bef78e1546d3d4 100644 (file)
@@ -132,9 +132,11 @@ touch (const char *file)
   else if (! (no_create || no_dereference))
     {
       /* Try to open FILE, creating it if necessary.  */
+      int default_permissions =
+        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
       fd = fd_reopen (STDIN_FILENO, file,
                       O_WRONLY | O_CREAT | O_NONBLOCK | O_NOCTTY,
-                      S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+                      default_permissions);
 
       /* Don't save a copy of errno if it's EISDIR, since that would lead
          touch to give a bogus diagnostic for e.g., `touch /' (assuming
index 70974a8ad5459f6f9dcf2111ea967ed950b59647..63312ad88f7f3641cf87500090aa7b4e95c8224c 100644 (file)
@@ -67,7 +67,7 @@ defined $ENV{DJDIR}
 # {ERR => ...}
 #           Same as for OUT, but compare with stderr, not stdout.
 # {OUT_SUBST => 's/variable_output/expected_output/'}
-#   Transform actual standard output before comparing it against expected output.
+#   Transform actual standard output before comparing it against expected.
 #   This is useful e.g. for programs like du that produce output that
 #   varies a lot from system.  E.g., an empty file may consume zero file
 #   blocks, or more, depending on the OS and on the file system type.
@@ -507,7 +507,8 @@ sub run_tests ($$$$$)
             {
               my $out_file = $actual{$eo};
               open IN, $out_file
-                or (warn "$program_name: cannot open $out_file for reading: $!\n"),
+                or (warn
+                    "$program_name: cannot open $out_file for reading: $!\n"),
                   $fail = 1, next;
               $actual_data{$eo} = <IN>;
               close IN
index f048eb160136ba91ba907aeaabef160c2206beed..d5774404e3ed89a6c070f8c27c128324081e2699 100755 (executable)
@@ -71,8 +71,8 @@ case $mode in
   # a $g2 process can maintain an open file descriptor to the
   # destination, but it's safer anyway.
   -rw-r-----*)
-    # If the file has group $g1 and is group-readable, that is definitely
-    # bogus, as neither the source nor the destination was readable to group $g1.
+    # If the file has group $g1 and is group-readable, that is definitely bogus,
+    # as neither the source nor the destination was readable to group $g1.
     test "$group" = "$g1" && fail=1;;
 
   *) fail=1;;
index e5fdb098d65d9ef1e9413289b3e54c3ac017766e..663ad4dfaf832ae3a296bd7767b5cfc41e6c3adc 100755 (executable)
@@ -55,9 +55,13 @@ for u in 31 37 2; do
                 ;;
               cp:*:no)
                 test $u = 37 &&
-                  expected_perms=`echo $expected_perms|sed 's/.....$/-----/'`
+                  expected_perms=`
+                    echo $expected_perms | sed 's/.....$/-----/'
+                  `
                 test $u = 31 &&
-                  expected_perms=`echo $expected_perms|sed 's/..\(..\).$/--\1-/'`
+                  expected_perms=`
+                    echo $expected_perms | sed 's/..\(..\).$/--\1-/'
+                  `
                 ;;
             esac
             test _$actual_perms = _$expected_perms || exit 1
index a25cbb478a931892626649fb53e334b5807d156c..b0497841d1bd830e7f42b7f98d098d54703e6191 100755 (executable)
@@ -60,9 +60,24 @@ t1() {
       "$nameless_uid" "$@"
 }
 
-nameless_uid=`$PERL -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), exit }'`
-nameless_gid1=`$PERL -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), exit }'`
-nameless_gid2=`$PERL -le 'foreach my $i ('"$nameless_gid1"'+1..16*1024) { getgrgid $i or (print $i), exit }'`
+nameless_uid=`$PERL -le '
+  foreach my $i (1000..16*1024-1)
+    {
+      getpwuid $i or (print $i), exit
+    }
+'`
+nameless_gid1=`$PERL -le '
+  foreach my $i (1000..16*1024)
+    {
+      getgrgid $i or (print $i), exit
+    }
+'`
+nameless_gid2=`$PERL -le '
+  foreach my $i ('"$nameless_gid1"'+1..16*1024)
+    {
+      getgrgid $i or (print $i), exit
+    }
+'`
 
 if test -z "$nameless_uid" \
     || test -z "$nameless_gid1" \
index da3cc6a483944151fcb040b9fcd4f496ebd96e85..1b50e34d6a74a6f7bd4d5e74d002489af2df4b5b 100755 (executable)
@@ -40,7 +40,8 @@ esac
 min_kb=3000000
 test $min_kb -lt $free_kb ||
 {
-  skip_test_ "too little free space on current partition: $free_kb (need $min_kb KB)"
+  skip_test_ \
+    "too little free space on current partition: $free_kb (need $min_kb KB)"
 }
 
 big=big
index 1da08bfaaf622757d7570a044a25f9da4331c961..d27279013b9498fc1c9120fb698c4c165bb19bda 100755 (executable)
@@ -47,7 +47,9 @@ dir=`printf '%200s\n' ' '|tr ' ' x`
 # cd $tmp || framework_failure
 
 # Sheesh.  Bash 3.1.5 can't create this hierarchy.  I get
-# cd: error retrieving current directory: getcwd: cannot access parent directories:
+#   cd: error retrieving current directory: getcwd:
+#     cannot access parent directories:
+# (all on one line).
 
 cwd=`pwd`
 # Use perl instead:
index 4d89a1af6db070f231a195b00204609d38a4d509..22ba236563529f42a916a7982513af48820d8f0c 100644 (file)
@@ -111,7 +111,7 @@ fi
 
 # Eval this code in a subshell to determine a shell's suitability.
 # 10 - passes all tests; ok to use
-#  9 - ok, but enabling "set -x" corrupts application stderr; prefer higher score
+#  9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
 #  ? - not ok
 gl_shell_test_script_='
 test $(echo y) = y || exit 1
@@ -414,7 +414,8 @@ mktempd_()
 
   case $template_ in
   *XXXX) ;;
-  *) fail_ "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+  *) fail_ \
+       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
   esac
 
   # First, try to use mktemp.
index 3c45c2abb06aead94dcb1720ae4b51f9a17126cf..6e37c2c483a3d454269cd420d32e30f2253a9b11 100755 (executable)
@@ -74,7 +74,10 @@ test -d newdir3 || fail=1
 # hence cannot do anything meaningful with the following relative-named dirs.
 iwd=`pwd`
 mkdir sub || fail=1
-(cd sub && chmod 0 . && ginstall -d "$iwd/xx/yy" rel/sub1 rel/sub2 2> /dev/null) && fail=1
+(cd sub &&
+ chmod 0 . &&
+ ginstall -d "$iwd/xx/yy" rel/sub1 rel/sub2 2> /dev/null
+) && fail=1
 chmod 755 sub
 
 # Ensure that the first argument-dir has been created.
index e54c7ae55777368e3d04295f476a0ee4b9e3e727..73023a92c36cb5446a7b2b917bbcad0b4461ab09 100755 (executable)
@@ -24,7 +24,9 @@ print_ver_ ls
 
 require_root_
 
-nameless_uid=`$PERL -e 'foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }'`
+nameless_uid=`$PERL -e '
+  foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }
+'`
 
 if test x$nameless_uid = x; then
   skip_test_ "couldn't find a nameless UID"
index 8c17eb455654f6c3e94f29f3c91c6bddf5851230..fc837d0d746f115bf0dfcc336105a0430179cafa 100755 (executable)
@@ -22,7 +22,8 @@ print_ver_ ls
 # We use --local here so as to not activate
 # potentially very many remote mounts.
 mount_points=$(df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p')
-test -z "$mount_points" && skip_test_ "this test requires a non-root mount point"
+test -z "$mount_points" &&
+   skip_test_ "this test requires a non-root mount point"
 
 # Given e.g., /dev/shm, produce the list of GNU ls options that
 # let us list just that entry using readdir data from its parent:
index cfa903dd5b8b29890e353d74a4796b85303a07c1..2bce5cfd9a506d6e12d5ea01620eaffbf23ff7f9 100755 (executable)
@@ -28,12 +28,17 @@ test $(chroot / whoami) = root || fail=1
 test "$(groups)" = "$(chroot / groups)" || fail=1
 
 # Verify that credentials are changed correctly.
-test "$(chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP / whoami)" != root \
-    || fail=1
+whoami_after_chroot=$(
+  chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP / whoami
+)
+test "$whoami_after_chroot" != root || fail=1
 
 # Verify that there are no additional groups.
-test "$(chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP --groups=$NON_ROOT_GROUP / id -G)"\
-    = $NON_ROOT_GROUP || fail=1
+id_G_after_chroot=$(
+  chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP \
+    --groups=$NON_ROOT_GROUP / id -G
+)
+test "$id_G_after_chroot" = $NON_ROOT_GROUP || fail=1
 
 # Verify that when specifying only the user name we get the current
 # primary group ID.
index e8f003ff273fc437c1efa09409665b7dcc7b5b47..f91932c0206445f6922c919017918a7ecc6883cb 100755 (executable)
@@ -87,7 +87,8 @@ my @Tests =
     . "\tonly when operating on fields\n$try"}],
   # You must specify bytes or fields (or chars)
   ['z', '', {IN=>":\n"}, {OUT=>""}, {EXIT=>1},
-   {ERR=>"$prog: you must specify a list of bytes, characters, or fields\n$try"}],
+   {ERR=>"$prog: you must specify a list of bytes, characters, or fields\n$try"}
+  ],
   # Empty field list
   ['empty-fl', qw(-f ''), {IN=>":\n"}, {OUT=>""}, {EXIT=>1}, {ERR=>$from_1}],
   # Missing field list
@@ -124,7 +125,7 @@ my @Tests =
   ['out-delim3a', '-c1-3,2-4,6-', '--output-d=:', {IN=>"abcdefg\n"},
    {OUT=>"abcd:fg\n"}],
   # Ensure that the following two commands produce the same output.
-  # Before an off-by-one fix, the output from the former would not contain a `:'.
+  # Before an off-by-1 fix, the output from the former would not contain a `:'.
   ['out-delim4', '-c4-,2-3', '--output-d=:',
    {IN=>"abcdefg\n"}, {OUT=>"bc:defg\n"}],
   ['out-delim5', '-c2-3,4-', '--output-d=:',
@@ -137,14 +138,16 @@ my @Tests =
   ['od-overlap2', '-b1-2,2-', '--output-d=:', {IN=>"abc\n"}, {OUT=>"abc\n"}],
   ['od-overlap3', '-b1-3,2-', '--output-d=:', {IN=>"abcd\n"}, {OUT=>"abcd\n"}],
   ['od-overlap4', '-b1-3,2-3', '--output-d=:', {IN=>"abcd\n"}, {OUT=>"abc\n"}],
-  ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
+  ['od-overlap5', '-b1-3,1-4', '--output-d=:',
+   {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
 
   # None of the following invalid ranges provoked an error up to coreutils-6.9.
   ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
    {ERR=>"$prog: invalid decreasing range\n$try"}],
   ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
   ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
-  ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
+  ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
+   {ERR=>$no_endpoint}],
   ['inval5', '-f', '1-,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
   ['inval6', '-f', '-1,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
  );
index 1b64558b490a70550722de420cf186e64359ba87..38c4f3726877b757b81a3a9c2f93a35dfb5d2906 100755 (executable)
@@ -230,7 +230,8 @@ my @Tests =
      ['tz-5wf', '+%:8z', {OUT=>"%:8z"}, {ENV=>'TZ=XXX0:01'}],
 
      ['ns-relative',
-      '--iso=ns', "-d'1970-01-01 00:00:00.1234567 UTC +961062237.987654321 sec'",
+      '--iso=ns',
+      "-d'1970-01-01 00:00:00.1234567 UTC +961062237.987654321 sec'",
       {OUT=>"2000-06-15T09:43:58,111111021+0000"}],
      ['ns-relativer', '--rfc-3339=ns',
       "-d'1970-01-01 00:00:00.1234567 UTC +961062237.987654321 sec'",
index a319b943c103c2eeee2fc20cc270affcf80b60fa..ab43b5d566b383ddebed033272a3773e2fbc933e 100755 (executable)
@@ -216,7 +216,8 @@ my @tv = (
 # '--header' always outputs headers from the first file
 # even if the headers from the second file don't match
 ['header-5', '--header',
- [ "ID1 Name\n1 A\n2 B\n", "ID2 Color\n1 red\n"], "ID1 Name Color\n1 A red\n", 0],
+ [ "ID1 Name\n1 A\n2 B\n", "ID2 Color\n1 red\n"],
+   "ID1 Name Color\n1 A red\n", 0],
 
 );
 
index 819a819251045648f9dd41181da138847833a376..fc3bbb8c6d2354bb3d4510a679187fe19e17d897 100755 (executable)
@@ -62,8 +62,8 @@ my @Tests =
                                       . "invalid\n" }},
                                 {AUX=> {f=> 'foo'}},
                                 {OUT=>"f: FAILED\nf: FAILED\n"},
-                  {ERR=>"md5sum: WARNING: 1 line is improperly formatted\n"
-                      . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
+                {ERR=>"md5sum: WARNING: 1 line is improperly formatted\n"
+                    . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
                                 {EXIT=> 1}],
      # Similar to the above, but use --warn to evoke one more diagnostic.
      ['check-multifail-warn', '--check', '--warn',
index ecd779620f315779dfe248bf1980626280624f95..15badc0851239711f4d0e8a710084c95f69c56c7 100755 (executable)
@@ -60,7 +60,8 @@ my @Tests =
      ['check-bsd3', '--check', '--status',
                         {IN=> {'f.sha1' => "SHA1 (f) = $sha_degenerate\n"}},
                         {AUX=> {f=> 'bar'}}, {EXIT=> 1}],
-     ['check-openssl', '--check', {IN=> {'f.md5' => "MD5(f)= $sha_degenerate\n"}},
+     ['check-openssl', '--check',
+                        {IN=> {'f.md5' => "MD5(f)= $sha_degenerate\n"}},
                         {AUX=> {f=> ''}},
                         {ERR=>"sha1sum: f.md5: no properly formatted "
                           . "SHA1 checksum lines found\n"},
index a46c2a1faefd12f02f2c04156449030137057c01..634150dd1cd47f8c19e34c4a5cd4747e12af2ffc 100755 (executable)
@@ -26,12 +26,12 @@ use strict;
 my @Tests =
     (
      ['s3', {IN=> {f=> 'abc'}},
-                        {OUT=>"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7  f\n"}],
+      {OUT=>"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7  f\n"}],
      ['s4',
       {IN=> {f=> 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq'}},
-                        {OUT=>"75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525  f\n"}],
+      {OUT=>"75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525  f\n"}],
      ['s8', {IN=> {f=> 'a' x 1000000}},
-                        {OUT=>"20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67  f\n"}],
+      {OUT=>"20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67  f\n"}],
     );
 
 # Insert the `--text' argument for each test.
index 5bc526a275cff776887e004509251fb8b6f4c032..e01e29bbe40579e687f5fa13f3c80174f57a4434 100755 (executable)
@@ -55,8 +55,11 @@ my @Tests =
 ["n11b", '-s -n -k1,1', {IN=>".010\n.01a\n"}, {OUT=>".010\n.01a\n"}],
 
 # human readable suffixes
-["h1", '-h', {IN=>"1Y\n1Z\n1E\n1P\n1T\n1G\n1M\n1K\n02\n1\nY\n-1k\n-1M\n-1G\n-1T\n-1P\n-1E\n-1Z\n-1Y\n"},
- {OUT=>"-1Y\n-1Z\n-1E\n-1P\n-1T\n-1G\n-1M\n-1k\nY\n1\n02\n1K\n1M\n1G\n1T\n1P\n1E\n1Z\n1Y\n"}],
+["h1", '-h',
+ {IN=>"1Y\n1Z\n1E\n1P\n1T\n1G\n1M\n1K\n02\n1\nY\n-1k\n-1M\n-1G\n-1T\n"
+      . "-1P\n-1E\n-1Z\n-1Y\n"},
+ {OUT=>"-1Y\n-1Z\n-1E\n-1P\n-1T\n-1G\n-1M\n-1k\nY\n1\n02\n1K\n1M\n1G\n1T\n"
+      . "1P\n1E\n1Z\n1Y\n"}],
 ["h2", '-h', {IN=>"1M\n-2G\n-3K"}, {OUT=>"-2G\n-3K\n1M\n"}],
 # check that it works with powers of 1024
 ["h3", '-k 2,2h -k 1,1', {IN=>"a 1G\nb 1023M\n"}, {OUT=>"b 1023M\na 1G\n"}],
@@ -275,8 +278,14 @@ my @Tests =
 # of memcmp in the Next C library.  With optimization, gcc uses its
 # (working) builtin version.  Test case form William Lewis.
 ["20a", '',
- {IN=>"_________U__free\n_________U__malloc\n_________U__abort\n_________U__memcpy\n_________U__memset\n_________U_dyld_stub_binding_helper\n_________U__malloc\n_________U___iob\n_________U__abort\n_________U__fprintf\n"},
- {OUT=>"_________U___iob\n_________U__abort\n_________U__abort\n_________U__fprintf\n_________U__free\n_________U__malloc\n_________U__malloc\n_________U__memcpy\n_________U__memset\n_________U_dyld_stub_binding_helper\n"}],
+ {IN=>"_________U__free\n_________U__malloc\n_________U__abort\n"
+      . "_________U__memcpy\n_________U__memset\n"
+      . "_________U_dyld_stub_binding_helper\n_________U__malloc\n"
+      . "_________U___iob\n_________U__abort\n_________U__fprintf\n"},
+ {OUT=>"_________U___iob\n_________U__abort\n_________U__abort\n"
+       . "_________U__fprintf\n_________U__free\n_________U__malloc\n"
+       . "_________U__malloc\n_________U__memcpy\n_________U__memset\n"
+       . "_________U_dyld_stub_binding_helper\n"}],
 
 # Demonstrate that folding changes the ordering of e.g. A, a, and _
 # because while they normally (in the C locale) collate like A, _, a,
index 95f2c488ea4d2dc535619cd860d417cc6c0970ae..f82255d6f891be95f5b868bbc79ce8e2a59292cb 100755 (executable)
@@ -33,7 +33,8 @@ done
  exec 0</dev/null 3<&- 4<&- 5<&-
  sort -n -m __test.* > out
 ) &&
-compare in out || { fail=1; echo 'file descriptor exhaustion not handled' 1>&2; }
+compare in out ||
+  { fail=1; echo 'file descriptor exhaustion not handled' 1>&2; }
 
 echo 32 | tee -a in > in1
 (
index e2eb5c47fb3d98de687563ca1476602324981c7b..6082e8a02b8b3de1b42678e1b2ce74ea44684f9f 100755 (executable)
@@ -80,7 +80,7 @@ my @Tests =
    ['2a', '--files0-from=-', '<',
     {IN=>{f=>"g\0g\0"}}, {AUX=>{g=>'a'}}, {OUT=>"a\na\n"} ],
 
-   # Ensure that $prog performs no processing when there is a zero-length filename
+   # Ensure that $prog does nothing when there is a zero-length filename.
    # Note that the behavior here differs from `wc' in that the
    # first zero-length file name is treated as fatal, so there
    # should be no output on STDOUT.
index 8fa3bc36604882a9091d28b8c55c4639f89b0966..0034c452af143e8ddc095ff61bf9b7a2a84ca095 100755 (executable)
@@ -40,11 +40,13 @@ if (locale --version) > /dev/null 2>&1; then
   LC_ALL=$locale sort --random-sort in > out2 || fail=1
 
   # Fail if the output "randomly" is the same twice in a row.
-  compare out1 out2 > /dev/null && { fail=1; echo "not random with LC_ALL=$locale" 1>&2; }
+  compare out1 out2 > /dev/null &&
+    { fail=1; echo "not random with LC_ALL=$locale" 1>&2; }
 
   # Fail if the sorted output is not the same as the input.
   sort -n out > out1
-  compare in out1 || { fail=1; echo "not a permutation with LC_ALL=$locale" 1>&2; }
+  compare in out1 ||
+    { fail=1; echo "not a permutation with LC_ALL=$locale" 1>&2; }
 fi
 
 Exit $fail
index 59c7803708ecdc7edb183797e0a76f246d8fd7a3..2b7bdb8338cc5f2076a097662f19c18029e023bb 100755 (executable)
@@ -22,7 +22,8 @@ print_ver_ stdbuf mv
 getlimits_
 require_built_ stdbuf
 
-# stdbuf fails when the absolute top build dir name contains e.g., space, TAB, NL
+# stdbuf fails when the absolute top build dir name contains e.g.,
+# space, TAB, NL
 lf='
 '
 case $abs_top_builddir in
index 00cd8e62c266682a56df98021251361d53664745..8d7d755b72ef13a2b05600038c1083afbe8ccbdb 100755 (executable)
@@ -54,7 +54,8 @@ my @Tests =
   ['i', qw(-d '[:xdigit:]'), {IN=>'w0x1y2z3456789acbdefABCDEFz'},
    {OUT=>'wxyzz'}],
   ['j', qw(-d '[:digit:]'), {IN=>'0123456789'}, {OUT=>''}],
-  ['k', qw(-d '[:digit:]'), {IN=>'a0b1c2d3e4f5g6h7i8j9k'}, {OUT=>'abcdefghijk'}],
+  ['k', qw(-d '[:digit:]'),
+   {IN=>'a0b1c2d3e4f5g6h7i8j9k'}, {OUT=>'abcdefghijk'}],
   ['l', qw(-d '[:lower:]'), {IN=>'abcdefghijklmnopqrstuvwxyz'}, {OUT=>''}],
   ['m', qw(-d '[:upper:]'), {IN=>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'}, {OUT=>''}],
   ['n', qw(-d '[:lower:][:upper:]'),
@@ -83,11 +84,13 @@ my @Tests =
   ['u', qw(-ds b a), {IN=>'aabbaa'}, {OUT=>'a'}],
   ['v', qw(-ds '[:xdigit:]' Z), {IN=>'ZZ0123456789acbdefABCDEFZZ'}, {OUT=>'Z'}],
 
-  # Try some data with 8th bit set in case something is mistakenly sign-extended.
+  # Try some data with 8th bit set in case something is mistakenly
+  # sign-extended.
   ['w', qw(-ds '\350' '\345'),
    {IN=>"\300\301\377\345\345\350\345"},
    {OUT=>"\300\301\377\345"}],
-  ['x', qw(-s abcdefghijklmn '[:*016]'), {IN=>'abcdefghijklmnop'}, {OUT=>':op'}],
+  ['x', qw(-s abcdefghijklmn '[:*016]'),
+   {IN=>'abcdefghijklmnop'}, {OUT=>':op'}],
   ['y', qw(-d a-z), {IN=>'abc $code'}, {OUT=>' $'}],
   ['z', qw(-ds a-z '$.'), {IN=>'a.b.c $$$$code\\'}, {OUT=>'. $\\'}],
 
index 4d1f8a4ffa2da347f47a38373b26d635dff6d1a2..5e83ad94f6f8f59a69c14364a95926d5c406a5c9 100755 (executable)
@@ -180,10 +180,13 @@ my @Tests =
   "$prog: printing all duplicated lines and repeat counts is meaningless\n$try"}
   ],
  ['113', '--all-repeated=separate', {IN=>"a\na\n"}, {OUT=>"a\na\n"}],
- ['114', '--all-repeated=separate', {IN=>"a\na\nb\nc\nc\n"}, {OUT=>"a\na\n\nc\nc\n"}],
- ['115', '--all-repeated=separate', {IN=>"a\na\nb\nb\nc\n"}, {OUT=>"a\na\n\nb\nb\n"}],
+ ['114', '--all-repeated=separate',
+  {IN=>"a\na\nb\nc\nc\n"}, {OUT=>"a\na\n\nc\nc\n"}],
+ ['115', '--all-repeated=separate',
+  {IN=>"a\na\nb\nb\nc\n"}, {OUT=>"a\na\n\nb\nb\n"}],
  ['116', '--all-repeated=prepend', {IN=>"a\na\n"}, {OUT=>"\na\na\n"}],
- ['117', '--all-repeated=prepend', {IN=>"a\na\nb\nc\nc\n"}, {OUT=>"\na\na\n\nc\nc\n"}],
+ ['117', '--all-repeated=prepend',
+  {IN=>"a\na\nb\nc\nc\n"}, {OUT=>"\na\na\n\nc\nc\n"}],
  ['118', '--all-repeated=prepend', {IN=>"a\nb\n"}, {OUT=>""}],
  ['119', '--all-repeated=badoption', {IN=>"a\n"}, {OUT=>""}, {EXIT=>1},
   {ERR=>"$prog: invalid argument \`badoption' for \`--all-repeated'\n"
index c75e62bb497c1c4a22969080faaa8a4f56f94e66..c62491fda5e5f7f2e17eaad45994e3a3ee4752c1 100755 (executable)
@@ -21,11 +21,13 @@ print_ver_ mv
 require_strace_ unlink
 
 # Before the fix, mv would unnecessarily unlink the destination symlink:
-#   $ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink /bin/mv -T s1 s2
+#   $ rm -rf s[12]; ln -s / s1; ln -s /tmp s2
+#   $ strace -qe unlink /bin/mv -T s1 s2
 #   unlink("s2") = 0
 #
 # With the fix, it doesn't call unlink:
-#   $ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink ./mv -T s1 s2
+#   $ rm -rf s[12]; ln -s / s1; ln -s /tmp s2
+#   $ strace -qe unlink ./mv -T s1 s2
 #   $
 
 ln -s t1 s1 || framework_failure
index 2d80f599d0882739e3dc674146f96bc688679fc7..a506b92ad6c69c6ec8c47187bacb553c044c6d5e 100755 (executable)
@@ -30,9 +30,10 @@ chmod u-w "$other_partition_tmpdir" || framework_failure
 
 
 mv -f k "$other_partition_tmpdir" 2> out && fail=1
-cat <<EOF > exp
-mv: inter-device move failed: \`k' to \`$other_partition_tmpdir/k'; unable to remove target: Permission denied
-EOF
+printf \
+'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
+' unable to remove target: Permission denied\n' \
+  k "$other_partition_tmpdir/k" >exp
 
 # On some (less-compliant) systems, we get EPERM in this case.
 # Accept either diagnostic.
index 425718aff7e10301502a10f6013a7622a741bc6b..0d40355cb9da24dace52fe2be590a9731026caca 100755 (executable)
@@ -92,9 +92,10 @@ for copy in cp mv; do
           # remove any site-dependent part of other-partition file name,
           # and put brackets around the output.
           test -s .err && {
-            echo '[' | tr -d '\n'
-            sed 's/^[^:][^:]*\(..\):/\1:/;s,'"$other_partition_tmpdir/,," .err
-            echo ']' | tr -d '\n'
+            echo ' [' | tr -d '\n'
+            sed 's/^[^:][^:]*\(..\):/\1:/;s,'"$other_partition_tmpdir/,," .err |
+              tr -d '\n'
+            echo ']'
             }
           # Strip off all but the file names.
           # Remove any site-dependent part of each file name.
@@ -110,16 +111,16 @@ for copy in cp mv; do
                   -e "s,$other_partition_tmpdir/,," \
                   -e "s,$pwd_tmp/,," \
                   -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`
-          echo "($ls) ($ls2)"
+          echo " ("$ls") ("$ls2")"
 
           # If the command failed, then it must not have changed the files.
           if test $copy_status != 0; then
             for f in $actual_args; do
               test -f $f ||
-                { echo "$copy FAILED but removed $f"; continue; }
+                { echo " $copy FAILED but removed $f"; continue; }
               case "`cat $f`" in
                 "$contents") ;;
-                *) echo "$copy FAILED but modified $f";;
+                *) echo " $copy FAILED but modified $f";;
               esac
             done
           fi
@@ -134,15 +135,14 @@ for copy in cp mv; do
                 fi
                 case "`cat $f`" in
                   "$contents") ;;
-                  *) echo $copy FAILED;;
+                  *) echo " $copy FAILED";;
                 esac
               else
-                echo symlink-loop
+                echo " symlink-loop"
               fi
             done
           fi
-        ) | tr '\n' ' '
-        echo
+        )
       ) | sed 's/  *$//'
       cd ..
     done
@@ -154,49 +154,107 @@ test $fail = 1 &&
   { (exit 1); exit; }
 
 cat <<\EOF > $expected
-1 cp loc_reg rem_sl [cp: `loc_reg' and `rem_sl' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-0 cp --rem loc_reg rem_sl (loc_reg) (rem_sl)
-0 cp --rem -d loc_reg rem_sl (loc_reg) (rem_sl)
-0 cp --rem -b loc_reg rem_sl (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
-0 cp -b loc_reg rem_sl (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
-0 cp -bd loc_reg rem_sl (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
-1 cp -d loc_reg rem_sl [cp: `loc_reg' and `rem_sl' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-
-1 cp rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-1 cp --rem rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-1 cp --rem -d rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-1 cp --rem -b rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-1 cp -b rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-0 cp -bd rem_sl loc_reg (loc_reg -> dir/loc_reg loc_reg~) (rem_sl -> dir/loc_reg) symlink-loop symlink-loop
-1 cp -d rem_sl loc_reg [cp: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-
-1 cp loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-1 cp --rem loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-1 cp --rem -d loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-1 cp --rem -b loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-1 cp -b loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-0 cp -bd loc_sl rem_reg (loc_sl -> rem_reg) (rem_reg -> rem_reg rem_reg~) symlink-loop symlink-loop
-1 cp -d loc_sl rem_reg [cp: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-
-1 cp rem_reg loc_sl [cp: `rem_reg' and `loc_sl' are the same file ](loc_sl -> rem_reg) (rem_reg)
-0 cp --rem rem_reg loc_sl (loc_sl) (rem_reg)
-0 cp --rem -d rem_reg loc_sl (loc_sl) (rem_reg)
-0 cp --rem -b rem_reg loc_sl (loc_sl loc_sl~ -> rem_reg) (rem_reg)
-0 cp -b rem_reg loc_sl (loc_sl loc_sl~ -> rem_reg) (rem_reg)
-0 cp -bd rem_reg loc_sl (loc_sl loc_sl~ -> rem_reg) (rem_reg)
-1 cp -d rem_reg loc_sl [cp: `rem_reg' and `loc_sl' are the same file ](loc_sl -> rem_reg) (rem_reg)
-
-0 mv loc_reg rem_sl () (rem_sl)
-0 mv -b loc_reg rem_sl () (rem_sl rem_sl~ -> dir/loc_reg)
-
-1 mv rem_sl loc_reg [mv: `rem_sl' and `loc_reg' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
-0 mv -b rem_sl loc_reg (loc_reg -> dir/loc_reg loc_reg~) ()
-
-1 mv loc_sl rem_reg [mv: `loc_sl' and `rem_reg' are the same file ](loc_sl -> rem_reg) (rem_reg)
-0 mv -b loc_sl rem_reg () (rem_reg -> rem_reg rem_reg~)
-
-0 mv rem_reg loc_sl (loc_sl) ()
-0 mv -b rem_reg loc_sl (loc_sl loc_sl~ -> rem_reg) ()
+1 cp loc_reg rem_sl
+ [cp: `loc_reg' and `rem_sl' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+0 cp --rem loc_reg rem_sl
+ (loc_reg) (rem_sl)
+0 cp --rem -d loc_reg rem_sl
+ (loc_reg) (rem_sl)
+0 cp --rem -b loc_reg rem_sl
+ (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
+0 cp -b loc_reg rem_sl
+ (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
+0 cp -bd loc_reg rem_sl
+ (loc_reg) (rem_sl rem_sl~ -> dir/loc_reg)
+1 cp -d loc_reg rem_sl
+ [cp: `loc_reg' and `rem_sl' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+
+1 cp rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+1 cp --rem rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+1 cp --rem -d rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+1 cp --rem -b rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+1 cp -b rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+0 cp -bd rem_sl loc_reg
+ (loc_reg -> dir/loc_reg loc_reg~) (rem_sl -> dir/loc_reg)
+ symlink-loop
+ symlink-loop
+1 cp -d rem_sl loc_reg
+ [cp: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+
+1 cp loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+1 cp --rem loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+1 cp --rem -d loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+1 cp --rem -b loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+1 cp -b loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+0 cp -bd loc_sl rem_reg
+ (loc_sl -> rem_reg) (rem_reg -> rem_reg rem_reg~)
+ symlink-loop
+ symlink-loop
+1 cp -d loc_sl rem_reg
+ [cp: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+
+1 cp rem_reg loc_sl
+ [cp: `rem_reg' and `loc_sl' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+0 cp --rem rem_reg loc_sl
+ (loc_sl) (rem_reg)
+0 cp --rem -d rem_reg loc_sl
+ (loc_sl) (rem_reg)
+0 cp --rem -b rem_reg loc_sl
+ (loc_sl loc_sl~ -> rem_reg) (rem_reg)
+0 cp -b rem_reg loc_sl
+ (loc_sl loc_sl~ -> rem_reg) (rem_reg)
+0 cp -bd rem_reg loc_sl
+ (loc_sl loc_sl~ -> rem_reg) (rem_reg)
+1 cp -d rem_reg loc_sl
+ [cp: `rem_reg' and `loc_sl' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+
+0 mv loc_reg rem_sl
+ () (rem_sl)
+0 mv -b loc_reg rem_sl
+ () (rem_sl rem_sl~ -> dir/loc_reg)
+
+1 mv rem_sl loc_reg
+ [mv: `rem_sl' and `loc_reg' are the same file]
+ (loc_reg) (rem_sl -> dir/loc_reg)
+0 mv -b rem_sl loc_reg
+ (loc_reg -> dir/loc_reg loc_reg~) ()
+
+1 mv loc_sl rem_reg
+ [mv: `loc_sl' and `rem_reg' are the same file]
+ (loc_sl -> rem_reg) (rem_reg)
+0 mv -b loc_sl rem_reg
+ () (rem_reg -> rem_reg rem_reg~)
+
+0 mv rem_reg loc_sl
+ (loc_sl) ()
+0 mv -b rem_reg loc_sl
+ (loc_sl loc_sl~ -> rem_reg) ()
 
 EOF
 
index dbb558483ae754db8399aa2039935ff01b2afc38..a40f434fa9d9438af53aeb30d55359b8cec0f28b 100755 (executable)
@@ -41,7 +41,10 @@ chmod go+x . || framework_failure
 
 
 # Ensure that $NON_ROOT_USERNAME can access the required version of mv.
-version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" mv --version|sed -n '1s/.* //p'`
+version=`
+  setuidgid $NON_ROOT_USERNAME env PATH="$PATH" mv --version |
+  sed -n '1s/.* //p'
+`
 case $version in
   $PACKAGE_VERSION) ;;
   *) echo "$0: cannot access just-built mv as user $NON_ROOT_USERNAME" 1>&2
index 0dabdb682b5da3d1f8c7721fd8293591368fdd5a..0349a12a0f7213d67af50a8209a8926a58f1e8a2 100755 (executable)
@@ -256,8 +256,10 @@ my @tv = (
 ['10md', '-J -m -l 24 -f', [\'tFFt-lm', \'loli'], [\'Jml24f-lm-lo'], 0],
 ['10me', '-W 35 -J -m -l 24 -f', [\'tFFt-lm', \'loli'], [\'W35Jml24f-lmlo'], 0],
 ['10mf', '-w 35 -J -m -l 24 -f', [\'tFFt-lm', \'loli'], [\'W35Jml24f-lmlo'], 0],
-['10mg', '-n.3 -J -m -l 24 -f', [\'tFFt-lm', \'tFFt-lm', \'loli'], [\'nJml24f-lmlmlo'], 0],
-['10mh', '-n.3 -J -m -l 24 -f', [\'tFFt-lm', \'loli', \'tFFt-lm'], [\'nJml24f-lmlolm'], 0],
+['10mg', '-n.3 -J -m -l 24 -f', [\'tFFt-lm', \'tFFt-lm', \'loli'],
+ [\'nJml24f-lmlmlo'], 0],
+['10mh', '-n.3 -J -m -l 24 -f', [\'tFFt-lm', \'loli', \'tFFt-lm'],
+ [\'nJml24f-lmlolm'], 0],
 ['10aa', '-a -3 -l 24 -f', [\'tFFt-lm'], [\'a3l24f-lm'], 0],
 ['10ab', '-W 35 -a -3 -l 24 -f', [\'tFFt-lm'], [\'W35a3l24f-lm'], 0],
 ['10ac', '-J -a -3 -l 24 -f', [\'tFFt-lm'], [\'Ja3l24f-lm'], 0],
@@ -268,12 +270,18 @@ my @tv = (
 ['10bd', '-W 35 -J -b -3 -l 24 -f', [\'tFFt-lm'], [\'W35Jb3l24f-lm'], 0],
 #
 # merge files (-m option)  use separator string (-S option)
-['11sa', '-n.3 -S:--: -m -l 20 -f', [\'tFFt-bl', \'FnFn'], [\'nSml20-bl-FF'], 0],
-['11sb', '-n.3 -S:--: -m -l 24 -f', [\'tFFt-bl', \'FnFn'], [\'nSml24-bl-FF'], 0],
-['11se', '-n.3 -S:--: -m -l 20 -f', [\'tn', \'tn', \'FnFn'], [\'nSml20-t-t-FF'], 0],
-['11sf', '-n.3 -S:--: -m -l 24 -f', [\'tn', \'tn', \'FnFn'], [\'nSml24-t-t-FF'], 0],
-['11sg', '-n.3 -S:--: -m -l 20 -f', [\'tn', \'tn', \'FnFn', \'FnFn'], [\'nSml20-t-tFFFF'], 0],
-['11sh', '-n.3 -S:--: -m -l 24 -f', [\'tn', \'tn', \'FnFn', \'FnFn'], [\'nSml24-t-tFFFF'], 0],
+['11sa', '-n.3 -S:--: -m -l 20 -f', [\'tFFt-bl', \'FnFn'],
+ [\'nSml20-bl-FF'], 0],
+['11sb', '-n.3 -S:--: -m -l 24 -f', [\'tFFt-bl', \'FnFn'],
+ [\'nSml24-bl-FF'], 0],
+['11se', '-n.3 -S:--: -m -l 20 -f', [\'tn', \'tn', \'FnFn'],
+ [\'nSml20-t-t-FF'], 0],
+['11sf', '-n.3 -S:--: -m -l 24 -f', [\'tn', \'tn', \'FnFn'],
+ [\'nSml24-t-t-FF'], 0],
+['11sg', '-n.3 -S:--: -m -l 20 -f', [\'tn', \'tn', \'FnFn', \'FnFn'],
+ [\'nSml20-t-tFFFF'], 0],
+['11sh', '-n.3 -S:--: -m -l 24 -f', [\'tn', \'tn', \'FnFn', \'FnFn'],
+ [\'nSml24-t-tFFFF'], 0],
 #
 # left margin (-o option) and separator string (-S option)
 ['12aa', '-o3 -a -3 -l24 -f', [\'tn'], [\'o3a3l24f-tn'], 0],
@@ -284,7 +292,8 @@ my @tv = (
 ['12bc', '-o3 -b -3 -S:--: -n. -l24 -f', [\'tn'], [\'o3b3Snl24f-tn'], 0],
 ['12ma', '-o3 -m -l24 -f', [\'tFFt-bl', \'tn'], [\'o3ml24f-bl-tn'], 0],
 ['12mb', '-o3 -m -S:--: -l24 -f', [\'tFFt-bl', \'tn'], [\'o3mSl24f-bl-tn'], 0],
-['12mc', '-o3 -m -S:--: -n. -l24 -f', [\'tFFt-bl', \'tn'], [\'o3mSnl24fbltn'], 0],
+['12mc', '-o3 -m -S:--: -n. -l24 -f', [\'tFFt-bl', \'tn'],
+ [\'o3mSnl24fbltn'], 0],
 ['12md', '-o3 -J -m -l24 -f', [\'tFFt-lm', \'loli'], [\'o3Jml24f-lm-lo'], 0],
 #
 #
@@ -342,18 +351,23 @@ my @tv = (
 # SunOS.5.5.1-BUG: 8 input spaces --> 11 output spaces between a and b;
 ['i-opt-a', '-tn -i5 -h ""', "a        b\n", "    1    a           b\n", 0],
 # SunOS.5.5.1-BUG: 8 input spaces -->  9 output spaces between a and b;
-['i-opt-b', '-tn -i5 -o9 -h ""', "a        b\n", "                1    a           b\n", 0],
+['i-opt-b', '-tn -i5 -o9 -h ""', "a        b\n",
+ "                1    a           b\n", 0],
 #
 # line number overflow not allowed: cut off leading digits;
 # don't adapt other UNIXes, no real standard to follow, a consequent
 # programming of column handling may change the GNU pr concept.
-['ncut-a', '-tn2 -N98', "y\ny\ny\ny\ny\n", "98 y\n99   y\n00   y\n01   y\n02   y\n", 0],
-['ncut-b', '-tn:2 -N98', "y\ny\ny\ny\ny\n", "98:y\n99:y\n00:y\n01:y\n02:y\n", 0],
+['ncut-a', '-tn2 -N98', "y\ny\ny\ny\ny\n",
+ "98   y\n99   y\n00   y\n01   y\n02   y\n", 0],
+['ncut-b', '-tn:2 -N98', "y\ny\ny\ny\ny\n",
+ "98:y\n99:y\n00:y\n01:y\n02:y\n", 0],
 
 ['margin-0', '-o 0', '', '', 0],
 
 # BUG fixed: that leading space on 3rd line of output should not be there
-['dbl-sp-a', '-d -l 14 -h ""', "1\n2\n", "\n\n-- Date/Time --                                                   Page 1\n\n\n1\n\n2\n\n\n\n\n\n\n", 0],
+['dbl-sp-a', '-d -l 14 -h ""', "1\n2\n",
+ "\n\n-- Date/Time --                                                   "
+ . "Page 1\n\n\n1\n\n2\n\n\n\n\n\n\n", 0],
 # This test failed with 1.22e and earlier.
 ['dbl-sp-b', '-d -t', "1\n2\n", "1\n\n2\n\n", 0],
 
index 416c97e98ac357ba287039435b6481ed926942cf..49cd44169189bfb5adf9b9d3b3d0f9f792def0e0 100755 (executable)
@@ -31,7 +31,10 @@ touch a/b || framework_failure
 
 # Try to ensure that $NON_ROOT_USERNAME can access
 # the required version of rm.
-rm_version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version|sed -n '1s/.* //p'`
+rm_version=`
+  setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
+  sed -n '1s/.* //p'
+`
 case $rm_version in
   $PACKAGE_VERSION) ;;
   *) skip_test_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
index 7a12970462484a481cb9ba0e0b00747b96dfd9d5..6c11255c38459d8cb6a6b7f8208d847a03acce07 100755 (executable)
@@ -68,15 +68,15 @@ test -f file4-1 || fail=1
 
 cat <<\EOF > expout || fail=1
 EOF
-cat <<\EOF > experr || fail=1
+sed 's/@remove_empty/rm: remove regular empty file/g' <<\EOF > experr || fail=1
 no WHEN
-rm: remove regular empty file `file1-1'? rm: remove regular empty file `file1-2'? .
+@remove_empty `file1-1'? @remove_empty `file1-2'? .
 WHEN=never
 .
 WHEN=once
 rm: remove all arguments recursively? .
 WHEN=always
-rm: remove regular empty file `file4-1'? rm: remove regular empty file `file4-2'? .
+@remove_empty `file4-1'? @remove_empty `file4-2'? .
 -f overrides --interactive
 .
 --interactive overrides -f