diff options
author | scuri <scuri> | 2008-10-17 06:10:15 +0000 |
---|---|---|
committer | scuri <scuri> | 2008-10-17 06:10:15 +0000 |
commit | 5a422aba704c375a307a902bafe658342e209906 (patch) | |
tree | 5005011e086bb863d8fb587ad3319bbec59b2447 /src/lua5/imlua_avi.c |
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'src/lua5/imlua_avi.c')
-rw-r--r-- | src/lua5/imlua_avi.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/lua5/imlua_avi.c b/src/lua5/imlua_avi.c new file mode 100644 index 0000000..f2cd7f4 --- /dev/null +++ b/src/lua5/imlua_avi.c @@ -0,0 +1,44 @@ +/** \file + * \brief AVI format Lua 5 Binding + * + * See Copyright Notice in cd.h + */ + +#include <stdlib.h> +#include <stdio.h> + +#include "im_format_avi.h" + +#include <lua.h> +#include <lauxlib.h> + + +static int imlua_FormatRegisterAVI(lua_State *L) +{ + (void)L; + imFormatRegisterAVI(); + return 0; +} + +static const struct luaL_reg imlib[] = { + {"FormatRegisterAVI", imlua_FormatRegisterAVI}, + {NULL, NULL}, +}; + + +static int imlua_avi_open (lua_State *L) +{ + imFormatRegisterAVI(); + luaL_register(L, "im", imlib); /* leave "im" table at the top of the stack */ + return 1; +} + +int luaopen_imlua_avi(lua_State* L) +{ + return imlua_avi_open(L); +} + +int luaopen_imlua_avi51(lua_State* L) +{ + return imlua_avi_open(L); +} |