From 465a498b3034f3cc2511fa8143275ba36dd0b445 Mon Sep 17 00:00:00 2001 From: nisikimi Date: Wed, 27 Sep 2006 04:58:16 +0000 Subject: [PATCH] *** empty log message *** --- utils/mkman.rb | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/utils/mkman.rb b/utils/mkman.rb index adcaf18..78b857f 100644 --- a/utils/mkman.rb +++ b/utils/mkman.rb @@ -153,6 +153,7 @@ end ### ¥Õ¥¡¥¤¥ëʬ¤± def documentfunc(title, func_text, short_text) + residue = [] func_text.grep(/^\.SS/){|i| #¼«Ê¬¤È¤½¤Î¸å¤í func_rest = func_text[func_text.index(i) ..func_text.size] @@ -172,12 +173,12 @@ def documentfunc(title, func_text, short_text) if short_text.find{|i| i.index(ffname)} brief = short_text[short_text.index(short_text.find{|i| i.index(ffname)}) + 2] documentfunc2(fname, title, func_desc, brief) -# else -# print " Cannot find short desc for " -# print ffname + else # obsolete function ¤Î¾ì¹ç + residue.push(func_desc) end end } + return residue end def documentfunc2 (fname, title, func_desc, brief) @@ -468,20 +469,26 @@ Dir.open(".").each{|filename| short_text = text[sfunctionstart .. text.size - 1] end - if lfunctionstart = text.index(text.find{|i| i == $fdheader}) - if lfunctionend = text.index(text[lfunctionstart+1 .. text.size].find{|i| i =~ /^\.SH/}) + if lfunctionstart = text.index(text.find{|i| i == $fdheader}) + if lfunctionend = text.index(text[lfunctionstart+1 .. text.size].find{|i| i =~ /^\.SH/}) func_text = text[lfunctionstart .. lfunctionend - 1] group_text = text[0 .. lfunctionstart - 1] + text[lfunctionend ..text.size] - else + else func_text = text[lfunctionstart .. text.size] group_text = text[0 .. lfunctionstart - 1] - end + end else func_text = [] group_text = text - end + end + + residue = documentfunc(title, func_text, short_text) + + if residue == [] + else + group_text = group_text + [".SH \"Function Documentation\"\n.PP\n"] + residue + end - documentfunc(title, func_text, short_text) else group_text = text -- 1.7.10.4