diff options
Diffstat (limited to 'Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-50-kpathsea')
-rw-r--r-- | Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-50-kpathsea | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-50-kpathsea b/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-50-kpathsea deleted file mode 100644 index 9ca1eb8f22b..00000000000 --- a/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-50-kpathsea +++ /dev/null @@ -1,116 +0,0 @@ -diff -ur dvi2tty-5.3.1.orig/disdvi.c dvi2tty-5.3.1/disdvi.c ---- dvi2tty-5.3.1.orig/disdvi.c 2010-10-21 08:07:43.000000000 +0200 -+++ dvi2tty-5.3.1/disdvi.c 2010-10-22 09:08:02.000000000 +0200 -@@ -60,6 +60,11 @@ - # include "macintosh.h" - #endif - -+#if defined(KPATHSEA) -+#define NO_DEBUG 1 -+#include <kpathsea/config.h> -+#include <kpathsea/lib.h> -+#endif - - - /* -@@ -181,7 +150,7 @@ - else - dvifp = stdin; - --#if defined(MSDOS) -+#if defined(MSDOS) || defined(WIN32) - setmode(fileno(dvifp), O_BINARY); - #endif - -diff -ur dvi2tty-5.3.1.orig/dvi2tty.c dvi2tty-5.3.1/dvi2tty.c ---- dvi2tty-5.3.1.orig/dvi2tty.c 2010-10-21 11:15:43.000000000 +0200 -+++ dvi2tty-5.3.1/dvi2tty.c 2010-10-22 14:10:28.000000000 +0200 -@@ -301,7 +301,7 @@ - #if defined(THINK_C) - if (inputfromfile) { - #endif --#if defined(MSDOS) -+#if defined(MSDOS) || defined(WIN32) - if ((DVIfile = fopen(DVIfilename, "rb")) == NULL) - #else - # if defined(VMS) -@@ -648,6 +648,48 @@ - } /* plcnxt */ - - -+#ifdef KPATHSEA -+#ifdef __DJGPP__ -+/* `stat' is way too expensive for such a simple job. */ -+#define READABLE(fn, st) \ -+ (access (fn, R_OK) == 0 && access (fn, D_OK) == -1) -+#else -+#define READABLE(fn, st) \ -+ (access (fn, R_OK) == 0 && stat (fn, &(st)) == 0 && !S_ISDIR (st.st_mode)) -+#endif -+ -+static char * -+readable_file(char *name) -+{ -+ char *ret; -+ -+#ifdef WIN32 -+ unsigned int fa; -+ -+ fa = GetFileAttributes(name); -+ if (fa == 0xFFFFFFFF) { -+ ret = NULL; -+ } -+ else if ((fa & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) { -+ ret = NULL; -+ } -+ else { -+ ret = name; -+ } -+#else /* ! WIN32 */ -+ struct stat st; -+ -+ if (READABLE (name, st)) { -+ ret = name; -+ -+ } else { /* Some other error. */ -+ ret = NULL; -+ } -+#endif -+ return ret; -+ -+} -+#endif - - /* - * GETFNAME -- {Make sure we have a .dvi filename. -@@ -661,7 +704,11 @@ - if (i == 0) - usage(ign); - strcpy(DVIfilename, str); -+#ifdef KPATHSEA -+ if (!readable_file(DVIfilename)) -+#else - if ((i < 5) || strcmp(str+i-4, ".dvi")) -+#endif - strcat(DVIfilename, ".dvi"); - - return; -diff -ur dvi2tty-5.3.1.orig/dvi2tty.h dvi2tty-5.3.1/dvi2tty.h ---- dvi2tty-5.3.1.orig/dvi2tty.h 2003-01-23 04:01:04.000000000 +0100 -+++ dvi2tty-5.3.1/dvi2tty.h 2010-10-22 15:08:40.000000000 +0200 -@@ -32,8 +32,15 @@ - # endif - #endif - -+#if defined(KPATHSEA) -+#define NO_DEBUG 1 -+#include <kpathsea/config.h> -+#include <sys/types.h> -+#include <sys/stat.h> -+#else - #define TRUE 1 - #define FALSE 0 -+#endif - #define nil NULL - - /* |