Kaydet (Commit) 79b334ba authored tarafından Tim Peters's avatar Tim Peters

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.
üst 78542ef8
...@@ -80,7 +80,7 @@ def recursedown(dirname): ...@@ -80,7 +80,7 @@ def recursedown(dirname):
return bad return bad
def fix(filename): def fix(filename):
## dbg('fix(' + `filename` + ')\n') ## dbg('fix(' + `filename` + ')\n')
try: try:
f = open(filename, 'r') f = open(filename, 'r')
except IOError, msg: except IOError, msg:
......
...@@ -42,8 +42,8 @@ def show(total, d, prefix): ...@@ -42,8 +42,8 @@ def show(total, d, prefix):
tsub, dsub = d[key] tsub, dsub = d[key]
list.append((tsub, key)) list.append((tsub, key))
if tsub is not None: sum = sum + tsub if tsub is not None: sum = sum + tsub
## if sum < total: ## if sum < total:
## list.append((total - sum, os.curdir)) ## list.append((total - sum, os.curdir))
list.sort() list.sort()
list.reverse() list.reverse()
width = len(`list[0][0]`) width = len(`list[0][0]`)
......
...@@ -116,7 +116,7 @@ def recursedown(dirname): ...@@ -116,7 +116,7 @@ def recursedown(dirname):
return bad return bad
def fix(filename): def fix(filename):
## dbg('fix(' + `filename` + ')\n') ## dbg('fix(' + `filename` + ')\n')
if filename == '-': if filename == '-':
# Filter mode # Filter mode
f = sys.stdin f = sys.stdin
...@@ -226,15 +226,15 @@ def initfixline(): ...@@ -226,15 +226,15 @@ def initfixline():
def fixline(line): def fixline(line):
global Program global Program
## print '-->', `line` ## print '-->', `line`
i = 0 i = 0
while i < len(line): while i < len(line):
i = Program.search(line, i) i = Program.search(line, i)
if i < 0: break if i < 0: break
found = Program.group(0) found = Program.group(0)
## if Program is InsideCommentProgram: print '...', ## if Program is InsideCommentProgram: print '...',
## else: print ' ', ## else: print ' ',
## print found ## print found
if len(found) == 2: if len(found) == 2:
if found == '/*': if found == '/*':
Program = InsideCommentProgram Program = InsideCommentProgram
...@@ -249,14 +249,14 @@ def fixline(line): ...@@ -249,14 +249,14 @@ def fixline(line):
i = i + n i = i + n
continue continue
if NotInComment.has_key(found): if NotInComment.has_key(found):
## print 'Ignored in comment:', ## print 'Ignored in comment:',
## print found, '-->', subst ## print found, '-->', subst
## print 'Line:', line, ## print 'Line:', line,
subst = found subst = found
## else: ## else:
## print 'Substituting in comment:', ## print 'Substituting in comment:',
## print found, '-->', subst ## print found, '-->', subst
## print 'Line:', line, ## print 'Line:', line,
line = line[:i] + subst + line[i+n:] line = line[:i] + subst + line[i+n:]
n = len(subst) n = len(subst)
i = i + n i = i + n
......
...@@ -30,7 +30,7 @@ def process(arg): ...@@ -30,7 +30,7 @@ def process(arg):
f.close() f.close()
i = string.find(data, OLD_NOTICE) i = string.find(data, OLD_NOTICE)
if i < 0: if i < 0:
## print "No old notice in", arg ## print "No old notice in", arg
return return
data = data[:i] + NEW_NOTICE + data[i+len(OLD_NOTICE):] data = data[:i] + NEW_NOTICE + data[i+len(OLD_NOTICE):]
new = arg + ".new" new = arg + ".new"
......
...@@ -78,7 +78,7 @@ def recursedown(dirname): ...@@ -78,7 +78,7 @@ def recursedown(dirname):
return bad return bad
def fix(filename): def fix(filename):
## dbg('fix(' + `filename` + ')\n') ## dbg('fix(' + `filename` + ')\n')
try: try:
f = open(filename, 'r') f = open(filename, 'r')
except IOError, msg: except IOError, msg:
......
...@@ -87,7 +87,7 @@ def recursedown(dirname): ...@@ -87,7 +87,7 @@ def recursedown(dirname):
return bad return bad
def fix(filename): def fix(filename):
## dbg('fix(' + `filename` + ')\n') ## dbg('fix(' + `filename` + ')\n')
try: try:
f = open(filename, 'r') f = open(filename, 'r')
except IOError, msg: except IOError, msg:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment