diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-06-12 14:17:04 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-06-12 14:17:04 +0000 |
commit | 75aa2967ffe88d15a692c589b75edc3f8fae5c25 (patch) | |
tree | 4db0b8709049c4d0ab3451b99fadc8461c4cd341 /Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea | |
parent | 19794b65842cb439b28d895fad7b65d410583202 (diff) |
detex 2.8 finished
git-svn-id: svn://tug.org/texlive/trunk@18912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea')
-rw-r--r-- | Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea | 145 |
1 files changed, 68 insertions, 77 deletions
diff --git a/Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea b/Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea index 149c479c535..f30d6f81d12 100644 --- a/Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea +++ b/Build/source/texk/detex/detex-2.8-PATCHES/patch-04-kpathsea @@ -1,16 +1,31 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l ---- detex-2.8.orig/detex.l 2010-06-09 23:21:25.000000000 +0200 -+++ detex-2.8/detex.l 2010-06-10 01:09:20.413856795 +0200 -@@ -49,6 +49,8 @@ +--- 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" -+#ifndef KPATHSEA ++ ++#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,24 +61,52 @@ +@@ -59,10 +76,15 @@ #ifndef MAXPATHLEN #include <sys/param.h> #endif @@ -18,77 +33,37 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l #ifdef OS2 #include <stdlib.h> #endif -+#ifndef NO_MALLOC_DECL -+char *malloc(); -+#endif -+#ifndef WIN32 -+char *getenv(); -+#endif -+ -+#else + ++#endif /* 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" ++#undef IGNORE + -+#ifdef HAVE_SYS_PARAM_H -+#include <sys/param.h> -+#endif -+ -+#endif - - #undef IGNORE - --int BeginEnv(const char *sbEnv); --int EndEnv(const char *sbEnv); --void InputFile(char *sbFile); --void IncludeFile(char *sbFile); --void AddInclude(char *sbFile); --void SetInputPaths(void); --void SetEnvIgnore(const char *sbEnvList); --void Warning(const char *sb1, const char *sb2); --void ErrorExit(const char *sb1); --int SeparateList(char *sbList, char *rgsbList[] ,char chSep,int csbMax); --int InList(char *sbFile); --FILE * TexOpen(char *sbFile); -+int BeginEnv(const char *sbEnv); -+int EndEnv(const char *sbEnv); -+void InputFile(char *sbFile); -+void IncludeFile(char *sbFile); -+void AddInclude(char *sbFile); -+void SetInputPaths(void); -+void SetEnvIgnore(const char *sbEnvList); -+void Warning(const char *sb1, const char *sb2); -+void ErrorExit(const char *sb1); -+int SeparateList(char *sbList, char *rgsbList[] ,char chSep,int csbMax); -+int InList(char *sbFile); -+FILE *TexOpen(char *sbFile); -+char *SafeMalloc(int cch, const char *sbMessage); -+#ifdef OS2 -+void yyless(int); -+void OS2UsageExit(void); -+#endif - #define LaBEGIN if (fLatex) BEGIN #define IGNORE if (fSpace && !fWord) putchar(' ') -@@ -87,22 +117,15 @@ - #define STRIPARGS(x) cArgs=x; LaBEGIN LaMacro2 - #define CITE(x) if (fLatex && !fCite) KILLARGS(x) - --char *SafeMalloc(int cch, const char *sbMessage); --#ifndef NO_MALLOC_DECL --char *malloc(); --#endif --#ifndef WIN32 --char *getenv(); --#endif --#ifdef OS2 --void yyless(int); --#endif + #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 */ @@ -101,7 +76,7 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l 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> */ -@@ -404,6 +427,9 @@ +@@ -400,6 +429,9 @@ _splitpath (rgsbArgs[0], drive, dir, fname, ext); sbProgName = strlwr(fname); #else @@ -111,7 +86,7 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l if ((sbProgName = rindex(rgsbArgs[0], '/')) != NULL) sbProgName++; else -@@ -411,9 +437,11 @@ +@@ -407,9 +439,11 @@ #endif if (strcmp("delatex",sbProgName) == 0) fLatex = 1; @@ -124,7 +99,7 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l /* process command line options */ while (iArgs < cArgs && *(pch = rgsbArgs[iArgs]) == CHOPT) { -@@ -648,7 +676,7 @@ +@@ -644,7 +678,7 @@ int InList(char *sbFile) { @@ -133,7 +108,23 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l int i; if (csbIncList == 0) /* no list */ -@@ -745,10 +773,12 @@ +@@ -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) { @@ -148,7 +139,7 @@ diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l for (iPath = 0; iPath < csbInputPaths; iPath++) { #ifdef OS2 -@@ -795,7 +825,15 @@ +@@ -788,7 +826,15 @@ if ((fp = fopen(sbFullPath, "r")) != NULL) return(fp); } |