aboutsummaryrefslogtreecommitdiff
path: root/dc.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-14 01:51:25 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-14 01:51:25 +0000
commited2dfb60ee4a99850e9e68fb27512a0bab4ba992 (patch)
tree62127f20fc07758e445d8c4e186306cbe83d77b1 /dc.c
parentf35f4340a4f7ae02b1139ac9f303e5b8081d71e9 (diff)
downloadbusybox-w32-ed2dfb60ee4a99850e9e68fb27512a0bab4ba992.tar.gz
busybox-w32-ed2dfb60ee4a99850e9e68fb27512a0bab4ba992.tar.bz2
busybox-w32-ed2dfb60ee4a99850e9e68fb27512a0bab4ba992.zip
Use errorMsg rather than fprintf.
git-svn-id: svn://busybox.net/trunk/busybox@848 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'dc.c')
-rw-r--r--dc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dc.c b/dc.c
index 5bf3bc984..7b13cb943 100644
--- a/dc.c
+++ b/dc.c
@@ -22,7 +22,7 @@ static unsigned int pointer;
22static void push(double a) 22static void push(double a)
23{ 23{
24 if (pointer >= (sizeof(stack) / sizeof(*stack))) { 24 if (pointer >= (sizeof(stack) / sizeof(*stack))) {
25 fprintf(stderr, "dc: stack overflow\n"); 25 errorMsg("stack overflow\n");
26 exit(-1); 26 exit(-1);
27 } else 27 } else
28 stack[pointer++] = a; 28 stack[pointer++] = a;
@@ -31,7 +31,7 @@ static void push(double a)
31static double pop() 31static double pop()
32{ 32{
33 if (pointer == 0) { 33 if (pointer == 0) {
34 fprintf(stderr, "dc: stack underflow\n"); 34 errorMsg("stack underflow\n");
35 exit(-1); 35 exit(-1);
36 } 36 }
37 return stack[--pointer]; 37 return stack[--pointer];
@@ -132,7 +132,7 @@ static void stack_machine(const char *argument)
132 } 132 }
133 o++; 133 o++;
134 } 134 }
135 fprintf(stderr, "dc: %s: syntax error.\n", argument); 135 errorMsg("%s: syntax error.\n", argument);
136 exit(-1); 136 exit(-1);
137} 137}
138 138