WHERE RX_LIST *UnMailLists INITVAL(0);
WHERE RX_LIST *SubscribedLists INITVAL(0);
WHERE RX_LIST *UnSubscribedLists INITVAL(0);
-WHERE REPLACE_LIST *SpamList INITVAL(0);
+WHERE struct ReplaceList *SpamList INITVAL(0);
WHERE RX_LIST *NoSpamList INITVAL(0);
-WHERE REPLACE_LIST *SubjectRxList INITVAL(0);
+WHERE struct ReplaceList *SubjectRxList INITVAL(0);
/* bit vector for boolean variables */
unsigned int intval;
} digest;
struct md5_ctx ctx;
- REPLACE_LIST *spam = NULL;
+ struct ReplaceList *spam = NULL;
RX_LIST *nospam = NULL;
hcachever = HCACHEVER;
return 0;
}
-static int remove_from_replace_list(REPLACE_LIST **list, const char *pat)
+static int remove_from_replace_list(struct ReplaceList **list, const char *pat)
{
- REPLACE_LIST *cur = NULL, *prev = NULL;
+ struct ReplaceList *cur = NULL, *prev = NULL;
int nremoved = 0;
/* Being first is a special case. */
return nremoved;
}
-static REPLACE_LIST *new_replace_list(void)
+static struct ReplaceList *new_replace_list(void)
{
- return safe_calloc(1, sizeof(REPLACE_LIST));
+ return safe_calloc(1, sizeof(struct ReplaceList));
}
-static int add_to_replace_list(REPLACE_LIST **list, const char *pat,
+static int add_to_replace_list(struct ReplaceList **list, const char *pat,
const char *templ, struct Buffer *err)
{
- REPLACE_LIST *t = NULL, *last = NULL;
+ struct ReplaceList *t = NULL, *last = NULL;
struct Regex *rx = NULL;
int n;
const char *p = NULL;
break;
}
- /* If t is set, it's pointing into an extant REPLACE_LIST* that we want to
+ /* If t is set, it's pointing into an extant ReplaceList* that we want to
* update. Otherwise we want to make a new one to link at the list's end.
*/
if (!t)
else
mutt_free_regexp(&rx);
- /* Now t is the REPLACE_LIST* that we want to modify. It is prepared. */
+ /* Now t is the ReplaceList* that we want to modify. It is prepared. */
t->template = safe_strdup(templ);
/* Find highest match number in template string */
static int parse_replace_list(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err)
{
- REPLACE_LIST **list = (REPLACE_LIST **) data;
+ struct ReplaceList **list = (struct ReplaceList **) data;
struct Buffer templ;
memset(&templ, 0, sizeof(templ));
static int parse_unreplace_list(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err)
{
- REPLACE_LIST **list = (REPLACE_LIST **) data;
+ struct ReplaceList **list = (struct ReplaceList **) data;
/* First token is a regexp. */
if (!MoreArgs(s))
struct rx_list_t *next;
} RX_LIST;
-typedef struct replace_list_t
+struct ReplaceList
{
struct Regex *rx;
int nmatch;
char *template;
- struct replace_list_t *next;
-} REPLACE_LIST;
+ struct ReplaceList *next;
+};
static inline struct List *mutt_new_list(void)
{
void mutt_free_list(struct List **list);
void mutt_free_rx_list(RX_LIST **list);
-void mutt_free_replace_list(REPLACE_LIST **list);
+void mutt_free_replace_list(struct ReplaceList **list);
struct List *mutt_copy_list(struct List *p);
int mutt_matches_ignore(const char *s);
bool mutt_matches_list(const char *s, struct List *t);
/* Note this function uses a fixed size buffer of LONG_STRING and so
* should only be used for visual modifications, such as disp_subj. */
-char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, REPLACE_LIST *rlist)
+char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, struct ReplaceList *rlist)
{
- REPLACE_LIST *l = NULL;
+ struct ReplaceList *l = NULL;
static regmatch_t *pmatch = NULL;
static int nmatch = 0;
static char twinbuf[2][LONG_STRING];
}
}
-void mutt_free_replace_list(REPLACE_LIST **list)
+void mutt_free_replace_list(struct ReplaceList **list)
{
- REPLACE_LIST *p = NULL;
+ struct ReplaceList *p = NULL;
if (!list)
return;
*
* Returns true if the argument `s` matches a pattern in the spam list, otherwise
* false. */
-bool mutt_match_spam_list(const char *s, REPLACE_LIST *l, char *text, int textsize)
+bool mutt_match_spam_list(const char *s, struct ReplaceList *l, char *text, int textsize)
{
static regmatch_t *pmatch = NULL;
static int nmatch = 0;
void mutt_alias_delete_reverse(struct Alias *t);
int mutt_alloc_color(int fg, int bg);
int mutt_any_key_to_continue(const char *s);
-char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, REPLACE_LIST *rlist);
+char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, struct ReplaceList *rlist);
int mutt_buffy_check(int force);
int mutt_buffy_notify(void);
int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur);
int mutt_link_threads(struct Header *cur, struct Header *last, struct Context *ctx);
int mutt_lookup_mime_type(struct Body *att, const char *path);
bool mutt_match_rx_list(const char *s, RX_LIST *l);
-bool mutt_match_spam_list(const char *s, REPLACE_LIST *l, char *text, int textsize);
+bool mutt_match_spam_list(const char *s, struct ReplaceList *l, char *text, int textsize);
int mutt_messages_in_thread(struct Context *ctx, struct Header *hdr, int flag);
int mutt_multi_choice(char *prompt, char *letters);
bool mutt_needs_mailcap(struct Body *m);