1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc/parsers/parse_c.rb: show parsing progress for C files.

[ruby-core:4341] (based on Tilman Sauerbeck's patch)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-05-12 07:00:37 +00:00
parent 72a6794070
commit bf4eb61819
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Thu May 12 15:50:56 2005 Tilman Sauerbeck <tilman@code-monkey.de>
* lib/rdoc/parsers/parse_c.rb: show parsing progress for C files.
[ruby-core:4341]
Thu May 12 09:53:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu May 12 09:53:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* version.c (ruby_show_version): flush for non-tty stdout. * version.c (ruby_show_version): flush for non-tty stdout.

View file

@ -198,6 +198,13 @@ module RDoc
private private
####### #######
def progress(char)
unless @options.quiet
$stderr.print(char)
$stderr.flush
end
end
# remove lines that are commented out that might otherwise get # remove lines that are commented out that might otherwise get
# picked up when scanning for classes and methods # picked up when scanning for classes and methods
@ -206,6 +213,8 @@ module RDoc
end end
def handle_class_module(var_name, class_mod, class_name, parent, in_module) def handle_class_module(var_name, class_mod, class_name, parent, in_module)
progress(class_mod[0, 1])
parent_name = @known_classes[parent] || parent parent_name = @known_classes[parent] || parent
if in_module if in_module
@ -478,6 +487,8 @@ module RDoc
def handle_method(type, var_name, meth_name, def handle_method(type, var_name, meth_name,
meth_body, param_count, source_file = nil) meth_body, param_count, source_file = nil)
progress(".")
@stats.num_methods += 1 @stats.num_methods += 1
class_name = @known_classes[var_name] class_name = @known_classes[var_name]