summaryrefslogtreecommitdiff
path: root/src/tr.c
AgeCommit message (Collapse)Author
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
1994-10-02.Jim Meyering
1994-07-13(substr): Allocate len+1 bytes (not just len) to leave room for trailing NUL.Jim Meyering
1994-07-12.Jim Meyering
1994-04-13.Jim Meyering
1994-03-30.Jim Meyering
1994-03-25.Jim Meyering
1994-01-09safe_read and full_write + join patchJim Meyering
1993-10-23merge with 1.8fJim Meyering
1993-10-23merge with 1.8d+Jim Meyering
1993-10-21merge with 1.8dJim Meyering
1993-10-05merge with 1.8aJim Meyering
1993-05-22merge with 1.5.2Jim Meyering
1993-05-07merge with 1.5Jim Meyering
1993-04-29add --version and --helpJim Meyering