[poppler] Branch 'poppler-0.6' - 2 commits - glib/test-poppler-glib.cc poppler/GlobalParams.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Nov 1 13:53:07 PDT 2007


 glib/test-poppler-glib.cc |    4 ++--
 poppler/GlobalParams.cc   |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 8f78e56ed6c997d02a90df119c90f08dded21ba0
Author: Jonathan Kew <jonathan_kew at sil.org>
Date:   Thu Nov 1 21:50:49 2007 +0100

    Do not try to parse directories when processing nameToUnicode dir. Fixes ugly warnings on mingw32

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index de7c0cc..8e89afc 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -654,9 +654,11 @@ void GlobalParams::scanEncodingDirs() {
   GDir *dir;
   GDirEntry *entry;
 
-  dir = new GDir(POPPLER_DATADIR "/nameToUnicode", gFalse);
+  dir = new GDir(POPPLER_DATADIR "/nameToUnicode", gTrue);
   while (entry = dir->getNextEntry(), entry != NULL) {
-    parseNameToUnicode(entry->getFullPath());
+    if (!entry->isDir()) {
+      parseNameToUnicode(entry->getFullPath());
+    }
     delete entry;
   }
   delete dir;
commit a343cf1d27dfa88a136b1efc3ea03a53d7c86db2
Author: Albert Astals Cid <tsdgeos at bluebox.localdomain>
Date:   Thu Nov 1 21:49:46 2007 +0100

    Add some castings to make it compile

diff --git a/glib/test-poppler-glib.cc b/glib/test-poppler-glib.cc
index 87d5234..96dc147 100644
--- a/glib/test-poppler-glib.cc
+++ b/glib/test-poppler-glib.cc
@@ -413,7 +413,7 @@ int main (int argc, char *argv[])
   printf ("\tFound text \"Bitwise\" at positions:\n");
   for (l = list; l != NULL; l = l->next)
     {
-      PopplerRectangle *rect = l->data;
+      PopplerRectangle *rect = (PopplerRectangle *)l->data;
 
       printf ("  (%f,%f)-(%f,%f)\n", rect->x1, rect->y1, rect->x2, rect->y2);
     }
@@ -484,7 +484,7 @@ int main (int argc, char *argv[])
 	  char *filename, *strdate;
 
 	  filename = g_strdup_printf ("/tmp/attach%d", i);
-	  attachment = l->data;
+	  attachment = (PopplerAttachment *)l->data;
 	  g_print ("\tname: %s\n", attachment->name);
 	  g_print ("\tdescription: %s\n", attachment->description);
 	  g_print ("\tsize: %d\n", attachment->size);


More information about the poppler mailing list