Introduction
Introduction Statistics Contact Development Disclaimer Help
tregex: limit maximum repetitions - neatvi - [fork] simple vi-type editor with …
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit e37053452cdbb0bf04ede57a6c01c633f67d6067
parent 33a73d75110985d134adf5a5a23ac624b20148ee
Author: Ali Gholami Rudi <[email protected]>
Date: Fri, 25 Dec 2015 12:01:03 +0330
regex: limit maximum repetitions
Diffstat:
M regex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/regex.c b/regex.c
t@@ -344,7 +344,7 @@ static struct rnode *rnode_atom(char **pat)
}
if ((*pat)[0] == '+') {
rnode->mincnt = 1;
- rnode->maxcnt = -1;
+ rnode->maxcnt = NREPS;
*pat += 1;
}
if ((*pat)[0] == '{') {
t@@ -356,7 +356,7 @@ static struct rnode *rnode_atom(char **pat)
if (**pat == ',') {
(*pat)++;
if ((*pat)[0] == '}')
- rnode->maxcnt = -1;
+ rnode->maxcnt = NREPS;
while (isdigit((unsigned char) **pat))
rnode->maxcnt = rnode->maxcnt * 10 + *(*pat)++…
} else {
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.