aboutsummaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorbeppu <beppu@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-14 00:19:14 +0000
committerbeppu <beppu@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-14 00:19:14 +0000
commitc4837b1e6f62694552f96ebc51f8c24d1c4bc6c8 (patch)
tree4bc5476d84577cc5eb0b1ce6d4ea9973176a97a8 /grep.c
parent999db55cf81f7ec186016f4f080964dff87a5cc0 (diff)
downloadbusybox-w32-c4837b1e6f62694552f96ebc51f8c24d1c4bc6c8.tar.gz
busybox-w32-c4837b1e6f62694552f96ebc51f8c24d1c4bc6c8.tar.bz2
busybox-w32-c4837b1e6f62694552f96ebc51f8c24d1c4bc6c8.zip
+ removed some cruft left over from when lines could be too long.
git-svn-id: svn://busybox.net/trunk/busybox@644 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/grep.c b/grep.c
index 1272a464b..e29606405 100644
--- a/grep.c
+++ b/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);