From 5af1a2631ebd51c7dba340b27cb1ae6b640a4056 Mon Sep 17 00:00:00 2001 From: chpe Date: Tue, 16 Oct 2012 15:56:30 +0000 Subject: pcre32: pcretest: Add missing pcre32 checks git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1101 2f5784b3-3f2a-0410-8824-cb99058d5e15 --- pcretest.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'pcretest.c') diff --git a/pcretest.c b/pcretest.c index a4a58b6..98f2d3e 100644 --- a/pcretest.c +++ b/pcretest.c @@ -4873,14 +4873,24 @@ while (!done) int rc; char copybuffer[256]; +#ifdef SUPPORT_PCRE32 + if (pcre_mode == PCRE32_MODE) + { + if (*(pcre_uint32 *)cnptr == 0) break; + } +#endif +#ifdef SUPPORT_PCRE16 if (pcre_mode == PCRE16_MODE) { if (*(pcre_uint16 *)cnptr == 0) break; } - else +#endif +#ifdef SUPPORT_PCRE8 + if (pcre_mode == PCRE8_MODE) { if (*(pcre_uint8 *)cnptr == 0) break; } +#endif PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count, cnptr, copybuffer, sizeof(copybuffer)); @@ -4928,14 +4938,24 @@ while (!done) int rc; const char *substring; +#ifdef SUPPORT_PCRE32 + if (pcre_mode == PCRE32_MODE) + { + if (*(pcre_uint32 *)gnptr == 0) break; + } +#endif +#ifdef SUPPORT_PCRE16 if (pcre_mode == PCRE16_MODE) { if (*(pcre_uint16 *)gnptr == 0) break; } - else +#endif +#ifdef SUPPORT_PCRE8 + if (pcre_mode == PCRE8_MODE) { if (*(pcre_uint8 *)gnptr == 0) break; } +#endif PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count, gnptr, &substring); -- cgit v1.2.1