Ignore:
Timestamp:
Oct 16, 2007, 10:38:39 PM (18 years ago)
Author:
darin
Message:

Reviewed by Geoff.

  • merged PCRE changes between 6.4 and 6.5
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj: Removed pcre_config.c, pcre_globals.c, pcre_info.c, pcre_maketables.c, pcre_printint.src, pcre_refcount.c, pcre_study.c, pcre_try_flipped.c, pcre_ucp_findchar.c, pcre_version.c, and ucptable.c. Added pcre_ucp_searchfuncs.c.
  • pcre/AUTHORS:
  • pcre/LICENCE:
  • pcre/MERGING:
  • pcre/dftables.c:
  • pcre/pcre-config.h:
  • pcre/pcre.h:
  • pcre/pcre.pri:
  • pcre/pcre_compile.c:
  • pcre/pcre_exec.c:
  • pcre/pcre_fullinfo.c:
  • pcre/pcre_get.c:
  • pcre/pcre_internal.h:
  • pcre/pcre_maketables.c:
  • pcre/pcre_ord2utf8.c:
  • pcre/pcre_tables.c:
  • pcre/pcre_ucp_searchfuncs.c: Copied from pcre/pcre_ucp_findchar.c.
  • pcre/pcre_xclass.c:
  • pcre/ucp.h:
  • pcre/ucpinternal.h:
  • pcre/ucptable.c: Updated with new versions from the PCRE 6.5 release, merged with changes.
  • pcre/pcre_config.c: Removed.
  • pcre/pcre_globals.c: Removed.
  • pcre/pcre_info.c: Removed.
  • pcre/pcre_printint.src: Removed.
  • pcre/pcre_refcount.c: Removed.
  • pcre/pcre_study.c: Removed.
  • pcre/pcre_try_flipped.c: Removed.
  • pcre/pcre_ucp_findchar.c: Removed.
  • pcre/pcre_version.c: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_maketables.c

    r11962 r26697  
    77
    88                       Written by Philip Hazel
    9            Copyright (c) 1997-2005 University of Cambridge
     9           Copyright (c) 1997-2006 University of Cambridge
    1010
    1111-----------------------------------------------------------------------------
     
    8787for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);
    8888
    89 /* Then the character class tables. Don't try to be clever and save effort
    90 on exclusive ones - in some locales things may be different. Note that the
    91 table for "space" includes everything "isspace" gives, including VT in the
    92 default locale. This makes it work for the POSIX class [:space:]. */
     89/* Then the character class tables. Don't try to be clever and save effort on
     90exclusive ones - in some locales things may be different. Note that the table
     91for "space" includes everything "isspace" gives, including VT in the default
     92locale. This makes it work for the POSIX class [:space:]. Note also that it is
     93possible for a character to be alnum or alpha without being lower or upper,
     94such as "male and female ordinals" (\xAA and \xBA) in the fr_FR locale (at
     95least under Debian Linux's locales as of 12/2005). So we must test for alnum
     96specially. */
    9397
    9498memset(p, 0, cbit_length);
    9599for (i = 0; i < 256; i++)
    96100  {
    97   if (isdigit(i))
    98     {
    99     p[cbit_digit  + i/8] |= 1 << (i&7);
    100     p[cbit_word   + i/8] |= 1 << (i&7);
    101     }
    102   if (isupper(i))
    103     {
    104     p[cbit_upper  + i/8] |= 1 << (i&7);
    105     p[cbit_word   + i/8] |= 1 << (i&7);
    106     }
    107   if (islower(i))
    108     {
    109     p[cbit_lower  + i/8] |= 1 << (i&7);
    110     p[cbit_word   + i/8] |= 1 << (i&7);
    111     }
     101  if (isdigit(i)) p[cbit_digit  + i/8] |= 1 << (i&7);
     102  if (isupper(i)) p[cbit_upper  + i/8] |= 1 << (i&7);
     103  if (islower(i)) p[cbit_lower  + i/8] |= 1 << (i&7);
     104  if (isalnum(i)) p[cbit_word   + i/8] |= 1 << (i&7);
    112105  if (i == '_')   p[cbit_word   + i/8] |= 1 << (i&7);
    113106  if (isspace(i)) p[cbit_space  + i/8] |= 1 << (i&7);
     
    123116space chars, because Perl doesn't recognize it as such for \s and for comments
    124117within regexes. */
    125 /* But no, in JavaScriptCore we don't, so that's commented out below. */
    126118
    127119for (i = 0; i < 256; i++)
    128120  {
    129121  int x = 0;
    130   if (/*i != 0x0b && */ isspace(i)) x += ctype_space;
     122  if (
     123#if !JAVASCRIPT
     124      *i != 0x0b &&
     125#endif
     126        isspace(i)) x += ctype_space;
    131127  if (isalpha(i)) x += ctype_letter;
    132128  if (isdigit(i)) x += ctype_digit;
Note: See TracChangeset for help on using the changeset viewer.