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

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 1233 by ph10, Sat Dec 8 12:43:37 2012 UTC revision 1320 by ph10, Wed May 1 16:39:35 2013 UTC
# Line 7  and semantics are as close as possible t Line 7  and semantics are as close as possible t
7  below for why this module is different).  below for why this module is different).
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2012 University of Cambridge             Copyright (c) 1997-2013 University of Cambridge
11    
12  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
13  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 1120  for (;;) Line 1120  for (;;)
1120              }              }
1121            break;            break;
1122    
1123              case PT_UCNC:
1124              OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
1125                   c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
1126                   c >= 0xe000;
1127              break;
1128    
1129            /* Should never occur, but keep compilers from grumbling. */            /* Should never occur, but keep compilers from grumbling. */
1130    
1131            default:            default:
# Line 1364  for (;;) Line 1370  for (;;)
1370              }              }
1371            break;            break;
1372    
1373              case PT_UCNC:
1374              OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
1375                   c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
1376                   c >= 0xe000;
1377              break;
1378    
1379            /* Should never occur, but keep compilers from grumbling. */            /* Should never occur, but keep compilers from grumbling. */
1380    
1381            default:            default:
# Line 1602  for (;;) Line 1614  for (;;)
1614              }              }
1615            break;            break;
1616    
1617              case PT_UCNC:
1618              OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
1619                   c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
1620                   c >= 0xe000;
1621              break;
1622    
1623            /* Should never occur, but keep compilers from grumbling. */            /* Should never occur, but keep compilers from grumbling. */
1624    
1625            default:            default:
# Line 1865  for (;;) Line 1883  for (;;)
1883              }              }
1884            break;            break;
1885    
1886              case PT_UCNC:
1887              OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
1888                   c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
1889                   c >= 0xe000;
1890              break;
1891    
1892            /* Should never occur, but keep compilers from grumbling. */            /* Should never occur, but keep compilers from grumbling. */
1893    
1894            default:            default:
# Line 3023  for (;;) Line 3047  for (;;)
3047            ptr > md->start_used_ptr)            /* Inspected non-empty string */            ptr > md->start_used_ptr)            /* Inspected non-empty string */
3048            )            )
3049          )          )
       {  
       if (offsetcount >= 2)  
         {  
         offsets[0] = (int)(md->start_used_ptr - start_subject);  
         offsets[1] = (int)(end_subject - start_subject);  
         }  
3050        match_count = PCRE_ERROR_PARTIAL;        match_count = PCRE_ERROR_PARTIAL;
       }  
   
3051      DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"      DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"
3052        "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count,        "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count,
3053        rlevel*2-2, SP));        rlevel*2-2, SP));
# Line 3545  for (;;) Line 3561  for (;;)
3561    /* Anything other than "no match" means we are done, always; otherwise, carry    /* Anything other than "no match" means we are done, always; otherwise, carry
3562    on only if not anchored. */    on only if not anchored. */
3563    
3564    if (rc != PCRE_ERROR_NOMATCH || anchored) return rc;    if (rc != PCRE_ERROR_NOMATCH || anchored)
3565        {
3566        if (rc == PCRE_ERROR_PARTIAL && offsetcount >= 2)
3567          {
3568          offsets[0] = (int)(md->start_used_ptr - (PCRE_PUCHAR)subject);
3569          offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
3570          if (offsetcount > 2)
3571            offsets[2] = (int)(current_subject - (PCRE_PUCHAR)subject);
3572          }
3573        return rc;
3574        }
3575    
3576    /* Advance to the next subject character unless we are at the end of a line    /* Advance to the next subject character unless we are at the end of a line
3577    and firstline is set. */    and firstline is set. */

Legend:
Removed from v.1233  
changed lines
  Added in v.1320

  ViewVC Help
Powered by ViewVC 1.1.5