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

Diff of /code/trunk/pcregrep.c

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

revision 1324 by ph10, Fri May 10 11:40:06 2013 UTC revision 1335 by ph10, Tue May 28 09:13:59 2013 UTC
# Line 1378  to find all possible matches. Line 1378  to find all possible matches.
1378  Arguments:  Arguments:
1379    matchptr     the start of the subject    matchptr     the start of the subject
1380    length       the length of the subject to match    length       the length of the subject to match
1381    options      options for pcre_exec    options      options for pcre_exec
1382    startoffset  where to start matching    startoffset  where to start matching
1383    offsets      the offets vector to fill in    offsets      the offets vector to fill in
1384    mrc          address of where to put the result of pcre_exec()    mrc          address of where to put the result of pcre_exec()
# Line 1389  Returns:      TRUE if there was a match Line 1389  Returns:      TRUE if there was a match
1389  */  */
1390    
1391  static BOOL  static BOOL
1392  match_patterns(char *matchptr, size_t length, unsigned int options,  match_patterns(char *matchptr, size_t length, unsigned int options,
1393    int startoffset, int *offsets, int *mrc)    int startoffset, int *offsets, int *mrc)
1394  {  {
1395  int i;  int i;
# Line 1540  while (ptr < endptr) Line 1540  while (ptr < endptr)
1540    int endlinelength;    int endlinelength;
1541    int mrc = 0;    int mrc = 0;
1542    int startoffset = 0;    int startoffset = 0;
1543    unsigned int options = 0;    unsigned int options = 0;
1544    BOOL match;    BOOL match;
1545    char *matchptr = ptr;    char *matchptr = ptr;
1546    char *t = ptr;    char *t = ptr;
# Line 1630  while (ptr < endptr) Line 1630  while (ptr < endptr)
1630    
1631    /* Run through all the patterns until one matches or there is an error other    /* Run through all the patterns until one matches or there is an error other
1632    than NOMATCH. This code is in a subroutine so that it can be re-used for    than NOMATCH. This code is in a subroutine so that it can be re-used for
1633    finding subsequent matches when colouring matched lines. After finding one    finding subsequent matches when colouring matched lines. After finding one
1634    match, set PCRE_NOTEMPTY to disable any further matches of null strings in    match, set PCRE_NOTEMPTY to disable any further matches of null strings in
1635    this line. */    this line. */
1636    
1637    match = match_patterns(matchptr, length, options, startoffset, offsets, &mrc);    match = match_patterns(matchptr, length, options, startoffset, offsets, &mrc);

Legend:
Removed from v.1324  
changed lines
  Added in v.1335

  ViewVC Help
Powered by ViewVC 1.1.5