projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
let's drop qdbm.
[apps/madmutt.git]
/
lib-lua
/
runtime.c
diff --git
a/lib-lua/runtime.c
b/lib-lua/runtime.c
index
923222b
..
b90d460
100644
(file)
--- a/
lib-lua/runtime.c
+++ b/
lib-lua/runtime.c
@@
-20,8
+20,13
@@
#include <lib-lib/lib-lib.h>
#include <lib-lua/lib-lua.h>
#include <lib-lib/lib-lib.h>
#include <lib-lua/lib-lua.h>
-#include "../alias.h"
#include "../mutt.h"
#include "../mutt.h"
+#include "../alias.li"
+#include "../buffy.li"
+#include "../charset.li"
+#include "../crypt.li"
+#include "../score.li"
+#include <lib-sys/mutt_ssl.li>
static lua_State *L;
static lua_State *L;
@@
-36,9
+41,15
@@
void luaM_initialize(void)
{LUA_STRLIBNAME, luaopen_string},
{LUA_MATHLIBNAME, luaopen_math},
{LUA_DBLIBNAME, luaopen_debug},
{LUA_STRLIBNAME, luaopen_string},
{LUA_MATHLIBNAME, luaopen_math},
{LUA_DBLIBNAME, luaopen_debug},
- {"
MCore", luaopen_MC
ore},
+ {"
mod_core", luaopen_mod_c
ore},
{"MTransport", luaopen_MTransport},
{"MAlias", luaopen_MAlias},
{"MTransport", luaopen_MTransport},
{"MAlias", luaopen_MAlias},
+ {"mod_cset", luaopen_mod_cset},
+ {"mod_mime", luaopen_mod_mime},
+ {"mod_buffy", luaopen_mod_buffy},
+ {"mod_ssl", luaopen_mod_ssl},
+ {"mod_crypt", luaopen_mod_crypt},
+ {"mod_score", luaopen_mod_score},
};
int i;
};
int i;
@@
-56,6
+67,10
@@
void luaM_shutdown(void)
lua_close(L);
}
lua_close(L);
}
+lua_State *luaM_getruntime(void)
+{
+ return L;
+}
int luaM_dofile(const char *filename)
{
int luaM_dofile(const char *filename)
{
@@
-122,13
+137,6
@@
const char *luaM_checkrx(lua_State *Ls, int narg)
return s;
}
return s;
}
-char *luaM_pathnew(const char *val)
-{
- char path[PATH_MAX];
- _mutt_expand_path(path, sizeof(path), val, 0);
- return m_strdup(path);
-}
-
rx_t *luaM_rxnew(const char *val)
{
if (m_strisempty(val))
rx_t *luaM_rxnew(const char *val)
{
if (m_strisempty(val))
@@
-137,3
+145,17
@@
rx_t *luaM_rxnew(const char *val)
return rx_compile(val, mutt_which_case(val));
}
return rx_compile(val, mutt_which_case(val));
}
+char *luaM_pathnew(const char *val)
+{
+ char path[_POSIX_PATH_MAX];
+ _mutt_expand_path(path, sizeof(path), val, 0);
+ return m_strdup(path);
+}
+
+
+void luaM_pushaddr(lua_State *Ls, address_t *addr)
+{
+ char s[HUGE_STRING] = "";
+ rfc822_addrcat(s, sizeof(s), addr, 0);
+ lua_pushstring(Ls, s);
+}