diff options
author | Matt Kraai | 2000-12-01 02:55:13 +0000 |
---|---|---|
committer | Matt Kraai | 2000-12-01 02:55:13 +0000 |
commit | 3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0 (patch) | |
tree | 013a1e7752113314831ad7d51854ce8dc9e0918b /miscutils/dc.c | |
parent | b558e76eb1ba173ce3501c3e13fb80f426a7faac (diff) | |
download | busybox-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.zip busybox-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.tar.gz |
Stop using TRUE and FALSE for exit status.
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r-- | miscutils/dc.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 48aa830..0f5f1fc 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -13,19 +13,15 @@ static unsigned int pointer; static void push(double a) { - if (pointer >= (sizeof(stack) / sizeof(*stack))) { - errorMsg("stack overflow\n"); - exit(-1); - } else - stack[pointer++] = a; + if (pointer >= (sizeof(stack) / sizeof(*stack))) + fatalError("stack overflow\n"); + stack[pointer++] = a; } static double pop() { - if (pointer == 0) { - errorMsg("stack underflow\n"); - exit(-1); - } + if (pointer == 0) + fatalError("stack underflow\n"); return stack[--pointer]; } @@ -124,8 +120,7 @@ static void stack_machine(const char *argument) } o++; } - errorMsg("%s: syntax error.\n", argument); - exit(-1); + fatalError("%s: syntax error.\n", argument); } /* return pointer to next token in buffer and set *buffer to one char @@ -182,5 +177,5 @@ int dc_main(int argc, char **argv) } } stack_machine(0); - return( TRUE); + return EXIT_SUCCESS; } |