MCPcopy Create free account
hub / github.com/doldecomp/mkdd / import_c_file

Function import_c_file

tools/decompctx.py:63–74  ·  view source on GitHub ↗
(in_file: str)

Source from the content-addressed store, hash-verified

61
62
63def import_c_file(in_file: str) -> str:
64 in_file = os.path.relpath(in_file, root_dir)
65 deps.append(in_file)
66 out_text = ""
67
68 try:
69 with open(in_file, encoding="utf-8") as file:
70 out_text += process_file(in_file, list(file))
71 except Exception:
72 with open(in_file) as file:
73 out_text += process_file(in_file, list(file))
74 return out_text
75
76
77def process_file(in_file: str, lines: List[str]) -> str:

Callers 2

import_h_fileFunction · 0.85
mainFunction · 0.85

Calls 3

openFunction · 0.85
process_fileFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected