diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2024-02-10 08:13:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2024-02-10 08:13:48 +0000 |
commit | 90a8327e9b036ece000905d54a316b792d891e0b (patch) | |
tree | 45536c0f5666955912b04bcd20c14a57aad31872 /Build/source/libs/xpdf/xpdf-src/goo/gfile.cc | |
parent | 0357cc55904fda095727bb30f07b68dbf3439f8e (diff) |
revert (xpdf 4.05 to xpdf 4.04)
git-svn-id: svn://tug.org/texlive/trunk@69766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/goo/gfile.cc')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/gfile.cc | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc b/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc index e1fdf297689..c2e7512e188 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/gfile.cc @@ -418,18 +418,6 @@ GBool pathIsFile(const char *path) { #endif } -GBool pathIsDir(const char *path) { -#ifdef _WIN32 - wchar_t wPath[winMaxLongPath + 1]; - fileNameToUCS2(path, wPath, winMaxLongPath + 1); - DWORD attr = GetFileAttributesW(wPath); - return attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY); -#else - struct stat statBuf; - return stat(path, &statBuf) == 0 && S_ISDIR(statBuf.st_mode); -#endif -} - time_t getModTime(char *fileName) { #ifdef _WIN32 //~ should implement this, but it's (currently) only used in xpdf @@ -614,17 +602,6 @@ GString *fileNameToUTF8(wchar_t *path) { return s; } -GString *fileNameMultiByteToUTF8(char *path) { - wchar_t fileNameW[winMaxLongPath + 1]; - if (MultiByteToWideChar(CP_OEMCP, 0, path, -1, - fileNameW, sizeof(fileNameW) / sizeof(wchar_t))) { - return fileNameToUTF8(fileNameW); - } else { - // shouldn't happen, but just in case... - return new GString(path); - } -} - wchar_t *fileNameToUCS2(const char *path, wchar_t *out, size_t outSize) { const char *p; size_t i; @@ -703,7 +680,7 @@ void readWindowsShortcut(wchar_t *wPath, size_t wPathSize) { } hres = persistFile->Load(wPath, STGM_READ); if (FAILED(hres)) { - fprintf(stderr, "IPersistFile.Load failed: 0x%08lx\n", hres); + fprintf(stderr, "IPersistFile.Load failed: 0x%08x\n", hres); exit(1); } wchar_t target[winMaxLongPath + 1]; |