diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-10-02 15:39:11 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-10-02 15:39:11 +0000 |
commit | 30343a9aeeafcf2d16386ae7ef21cadafce7fb08 (patch) | |
tree | 059e66262b61d6252513617df406a83afc119ab6 /Build/source/libs/xpdf/xpdf-src | |
parent | a369b659ebcd3cecff2863d21d3417bddf869b4b (diff) |
xpdf: modified for w32 (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@48812 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/gfile.cc | 3 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc b/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc index f51dbe36100..b2e97e1b418 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc @@ -580,6 +580,8 @@ GString *fileNameToUTF8(wchar_t *path) { FILE *openFile(const char *path, const char *mode) { #ifdef _WIN32 + return fopen(path, mode); +#if 0 OSVERSIONINFO version; wchar_t wPath[_MAX_PATH + 1]; char nPath[_MAX_PATH + 1]; @@ -636,6 +638,7 @@ FILE *openFile(const char *path, const char *mode) { nPath[i] = '\0'; return fopen(nPath, mode); } +#endif /* 0 */ #else return fopen(path, mode); #endif diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc index 8c4033b0312..119f3abac4d 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc @@ -147,13 +147,17 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GString *ownerPassword, // try to open file // NB: _wfopen is only available in NT +/* version.dwOSVersionInfoSize = sizeof(version); GetVersionEx(&version); if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { file = _wfopen(fileNameU, L"rb"); } else { +*/ file = fopen(fileName->getCString(), "rb"); +/* } +*/ if (!file) { error(errIO, -1, "Couldn't open file '{0:t}'", fileName); errCode = errOpenFile; @@ -535,6 +539,7 @@ GBool PDFDoc::saveEmbeddedFile(int idx, const wchar_t *path, int pathLen) { GBool ret; // NB: _wfopen is only available in NT +/* version.dwOSVersionInfoSize = sizeof(version); GetVersionEx(&version); if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { @@ -544,12 +549,15 @@ GBool PDFDoc::saveEmbeddedFile(int idx, const wchar_t *path, int pathLen) { path2w[i] = 0; f = _wfopen(path2w, L"wb"); } else { +*/ for (i = 0; i < pathLen && i < _MAX_PATH; ++i) { path2c[i] = (char)path[i]; } path2c[i] = 0; f = fopen(path2c, "wb"); +/* } +*/ if (!f) { return gFalse; } |