summaryrefslogtreecommitdiff
path: root/maint
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-25 16:27:58 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-25 16:27:58 +0000
commit4ae7d6630c0ef594c40cd99e2edce450077a2a87 (patch)
treeefcca2fb9b988a34cda732381965fbb31c54048e /maint
parent05d03818ae1cf4196b9316714f0fd199dfb1b1e2 (diff)
downloadpcre-4ae7d6630c0ef594c40cd99e2edce450077a2a87.tar.gz
All the remaining changes for handling characters with more than one other
case. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1046 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'maint')
-rwxr-xr-xmaint/MultiStage2.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/maint/MultiStage2.py b/maint/MultiStage2.py
index 79f1f66..1c5fce7 100755
--- a/maint/MultiStage2.py
+++ b/maint/MultiStage2.py
@@ -404,12 +404,26 @@ for block_size in [2 ** i for i in range(5,10)]:
min_stage1, min_stage2 = stage1, stage2
min_block_size = block_size
+print "/* This module is generated by the maint/MultiStage2.py script."
+print "Do not modify it by hand. Instead modify the script and run it"
+print "to regenerate this code."
+print
+print "As well as being part of the PCRE library, this module is #included"
+print "by the pcretest program, which redefines the PRIV macro to change"
+print "table names from _pcre_xxx to xxxx, thereby avoiding name clashes"
+print "with the library. At present, just one of these tables is actually"
+print "needed. */"
+print
+print "#ifndef PCRE_INCLUDED"
+print
print "#ifdef HAVE_CONFIG_H"
print "#include \"config.h\""
print "#endif"
print
print "#include \"pcre_internal.h\""
print
+print "#endif /* PCRE_INCLUDED */"
+print
print "/* Unicode character database. */"
print "/* This file was autogenerated by the MultiStage2.py script. */"
print "/* Total size: %d bytes, block size: %d. */" % (min_size, min_block_size)
@@ -424,7 +438,7 @@ print "a totally empty module because some compilers barf at that."
print "Instead, just supply small dummy tables. */"
print
print "#ifndef SUPPORT_UCP"
-print "const ucd_record PRIV(ucd_records)[] = {{0,0,0,0 }};"
+print "const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0 }};"
print "const pcre_uint8 PRIV(ucd_stage1)[] = {0};"
print "const pcre_uint16 PRIV(ucd_stage2)[] = {0};"
print "const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0};"
@@ -446,6 +460,10 @@ print
# ------
+print "/* When #included in pcretest, we don't need this large table. */"
+print
+print "#ifndef PCRE_INCLUDED"
+print
print_records(records, record_size)
print_table(min_stage1, 'PRIV(ucd_stage1)')
print_table(min_stage2, 'PRIV(ucd_stage2)', min_block_size)
@@ -453,6 +471,8 @@ print "#if UCD_BLOCK_SIZE != %d" % min_block_size
print "#error Please correct UCD_BLOCK_SIZE in pcre_internal.h"
print "#endif"
print "#endif /* SUPPORT_UCP */"
+print
+print "#endif /* PCRE_INCLUDED */"
"""