summaryrefslogtreecommitdiffstats
path: root/generic/regcomp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-08 21:27:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-08 21:27:42 (GMT)
commit2b821c69deba46a4f4634dbbfa6b5b34b6036f9c (patch)
treedf9166fc1ba8f897b51f0ff1cc339bea9c75f8a6 /generic/regcomp.c
parent2cba0bf57340c299b9b51681a44f37d95787a47d (diff)
parenteb0e31e945c4147ee2beef42af28636e9c3c9f59 (diff)
downloadtcl-2b821c69deba46a4f4634dbbfa6b5b34b6036f9c.zip
tcl-2b821c69deba46a4f4634dbbfa6b5b34b6036f9c.tar.gz
tcl-2b821c69deba46a4f4634dbbfa6b5b34b6036f9c.tar.bz2
Make -DTCL_UTF_MAX=6-build work on win32. Add travis builds to prove it.
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r--generic/regcomp.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 58d55fb..7735d8b 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -210,7 +210,7 @@ struct vars {
int lexcon; /* lexical context type (see lex.c) */
int nsubexp; /* subexpression count */
struct subre **subs; /* subRE pointer vector */
- size_t nsubs; /* length of vector */
+ int nsubs; /* length of vector */
struct subre *sub10[10]; /* initial vector, enough for most */
struct nfa *nfa; /* the NFA */
struct colormap *cm; /* character color map */
@@ -287,8 +287,7 @@ compile(
{
AllocVars(v);
struct guts *g;
- int i;
- size_t j;
+ int i, j;
FILE *debug = (flags&REG_PROGRESS) ? stdout : NULL;
#define CNOERR() { if (ISERR()) return freev(v, v->err); }
@@ -477,10 +476,10 @@ moresubs(
int wanted) /* want enough room for this one */
{
struct subre **p;
- size_t n;
+ int n;
- assert(wanted > 0 && (size_t)wanted >= v->nsubs);
- n = (size_t)wanted * 3 / 2 + 1;
+ assert(wanted > 0 && wanted >= v->nsubs);
+ n = wanted * 3 / 2 + 1;
if (v->subs == v->sub10) {
p = (struct subre **) MALLOC(n * sizeof(struct subre *));
if (p != NULL) {
@@ -499,7 +498,7 @@ moresubs(
*p = NULL;
}
assert(v->nsubs == n);
- assert((size_t)wanted < v->nsubs);
+ assert(wanted < v->nsubs);
}
/*
@@ -954,10 +953,10 @@ parseqatom(
if (cap) {
v->nsubexp++;
subno = v->nsubexp;
- if ((size_t)subno >= v->nsubs) {
+ if (subno >= v->nsubs) {
moresubs(v, subno);
}
- assert((size_t)subno < v->nsubs);
+ assert(subno < v->nsubs);
} else {
atomtype = PLAIN; /* something that's not '(' */
}