WHERE char *AttributionLocale;
WHERE char *AttachCharset;
WHERE char *AttachFormat;
-WHERE REGEXP AttachKeyword;
+WHERE struct Regex AttachKeyword;
WHERE char *Charset;
WHERE char *ComposeFormat;
WHERE char *ConfigCharset;
WHERE struct List *UserHeader INITVAL(0);
/* -- formerly in pgp.h -- */
-WHERE REGEXP PgpGoodSign;
-WHERE REGEXP PgpDecryptionOkay;
+WHERE struct Regex PgpGoodSign;
+WHERE struct Regex PgpDecryptionOkay;
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
typedef struct hook
{
int type; /* hook type */
- REGEXP rx; /* regular expression */
+ struct Regex rx; /* regular expression */
char *command; /* filename, command or pattern to execute */
struct Pattern *pattern; /* used for fcc,save,send-hook */
struct hook *next;
int e, flags = 0;
const char *p = NULL;
regex_t *rx = NULL;
- REGEXP *ptr = (REGEXP *) MuttVars[idx].data;
+ struct Regex *ptr = (struct Regex *) MuttVars[idx].data;
if (!ptr->pattern || (mutt_strcmp(ptr->pattern, tmp->data) != 0))
{
static void free_opt(struct option_t *p)
{
- REGEXP *pp = NULL;
+ struct Regex *pp = NULL;
switch (p->type & DT_MASK)
{
rfc822_free_address((struct Address **) p->data);
break;
case DT_RX:
- pp = (REGEXP *) p->data;
+ pp = (struct Regex *) p->data;
FREE(&pp->pattern);
if (pp->rx)
{
int mutt_add_to_rx_list(RX_LIST **list, const char *s, int flags, struct Buffer *err)
{
RX_LIST *t = NULL, *last = NULL;
- REGEXP *rx = NULL;
+ struct Regex *rx = NULL;
if (!s || !*s)
return 0;
const char *templ, struct Buffer *err)
{
REPLACE_LIST *t = NULL, *last = NULL;
- REGEXP *rx = NULL;
+ struct Regex *rx = NULL;
int n;
const char *p = NULL;
break;
case DT_RX:
{
- REGEXP *pp = (REGEXP *) p->data;
+ struct Regex *pp = (struct Regex *) p->data;
if (!p->init && pp->pattern)
p->init = (unsigned long) safe_strdup(pp->pattern);
break;
break;
case DT_RX:
{
- REGEXP *pp = (REGEXP *) p->data;
+ struct Regex *pp = (struct Regex *) p->data;
int flags = 0;
FREE(&pp->pattern);
if (query || *s->dptr != '=')
{
/* user requested the value of this variable */
- REGEXP *ptr = (REGEXP *) MuttVars[idx].data;
+ struct Regex *ptr = (struct Regex *) MuttVars[idx].data;
pretty_var(err->data, err->dsize, MuttVars[idx].option, NONULL(ptr->pattern));
break;
}
typedef struct rx_list_t
{
- REGEXP *rx;
+ struct Regex *rx;
struct rx_list_t *next;
} RX_LIST;
typedef struct replace_list_t
{
- REGEXP *rx;
+ struct Regex *rx;
int nmatch;
char *template;
struct replace_list_t *next;
#define REGCOMP(X, Y, Z) regcomp(X, Y, REG_WORDS | REG_EXTENDED | (Z))
#define REGEXEC(X, Y) regexec(&X, Y, (size_t) 0, (regmatch_t *) 0, (int) 0)
-typedef struct
+struct Regex
{
char *pattern; /* printable version */
regex_t *rx; /* compiled expression */
int not; /* do not match */
-} REGEXP;
+};
-WHERE REGEXP Mask;
-WHERE REGEXP QuoteRegexp;
-WHERE REGEXP ReplyRegexp;
-WHERE REGEXP Smileys;
-WHERE REGEXP GecosMask;
+WHERE struct Regex Mask;
+WHERE struct Regex QuoteRegexp;
+WHERE struct Regex ReplyRegexp;
+WHERE struct Regex Smileys;
+WHERE struct Regex GecosMask;
#endif /* _MUTT_REGEX_H */
return vstring;
}
-REGEXP *mutt_compile_regexp(const char *s, int flags)
+struct Regex *mutt_compile_regexp(const char *s, int flags)
{
- REGEXP *pp = safe_calloc(sizeof(REGEXP), 1);
+ struct Regex *pp = safe_calloc(sizeof(struct Regex), 1);
pp->pattern = safe_strdup(s);
pp->rx = safe_calloc(sizeof(regex_t), 1);
if (REGCOMP(pp->rx, NONULL(s), flags) != 0)
return pp;
}
-void mutt_free_regexp(REGEXP **pp)
+void mutt_free_regexp(struct Regex **pp)
{
FREE(&(*pp)->pattern);
regfree((*pp)->rx);
struct Group *mutt_pattern_group(const char *k);
-REGEXP *mutt_compile_regexp(const char *s, int flags);
+struct Regex *mutt_compile_regexp(const char *s, int flags);
void mutt_account_hook(const char *url);
void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv, struct List ***pp,
void mutt_free_envelope(struct Envelope **p);
void mutt_free_header(struct Header **h);
void mutt_free_parameter(struct Parameter **p);
-void mutt_free_regexp(REGEXP **pp);
+void mutt_free_regexp(struct Regex **pp);
void mutt_help(int menu);
void mutt_draw_tree(struct Context *ctx);
void mutt_check_lookup_list(struct Body *b, char *type, int len);