diff options
author | Rob Landley <rob@landley.net> | 2006-08-03 19:41:12 +0400 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-08-03 19:41:12 +0400 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /coreutils/expr.c | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r-- | coreutils/expr.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c index 725196039..0a1baa19d 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c @@ -25,14 +25,8 @@ /* no getopt needed */ -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <regex.h> -#include <sys/types.h> -#include <errno.h> #include "busybox.h" - +#include "xregex.h" /* The kinds of value we can have. */ enum valtype { @@ -116,9 +110,9 @@ static VALUE *str_value (char *s) { VALUE *v; - v = xmalloc (sizeof(VALUE)); + v = xmalloc(sizeof(VALUE)); v->type = string; - v->u.s = bb_xstrdup (s); + v->u.s = xstrdup(s); return v; } @@ -148,7 +142,7 @@ static int null (VALUE *v) static void tostring (VALUE *v) { if (v->type == integer) { - v->u.s = bb_xasprintf ("%" PF_REZ "d", PF_REZ_TYPE v->u.i); + v->u.s = xasprintf("%" PF_REZ "d", PF_REZ_TYPE v->u.i); v->type = string; } } @@ -366,7 +360,7 @@ static VALUE *eval6 (void) else { v = xmalloc (sizeof(VALUE)); v->type = string; - v->u.s = bb_xstrndup(l->u.s + i1->u.i - 1, i2->u.i); + v->u.s = xstrndup(l->u.s + i1->u.i - 1, i2->u.i); } freev (l); freev (i1); |