Reviewed by Geoff.
- fix use of prefix and config.h, got rid of a few unneeded things in
the PCRE code; no behavior changes
* API/JSBase.cpp: Added include of config.h.
* API/JSCallbackConstructor.cpp: Ditto.
* API/JSCallbackFunction.cpp: Ditto.
* API/JSCallbackObject.cpp: Ditto.
* API/JSClassRef.cpp: Ditto.
* API/JSContextRef.cpp: Ditto.
* API/JSObjectRef.cpp: Ditto.
* API/JSStringRef.cpp: Ditto.
* API/JSValueRef.cpp: Ditto.
* JavaScriptCorePrefix.h: Removed obsolete <ctype.h> workaround.
Moved new/delete macros after includes, as they are in WebCore's prefix.
Removed "config.h".
* pcre/dftables.cpp: (main): Changed back to not use a separate maketables
function. This is needed for PCRE, but not helpful for our use. Also changed
the tables to all be 128 entries long instead of 256, since only the first
128 are ever used.
* pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab,
which was only being used to check hex digits. Changed all uses of TRUE and
FALSE to use the C++ true and false instead.
(check_escape): Just the TRUE/FALSE thing.
(is_counted_repeat): Ditto.
(could_be_empty_branch): Ditto.
(get_othercase_range): Ditto.
(compile_branch): Ditto.
(compile_regex): Ditto.
(is_anchored): Ditto.
(is_startline): Ditto.
(find_firstassertedchar): Ditto.
(jsRegExpCompile): Ditto.
* pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and
FALSE to use the C++ true and false instead.
(match_ref): Just the TRUE/FALSE thing.
(match): Ditto. Removed some unneeded braces.
(jsRegExpExecute): Just the TRUE/FALSE thing.
* pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top
of the file instead of the bottom, so they can be used. Also changed the table
sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE.
Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to
be a macro instead of a extern int.
* pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now.
* pcre/pcre_tables.cpp: Made table sizes explicit.
* pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/pcre/pcre_internal.h b/JavaScriptCore/pcre/pcre_internal.h
index b8d1a18..b04a440 100644
--- a/JavaScriptCore/pcre/pcre_internal.h
+++ b/JavaScriptCore/pcre/pcre_internal.h
@@ -44,6 +44,29 @@
#ifndef PCRE_INTERNAL_H
#define PCRE_INTERNAL_H
+/* Bit definitions for entries in the pcre_ctypes table. */
+
+#define ctype_space 0x01
+#define ctype_xdigit 0x08
+#define ctype_word 0x10 /* alphameric or '_' */
+
+/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
+of bits for a class map. Some classes are built by combining these tables. */
+
+#define cbit_space 0 /* \s */
+#define cbit_digit 32 /* \d */
+#define cbit_word 64 /* \w */
+#define cbit_length 96 /* Length of the cbits table */
+
+/* Offsets of the various tables from the base tables pointer, and
+total length. */
+
+#define lcc_offset 0
+#define fcc_offset 128
+#define cbits_offset 256
+#define ctypes_offset (cbits_offset + cbit_length)
+#define tables_length (ctypes_offset + 128)
+
#ifndef DFTABLES
#include "Assertions.h"
@@ -86,7 +109,6 @@
#define _pcre_default_tables kjs_pcre_default_tables
#define _pcre_ord2utf8 kjs_pcre_ord2utf8
#define _pcre_utf8_table1 kjs_pcre_utf8_table1
-#define _pcre_utf8_table1_size kjs_pcre_utf8_table1_size
#define _pcre_utf8_table2 kjs_pcre_utf8_table2
#define _pcre_utf8_table3 kjs_pcre_utf8_table3
#define _pcre_utf8_table4 kjs_pcre_utf8_table4
@@ -323,9 +345,6 @@
typedef int BOOL;
-#define FALSE 0
-#define TRUE 1
-
/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
contain UTF-8 characters with values greater than 255. */
@@ -548,21 +567,19 @@
pcre_uint16 value;
} ucp_type_table;
-
/* Internal shared data tables. These are tables that are used by more than one
of the exported public functions. They have to be "external" in the C sense,
but are not part of the PCRE public API. The data for these tables is in the
pcre_tables.c module. */
-extern const int _pcre_utf8_table1[];
-extern const int _pcre_utf8_table2[];
-extern const int _pcre_utf8_table3[];
-extern const uschar _pcre_utf8_table4[];
+#define _pcre_utf8_table1_size 6
-extern const int _pcre_utf8_table1_size;
+extern const int _pcre_utf8_table1[6];
+extern const int _pcre_utf8_table2[6];
+extern const int _pcre_utf8_table3[6];
+extern const uschar _pcre_utf8_table4[0x40];
-extern const uschar _pcre_default_tables[];
-
+extern const uschar _pcre_default_tables[tables_length];
/* Internal shared functions. These are functions that are used by more than
one of the exported public functions. They have to be "external" in the C
@@ -576,29 +593,6 @@
#endif
-/* Bit definitions for entries in the pcre_ctypes table. */
-
-#define ctype_space 0x01
-#define ctype_xdigit 0x08
-#define ctype_word 0x10 /* alphameric or '_' */
-
-/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
-of bits for a class map. Some classes are built by combining these tables. */
-
-#define cbit_space 0 /* \s */
-#define cbit_digit 32 /* \d */
-#define cbit_word 64 /* \w */
-#define cbit_length 96 /* Length of the cbits table */
-
-/* Offsets of the various tables from the base tables pointer, and
-total length. */
-
-#define lcc_offset 0
-#define fcc_offset 256
-#define cbits_offset 512
-#define ctypes_offset (cbits_offset + cbit_length)
-#define tables_length (ctypes_offset + 128)
-
#endif
/* End of pcre_internal.h */