-const char pcrs_rcs[] = "$Id: pcrs.c,v 2.2 2002/09/04 15:52:02 oes Exp $";
+const char pcrs_rcs[] = "$Id: pcrs.c,v 2.4 2003/01/21 02:49:27 david__schmidt Exp $";
/*********************************************************************
*
*
* Revisions :
* $Log: pcrs.c,v $
+ * Revision 2.4 2003/01/21 02:49:27 david__schmidt
+ * Developer TODO 612294: src: C++ keyword as variable name
+ * I changed all ocurrences of 'new' to 'new_something' wherever I found
+ * one. I also brought up all the source files in MSDEV to see if I could
+ * spot any highlighted keywords that really were variables. Non-scientific,
+ * but at least I tried. :-)
+ *
+ * Revision 2.3 2002/10/08 16:25:30 oes
+ * Bugfix: Need to check validity of backreferences explicitly, because when max_matches are reached and matches is expanded, realloc() does not zero the memory. Fixes Bug # 606227
+ *
* Revision 2.2 2002/09/04 15:52:02 oes
* Synced with the stable branch:
* Revision 1.19.2.1 2002/08/10 11:23:40 oes
int pcrs_execute_list(pcrs_job *joblist, char *subject, size_t subject_length, char **result, size_t *result_length)
{
pcrs_job *job;
- char *old, *new;
+ char *old_item, *new_item;
int hits, total_hits;
- old = subject;
+ old_item = subject;
*result_length = subject_length;
hits = total_hits = 0;
for (job = joblist; job != NULL; job = job->next)
{
- hits = pcrs_execute(job, old, *result_length, &new, result_length);
+ hits = pcrs_execute(job, old_item, *result_length, &new_item, result_length);
- if (old != subject) free(old);
+ if (old_item != subject) free(old_item);
if (hits < 0)
{
else
{
total_hits += hits;
- old = new;
+ old_item = new_item;
}
}
- *result = new;
+ *result = new_item;
return(total_hits);
}