From: Miek Gieben Date: Mon, 24 Jan 2005 15:04:17 +0000 (+0000) Subject: doc update and ofcourse no program is complete without perl-helper programs X-Git-Tag: release-0.50~537 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db2cf545e982bcee77378795de14b366d88a7d7c;p=thirdparty%2Fldns.git doc update and ofcourse no program is complete without perl-helper programs --- diff --git a/doc/make-xml-from-dox.pl b/doc/make-xml-from-dox.pl new file mode 100755 index 00000000..4995f3b9 --- /dev/null +++ b/doc/make-xml-from-dox.pl @@ -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 = " + +"; +my $func_foot = " + +"; + +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 e7d1e453..2d7712f7 100644 --- 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 diff --git a/str2host.c b/str2host.c index b9e45a16..ec2201e4 100644 --- a/str2host.c +++ b/str2host.c @@ -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