projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use more ad-hoc list handling function, and avoid to muck with ->next
[apps/madmutt.git]
/
hook.c
diff --git
a/hook.c
b/hook.c
index
bb8e30f
..
aa0d478
100644
(file)
--- a/
hook.c
+++ b/
hook.c
@@
-25,6
+25,7
@@
#include <lib-lib/rx.h>
#include "mutt.h"
#include <lib-lib/rx.h>
#include "mutt.h"
+#include "alias.h"
#include "mx.h"
#include <lib-crypt/crypt.h>
#include "compress.h"
#include "mx.h"
#include <lib-crypt/crypt.h>
#include "compress.h"
@@
-411,30
+412,29
@@
void mutt_select_fcc (char *path, ssize_t pathlen, HEADER * hdr)
mutt_pretty_mailbox (path);
}
mutt_pretty_mailbox (path);
}
-static char *_mutt_string_hook (const char *match, int hook)
+static c
onst c
har *_mutt_string_hook (const char *match, int hook)
{
HOOK *tmp = Hooks;
for (; tmp; tmp = tmp->next) {
{
HOOK *tmp = Hooks;
for (; tmp; tmp = tmp->next) {
- if ((tmp->type & hook) && ((match &&
- regexec (tmp->rx.rx, match, 0, NULL,
- 0) == 0) ^ tmp->rx.not))
+ if ((tmp->type & hook)
+ && ((match && regexec(tmp->rx.rx, match, 0, NULL, 0) == 0) ^ tmp->rx.not))
return (tmp->command);
}
return (NULL);
}
return (tmp->command);
}
return (NULL);
}
-char *mutt_charset_hook (const char *chs)
+c
onst c
har *mutt_charset_hook (const char *chs)
{
return _mutt_string_hook (chs, M_CHARSETHOOK);
}
{
return _mutt_string_hook (chs, M_CHARSETHOOK);
}
-char *mutt_iconv_hook (const char *chs)
+c
onst c
har *mutt_iconv_hook (const char *chs)
{
return _mutt_string_hook (chs, M_ICONVHOOK);
}
{
return _mutt_string_hook (chs, M_ICONVHOOK);
}
-char *mutt_crypt_hook (address_t * adr)
+c
onst c
har *mutt_crypt_hook (address_t * adr)
{
return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);
}
{
return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);
}