/[pcre]/code/branches/pcre16/pcre_compile.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_compile.c

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

revision 265 by ph10, Wed Nov 14 11:35:48 2007 UTC revision 268 by ph10, Thu Nov 15 10:28:09 2007 UTC
# Line 300  static const char error_texts[] = Line 300  static const char error_texts[] =
300    "(*VERB) with an argument is not supported\0"    "(*VERB) with an argument is not supported\0"
301    /* 60 */    /* 60 */
302    "(*VERB) not recognized\0"    "(*VERB) not recognized\0"
303    "number is too big";    "number is too big\0"
304      "subpattern name expected after (?&";
305    
306    
307  /* Table to identify digits and hex digits. This is used when compiling  /* Table to identify digits and hex digits. This is used when compiling
# Line 4535  we set the flag only if there is a liter Line 4536  we set the flag only if there is a liter
4536    
4537          if (lengthptr != NULL)          if (lengthptr != NULL)
4538            {            {
4539              if (namelen == 0)
4540                {
4541                *errorcodeptr = ERR62;
4542                goto FAILED;
4543                }
4544            if (*ptr != terminator)            if (*ptr != terminator)
4545              {              {
4546              *errorcodeptr = ERR42;              *errorcodeptr = ERR42;
# Line 4548  we set the flag only if there is a liter Line 4554  we set the flag only if there is a liter
4554            recno = 0;            recno = 0;
4555            }            }
4556    
4557          /* In the real compile, seek the name in the table */          /* In the real compile, seek the name in the table. We check the name
4558            first, and then check that we have reached the end of the name in the
4559            table. That way, if the name that is longer than any in the table,
4560            the comparison will fail without reading beyond the table entry. */
4561    
4562          else          else
4563            {            {
4564            slot = cd->name_table;            slot = cd->name_table;
4565            for (i = 0; i < cd->names_found; i++)            for (i = 0; i < cd->names_found; i++)
4566              {              {
4567              if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break;              if (strncmp((char *)name, (char *)slot+2, namelen) == 0 &&
4568                    slot[2+namelen] == 0)
4569                  break;
4570              slot += cd->name_entry_size;              slot += cd->name_entry_size;
4571              }              }
4572    

Legend:
Removed from v.265  
changed lines
  Added in v.268

  ViewVC Help
Powered by ViewVC 1.1.5