undocumented signals



Here is a patch to make gtk-doc include signals and properties in the
total number of symbols, and also list them in $MODULE-undocumented.txt
if they're undocumented. This was requested by Owen in
http://bugzilla.gnome.org/show_bug.cgi?id=113645.
The patch doesn't change the generated docs at all, only the reported
statistics.

Any objections against committing this ?

Matthias


Index: gtkdoc-mkdb.in
===================================================================
RCS file: /cvs/gnome/gtk-doc/gtkdoc-mkdb.in,v
retrieving revision 1.74
diff -u -b -B -p -r1.74 gtkdoc-mkdb.in
--- gtkdoc-mkdb.in	14 Mar 2003 22:07:55 -0000	1.74
+++ gtkdoc-mkdb.in	26 May 2003 22:09:12 -0000
@@ -1778,8 +1777,12 @@ sub GetSignals {
 	    $synop .= "$xref user_data);\n";
 	    $desc  .= "$xref user_data);</programlisting>\n";
 
+	    $AllSymbols{$symbol} = 1;
 	    if (defined ($SymbolDocs{$symbol})) {
 	        $desc .= &ExpandAbbreviations($SymbolDocs{$symbol});
+		if ($SymbolDocs{$symbol} !~ /<para>\s*<\/para>/) {
+		    $AllDocumentedSymbols{$symbol} = 1;
+		}
 	    }
 
 	    $desc .= &OutputParamDescriptions ("SIGNAL", $symbol);
@@ -1849,12 +1852,17 @@ sub GetArgs {
 		$flags_string .= "Construct Only";
 	    }
 
+	    $AllSymbols{$symbol} = 1;
 	    my $blurb;
 	    if ((defined($SymbolDocs{$symbol})) &&
 	       !($SymbolDocs{$symbol} =~ "<para>\n(FIXME)?\n</para>")) {
 		$blurb = &ExpandAbbreviations($SymbolDocs{$symbol});
+		$AllDocumentedSymbols{$symbol} = 1;
 	    }
 	    else {
+		if (!($ArgBlurbs[$i] eq "")) {
+		    $AllDocumentedSymbols{$symbol} = 1;
+		}
 		$blurb = "<para>" . &CreateValidSGML ($ArgBlurbs[$i]) . "</para>";
 	    }
 	    my $pad1 = " " x (20 - length ($name));
@@ -2186,7 +2194,8 @@ sub OutputMissingDocumentation {
           || die "Can't create $ROOT_DIR/$MODULE-undocumented.txt";
 
      foreach $symbol (sort (keys (%AllSymbols))) {
-          if (defined ($Declarations{$symbol})) {
+          if (defined ($Declarations{$symbol}) ||
+	      ($symbol !~ /.*:(Title|Long_Description|Short_Description|See_Also)/)) {
 	       $total++;
 	       if (exists ($AllDocumentedSymbols{$symbol})) {
 		 $n_documented++;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]