X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lua%2Flib-lua.h;h=2a96a7debc311818503536f3d757ae5c4161f5c0;hp=0a4d8597feadbe5fed0ce84530482bd329c8bbb6;hb=dc726add2e8fe52be1f6859ea7cbe4651498eeb8;hpb=627215940cb13e74999ab56375dbb615e22f23bd diff --git a/lib-lua/lib-lua.h b/lib-lua/lib-lua.h index 0a4d859..2a96a7d 100644 --- a/lib-lua/lib-lua.h +++ b/lib-lua/lib-lua.h @@ -21,8 +21,42 @@ #define MUTT_LIB_LUA_LIB_LUA_H #ifdef HAVE_CONFIG_H -# include "../config.h" +# include #endif +#include +#include +#include + +#include +#include "lua-token.h" + +/* possible arguments to set_quadoption() */ +typedef enum quadopt_t { + M_NO, + M_YES, + M_ASKNO, + M_ASKYES +} quadopt_t; + +void luaM_initialize(void); +void luaM_shutdown(void); + +lua_State *luaM_getruntime(void); + +int luaM_dofile(const char *filename); +int luaM_wrap(void (*errfun)(const char *fmt, ...) + __attribute__((format(printf, 1, 2))), + int status); + +quadopt_t luaM_checkquadopt(lua_State *L, int narg); +void luaM_pushquadopt(lua_State *Ls, int val); + +const char *luaM_checkrx(lua_State *Ls, int narg); +rx_t *luaM_rxnew(const char* val); +char *luaM_pathnew(const char *val); +void luaM_pushaddr(lua_State *Ls, address_t *addr); + +#include "madmutt.li" #endif