mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
maint: spelling fixes, including author names
Most of this just affects commentary and documentations. The only significant behavior change is translating author names via proper_name_lite rather than proper_name_utf8, or not translating them at all. proper_name_lite is good enough for coreutils and avoids the bloat that had coreutils not using Gnulib proper_name. * bootstrap.conf (gnulib_modules): Use propername-lite instead of propername. (XGETTEXT_OPTIONS): Look for proper_name_lite instead of for proper_name_utf8. * cfg.mk (local-checks-to-skip): Remove sc_proper_name_utf8_requires_ICONV, since we no longer use proper_name_utf8. (old_NEWS_hash): Update. (sc_check-I18N-AUTHORS): Remove; no longer needed.
This commit is contained in:
parent
e3f15c9c4a
commit
2dddc87214
2
.github/ISSUE_TEMPLATE.txt
vendored
2
.github/ISSUE_TEMPLATE.txt
vendored
@ -13,7 +13,7 @@ Before reporting a new bug, please check the following resources:
|
||||
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
||||
|
||||
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
||||
contains a list of some quirks and unexpected behaviour (which are often
|
||||
contains a list of some quirks and unexpected behavior (which are often
|
||||
mistaken for bugs).
|
||||
|
||||
* Online Manual:
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.txt
vendored
2
.github/PULL_REQUEST_TEMPLATE.txt
vendored
@ -22,7 +22,7 @@ contributing to the GNU Project, please read
|
||||
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
||||
|
||||
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
||||
contains a list of some quirks and unexpected behaviour (which are often
|
||||
contains a list of some quirks and unexpected behavior (which are often
|
||||
mistaken for bugs).
|
||||
|
||||
* Online Manual:
|
||||
|
||||
22
AUTHORS
22
AUTHORS
@ -2,30 +2,30 @@ Here are the names of the programs in this package,
|
||||
each followed by the name(s) of its author(s).
|
||||
|
||||
arch: David MacKenzie, Karel Zak
|
||||
b2sum: Padraig Brady, Samuel Neves
|
||||
b2sum: Pádraig Brady, Samuel Neves
|
||||
base32: Simon Josefsson
|
||||
base64: Simon Josefsson
|
||||
basename: David MacKenzie
|
||||
basenc: Simon Josefsson, Assaf Gordon
|
||||
cat: Torbjorn Granlund, Richard M. Stallman
|
||||
cat: Torbjörn Granlund, Richard M. Stallman
|
||||
chcon: Russell Coker, Jim Meyering
|
||||
chgrp: David MacKenzie, Jim Meyering
|
||||
chmod: David MacKenzie, Jim Meyering
|
||||
chown: David MacKenzie, Jim Meyering
|
||||
chroot: Roland McGrath
|
||||
cksum: Padraig Brady, Q. Frank Xia
|
||||
cksum: Pádraig Brady, Q. Frank Xia
|
||||
comm: Richard M. Stallman, David MacKenzie
|
||||
coreutils: Alex Deymo
|
||||
cp: Torbjorn Granlund, David MacKenzie, Jim Meyering
|
||||
cp: Torbjörn Granlund, David MacKenzie, Jim Meyering
|
||||
csplit: Stuart Kemp, David MacKenzie
|
||||
cut: David M. Ihnat, David MacKenzie, Jim Meyering
|
||||
date: David MacKenzie
|
||||
dd: Paul Rubin, David MacKenzie, Stuart Kemp
|
||||
df: Torbjorn Granlund, David MacKenzie, Paul Eggert
|
||||
df: Torbjörn Granlund, David MacKenzie, Paul Eggert
|
||||
dir: Richard M. Stallman, David MacKenzie
|
||||
dircolors: H. Peter Anvin
|
||||
dirname: David MacKenzie, Jim Meyering
|
||||
du: Torbjorn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
|
||||
du: Torbjörn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
|
||||
echo: Brian Fox, Chet Ramey
|
||||
env: Richard Mlynarik, David MacKenzie, Assaf Gordon
|
||||
expand: David MacKenzie
|
||||
@ -67,7 +67,7 @@ printf: David MacKenzie
|
||||
ptx: François Pinard
|
||||
pwd: Jim Meyering
|
||||
readlink: Dmitry V. Levin
|
||||
realpath: Padraig Brady
|
||||
realpath: Pádraig Brady
|
||||
rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering
|
||||
rmdir: David MacKenzie
|
||||
runcon: Russell Coker
|
||||
@ -81,9 +81,9 @@ shred: Colin Plumb
|
||||
shuf: Paul Eggert
|
||||
sleep: Jim Meyering, Paul Eggert
|
||||
sort: Mike Haertel, Paul Eggert
|
||||
split: Torbjorn Granlund, Richard M. Stallman
|
||||
split: Torbjörn Granlund, Richard M. Stallman
|
||||
stat: Michael Meskes
|
||||
stdbuf: Padraig Brady
|
||||
stdbuf: Pádraig Brady
|
||||
stty: David MacKenzie
|
||||
sum: Kayvan Aghaiepour, David MacKenzie
|
||||
sync: Jim Meyering, Giuseppe Scrivano
|
||||
@ -91,11 +91,11 @@ tac: Jay Lepreau, David MacKenzie
|
||||
tail: Paul Rubin, David MacKenzie, Ian Lance Taylor, Jim Meyering
|
||||
tee: Mike Parker, Richard M. Stallman, David MacKenzie
|
||||
test: Kevin Braunsdorf, Matthew Bradburn
|
||||
timeout: Padraig Brady
|
||||
timeout: Pádraig Brady
|
||||
touch: Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith
|
||||
tr: Jim Meyering
|
||||
true: Jim Meyering
|
||||
truncate: Padraig Brady
|
||||
truncate: Pádraig Brady
|
||||
tsort: Mark Kettenis
|
||||
tty: David MacKenzie
|
||||
uname: David MacKenzie
|
||||
|
||||
16
NEWS
16
NEWS
@ -88,7 +88,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
cp, mv, and install now avoid copy_file_range on linux kernels before 5.3
|
||||
irrespective of which kernel version coreutils is built against,
|
||||
reinstating that behaviour from coreutils-9.0.
|
||||
reinstating that behavior from coreutils-9.0.
|
||||
|
||||
comm, cut, join, od, and uniq will now exit immediately upon receiving a
|
||||
write error, which is significant when reading large / unbounded inputs.
|
||||
@ -126,7 +126,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
[bug introduced in coreutils-9.2]
|
||||
|
||||
cp --recursive --backup will again operate correctly.
|
||||
Previousy it may have issued "File exists" errors when
|
||||
Previously it may have issued "File exists" errors when
|
||||
it failed to appropriately rename files being replaced.
|
||||
[bug introduced in coreutils-9.2]
|
||||
|
||||
@ -416,7 +416,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
though they still work.
|
||||
|
||||
ls no longer colors files with capabilities by default, as file-based
|
||||
capabilties are very rarely used, and lookup increases processing per file by
|
||||
capabilities are rarely used, and lookup increases processing per file by
|
||||
about 30%. It's best to use getcap [-r] to identify files with capabilities.
|
||||
|
||||
ls no longer tries to automount files, reverting to the behavior
|
||||
@ -507,7 +507,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
expr no longer mishandles unmatched \(...\) in regular expressions.
|
||||
[bug introduced in coreutils-6.0]
|
||||
|
||||
ls no longer crashes when printing the SELinux context for unstatable files.
|
||||
ls no longer crashes when printing the SELinux context for unstattable files.
|
||||
[bug introduced in coreutils-6.9.91]
|
||||
|
||||
mkdir -m no longer mishandles modes more generous than the umask.
|
||||
@ -1086,7 +1086,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
** Bug fixes
|
||||
|
||||
cp --parents will now set an SELinux context for created directories,
|
||||
as appropriate for the -a, --preseve=context, or -Z options.
|
||||
as appropriate for the -a, --preserve=context, or -Z options.
|
||||
[bug present since SELinux support added in coreutils-6.10]
|
||||
|
||||
date again converts from a specified time zone. Previously output was
|
||||
@ -1723,7 +1723,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
** Bug fixes
|
||||
|
||||
df now processes the mount list correctly in the presence of unstatable
|
||||
df now processes the mount list correctly in the presence of unstattable
|
||||
mount points. Previously it may have failed to output some mount points.
|
||||
[bug introduced in coreutils-8.21]
|
||||
|
||||
@ -2976,7 +2976,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
ls --color now handles files with capabilities correctly. Previously
|
||||
files with capabilities were often not colored, and also sometimes, files
|
||||
without capabilites were colored in error. [bug introduced in coreutils-7.0]
|
||||
without capabilities were colored in error. [bug introduced in coreutils-7.0]
|
||||
|
||||
md5sum now prints checksums atomically so that concurrent
|
||||
processes will not intersperse their output.
|
||||
@ -3125,7 +3125,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
avoid the disproportionate quadratic performance penalty. Leading to
|
||||
another improvement:
|
||||
|
||||
rm -r is now slightly more standards-conformant when operating on
|
||||
rm -r is now slightly more standard-conforming when operating on
|
||||
write-protected files with relative names longer than 8KiB.
|
||||
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ _path='export PATH='$srcdir':${PATH#*:}'
|
||||
pre='#!/bin/sh\n'"$_path"'\n'
|
||||
n=15 # stack trace depth
|
||||
log_fd=3 # One can redirect this to file like 3>vg.log
|
||||
test -e /tmp/cu-vg && suppressions='--supressions=/tmp/cu-vg'
|
||||
test -e /tmp/cu-vg && suppressions='--suppressions=/tmp/cu-vg'
|
||||
vg="exec /usr/bin/valgrind $suppressions --log-fd=$log_fd \
|
||||
--leak-check=yes --track-fds=yes --leak-check=full --num-callers=$n"
|
||||
cat <<EOF > src/vg/gen
|
||||
|
||||
@ -635,7 +635,7 @@ Tony Leneis tony@plaza.ds.adp.com
|
||||
Tony Robinson ajr@eng.cam.ac.uk
|
||||
Toomas Soome Toomas.Soome@Elion.ee
|
||||
Toralf Förster toralf.foerster@gmx.de
|
||||
Torbjorn Lindgren tl@funcom.no
|
||||
Torbjörn Lindgren tl@funcom.no
|
||||
Torsten Landschoff torsten@pclab.ifg.uni-kiel.de
|
||||
Travis Gummels tgummels@redhat.com
|
||||
Tristan Miller psychonaut@nothingisreal.com
|
||||
|
||||
@ -212,7 +212,7 @@ gnulib_modules="
|
||||
posixver
|
||||
priv-set
|
||||
progname
|
||||
propername
|
||||
propername-lite
|
||||
pthread-cond
|
||||
pthread-mutex
|
||||
pthread-thread
|
||||
@ -350,7 +350,7 @@ see_manual='"This is a proper name. See the gettext manual, section Names."'
|
||||
see_manual=\'"$see_manual"\'
|
||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||
--keyword=proper_name:1,'"$see_manual"'\\\
|
||||
--keyword=proper_name_utf8:1,'"$see_manual"'\\\
|
||||
--keyword=proper_name_lite:1,'"$see_manual"'\\\
|
||||
'
|
||||
|
||||
gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
|
||||
|
||||
13
cfg.mk
13
cfg.mk
@ -26,7 +26,6 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = src/blake2/.*$$
|
||||
|
||||
# Tests not to run as part of "make distcheck".
|
||||
local-checks-to-skip = \
|
||||
sc_proper_name_utf8_requires_ICONV \
|
||||
sc_indent
|
||||
|
||||
# Tools used to bootstrap this package, used for "announcement".
|
||||
@ -49,7 +48,7 @@ export VERBOSE = yes
|
||||
# 4914152 9e
|
||||
export XZ_OPT = -8e
|
||||
|
||||
old_NEWS_hash = ac6cb1c35890b53e56acbfbb078fcd53
|
||||
old_NEWS_hash = c550e6659b8350f62d9cd0483bf0c199
|
||||
|
||||
# Add an exemption for sc_makefile_at_at_check.
|
||||
_makefile_at_at_check_exceptions = \
|
||||
@ -289,16 +288,6 @@ sc_check-AUTHORS: $(all_programs)
|
||||
&& diff $(au_actual) $(au_dotdot) \
|
||||
&& rm -f $(au_actual) $(au_dotdot)
|
||||
|
||||
# Each program with a non-ASCII author name must link with LIBICONV.
|
||||
sc_check-I18N-AUTHORS:
|
||||
@cd $(srcdir)/src && \
|
||||
for i in $$(git grep -l -w proper_name_utf8 *.c|sed 's/\.c//'); do \
|
||||
grep -E "^src_$${i}_LDADD"' .?= .*\$$\(LIBICONV\)' local.mk \
|
||||
> /dev/null \
|
||||
|| { echo "$(ME): link rules for $$i do not include" \
|
||||
'$$(LIBICONV)' 1>&2; exit 1; }; \
|
||||
done
|
||||
|
||||
# Ensure the alternative __attribute (keyword) form isn't used as
|
||||
# that form is not elided where required. Also ensure that we don't
|
||||
# directly use attributes already defined by gnulib.
|
||||
|
||||
@ -547,7 +547,7 @@ AM_CONDITIONAL([USE_PCLMUL_CRC32],
|
||||
CFLAGS=$ac_save_CFLAGS
|
||||
|
||||
CFLAGS="-mavx2 $CFLAGS"
|
||||
AC_MSG_CHECKING([if avx2 intrinstics exists])
|
||||
AC_MSG_CHECKING([for avx2 intrinsics])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
#include <x86intrin.h>
|
||||
|
||||
@ -4011,8 +4011,8 @@ distribution).
|
||||
|
||||
@menu
|
||||
* cksum output modes:: Legacy and non Legacy output formats
|
||||
* cksum general options:: Options suppported only by cksum
|
||||
* cksum common options:: Options suppported also by standalone utilities
|
||||
* cksum general options:: Options supported only by cksum
|
||||
* cksum common options:: Options supported also by standalone utilities
|
||||
@end menu
|
||||
|
||||
@node cksum output modes
|
||||
@ -4176,7 +4176,7 @@ supports auto-detecting the digest algorithm to use,
|
||||
when presented with checksum information in the @option{--tag} output format.
|
||||
|
||||
Also for the @command{cksum} command, the @option{--check} option
|
||||
auto-detects the digest encoding, accepting both standard hexidecimal
|
||||
auto-detects the digest encoding, accepting both standard hexadecimal
|
||||
checksums and those generated via @command{cksum} with its
|
||||
@option{--base64} option.
|
||||
|
||||
@ -4461,7 +4461,7 @@ specified for all GNU utilities) has no limit on input line length or
|
||||
restrictions on bytes allowed within lines.
|
||||
|
||||
@command{sort} has three modes of operation: sort (the default), merge,
|
||||
and check for sortedness. The following options change the operation
|
||||
and check for order. The following options change the operation
|
||||
mode:
|
||||
|
||||
@table @samp
|
||||
@ -4471,7 +4471,7 @@ mode:
|
||||
@itemx --check=diagnose-first
|
||||
@opindex -c
|
||||
@opindex --check
|
||||
@cindex checking for sortedness
|
||||
@cindex checking whether a file is sorted
|
||||
Check whether the given file is already sorted: if it is not all
|
||||
sorted, print a diagnostic containing the first out-of-order line and
|
||||
exit with a status of 1.
|
||||
@ -4483,7 +4483,7 @@ At most one input file can be given.
|
||||
@itemx --check=silent
|
||||
@opindex -c
|
||||
@opindex --check
|
||||
@cindex checking for sortedness
|
||||
@cindex checking whether a file is sorted
|
||||
Exit successfully if the given file is already sorted, and
|
||||
exit with status 1 otherwise.
|
||||
At most one input file can be given.
|
||||
@ -12173,7 +12173,7 @@ a mounted file system, @command{df} shows the space available on that
|
||||
file system rather than on the file system containing the device node.
|
||||
GNU @command{df} does not attempt to determine the usage
|
||||
on unmounted file systems, because on most kinds of systems doing so
|
||||
requires extremely nonportable intimate knowledge of file system structures.
|
||||
requires extremely non-portable intimate knowledge of file system structures.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@ -13387,7 +13387,7 @@ For example, @samp{printf '\400'} is equivalent to @samp{printf '\0'}.
|
||||
@cindex Unicode
|
||||
@cindex ISO/IEC 10646
|
||||
@vindex LC_CTYPE
|
||||
@command{printf} interprets two syntaxes for specifying Unicode
|
||||
@command{printf} interprets two syntax forms for specifying Unicode
|
||||
(ISO/IEC 10646) characters.
|
||||
@samp{\u} for 16-bit Unicode characters, specified as
|
||||
four hexadecimal digits @var{hhhh}, and @samp{\U} for 32-bit Unicode
|
||||
@ -13403,7 +13403,7 @@ The processing of @samp{\u} and @samp{\U} requires a full-featured
|
||||
or when @code{libiconv} is installed prior to this package. Otherwise
|
||||
@samp{\u} and @samp{\U} will print as-is.
|
||||
|
||||
The Unicode character syntaxes are useful for writing strings in a locale
|
||||
Unicode character syntax is useful for writing strings in a locale
|
||||
independent way. For example, a string containing the Euro currency symbol
|
||||
|
||||
@example
|
||||
|
||||
@ -843,7 +843,7 @@ natsort -- how it works}).
|
||||
Ruby's @uref{https://github.com/github/version_sorter,version_sorter}.
|
||||
|
||||
@item
|
||||
Perl has multiple packages for natual and version sorts
|
||||
Perl has multiple packages for natural and version sorts
|
||||
(each likely with its own rules and nuances):
|
||||
@uref{https://metacpan.org/pod/Sort::Naturally,Sort::Naturally},
|
||||
@uref{https://metacpan.org/pod/Sort::Versions,Sort::Versions},
|
||||
@ -865,7 +865,7 @@ glob modifier} @samp{*(n)} will expand to files in natural sort order.
|
||||
When writing C programs, the GNU libc library (@samp{glibc})
|
||||
provides the
|
||||
@uref{https://man7.org/linux/man-pages/man3/strverscmp.3.html,
|
||||
strvercmp(3)} function to compare two strings, and
|
||||
strverscmp(3)} function to compare two strings, and
|
||||
@uref{https://man7.org/linux/man-pages/man3/versionsort.3.html,versionsort(3)}
|
||||
function to compare two directory entries (despite the names, they are
|
||||
not identical to GNU Coreutils version sort ordering).
|
||||
|
||||
4
init.cfg
4
init.cfg
@ -275,7 +275,7 @@ require_valgrind_()
|
||||
# If the given ACL spec would not change the ACLs on the file, then setfacl
|
||||
# does not invoke the underlying system call - setxattr(). Therefore, to test
|
||||
# if setting ACLs really works on the current file system, call setfacl twice
|
||||
# with conflictive ACL specs.
|
||||
# with conflicting ACL specs.
|
||||
require_setfacl_()
|
||||
{
|
||||
local d='acltestdir_'
|
||||
@ -539,7 +539,7 @@ require_trap_signame_()
|
||||
# dash 0.5.8 at least does not.
|
||||
require_kill_group_()
|
||||
{
|
||||
kill -0 -- -1 || skip_ 'requires kill with group signalling support'
|
||||
kill -0 -- -1 || skip_ 'requires kill with group signaling support'
|
||||
}
|
||||
|
||||
# Return nonzero if the specified path is on a file system for
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
basenc \- Encode/decode data and print to standard output
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[ENCODINGS EXAMPLES]
|
||||
[ENCODING EXAMPLES]
|
||||
.PP
|
||||
.nf
|
||||
.RS
|
||||
|
||||
2
man/df.x
2
man/df.x
@ -24,6 +24,6 @@ shows the space available on that file system rather than on the
|
||||
file system containing the device node. This version of
|
||||
.B df
|
||||
cannot show the space available on unmounted file systems, because on
|
||||
most kinds of systems doing so requires very nonportable intimate
|
||||
most kinds of systems doing so requires non-portable intimate
|
||||
knowledge of file system structures.
|
||||
.SH OPTIONS
|
||||
|
||||
@ -32,7 +32,7 @@ Older version (pre 7.2) mention 'tee','eaccess','futimens'.
|
||||
Details
|
||||
-------
|
||||
|
||||
GLibC version 2.28 removed non-standed headre file (libio.h) and some
|
||||
GLibC version 2.28 removed a non-standard header file (libio.h) and some
|
||||
internal symbols which were used by gnulib (a core component of GNU coreutils).
|
||||
|
||||
These were announced as 'deprecated' in version 2.27 [1], and removed in
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
* Usually much faster than other versions of cat, the difference
|
||||
is especially apparent when using the -v option.
|
||||
|
||||
By tege@sics.se, Torbjorn Granlund, advised by rms, Richard Stallman. */
|
||||
By tege@sics.se, Torbjörn Granlund, advised by rms, Richard Stallman. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
#define PROGRAM_NAME "cat"
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Torbjorn Granlund"), \
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name ("Richard M. Stallman")
|
||||
|
||||
/* Name of input file. May be "-". */
|
||||
|
||||
@ -457,7 +457,7 @@ main (int argc, char **argv)
|
||||
case '=':
|
||||
case '0': case '1': case '2': case '3':
|
||||
case '4': case '5': case '6': case '7':
|
||||
/* Support nonportable uses like "chmod -w", but diagnose
|
||||
/* Support non-portable uses like "chmod -w", but diagnose
|
||||
surprises due to umask confusion. Even though "--", "--r",
|
||||
etc., are valid modes, there is no "case '-'" here since
|
||||
getopt_long reserves leading "--" for long options. */
|
||||
|
||||
@ -2996,7 +2996,7 @@ skip:
|
||||
omitted_permissions = 0;
|
||||
|
||||
/* For directories, the process global context could be reset for
|
||||
descendents, so use it to set the context for existing dirs here.
|
||||
descendants, so use it to set the context for existing dirs here.
|
||||
This will also give earlier indication of failure to set ctx. */
|
||||
if (x->set_security_context || x->preserve_security_context)
|
||||
if (! set_file_security_ctx (dst_name, false, x))
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Torbjorn Granlund, Sweden (tege@sics.se).
|
||||
Written by Torbjörn Granlund, Sweden (tege@sics.se).
|
||||
Rewritten to use lib/hash.c by Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
4
src/cp.c
4
src/cp.c
@ -14,7 +14,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering. */
|
||||
Written by Torbjörn Granlund, David MacKenzie, and Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
@ -40,7 +40,7 @@
|
||||
#define PROGRAM_NAME "cp"
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Torbjorn Granlund"), \
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name ("David MacKenzie"), \
|
||||
proper_name ("Jim Meyering")
|
||||
|
||||
|
||||
4
src/dd.c
4
src/dd.c
@ -885,7 +885,7 @@ install_signal_handlers (void)
|
||||
act.sa_handler = siginfo_handler;
|
||||
/* Note we don't use SA_RESTART here and instead
|
||||
handle EINTR explicitly in iftruncate etc.
|
||||
to avoid blocking on noncommitted read/write calls. */
|
||||
to avoid blocking on uncommitted read/write calls. */
|
||||
act.sa_flags = 0;
|
||||
sigaction (SIGINFO, &act, nullptr);
|
||||
}
|
||||
@ -1418,7 +1418,7 @@ static intmax_t
|
||||
parse_integer (char const *str, strtol_error *invalid)
|
||||
{
|
||||
/* Call xstrtoumax, not xstrtoimax, since we don't want to
|
||||
allow strings like " -0". Initialize N to an interminate value;
|
||||
allow strings like " -0". Initialize N to an indeterminate value;
|
||||
calling code should not rely on this function returning 0
|
||||
when *INVALID represents a non-overflow error. */
|
||||
int indeterminate = 0;
|
||||
|
||||
2
src/df.c
2
src/df.c
@ -43,7 +43,7 @@
|
||||
#define PROGRAM_NAME "df"
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Torbjorn Granlund"), \
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name ("David MacKenzie"), \
|
||||
proper_name ("Paul Eggert")
|
||||
|
||||
|
||||
@ -135,11 +135,11 @@
|
||||
proper_name ("David MacKenzie")
|
||||
#elif HASH_ALGO_CKSUM
|
||||
# define AUTHORS \
|
||||
proper_name ("Padraig Brady"), \
|
||||
proper_name_lite ("Padraig Brady", "P\303\241draig Brady"), \
|
||||
proper_name ("Q. Frank Xia")
|
||||
#elif HASH_ALGO_BLAKE2
|
||||
# define AUTHORS \
|
||||
proper_name ("Padraig Brady"), \
|
||||
proper_name_lite ("Padraig Brady", "P\303\241draig Brady"), \
|
||||
proper_name ("Samuel Neves")
|
||||
#else
|
||||
# define AUTHORS \
|
||||
|
||||
4
src/du.c
4
src/du.c
@ -18,7 +18,7 @@
|
||||
* Doesn't simply ignore the names of regular files given as arguments
|
||||
when -a is given.
|
||||
|
||||
By tege@sics.se, Torbjorn Granlund,
|
||||
By tege@sics.se, Torbjörn Granlund,
|
||||
and djm@ai.mit.edu, David MacKenzie.
|
||||
Variable blocks added by lm@sgi.com and eggert@twinsun.com.
|
||||
Rewritten to use nftw, then to use fts by Jim Meyering. */
|
||||
@ -49,7 +49,7 @@ extern bool fts_debug;
|
||||
#define PROGRAM_NAME "du"
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Torbjorn Granlund"), \
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name ("David MacKenzie"), \
|
||||
proper_name ("Paul Eggert"), \
|
||||
proper_name ("Jim Meyering")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* expand-common - common functionality for expand/unexapnd
|
||||
/* expand-common - common functionality for expand/unexpand
|
||||
Copyright (C) 1989-2023 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* expand-common - common functionality for expand/unexapnd
|
||||
/* expand-common - common functionality for expand/unexpand
|
||||
|
||||
Copyright (C) 1989-2023 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
18
src/factor.c
18
src/factor.c
@ -24,7 +24,7 @@
|
||||
/* Efficiently factor numbers that fit in one or two words (word = uintmax_t),
|
||||
or, with GMP, numbers of any size.
|
||||
|
||||
Code organisation:
|
||||
Code organization:
|
||||
|
||||
There are several variants of many functions, for handling one word, two
|
||||
words, and GMP's mpz_t type. If the one-word variant is called foo, the
|
||||
@ -48,7 +48,7 @@
|
||||
Status of found factors are checked again using Miller-Rabin and Lucas.
|
||||
|
||||
We prefer using Hensel norm in the divisions, not the more familiar
|
||||
Euclidian norm, since the former leads to much faster code. In the
|
||||
Euclidean norm, since the former leads to much faster code. In the
|
||||
Pollard-Brent rho code and the prime testing code, we use Montgomery's
|
||||
trick of multiplying all n-residues by the word base, allowing cheap Hensel
|
||||
reductions mod n.
|
||||
@ -77,10 +77,10 @@
|
||||
using gcc 4.6 and 4.7. Some software pipelining should help; 1, 2, and 4
|
||||
respectively cycles ought to be possible.
|
||||
|
||||
* The redcify function could be vastly improved by using (plain Euclidian)
|
||||
* The redcify function could be vastly improved by using (plain Euclidean)
|
||||
pre-inversion (such as GMP's invert_limb) and udiv_qrnnd_preinv (from
|
||||
GMP's gmp-impl.h). The redcify2 function could be vastly improved using
|
||||
similar methoods. These functions currently dominate run time when using
|
||||
similar methods. These functions currently dominate run time when using
|
||||
the -w option.
|
||||
*/
|
||||
|
||||
@ -118,8 +118,8 @@
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Paul Rubin"), \
|
||||
proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name_utf8 ("Niels Moller", "Niels M\303\266ller")
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name_lite ("Niels Moller", "Niels M\303\266ller")
|
||||
|
||||
/* Token delimiters when reading from a file. */
|
||||
#define DELIM "\n\t "
|
||||
@ -1201,7 +1201,7 @@ prime_p (uintmax_t n)
|
||||
if (n <= 1)
|
||||
return false;
|
||||
|
||||
/* We have already casted out small primes. */
|
||||
/* We have already cast out small primes. */
|
||||
if (n < (uintmax_t) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME)
|
||||
return true;
|
||||
|
||||
@ -1380,7 +1380,7 @@ mp_prime_p (mpz_t n)
|
||||
if (mpz_cmp_ui (n, 1) <= 0)
|
||||
return false;
|
||||
|
||||
/* We have already casted out small primes. */
|
||||
/* We have already cast out small primes. */
|
||||
if (mpz_cmp_ui (n, (long) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME) < 0)
|
||||
return true;
|
||||
|
||||
@ -1876,7 +1876,7 @@ static short const invtab[0x81] =
|
||||
};
|
||||
|
||||
/* Compute q = [u/d], r = u mod d. Avoids slow hardware division for the case
|
||||
that q < 0x40; here it instead uses a table of (Euclidian) inverses. */
|
||||
that q < 0x40; here it instead uses a table of (Euclidean) inverses. */
|
||||
# define div_smallq(q, r, u, d) \
|
||||
do { \
|
||||
if ((u) / 0x40 < (d)) \
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#define PROGRAM_NAME "getlimits"
|
||||
|
||||
#define AUTHORS proper_name ("Padraig Brady")
|
||||
#define AUTHORS proper_name_lite ("Padraig Brady", "P\303\241draig Brady")
|
||||
|
||||
#ifndef TIME_T_MAX
|
||||
# define TIME_T_MAX TYPE_MAXIMUM (time_t)
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include "stat-size.h"
|
||||
|
||||
|
||||
/* As of May 2014, 128KiB is determined to be the minimium
|
||||
/* As of May 2014, 128KiB is determined to be the minimum
|
||||
blksize to best minimize system call overhead.
|
||||
This can be tested with this script:
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
to wait for an event, otherwise return the status immediately.
|
||||
Return 0 if not BLOCKing and there is no event on the requested descriptors.
|
||||
Return 0 if FDIN can be read() without blocking, or IOPOLL_BROKEN_OUTPUT if
|
||||
FDOUT becomes a broken pipe. If !BROKEN_OUTPUT return 0 if FDOUT writeable.
|
||||
FDOUT becomes a broken pipe. If !BROKEN_OUTPUT return 0 if FDOUT writable.
|
||||
Otherwise return IOPOLL_ERROR if there is a poll() or select() error. */
|
||||
|
||||
static int
|
||||
|
||||
2
src/ln.c
2
src/ln.c
@ -315,7 +315,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
||||
to link A to B. But strictly following this has the counterintuitive
|
||||
effect of losing the contents of B if A does not exist. Fortunately,
|
||||
POSIX 2008 clarified that an application is free to fail early if it
|
||||
can prove that continuing onwards cannot succeed, so we can try to
|
||||
can prove that continuing onward cannot succeed, so we can try to
|
||||
link A to B before blindly unlinking B, thus sometimes attempting to
|
||||
link a second time during a successful 'ln -f A B'.
|
||||
|
||||
|
||||
@ -296,10 +296,8 @@ src_ls_LDADD += $(FILE_HAS_ACL_LIB)
|
||||
# for various xattr functions
|
||||
copy_ldadd += $(LIB_XATTR)
|
||||
|
||||
# for print_unicode_char, proper_name_utf8
|
||||
src_factor_LDADD += $(LIBICONV)
|
||||
# for print_unicode_char
|
||||
src_printf_LDADD += $(LIBICONV)
|
||||
src_ptx_LDADD += $(LIBICONV)
|
||||
|
||||
# for libcrypto hash routines
|
||||
src_md5sum_LDADD += $(LIB_CRYPTO)
|
||||
|
||||
4
src/ls.c
4
src/ls.c
@ -958,7 +958,7 @@ struct column_info
|
||||
size_t *col_arr;
|
||||
};
|
||||
|
||||
/* Array with information about column filledness. */
|
||||
/* Array with information about column fullness. */
|
||||
static struct column_info *column_info;
|
||||
|
||||
/* Maximum number of columns ever possible for this display. */
|
||||
@ -4644,7 +4644,7 @@ quote_name_buf (char **inbuf, size_t bufsize, char *name,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* An unprintable multibyte character.
|
||||
/* An nonprintable multibyte character.
|
||||
Replace it entirely with a question
|
||||
mark. */
|
||||
p += bytes;
|
||||
|
||||
2
src/mv.c
2
src/mv.c
@ -180,7 +180,7 @@ do_move (char const *source, char const *dest,
|
||||
/* In general, when copy returns with copy_into_self set, SOURCE is
|
||||
the same as, or a parent of DEST. In this case we know it's a
|
||||
parent. It doesn't make sense to move a directory into itself, and
|
||||
besides in some situations doing so would give highly nonintuitive
|
||||
besides in some situations doing so would give highly unintuitive
|
||||
results. Run this 'mkdir b; touch a c; mv * b' in an empty
|
||||
directory. Here's the result of running echo $(find b -print):
|
||||
b b/a b/b b/b/a b/c. Notice that only file 'a' was copied
|
||||
|
||||
@ -605,7 +605,7 @@ simple_strtod_float (char const *input_str,
|
||||
|
||||
TODO:
|
||||
support locale'd grouping
|
||||
accept scentific and hex floats (probably use strtold directly)
|
||||
accept scientific and hex floats (probably use strtold directly)
|
||||
|
||||
Returns:
|
||||
SSE_OK - valid number.
|
||||
|
||||
4
src/od.c
4
src/od.c
@ -268,7 +268,7 @@ static enum size_spec fp_type_size[MAX_FP_TYPE_SIZE + 1];
|
||||
# define WORDS_BIGENDIAN 0
|
||||
#endif
|
||||
|
||||
/* Use native endianess by default. */
|
||||
/* Use native endianness by default. */
|
||||
static bool input_swap;
|
||||
|
||||
static char const short_options[] = "A:aBbcDdeFfHhIij:LlN:OoS:st:vw::Xx";
|
||||
@ -1746,7 +1746,7 @@ main (int argc, char **argv)
|
||||
CASE_OLD_ARG ('i', "dI");
|
||||
case 'I': case 'L': /* obsolescent and undocumented aliases */
|
||||
CASE_OLD_ARG ('l', "dL");
|
||||
CASE_OLD_ARG ('O', "o4"); /* obsolesent and undocumented */
|
||||
CASE_OLD_ARG ('O', "o4"); /* obsolescent and undocumented */
|
||||
case 'B': /* obsolescent and undocumented alias */
|
||||
CASE_OLD_ARG ('o', "o2");
|
||||
CASE_OLD_ARG ('s', "d2");
|
||||
|
||||
@ -86,7 +86,7 @@ usage (int status)
|
||||
{
|
||||
printf (_("Usage: %s [OPTION]... NAME...\n"), program_name);
|
||||
fputs (_("\
|
||||
Diagnose invalid or unportable file names.\n\
|
||||
Diagnose invalid or non-portable file names.\n\
|
||||
\n\
|
||||
-p check for most POSIX systems\n\
|
||||
-P check for empty names and leading \"-\"\n\
|
||||
@ -191,7 +191,7 @@ portable_chars_only (char const *file, size_t filelen)
|
||||
mbstate_t mbstate = { 0, };
|
||||
size_t charlen = mbrlen (invalid, filelen - validlen, &mbstate);
|
||||
error (0, 0,
|
||||
_("nonportable character %s in file name %s"),
|
||||
_("non-portable character %s in file name %s"),
|
||||
quotearg_n_style_mem (1, locale_quoting_style, invalid,
|
||||
(charlen <= MB_LEN_MAX ? charlen : 1)),
|
||||
quoteaf_n (0, file));
|
||||
|
||||
10
src/pr.c
10
src/pr.c
@ -97,7 +97,7 @@
|
||||
adapted to other UNIXes. A violation of downward compatibility has to
|
||||
be accepted.
|
||||
Some NEW CAPITAL LETTER options ( -J, -S, -W) has been introduced to
|
||||
turn off unexpected interferences of small letter options (-s and -w
|
||||
turn off unexpected interference of small letter options (-s and -w
|
||||
together with the three column options).
|
||||
-N option and the second argument LAST_PAGE of +FIRST_PAGE offer more
|
||||
flexibility; The detailed handling of form feeds set in the input
|
||||
@ -143,7 +143,7 @@
|
||||
(a most frequently used form) still work as usual.
|
||||
|
||||
-c, --show-control-chars
|
||||
Print unprintable characters as control prefixes.
|
||||
Print nonprintable characters as control prefixes.
|
||||
Control-g is printed as ^G (use hat notation) and
|
||||
octal backslash notation.
|
||||
|
||||
@ -272,7 +272,7 @@
|
||||
by form feeds set in the input files.
|
||||
|
||||
-v, --show-nonprinting
|
||||
Print unprintable characters as escape sequences. Use
|
||||
Print nonprintable characters as escape sequences. Use
|
||||
octal backslash notation. Control-G becomes \007.
|
||||
|
||||
-w PAGE_WIDTH, --width=PAGE_WIDTH
|
||||
@ -663,11 +663,11 @@ static int number_width;
|
||||
/* Buffer sprintf uses to format a line number. */
|
||||
static char *number_buff;
|
||||
|
||||
/* (-v) True means unprintable characters are printed as escape sequences.
|
||||
/* (-v) True means nonprintable characters are printed as escape sequences.
|
||||
control-g becomes \007. */
|
||||
static bool use_esc_sequence = false;
|
||||
|
||||
/* (-c) True means unprintable characters are printed as control prefixes.
|
||||
/* (-c) True means nonprintable characters are printed as control prefixes.
|
||||
control-g becomes ^G. */
|
||||
static bool use_cntrl_prefix = false;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* prog-fprintf.c - common formating output functions and definitions
|
||||
/* prog-fprintf.c - common formatting output functions and definitions
|
||||
Copyright (C) 2008-2023 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* prog-fprintf.h - common formating output functions and definitions
|
||||
/* prog-fprintf.h - common formatting output functions and definitions
|
||||
Copyright (C) 2008-2023 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
/* TRANSLATORS: Please translate "F. Pinard" to "François Pinard"
|
||||
if "ç" (c-with-cedilla) is available in the translation's character
|
||||
set and encoding. */
|
||||
#define AUTHORS proper_name_utf8 ("F. Pinard", "Fran\xc3\xa7ois Pinard")
|
||||
#define AUTHORS proper_name_lite ("F. Pinard", "Fran\xc3\xa7ois Pinard")
|
||||
|
||||
/* Number of possible characters in a byte. */
|
||||
#define CHAR_SET_SIZE 256
|
||||
@ -462,7 +462,7 @@ initialize_regex (void)
|
||||
a user provided Break character file, construct a fastmap of
|
||||
characters that may appear in a word. If GNU extensions enabled,
|
||||
include only letters of the underlying character set. If disabled,
|
||||
include almost everything, even punctuations; stop only on white
|
||||
include almost everything, even punctuation; stop only on white
|
||||
space. */
|
||||
|
||||
if (word_regex.string)
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "realpath"
|
||||
|
||||
#define AUTHORS proper_name ("Padraig Brady")
|
||||
#define AUTHORS proper_name_lite ("Padraig Brady", "P\303\241draig Brady")
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@ -2115,7 +2115,7 @@ xstrxfrm (char *restrict dest, char const *restrict src, size_t destsize)
|
||||
error (0, errno, _("string transformation failed"));
|
||||
error (0, 0, _("set LC_ALL='C' to work around the problem"));
|
||||
error (SORT_FAILURE, 0,
|
||||
_("the untransformed string was %s"),
|
||||
_("the original string was %s"),
|
||||
quotearg_n_style (0, locale_quoting_style, src));
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
#define PROGRAM_NAME "split"
|
||||
|
||||
#define AUTHORS \
|
||||
proper_name ("Torbjorn Granlund"), \
|
||||
proper_name_lite ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
|
||||
proper_name ("Richard M. Stallman")
|
||||
|
||||
/* Shell command to filter through, instead of creating files. */
|
||||
@ -1096,7 +1096,7 @@ ofile_open (of_t *files, idx_t i_check, idx_t nfiles)
|
||||
where the other end has closed because of our
|
||||
previous close. In that case we'll immediately
|
||||
get an error, rather than waiting indefinitely.
|
||||
In specialised cases the consumer can keep reading
|
||||
In specialized cases the consumer can keep reading
|
||||
from the fifo, terminating on conditions in the data
|
||||
itself, or perhaps never in the case of 'tail -f'.
|
||||
I.e., for fifos it is valid to attempt this reopen.
|
||||
|
||||
@ -175,7 +175,7 @@ statfs (char const *filename, struct fs_info *buf)
|
||||
static char const digits[] = "0123456789";
|
||||
|
||||
/* Flags that are portable for use in printf, for at least one
|
||||
conversion specifier; make_format removes unportable flags as
|
||||
conversion specifier; make_format removes non-portable flags as
|
||||
needed for particular specifiers. The glibc 2.2 extension "I" is
|
||||
listed here; it is removed by make_format because it has undefined
|
||||
behavior elsewhere and because it is incompatible with
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#define PROGRAM_NAME "stdbuf"
|
||||
#define LIB_NAME "libstdbuf.so" /* FIXME: don't hardcode */
|
||||
|
||||
#define AUTHORS proper_name ("Padraig Brady")
|
||||
#define AUTHORS proper_name_lite ("Padraig Brady", "P\303\241draig Brady")
|
||||
|
||||
static char *program_path;
|
||||
|
||||
|
||||
@ -2305,7 +2305,7 @@ sane_mode (struct termios *mode)
|
||||
}
|
||||
|
||||
/* Return a string that is the printable representation of character CH. */
|
||||
/* Adapted from 'cat' by Torbjorn Granlund. */
|
||||
/* Adapted from 'cat' by Torbjörn Granlund. */
|
||||
|
||||
static char const *
|
||||
visible (cc_t ch)
|
||||
|
||||
@ -370,12 +370,11 @@ enum
|
||||
#undef emit_bug_reporting_address
|
||||
|
||||
#include "propername.h"
|
||||
/* Define away proper_name (leaving proper_name_utf8, which affects far
|
||||
fewer programs), since it's not worth the cost of adding ~17KB to
|
||||
/* Define away proper_name, since it's not worth the cost of adding ~17KB to
|
||||
the x86_64 text size of every single program. This avoids a 40%
|
||||
(almost ~2MB) increase in the file system space utilization for the set
|
||||
of the 100 binaries. */
|
||||
#define proper_name(x) (x)
|
||||
#define proper_name(x) proper_name_lite (x, x)
|
||||
|
||||
#include "progname.h"
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
|
||||
#define PROGRAM_NAME "timeout"
|
||||
|
||||
#define AUTHORS proper_name ("Padraig Brady")
|
||||
#define AUTHORS proper_name_lite ("Padraig Brady", "P\303\241draig Brady")
|
||||
|
||||
static int timed_out;
|
||||
static int term_signal = SIGTERM; /* same default as kill command. */
|
||||
@ -592,7 +592,7 @@ main (int argc, char **argv)
|
||||
unblock_signal (sig);
|
||||
raise (sig);
|
||||
}
|
||||
/* Allow users to distinguish if command was forcably killed.
|
||||
/* Allow users to distinguish if command was forcibly killed.
|
||||
Needed with --foreground where we don't send SIGKILL to
|
||||
the timeout process itself. */
|
||||
if (timed_out && sig == SIGKILL)
|
||||
|
||||
2
src/tr.c
2
src/tr.c
@ -206,7 +206,7 @@ static bool delete = false;
|
||||
static bool complement = false;
|
||||
|
||||
/* When tr is performing translation and string1 is longer than string2,
|
||||
POSIX says that the result is unspecified. That gives the implementor
|
||||
POSIX says that the result is unspecified. That gives the implementer
|
||||
of a POSIX conforming version of tr two reasonable choices for the
|
||||
semantics of this case.
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "truncate"
|
||||
|
||||
#define AUTHORS proper_name ("Padraig Brady")
|
||||
#define AUTHORS proper_name_lite ("Padraig Brady", "P\303\241draig Brady")
|
||||
|
||||
/* (-c) If true, don't create if not already there */
|
||||
static bool no_create;
|
||||
|
||||
@ -303,7 +303,7 @@ scan_zeros (struct item *k)
|
||||
loop, print the loop on standard error, remove a relation to break
|
||||
the loop, and return true.
|
||||
|
||||
The loop detection strategy is as follows: Realise that what we're
|
||||
The loop detection strategy is as follows: Realize that what we're
|
||||
dealing with is essentially a directed graph. If we find an item
|
||||
that is part of a graph that contains a cycle we traverse the graph
|
||||
in backwards direction. In general there is no unique way to do
|
||||
@ -429,14 +429,13 @@ static _Noreturn void
|
||||
tsort (char const *file)
|
||||
{
|
||||
bool ok = true;
|
||||
struct item *root;
|
||||
struct item *j = nullptr;
|
||||
struct item *k = nullptr;
|
||||
token_buffer tokenbuffer;
|
||||
bool is_stdin = STREQ (file, "-");
|
||||
|
||||
/* Intialize the head of the tree will hold the strings we're sorting. */
|
||||
root = new_item (nullptr);
|
||||
/* Initialize the head of the tree holding the strings we're sorting. */
|
||||
struct item *root = new_item (nullptr);
|
||||
|
||||
if (!is_stdin && ! freopen (file, "r", stdin))
|
||||
error (EXIT_FAILURE, errno, "%s", quotef (file));
|
||||
|
||||
@ -68,7 +68,7 @@ enum countmode
|
||||
static enum countmode countmode;
|
||||
|
||||
/* Which lines to output: unique lines, the first of a group of
|
||||
repeated lines, and the second and subsequented of a group of
|
||||
repeated lines, and the second and subsequent of a group of
|
||||
repeated lines. */
|
||||
static bool output_unique;
|
||||
static bool output_first_repeated;
|
||||
|
||||
6
src/wc.c
6
src/wc.c
@ -459,8 +459,8 @@ wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos)
|
||||
move the last incomplete character of the buffer to the front
|
||||
of the buffer. This is needed because we don't know whether
|
||||
the 'mbrtowc' function updates the state when it returns -2, --
|
||||
this is the ISO C 99 and glibc-2.2 behaviour - or not - amended
|
||||
ANSI C, glibc-2.1 and Solaris 5.7 behaviour. We don't have an
|
||||
this is the ISO C 99 and glibc-2.2 behavior - or not - amended
|
||||
ANSI C, glibc-2.1 and Solaris 5.7 behavior. We don't have an
|
||||
autoconf test for this, yet. */
|
||||
size_t prev = 0; /* number of bytes carried over from previous round */
|
||||
# else
|
||||
@ -556,7 +556,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos)
|
||||
if (wide && iswprint (wide_char))
|
||||
{
|
||||
/* wcwidth can be expensive on OSX for example,
|
||||
so avoid if uneeded. */
|
||||
so avoid if not needed. */
|
||||
if (print_linelength)
|
||||
{
|
||||
int width = wcwidth (wide_char);
|
||||
|
||||
@ -34,7 +34,7 @@ test -n "$id_gn" || framework_failure_
|
||||
# Systems with both local and external groups with conflicting IDs,
|
||||
# were seen to fail this test erroneously with EPERM errors.
|
||||
test $(getent group | grep "^$id_gn:" | wc -l) = 1 ||
|
||||
skip_ "group '$id_gn' not biunique: " \
|
||||
skip_ "group '$id_gn' not unique: " \
|
||||
"$(getent group | grep "^$id_gn:" | tr '\n' ',')"
|
||||
|
||||
# FreeBSD 6.x's getgrnam fails to look up a group name containing
|
||||
|
||||
@ -72,7 +72,7 @@ create_target_tree()
|
||||
# The path taken by cp is dependent on which cp encounters
|
||||
# first in the source, which is non deterministic currently
|
||||
# (I'm guessing that results are sorted by inode and
|
||||
# beauses they're the same here, and due to the sort
|
||||
# because they're the same here, and due to the sort
|
||||
# being unstable, either can be processed first).
|
||||
create_source_tree
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ my @csplit_tests =
|
||||
|
||||
|
||||
=pod
|
||||
The following loop translate the above @Tests to a Cureutils::run_tests()
|
||||
The following loop translate the above @Tests to a Coreutils::run_tests()
|
||||
compatible structure. It converts "OUTPUTS" key into "CMP" + "POST" keys:
|
||||
1. Each element in the OUTPUTS key is expected to be an output file
|
||||
from csplit (named xx00, xx01, xx02...)
|
||||
|
||||
@ -59,7 +59,7 @@ EOF
|
||||
df --output=target,source,target '.' 2>out && fail=1
|
||||
compare exp out || fail=1
|
||||
|
||||
# Ensure that this limitation also works for splitted --output options.
|
||||
# Ensure that this limitation also works for split --output options.
|
||||
df --out=target,source --out=target '.' 2>out && fail=1
|
||||
compare exp out || fail=1
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Test df's behaviour when the mount list cannot be read.
|
||||
# Test df's behavior when the mount list cannot be read.
|
||||
# This test is skipped on systems that lack LD_PRELOAD support; that's fine.
|
||||
|
||||
# Copyright (C) 2012-2023 Free Software Foundation, Inc.
|
||||
|
||||
4
tests/env/env-S.pl
vendored
4
tests/env/env-S.pl
vendored
@ -105,7 +105,7 @@ my @Tests =
|
||||
['e14',q[-i -S"A='B\\\\\\"C' ]."$env\"", {OUT=>'A=B\"C'}],
|
||||
|
||||
# Special escape sequences:
|
||||
# \_ in duoble-quotes is a space - result is just one envvar 'A'
|
||||
# \_ in double-quotes is a space - result is just one envvar 'A'
|
||||
['e20', q[-i -S'A="B\_C=D" ]."$env'", {OUT=>'A=B C=D'}],
|
||||
# \_ outside double-quotes is arg separator, the command to
|
||||
# execute should be 'env env'
|
||||
@ -123,7 +123,7 @@ my @Tests =
|
||||
# u3,u4: ${FOO} expanded by env itself before executing sh.
|
||||
# \\$FOO expanded by sh.
|
||||
# ${FOO} should have value of the original environment
|
||||
# and \\$FOO should be unset, regardlss where -uFOO is used.
|
||||
# and \\$FOO should be unset, regardless where -uFOO is used.
|
||||
# 'u3' behavior differs from FreeBSD's but deemed preferable, in
|
||||
# https://lists.gnu.org/r/coreutils/2018-04/msg00014.html
|
||||
['u3', q[-uFOO -S'sh -c "echo x${FOO}x =\\$FOO="'],
|
||||
|
||||
@ -171,7 +171,7 @@ my @Tests =
|
||||
|
||||
|
||||
# Character classes: in the multibyte case, the regex engine understands
|
||||
# there is a single multibyte characeter in the brackets.
|
||||
# there is a single multibyte character in the brackets.
|
||||
# In the single byte case, the regex engine sees two octets in the character
|
||||
# class ('\xCE' and '\xB1') - and it matches the first one.
|
||||
['mb-m7', "match \xCE\xB1bc\xCE\xB4e '\\([\xCE\xB1]\\)'", {OUT=>"\xCE\xB1"}],
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Indirections required so that we'll still be able to know the
|
||||
# Indirection required so that we'll still be able to know the
|
||||
# complete list of our tests even if the user overrides TESTS
|
||||
# from the command line (as permitted by the test harness API).
|
||||
TESTS = $(all_tests) $(factor_tests)
|
||||
|
||||
@ -29,7 +29,7 @@ c_jpg=$(printf '\033[%sm' $code_jpg)
|
||||
c_JPG=$(printf '\033[%sm' $code_JPG)
|
||||
c_z=$(printf '\033[%sm' $code_z)
|
||||
|
||||
# Case insenitive extensions
|
||||
# Case insensitive extensions
|
||||
LS_COLORS="*.jpg=$code_jpg:*.Z=$code_z" ls -U1 --color=always \
|
||||
img1.jpg IMG2.JPG file1.z file2.Z > out || fail=1
|
||||
printf "$c0\
|
||||
|
||||
@ -240,7 +240,7 @@ my @Tests =
|
||||
],
|
||||
|
||||
# Test for a bug fixed after coreutils-8.13
|
||||
# where 'argetm' was errenously printed for dangling links
|
||||
# where 'argetm' was erroneously printed for dangling links
|
||||
# when ln=target was used in LS_COLORS
|
||||
['sl-dangle6', '-L --color=always d',
|
||||
{OUT => "s\n"},
|
||||
|
||||
@ -21,7 +21,7 @@ print_ver_ ls
|
||||
|
||||
mkdir dir && touch dir/a dir/b dir/cc || framework_failure_
|
||||
|
||||
allowed_options='-l' # explict -l with --zero is allowed
|
||||
allowed_options='-l' # explicit -l with --zero is allowed
|
||||
LC_ALL=C ls $allowed_options --zero dir >out || fail=1
|
||||
grep '^total' out || fail=1 # Ensure -l honored
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ test $(wc -l < err) = 0 || { cat err; fail=1; }
|
||||
test -f tee.exited || fail=1 ;;
|
||||
esac
|
||||
|
||||
# Test with unwriteable files
|
||||
# Test with unwritable files
|
||||
if ! uid_is_privileged_; then # root does not get EPERM.
|
||||
touch file.ro || framework_failure_
|
||||
chmod a-w file.ro || framework_failure_
|
||||
|
||||
@ -34,7 +34,7 @@ compare out empty || fail=1
|
||||
|
||||
# Trigger an invalid heap reference noticed by gcc -fsanitize=address
|
||||
# from coreutils-8.22 and earlier. As well as an invalid memory reference,
|
||||
# the issue can be seen in the output, with non deterministice whitespace
|
||||
# the issue can be seen in the output, with nondeterministic whitespace
|
||||
# trimming when multiple files are specified.
|
||||
printf '%s\n' 'This is a ptx whitespace Trimming test' > ws.in
|
||||
ptx ws.in ws.in | sort | uniq -u > out
|
||||
|
||||
@ -25,7 +25,7 @@ print_ver_ rm
|
||||
# enter the unlinkat() system call. Therefore, limit the risk as much
|
||||
# as possible -- if there's a bug this test would wipe the system out!
|
||||
|
||||
# Faint-hearted: skip this test for the 'root' user.
|
||||
# Fainthearted: skip this test for the 'root' user.
|
||||
skip_if_root_
|
||||
|
||||
# Pull the teeth from rm(1) by intercepting the unlinkat() system call via the
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Test rm's behaviour when the directory cannot be read.
|
||||
# Test rm's behavior when the directory cannot be read.
|
||||
# This test is skipped on systems that lack LD_PRELOAD support.
|
||||
|
||||
# Copyright (C) 2016-2023 Free Software Foundation, Inc.
|
||||
|
||||
@ -40,7 +40,7 @@ fi
|
||||
|
||||
test -d x/y || fail=1
|
||||
# Between 6.11 and 8.31, the following rmdir would mistakenly fail,
|
||||
# and also give a non descript error
|
||||
# and also give a nondescript error
|
||||
touch x/y/z || framework_failure_
|
||||
rmdir --ignore-fail-on-non-empty x/y || fail=1
|
||||
test -d x/y || fail=1
|
||||
|
||||
@ -72,7 +72,7 @@ my @Tests =
|
||||
['eq-wid-6', qw(-w +1 2), {OUT => [qw(1 2)]}],
|
||||
['eq-wid-7', qw(-w " .1" " .1"), {OUT => [qw(0.1)]}],
|
||||
['eq-wid-8', qw(-w 9 0.5 10), {OUT => [qw(09.0 09.5 10.0)]}],
|
||||
# Prior to 8.21, these tests involving numbers in scentific notation
|
||||
# Prior to 8.21, these tests involving numbers in scientific notation
|
||||
# would fail with misalignment or wrong widths.
|
||||
['eq-wid-9', qw(-w -1e-3 1), {OUT => [qw(-0.001 00.999)]}],
|
||||
['eq-wid-10',qw(-w -1e-003 1), {OUT => [qw(-0.001 00.999)]}],
|
||||
|
||||
@ -39,7 +39,7 @@ compare in out > /dev/null && { fail=1; echo "not random?" 1>&2; }
|
||||
sort -n out > out1
|
||||
compare in out1 || { fail=1; echo "not a permutation" 1>&2; }
|
||||
|
||||
# Exercize shuf's -r -n 0 options, with no standard input.
|
||||
# Exercise shuf's -r -n 0 options, with no standard input.
|
||||
shuf -r -n 0 in <&- >out || fail=1
|
||||
compare /dev/null out || fail=1
|
||||
|
||||
|
||||
@ -33,8 +33,8 @@ grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
|
||||
seq -f %-98f 10000 | shuf > in ||
|
||||
framework_failure_
|
||||
|
||||
# On Fedora-17-beta (valgrind-3.7.0-2.fc17.x86_64), this evokes two
|
||||
# "Conditional jump or move depends on uninitialised value(s)" errors,
|
||||
# On Fedora-17-beta (valgrind-3.7.0-2.fc17.x86_64), this evokes two complaints
|
||||
# that a conditional jump or move depends on uninitialized values,
|
||||
# each originating from _dl_start.
|
||||
valgrind --quiet --error-exitcode=3 sort --version > /dev/null ||
|
||||
framework_failure_ 'valgrind fails for trivial sort invocation'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user