Age | Commit message (Collapse) | Author |
|
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
consistent with all of the other `... is obsolete...' diagnostics.
|
|
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(usage): Document this.
(shortopts): New constant.
(main): Check for obsolete options.
|
|
|
|
|
|
support of obsolete "+" option syntax in sort, tail, and uniq.
(usage, main): Implement this.
|
|
|
|
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
|
|
instead of hard-coding --help and --version descriptions.
|
|
Split usage strings so that --help and --version descriptions are alone
in their own string.
Likewise for the one that says:
Mandatory arguments to long options are mandatory for short options too.
|
|
Use fputs, not printf.
|
|
``Mandatory arguments to long options are mandatory for short options too.\n\''
|
|
* src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/
and change all uses.
(delimit_method_string): s/precede/prepend/
Patch by Padraig Brady.
* src/uniq.c (usage): Correct typo in description of --all-repeated.
Patch by Padraig Brady.
|
|
a bounds check for examples like `uniq a b c'.
|
|
(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.
|
|
|
|
into size_t. Tune code for the common case where the line
lengths differ: we avoid comparing them entirely in that case.
|
|
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.
|
|
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.
|
|
`and'.
|
|
|
|
|
|
The default behavior is unchanged.
Include argmatch.h.
(usage): Update.
(check_file): Implement it.
(main): Handle new, optional arguments.
Patch by Padraig Brady.
|
|
|
|
Reported by Geoff Keunning.
Fix typo in diagnostic: s/compare/skip/.
|
|
|
|
|
|
blocks when the code in the else block could handle both cases.
|
|
when possible. It is possible when using none of these options:
--count, -repeated, --all-repeated, --unique.
Based on a patch from Ian Turner.
(check_file): Move declarations of local variables into the scopes where used.
(min): Remove macro definition.
(different): Use MIN, not min.
(SWAP_LINES): New macro.
(check_file): Use it here.
|
|
(check_file): Use it here.
[really remove min macro, this time]
|
|
into the scopes where they're used.
(min): Remove macro definition.
(different): Use MIN, not min.
|
|
(writeline): Lines now contain trailing newline.
(check_file): Use size_t, not int, for lengths.
|
|
|
|
|
|
|
|
|
|
|
|
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
|
|
|
|
|
|
(output_all_repeated) [output_mode]: New enum value.
(usage): Describe it.
(writeline): Test for new mode.
(check_file): Likewise.
Based on patches from Jochen Hein and Florin Iucha.
(main): Diagnose `too many arguments'.
|
|
|
|
|
|
|
|
|
|
|
|
Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.
|
|
|