summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-09-03(paste_parallel): Improve replacement for ENDLIST and CLOSED.Paul Eggert
2004-09-02(dummy_closed, CLOSED, dummy_endlist, ENDLIST): Remove;Paul Eggert
it's not portable C to assume FILE is a complete type. (paste_parallel): Use null instead of ENDLIST, and an explicit boolean instead of CLOSED.
2004-08-24(add_tab_stop): Renamed from add_tabstop. All uses changed.Paul Eggert
(parse_tab_stop): Renamed from parse_tabstop. All uses changed. (validate_tab_stop): Renamed from validate_tabstop. All uses changed. (next_file, main): Check fclose against 0, not EOF. (unexpand): Remove unnecessary casts. Add another loop nesting level, for lines, so that per-line variables are initialized cleanly. Revamp tab checking. Check for write error immediately, rather than just once at the end of the program. (TAB_STOP_SENTINEL): Remove. (tab_size): Now size_t, not uintmax_t, since we need to store the sequences of blanks. (max_column_width): New var. (usage): Say "blank" where POSIX requires this. (add_tab_stop): Calculate maximum column width. (unexpand): Store the pending blanks, instead of merely counting them. Follow POSIX's rules about -a requiring two blanks before a tab stop. Get rid of internal label and goto.
2004-08-24Revamp to resemble the new unexpand.c better.Paul Eggert
(usage): -i does not convert tabs after non-tabs. (add_tab_stop): Renamed from add_tabstop. All uses changed. (parse_tab_stop): Renamed from parse_tabstop. All uses changed. (validate_tab_stop): Renamed from validate_tabstop. All uses changed. (next_file, main): Check fclose against 0, not EOF. (expand): Remove unnecessary casts. Add another loop nesting level, for lines, so that per-line variables are initialized cleanly. Revamp tab checking. Check for write error immediately, rather than just once at the end of the program.
2004-08-20Regenerate.Paul Eggert
2004-08-19(usage): "chown '' file" is now allowed.Paul Eggert
(main): Do not set user name to the empty string if the group name is null.
2004-08-19(describe_change): Describe changes to -1:-1Paul Eggert
without using "to OWNERSHIP" phrase.
2004-08-19(parse_group): Return gid_t rather than storing itPaul Eggert
through a pointer. Treat "chgrp '' file" as a no-op change, as FreeBSD does. (main): Set chopt.group_name to NULL if the group is the empty string.
2004-08-11Regenerate.Paul Eggert
2004-08-11Further fix for -d regression.Paul Eggert
2004-08-11(main): Fix -d regression introduced withPaul Eggert
--target-directory support at 2004-06-25.
2004-08-11(copy_internal): When preserving links, unlinkPaul Eggert
a destination with link count greater than one. This is so that commands like "cp -a" don't get confused when copying into a destination that already contains many hard links.
2004-08-10(usage, tee): "tee -" writes to standard output, notPaul Eggert
to a file named "-".
2004-08-10(die, xfopen, mergefps, first_same_file, merge):Paul Eggert
A null file arg means standard output. (main): "-o -" means to write to a file named "-", not to standard output.
2004-08-10(usage): "-" is an operand, not an option.Paul Eggert
2004-08-10(change_timestamps): Fix int->bool conversionPaul Eggert
bugs introduced on 2004-07-29.
2004-08-09(canonicalize_fname): Remove unneeded proxy function.Paul Eggert
(can_mode): Make variable local.
2004-08-09(wipename): Work even if the directory is writeablePaul Eggert
and not readable. Prefer write access, since this should work better with fdatasync.
2004-08-09Regenerate.Paul Eggert
2004-08-09(xalloc_die): New function.Paul Eggert
(main): Remove now-obsolete initialization of xalloc_fail_func.
2004-08-09Finish renaming sha -> sha1.Paul Eggert
2004-08-08(O_BINARY) [!O_BINARY && defined O_BINARY]:Paul Eggert
Do not define, to avoid annoying compiler messages on QNX 6.3.
2004-08-05Regenerate.Paul Eggert
2004-08-04Remove bogus "*/" from shell comment.Paul Eggert
2004-08-04(PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):Paul Eggert
Define to a concatenation of string literals, not to an expression; needed for concatenation contexts. (INTMAX_MAX, INTMAX_MIN): New macros.
2004-08-04(print_stat): Don't assume st_ino / st_dev fits inPaul Eggert
unsigned long; this isn't true for st_ino on Solaris 9.
2004-08-04Do not depend on HAVE_SYSCTL when decidingPaul Eggert
whether to include files. Include <sys/param.h> if HAVE_SYS_PARAM_H (not HAVE_SYSCTL). (main) [defined __POWERPC__]: Add a kludge to work around a Mac OS X bug, so that uname -p defaults to "powerpc" if sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0) fails. Problem reported by Petter Reinholdtsen in: http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
2004-08-03(main): Print uids using unsigned long int, not unsigned int.Paul Eggert
2004-08-03(scan_entries): 0 -> STDIN_FILENO.Paul Eggert
2004-08-03(iswspace, wc): Use to_uchar rather than a cast.Paul Eggert
(print_lines, print_words, print_chars, print_bytes, print_linelength, have_read_stdin, wc, wc_file, main): Use bool for booleans. (exit_status): Remove. (wc, wc_file): Return bool status. All callers changed.
2004-08-03(hard_LC_COLLATE, ignore_case, different, check_file,Paul Eggert
main): Use bool for booleans. (writeline, check_file): Use uintmax_t for line counts. (check_file): Check for and report line number overflow, when that matters.
2004-08-03Int cleanup and minor reorganization to be more like src/expand.c.Paul Eggert
Include quote.h, xstrndup.h. (TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX. (convert_entire_line, have_read_stdin, parse_tabstops, next_file, unexpand, main): Use bool for booleans. (tab_size, tab_list, add_tabstop, validate_tabstops, unexpand): Use uintmax_t for column counts. (first_free_tab, validate_tabstops, unexpand): Use size_t for sizes. (add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX as a tab stop. (parse_tabstops): Don't use ISBLANK on possibly-signed char. Detect overflow in tab stop string. (next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0. (unexpand): Concatenate input files the same way expand does.
2004-08-03(print_element): Use bool for booleans.Paul Eggert
2004-08-03(silent, main): Use bool for booleans.Paul Eggert
(main): 0 -> STDIN_FILENO.
2004-08-03(struct item, n_strings): Use size_t for sizes.Paul Eggert
(have_read_stdin, count_items, scan_zeros, detect_loop, recurse_tree, walk_tree, tsort, main): Use bool for booleans. (exit_status): Remove. (tsort): Return a success flag instead of storing into a global. (main): Use it.
2004-08-03(no_create, use_ref, posix_date, amtime_now,Paul Eggert
touch, main): Use bool for booleans. (main): Avoid integer overflow when given more than INT_MAX options.
2004-08-03(TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):Paul Eggert
Remove. All uses replaced by C99 boolean primitives. (TEST_TRUE, TEST_FALSE): New constants, for readability. (test_unop, binop, unary_operator, binary_operator, two_arguments, three_arguments, posixtest, expr, term, and, or, is_int, age_of, one_argument, main): Use bool for booleans. (advance, unary_advance): Now inline procedures rather than a macros. (is_int): Renamed from isint, to avoid namespace clash with ctype.h. (term, and, or): When it's easy, loop instead of recursing. (term): Avoid integer overflow if there are INT_MAX-3 args (!). (binary_operator, unary_operator): Simplify by systematically rewriting true==FOO to FOO (where FOO is a boolean). (unary_operator): Don't consider a file to be a regular file merely because its mode&S_IFMT is zero. Just use S_ISREG. Remove unnecessary casts. Remove ifdefs for things like S_ISSOCK that are no longer needed, since stat-macros.h always defines them now.
2004-08-03(separator_ends_record, tac_seekable, tac_file,Paul Eggert
tac_stdin, tac_stdin_to_mem, main): Use bool for booleans. (match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes. (tac_seekable): Use ptrdiff_t for pointer subtraction. Report an error if the result is out of range. (tac_seekable, main): Check for integer overflow in buffer size calculations. (main): Remove unnecessary casts.
2004-08-03(buf_init_from_stdin, find_bol, tac_mem):Paul Eggert
Use bool for booleans. (buf_init_from_stdin, buf_free, find_bol, print_line): Use size_t for sizes.
2004-08-03(run_shell): Pass a new n_additional_args arg, so thatPaul Eggert
the callee doesn't have to count 'em. All callers changed. Don't allocate more space for the arg vector than we'll need. Use memcpy to copy the args rather than rolling our own loop. Use size_t for sizes. (fast_startup, simulate_login, change_environment, log_su, correct_password, restricted_shell, main): Use bool for booleans. (longopts): Don't assume change_environment is an int. Use NULL, not 0, for pointers. (xsetenv): New function, replacing xputenv and concat. All callers changed. (elements): Remove; no longer needed. (log_su, correct_passwd, main): Prefer !x to x==NULL. (log_su): 2 -> STDERR_FILENO. (modify_environment, main): Don't assume that getenv's returned value has an indefinite lifetime. (modify_environment): Allocate a larger environ. (main): Remove an impossible 'case 0'; if it happens now, it'll get diagnosed. Don't assume getpwnam results outlive endpwent. Check for null or empty pw_name, pw_dir and for null pw_passwd.
2004-08-03(VA_START): Remove. All callers now use va_start.Paul Eggert
(_POSIX_VDISABLE): Remove unnecessary cast. (struct control_info, visible): Use cc_t for control chars. (struct control_info): Use size_t for sizes. (recover_mode, set_mode, display_speed, display_window_size, valid_options, main, display_changed): Use bool for booleans. (integer_arg): Return unsigned long int, not long int. Accept new max arg; all callers changed, to specify a maximum value for integer parameters instead of silently overflowing. (wrap): Do not overrun the stack buffer if the output contains more than 1024 bytes. Instead, malloc a buffer. (main): Remove a "what is this?!?" FIXME. Nobody knows what it is. Remove unnecessary casts. (set_control_char): Allow int values only up to cc_t range. (screen_columns): Don't reject INT_MAX. (display_changed, display_all, display_speed, recover_mode): Don't assume cc_t fits in int.
2004-08-03(tee, append, ignore_interrupts, main, tee):Paul Eggert
Use bool for booleans. (tee): Use ssize_t for read returns.
2004-08-03(have_read_stdin, bsd_sum_file, sysv_sum_file,Paul Eggert
main): Use bool for booleans. (main): Don't dump core if invoked with argv[0]==NULL.
2004-08-03(empty_paths, ignore_fail_on_non_empty, verbose,Paul Eggert
errno_rmdir_non_empty, remove_parents, main): Use bool for booleans.
2004-08-03Add copyright notice.Paul Eggert
(struct rm_options): Use bool for booleans.
2004-08-03Add a FIXME mentioning that there are manyPaul Eggert
unchecked integer overflows in this file. (gnu_extensions, auto_reference, input_reference, right_reference, ignore_case, initialize_regex, fix_output_parameters, output_one_roff_line, output_one_text_line, output_one_dumb_line, main): Use bool for booleans. (SKIP_SOMETHING, compare_words, digest_break_file, find_occurs_in_text, fix_output_parameters): Use to_uchar instead of a caset. (print_field): Rewrite to avoid cast.
2004-08-03(G_fail): Remove.Paul Eggert
(print_statfs): Print various gotta-be-nonnegative values using unsigned long int, not long int or int. (do_statfs, do_stat): Return a boolean success flag. (do_stat, main): Use bool for booleans.
2004-08-03(cwrite, bytes_split, lines_split, line_bytes_split):Paul Eggert
Use bool for booleans.
2004-08-03(struct Options, main): Use bool for booleans.Paul Eggert
(isaac_seed_data, fillpattern, wipefile): Rewrite to avoid casts.
2004-08-03(canonicalize): Remove. All uses now merely inspect can_mode.Paul Eggert
(no_newline, verbose): Use bool for booleans. (can_mode): Now of type int; use -1 to denote otherwise-uninitialized.