summaryrefslogtreecommitdiffstats
path: root/bin/sh/arith.y
Commit message (Collapse)AuthorAgeFilesLines
* sh: Use stalloc for arith variable names.jilles2010-04-251-0/+4
| | | | | This is simpler than the custom memory tracker I added earlier, and is also needed by the dash arith code I plan to import.
* sh: arith: Return only 0 and 1 from && and ||.jilles2009-12-301-2/+2
| | | | This agrees with C, POSIX and other shells.
* sh: Various warning fixes (from WARNS=6 NO_WERROR=1):jilles2009-12-271-1/+1
| | | | | | | - const - initializations to silence -Wuninitialized (it was safe anyway) - remove nested extern declarations - rename "index" locals to "idx"
* sh: Constify various strings.jilles2009-12-241-4/+4
| | | | | Most of this is adding const keywords, but setvar() in var.c had to be changed somewhat more.
* - Fix bugs where the value of arithmetic expansion$((...)) was trucatedstefanf2008-04-271-9/+13
| | | | | | | | | | | 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)
* cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvsstefanf2005-08-131-3/+3
|
* Include <stdio.h> for a sprintf() prototype.stefanf2004-05-241-0/+2
| | | | Approved by: das (mentor)
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* Fix testing of arith_assign() value for $((a=15)).schweikh2003-09-071-1/+1
| | | | Submitted by: Enache Adrian <enache@rdslink.ro>
* Style cleanup, mostlyschweikh2003-09-041-151/+188
| | | | Requested by: bde
* Implement missing shell arithmetic operators in $(()) expansionschweikh2003-08-301-47/+183
| | | | | | | | | | 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
* Quiet warnings about copyright[].obrien2003-05-011-2/+2
|
* o __P has been reovedimp2002-02-021-13/+8
| | | | | | | | | | | | | | | | | | 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) { ...
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-2/+0
|
* Use the correct printf format to print a long.dwmalone2001-06-261-1/+1
| | | | Approved by: cracauer
* $Id$ -> $FreeBSD$peter1999-08-271-2/+2
|
* Improve bookkeeping of in_waitcmd and style fixes.cracauer1998-08-251-3/+7
| | | | Submitted by: Bruce Evans
* Do not exit on SIGINT in non-interactive shells, fixes PR 1206,cracauer1998-08-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | i.e. this makes emacs usable from system(3). Programs called from shellscripts are now required to exit with proper signal status. That means, they have to kill themself. Exiting with faked numerical exit code is not sufficient. Exit with proper signal status if script exits on signal. Make the wait builtin interruptable, both with and without traps set. Use volatile sig_atomic_t where (and only where) appropriate. (Almost) fix printing of newlines on SIGINT. Make traps setable from trap handlers. This is needed for shellscripts that catch SIGINT for cleanup work but intend to exit on it, hance have to kill themself from a trap handler. I.e. mkdep. While I'm at it, make it -Wall clean. -Wall is not enabled in Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c are not -Wall-able. PR: 1206 Obtained from: Basic SIGINT fix from Bruce Evans
* Add rcsid. Spelling.charnier1998-05-181-2/+2
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-141-6/+7
| | | | Obtained from: NetBSD, me
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is apeter1996-09-011-26/+41
| | | | | | | | | | | | | | 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
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+169
OpenPOWER on IntegriCloud