summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-12-28 12:28:48 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-12-28 12:30:42 -0800
commitb0097f3d2180352896a4434fb8eaeb076f12794c (patch)
treeeb605f5d69d8c346278db1ccbec82d1a594403e1 /src
parent01211e9af728a5123b9cced19b7dfdc02b019f5b (diff)
downloadcoreutils-b0097f3d2180352896a4434fb8eaeb076f12794c.tar.xz
coreutils: keep lines within 80-column limits
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/cat.c3
-rw-r--r--src/copy.c3
-rw-r--r--src/cp.c19
-rw-r--r--src/dd.c3
-rw-r--r--src/df.c6
-rw-r--r--src/du.c6
-rw-r--r--src/groups.c3
-rw-r--r--src/install.c3
-rw-r--r--src/ls.c21
-rw-r--r--src/md5sum.c42
-rw-r--r--src/mv.c3
-rw-r--r--src/od.c6
-rw-r--r--src/pinky.c2
-rw-r--r--src/ptx.c9
-rw-r--r--src/readlink.c9
-rw-r--r--src/remove.c2
-rw-r--r--src/rmdir.c3
-rw-r--r--src/setuidgid.c3
-rw-r--r--src/sort.c25
-rw-r--r--src/tail.c3
-rw-r--r--src/touch.c4
22 files changed, 112 insertions, 68 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 00c7ff713..fd08303b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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' \
diff --git a/src/cat.c b/src/cat.c
index 47b505352..1295d8341 100644
--- 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;
}
diff --git a/src/copy.c b/src/copy.c
index 42d6d9249..a6621c22e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -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;
}
}
diff --git a/src/cp.c b/src/cp.c
index 3d00b5f7f..c103a82a9 100644
--- 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;
diff --git a/src/dd.c b/src/dd.c
index b6643e2e1..004cdfe27 100644
--- 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));
}
}
diff --git a/src/df.c b/src/df.c
index 749ce1a12..d54d081b6 100644
--- 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\
diff --git a/src/du.c b/src/du.c
index 4951826ea..bde017a2e 100644
--- 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 (_("\
diff --git a/src/groups.c b/src/groups.c
index c05da37d2..0f4c4ce2d 100644
--- a/src/groups.c
+++ b/src/groups.c
@@ -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);
diff --git a/src/install.c b/src/install.c
index 467e50046..5cfc0e2e8 100644
--- a/src/install.c
+++ b/src/install.c
@@ -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);
diff --git a/src/ls.c b/src/ls.c
index f861df91a..e5da0d797 100644
--- 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\
diff --git a/src/md5sum.c b/src/md5sum.c
index a660e3b2c..50bb0a1b4 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -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);
}
}
diff --git a/src/mv.c b/src/mv.c
index 91aadfa0e..e3230a888 100644
--- 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\
diff --git a/src/od.c b/src/od.c
index 2f7ef000a..ef2356e20 100644
--- 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)
{
}
diff --git a/src/pinky.c b/src/pinky.c
index e9b4d1bca..b19c4d8d8 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -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';
}
diff --git a/src/ptx.c b/src/ptx.c
index ba5aec519..56bb988f7 100644
--- 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];
diff --git a/src/readlink.c b/src/readlink.c
index a0f9173fb..eea307c3a 100644
--- a/src/readlink.c
+++ b/src/readlink.c
@@ -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\
diff --git a/src/remove.c b/src/remove.c
index d0b2dae2f..a827a6453 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -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>
diff --git a/src/rmdir.c b/src/rmdir.c
index 90a80a602..452a027ed 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -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);
diff --git a/src/setuidgid.c b/src/setuidgid.c
index 4881b46d7..59ed4782d 100644
--- a/src/setuidgid.c
+++ b/src/setuidgid.c
@@ -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\
diff --git a/src/sort.c b/src/sort.c
index 96e06960d..ec925465f 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -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"),
diff --git a/src/tail.c b/src/tail.c
index 2af9693de..47a3ba4f9 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -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);
diff --git a/src/touch.c b/src/touch.c
index f9374c07a..8c816e4b4 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -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