]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
doc update and ofcourse no program is complete without perl-helper programs
authorMiek Gieben <miekg@NLnetLabs.nl>
Mon, 24 Jan 2005 15:04:17 +0000 (15:04 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Mon, 24 Jan 2005 15:04:17 +0000 (15:04 +0000)
doc/make-xml-from-dox.pl [new file with mode: 0755]
rdata.c
str2host.c

diff --git a/doc/make-xml-from-dox.pl b/doc/make-xml-from-dox.pl
new file mode 100755 (executable)
index 0000000..4995f3b
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+# this perl program takes the html output from
+# doxygen and creates and RFC like document
+# with the lDNS API. This document also has
+# some highlevel language in how to use
+# lDNS.
+
+use strict;
+
+# what to put in front and after
+my $func_head = "<t>
+<artwork>
+";
+my $func_foot = "</artwork>
+</t>
+";
+
+my $indoc = 0;
+my @current_func = ();
+while (<>) {
+       if (/^Function Documentation/) {
+               $indoc = 1;
+               next;
+       }
+       if ($indoc == 0) {
+               next;
+       }
+       
+       if (/Definition at line/) {
+               # we are at the end of the current function 
+               print $func_head;
+               print @current_func;
+               print $func_foot;
+               @current_func = ();
+               next;
+       }
+       push @current_func, $_;
+}
+
diff --git a/rdata.c b/rdata.c
index e7d1e4535373f9ba79239234784f6b0542f3ba01..2d7712f7b4e8f74b54248b7676c40fda492e66a3 100644 (file)
--- a/rdata.c
+++ b/rdata.c
@@ -86,7 +86,7 @@ ldns_rdf_new(uint16_t s, ldns_rdf_type t, void *d)
  * the buffer, unlinke ldns_rdf_new()
  * \param[in] s size of the buffer
  * \param[in] t type of the rdf
- * \param[in] d pointer to the buffer to be copied
+ * \param[in] buf pointer to the buffer to be copied
  * \return the new rdf structure or NULL on failure
  */
 ldns_rdf *
@@ -230,7 +230,7 @@ ldns_rdf_new_frm_str(const char *str, ldns_rdf_type t)
  * remove \\DDD, \\[space] and other escapes from the input
  * See RFC 1035, section 5.1
  * \param[in] word what to check
- * \param[in] lenght the string
+ * \param[in] length the string
  * \return ldns_status mesg
  */
 ldns_status
index b9e45a16a33c04e412f6c2595c57a1aa54f9f00e..ec2201e4dbb9a552a766dadfe35cf1e8f678fd44 100644 (file)
@@ -30,7 +30,7 @@
 /**
  * convert a string to a int16 in wireformat
  * \param[in] rd the rdf where to put the data
- * \param[in] str the string to be converted
+ * \param[in] shortstr the string to be converted
  * \return ldns_status
  */
 ldns_status
@@ -54,7 +54,7 @@ ldns_str2rdf_int16(ldns_rdf **rd, const uint8_t *shortstr)
 /**
  * convert a time string to a time value in wireformat
  * \param[in] rd the rdf where to put the data
- * \param[in] str the string to be converted
+ * \param[in] time the string to be converted
  * \return ldns_status
  */
 ldns_status
@@ -82,7 +82,7 @@ ldns_str2rdf_time(ldns_rdf **rd, const uint8_t *time)
 /**
  * convert a strings into a 4 byte int in wireformat
  * \param[in] rd the rdf where to put the data
- * \param[in] str the string to be converted
+ * \param[in] longstr the string to be converted
  * \return ldns_status
  */
 ldns_status 
@@ -108,7 +108,7 @@ ldns_str2rdf_int32(ldns_rdf **rd, const uint8_t *longstr)
 /**
  * convert a byte into wireformat
  * \param[in] rd the rdf where to put the data
- * \param[in] str the string to be converted
+ * \param[in] bytestr the string to be converted
  * \return ldns_status
  */
 ldns_status