/[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 378 by ph10, Sun Mar 1 14:13:34 2009 UTC revision 379 by ph10, Mon Mar 2 20:30:05 2009 UTC
# Line 846  match_patterns(char *matchptr, size_t le Line 846  match_patterns(char *matchptr, size_t le
846  int i;  int i;
847  for (i = 0; i < pattern_count; i++)  for (i = 0; i < pattern_count; i++)
848    {    {
849    *mrc = pcre_exec(pattern_list[i], hints_list[i], matchptr, length, 0, 0,    *mrc = pcre_exec(pattern_list[i], hints_list[i], matchptr, length, 0,
850      offsets, OFFSET_SIZE);      PCRE_NOTEMPTY, offsets, OFFSET_SIZE);
851    if (*mrc >= 0) return TRUE;    if (*mrc >= 0) return TRUE;
852    if (*mrc == PCRE_ERROR_NOMATCH) continue;    if (*mrc == PCRE_ERROR_NOMATCH) continue;
853    fprintf(stderr, "pcregrep: pcre_exec() error %d while matching ", *mrc);    fprintf(stderr, "pcregrep: pcre_exec() error %d while matching ", *mrc);
# Line 1018  while (ptr < endptr) Line 1018  while (ptr < endptr)
1018    
1019    
1020        for (i = 0; i < jfriedl_XR; i++)        for (i = 0; i < jfriedl_XR; i++)
1021            match = (pcre_exec(pattern_list[0], hints_list[0], ptr, length, 0, 0, offsets, OFFSET_SIZE) >= 0);            match = (pcre_exec(pattern_list[0], hints_list[0], ptr, length, 0,
1022                  PCRE_NOTEMPTY, offsets, OFFSET_SIZE) >= 0);
1023    
1024        if (gettimeofday(&end_time, &dummy) != 0)        if (gettimeofday(&end_time, &dummy) != 0)
1025                perror("bad gettimeofday");                perror("bad gettimeofday");

Legend:
Removed from v.378  
changed lines
  Added in v.379

  ViewVC Help
Powered by ViewVC 1.1.5