From 658d272bb635b5efeeed883dec5af9dddf12397f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 1 Jun 2000 17:11:10 +0000 Subject: [PATCH] Better handling of parameterless functions. --- doc/kernel-doc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/kernel-doc b/doc/kernel-doc index d8b734c0..b4957586 100755 --- a/doc/kernel-doc +++ b/doc/kernel-doc @@ -528,8 +528,13 @@ sub output_bird { print "".$args{'function'}."\n"; print "("; $count = 0; + my $ntyped = 0; foreach $parameter (@{$args{'parameterlist'}}) { - print "".$args{'parametertypes'}{$parameter}." ".$parameter.""; + if ($args{'parametertypes'}{$parameter} ne "") { + print "".$args{'parametertypes'}{$parameter}." "; + $ntyped++; + } + print "".$parameter.""; if ($count != $#{$args{'parameterlist'}}) { $count++; print ", "; @@ -537,13 +542,15 @@ sub output_bird { } print ")\n"; - print "Arguments\n"; - print "

\n"; - foreach $parameter (@{$args{'parameterlist'}}) { - print "".$args{'parametertypes'}{$parameter}." ".$parameter."\n"; - output_highlight($args{'parameters'}{$parameter}); + if ($ntyped) { + print "Arguments\n"; + print "

\n"; + foreach $parameter (@{$args{'parameterlist'}}) { + print "".$args{'parametertypes'}{$parameter}." ".$parameter."\n"; + output_highlight($args{'parameters'}{$parameter}); + } + print "\n"; } - print "\n"; foreach $section (@{$args{'sectionlist'}}) { print "$section\n"; print "

\n";