math support in busybox shells
walter harms
wharms at bfs.de
Wed Apr 1 07:22:53 UTC 2009
Hi mike,
dc has some nice math and is a actualy a small utility. perhaps you can
add that math cababilities to ash ?
that would be a real enhancement over other shells.
re,
wh
Mike Frysinger schrieb:
> ash is the only shell that has math support. rather than rewrite a new one
> from scratch for hush, i'm wondering if we can split it out of ash so that it
> is shared among any/all shells. more of a parsing library. i thought about
> simply wiring up builtin_expr() to do the parsing, but the syntax and
> operators that it supports is more limited than what is required in the shell.
>
> looking at ash shows that the math code apparently used to be a sep yacc file,
> but then the C output of it was merged and cut down. hopefully this means
> that it isnt too hard to split back out.
>
> thinking about it at a higher level, the only thing the engine needs to do is
> to get and set variables ... all other shell related parsing should already be
> done at that point. and the return value should always be a signed long int.
> thoughts ?
> -mike
>
More information about the busybox
mailing list