summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-01-31 00:52:08 -0200
committerHisham Muhammad <hisham@gobolinux.org>2018-02-17 15:30:15 -0200
commit0cbdf8ba271d874d2efd3171cff0d4ebeabc087f (patch)
treecf613264b0935230b21ac46aeba34501ba152fca /scripts
parentcf0c074cc8c7e6fe858d621ea59976d2159d51bf (diff)
Implemented various performance counters
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/MakeHeader.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py
index 4841bdac..2393afc2 100755
--- a/scripts/MakeHeader.py
+++ b/scripts/MakeHeader.py
@@ -12,6 +12,7 @@ ANY=1
COPY=2
SKIP=3
SKIPONE=4
+COPYDEFINE=5
state = ANY
static = 0
@@ -49,7 +50,11 @@ for line in file.readlines():
elif len(line) > 1:
static = 0
equals = line.find(" = ")
- if line[-3:] == "= {":
+ if line[:7] == "#define":
+ if line[-1:] == "\\":
+ state = COPYDEFINE
+ out.write( line + "\n")
+ elif line[-3:] == "= {":
out.write( "extern " + line[:-4] + ";\n" )
state = SKIP
elif equals != -1:
@@ -60,7 +65,7 @@ for line in file.readlines():
out.write( line[:-2].replace("inline", "extern") + ";\n" )
state = SKIP
else:
- out.write( line + "\n")
+ out.write( line + "\n" )
is_blank = False
elif line == "":
if not is_blank:
@@ -69,6 +74,11 @@ for line in file.readlines():
else:
out.write( line + "\n")
is_blank = False
+ elif state == COPYDEFINE:
+ is_blank = False
+ out.write( line + "\n")
+ if line[-1:] != "\\":
+ state = ANY
elif state == COPY:
is_blank = False
if line == "}*/":

© 2014-2024 Faster IT GmbH | imprint | privacy policy