forked from OpenSDV/Linux_Kernel_map4vehicle
+latin1
This commit is contained in:
parent
9e851e582e
commit
156d98c74c
|
@ -520,8 +520,12 @@ def digraph_print(dg, starts=None, dst_fn=None, sort=False):
|
||||||
|
|
||||||
|
|
||||||
def cflow_preprocess(a):
|
def cflow_preprocess(a):
|
||||||
with open(a, 'r') as f:
|
with open(a, 'rb') as f:
|
||||||
for s in f:
|
for s in f:
|
||||||
|
try:
|
||||||
|
s = s.decode('utf-8')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
s = s.decode('latin1')
|
||||||
# treat struct like function
|
# treat struct like function
|
||||||
s = re.sub(r"^static struct (.*) = ", r"\1()", s)
|
s = re.sub(r"^static struct (.*) = ", r"\1()", s)
|
||||||
s = re.sub(r"^static struct (.*)\[\] = ", r"\1()", s)
|
s = re.sub(r"^static struct (.*)\[\] = ", r"\1()", s)
|
||||||
|
|
Loading…
Reference in New Issue