summaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAgeFilesLines
* (OLD): Don't apply cast to argument of free.Jim Meyering2003-05-131-1/+1
|
* (main): Handle argc == 0.Jim Meyering2003-05-101-1/+1
|
* Remove anachronistic casts of xmalloc,Jim Meyering2003-04-111-3/+3
| | | | xrealloc, and xcalloc return values and of xrealloc's first argument.
* (usage): Use putchar, not fputs, to output a single character.Jim Meyering2003-03-071-1/+1
|
* Remove all uses of `PARAMS'.Jim Meyering2002-12-151-4/+4
|
* (inttostr): Remove; use new imaxtostr library function instead.Jim Meyering2002-11-051-21/+3
|
* Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering2002-08-311-1/+1
| | | | | `exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
* (usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering2002-07-021-1/+1
|
* Don't include "xalloc.h", as system.h already does that via sys2.h.Jim Meyering2002-01-211-2/+1
|
* Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering2001-12-151-10/+18
| | | | | | instead of hard-coding --help and --version descriptions. Split --help output into smaller pieces. Use fputs, not printf.
* (usage): Indent --help and --version strings to start in the 7th column.Jim Meyering2001-11-251-2/+2
|
* (nextarg): Use strcoll, not strcmp.Jim Meyering2001-08-261-1/+1
|
* (posixly_correct): Remove; no longer needed.Jim Meyering2001-08-241-13/+5
| | | | | (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).
* (nextarg): Advance ARGS by one if the next token matches.Jim Meyering2001-08-181-15/+7
| | | | All callers changed.
* (isstring): Remove.Jim Meyering2001-08-181-18/+5
| | | | | | (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'.
* Code cleanup to avoid tricky macros and old-style function declarations.Jim Meyering2001-08-181-62/+44
| | | | | | | | | (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.
* (main): Handle a leading "--" option as POSIX requires.Jim Meyering2001-08-181-0/+7
|
* (toarith): Don't accept plain "-" as a valid integer.Jim Meyering2001-08-181-4/+4
|
* Modify 'expr' so that it uses intmax_t, not int, to calculateJim Meyering2001-08-181-35/+49
| | | | | | | | | | | 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.
* Include "closeout.h".Jim Meyering2000-05-071-1/+4
| | | | (main): Call atexit with close_stdout.
* (NEW): Undefine to avoid warning about redefinition.Jim Meyering1999-11-091-1/+3
| | | | (NEW): Redefine in terms of XMALLOC.
* Remove xstrdup declaration.Jim Meyering1999-09-021-2/+0
|
* (PROGRAM_NAME, AUTHORS): Define and use.Jim Meyering1999-03-311-2/+7
|
* (main): Include author name argument in call to parse_long_options.Jim Meyering1999-03-041-1/+2
|
* update copyright datesJim Meyering1999-02-161-1/+1
|
* (usage): Remove static attribute.Jim Meyering1999-01-251-1/+1
|
* update bug-reporting addressJim Meyering1998-09-191-1/+1
|
* revert back to using lower case _unlocked wrapper namesJim Meyering1998-06-291-1/+1
|
* Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering1998-06-291-1/+1
|
* s/__P/PARAMS/Jim Meyering1997-12-211-14/+14
|
* Remove old-style xmalloc and xrealloc decls.Jim Meyering1997-10-251-1/+0
|
* Remove strstr decl.Jim Meyering1997-10-231-1/+0
|
* update bug-reporting addressJim Meyering1997-10-071-1/+1
|
* indentJim Meyering1997-07-131-1/+1
|
* (eval6): Accept new unary operator, quote.Jim Meyering1997-06-161-4/+19
| | | | From Karl Heuer.
* (docolon): Test (re_buffer.re_nsub > 0) rather thanJim Meyering1997-06-111-1/+1
| | | | | | | 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'.
* update copyrights for 1997Jim Meyering1997-02-091-1/+1
|
* bracket bug address with <> and append a periodJim Meyering1997-02-011-1/+1
|
* change bug-reporting addressJim Meyering1996-11-031-1/+1
|
* change bug-reporting addressJim Meyering1996-11-021-1/+1
|
* (main): update --version output to conform to coding standardJim Meyering1996-10-051-1/+1
|
* (usage): Tell where to report bugs.Jim Meyering1996-09-021-0/+1
|
* (usage): Remove space before newline in usage message.Jim Meyering1996-07-051-1/+1
|
* (docolon): Give a warning when the first characterJim Meyering1996-05-301-0/+8
| | | | of the basic regular expression is `^'.
* (main): Don't recognize --help, --h, --he, --version, --v, etc.Jim Meyering1996-05-181-2/+4
| | | | | if the POSIXLY_CORRECT environment variable is set. (docolon) [RE_SYNTAX_POSIX_BASIC]: Revert my misguided change of Mar 1.
* update Copyright years for 1996Jim Meyering1996-04-241-1/+1
|
* Update FSF's address.Jim Meyering1996-03-241-2/+2
|
* (main): Declare to be of type int, not void.Jim Meyering1996-03-211-1/+1
|
* Don't include version.h.Jim Meyering1996-03-161-2/+1
| | | | (main): Use PACKAGE_VERSION instead of version_string.
* (main): Initialize for internationalized message support:Jim Meyering1996-03-121-0/+3
| | | | call setlocale, bindtextdomain, and textdomain.