[GRASS-SVN] r62402 - grass/branches/releasebranch_7_0/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 26 18:35:14 PDT 2014
Author: hcho
Date: 2014-10-26 18:35:14 -0700 (Sun, 26 Oct 2014)
New Revision: 62402
Modified:
grass/branches/releasebranch_7_0/lib/gis/ls_filter.c
Log:
wc2regex: Backport r62399 and r62400
Modified: grass/branches/releasebranch_7_0/lib/gis/ls_filter.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/ls_filter.c 2014-10-27 01:33:49 UTC (rev 62401)
+++ grass/branches/releasebranch_7_0/lib/gis/ls_filter.c 2014-10-27 01:35:14 UTC (rev 62402)
@@ -84,6 +84,11 @@
for (p = pat; p && *p; p++) {
switch (*p) {
case '\\':
+ add(buf, '\\');
+ if (!*++p)
+ return 0;
+ add(buf, *p);
+ break;
case '.':
case '|':
case '(':
@@ -100,15 +105,13 @@
add(buf, '.');
break;
case '{':
- if (in_brace)
- return 0;
- in_brace = 1;
+ in_brace++;
add(buf, '(');
break;
case '}':
if (!in_brace)
return 0;
- in_brace = 0;
+ in_brace--;
add(buf, ')');
break;
case ',':
@@ -118,7 +121,8 @@
add(buf, ',');
break;
case '[':
- p = do_set(buf, p);
+ if (!(p = do_set(buf, p)))
+ return 0;
break;
default:
add(buf, *p);
More information about the grass-commit
mailing list