summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/fixcid.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-17 09:13:33 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-17 09:13:33 (GMT)
commit79b334ba55f3d0ab7e8f453fe1948f609a3fc6e0 (patch)
tree94070cf4c86d9819a1d59e6f316d19f08326f12d /Tools/scripts/fixcid.py
parent78542ef830e53bbb505cf83acc75697121b756cc (diff)
downloadcpython-79b334ba55f3d0ab7e8f453fe1948f609a3fc6e0.zip
cpython-79b334ba55f3d0ab7e8f453fe1948f609a3fc6e0.tar.gz
cpython-79b334ba55f3d0ab7e8f453fe1948f609a3fc6e0.tar.bz2
Hand repair of cases where reindent changed lines of the form
\t\t\t\t\treal code ##\t\t\t\t\tunused code \t\t\t\t\treal code via untabifying and shifting the real code left. Semantically the same but made the intent of the commented-out-in-column-0 unused code unclear. The exact same unused code appears to have gotten copied from file to file over the years.
Diffstat (limited to 'Tools/scripts/fixcid.py')
-rwxr-xr-xTools/scripts/fixcid.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Tools/scripts/fixcid.py b/Tools/scripts/fixcid.py
index 836ceed..6f674c6 100755
--- a/Tools/scripts/fixcid.py
+++ b/Tools/scripts/fixcid.py
@@ -116,7 +116,7 @@ def recursedown(dirname):
return bad
def fix(filename):
-## dbg('fix(' + `filename` + ')\n')
+## dbg('fix(' + `filename` + ')\n')
if filename == '-':
# Filter mode
f = sys.stdin
@@ -226,15 +226,15 @@ def initfixline():
def fixline(line):
global Program
-## print '-->', `line`
+## print '-->', `line`
i = 0
while i < len(line):
i = Program.search(line, i)
if i < 0: break
found = Program.group(0)
-## if Program is InsideCommentProgram: print '...',
-## else: print ' ',
-## print found
+## if Program is InsideCommentProgram: print '...',
+## else: print ' ',
+## print found
if len(found) == 2:
if found == '/*':
Program = InsideCommentProgram
@@ -249,14 +249,14 @@ def fixline(line):
i = i + n
continue
if NotInComment.has_key(found):
-## print 'Ignored in comment:',
-## print found, '-->', subst
-## print 'Line:', line,
+## print 'Ignored in comment:',
+## print found, '-->', subst
+## print 'Line:', line,
subst = found
-## else:
-## print 'Substituting in comment:',
-## print found, '-->', subst
-## print 'Line:', line,
+## else:
+## print 'Substituting in comment:',
+## print found, '-->', subst
+## print 'Line:', line,
line = line[:i] + subst + line[i+n:]
n = len(subst)
i = i + n