Age | Commit message (Collapse) | Author |
|
* src/fmt.c (usage): Add a comment to tell
xgettext that the "% o" in fputs argument string of "...93% of..."
is not a C format string. Reported by Toomas Soome, Göran Uddeborg,
Petr Pisar, Primoz PETERLIN and Chusslove Illich via
http://bugs.gnu.org/11470
|
|
A static analysis tool (http://labs.oracle.com/projects/parfait/)
produced some false positive diagnostics. Add assertions to help
it understand that the code is correct.
* src/stty.c: Include <assert.h>.
(display_changed): Add an assertion to placate parfait.
(display_all): Likewise.
* src/sort.c: Include <assert.h>.
(main): Add an assertion to placate parfait.
* src/fmt.c: Include <assert.h>.
(get_paragraph): Add an assertion to placate parfait.
|
|
Accept -g for BSD/Plan9 compatibility.
* NEWS (New features): Mention it.
* tests/fmt/goal-option: New test.
* tests/fmt/long-line: Rename from tests/fmt-long-line.
* tests/fmt/base: Rename from tests/misc/fmt.
* doc/coreutils.texi: Document it.
* src/fmt.c (main): Accept the new option
(check_for_goals): new function to implement the operands
Based on BSD's and Plan-9's fmt programs.
|
|
Run "make update-copyright".
|
|
Run this (twice):
git grep -E -l '`[^ ]+'\' src/*.c \
|xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
|
|
* src/chroot.c (usage): Change ``...'' to '...', and describe the
default more accurately (also adding quotes): s,/bin/sh,'/bin/sh -i',
* src/join.c (usage): Change ` ...'' ' to "...''".
* src/fmt.c (isopen): Change `' to '` in list of bytes, so that
a subsequent change can safely perform the `...' to '...' conversion.
* src/truncate.c (main): Tweak quoting in comments to use '...',
not `...`, for consistency with the rest of comments in coreutils.
|
|
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".
|
|
Following on from commit dae35bac, 01-03-2010,
"sort: inform the system about our input access pattern"
apply the same hint to all appropriate utils.
This currently gives around a 5% speedup for reading
large files from fast flash devices on GNU/Linux.
* src/base64.c: Call fadvise (..., FADVISE_SEQUENTIAL);
* src/cat.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cut.c: Likewise.
* src/expand.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/join.c: Likewise.
* src/md5sum.c: Likewise.
* src/nl.c: Likewise.
* src/paste.c: Likewise.
* src/pr.c: Likewise.
* src/ptx.c: Likewise.
* src/shuf.c: Likewise.
* src/sum.c: Likewise.
* src/tee.c: Likewise.
* src/tr.c: Likewise.
* src/tsort.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/wc.c: Likewise, unless we don't actually read().
|
|
Run this command:
git ls-files | grep '\.[ch]$' \
| xargs perl -pi -e 's/for \(;;\)/while (true)/g'
...except for randint.c, which does not include stdbool.h.
In that case, use "while (1)".
* gl/lib/randint.c (randint_genmax): Use "while (1)" for infloops.
* src/cat.c (simple_cat, cat): Use "while (true)" for infloops.
* gl/lib/randread.c (readsource, readisaac): Likewise.
* src/copy.c (copy_reg): Likewise.
* src/csplit.c (record_line_starts, process_regexp): Likewise.
* src/cut.c (set_fields): Likewise.
* src/dd.c (iread, parse_symbols): Likewise.
* src/df.c (find_mount_point, main): Likewise.
* src/du.c (main): Likewise.
* src/expand.c (expand): Likewise.
* src/factor.c (factor_using_division, do_stdin): Likewise.
* src/fmt.c (get_space): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (main): Likewise.
* src/pr.c (main, read_line): Likewise.
* src/shred.c (dopass, genpattern): Likewise.
* src/sort.c (initbuf, fillbuf, getmonth, keycompare): Likewise.
* src/split.c (bytes_split, lines_split): Likewise.
* src/tac.c (tac_seekable): Likewise.
* src/test.c (and, or): Likewise.
* src/tr.c (squeeze_filter, main): Likewise.
* src/tsort.c (search_item): Likewise.
* src/unexpand.c (unexpand): Likewise.
* src/uniq.c (main): Likewise.
* src/yes.c (main): Likewise.
|
|
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 : $_'
|
|
|
|
Replace the sentence with a more useful explanation of -DIGITS.
|
|
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/system.h (emit_bug_reporting_address): New function.
* src/base64.c: Use it rather than a literal printf.
* src/basename.c, src/cat.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/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/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
* src/mv.c, src/nice.c, src/nl.c, src/nohup.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/rm.c:
* src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
* src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
* src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
* src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
* src/true.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, src/yes.c: Likewise.
|
|
Don't elide a line with the prefix followed by only white space.
(get_line): Move EOF-check to loop-termination condition.
* tests/fmt/basic (pfx-1): Adjust test to expect desired result.
(pfx-2): Remove test; its premise was contrary to the documentation.
|
|
booleans (needed for pre-C99 hosts).
|
|
|
|
|
|
|
|
|
|
Problem reported by Edward Welbourne.
|
|
fmt's arbitrary limits.
(TRUE, FALSE): Remove; all uses changed to (true, false).
(main): Use bool for booleans.
Limit maximum width to MAXCHARS / 2. Use xstrtoul, not xstrtol,
to parse width.
(copy_rest): Remove unnecessary cast.
(get_prefix): Rewrite to avoid cast.
(check_punctuation): Use char *, not unsigned char *; C89 requires
this. Avoid off-by-one buffer read overrun when line is empty.
(flush_paragraph): Don't assume wptr-parabuf is <= INT_MAX.
Remove unnecessary casts.
|
|
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
|
|
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
Don't include closeout.h.
|
|
|
|
|
|
Instead explain about `-' and standard input.
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
|
|
Use quote() in diagnostics, rather than literal `' marks.
(main): Exit nonzero when unable to open an input file.
|
|
|
|
type of each member from bool <MEMBER>:1 to unsigned int <MEMBER>:1.
AIX 5.1's xlc could not compile the former.
|
|
|
|
Since get_line may end up calling put_paragraph (for long lines),
be sure to set global, `other_indent', before it is used there.
(set_other_indent): New function, factored out of...
(get_paragraph): ... here. Call it.
(get_line): Call set_other_indent before calling flush_paragraph,
which calls fmt_paragraph, which in turn calls put_paragraph,
which uses other_indent.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
|
|
instead of hard-coding --help and --version descriptions.
|