aboutsummaryrefslogtreecommitdiff
path: root/coreutils/expr.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
committerMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
commitdd19c6990496023fe23fefef8f1798740f7d39c6 (patch)
tree3933adefa4171173db78fa2389146ac89f4edb86 /coreutils/expr.c
parent63ec2732454a0c973305794e185e488106f6b282 (diff)
downloadbusybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.gz
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.bz2
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.zip
Removed trailing \n from error_msg{,_and_die} messages.
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r--coreutils/expr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 71bd22417..8ef5293c1 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -76,14 +76,14 @@ int expr_main (int argc, char **argv)
76 VALUE *v; 76 VALUE *v;
77 77
78 if (argc == 1) { 78 if (argc == 1) {
79 error_msg_and_die("too few arguments\n"); 79 error_msg_and_die("too few arguments");
80 } 80 }
81 81
82 args = argv + 1; 82 args = argv + 1;
83 83
84 v = eval (); 84 v = eval ();
85 if (*args) 85 if (*args)
86 error_msg_and_die ("syntax error\n"); 86 error_msg_and_die ("syntax error");
87 87
88 if (v->type == integer) 88 if (v->type == integer)
89 printf ("%d\n", v->u.i); 89 printf ("%d\n", v->u.i);
@@ -218,7 +218,7 @@ static \
218int name (l, r) VALUE *l; VALUE *r; \ 218int name (l, r) VALUE *l; VALUE *r; \
219{ \ 219{ \
220 if (!toarith (l) || !toarith (r)) \ 220 if (!toarith (l) || !toarith (r)) \
221 error_msg_and_die ("non-numeric argument\n"); \ 221 error_msg_and_die ("non-numeric argument"); \
222 return l->u.i op r->u.i; \ 222 return l->u.i op r->u.i; \
223} 223}
224 224
@@ -226,9 +226,9 @@ int name (l, r) VALUE *l; VALUE *r; \
226int name (l, r) VALUE *l; VALUE *r; \ 226int name (l, r) VALUE *l; VALUE *r; \
227{ \ 227{ \
228 if (!toarith (l) || !toarith (r)) \ 228 if (!toarith (l) || !toarith (r)) \
229 error_msg_and_die ( "non-numeric argument\n"); \ 229 error_msg_and_die ( "non-numeric argument"); \
230 if (r->u.i == 0) \ 230 if (r->u.i == 0) \
231 error_msg_and_die ( "division by zero\n"); \ 231 error_msg_and_die ( "division by zero"); \
232 return l->u.i op r->u.i; \ 232 return l->u.i op r->u.i; \
233} 233}
234 234
@@ -272,7 +272,7 @@ of a basic regular expression is not portable; it is being ignored",
272 re_syntax_options = RE_SYNTAX_POSIX_BASIC; 272 re_syntax_options = RE_SYNTAX_POSIX_BASIC;
273 errmsg = re_compile_pattern (pv->u.s, len, &re_buffer); 273 errmsg = re_compile_pattern (pv->u.s, len, &re_buffer);
274 if (errmsg) { 274 if (errmsg) {
275 error_msg_and_die("%s\n", errmsg); 275 error_msg_and_die("%s", errmsg);
276 } 276 }
277 277
278 len = re_match (&re_buffer, sv->u.s, strlen (sv->u.s), 0, &re_regs); 278 len = re_match (&re_buffer, sv->u.s, strlen (sv->u.s), 0, &re_regs);
@@ -303,19 +303,19 @@ static VALUE *eval7 (void)
303 VALUE *v; 303 VALUE *v;
304 304
305 if (!*args) 305 if (!*args)
306 error_msg_and_die ( "syntax error\n"); 306 error_msg_and_die ( "syntax error");
307 307
308 if (nextarg ("(")) { 308 if (nextarg ("(")) {
309 args++; 309 args++;
310 v = eval (); 310 v = eval ();
311 if (!nextarg (")")) 311 if (!nextarg (")"))
312 error_msg_and_die ( "syntax error\n"); 312 error_msg_and_die ( "syntax error");
313 args++; 313 args++;
314 return v; 314 return v;
315 } 315 }
316 316
317 if (nextarg (")")) 317 if (nextarg (")"))
318 error_msg_and_die ( "syntax error\n"); 318 error_msg_and_die ( "syntax error");
319 319
320 return str_value (*args++); 320 return str_value (*args++);
321} 321}
@@ -329,7 +329,7 @@ static VALUE *eval6 (void)
329 if (nextarg ("quote")) { 329 if (nextarg ("quote")) {
330 args++; 330 args++;
331 if (!*args) 331 if (!*args)
332 error_msg_and_die ( "syntax error\n"); 332 error_msg_and_die ( "syntax error");
333 return str_value (*args++); 333 return str_value (*args++);
334 } 334 }
335 else if (nextarg ("length")) { 335 else if (nextarg ("length")) {