summaryrefslogtreecommitdiff
path: root/miscutils/dc.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /miscutils/dc.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index c7b43ea0a..5e367fe68 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -16,14 +16,14 @@ static unsigned char base;
16static void push(double a) 16static void push(double a)
17{ 17{
18 if (pointer >= (sizeof(stack) / sizeof(*stack))) 18 if (pointer >= (sizeof(stack) / sizeof(*stack)))
19 error_msg_and_die("stack overflow"); 19 bb_error_msg_and_die("stack overflow");
20 stack[pointer++] = a; 20 stack[pointer++] = a;
21} 21}
22 22
23static double pop(void) 23static double pop(void)
24{ 24{
25 if (pointer == 0) 25 if (pointer == 0)
26 error_msg_and_die("stack underflow"); 26 bb_error_msg_and_die("stack underflow");
27 return stack[--pointer]; 27 return stack[--pointer];
28} 28}
29 29
@@ -154,7 +154,7 @@ static void stack_machine(const char *argument)
154 } 154 }
155 o++; 155 o++;
156 } 156 }
157 error_msg_and_die("%s: syntax error.", argument); 157 bb_error_msg_and_die("%s: syntax error.", argument);
158} 158}
159 159
160/* return pointer to next token in buffer and set *buffer to one char 160/* return pointer to next token in buffer and set *buffer to one char
@@ -191,7 +191,7 @@ int dc_main(int argc, char **argv)
191 char *line = NULL; 191 char *line = NULL;
192 char *cursor = NULL; 192 char *cursor = NULL;
193 char *token = NULL; 193 char *token = NULL;
194 while ((line = get_line_from_file(stdin))) { 194 while ((line = bb_get_chomped_line_from_file(stdin))) {
195 cursor = line; 195 cursor = line;
196 len = number_of_tokens(line); 196 len = number_of_tokens(line);
197 for (i = 0; i < len; i++) { 197 for (i = 0; i < len; i++) {
@@ -203,7 +203,7 @@ int dc_main(int argc, char **argv)
203 } 203 }
204 } else { 204 } else {
205 if (*argv[1]=='-') 205 if (*argv[1]=='-')
206 show_usage(); 206 bb_show_usage();
207 while (argc >= 2) { 207 while (argc >= 2) {
208 stack_machine(argv[1]); 208 stack_machine(argv[1]);
209 argv++; 209 argv++;