diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-10-28 16:06:25 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-10-28 16:06:25 +0000 |
commit | 6b6b3f6ef2f44898a8bddfaae93cc4ef3aa79661 (patch) | |
tree | ac9548482088082aece2d2df1406c72339c77b6f /findutils | |
parent | c7c41d306b8e172a2fba432d3c4b9f97b9963816 (diff) | |
download | busybox-6b6b3f6ef2f44898a8bddfaae93cc4ef3aa79661.tar.gz |
Stuf
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/find.c | 25 | ||||
-rw-r--r-- | findutils/grep.c | 6 |
2 files changed, 4 insertions, 27 deletions
diff --git a/findutils/find.c b/findutils/find.c index c154cf4e7..ab9ebf434 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -42,34 +42,11 @@ static int fileAction(const char *fileName, struct stat* statbuf) { if (pattern==NULL) fprintf(stdout, "%s\n", fileName); - else if (find_match(fileName, pattern, TRUE) == TRUE) + else if (find_match((char*)fileName, pattern, TRUE) == TRUE) fprintf(stdout, "%s\n", fileName); return( TRUE); } -static int dirAction(const char *fileName, struct stat* statbuf) -{ - DIR *dir; - struct dirent *entry; - - if (pattern==NULL) - fprintf(stdout, "%s\n", fileName); - else if (find_match(fileName, pattern, TRUE) == TRUE) - fprintf(stdout, "%s\n", fileName); - - dir = opendir( fileName); - if (!dir) { - perror("Can't open directory"); - exit(FALSE); - } - while ((entry = readdir(dir)) != NULL) { - char dirName[NAME_MAX]; - sprintf(dirName, "%s/%s", fileName, entry->d_name); - recursiveAction( dirName, TRUE, dereferenceFlag, FALSE, fileAction, dirAction); - } - return( TRUE); -} - int find_main(int argc, char **argv) { /* peel off the "find" */ diff --git a/findutils/grep.c b/findutils/grep.c index 44ca02834..9495bf858 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -47,9 +47,9 @@ static const char grep_usage[] = extern int grep_main (int argc, char **argv) { FILE *fp; - const char *needle; - const char *name; - const char *cp; + char *needle; + char *name; + char *cp; int tellName=TRUE; int ignoreCase=FALSE; int tellLine=FALSE; |