summaryrefslogtreecommitdiff
path: root/src/expr.c
AgeCommit message (Collapse)Author
2001-12-15Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions. Split --help output into smaller pieces. Use fputs, not printf.
2001-11-25(usage): Indent --help and --version strings to start in the 7th column.Jim Meyering
2001-08-26(nextarg): Use strcoll, not strcmp.Jim Meyering
2001-08-24(posixly_correct): Remove; no longer needed.Jim Meyering
(main): Do not worry about POSIXLY_CORRECT, as it's OK for expr to have options (so long as they do not begin with digits).
2001-08-18(nextarg): Advance ARGS by one if the next token matches.Jim Meyering
All callers changed.
2001-08-18(isstring): Remove.Jim Meyering
(eval2): Do comparisons as strings first, before trying to convert to integer. This avoids loss of information and wrong result, e.g. for "expr '00' '<' '0!'", where you don't want to convert '00' to '0'.
2001-08-18Code cleanup to avoid tricky macros and old-style function declarations.Jim Meyering
(cmpf, less_than, less_equal, equal, not_equal, greater_equal, greater_than, arithf, arithdivf, plus, minus, multiply, divide, mod): Remove. (eval4, eval3, eval2): Rewrite to avoid the need for the above macros and functions.
2001-08-18(main): Handle a leading "--" option as POSIX requires.Jim Meyering
2001-08-18(toarith): Don't accept plain "-" as a valid integer.Jim Meyering
2001-08-18Modify 'expr' so that it uses intmax_t, not int, to calculateJim Meyering
the value of integer expressions. (struct valinfo.i): Now intmax_t, not int. (docolon, int_value, str_value, isstring, nextarg, toarith, freev, tostring, trace): Remove unnecessary forward decls. (int_value, printv, tostring, toarith, arithf, arithdivf, docolon, eval6, eval4, eval3): Do integer arithmetic using intmax_t, not int. (docolon): Don't assume size_t fits in int.
2000-05-07Include "closeout.h".Jim Meyering
(main): Call atexit with close_stdout.
1999-11-09(NEW): Undefine to avoid warning about redefinition.Jim Meyering
(NEW): Redefine in terms of XMALLOC.
1999-09-02Remove xstrdup declaration.Jim Meyering
1999-03-31(PROGRAM_NAME, AUTHORS): Define and use.Jim Meyering
1999-03-04(main): Include author name argument in call to parse_long_options.Jim Meyering
1999-02-16update copyright datesJim Meyering
1999-01-25(usage): Remove static attribute.Jim Meyering
1998-09-19update bug-reporting addressJim Meyering
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering
1998-06-29Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering
1997-12-21s/__P/PARAMS/Jim Meyering
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-23Remove strstr decl.Jim Meyering
1997-10-07update bug-reporting addressJim Meyering
1997-07-13indentJim Meyering
1997-06-16(eval6): Accept new unary operator, quote.Jim Meyering
From Karl Heuer.
1997-06-11(docolon): Test (re_buffer.re_nsub > 0) rather thanJim Meyering
searching for `\(' to determine whether to return 0 or the empty string. Before it would improperly return '' if the pattern contained a substring like this: `\\('. From Karl Heuer. For example, running expr c : '\\(' should print `0'.
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-09-02(usage): Tell where to report bugs.Jim Meyering
1996-07-05(usage): Remove space before newline in usage message.Jim Meyering
1996-05-30(docolon): Give a warning when the first characterJim Meyering
of the basic regular expression is `^'.
1996-05-18(main): Don't recognize --help, --h, --he, --version, --v, etc.Jim Meyering
if the POSIXLY_CORRECT environment variable is set. (docolon) [RE_SYNTAX_POSIX_BASIC]: Revert my misguided change of Mar 1.
1996-04-24update Copyright years for 1996Jim Meyering
1996-03-24Update FSF's address.Jim Meyering
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-12(main): Initialize for internationalized message support:Jim Meyering
call setlocale, bindtextdomain, and textdomain.
1996-03-02(docolon): Don't use deceptively-named RE_SYNTAX_POSIX_BASIC -- it recognizesJim Meyering
non-BRE \?, \+, and \|. Instead, use RE_SYNTAX_POSIX_MINIMAL_BASIC.
1996-02-29(eval6): Cast strlen to int to avoid warning from gcc -Wall.Jim Meyering
1996-02-24(cmpf): Indent macro uses so ansi2knr doesn't mistake themJim Meyering
for function dcls and munge them. (arithf): Likewise. (arithdivf): Likewise.
1996-02-23(docolon): Set re_syntax_options to RE_SYNTAX_POSIX_BASICJim Meyering
so expr's pattern matching uses BASIC (not GNU-extended) REs. Reported by Jim Kingdon.
1996-01-06Protoize and __P-protect forward dcls.Jim Meyering
1995-08-08Annotate localizable strings with _(...). From Franc,ois.Jim Meyering
1995-05-15(usage): Add one- and two-line descriptions to --help output.Jim Meyering
From Karl.
1995-03-09add 1995 to Copyright datesJim Meyering
1995-02-27(docolon): Use memset instead of bzero.Jim Meyering