aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-07-21 11:41:40 +0000
committerbloodstalker <thabogre@gmail.com>2018-07-21 11:41:40 +0000
commit2c2c46f481ea93cc8292319b13fc7ad0ea08232f (patch)
treec831cb28b43f161ba827c2838ffc084d19113a20 /main.py
parentupdate (diff)
downloadfaultreiber-2c2c46f481ea93cc8292319b13fc7ad0ea08232f.tar.gz
faultreiber-2c2c46f481ea93cc8292319b13fc7ad0ea08232f.zip
update
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.py b/main.py
index 6e71d9a..e331e1c 100755
--- a/main.py
+++ b/main.py
@@ -286,11 +286,14 @@ class CodeGen(object):
if self.argparser.args.datetime: struct_source.write("// " + self.dnt + "\n")
struct_source.write(text.header_guard_begin.replace("XXX", "structs".upper()))
struct_source.write(text.header_inttype)
+ struct_source.write(text.c_read_leb_u_def + "\n")
+ struct_source.write(text.c_read_leb_s_def + "\n")
+ struct_source.write(text.c_read_leb_macro_defs + "\n")
if self.argparser.args.structsinclude:
copy(self.argparser.args.structsinclude, self.argparser.args.outdir)
pos = self.argparser.args.structsinclude.rfind("/")
sub = self.argparser.args.structsinclude[pos+1:]
- struct_source.write('#include "' + sub + '"\n')
+ struct_source.write('#include "' + sub + '"\n\n')
for child in self.def_elems + self.read_elems:
struct_source.write("typedef struct {\n")
for childer in child:
@@ -308,7 +311,6 @@ class CodeGen(object):
struct_source.write(text.pragma_endif)
struct_source.write(text.last_comment)
-
def gen_struct_header(self):
struct_source = open(get_full_path(self.argparser.args.outdir, "structs.h"), "w")
struct_source_c = open(get_full_path(self.argparser.args.outdir, "structs.c"), "w")