summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2003-07-31.Jim Meyering
2003-07-28(sortlines_temp): Undo previous change.Jim Meyering
2003-07-27(sortlines_temp): Declare local `swap' to be `int', notJim Meyering
`bool'. Otherwise, at least one buggy compiler (alpha gcc-2.95.4) would cause lines[-1 - swap] (with swap = false) to evaluate to lines[4294967295].
2003-07-27(prompt) [! recursive]: Don't prompt about unwritableJim Meyering
directories, as required by POSIX. Reported by Karl Berry.
2003-07-27remove trailing blanksJim Meyering
2003-07-27(sort): Don't require two `struct line's per text line,Jim Meyering
the new sort algorithm requires just 1.5.
2003-07-27This change was inspired by a similar proposal by Stepan Kasal.Jim Meyering
(mergelines, sortlines_temp): New functions. (sortlines): Use them, to reduce the number of times that we need to copy 'struct line' values. This improved CPU performance by about 30% on one 18 MB test. (sort): Don't invoke sortlines unless we have 2 or more lines.
2003-07-27(is_printable_field): Simplify bit arithmetic.Jim Meyering
2003-07-27(validate_path): Use %lu, not %ld.Jim Meyering
2003-07-27(sort_files): Put `volatile' in the right place.Jim Meyering
2003-07-26.Jim Meyering
2003-07-26Include exitfail.h.Jim Meyering
(TEST_FAILURE): New constant, used for exit status if 'test' fails. (test-syntax_error): Use it. (binary_operator): Now takes bool arg specifying whether left operand is -l ARG, so that caller determines this rather than us. All uses changed. (term): Use posixtest to evaluate parenthesized subexpressions. (unary_operator, one_argument): Remove support for -t without operand. (one_argument): Take argument from argv[pos]. (one_argument, two_arguments, three_arguments): Advance pos. All callers changed. (three_arguments): Look for binary ops before "!". Then look for parenthesized one_argument expressions, instead of trusting expr () to do the right thing. (posixtest): Now takes number of args. All callers changed. Treat "( A B )" like "A B". (main): Set exit_failure to TEST_FAILURE. Don't depend on POSIXLY_CORRECT, as we now conform to POSIX by default. (main) [!LBRACKET]: Do not recognize "--help" or "--verbose" unless.
2003-07-26Use only one bit per field/offset in array, not one `int'.Jim Meyering
(printable_field): Change type to `unsigned char'. (mark_printable_field, is_printable_field): New functions. Use them in place of all direct accesses of `printable_field'.
2003-07-26(set_fields): Detect overflow properly.Jim Meyering
2003-07-26(parse_tabstops): Detect overflow properly.Jim Meyering
2003-07-26 * src/rm.c: Include "dirname.h".Jim Meyering
(usage): Use base_name (program_name) in body of --help output. This lets me... * man/Makefile.am (.x.1): ...back out the kludge of 2003-07-22.
2003-07-26(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt test.Jim Meyering
2003-07-26(validate_path): Cast strlen value to `unsigned long'Jim Meyering
so it matches `%ld' format even on 32-bit systems.
2003-07-26(flush_paragraph): Cast field width to `int' to avoid warning on 64-bit systems.Jim Meyering
2003-07-26(sort_files): Make `func' volatile, so it can't beJim Meyering
clobbered by a `longjmp' into this function.
2003-07-25(validate_path): Use %ld format (not %d) for size_t value.Jim Meyering
2003-07-25(usage): Document the fact that SIGUSR1 makes ddJim Meyering
output its current record counts. Reported by Jurriaan.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include version-etc.h.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include stdlib.h.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include errno.h.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include limits.h or error.h.
2003-07-23Don't include unistd.h or time.h; system.h already does it.Jim Meyering
2003-07-23Don't include stdlib.h, unistd.h, or limits.h; system.h already does it.Jim Meyering
2003-07-23Don't include time.h; system.h already does it.Jim Meyering
2003-07-23Don't include errno.h; system.h already does it.Jim Meyering
2003-07-23Don't include sys/time.h; system.h already does it.Jim Meyering
2003-07-23.Jim Meyering
2003-07-23(parse_tabstops): Detect overflow in tabstop sizes.Jim Meyering
2003-07-23Include xstrndup.h.Jim Meyering
(xstrndup): Remove function, now that it's been factored out into it's own file.
2003-07-23Tweak comment: Solaris2.5.1 -> Solaris 2.5.1Jim Meyering
2003-07-23Tweak comment: Solaris2.7 -> Solaris 2.7Jim Meyering
2003-07-23(wc): Fix typo in computation of file from file_x,Jim Meyering
which caused the former to be used uninitialized if file_x was nonzero.
2003-07-22tweak commentJim Meyering
2003-07-22(set_fields): Use xcalloc in place of xmalloc+memset.Jim Meyering
2003-07-22don't include stdboo.h. it's already included via system.hJim Meyering
2003-07-22.Jim Meyering
2003-07-22(main) [lint]: Initialize spec_list_string to avoid warning.Jim Meyering
2003-07-22Don't include <unistd.h>. system.h already does that.Jim Meyering
2003-07-22(set_fields): Mark all selected indices before trying toJim Meyering
determine range endpoints.
2003-07-22Begin to address this comment: What if someone wants toJim Meyering
extract the 1,000,000-th field of some huge input file? The first step is to rearrange things so that the values in the printable_field array are all 0/1 rather than 0/1/2. (RANGE_START_SENTINEL): Remove. Store range-start indices in a hash table, rather than overloading the `printable_field' array. (range_start_ht): New global. (hash_int, hash_compare_ints, is_range_start_index): New functions. (print_kth): Use is_range_start_index; don't test printable_field. (set_fields): Detect overflow. (set_fields): Insert each range-start index into range_start_ht. (main): Call set_fields only once, and only after output_delimiter_specified and (if required) range_start_ht have been defined.
2003-07-20(get_input_fstatus): Fix typo: `stat' was beingJim Meyering
invoked with a null pointer when there were no file arguments.
2003-07-20.Jim Meyering
2003-07-20(write_counts): Add a comment.Jim Meyering
(wc): Rename `file' parameter. Set new local, `file', to be the file name, or (when it's NULL) _("standard output") so that all uses of `file' use the proper value. Use STREQ, not strcmp.
2003-07-20(number_width): New var.Jim Meyering
(posixly_correct): Remove. (struct fstatus): New struct. (write_counts): Output fields of width number_width. Do not worry about POSIXLY_CORRECT. Use null file, not empty-string file, to denote stdin, since "" is a valid file name on some hosts. (wc, wc_file): New arg fstatus. Use it to avoid invoking fstat if possible. (wc): Avoid problems if end_pos - current_pos overflows. Do not print odd message if stdin has a read error. (get_input_fstatus, compute_number_width): New functions. (main): Use them to implement the new behavior. Ignore POSIXLY_CORRECT.