/[pcre]/code/trunk/pcretest.c
ViewVC logotype

Diff of /code/trunk/pcretest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1087 by chpe, Tue Oct 16 15:55:38 2012 UTC revision 1118 by chpe, Tue Oct 16 15:57:31 2012 UTC
# Line 399  argument, the casting might be incorrect Line 399  argument, the casting might be incorrect
399  #ifdef SUPPORT_PCRE32  #ifdef SUPPORT_PCRE32
400    
401  #define PCHARS32(lv, p, offset, len, f) \  #define PCHARS32(lv, p, offset, len, f) \
402    lv = pchars32((PCRE_SPTR32)(p) + offset, len, f)    lv = pchars32((PCRE_SPTR32)(p) + offset, len, use_utf, f)
403    
404  #define PCHARSV32(p, offset, len, f) \  #define PCHARSV32(p, offset, len, f)                \
405    (void)pchars32((PCRE_SPTR32)(p) + offset, len, f)    (void)pchars32((PCRE_SPTR32)(p) + offset, len, use_utf, f)
406    
407  #define READ_CAPTURE_NAME32(p, cn8, cn16, cn32, re) \  #define READ_CAPTURE_NAME32(p, cn8, cn16, cn32, re) \
408    p = read_capture_name32(p, cn32, re)    p = read_capture_name32(p, cn32, re)
# Line 831  static const unsigned char *last_callout Line 831  static const unsigned char *last_callout
831    
832  static int buffer_size = 50000;  static int buffer_size = 50000;
833  static pcre_uint8 *buffer = NULL;  static pcre_uint8 *buffer = NULL;
 static pcre_uint8 *dbuffer = NULL;  
834  static pcre_uint8 *pbuffer = NULL;  static pcre_uint8 *pbuffer = NULL;
835    
836  /* Another buffer is needed translation to 16/32-bit character strings. It will  /* Another buffer is needed translation to 16/32-bit character strings. It will
# Line 1590  else Line 1589  else
1589  *pp = 0;  *pp = 0;
1590  return pp - buffer32;  return pp - buffer32;
1591  }  }
1592    
1593    /* Check that a 32-bit character string is valid UTF-32.
1594    
1595    Arguments:
1596      string       points to the string
1597      length       length of string, or -1 if the string is zero-terminated
1598    
1599    Returns:       TRUE  if the string is a valid UTF-32 string
1600                   FALSE otherwise
1601    */
1602    
1603    #ifdef SUPPORT_UTF
1604    static BOOL
1605    valid_utf32(pcre_uint32 *string, int length)
1606    {
1607    register pcre_uint32 *p;
1608    register pcre_uint32 c;
1609    
1610    for (p = string; length-- > 0; p++)
1611      {
1612      c = *p;
1613    
1614      if (c > 0x10ffffu)
1615        return FALSE;
1616    
1617      /* A surrogate */
1618      if ((c & 0xfffff800u) == 0xd800u)
1619        return FALSE;
1620    
1621      /* Non-character */
1622      if ((c & 0xfffeu) == 0xfffeu ||
1623          c >= 0xfdd0u && c <= 0xfdefu)
1624        return FALSE;
1625      }
1626    
1627    return TRUE;
1628    }
1629    #endif /* SUPPORT_UTF */
1630    
1631  #endif  #endif
1632    
1633  /*************************************************  /*************************************************
# Line 1666  for (;;) Line 1704  for (;;)
1704      {      {
1705      int new_buffer_size = 2*buffer_size;      int new_buffer_size = 2*buffer_size;
1706      pcre_uint8 *new_buffer = (pcre_uint8 *)malloc(new_buffer_size);      pcre_uint8 *new_buffer = (pcre_uint8 *)malloc(new_buffer_size);
     pcre_uint8 *new_dbuffer = (pcre_uint8 *)malloc(new_buffer_size);  
1707      pcre_uint8 *new_pbuffer = (pcre_uint8 *)malloc(new_buffer_size);      pcre_uint8 *new_pbuffer = (pcre_uint8 *)malloc(new_buffer_size);
1708    
1709      if (new_buffer == NULL || new_dbuffer == NULL || new_pbuffer == NULL)      if (new_buffer == NULL || new_pbuffer == NULL)
1710        {        {
1711        fprintf(stderr, "pcretest: malloc(%d) failed\n", new_buffer_size);        fprintf(stderr, "pcretest: malloc(%d) failed\n", new_buffer_size);
1712        exit(1);        exit(1);
# Line 1684  for (;;) Line 1721  for (;;)
1721      here = new_buffer + (here - buffer);      here = new_buffer + (here - buffer);
1722    
1723      free(buffer);      free(buffer);
     free(dbuffer);  
1724      free(pbuffer);      free(pbuffer);
1725    
1726      buffer = new_buffer;      buffer = new_buffer;
     dbuffer = new_dbuffer;  
1727      pbuffer = new_pbuffer;      pbuffer = new_pbuffer;
1728      }      }
1729    }    }
# Line 1878  return yield; Line 1913  return yield;
1913  /* Must handle UTF-32 strings in utf mode. Yields number of characters printed.  /* Must handle UTF-32 strings in utf mode. Yields number of characters printed.
1914  If handed a NULL file, just counts chars without printing. */  If handed a NULL file, just counts chars without printing. */
1915    
1916  static int pchars32(PCRE_SPTR32 p, int length, FILE *f)  #define UTF32_MASK (0x1fffffu)
1917    
1918    static int pchars32(PCRE_SPTR32 p, int length, BOOL utf, FILE *f)
1919  {  {
1920  int yield = 0;  int yield = 0;
1921    
# Line 1887  if (length < 0) Line 1924  if (length < 0)
1924    
1925  while (length-- > 0)  while (length-- > 0)
1926    {    {
1927    pcre_uint32 c = *p++;    pcre_uint32 c = *p++;
1928      if (utf) c &= UTF32_MASK;
1929    yield += pchar(c, f);    yield += pchar(c, f);
1930    }    }
1931    
# Line 2718  int done = 0; Line 2756  int done = 0;
2756  int all_use_dfa = 0;  int all_use_dfa = 0;
2757  int verify_jit = 0;  int verify_jit = 0;
2758  int yield = 0;  int yield = 0;
2759    int mask_utf32 = 0;
2760  int stack_size;  int stack_size;
2761    pcre_uint8 *dbuffer = NULL;
2762    size_t dbuffer_size = 1u << 14;
2763    
2764  #if !defined NOPOSIX  #if !defined NOPOSIX
2765  int posix = 0;  int posix = 0;
# Line 2762  debugging. They grow automatically when Line 2803  debugging. They grow automatically when
2803  and 32-bit buffers (buffer16, buffer32) are obtained only if needed. */  and 32-bit buffers (buffer16, buffer32) are obtained only if needed. */
2804    
2805  buffer = (pcre_uint8 *)malloc(buffer_size);  buffer = (pcre_uint8 *)malloc(buffer_size);
 dbuffer = (pcre_uint8 *)malloc(buffer_size);  
2806  pbuffer = (pcre_uint8 *)malloc(buffer_size);  pbuffer = (pcre_uint8 *)malloc(buffer_size);
2807    
2808  /* The outfile variable is static so that new_malloc can use it. */  /* The outfile variable is static so that new_malloc can use it. */
# Line 2810  while (argc > 1 && argv[op][0] == '-') Line 2850  while (argc > 1 && argv[op][0] == '-')
2850        force_study_options = jit_study_bits[*arg - '1'];        force_study_options = jit_study_bits[*arg - '1'];
2851      else goto BAD_ARG;      else goto BAD_ARG;
2852      }      }
2853      else if (strcmp(arg, "-8") == 0)
2854        {
2855    #ifdef SUPPORT_PCRE8
2856        pcre_mode = PCRE8_MODE;
2857    #else
2858        printf("** This version of PCRE was built without 8-bit support\n");
2859        exit(1);
2860    #endif
2861        }
2862    else if (strcmp(arg, "-16") == 0)    else if (strcmp(arg, "-16") == 0)
2863      {      {
2864  #ifdef SUPPORT_PCRE16  #ifdef SUPPORT_PCRE16
# Line 2819  while (argc > 1 && argv[op][0] == '-') Line 2868  while (argc > 1 && argv[op][0] == '-')
2868      exit(1);      exit(1);
2869  #endif  #endif
2870      }      }
2871    else if (strcmp(arg, "-32") == 0)    else if (strcmp(arg, "-32") == 0 || strcmp(arg, "-32+") == 0)
2872      {      {
2873  #ifdef SUPPORT_PCRE32  #ifdef SUPPORT_PCRE32
2874      pcre_mode = PCRE32_MODE;      pcre_mode = PCRE32_MODE;
2875        mask_utf32 = (strcmp(arg, "-32+") == 0);
2876  #else  #else
2877      printf("** This version of PCRE was built without 32-bit support\n");      printf("** This version of PCRE was built without 32-bit support\n");
2878      exit(1);      exit(1);
# Line 3766  while (!done) Line 3816  while (!done)
3816        if (new_info(re, NULL, PCRE_INFO_SIZE, &size) +        if (new_info(re, NULL, PCRE_INFO_SIZE, &size) +
3817            new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +            new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +
3818            new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +            new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +
3819            new_info(re, NULL, PCRE_INFO_FIRSTLITERAL, &first_char) +            new_info(re, NULL, PCRE_INFO_FIRSTCHARACTER, &first_char) +
3820            new_info(re, NULL, PCRE_INFO_FIRSTLITERALSET, &first_char_set) +            new_info(re, NULL, PCRE_INFO_FIRSTCHARACTERFLAGS, &first_char_set) +
3821            new_info(re, NULL, PCRE_INFO_LASTLITERAL2, &need_char) +            new_info(re, NULL, PCRE_INFO_REQUIREDCHAR, &need_char) +
3822            new_info(re, NULL, PCRE_INFO_LASTLITERAL2SET, &need_char_set) +            new_info(re, NULL, PCRE_INFO_REQUIREDCHARFLAGS, &need_char_set) +
3823            new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +            new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +
3824            new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +            new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +
3825            new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +            new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +
# Line 4060  while (!done) Line 4110  while (!done)
4110    
4111    for (;;)    for (;;)
4112      {      {
4113      pcre_uint8 *q;  #ifdef SUPPORT_PCRE8
4114        pcre_uint8 *q8;
4115    #endif
4116    #ifdef SUPPORT_PCRE16
4117        pcre_uint16 *q16;
4118    #endif
4119    #ifdef SUPPORT_PCRE32
4120        pcre_uint32 *q32;
4121    #endif
4122      pcre_uint8 *bptr;      pcre_uint8 *bptr;
4123      int *use_offsets = offsets;      int *use_offsets = offsets;
4124      int use_size_offsets = size_offsets;      int use_size_offsets = size_offsets;
# Line 4132  while (!done) Line 4190  while (!done)
4190      p = buffer;      p = buffer;
4191      while (isspace(*p)) p++;      while (isspace(*p)) p++;
4192    
4193      bptr = q = dbuffer;  #ifndef NOUTF
4194        /* Check that the data is well-formed UTF-8 if we're in UTF mode. To create
4195           invalid input to pcre_exec, you must use \x?? or \x{} sequences. */
4196        if (use_utf)
4197          {
4198          char *q;
4199          pcre_uint32 c;
4200          int n = 1;
4201    
4202          for (q = p; n > 0 && *q; q += n) n = utf82ord(q, &c);
4203          if (n <= 0)
4204            {
4205            fprintf(outfile, "**Failed: invalid UTF-8 string cannot be used as input in UTF mode\n");
4206            goto NEXT_DATA;
4207            }
4208          }
4209    #endif
4210    
4211        /* Allocate a buffer to hold the data line. len+1 is an upper bound on
4212           the number of pcre_uchar units that will be needed. */
4213        if (dbuffer == NULL || len >= dbuffer_size)
4214          {
4215          dbuffer_size *= 2;
4216          dbuffer = (pcre_uint8 *)realloc(dbuffer, dbuffer_size * CHAR_SIZE);
4217          if (dbuffer == NULL)
4218            {
4219            fprintf(stderr, "pcretest: malloc(%d) failed\n", dbuffer_size);
4220            exit(1);
4221            }
4222          }
4223    
4224    #ifdef SUPPORT_PCRE8
4225        q8 = (pcre_uint8 *) dbuffer;
4226    #endif
4227    #ifdef SUPPORT_PCRE16
4228        q16 = (pcre_uint16 *) dbuffer;
4229    #endif
4230    #ifdef SUPPORT_PCRE32
4231        q32 = (pcre_uint32 *) dbuffer;
4232    #endif
4233    
4234      while ((c = *p++) != 0)      while ((c = *p++) != 0)
4235        {        {
4236        int i = 0;        int i = 0;
# Line 4145  while (!done) Line 4243  while (!done)
4243    
4244        if (c != '\\')        if (c != '\\')
4245          {          {
4246          if (use_utf)  #ifndef NOUTF
4247            {          if (use_utf && HASUTF8EXTRALEN(c)) { GETUTF8INC(c, p); }
4248            *q++ = c;  #endif
           continue;  
           }  
4249          }          }
4250    
4251        /* Handle backslash escapes */        /* Handle backslash escapes */
# Line 4210  while (!done) Line 4306  while (!done)
4306            c = c * 16 + tolower(*p) - ((isdigit(*p))? '0' : 'a' - 10);            c = c * 16 + tolower(*p) - ((isdigit(*p))? '0' : 'a' - 10);
4307            p++;            p++;
4308            }            }
4309          if (use_utf)  #if !defined NOUTF && defined SUPPORT_PCRE8
4310            if (use_utf && (pcre_mode == PCRE8_MODE))
4311            {            {
4312            *q++ = c;            *q8++ = c;
4313            continue;            continue;
4314            }            }
4315    #endif
4316          break;          break;
4317    
4318          case 0:   /* \ followed by EOF allows for an empty line */          case 0:   /* \ followed by EOF allows for an empty line */
# Line 4427  while (!done) Line 4525  while (!done)
4525        than 127       in UTF mode must have come from \x{...} or octal constructs        than 127       in UTF mode must have come from \x{...} or octal constructs
4526        because values from \x.. get this far only in non-UTF mode. */        because values from \x.. get this far only in non-UTF mode. */
4527    
4528  #if !defined NOUTF || defined SUPPORT_PCRE16 || defined SUPPORT_PCRE32  #ifdef SUPPORT_PCRE8
4529        if (pcre_mode != PCRE8_MODE || use_utf)        if (pcre_mode == PCRE8_MODE)
4530          {          {
4531          pcre_uint8 buff8[8];  #ifndef NOUTF
4532          int ii, utn;          if (use_utf)
4533          utn = ord2utf8(c, buff8);            {
4534          for (ii = 0; ii < utn; ii++) *q++ = buff8[ii];            q8 += ord2utf8(c, q8);
4535              }
4536            else
4537    #endif
4538              {
4539              if (c > 0xffu)
4540                {
4541                fprintf(outfile, "** Character \\x{%x} is greater than 255 "
4542                  "and UTF-8 mode is not enabled.\n", c);
4543                fprintf(outfile, "** Truncation will probably give the wrong "
4544                  "result.\n");
4545                }
4546    
4547              *q8++ = c;
4548              }
4549          }          }
       else  
4550  #endif  #endif
4551    #ifdef SUPPORT_PCRE16
4552          if (pcre_mode == PCRE16_MODE)
4553          {          {
4554          if (c > 255)  #ifndef NOUTF
4555            if (use_utf)
4556              {
4557              if (c > 0x10ffffu)
4558                {
4559                fprintf(outfile, "**Failed: character value greater than 0x10ffff "
4560                  "cannot be converted to UTF-16\n");
4561                goto NEXT_DATA;
4562                }
4563              else if (c >= 0x10000u)
4564                {
4565                c-= 0x10000u;
4566                *q16++ = 0xD800 | (c >> 10);
4567                *q16++ = 0xDC00 | (c & 0x3ff);
4568                }
4569              else
4570                *q16++ = c;
4571              }
4572            else
4573    #endif
4574            {            {
4575            fprintf(outfile, "** Character \\x{%x} is greater than 255 "            if (c > 0xffffu)
4576              "and UTF-8 mode is not enabled.\n", c);              {
4577            fprintf(outfile, "** Truncation will probably give the wrong "              fprintf(outfile, "** Character value is greater than 0xffff "
4578              "result.\n");                "and UTF-16 mode is not enabled.\n", c);
4579                fprintf(outfile, "** Truncation will probably give the wrong "
4580                  "result.\n");
4581                }
4582    
4583              *q16++ = c;
4584            }            }
         *q++ = c;  
4585          }          }
4586    #endif
4587    #ifdef SUPPORT_PCRE32
4588          if (pcre_mode == PCRE32_MODE)
4589            {
4590            *q32++ = c;
4591            }
4592    #endif
4593    
4594        }        }
4595    
4596      /* Reached end of subject string */      /* Reached end of subject string */
4597    
4598      *q = 0;  #ifdef SUPPORT_PCRE8
4599      len = (int)(q - dbuffer);      if (pcre_mode == PCRE8_MODE)
4600        {
4601          *q8 = 0;
4602          len = (int)(q8 - (pcre_uint8 *)dbuffer);
4603        }
4604    #endif
4605    #ifdef SUPPORT_PCRE16
4606        if (pcre_mode == PCRE16_MODE)
4607        {
4608          *q16 = 0;
4609          len = (int)(q16 - (pcre_uint16 *)dbuffer);
4610        }
4611    #endif
4612    #ifdef SUPPORT_PCRE32
4613        if (pcre_mode == PCRE32_MODE)
4614        {
4615          *q32 = 0;
4616          len = (int)(q32 - (pcre_uint32 *)dbuffer);
4617        }
4618    #endif
4619    
4620    #if defined SUPPORT_UTF && defined SUPPORT_PCRE32
4621        /* If we're requsted to test UTF-32 masking of high bits, change the data
4622        string to have high bits set, unless the string is invalid UTF-32.
4623        Since the JIT doesn't support this yet, only do it when not JITing. */
4624        if (use_utf && mask_utf32 && (study_options & PCRE_STUDY_ALLJIT) == 0 &&
4625            valid_utf32((pcre_uint32 *)dbuffer, len))
4626          {
4627          for (q32 = (pcre_uint32 *)dbuffer; *q32; q32++)
4628            *q32 |= ~(pcre_uint32)UTF32_MASK;
4629    
4630          /* Need to pass NO_UTF32_CHECK so the high bits are allowed */
4631          options |= PCRE_NO_UTF32_CHECK;
4632          }
4633    #endif
4634    
4635      /* Move the data to the end of the buffer so that a read over the end of      /* Move the data to the end of the buffer so that a read over the end of
4636      the buffer will be seen by valgrind, even if it doesn't cause a crash. If      the buffer will be seen by valgrind, even if it doesn't cause a crash. If
4637      we are using the POSIX interface, we must include the terminating zero. */      we are using the POSIX interface, we must include the terminating zero. */
4638    
4639        bptr = dbuffer;
4640    
4641  #if !defined NOPOSIX  #if !defined NOPOSIX
4642      if (posix || do_posix)      if (posix || do_posix)
4643        {        {
4644        memmove(bptr + buffer_size - len - 1, bptr, len + 1);        memmove(bptr + dbuffer_size - len - 1, bptr, len + 1);
4645        bptr += buffer_size - len - 1;        bptr += dbuffer_size - len - 1;
4646        }        }
4647      else      else
4648  #endif  #endif
4649        {        {
4650        memmove(bptr + buffer_size - len, bptr, len);        bptr = memmove(bptr + (dbuffer_size - len) * CHAR_SIZE, bptr, len * CHAR_SIZE);
       bptr += buffer_size - len;  
4651        }        }
4652    
4653      if ((all_use_dfa || use_dfa) && find_match_limit)      if ((all_use_dfa || use_dfa) && find_match_limit)
# Line 4532  while (!done) Line 4711  while (!done)
4711    
4712      /* Handle matching via the native interface - repeats for /g and /G */      /* Handle matching via the native interface - repeats for /g and /G */
4713    
 #ifdef SUPPORT_PCRE16  
     if (pcre_mode == PCRE16_MODE)  
       {  
       len = to16(TRUE, bptr, REAL_PCRE_OPTIONS(re) & PCRE_UTF8, len);  
       switch(len)  
         {  
         case -1:  
         fprintf(outfile, "**Failed: invalid UTF-8 string cannot be "  
           "converted to UTF-16\n");  
         goto NEXT_DATA;  
   
         case -2:  
         fprintf(outfile, "**Failed: character value greater than 0x10ffff "  
           "cannot be converted to UTF-16\n");  
         goto NEXT_DATA;  
   
         case -3:  
         fprintf(outfile, "**Failed: character value greater than 0xffff "  
           "cannot be converted to 16-bit in non-UTF mode\n");  
         goto NEXT_DATA;  
   
         default:  
         break;  
         }  
       bptr = (pcre_uint8 *)buffer16;  
       }  
 #endif  
   
 #ifdef SUPPORT_PCRE32  
     if (pcre_mode == PCRE32_MODE)  
       {  
       len = to32(TRUE, bptr, REAL_PCRE_OPTIONS(re) & PCRE_UTF32, len);  
       switch(len)  
         {  
         case -1:  
         fprintf(outfile, "**Failed: invalid UTF-8 string cannot be "  
           "converted to UTF-32\n");  
         goto NEXT_DATA;  
   
         case -2:  
         fprintf(outfile, "**Failed: character value greater than 0x10ffff "  
           "cannot be converted to UTF-32\n");  
         goto NEXT_DATA;  
   
         case -3:  
         fprintf(outfile, "**Failed: character value is ill-formed UTF-32\n");  
         goto NEXT_DATA;  
   
         default:  
         break;  
         }  
       bptr = (pcre_uint8 *)buffer32;  
       }  
 #endif  
   
4714      /* Ensure that there is a JIT callback if we want to verify that JIT was      /* Ensure that there is a JIT callback if we want to verify that JIT was
4715      actually used. If jit_stack == NULL, no stack has yet been assigned. */      actually used. If jit_stack == NULL, no stack has yet been assigned. */
4716    
# Line 4808  while (!done) Line 4932  while (!done)
4932            int rc;            int rc;
4933            char copybuffer[256];            char copybuffer[256];
4934    
4935    #ifdef SUPPORT_PCRE32
4936              if (pcre_mode == PCRE32_MODE)
4937                {
4938                if (*(pcre_uint32 *)cnptr == 0) break;
4939                }
4940    #endif
4941    #ifdef SUPPORT_PCRE16
4942            if (pcre_mode == PCRE16_MODE)            if (pcre_mode == PCRE16_MODE)
4943              {              {
4944              if (*(pcre_uint16 *)cnptr == 0) break;              if (*(pcre_uint16 *)cnptr == 0) break;
4945              }              }
4946            else  #endif
4947    #ifdef SUPPORT_PCRE8
4948              if (pcre_mode == PCRE8_MODE)
4949              {              {
4950              if (*(pcre_uint8 *)cnptr == 0) break;              if (*(pcre_uint8 *)cnptr == 0) break;
4951              }              }
4952    #endif
4953    
4954            PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,            PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
4955              cnptr, copybuffer, sizeof(copybuffer));              cnptr, copybuffer, sizeof(copybuffer));
# Line 4863  while (!done) Line 4997  while (!done)
4997            int rc;            int rc;
4998            const char *substring;            const char *substring;
4999    
5000    #ifdef SUPPORT_PCRE32
5001              if (pcre_mode == PCRE32_MODE)
5002                {
5003                if (*(pcre_uint32 *)gnptr == 0) break;
5004                }
5005    #endif
5006    #ifdef SUPPORT_PCRE16
5007            if (pcre_mode == PCRE16_MODE)            if (pcre_mode == PCRE16_MODE)
5008              {              {
5009              if (*(pcre_uint16 *)gnptr == 0) break;              if (*(pcre_uint16 *)gnptr == 0) break;
5010              }              }
5011            else  #endif
5012    #ifdef SUPPORT_PCRE8
5013              if (pcre_mode == PCRE8_MODE)
5014              {              {
5015              if (*(pcre_uint8 *)gnptr == 0) break;              if (*(pcre_uint8 *)gnptr == 0) break;
5016              }              }
5017    #endif
5018    
5019            PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,            PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
5020              gnptr, &substring);              gnptr, &substring);

Legend:
Removed from v.1087  
changed lines
  Added in v.1118

  ViewVC Help
Powered by ViewVC 1.1.5