mirror of
https://github.com/sheumann/hush.git
synced 2025-01-13 21:31:51 +00:00
Patch by Paul Whittaker, make busybox dc compatable with GNU dc.
the following example was broken, echo "1 1 +" | dc
This commit is contained in:
parent
6caf13bc7f
commit
7991ad1720
@ -114,11 +114,6 @@ static void print_no_pop(void)
|
|||||||
print_base(stack[pointer-1]);
|
print_base(stack[pointer-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print(void)
|
|
||||||
{
|
|
||||||
print_base(pop());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct op {
|
struct op {
|
||||||
const char *name;
|
const char *name;
|
||||||
void (*function) (void);
|
void (*function) (void);
|
||||||
@ -155,10 +150,8 @@ static void stack_machine(const char *argument)
|
|||||||
double d;
|
double d;
|
||||||
const struct op *o = operators;
|
const struct op *o = operators;
|
||||||
|
|
||||||
if (argument == 0) {
|
if (argument == 0)
|
||||||
print();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
d = strtod(argument, &endPointer);
|
d = strtod(argument, &endPointer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user