Commit 68af1ff4 authored by darin@apple.com's avatar darin@apple.com

- try another way of fixing dftables builds -- refactor pcre_internal.h a bit

        * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
        Later we can break it into two files.

        * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
        * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
        * pcre/dftables.pro: Take out now-unneeded include paths.
        * pcre/pcre_maketables.cpp: Use new instead of malloc.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a9d53cc3
2007-11-11 Darin Adler <darin@apple.com>
- try another way of fixing dftables builds -- refactor pcre_internal.h a bit
* pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
Later we can break it into two files.
* JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
* pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
* pcre/dftables.pro: Take out now-unneeded include paths.
* pcre/pcre_maketables.cpp: Use new instead of malloc.
2007-11-11 Darin Adler <darin@apple.com>
* pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding
......
......@@ -41,7 +41,6 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../wtf;../..;&quot;$(WebKitLibrariesDir)\include\&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
ExceptionHandling="0"
......
......@@ -39,9 +39,10 @@ POSSIBILITY OF SUCH DAMAGE.
/* This is a freestanding support program to generate a file containing default
character tables for PCRE. The tables are built according to the default C
locale. Now that pcre_maketables is a function visible to the outside world, we
make use of its code from here in order to be consistent. */
character tables. The tables are built according to the default C
locale. */
#define DFTABLES
#include <ctype.h>
#include <stdio.h>
......@@ -159,6 +160,6 @@ if (isprint(i-1)) fprintf(f, " %c ", i-1);
fprintf(f, " */\n\n/* End of chartables.c */\n");
fclose(f);
free((void *)base_of_tables);
delete []base_of_tables;
return 0;
}
......@@ -5,8 +5,6 @@ SOURCES = dftables.cpp
TARGET = dftables
DESTDIR = tmp
INCLUDEPATH += $$PWD/.. $$PWD/../wtf
gtk-port {
DEFINES += BUILDING_GTK__ BUILDING_CAIRO__
} else {
......
......@@ -44,6 +44,8 @@ functions whose names all begin with "_pcre_". */
#ifndef PCRE_INTERNAL_H
#define PCRE_INTERNAL_H
#ifndef DFTABLES
#include "Assertions.h"
#if COMPILER(MSVC)
......@@ -537,29 +539,6 @@ typedef struct compile_data {
int req_varyopt; /* "After variable item" flag for reqbyte */
} compile_data;
/* 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)
/* Layout of the UCP type table that translates property names into types and
codes. */
......@@ -597,4 +576,29 @@ extern BOOL _pcre_xclass(int, const uschar *);
#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 */
......@@ -58,7 +58,7 @@ pcre_maketables(void)
unsigned char *yield, *p;
int i;
yield = (unsigned char*)malloc(tables_length);
yield = new unsigned char[tables_length];
if (yield == NULL) return NULL;
p = yield;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment