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

Diff of /code/trunk/pcre_compile.c

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

revision 1069 by chpe, Tue Oct 16 15:54:29 2012 UTC revision 1074 by chpe, Tue Oct 16 15:54:47 2012 UTC
# Line 2197  find_recurse(const pcre_uchar *code, BOO Line 2197  find_recurse(const pcre_uchar *code, BOO
2197  {  {
2198  for (;;)  for (;;)
2199    {    {
2200    register int c = *code;    register pcre_uchar c = *code;
2201    if (c == OP_END) return NULL;    if (c == OP_END) return NULL;
2202    if (c == OP_RECURSE) return code;    if (c == OP_RECURSE) return code;
2203    
# Line 2351  static BOOL Line 2351  static BOOL
2351  could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode,  could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode,
2352    BOOL utf, compile_data *cd)    BOOL utf, compile_data *cd)
2353  {  {
2354  register int c;  register pcre_uchar c;
2355  for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);  for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
2356       code < endcode;       code < endcode;
2357       code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))       code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))
# Line 2385  for (code = first_significant_code(code Line 2385  for (code = first_significant_code(code
2385      /* Test for forward reference */      /* Test for forward reference */
2386    
2387      for (scode = cd->start_workspace; scode < cd->hwm; scode += LINK_SIZE)      for (scode = cd->start_workspace; scode < cd->hwm; scode += LINK_SIZE)
2388        if (GET(scode, 0) == code + 1 - cd->start_code) return TRUE;        if ((int)GET(scode, 0) == (int)(code + 1 - cd->start_code)) return TRUE;
2389    
2390      /* Not a forward reference, test for completed backward reference */      /* Not a forward reference, test for completed backward reference */
2391    
# Line 2706  Returns:   TRUE or FALSE Line 2706  Returns:   TRUE or FALSE
2706  static BOOL  static BOOL
2707  check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)  check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)
2708  {  {
2709  int terminator;          /* Don't combine these lines; the Solaris cc */  pcre_uchar terminator;          /* Don't combine these lines; the Solaris cc */
2710  terminator = *(++ptr);   /* compiler warns about "non-constant" initializer. */  terminator = *(++ptr);   /* compiler warns about "non-constant" initializer. */
2711  for (++ptr; *ptr != 0; ptr++)  for (++ptr; *ptr != 0; ptr++)
2712    {    {
# Line 2755  register int yield = 0; Line 2755  register int yield = 0;
2755  while (posix_name_lengths[yield] != 0)  while (posix_name_lengths[yield] != 0)
2756    {    {
2757    if (len == posix_name_lengths[yield] &&    if (len == posix_name_lengths[yield] &&
2758      STRNCMP_UC_C8(ptr, pn, len) == 0) return yield;      STRNCMP_UC_C8(ptr, pn, (unsigned int)len) == 0) return yield;
2759    pn += posix_name_lengths[yield] + 1;    pn += posix_name_lengths[yield] + 1;
2760    yield++;    yield++;
2761    }    }
# Line 2810  while ((ptr = (pcre_uchar *)find_recurse Line 2810  while ((ptr = (pcre_uchar *)find_recurse
2810    
2811    for (hc = save_hwm; hc < cd->hwm; hc += LINK_SIZE)    for (hc = save_hwm; hc < cd->hwm; hc += LINK_SIZE)
2812      {      {
2813      offset = GET(hc, 0);      offset = (int)GET(hc, 0);
2814      if (cd->start_code + offset == ptr + 1)      if (cd->start_code + offset == ptr + 1)
2815        {        {
2816        PUT(hc, 0, offset + adjust);        PUT(hc, 0, offset + adjust);
# Line 2823  while ((ptr = (pcre_uchar *)find_recurse Line 2823  while ((ptr = (pcre_uchar *)find_recurse
2823    
2824    if (hc >= cd->hwm)    if (hc >= cd->hwm)
2825      {      {
2826      offset = GET(ptr, 1);      offset = (int)GET(ptr, 1);
2827      if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);      if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
2828      }      }
2829    

Legend:
Removed from v.1069  
changed lines
  Added in v.1074

  ViewVC Help
Powered by ViewVC 1.1.5