[gtk-doc] fixxref: more indet fixes



commit 4bedfdb5f6089b3387ac20441b6a026deaf62373
Author: Stefan Sauer <ensonic users sf net>
Date:   Tue Jun 16 17:34:22 2015 +0200

    fixxref: more indet fixes

 gtkdoc-fixxref.in |  216 ++++++++++++++++++++++++++--------------------------
 1 files changed, 108 insertions(+), 108 deletions(-)
---
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 1969d05..9831687 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -47,45 +47,45 @@ my %Links;
 
 # failing link targets we don't warn about even once
 my %NoLinks = (
-    'char'  => 1,
-    'double'  => 1,
-    'float'  => 1,
-    'int'  => 1,
-    'long'  => 1,
-    'main'  => 1,
-    'signed'  => 1,
-    'unsigned'  => 1,
+    'char' => 1,
+    'double' => 1,
+    'float' => 1,
+    'int' => 1,
+    'long' => 1,
+    'main' => 1,
+    'signed' => 1,
+    'unsigned' => 1,
     'va-list' => 1,
-    'void'  => 1,
+    'void' => 1,
     'GBoxed' => 1,
     'GEnum' => 1,
     'GFlags' => 1,
     'GInterface' => 1
-    );
+);
 
 
 run() unless caller; # Run program unless loaded as a module
 
 
 sub run {
-  my %optctl = ('module' => \$MODULE,
-                'module-dir' => \$MODULE_DIR,
-                'html-dir' => \$HTML_DIR,
-                'extra-dir' => \ EXTRA_DIRS,
-                'version' => \$PRINT_VERSION,
-                'help' => \$PRINT_HELP,
-                'src-lang' => \$SRC_LANG);
-  
-  GetOptions(\%optctl, "module=s", "module-dir=s", "html-dir:s", "extra-dir=s@",
-            "src-lang=s", "version", "help");
-  
-  if ($PRINT_VERSION) {
-      print "@VERSION \n";
-      exit 0;
-  }
-  
-  if ($PRINT_HELP) {
-          print <<EOF;
+    my %optctl = ('module' => \$MODULE,
+                  'module-dir' => \$MODULE_DIR,
+                  'html-dir' => \$HTML_DIR,
+                  'extra-dir' => \ EXTRA_DIRS,
+                  'version' => \$PRINT_VERSION,
+                  'help' => \$PRINT_HELP,
+                  'src-lang' => \$SRC_LANG);
+    
+    GetOptions(\%optctl, "module=s", "module-dir=s", "html-dir:s", "extra-dir=s@",
+              "src-lang=s", "version", "help");
+    
+    if ($PRINT_VERSION) {
+        print "@VERSION \n";
+        exit 0;
+    }
+    
+    if ($PRINT_HELP) {
+            print <<EOF;
 gtkdoc-fixxref version @VERSION@ - fix cross references in html files
 
 --module=MODULE_NAME    Name of the doc module being parsed
@@ -101,87 +101,87 @@ gtkdoc-fixxref version @VERSION@ - fix cross references in html files
 --version               Print the version of this program
 --help                  Print this help
 EOF
-      exit 0;
-  }
-  
-  if (!$SRC_LANG) {
-      $SRC_LANG="c"
-  }
+        exit 0;
+    }
+    
+    if (!$SRC_LANG) {
+        $SRC_LANG="c"
+    }
+      
+    my $path_prefix="";
+    if ($HTML_DIR =~ m%(.*?)/share/gtk-doc/html%) {
+        $path_prefix=$1;
+        @TRACE@("Path prefix: $path_prefix");
+    }
+    
+    if (!defined $MODULE_DIR) {
+        $MODULE_DIR="$HTML_DIR/$MODULE";
+    }
+    
+    my $dir;
+    
+    # We scan the directory containing GLib and any directories in GNOME2_PATH
+    # first, but these will be overriden by any later scans.
+    $dir = `pkg-config --variable=prefix glib-2.0`;
+    $dir =~ s/\s+$//;
+    $dir = $dir . "/share/gtk-doc/html";
+    if (-d $dir) {
+        # Some predefined link targets to get links into type hierarchies as these
+        # have no targets. These are always absolute for now.
+        $Links{'GBoxed'} = "$dir/gobject/gobject-Boxed-Types.html";
+        $Links{'GEnum'} = "$dir/gobject/gobject-Enumeration-and-Flag-Types.html";
+        $Links{'GFlags'} = "$dir/gobject/gobject-Enumeration-and-Flag-Types.html";
+        $Links{'GInterface'} = "$dir/gobject/GTypeModule.html";
+    
+        if ($dir ne $HTML_DIR) {
+            @TRACE@("Scanning GLib directory: $dir");
+            if ($dir !~ m%^\Q$path_prefix\E/%) {
+                &ScanIndices ($dir, 1);
+            } else {
+                &ScanIndices ($dir, 0);
+            }
+        }
+    }
+    
+    if (defined ($ENV{"GNOME2_PATH"})) {
+        foreach $dir (split (/:/, $ENV{"GNOME2_PATH"})) {
+            $dir = $dir . "/share/gtk-doc/html";
+            if (-d $dir && $dir ne $HTML_DIR) {
+                @TRACE@("Scanning GNOME2_PATH directory: $dir");
+                if ($dir !~ m%^\Q$path_prefix\E/%) {
+                    &ScanIndices ($dir, 1);
+                } else {
+                    &ScanIndices ($dir, 0);
+                }
+            }
+            # ubuntu started to compress this as index.sgml.gz :/
+            # https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138
+        }
+    }
+    
+    @TRACE@("Scanning HTML_DIR directory: $HTML_DIR");
+    &ScanIndices ($HTML_DIR, 0);
+    @TRACE@("Scanning HTML_DIR directory: $MODULE_DIR");
+    &ScanIndices ($MODULE_DIR, 0);
+    
+    # check all extra dirs, but skip already scanned dirs or subdirs of those
+    foreach my $dir (@EXTRA_DIRS) {
+        my $vdir;
+        @TRACE@("Scanning EXTRA_DIR directory: $dir");
+    
+        # If the --extra-dir option is not relative and is not sharing the same
+        # prefix as the target directory of the docs, we need to use absolute
+        # directories for the links
+        if ($dir !~m/^\.\./ &&  $dir !~ m%\Q$path_prefix\E/%) {
+            &ScanIndices ($dir, 1);
+        } else {
+            &ScanIndices ($dir, 0);
+        }
+    }
+    
+    &ReadSections ();
     
-  my $path_prefix="";
-  if ($HTML_DIR =~ m%(.*?)/share/gtk-doc/html%) {
-      $path_prefix=$1;
-      @TRACE@("Path prefix: $path_prefix");
-  }
-  
-  if (!defined $MODULE_DIR) {
-      $MODULE_DIR="$HTML_DIR/$MODULE";
-  }
-  
-  my $dir;
-  
-  # We scan the directory containing GLib and any directories in GNOME2_PATH
-  # first, but these will be overriden by any later scans.
-  $dir = `pkg-config --variable=prefix glib-2.0`;
-  $dir =~ s/\s+$//;
-  $dir = $dir . "/share/gtk-doc/html";
-  if (-d $dir) {
-      # Some predefined link targets to get links into type hierarchies as these
-      # have no targets. These are always absolute for now.
-      $Links{'GBoxed'} = "$dir/gobject/gobject-Boxed-Types.html";
-      $Links{'GEnum'} = "$dir/gobject/gobject-Enumeration-and-Flag-Types.html";
-      $Links{'GFlags'} = "$dir/gobject/gobject-Enumeration-and-Flag-Types.html";
-      $Links{'GInterface'} = "$dir/gobject/GTypeModule.html";
-  
-      if ($dir ne $HTML_DIR) {
-          @TRACE@("Scanning GLib directory: $dir");
-          if ($dir !~ m%^\Q$path_prefix\E/%) {
-              &ScanIndices ($dir, 1);
-          } else {
-              &ScanIndices ($dir, 0);
-          }
-      }
-  }
-  
-  if (defined ($ENV{"GNOME2_PATH"})) {
-      foreach $dir (split (/:/, $ENV{"GNOME2_PATH"})) {
-          $dir = $dir . "/share/gtk-doc/html";
-          if (-d $dir && $dir ne $HTML_DIR) {
-              @TRACE@("Scanning GNOME2_PATH directory: $dir");
-              if ($dir !~ m%^\Q$path_prefix\E/%) {
-                  &ScanIndices ($dir, 1);
-              } else {
-                  &ScanIndices ($dir, 0);
-              }
-          }
-          # ubuntu started to compress this as index.sgml.gz :/
-          # https://bugs.launchpad.net/ubuntu/+source/gtk-doc/+bug/77138
-      }
-  }
-  
-  @TRACE@("Scanning HTML_DIR directory: $HTML_DIR");
-  &ScanIndices ($HTML_DIR, 0);
-  @TRACE@("Scanning HTML_DIR directory: $MODULE_DIR");
-  &ScanIndices ($MODULE_DIR, 0);
-  
-  # check all extra dirs, but skip already scanned dirs or subdirs of those
-  foreach my $dir (@EXTRA_DIRS) {
-      my $vdir;
-      @TRACE@("Scanning EXTRA_DIR directory: $dir");
-  
-      # If the --extra-dir option is not relative and is not sharing the same
-      # prefix as the target directory of the docs, we need to use absolute
-      # directories for the links
-      if ($dir !~m/^\.\./ &&  $dir !~ m%\Q$path_prefix\E/%) {
-          &ScanIndices ($dir, 1);
-      } else {
-          &ScanIndices ($dir, 0);
-      }
-  }
-  
-  &ReadSections ();
-  
-  &FixCrossReferences ($MODULE_DIR);
+    &FixCrossReferences ($MODULE_DIR);
 }
 
 


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