7 def check_file(filename
):
10 line
= file.readline()
13 if line
[0] == "/" or line
[0] == "*" or line
[0] == "\r" or line
[0] == "\n" or line
[0] == "\t":
15 if line
[:7] == "#ifndef":
16 hg
= "#ifndef " + ("_".join(filename
.split(PATH
)[1].split("/"))[:-2]).upper() + "_H"
18 print "Wrong header guard in " + filename
20 print "Missing header guard in " + filename
27 list = os
.listdir(dir)
29 if os
.path
.isdir(dir+file):
30 if file != "external" and file != "generated":
31 check_dir(dir+file+"/")
32 elif file[-2:] == ".h" and file != "keynames.h":