summaryrefslogtreecommitdiff
path: root/etc/def.lua
diff options
context:
space:
mode:
Diffstat (limited to 'etc/def.lua')
-rw-r--r--etc/def.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/def.lua b/etc/def.lua
new file mode 100644
index 00000000..736e32cd
--- /dev/null
+++ b/etc/def.lua
@@ -0,0 +1,9 @@
+-- def.lua
+-- make .DEF file from lua.h
+-- usage: lua def.lua <lua.h >lua.def
+
+T=read"*a"
+write("LIBRARY LUA\nVERSION ")
+gsub(T,"LUA_VERSION.-(%d+%.%d+)",write)
+write("\nEXPORTS\n")
+gsub(T,"(lua_%w+)%s+%(",function (f) write(" ",f,"\n") end)