free(self);
}
+/* Free a bregexps alist
+ */
void free_bregexps(alist *bregexps)
{
Dmsg0(500, "bregexp: freeing all BREGEXP object\n");
}
}
+/* Apply all regexps to fname
+ */
char *apply_bregexps(const char *fname, alist *bregexps)
{
BREGEXP *elt;
foreach_alist(elt, bregexps) {
ret = elt->replace(ret);
}
+ Dmsg2(500, "bregexp: fname=%s ret=%s\n", fname, ret);
return ret;
}
}
char *search = (char *) motif + 1;
- char *replace;
int options = REG_EXTENDED | REG_NEWLINE;
bool ok = false;
bool found_motif = false;
int rc = re_search(&preg, (BREGEX_CAST char*) fname, flen, 0, flen, ®s);
if (rc < 0) {
- Dmsg0(100, "E: regex mismatch\n");
+ Dmsg0(500, "bregexp: regex mismatch\n");
return return_fname(fname, flen);
}
result = check_pool_memory_size(result, len);
edit_subst(fname, ®s);
+ Dmsg2(500, "bregexp: len = %i, result_len = %i\n", len, strlen(result));
+
} else { /* error in substitution */
- Dmsg0(100, "E: error in substitution\n");
+ Dmsg0(100, "bregexp: error in substitution\n");
return return_fname(fname, flen);
}