From: Nikos Mavrogiannopoulos Date: Sat, 14 Jan 2012 09:43:17 +0000 (+0100) Subject: caption is set on enumerations in texinfo. Unfortunately they are not visible to... X-Git-Tag: gnutls-3_0_12~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab06513726eebecd815ea0ed40fed2c5351b5e23;p=thirdparty%2Fgnutls.git caption is set on enumerations in texinfo. Unfortunately they are not visible to the pdf output due to a probable bug in texinfo. --- diff --git a/doc/gnutls.texi b/doc/gnutls.texi index e538d09f53..a63e720d1a 100644 --- a/doc/gnutls.texi +++ b/doc/gnutls.texi @@ -132,7 +132,10 @@ Documentation License''. @end macro @macro showenumdesc{ref,cap} +@float Figure,\ref\ @include enums/\ref\ +@caption{\cap\} +@end float @end macro @contents diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc index ea798b9fcc..307888c986 100755 --- a/doc/scripts/gdoc +++ b/doc/scripts/gdoc @@ -376,9 +376,8 @@ sub output_enum_texinfo { my $check; my $type; - print "\n\n\@float Table,$name\n"; - - print "\n\@itemize\n"; + print "\n\@c $name\n"; + print "\@itemize\n"; $check=0; foreach $parameter (@{$args{'parameterlist'}}) { @@ -395,7 +394,6 @@ sub output_enum_texinfo { print $out . "\n"; } print "\@end itemize\n"; - print "\@end float\n"; } # output in html diff --git a/doc/scripts/split-texi.pl b/doc/scripts/split-texi.pl index a7ee518192..b4b0087d5f 100755 --- a/doc/scripts/split-texi.pl +++ b/doc/scripts/split-texi.pl @@ -21,7 +21,7 @@ sub key_of_record { my ($key) = $lines[$i]; if ($enum == 1) { - while( !($key =~ m/^\@float Table,(.*)$/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; } + while( !($key =~ m/\@c\s(.*)\n/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; } } else { while( !($key =~ m/^\\functionTitle\{(.*)\}/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; } } @@ -30,19 +30,24 @@ sub key_of_record { } if ($enum == 1) { - $/="\n\@end float"; # Records are separated by blank lines. + $/="\@end itemize"; # Records are separated by blank lines. } else { $/="\n\\end{function}"; # Records are separated by blank lines. } @records = <>; # Read in whole file, one record per array element. +$/="\n"; + mkdir $dir; -@records = sort { key_of_record($a) cmp key_of_record($b) } @records; +if ($enum == 0) { + @records = sort { key_of_record($a) cmp key_of_record($b) } @records; +} + foreach (@records) { $key = $_; if ($enum == 1) { - $key =~ m/\@float Table,(.*)/; + $key =~ m/\@c\s(.*)\n/; $key = $1; } else { $key =~ m/\\functionTitle\{(.*)\}/;