summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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.
2003-07-19Include "exitfail.h".Jim Meyering
(main): Set exit_failure rather than calling close_stdout_set_status.
2003-07-19Include "exitfail.h".Jim Meyering
(main): Set exit_failure rather than calling close_stdout_set_status.
2003-07-18(main): Use close_stdout via atexit.Jim Meyering
Now `sort --version' and `sort --help' fail, as they should when their output is redirected to /dev/full.
2003-07-18(usage): Don't call close_stdout here.Jim Meyering
(main): Use close_stdout via atexit. Now `su --version > /dev/full' fails, as it should. Somehow, the change of 2000-05-07 that purports to fix this was not checked in.
2003-07-18(writeline): Use a SPACE, not a TAB between theJim Meyering
count and the corresponding line, as required by POSIX.
2003-07-18Include "exitfail.h".Jim Meyering
(main): Set exit_failure, not xalloc_exit_failure and xmemcoll_exit_failure.
2003-07-18Include "exitfail.h", "quotearg.h".Jim Meyering
(EXPR_INVALID, EXPR_ERROR): New constants. (nomoreargs, null, toarith, nextarg): Return bool, not int. (syntax_error): New function, exiting with status 2. Use it insteading of printing "syntax error" ourselves. (main): Initialize exit_failure to EXPR_ERROR. Exit with EXPR_INVALID on syntax error (too few arguments). (nextarg): Use strcmp, not strcoll; strcoll might return an undesirable 0, or might fail. (docolon, eval4, eval3): Exit with status 3 on invalid argument type or other such error. (eval2): Report an error if strcoll fails in a string comparison.
2003-07-18(NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE):Jim Meyering
Use an anonymous `enum', rather than #define.
2003-07-17.Jim Meyering
2003-07-16(main): Fix bug introduced on 2003-05-10 (for 5.0.1)Jim Meyering
whereby kill would always attempt to operate on argv[0] and fail.
2003-07-16(integer_expected_error): Improve diagnostic -- now,Jim Meyering
it also matches the one from bash's builtin test. (binary_operator): Add \n at end of diagnostic.
2003-07-16(AUTHORS): Replace 3-letter usernames with the actualJim Meyering
names of authors that I just found in bash's builtins/test.def.
2003-07-16Running `[' with no arguments would evoke a segfault.Jim Meyering
(main) [LBRACKET]: Move initialization of argv to precede potential use via test_syntax_error.
2003-07-16(AM_CPPFLAGS): Rename from `INCLUDES', to avoid warning from automake -Wall.Jim Meyering
2003-07-13(NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.Jim Meyering
(main): Use them.
2003-07-13*** empty log message ***Jim Meyering
2003-07-13*** empty log message ***Jim Meyering
2003-07-12.Jim Meyering
2003-07-12(bin_SCRIPTS): Remove use of just-removed $(OPTIONAL_BIN_ZCRIPTS).Jim Meyering
2003-07-12(localedir.h): Put the `2>&1' after the redirect target, not before the `>'.Jim Meyering
2003-07-12(remove_dir): Give a diagnostic upon failed save_cwd,Jim Meyering
now that that function no longer calls `error'.
2003-07-12(find_mount_point): Emit a diagnostic for eachJim Meyering
failed syscall, rather than relying on caller to do that. The caller couldn't do a good job, anyhow -- too many different ways to fail (each with a different referent). Give a diagnostic upon failed save_cwd, now that that function no longer calls `error'. (show_point): Don't diagnose find_mount_point's errors, now that it handles them itself.
2003-07-12tweak spacingJim Meyering
2003-07-12(find_mount_point): Don't let free clobber errno upon failed chdirJim Meyering
2003-07-12 * src/sys2.h: Remove alloca-related block.Jim Meyering
* src/system.h: Include <alloca.h> here, instead.
2003-07-12It appears that the `#pragma alloca' included via "system.h" isJim Meyering
adequate, since join.c uses alloca, yet lacked an in-file #pragma. Remove `#pragma alloca'.
2003-07-12(change_file_owner): Do not restore any specialJim Meyering
permission bits (e.g., set-user-ID, set-group-ID) that are reset by chown(2) on some systems. Suggestion and insistence :-) from Michael Stone.
2003-07-11.Jim Meyering
2003-07-11.Jim Meyering
2003-07-11(EXTRA_SCRIPTS): Remove definition.Jim Meyering
(bin_PROGRAMS): Add nohup. (EXTRA_DIST): Remove nohup.sh. (all_programs): Remove use of $(EXTRA_SCRIPTS).
2003-07-11New file. Rewrite of nohup.sh in C.Jim Meyering
This solves a portability problem: on at least Solaris systems, when nohup.sh used the vendor /bin/sh, it would exit with status of `1' rather than the required 126 or 127 upon failure to exec the specified program.
2003-07-11(diagnose_copy_fd_failure): New function, renamed fromJim Meyering
the macro, COPY_FD_DIAGNOSE. (diagnose_copy_fd_failure): Enclose diagnostic in _(...). (head_file): Likewise.
2003-07-11(change_attributes): Enclose diagnostic in _(...).Jim Meyering
2003-07-11(batch_convert): Use the quote function rather than using literal `...' inJim Meyering
a diagnostic.
2003-07-11Include "quote.h".Jim Meyering
Use the quote function rather than using literal `...' in a diagnostic.