#
303975 |
|
11-Aug-2016 |
gjb |
Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, and rename it to RC1.
Update __FreeBSD_version.
Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and the dvd1.iso packages population.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
277798 |
|
27-Jan-2015 |
se |
Fix overflow check for multiplication: - Add special test to detect the case of -1 * INTMAX_MIN - Protect against elimination of the test division by the optimizer
Garrett Cooper noticed that the overflow checks were incomplete, and Bruce Evans suggested the use of the "volatile" qualifier to counter the effect of the undefined behaviour, when the prior multiplication caused overflow, and he also suggested improvements to the comments.
Reviewed by: bde MFC after: 1 week
|
#
235771 |
|
22-May-2012 |
kevlo |
Remove redundant declaration of yyparse
Reported by: tinderbox
|
#
233137 |
|
19-Mar-2012 |
eadler |
rm[0].rm_so must be zero (an explicit check is made for zero in the outer if condition)
Reviewed by: se Approved by: cperciva
|
#
223883 |
|
09-Jul-2011 |
se |
Fix style, since this file has just been touched in a major way. No actual code changes.
|
#
223882 |
|
09-Jul-2011 |
se |
Some refactoring for easier maintenance of the code. This is a follow-up to re-establishment of 64bit arithmetic, but is committed separately, to not obscure that conversion. This commit does not change the observed behaviour of expr in any way. Style will be fixed in a follow-up commit.
|
#
223881 |
|
09-Jul-2011 |
se |
Make /bin/expr support 64bit numeric range and range checks by default, again. This brings back the behaviour of expr in FreeBSD-4, which had been reverted due to an assumed incompatbility with POSIX.1 for FreeBSD-5.
This issue has been discussed in the freebsd-standards list, and the consensus was, that POSIX.1 is in fact not violated by this extension, since it affects only cases of POSIX undefined behaviour (overflow of signed long).
Other operating systems did upgrade their versions of expr to support 64bit range, after it had been initially brought to FreeBSD. They have used it for a decade without problems, meanwhile.
The -e option is retained, but it will only select less strict checking of numeric parameters (leading white-space, leading "+" are allowed and skipped, an empty string is considered to represent 0 in numeric context.) The call of check_utility_compat() as a means of establishing backwards compatibility with FreeBSD-4 is considered obsolete, but preserved in this commit. It is expected to be removed in a later revision of this file. Reviewed by: bde, das, jilles MFC after: 2 month (those parts that do not violate POLA)
|
#
166813 |
|
18-Feb-2007 |
ceri |
Correct typos containing my login name (plus one more in expr.y). Found courtesy of a recursive grep in the wrong directory.
|
#
139969 |
|
10-Jan-2005 |
imp |
/*- or .\"- or #- to begin license clauses.
|
#
106065 |
|
28-Oct-2002 |
wollman |
Create a small library function, check_utility_compat(3), to determine whether a named utility should behave in FreeBSD 4.x-compatible mode or in a standard mode (default standard). The configuration is done malloc(3)-style, with either an environment variable or a symlink.
Update expr(1) to use this new interface.
|
#
96382 |
|
11-May-2002 |
wollman |
EXPR_COMPAT should imply -e, since there is no way to specify it otherwise, and -e reflects the historic behavior of FreeBSD's expr.
|
#
96367 |
|
10-May-2002 |
wollman |
The response to my POSIX interpretation request says that `expr' is required to be oblivious to overflow and to use the data type `long'. (Division by zero is undefined in ISO C so it's still OK to check for it here.) Add a new `-e' flag to get the old, more useful behavior.
|
#
95278 |
|
22-Apr-2002 |
wollman |
Provide an environment variabloe, EXPR_COMPAT, which disables option parsing for compatibility with old implementations.
|
#
92979 |
|
22-Mar-2002 |
wollman |
Make expr POSIX-compliant, and fix some bugs. Specifically:
- expr must conform to the Utility Syntax Guidelines, so use getopt() to eat the (non-existent) options.
- Use the Standard type intmax_t for arithmetic.
- If an argument cannot be *completely* converted to an integer, then it is a string.
Additionally make some style cleanups near the modified lines. This utility is still not completely style-compliant.
|
#
90109 |
|
02-Feb-2002 |
imp |
o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o gc some #ifdef sun ... #endif code
Approved by: arch@, new style(9)
|
#
77244 |
|
26-May-2001 |
kris |
Fix warnings to compile with WARNS=2 on i386 and alpha
Reviewed by: bde
|
#
63755 |
|
22-Jul-2000 |
se |
Add overflow tests
|
#
62926 |
|
10-Jul-2000 |
se |
Extend numeric operations to support 64 bit numbers.
|
#
50471 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
22988 |
|
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
12378 |
|
18-Nov-1995 |
joerg |
Fix my own brokeness for the colon operator, when one of the arguments was a valid integer. The actual decision between integer and string is now context-dependant on the operator being used.
|
#
9909 |
|
04-Aug-1995 |
joerg |
expr(1) didn't comply to Posix.2 and its own man page: any comparisions have been made as string comparisions, even in cases where both operands clearly qualified as integers.
The fix is to make the parser properly analyzing whether an operand is a valid integer or not.
|
#
7165 |
|
19-Mar-1995 |
joerg |
You will find enclosed some changes to make gcc -Wall more happy in /usr/src/bin. Note that some patches are still needed in that directory.
I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however.
Submitted by: charnier@lirmm.fr (Philippe Charnier)
|
#
3044 |
|
24-Sep-1994 |
dg |
Added $Id$
|
#
2502 |
|
05-Sep-1994 |
bde |
Explicitly include <sys/types.h> before including <regex.h>. This is apparently required by POSIX. It will be required in practice when the bogus inclusion of <sys/types.h> is removed from <stdio.h>.
|
#
539 |
|
04-Oct-1993 |
jtc |
Allow expressions like "expr 'ABC' : '^.*$' to work as is done in other expr implementations.
|
#
468 |
|
14-Sep-1993 |
jtc |
Fix grammar to eliminate support for unary minus expressions -- they weren't supported, they aren't standard, and they caused expr to dump core.
|
#
295 |
|
17-Aug-1993 |
jtc |
1003.2 requires that lexical comparisons be done in locale specific manner, so we have to use strcoll() instead of strcmp(). 1003.2 requires that a null string be returned if a string does not match a \( \) subexpression. Replaced fprintf/exit with calls to err and errx as appropriate.
|
#
181 |
|
21-Jul-1993 |
conklin |
Update to my latest expr (fixes bugs with comparison and matching operators) Add man page I wrote.
|
#
31 |
|
19-Jun-1993 |
alm |
added POSIX regex to expr
|
#
5 |
|
12-Jun-1993 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r4, which included commits to RCS files with non-trunk default branches.
|
#
4 |
|
12-Jun-1993 |
rgrimes |
Initial import, 0.1 + pk 0.2.4-B1
|