[Fwd: bug in gtkdoc-scan regarding --ignore-headers]



This patch looks OK to me, so I'll apply it unless someone shouts.

Damon


-------- Original Message --------
Subject: bug in gtkdoc-scan regarding --ignore-headers
Date: Wed, 07 Feb 2001 16:00:03 +0100
From: Johannes Stezenbach <js convergence de>
Organization: convergence integrated media GmbH
To: Damon Chaplin <damon helixcode com>

Hallo Damon,

the --ignore-headers feature of gtkdoc-scan ignores
more than it should, namely:

- if I want to ignore g-cim.h, gtk-doc scan also ignores
  the whole g-cim subdirectory
- if I want to ignore test-blah.h, gtkdoc-scan also
  ignores blah.h

The reason is that \b in a perl regex defines a word characters
as "alphanumeric plus _".

A possible fix (I'm not a perl regex specialist, but it seems
to work):


hell:/usr/local/bin # diff -c gtkdoc-scan.orig gtkdoc-scan
*** gtkdoc-scan.orig    Tue Feb  6 00:17:48 2001
--- gtkdoc-scan Wed Feb  7 15:47:43 2001
***************
*** 127,133 ****
      # Now recursively scan the subdirectories.
      my $dir;
      foreach $dir (@subdirs) {
!       next if ($IGNORE_HEADERS =~ m/\b\Q${dir}\E\b/);
        &ScanHeaders ("$source_dir/$dir", $object_list, $main_list);
      }
  }
--- 127,133 ----
      # Now recursively scan the subdirectories.
      my $dir;
      foreach $dir (@subdirs) {
!       next if ($IGNORE_HEADERS =~ m/(\s|^)\Q${dir}\E(\s|$)/);
        &ScanHeaders ("$source_dir/$dir", $object_list, $main_list);
      }
  }
***************
*** 176,183 ****
      }
  
      # Check if the basename is in the list of headers to ignore.
!     if ($IGNORE_HEADERS =~ m/\b\Q${file_basename}\E\.h\b/) {
  #     print "DEBUG: File ignored: $input_file\n";
        return;
      }
  
--- 176,183 ----
      }
  
      # Check if the basename is in the list of headers to ignore.
!     if ($IGNORE_HEADERS =~ m/(\s|^)\Q${file_basename}\E\.h(\s|$)/) {
  #     print "DEBUG: File ignored: $input_file\n";
        return;
      }


Regards,
Johannes






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