Age | Commit message (Collapse) | Author |
|
|
|
(diagnose_surprises): New var.
(process_file): Diagnose surprises. Simplify the logic a bit,
while we're at it.
(main): Prepare to diagnose surprises. Remove useless code for
'-' option.
|
|
--indicator-style=slash, to avoid confusion with ls --directory.
(slash): Renamed from directory_only. All uses changed.
|
|
|
|
|
|
for -p.
(indicator_style_args, indicator_style_types): Set it appropriately.
(decode_switches, gobble_file, print_type_indicator):
(length_of_file_name_and_frills):
Implement the change described in NEWS.
(decode_switches): Quote ">", too.
(usage): Update to match the new behavior. Describe ">".
|
|
Also, free the mode_change object when done.
|
|
(reference_file): Move this static var to inside "main".
(process_file, process_files): Remove CHANGES arg; now taken from
static var. All uses changed.
(usage): Fix incorrect description of MODE operand.
(main): For invalid mode usages, output a brief usage message.
Adjust to new modechange API.
|
|
|
|
(main): Don't complain about -TAB.
|
|
|
|
(main): Don't complain about -NUM option.
|
|
(short_options): New constant, which always supports -y arg.
(COMMON_SHORT_OPTIONS): Remove.
|
|
(short_options): New constant, which always supports -S[string].
(COMMON_SHORT_OPTIONS): Remove.
|
|
(short_options): New constant, which always supports -w[num].
(COMMON_SHORT_OPTIONS): Remove.
|
|
(main): Always support -NUM option.
|
|
(obsolete_usage): Remove.
(join_field_1, join_field_2): Initialize to SIZE_MAX to indicate
they haven't been set yet.
(tab): Now int, not char. Initialize to -1 to indicate white space
separates columns, so that we can use NUL as a separator.
All uses changed.
(OBSOLETE_LONG_OPTIONS, get_option): Remove.
(string_to_join_field): Remove ERR_MSG_FMT arg; a single format
suffices. Use xstrtoul for sizes; it suffices.
(decode_field_spec): Report an error and exit on failure. Return void,
not bool.
(add_field_list): Likewise.
(set_join_field): New function.
(enum operand_status): New enum.
(add_file_name): New args OPERAND_STATUS, JOPTION_COUNT,
PREV_OPTC_STATUS, OPTC_STATUS to handle the bewildering array of
possibilities with obsolete option parsing.
(main): Use it. Do not depend on POSIX version.
Check for conflicting options. Parse obsolete options -j1 and -j2
so that it is a pure extension to POSIX 1003.1-2001.
Allow '-t\0' to specify a NUL tab, stealing the code from 'sort'.
|
|
(header_mode_option): Remove.
(main): Don't complain about obsolete -NUM args.
|
|
(shortopts): New constant. -DIGIT now always takes an optional arg.
(main): Don't preprocess arg list; that was buggy. Use method
similar to expand.
|
|
(shortopts): New constant. -DIGIT now always takes an optional arg.
(main): Revamp parsing of -DIGIT to let parse_tab_stops handle it.
Don't complain about -DIGIT.
|
|
(COMMON_SHORT_OPTIONS): Remove.
(short_options): New constant.
(short_options, usage): -I now always takes an optional arg.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get the definition by including "stat-macros.h", instead.
|
|
|
|
|
|
|
|
|
|
|
|
for "group ID".
|
|
|
|
(check_file): Don't assume fopen cannot return stdin or stdout.
|
|
|
|
removed.
(tsort): Do not assume fopen can't return stdin.
Close stdin before returning. All uses changed.
|
|
(touch): Use fd_safer.
|
|
(tee): Use fopen_safer.
|
|
(recheck, tail_file): Use fd_safer rather than open_safer.
|
|
(copy_to_temp): Use fd_safer.
(tac_file): Don't assume fopen cannot return stdin.
|
|
Use same pattern as elsewhere for checking for stdin.
|
|
(cwrite): Use fd_safer. Replace mystery constant 0666 with symbolic
version, as POSIX requires.
|
|
(create_temp_file): Use fd_safer.
(xfclose): Don't assume fileno (stdin) == STDIN_FILENO, etc.
|
|
(wipename): Use fd_safer on directory file descriptor.
(wipefile): Remove special case for /dev/fd/* on older hosts.
It didn't work in general, and wasn't documented.
Use fd_safer.
|
|
stdout. Use freopen instead.
|
|
(open_file): Use fopen_safer.
(close_file): Don't assume fopen does not return stdin.
|