summaryrefslogtreecommitdiff
path: root/pcre_ucd.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-08-17 14:48:48 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-08-17 14:48:48 +0000
commit84fde256e93d7a4a8d15ab452c64356a7f246b86 (patch)
tree48243402bf810358528fdb3d15479a35216ab0e9 /pcre_ucd.c
parent0bd2cca21e2be39f156d5dfb07f0cfbc2ab9ae27 (diff)
downloadpcre-84fde256e93d7a4a8d15ab452c64356a7f246b86.tar.gz
Add #ifndef SUPPORT_UCP to pcre_ucd.c
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@425 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_ucd.c')
-rw-r--r--pcre_ucd.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/pcre_ucd.c b/pcre_ucd.c
index 1811f14..898c026 100644
--- a/pcre_ucd.c
+++ b/pcre_ucd.c
@@ -1,11 +1,28 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+
#include "pcre_internal.h"
/* Unicode character database. */
/* This file was autogenerated by the MultiStage2.py script. */
/* Total size: 52808 bytes, block size: 128. */
+
+/* The tables herein are needed only when UCP support is built */
+/* into PCRE. This module should not be referenced otherwise, so */
+/* it should not matter whether it is compiled or not. However */
+/* a comment was received about space saving - maybe the guy linked */
+/* all the modules rather than using a library - so we include a */
+/* condition to cut out the tables when not needed. But don't leave */
+/* a totally empty module because some compilers barf at that. */
+/* Instead, just supply small dummy tables. */
+
+#ifndef SUPPORT_UCP
+const ucd_record _pcre_ucd_records[] = {{0,0,0 }};
+const uschar _pcre_ucd_stage1[] = {0};
+const pcre_uint16 _pcre_ucd_stage2[] = {0};
+#else
+
/* When recompiling tables with a new Unicode version,
please check types in the structure definition from pcre_internal.h:
typedef struct {
@@ -14,6 +31,7 @@ uschar property_1;
pcre_int32 property_2;
} ucd_record; */
+
const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */
{ 9, 0, 0, }, /* 0 */
{ 9, 29, 0, }, /* 1 */
@@ -2607,3 +2625,4 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */
#if UCD_BLOCK_SIZE != 128
#error Please correct UCD_BLOCK_SIZE in pcre_internal.h
#endif
+#endif /* SUPPORT_UCP */