]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
texinfo documentation is similar to the printed manual.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 17 Mar 2012 11:55:14 +0000 (12:55 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 17 Mar 2012 11:55:14 +0000 (12:55 +0100)
doc/Makefile.am
doc/gnutls.texi
doc/scripts/split-texi.pl

index 1f31d3d9eb9e7f5f9066e5279322c2de509d689a..7455c1b51696694459e497bb43f2d723ddf6025e 100644 (file)
@@ -188,6 +188,14 @@ HEADER_FILES = $(top_srcdir)/lib/includes/gnutls/gnutls.h.in \
        $(top_srcdir)/lib/includes/gnutls/dtls.h $(top_srcdir)/lib/includes/gnutls/crypto.h \
        $(top_srcdir)/lib/includes/gnutls/ocsp.h
 
+stamp_functions: gnutls-api.texi x509-api.texi pgp-api.texi pkcs12-api.texi pkcs11-api.texi abstract-api.texi compat-api.texi dtls-api.texi crypto-api.texi ocsp-api.texi
+       for i in $^; do \
+               $(srcdir)/scripts/split-texi.pl functions < $$i; \
+       done
+       sed -i 's/\@anchor{.*//g' functions/*
+       sed -i 's/\@subheading.*//g' functions/*
+       echo $@ > $@
+
 gnutls-api.texi: $(top_srcdir)/lib/includes/gnutls/gnutls.h.in
        echo "" > $@-tmp
        for i in `$(top_srcdir)/doc/scripts/getfuncs.pl <$(top_srcdir)/lib/includes/gnutls/gnutls.h.in|sort|uniq`; do \
@@ -387,7 +395,7 @@ ENUMS += enums/gnutls_x509_crt_fmt_t
 ENUMS += enums/gnutls_x509_subject_alt_name_t
 
 gnutls_TEXINFOS += $(ENUMS)
-DISTCLEANFILES += $(ENUMS) stamp_enums
+DISTCLEANFILES += $(ENUMS) stamp_enums stamp_functions
 
 stamp_enums: enums.texi
        $(MAKE) compare-makefile
index 9d98de5e4b2811b3cac23ba4e6a58640336e77d2..4d30e1d6870770face5bd783e8e87771897ce479 100644 (file)
@@ -75,60 +75,58 @@ Documentation License''.
 @end macro
 
 @macro showfuncA{ref}
-@itemize
+@table @code
 @item @ref{\ref\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncB{ref1,ref2}
-@itemize
+@table @code
 @item @ref{\ref1\}
 @item @ref{\ref2\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncC{ref1,ref2,ref3}
-@itemize
+@table @code
 @item @ref{\ref1\}
 @item @ref{\ref2\}
 @item @ref{\ref3\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncD{ref1,ref2,ref3,ref4}
-@itemize
+@table @code
 @item @ref{\ref1\}
 @item @ref{\ref2\}
 @item @ref{\ref3\}
 @item @ref{\ref4\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncE{ref1,ref2,ref3,ref4,ref5}
-@itemize
+@table @code
 @item @ref{\ref1\}
 @item @ref{\ref2\}
 @item @ref{\ref3\}
 @item @ref{\ref4\}
 @item @ref{\ref5\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncF{ref1,ref2,ref3,ref4,ref5,ref6}
-@itemize
+@table @code
 @item @ref{\ref1\}
 @item @ref{\ref2\}
 @item @ref{\ref3\}
 @item @ref{\ref4\}
 @item @ref{\ref5\}
 @item @ref{\ref6\}
-@end itemize
+@end table
 @end macro
 
 @macro showfuncdesc{ref}
-@itemize
-@item @ref{\ref\}
-@end itemize
+@include functions/\ref\
 @end macro
 
 @macro showenumdesc{ref,cap}
index 63c2f765c02e866a042ca96e3e4f01456e7d38a8..edb99fedc970c27fade86a30a191d4f8f4f7dfde 100755 (executable)
@@ -23,7 +23,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
 $dir = shift;
 $param2 = shift;
 
-if ($param2 ne '') {
+if (defined $param2 && $param2 ne '') {
   $enum = 1;
 } else {
   $enum = 0;
@@ -36,21 +36,29 @@ sub key_of_record {
   my @lines = split /\n/, $record;
 
   my ($i) = 1;
-  my ($key) = $lines[$i]; 
+  my ($key) = '';
+  $key = $lines[$i] if (defined $lines[$i]);
 
   if ($enum == 1) {
     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]; }
+    while( !($key =~ m/\@subheading\s(.*)/) && ($i < 5)) { 
+      $i=$i+1; 
+      if (defined $lines[$i]) {
+        $key = $lines[$i]; 
+      } else {
+        $key = '';
+      }
+    }
   }
 
   return $key;
 }
 
 if ($enum == 1) {
-  $/="\@end table";          # Records are separated by blank lines.
+  $/="\@end table";
 } else {
-  $/="\n\\end{function}";          # Records are separated by blank lines.
+  $/="\@end deftypefun";
 }
 @records = <>;  # Read in whole file, one record per array element.
 
@@ -68,7 +76,7 @@ foreach (@records) {
     $key =~ m/\@c\s(.*)\n/;
     $key = $1;
   } else {
-    $key =~ m/\\functionTitle\{(.*)\}/;
+    $key =~ m/\@subheading\s(.*)\n/;
     $key = $1;
   }