diff options
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/goo')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.cc | 4 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.h | 4 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GHash.cc | 4 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GHash.h | 4 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GList.cc | 9 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GList.h | 7 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GString.cc | 6 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/GString.h | 4 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/gfile.cc | 25 | ||||
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/goo/gfile.h | 6 |
10 files changed, 33 insertions, 40 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.cc b/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.cc index 8c4c474f5f1..503a06aa9c7 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.cc @@ -12,6 +12,10 @@ #if USE_FIXEDPOINT +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + #include "gmempp.h" #include "FixedPoint.h" diff --git a/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.h b/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.h index 31f2ca4dad2..9f0c3240627 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.h +++ b/Build/source/libs/xpdf/xpdf-src/goo/FixedPoint.h @@ -15,6 +15,10 @@ #if USE_FIXEDPOINT +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + #include <stdio.h> #include <stdlib.h> #include "gtypes.h" diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GHash.cc b/Build/source/libs/xpdf/xpdf-src/goo/GHash.cc index c77a1b90db0..e6b32440fb9 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GHash.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/GHash.cc @@ -8,6 +8,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + #include "gmem.h" #include "gmempp.h" #include "GString.h" diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GHash.h b/Build/source/libs/xpdf/xpdf-src/goo/GHash.h index 92ce226d7bd..179753a50b4 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GHash.h +++ b/Build/source/libs/xpdf/xpdf-src/goo/GHash.h @@ -11,6 +11,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + #include "gtypes.h" class GString; diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GList.cc b/Build/source/libs/xpdf/xpdf-src/goo/GList.cc index 7aaa5d7176f..c194818a743 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GList.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/GList.cc @@ -8,6 +8,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + #include <stdlib.h> #include <string.h> #include "gmem.h" @@ -96,11 +100,6 @@ void GList::sort(int (*cmp)(const void *obj1, const void *obj2)) { qsort(data, length, sizeof(void *), cmp); } -void GList::sort(int first, int n, - int (*cmp)(const void *ptr1, const void *ptr2)) { - qsort(data + first, n, sizeof(void *), cmp); -} - void GList::reverse() { void *t; int n, i; diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GList.h b/Build/source/libs/xpdf/xpdf-src/goo/GList.h index ee12346c5cf..005043726a5 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GList.h +++ b/Build/source/libs/xpdf/xpdf-src/goo/GList.h @@ -11,6 +11,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + #include "gtypes.h" //------------------------------------------------------------------------ @@ -66,9 +70,6 @@ public: // be double-dereferenced. void sort(int (*cmp)(const void *ptr1, const void *ptr2)); - // Sort <n> items starting at <first>. - void sort(int first, int n, int (*cmp)(const void *ptr1, const void *ptr2)); - // Reverse the list. void reverse(); diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GString.cc b/Build/source/libs/xpdf/xpdf-src/goo/GString.cc index 1e41bcaa172..54de35b0a75 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GString.cc +++ b/Build/source/libs/xpdf/xpdf-src/goo/GString.cc @@ -10,6 +10,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + #include <stdlib.h> #include <stddef.h> #include <string.h> @@ -412,8 +416,6 @@ GString *GString::appendfv(const char *fmt, va_list argList) { // format the argument arg = args[idx]; - str = NULL; - len = 0; switch (ft) { case fmtIntDecimal: formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 10, &str, &len); diff --git a/Build/source/libs/xpdf/xpdf-src/goo/GString.h b/Build/source/libs/xpdf/xpdf-src/goo/GString.h index 2e67fd0c0d0..6b342f85ec7 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/GString.h +++ b/Build/source/libs/xpdf/xpdf-src/goo/GString.h @@ -13,6 +13,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + #include <limits.h> // for LLONG_MAX and ULLONG_MAX #include <stdarg.h> #include "gtypes.h" 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]; diff --git a/Build/source/libs/xpdf/xpdf-src/goo/gfile.h b/Build/source/libs/xpdf/xpdf-src/goo/gfile.h index 9dbb1c9b8ee..d0d2ad6f9e1 100644 --- a/Build/source/libs/xpdf/xpdf-src/goo/gfile.h +++ b/Build/source/libs/xpdf/xpdf-src/goo/gfile.h @@ -64,9 +64,6 @@ extern GString *makePathAbsolute(GString *path); // Returns true if [path] exists and is a regular file. extern GBool pathIsFile(const char *path); -// Returns true if [path] exists and is a directory. -extern GBool pathIsDir(const char *path); - // Get the modification time for <fileName>. Returns 0 if there is an // error. extern time_t getModTime(char *fileName); @@ -93,9 +90,6 @@ extern GString *fileNameToUTF8(char *path); // Convert a file name from UCS-2 to UTF-8. extern GString *fileNameToUTF8(wchar_t *path); -// Convert a file name from the OEM code page to UTF-8. -extern GString *fileNameMultiByteToUTF8(char *path); - // Convert a file name from UTF-8 to UCS-2. [out] has space for // [outSize] wchar_t elements (including the trailing zero). Returns // [out]. |