#include "crypt.h"
#include "pattern.h"
+#if 0
typedef struct hook_t {
int type; /* hook type */
rx_t rx; /* regular expression */
static hook_t *Hooks = NULL;
static unsigned long current_hook_type = 0;
-
-/* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
-void mutt_folder_hook (char *path)
-{
- lua_State *L = luaM_getruntime();
- lua_getglobal(L, "mod_core"); /* push mod_core 1 */
- lua_getfield(L, -1, "folder_hook"); /* push folder_hook() 2 */
- if (lua_isfunction(L, -1)) {
- lua_pushstring(L, LastFolder);
- lua_pushstring(L, CurrentFolder);
- if (lua_pcall(L, 2, 0, 0)) {
- lua_pop(L, 3);
- return;
- }
- }
- lua_pop(L, 2);
-}
+#endif
void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type)
{
+#if 0
BUFFER err, token;
hook_t *hook;
char buf[STRING];
}
p_delete(&token.data);
current_hook_type = 0;
+#endif
+}
+
+/* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
+void mutt_folder_hook (char *path)
+{
+ lua_State *L = luaM_getruntime();
+ lua_getglobal(L, "mod_core"); /* push mod_core 1 */
+ lua_getfield(L, -1, "folder_hook"); /* push folder_hook() 2 */
+ if (lua_isfunction(L, -1)) {
+ lua_pushstring(L, LastFolder);
+ lua_pushstring(L, CurrentFolder);
+ if (lua_pcall(L, 2, 0, 0)) {
+ lua_pop(L, 3);
+ return;
+ }
+ }
+ lua_pop(L, 2);
}
void mutt_default_save (char *path, ssize_t pathlen, HEADER * hdr)
*path = 0;
}
}
-
-void mutt_select_fcc (char *path, ssize_t pathlen, HEADER * hdr)
-{
- m_strcpy(path, pathlen, NONULL(MAlias.record));
- mutt_pretty_mailbox(path);
-}