summaryrefslogtreecommitdiff
path: root/src/lua-script/cify.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua-script/cify.lua')
-rw-r--r--src/lua-script/cify.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lua-script/cify.lua b/src/lua-script/cify.lua
new file mode 100644
index 0000000..153feb3
--- /dev/null
+++ b/src/lua-script/cify.lua
@@ -0,0 +1,13 @@
+-- "C"-ify a lua program
+
+output_file = io.open(arg[2], 'w')
+
+
+output_file:write('const char *argent_script =\n')
+
+for line in io.lines(arg[1]) do
+ output_file:write(' "'..line..'\\n"\n')
+end
+
+output_file:write(';')
+output_file:close()