diff options
| author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-07-24 06:01:52 +0000 |
|---|---|---|
| committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-07-24 06:01:52 +0000 |
| commit | 9dd6d8cdf3448900aced2e81ef5a7f31edcb3a3f (patch) | |
| tree | 304557a070ca0c15adbae7e0eac69c21f30611df /miscutils | |
| parent | 9097759e2d08db3724f6cab7b29d80d7c3b4f36c (diff) | |
| download | busybox-w32-9dd6d8cdf3448900aced2e81ef5a7f31edcb3a3f.tar.gz busybox-w32-9dd6d8cdf3448900aced2e81ef5a7f31edcb3a3f.tar.bz2 busybox-w32-9dd6d8cdf3448900aced2e81ef5a7f31edcb3a3f.zip | |
Patch by Paul Whittaker, make busybox dc compatable with GNU dc.
the following example was broken, echo "1 1 +" | dc
git-svn-id: svn://busybox.net/trunk/busybox@9012 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/dc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 0ac658d9c..112f6df3f 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
| @@ -114,11 +114,6 @@ static void print_no_pop(void) | |||
| 114 | print_base(stack[pointer-1]); | 114 | print_base(stack[pointer-1]); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | static void print(void) | ||
| 118 | { | ||
| 119 | print_base(pop()); | ||
| 120 | } | ||
| 121 | |||
| 122 | struct op { | 117 | struct op { |
| 123 | const char *name; | 118 | const char *name; |
| 124 | void (*function) (void); | 119 | void (*function) (void); |
| @@ -155,10 +150,8 @@ static void stack_machine(const char *argument) | |||
| 155 | double d; | 150 | double d; |
| 156 | const struct op *o = operators; | 151 | const struct op *o = operators; |
| 157 | 152 | ||
| 158 | if (argument == 0) { | 153 | if (argument == 0) |
| 159 | print(); | ||
| 160 | return; | 154 | return; |
| 161 | } | ||
| 162 | 155 | ||
| 163 | d = strtod(argument, &endPointer); | 156 | d = strtod(argument, &endPointer); |
| 164 | 157 | ||
