From: Nikos Mavrogiannopoulos Date: Mon, 19 Sep 2011 06:50:21 +0000 (+0200) Subject: enumerations are visible in the texinfo output. X-Git-Tag: gnutls_3_0_4~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04e7684573b1fa947ae8926709b859ed9cc5f285;p=thirdparty%2Fgnutls.git enumerations are visible in the texinfo output. --- diff --git a/doc/Makefile.am b/doc/Makefile.am index e594b1b910..8f4d1212ce 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -139,8 +139,8 @@ extra-api.texi: $(srcdir)/../libextra/gnutls_extra.c # Generated texinfos. -gnutls_TEXINFOS += error_codes.texi algorithms.texi alerts.texi -MAINTAINERCLEANFILES += error_codes.texi algorithms.texi +gnutls_TEXINFOS += error_codes.texi algorithms.texi alerts.texi enums.texi +MAINTAINERCLEANFILES += error_codes.texi algorithms.texi enums.texi AM_CPPFLAGS = -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes @@ -168,6 +168,16 @@ alerts.texi: alert-printlist $(builddir)/alert-printlist > $@-tmp mv -f $@-tmp $@ +enums.texi: $(srcdir)/../lib/includes/gnutls/*.h + echo "" > $@-tmp + for i in $^; do \ + echo -n "Creating documentation for file $$i... " && \ + $(srcdir)/scripts/gdoc -texinfo $$i >> $@-tmp && \ + echo "ok"; \ + done + $(srcdir)/scripts/split-texi.pl enums enum < $@-tmp + mv -f $@-tmp $@ + # Guile texinfos. guile_texi = core.c.texi extra.c.texi @@ -213,3 +223,7 @@ extra.c.texi: endif !HAVE_GUILE + +clean-am: + rm -rf enums gnutls.info gnutls.html gnutls.pdf enums.texi + diff --git a/doc/gnutls.texi b/doc/gnutls.texi index 23367ef111..07bf8250ed 100644 --- a/doc/gnutls.texi +++ b/doc/gnutls.texi @@ -133,12 +133,7 @@ Documentation License''. @end macro @macro showenumdesc{ref,cap} -@float Table,\ref\ -@itemize -@item @code{\ref\} -@end itemize -@caption{\cap\} -@end float +@include enums/\ref\ @end macro @contents diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc index 8705d8c099..65f6d4e6da 100755 --- a/doc/scripts/gdoc +++ b/doc/scripts/gdoc @@ -377,6 +377,39 @@ sub output_texinfo { print "\@end deftypefun\n\n"; } +sub output_enum_texinfo { + my %args = %{$_[0]}; + my ($parameter, $section); + my $count; + my $name = $args{'enum'}; + my $param; + my $param2; + my $sec; + my $check; + my $type; + + print "\n\n\@float Table,$name\n"; + + print "\n\@itemize\n"; + + $check=0; + foreach $parameter (@{$args{'parameterlist'}}) { + $param1 = $parameter; + $param1 =~ s/_/_\@-/g; + + $check = 1; + print "\@item ".$param1."\n"; +# print "\n"; + + $param2 = $args{'parameters'}{$parameter}; + $out = just_highlight($param2); + chomp $out; + print $out . "\n"; + } + print "\@end itemize\n"; + print "\@end float\n"; +} + # output in html sub output_html { my %args = %{$_[0]};