summaryrefslogtreecommitdiff
path: root/tools/addheader
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-02 20:26:12 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-02 20:26:12 +0200
commit0a5472e697dee57956c2583a50bc5cf5faada5d8 (patch)
tree62e9d9616c9529cee5c6c85e18415bc8745966fe /tools/addheader
parent48f057ea816f4ae4b917cb110e399fcbfb4234a0 (diff)
Remove trailing spaces
Diffstat (limited to 'tools/addheader')
-rw-r--r--tools/addheader/addheader.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/addheader/addheader.py b/tools/addheader/addheader.py
index 0252eb396d..d040d8b5d6 100644
--- a/tools/addheader/addheader.py
+++ b/tools/addheader/addheader.py
@@ -38,7 +38,7 @@ while (fname!=""):
l = fr.readline()
bc=False
fsingle = fname.strip()
-
+
if (fsingle.find("/")!=-1):
fsingle=fsingle[fsingle.rfind("/")+1:]
rep_fl="$filename"
@@ -51,19 +51,19 @@ while (fname!=""):
elif (len_fl<len_fi):
for x in range(len_fi-len_fl):
rep_fl+=" "
- if (header.find(rep_fl)!=-1):
+ if (header.find(rep_fl)!=-1):
text=header.replace(rep_fl,rep_fi)
else:
text=header.replace("$filename",fsingle)
-
-
+
+
while (l!=""):
if ((l.find("//")!=0 and l.find("/*")!=0 and l.strip()!="") or bc):
text+=l
bc=True
l=fr.readline()
- fr.close()
+ fr.close()
fr=open(fname.strip(),"wb")
fr.write(text)
fr.close()