Changeset 27689 in webkit


Ignore:
Timestamp:
Nov 11, 2007 11:24:37 AM (16 years ago)
Author:
Darin Adler
Message:
  • 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.
Location:
trunk/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r27688 r27689  
     12007-11-11  Darin Adler  <darin@apple.com>
     2
     3        - try another way of fixing dftables builds -- refactor pcre_internal.h a bit
     4
     5        * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
     6        Later we can break it into two files.
     7
     8        * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
     9        * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
     10        * pcre/dftables.pro: Take out now-unneeded include paths.
     11        * pcre/pcre_maketables.cpp: Use new instead of malloc.
     12
    1132007-11-11  Darin Adler  <darin@apple.com>
    214
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/dftables/dftables.vcproj

    r27686 r27689  
    4242                                Name="VCCLCompilerTool"
    4343                                Optimization="0"
    44                                 AdditionalIncludeDirectories="../../wtf;../..;&quot;$(WebKitLibrariesDir)\include\&quot;"
    4544                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
    4645                                MinimalRebuild="true"
  • trunk/JavaScriptCore/pcre/dftables.cpp

    r27686 r27689  
    4040
    4141/* This is a freestanding support program to generate a file containing default
    42 character tables for PCRE. The tables are built according to the default C
    43 locale. Now that pcre_maketables is a function visible to the outside world, we
    44 make use of its code from here in order to be consistent. */
     42character tables. The tables are built according to the default C
     43locale. */
     44
     45#define DFTABLES
    4546
    4647#include <ctype.h>
     
    160161
    161162fclose(f);
    162 free((void *)base_of_tables);
     163delete []base_of_tables;
    163164return 0;
    164165}
  • trunk/JavaScriptCore/pcre/dftables.pro

    r27688 r27689  
    66DESTDIR = tmp
    77
    8 INCLUDEPATH += $$PWD/.. $$PWD/../wtf
    9 
    108gtk-port {
    119  DEFINES += BUILDING_GTK__ BUILDING_CAIRO__
  • trunk/JavaScriptCore/pcre/pcre_internal.h

    r27686 r27689  
    4444#ifndef PCRE_INTERNAL_H
    4545#define PCRE_INTERNAL_H
     46
     47#ifndef DFTABLES
    4648
    4749#include "Assertions.h"
     
    538540} compile_data;
    539541
     542/* Layout of the UCP type table that translates property names into types and
     543codes. */
     544
     545typedef struct {
     546  const char *name;
     547  pcre_uint16 type;
     548  pcre_uint16 value;
     549} ucp_type_table;
     550
     551
     552/* Internal shared data tables. These are tables that are used by more than one
     553of the exported public functions. They have to be "external" in the C sense,
     554but are not part of the PCRE public API. The data for these tables is in the
     555pcre_tables.c module. */
     556
     557extern const int    _pcre_utf8_table1[];
     558extern const int    _pcre_utf8_table2[];
     559extern const int    _pcre_utf8_table3[];
     560extern const uschar _pcre_utf8_table4[];
     561
     562extern const int    _pcre_utf8_table1_size;
     563
     564extern const uschar _pcre_default_tables[];
     565
     566
     567/* Internal shared functions. These are functions that are used by more than
     568one of the exported public functions. They have to be "external" in the C
     569sense, but are not part of the PCRE public API. */
     570
     571extern int         _pcre_ord2utf8(int, uschar *);
     572extern int         _pcre_ucp_othercase(const int);
     573extern BOOL        _pcre_xclass(int, const uschar *);
     574
     575#define IS_NEWLINE(nl) ((nl) == 0xA || (nl) == 0xD || (nl) == 0x2028 || (nl) == 0x2029)
     576
     577#endif
     578
    540579/* Bit definitions for entries in the pcre_ctypes table. */
    541580
     
    561600#define tables_length (ctypes_offset + 128)
    562601
    563 /* Layout of the UCP type table that translates property names into types and
    564 codes. */
    565 
    566 typedef struct {
    567   const char *name;
    568   pcre_uint16 type;
    569   pcre_uint16 value;
    570 } ucp_type_table;
    571 
    572 
    573 /* Internal shared data tables. These are tables that are used by more than one
    574 of the exported public functions. They have to be "external" in the C sense,
    575 but are not part of the PCRE public API. The data for these tables is in the
    576 pcre_tables.c module. */
    577 
    578 extern const int    _pcre_utf8_table1[];
    579 extern const int    _pcre_utf8_table2[];
    580 extern const int    _pcre_utf8_table3[];
    581 extern const uschar _pcre_utf8_table4[];
    582 
    583 extern const int    _pcre_utf8_table1_size;
    584 
    585 extern const uschar _pcre_default_tables[];
    586 
    587 
    588 /* Internal shared functions. These are functions that are used by more than
    589 one of the exported public functions. They have to be "external" in the C
    590 sense, but are not part of the PCRE public API. */
    591 
    592 extern int         _pcre_ord2utf8(int, uschar *);
    593 extern int         _pcre_ucp_othercase(const int);
    594 extern BOOL        _pcre_xclass(int, const uschar *);
    595 
    596 #define IS_NEWLINE(nl) ((nl) == 0xA || (nl) == 0xD || (nl) == 0x2028 || (nl) == 0x2029)
    597 
    598602#endif
    599603
  • trunk/JavaScriptCore/pcre/pcre_maketables.cpp

    r27686 r27689  
    5959int i;
    6060
    61 yield = (unsigned char*)malloc(tables_length);
     61yield = new unsigned char[tables_length];
    6262
    6363if (yield == NULL) return NULL;
Note: See TracChangeset for help on using the changeset viewer.