summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-05-10 23:04:33 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-05-10 23:04:33 +0200
commit22264cb230fc5902aea14ab43fa013a8ebdbf812 (patch)
tree2b4200e8149a1dd131cc19d59501b926f0f59f5d
parent44bf99a7b8683a077f2a5db50541099c109aa069 (diff)
Make it compile
Sorry :-/
-rw-r--r--goo/gfile.cc82
-rw-r--r--goo/gfile.h4
-rw-r--r--poppler/GlobalParams.h2
3 files changed, 1 insertions, 87 deletions
diff --git a/goo/gfile.cc b/goo/gfile.cc
index 47d792b9..604c0fae 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -317,88 +317,6 @@ GBool isAbsolutePath(char *path) {
#endif
}
-GooString *makePathAbsolute(GooString *path) {
-#ifdef VMS
- //---------- VMS ----------
- char buf[PATH_MAX+1];
-
- if (!isAbsolutePath(path->getCString())) {
- if (getcwd(buf, sizeof(buf))) {
- path->insert(0, buf);
- }
- }
- return path;
-
-#elif defined(_WIN32)
- //---------- Win32 ----------
- char buf[MAX_PATH];
- char *fp;
-
- buf[0] = '\0';
- if (!GetFullPathName(path->getCString(), MAX_PATH, buf, &fp)) {
- path->clear();
- return path;
- }
- path->clear();
- path->append(buf);
- return path;
-
-#elif defined(ACORN)
- //---------- RISCOS ----------
- path->insert(0, '@');
- return path;
-
-#elif defined(MACOS)
- //---------- MacOS ----------
- path->del(0, 1);
- return path;
-
-#else
- //---------- Unix and OS/2+EMX ----------
- struct passwd *pw;
- char buf[PATH_MAX+1];
- GooString *s;
- char *p1, *p2;
- int n;
-
- if (path->getChar(0) == '~') {
- if (path->getChar(1) == '/' ||
-#ifdef __EMX__
- path->getChar(1) == '\\' ||
-#endif
- path->getLength() == 1) {
- path->del(0, 1);
- s = getHomeDir();
- path->insert(0, s);
- delete s;
- } else {
- p1 = path->getCString() + 1;
-#ifdef __EMX__
- for (p2 = p1; *p2 && *p2 != '/' && *p2 != '\\'; ++p2) ;
-#else
- for (p2 = p1; *p2 && *p2 != '/'; ++p2) ;
-#endif
- if ((n = p2 - p1) > PATH_MAX)
- n = PATH_MAX;
- strncpy(buf, p1, n);
- buf[n] = '\0';
- if ((pw = getpwnam(buf))) {
- path->del(0, p2 - p1 + 1);
- path->insert(0, pw->pw_dir);
- }
- }
- } else if (!isAbsolutePath(path->getCString())) {
- if (getcwd(buf, sizeof(buf))) {
-#ifndef __EMX__
- path->insert(0, '/');
-#endif
- path->insert(0, buf);
- }
- }
- return path;
-#endif
-}
-
time_t getModTime(char *fileName) {
#ifdef _WIN32
//~ should implement this, but it's (currently) only used in xpdf
diff --git a/goo/gfile.h b/goo/gfile.h
index be4be7ac..705b3ef3 100644
--- a/goo/gfile.h
+++ b/goo/gfile.h
@@ -85,10 +85,6 @@ extern GooString *grabPath(char *fileName);
// Is this an absolute path or file name?
extern GBool isAbsolutePath(char *path);
-// Make this path absolute by prepending current directory (if path is
-// relative) or prepending user's directory (if path starts with '~').
-extern GooString *makePathAbsolute(GooString *path);
-
// Get the modification time for <fileName>. Returns 0 if there is an
// error.
extern time_t getModTime(char *fileName);
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index a9637ce9..bc11684f 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005, 2007-2010, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>