[gnumeric] Tools: more bitrot.



commit 229102b68b23a2f361dd15717e0d832a79ba4c4b
Author: Morten Welinder <terra gnome org>
Date:   Wed Sep 10 11:50:49 2014 -0400

    Tools: more bitrot.

 plugins/excelplugins/ExcelTestModule.c    |    1 +
 plugins/excelplugins/xlcall32_emulation.c |    1 +
 plugins/perl-loader/perl-gnumeric.c       |    1 +
 plugins/plan-perfect/charset.c            |    2 +
 src/outoflinedocs.c                       |    2 +
 tools/check-config-h.pl                   |   39 ++++++++++++++++++++++++----
 tools/check-finalizers                    |    2 +-
 tools/check-gfrees                        |    2 +-
 8 files changed, 42 insertions(+), 8 deletions(-)
---
diff --git a/plugins/excelplugins/ExcelTestModule.c b/plugins/excelplugins/ExcelTestModule.c
index 9b800e0..cec2056 100644
--- a/plugins/excelplugins/ExcelTestModule.c
+++ b/plugins/excelplugins/ExcelTestModule.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <gnumeric-config.h>
 #include <gmodule.h>
 
 #if defined( WIN32 ) || defined( WIN64 )
diff --git a/plugins/excelplugins/xlcall32_emulation.c b/plugins/excelplugins/xlcall32_emulation.c
index c36dc32..954509e 100644
--- a/plugins/excelplugins/xlcall32_emulation.c
+++ b/plugins/excelplugins/xlcall32_emulation.c
@@ -27,6 +27,7 @@
  *     i586-mingw32msvc-gcc -shared -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include xlcall32_emulation.c 
-Wl,-soname -Wl,xlcall32.dll -o .libs/xlcall32.dll
  */
 
+#include <gnumeric-config.h>
 #include <gmodule.h>
 
 #if defined( WIN32 ) || defined( WIN64 )
diff --git a/plugins/perl-loader/perl-gnumeric.c b/plugins/perl-loader/perl-gnumeric.c
index e512bc5..de8b694 100644
--- a/plugins/perl-loader/perl-gnumeric.c
+++ b/plugins/perl-loader/perl-gnumeric.c
@@ -1,3 +1,4 @@
+#include <gnumeric-config.h>
 #include "perl-gnumeric.h"
 
 SV *
diff --git a/plugins/plan-perfect/charset.c b/plugins/plan-perfect/charset.c
index 0bc63f9..58f19f9 100644
--- a/plugins/plan-perfect/charset.c
+++ b/plugins/plan-perfect/charset.c
@@ -1,6 +1,7 @@
 /*
    This file is from koffice converted from C++ -> C
    and a utility to map from unicode -> UTF-8.
+   And a config file inclusion -- MW.
    No other modifications where made.
    Jody Goldberg 2002 Aug 16
  */
@@ -23,6 +24,7 @@
    Boston, MA  02110-1301  USA.
 */
 
+#include <gnumeric-config.h>
 #include <glib.h>
 #include <string.h>
 
diff --git a/src/outoflinedocs.c b/src/outoflinedocs.c
index 019ca71..1895633 100644
--- a/src/outoflinedocs.c
+++ b/src/outoflinedocs.c
@@ -4,6 +4,8 @@
  * from elsewhere.
  */
 
+#include <gnumeric-config.h>
+
 /* ------------------------------------------------------------------------- */
 
 /**
diff --git a/tools/check-config-h.pl b/tools/check-config-h.pl
index d01a7ed..29b5c6f 100755
--- a/tools/check-config-h.pl
+++ b/tools/check-config-h.pl
@@ -36,28 +36,51 @@ my $exitcode = 0;
 my $configfile = &guess_config_file ();
 my $configfileregexp = '[' . join ('][', split (//, $configfile)) . ']';
 
+my %exceptions =
+    ("./plugins/excel/crypt-md4.c" => 1, # Imported
+     "./plugins/excel/md5.c" => 1, # Imported
+     "./plugins/excel/rc4.c" => 1, # Imported
+
+     "./plugins/excel/xlsx-read-drawing.c" => 1, # Included
+     "./plugins/excel/xlsx-read-docprops.c" => 1, # Included
+     "./plugins/excel/xlsx-write-pivot.c" => 1, # Included
+     "./plugins/excel/xlsx-write-drawing.c" => 1, # Included
+     "./plugins/excel/xlsx-read-pivot.c" => 1, # Included
+     "./plugins/excel/xlsx-write-docprops.c" => 1, # Included
+     "./plugins/excel/biff-types.c" => 1, # Generated
+
+     "./plugins/perl-loader/xsinit.c" => 1, # Generated
+
+     "./tools/process-burkardt.c" => 1, # Not linked in
+    );
+
+
 my $edit = 0;
-&GetOptions("edit" => \$edit);
+my $verbose = 0;
+&GetOptions("edit" => \$edit, 'verbose' => \$verbose);
 
 # default to all the files starting from the current directory
 if (! ARGV) {
-    @ARGV = `find . '(' -name intl -type d -prune ')' -o '(' -name '*.c' -type f -print ')'`;
+    @ARGV = `find . '(' -type d '(' -name intl -o -name macros -o -name .git -o -name win32 ')' -prune ')' 
-o '(' -name '*.c' -type f -print ')'`;
     foreach (@ARGV) { chomp; }
 }
 
 # locate all of the target lines
 my @missing_files;
-FILE: foreach my $file (@ARGV)
-  {
+FILE: foreach my $file (@ARGV) {
+    next if $exceptions{$file};
+
+    print "Checking $file\n" if $verbose;
+
     local (*FILE);
     open FILE, "< $file" or die "can't open $file: $!\n";
     while (<FILE>) {
-        next FILE if /generated by/;
+        next FILE if /generated by/i || /automatically generated/i;
         next FILE if /^\s*\#\s*include\s*[<\"]$configfileregexp[>\"]/;
     }
     close FILE;
     push @missing_files, $file;
-  }
+}
 
 if (@missing_files) {
     print "\n", scalar (@missing_files), " C files don't have <$configfile> includes:\n\n";
@@ -100,6 +123,10 @@ sub guess_config_file {
         if (/^AM_CONFIG_HEADER\((.*)\)/) {
             $configfile = $1;
             $configfile =~ s/^\[(.*)\]$/$1/;
+        } elsif (/^AC_CONFIG_HEADERS\((.*)\)/) {
+            $configfile = $1;
+            $configfile =~ s/^\[(.*)\]$/$1/;
+            last;
         }
     }
     close (FIL);
diff --git a/tools/check-finalizers b/tools/check-finalizers
index 3726f8e..11a953e 100644
--- a/tools/check-finalizers
+++ b/tools/check-finalizers
@@ -37,7 +37,7 @@ my %exceptions =
 
 {
     local (*FIND);
-    open (*FIND, "find . '(' -type f -name '*.c' -print ')' -o '(' -type d '(' -name CVS -o -name intl -o 
-name macros ')' -prune ')' |")
+    open (*FIND, "find . '(' -type f -name '*.c' -print ')' -o '(' -type d '(' -name intl -o -name macros -o 
-name .git -o -name win32 ')' -prune ')' |")
        or die "$0: cannot execute find: $!\n";
   FILE:
     foreach my $filename (<FIND>) {
diff --git a/tools/check-gfrees b/tools/check-gfrees
index 69a5e2e..723225e 100644
--- a/tools/check-gfrees
+++ b/tools/check-gfrees
@@ -37,7 +37,7 @@ my %exceptions =
 
 {
     local (*FIND);
-    open (*FIND, "find . '(' -type f -name '*.c' -print ')' -o '(' -type d '(' -name CVS -o -name intl -o 
-name macros -o -name .git -o -name win32 ')' -prune ')' |")
+    open (*FIND, "find . '(' -type f -name '*.c' -print ')' -o '(' -type d '(' -name intl -o -name macros -o 
-name .git -o -name win32 ')' -prune ')' |")
        or die "$0: cannot execute find: $!\n";
   FILE:
     foreach my $filename (<FIND>) {


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