diff options
author | Diogo Ferreira <defer@cyngn.com> | 2015-01-14 11:13:52 +0000 |
---|---|---|
committer | Diogo Ferreira <defer@cyngn.com> | 2015-01-14 11:38:57 +0000 |
commit | 841159c272ac08b1cd5bdef5167a8ce11383fbb5 (patch) | |
tree | d7272ef150e58eaa1acc9ab62cf9e6c0aecbc2da /scripts | |
parent | e1a8535012ab86d3e926bebfb7731dab1eb7320a (diff) | |
download | android_external_htop-stable/cm-13.0-ZNH2KB.tar.gz android_external_htop-stable/cm-13.0-ZNH2KB.tar.bz2 android_external_htop-stable/cm-13.0-ZNH2KB.zip |
htop: Update to 1.0.3HEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0-0004replicant-6.0-0003replicant-6.0-0002replicant-6.0-0001staging/cm-12.1stable/cm-13.0-ZNH5Ystable/cm-13.0-ZNH2KBstable/cm-13.0-ZNH2Kstable/cm-13.0-ZNH0Estable/cm-12.1-YOG7Dstable/cm-12.1-YOG4Pstable/cm-12.1-YOG3Cstable/cm-12.0-YNG4Nstable/cm-12.0-YNG3Cstable/cm-12.0-YNG1TAstable/cm-12.0-YNG1Tstable/cm-12.0-YNG1Ilineage-15.0cm-14.1cm-14.0cm-13.0cm-12.1cm-12.0
Change-Id: I416c44803b3a79c2fd752e342ea113875fa533e0
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/MakeHeader.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py index a84ae74..c0fdc85 100755 --- a/scripts/MakeHeader.py +++ b/scripts/MakeHeader.py @@ -28,8 +28,9 @@ selfheader = '#include "' + name + '.h"' out.write( "/* Do not edit this file. It was automatically generated. */" ) out.write( "" ) -out.write( "#ifndef HEADER_" + name ) -out.write( "#define HEADER_" + name ) +out.write( "#ifndef HEADER_" + os.path.basename(name) ) +out.write( "#define HEADER_" + os.path.basename(name) ) +is_blank = False for line in file.readlines(): line = line[:-1] if state == ANY: @@ -37,6 +38,8 @@ for line in file.readlines(): state = COPY elif line == selfheader: pass + elif line.find("#include") == 0: + pass elif line.find("htop - ") == 0 and line[-2:] == ".c": out.write(line[:-2] + ".h") elif line.find("static ") != -1: @@ -58,14 +61,22 @@ for line in file.readlines(): state = SKIP else: out.write( line ) + is_blank = False + elif line == "": + if not is_blank: + out.write( line ) + is_blank = True else: out.write( line ) + is_blank = False elif state == COPY: + is_blank = False if line == "}*/": state = ANY else: out.write( line ) elif state == SKIP: + is_blank = False if len(line) >= 1 and line[0] == "}": if static == 1: state = SKIPONE @@ -73,6 +84,7 @@ for line in file.readlines(): state = ANY static = 0 elif state == SKIPONE: + is_blank = False state = ANY out.write( "" ) |