mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
remove double underscores
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4bc044c982
commit
a9a5a69b73
5 changed files with 23 additions and 11 deletions
|
@ -3,9 +3,11 @@
|
|||
import os
|
||||
import re
|
||||
|
||||
ifndef = re.compile("#ifndef \_(.*)\_H\_")
|
||||
defn = re.compile("#define \_(.*)\_H\_")
|
||||
endif = re.compile("#endif /\* \_(.*)\_H\_")
|
||||
ifndef = re.compile("#ifndef \_(.*)\_H\_")
|
||||
doubleu = re.compile("#(.*) (.*)\_\_H\_")
|
||||
#doubleu2 = re.compile("#define (.*)\_\_H\_")
|
||||
defn = re.compile("#define \_(.*)\_H\_")
|
||||
endif = re.compile("#endif /\* \_(.*)\_H\_")
|
||||
|
||||
|
||||
def fix_hdr(file):
|
||||
|
@ -16,6 +18,16 @@ def fix_hdr(file):
|
|||
line = ins.readline()
|
||||
found = False
|
||||
while line:
|
||||
m = doubleu.search(line)
|
||||
if m:
|
||||
ous.write("#")
|
||||
ous.write(m.group(1))
|
||||
ous.write(" ")
|
||||
ous.write(m.group(2))
|
||||
ous.write("_H_\n")
|
||||
line = ins.readline()
|
||||
found = True
|
||||
continue
|
||||
m = ifndef.search(line)
|
||||
if m:
|
||||
print m.group(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue