summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-01 19:11:10 +0200
committerMartin Mares <mj@ucw.cz>2000-06-01 19:11:10 +0200
commit658d272bb635b5efeeed883dec5af9dddf12397f (patch)
tree8693efe0db9676a2972c8e148ba06f04634f5705 /doc
parent725774926676352d2a065cbeb95a81b95bfcfa3e (diff)
downloadbird-658d272bb635b5efeeed883dec5af9dddf12397f.tar
bird-658d272bb635b5efeeed883dec5af9dddf12397f.zip
Better handling of parameterless functions.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/kernel-doc21
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/kernel-doc b/doc/kernel-doc
index d8b734c..b495758 100755
--- a/doc/kernel-doc
+++ b/doc/kernel-doc
@@ -528,8 +528,13 @@ sub output_bird {
print "<funcdef>".$args{'function'}."</funcdef>\n";
print "(";
$count = 0;
+ my $ntyped = 0;
foreach $parameter (@{$args{'parameterlist'}}) {
- print "<type>".$args{'parametertypes'}{$parameter}."</type> <param>".$parameter."</param>";
+ if ($args{'parametertypes'}{$parameter} ne "") {
+ print "<type>".$args{'parametertypes'}{$parameter}."</type> ";
+ $ntyped++;
+ }
+ print "<param>".$parameter."</param>";
if ($count != $#{$args{'parameterlist'}}) {
$count++;
print ", ";
@@ -537,13 +542,15 @@ sub output_bird {
}
print ")\n";
- print "<funcsect>Arguments\n";
- print "<p><descrip>\n";
- foreach $parameter (@{$args{'parameterlist'}}) {
- print "<tagp><type>".$args{'parametertypes'}{$parameter}."</type> <param>".$parameter."</param></tagp>\n";
- output_highlight($args{'parameters'}{$parameter});
+ if ($ntyped) {
+ print "<funcsect>Arguments\n";
+ print "<p><descrip>\n";
+ foreach $parameter (@{$args{'parameterlist'}}) {
+ print "<tagp><type>".$args{'parametertypes'}{$parameter}."</type> <param>".$parameter."</param></tagp>\n";
+ output_highlight($args{'parameters'}{$parameter});
+ }
+ print "</descrip>\n";
}
- print "</descrip>\n";
foreach $section (@{$args{'sectionlist'}}) {
print "<funcsect>$section\n";
print "<p>\n";