summaryrefslogtreecommitdiff
path: root/src/tr.c
AgeCommit message (Collapse)Author
1997-03-14(main): Make sure c1 is not -1 before using it as anJim Meyering
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.
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1996-12-14(is_char_class_member): Use ISDIGIT_LOCALE instead ofJim Meyering
ISDIGIT to test for characters in CC_DIGIT class.
1996-12-05(main) [!POSIXLY_CORRECT]: Allow the identity mappings:Jim Meyering
[: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.
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-31(es_free): New function.Jim Meyering
(parse_str): Use it to plug small memory leak.
1996-10-21(validate): Remove TAB from diagnostic, for consistency.Jim Meyering
1996-10-16(get_next): Rewrite to treat lower/upper mapping as a special case.Jim Meyering
(main): Write separate loops to initialize mapping for lower->upper and upper->lower conversion.
1996-10-04(main): update --version output againJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-09-02(usage): Tell where to report bugs.Jim Meyering
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-04.Jim Meyering
1996-04-04The following commands all failed unnecessarily.Jim Meyering
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.
1996-03-24Call error with EXIT_FAILURE (rather than `1') as first actual parameter.Jim Meyering
1996-03-24Exit with status EXIT_SUCCESS or EXIT_FAILURE, rather than 0 or 1.Jim Meyering
This doesn't change `error (1' calls.
1996-03-21(main): Declare to be of type int, not void.Jim Meyering
1996-03-16Don't include version.h.Jim Meyering
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-09(star_digits_closebracket): Declare formal param, IDX, and local I toJim Meyering
be of type size_t (rather than int) to avoid warnings from gcc -Wall.
1996-03-09(main): Initialize for internationalized message support: call setlocale,Jim Meyering
bindtextdomain, and textdomain.
1995-11-27s/non-zero/nonzero/gJim Meyering
1995-11-05(unquote): Add casts to avoid signed char* from/to char* warnings.Jim Meyering
1995-10-20(BEGIN_STATE): Use INT_MAX - 1 so as not to interfere with large repeat counts.Jim Meyering
(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.
1995-10-19(build_spec_list): Propagate interface change.Jim Meyering
(parse_str): Likewise.
1995-10-19(struct E_string): Define.Jim Meyering
(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.
1995-10-19Break lines longer than 79-80 chars.Jim Meyering
1995-08-07Annotate localizable strings with _(...). From Franc,ois.Jim Meyering
1995-08-05(validate): Remove const attribute from formal #1.Jim Meyering
It may be modified.
1995-08-05Protoize.Jim Meyering
1995-07-16(build_spec_list): Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX toJim Meyering
be of type size_t, not int. (main): Declare NR and CHARS_READ to be of type long, not int.
1995-07-12(unqote): Comment out unreachable break stmts.Jim Meyering
(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.
1995-06-18merge with 1.12Jim Meyering
1995-06-14[NDEBUG]: Define it to disable assertions.Jim Meyering
(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.
1995-06-13[struct Spec_list] (indefinite_repeat_element): New member.Jim Meyering
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.
1995-06-12(non_neg_strtol): Don't compare signed and unsigned.Jim Meyering
1995-06-11(look_up_char_class, append_char_class, append_equiv_class): Use constJim Meyering
attribute when appropriate.
1995-05-20(look_up_char_class): Take a string length argument.Jim Meyering
Use strncmp, not strcmp and verify that string lengths are the same. (append_char_class): Update caller. From Andreas Schwab.
1995-05-13(usage): Include one- or two-line synopsis in --help output.Jim Meyering
From Karl Berry.
1995-03-09add 1995 to Copyright datesJim Meyering
1995-01-28(substr): Don't allocate a byte for trailing NUL in resultJim Meyering
since the result needn't be NUL-terminated. Don't NUL terminate it.
1995-01-28(append_equiv_class): Use memcpy instead of bcopy.Jim Meyering
(card_of_complement, set_initialize): Use memset, not bzero.
1995-01-17Don't use `legal' when you mean `valid'.Jim Meyering
1994-12-16Include "error.h" instead of simply declaring `void error ();'.Jim Meyering
1994-12-11[ULONGMAX]: Define it.Jim Meyering
[LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
1994-11-16Include <getopt.h> instead of "getopt.h".Jim Meyering
1994-11-03merge with 1.9.1j2Jim Meyering
1994-10-19merge with 1.9.1hJim Meyering