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 #!/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$ # $Source$
# #
@ -428,21 +428,21 @@ def get_multi(subj, group)
if UUEncode.is_uuencoded(tbody) if UUEncode.is_uuencoded(tbody)
print " UUDecoding...\n" print " UUDecoding...\n"
if tfile if tfile
mode, filename, tbody = UUEncode.uudecode(tfile, tfileout) tmode, tfilename, tbody = UUEncode.uudecode(tfile, tfileout)
else else
mode, filename, tbody = UUEncode.uudecode(tbody) tmode, tfilename, tbody = UUEncode.uudecode(tbody)
end end
elsif YEnc.is_yencoded(tbody) elsif YEnc.is_yencoded(tbody)
print " YDecoding...\n" print " YDecoding...\n"
begin begin
if tfile if tfile
mode, filename, tbody = YEnc.ydecode(tfile, tfileout) tmode, tfilename, tbody = YEnc.ydecode(tfile, tfileout)
else else
mode, filename, tbody = YEnc.ydecode(tbody) tmode, tfilename, tbody = YEnc.ydecode(tbody)
end end
rescue YencError rescue YencError
# XXX if there is a yenc problem I want the data so I can research it # 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 # XXX return succes even though it's not true
return true return true
rescue PermError rescue PermError
@ -451,7 +451,7 @@ def get_multi(subj, group)
return false return false
end end
end end
if mode == false if tmode == false
print " Decoding failed skipping article...\n" print " Decoding failed skipping article...\n"
return false return false
end end
@ -459,17 +459,17 @@ def get_multi(subj, group)
if tfile if tfile
# horrible cheat to not lose the outputted file # horrible cheat to not lose the outputted file
tbody = tfileout.path tbody = tfileout.path
bodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode") tbodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode")
i = 1 i = 1
while FileTest.exists?("#{bodybase}-#{i}") while FileTest.exists?("#{tbodybase}-#{i}")
i += 1 i += 1
end end
File.move(tbody, "#{bodybase}-#{i}") File.move(tbody, "#{tbodybase}-#{i}")
tbody = "#{bodybase}-#{i}" tbody = "#{tbodybase}-#{i}"
tfile.close tfile.close
tfileout.close(false) tfileout.close(false)
end end
output_data(tsubj, mode, filename, tbody) output_data(tsubj, tmode, tfilename, tbody)
end # thread end end # thread end
@decode_threads.each{ |thr| @decode_threads.each{ |thr|