]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
caption is set on enumerations in texinfo. Unfortunately they are not visible to...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 14 Jan 2012 09:43:17 +0000 (10:43 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 14 Jan 2012 09:43:20 +0000 (10:43 +0100)
doc/gnutls.texi
doc/scripts/gdoc
doc/scripts/split-texi.pl

index e538d09f53468acfca15041f2962a167b8ff4fcb..a63e720d1a56e881a3555f9a1f825cc3d698fdfa 100644 (file)
@@ -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
index ea798b9fccd008d04847adad63550e55a8d704d9..307888c986cc961b83e91c4315d385538fc1b7e6 100755 (executable)
@@ -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
index a7ee518192862e666d5937d2bef5e9d749699404..b4b0087d5f71e155dffc4bc8ec7169cceb99aafd 100755 (executable)
@@ -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\{(.*)\}/;