");
foreach $subprog (@subprogs) {
my ($name, $return, $comment, @params)
= ($$subprog[1], $$subprog[0], $$subprog[2],
@{$$subprog[3]});
if ($return eq "--") {
if ($has_itemize == 1) {
$has_itemize = 0;
}
&html_output ("| ");
&output ("\@subsection $name\n\n");
&html_output (" |
|
");
$comment =~ s/^\s*//;
if ($comment ne "") {
$comment = &process_list
(&clean_comment_marks ($comment, 1));
&html_output ("");
&output ($comment, "\n\n");
&html_output ("
|
");
}
next;
}
if ($has_itemize == 0) {
$has_itemize = 1;
}
my ($profile) = "";
if ($return eq "" && scalar (@params) == 0) {
$name .= ";";
}
$profile = sprintf ("%-35s",
($return eq "") ? "\@b{procedure} $name"
: "\@b{function} $name");
if (scalar (@params) > 0) {
$profile .= "\n (";
for ($i=0; $i<=$#params; $i++) {
$profile .= " " x 3 if ($i != 0);
my ($type) = $params[$i][2];
my ($default) = "";
if ($params[$i][2] =~ /:=/
&& length ($params[$i][2]) > 30) {
$type =~ s/\s*:=.*//;
$default = $params[$i][2];
$default =~ s/.*:=/:=/;
}
$profile .= sprintf ("%-18s : \@b{%-6s} %s",
$params[$i][0],
$params[$i][1],
$type);
if ($default ne '') {
$profile .= "\n" . (' ' x 23) . $default;
}
$profile .= (($i == $#params) ? ")" : ";\n");
}
}
if ($return eq "") {
$profile .= ";" if (scalar (@params) != 0);
} else {
$profile .= "\n" . " " x 3 if (scalar (@params) > 0);
$profile .= "\@b{return} $return;";
}
&html_output ("",
" | ",
"");
&output ("\@smallexample\n\@exdent $profile\n\@end smallexample");
$comment =~ s/^\s*//;
$comment = &process_list (&clean_comment_marks ($comment, 1));
&html_output (" |
",
" | ",
"");
&output ("\@noindent\n",
$comment, "\@*\n",
"\@ifhtml\n
\n\@end ifhtml\n");
&html_output (" |
");
}
&html_output ("
");
}
## Examples if any
if (&get_tag_value ("example", @content)) {
&color_output ($section_bg, $section_fg,
"\@node $package_name Example\n",
"\@section Example\n");
&output ("\n\@example\n",
&highlight_keywords
(&clean_comment_marks (&get_tag_value
("example", @content),
0)),
"\n\@end example\n");
}
} else { # No