Lines Matching defs:replacement
105 char *replacement; /* replacement text */
106 size_t max_sub; /* largest $number in replacement */
170 * We pre-scanned the replacement text at compile time, so any out of
176 msg_panic("regexp map %s, line %d: out of range replacement index \"%s\"",
270 * Skip $number substitutions when the replacement text contains
275 return (match_rule->replacement);
278 * Perform $number substitutions on the replacement text. We
279 * pre-scanned the replacement text at compile time. Any macro
290 if (mac_parse(match_rule->replacement, dict_regexp_expand,
292 msg_panic("regexp map %s, line %d: bad replacement syntax",
347 if (match_rule->replacement)
348 myfree((void *) match_rule->replacement);
478 /* dict_regexp_prescan - find largest $number in replacement text */
487 * only if the replacement text contains no $number expression. This way
488 * we can avoid having to scan the replacement text at lookup time.
496 msg_warn("regexp map %s, line %d: non-numeric replacement index \"%s\"",
502 msg_warn("regexp map %s, line %d: out-of-range replacement index \"%s\"",
560 * An ordinary rule takes one or two patterns and replacement text.
577 * Get the replacement text.
582 msg_warn("regexp map %s, line %d: no replacement text: "
587 * Find the highest-numbered $number in the replacement text. We can
589 * compiler, setting the REG_NOSUB flag when the replacement text
627 msg_warn("regexp map %s, line %d: bad replacement syntax: "
642 "replacement text: skipping this rule", mapname, lineno);
655 msg_warn("regexp map %s, line %d: out of range replacement index \"%d\": "
677 match_rule->replacement = prescan_context.literal;
679 match_rule->replacement = mystrdup(p);
684 * The IF operator takes one pattern but no replacement text.
716 * The ENDIF operator takes no patterns and no replacement text.
866 * replacement text.