Age | Commit message (Collapse) | Author |
|
Without this, `truncate -s '> -1' F` would truncate F to length 0,
and `truncate -s " +1" F` would truncate F to 1 byte. Now, each
elicits a diagnostic.
* src/truncate.c: Skip leading white space in the --size option
argument and any white space after one of the relative modifiers,
so that the presence of a +/- modifier can be detected reliably.
* tests/misc/truncate-parameters: Add tests for the above.
|
|
* src/base64.c (usage): Likewise.
* src/cat.c (usage): Likewise.
* src/md5sum.c (usage): Likewise.
* src/mkdir.c (usage): Likewise.
* src/mkfifo.c (usage): Likewise.
* src/split.c (usage): Likewise.
* src/stat.c (usage): Likewise.
Heiko Marr reported the problem with mkdir.
|
|
* src/mkfifo.c (usage): Put it *after* the "Mandatory arguments..." line.
|
|
* src/uniq.c (find_field): Remove redundant test in outer loop-
termination expression. Also, add a "const" attribute.
|
|
* tests/misc/timeout-parameters: Remove test for invalid
signal number (we don't know what signal numbers are
invalid on all systems). Also tweak the other invalid
signal check so that the rest of the arguments are correct.
|
|
* src/tee.c (tee_files): Swap fwrite's size/n_elem args and
compare the return value against "1".
|
|
* src/base64.c (do_decode): feof is specified to return nonzero,
not 0/1, so use "k < 1 + !!feof(in)" as the loop termination test.
|
|
* src/truncate.c: Cast signed to unsigned to
confirm intent which will silence -Wsign-compare warnings
|
|
* src/system.h: Include "inttostr.h".
(timetostr): New function, factored out of...
* src/date.c (show_date): Use timetostr.
* src/du.c (show_date): Likewise.
* src/ls.c (print_long_format): Likewise.
* src/pinky.c (time_string): Likewise.
* src/stat.c (human_time): Likewise.
* src/*.c: Don't include inttostr.h, since system.h does.
* src/c99-to-c89.diff: Adjust offsets.
|
|
* src/truncate.c: Explicitly convert from off_t to intmax_t
when printing numbers as they may be different types.
Also don't mix size_t and off_t types in operations as
the latter will be promoted to unsigned when these types
are the same size.
|
|
* maint.mk (patch-check) [REGEN_PATCH]: Trim some trailing blanks.
* src/c99-to-c89.diff: Adjust shred.c offsets.
|
|
* maint.mk (po-check): Limit check for e.g., _(...)-marked
messages to files matching *.? and *.??, thus excluding TODO
and *.diff.
|
|
|
|
* tests/mkdir/selinux: Handle different strerror (ENOTSUP) spelling.
|
|
* src/shred.c (ignorable_sync_errno): New function.
(dosync): Use it.
Based on a patch from Peter O'Gorman.
|
|
|
|
It is no longer necessary to list it specifically,
now that several gnulib modules depend on the "open" module.
This reverts commit 3ea1fe588e20f196cc9b9907d5943bd620c6b944.
|
|
* src/truncate.c (parse_len): Use a temporary of type intmax_t,
rather than off_t; detect out of range [OFF_T_MIN..OFF_T_MAX].
(main) [IF_LINT]: Initialize, to avoid an unwarranted
"may be used uninitialized" warning.
Reported by Michael Geng.
Signed-off-by: Pádraig Brady <P@draigBrady.com>
|
|
* src/basename.c (AUTHORS): List David as the author.
* AUTHORS: Update here, too.
|
|
* AUTHORS,src/echo.c: Use bash builtin echo authors instead of FIXME unknown
|
|
* bootstrap.conf (gnulib_modules): Add open.
This is required at least for Solaris 9 and HP-UX 11, to
avoid a truncate test failure. For details, see this thread:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13755
|
|
* src/stat.c (main): It will be removed in a couple years.
* NEWS (Change in behavior): Mention this.
|
|
* maint.mk (po-check, makefile-check, sc_proper_name_utf8_requires_ICONV):
Add "@" prefix.
|
|
* src/sort.c (specify_nmerge, main): Only adjust SORT_SIZE if it's already set.
* tests/misc/sort-merge: Test bug fix.
|
|
* tests/cp/preserve-gid: Expect a cp-without-`-p'-created file to
have a group ID of $(id -g). Reported by Jarod Wilson. Details in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803/focus=13837
|
|
* tests/misc/runcon-no-reorder: Accept the diagnostic that is
produced when running in a chroot without /selinux/context.
Reported by Jarod Wilson. Details in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803/focus=13837
|
|
|
|
* coreutils.texi (du invocation): Add missing comma.
|
|
* src/sort.c: (static unsigned int nmerge) Replace constant NMERGE.
(specify_nmerge) Validate and apply new option.
(mergefps) Replace some arrays with pointers to xnmalloc'd storage.
* tests/misc/sort-merge: Test new option.
* doc/coreutils.texi: Describe new option.
* NEWS: Advertise new option.
|
|
* src/sort.c: Support new option.
* tests/misc/sort-files0-from: Test new option.
* tests/misc/Makefile.am: Indicate new test.
* docs/coreutils.texi: Explain new option.
* NEWS: Advertise new option.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
|
|
* HACKING (Be nice to translators): New section.
Add Jim's suggestion to avoid changing translatable strings if possible.
|
|
|
|
* src/ls.c (long_time_format, sort_functions): Avoid redundant const.
* src/od.c (charname): Likewise.
* maint.mk (sc_redundant_const): Add rule to detect this.
|
|
* src/join.c (struct seq): Use a (struct line **) for `lines' rather than
one long (struct line *). This allows individual lines to be swapped out
if necessary.
(reset_line): Get a line ready for new input.
(init_linep): Create a new line and assign it to the the pointer passed in.
(spareline[2]): Hold a spare line for each input file.
(free_spareline): Clean up.
(get_line): Take a (struct line **) instead of a (struct line *). If the
line to be overwritten is the previous line for the current file then swap
it out for the spare.
(join): Accomodate new structure of SEQs and new parameters to get_line;
Don't free stale lines until the end -- they're re-usable now.
(dup_line): Remove function.
* NEWS: Mention the performance improvement.
|
|
|
|
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".
|
|
* src/chcon.c (process_file): Append "\n" to --verbose diagnostic.
* tests/misc/chcon: Add a test for the above.
* NEWS: mention the bug fix
Reported by Carl D. Roth in http://bugzilla.redhat.com/451478.
|
|
The affected code wasn't even being compiled on my system,
because HAVE_NL_LANGINFO was not defined. On other systems, where
vasnprintf.m4 determines it needs %A or %a replacement support, it
_would_ check for nl_langinfo, and expose the compilation failure.
* m4/jm-macros.m4: Check for nl_langinfo, required by sort.c.
|
|
* src/sort.c (monthtab): Neither "const" may be added.
|
|
* src/sort.c (monthtab): Remove overzealous "const".
Table entries are modified in an #if HAVE_NL_LANGINFO block.
Introduced by 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c.
|
|
* HACKING: Don't suggest --signoff; it's redundant.
(log requirements): Specify preferred forms.
Mention preference for "<" over ">".
Mention the "const placement" preference.
|
|
* tests/Makefile.am: Define AUTOMAKE_OPTIONS, so check.mk can append.
* tests/check.mk: Define SUFFIXES, so check.mk can append.
* build-aux/check.mk (SUFFIXES): Append, so as not to evoke
automake warning the prior definition in gnulib-tests/gnulib.mk.
(AUTOMAKE_OPTIONS): Likewise.
* gnulib-tests/Makefile.am (TEST_LOGS): Define.
Include build-aux/check.mk
|
|
|
|
* 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.
|
|
* src/truncate.c: There is nothing wrong with that construct.
This reverts commit d7d80c5b7b122377fe250357a3ab182e8fbde20a.
|
|
* src/truncate.c: Several vendor compilers reject that.
See http://article.gmane.org/gmane.comp.lib.gnulib.bugs/13876
|
|
* src/od.c (decode_one_format): Alter the format, again.
(FMT_BYTES_ALLOCATED): Reduce size by adjusting to new format.
(MAX_INTEGRAL_TYPE_SIZE): Move earlier in the file.
(charname): Turn it into a 2D array, since there's no need for
pointers now.
(PRINT_TYPE, print_named_ascii, print_ascii): Add a width
parameter.
(write_block): Account for width parameter.
Using ideas from Paul Eggert.
|
|
* src/od.c (struct tspec): Add pad_width field, and adjust
print_function prototype.
(decode_one_format): Rewrite all fmt_string values to account for
pad width.
(FMT_BYTES_ALLOCATED): Adjust to new format style.
(main): Compute pad width per spec.
(write_block): Account for pad width.
(dump): Don't print padding-only fields.
(PRINT_TYPE, print_named_ascii, print_ascii): All print functions
adjusted to use variable pad width.
* tests/Makefile.am (TESTS): Add test.
* tests/misc/od-multiple-t: New file.
* THANKS: Update.
* NEWS: Mention the improvement.
Reported by Gary Johnson.
|
|
* src/od.c (includes): Add xprintf.h.
(PRINT_TYPE): New macro, using xprintf instead of printf.
(print_s_char, print_char, print_s_short, print_short, print_int)
(print_long, print_long_long, print_float, print_double)
(print_long_double): Factor into PRINT_TYPE macro.
(print_named_ascii, print_ascii): Use xprintf.
* NEWS: Mention this as a bug fix.
|
|
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Remove obsolete check for
AC_C_LONG_DOUBLE.
* src/od.c (LONG_DOUBLE): Delete.
(width_bytes, MAX_FP_TYPE_SIZE, decode_one_format, main): Just use
'long double' directly.
(print_long_double): No longer protect by HAVE_LONG_DOUBLE.
|