mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
transcode-tblgen.rb: send verbose messages to STDOUT
This commit is contained in:
parent
6d07785127
commit
365df8d351
Notes:
git
2020-12-29 17:45:45 +09:00
1 changed files with 7 additions and 7 deletions
|
@ -724,7 +724,7 @@ def citrus_decode_mapsrc(ces, csid, mapsrcs)
|
|||
path = File.join(*path)
|
||||
path << ".src"
|
||||
path[path.rindex('/')] = '%'
|
||||
STDERR.puts 'load mapsrc %s' % path if VERBOSE_MODE
|
||||
STDOUT.puts 'load mapsrc %s' % path if VERBOSE_MODE
|
||||
open(path, 'rb') do |f|
|
||||
f.each_line do |l|
|
||||
break if /^BEGIN_MAP/ =~ l
|
||||
|
@ -824,9 +824,9 @@ TRANSCODE_GENERATED_TRANSCODER_CODE = ''.dup
|
|||
def transcode_tbl_only(from, to, map, valid_encoding=UnspecifiedValidEncoding)
|
||||
if VERBOSE_MODE
|
||||
if from.empty? || to.empty?
|
||||
STDERR.puts "converter for #{from.empty? ? to : from}"
|
||||
STDOUT.puts "converter for #{from.empty? ? to : from}"
|
||||
else
|
||||
STDERR.puts "converter from #{from} to #{to}"
|
||||
STDOUT.puts "converter from #{from} to #{to}"
|
||||
end
|
||||
end
|
||||
id_from = from.tr('^0-9A-Za-z', '_')
|
||||
|
@ -905,7 +905,7 @@ End
|
|||
end
|
||||
|
||||
def transcode_generate_node(am, name_hint=nil)
|
||||
STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE
|
||||
STDOUT.puts "converter for #{name_hint}" if VERBOSE_MODE
|
||||
am.gennode(TRANSCODE_GENERATED_BYTES_CODE, TRANSCODE_GENERATED_WORDS_CODE, name_hint)
|
||||
''
|
||||
end
|
||||
|
@ -1066,14 +1066,14 @@ if __FILE__ == $0
|
|||
if old_signature == chk_signature
|
||||
now = Time.now
|
||||
File.utime(now, now, output_filename)
|
||||
STDERR.puts "already up-to-date: #{output_filename}" if VERBOSE_MODE
|
||||
STDOUT.puts "already up-to-date: #{output_filename}" if VERBOSE_MODE
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
if VERBOSE_MODE
|
||||
if output_filename
|
||||
STDERR.puts "generating #{output_filename} ..."
|
||||
STDOUT.puts "generating #{output_filename} ..."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1111,7 +1111,7 @@ if __FILE__ == $0
|
|||
File.rename(new_filename, output_filename)
|
||||
tms = Process.times
|
||||
elapsed = Time.now - start_time
|
||||
STDERR.puts "done. (#{'%.2f' % tms.utime}user #{'%.2f' % tms.stime}system #{'%.2f' % elapsed}elapsed)" if VERBOSE_MODE
|
||||
STDOUT.puts "done. (#{'%.2f' % tms.utime}user #{'%.2f' % tms.stime}system #{'%.2f' % elapsed}elapsed)" if VERBOSE_MODE
|
||||
else
|
||||
print result
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue