Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
array index. Patch from Greg McGary. Although this is truly a
bug, I believe it would not cause tr to misbehave on most systems.
I could not construct a test case with which this bug causes tr
to generate invalid output.
|
|
|
|
|
|
*) 0' as last parameter in getopt_long call.
|
|
ISDIGIT to test for characters in CC_DIGIT class.
|
|
[:upper:] to [:upper:] and [:lower:] to [:lower:].
(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for the
identity mappings [:upper:] to [:upper:] and [:lower:] to [:lower:].
(class_ok): Update table to reflect that tr now allows these
identity mappings.
|
|
|
|
|
|
(parse_str): Use it to plug small memory leak.
|
|
|
|
(main): Write separate loops to initialize mapping for lower->upper
and upper->lower conversion.
|
|
|
|
|
|
|
|
|
|
|
|
tr -cs '[:upper:]' '[X*]'
tr -dcs '[:lower:]' n-rs-z
tr -ds '[:xdigit:]' [:alnum:]'
tr -dcs '[:alnum:]' [:digit:]'
tr -dc '[:upper:]'
Reported by Ross Ridge (ross@worf.mks.com).
(validate): Add missing conjunct (translating) in test for
`translating and complementing character classes' error. Before,
valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
(homogeneous_spec_list): New function.
(validate): Use it to relax the old (overly restrictive) restriction
that prohibited use of complemented character classes when translating.
Now, that is allowed as long as the translation maps many to one.
(get_spec_stats): Rename and redefine global has_char_class from
has_upper_or_lower.
|
|
|
|
This doesn't change `error (1' calls.
|
|
|
|
(main): Use PACKAGE_VERSION instead of version_string.
|
|
be of type size_t (rather than int) to avoid warnings from gcc -Wall.
|
|
bindtextdomain, and textdomain.
|
|
|
|
|
|
(struct E_string): New struct.
(find_closing_delim): Take E_string arg rather than char* and length.
(find_bracketed_repeat): Likewise.
(star_digits_closebracket): New function.
(append_char_class): No longer give diagnostic.
(append_equiv_class): No longer give diagnostic.
(build_spec_list): Give them here instead, allowing things like [:*][:upper:]
that got errors before.
Take E_string arg rather than char*.
Convert switch stmts into if-then so as to use ES_MATCH.
|
|
(parse_str): Likewise.
|
|
(unquote): Convert string to E_string instead of overwriting input.
Backslash-escaped non-special characters are marked as quoted in E_string.
(build_spec_list): Convert outer switch stmt to an if-stmt.
(parse_str): Update sole caller of unquote.
|
|
|
|
|
|
It may be modified.
|
|
|
|
be of type size_t, not int.
(main): Declare NR and CHARS_READ to be of type long, not int.
|
|
(append_range): Declare FIRST and LAST parameters to be unsigned int,
not size_t.
(find_closing_delim): Clean up interface, separating boolean success
indicator and index.
(find_bracketed_repeat): Likewise.
(build_spec_list): Adapt to use new interfaces.
|
|
|
|
(is_char_class_member): Set a variable in each branch of switch stmt
and return that value after the switch (rather than returning directly
from every branch).
(unquote): More int->size_t changes.
(build_spec_list): More int->size_t changes.
Be very careful about comparison now that variables are unsigned:
Use i + 2 < len rather than i < len - 2. The latter failed for len < 2.
|
|
Use size_t rather than int or unsigned long where reasonable.
(get_spec_status): Make interface cleaner.
(get_s1_spec_status): New function.
(get_s2_spec_status): New function.
(validate): Use new functions.
|