diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/grep/15-empty-pattern.patch | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core-testing/grep/15-empty-pattern.patch')
-rw-r--r-- | abs/core-testing/grep/15-empty-pattern.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/abs/core-testing/grep/15-empty-pattern.patch b/abs/core-testing/grep/15-empty-pattern.patch new file mode 100644 index 0000000..acb702a --- /dev/null +++ b/abs/core-testing/grep/15-empty-pattern.patch @@ -0,0 +1,36 @@ +--- grep-2.5.1a/src/grep.c.empty-pattern 2006-11-22 19:05:43.000000000 +0000 ++++ grep-2.5.1a/src/grep.c 2006-11-22 19:22:04.000000000 +0000 +@@ -1667,9 +1667,6 @@ + out_invert ^= 1; + match_lines = match_words = 0; + } +- else +- /* Strip trailing newline. */ +- --keycc; + } + else + if (optind < argc) +--- grep-2.5.1a/src/search.c.empty-pattern 2006-11-22 19:21:11.000000000 +0000 ++++ grep-2.5.1a/src/search.c 2006-11-22 19:35:06.000000000 +0000 +@@ -204,6 +204,10 @@ + motif = sep; + } while (sep && total != 0); + ++ /* Strip trailing newline. */ ++ if (size && pattern[size - 1] == '\n') ++ size--; ++ + /* In the match_words and match_lines cases, we use a different pattern + for the DFA matcher that will quickly throw out cases that won't work. + Then if DFA succeeds we do some hairy stuff using the regex matcher +@@ -288,6 +292,10 @@ + motif = sep; + } while (sep && total != 0); + ++ /* Strip trailing newline. */ ++ if (size && pattern[size - 1] == '\n') ++ size--; ++ + /* In the match_words and match_lines cases, we use a different pattern + for the DFA matcher that will quickly throw out cases that won't work. + Then if DFA succeeds we do some hairy stuff using the regex matcher |