From e3abea91efc9a6c326115eca1049f069702d4e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Sat, 21 Jan 2017 14:52:38 +0100 Subject: [PATCH] Add awk script to automatically generate emulation.h from CSV. --- src/emulation.awk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/emulation.awk diff --git a/src/emulation.awk b/src/emulation.awk new file mode 100644 index 0000000..c351d95 --- /dev/null +++ b/src/emulation.awk @@ -0,0 +1,19 @@ +BEGIN { + FS="," + print "#ifndef _EMULATION_H_" + print "#define _EMULATION_H_" +} + +/^OP_/{ + if ($5 != "NULL") { + emuls[$5] = $5 + } +} + +END { + for (i in emuls) + printf "void %s(rk65c02emu_t *, instruction_t *)\n",i + + print "#endif /* _EMULATION_H_ */" +} +