X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hook.c;h=bb8e30f9c16bd49f53b53c7ba29f61a7d68f6927;hp=e763f1412bf8b5a31a518a5306469a9dbea587ca;hb=ac813896ca32d850febc2d95065ac4fa040f11f9;hpb=f7f0722b06934cf83c08e60d805238478ada2699 diff --git a/hook.c b/hook.c index e763f14..bb8e30f 100644 --- a/hook.c +++ b/hook.c @@ -11,25 +11,24 @@ # include "config.h" #endif +#include +#include +#include +#include +#include + #include #include #include #include #include +#include #include "mutt.h" #include "mx.h" #include #include "compress.h" -#include "lib/rx.h" - -#include -#include -#include -#include -#include - #define ERROR_STOP 0 typedef struct hook { @@ -44,8 +43,8 @@ static HOOK *Hooks = NULL; static unsigned long current_hook_type = 0; -int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, unsigned long data, - BUFFER * err) +int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, + unsigned long data, BUFFER * err) { HOOK *ptr; BUFFER command, pattern; @@ -211,7 +210,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 (unsigned long type) +static void delete_hooks (long type) { HOOK *h; HOOK *prev; @@ -345,7 +344,7 @@ void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type) } static int -mutt_addr_hook (char *path, size_t pathlen, unsigned long type, CONTEXT * ctx, +mutt_addr_hook (char *path, ssize_t pathlen, unsigned long type, CONTEXT * ctx, HEADER * hdr) { HOOK *hook; @@ -365,7 +364,7 @@ mutt_addr_hook (char *path, size_t pathlen, unsigned long type, CONTEXT * ctx, return -1; } -void mutt_default_save (char *path, size_t pathlen, HEADER * hdr) +void mutt_default_save (char *path, ssize_t pathlen, HEADER * hdr) { *path = 0; if (mutt_addr_hook (path, pathlen, M_SAVEHOOK, Context, hdr) != 0) { @@ -391,7 +390,7 @@ void mutt_default_save (char *path, size_t pathlen, HEADER * hdr) } } -void mutt_select_fcc (char *path, size_t pathlen, HEADER * hdr) +void mutt_select_fcc (char *path, ssize_t pathlen, HEADER * hdr) { address_t *adr; char buf[_POSIX_PATH_MAX];