1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-23 05:14:46 +02:00
Commit Graph

5326 Commits

Author SHA1 Message Date
Paul Eggert
d2fa6df35e (usage, main): uname -a no longer generates the -p and -i outputs if
they are unknown.
2005-09-15 19:57:04 +00:00
Paul Eggert
36081fa635 * src/dd.c: Detect some very unlikely buffer overflows.
(INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP): New macros.
(MAX_BLOCKSIZE): Now accepts an arg.  All uses changed.
(page_size): New var.
(scanargs, skip, main): Use more-straightforward way to detect overflow.
(dd_copy): Use page_size rather than invoking getpagesize.
Use INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP.
(main): Set page_size.
Avoid a call to stat in the usual case where ftruncate succeeds.
2005-09-13 22:43:11 +00:00
Paul Eggert
360b98042f (docolon): Add IF_LINT check to avoid GCC warning. 2005-09-13 22:30:56 +00:00
Paul Eggert
2c29ba03ac (TIME_SPEC_DATE): No longer needs to be nonzero, so
remove the "=1".
(TIME_SOEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put
them there.
(time_spec_string, time_spec): Hours and minutes must be at
start now, so put them there.
(rfc_2822_format): Now a string constant, not a boolean.  All uses
changed.
(iso_8601_format, rfc_format): Remove.
(RFC_3339_OPTION): New constant.
(long_options): Add --rfc-3339.
(usage): Add --rfc-3339.  Don't mention --iso-8601.
Mention %:z, %::z, %:::z.
(main): Simplify calculation of 'format'; it was getting too hairy
to follow.  Add --rfc-3339.
(show_date): Assume format arg is not NULL, which is the case
now.  The default code is moved to 'main'.  This simplifies things
and allows the default to be calculated just once.
2005-09-13 22:08:41 +00:00
Jim Meyering
68b1902041 (usage): Remove leading spaces in 2-line
description, so that help2man doesn't mangle it.
2005-09-11 07:42:43 +00:00
Jim Meyering
bcadcf23a9 . 2005-09-10 14:27:00 +00:00
Jim Meyering
aadcf5b2e4 . 2005-09-10 14:16:53 +00:00
Jim Meyering
2729563f6b csplit could produce corrupt output, given input lines longer than 8KB
(load_buffer): Don't read from free'd memory
when handling lines longer than the initial buffer length.
(save_to_hold_area): Don't leak the previous hold_area buffer.
Reported by Tristan Miller and Luke Kendall.
* NEWS: Mention this.

(load_buffer): Avoid integer overflow in buffer
size calculations for very long lines.
2005-09-10 13:56:45 +00:00
Paul Eggert
97f9677790 Regenerate. 2005-09-09 21:21:16 +00:00
Paul Eggert
916bce3a7c (tac_seekable): Store match length in regoff_t, not int. Assume that
negative return values less than -2 represent regoff_t overflow.
2005-09-09 21:11:36 +00:00
Paul Eggert
fe041980c8 (SKIP_SOMETHING, find_occurs_in_text):
Store match length in regoff_t,
not int.  Assume that negative return values less than -2
represent regoff_t overflow.
(matcher_error): New function.
(SKIP_SOMETHING, find_occurs_in_text): Use it to report matcher errors.
(alloc_and_compile_regex): No longer any need to worry about
int versus size_t mismatch.
2005-09-09 21:11:07 +00:00
Paul Eggert
0d11284c9e (proc_text): Store match length in regoff_t,
not int.  Assume that negative return values less than -2
represent regoff_t overflow.
(build_type_arg): Check for size_t overflow.
2005-09-09 21:09:48 +00:00
Paul Eggert
35155485bb * src/expr.c (docolon): 64-bit regex fixes. 2005-09-09 21:08:51 +00:00
Paul Eggert
1bd916412d (process_regexp): Store match length in regoff_t,
not int.  Assume that negative return values less than -2
represent regoff_t overflow.
2005-09-09 21:08:19 +00:00
Paul Eggert
3de440458d (main): Hoist errno=0 outside the ifdef. 2005-09-09 20:47:46 +00:00
Paul Eggert
09575c108c Use the phrase "niceness" instead of "nice value" to describe
the biased nice value that can go negative.  This corrects
a discrepancy with POSIX, which states that nice values are
nonnegative.
2005-09-08 06:52:09 +00:00
Jim Meyering
b962737080 (time_args): Use NULL in place of 0. 2005-09-07 06:08:01 +00:00
Jim Meyering
ac46781470 Colorize set-user-ID and set-group-ID files and sticky,
other-writable, and sticky-and-other-writable directories.

(indicator_no[]): Add new symbols.
(indicator_name[]): Add corresponding mode strings.
(color_indicator[]): Add an entry for each new mode string.
(print_color_indicator): Honor new types.

From Mike Frysinger, based on a patch from Fedora.
2005-09-05 17:12:07 +00:00
Jim Meyering
bd30058179 Colorize set-user-ID and set-group-ID files and sticky,
other-writable, and sticky-and-other-writable directories.

Document the default colors for the new strings.
From Mike Frysinger, based on a patch from Fedora.
2005-09-05 17:11:39 +00:00
Jim Meyering
200572872f Colorize set-user-ID and set-group-ID files and sticky,
other-writable, and sticky-and-other-writable directories.

(slack_codes): Add new dircolors mode names.
(ls_codes): Add corresponding two-letter ls mode strings.
From Mike Frysinger, based on a patch from Fedora.
2005-09-05 17:11:15 +00:00
Jim Meyering
2b661b0366 Don't omit comments until there is better documentation. 2005-09-05 15:06:37 +00:00
Jim Meyering
bbd6e2ef20 . 2005-09-04 20:08:25 +00:00
Paul Eggert
4e8b2dca77 Clarify comment about size bounds. 2005-09-01 19:31:10 +00:00
Paul Eggert
6334db91d3 Include lstat.h, quotearg.h.
(diagnose_leading_hyphen): New function.
(main): Use it.
2005-08-29 21:13:32 +00:00
Jim Meyering
e2ea930478 Go ahead and leave the patch in (i.e., revert
today's change).  It doesn't cause a problem after all, since
--exclude-from=- is always handled before --files0-from=F.
2005-08-27 19:05:24 +00:00
Jim Meyering
509e46c548 Revert the du.c part of the change from 2005-07-02:
That change (to reopen stdin on F for --files0-from=F) made it so
--exclude-from=- and --files0-from=F would not work together.
2005-08-27 18:12:54 +00:00
Jim Meyering
88b1cd5a53 . 2005-08-23 16:58:04 +00:00
Jim Meyering
6ce9ea95f5 Remove unnecessary parens in `#if defined (SYMBOL)' expressions. 2005-08-23 15:28:22 +00:00
Jim Meyering
be16d0eac0 Remove unnecessary parens in `#if defined (SYMBOL)' expressions. 2005-08-23 15:09:13 +00:00
Jim Meyering
61f9e01475 Remove unnecessary parens in `#if defined (SYMBOL)' expressions. 2005-08-23 15:06:55 +00:00
Jim Meyering
8de5019cf5 Remove unnecessary parens in `#if defined (SYMBOL)' expressions. 2005-08-23 15:05:54 +00:00
Jim Meyering
4fb8e0f3c4 Include <float.h> unconditionally. 2005-08-23 15:05:01 +00:00
Jim Meyering
68c6c7db8e (print_uptime): Remove unnecessary parens in `#if defined (SYMBOL)' expressions. 2005-08-23 15:03:48 +00:00
Jim Meyering
b5e741091d (do_link): If ln is invoked with --interactive (-i),
encounters an existing destination file, and gets an affirmative
response, then first try to unlink the destination file rather
than simply failing.  Suggestion from Karl Berry.
2005-08-22 10:31:55 +00:00
Jim Meyering
3ee86c1b49 (xwrite_stdout): Rename from xwrite. Remove always-equal-to-STDOUT_FILENO
parameter and associated assertion.  Adjust all callers.
2005-08-22 10:31:17 +00:00
Jim Meyering
258e75ecb6 (main): Declare `target_directory' with const attribute. 2005-08-21 16:08:53 +00:00
Jim Meyering
3d540878ff (time_style): Add `const' attribute.
(tot_dui): Remove unnecessary (and too-short) initializer list.
2005-08-21 16:06:06 +00:00
Jim Meyering
834d8e96c7 (usage) [-b,-t]: Ensure that there are at least two
spaces between each option and the corresponding description -- this
lets help2man format entries properly.  Reported by Edward Welbourne.
2005-08-18 22:26:42 +00:00
Jim Meyering
6a8b452b32 (usage): Fix typo s/POS 2/POS2/. 2005-08-17 20:50:17 +00:00
Paul Eggert
7b4c1ac12a (show_dev): New arg STAT_FILE. All uses changed.
This sometimes gives better results on networked file systems
that do not respect POSIX semantics.  Problem reported by
Bruno Haible.
2005-08-16 20:33:40 +00:00
Jim Meyering
cb50fa3e87 Don't print uninitialized data (or anything else) to stdout
upon localtime failure.

(show_date): Remove stray `puts (buf);' (debugging?)
from the 2004-02-02 change.
2005-08-15 12:16:54 +00:00
Jim Meyering
8c6944b93f (usage): Fix typo s/formated/formatted/ reported by Norbert Kiesel 2005-08-14 15:02:45 +00:00
Jim Meyering
b2e04be2fa . 2005-08-14 14:31:23 +00:00
Jim Meyering
6dc48762d8 Don't include "timespec.h". 2005-08-14 14:22:00 +00:00
Jim Meyering
478bd8935b Use one fewer file descriptor in a common case.
Include "fd-reopen.h", rather than "fcntl--.h".
Use fd_reopen rather than open.
2005-08-14 14:18:07 +00:00
Jim Meyering
c41d32149a Include "timespec.h".
(age_of): Return the nanoseconds part of the timestamp, if available.
(binary_operator) [-nt, -ot]: Use nanosecond values to break ties.
2005-08-14 14:17:48 +00:00
Jim Meyering
006d08a85d (long_time_expected_width): Revert last change, just to
be paranoid, and add a comment explaining why.
Paul Eggert mentioned the possibility.
2005-08-14 08:30:25 +00:00
Jim Meyering
f9a52f316a Don't define mbrtowc at all.
If mbstate_t is not defined, then AC_TYPE_MBSTATE_T will define
it to `int' for us.
2005-08-13 22:47:48 +00:00
Jim Meyering
1442403a5d (main): Explain why we reopen stdin for write-only access. 2005-08-12 08:25:52 +00:00
Jim Meyering
9a3ebcb54d (long_time_expected_width): Don't test for failed localtime.
That cannot happen when the result date's year is in range.
Add an assertion instead.
2005-08-12 08:22:47 +00:00