diff options
author | Bernhard Reutner-Fischer | 2007-04-02 16:41:24 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2007-04-02 16:41:24 +0000 |
commit | 3c5929a53bf488af6ca5c9bef22bd4179fc9f636 (patch) | |
tree | e6da0bf6d1ceeabeac32404feb1527c9087b5600 /coreutils/expr.c | |
parent | adb01b1583199c5563cb729b9485d024cda62b30 (diff) | |
download | busybox-3c5929a53bf488af6ca5c9bef22bd4179fc9f636.zip busybox-3c5929a53bf488af6ca5c9bef22bd4179fc9f636.tar.gz |
- remove some unneeded forward declarations. No obj-code changes.
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r-- | coreutils/expr.c | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c index b082de1..8eda367 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c @@ -67,38 +67,9 @@ struct globals { }; #define G (*(struct globals*)&bb_common_bufsiz1) -static VALUE *docolon(VALUE * sv, VALUE * pv); +/* forward declarations */ static VALUE *eval(void); -static VALUE *int_value(arith_t i); -static VALUE *str_value(const char *s); -static bool nextarg(const char *str); -static int null(VALUE * v); -static bool toarith(VALUE * v); -static void freev(VALUE * v); -static void tostring(VALUE * v); -int expr_main(int argc, char **argv); -int expr_main(int argc, char **argv) -{ - VALUE *v; - - if (argc == 1) { - bb_error_msg_and_die("too few arguments"); - } - - G.args = argv + 1; - - v = eval(); - if (*G.args) - bb_error_msg_and_die("syntax error"); - - if (v->type == integer) - printf("%" PF_REZ "d\n", PF_REZ_TYPE v->u.i); - else - puts(v->u.s); - - fflush_stdout_and_exit(null(v)); -} /* Return a VALUE for I. */ @@ -509,3 +480,28 @@ static VALUE *eval(void) } return l; } + +int expr_main(int argc, char **argv); +int expr_main(int argc, char **argv) +{ + VALUE *v; + + if (argc == 1) { + bb_error_msg_and_die("too few arguments"); + } + + G.args = argv + 1; + + v = eval(); + if (*G.args) + bb_error_msg_and_die("syntax error"); + + if (v->type == integer) + printf("%" PF_REZ "d\n", PF_REZ_TYPE v->u.i); + else + puts(v->u.s); + + fflush_stdout_and_exit(null(v)); +} + + |