pike.git
/
src
/
modules
/
Image
/
mkdoc.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Image/mkdoc.pike:64:
methodM=0; }, "method":lambda(string arg,int line) { if (!classM) return complain("method w/o class"); if (!nowM || methodM!=nowM || methodM->desc || methodM->args || descM==methodM) { if (!classM->methods) classM->methods=({}); classM->methods+=({methodM=nowM=(["decl":({}),"_line":line])}); } methodM->decl+=({stripws(arg)}); descM=0; }, "arg":lambda(string arg,int line) { if (!methodM) return complain("arg w/o method");
-
if (
nowM
!
=argM || !argM)
-
{ if (!
methodM->args) methodM->args=({});
-
methodM->args+=({argM=nowM=(["args":({}),"_line":line])});
}
+
if (!methodM->args) methodM->args=({});
+
methodM->args+=({argM=nowM=(["args":({}),"_line":line])});
argM->args+=({arg}); descM=argM; }, "note":lambda(string arg,int line) { if (!lower_nowM()) return complain("note w/o method, class or module"); descM=nowM->note||(nowM->note=(["_line":line])); }, "see":lambda(string arg,int line) {
pike.git/src/modules/Image/mkdoc.pike:178:
} string standard_doc(mapping info,string myprefix) { string res=""; if (info->desc && stripws(info->desc)!="") res+="\n\n<blockquote>\n"+fixdesc(info->desc,myprefix)+ "\n</blockquote>\n";
-
if (info->note)
+
if (info->note
&& info->note->desc
)
res+="\n\n<h4>NOTE</h4>\n<blockquote>\n"+ fixdesc(info->note->desc,myprefix)+"\n</blockquote>\n"; if (info["see also"]) { res+= "\n\n<h4>SEE ALSO</h4>\n<blockquote> " + map(info["see also"],make_nice_reference,myprefix)*",\n " + "\n</blockquote>\n"; }
pike.git/src/modules/Image/mkdoc.pike:270:
fixdesc(method->desc,prefix)+ "\n</blockquote>\n"); } if (method->args) { mapping arg; f->write("<h4>ARGUMENTS</h4>\n<blockquote><dl>\n"); foreach (method->args,arg) {
+
if (arg->desc)
f->write("<dt><tt>"+arg->args*"</tt>\n<dt><tt>"+ "</tt>\n <dd>"+ fixdesc(arg->desc,prefix)+"\n");
-
+
else
+
f->write("<dt><tt>"+arg->args*"</tt>\n<dt><tt>"+
+
"</tt>\n");
} f->write("</dl></blockquote>\n"); } if (method->returns) { f->write("<h4>RETURNS</h4>\n" "\n\n<blockquote>\n"+method->returns+"\n</blockquote>\n"); }
-
if (method->note)
+
if (method->note
&& method->note->desc
)
{ f->write("\n\n<h4>NOTE</h4>\n<blockquote>\n"+
-
method->
desc+
"\n</blockquote>\n");
+
fixdesc(
method->
note->desc,prefix)+
"\n</blockquote>\n");
} if (method["see also"]) { f->write("\n\n<h4>SEE ALSO</h4>\n<blockquote> " + map(method["see also"], make_nice_reference,prefix)*",\n " + "\n</blockquote>\n"); } }
pike.git/src/modules/Image/mkdoc.pike:317:
f->write("<title>Pike documentation: "+title+"</title>\n"+ "<h2>"+title+"</h2>\n"+ standard_doc(info,prefix)); // postprocess methods to get names multiset(string) method_names=(<>); string *method_names_arr,method_name; mapping method;
+
if (info->methods)
foreach (info->methods,method) method_names|=(method->names=get_method_names(method->decl)); method_names_arr=sort(indices(method_names)); /* f->write("\n<hr>\n <i><tt>"+*/ /* map(method_names_arr,make_nice_reference,prefix)**/ /* "</tt></i><br>\n <i><tt>"+"</tt></i><br>\n\n");*/ // alphabetically