--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
the attached patch makes RDoc show parsing progress for C files like the
other parsers do.
--
Regards,
Tilman
--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rdoc-parse_c_progress.diff"
diff -aur ruby-1.8.2.orig/lib/rdoc/parsers/parse_c.rb ruby-1.8.2/lib/rdoc/parsers/parse_c.rb
--- ruby-1.8.2.orig/lib/rdoc/parsers/parse_c.rb 2004-09-09 04:48:32.000000000 +0200
+++ ruby-1.8.2/lib/rdoc/parsers/parse_c.rb 2005-01-31 21:38:41.640325968 +0100
@@ -180,6 +180,7 @@
@top_level op_level
@classes ash.new
@file_dir ile.dirname(file_name)
+ @progress stderr unless options.quiet
end
# Extract the classes/modules and methods from a C file
@@ -197,6 +198,13 @@
private
#######
+ def progress(char)
+ unless @options.quiet
+ @progress.print(char)
+ @progress.flush
+ end
+ end
+
# remove lines that are commented out that might otherwise get
# picked up when scanning for classes and methods
@@ -205,6 +213,8 @@
end
def handle_class_module(var_name, class_mod, class_name, parent, in_module)
+ progress(class_mod[0, 1])
+
parent_name known_classes[parent] || parent
if in_module
@@ -364,6 +374,7 @@
def handle_method(type, var_name, meth_name,
meth_body, param_count, source_file il)
+ progress(".")
@stats.num_methods +
class_name known_classes[var_name]
--rwEMma7ioTxnRzrJ--