From b928d3d62bc451b495a376a784d90711b8e8566c Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 5 Jul 2019 15:27:35 +0100 Subject: [PATCH] rename templates --- hcache/hcache.c | 2 +- mutt/regex.c | 14 +++++++------- mutt/regex3.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hcache/hcache.c b/hcache/hcache.c index a8272a565..75a8afb98 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -281,7 +281,7 @@ header_cache_t *mutt_hcache_open(const char *path, const char *folder, hcache_na STAILQ_FOREACH(sp, &SpamList, entries) { mutt_md5_process(sp->regex->pattern, &md5ctx); - mutt_md5_process(sp->tmpl, &md5ctx); + mutt_md5_process(sp->templ, &md5ctx); } /* Mix in user's nospam list */ diff --git a/mutt/regex.c b/mutt/regex.c index 0a3ca45c9..e3c1365c8 100644 --- a/mutt/regex.c +++ b/mutt/regex.c @@ -285,7 +285,7 @@ int mutt_replacelist_add(struct ReplaceList *rl, const char *pat, * re-adds conceptually. So we probably want this to imply a * removal, then do an add. We can achieve the removal by freeing * the template, and leaving t pointed at the current item. */ - FREE(&np->tmpl); + FREE(&np->templ); break; } } @@ -305,7 +305,7 @@ int mutt_replacelist_add(struct ReplaceList *rl, const char *pat, } /* Now np is the ReplaceListNode that we want to modify. It is prepared. */ - np->tmpl = mutt_str_strdup(templ); + np->templ = mutt_str_strdup(templ); /* Find highest match number in template string */ np->nmatch = 0; @@ -392,9 +392,9 @@ char *mutt_replacelist_apply(struct ReplaceList *rl, char *buf, size_t buflen, c mutt_debug(LL_DEBUG5, "%s matches %s\n", src, np->regex->pattern); /* Copy into other twinbuf with substitutions */ - if (np->tmpl) + if (np->templ) { - for (p = np->tmpl; *p && (tlen < 1023);) + for (p = np->templ; *p && (tlen < 1023);) { if (*p == '%') { @@ -455,7 +455,7 @@ void mutt_replacelist_free(struct ReplaceList *rl) { STAILQ_REMOVE(rl, np, ReplaceListNode, entries); mutt_regex_free(&np->regex); - FREE(&np->tmpl); + FREE(&np->templ); FREE(&np); } } @@ -500,7 +500,7 @@ bool mutt_replacelist_match(struct ReplaceList *rl, char *buf, size_t buflen, co mutt_debug(LL_DEBUG5, "%d subs\n", (int) np->regex->regex->re_nsub); /* Copy template into buf, with substitutions. */ - for (p = np->tmpl; *p && tlen < buflen - 1;) + for (p = np->templ; *p && tlen < buflen - 1;) { /* backreference to pattern match substring, eg. %1, %2, etc) */ if (*p == '%') @@ -575,7 +575,7 @@ int mutt_replacelist_remove(struct ReplaceList *rl, const char *pat) { STAILQ_REMOVE(rl, np, ReplaceListNode, entries); mutt_regex_free(&np->regex); - FREE(&np->tmpl); + FREE(&np->templ); FREE(&np); nremoved++; } diff --git a/mutt/regex3.h b/mutt/regex3.h index f43259c74..a45e26ab8 100644 --- a/mutt/regex3.h +++ b/mutt/regex3.h @@ -78,7 +78,7 @@ struct ReplaceListNode { struct Regex *regex; /**< Regex containing a regular expression */ size_t nmatch; /**< Match the 'nth' occurrence (0 means the whole expression) */ - char *tmpl; /**< Template to match */ + char *templ; /**< Template to match */ STAILQ_ENTRY(ReplaceListNode) entries; /**< Next item in list */ }; STAILQ_HEAD(ReplaceList, ReplaceListNode); -- 2.40.0