Commit 091f68cc authored by Kovid Goyal's avatar Kovid Goyal Committed by Albert Astals Cid

Use _WIN32 instead of WIN32

More info at http://bugs.freedesktop.org/show_bug.cgi?id=24259
parent 7fd8bdfa
...@@ -8,6 +8,20 @@ ...@@ -8,6 +8,20 @@
// //
//======================================================================== //========================================================================
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
//
//========================================================================
#ifndef GMUTEX_H #ifndef GMUTEX_H
#define GMUTEX_H #define GMUTEX_H
...@@ -22,7 +36,7 @@ ...@@ -22,7 +36,7 @@
// ... // ...
// gDestroyMutex(&m); // gDestroyMutex(&m);
#ifdef WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
// Copyright (C) 2008 Adam Batkin <adam@batkin.net> // Copyright (C) 2008 Adam Batkin <adam@batkin.net>
// Copyright (C) 2008 Hib Eris <hib@hiberis.nl> // Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
#include <config.h> #include <config.h>
#ifdef WIN32 #ifdef _WIN32
# include <time.h> # include <time.h>
#else #else
# if defined(MACOS) # if defined(MACOS)
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
# if defined(VMS) && (__DECCXX_VER < 50200000) # if defined(VMS) && (__DECCXX_VER < 50200000)
# include <unixlib.h> # include <unixlib.h>
# endif # endif
#endif // WIN32 #endif // _WIN32
#include "GooString.h" #include "GooString.h"
#include "gfile.h" #include "gfile.h"
...@@ -63,7 +64,7 @@ GooString *getHomeDir() { ...@@ -63,7 +64,7 @@ GooString *getHomeDir() {
//---------- VMS ---------- //---------- VMS ----------
return new GooString("SYS$LOGIN:"); return new GooString("SYS$LOGIN:");
#elif defined(__EMX__) || defined(WIN32) #elif defined(__EMX__) || defined(_WIN32)
//---------- OS/2+EMX and Win32 ---------- //---------- OS/2+EMX and Win32 ----------
char *s; char *s;
GooString *ret; GooString *ret;
...@@ -109,7 +110,7 @@ GooString *getCurrentDir() { ...@@ -109,7 +110,7 @@ GooString *getCurrentDir() {
#if defined(__EMX__) #if defined(__EMX__)
if (_getcwd2(buf, sizeof(buf))) if (_getcwd2(buf, sizeof(buf)))
#elif defined(WIN32) #elif defined(_WIN32)
if (GetCurrentDirectory(sizeof(buf), buf)) if (GetCurrentDirectory(sizeof(buf), buf))
#elif defined(ACORN) #elif defined(ACORN)
if (strcpy(buf, "@")) if (strcpy(buf, "@"))
...@@ -163,7 +164,7 @@ GooString *appendToPath(GooString *path, char *fileName) { ...@@ -163,7 +164,7 @@ GooString *appendToPath(GooString *path, char *fileName) {
} }
return path; return path;
#elif defined(WIN32) #elif defined(_WIN32)
//---------- Win32 ---------- //---------- Win32 ----------
GooString *tmp; GooString *tmp;
char buf[256]; char buf[256];
...@@ -299,7 +300,7 @@ GooString *grabPath(char *fileName) { ...@@ -299,7 +300,7 @@ GooString *grabPath(char *fileName) {
return new GooString(fileName, p + 1 - fileName); return new GooString(fileName, p + 1 - fileName);
return new GooString(); return new GooString();
#elif defined(__EMX__) || defined(WIN32) #elif defined(__EMX__) || defined(_WIN32)
//---------- OS/2+EMX and Win32 ---------- //---------- OS/2+EMX and Win32 ----------
char *p; char *p;
...@@ -343,7 +344,7 @@ GBool isAbsolutePath(char *path) { ...@@ -343,7 +344,7 @@ GBool isAbsolutePath(char *path) {
return strchr(path, ':') || return strchr(path, ':') ||
(path[0] == '[' && path[1] != '.' && path[1] != '-'); (path[0] == '[' && path[1] != '.' && path[1] != '-');
#elif defined(__EMX__) || defined(WIN32) #elif defined(__EMX__) || defined(_WIN32)
//---------- OS/2+EMX and Win32 ---------- //---------- OS/2+EMX and Win32 ----------
return path[0] == '/' || path[0] == '\\' || path[1] == ':'; return path[0] == '/' || path[0] == '\\' || path[1] == ':';
...@@ -373,7 +374,7 @@ GooString *makePathAbsolute(GooString *path) { ...@@ -373,7 +374,7 @@ GooString *makePathAbsolute(GooString *path) {
} }
return path; return path;
#elif defined(WIN32) #elif defined(_WIN32)
//---------- Win32 ---------- //---------- Win32 ----------
char buf[_MAX_PATH]; char buf[_MAX_PATH];
char *fp; char *fp;
...@@ -444,7 +445,7 @@ GooString *makePathAbsolute(GooString *path) { ...@@ -444,7 +445,7 @@ GooString *makePathAbsolute(GooString *path) {
} }
time_t getModTime(char *fileName) { time_t getModTime(char *fileName) {
#ifdef WIN32 #ifdef _WIN32
//~ should implement this, but it's (currently) only used in xpdf //~ should implement this, but it's (currently) only used in xpdf
return 0; return 0;
#else #else
...@@ -458,7 +459,7 @@ time_t getModTime(char *fileName) { ...@@ -458,7 +459,7 @@ time_t getModTime(char *fileName) {
} }
GBool openTempFile(GooString **name, FILE **f, char *mode) { GBool openTempFile(GooString **name, FILE **f, char *mode) {
#if defined(WIN32) #if defined(_WIN32)
//---------- Win32 ---------- //---------- Win32 ----------
char *tempDir; char *tempDir;
GooString *s, *s2; GooString *s, *s2;
...@@ -585,7 +586,7 @@ char *getLine(char *buf, int size, FILE *f) { ...@@ -585,7 +586,7 @@ char *getLine(char *buf, int size, FILE *f) {
GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) { GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) {
#ifdef VMS #ifdef VMS
char *p; char *p;
#elif defined(WIN32) #elif defined(_WIN32)
DWORD fa; DWORD fa;
#elif defined(ACORN) #elif defined(ACORN)
#else #else
...@@ -603,7 +604,7 @@ GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) { ...@@ -603,7 +604,7 @@ GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) {
dir = gTrue; dir = gTrue;
#elif defined(ACORN) #elif defined(ACORN)
#else #else
#ifdef WIN32 #ifdef _WIN32
fa = GetFileAttributes(fullPath->getCString()); fa = GetFileAttributes(fullPath->getCString());
dir = (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY)); dir = (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY));
#else #else
...@@ -622,7 +623,7 @@ GDirEntry::~GDirEntry() { ...@@ -622,7 +623,7 @@ GDirEntry::~GDirEntry() {
GDir::GDir(char *name, GBool doStatA) { GDir::GDir(char *name, GBool doStatA) {
path = new GooString(name); path = new GooString(name);
doStat = doStatA; doStat = doStatA;
#if defined(WIN32) #if defined(_WIN32)
GooString *tmp; GooString *tmp;
tmp = path->copy(); tmp = path->copy();
...@@ -641,7 +642,7 @@ GDir::GDir(char *name, GBool doStatA) { ...@@ -641,7 +642,7 @@ GDir::GDir(char *name, GBool doStatA) {
GDir::~GDir() { GDir::~GDir() {
delete path; delete path;
#if defined(WIN32) #if defined(_WIN32)
if (hnd != INVALID_HANDLE_VALUE) { if (hnd != INVALID_HANDLE_VALUE) {
FindClose(hnd); FindClose(hnd);
hnd = INVALID_HANDLE_VALUE; hnd = INVALID_HANDLE_VALUE;
...@@ -657,7 +658,7 @@ GDir::~GDir() { ...@@ -657,7 +658,7 @@ GDir::~GDir() {
GDirEntry *GDir::getNextEntry() { GDirEntry *GDir::getNextEntry() {
GDirEntry *e; GDirEntry *e;
#if defined(WIN32) #if defined(_WIN32)
if (hnd != INVALID_HANDLE_VALUE) { if (hnd != INVALID_HANDLE_VALUE) {
e = new GDirEntry(path->getCString(), ffd.cFileName, doStat); e = new GDirEntry(path->getCString(), ffd.cFileName, doStat);
if (!FindNextFile(hnd, &ffd)) { if (!FindNextFile(hnd, &ffd)) {
...@@ -701,7 +702,7 @@ GDirEntry *GDir::getNextEntry() { ...@@ -701,7 +702,7 @@ GDirEntry *GDir::getNextEntry() {
} }
void GDir::rewind() { void GDir::rewind() {
#ifdef WIN32 #ifdef _WIN32
GooString *tmp; GooString *tmp;
if (hnd != INVALID_HANDLE_VALUE) if (hnd != INVALID_HANDLE_VALUE)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
// //
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> // Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stddef.h> #include <stddef.h>
extern "C" { extern "C" {
#if defined(WIN32) #if defined(_WIN32)
# include <sys/stat.h> # include <sys/stat.h>
# ifdef FPTEX # ifdef FPTEX
# include <win32lib.h> # include <win32lib.h>
...@@ -141,7 +142,7 @@ private: ...@@ -141,7 +142,7 @@ private:
GooString *path; // directory path GooString *path; // directory path
GBool doStat; // call stat() for each entry? GBool doStat; // call stat() for each entry?
#if defined(WIN32) #if defined(_WIN32)
WIN32_FIND_DATA ffd; WIN32_FIND_DATA ffd;
HANDLE hnd; HANDLE hnd;
#elif defined(ACORN) #elif defined(ACORN)
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define pclose _pclose #define pclose _pclose
#endif #endif
#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(WIN32) || defined(__DJGPP__) || defined(MACOS) #if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
#define POPEN_READ_MODE "rb" #define POPEN_READ_MODE "rb"
#else #else
#define POPEN_READ_MODE "r" #define POPEN_READ_MODE "r"
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#define pclose _pclose #define pclose _pclose
#endif #endif
#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(WIN32) || defined(__DJGPP__) || defined(MACOS) #if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
#define POPEN_READ_MODE "rb" #define POPEN_READ_MODE "rb"
#else #else
#define POPEN_READ_MODE "r" #define POPEN_READ_MODE "r"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// ABWOutputDev.h // ABWOutputDev.h
// //
// Copyright 2006-2007 Jauco Noordzij <jauco@jauco.nl> // Copyright 2006-2007 Jauco Noordzij <jauco@jauco.nl>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
//======================================================================== //========================================================================
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
#include <libxml/xpath.h> #include <libxml/xpath.h>
#include <libxml/xpathInternals.h> #include <libxml/xpathInternals.h>
#ifdef WIN32 #ifdef _WIN32
# define SLASH '\\' # define SLASH '\\'
#else #else
# define SLASH '/' # define SLASH '/'
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// under GPL version 2 or later // under GPL version 2 or later
// //
// Copyright (C) 2008-2009 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2008-2009 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -73,7 +74,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName) ...@@ -73,7 +74,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName)
fileName->free(); fileName->free();
if (!fileSpec->dictLookup("F", fileName)->isString ()) { if (!fileSpec->dictLookup("F", fileName)->isString ()) {
fileName->free(); fileName->free();
#ifdef WIN32 #ifdef _WIN32
char *platform = "DOS"; char *platform = "DOS";
#else #else
char *platform = "Unix"; char *platform = "Unix";
...@@ -91,7 +92,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName) ...@@ -91,7 +92,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName)
} }
// system-dependent path manipulation // system-dependent path manipulation
#ifdef WIN32 #ifdef _WIN32
int i, j; int i, j;
GooString *name = fileName->getString(); GooString *name = fileName->getString();
// "//...." --> "\...." // "//...." --> "\...."
...@@ -133,7 +134,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName) ...@@ -133,7 +134,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName)
name->del(i); name->del(i);
} }
} }
#endif /* WIN32 */ #endif /* _WIN32 */
return gTrue; return gTrue;
} }
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
// Copyright (C) 2007, 2009 Jonathan Kew <jonathan_kew@sil.org> // Copyright (C) 2007, 2009 Jonathan Kew <jonathan_kew@sil.org>
// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
// Copyright (C) 2009 William Bader <williambader@hotmail.com> // Copyright (C) 2009 William Bader <williambader@hotmail.com>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -37,11 +38,11 @@ ...@@ -37,11 +38,11 @@
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#ifdef ENABLE_PLUGINS #ifdef ENABLE_PLUGINS
# ifndef WIN32 # ifndef _WIN32
# include <dlfcn.h> # include <dlfcn.h>
# endif # endif
#endif #endif
#ifdef WIN32 #ifdef _WIN32
# include <shlobj.h> # include <shlobj.h>
#endif #endif
#include "goo/gmem.h" #include "goo/gmem.h"
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
#include "GlobalParams.h" #include "GlobalParams.h"
#include "GfxFont.h" #include "GfxFont.h"
#ifdef WIN32 #ifdef _WIN32
# define strcasecmp stricmp # define strcasecmp stricmp
#endif #endif
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
#include "UTF8.h" #include "UTF8.h"
#ifdef ENABLE_PLUGINS #ifdef ENABLE_PLUGINS
# ifdef WIN32 # ifdef _WIN32
extern XpdfPluginVecTable xpdfPluginVecTable; extern XpdfPluginVecTable xpdfPluginVecTable;
# endif # endif
#endif #endif
...@@ -139,7 +140,7 @@ DisplayFontParam::~DisplayFontParam() { ...@@ -139,7 +140,7 @@ DisplayFontParam::~DisplayFontParam() {
} }
} }
#ifdef WIN32 #ifdef _WIN32
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// WinFontInfo // WinFontInfo
...@@ -382,7 +383,7 @@ int CALLBACK WinFontList::enumFunc2(CONST LOGFONT *font, ...@@ -382,7 +383,7 @@ int CALLBACK WinFontList::enumFunc2(CONST LOGFONT *font,
return 1; return 1;
} }
#endif // WIN32 #endif // _WIN32
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// PSFontParam // PSFontParam
...@@ -417,7 +418,7 @@ public: ...@@ -417,7 +418,7 @@ public:
private: private:
#ifdef WIN32 #ifdef _WIN32
Plugin(HMODULE libA); Plugin(HMODULE libA);
HMODULE lib; HMODULE lib;
#else #else
...@@ -431,7 +432,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -431,7 +432,7 @@ Plugin *Plugin::load(char *type, char *name) {
Plugin *plugin; Plugin *plugin;
XpdfPluginVecTable *vt; XpdfPluginVecTable *vt;
XpdfBool (*xpdfInitPlugin)(void); XpdfBool (*xpdfInitPlugin)(void);
#ifdef WIN32 #ifdef _WIN32
HMODULE libA; HMODULE libA;
#else #else
void *dlA; void *dlA;
...@@ -442,7 +443,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -442,7 +443,7 @@ Plugin *Plugin::load(char *type, char *name) {
appendToPath(path, type); appendToPath(path, type);
appendToPath(path, name); appendToPath(path, name);
#ifdef WIN32 #ifdef _WIN32
path->append(".dll"); path->append(".dll");
if (!(libA = LoadLibrary(path->getCString()))) { if (!(libA = LoadLibrary(path->getCString()))) {
error(-1, "Failed to load plugin '%s'", error(-1, "Failed to load plugin '%s'",
...@@ -476,7 +477,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -476,7 +477,7 @@ Plugin *Plugin::load(char *type, char *name) {
} }
memcpy(vt, &xpdfPluginVecTable, sizeof(xpdfPluginVecTable)); memcpy(vt, &xpdfPluginVecTable, sizeof(xpdfPluginVecTable));
#ifdef WIN32 #ifdef _WIN32
if (!(xpdfInitPlugin = (XpdfBool (*)(void)) if (!(xpdfInitPlugin = (XpdfBool (*)(void))
GetProcAddress(libA, "xpdfInitPlugin"))) { GetProcAddress(libA, "xpdfInitPlugin"))) {
error(-1, "Failed to find xpdfInitPlugin in plugin '%s'", error(-1, "Failed to find xpdfInitPlugin in plugin '%s'",
...@@ -497,7 +498,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -497,7 +498,7 @@ Plugin *Plugin::load(char *type, char *name) {
goto err2; goto err2;
} }
#ifdef WIN32 #ifdef _WIN32
plugin = new Plugin(libA); plugin = new Plugin(libA);
#else #else
plugin = new Plugin(dlA); plugin = new Plugin(dlA);
...@@ -507,7 +508,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -507,7 +508,7 @@ Plugin *Plugin::load(char *type, char *name) {
return plugin; return plugin;
err2: err2:
#ifdef WIN32 #ifdef _WIN32
FreeLibrary(libA); FreeLibrary(libA);
#else #else
dlclose(dlA); dlclose(dlA);
...@@ -517,7 +518,7 @@ Plugin *Plugin::load(char *type, char *name) { ...@@ -517,7 +518,7 @@ Plugin *Plugin::load(char *type, char *name) {
return NULL; return NULL;
} }
#ifdef WIN32 #ifdef _WIN32
Plugin::Plugin(HMODULE libA) { Plugin::Plugin(HMODULE libA) {
lib = libA; lib = libA;
} }
...@@ -530,7 +531,7 @@ Plugin::Plugin(void *dlA) { ...@@ -530,7 +531,7 @@ Plugin::Plugin(void *dlA) {
Plugin::~Plugin() { Plugin::~Plugin() {
void (*xpdfFreePlugin)(void); void (*xpdfFreePlugin)(void);
#ifdef WIN32 #ifdef _WIN32
if ((xpdfFreePlugin = (void (*)(void)) if ((xpdfFreePlugin = (void (*)(void))
GetProcAddress(lib, "xpdfFreePlugin"))) { GetProcAddress(lib, "xpdfFreePlugin"))) {
(*xpdfFreePlugin)(); (*xpdfFreePlugin)();
...@@ -578,7 +579,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir) ...@@ -578,7 +579,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
} }
} }
#ifdef WIN32 #ifdef _WIN32
// baseDir will be set by a call to setBaseDir // baseDir will be set by a call to setBaseDir
baseDir = new GooString(); baseDir = new GooString();
#else #else
...@@ -608,7 +609,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir) ...@@ -608,7 +609,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
psOPI = gFalse; psOPI = gFalse;
psASCIIHex = gFalse; psASCIIHex = gFalse;
textEncoding = new GooString("UTF-8"); textEncoding = new GooString("UTF-8");
#if defined(WIN32) #if defined(_WIN32)
textEOL = eolDOS; textEOL = eolDOS;
#elif defined(MACOS) #elif defined(MACOS)
textEOL = eolMac; textEOL = eolMac;
...@@ -641,7 +642,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir) ...@@ -641,7 +642,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
unicodeMapCache = new UnicodeMapCache(); unicodeMapCache = new UnicodeMapCache();
cMapCache = new CMapCache(); cMapCache = new CMapCache();
#ifdef WIN32 #ifdef _WIN32
baseFontsInitialized = gFalse; baseFontsInitialized = gFalse;
winFontList = NULL; winFontList = NULL;
#endif #endif
...@@ -806,7 +807,7 @@ GlobalParams::~GlobalParams() { ...@@ -806,7 +807,7 @@ GlobalParams::~GlobalParams() {
deleteGooHash(unicodeMaps, GooString); deleteGooHash(unicodeMaps, GooString);
deleteGooList(toUnicodeDirs, GooString); deleteGooList(toUnicodeDirs, GooString);
deleteGooHash(displayFonts, DisplayFontParam); deleteGooHash(displayFonts, DisplayFontParam);
#ifdef WIN32 #ifdef _WIN32
delete winFontList; delete winFontList;
#endif #endif
deleteGooHash(psFonts, PSFontParam); deleteGooHash(psFonts, PSFontParam);
......
...@@ -61,7 +61,7 @@ struct XpdfSecurityHandler; ...@@ -61,7 +61,7 @@ struct XpdfSecurityHandler;
class GlobalParams; class GlobalParams;
class GfxFont; class GfxFont;
class Stream; class Stream;
#ifdef WIN32 #ifdef _WIN32
class WinFontList; class WinFontList;
#endif #endif
...@@ -305,7 +305,7 @@ private: ...@@ -305,7 +305,7 @@ private:
GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString] GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString]
GooHash *displayFonts; // display font info, indexed by font name GooHash *displayFonts; // display font info, indexed by font name
// [DisplayFontParam] // [DisplayFontParam]
#ifdef WIN32 #ifdef _WIN32
GBool baseFontsInitialized; GBool baseFontsInitialized;
WinFontList *winFontList; // system TrueType fonts WinFontList *winFontList; // system TrueType fonts
#endif #endif
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> // Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -476,7 +477,7 @@ LinkLaunch::LinkLaunch(Object *actionObj) { ...@@ -476,7 +477,7 @@ LinkLaunch::LinkLaunch(Object *actionObj) {
} }
} else { } else {
obj1.free(); obj1.free();
#ifdef WIN32 #ifdef _WIN32
if (actionObj->dictLookup("Win", &obj1)->isDict()) { if (actionObj->dictLookup("Win", &obj1)->isDict()) {
obj1.dictLookup("F", &obj2); obj1.dictLookup("F", &obj2);
if (getFileSpecNameForPlatform (&obj2, &obj3)) { if (getFileSpecNameForPlatform (&obj2, &obj3)) {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#ifdef WIN32 #ifdef _WIN32
# include <windows.h> # include <windows.h>
#endif #endif
#include "goo/gstrtod.h" #include "goo/gstrtod.h"
...@@ -115,7 +115,7 @@ PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword, ...@@ -115,7 +115,7 @@ PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
ok = setup(ownerPassword, userPassword); ok = setup(ownerPassword, userPassword);
} }
#ifdef WIN32 #ifdef _WIN32
PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
GooString *userPassword, void *guiDataA) { GooString *userPassword, void *guiDataA) {
OSVERSIONINFO version; OSVERSIONINFO version;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// Copyright (C) 2008 Pino Toscano <pino@kde.org> // Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca> // Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git // came with your tarball or type make ChangeLog if you are building from git
...@@ -63,7 +64,7 @@ public: ...@@ -63,7 +64,7 @@ public:
PDFDoc(GooString *fileNameA, GooString *ownerPassword = NULL, PDFDoc(GooString *fileNameA, GooString *ownerPassword = NULL,
GooString *userPassword = NULL, void *guiDataA = NULL); GooString *userPassword = NULL, void *guiDataA = NULL);
#ifdef WIN32 #ifdef _WIN32
PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword = NULL, PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword = NULL,
GooString *userPassword = NULL, void *guiDataA = NULL); GooString *userPassword = NULL, void *guiDataA = NULL);
#endif #endif
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com> // Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009 William Bader <williambader@hotmail.com> // Copyright (C) 2009 William Bader <williambader@hotmail.com>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// //
// To see a description of the changes please see the Changelog file that // To see a description of the changes please see the Changelog file that