aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-06-10 15:20:04 -0400
committerBruce Momjian <bruce@momjian.us>2012-06-10 15:20:04 -0400
commit927d61eeff78363ea3938c818d07e511ebaf75cf (patch)
tree2f0bcecf53327f76272a8ce690fa62505520fab9 /src/backend/regex/regexec.c
parent60801944fa105252b48ea5688d47dfc05c695042 (diff)
downloadpostgresql-927d61eeff78363ea3938c818d07e511ebaf75cf.tar.gz
postgresql-927d61eeff78363ea3938c818d07e511ebaf75cf.zip
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
Diffstat (limited to 'src/backend/regex/regexec.c')
-rw-r--r--src/backend/regex/regexec.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/backend/regex/regexec.c b/src/backend/regex/regexec.c
index 5d7415b3c1a..3748a9c1714 100644
--- a/src/backend/regex/regexec.c
+++ b/src/backend/regex/regexec.c
@@ -531,7 +531,7 @@ zaptreesubs(struct vars * v,
{
if (t->op == '(')
{
- int n = t->subno;
+ int n = t->subno;
assert(n > 0);
if ((size_t) n < v->nmatch)
@@ -948,7 +948,7 @@ citerdissect(struct vars * v,
}
/*
- * We need workspace to track the endpoints of each sub-match. Normally
+ * We need workspace to track the endpoints of each sub-match. Normally
* we consider only nonzero-length sub-matches, so there can be at most
* end-begin of them. However, if min is larger than that, we will also
* consider zero-length sub-matches in order to find enough matches.
@@ -977,8 +977,8 @@ citerdissect(struct vars * v,
/*
* Our strategy is to first find a set of sub-match endpoints that are
* valid according to the child node's DFA, and then recursively dissect
- * each sub-match to confirm validity. If any validity check fails,
- * backtrack the last sub-match and try again. And, when we next try for
+ * each sub-match to confirm validity. If any validity check fails,
+ * backtrack the last sub-match and try again. And, when we next try for
* a validity check, we need not recheck any successfully verified
* sub-matches that we didn't move the endpoints of. nverified remembers
* how many sub-matches are currently known okay.
@@ -1028,10 +1028,10 @@ citerdissect(struct vars * v,
}
/*
- * We've identified a way to divide the string into k sub-matches
- * that works so far as the child DFA can tell. If k is an allowed
- * number of matches, start the slow part: recurse to verify each
- * sub-match. We always have k <= max_matches, needn't check that.
+ * We've identified a way to divide the string into k sub-matches that
+ * works so far as the child DFA can tell. If k is an allowed number
+ * of matches, start the slow part: recurse to verify each sub-match.
+ * We always have k <= max_matches, needn't check that.
*/
if (k < min_matches)
goto backtrack;
@@ -1065,13 +1065,14 @@ citerdissect(struct vars * v,
/* match failed to verify, so backtrack */
backtrack:
+
/*
* Must consider shorter versions of the current sub-match. However,
* we'll only ask for a zero-length match if necessary.
*/
while (k > 0)
{
- chr *prev_end = endpts[k - 1];
+ chr *prev_end = endpts[k - 1];
if (endpts[k] > prev_end)
{
@@ -1132,7 +1133,7 @@ creviterdissect(struct vars * v,
}
/*
- * We need workspace to track the endpoints of each sub-match. Normally
+ * We need workspace to track the endpoints of each sub-match. Normally
* we consider only nonzero-length sub-matches, so there can be at most
* end-begin of them. However, if min is larger than that, we will also
* consider zero-length sub-matches in order to find enough matches.
@@ -1161,8 +1162,8 @@ creviterdissect(struct vars * v,
/*
* Our strategy is to first find a set of sub-match endpoints that are
* valid according to the child node's DFA, and then recursively dissect
- * each sub-match to confirm validity. If any validity check fails,
- * backtrack the last sub-match and try again. And, when we next try for
+ * each sub-match to confirm validity. If any validity check fails,
+ * backtrack the last sub-match and try again. And, when we next try for
* a validity check, we need not recheck any successfully verified
* sub-matches that we didn't move the endpoints of. nverified remembers
* how many sub-matches are currently known okay.
@@ -1214,10 +1215,10 @@ creviterdissect(struct vars * v,
}
/*
- * We've identified a way to divide the string into k sub-matches
- * that works so far as the child DFA can tell. If k is an allowed
- * number of matches, start the slow part: recurse to verify each
- * sub-match. We always have k <= max_matches, needn't check that.
+ * We've identified a way to divide the string into k sub-matches that
+ * works so far as the child DFA can tell. If k is an allowed number
+ * of matches, start the slow part: recurse to verify each sub-match.
+ * We always have k <= max_matches, needn't check that.
*/
if (k < min_matches)
goto backtrack;
@@ -1251,6 +1252,7 @@ creviterdissect(struct vars * v,
/* match failed to verify, so backtrack */
backtrack:
+
/*
* Must consider longer versions of the current sub-match.
*/