just let all variables in the thread start with a 't'

This commit is contained in:
Ward Wouts 2005-02-02 09:25:12 +00:00
parent 3767681c02
commit b39756813c

View file

@ -1,6 +1,6 @@
#!/usr/local/bin/ruby -w
# $Dwarf: ripnews.rb,v 1.95 2005/02/01 22:09:22 ward Exp $
# $Dwarf: ripnews.rb,v 1.96 2005/02/02 09:11:28 ward Exp $
# $Source$
#
@ -428,21 +428,21 @@ def get_multi(subj, group)
if UUEncode.is_uuencoded(tbody)
print " UUDecoding...\n"
if tfile
mode, filename, tbody = UUEncode.uudecode(tfile, tfileout)
tmode, tfilename, tbody = UUEncode.uudecode(tfile, tfileout)
else
mode, filename, tbody = UUEncode.uudecode(tbody)
tmode, tfilename, tbody = UUEncode.uudecode(tbody)
end
elsif YEnc.is_yencoded(tbody)
print " YDecoding...\n"
begin
if tfile
mode, filename, tbody = YEnc.ydecode(tfile, tfileout)
tmode, tfilename, tbody = YEnc.ydecode(tfile, tfileout)
else
mode, filename, tbody = YEnc.ydecode(tbody)
tmode, tfilename, tbody = YEnc.ydecode(tbody)
end
rescue YencError
# XXX if there is a yenc problem I want the data so I can research it
output_data(subj, 0600, "YencProblem", tbody)
output_data(tsubj, 0600, "YencProblem", tbody)
# XXX return succes even though it's not true
return true
rescue PermError
@ -451,7 +451,7 @@ def get_multi(subj, group)
return false
end
end
if mode == false
if tmode == false
print " Decoding failed skipping article...\n"
return false
end
@ -459,17 +459,17 @@ def get_multi(subj, group)
if tfile
# horrible cheat to not lose the outputted file
tbody = tfileout.path
bodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode")
tbodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode")
i = 1
while FileTest.exists?("#{bodybase}-#{i}")
while FileTest.exists?("#{tbodybase}-#{i}")
i += 1
end
File.move(tbody, "#{bodybase}-#{i}")
tbody = "#{bodybase}-#{i}"
File.move(tbody, "#{tbodybase}-#{i}")
tbody = "#{tbodybase}-#{i}"
tfile.close
tfileout.close(false)
end
output_data(tsubj, mode, filename, tbody)
output_data(tsubj, tmode, tfilename, tbody)
end # thread end
@decode_threads.each{ |thr|