Age | Commit message (Collapse) | Author |
|
Instead, allocate at least sort_size bytes total.
|
|
|
|
a bounds check for examples like `uniq a b c'.
|
|
(e.g. `uniq +3 --' did not work) by invoking getopt_long with
leading '-', resembling what was done to 'sort' on 2001-03-20.
Recognize an +N option only if it is an integer in range, and
(if POSIXLY_CORRECT) only if a file name argument has not been seen;
otherwise silently treat it as a file name.
If the user specifies too many operands, output the first one
in the error message, as a diagnostic aid.
|
|
|
|
into size_t. Tune code for the common case where the line
lengths differ: we avoid comparing them entirely in that case.
|
|
by Geoff Whale.
(skip_fields, skip_chars, check_chars): Now size_t, not int.
(size_opt): New function. Do not arbitrarily reject size zero.
Change the wording of the error message slightly, for convenience.
(find_field): Use size_t, not int, to compute sizes.
(different, main): check_chars==0 is no longer a special case, as
it defaults to SIZE_MAX.
(main): Check for overflow with args like -234234234234234.
Use 'size_opt' to convert optional arguments to sizes.
|
|
part of the field. This disagrees with POSIX.2, but it's
gotta be a bug in the standard. An interpretations request
has been submitted to PASC.
|
|
|
|
|
|
|
|
(main): Do not worry about POSIXLY_CORRECT, as it's OK for
expr to have options (so long as they do not begin with digits).
|
|
All callers changed.
|
|
(eval2): Do comparisons as strings first, before trying to convert to
integer. This avoids loss of information and wrong result, e.g. for
"expr '00' '<' '0!'", where you don't want to convert '00' to '0'.
|
|
(cmpf, less_than, less_equal, equal, not_equal, greater_equal,
greater_than, arithf, arithdivf, plus, minus, multiply, divide, mod):
Remove.
(eval4, eval3, eval2): Rewrite to avoid the need for the above macros
and functions.
|
|
into the scopes where they're actually used.
(unary_operator): Likewise for `fd'.
|
|
Use intmax_t for argument integers, not long.
(age_of, binary_operator): Use time_t for times, not long.
(unary_operator): If N is out of int range, -t N now returns false.
|
|
|
|
|
|
the value of integer expressions.
(struct valinfo.i): Now intmax_t, not int.
(docolon, int_value, str_value, isstring, nextarg, toarith,
freev, tostring, trace): Remove unnecessary forward decls.
(int_value, printv, tostring, toarith, arithf, arithdivf, docolon,
eval6, eval4, eval3): Do integer arithmetic using intmax_t, not int.
(docolon): Don't assume size_t fits in int.
|
|
(show_date) [--rfc-822]: Set LC_ALL=C just before
calling strftime and restore it just afterwards.
Suggestion from Ulrich Drepper.
|
|
Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill,
and would have unwanted side effects if there is an error message.
|
|
|
|
include the first offending argument in the diagnostic.
Suggestion from Karl Berry.
|
|
|
|
`and'.
|
|
`and'.
|
|
`and'.
|
|
and initialize new member, stdin_tty.
|
|
and initialize new member, stdin_tty.
(main): Adjust initialization(s) of `interactive',
|
|
and initialize new member, stdin_tty.
(main): Adjust initialization(s) of `interactive',
|
|
(struct cp_options) [interactive]: Change type to Interactive.
(struct cp_options) [stdin_tty]: New member.
|
|
(copy_internal): Separate the mv-specific and non-move_mode code
that determines whether to prompt the user.
[move_mode]: Don't make mv fail (i.e. don't return 1) just because
the user declined to remove one or more of the files.
|
|
rather than with `#ifdef _POSIX_VERSION'.
|
|
(NAME_MAX_FOR): Likewise.
(pathconf_wrapper): New function.
(validate_path): Declare length variables to be `long', not `int'.
Adjust corresponding printf-style specs to use %ld.
|
|
|
|
(main): `Call' GETTIMEOFDAY_INIT, just in case the code ever changes
to make it necessary.
|
|
(aka Darwin 1.3.7) that caused the date of the first file listed
in long output to be the current time rather than the file's mtime.
The real work is in m4/gettimeofday.m4 and the wrapper function,
lib/gettimeofday.c.
Include gtod.h.
(main): `Call' GETTIMEOFDAY_INIT.
(print_long_format): Add a comment about gettimeofday.
|
|
listing negative sizes, by adding OFF_T_MAX - OFF_T_MIN + 1
instead of doing a fancy conditional shift. This is simpler
and it avoids GCC's bogus compile-time warning about shift
counts. (As a bonus, it is portable to hosts that do not use
twos-complement arithmetic. :-)
|
|
to avoid a warning from gcc on hosts with an unsigned type for the
st_size member.
|
|
the typical case where it has wrapped around from a positive value.
|
|
From Bruno Haible.
|
|
the caller (mv) doesn't remove the source file.
|
|
|
|
got changed and we want the default now.
|
|
|
|
|
|
|
|
when copying (i.e., not in move mode) and not preserving permissions.
|
|
Patch by Frederik Eaton.
|