[gtk-doc] mkdb: trim newlines on -undocuemnted.txt



commit d56de1fc42cfe2a935b8843a12865c9bf4e535c4
Author: Stefan Sauer <ensonic users sf net>
Date:   Sun Aug 16 16:37:45 2015 +0200

    mkdb: trim newlines on -undocuemnted.txt
    
    Don't append empty lines when there is nothing to report.

 gtkdoc-mkdb.in |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 94fd999..e181dcc 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4280,8 +4280,6 @@ sub OutputMissingDocumentation {
         }
     }
 
-    $buffer .= "\n" . $buffer_deprecated . "\n" . $buffer_descriptions;
-
     if ($total == 0) {
       $percent = 100;
     } else {
@@ -4291,9 +4289,17 @@ sub OutputMissingDocumentation {
     printf UNDOCUMENTED "%.0f%% symbol docs coverage.\n", $percent;
     print UNDOCUMENTED "$n_documented symbols documented.\n";
     print UNDOCUMENTED "$n_incomplete symbols incomplete.\n";
-    print UNDOCUMENTED ($total - $n_documented) . " not documented.\n\n\n";
+    print UNDOCUMENTED ($total - $n_documented) . " not documented.\n";
 
-    print UNDOCUMENTED $buffer;
+    if ($buffer_deprecated ne "") {
+      $buffer .= "\n" . $buffer_deprecated;
+    }
+    if ($buffer_descriptions ne "") {
+      $buffer .= "\n" . $buffer_descriptions;
+    }
+    if ($buffer ne "") {
+      print UNDOCUMENTED "\n\n$buffer";
+    }
     close (UNDOCUMENTED);
 
     return &UpdateFileIfChanged ($old_undocumented_file, $new_undocumented_file, 0);


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