aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
authorJohn Beppu <beppu@lbox.org>2000-06-14 00:19:14 +0000
committerJohn Beppu <beppu@lbox.org>2000-06-14 00:19:14 +0000
commitd84990eb1ffe7eac68eb9006969bf530f297b078 (patch)
tree4bc5476d84577cc5eb0b1ce6d4ea9973176a97a8 /findutils/grep.c
parent854e11581f39eb7d2db17c3ed6c7b1fc854a91c0 (diff)
downloadbusybox-w32-d84990eb1ffe7eac68eb9006969bf530f297b078.tar.gz
busybox-w32-d84990eb1ffe7eac68eb9006969bf530f297b078.tar.bz2
busybox-w32-d84990eb1ffe7eac68eb9006969bf530f297b078.zip
+ removed some cruft left over from when lines could be too long.
Diffstat (limited to 'findutils/grep.c')
-rw-r--r--findutils/grep.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index 1272a464b..e29606405 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -66,15 +66,12 @@ static int match = FALSE, beQuiet = FALSE;
66static void do_grep(FILE * fp, char *needle, char *fileName, int tellName, 66static void do_grep(FILE * fp, char *needle, char *fileName, int tellName,
67 int ignoreCase, int tellLine, int invertSearch) 67 int ignoreCase, int tellLine, int invertSearch)
68{ 68{
69 char *cp;
70 long line = 0; 69 long line = 0;
71 char *haystack; 70 char *haystack;
72 int truth = !invertSearch; 71 int truth = !invertSearch;
73 72
74 while ((haystack = cstring_lineFromFile(fp))) { 73 while ((haystack = cstring_lineFromFile(fp))) {
75 line++; 74 line++;
76 cp = &haystack[strlen(haystack) - 1];
77
78 if (find_match(haystack, needle, ignoreCase) == truth) { 75 if (find_match(haystack, needle, ignoreCase) == truth) {
79 if (tellName == TRUE) 76 if (tellName == TRUE)
80 printf("%s:", fileName); 77 printf("%s:", fileName);