diff options
author | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:39:50 +0000 |
---|---|---|
committer | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:39:50 +0000 |
commit | a9e8c332d367f8ddb17b80729591617196829bb0 (patch) | |
tree | 1bce52c8cf2daaecdcb5bdcfcea21495e542b9cb | |
parent | 6ca5586c64bb2438fabb30a650d96bbe6f464ac9 (diff) | |
download | pcre-a9e8c332d367f8ddb17b80729591617196829bb0.tar.gz |
Load pcre-3.7 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@57 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | pcretest.c | 47 | ||||
-rw-r--r-- | testdata/testoutput1 | 2 | ||||
-rw-r--r-- | testdata/testoutput2 | 2 | ||||
-rw-r--r-- | testdata/testoutput3 | 2 | ||||
-rw-r--r-- | testdata/testoutput4 | 2 | ||||
-rw-r--r-- | testdata/testoutput5 | 2 | ||||
-rw-r--r-- | testdata/testoutput6 | 2 |
11 files changed, 45 insertions, 40 deletions
@@ -1,6 +1,14 @@ ChangeLog for PCRE ------------------ +Version 3.7 29-Oct-01 +--------------------- + +1. In updating pcretest to check change 1 of version 3.6, I screwed up. +This caused pcretest, when used on the test data, to segfault. Unfortunately, +this didn't happen under Solaris 8, where I normally test things. + + Version 3.6 23-Oct-01 --------------------- diff --git a/Makefile.in b/Makefile.in index be17a08..b5348ea 100644 --- a/Makefile.in +++ b/Makefile.in @@ -130,8 +130,8 @@ pcregrep.o: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h # An auxiliary program makes the default character table source -chartables.c: dftables - ./dftables >chartables.c +$(top_srcdir)/chartables.c: dftables + ./dftables >$(top_srcdir)/chartables.c dftables: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ $(top_srcdir)/internal.h pcre.h config.h Makefile @@ -738,6 +738,12 @@ if test "$ac_init_help" = "long"; then # The list generated by autoconf has been trimmed to remove many # options that are totally irrelevant to PCRE (e.g. relating to X), # or are not supported by its Makefile. + # The list generated by autoconf has been trimmed to remove many + # options that are totally irrelevant to PCRE (e.g. relating to X), + # or are not supported by its Makefile. + # The list generated by autoconf has been trimmed to remove many + # options that are totally irrelevant to PCRE (e.g. relating to X), + # or are not supported by its Makefile. # This message is too long to be a string in the A/UX 3.1 sh. cat <<EOF \`configure' configures this package to adapt to many kinds of systems. @@ -1091,8 +1097,8 @@ rm -f conftest.sh ac_config_headers="$ac_config_headers config.h:config.in" PCRE_MAJOR=3 -PCRE_MINOR=6 -PCRE_DATE=23-Oct-2001 +PCRE_MINOR=7 +PCRE_DATE=29-Oct-2001 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} PCRE_LIB_VERSION=0:1:0 diff --git a/configure.in b/configure.in index 516f2c1..3d2deee 100644 --- a/configure.in +++ b/configure.in @@ -17,8 +17,8 @@ dnl digits for minor numbers less than 10. There are unlikely to be dnl that many releases anyway. PCRE_MAJOR=3 -PCRE_MINOR=6 -PCRE_DATE=23-Oct-2001 +PCRE_MINOR=7 +PCRE_DATE=29-Oct-2001 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} dnl Provide versioning information for libtool shared libraries that @@ -893,6 +893,7 @@ while (!done) { unsigned char *q; unsigned char *bptr = dbuffer; + int *use_offsets = offsets; int use_size_offsets = size_offsets; int count, c; int copystrings = 0; @@ -1010,12 +1011,9 @@ while (!done) while(isdigit(*p)) n = n * 10 + *p++ - '0'; if (n > size_offsets_max) { - -if (offsets != NULL) - - free(offsets); size_offsets_max = n; - offsets = malloc(size_offsets_max * sizeof(int)); + free(offsets); + use_offsets = offsets = malloc(size_offsets_max * sizeof(int)); if (offsets == NULL) { printf("** Failed to get %d bytes of memory for offsets vector\n", @@ -1024,14 +1022,7 @@ if (offsets != NULL) } } use_size_offsets = n; - -if (n == 0) - { - free(offsets); - offsets = NULL; - size_offsets_max = 0; - } - + if (n == 0) use_offsets = NULL; continue; case 'Z': @@ -1099,7 +1090,7 @@ if (n == 0) clock_t start_time = clock(); for (i = 0; i < LOOPREPEAT; i++) count = pcre_exec(re, extra, (char *)bptr, len, - start_offset, options | g_notempty, offsets, use_size_offsets); + start_offset, options | g_notempty, use_offsets, use_size_offsets); time_taken = clock() - start_time; fprintf(outfile, "Execute time %.3f milliseconds\n", ((double)time_taken * 1000.0)/ @@ -1107,7 +1098,7 @@ if (n == 0) } count = pcre_exec(re, extra, (char *)bptr, len, - start_offset, options | g_notempty, offsets, use_size_offsets); + start_offset, options | g_notempty, use_offsets, use_size_offsets); if (count == 0) { @@ -1122,19 +1113,19 @@ if (n == 0) int i; for (i = 0; i < count * 2; i += 2) { - if (offsets[i] < 0) + if (use_offsets[i] < 0) fprintf(outfile, "%2d: <unset>\n", i/2); else { fprintf(outfile, "%2d: ", i/2); - pchars(bptr + offsets[i], offsets[i+1] - offsets[i], utf8); + pchars(bptr + use_offsets[i], use_offsets[i+1] - use_offsets[i], utf8); fprintf(outfile, "\n"); if (i == 0) { if (do_showrest) { fprintf(outfile, " 0+ "); - pchars(bptr + offsets[i+1], len - offsets[i+1], utf8); + pchars(bptr + use_offsets[i+1], len - use_offsets[i+1], utf8); fprintf(outfile, "\n"); } } @@ -1146,7 +1137,7 @@ if (n == 0) if ((copystrings & (1 << i)) != 0) { char copybuffer[16]; - int rc = pcre_copy_substring((char *)bptr, offsets, count, + int rc = pcre_copy_substring((char *)bptr, use_offsets, count, i, copybuffer, sizeof(copybuffer)); if (rc < 0) fprintf(outfile, "copy substring %d failed %d\n", i, rc); @@ -1160,7 +1151,7 @@ if (n == 0) if ((getstrings & (1 << i)) != 0) { const char *substring; - int rc = pcre_get_substring((char *)bptr, offsets, count, + int rc = pcre_get_substring((char *)bptr, use_offsets, count, i, &substring); if (rc < 0) fprintf(outfile, "get substring %d failed %d\n", i, rc); @@ -1176,7 +1167,7 @@ if (n == 0) if (getlist) { const char **stringlist; - int rc = pcre_get_substring_list((char *)bptr, offsets, count, + int rc = pcre_get_substring_list((char *)bptr, use_offsets, count, &stringlist); if (rc < 0) fprintf(outfile, "get substring list failed %d\n", rc); @@ -1202,8 +1193,8 @@ if (n == 0) { if (g_notempty != 0) { - offsets[0] = start_offset; - offsets[1] = start_offset + 1; + use_offsets[0] = start_offset; + use_offsets[1] = start_offset + 1; } else { @@ -1228,22 +1219,22 @@ if (n == 0) character. */ g_notempty = 0; - if (offsets[0] == offsets[1]) + if (use_offsets[0] == use_offsets[1]) { - if (offsets[0] == len) break; + if (use_offsets[0] == len) break; g_notempty = PCRE_NOTEMPTY | PCRE_ANCHORED; } /* For /g, update the start offset, leaving the rest alone */ - if (do_g) start_offset = offsets[1]; + if (do_g) start_offset = use_offsets[1]; /* For /G, update the pointer and length */ else { - bptr += offsets[1]; - len -= offsets[1]; + bptr += use_offsets[1]; + len -= use_offsets[1]; } } /* End of loop for /g and /G */ } /* End of loop for data lines */ diff --git a/testdata/testoutput1 b/testdata/testoutput1 index 799e21d..41a5346 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /the quick brown fox/ the quick brown fox diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 6c223cf..91236df 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /(a)b|/ Capturing subpattern count = 1 diff --git a/testdata/testoutput3 b/testdata/testoutput3 index a88f291..54b146b 100644 --- a/testdata/testoutput3 +++ b/testdata/testoutput3 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /(?<!bar)foo/ foo diff --git a/testdata/testoutput4 b/testdata/testoutput4 index 0e5701c..6ee711d 100644 --- a/testdata/testoutput4 +++ b/testdata/testoutput4 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /^[\w]+/ *** Failers diff --git a/testdata/testoutput5 b/testdata/testoutput5 index c0ea92d..39bc1f1 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /-- Because of problems with Perl 5.6 in handling UTF-8 vs non UTF-8 --/ /-- strings automatically, do not use the \x{} construct except with --/ diff --git a/testdata/testoutput6 b/testdata/testoutput6 index 10d02fd..e00d2b7 100644 --- a/testdata/testoutput6 +++ b/testdata/testoutput6 @@ -1,4 +1,4 @@ -PCRE version 3.6 23-Oct-2001 +PCRE version 3.7 29-Oct-2001 /\x{100}/8DM Memory allocation (code space): 11 |