PERFORCE change 143667 for review

Gabor Kovesdan gabor at FreeBSD.org
Tue Jun 17 19:59:53 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143667

Change 143667 by gabor at gabor_server on 2008/06/17 19:59:39

	- Partly revert the previous change as it made the compatibility worse

Affected files ...

.. //depot/projects/soc2008/gabor_textproc/grep/grep.c#25 edit

Differences ...

==== //depot/projects/soc2008/gabor_textproc/grep/grep.c#25 (text+ko) ====

@@ -199,13 +199,9 @@
 	while ((ptr = strstr(pat, "||")) != NULL)
 		strlcpy(&(ptr[1]), &(ptr[2]), strlen(pat) - strlen(ptr) - 1);
 
-/* Work-around to allow * at the beginning of a subexpression */
+/* Work-around to allow * at the beginning of the regexp */
 	while (pat[0] == '*')
 		pat++;
-	while ((ptr = strstr(pat, "(*")) != NULL)
-		strlcpy(&(ptr[1]), &(ptr[2]), strlen(pat) - strlen(ptr) - 1);
-	while ((ptr = strstr(pat, "|*")) != NULL)
-		strlcpy(&(ptr[1]), &(ptr[2]), strlen(pat) - strlen(ptr) - 1);
 
 	if (!xflag && (len == 0 || matchall)) {
 		matchall = 1;
@@ -365,7 +361,6 @@
 		case 'E':
 			Fflag = Gflag = 0;
 			Eflag++;
-			eflags |= REG_EXTENDED;
 			break;
 		case 'e':
 			add_patterns(optarg);


More information about the p4-projects mailing list