On Thu, Dec 20, 2007 at 01:32:43PM -0800, Tom Eastep wrote: > Andrew Suffield wrote: > > On Thu, Dec 20, 2007 at 12:58:43PM -0800, Tom Eastep wrote: > >> Yes -- but that function can blow up the first time that it tries to touch > >> its arguments in a numeric context. So it would have to break them into two > >> smaller integers without using arithmetic and without the benefit of > >> ${foo:a:b} (these toy shells don't support that form of expansion). > >> > >> That will be ugly and slow. > > > > (Or you could use dc, which would be ugly and fast, and probably less work) > > My initial tests with BusyBox dc have not given me a warm and fuzzy feeling: > > [EMAIL PROTECTED]:~/shorewall/trunk/Shorewall-common$ ~/dc > 2953838592 > p > 2.95384e+09
Hrngh. You're right, busybox dc is not a correct implementation of posix dc. I think that means you're screwed. To hell with it, and depend on bc for arithmetic? ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Shorewall-users mailing list Shorewall-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-users