summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:38:13 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:38:13 +0000
commit91453b91d322e9d5812026584c2ecbe8f4cab52a (patch)
treeb87e19c06fa0a5304d6b611bb5999b4fadaac77d /pcretest.c
parent94ffc03e8ac1628911f231a91d7d8d94c2f0dc38 (diff)
downloadpcre-91453b91d322e9d5812026584c2ecbe8f4cab52a.tar.gz
Load pcre-1.03 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@9 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/pcretest.c b/pcretest.c
index 64ec216..5d5eec5 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -157,7 +157,8 @@ for(;;)
case OP_REF:
printf(" \\%d", *(++code));
- break;
+ code++;
+ goto CLASS_REF_REPEAT;
case OP_CLASS:
{
@@ -187,6 +188,8 @@ for(;;)
printf("]");
code += 32;
+ CLASS_REF_REPEAT:
+
switch(*code)
{
case OP_CRSTAR:
@@ -581,7 +584,7 @@ for (;;)
for (;;)
{
- unsigned char *pp;
+ unsigned char *q;
int count, c;
int offsets[30];
int size_offsets = sizeof(offsets)/sizeof(int);
@@ -600,7 +603,7 @@ for (;;)
p = buffer;
while (isspace(*p)) p++;
- pp = dbuffer;
+ q = dbuffer;
while ((c = *p++) != 0)
{
int i = 0;
@@ -662,17 +665,17 @@ for (;;)
case 'O':
while(isdigit(*p)) n = n * 10 + *p++ - '0';
- if (n <= (int)sizeof(offsets)/sizeof(int)) size_offsets = n;
+ if (n <= (int)(sizeof(offsets)/sizeof(int))) size_offsets = n;
continue;
case 'Z':
options |= PCRE_NOTEOL;
continue;
}
- *pp++ = c;
+ *q++ = c;
}
- *pp = 0;
- len = pp - dbuffer;
+ *q = 0;
+ len = q - dbuffer;
/* Handle matching via the POSIX interface, which does not
support timing. */