summaryrefslogtreecommitdiff
path: root/bin/expr/expr.c
AgeCommit message (Collapse)Author
2000-09-19reimplement expr using lexical parser generated by yaccjdolecek
highlights: * / is treated correctly depending upon context (addresses PR # 10995) * use 64 bit arithmetic, so expr is able to process integer values from -(2**63) to (2**63 - 1) * checks for integer over- & underflows added * error messages improved, more error checking added add AUTHOR section to manpage add BUGS section, and mention possible drawbacks with other expr implementations XXX the old expr treated empty string in arithmetic expressions as if it was 0 XXX this behaviour has been retained
2000-01-14On memory allocation failure, return 3 as per POSIX. (from OpenBSD)mjl
1999-11-09Since our gcc doesn't warn about NULL format strings anymore, we candrochner
fix the incorrect err(1, "%s", "") et al. Closes PR bin/7592 by cgd.
1998-11-04cast is*() to unsigned charchristos
1998-07-28Be more retentive about use of NOTREACHED and noreturn.mycroft
1998-07-28Delint.mycroft
1998-07-27Slight code reduction.mycroft
1998-07-27__AUDIT__ cleanup.mycroft
1997-07-20Fix compiler warnings; add WARNS=1christos
1996-06-04don't spew an error message if setlocale(LC_ALL, ""); fails. This is forcgd
consistency with other programs, and because currently it can never actually succeeed if LANG is set to something other than "C". Sent in by me in PR 2486, approved by jtc).
1995-04-28Winning Strategies has placed this code into the Public Domainjtc
1995-03-21convert to new RCS id conventions.cgd
1994-07-16Re-implemented with a recursive descent parser.jtc
Fixed subtle bug wrt. comparing integers when either one hasn't been coersed from a string --- while avoiding an even subtler bug found in GNU expr.