btcs

bitcoin script parser/evaluator/compiler/decompiler
git clone git://jb55.com/btcs
Log | Files | Refs | README | LICENSE

commit 3f1e9b98f59275c1738beda5e2a9716f18269bd8
parent 7c6f29cb9d8c873016184f9062e064648779e558
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 25 Oct 2017 11:41:44 -0700

mph-opcodes: generation warning

Diffstat:
Mmph-opcodes | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/mph-opcodes b/mph-opcodes @@ -102,13 +102,21 @@ Vstrs = ",".join(map(str, V)) header = open('oplookup.h', 'w') + + +header.write("/* THIS IS GENERATED FROM mph-opcodes DO NOT EDIT */\n\n") +header.write("#ifndef BCS_OPLOOKUP_H\n") +header.write("#define BCS_OPLOOKUP_H\n\n") + header.write("#include \"misc.h\"\n") header.write("extern const int opcodes_g[{}];\n".format(len(G))) header.write("extern const int opcodes_v[{}];\n".format(len(V))) +header.write("\n#endif /* BCS_OPLOOKUP_H */\n") header.close() cfile = open('oplookup.c', 'w') +cfile.write("/* THIS IS GENERATED FROM mph-opcodes DO NOT EDIT */\n\n") cfile.write("#include \"oplookup.h\"\n".format(Gstrs)) cfile.write("const int opcodes_g[{}] = {{ {} }};\n".format(len(G), Gstrs)) cfile.write("const int opcodes_v[{}] = {{ {} }};\n".format(len(V), Vstrs))