/[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 140 by ph10, Thu Mar 29 13:56:00 2007 UTC revision 141 by ph10, Fri Mar 30 15:46:27 2007 UTC
# Line 1408  sprintf(buffer, "%s%.*s%s", prefix[proce Line 1408  sprintf(buffer, "%s%.*s%s", prefix[proce
1408    suffix[process_options]);    suffix[process_options]);
1409  pattern_list[pattern_count] =  pattern_list[pattern_count] =
1410    pcre_compile(buffer, options, &error, &errptr, pcretables);    pcre_compile(buffer, options, &error, &errptr, pcretables);
1411  if (pattern_list[pattern_count++] != NULL) return TRUE;  if (pattern_list[pattern_count] != NULL)
1412      {
1413      pattern_count++;
1414      return TRUE;
1415      }
1416    
1417  /* Handle compile errors */  /* Handle compile errors */
1418    
# Line 1490  int i, j; Line 1494  int i, j;
1494  int rc = 1;  int rc = 1;
1495  int pcre_options = 0;  int pcre_options = 0;
1496  int cmd_pattern_count = 0;  int cmd_pattern_count = 0;
1497    int hint_count = 0;
1498  int errptr;  int errptr;
1499  BOOL only_one_at_top;  BOOL only_one_at_top;
1500  char *patterns[MAX_PATTERN_COUNT];  char *patterns[MAX_PATTERN_COUNT];
# Line 1942  for (j = 0; j < pattern_count; j++) Line 1947  for (j = 0; j < pattern_count; j++)
1947      fprintf(stderr, "pcregrep: Error while studying regex%s: %s\n", s, error);      fprintf(stderr, "pcregrep: Error while studying regex%s: %s\n", s, error);
1948      goto EXIT2;      goto EXIT2;
1949      }      }
1950      hint_count++;
1951    }    }
1952    
1953  /* If there are include or exclude patterns, compile them. */  /* If there are include or exclude patterns, compile them. */
# Line 2001  if (pattern_list != NULL) Line 2007  if (pattern_list != NULL)
2007    }    }
2008  if (hints_list != NULL)  if (hints_list != NULL)
2009    {    {
2010    for (i = 0; i < pattern_count; i++) free(hints_list[i]);    for (i = 0; i < hint_count; i++) free(hints_list[i]);
2011    free(hints_list);    free(hints_list);
2012    }    }
2013  return rc;  return rc;

Legend:
Removed from v.140  
changed lines
  Added in v.141

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12