summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2001-08-26(mergefps): Do not allocate at least sort_size bytes for each merge buffer.Jim Meyering
Instead, allocate at least sort_size bytes total.
2001-08-26(nextarg): Use strcoll, not strcmp.Jim Meyering
2001-08-25(main): Fix a typo in the previous patch: missingJim Meyering
a bounds check for examples like `uniq a b c'.
2001-08-25(main): Fix some more incompatibilities with POSIX.2,Jim Meyering
(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.
2001-08-25(main): Don't report an error when given the valid options `+3 -d'.Jim Meyering
2001-08-25(different): Don't assume that lengths can fitJim Meyering
into size_t. Tune code for the common case where the line lengths differ: we avoid comparing them entirely in that case.
2001-08-25Remove arbitrary restrictions on sizes, fixing a bug reportedJim Meyering
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.
2001-08-25(find_field): Don't count trailing newline to beJim Meyering
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.
2001-08-24Use `n_users' in place of `argc - optind' in two more places.Jim Meyering
2001-08-24(main): Fail if -l is specified with no username.Jim Meyering
2001-08-24(usage): Clarify description of -l. From Clark Morgan.Jim Meyering
2001-08-24(posixly_correct): Remove; no longer needed.Jim Meyering
(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).
2001-08-18(nextarg): Advance ARGS by one if the next token matches.Jim Meyering
All callers changed.
2001-08-18(isstring): Remove.Jim Meyering
(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'.
2001-08-18Code cleanup to avoid tricky macros and old-style function declarations.Jim Meyering
(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.
2001-08-18(binary_operator): Move declarations of lt,rt `down'Jim Meyering
into the scopes where they're actually used. (unary_operator): Likewise for `fd'.
2001-08-18(isint, binary_operator, unary_operator):Jim Meyering
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.
2001-08-18(main): Handle a leading "--" option as POSIX requires.Jim Meyering
2001-08-18(toarith): Don't accept plain "-" as a valid integer.Jim Meyering
2001-08-18Modify 'expr' so that it uses intmax_t, not int, to calculateJim Meyering
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.
2001-08-18Revert part of last change and solve the problem a better way.Jim Meyering
(show_date) [--rfc-822]: Set LC_ALL=C just before calling strftime and restore it just afterwards. Suggestion from Ulrich Drepper.
2001-08-18(show_date) [--rfc-822]: Don't space-pad the day of the month.Jim Meyering
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.
2001-08-18(head_bytes): Read no more than the specified number of bytes.Jim Meyering
2001-08-16(main): When there are too many non-option arguments,Jim Meyering
include the first offending argument in the diagnostic. Suggestion from Karl Berry.
2001-08-14(xputenv): Remove parameter's const qualifier.Jim Meyering
2001-08-14(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-08-14(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-08-13(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-08-13(cp_option_init): Adjust initialization of `interactive',Jim Meyering
and initialize new member, stdin_tty.
2001-08-13(cp_option_init): Adjust initialization of `interactive',Jim Meyering
and initialize new member, stdin_tty. (main): Adjust initialization(s) of `interactive',
2001-08-13(cp_option_init): Adjust initialization of `interactive',Jim Meyering
and initialize new member, stdin_tty. (main): Adjust initialization(s) of `interactive',
2001-08-13(enum Interactive): New type.Jim Meyering
(struct cp_options) [interactive]: Change type to Interactive. (struct cp_options) [stdin_tty]: New member.
2001-08-13(overwrite_prompt): New function.Jim Meyering
(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.
2001-08-12Guard the above pathconf-using definitions with `#if HAVE_PATHCONF'Jim Meyering
rather than with `#ifdef _POSIX_VERSION'.
2001-08-12(PATH_MAX_FOR): Use pathconf via wrapper.Jim Meyering
(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.
2001-08-12Include gtod.h -- should have been part of preceding deltaJim Meyering
2001-08-12Include gtod.h.Jim Meyering
(main): `Call' GETTIMEOFDAY_INIT, just in case the code ever changes to make it necessary.
2001-08-12Work around non-compliant gettimeofday on Mac OS X 10.0.4,Jim Meyering
(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.
2001-08-10(print_long_format): Simplify previous patch forJim Meyering
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. :-)
2001-08-10(print_long_format): Multiply the shift width by zeroJim Meyering
to avoid a warning from gcc on hosts with an unsigned type for the st_size member.
2001-08-10(print_long_format): If a file size is negative, assumeJim Meyering
the typical case where it has wrapped around from a positive value.
2001-08-07(cfcc_msg): Remove now-inaccurate part of comment.Jim Meyering
From Bruno Haible.
2001-08-06(copy_internal): Set *rename_succeeded, so thatJim Meyering
the caller (mv) doesn't remove the source file.
2001-08-06(usage): Correct the description of --update.Jim Meyering
2001-08-04(quote_name): Pass 0 to mbsnwidth, since the defaultJim Meyering
got changed and we want the default now.
2001-07-15Include "unlocked-io.h", rather than hard-coding the HAVE_*_UNLOCKED macros.Jim Meyering
2001-07-08revert unrelated part of last delta -- coming soon with a separate log entryJim Meyering
2001-07-08(usage): Reformat so help2man generates a properly indented man page.Jim Meyering
2001-07-08(get_dest_mode): Clear set-user-ID and set-group-ID bitsJim Meyering
when copying (i.e., not in move mode) and not preserving permissions.
2001-07-02(do_link): Test the boolean symbolic_link, not the function, symlink.Jim Meyering
Patch by Frederik Eaton.