Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-07-24 10:01:52 +0400
committerGlenn L McGrath <bug1@ihug.co.nz>2004-07-24 10:01:52 +0400
commit7991ad172041322ce49244ab53f2d323e71bf0c4 (patch)
tree304557a070ca0c15adbae7e0eac69c21f30611df /miscutils/dc.c
parent6caf13bc7f9ba4ebc1e043d825c3ebb7c9b51592 (diff)
Patch by Paul Whittaker, make busybox dc compatable with GNU dc.
the following example was broken, echo "1 1 +" | dc
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c9
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)
print_base(stack[pointer-1]);
}
-static void print(void)
-{
- print_base(pop());
-}
-
struct op {
const char *name;
void (*function) (void);
@@ -155,10 +150,8 @@ static void stack_machine(const char *argument)
double d;
const struct op *o = operators;
- if (argument == 0) {
- print();
+ if (argument == 0)
return;
- }
d = strtod(argument, &endPointer);