#define ERROR_STOP 0
typedef struct hook {
- int type; /* hook type */
+ unsigned long type; /* hook type */
rx_t rx; /* regular expression */
char *command; /* filename, command or pattern to execute */
pattern_t *pattern; /* used for fcc,save,send-hook */
static HOOK *Hooks = NULL;
-static int current_hook_type = 0;
+static unsigned long current_hook_type = 0;
-int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
+int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, unsigned long data,
BUFFER * err)
{
HOOK *ptr;
p_clear(&command, 1);
if (*s->dptr == '!') {
- s->dptr++;
- SKIPWS (s->dptr);
+ s->dptr = vskipspaces(s->dptr + 1);
not = 1;
}
}
/* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
-static void delete_hooks (int type)
+static void delete_hooks (unsigned long type)
{
HOOK *h;
HOOK *prev;
}
}
-int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data,
+int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data __attribute__ ((unused)),
BUFFER * err)
{
while (MoreArgs (s)) {
delete_hooks (0);
}
else {
- int type = mutt_get_hook_type (buf->data);
+ unsigned long type = mutt_get_hook_type (buf->data);
if (!type) {
snprintf (err->data, err->dsize,
current_hook_type = 0;
}
-char *mutt_find_hook (int type, const char *pat)
+char *mutt_find_hook (unsigned long type, const char *pat)
{
HOOK *tmp = Hooks;
return (NULL);
}
-void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type)
+void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, unsigned long type)
{
BUFFER err, token;
HOOK *hook;
}
static int
-mutt_addr_hook (char *path, size_t pathlen, int type, CONTEXT * ctx,
+mutt_addr_hook (char *path, size_t pathlen, unsigned long type, CONTEXT * ctx,
HEADER * hdr)
{
HOOK *hook;
*path = 0;
if (mutt_addr_hook (path, pathlen, M_SAVEHOOK, Context, hdr) != 0) {
char tmp[_POSIX_PATH_MAX];
- ADDRESS *adr;
+ address_t *adr;
ENVELOPE *env = hdr->env;
int fromMe = mutt_addr_is_user (env->from);
void mutt_select_fcc (char *path, size_t pathlen, HEADER * hdr)
{
- ADDRESS *adr;
+ address_t *adr;
char buf[_POSIX_PATH_MAX];
ENVELOPE *env = hdr->env;
return _mutt_string_hook (chs, M_ICONVHOOK);
}
-char *mutt_crypt_hook (ADDRESS * adr)
+char *mutt_crypt_hook (address_t * adr)
{
return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);
}