From 7bf872af277e5b41f5409c2531345b7701d06a4d Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 29 Mar 2012 12:38:06 +0000 Subject: chktex, psutils, xpdfopen: Remove extern decls from *.c files git-svn-id: svn://tug.org/texlive/trunk@25775 c570f23f-e606-0410-a88d-b1316a301751 --- .../utils/chktex/chktex-1.6.4-PATCHES/ChangeLog | 4 ++ .../chktex/chktex-1.6.4-PATCHES/patch-06-extern | 36 ++++++++++++++++++ Build/source/utils/chktex/chktex-1.6.4/Utility.c | 7 ---- Build/source/utils/chktex/chktex-1.6.4/Utility.h | 7 ++++ .../utils/psutils/psutils-1.17-PATCHES/ChangeLog | 4 ++ .../psutils/psutils-1.17-PATCHES/patch-11-extern | 44 ++++++++++++++++++++++ Build/source/utils/psutils/psutils-1.17/epsffit.c | 2 +- Build/source/utils/psutils/psutils-1.17/pserror.c | 2 - Build/source/utils/psutils/psutils-1.17/psutil.c | 8 ---- Build/source/utils/xpdfopen/ChangeLog | 5 +++ Build/source/utils/xpdfopen/utils.c | 4 +- Build/source/utils/xpdfopen/utils.h | 4 +- 12 files changed, 105 insertions(+), 22 deletions(-) create mode 100644 Build/source/utils/chktex/chktex-1.6.4-PATCHES/patch-06-extern create mode 100644 Build/source/utils/psutils/psutils-1.17-PATCHES/patch-11-extern (limited to 'Build/source/utils') diff --git a/Build/source/utils/chktex/chktex-1.6.4-PATCHES/ChangeLog b/Build/source/utils/chktex/chktex-1.6.4-PATCHES/ChangeLog index 2b7e41bb492..9e858f69af0 100644 --- a/Build/source/utils/chktex/chktex-1.6.4-PATCHES/ChangeLog +++ b/Build/source/utils/chktex/chktex-1.6.4-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2012-03-29 Peter Breitenlohner + + * patch-06-extern (new): Move decls from Utility.c to Utility.h. + 2010-06-13 Peter Breitenlohner * patch-05-ctype-bug (new): Bug fix: diff --git a/Build/source/utils/chktex/chktex-1.6.4-PATCHES/patch-06-extern b/Build/source/utils/chktex/chktex-1.6.4-PATCHES/patch-06-extern new file mode 100644 index 00000000000..5772649bed1 --- /dev/null +++ b/Build/source/utils/chktex/chktex-1.6.4-PATCHES/patch-06-extern @@ -0,0 +1,36 @@ + Remove extern decls from *.c files. + +diff -ur chktex-1.6.4.orig/Utility.c chktex-1.6.4/Utility.c +--- chktex-1.6.4.orig/Utility.c 2010-06-13 14:50:28.000000000 +0200 ++++ chktex-1.6.4/Utility.c 2012-03-29 14:09:07.000000000 +0200 +@@ -31,13 +31,6 @@ + #include "Resource.h" + #include "OpSys.h" + +-#ifdef ASM_HASHWORD +-extern unsigned short HashWord(const char *a); +-typedef unsigned short HASH_TYPE; +-#else +-typedef unsigned long HASH_TYPE; +-#endif +- + /***************************** SUPPORT FUNCTIONS ************************/ + + +diff -ur chktex-1.6.4.orig/Utility.h chktex-1.6.4/Utility.h +--- chktex-1.6.4.orig/Utility.h 2010-05-02 21:59:49.000000000 +0200 ++++ chktex-1.6.4/Utility.h 2012-03-29 14:09:07.000000000 +0200 +@@ -49,6 +49,13 @@ + #define FORWL(ind, list) for(ind = 0; ind < (list).Stack.Used; ind++) + + ++#ifdef ASM_HASHWORD ++extern unsigned short HashWord(const char *a); ++typedef unsigned short HASH_TYPE; ++#else ++typedef unsigned long HASH_TYPE; ++#endif ++ + enum Strip + { + STRP_LFT = 0x01, diff --git a/Build/source/utils/chktex/chktex-1.6.4/Utility.c b/Build/source/utils/chktex/chktex-1.6.4/Utility.c index 6fa26f3cd79..dfea57d891e 100644 --- a/Build/source/utils/chktex/chktex-1.6.4/Utility.c +++ b/Build/source/utils/chktex/chktex-1.6.4/Utility.c @@ -31,13 +31,6 @@ #include "Resource.h" #include "OpSys.h" -#ifdef ASM_HASHWORD -extern unsigned short HashWord(const char *a); -typedef unsigned short HASH_TYPE; -#else -typedef unsigned long HASH_TYPE; -#endif - /***************************** SUPPORT FUNCTIONS ************************/ diff --git a/Build/source/utils/chktex/chktex-1.6.4/Utility.h b/Build/source/utils/chktex/chktex-1.6.4/Utility.h index 8df63f26d7a..a5baa176b13 100644 --- a/Build/source/utils/chktex/chktex-1.6.4/Utility.h +++ b/Build/source/utils/chktex/chktex-1.6.4/Utility.h @@ -49,6 +49,13 @@ #define FORWL(ind, list) for(ind = 0; ind < (list).Stack.Used; ind++) +#ifdef ASM_HASHWORD +extern unsigned short HashWord(const char *a); +typedef unsigned short HASH_TYPE; +#else +typedef unsigned long HASH_TYPE; +#endif + enum Strip { STRP_LFT = 0x01, diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog b/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog index f4bd0e67e6b..4c1555011c5 100644 --- a/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2012-03-29 Peter Breitenlohner + + * patch-11-extern (new): Remove extern decls from *.c files. + 2011-09-22 Peter Breitenlohner * patch-10-binary-mode (new): Fix error messages when setting diff --git a/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-11-extern b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-11-extern new file mode 100644 index 00000000000..35cd5e92bd8 --- /dev/null +++ b/Build/source/utils/psutils/psutils-1.17-PATCHES/patch-11-extern @@ -0,0 +1,44 @@ + Remove extern decls from *.c files. + +diff -ur psutils-1.17.orig/epsffit.c psutils-1.17/epsffit.c +--- psutils-1.17.orig/epsffit.c 2009-06-24 00:22:15.000000000 +0200 ++++ psutils-1.17/epsffit.c 2012-03-29 14:25:12.000000000 +0200 +@@ -23,7 +23,7 @@ + + #include "pserror.h" + #include "patchlev.h" +-#include "config.h" ++#include "psutil.h" + + #define MIN(x,y) ((x) > (y) ? (y) : (x)) + #define MAX(x,y) ((x) > (y) ? (x) : (y)) +diff -ur psutils-1.17.orig/pserror.c psutils-1.17/pserror.c +--- psutils-1.17.orig/pserror.c 2009-09-01 13:40:27.000000000 +0200 ++++ psutils-1.17/pserror.c 2012-03-29 14:25:12.000000000 +0200 +@@ -5,8 +5,6 @@ + * Warnings and errors for PS programs + */ + +-extern char *program ; /* Defined by main program, giving program name */ +- + #include "psutil.h" + #include "pserror.h" + #include "patchlev.h" +diff -ur psutils-1.17.orig/psutil.c psutils-1.17/psutil.c +--- psutils-1.17.orig/psutil.c 2009-09-01 13:43:52.000000000 +0200 ++++ psutils-1.17/psutil.c 2012-03-29 14:25:12.000000000 +0200 +@@ -23,14 +23,6 @@ + + #define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0) + +-extern char *program ; +-extern int pages; +-extern int verbose; +-extern FILE *infile; +-extern FILE *outfile; +-extern char pagelabel[BUFSIZ]; +-extern int pageno; +- + static char buffer[BUFSIZ]; + static long bytes = 0; + static long pagescmt = 0; diff --git a/Build/source/utils/psutils/psutils-1.17/epsffit.c b/Build/source/utils/psutils/psutils-1.17/epsffit.c index cc4432e4a8c..e49010cfbf4 100644 --- a/Build/source/utils/psutils/psutils-1.17/epsffit.c +++ b/Build/source/utils/psutils/psutils-1.17/epsffit.c @@ -23,7 +23,7 @@ #include "pserror.h" #include "patchlev.h" -#include "config.h" +#include "psutil.h" #define MIN(x,y) ((x) > (y) ? (y) : (x)) #define MAX(x,y) ((x) > (y) ? (x) : (y)) diff --git a/Build/source/utils/psutils/psutils-1.17/pserror.c b/Build/source/utils/psutils/psutils-1.17/pserror.c index f26aab7c8dd..1a52824674a 100644 --- a/Build/source/utils/psutils/psutils-1.17/pserror.c +++ b/Build/source/utils/psutils/psutils-1.17/pserror.c @@ -5,8 +5,6 @@ * Warnings and errors for PS programs */ -extern char *program ; /* Defined by main program, giving program name */ - #include "psutil.h" #include "pserror.h" #include "patchlev.h" diff --git a/Build/source/utils/psutils/psutils-1.17/psutil.c b/Build/source/utils/psutils/psutils-1.17/psutil.c index 9ededee7f82..094e84853fd 100644 --- a/Build/source/utils/psutils/psutils-1.17/psutil.c +++ b/Build/source/utils/psutils/psutils-1.17/psutil.c @@ -23,14 +23,6 @@ #define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0) -extern char *program ; -extern int pages; -extern int verbose; -extern FILE *infile; -extern FILE *outfile; -extern char pagelabel[BUFSIZ]; -extern int pageno; - static char buffer[BUFSIZ]; static long bytes = 0; static long pagescmt = 0; diff --git a/Build/source/utils/xpdfopen/ChangeLog b/Build/source/utils/xpdfopen/ChangeLog index 127f9e0de4c..f0ec83b2125 100644 --- a/Build/source/utils/xpdfopen/ChangeLog +++ b/Build/source/utils/xpdfopen/ChangeLog @@ -1,3 +1,8 @@ +2012-03-29 Peter Breitenlohner + + * utils.c: Move extern decl from here ... + * utils.h: ... to here. + 2012-01-28 Jim Diamond * sendx.c: fix (kludgily?) reset_focus() so that it actually works. * pdfopen.c: add -r and -reset_focus options. diff --git a/Build/source/utils/xpdfopen/utils.c b/Build/source/utils/xpdfopen/utils.c index a75be79a02e..3ec2844bf5e 100644 --- a/Build/source/utils/xpdfopen/utils.c +++ b/Build/source/utils/xpdfopen/utils.c @@ -1,7 +1,7 @@ /* * utils.c: Items common to pdfopen and pdfclose. * - * Copyright (C) 2010 Jim Diamond + * Copyright (C) 2010, 2012 Jim Diamond * You may freely use, modify and/or distribute this file. */ @@ -11,8 +11,6 @@ #include "utils.h" #include "xpdfopen.h" -extern char * progname; - /* * Allocate memory and create a window name. * Return a pointer to the new string or NULL on failure. diff --git a/Build/source/utils/xpdfopen/utils.h b/Build/source/utils/xpdfopen/utils.h index 2eae6e88bf3..8c8f6566c70 100644 --- a/Build/source/utils/xpdfopen/utils.h +++ b/Build/source/utils/xpdfopen/utils.h @@ -1,13 +1,15 @@ /* * utils.h: declare prototypes for functions defined in utils.c * - * Copyright (C) 2010 Jim Diamond + * Copyright (C) 2010, 2012 Jim Diamond * You may freely use, modify and/or distribute this file. */ #ifndef UTILS_H #define UTILS_H +extern char * progname; + char * make_window_name(const char * fmt, const char * basename); #endif -- cgit v1.2.3