#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;
}
/* 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;