[webkit-changes] cvs commit: JavaScriptCore/pcre pcre_compile.c pcre_exec.c pcre_internal.h pcre_tables.c

Darin darin at opensource.apple.com
Mon Aug 15 15:43:57 PDT 2005


darin       05/08/15 15:43:56

  Modified:    JavaScriptCore.xcodeproj Tag: pcre-6-1-branch
                        project.pbxproj
               pcre     Tag: pcre-6-1-branch pcre_compile.c pcre_exec.c
                        pcre_internal.h pcre_tables.c
  Log:
  Far enough along on PCRE 6.1 now that we can compile everything.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.4.3   +30 -0     JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
  
  Index: project.pbxproj
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj,v
  retrieving revision 1.5.4.2
  retrieving revision 1.5.4.3
  diff -u -r1.5.4.2 -r1.5.4.3
  --- project.pbxproj	15 Aug 2005 16:28:22 -0000	1.5.4.2
  +++ project.pbxproj	15 Aug 2005 22:43:55 -0000	1.5.4.3
  @@ -180,6 +180,16 @@
   		932FC11D0824A6A3005B3C75 /* create_hash_table in Headers */ = {isa = PBXBuildFile; fileRef = F692A8540255597D01FF60F7 /* create_hash_table */; settings = {ATTRIBUTES = (Private, ); }; };
   		935F69FE08245057003D1A45 /* dftables.c in Sources */ = {isa = PBXBuildFile; fileRef = 6541720E039E08B90058BFEB /* dftables.c */; };
   		93DE3E420868DCAB00B8897C /* grammar.y in Sources */ = {isa = PBXBuildFile; fileRef = 933A3499038AE7C6008635CE /* grammar.y */; };
  +		93E26BCA08B1511900F85226 /* pcre_ord2utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BC908B1511900F85226 /* pcre_ord2utf8.c */; };
  +		93E26BCB08B1511900F85226 /* pcre_ord2utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BC908B1511900F85226 /* pcre_ord2utf8.c */; };
  +		93E26BCE08B1512600F85226 /* pcre_ucp_findchar.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BCD08B1512600F85226 /* pcre_ucp_findchar.c */; };
  +		93E26BCF08B1512600F85226 /* pcre_ucp_findchar.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BCD08B1512600F85226 /* pcre_ucp_findchar.c */; };
  +		93E26BD108B1513800F85226 /* pcre_try_flipped.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD008B1513800F85226 /* pcre_try_flipped.c */; };
  +		93E26BD208B1513800F85226 /* pcre_try_flipped.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD008B1513800F85226 /* pcre_try_flipped.c */; };
  +		93E26BD408B1514100F85226 /* pcre_xclass.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD308B1514100F85226 /* pcre_xclass.c */; };
  +		93E26BD508B1514100F85226 /* pcre_xclass.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD308B1514100F85226 /* pcre_xclass.c */; };
  +		93E26BE608B1517100F85226 /* pcre_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E26BE508B1517100F85226 /* pcre_internal.h */; };
  +		93E26BE708B1517100F85226 /* pcre_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E26BE508B1517100F85226 /* pcre_internal.h */; };
   		A85D81F8087B2822006A9172 /* array_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A84E0255597D01FF60F7 /* array_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
   		A85D81F9087B2822006A9172 /* collector.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8530255597D01FF60F7 /* collector.h */; settings = {ATTRIBUTES = (Private, ); }; };
   		A85D81FA087B2822006A9172 /* date_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8560255597D01FF60F7 /* date_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
  @@ -497,6 +507,11 @@
   		9374D3A7038D9D74008635CE /* scope_chain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scope_chain.h; sourceTree = "<group>"; };
   		9374D3A8038D9D74008635CE /* scope_chain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scope_chain.cpp; sourceTree = "<group>"; };
   		938772E5038BFE19008635CE /* array_instance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = array_instance.h; sourceTree = "<group>"; };
  +		93E26BC908B1511900F85226 /* pcre_ord2utf8.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pcre_ord2utf8.c; path = pcre/pcre_ord2utf8.c; sourceTree = "<group>"; };
  +		93E26BCD08B1512600F85226 /* pcre_ucp_findchar.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pcre_ucp_findchar.c; path = pcre/pcre_ucp_findchar.c; sourceTree = "<group>"; };
  +		93E26BD008B1513800F85226 /* pcre_try_flipped.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pcre_try_flipped.c; path = pcre/pcre_try_flipped.c; sourceTree = "<group>"; };
  +		93E26BD308B1514100F85226 /* pcre_xclass.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pcre_xclass.c; path = pcre/pcre_xclass.c; sourceTree = "<group>"; };
  +		93E26BE508B1517100F85226 /* pcre_internal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pcre_internal.h; path = pcre/pcre_internal.h; sourceTree = "<group>"; };
   		93F1981A08245AAE001E9ABC /* keywords.table */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keywords.table; sourceTree = "<group>"; };
   		A85D8288087B2822006A9172 /* JavaScriptCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   		F50888B6030BB74C012A967E /* simple_number.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = simple_number.h; sourceTree = "<group>"; };
  @@ -788,11 +803,16 @@
   			children = (
   				65417217039E0B280058BFEB /* pcre-config.h */,
   				6541720F039E08B90058BFEB /* pcre.h */,
  +				93E26BE508B1517100F85226 /* pcre_internal.h */,
   				930754BF08B0F68000AB3056 /* pcre_compile.c */,
   				930754E908B0F78500AB3056 /* pcre_exec.c */,
   				930754E608B0F77700AB3056 /* pcre_fullinfo.c */,
   				930754D108B0F76200AB3056 /* pcre_globals.c */,
  +				93E26BC908B1511900F85226 /* pcre_ord2utf8.c */,
   				930754CE08B0F74500AB3056 /* pcre_tables.c */,
  +				93E26BD008B1513800F85226 /* pcre_try_flipped.c */,
  +				93E26BCD08B1512600F85226 /* pcre_ucp_findchar.c */,
  +				93E26BD308B1514100F85226 /* pcre_xclass.c */,
   				6541720E039E08B90058BFEB /* dftables.c */,
   			);
   			name = pcre;
  @@ -913,6 +933,7 @@
   				932F5B8F0822A1C700736975 /* fast_malloc.h in Headers */,
   				932FC11D0824A6A3005B3C75 /* create_hash_table in Headers */,
   				65621E6E089E859700760F35 /* property_slot.h in Headers */,
  +				93E26BE608B1517100F85226 /* pcre_internal.h in Headers */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  @@ -993,6 +1014,7 @@
   				A85D823E087B2822006A9172 /* fast_malloc.h in Headers */,
   				65621E70089E85D300760F35 /* property_slot.h in Headers */,
   				A85D823F087B2822006A9172 /* create_hash_table in Headers */,
  +				93E26BE708B1517100F85226 /* pcre_internal.h in Headers */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  @@ -1545,6 +1567,10 @@
   				930754D308B0F76300AB3056 /* pcre_globals.c in Sources */,
   				930754E808B0F77700AB3056 /* pcre_fullinfo.c in Sources */,
   				930754EB08B0F78500AB3056 /* pcre_exec.c in Sources */,
  +				93E26BCA08B1511900F85226 /* pcre_ord2utf8.c in Sources */,
  +				93E26BCE08B1512600F85226 /* pcre_ucp_findchar.c in Sources */,
  +				93E26BD108B1513800F85226 /* pcre_try_flipped.c in Sources */,
  +				93E26BD408B1514100F85226 /* pcre_xclass.c in Sources */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  @@ -1634,6 +1660,10 @@
   				930754D208B0F76300AB3056 /* pcre_globals.c in Sources */,
   				930754E708B0F77700AB3056 /* pcre_fullinfo.c in Sources */,
   				930754EA08B0F78500AB3056 /* pcre_exec.c in Sources */,
  +				93E26BCB08B1511900F85226 /* pcre_ord2utf8.c in Sources */,
  +				93E26BCF08B1512600F85226 /* pcre_ucp_findchar.c in Sources */,
  +				93E26BD208B1513800F85226 /* pcre_try_flipped.c in Sources */,
  +				93E26BD508B1514100F85226 /* pcre_xclass.c in Sources */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +32 -32    JavaScriptCore/pcre/Attic/pcre_compile.c
  
  Index: pcre_compile.c
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/pcre/Attic/pcre_compile.c,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- pcre_compile.c	15 Aug 2005 16:28:22 -0000	1.1.2.2
  +++ pcre_compile.c	15 Aug 2005 22:43:55 -0000	1.1.2.3
  @@ -337,7 +337,7 @@
   /* Definition to allow mutual recursion */
   
   static BOOL
  -  compile_regex(int, int, int *, uschar **, const ichar **, int *, BOOL, int,
  +  compile_regex(int, int, int *, uschar **, const pcre_uchar **, int *, BOOL, int,
       int *, int *, branch_chain *, compile_data *);
   
   
  @@ -365,10 +365,10 @@
   */
   
   static int
  -check_escape(const ichar **ptrptr, int *errorcodeptr, int bracount,
  +check_escape(const pcre_uchar **ptrptr, int *errorcodeptr, int bracount,
     int options, BOOL isclass)
   {
  -const ichar *ptr = *ptrptr;
  +const pcre_uchar *ptr = *ptrptr;
   int c, i;
   
   /* If backslash is at the end of the pattern, it's an error. */
  @@ -393,7 +393,7 @@
   
   else
     {
  -  const ichar *oldptr;
  +  const pcre_uchar *oldptr;
     switch (c)
       {
       /* A number of Perl escapes are not handled by PCRE. We give an explicit
  @@ -464,7 +464,7 @@
   #ifdef SUPPORT_UTF8
       if (ptr[1] == '{' && (options & PCRE_UTF8) != 0)
         {
  -      const ichar *pt = ptr + 2;
  +      const pcre_uchar *pt = ptr + 2;
         register int count = 0;
         c = 0;
         while ((digitab[*pt] & ctype_xdigit) != 0)
  @@ -572,10 +572,10 @@
   */
   
   static int
  -get_ucp(const ichar **ptrptr, BOOL *negptr, int *errorcodeptr)
  +get_ucp(const pcre_uchar **ptrptr, BOOL *negptr, int *errorcodeptr)
   {
   int c, i, bot, top;
  -const ichar *ptr = *ptrptr;
  +const pcre_uchar *ptr = *ptrptr;
   char name[4];
   
   c = *(++ptr);
  @@ -662,7 +662,7 @@
   */
   
   static BOOL
  -is_counted_repeat(const ichar *p)
  +is_counted_repeat(const pcre_uchar *p)
   {
   if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
   while ((digitab[*p] & ctype_digit) != 0) p++;
  @@ -698,8 +698,8 @@
                    current ptr on error, with errorcodeptr set non-zero
   */
   
  -static const ichar *
  -read_repeat_counts(const ichar *p, int *minp, int *maxp, int *errorcodeptr)
  +static const pcre_uchar *
  +read_repeat_counts(const pcre_uchar *p, int *minp, int *maxp, int *errorcodeptr)
   {
   int min = 0;
   int max = -1;
  @@ -1327,7 +1327,7 @@
   */
   
   static BOOL
  -check_posix_syntax(const ichar *ptr, const ichar **endptr, compile_data *cd)
  +check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr, compile_data *cd)
   {
   int terminator;          /* Don't combine these lines; the Solaris cc */
   terminator = *(++ptr);   /* compiler warns about "non-constant" initializer. */
  @@ -1343,7 +1343,7 @@
   
   #if PCRE_UTF16
   
  -static inline BOOL strequal(const ichar *str1, int len, const char *str2)
  +static inline BOOL strequal(const pcre_uchar *str1, int len, const char *str2)
   {
     int i;
     for (i = 0; i < len; i++)
  @@ -1375,7 +1375,7 @@
   */
   
   static int
  -check_posix_name(const ichar *ptr, int len)
  +check_posix_name(const pcre_uchar *ptr, int len)
   {
   register int yield = 0;
   while (posix_name_lengths[yield] != 0)
  @@ -1441,7 +1441,7 @@
   */
   
   static uschar *
  -auto_callout(uschar *code, const ichar *ptr, compile_data *cd)
  +auto_callout(uschar *code, const pcre_uchar *ptr, compile_data *cd)
   {
   *code++ = OP_CALLOUT;
   *code++ = 255;
  @@ -1469,7 +1469,7 @@
   */
   
   static void
  -complete_callout(uschar *previous_callout, const ichar *ptr, compile_data *cd)
  +complete_callout(uschar *previous_callout, const pcre_uchar *ptr, compile_data *cd)
   {
   int length = ptr - cd->start_pattern - GET(previous_callout, 2);
   PUT(previous_callout, 2 + LINK_SIZE, length);
  @@ -1553,7 +1553,7 @@
   
   static BOOL
   compile_branch(int *optionsptr, int *brackets, uschar **codeptr,
  -  const ichar **ptrptr, int *errorcodeptr, int *firstbyteptr,
  +  const pcre_uchar **ptrptr, int *errorcodeptr, int *firstbyteptr,
     int *reqbyteptr, branch_chain *bcptr, compile_data *cd)
   {
   int repeat_type, op_type;
  @@ -1571,8 +1571,8 @@
   uschar *tempcode;
   BOOL inescq = FALSE;
   BOOL groupsetfirstbyte = FALSE;
  -const ichar *ptr = *ptrptr;
  -const ichar *tempptr;
  +const pcre_uchar *ptr = *ptrptr;
  +const pcre_uchar *tempptr;
   uschar *previous = NULL;
   uschar *previous_callout = NULL;
   uschar classbits[32];
  @@ -2005,7 +2005,7 @@
   
           if (d == '\\')
             {
  -          const ichar *oldptr = ptr;
  +          const pcre_uchar *oldptr = ptr;
             d = check_escape(&ptr, errorcodeptr, *brackets, options, TRUE);
   
             /* \b is backslash; \X is literal X; any other special means the '-'
  @@ -2903,7 +2903,7 @@
             {
             int i, namelen;
             uschar *slot = cd->name_table;
  -          const ichar *name;      /* Don't amalgamate; some compilers */
  +          const pcre_uchar *name;      /* Don't amalgamate; some compilers */
             name = ++ptr;           /* grumble at autoincrement in declaration */
   
             while (*ptr++ != '>');
  @@ -2941,7 +2941,7 @@
             {
             int i, namelen;
             int type = *ptr++;
  -          const ichar *name = ptr;
  +          const pcre_uchar *name = ptr;
             uschar *slot = cd->name_table;
   
             while (*ptr != ')') ptr++;
  @@ -3431,10 +3431,10 @@
   
   static BOOL
   compile_regex(int options, int oldims, int *brackets, uschar **codeptr,
  -  const ichar **ptrptr, int *errorcodeptr, BOOL lookbehind, int skipbytes,
  +  const pcre_uchar **ptrptr, int *errorcodeptr, BOOL lookbehind, int skipbytes,
     int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr, compile_data *cd)
   {
  -const ichar *ptr = *ptrptr;
  +const pcre_uchar *ptr = *ptrptr;
   uschar *code = *codeptr;
   uschar *last_branch = code;
   uschar *start_bracket = code;
  @@ -3882,7 +3882,7 @@
   size_t size;
   uschar *code;
   const uschar *codestart;
  -const ichar *ptr;
  +const pcre_uchar *ptr;
   compile_data compile_block;
   int brastack[BRASTACK_SIZE];
   uschar bralenstack[BRASTACK_SIZE];
  @@ -3922,7 +3922,7 @@
   utf8 = (options & PCRE_UTF8) != 0;
   #if !PCRE_UTF16
   if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&
  -     (*erroroffset = _pcre_valid_utf8((ichar *)pattern, -1)) >= 0)
  +     (*erroroffset = _pcre_valid_utf8((pcre_uchar *)pattern, -1)) >= 0)
     {
     errorcode = ERR44;
     goto PCRE_EARLY_ERROR_RETURN;
  @@ -3970,7 +3970,7 @@
   for any counted white space if an "extended" flag setting appears late in the
   pattern. We can't be so clever for #-comments. */
   
  -ptr = (const ichar *)(pattern - 1);
  +ptr = (const pcre_uchar *)(pattern - 1);
   while ((c = *(++ptr)) != 0)
     {
     int min, max;
  @@ -4287,7 +4287,7 @@
           d = -1;
           if (ptr[1] == '-')
             {
  -          ichar const *hyptr = ptr++;
  +          pcre_uchar const *hyptr = ptr++;
             if (ptr[1] == '\\')
               {
               ptr++;
  @@ -4537,7 +4537,7 @@
           ptr += 3;
           if (*ptr == '<')
             {
  -          const ichar *p;    /* Don't amalgamate; some compilers */
  +          const pcre_uchar *p;    /* Don't amalgamate; some compilers */
             p = ++ptr;          /* grumble at autoincrement in declaration */
             while ((compile_block.ctypes[*ptr] & ctype_word) != 0) ptr++;
             if (*ptr != '>')
  @@ -4919,7 +4919,7 @@
   compile_block.name_table = (uschar *)re + re->name_table_offset;
   codestart = compile_block.name_table + re->name_entry_size * re->name_count;
   compile_block.start_code = codestart;
  -compile_block.start_pattern = (const ichar *)pattern;
  +compile_block.start_pattern = (const pcre_uchar *)pattern;
   compile_block.req_varyopt = 0;
   compile_block.nopartial = FALSE;
   
  @@ -4927,7 +4927,7 @@
   error, errorcode will be set non-zero, so we don't need to look at the result
   of the function here. */
   
  -ptr = (const ichar *)pattern;
  +ptr = (const pcre_uchar *)pattern;
   code = (uschar *)codestart;
   *code = OP_BRA;
   bracount = 0;
  @@ -4962,7 +4962,7 @@
     {
     (pcre_free)(re);
     PCRE_ERROR_RETURN:
  -  *erroroffset = ptr - (const ichar *)pattern;
  +  *erroroffset = ptr - (const pcre_uchar *)pattern;
     PCRE_EARLY_ERROR_RETURN:
     *errorptr = error_texts[errorcode];
     if (errorcodeptr != NULL) *errorcodeptr = errorcode;
  @@ -5060,7 +5060,7 @@
     {
     (pcre_free)(re);
     *errorptr = error_texts[ERR23];
  -  *erroroffset = ptr - (ichar *)pattern;
  +  *erroroffset = ptr - (pcre_uchar *)pattern;
     if (errorcodeptr != NULL) *errorcodeptr = ERR23;
     return NULL;
     }
  
  
  
  1.1.2.2   +20 -20    JavaScriptCore/pcre/Attic/pcre_exec.c
  
  Index: pcre_exec.c
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/pcre/Attic/pcre_exec.c,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- pcre_exec.c	15 Aug 2005 16:28:22 -0000	1.1.2.1
  +++ pcre_exec.c	15 Aug 2005 22:43:55 -0000	1.1.2.2
  @@ -54,7 +54,7 @@
   
   typedef struct eptrblock {
     struct eptrblock *epb_prev;
  -  const ichar *epb_saved_eptr;
  +  const pcre_uchar *epb_saved_eptr;
   } eptrblock;
   
   /* Flag bits for the match() function */
  @@ -99,7 +99,7 @@
   */
   
   static void
  -pchars(const ichar *p, int length, BOOL is_subject, match_data *md)
  +pchars(const pcre_uchar *p, int length, BOOL is_subject, match_data *md)
   {
   int c;
   if (is_subject && length > md->end_subject - p) length = md->end_subject - p;
  @@ -128,10 +128,10 @@
   */
   
   static BOOL
  -match_ref(int offset, register const ichar *eptr, int length, match_data *md,
  +match_ref(int offset, register const pcre_uchar *eptr, int length, match_data *md,
     unsigned long int ims)
   {
  -const ichar *p = md->start_subject + md->offset_vector[offset];
  +const pcre_uchar *p = md->start_subject + md->offset_vector[offset];
   
   #ifdef DEBUG
   if (eptr >= md->end_subject)
  @@ -250,7 +250,7 @@
   
     /* Function arguments that may change */
   
  -  const ichar *Xeptr;
  +  const pcre_uchar *Xeptr;
     const uschar *Xecode;
     int Xoffset_top;
     long int Xims;
  @@ -263,9 +263,9 @@
     const uschar *Xcharptr;
     const uschar *Xdata;
     const uschar *Xnext;
  -  const ichar *Xpp;
  +  const pcre_uchar *Xpp;
     const uschar *Xprev;
  -  const ichar *Xsaved_eptr;
  +  const pcre_uchar *Xsaved_eptr;
   
     recursion_info Xnew_recursive;
   
  @@ -351,7 +351,7 @@
   */
   
   static int
  -match(REGISTER const ichar *eptr, REGISTER const uschar *ecode,
  +match(REGISTER const pcre_uchar *eptr, REGISTER const uschar *ecode,
     int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb,
     int flags)
   {
  @@ -458,9 +458,9 @@
   const uschar *callpat;             /* them within each of those blocks.    */
   const uschar *data;                /* However, in order to accommodate the */
   const uschar *next;                /* version of this code that uses an    */
  -const ichar *pp;                   /* external "stack" implemented on the  */
  +const pcre_uchar *pp;                   /* external "stack" implemented on the  */
   const uschar *prev;                /* heap, it is easier to declare them   */
  -const ichar *saved_eptr;           /* all here, so the declarations can    */
  +const pcre_uchar *saved_eptr;           /* all here, so the declarations can    */
                                      /* be cut out in a block. The only      */
   recursion_info new_recursive;      /* declarations within blocks below are */
                                      /* for variables that do not have to    */
  @@ -1213,7 +1213,7 @@
           {
           if (eptr == md->start_subject) prev_is_word = FALSE; else
             {
  -          const ichar *lastptr = eptr - 1;
  +          const pcre_uchar *lastptr = eptr - 1;
             while((*lastptr & 0xc0) == 0x80) lastptr--;
             GETCHAR(c, lastptr);
             prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
  @@ -3219,9 +3219,9 @@
   match_data match_block;
   const uschar *tables;
   const uschar *start_bits = NULL;
  -const ichar *start_match = (const ichar *)subject + start_offset;
  -const ichar *end_subject;
  -const ichar *req_byte_ptr = start_match - 1;
  +const pcre_uchar *start_match = (const pcre_uchar *)subject + start_offset;
  +const pcre_uchar *end_subject;
  +const pcre_uchar *req_byte_ptr = start_match - 1;
   
   pcre_study_data internal_study;
   const pcre_study_data *study;
  @@ -3289,7 +3289,7 @@
   match_block.start_code = (const uschar *)external_re + re->name_table_offset +
     re->name_count * re->name_entry_size;
   
  -match_block.start_subject = (const ichar *)subject;
  +match_block.start_subject = (const pcre_uchar *)subject;
   match_block.start_offset = start_offset;
   match_block.end_subject = match_block.start_subject + length;
   end_subject = match_block.end_subject;
  @@ -3321,11 +3321,11 @@
   #ifdef SUPPORT_UTF8
   if (match_block.utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
     {
  -  if (_pcre_valid_utf8((ichar *)subject, length) >= 0)
  +  if (_pcre_valid_utf8((pcre_uchar *)subject, length) >= 0)
       return PCRE_ERROR_BADUTF8;
     if (start_offset > 0 && start_offset < length)
       {
  -    int tb = ((ichar *)subject)[start_offset];
  +    int tb = ((pcre_uchar *)subject)[start_offset];
       if (tb > 127)
         {
         tb &= 0xc0;
  @@ -3417,7 +3417,7 @@
   
   do
     {
  -  const ichar *save_end_subject = end_subject;
  +  const pcre_uchar *save_end_subject = end_subject;
   
     /* Reset the maximum number of extractions we might see. */
   
  @@ -3436,7 +3436,7 @@
   
     if (firstline)
       {
  -    const ichar *t = start_match;
  +    const pcre_uchar *t = start_match;
       while (t < save_end_subject && *t != '\n') t++;
       end_subject = t;
       }
  @@ -3506,7 +3506,7 @@
         end_subject - start_match < REQ_BYTE_MAX &&
         !match_block.partial)
       {
  -    register const ichar *p = start_match + ((first_byte >= 0)? 1 : 0);
  +    register const pcre_uchar *p = start_match + ((first_byte >= 0)? 1 : 0);
   
       /* We don't need to repeat the search if we haven't yet reached the
       place we found it at last time. */
  
  
  
  1.1.2.3   +11 -11    JavaScriptCore/pcre/Attic/pcre_internal.h
  
  Index: pcre_internal.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/pcre/Attic/pcre_internal.h,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- pcre_internal.h	15 Aug 2005 16:28:22 -0000	1.1.2.2
  +++ pcre_internal.h	15 Aug 2005 22:43:56 -0000	1.1.2.3
  @@ -132,11 +132,11 @@
   
   typedef unsigned char uschar;
   
  -/* Use ichar to mean "internal character" for always-unsigned version of pcre_char. */
  +/* Use pcre_uchar for always-unsigned version of pcre_char. */
   #if PCRE_UTF16
  -typedef pcre_char ichar;
  +typedef pcre_char pcre_uchar;
   #else
  -typedef unsigned char ichar;
  +typedef unsigned char pcre_uchar;
   #endif
   
   /* Include the (copy of) the public ucp header, changing the external name into
  @@ -815,7 +815,7 @@
     const uschar *cbits;          /* Points to character type table */
     const uschar *ctypes;         /* Points to table of type maps */
     const uschar *start_code;     /* The start of the compiled code */
  -  const ichar *start_pattern;   /* The start of the pattern */
  +  const pcre_uchar *start_pattern;   /* The start of the pattern */
     uschar *name_table;           /* The name/number table */
     int  names_found;             /* Number of entries so far */
     int  name_entry_size;         /* Size of each entry */
  @@ -840,7 +840,7 @@
     struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
     int group_num;                /* Number of group that was called */
     const uschar *after_call;     /* "Return value": points after the call in the expr */
  -  const ichar *save_start;     /* Old value of md->start_match */
  +  const pcre_uchar *save_start;     /* Old value of md->start_match */
     int *offset_save;             /* Pointer to start of saved offsets */
     int saved_max;                /* Number of saved offsets */
   } recursion_info;
  @@ -875,10 +875,10 @@
     BOOL   partial;               /* PARTIAL flag */
     BOOL   hitend;                /* Hit the end of the subject at some point */
     const uschar *start_code;     /* For use when recursing */
  -  const ichar *start_subject;   /* Start of the subject string */
  -  const ichar *end_subject;     /* End of the subject string */
  -  const ichar *start_match;     /* Start of this match attempt */
  -  const ichar *end_match_ptr;   /* Subject position at end match */
  +  const pcre_uchar *start_subject;   /* Start of the subject string */
  +  const pcre_uchar *end_subject;     /* End of the subject string */
  +  const pcre_uchar *start_match;     /* Start of this match attempt */
  +  const pcre_uchar *end_match_ptr;   /* Subject position at end match */
     int    end_offset_top;        /* Highwater mark at end of match */
     int    capture_last;          /* Most recent capture number */
     int    start_offset;          /* The start offset value */
  @@ -892,8 +892,8 @@
   
   typedef struct dfa_match_data {
     const uschar *start_code;     /* Start of the compiled pattern */
  -  const ichar *start_subject;   /* Start of the subject string */
  -  const ichar *end_subject;     /* End of subject string */
  +  const pcre_uchar *start_subject;   /* Start of the subject string */
  +  const pcre_uchar *end_subject;     /* End of subject string */
     const uschar *tables;         /* Character tables */
     int   moptions;               /* Match options */
     int   poptions;               /* Pattern options */
  
  
  
  1.1.2.1   +2 -0      JavaScriptCore/pcre/Attic/pcre_tables.c
  
  Index: pcre_tables.c
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/pcre/Attic/pcre_tables.c,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- pcre_tables.c	12 Aug 2005 22:13:27 -0000	1.1
  +++ pcre_tables.c	15 Aug 2005 22:43:56 -0000	1.1.2.1
  @@ -126,4 +126,6 @@
   
   const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);
   
  +#include "chartables.c"
  +
   /* End of pcre_tables.c */
  
  
  



More information about the webkit-changes mailing list