diff options
author | Daniel Lange <DLange@git.local> | 2020-08-27 07:48:10 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-08-27 07:48:10 +0200 |
commit | f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4 (patch) | |
tree | 3ee82b2af2ab3d38b6e4b07f3994516aac72f742 /scripts | |
parent | df568a576f7b44ac5a2b9b7222c7f39d9932f626 (diff) | |
download | debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.gz debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.bz2 debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.zip |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'scripts')
-rw-r--r--[-rwxr-xr-x] | scripts/MakeHeader.py.in (renamed from scripts/MakeHeader.py) | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py.in index 7c48fdd..8a68877 100755..100644 --- a/scripts/MakeHeader.py +++ b/scripts/MakeHeader.py.in @@ -1,9 +1,9 @@ -#!/usr/bin/env python -import os, sys, string, io +#!/usr/bin/env @PYTHON@ +import os, sys, io try: from StringIO import StringIO except ImportError: - from io import StringIO + StringIO = io.StringIO ANY=1 COPY=2 @@ -54,8 +54,10 @@ for line in file.readlines(): elif line.startswith("typedef struct"): state = SKIP elif line[-1] == "{": - out.write( line[:-2].replace("inline", "extern") + ";\n" ) + out.write("extern " + line[:-2].replace("inline ", "") + ";\n") state = SKIP + elif line[-1] == ";": + out.write("extern " + line + "\n") else: out.write( line + "\n") is_blank = False |