summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-11-17 07:32:49 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-11-17 07:32:49 +0000
commitd7f366bbd6165f743d507912dfcfeb10f2a304ac (patch)
tree1831cfe03ebe08785cb9c80faeaebd799e142de3 /Build/source/texk/web2c/lib
parent7d31f47ebfdd6ef50950dfbe0136e146c1e604bb (diff)
Support some primitives from pdfTeX in XeTeX (Joseph Wright)
git-svn-id: svn://tug.org/texlive/trunk@49176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c40
2 files changed, 21 insertions, 23 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 37002a0a0f5..823ef735157 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2018-11-17 Joseph Wright <joseph.wright@morningstar2.co.uk>
+
+ * texmfmp.c: Support some primitives from pdfTeX in XeTeX.
+
2018-11-14 Andreas Scherer <https://ascherer.github.io>
* printversion.c: free xmalloc'd prog_name.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 3b5e1ddb235..7a253cf7373 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -151,7 +151,22 @@ char *generic_synctex_get_current_name (void)
#if !IS_pTeX
FILE *Poptr;
#endif
-#endif
+#undef fopen
+#undef xfopen
+#define fopen fsyscp_fopen
+#define xfopen fsyscp_xfopen
+#include <wchar.h>
+int fsyscp_stat(const char *path, struct stat *buffer)
+{
+ wchar_t *wpath;
+ int ret;
+ wpath = get_wstring_from_mbstring(file_system_codepage,
+ path, wpath = NULL);
+ ret = _wstat(wpath, buffer);
+ free(wpath);
+ return ret;
+}
+#endif /* WIN32 */
#if defined(TeX) || (defined(MF) && defined(WIN32))
static int
@@ -1379,24 +1394,6 @@ tcx_get_num (int upb,
/* FIXME: A new format ought to be introduced for these files. */
-#ifdef _WIN32
-#undef fopen
-#undef xfopen
-#define fopen fsyscp_fopen
-#define xfopen fsyscp_xfopen
-#include <wchar.h>
-int fsyscp_stat(const char *path, struct stat *buffer)
-{
- wchar_t *wpath;
- int ret;
- wpath = get_wstring_from_mbstring(file_system_codepage,
- path, wpath = NULL);
- ret = _wstat(wpath, buffer);
- free(wpath);
- return ret;
-}
-#endif /* WIN32 */
-
void
readtcxfile (void)
{
@@ -2322,7 +2319,7 @@ WARNING1 ("invalid value (expected 0 or 1) for environment variable $FORCE_SOURC
}
}
-#if defined(pdfTeX) || defined(epTeX) || defined(eupTeX)
+#if defined(pdfTeX) || defined(epTeX) || defined(eupTeX) || defined(XeTeX)
/*
Getting a high resolution time.
*/
@@ -3010,8 +3007,6 @@ void pdftex_fail(const char *fmt, ...)
}
#endif /* not pdfTeX */
-#if !defined(XeTeX)
-
#define TIME_STR_SIZE 30
char start_time_str[TIME_STR_SIZE];
static char time_str[TIME_STR_SIZE];
@@ -3280,7 +3275,6 @@ void getfiledump(integer s, int offset, int length)
}
xfree(file_name);
}
-#endif /* not XeTeX */
/* Converts any given string in into an allowed PDF string which is
* hexadecimal encoded;