]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix automatic extraction of function manpages
authorWillem Toorop <willem@NLnetLabs.nl>
Mon, 17 Sep 2012 10:14:50 +0000 (10:14 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Mon, 17 Sep 2012 10:14:50 +0000 (10:14 +0000)
doc/doxyparse.pl
ldns/dane.h

index 526c617101bd6cdb7014abfe972141d713be89d2..96a1732f9ed8e5bcfc24c2091fa11364ee454c11 100755 (executable)
@@ -87,7 +87,7 @@ if (defined $options{'m'}) {
 
 # 0 - somewhere in the file
 # 1 - in a doxygen par
-# 2 - after doxygen, except funcion
+# 2 - after doxygen, expect function
 
 # create our pwd
 mkdir "doc";
@@ -126,7 +126,14 @@ while($i < $max) {
        }
        if ($cur_line =~ /\*\// and $state == 1) {
                #print "END Comment seen!\n";
-               $state = 2;
+               if ($description =~ /^\\\\file/mg) {
+                       # Doxygen text for the file, do not expect
+                       # a function coming.
+                       #
+                       $state = 0;
+               } else {
+                       $state = 2;
+               }
                $i++;
                next;
        }
@@ -184,6 +191,14 @@ while($i < $max) {
                $description =~ s/\\param\[out\][ \t]*([\*\w]+)[ \t]+/.br\n\\fB$1\\fR: /g;
                $description =~ s/\\return[ \t]*/.br\nReturns /g;
 
+               # Delete leading spaces to prevent manpages to be ascii format-
+               # ted and enable justification of text.
+               #
+               $description =~ s/^[ \t]*//mg;
+
+               # Prevent hyphening of all caps and underscore words
+               $description =~ s/\b([A-Z_]+)\b/\\%$1/g;
+
                $description{$key} = $description;
                $api{$key} = $api;
                $return{$key} = $return;
index 47d99ae68da036250c0f3b358d4de4e2c23e710f..850a6769aeffb74d260984931ed0c880c0636b21 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 /**
- * \file dane.h
+ * \file
  *
  * This module contains base functions for creating and verifying TLSA RR's
  * with PKIX certificates, certificate chains and validation stores.
@@ -17,7 +17,6 @@
  * 
  * Since those functions heavily rely op cryptographic operations,
  * this module is dependent on openssl.
- * 
  */
  
 
@@ -207,8 +206,7 @@ ldns_status ldns_dane_create_tlsa_rr(ldns_rr** tlsa,
  *         LDNS_STATUS_DANE_PKIX_DID_NOT_VALIDATE when TLSA matched,
  *         but the PKIX validation failed, or other ldns_status errors.
  */
-ldns_status
-ldns_dane_verify_rr(const ldns_rr* tlsa_rr,
+ldns_status ldns_dane_verify_rr(const ldns_rr* tlsa_rr,
                X509* cert, STACK_OF(X509)* extra_certs,
                X509_STORE* pkix_validation_store);
 
@@ -233,8 +231,7 @@ ldns_dane_verify_rr(const ldns_rr* tlsa_rr,
  *         LDNS_STATUS_DANE_TLSA_DID_NOT_MATCH when none of the TLSA's matched,
  *         or other ldns_status errors.
  */
-ldns_status
-ldns_dane_verify(ldns_rr_list* tlsas,
+ldns_status ldns_dane_verify(ldns_rr_list* tlsas,
                X509* cert, STACK_OF(X509)* extra_certs,
                X509_STORE* pkix_validation_store);
 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */