aboutsummaryrefslogtreecommitdiff
path: root/miscutils
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 /miscutils
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 'miscutils')
-rw-r--r--miscutils/dc.c6
-rw-r--r--miscutils/mt.c2
2 files changed, 4 insertions, 4 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;
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
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 304d66485..4ab478270 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -81,7 +81,7 @@ extern int mt_main(int argc, char **argv)
81 } 81 }
82 82
83 if (code->name == 0) { 83 if (code->name == 0) {
84 fprintf(stderr, "mt: unrecognized opcode %s.\n", argv[1]); 84 errorMsg("unrecognized opcode %s.\n", argv[1]);
85 exit (FALSE); 85 exit (FALSE);
86 } 86 }
87 87