From d5e51ae48c54715f371118804432f52965c8d448 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 9 Apr 2004 08:34:42 +0000 Subject: [PATCH] *** empty log message *** --- utils/ja_filter.rb | 12 +++++++++--- utils/usr_filter.rb | 4 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/utils/ja_filter.rb b/utils/ja_filter.rb index 461c3e5..1ddb6bc 100755 --- a/utils/ja_filter.rb +++ b/utils/ja_filter.rb @@ -31,9 +31,14 @@ while gets commentblock(buf) buf = [] - when /\/\*\s.*\*\// # /* comment */ type comment + when /^\/\*\s.*\*\// # /* comment */ type comment if doxy == 1 buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included only in the example code + end + + when /\/\*\s.*\*\// # code + /* comment */ type comment + if doxy == 1 + buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included in the example code else if doxy == 0 commentblock(buf) @@ -41,10 +46,11 @@ while gets print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code end end + when /\/\*{2,3}en.*\*\// #english one liner is omitted when /\/\*\*ja.*\*\// #one liner when /\/\*\*\*ja.*\*\// #one liner - buf.push($_.gsub!(/\/\*+ja/, " ").gsub!(/\*\//, " ")) + buf.push($_.gsub!(/\/\*+ja/, " ").gsub!(/\*\//, " ")).push("\n") when /\/\*\*\s.*\*\// #one liner when /\/\*\*\*\s.*\*\// #one liner buf.push($_.gsub!(/\/\*+/, " ").gsub!(/\*\//, " ")).push("\n") @@ -93,4 +99,4 @@ commentblock(buf) # Local Variables: # coding: euc-jp -# End: \ No newline at end of file +# End: diff --git a/utils/usr_filter.rb b/utils/usr_filter.rb index db8ee0c..05e3fe8 100755 --- a/utils/usr_filter.rb +++ b/utils/usr_filter.rb @@ -13,8 +13,6 @@ def commentblock(buf) while gets -# print "****", $_, "\n" - gsub!("@seealso", "@par See Also:") gsub!("@errors", "@par Errors:") gsub!("@returns", "@par Return value:") @@ -42,7 +40,7 @@ while gets if doxy == 1 buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included in the example code else - if doxy == 0 + if doxy == 0 commentblock(buf) buf = [] print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code -- 1.7.10.4