summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-02 09:02:15 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-02 09:02:15 +0000
commit07bf7b9c954d96cff26691380ae814e33e298cb7 (patch)
tree320f8b1654af04556a96078e4387465a8677da79 /Build
parenta50e145e100080813d24a0239e649c11be7b2819 (diff)
detex, dviljk: Rename Foo -> my_Foo to avoid name conflict (from W32TeX)
git-svn-id: svn://tug.org/texlive/trunk@27286 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog5
-rw-r--r--Build/source/texk/detex/detex-2.8-PATCHES/patch-07-rename48
-rw-r--r--Build/source/texk/detex/detex-2.8/detex.h2
-rw-r--r--Build/source/texk/detex/detex-2.8/detex.l8
-rw-r--r--Build/source/texk/detex/detex.c8
-rw-r--r--Build/source/texk/dviljk/ChangeLog6
-rw-r--r--Build/source/texk/dviljk/dvi2xx.c27
-rw-r--r--Build/source/texk/dviljk/dvi2xx.h8
8 files changed, 83 insertions, 29 deletions
diff --git a/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog b/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog
index 00c9a1dad03..a36f36d7fc7 100644
--- a/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog
+++ b/Build/source/texk/detex/detex-2.8-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-07-rename: Rename ERROR -> my_ERROR to avoid a conflict
+ with WIN32 headers (from W32TeX).
+
2012-06-21 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-06-never-interactive (new): Added the never-interactive
diff --git a/Build/source/texk/detex/detex-2.8-PATCHES/patch-07-rename b/Build/source/texk/detex/detex-2.8-PATCHES/patch-07-rename
new file mode 100644
index 00000000000..4f8c1452d2a
--- /dev/null
+++ b/Build/source/texk/detex/detex-2.8-PATCHES/patch-07-rename
@@ -0,0 +1,48 @@
+diff -ur detex-2.8.orig/detex.h detex-2.8/detex.h
+--- detex-2.8.orig/detex.h 2008-02-01 20:55:51.000000000 +0100
++++ detex-2.8/detex.h 2012-08-02 10:31:17.000000000 +0200
+@@ -78,4 +78,4 @@
+ #define CHTEXOPT 't'
+ #define CHWORDOPT 'w'
+
+-#define ERROR -1
++#define my_ERROR -1
+diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l
+--- detex-2.8.orig/detex.l 2012-06-21 11:52:31.000000000 +0200
++++ detex-2.8/detex.l 2012-08-02 10:31:20.000000000 +0200
+@@ -580,7 +580,7 @@
+ sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed");
+ (void) strcpy(sb, sbEnvList);
+ csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS);
+- if (csbEnvIgnore == ERROR)
++ if (csbEnvIgnore == my_ERROR)
+ ErrorExit("The environtment list contains too many environments");
+ }
+
+@@ -738,7 +738,7 @@
+ (void)strcat(sbPaths, DEFAULTINPUTS);
+
+ csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS);
+- if (csbInputPaths == ERROR)
++ if (csbInputPaths == my_ERROR)
+ #ifdef OS2
+ ErrorExit("TEXINPUT(S) environment variable has too many paths");
+ #else
+@@ -751,7 +751,7 @@
+ ** SeparateList -- takes a chSep separated list sbList, replaces the
+ ** chSep's with NULLs and sets rgsbList[i] to the beginning of
+ ** the ith word in sbList. The number of words is returned. A
+-** ERROR is returned if there are more than csbMax words.
++** my_ERROR is returned if there are more than csbMax words.
+ ******/
+
+ int
+@@ -764,7 +764,7 @@
+ if ((sbList = index(sbList, chSep)))
+ *sbList++ = '\0';
+ }
+- return(sbList && *sbList ? ERROR : csbList);
++ return(sbList && *sbList ? my_ERROR : csbList);
+ }
+
+ /******
diff --git a/Build/source/texk/detex/detex-2.8/detex.h b/Build/source/texk/detex/detex-2.8/detex.h
index 68aa9b1d064..0b4c71d5099 100644
--- a/Build/source/texk/detex/detex-2.8/detex.h
+++ b/Build/source/texk/detex/detex-2.8/detex.h
@@ -78,4 +78,4 @@
#define CHTEXOPT 't'
#define CHWORDOPT 'w'
-#define ERROR -1
+#define my_ERROR -1
diff --git a/Build/source/texk/detex/detex-2.8/detex.l b/Build/source/texk/detex/detex-2.8/detex.l
index 7b4aaa1a1de..398dbfea632 100644
--- a/Build/source/texk/detex/detex-2.8/detex.l
+++ b/Build/source/texk/detex/detex-2.8/detex.l
@@ -580,7 +580,7 @@ SetEnvIgnore(const char *sbEnvList)
sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed");
(void) strcpy(sb, sbEnvList);
csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS);
- if (csbEnvIgnore == ERROR)
+ if (csbEnvIgnore == my_ERROR)
ErrorExit("The environtment list contains too many environments");
}
@@ -738,7 +738,7 @@ SetInputPaths(void)
(void)strcat(sbPaths, DEFAULTINPUTS);
csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS);
- if (csbInputPaths == ERROR)
+ if (csbInputPaths == my_ERROR)
#ifdef OS2
ErrorExit("TEXINPUT(S) environment variable has too many paths");
#else
@@ -751,7 +751,7 @@ SetInputPaths(void)
** SeparateList -- takes a chSep separated list sbList, replaces the
** chSep's with NULLs and sets rgsbList[i] to the beginning of
** the ith word in sbList. The number of words is returned. A
-** ERROR is returned if there are more than csbMax words.
+** my_ERROR is returned if there are more than csbMax words.
******/
int
@@ -764,7 +764,7 @@ SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax)
if ((sbList = index(sbList, chSep)))
*sbList++ = '\0';
}
- return(sbList && *sbList ? ERROR : csbList);
+ return(sbList && *sbList ? my_ERROR : csbList);
}
/******
diff --git a/Build/source/texk/detex/detex.c b/Build/source/texk/detex/detex.c
index a2e3020acd4..169b4ee018c 100644
--- a/Build/source/texk/detex/detex.c
+++ b/Build/source/texk/detex/detex.c
@@ -3893,7 +3893,7 @@ SetEnvIgnore(const char *sbEnvList)
sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed");
(void) strcpy(sb, sbEnvList);
csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS);
- if (csbEnvIgnore == ERROR)
+ if (csbEnvIgnore == my_ERROR)
ErrorExit("The environtment list contains too many environments");
}
@@ -4051,7 +4051,7 @@ SetInputPaths(void)
(void)strcat(sbPaths, DEFAULTINPUTS);
csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS);
- if (csbInputPaths == ERROR)
+ if (csbInputPaths == my_ERROR)
#ifdef OS2
ErrorExit("TEXINPUT(S) environment variable has too many paths");
#else
@@ -4064,7 +4064,7 @@ SetInputPaths(void)
** SeparateList -- takes a chSep separated list sbList, replaces the
** chSep's with NULLs and sets rgsbList[i] to the beginning of
** the ith word in sbList. The number of words is returned. A
-** ERROR is returned if there are more than csbMax words.
+** my_ERROR is returned if there are more than csbMax words.
******/
int
@@ -4077,7 +4077,7 @@ SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax)
if ((sbList = index(sbList, chSep)))
*sbList++ = '\0';
}
- return(sbList && *sbList ? ERROR : csbList);
+ return(sbList && *sbList ? my_ERROR : csbList);
}
/******
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog
index 76df090f945..cf9b9d8ccce 100644
--- a/Build/source/texk/dviljk/ChangeLog
+++ b/Build/source/texk/dviljk/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dvi2xx.[ch]: Rename CopyFile -> my_CopyFile, ResetPrinter ->
+ my_ResetPrinter, and PATTERN -> my_PATTERN to avoid a conflict
+ with WIN32 headers (from W32TeX).
+
2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* doc/Makefile.am: Use ../am/bin_links.am for $(bindir) links.
diff --git a/Build/source/texk/dviljk/dvi2xx.c b/Build/source/texk/dviljk/dvi2xx.c
index 7a34413aad6..03c473fa8de 100644
--- a/Build/source/texk/dviljk/dvi2xx.c
+++ b/Build/source/texk/dviljk/dvi2xx.c
@@ -246,11 +246,11 @@ main(int argc, char *argv[])
/* it is important that these be the very first things output !!! */
if ( G_header )
- CopyFile( HeaderFileName );
+ my_CopyFile( HeaderFileName );
/*****************************/
/*for( i0=0; i0<nif; i0++ ) */ /* copy all included files */
- /* CopyFile( Ifile[i0] ); */
+ /* my_CopyFile( Ifile[i0] ); */
/*****************************/
#ifdef IBM3812
@@ -268,7 +268,7 @@ main(int argc, char *argv[])
reset sequence (\eE). According to PJL Reference Manual (p. 4-3) the
correct order is (1) UEL, (2) PJL commands, (3) Reset and PCL job, (4)
Reset, (5) UEL. */
- if (ResetPrinter) {
+ if (my_ResetPrinter) {
EMIT1("\033%%-12345X"); /* UEL: Universal Exit Language */
EMIT2("@PJL SET RESOLUTION=%d\012",RESOLUTION);
EMIT1("@PJL SET PAGEPROTECT=OFF\012");
@@ -283,7 +283,7 @@ main(int argc, char *argv[])
if (econoMode && !LJ6)
EMIT1("\033*v1T");
# else
- if (ResetPrinter)
+ if (my_ResetPrinter)
EMIT1("\033E");
# endif
# ifdef LJ2P
@@ -642,7 +642,7 @@ main(int argc, char *argv[])
/*------------------------ begin dviIO.c ----------------------------------*/
-/* The following functions buffer input/output during CopyFile / CopyHPFile
+/* The following functions buffer input/output during my_CopyFile / CopyHPFile
Write functions are only needed if RISC_BUFFER is defined; otherwise output
is not buffered. */
@@ -706,12 +706,12 @@ b_oflush(FILEPTR spfp)
/* end of buffer handling functions */
-/*-->CopyFile*/ /* copy a file straight through to output */
+/*-->my_CopyFile*/ /* copy a file straight through to output */
/*********************************************************************/
-/***************************** CopyFile ******************************/
+/***************************** my_CopyFile ***************************/
/*********************************************************************/
void
-CopyFile(const char *str )
+my_CopyFile(const char *str )
{
FILEPTR spfp;
int todo;
@@ -2911,7 +2911,7 @@ Primary author of Dvi2xx: Gustaf Neumann; -k maintainer: K. Berry.");
break;
#ifdef LJ
case 'g': /* do not reset printer (go) */
- ResetPrinter = _FALSE;
+ my_ResetPrinter = _FALSE;
break;
#endif
case 'h': /* copy header file through to output */
@@ -3526,14 +3526,13 @@ void AllDone(bool PFlag)
/***************************** DoSpecial ***************************/
/*********************************************************************/
-#define PATTERN LJPATTERN
typedef enum {
ORIENTATION,
RESETPOINTS,
DEFPOINT,
FILL,
GRAY,
- PATTERN,
+ my_PATTERN,
COMMENT,
HPFILE,
HPFILE_VERBATIM,
@@ -3554,7 +3553,7 @@ KeyDesc KeyTab[] = {
{ FILL, "fill", String},
{ GRAY, "gray", Integer},
{ GRAY, "grey", Integer},
- { PATTERN, "pattern", Integer},
+ { my_PATTERN, "pattern", Integer},
{ COMMENT, "comment", String},
{ HPFILE, "hpfile", String},
{ HPFILE_VERBATIM, "hpfile-verbatim", String},
@@ -3876,7 +3875,7 @@ void DoSpecial(char *str, int n)
}
break;
- case PATTERN:
+ case my_PATTERN:
if ((k.v.i >= 0) && (k.v.i < 7)) {
Pattern = k.v.i;
GrayFill = _FALSE;
@@ -4108,7 +4107,7 @@ void DoSpecial(char *str, int n)
if ( file_type == HPFile )
CopyHPFile( include_file );
else if ( file_type == VerbFile )
- CopyFile( include_file );
+ my_CopyFile( include_file );
else if ( file_type == None )
/* do nothing */ ;
else
diff --git a/Build/source/texk/dviljk/dvi2xx.h b/Build/source/texk/dviljk/dvi2xx.h
index cb65e8f5ec7..3e1c45228f0 100644
--- a/Build/source/texk/dviljk/dvi2xx.h
+++ b/Build/source/texk/dviljk/dvi2xx.h
@@ -329,10 +329,6 @@ int intdos();
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#undef CopyFile
-#define CopyFile LJCopyFile
-#undef ResetPrinter
-#define ResetPrinter LJResetPrinter
#endif
#ifndef USEPXL
@@ -457,7 +453,7 @@ void AllDone(bool);
void AssureBinary(FILEPTR); /* DOS and Microsoft C dependent !!! */
#endif
void CloseFiles(void);
-void CopyFile(const char *);
+void my_CopyFile(const char *);
void CopyHPFile(char *);
void DecodeArgs(int, char *[]);
#ifdef __riscos
@@ -535,7 +531,7 @@ bool FirstAlternate = _FALSE; /* first page from alternate casette ? */
#endif
bool Reverse = _FALSE; /* process DVI pages in reverse order? */
bool Landscape = _FALSE; /* print document in ladscape mode */
-bool ResetPrinter = _TRUE; /* reset printer at the begin of the job */
+bool my_ResetPrinter = _TRUE; /* reset printer at the begin of the job */
bool DoublePage = _FALSE; /* print on both sides of a paper */
bool PrintSecondPart = _TRUE; /* print First Part when DoublePage */
bool PrintFirstPart = _TRUE; /* print Second Part when DoublePage */