+ removed some cruft left over from when lines could be too long.
authorJohn Beppu <beppu@lbox.org>
Wed, 14 Jun 2000 00:19:14 +0000 (00:19 -0000)
committerJohn Beppu <beppu@lbox.org>
Wed, 14 Jun 2000 00:19:14 +0000 (00:19 -0000)
findutils/grep.c
grep.c

index 1272a464b33c03aa5240ef39beb34aa44885cfff..e29606405c1a50c768637b59097ad072117803ec 100644 (file)
@@ -66,15 +66,12 @@ static int match = FALSE, beQuiet = FALSE;
 static void do_grep(FILE * fp, char *needle, char *fileName, int tellName,
                                        int ignoreCase, int tellLine, int invertSearch)
 {
-       char *cp;
        long line = 0;
        char *haystack;
        int  truth = !invertSearch;
 
        while ((haystack = cstring_lineFromFile(fp))) {
                line++;
-               cp = &haystack[strlen(haystack) - 1];
-
                if (find_match(haystack, needle, ignoreCase) == truth) {
                        if (tellName == TRUE)
                                printf("%s:", fileName);
diff --git a/grep.c b/grep.c
index 1272a464b33c03aa5240ef39beb34aa44885cfff..e29606405c1a50c768637b59097ad072117803ec 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -66,15 +66,12 @@ static int match = FALSE, beQuiet = FALSE;
 static void do_grep(FILE * fp, char *needle, char *fileName, int tellName,
                                        int ignoreCase, int tellLine, int invertSearch)
 {
-       char *cp;
        long line = 0;
        char *haystack;
        int  truth = !invertSearch;
 
        while ((haystack = cstring_lineFromFile(fp))) {
                line++;
-               cp = &haystack[strlen(haystack) - 1];
-
                if (find_match(haystack, needle, ignoreCase) == truth) {
                        if (tellName == TRUE)
                                printf("%s:", fileName);