<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/sh/arith.y, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2011-02-08T23:18:06Z</updated>
<entry>
<title>sh: Import arithmetic expression code from dash.</title>
<updated>2011-02-08T23:18:06Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-02-08T23:18:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6262b84eee5cf10b00b692a4eadbc63d50972013'/>
<id>urn:sha1:6262b84eee5cf10b00b692a4eadbc63d50972013</id>
<content type='text'>
New features:
* proper lazy evaluation of || and &amp;&amp;
* ?: 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
</content>
</entry>
<entry>
<title>sh: Use stalloc for arith variable names.</title>
<updated>2010-04-25T20:43:19Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-04-25T20:43:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=593e925a73be1cfa1eb0a9904b7da7493b279d6f'/>
<id>urn:sha1:593e925a73be1cfa1eb0a9904b7da7493b279d6f</id>
<content type='text'>
This is simpler than the custom memory tracker I added earlier, and is also
needed by the dash arith code I plan to import.
</content>
</entry>
<entry>
<title>sh: arith: Return only 0 and 1 from &amp;&amp; and ||.</title>
<updated>2009-12-30T15:59:40Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2009-12-30T15:59:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=63ccda77195504637ff9a9a9919e2565306398d1'/>
<id>urn:sha1:63ccda77195504637ff9a9a9919e2565306398d1</id>
<content type='text'>
This agrees with C, POSIX and other shells.
</content>
</entry>
<entry>
<title>sh: Various warning fixes (from WARNS=6 NO_WERROR=1):</title>
<updated>2009-12-27T18:04:05Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2009-12-27T18:04:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=384aedab5807fb0ed022a80b92ac70a9cd18339f'/>
<id>urn:sha1:384aedab5807fb0ed022a80b92ac70a9cd18339f</id>
<content type='text'>
- const
- initializations to silence -Wuninitialized (it was safe anyway)
- remove nested extern declarations
- rename "index" locals to "idx"
</content>
</entry>
<entry>
<title>sh: Constify various strings.</title>
<updated>2009-12-24T18:41:14Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2009-12-24T18:41:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2cac6e364a22fbb88eff4a1d36a09fef0064b421'/>
<id>urn:sha1:2cac6e364a22fbb88eff4a1d36a09fef0064b421</id>
<content type='text'>
Most of this is adding const keywords, but setvar() in var.c had to be
changed somewhat more.
</content>
</entry>
<entry>
<title>- Fix bugs where the value of arithmetic expansion$((...)) was trucated</title>
<updated>2008-04-27T20:46:45Z</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2008-04-27T20:46:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=39376f45e298ec9d397f9a7825d9cfb926eb3cae'/>
<id>urn:sha1:39376f45e298ec9d397f9a7825d9cfb926eb3cae</id>
<content type='text'>
  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)
</content>
</entry>
<entry>
<title>cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvs</title>
<updated>2005-08-13T07:54:23Z</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-08-13T07:54:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=643c91f9ee9678b117fe704ee61367fc212cacc1'/>
<id>urn:sha1:643c91f9ee9678b117fe704ee61367fc212cacc1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Include &lt;stdio.h&gt; for a sprintf() prototype.</title>
<updated>2004-05-24T10:11:31Z</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2004-05-24T10:11:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e0cd241f8bbf5a7c82e0e1bf10dbe6dd986f9876'/>
<id>urn:sha1:e0cd241f8bbf5a7c82e0e1bf10dbe6dd986f9876</id>
<content type='text'>
Approved by:	das (mentor)
</content>
</entry>
<entry>
<title>Remove clause 3 from the UCB licenses.</title>
<updated>2004-04-06T20:06:54Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2004-04-06T20:06:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9'/>
<id>urn:sha1:6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9</id>
<content type='text'>
OK'ed by:	imp, core
</content>
</entry>
<entry>
<title>Fix testing of arith_assign() value for $((a=15)).</title>
<updated>2003-09-07T10:14:56Z</updated>
<author>
<name>Jens Schweikhardt</name>
<email>schweikh@FreeBSD.org</email>
</author>
<published>2003-09-07T10:14:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4fe15b85a6c50337149b1d2bdba6f91df97196e7'/>
<id>urn:sha1:4fe15b85a6c50337149b1d2bdba6f91df97196e7</id>
<content type='text'>
Submitted by:	Enache Adrian &lt;enache@rdslink.ro&gt;
</content>
</entry>
</feed>
