grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/src/search.c


From: Charles Levert
Subject: Changes to grep/src/search.c
Date: Fri, 11 Nov 2005 05:21:26 -0500

Index: grep/src/search.c
diff -u grep/src/search.c:1.38 grep/src/search.c:1.39
--- grep/src/search.c:1.38      Thu Nov 10 19:57:54 2005
+++ grep/src/search.c   Fri Nov 11 10:21:25 2005
@@ -627,9 +627,11 @@
   char const *p;
   char const *pnul;
 
-  /* FIXME: Remove this restriction.  */
+  /* FIXME: Remove these restrictions.  */
   if (eolbyte != '\n')
     error (2, 0, _("The -P and -z options cannot be combined"));
+  if (memchr(pattern, '\n', size))
+    error (2, 0, _("The -P option only supports a single pattern"));
 
   *n = '\0';
   if (match_lines)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]