diff options
Diffstat (limited to 'tools/addheader')
-rw-r--r-- | tools/addheader/addheader.py | 10 |
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() |