math support in busybox shells
Mike Frysinger
vapier at gentoo.org
Wed Apr 1 15:10:29 UTC 2009
the ash code, while frightening, doesnt pollute its math code. whoever did
the merge kept it nice and clean :).
so this patch moves the arith() func (and few related stuff) out of ash.c and
into math.c. that's the bulk of it, so you can ignore the large chunk against
ash.c/math.c.
other things:
- rename ASH_MATH to SH_MATH in Config.in and such
- add arith_set_hooks() func to top of math.c
- simplify the 64bit #if mess in math.h
- constify the lookupvar() func in ash
- add a set wrapper to hush since the math code (1) doesnt alloc the variable
storage and (2) uses two strings rather than one with "var=val"
- implement $((...)) detection/parsing in hush
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-shells-math.patch
Type: text/x-patch
Size: 56774 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090401/963615d3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090401/963615d3/attachment-0001.pgp>
More information about the busybox
mailing list