From c9c3611734cfb8265586ad8447483cbba9727617 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 31 May 2000 11:29:22 +0000 Subject: Added new output format `bird' which creates birddoc SGML. --- doc/kernel-doc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/kernel-doc b/doc/kernel-doc index c3237f09..cb28d304 100755 --- a/doc/kernel-doc +++ b/doc/kernel-doc @@ -13,12 +13,12 @@ # Note: This only supports 'c'. # usage: -# kerneldoc [ -docbook | -html | -text | -man ] +# kerneldoc [ -docbook | -html | -text | -man | -gnome | -bird ] # [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile # or # [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile # -# Set output format using one of -docbook -html -text or -man. Default is man. +# Set output format using one of -docbook -html -text -man -gnome or -bird. Default is man. # # -function funcname # If set, then only generate documentation for the given function(s). All @@ -114,6 +114,13 @@ $blankline_sgml = "\n"; $type_param, "\$1" ); $blankline_gnome = "\n"; +# bird documentation +%highlights_bird = ( $type_constant, "\n\n"; } +# output in birddoc +sub output_bird { + my %args = %{$_[0]}; + my ($parameter, $section); + my $count; + print "Function\n"; + + print "

".$args{'functiontype'}."\n"; + print "".$args{'function'}."\n"; + print "("; + $count = 0; + foreach $parameter (@{$args{'parameterlist'}}) { + print "".$args{'parametertypes'}{$parameter}." ".$parameter.""; + if ($count != $#{$args{'parameterlist'}}) { + $count++; + print ", "; + } + } + print ")\n"; + + print "Arguments\n"; + print "

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

\n"; + output_highlight($args{'sections'}{$section}); + } + print "\n"; +} + +# output in birddoc +sub output_intro_bird { + my %args = %{$_[0]}; + my ($parameter, $section); + my $count; + my $id; + + $id = $args{'module'}; + $id =~ s/[^A-Za-z0-9]/-/g; + + # print out each section + $lineprefix=" "; + foreach $section (@{$args{'sectionlist'}}) { + print "$section\n

\n"; + output_highlight($args{'sections'}{$section}); + } + + print "\n\n"; +} + ## # output in man sub output_man { -- cgit v1.2.3