def load (path, includes): if (path in loaded_files): return
loaded_files.append (path)
skipping = ''
with open(path) as f:
lines = f.readlines() for line in lines: if skipping:
match = re.search (r"^#endif /\* (.*) \*/$", line) if match and match.group(1) == skipping:
skipping = '' continue
match = re.search (r"^#define (.*)$", line) if match and match.group(1) in check_defines:
check_defines.remove (match.group(1))
print (line, end="") continue
match = re.search (r"^#ifdef (.*)$", line) if match and match.group(1) in check_defines:
skipping = match.group(1) continue
match = re.search (r"^#include \"(.*)\"$", line) if match: for dir in [os.path.dirname(path)] + includes:
file = os.path.join (dir, match.group (1)) ifnot os.path.isfile (file): continue
load (file, includes) break else:
print (line, end="")
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.