summaryrefslogtreecommitdiff
path: root/im/src/lua5/imlua_avi.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /im/src/lua5/imlua_avi.c
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'im/src/lua5/imlua_avi.c')
-rwxr-xr-xim/src/lua5/imlua_avi.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/im/src/lua5/imlua_avi.c b/im/src/lua5/imlua_avi.c
new file mode 100755
index 0000000..f2cd7f4
--- /dev/null
+++ b/im/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);
+}