From e7e3062672651b46d2ed726aeadaebf8ca868606 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 15 Jul 2018 06:54:45 +0430 Subject: update --- main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index f5b99c1..a3ebb2b 100755 --- a/main.py +++ b/main.py @@ -82,12 +82,10 @@ def get_full_path(path, name): def get_elem_count(elem, elems): if "count" in elem.attrib: - #print(elem.attrib["count"]) try: if str(int(elem.attrib["count"])) == elem.attrib["count"]: return int(elem.attrib["count"]) except ValueError: - #print(elem.attrib["count"][6:]) return -1 else: return 1 @@ -152,6 +150,7 @@ class CodeGen(object): read_source.write("\n// automatically generated by faultrieber\n") read_source.write("// " + self.dnt + "\n") read_source.write(text.header_list) + read_source.write('#include "./structs.h"\n') inline = "inline " if self.argparser.args.inline else "" static = "static " if self.argparser.args.static else "" for elem in self.def_elems+ self.read_elems: @@ -180,7 +179,6 @@ class CodeGen(object): count_name_str = child.attrib["count"][6:] for child2 in elem: if child2.tag == count_name_str: replacement = "dummy." + child2.attrib["name"] - print(count_name_str) for_dummy_assign = "dummy." + child.attrib["name"] + "[i]" + "=" +ref_node_name+"_ins" + ";\n" read_source.write(text.simple_loop.replace("YYY", for_dummy_declare+for_read+for_dummy_assign).replace("XXX", replacement)) else: @@ -198,7 +196,6 @@ class CodeGen(object): count_name_str = child.attrib["count"][6:] for child2 in elem: if child2.tag == count_name_str: replacement = "dummy." + child2.attrib["name"] - print(count_name_str) for_dummy_assign = "dummy." + child.attrib["name"] + "[i]" + "=" +pointer_remover(ref_node_name)+"_ins" + ";\n" read_source.write(text.simple_loop.replace("YYY", for_dummy_declare+for_read+for_dummy_assign).replace("XXX", replacement)) else: -- cgit v1.2.3