[poppler] goo/gfile.cc goo/gfile.h poppler/GlobalParams.h

Albert Astals Cid aacid at kemper.freedesktop.org
Thu May 10 14:04:56 PDT 2012


 goo/gfile.cc           |   82 -------------------------------------------------
 goo/gfile.h            |    4 --
 poppler/GlobalParams.h |    2 -
 3 files changed, 1 insertion(+), 87 deletions(-)

New commits:
commit 22264cb230fc5902aea14ab43fa013a8ebdbf812
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu May 10 23:04:33 2012 +0200

    Make it compile
    
    Sorry :-/

diff --git a/goo/gfile.cc b/goo/gfile.cc
index 47d792b..604c0fa 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 be4be7a..705b3ef 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 a9637ce..bc11684 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 at kde.org>
+// Copyright (C) 2005, 2007-2010, 2012 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2005 Jonathan Blandford <jrb at redhat.com>
 // Copyright (C) 2006 Takashi Iwai <tiwai at suse.de>
 // Copyright (C) 2006 Kristian Høgsberg <krh at redhat.com>


More information about the poppler mailing list