Age | Commit message (Collapse) | Author |
|
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
|
|
Ensure I/O errors are detected (and terminate seq), preventing seq
from infloop (or running for long time with a large
range) upon write errors or ignored SIGPIPE. Examples:
seq 1 inf > /dev/full (seq_fast)
seq 1.1 0.1 inf >/dev/full (print_numbers)
* src/seq.c (io_error): A new function to diagnose appropriate
stdio errors and exit the program with failure status.
(seq_fast, print_numbers): Explicitly check for write errors
and terminate the program with diagnostic.
* tests/misc/seq-io-errors.sh: Test error detection with /dev/full.
* tests/misc/seq-epipe.sh: Test error detection with broken pipes.
* tests/local.mk: Add new tests.
* NEWS: Mention the fix.
|
|
* src/seq.c (isnan): Define macro.
(scan_arg): Add check if the given argument is NaN, and exit with
a proper error diagnostic in such a case.
(usage): Document it.
* tests/misc/seq.pl: Add tests.
* doc/coreutils.texi (seq invocation): Document the change.
* NEWS (Changes in behavior): Mention the change.
|
|
* src/seq.c (main): Exit with an error diagnostic when the given
step value is Zero.
(usage): Document it.
* doc/coreutils.texi (seq invocation): Likewise.
* tests/misc/seq.pl: Add tests.
* NEWS (Changes in behavior): Mention the change.
Reported by Маренков Евгений in:
http://bugs.gnu.org/23110
|
|
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
|
|
These strings are often file names or other user specified
parameters, which can give confusing errors in
the presence of unexpected characters for example.
* cfg.mk (sc_error_quotes): A new syntax check rule.
* src/*.c: Wrap error() string arguments with quote().
* tests/: Adjust accordingly.
* NEWS: Mention the improvement.
|
|
src/seq.c (scan_arg): Set precision and width _after_ exponentiation.
For example, this will make '1.1e1 12' and '11 1.2e1' equivalent.
One can still set the precision by specifying extra precision on
the start value, or more naturally with a precision on a step value.
* tests/misc/seq-precision.sh: Add new cases.
|
|
* src/seq.c (scan_arg): Set precision to 0 for hex constants
(while avoiding hex floats). This will use then use the
fast path for these arguments. Note we also set the precision
of inf to 0 here, which ensures we use consistent precision
on output where possible.
* tests/misc/seq-precision.sh: Add corresponding test cases.
|
|
* src/seq.c (main): Call seq_fast for infinite last value.
This implicitly avoids format conversion on the
999999 -> 1000000 transition.
* src/seq.c (seq_fast): Generalize the buffer handling,
and adjust to handle the "inf" last value specifics.
* tests/misc/seq-precision.sh: A new test.
* tests/local.mk: Reference the new test.
|
|
Run "make update-copyright" and then...
* tests/sample-test: Adjust to use the single most recent year.
* tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message,
so that year is updated automatically in future.
|
|
* src/system.h (emit_ancillary_info): Take the invariant PROGRAM_NAME
as a parameter, so that consistent references are made to online docs
and texinfo nodes, when a --program-prefix is in place. Note the
man pages don't need this fix as they're generated before the program
prefix is used.
* NEWS: Mention the improvements in references to online documentation.
|
|
* build-aux/gen-single-binary.sh: Don't use ATTRIBUTE_NORETURN
for main functions.
* src/base64.c, src/basename.c, src/cat.c, src/chcon.c, src/chgrp.c:
* src/chmod.c, src/chown.c, src/chroot.c, src/cksum.c, src/comm.c:
* src/cp.c, src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
* src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
* src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
* src/getlimits.c, src/groups.c, src/head.c, src/hostid.c:
* src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c:
* src/link.c, src/ln.c, src/logname.c, src/ls.c, src/make-prime-list.c:
* src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mktemp.c:
* src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/nproc.c:
* src/numfmt.c, src/od.c, src/paste.c, src/pathchk.c, src/pinky.c:
* src/pr.c, src/printenv.c, src/printf.c, src/ptx.c, src/pwd.c:
* src/readlink.c, src/realpath.c, src/rm.c, src/rmdir.c, src/runcon.c:
* src/seq.c, src/shred.c, src/shuf.c, src/sleep.c, src/sort.c:
* src/split.c, src/stat.c, src/stdbuf.c, src/stty.c, src/sum.c:
* src/sync.c, src/tac.c, src/tail.c, src/tee.c, src/timeout.c:
* src/touch.c, src/tr.c, src/true.c, src/truncate.c, src/tsort.c:
* src/tty.c, src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c:
* src/uptime.c, src/users.c, src/wc.c, src/who.c, src/whoami.c:
In 'main' functions, Prefer 'return status;' to 'exit (status);'.
* src/coreutils-arch.c (_single_binary_main_uname)
(_single_binary_main_arch):
* src/coreutils-dir.c, src/coreutils-vdir.c (_single_binary_main_ls)
(_single_binary_main_dir, _single_binary_main_vdir):
Omit ATTRIBUTE_NORETURN. Return a value.
* src/coreutils.c (SINGLE_BINARY_PROGRAM): Omit ATTRIBUTE_NORETURN.
(launch_program): Now static.
* src/dd.c (finish_up): New function.
(quit, main): Use it.
* src/getlimits.c (main): Return a proper exit status.
* src/test.c (test_main_return): New macro.
(main): Use it.
* src/logname.c, src/nohup.c, src/whoami.c:
Use 'error' to simplify exit status in 'main' function.
* src/yes.c (main): Use 'return' rather than 'error' to exit,
so that GCC doesn't suggest ATTRIBUTE_NORETURN.
|
|
* src/seq.c (main): Avoid seq_fast() with a start or end of -0.
* tests/misc/seq.pl: Add test cases.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/17800
|
|
Run "make update-copyright", but then also run this,
perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
|
|
* doc/coreutils.texi (seq invocation): Add a sentence clarifying
that seq terminates when LAST becomes smaller than the current number
plus INCREMENT.
* src/seq.c (usage): Likewise.
Fixes http://bugs.gnu.org/15068
|
|
* src/seq.c (main): With 3 positive integer args we were
checking the end value was == "1", rather than the step value.
* tests/misc/seq.pl: Add tests for this case.
Reported by Marcel Böhme in http://bugs.gnu.org/13525
|
|
* src/seq.c (get_default_format): Also account for the case where '.'
is auto added to the start value, which is significant when the
number sequence narrows.
* tests/misc/seq.pl: Add two new tests for the failing cases.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/13394
|
|
Each program with at least one long option which is marked as
'required_argument' and which has also a short option for that
option, should print a note about mandatory arguments.
Define that well-known note centrally and use it rather than
literal printf/fputs, and add it where it was missing.
* src/system.h (emit_mandatory_arg_note): Add new function.
* src/cp.c (usage): Use it rather than literal printf/fputs.
* src/csplit.c, src/cut.c, src/date.c, src/df.c, src/du.c:
* src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/install.c:
* src/kill.c, src/ln.c, src/ls.c, src/mkdir.c, src/mkfifo.c:
* src/mknod.c, src/mv.c, src/nl.c, src/od.c, src/paste.c:
* src/pr.c, src/ptx.c, src/shred.c, src/shuf.c, src/sort.c:
* src/split.c, src/stdbuf.c, src/tac.c, src/tail.c, src/timeout.c:
* src/touch.c, src/truncate.c, src/unexpand.c, src/uniq.c:
Likewise.
* src/base64.c (usage): Add call of the above new function
because at least one long option has a required argument.
* src/basename.c, src/chcon.c, src/date.c, src/env.c:
* src/nice.c, src/runcon.c, src/seq.c, src/stat.c, src/stty.c:
Likewise.
|
|
Run "make update-copyright", but then also run this,
perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
|
|
This regression was introduced in commit v8.19-132-g3786fb6.
* src/seq.c (seq_fast): Don't use puts() to output the first number,
and instead insert it into the buffer as for other numbers.
Also output the terminator unconditionally.
* tests/misc/seq.pl: Add some basic tests for the -s option.
* NEWS: Mention the fix.
* THANKS.in: Reported by Philipp Gortan.
|
|
* src/seq.c (scan_arg): Calculate the width more accurately
for numbers specified using scientific notation.
* tests/misc/seq.pl: Add tests for cases that were mishandled.
* NEWS: Mention the fix.
* THANKS.in: Reported by Marcel Böhme.
Fixes http://bugs.gnu.org/12959
|
|
* src/seq.c (main): Adjust the initial arbitrary precision
seq_fast enablement checks to be more maintainable, and
a little more general, by allowing single character
separators to use seq_fast.
Also check again after the number arguments are processed,
to see if we can still use seq_fast, which while not
allowing arbitarly large integers, it will handle
integers of the form 10E10 etc.
(seq_fast): Use a specified separator character,
rather than hardcoding '\n'.
|
|
Handle non-negative whole numbers robustly and efficiently when
the increment is 1 and when no format-changing option is specified.
On the correctness front, for very large numbers, seq now works fine:
$ b=1000000000000000000000000000
$ src/seq ${b}09 ${b}11
100000000000000000000000000009
100000000000000000000000000010
100000000000000000000000000011
while the old one would infloop, printing garbage:
$ seq ${b}09 ${b}11 | head -2
99999999999999999997315645440
99999999999999999997315645440
The new code is much more efficient, too:
Old vs new: 55.81s vs 0.82s
$ env time --f=%e seq $((10**8)) > /dev/null
55.81
$ env time --f=%e src/seq $((10**8)) > /dev/null
0.82
* seq.c (incr): New function, inspired by the one in cat.c.
(cmp, seq_fast): New functions, inspired by code in nt-factor
by Torbjörn Granlund and Niels Möller.
(trim_leading_zeros): New function, without which cmp would malfunction.
(all_digits_p): New function.
(main): Hoist the format_str-vs-equal_width check to precede first
treatment of operands, and insert code to call seq_fast when possible.
* NEWS (Bug fixes): Mention the correctness fix.
(Improvements): Mention the speed-up.
* tests/misc/seq.pl: Exercise the new code.
Improved by: Bernhard Voelker.
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/3340
|
|
Add a rule to ding any source file that has a continued string
with a word in the first column of the following line.
Those tend to trigger malfunction in tools that try to map an
arbitrary line number to an enclosing function name. Of course,
very many strings do precisely this, *when they are part of the
usage function*. So we exempt the body of each usage function.
* src/dircolors.c (main): Separate a long, continued string
into two separately-quoted parts.
* src/od.c (decode_one_format): Likewise.
(decode_one_format, main): Move a space from end of
preceding line to the beginning of the continued line.
* src/tr.c (unquote, string2_extend, validate): Likewise.
* src/seq.c (main): Split in two and use string concatenation.
* src/stat.c (default_format): Use a mix of techniques.
* cfg.mk (sc_prohibit_continued_string_alpha_in_column_1): New rule.
Exempt three files in src: system.h, od.c, printf.c.
|
|
Run this (twice):
git grep -E -l '`[^ ]+'\' src/*.c \
|xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
|
|
All affected lines end with \ or \n\, so run this command
until it produces no new changes (4 times):
git grep -E -l '`[^ ]+'\''.*\\' src \
|xargs perl -pi -e 's/`([^ ]+'\''.*\\)/'\''$1/'
|
|
Run this command:
perl -0777 -pi -e \
's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\
src/*.c
|
|
Run "make update-copyright".
|
|
Run "make update-copyright".
|
|
* src/seq.c (terminator): This does not need to be specifiable
via an option. Remove the FIXME comment.
|
|
Use this command:
git ls-files | grep -v COPYING \
| xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
build-aux/update-copyright
|
|
* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
|
|
Transformed via this shell code:
t=$'\t'
git ls-files \
| grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
| grep -vE 'tests/pr/|help2man' \
| xargs grep -lE "^ *$t" \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
|
|
* NEWS: Add 2009 to copyright.
* README: Likewise.
* README-hacking: Likewise.
* TODO: Likewise.
* doc/Makefile.am: Likewise.
* m4/prereq.m4: Likewise.
* src/nl.c: Likewise.
* src/seq.c: Likewise.
* tests/cp/cp-i: Likewise.
* tests/install/install-C: Likewise.
* tests/install/install-C-root: Likewise.
* tests/install/install-C-selinux: Likewise.
* tests/misc/seq: Likewise.
* tests/mv/mv-n: Likewise.
|
|
Issue reported by Samuel Hapák.
<http://lists.gnu.org/archive/html/bug-coreutils/2009-02/msg00139.html>
* src/seq.c: Account for '.' added to "last" number.
* tests/misc/seq: Add corresponding test.
* NEWS: Mention the fix.
|
|
* src/seq.c (validate_format): Remove. Migrate its checks into...
(long_double_format): Report an error and exit if an error is found,
instead of returning NULL. All callers changed.
Use a more-consistent format for diagnostics.
* tests/misc/seq: Adjust to the more-consistent format for diagnostics.
|
|
* src/seq.c: Don't include <math.h>, <float.h>.
(abs_rel_diff): Remove.
(print_numbers): Test for equality, not for an epsilonish value.
This reverts 4827dd27b0c655a685947aaa01426a5ecba179f3, aka
v6.10-185-g4827dd2, which broke 'seq' on the x86; for example, it
causes "seq 9223372036854775807 9223372036854775808" to incorrectly
output 3 numbers instead of 2. It's better to punish obsolescent
hosts that have incorrectly-working floating-point than to punish
correctly-working hosts.
* tests/misc/seq: Use 0.9000000000000, rather than
0.90000000000000000000, to avoid tickling a bug in Solaris 8 strtold,
which converts "0.9" and "0.9000000000000" correctly, but incorrectly
converts "0.90000000000000000000" to a smaller value.
|
|
* src/seq.c (print_numbers): Don't switch c_strtold -> strtold
in order to accommodate the locale-dependent behavior of our internal
asprintf use. Instead, simply set the locale to C before calling
asprintf, and then set it back afterwards.
|
|
* src/seq.c (print_numbers): Use strtold, not c_strtold to convert
from just-formatted-using-asprintf string back to double, since
asprintf may have used something other than "." as the decimal point.
Reported by lsof@nodata.co.uk as <http://bugzilla.redhat.com/463556>.
Thanks to Ondřej Vašík for discovering that the bug was locale-related.
$ LC_ALL=cs_CZ.UTF-8 seq -0.1 0.1 2|grep 2.0
[Exit 1]
$ seq -0.1 0.1 2|grep 2.0
2.0
* tests/check.mk (TESTS_ENVIRONMENT): Add LOCALE_FR_UTF8, for...
* tests/misc/seq [locale-dec-pt]: New test for the above.
* NEWS (bug fix): Mention it.
|
|
In 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c, I added some
missing "const" directives, as well as some new, redundant ones.
This removes the redundant ones. Pointed out by Eric Blake.
* base64.c, cat.c, chcon.c, chgrp.c, chmod.c, chown.c, comm.c:
* cp.c, csplit.c, cut.c, date.c, dd.c, df.c, dircolors.c, du.c:
* env.c, expand.c, fmt.c, fold.c, groups.c, head.c, id.c:
* install.c, join.c, kill.c, ln.c, ls.c, md5sum.c, mkdir.c:
* mkfifo.c, mknod.c, mktemp.c, mv.c, nice.c, nl.c, od.c:
* paste.c, pathchk.c, pinky.c, pr.c, ptx.c, readlink.c, rm.c:
* rmdir.c, runcon.c, seq.c, shred.c, shuf.c, sort.c, split.c:
* stat.c, stty.c, su.c, sum.c, tac.c, tail.c, tee.c, timeout.c:
* touch.c, tr.c, truncate.c, tty.c, uname.c, unexpand.c, uniq.c:
* wc.c, who.c: Remove redundant const directives.
* maint.mk (sc_const_long_option): Don't require redundant "const".
|
|
* maint.mk (sc_const_long_option): New rule. Enforce global change.
* src/base64.c (long_options): Use "const" where possible.
* src/cat.c (main): Likewise.
* src/chcon.c (long_options): Likewise.
* src/chgrp.c (long_options): Likewise.
* src/chmod.c (long_options): Likewise.
* src/chown.c (long_options): Likewise.
* src/comm.c (long_options, OUTPUT_DELIMITER_OPTION): Likewise.
* src/cp.c (long_opts): Likewise.
* src/csplit.c (longopts): Likewise.
* src/cut.c (longopts): Likewise.
* src/date.c (long_options): Likewise.
* src/dd.c (conversions, flags, statuses): Likewise.
* src/df.c (long_options): Likewise.
* src/dircolors.c (long_options): Likewise.
* src/du.c (long_options): Likewise.
* src/env.c (longopts): Likewise.
* src/expand.c (longopts): Likewise.
* src/fmt.c (long_options): Likewise.
* src/fold.c (longopts): Likewise.
* src/groups.c (longopts): Likewise.
* src/head.c (long_options): Likewise.
* src/id.c (longopts): Likewise.
* src/install.c (long_options): Likewise.
* src/join.c (longopts): Likewise.
* src/kill.c (long_options): Likewise.
* src/ln.c (long_options): Likewise.
* src/ls.c (long_time_format, long_options, sort_functions): Likewise.
* src/md5sum.c (long_options): Likewise.
* src/mkdir.c (longopts): Likewise.
* src/mkfifo.c (longopts): Likewise.
* src/mknod.c (longopts): Likewise.
* src/mktemp.c (longopts): Likewise.
* src/mv.c (long_options): Likewise.
* src/nice.c (longopts): Likewise.
* src/nl.c (longopts): Likewise.
* src/od.c (charname, long_options): Likewise.
* src/paste.c (longopts): Likewise.
* src/pathchk.c (longopts): Likewise.
* src/pinky.c (longopts): Likewise.
* src/pr.c (long_options): Likewise.
* src/ptx.c (long_options): Likewise.
* src/readlink.c (longopts): Likewise.
* src/rm.c (long_opts): Likewise.
* src/rmdir.c (longopts): Likewise.
* src/runcon.c (long_options): Likewise.
* src/seq.c (long_options): Likewise.
* src/shred.c (long_opts): Likewise.
* src/shuf.c (long_opts): Likewise.
* src/sort.c (monthtab, long_options): Likewise.
* src/split.c (longopts): Likewise.
* src/stat.c (long_options): Likewise.
* src/stty.c (mode_info, control_info, longopts, set_mode) Likewise.
(set_control_char, speeds): Likewise.
* src/su.c (longopts): Likewise.
* src/sum.c (longopts): Likewise.
* src/tac.c (longopts): Likewise.
* src/tail.c (long_options): Likewise.
* src/tee.c (long_options): Likewise.
* src/timeout.c (long_options): Likewise.
* src/touch.c (longopts): Likewise.
* src/tr.c (long_options): Likewise.
* src/truncate.c (longopts): Likewise.
* src/tty.c (longopts): Likewise.
* src/uname.c (uname_long_options, arch_long_options): Likewise.
* src/unexpand.c (longopts): Likewise.
* src/uniq.c (longopts): Likewise.
* src/wc.c (longopts): Likewise.
* src/who.c (longopts): Likewise.
|
|
* bootstrap.conf (gnulib_modules): Add progname.
* src/*.c (program_name): Remove declaration.
* (main): Call set_program_name rather than setting program_name.
* src/nice.c (main): Cast program_name to "(char *)".
* src/prog-fprintf.c: Include "system.h"
* src/system.h: Include "progname.h".
* maint.mk (sc_program_name): Adjust rule.
Suggestion from Eric Blake.
|
|
* src/base64.c: Likewise.
* src/basename.c: Likewise.
* src/cat.c: Likewise.
* src/chcon.c: Likewise.
* src/chgrp.c: Likewise.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/chroot.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cp.c: Likewise.
* src/csplit.c: Likewise.
* src/cut.c: Likewise.
* src/date.c: Likewise.
* src/dd.c: Likewise.
* src/df.c: Likewise.
* src/dircolors.c: Likewise.
* src/dirname.c: Likewise.
* src/du.c: Likewise.
* src/echo.c: Likewise.
* src/env.c: Likewise.
* src/expand.c: Likewise.
* src/expr.c: Likewise.
* src/factor.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/groups.c: Likewise.
* src/head.c: Likewise.
* src/hostid.c: Likewise.
* src/hostname.c: Likewise.
* src/id.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/kill.c: Likewise.
* src/link.c: Likewise.
* src/ln.c: Likewise.
* src/logname.c: Likewise.
* src/ls.c: Likewise.
* src/md5sum.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
* src/mktemp.c: Likewise.
* src/mv.c: Likewise.
* src/nice.c: Likewise.
* src/nl.c: Likewise.
* src/nohup.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/pathchk.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/printenv.c: Likewise.
* src/printf.c: Likewise.
* src/ptx.c: Likewise.
* src/pwd.c: Likewise.
* src/readlink.c: Likewise.
* src/rm.c: Likewise.
* src/rmdir.c: Likewise.
* src/runcon.c: Likewise.
* src/seq.c: Likewise.
* src/setuidgid.c: Likewise.
* src/shuf.c: Likewise.
* src/sleep.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/su.c: Likewise.
* src/sum.c: Likewise.
* src/sync.c: Likewise.
* src/tac.c: Likewise.
* src/tail.c: Likewise.
* src/tee.c: Likewise.
* src/test.c: Likewise.
* src/timeout.c: Likewise.
* src/touch.c: Likewise.
* src/tr.c: Likewise.
* src/true.c: Likewise.
* src/tsort.c: Likewise.
* src/tty.c: Likewise.
* src/uname.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/unlink.c: Likewise.
* src/uptime.c: Likewise.
* src/users.c: Likewise.
* src/wc.c: Likewise.
* src/who.c: Likewise.
* src/whoami.c: Likewise.
* src/yes.c: Likewise.
|
|
g grep -E -l 'define AUTHORS "[^,]+"$'|xargs perl -pi -e \
's/(define AUTHORS) ("[^,]+")$/$1 proper_name ($2)/'
|
|
* src/cut.c (set_fields): Apply to_uchar to isblank operands.
* src/uniq.c (find_field): Likewise.
* src/seq.c (scan_arg): Likewise, for isspace.
* tests/misc/uniq: New file. Test for the above, but only
when isspace(0240).
* tests/Makefile.am (TESTS): Add misc/uniq.
* configure.ac: Use gt_LOCALE_FR.
* tests/check.mk (TESTS_ENVIRONMENT): Propagate LOCALE_FR to scripts.
* NEWS: Mention the bug fixes.
Before this patch, on FreeBSD 6:
$ printf 'x y z\nx \xa0 y z\n' > in
$ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
x.y.z
x. .y.z
With the patch:
$ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
x.y.z
This also affected many other locales:
for i in $(locale -a); do test $(LC_ALL=$i ./uniq -f1 in|wc -l)
= $(LC_ALL=$i uniq -f1 in|wc -l) || echo $i ; done
...
en_GB.ISO8859-1
en_GB.ISO8859-15
en_GB.UTF-8
en_IE.UTF-8
en_NZ.ISO8859-1
en_NZ.ISO8859-15
en_NZ.UTF-8
en_US.ISO8859-1
en_US.ISO8859-15
en_US.UTF-8
...
|
|
* src/seq.c: Include <math.h> for fabs.
Include <float.h> for DBL_EPSILON.
(abs_rel_diff): New function.
(print_numbers): Use abs_rel_diff rather than a strict equality test.
Without this change, Solaris 8 and Irix 6.2 would fail the float-6
test. Reported by Peter Fales in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13183
* src/c99-to-c89.diff: Adjust seq.c offsets.
|
|
|
|
* src/seq.c: (validate_format): New function.
(main): Use it.
* tests/misc/seq (fmt-d, fmt-e): Test for expected diagnostics with
invalid formats.
* NEWS: Mention this change.
* TODO: Remove this item.
[jm: src/seq.c: make diagnostics more consistent
tests/misc/seq (fmt-eos1): adjust the expected diagnostic ]
|
|
* src/seq.c (long_double_format): Handle '%' at end of string.
* tests/misc/seq [fmt-eos1, fmt-eos2]: New tests for the bug.
* NEWS: Mention this.
Reported by Pádraig Brady.
|
|
more-general rounding issues exposed by the previous patch.
|