diff options
author | Rob Landley | 2006-08-03 15:41:12 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-03 15:41:12 +0000 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /findutils/grep.c | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) | |
download | busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz |
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 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index ecb1d04..b53bf49 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -17,11 +17,6 @@ */ #include "busybox.h" -#include <stdio.h> -#include <stdlib.h> -#include <getopt.h> -#include <string.h> -#include <errno.h> #include "xregex.h" @@ -203,7 +198,7 @@ static int grep_file(FILE *file) /* Add the line to the circular 'before' buffer */ if(lines_before) { free(before_buf[curpos]); - before_buf[curpos] = bb_xstrdup(line); + before_buf[curpos] = xstrdup(line); curpos = (curpos + 1) % lines_before; } } @@ -271,7 +266,7 @@ static void load_regexes_from_file(llist_t *fopt) fopt = cur->link; free(cur); - f = bb_xfopen(ffile, "r"); + f = xfopen(ffile, "r"); while ((line = bb_get_chomped_line_from_file(f)) != NULL) { llist_add_to(&pattern_head, new_grep_list_data(line, PATTERN_MEM_A)); |