[gtk-doc] Add a section for C includes



commit 1eae4ecd749a703657f12b4efefa695de9499fe5
Author: William Jon McCann <william jon mccann gmail com>
Date:   Wed Feb 12 10:08:38 2014 -0500

    Add a section for C includes

 gtkdoc-mkdb.in |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 4b2845f..735b02a 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2542,18 +2542,19 @@ sub OutputSGMLFile {
     $year += 1900;
 
     my $include_output = "";
-    my $include;
-    foreach $include (split (/,/, $includes)) {
+    if ($includes) {
+      $include_output .= "<refsect1 id=\"$section_id.includes\"><title>Includes</title><synopsis>";
+      my $include;
+      foreach $include (split (/,/, $includes)) {
         if ($include =~ m/^\".+\"$/) {
-            $include_output .= "#include ${include}\n";
+          $include_output .= "#include ${include}\n";
         }
         else {
-            $include =~ s/^\s+|\s+$//gs;
-            $include_output .= "#include &lt;${include}&gt;\n";
+          $include =~ s/^\s+|\s+$//gs;
+          $include_output .= "#include &lt;${include}&gt;\n";
         }
-    }
-    if ($include_output ne '') {
-        $include_output = "\n$include_output\n";
+      }
+      $include_output .= "</synopsis></refsect1>\n";
     }
 
     my $extralinks = OutputSectionExtraLinks($title,"Section:$file");
@@ -2595,6 +2596,7 @@ $image</refmiscinfo>
 </refnamediv>
 $stability
 
$$functions_synop$$args_synop$$signals_synop$object_anchors$$other_synop$$hierarchy$$prerequisites$$derived$$interfaces$$implementations
+$include_output
 <refsect1 id="$section_id.description" role="desc">
 <title role="desc.title">Description</title>
 $extralinks$long_desc


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