X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hook.c;h=fb742061170078965a35f52d02910c8ee2094e3d;hp=7347070f9e0d3f1fd09f326d1f0c7ebd57e2aa15;hb=efe9a0bac26a7dabf3953ea0597ce06b3dcb21fe;hpb=93b012884de4ca5e1f2550f767d0b8680b9c0e9f diff --git a/hook.c b/hook.c index 7347070..fb74206 100644 --- a/hook.c +++ b/hook.c @@ -36,7 +36,7 @@ #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 */ @@ -45,9 +45,9 @@ typedef struct 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; @@ -216,7 +216,7 @@ static void delete_hook (HOOK * h) } /* 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; @@ -239,7 +239,7 @@ static void delete_hooks (int type) } } -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)) { @@ -253,7 +253,7 @@ int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data, 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, @@ -306,7 +306,7 @@ void mutt_folder_hook (char *path) 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; @@ -318,7 +318,7 @@ char *mutt_find_hook (int type, const char *pat) 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; @@ -350,7 +350,7 @@ void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type) } 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;