]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Add Texinfo API documentation.
authorSimon Josefsson <simon@josefsson.org>
Thu, 5 Aug 2004 03:52:38 +0000 (03:52 +0000)
committerSimon Josefsson <simon@josefsson.org>
Thu, 5 Aug 2004 03:52:38 +0000 (03:52 +0000)
doc/Makefile.am
doc/gnutls.texi
doc/scripts/sort2.pl [new file with mode: 0755]

index 78c0e5da92f24b9f2004f026065ff8e7b761de99..3f4158bdf143bb4daaea05d2a58f8feb54bd6fe5 100644 (file)
@@ -3,8 +3,21 @@ SUBDIRS = tex examples scripts manpages
 
 info_TEXINFOS = gnutls.texi
 gnutls_TEXINFOS = gnutls.texi fdl.texi error_codes.texi \
+       gnutls-api.texi gnutls-extra-api.texi x509-api.texi pgp-api.texi \
        internals.eps internals.png layers.eps layers.png \
        pgp1.eps pgp1.png x509-1.eps x509-1.png
 
 error_codes.texi: ../lib/gnutls_errors_int.h ../lib/gnutls_errors.c ../src/errcodes.c
        -../src/errcodes > error_codes.texi
+
+gnutls-api.texi: ../lib/gnutls-api.texi
+       -scripts/sort2.pl < ../lib/gnutls-api.texi > gnutls-api.texi
+
+gnutls-extra-api.texi: ../libextra/gnutls-extra-api.texi
+       -scripts/sort2.pl < ../libextra/gnutls-extra-api.texi > gnutls-extra-api.texi
+
+x509-api.texi: ../lib/x509/x509-api.texi
+       -scripts/sort2.pl < ../lib/x509/x509-api.texi > x509-api.texi
+
+pgp-api.texi: ../libextra/openpgp/pgp-api.texi
+       -scripts/sort2.pl < ../libextra/openpgp/pgp-api.texi > pgp-api.texi
index a98f2abcf59288ef76d90947dca7532be79c0435..a165b8a924037104574eb46372dba8a0365c4b3f 100644 (file)
@@ -2005,6 +2005,8 @@ signing_key
 The prototypes for the following functions lie in
 @file{gnutls/gnutls.h}.
 
+@include gnutls-api.texi
+
 @section X.509 certificate functions
 @anchor{sec:x509api}
 @cindex X.509 Functions
@@ -2012,6 +2014,8 @@ The prototypes for the following functions lie in
 The following functions are to be used for X.509 certificate handling.
 Their prototypes lie in @file{gnutls/x509.h}.
 
+@include x509-api.texi
+
 @section @acronym{GnuTLS-extra} functions
 @cindex @acronym{GnuTLS-extra} functions
 
@@ -2019,6 +2023,8 @@ These functions are only available in the GPL version of the library
 called @code{gnutls-extra}. The prototypes for this library lie in
 @file{gnutls/extra.h}.
 
+@include gnutls-extra-api.texi
+
 @section OpenPGP functions
 @cindex OpenPGP functions
 @anchor{sec:openpgpapi}
@@ -2026,6 +2032,8 @@ called @code{gnutls-extra}. The prototypes for this library lie in
 The following functions are to be used for OpenPGP certificate
 handling.  Their prototypes lie in @file{gnutls/openpgp.h}.
 
+@include pgp-api.texi
+
 @chapter Certificate to XML convertion functions
 @cindex Certificate to XML convertion
 
diff --git a/doc/scripts/sort2.pl b/doc/scripts/sort2.pl
new file mode 100755 (executable)
index 0000000..a4c71ef
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+sub key_of_record {
+  local($record) = @_;
+
+  # Split record into lines:
+  my @lines = split /\n/, $record;
+
+  my ($i) = 1;
+  my ($key) = $lines[$i];
+
+  while( !($key =~ /^\@deftypefun/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
+
+  $key = $1 if $key =~ /^\@deftypefun {.*} {(.*)}/;
+
+#  print STDERR "key $1\n";
+
+  return $key;
+}
+
+$/="@end deftypefun";          # Records are separated by blank lines.
+@records = <>;  # Read in whole file, one record per array element.
+
+@records = sort { key_of_record($a) cmp key_of_record($b) } @records;
+print @records;