diff options
Diffstat (limited to 'src/windows/identity/ui/makeactiondef.pl')
-rw-r--r-- | src/windows/identity/ui/makeactiondef.pl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/windows/identity/ui/makeactiondef.pl b/src/windows/identity/ui/makeactiondef.pl new file mode 100644 index 0000000..a83325b --- /dev/null +++ b/src/windows/identity/ui/makeactiondef.pl @@ -0,0 +1,29 @@ +#
+
+die "Please specify input and output filenames" if($#ARGV != 1);
+
+open INF, '<', $ARGV[0] or die "Can't open input file";
+open OUF, '>', $ARGV[1] or die "Can't open output file";
+
+print OUF <<EOS;
+#include<khimaira.h>
+
+ khui_action khui_actions[] = {
+EOS
+
+# skip first line
+ <INF>;
+
+while(<INF>) {
+ print OUF "{".$_."},\n";
+}
+
+print OUF <<EOS;
+};
+
+int khui_n_actions = sizeof(khui_actions) / sizeof(khui_action);
+
+EOS
+
+close INF;
+close OUF;
|