diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-06-26 02:37:10 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-06-26 02:37:10 +0000 |
commit | d20548087f4b3f821726e5ea2ae506b134fcbdfe (patch) | |
tree | 27be02e71d8e0d3f43ae3a24054c6b4f751a95ec /Build/source/texk/detex/TLpatches | |
parent | 9f9d4524eb411625a4fe3a0d6a0162a798be6cfb (diff) |
opendetex-2.8.3
git-svn-id: svn://tug.org/texlive/trunk@48092 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/detex/TLpatches')
-rw-r--r-- | Build/source/texk/detex/TLpatches/ChangeLog | 10 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/TL-Changes | 4 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-01-ANSI-C | 228 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-03-warnings | 124 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-04-kpathsea | 155 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-05-kern-and-glue | 35 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-06-never-interactive | 9 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-07-rename | 48 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-08-kpathsea | 52 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-09-binary | 28 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-10-ANSI-strings | 52 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-11-c_auto_h | 21 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-12-typo | 12 | ||||
-rw-r--r-- | Build/source/texk/detex/TLpatches/patch-13-typo-minipage | 12 |
14 files changed, 28 insertions, 762 deletions
diff --git a/Build/source/texk/detex/TLpatches/ChangeLog b/Build/source/texk/detex/TLpatches/ChangeLog index 40a038a6f51..882556a27e2 100644 --- a/Build/source/texk/detex/TLpatches/ChangeLog +++ b/Build/source/texk/detex/TLpatches/ChangeLog @@ -1,3 +1,13 @@ +2018-06-20 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + Adapt to opendetex-2.8.3. + * patch-04-kpathsea: update. + * patch-01-ANSI-C, patch-03-warnings, patch-05-kern-and-glue, + patch-06-never-interactive, patch-07-rename, patch-08-kpathsea, + patch-09-binary, patch-10-ANSI-strings, patch-11-c_auto_h, + patch-12-typo: removed. + * patch-13-typo-minipage (new): Fix a typo. + 2014-08-20 Peter Breitenlohner <peb@mppmu.mpg.de> * patch-12-typo (new): Fix a typo. diff --git a/Build/source/texk/detex/TLpatches/TL-Changes b/Build/source/texk/detex/TLpatches/TL-Changes index bc7475d4644..5c561ecbf20 100644 --- a/Build/source/texk/detex/TLpatches/TL-Changes +++ b/Build/source/texk/detex/TLpatches/TL-Changes @@ -1,5 +1,5 @@ -Changes applied to the detex-2.8 tree as obtained from: - http://www.cs.purdue.edu/homes/trinkle/detex/ +Changes applied to the opendetex-2.8.3 tree as obtained from: + https://github.com/pkubowicz/opendetex/releases Renamed: detex.1l -> detex.man diff --git a/Build/source/texk/detex/TLpatches/patch-01-ANSI-C b/Build/source/texk/detex/TLpatches/patch-01-ANSI-C deleted file mode 100644 index 22b9b553f9c..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-01-ANSI-C +++ /dev/null @@ -1,228 +0,0 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2008-02-01 20:55:51.000000000 +0100 -+++ detex-2.8/detex.l 2010-06-11 23:12:06.648394135 +0200 -@@ -72,12 +72,26 @@ - #define STRIPARGS(x) cArgs=x; LaBEGIN LaMacro2 - #define CITE(x) if (fLatex && !fCite) KILLARGS(x) - --char *SafeMalloc(); -+void AddInclude(char *sbFile); -+void ErrorExit(char *sb1); -+void IncludeFile(char *sbFile); -+void InputFile(char *sbFile); -+void SetEnvIgnore(char *sbEnvList); -+void SetInputPaths(void); -+void Warning(char *sb1, char *sb2); -+int BeginEnv(char *sbEnv); -+int EndEnv(char *sbEnv); -+int InList(char *sbFile); -+int SeparateList(char *sbList, char *rgsbList[] ,char chSep, int csbMax); -+FILE *TexOpen(char *sbFile); -+char *SafeMalloc(int cch, char *sbMessage); -+char *getenv(); - #ifndef NO_MALLOC_DECL - char *malloc(); - #endif - #ifdef OS2 - void yyless(int); -+void OS2UsageExit(void); - #endif - - char *rgsbEnvIgnore[MAXENVS]; /* list of environments ignored */ -@@ -368,12 +382,10 @@ - ** If no input files are specified on the command line, process stdin. - ******/ - --main(cArgs,rgsbArgs) --int cArgs; --char *rgsbArgs[]; -+int -+main(int cArgs, char *rgsbArgs[]) - { - char *pch, *sbEnvList = DEFAULTENV, sbBadOpt[2]; -- FILE *TexOpen(); - int fSawFile = 0, iArgs = 1; - - /* get base name and decide what we are doing, detex or delatex */ -@@ -477,7 +489,8 @@ - ** return the termination signal for lex. - ******/ - --yywrap() -+int -+yywrap(void) - { - (void)fclose(yyin); - #ifdef FLEX_SCANNER -@@ -501,8 +514,8 @@ - ** a yyless routine - ******/ - --void yyless(n) --int n; -+void -+yyless(int n) - { - int i = strlen(yytext); - -@@ -516,8 +529,8 @@ - ** sbEnvList. - ******/ - --SetEnvIgnore(sbEnvList) --char *sbEnvList; -+void -+SetEnvIgnore(char *sbEnvList) - { - char *sb; - -@@ -533,8 +546,8 @@ - ** is, sbCurrentEnv is set to sbEnv. - ******/ - --BeginEnv(sbEnv) --char *sbEnv; -+int -+BeginEnv(char *sbEnv) - { - int i; - -@@ -551,8 +564,8 @@ - ** EndEnv -- checks to see if sbEnv is the current environment being ignored. - ******/ - --EndEnv(sbEnv) --char *sbEnv; -+int -+EndEnv(char *sbEnv) - { - if (!fLatex) return(0); - if (strcmp(sbEnv, sbCurrentEnv) == 0) -@@ -565,11 +578,9 @@ - ** the sbFile is ignored. - ******/ - --InputFile(sbFile) --char *sbFile; -+void -+InputFile(char *sbFile) - { -- FILE *TexOpen(); -- - if (!fFollow) - return; - rgfp[cfp++] = yyin; -@@ -589,11 +600,9 @@ - ** and open sbFile. If the open fails, the sbFile is ignored. - ******/ - --IncludeFile(sbFile) --char *sbFile; -+void -+IncludeFile(char *sbFile) - { -- FILE *TexOpen(); -- - if (!fFollow) - return; - if (!InList(sbFile)) -@@ -615,8 +624,8 @@ - ** If the include list is too long, sbFile is ignored. - ******/ - --AddInclude(sbFile) --char *sbFile; -+void -+AddInclude(char *sbFile) - { - if (!fFollow) - return; -@@ -631,8 +640,8 @@ - ** no list, all files are assumed to be "in the list". - ******/ - --InList(sbFile) --char *sbFile; -+int -+InList(char *sbFile) - { - char *pch, sbBase[MAXPATHLEN]; - int i; -@@ -658,9 +667,10 @@ - ** routine does not honor the '//' construct (expand subdirs). - ******/ - --SetInputPaths() -+void -+SetInputPaths(void) - { -- char *sb, *sbPaths, *getenv(); -+ char *sb, *sbPaths; - int cchDefaults, cchPaths; - - cchDefaults = strlen(DEFAULTINPUTS); -@@ -698,9 +708,8 @@ - ** ERROR is returned if there are more than csbMax words. - ******/ - --SeparateList(sbList, rgsbList, chSep, csbMax) --char *sbList, *rgsbList[], chSep; --int csbMax; -+int -+SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax) - { - int csbList = 0; - -@@ -725,8 +734,7 @@ - ******/ - - FILE * --TexOpen(sbFile) --char *sbFile; -+TexOpen(char *sbFile) - { - char *pch, *sbNew; - FILE *fp; -@@ -784,9 +792,7 @@ - ******/ - - char * --SafeMalloc(cch, sbMessage) --int cch; --char *sbMessage; -+SafeMalloc(int cch, char *sbMessage) - { - char *sb; - -@@ -799,8 +805,8 @@ - ** Warning -- print a warning message preceded by the program name. - ******/ - --Warning(sb1, sb2) --char *sb1, *sb2; -+void -+Warning(char *sb1, char *sb2) - { - (void)fprintf(stderr, "%s: warning: %s %s\n", sbProgName, sb1, sb2); - } -@@ -810,8 +816,8 @@ - ** Stdout is flushed and detex exits. - ******/ - --ErrorExit(sb1) --char *sb1; -+void -+ErrorExit(char *sb1) - { - (void)fflush(stdout); - (void)fprintf(stderr, "%s: error: %s\n", sbProgName, sb1); -@@ -823,7 +829,8 @@ - ** OS2UsageExit -- print OS/2 usage message and exit. - ******/ - --OS2UsageExit() -+void -+OS2UsageExit(void) - { - (void)printf("\n%s [ -clnstw ] [ -e environment-list ] [ filename[.tex] ... ]\n", - sbProgName); diff --git a/Build/source/texk/detex/TLpatches/patch-03-warnings b/Build/source/texk/detex/TLpatches/patch-03-warnings deleted file mode 100644 index d3a9f93eab5..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-03-warnings +++ /dev/null @@ -1,124 +0,0 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2010-06-11 23:12:06.000000000 +0200 -+++ detex-2.8/detex.l 2010-06-11 23:26:08.554783186 +0200 -@@ -73,18 +73,18 @@ - #define CITE(x) if (fLatex && !fCite) KILLARGS(x) - - void AddInclude(char *sbFile); --void ErrorExit(char *sb1); -+void ErrorExit(const char *sb1); - void IncludeFile(char *sbFile); - void InputFile(char *sbFile); --void SetEnvIgnore(char *sbEnvList); -+void SetEnvIgnore(const char *sbEnvList); - void SetInputPaths(void); --void Warning(char *sb1, char *sb2); --int BeginEnv(char *sbEnv); --int EndEnv(char *sbEnv); -+void Warning(const char *sb1, const char *sb2); -+int BeginEnv(const char *sbEnv); -+int EndEnv(const char *sbEnv); - int InList(char *sbFile); - int SeparateList(char *sbList, char *rgsbList[] ,char chSep, int csbMax); - FILE *TexOpen(char *sbFile); --char *SafeMalloc(int cch, char *sbMessage); -+char *SafeMalloc(int cch, const char *sbMessage); - char *getenv(); - #ifndef NO_MALLOC_DECL - char *malloc(); -@@ -385,7 +385,8 @@ - int - main(int cArgs, char *rgsbArgs[]) - { -- char *pch, *sbEnvList = DEFAULTENV, sbBadOpt[2]; -+ char *pch, sbBadOpt[2]; -+ const char *sbEnvList = DEFAULTENV; - int fSawFile = 0, iArgs = 1; - - /* get base name and decide what we are doing, detex or delatex */ -@@ -530,7 +531,7 @@ - ******/ - - void --SetEnvIgnore(char *sbEnvList) -+SetEnvIgnore(const char *sbEnvList) - { - char *sb; - -@@ -547,7 +548,7 @@ - ******/ - - int --BeginEnv(char *sbEnv) -+BeginEnv(const char *sbEnv) - { - int i; - -@@ -565,7 +566,7 @@ - ******/ - - int --EndEnv(char *sbEnv) -+EndEnv(const char *sbEnv) - { - if (!fLatex) return(0); - if (strcmp(sbEnv, sbCurrentEnv) == 0) -@@ -670,7 +671,8 @@ - void - SetInputPaths(void) - { -- char *sb, *sbPaths; -+ const char *sb; -+ char *sbPaths; - int cchDefaults, cchPaths; - - cchDefaults = strlen(DEFAULTINPUTS); -@@ -715,7 +717,7 @@ - - while (sbList && *sbList && csbList < csbMax) { - rgsbList[csbList++] = sbList; -- if (sbList = index(sbList, chSep)) -+ if ((sbList = index(sbList, chSep))) - *sbList++ = '\0'; - } - return(sbList && *sbList ? ERROR : csbList); -@@ -760,10 +762,12 @@ - /* If sbFile ends in .tex then it must be there */ - if ((pch = rindex(sbFullPath, '.')) != NULL - && (strcmp(pch, ".tex") == 0)) -+ { - if ((fp = fopen(sbFullPath, "r")) != NULL) - return(fp); - else - continue; -+ } - - /* if .<ext> then try to open it. the '.' represents */ - /* the beginning of an extension if it is not the first */ -@@ -792,7 +796,7 @@ - ******/ - - char * --SafeMalloc(int cch, char *sbMessage) -+SafeMalloc(int cch, const char *sbMessage) - { - char *sb; - -@@ -806,7 +810,7 @@ - ******/ - - void --Warning(char *sb1, char *sb2) -+Warning(const char *sb1, const char *sb2) - { - (void)fprintf(stderr, "%s: warning: %s %s\n", sbProgName, sb1, sb2); - } -@@ -817,7 +821,7 @@ - ******/ - - void --ErrorExit(char *sb1) -+ErrorExit(const char *sb1) - { - (void)fflush(stdout); - (void)fprintf(stderr, "%s: error: %s\n", sbProgName, sb1); diff --git a/Build/source/texk/detex/TLpatches/patch-04-kpathsea b/Build/source/texk/detex/TLpatches/patch-04-kpathsea index f30d6f81d12..d0e3f52364a 100644 --- a/Build/source/texk/detex/TLpatches/patch-04-kpathsea +++ b/Build/source/texk/detex/TLpatches/patch-04-kpathsea @@ -1,31 +1,7 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2010-06-11 23:26:08.000000000 +0200 -+++ detex-2.8/detex.l 2010-06-12 00:15:05.785339097 +0200 -@@ -49,6 +49,23 @@ - */ - - #include "detex.h" -+ -+#ifdef KPATHSEA -+ -+#include <c-auto.h> -+#include <kpathsea/c-auto.h> -+#include <kpathsea/config.h> -+#include <kpathsea/c-memstr.h> -+#include <kpathsea/c-pathmx.h> -+#include <kpathsea/c-std.h> -+#include <kpathsea/tex-file.h> -+ -+#ifdef HAVE_SYS_PARAM_H -+#include <sys/param.h> -+#endif -+ -+#else /* KPATHSEA */ -+ - #ifdef HAVE_STRING_H - #include <string.h> - #define index strchr -@@ -59,10 +76,15 @@ +diff -ur opendetex-2.8.3.orig/detex.l opendetex-2.8.3/detex.l +--- opendetex-2.8.3.orig/detex.l 2018-02-11 18:42:05.000000000 +0900 ++++ opendetex-2.8.3/detex.l 2018-06-20 23:12:37.000000000 +0900 +@@ -73,6 +73,7 @@ #ifndef MAXPATHLEN #include <sys/param.h> #endif @@ -33,126 +9,3 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l #ifdef OS2 #include <stdlib.h> #endif - -+#endif /* KPATHSEA */ -+ -+#undef IGNORE -+ - #define LaBEGIN if (fLatex) BEGIN - #define IGNORE if (fSpace && !fWord) putchar(' ') - #define SPACE if (!fWord) putchar(' ') -@@ -77,7 +99,9 @@ - void IncludeFile(char *sbFile); - void InputFile(char *sbFile); - void SetEnvIgnore(const char *sbEnvList); -+#ifndef KPATHSEA - void SetInputPaths(void); -+#endif - void Warning(const char *sb1, const char *sb2); - int BeginEnv(const char *sbEnv); - int EndEnv(const char *sbEnv); -@@ -85,6 +109,7 @@ - int SeparateList(char *sbList, char *rgsbList[] ,char chSep, int csbMax); - FILE *TexOpen(char *sbFile); - char *SafeMalloc(int cch, const char *sbMessage); -+#ifndef KPATHSEA - char *getenv(); - #ifndef NO_MALLOC_DECL - char *malloc(); -@@ -93,12 +118,16 @@ - void yyless(int); - void OS2UsageExit(void); - #endif -+#endif /* KPATHSEA */ - - char *rgsbEnvIgnore[MAXENVS]; /* list of environments ignored */ - char *rgsbIncList[MAXINCLIST]; /* list of includeonly files */ - char *rgsbInputPaths[MAXINPUTPATHS]; /* list of input paths in order */ - char sbCurrentEnv[CCHMAXENV]; /* current environment being ignored */ - char *sbProgName; /* name we were invoked with */ -+#ifndef NOFILE /* might be defined in <sys/param.h> */ -+#define NOFILE 256 -+#endif - FILE *rgfp[NOFILE+1]; /* stack of input/include files */ - int cfp = 0; /* count of files in stack */ - int cOpenBrace = 0; /* count of `{' in <LaMacro> and <LaMacro2> */ -@@ -400,6 +429,9 @@ - _splitpath (rgsbArgs[0], drive, dir, fname, ext); - sbProgName = strlwr(fname); - #else -+#ifdef KPATHSEA -+ kpse_set_program_name (rgsbArgs[0], NULL); -+#endif - if ((sbProgName = rindex(rgsbArgs[0], '/')) != NULL) - sbProgName++; - else -@@ -407,9 +439,11 @@ - #endif - if (strcmp("delatex",sbProgName) == 0) - fLatex = 1; -- -+ -+#ifndef KPATHSEA - /* set rgsbInputPaths for use with TexOpen() */ - SetInputPaths(); -+#endif - - /* process command line options */ - while (iArgs < cArgs && *(pch = rgsbArgs[iArgs]) == CHOPT) { -@@ -644,7 +678,7 @@ - int - InList(char *sbFile) - { -- char *pch, sbBase[MAXPATHLEN]; -+ char *pch, sbBase[PATH_MAX]; - int i; - - if (csbIncList == 0) /* no list */ -@@ -659,6 +693,7 @@ - return(0); - } - -+#ifndef KPATHSEA - /****** - ** SetInputPaths -- sets rgsbInputPaths to the values indicated by the - ** TEXINPUTS environment variable if set or else DEFAULTINPUTS. If -@@ -702,6 +737,7 @@ - ErrorExit("TEXINPUTS environment variable has too many paths"); - #endif - } -+#endif - - /****** - ** SeparateList -- takes a chSep separated list sbList, replaces the -@@ -738,10 +774,12 @@ - FILE * - TexOpen(char *sbFile) - { -- char *pch, *sbNew; -+ char *sbNew; -+#ifndef KPATHSEA -+ char *pch; - FILE *fp; - int iPath; -- static char sbFullPath[MAXPATHLEN]; -+ static char sbFullPath[PATH_MAX]; - - for (iPath = 0; iPath < csbInputPaths; iPath++) { - #ifdef OS2 -@@ -788,7 +826,15 @@ - if ((fp = fopen(sbFullPath, "r")) != NULL) - return(fp); - } -- return((FILE *)NULL); -+ return NULL; -+#else -+ sbNew = kpse_find_file (sbFile, kpse_tex_format, false); -+ -+ if (sbNew == NULL) -+ return NULL; -+ -+ return fopen (sbNew, "r"); -+#endif - } - - /****** diff --git a/Build/source/texk/detex/TLpatches/patch-05-kern-and-glue b/Build/source/texk/detex/TLpatches/patch-05-kern-and-glue deleted file mode 100644 index 784ef2ff5a7..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-05-kern-and-glue +++ /dev/null @@ -1,35 +0,0 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2010-06-12 00:15:05.000000000 +0200 -+++ detex-2.8/detex.l 2011-06-07 13:42:05.000000000 +0200 -@@ -157,7 +157,12 @@ - W [a-zA-Z]+ - N [+-]?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+)) - U pt|pc|in|bp|cm|mm|dd|cc|sp --D {S}(({N}{S}{U})|(\\{W})){S} -+HU {U}|em -+HD {S}(({N}{S}{HU})|(\\{W})){S} -+HG {HD}(plus{HD})?(minus{HD})? -+VU {U}|ex -+VD {S}(({N}{S}{VU})|(\\{W})){S} -+VG {VD}(plus{VD})?(minus{VD})? - Z \*? - - %Start Define Display IncludeOnly Input Math Normal Control -@@ -212,11 +217,12 @@ - <LaEnd>"\n" NEWLINE; - <LaEnd>. ; - --<Normal>"\\vskip"{D} ; --<Normal>"\\vspace"{Z}{S}"{"{D}"}" ; --<Normal>"\\hskip"{D} ; --<Normal>"\\hspace"{Z}{S}"{"{D}"}" ; --<Normal>"\\addvspace"{S}"{"{D}"}" ; -+<Normal>"\\kern"{HD} ; -+<Normal>"\\vskip"{VG} ; -+<Normal>"\\vspace"{Z}{S}"{"{VG}"}" ; -+<Normal>"\\hskip"{HG} ; -+<Normal>"\\hspace"{Z}{S}"{"{HG}"}" ; -+<Normal>"\\addvspace"{S}"{"{VG}"}" ; - - <Normal>"\\newlength" { KILLARGS(1); } - <Normal>"\\setlength" { KILLARGS(2); } diff --git a/Build/source/texk/detex/TLpatches/patch-06-never-interactive b/Build/source/texk/detex/TLpatches/patch-06-never-interactive deleted file mode 100644 index 9db44ace3ed..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-06-never-interactive +++ /dev/null @@ -1,9 +0,0 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2011-06-07 13:42:05.000000000 +0200 -+++ detex-2.8/detex.l 2012-06-21 11:52:31.000000000 +0200 -@@ -1,3 +1,5 @@ -+%option never-interactive -+ - %{ - #ifndef lint - static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; diff --git a/Build/source/texk/detex/TLpatches/patch-07-rename b/Build/source/texk/detex/TLpatches/patch-07-rename deleted file mode 100644 index 4f8c1452d2a..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-07-rename +++ /dev/null @@ -1,48 +0,0 @@ -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/TLpatches/patch-08-kpathsea b/Build/source/texk/detex/TLpatches/patch-08-kpathsea deleted file mode 100644 index 2eacbf68bcc..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-08-kpathsea +++ /dev/null @@ -1,52 +0,0 @@ - Clarify that DEFAULTINPUTS and CHPATHSEP are not used with KPATHSEA - -diff -ur detex-2.8.orig/detex.h detex-2.8/detex.h ---- detex-2.8.orig/detex.h 2012-08-02 10:31:17.000000000 +0200 -+++ detex-2.8/detex.h 2012-08-24 10:23:29.000000000 +0200 -@@ -51,6 +51,7 @@ - - #define MAXINCLIST 40 - -+#ifndef KPATHSEA - #ifdef OS2 - #define DEFAULTINPUTS ".;/emtex/texinput" - #define CHPATHSEP ';' -@@ -58,6 +59,8 @@ - #define DEFAULTINPUTS ".:/usr/local/tex/inputs" - #define CHPATHSEP ':' - #endif -+#endif -+ - #define MAXINPUTPATHS 10 - - #define DEFAULTENV "array,eqnarray,equation,figure,mathmatica,picture,table,verbatim" - - With KPATHSEA use kpse_program_name. - Fixed a typo. - -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2012-08-02 10:31:20.000000000 +0200 -+++ detex-2.8/detex.l 2012-08-24 10:37:03.000000000 +0200 -@@ -436,10 +436,10 @@ - #endif - _splitpath (rgsbArgs[0], drive, dir, fname, ext); - sbProgName = strlwr(fname); --#else --#ifdef KPATHSEA -+#elif defined(KPATHSEA) - kpse_set_program_name (rgsbArgs[0], NULL); --#endif -+ sbProgName = kpse_program_name; -+#else - if ((sbProgName = rindex(rgsbArgs[0], '/')) != NULL) - sbProgName++; - else -@@ -462,7 +467,7 @@ - break; - case CHENVOPT: - if (++iArgs >= cArgs) { -- ErrorExit("-e option requires and argument"); -+ ErrorExit("-e option requires an argument"); - } - sbEnvList = rgsbArgs[iArgs]; - break; diff --git a/Build/source/texk/detex/TLpatches/patch-09-binary b/Build/source/texk/detex/TLpatches/patch-09-binary deleted file mode 100644 index 95d272030ad..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-09-binary +++ /dev/null @@ -1,28 +0,0 @@ - In TeX Live we use binary mode for all output files. - -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2012-08-24 10:37:03.000000000 +0200 -+++ detex-2.8/detex.l 2012-08-24 10:51:12.000000000 +0200 -@@ -83,6 +83,11 @@ - #include <stdlib.h> - #endif - -+#ifdef WIN32 -+#include <fcntl.h> -+#include <io.h> -+#endif -+ - #endif /* KPATHSEA */ - - #undef IGNORE -@@ -494,6 +499,10 @@ - } - SetEnvIgnore(sbEnvList); - -+#ifdef WIN32 -+ _setmode(fileno(stdout), _O_BINARY); -+#endif -+ - /* process input files */ - for (; iArgs < cArgs; iArgs++) { - fSawFile++; diff --git a/Build/source/texk/detex/TLpatches/patch-10-ANSI-strings b/Build/source/texk/detex/TLpatches/patch-10-ANSI-strings deleted file mode 100644 index 8f03d7b26af..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-10-ANSI-strings +++ /dev/null @@ -1,52 +0,0 @@ -diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2012-08-24 10:51:12.000000000 +0200 -+++ detex-2.8/detex.l 2013-06-27 18:49:05.000000000 +0200 -@@ -70,10 +70,10 @@ - - #ifdef HAVE_STRING_H - #include <string.h> --#define index strchr --#define rindex strrchr - #else - #include <strings.h> -+#define strchr index -+#define strrchr rindex - #endif - #ifndef MAXPATHLEN - #include <sys/param.h> -@@ -445,7 +445,7 @@ - kpse_set_program_name (rgsbArgs[0], NULL); - sbProgName = kpse_program_name; - #else -- if ((sbProgName = rindex(rgsbArgs[0], '/')) != NULL) -+ if ((sbProgName = strrchr(rgsbArgs[0], '/')) != NULL) - sbProgName++; - else - sbProgName = rgsbArgs[0]; -@@ -701,7 +701,7 @@ - if (csbIncList == 0) /* no list */ - return(1); - (void)strcpy(sbBase, sbFile); -- if ((pch = rindex(sbBase, '.')) != NULL) -+ if ((pch = strrchr(sbBase, '.')) != NULL) - *pch = '\0'; - i = 0; - while ((i < csbIncList) && rgsbIncList[i]) -@@ -770,7 +770,7 @@ - - while (sbList && *sbList && csbList < csbMax) { - rgsbList[csbList++] = sbList; -- if ((sbList = index(sbList, chSep))) -+ if ((sbList = strchr(sbList, chSep))) - *sbList++ = '\0'; - } - return(sbList && *sbList ? my_ERROR : csbList); -@@ -815,7 +815,7 @@ - #endif - - /* If sbFile ends in .tex then it must be there */ -- if ((pch = rindex(sbFullPath, '.')) != NULL -+ if ((pch = strrchr(sbFullPath, '.')) != NULL - && (strcmp(pch, ".tex") == 0)) - { - if ((fp = fopen(sbFullPath, "r")) != NULL) diff --git a/Build/source/texk/detex/TLpatches/patch-11-c_auto_h b/Build/source/texk/detex/TLpatches/patch-11-c_auto_h deleted file mode 100644 index e88dad2ad37..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-11-c_auto_h +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur -x detex.c detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2013-06-27 18:49:05.000000000 +0200 -+++ detex-2.8/detex.l 2013-06-28 14:46:12.000000000 +0200 -@@ -1,6 +1,6 @@ - %option never-interactive - --%{ -+%top{ - #ifndef lint - static char rcsid[] = "$Header: /p/src/local/bin/detex/RCS/detex.l,v 2.22 2007/03/01 20:22:01 trinkle Exp trinkle $"; - #endif -@@ -89,7 +89,9 @@ - #endif - - #endif /* KPATHSEA */ -+} - -+%{ - #undef IGNORE - - #define LaBEGIN if (fLatex) BEGIN diff --git a/Build/source/texk/detex/TLpatches/patch-12-typo b/Build/source/texk/detex/TLpatches/patch-12-typo deleted file mode 100644 index 77087a7ccaa..00000000000 --- a/Build/source/texk/detex/TLpatches/patch-12-typo +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur -x detex.c detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2013-06-28 14:46:12.000000000 +0200 -+++ detex-2.8/detex.l 2014-08-20 09:56:40.115740053 +0200 -@@ -592,7 +592,7 @@ - (void) strcpy(sb, sbEnvList); - csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS); - if (csbEnvIgnore == my_ERROR) -- ErrorExit("The environtment list contains too many environments"); -+ ErrorExit("The environment list contains too many environments"); - } - - /****** diff --git a/Build/source/texk/detex/TLpatches/patch-13-typo-minipage b/Build/source/texk/detex/TLpatches/patch-13-typo-minipage new file mode 100644 index 00000000000..0274ea378c4 --- /dev/null +++ b/Build/source/texk/detex/TLpatches/patch-13-typo-minipage @@ -0,0 +1,12 @@ +diff -ur opendetex-2.8.3.orig/detex.l opendetex-2.8.3/detex.l +--- opendetex-2.8.3.orig/detex.l 2018-02-11 18:42:05.000000000 +0900 ++++ opendetex-2.8.3/detex.l 2018-06-20 23:12:37.000000000 +0900 +@@ -203,7 +204,7 @@ + <LaVerbatim>. ECHO; + + <LaBegin>{S}"{"{S}"minipage"{S}"}" { KILLARGS(1); +- if (BeginEnv("minpage")) ++ if (BeginEnv("minipage")) + BEGIN LaEnv; + else + BEGIN LaMacro; /* Normal; */ |