From: nisikimi Date: Wed, 27 Sep 2006 04:58:16 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: XML-base~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465a498b3034f3cc2511fa8143275ba36dd0b445;p=m17n%2Fm17n-docs.git *** empty log message *** --- 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