aboutsummaryrefslogtreecommitdiff
path: root/miscutils/dc.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
commitd537a95fdbc0b4a5f38edea8593b4c085fdd7fcb (patch)
tree62127f20fc07758e445d8c4e186306cbe83d77b1 /miscutils/dc.c
parent4ac6cb534d78d63d7b0a206118c56bad7024b9f8 (diff)
downloadbusybox-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.gz
Use errorMsg rather than fprintf.
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 5bf3bc984..7b13cb943 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -22,7 +22,7 @@ static unsigned int pointer;
static void push(double a)
{
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
- fprintf(stderr, "dc: stack overflow\n");
+ errorMsg("stack overflow\n");
exit(-1);
} else
stack[pointer++] = a;
@@ -31,7 +31,7 @@ static void push(double a)
static double pop()
{
if (pointer == 0) {
- fprintf(stderr, "dc: stack underflow\n");
+ errorMsg("stack underflow\n");
exit(-1);
}
return stack[--pointer];
@@ -132,7 +132,7 @@ static void stack_machine(const char *argument)
}
o++;
}
- fprintf(stderr, "dc: %s: syntax error.\n", argument);
+ errorMsg("%s: syntax error.\n", argument);
exit(-1);
}