History log of /freebsd-10-stable/bin/expr/expr.1
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 307418 16-Oct-2016 sevan

MFC r306719:
Document origins of expr & authors
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1

PR: 173979
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 235400 13-May-2012 joel

Minor mdoc nits.


# 232158 25-Feb-2012 gjb

Whitespace cleanup:
o Wrap sentences on to new lines
o Cleanup trailing whitespace

Found with: textproc/igor
MFC after: 1 week
X-MFC-With: r232157


# 232157 25-Feb-2012 gjb

Fix various typos in manual pages.

Submitted by: amdmi3
PR: 165431
MFC after: 1 week


# 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)


# 212390 09-Sep-2010 jilles

expr(1): Add sh(1) versions of examples, remove an incorrect example.

The three examples are better done using sh(1) itself these days.

The example
expr -- "$a" : ".*"
is incorrect in the general case, as "$a" may be an operator.

MFC after: 2 weeks


# 167210 04-Mar-2007 ru

Fix markup.


# 140353 16-Jan-2005 ru

Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.


# 140169 13-Jan-2005 ru

Removed harmful empty lines that crept in during the copyright
header update.


# 139969 10-Jan-2005 imp

/*- or .\"- or #- to begin license clauses.


# 132029 12-Jul-2004 tjr

Remove BUGS section that talked about missing multibyte character support.
We have support now that the regular expression routines do.


# 131513 03-Jul-2004 tjr

Document missing multibyte character handling in utilities specified
by POSIX.


# 107282 26-Nov-2002 ru

mdoc(7) police:

Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by: re


# 107226 25-Nov-2002 ru

mdoc(7) police: markup fixes.

Approved by: re


# 106065 27-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.


# 97464 29-May-2002 ru

mdoc(7) police: markup nits.


# 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.


# 92984 22-Mar-2002 wollman

Typo (if => of).


# 92983 22-Mar-2002 wollman

Add a word of caution about integer arithmetic range and overflow detection.


# 92982 22-Mar-2002 wollman

Fix a few formatting brainos and make the formatting of the EXAMPLES
section somewhat clearer.


# 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.


# 79754 15-Jul-2001 dd

Remove whitespace at EOL.


# 70056 15-Dec-2000 ru

Prepare for mdoc(7)NG.


# 68935 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


# 50471 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 41915 18-Dec-1998 jkoshy

Add cross-references to test(1) and expr(1) respectively.

PR: docs/9111
Submitted by: Josh Gilliam <josh@quick.net>


# 36011 13-May-1998 charnier

Correct use of .Nm.


# 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.


# 13719 29-Jan-1996 mpp

Fix some spelling errors.


# 1411 23-Apr-1994 jkh

Fix gross spelling and typographical errors pointed out by Keith Bostic.


# 540 04-Oct-1993 jtc

Document the new, less restrictive, behavior of the matching operator.


# 181 21-Jul-1993 conklin

Update to my latest expr (fixes bugs with comparison and matching operators)
Add man page I wrote.