]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
ugly as hell, but hopefully sufficient
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 26 Apr 2005 14:06:04 +0000 (14:06 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 26 Apr 2005 14:06:04 +0000 (14:06 +0000)
doc/doxyparse.pl

index 6b33f699cae207ca529f769e0a059deeb0649014..e0de46eaa5a0d2220a676e04ed68392908bebb7f 100755 (executable)
@@ -23,6 +23,7 @@ my $key;
 my $return;
 my $param;
 my $api;
+my $const;
 
 my %description;
 my %api;
@@ -103,6 +104,14 @@ while(<>) {
                $description = $description . "\n" . $_;
                #$description = $description . "\n.br\n" . $_;
        }
+       if ($state == 2 and /const/) {
+               # the const word exists in the function call
+               $const = "const";
+               s/[\t ]*const[\t ]*//;
+       } else {
+               undef $const;
+       }
+       
        if (/([\w\*]*)[\t ]+(.*?)\((.*)\);/ and $state == 2) {
                # this should also end the current comment parsing
                $return = $1;
@@ -113,7 +122,11 @@ while(<>) {
                if ($key =~ /^\*/) {
                        #print"Name starts with *\n";
                        $key =~ s/^\*//;
-                       $return = '*' . $return;
+                       if (defined($const)) {
+                               $return =  $const . " " . $return . '*';
+                       } else {
+                               $return =  $return . '*';
+                       }
                }
                $description =~ s/\\param\[in\][ \t]*([\*\w]+)[ \t]+/.br\n\\fB$1\\fR: /g;
                $description =~ s/\\param\[out\][ \t]*([\*\w]+)[ \t]+/.br\n\\fB$1\\fR: /g;