PERFORCE change 180697 for review

Benjamin Fiedler bfiedler at FreeBSD.org
Fri Jul 9 17:58:57 UTC 2010


http://p4web.freebsd.org/@@180697?ac=10

Change 180697 by bfiedler at freebsd-7803 on 2010/07/09 17:58:31

	These options are already supported as long as the regex is compiled with flag | REG_EXTENDED

Affected files ...

.. //depot/projects/soc2010/bsdtextproc/gabor_diff/diff.c#11 edit

Differences ...

==== //depot/projects/soc2010/bsdtextproc/gabor_diff/diff.c#11 (text+ko) ====

@@ -156,27 +156,6 @@
 	{ NULL,				0,			NULL,	'\0'}
 };
 
-/* 
- * allow for grep-style regex's by substituting regex equivalent
-*/
-static struct { 
-  char *orig;
-  char *sub;
-} const grep_regex[] = {
-  { "[:alpha:]", "" },
-  { "[:upper:]", "" },
-  { "[:lower:]", "" },
-  { "[:digit:]", "" },
-  { "[:xdigit:]", "" },
-  { "[:space:]", "" },
-  { "[:punct:]", "" },
-  { "[:alnum:]", "" },
-  { "[:print:]", "" },
-  { "[:graph:]", "" },
-  { "[:cntrl:]", "" },
-  { "[:blank:]", "" },
-  { NULL, NULL },
-};
 
 
 static const char *help_msg[] = { 
@@ -439,16 +418,6 @@
 		compile_regex(&ignore_re, ignore_pats);
 	}
 	if ( fnline_pat != NULL) {
-		char *expand;
-		expand = estrdup(fnline_pat);
-		fnline_pat = expand;
-		int i;
-		for( i = 0; grep_regex[i].orig; i++)
-		{
-			fnline_pat = repstr(fnline_pat, grep_regex[i].orig, 
-					grep_regex[i].sub);
-		}
-
 		compile_regex(&fnline_re, fnline_pat);
         }
 		


More information about the p4-projects mailing list