History log of /freebsd-9.3-release/bin/sh/arith.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

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

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 223060 13-Jun-2011 jilles

sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicating prototypes for *cmd functions in other headers.


# 218466 08-Feb-2011 jilles

sh: Import arithmetic expression code from dash.

New features:
* proper lazy evaluation of || and &&
* ?: ternary operator
* executable is considerably smaller (8K on i386) because lex and yacc are
no longer used

Differences from dash:
* arith_t instead of intmax_t
* imaxdiv() not used
* unset or null variables default to 0
* let/exp builtin (undocumented, will probably be removed later)

Obtained from: dash


# 200956 24-Dec-2009 jilles

sh: Constify various strings.

Most of this is adding const keywords, but setvar() in var.c had to be
changed somewhat more.


# 178625 27-Apr-2008 stefanf

- Fix bugs where the value of arithmetic expansion$((...)) was trucated
to type int.
- Change the type used for arithmetic expansion to intmax_t (ie. 64 bit on all
currently supported FreeBSD architectures). SUSv3 requires at least type
long but allows for larger types. Other shells (eg. bash, zsh, NetBSD's sh)
do that too.

PR: 122659
Submitted by: Jaakko Heinonen (minor modifications by me)


# 149013 13-Aug-2005 stefanf

Forced commit due to wrong commit-log file:
- Provide missing prototypes and variable declarations in arith.h, include
arith.h.
- Make arith_assign() and yyerror() static.


# 149012 13-Aug-2005 stefanf

cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvs


# 127958 06-Apr-2004 markm

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


# 119746 04-Sep-2003 schweikh

Style cleanup, mostly

Requested by: bde


# 119578 30-Aug-2003 schweikh

Implement missing shell arithmetic operators in $(()) expansion
and variable recognition.

PR: standards/52972
Submitted by: Wartan Hachaturow <wart@tepkom.ru>
Reviewed by: tjr (improved on original patch)
Tested by: buildworld on CURRENT.
MFC after: 6 weeks


# 90111 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 Change
int
foo() {
...
to
int
foo(void)
{
...


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


# 17987 01-Sep-1996 peter

Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
merge of parallel duplicate work by Steve Price and myself. :-]

There are some changes to the build that are my fault... mkinit.c was
trying (poorly) to duplicate some of the work that make(1) is designed to
do. The Makefile hackery is my fault too, the depend list was incomplete
because of some explicit OBJS+= entries, so mkdep wasn't picking up their
source file #includes.

This closes a pile of /bin/sh PR's, but not all of them..

Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter


# 15921 26-May-1996 peter

This commit was generated by cvs2svn to compensate for changes in r15920,
which included commits to RCS files with non-trunk default branches.


# 15920 26-May-1996 peter

Import the 4.4BSD-Lite2 /bin/sh sources

Requested by: joerg

(Note, this is mostly going to be conflicts, which is expected. Our entire
sh source has a mainline, so this should not change anything except for
a few new files appearing. I dont think they are a problem)