[poppler] Branch 'refs/remotes/origin/master' - 59 commits - ChangeLog configure.ac .cvsignore fofi/.cvsignore fofi/FoFiType1C.cc fofi/.gitignore .gitignore glib/.cvsignore glib/demo glib/.gitignore glib/poppler-action.cc glib/poppler-document.cc glib/poppler-form-field.cc glib/poppler-page.cc glib/poppler-page.h glib/reference glib/test-poppler-glib.c goo/.cvsignore goo/.gitignore goo/GooTimer.cc goo/GooTimer.h m4/qt.m4 Makefile.am makefile.vc msvc/config.h msvc/poppler poppler/ABWOutputDev.cc poppler/Annot.cc poppler/ArthurOutputDev.cc poppler/CairoFontEngine.cc poppler/CairoOutputDev.cc poppler/CairoOutputDev.h poppler/Catalog.cc poppler/CharCodeToUnicode.cc poppler/.cvsignore poppler/Error.cc poppler/Form.cc poppler/Gfx.cc poppler/GfxFont.cc poppler/GfxState.cc poppler/.gitignore poppler/GlobalParams.cc poppler/JBIG2Stream.cc poppler/Page.cc poppler/PageLabelInfo.cc poppler/SplashOutputDev.cc poppler/TextOutputDev.cc qt4/.cvsignore qt4/.gitignore qt4/src qt4/tests qt/.cvsignore qt/.gitignore qt/poppler-document.cc qt/poppler-page.cc qt/poppler-private.h README.windows splash/.cvsignore splash/.gitignore splash/Splash.cc splash/SplashFTFontEngine.cc test/.cvsignore test/.gitignore test/Makefile.am test/perf-test.cc test/perf-test-preview-dummy.cc test/perf-test-preview-win.cc utils/.cvsignore utils/.gitignore utils/HtmlOutputDev.cc utils/pdftoppm.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Tue Oct 16 06:24:49 PDT 2007


 .cvsignore                      |   25 
 .gitignore                      |   26 
 ChangeLog                       | 4586 ----------------------------------------
 Makefile.am                     |    5 
 README.windows                  |   63 
 configure.ac                    |    4 
 fofi/.cvsignore                 |    8 
 fofi/.gitignore                 |    8 
 fofi/FoFiType1C.cc              |   30 
 glib/.cvsignore                 |   11 
 glib/.gitignore                 |   11 
 glib/demo/Makefile.am           |    2 
 glib/demo/forms.c               |  489 ++++
 glib/demo/forms.h               |   31 
 glib/demo/main.c                |    8 
 glib/demo/utils.c               |    1 
 glib/poppler-action.cc          |    1 
 glib/poppler-document.cc        |    9 
 glib/poppler-form-field.cc      |    2 
 glib/poppler-page.cc            |  138 -
 glib/poppler-page.h             |   10 
 glib/reference/.cvsignore       |   18 
 glib/reference/.gitignore       |   18 
 glib/test-poppler-glib.c        |    2 
 goo/.cvsignore                  |    8 
 goo/.gitignore                  |    8 
 goo/GooTimer.cc                 |   69 
 goo/GooTimer.h                  |   30 
 m4/qt.m4                        |    2 
 makefile.vc                     |  150 +
 msvc/config.h                   |   62 
 msvc/poppler/poppler-config.h   |  143 +
 poppler/.cvsignore              |   10 
 poppler/.gitignore              |   10 
 poppler/ABWOutputDev.cc         |   10 
 poppler/Annot.cc                |    5 
 poppler/ArthurOutputDev.cc      |   16 
 poppler/CairoFontEngine.cc      |    6 
 poppler/CairoOutputDev.cc       |   33 
 poppler/CairoOutputDev.h        |    2 
 poppler/Catalog.cc              |    4 
 poppler/CharCodeToUnicode.cc    |    2 
 poppler/Error.cc                |   12 
 poppler/Form.cc                 |   14 
 poppler/Gfx.cc                  |   13 
 poppler/GfxFont.cc              |   25 
 poppler/GfxState.cc             |   11 
 poppler/GlobalParams.cc         |   40 
 poppler/JBIG2Stream.cc          |   16 
 poppler/Page.cc                 |    2 
 poppler/PageLabelInfo.cc        |    2 
 poppler/SplashOutputDev.cc      |    9 
 poppler/TextOutputDev.cc        |    3 
 qt/.cvsignore                   |    7 
 qt/.gitignore                   |    7 
 qt/poppler-document.cc          |    9 
 qt/poppler-page.cc              |    3 
 qt/poppler-private.h            |    8 
 qt4/.cvsignore                  |    3 
 qt4/.gitignore                  |    3 
 qt4/src/.cvsignore              |    8 
 qt4/src/.gitignore              |    8 
 qt4/src/poppler-annotation.cc   |   16 
 qt4/src/poppler-document.cc     |   14 
 qt4/src/poppler-embeddedfile.cc |    1 
 qt4/src/poppler-form.cc         |   15 
 qt4/src/poppler-private.h       |   27 
 qt4/tests/.cvsignore            |   20 
 qt4/tests/.gitignore            |   20 
 splash/.cvsignore               |    8 
 splash/.gitignore               |    8 
 splash/Splash.cc                |    5 
 splash/SplashFTFontEngine.cc    |    2 
 test/.cvsignore                 |   11 
 test/.gitignore                 |   11 
 test/Makefile.am                |   16 
 test/perf-test-preview-dummy.cc |   22 
 test/perf-test-preview-win.cc   |  272 ++
 test/perf-test.cc               | 1275 +++++++++++
 utils/.cvsignore                |   12 
 utils/.gitignore                |   12 
 utils/HtmlOutputDev.cc          |   33 
 utils/pdftoppm.cc               |    2 
 83 files changed, 3061 insertions(+), 5020 deletions(-)

New commits:
commit 03e1da99f7393fb1103643311b0b5af7b875e09c
Author: Jeff Muizelaar <jeff at infidigm.net>
Date:   Sat Oct 13 19:38:15 2007 -0400

    Add an implementation of CairoOutputDev::startPage()
    
    The implementation initializes fill_pattern and stroke_pattern
    to black matching SplashOutputDev. This fixes #12504.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index d2a57b6..2d4f663 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -128,6 +128,15 @@ void CairoOutputDev::startDoc(XRef *xrefA) {
   fontEngine = new CairoFontEngine(ft_lib);
 }
 
+void CairoOutputDev::startPage(int pageNum, GfxState *state) {
+  /* set up some per page defaults */
+  cairo_pattern_destroy(fill_pattern);
+  fill_pattern = cairo_pattern_create_rgb(0., 0., 0.);
+
+  cairo_pattern_destroy(stroke_pattern);
+  stroke_pattern = cairo_pattern_create_rgb(0., 0., 0.);
+}
+
 void CairoOutputDev::drawLink(Link *link, Catalog *catalog) {
 }
 
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 07fe186..8cfe32e 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -82,7 +82,7 @@ public:
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state) { }
+  virtual void startPage(int pageNum, GfxState *state);
 
   // End a page.
   virtual void endPage() { }
commit 825c942d46e0c3e254028441015c5dd8440cc734
Author: Albert Astals Cid <tsdgeos at bluebox.localdomain>
Date:   Fri Oct 12 13:47:09 2007 +0200

    Copy the embeddef file description string correctly

diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index be31bd4..2e12aed 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -383,8 +383,7 @@ EmbFile *Catalog::embeddedFile(int i)
     Object obj, obj2;
     obj = embeddedFileNameTree.getValue(i);
     GooString *fileName = new GooString();
-    char *descString = embeddedFileNameTree.getName(i)->getCString();
-    GooString *desc = new GooString(descString);
+    GooString *desc = new GooString(embeddedFileNameTree.getName(i));
     GooString *createDate = new GooString();
     GooString *modDate = new GooString();
     GooString *checksum = new GooString();
commit 5e60da78695eff44cc10dbce46ef170727f682b1
Author: Albert Astals Cid <tsdgeos at bluebox.localdomain>
Date:   Fri Oct 12 13:46:52 2007 +0200

    Correctly delete the embedded file stream

diff --git a/qt4/src/poppler-embeddedfile.cc b/qt4/src/poppler-embeddedfile.cc
index 5b63d31..5d60dd1 100644
--- a/qt4/src/poppler-embeddedfile.cc
+++ b/qt4/src/poppler-embeddedfile.cc
@@ -56,6 +56,7 @@ EmbeddedFile::EmbeddedFile(EmbFile *embfile)
 
 EmbeddedFile::~EmbeddedFile()
 {
+	m_embeddedFile->m_streamObject.free();
 	delete m_embeddedFile;
 }
 
diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
index 43a67c8..8ab8b59 100644
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@ -134,8 +134,8 @@ namespace Poppler {
 	
 	~DocumentData()
 	{
-		delete doc;
 		qDeleteAll(m_embeddedFiles);
+		delete doc;
 		delete m_outputDev;
 		delete m_fontInfoScanner;
 		
commit 1627fbbde8be01af3bdd2583f3439897a37d5215
Author: Jeff Muizelaar <jeff at infidigm.net>
Date:   Sat Oct 6 23:27:40 2007 -0400

    Use maskWidth and maskHeight for reading from the mask image in CairoOutputDev::drawMaskedImage()
    
    Previously, drawMaskedImage() was incorrectly using the image width and height which is
    wrong when width != maskWidth or heigh != maskHeight. Fixes #12668.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index a51b6b6..d2a57b6 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1046,10 +1046,10 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
   
   invert_bit = maskInvert ? 1 : 0;
 
-  for (y = 0; y < height; y++) {
+  for (y = 0; y < maskHeight; y++) {
     pix = maskImgStr->getLine();
     maskDest = maskBuffer + y * row_stride;
-    for (x = 0; x < width; x++) {
+    for (x = 0; x < maskWidth; x++) {
       if (pix[x] ^ invert_bit)
 	*maskDest++ = 0;
       else
commit 3156d560c5eaf6970da422d0b09fd2e95bfe6d1d
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Oct 5 11:34:01 2007 +0200

    Fix a crash when Form Fields array contains references
    to non existent objects. Fixes bug #11865

diff --git a/poppler/Form.cc b/poppler/Form.cc
index ffa51b9..022bdb1 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -1082,9 +1082,18 @@ Form::Form(XRef *xrefA, Object* acroForm)
       array->getNF(i, &oref);
       if (!oref.isRef()) {
         error(-1, "Direct object in rootFields");
+	obj1.free();
+	oref.free();
         continue;
       }
 
+      if (!obj1.isDict()) {
+        error(-1, "Reference in Fields array to an invalid or non existant object");
+	obj1.free();
+	oref.free();
+	continue;
+      }
+
       if (numFields >= size) {
         size += 16;
         rootFields = (FormField**)greallocn(rootFields,size,sizeof(FormField*));
commit f0b5e6286e94c6153c8247b5fae63a18622c48d3
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Thu Oct 4 15:22:01 2007 +0200

    Do not return unknown field type for signature form fields

diff --git a/glib/poppler-form-field.cc b/glib/poppler-form-field.cc
index 989fa4d..d02212e 100644
--- a/glib/poppler-form-field.cc
+++ b/glib/poppler-form-field.cc
@@ -96,6 +96,8 @@ poppler_form_field_get_field_type (PopplerFormField *field)
       return POPPLER_FORM_FIELD_TEXT;
     case formChoice:
       return POPPLER_FORM_FIELD_CHOICE;
+    case formSignature:
+      return POPPLER_FORM_FIELD_SIGNATURE;
     default:
       g_warning ("Unsupported Form Field Type");
   }
commit 498fd7fb99b01a879d07e2ad12c0b9462a8fc438
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Thu Oct 4 12:36:39 2007 +0200

    Add poppler_page_render_for_printing() and poppler_page_render_to_pixbuf_for_printing()
    
    We were unconditionally passing printing=gFalse to displaySlice. With these new
    functions we can render to a pixbuf or cairo surface passing printing=gTrue to
    displaySlice.

diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index 973794c..3671001 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -408,16 +408,10 @@ poppler_page_copy_to_pixbuf(PopplerPage *page,
 
 #if defined (HAVE_CAIRO)
 
-/**
- * poppler_page_render:
- * @page: the page to render from
- * @cairo: cairo context to render to
- *
- * Render the page to the given cairo context.
- **/
-void
-poppler_page_render (PopplerPage *page,
-		     cairo_t *cairo)
+static void
+_poppler_page_render (PopplerPage *page,
+		      cairo_t *cairo,
+		      GBool printing)
 {
   CairoOutputDev *output_dev;
 
@@ -434,14 +428,75 @@ poppler_page_render (PopplerPage *page,
 			   gTrue, /* Crop */
 			   -1, -1,
 			   -1, -1,
-			   gFalse, /* printing */
+			   printing,
 			   page->document->doc->getCatalog ());
 
-  output_dev->setCairo (NULL);
+  output_dev->setCairo (NULL);	
+}
+
+/**
+ * poppler_page_render:
+ * @page: the page to render from
+ * @cairo: cairo context to render to
+ *
+ * Render the page to the given cairo context. This function
+ * is for rendering a page that will be displayed. If you want
+ * to render a page that will be printed use
+ * poppler_page_render_for_printing() instead
+ **/
+void
+poppler_page_render (PopplerPage *page,
+		     cairo_t *cairo)
+{
+  g_return_if_fail (POPPLER_IS_PAGE (page));
+
+  _poppler_page_render (page, cairo, gFalse);
+}
+
+/**
+ * poppler_page_render_for_printing:
+ * @page: the page to render from
+ * @cairo: cairo context to render to
+ *
+ * Render the page to the given cairo context for printing.
+ **/
+void
+poppler_page_render_for_printing (PopplerPage *page,
+				  cairo_t *cairo)
+{
+  g_return_if_fail (POPPLER_IS_PAGE (page));
+  
+  _poppler_page_render (page, cairo, gTrue);	
 }
 
 #endif
 
+static void
+_poppler_page_render_to_pixbuf (PopplerPage *page,
+				int src_x, int src_y,
+				int src_width, int src_height,
+				double scale,
+				int rotation,
+				GBool printing,
+				GdkPixbuf *pixbuf)
+{
+  OutputDevData data;
+  
+  poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data);
+
+  page->page->displaySlice(page->document->output_dev,
+			   72.0 * scale, 72.0 * scale,
+			   rotation,
+			   gFalse, /* useMediaBox */
+			   gTrue, /* Crop */
+			   src_x, src_y,
+			   src_width, src_height,
+			   printing,
+			   page->document->doc->getCatalog ());
+  
+  poppler_page_copy_to_pixbuf (page, pixbuf, &data);
+}
+
 /**
  * poppler_page_render_to_pixbuf:
  * @page: the page to render from
@@ -456,6 +511,9 @@ poppler_page_render (PopplerPage *page,
  * First scale the document to match the specified pixels per point,
  * then render the rectangle given by the upper left corner at
  * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be displayed.
+ * If you want to render a page that will be printed use
+ * poppler_page_render_to_pixbuf_for_printing() instead
  **/
 void
 poppler_page_render_to_pixbuf (PopplerPage *page,
@@ -465,25 +523,50 @@ poppler_page_render_to_pixbuf (PopplerPage *page,
 			       int rotation,
 			       GdkPixbuf *pixbuf)
 {
-  OutputDevData data;
-
   g_return_if_fail (POPPLER_IS_PAGE (page));
   g_return_if_fail (scale > 0.0);
   g_return_if_fail (pixbuf != NULL);
 
-  poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data);
+  _poppler_page_render_to_pixbuf (page, src_x, src_y,
+				  src_width, src_height,
+				  scale, rotation,
+				  gFalse,
+				  pixbuf);
+}
 
-  page->page->displaySlice(page->document->output_dev,
-			   72.0 * scale, 72.0 * scale,
-			   rotation,
-			   gFalse, /* useMediaBox */
-			   gTrue, /* Crop */
-			   src_x, src_y,
-			   src_width, src_height,
-			   gFalse, /* printing */
-			   page->document->doc->getCatalog ());
-  
-  poppler_page_copy_to_pixbuf (page, pixbuf, &data);
+/**
+ * poppler_page_render_to_pixbuf_for_printing:
+ * @page: the page to render from
+ * @src_x: x coordinate of upper left corner  
+ * @src_y: y coordinate of upper left corner  
+ * @src_width: width of rectangle to render  
+ * @src_height: height of rectangle to render
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render into
+ *
+ * First scale the document to match the specified pixels per point,
+ * then render the rectangle given by the upper left corner at
+ * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be printed.
+ **/
+void
+poppler_page_render_to_pixbuf_for_printing (PopplerPage *page,
+					    int src_x, int src_y,
+					    int src_width, int src_height,
+					    double scale,
+					    int rotation,
+					    GdkPixbuf *pixbuf)
+{
+  g_return_if_fail (POPPLER_IS_PAGE (page));
+  g_return_if_fail (scale > 0.0);
+  g_return_if_fail (pixbuf != NULL);
+
+  _poppler_page_render_to_pixbuf (page, src_x, src_y,
+				  src_width, src_height,
+				  scale, rotation,
+				  gTrue,
+				  pixbuf);
 }
 
 static TextOutputDev *
diff --git a/glib/poppler-page.h b/glib/poppler-page.h
index 40a6433..7c175d9 100644
--- a/glib/poppler-page.h
+++ b/glib/poppler-page.h
@@ -47,10 +47,20 @@ void                   poppler_page_render_to_pixbuf     (PopplerPage        *pa
 							  double              scale,
 							  int                 rotation,
 							  GdkPixbuf          *pixbuf);
+void          poppler_page_render_to_pixbuf_for_printing (PopplerPage        *page,
+							  int                 src_x,
+							  int                 src_y,
+							  int                 src_width,
+							  int                 src_height,
+							  double              scale,
+							  int                 rotation,
+							  GdkPixbuf          *pixbuf);
 
 #ifdef POPPLER_HAS_CAIRO
 void                   poppler_page_render               (PopplerPage        *page,
 							  cairo_t            *cairo);
+void                   poppler_page_render_for_printing  (PopplerPage        *page,
+							  cairo_t            *cairo);
 #endif	
 
 void                   poppler_page_get_size             (PopplerPage        *page,
commit 56af69787c78c2edbb69266e86a5a5b639ca6d3e
Author: Jeff Muizelaar <jeff at infidigm.net>
Date:   Wed Oct 3 23:02:25 2007 -0400

    Error out if we can't find a .cidToUnicode for a known character collection
    
    This situation was caused by the fixes for bug #11413. I'm not sure
    it's the best thing to do, but it seems better.

diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index f890fd7..63ac1c0 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -1221,6 +1221,25 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA,
 
       // look for a user-supplied .cidToUnicode file
       if (!(ctu = globalParams->getCIDToUnicode(collection))) {
+	// I'm not completely sure that this is the best thing to do
+	// but it seems to produce better results when the .cidToUnicode
+	// files from the poppler-data package are missing. At least
+	// we know that assuming the Identity mapping is definitely wrong.
+	//   -- jrmuizel
+	static const char * knownCollections [] = {
+	  "Adobe-CNS1",
+	  "Adobe-GB1",
+	  "Adobe-Japan1",
+	  "Adobe-Japan2",
+	  "Adobe-Korea1",
+	};
+	for (size_t i = 0; i < sizeof(knownCollections)/sizeof(knownCollections[0]); i++) {
+	  if (collection->cmp(knownCollections[i])) {
+	    error(-1, "Missing language pack for '%s' mapping", collection->getCString());
+	    delete collection;
+	    goto err2;
+	  }
+	}
 	error(-1, "Unknown character collection '%s'",
 	      collection->getCString());
 	// fall-through, assuming the Identity mapping -- this appears
commit 3d0df46908379bce1d196b9dc41153b1adb5f725
Author: Michael Wolf <maw at ximian.com>
Date:   Wed Oct 3 19:43:55 2007 +0200

    Fix compile warning

diff --git a/glib/test-poppler-glib.c b/glib/test-poppler-glib.c
index 50e3ed2..007353c 100644
--- a/glib/test-poppler-glib.c
+++ b/glib/test-poppler-glib.c
@@ -232,6 +232,8 @@ form_field_button_print (PopplerFormField *field)
       case POPPLER_FORM_BUTTON_RADIO:
         button_type_str = "Radio Button";
 	break;
+      default:
+        g_assert_not_reached ();
     }
   
   printf ("\t\tType:\t\tButton\n");
commit aba29e12528025c2cc71bf46e02e76ac4db2b193
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Sep 28 21:01:50 2007 +0200

    Add forms demo to glib poppler demo

diff --git a/glib/demo/Makefile.am b/glib/demo/Makefile.am
index d07b1c6..54de50b 100644
--- a/glib/demo/Makefile.am
+++ b/glib/demo/Makefile.am
@@ -10,6 +10,8 @@ poppler_glib_demo_SOURCES = 			\
 	main.c					\
 	fonts.h					\
 	fonts.c					\
+	forms.h					\
+	forms.c					\
 	info.h					\
 	info.c					\
 	links.h					\
diff --git a/glib/demo/forms.c b/glib/demo/forms.c
new file mode 100644
index 0000000..f442ef7
--- /dev/null
+++ b/glib/demo/forms.c
@@ -0,0 +1,489 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos  <carlosgc at gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "forms.h"
+#include "utils.h"
+
+enum {
+	FORMS_FIELD_TYPE_COLUMN,
+	FORMS_ID_COLUMN,
+	FORMS_READ_ONLY_COLUMN,
+	FORMS_X1_COLUMN,
+	FORMS_Y1_COLUMN,
+	FORMS_X2_COLUMN,
+	FORMS_Y2_COLUMN,
+	FORMS_FIELD_COLUMN,
+	N_COLUMNS
+};
+
+typedef struct {
+	PopplerDocument *doc;
+
+	GtkListStore    *model;
+	GtkWidget       *field_view;
+	GtkWidget       *timer_label;
+
+	gint             page;
+} PgdFormsDemo;
+
+static void
+pgd_forms_free (PgdFormsDemo *demo)
+{
+	if (!demo)
+		return;
+
+	if (demo->doc) {
+		g_object_unref (demo->doc);
+		demo->doc = NULL;
+	}
+
+	if (demo->model) {
+		g_object_unref (demo->model);
+		demo->model = NULL;
+	}
+
+	g_free (demo);
+}
+
+static GtkWidget *
+pgd_form_field_view_new (void)
+{
+	GtkWidget  *frame, *label;
+
+	frame = gtk_frame_new (NULL);
+	gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+	label = gtk_label_new (NULL);
+	gtk_label_set_markup (GTK_LABEL (label), "<b>Form Field Properties</b>");
+	gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+	gtk_widget_show (label);
+
+	return frame;
+}
+
+static void
+pgd_form_field_view_add_choice_items (GtkTable         *table,
+				      PopplerFormField *field,
+				      gint             *selected,
+				      gint             *row)
+{
+	GtkWidget     *label;
+	GtkWidget     *textview, *swindow;
+	GtkTextBuffer *buffer;
+	gint           i;
+
+	label = gtk_label_new (NULL);
+	g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
+	gtk_label_set_markup (GTK_LABEL (label), "<b>Items:</b>");
+	gtk_table_attach (GTK_TABLE (table), label, 0, 1, *row, *row + 1,
+			  GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_show (label);
+
+	swindow = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+					GTK_POLICY_AUTOMATIC,
+					GTK_POLICY_AUTOMATIC);
+
+	textview = gtk_text_view_new ();
+	gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
+	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+	
+	for (i = 0; i < poppler_form_field_choice_get_n_items (field); i++) {
+		gchar *item;
+
+		item = poppler_form_field_choice_get_item (field, i);
+		gtk_text_buffer_insert_at_cursor (buffer, item, strlen (item));
+		gtk_text_buffer_insert_at_cursor (buffer, "\n", strlen ("\n"));
+		g_free (item);
+		
+		if (poppler_form_field_choice_is_item_selected (field, i))
+			*selected = i;
+	}
+
+	gtk_container_add (GTK_CONTAINER (swindow), textview);
+	gtk_widget_show (textview);
+	
+	gtk_table_attach (GTK_TABLE (table), swindow, 1, 2, *row, *row + 1,
+			  GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_show (swindow); 
+	
+	*row += 1;
+}
+
+static void
+pgd_form_field_view_set_field (GtkWidget        *field_view,
+			       PopplerFormField *field)
+{
+	GtkWidget  *alignment;
+	GtkWidget  *table;
+	GEnumValue *enum_value;
+	gint        row = 0;
+
+	alignment = gtk_bin_get_child (GTK_BIN (field_view));
+	if (alignment) {
+		gtk_container_remove (GTK_CONTAINER (field_view), alignment);
+	}
+	
+	alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+	gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+	gtk_container_add (GTK_CONTAINER (field_view), alignment);
+	gtk_widget_show (alignment);
+
+	if (!field)
+		return;
+
+	table = gtk_table_new (10, 2, FALSE);
+	gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+	gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+	switch (poppler_form_field_get_field_type (field)) {
+	case POPPLER_FORM_FIELD_BUTTON:
+		enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_BUTTON_TYPE),
+					       poppler_form_field_button_get_button_type (field));
+		pgd_table_add_property (GTK_TABLE (table), "<b>Button Type:</b>", enum_value->value_name, &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Button State:</b>",
+					poppler_form_field_button_get_state (field) ? "Active" : "Inactive", &row);
+		break;
+	case POPPLER_FORM_FIELD_TEXT: {
+		gchar *text;
+		
+		enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_TEXT_TYPE),
+					       poppler_form_field_text_get_text_type (field));
+		pgd_table_add_property (GTK_TABLE (table), "<b>Text Type:</b>", enum_value->value_name, &row);
+
+		text = poppler_form_field_text_get_text (field);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Contents:</b>", text, &row);
+		g_free (text);
+
+		text = g_strdup_printf ("%d", poppler_form_field_text_get_max_len (field));
+		pgd_table_add_property (GTK_TABLE (table), "<b>Max Length:</b>", text, &row);
+		g_free (text);
+
+		pgd_table_add_property (GTK_TABLE (table), "<b>Do spellcheck:</b>",
+					poppler_form_field_text_do_spell_check (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Do scroll:</b>",
+					poppler_form_field_text_do_scroll (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Rich Text:</b>",
+					poppler_form_field_text_is_rich_text (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Pasword type:</b>",
+					poppler_form_field_text_is_password (field) ? "Yes" : "No", &row);
+	}
+		break;
+	case POPPLER_FORM_FIELD_CHOICE: {
+		gchar *text, *item;
+		gint   selected;
+		
+		enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_CHOICE_TYPE),
+					       poppler_form_field_choice_get_choice_type (field));
+		pgd_table_add_property (GTK_TABLE (table), "<b>Choice Type:</b>", enum_value->value_name, &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Editable:</b>",
+					poppler_form_field_choice_is_editable (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Multiple Selection:</b>",
+					poppler_form_field_choice_can_select_multiple (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Do spellcheck:</b>",
+					poppler_form_field_choice_do_spell_check (field) ? "Yes" : "No", &row);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Commit on Change:</b>",
+					poppler_form_field_choice_commit_on_change (field) ? "Yes" : "No", &row);
+
+		text = g_strdup_printf ("%d", poppler_form_field_choice_get_n_items (field));
+		pgd_table_add_property (GTK_TABLE (table), "<b>Number of items:</b>", text, &row);
+		g_free (text);
+
+		pgd_form_field_view_add_choice_items (GTK_TABLE (table), field, &selected, &row);
+
+		item = poppler_form_field_choice_get_item (field, selected);
+		text = g_strdup_printf ("%d (%s)", selected, item);
+		g_free (item);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Selected item:</b>", text, &row);
+		g_free (text);
+
+		text = poppler_form_field_choice_get_text (field);
+		pgd_table_add_property (GTK_TABLE (table), "<b>Contents:</b>", text, &row);
+		g_free (text);
+	}
+		break;
+	case POPPLER_FORM_FIELD_SIGNATURE:
+	case POPPLER_FORM_FIELD_UNKNOWN:
+		break;
+	default:
+		g_assert_not_reached ();
+	}
+
+	gtk_container_add (GTK_CONTAINER (alignment), table);
+	gtk_widget_show (table);
+}
+
+const gchar *
+get_form_field_type (PopplerFormField *field)
+{
+	switch (poppler_form_field_get_field_type (field)) {
+	case POPPLER_FORM_FIELD_TEXT:
+		return "Text";
+	case POPPLER_FORM_FIELD_BUTTON:
+		return "Button";
+	case POPPLER_FORM_FIELD_CHOICE:
+		return "Choice";
+	case POPPLER_FORM_FIELD_SIGNATURE:
+		return "Signature";
+	case POPPLER_FORM_FIELD_UNKNOWN:
+	default:
+		break;
+	}
+
+	return "Unknown";
+}
+
+static void
+pgd_forms_get_form_fields (GtkWidget    *button,
+			   PgdFormsDemo *demo)
+{
+	PopplerPage *page;
+	GList       *mapping, *l;
+	gint         n_fields;
+	GTimer      *timer;
+	
+	gtk_list_store_clear (demo->model);
+	pgd_form_field_view_set_field (demo->field_view, NULL);
+
+	page = poppler_document_get_page (demo->doc, demo->page);
+	if (!page)
+		return;
+
+	timer = g_timer_new ();
+	mapping = poppler_page_get_form_field_mapping (page);
+	g_timer_stop (timer);
+
+	n_fields = g_list_length (mapping);
+	if (n_fields > 0) {
+		gchar *str;
+		
+		str = g_strdup_printf ("<i>%d form fields found in %.4f seconds</i>",
+				       n_fields, g_timer_elapsed (timer, NULL));
+		gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+		g_free (str);
+	} else {
+		gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No form fields found</i>");
+	}
+
+	g_timer_destroy (timer);
+
+	for (l = mapping; l; l = g_list_next (l)) {
+		PopplerFormFieldMapping *fmapping;
+		GtkTreeIter              iter;
+		gchar                   *x1, *y1, *x2, *y2;
+
+		fmapping = (PopplerFormFieldMapping *)l->data;
+
+		x1 = g_strdup_printf ("%.2f", fmapping->area.x1);
+		y1 = g_strdup_printf ("%.2f", fmapping->area.y1);
+		x2 = g_strdup_printf ("%.2f", fmapping->area.x2);
+		y2 = g_strdup_printf ("%.2f", fmapping->area.y2);
+
+		gtk_list_store_append (demo->model, &iter);
+		gtk_list_store_set (demo->model, &iter,
+				    FORMS_FIELD_TYPE_COLUMN, get_form_field_type (fmapping->field),
+				    FORMS_ID_COLUMN, poppler_form_field_get_id (fmapping->field),
+				    FORMS_READ_ONLY_COLUMN, poppler_form_field_is_read_only (fmapping->field),
+				    FORMS_X1_COLUMN, x1, 
+				    FORMS_Y1_COLUMN, y1,
+				    FORMS_X2_COLUMN, x2,
+				    FORMS_Y2_COLUMN, y2,
+				    FORMS_FIELD_COLUMN, fmapping->field,
+				    -1);
+		g_free (x1);
+		g_free (y1);
+		g_free (x2);
+		g_free (y2);
+	}
+
+	poppler_page_free_form_field_mapping (mapping);
+	g_object_unref (page);
+}
+
+static void
+pgd_forms_page_selector_value_changed (GtkSpinButton *spinbutton,
+				       PgdFormsDemo  *demo)
+{
+	demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+static void
+pgd_forms_selection_changed (GtkTreeSelection *treeselection,
+			     PgdFormsDemo     *demo)
+{
+	GtkTreeModel *model;
+	GtkTreeIter   iter;
+
+	if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+		PopplerFormField *field;
+
+		gtk_tree_model_get (model, &iter,
+				    FORMS_FIELD_COLUMN, &field,
+				    -1);
+		pgd_form_field_view_set_field (demo->field_view, field);
+		g_object_unref (field);
+	}
+}
+
+GtkWidget *
+pgd_forms_create_widget (PopplerDocument *document)
+{
+	PgdFormsDemo     *demo;
+	GtkWidget        *label;
+	GtkWidget        *vbox;
+	GtkWidget        *hbox, *page_selector;
+	GtkWidget        *button;
+	GtkWidget        *hpaned;
+	GtkWidget        *swindow, *treeview;
+	GtkTreeSelection *selection;
+	GtkCellRenderer  *renderer;
+	gchar            *str;
+	gint              n_pages;
+
+	demo = g_new0 (PgdFormsDemo, 1);
+	
+	demo->doc = g_object_ref (document);
+	
+	n_pages = poppler_document_get_n_pages (document);
+
+	vbox = gtk_vbox_new (FALSE, 12);
+
+	hbox = gtk_hbox_new (FALSE, 6);
+
+	label = gtk_label_new ("Page:");
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+	gtk_widget_show (label);
+
+	page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+	g_signal_connect (G_OBJECT (page_selector), "value-changed",
+			  G_CALLBACK (pgd_forms_page_selector_value_changed),
+			  (gpointer)demo);
+	gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+	gtk_widget_show (page_selector);
+
+	str = g_strdup_printf ("of %d", n_pages);
+	label = gtk_label_new (str);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+	gtk_widget_show (label);
+	g_free (str);
+
+	button = gtk_button_new_with_label ("Get Forms Fields");
+	g_signal_connect (G_OBJECT (button), "clicked",
+			  G_CALLBACK (pgd_forms_get_form_fields),
+			  (gpointer)demo);
+	gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+	gtk_widget_show (button);
+
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+	gtk_widget_show (hbox);
+
+	demo->timer_label = gtk_label_new (NULL);
+	gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No form fields found</i>");
+	g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+	gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+	gtk_widget_show (demo->timer_label);
+
+	hpaned = gtk_hpaned_new ();
+
+	demo->field_view = pgd_form_field_view_new ();
+
+	swindow = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+					GTK_POLICY_AUTOMATIC,
+					GTK_POLICY_AUTOMATIC);
+	
+	demo->model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING,
+					  G_TYPE_INT, G_TYPE_BOOLEAN,
+					  G_TYPE_STRING,
+					  G_TYPE_STRING, G_TYPE_STRING,
+					  G_TYPE_STRING, G_TYPE_OBJECT);
+	treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     0, "Form Field Type",
+						     renderer,
+						     "text", FORMS_FIELD_TYPE_COLUMN,
+						     NULL);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     1, "Form Field Id",
+						     renderer,
+						     "text", FORMS_ID_COLUMN,
+						     NULL);
+	
+	renderer = gtk_cell_renderer_toggle_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     2, "Read Only",
+						     renderer,
+						     "active", FORMS_READ_ONLY_COLUMN,
+						     NULL);
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     3, "X1",
+						     renderer,
+						     "text", FORMS_X1_COLUMN,
+						     NULL);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     4, "Y1",
+						     renderer,
+						     "text", FORMS_Y1_COLUMN,
+						     NULL);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     5, "X2",
+						     renderer,
+						     "text", FORMS_X2_COLUMN,
+						     NULL);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+						     6, "Y2",
+						     renderer,
+						     "text", FORMS_Y2_COLUMN,
+						     NULL);
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+	g_signal_connect (G_OBJECT (selection), "changed",
+			  G_CALLBACK (pgd_forms_selection_changed),
+			  (gpointer)demo);
+
+	gtk_container_add (GTK_CONTAINER (swindow), treeview);
+	gtk_widget_show (treeview);
+
+	gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+	gtk_widget_show (swindow);
+
+	gtk_paned_add2 (GTK_PANED (hpaned), demo->field_view);
+	gtk_widget_show (demo->field_view);
+
+	gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+	gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+	gtk_widget_show (hpaned);
+
+	g_object_weak_ref (G_OBJECT (vbox),
+			   (GWeakNotify)pgd_forms_free,
+			   demo);
+	
+	return vbox;
+}
diff --git a/glib/demo/forms.h b/glib/demo/forms.h
new file mode 100644
index 0000000..12d0ed0
--- /dev/null
+++ b/glib/demo/forms.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos  <carlosgc at gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <gtk/gtkwidget.h>
+#include <poppler.h>
+
+#ifndef _FORMS_H_
+#define _FORMS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_forms_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _FORMS_H_ */
diff --git a/glib/demo/main.c b/glib/demo/main.c
index d5e35a3..cb8f34b 100644
--- a/glib/demo/main.c
+++ b/glib/demo/main.c
@@ -26,6 +26,7 @@
 #include "page.h"
 #include "outline.h"
 #include "links.h"
+#include "forms.h"
 
 enum {
 	PGD_TITLE_COLUMN,
@@ -45,7 +46,8 @@ static const PopplerGlibDemo demo_list[] = {
 	{ "Render",    pgd_render_create_widget },
 	{ "Page Info", pgd_page_create_widget },
 	{ "Outline",   pgd_outline_create_widget },
-	{ "Links",     pgd_links_create_widget }
+	{ "Links",     pgd_links_create_widget },
+	{ "Forms",     pgd_forms_create_widget }
 };
 
 static void
@@ -65,7 +67,7 @@ pgd_demo_changed (GtkTreeSelection *selection,
 	}
 }
 
-GtkWidget *
+static GtkWidget *
 pgd_demo_list_create (void)
 {
 	GtkWidget       *treeview;
@@ -101,7 +103,7 @@ pgd_demo_list_create (void)
 	return treeview;
 }
 
-GtkWidget *
+static GtkWidget *
 pdg_demo_notebook_create (PopplerDocument *document)
 {
 	GtkWidget *notebook;
diff --git a/glib/demo/utils.c b/glib/demo/utils.c
index cae5837..be0e319 100644
--- a/glib/demo/utils.c
+++ b/glib/demo/utils.c
@@ -175,7 +175,6 @@ pgd_action_view_set_action (GtkWidget     *action_view,
 {
 	GtkWidget  *alignment;
 	GtkWidget  *table;
-	GEnumValue *enum_value;
 	gint        row = 0;
 
 	alignment = gtk_bin_get_child (GTK_BIN (action_view));
commit d0c0f26d2c95232c216e3daa15e98a3aff14ac27
Merge: 59d55f7... 38d5bb1...
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Tue Sep 25 03:33:52 2007 -0700

    Merge branch 'master' of ssh://kjk@git.freedesktop.org/git/poppler/poppler

commit 38d5bb150a5fe883da1d4256463d1f796d201283
Author: Krzysztof Kowalczyk <kkowalczyk at kjkubu.(none)>
Date:   Tue Sep 25 16:13:51 2007 -0700

    Silence deprecation warnings - annoying with msvc 2005.

diff --git a/makefile.vc b/makefile.vc
index 25d42de..1cacd2f 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -40,7 +40,7 @@ CFLAGS = $(CFLAGS) /nologo /c
 CFLAGS = $(CFLAGS) /D "WIN32" /D "WINDOWS" /D "_WIN32_WINNT=0x0500"
 #CFLAGS = $(CFLAGS) /D "WIN32_LEAN_AND_MEAN"
 #CFLAGS = $(CFLAGS) /D "UNICODE" /D "_UNICODE"
-#CFLAGS = $(CFLAGS) /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE"
+CFLAGS = $(CFLAGS) /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE"
 CFLAGS = $(CFLAGS) /D "_CRT_SECURE_NO_WARNINGS"
 #CFLAGS = $(CFLAGS) /D "_DLL"
 
commit 59d55f7371bee81c9392fa2d4174ceffaacde471
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Tue Sep 25 01:21:19 2007 -0700

    Fix misleading comment.

diff --git a/goo/GooTimer.h b/goo/GooTimer.h
old mode 100644
new mode 100755
index d5847cb..f454e2a
--- a/goo/GooTimer.h
+++ b/goo/GooTimer.h
@@ -23,7 +23,7 @@
 #endif
 
 //------------------------------------------------------------------------
-// GooList
+// GooTimer
 //------------------------------------------------------------------------
 
 class GooTimer {
commit c36d8afc984795aca0a12a94ec7668092067db82
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Tue Sep 25 00:32:29 2007 -0700

    Revert "replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) != a' which, due to type promotions, if a is int, is equivalent to a < 0; fix problems revealed by the change"
    
    This reverts commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec.

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 14b3ad5..b84e198 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -12,7 +12,6 @@
 #pragma implementation
 #endif
 
-#include <assert.h>
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
@@ -111,6 +110,11 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
     goto err1;
   }
 
+  if (nObjects*(int)sizeof(int)/sizeof(int) != nObjects) {
+    error(-1, "Invalid 'nObjects'");
+    goto err1;
+  }
+ 
   objs = new Object[nObjects];
   objNums = (int *)gmallocn(nObjects, sizeof(int));
   offsets = (int *)gmallocn(nObjects, sizeof(int));
@@ -396,9 +400,12 @@ GBool XRef::readXRefTable(Parser *parser, Guint *pos) {
 	   first + n > newSize && newSize > 0;
 	   newSize <<= 1) ;
       if (newSize < 0) {
-        error(-1, "Invalid 'obj' parameters'");
 	goto err1;
       }
+      if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
+        error(-1, "Invalid 'obj' parameters'");
+        goto err1;
+      }
  
       entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
       for (i = size; i < newSize; ++i) {
@@ -508,7 +515,10 @@ GBool XRef::readXRefStream(Stream *xrefStr, Guint *pos) {
     goto err1;
   }
   if (newSize > size) {
-    assert(newSize >= 0);
+    if (newSize * (int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
+      error(-1, "Invalid 'size' parameter.");
+      return gFalse;
+    }
     entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
     for (i = size; i < newSize; ++i) {
       entries[i].offset = 0xffffffff;
@@ -598,6 +608,9 @@ GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) {
 	 first + n > newSize && newSize > 0;
 	 newSize <<= 1) ;
     if (newSize < 0) {
+      return gFalse;
+    }
+    if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
       error(-1, "Invalid 'size' inside xref table.");
       return gFalse;
     }
@@ -741,6 +754,10 @@ GBool XRef::constructXRef() {
 		    error(-1, "Bad object number");
 		    return gFalse;
 		  }
+                  if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
+                    error(-1, "Invalid 'obj' parameters.");
+                    return gFalse;
+                  }
 		  entries = (XRefEntry *)
 		      greallocn(entries, newSize, sizeof(XRefEntry));
 		  for (i = size; i < newSize; ++i) {
@@ -765,7 +782,7 @@ GBool XRef::constructXRef() {
     } else if (!strncmp(p, "endstream", 9)) {
       if (streamEndsLen == streamEndsSize) {
 	streamEndsSize += 64;
-        if (streamEndsSize < 0) {
+        if (streamEndsSize*(int)sizeof(int)/sizeof(int) != streamEndsSize) {
           error(-1, "Invalid 'endstream' parameter.");
           return gFalse;
         }
commit ff25e83abae1ca17e2e7dd6f20946026fca69fff
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 23:57:25 2007 -0700

    Make perf-test compile on unix as well.

diff --git a/test/Makefile.am b/test/Makefile.am
index 614fe38..df1809a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -26,6 +26,12 @@ endif
 
 endif
 
+if BUILD_SPLASH_OUTPUT
+
+perf_test =				\
+	perf-test
+
+endif
 
 INCLUDES =					\
 	-I$(top_srcdir)				\
@@ -36,7 +42,7 @@ INCLUDES =					\
 	$(GTK_TEST_CFLAGS)			\
 	$(FONTCONFIG_CFLAGS)
 
-noinst_PROGRAMS = $(gtk_splash_test) $(gtk_cairo_test) $(pdf_inspector)
+noinst_PROGRAMS = $(gtk_splash_test) $(gtk_cairo_test) $(pdf_inspector) $(perf_test)
 
 gtk_splash_test_SOURCES =			\
        gtk-splash-test.cc
@@ -65,5 +71,13 @@ pdf_inspector_LDADD =					\
 	$(FREETYPE_LIBS)				\
 	$(GTK_TEST_LIBS)
 
+perf_test_SOURCES =			\
+       perf-test.cc                     \
+       perf-test-preview-dummy.cc
+
+perf_test_LDADD =				\
+	$(top_builddir)/poppler/libpoppler.la	\
+	$(FREETYPE_LIBS)
+
 EXTRA_DIST =					\
 	pdf-operators.c
diff --git a/test/perf-test-preview-dummy.cc b/test/perf-test-preview-dummy.cc
index 10c5518..09f7d0f 100644
--- a/test/perf-test-preview-dummy.cc
+++ b/test/perf-test-preview-dummy.cc
@@ -6,6 +6,7 @@ Using this perf-test still works for performance testing, you just don't
 get any visual feedback during testing.
 */
 
+#include "splash/SplashBitmap.h"
 
 void PreviewBitmapSplash(SplashBitmap *bmpSplash)
 {
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 1f88a2f..a9fa50b 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -5,6 +5,7 @@
   very simplistic performance measuring.
 
   TODO:
+   * make it work with cairo output as well
    * print more info about document like e.g. enumarate images,
      streams, compression, encryption, password-protection. Each should have
      a command-line arguments to turn it on/off
@@ -44,20 +45,20 @@
 
 #include "Error.h"
 #include "ErrorCodes.h"
-#include "GooString.h"
-#include "GooList.h"
-#include "GooTimer.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "goo/GooTimer.h"
 #include "GlobalParams.h"
-#include "SplashBitmap.h"
+#include "splash/SplashBitmap.h"
 #include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
 #include "SplashOutputDev.h"
 #include "TextOutputDev.h"
 #include "PDFDoc.h"
-#include "SecurityHandler.h"
 #include "Link.h"
 
 #ifdef _MSC_VER
 #define strdup _strdup
+#define strcasecmp _stricmp
 #endif
 
 #define dimof(X)    (sizeof(X)/sizeof((X)[0]))
@@ -269,7 +270,7 @@ bool str_ieq(const char *str1, const char *str2)
         return true;
     if (!str1 || !str2)
         return false;
-    if (0 == _stricmp(str1, str2))
+    if (0 == strcasecmp(str1, str2))
         return true;
     return false;
 }
@@ -321,6 +322,32 @@ void sleep_milliseconds(int milliseconds)
 #endif
 }
 
+#ifndef _MSC_VER
+void strcpy_s(char* dst, size_t dst_size, const char* src)
+{
+    size_t src_size = strlen(src) + 1;
+    if (src_size <= dst_size)
+        memcpy(dst, src, src_size);
+    else {
+        if (dst_size > 0) {
+            memcpy(dst, src, dst_size);
+            dst[dst_size-1] = 0;
+        }
+    }
+}
+
+void strcat_s(char *dst, size_t dst_size, const char* src)
+{
+    size_t dst_len = strlen(dst);
+    if (dst_len >= dst_size) {
+        if (dst_size > 0)
+            dst[dst_size-1] = 0;
+        return;
+    }
+    strcpy_s(dst+dst_len, dst_size - dst_len, src);
+}
+#endif
+
 static SplashColorMode gSplashColorMode = splashModeBGR8;
 
 static SplashColor splashColRed;
@@ -801,6 +828,8 @@ static void RenderPdfAsText(const char *fileName)
     GooString *         fileNameStr = NULL;
     PDFDoc *            pdfDoc = NULL;
     GooString *         txt = NULL;
+    int                 pageCount;
+    double              timeInMs;
 
     assert(fileName);
     if (!fileName)
@@ -827,10 +856,10 @@ static void RenderPdfAsText(const char *fileName)
     }
 
     msTimer.stop();
-    double timeInMs = msTimer.getElapsed();
+    timeInMs = msTimer.getElapsed();
     LogInfo("load: %.2f ms\n", timeInMs);
 
-    int pageCount = pdfDoc->getNumPages();
+    pageCount = pdfDoc->getNumPages();
     LogInfo("page count: %d\n", pageCount);
 
     for (int curPage = 1; curPage <= pageCount; curPage++) {
@@ -867,8 +896,10 @@ Exit:
 
 static void RenderPdf(const char *fileName)
 {
-    const char *fileNameSplash = NULL;
-    PdfEnginePoppler * engineSplash = NULL;
+    const char *        fileNameSplash = NULL;
+    PdfEnginePoppler *  engineSplash = NULL;
+    int                 pageCount;
+    double              timeInMs;
 
 #ifdef COPY_FILE
     // TODO: fails if file already exists and has read-only attribute
@@ -887,9 +918,9 @@ static void RenderPdf(const char *fileName)
         goto Error;
     }
     msTimer.stop();
-    double timeInMs = msTimer.getElapsed();
+    timeInMs = msTimer.getElapsed();
     LogInfo("load splash: %.2f ms\n", timeInMs);
-    int pageCount = engineSplash->pageCount();
+    pageCount = engineSplash->pageCount();
 
     LogInfo("page count: %d\n", pageCount);
     if (gfLoadOnly)
@@ -992,53 +1023,6 @@ static bool ParseResolutionString(const char *resolutionString, int *resolutionX
     return true;
 }
 
-#ifdef DEBUG
-static void u_ParseResolutionString(void)
-{
-    int i;
-    int result, resX, resY;
-    const char *str;
-    struct TestData {
-        const char *    str;
-        int             result;
-        int             resX;
-        int             resY;
-    } testData[] = {
-        { "", false, 0, 0 },
-        { "abc", false, 0, 0},
-        { "34", false, 0, 0},
-        { "0x0", true, 0, 0},
-        { "0x1", true, 0, 1},
-        { "0xab", false, 0, 0},
-        { "1x0", true, 1, 0},
-        { "100x200", true, 100, 200},
-        { "58x58", true, 58, 58},
-        { "  58x58", true, 58, 58},
-        { "58x  58", true, 58, 58},
-        { "58x58  ", true, 58, 58},
-        { "     58  x  58  ", true, 58, 58},
-        { "34x1234a", false, 0, 0},
-        { NULL, false, 0, 0}
-    };
-    for (i=0; NULL != testData[i].str; i++) {
-        str = testData[i].str;
-        result = ParseResolutionString(str, &resX, &resY);
-        assert(result == testData[i].result);
-        if (result) {
-            assert(resX == testData[i].resX);
-            assert(resY == testData[i].resY);
-        }
-    }
-}
-#endif
-
-static void runAllUnitTests(void)
-{
-#ifdef DEBUG
-    u_ParseResolutionString();
-#endif
-}
-
 static void ParseCommandLine(int argc, char **argv)
 {
     char *      arg;
@@ -1243,8 +1227,6 @@ static void RenderCmdLineArg(char *cmdLineArg)
 
 int main(int argc, char **argv)
 {
-    //runAllUnitTests();
-
     setErrorFunction(my_error);
     ParseCommandLine(argc, argv);
     if (0 == StrList_Len(&gArgsListRoot))
commit 70f3bf42b3028d9a2e4aefdc2e1a458b3c77b0e7
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 21:26:54 2007 -0700

    Let perf-test.cc manage lifetime of rendered bitmap.

diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc
index 173a7a5..2d53335 100644
--- a/test/perf-test-preview-win.cc
+++ b/test/perf-test-preview-win.cc
@@ -239,16 +239,10 @@ void PreviewBitmapInit(void)
     /* no need to do anything */
 }
 
-static void deleteRenderedBitmaps()
-{
-    delete gBmpSplash;
-}
-
 void PreviewBitmapDestroy(void)
 {
     PostQuitMessage(0);
     pumpMessages();
-    deleteRenderedBitmaps();
     DeleteObject(gBrushBg);
 }
 
@@ -271,7 +265,6 @@ void PreviewBitmapSplash(SplashBitmap *bmpSplash)
     if (!initWinIfNecessary())
         return;
 
-    deleteRenderedBitmaps();
     gBmpSplash = bmpSplash;
     UpdateWindows();
 }
commit b622b252cba068a15eae77df5deb261dd98affaf
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 21:20:12 2007 -0700

    Disable my_error for now - seems to corrupt memory.

diff --git a/test/perf-test.cc b/test/perf-test.cc
index fe02a74..1f88a2f 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -713,6 +713,7 @@ void OutputDebugString(const char *txt)
 #endif
 
 void my_error(int pos, char *msg, va_list args) {
+#if 0
     char        buf[4096], *p = buf;
 
     // NB: this can be called before the globalParams object is created
@@ -748,6 +749,7 @@ void my_error(int pos, char *msg, va_list args) {
         if (gErrFile)
             fprintf(gErrFile, "Error: ");
     }
+#endif
 #if 0
     p = buf;
     va_start(args, msg);
commit bde8c9669ca6b43cb6a664bd14df164a718041ea
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 21:08:58 2007 -0700

    Con't copy the file unless COPY_FILE is defined.

diff --git a/test/perf-test.cc b/test/perf-test.cc
index 068d2a0..fe02a74 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -22,6 +22,12 @@
 #include <windows.h>
 #endif
 
+// Define COPY_FILE if you want the file to be copied to a local disk first
+// before it's tested. This is desired if a file is on a slow drive.
+// Currently copying only works on Windows.
+// Not enabled by default.
+//#define COPY_FILE 1
+
 #include <assert.h>
 #include <config.h>
 #include <stdio.h>
@@ -862,10 +868,13 @@ static void RenderPdf(const char *fileName)
     const char *fileNameSplash = NULL;
     PdfEnginePoppler * engineSplash = NULL;
 
+#ifdef COPY_FILE
     // TODO: fails if file already exists and has read-only attribute
     CopyFile(fileName, POPPLER_TMP_NAME, false);
     fileNameSplash = POPPLER_TMP_NAME;
-
+#else
+    fileNameSplash = fileName;
+#endif
     LogInfo("started: %s\n", fileName);
 
     engineSplash = new PdfEnginePoppler();
commit bf9b46b012c64624818a2110af7c4b7e3b419728
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 20:13:54 2007 -0700

    Respect -loadonly cmd-line arg.

diff --git a/test/perf-test.cc b/test/perf-test.cc
index b9b5e11..068d2a0 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -881,6 +881,8 @@ static void RenderPdf(const char *fileName)
     int pageCount = engineSplash->pageCount();
 
     LogInfo("page count: %d\n", pageCount);
+    if (gfLoadOnly)
+        goto Error;
 
     for (int curPage = 1; curPage <= pageCount; curPage++) {
         if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
commit 2f664b654ca19135f0f8a0fe89872b9e0d526fa2
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 19:41:45 2007 -0700

    Fix msvc debug build. Fix bitmap leak in perf-test.

diff --git a/makefile.vc b/makefile.vc
index feb613b..25d42de 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -60,7 +60,7 @@ CFLAGS = $(CFLAGS) /I$(ZLIB_DIR) /I$(JPEG_DIR) /I$(FREETYPE_DIR)\include
 
 LIBS = $(LIBS) kernel32.lib advapi32.lib user32.lib gdi32.lib
 
-LDFLAGS = $(LDFLAGS) /nologo /DEBUG /NODEFAULTLIB:libcmt
+LDFLAGS = $(LDFLAGS) /nologo /DEBUG
 
 #CFLAGS = $(CFLAGS) /D "USE_FIXEDPOINT"
 
@@ -70,8 +70,10 @@ LDFLAGS = $(LDFLAGS) /nologo /DEBUG /NODEFAULTLIB:libcmt
 # /ltcg - link-time code generation. Generates smaller and faster code. Requires /GL when compiling.
 LDFLAGS = $(LDFLAGS) /opt:ref /opt:icf /opt:nowin98 /ltcg
 LIBS = $(LIBS) $(ZLIB_DIR)\zlib_s.lib $(JPEG_DIR)\jpeg_s.lib $(FREETYPE_DIR)\freetype231mt.lib
+LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:libcmt
 !else
-LIBS = $(LIBS) $(ZLIB_DIR)\zlib_sd.lib $(JPEG_DIR)\jpeg_sd.lib $(FREETYPE_DIR)\freetype231mt_d.lib
+LIBS = $(LIBS) $(ZLIB_DIR)\zlib_ds.lib $(JPEG_DIR)\jpeg_ds.lib $(FREETYPE_DIR)\freetype231mt_d.lib
+LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:libcmtd
 !endif
 
 FOFI_OBJS=$(O)\FoFiBase.obj $(O)\FoFiEncodings.obj $(O)\FoFiTrueType.obj \
diff --git a/test/perf-test.cc b/test/perf-test.cc
index d903048..b9b5e11 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -903,6 +903,7 @@ static void RenderPdf(const char *fileName)
             if (gfSlowPreview)
                 sleep_milliseconds(SLOW_PREVIEW_TIME);
         }
+        delete bmpSplash;
     }
 Error:
     delete engineSplash;
commit 05d41cd5aec39b4e3c8949445a9986e5ca8b50dd
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 08:10:37 2007 -0700

    Use GooTimer instead of my own timer.

diff --git a/test/perf-test.cc b/test/perf-test.cc
index 7697a74..d903048 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -40,6 +40,7 @@
 #include "ErrorCodes.h"
 #include "GooString.h"
 #include "GooList.h"
+#include "GooTimer.h"
 #include "GlobalParams.h"
 #include "SplashBitmap.h"
 #include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
@@ -314,89 +315,6 @@ void sleep_milliseconds(int milliseconds)
 #endif
 }
 
-/* milli-second timer */
-typedef struct ms_timer {
-#ifdef _WIN32
-    LARGE_INTEGER   start;
-    LARGE_INTEGER   end;
-#else
-    struct timeval  start;
-    struct timeval  end;
-#endif
-} ms_timer;
-
-#ifdef _WIN32
-void ms_timer_start(ms_timer *timer)
-{
-    assert(timer);
-    if (!timer)
-        return;
-    QueryPerformanceCounter(&timer->start);
-}
-void ms_timer_stop(ms_timer *timer)
-{
-    assert(timer);
-    if (!timer)
-        return;
-    QueryPerformanceCounter(&timer->end);
-}
-
-double ms_timer_time_in_ms(ms_timer *timer)
-{
-    LARGE_INTEGER   freq;
-    double          time_in_secs;
-    QueryPerformanceFrequency(&freq);
-    time_in_secs = (double)(timer->end.QuadPart-timer->start.QuadPart)/(double)freq.QuadPart;
-    return time_in_secs * 1000.0;
-}
-#else
-void ms_timer_start(ms_timer *timer)
-{
-    assert(timer);
-    if (!timer)
-        return;
-    gettimeofday(&timer->start, NULL);
-}
-
-void ms_timer_stop(ms_timer *timer)
-{
-    assert(timer);
-    if (!timer)
-        return;
-    gettimeofday(&timer->end, NULL);
-}
-
-double ms_timer_time_in_ms(ms_timer *timer)
-{
-    double timeInMs;
-    time_t seconds;
-    int    usecs;
-
-    assert(timer);
-    if (!timer)
-        return 0.0;
-    /* TODO: this logic needs to be verified */
-    seconds = timer->end.tv_sec - timer->start.tv_sec;
-    usecs = timer->end.tv_usec - timer->start.tv_usec;
-    if (usecs < 0) {
-        --seconds;
-        usecs += 1000000;
-    }
-    timeInMs = (double)seconds*(double)1000.0 + (double)usecs/(double)1000.0;
-    return timeInMs;
-}
-#endif
-
-class MsTimer {
-public:
-    MsTimer() { ms_timer_start(&timer); }
-    void start(void) { ms_timer_start(&timer); }
-    void stop(void) { ms_timer_stop(&timer); }
-    double timeInMs(void) { return ms_timer_time_in_ms(&timer); }
-private:
-    ms_timer timer;
-};
-
 static SplashColorMode gSplashColorMode = splashModeBGR8;
 
 static SplashColor splashColRed;
@@ -888,7 +806,7 @@ static void RenderPdfAsText(const char *fileName)
         return;
     }
 
-    MsTimer msTimer;
+    GooTimer msTimer;
     /* note: don't delete fileNameStr since PDFDoc takes ownership and deletes them itself */
     fileNameStr = new GooString(fileName);
     if (!fileNameStr)
@@ -901,7 +819,7 @@ static void RenderPdfAsText(const char *fileName)
     }
 
     msTimer.stop();
-    double timeInMs = msTimer.timeInMs();
+    double timeInMs = msTimer.getElapsed();
     LogInfo("load: %.2f ms\n", timeInMs);
 
     int pageCount = pdfDoc->getNumPages();
@@ -919,7 +837,7 @@ static void RenderPdfAsText(const char *fileName)
         pdfDoc->displayPage(textOut, curPage, 72, 72, rotate, useMediaBox, crop, doLinks);
         txt = textOut->getText(0.0, 0.0, 10000.0, 10000.0);
         msTimer.stop();
-        timeInMs = msTimer.timeInMs();
+        timeInMs = msTimer.getElapsed();
         if (gfTimings)
             LogInfo("page %d: %.2f ms\n", curPage, timeInMs);
         printf("%s\n", txt->getCString());
@@ -952,13 +870,13 @@ static void RenderPdf(const char *fileName)
 
     engineSplash = new PdfEnginePoppler();
 
-    MsTimer msTimer;
+    GooTimer msTimer;
     if (!engineSplash->load(fileNameSplash)) {
         LogInfo("failed to load splash\n");
         goto Error;
     }
     msTimer.stop();
-    double timeInMs = msTimer.timeInMs();
+    double timeInMs = msTimer.getElapsed();
     LogInfo("load splash: %.2f ms\n", timeInMs);
     int pageCount = engineSplash->pageCount();
 
@@ -970,10 +888,10 @@ static void RenderPdf(const char *fileName)
 
         SplashBitmap *bmpSplash = NULL;
 
-        MsTimer msTimer;
+        GooTimer msTimer;
         bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0);
         msTimer.stop();
-        double timeInMs = msTimer.timeInMs();
+        double timeInMs = msTimer.getElapsed();
         if (gfTimings)
             if (!bmpSplash)
                 LogInfo("page splash %d: failed to render\n", curPage);
commit 05fbce5b6657e883ece9054c79576b25271a05a4
Author: Krzysztof Kowalczyk <kkowalczyk at gmail.com>
Date:   Mon Sep 24 08:01:11 2007 -0700

    Make GooTimer work for Windows/msvc build.

diff --git a/goo/GooTimer.cc b/goo/GooTimer.cc
index e9ae2e6..0f97480 100644
--- a/goo/GooTimer.cc
+++ b/goo/GooTimer.cc
@@ -9,58 +9,83 @@
 
 #include <config.h>
 
-#ifdef HAVE_GETTIMEOFDAY
-
 #ifdef USE_GCC_PRAGMAS
 #pragma implementation
 #endif
 
-#include <string.h>
 #include "GooTimer.h"
+#include <string.h>
+
+#define USEC_PER_SEC 1000000
 
 //------------------------------------------------------------------------
 // GooTimer
 //------------------------------------------------------------------------
 
-
 GooTimer::GooTimer() {
-  gettimeofday (&start, NULL);
-  active = true;
+  start();
 }
 
+void GooTimer::start() {
+#ifdef HAVE_GETTIMEOFDAY
+  gettimeofday(&start_time, NULL);
+#elif defined(_MSC_VER)
+  QueryPerformanceCounter(&start_time);
+#endif
+  active = true;
+}
 
-void
-GooTimer::stop() {
-  gettimeofday (&end, NULL);
+void GooTimer::stop() {
+#ifdef HAVE_GETTIMEOFDAY
+  gettimeofday(&end_time, NULL);
+#elif defined(_MSC_VER)
+  QueryPerformanceCounter(&end_time);
+#endif
   active = false;
 }
 
-#define USEC_PER_SEC 1000000
-double
-GooTimer::getElapsed ()
+#ifdef HAVE_GETTIMEOFDAY
+double GooTimer::getElapsed()
 {
   double total;
   struct timeval elapsed;
 
   if (active)
-    gettimeofday (&end, NULL);
+    gettimeofday(&end_time, NULL);
 
-  if (start.tv_usec > end.tv_usec)
-    {
-      end.tv_usec += USEC_PER_SEC;
-      end.tv_sec--;
-    }
+  if (start_time.tv_usec > end_time.tv_usec) {
+      end_time.tv_usec += USEC_PER_SEC;
+      end_time.tv_sec--;
+  }
 
-  elapsed.tv_usec = end.tv_usec - start.tv_usec;
-  elapsed.tv_sec = end.tv_sec - start.tv_sec;
+  elapsed.tv_usec = end_time.tv_usec - start_time.tv_usec;
+  elapsed.tv_sec = end_time.tv_sec - start_time.tv_sec;
 
   total = elapsed.tv_sec + ((double) elapsed.tv_usec / 1e6);
   if (total < 0)
-    {
       total = 0;
-    }
 
   return total;
 }
+#elif defined(_MSC_VER)
+double GooTimer::getElapsed()
+{
+  LARGE_INTEGER   freq;
+  double          time_in_secs;
+  QueryPerformanceFrequency(&freq);
+
+  if (active)
+    QueryPerformanceCounter(&end_time);
+
+  time_in_secs = (double)(end_time.QuadPart-start_time.QuadPart)/(double)freq.QuadPart;
+  return time_in_secs * 1000.0;
 
+}
+#else
+double GooTimer::getElapsed()
+{
+#warning "no support for GooTimer"
+  return 0;
+}
 #endif
+
diff --git a/goo/GooTimer.h b/goo/GooTimer.h
index 86bc42f..d5847cb 100644
--- a/goo/GooTimer.h
+++ b/goo/GooTimer.h
@@ -1,13 +1,11 @@
 //========================================================================
 //
-// GooList.h
+// GooTimer.h
 //
 // Copyright 2001-2003 Glyph & Cog, LLC
 //
 //========================================================================
 
-#ifdef HAVE_GETTIMEOFDAY
-
 #ifndef GOOTIMER_H
 #define GOOTIMER_H
 
@@ -16,7 +14,13 @@
 #endif
 
 #include "gtypes.h"
+#ifdef HAVE_GETTIMEOFDAY
 #include <sys/time.h>
+#endif
+
+#ifdef _MSC_VER
+#include <windows.h>
+#endif
 
 //------------------------------------------------------------------------
 // GooList
@@ -28,17 +32,19 @@ public:
   // Create a new timer.
   GooTimer();
 
-  void stop ();
+  void start();
+  void stop();
   double getElapsed();
 
-
 private:
-
-	struct timeval start;
-	struct timeval end;
-	GBool active;
-};
-
+#ifdef HAVE_GETTIMEOFDAY
+  struct timeval start_time;
+  struct timeval end_time;
+#elif defined(_MSC_VER)
+  LARGE_INTEGER start_time;
+  LARGE_INTEGER end_time;
 #endif
+  GBool active;
+};
 
 #endif
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 63b7732..b86ab10 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -582,16 +582,11 @@ void Gfx::go(GBool topLevel) {
 	printf("\n");
 	fflush(stdout);
       }
-#ifdef HAVE_GETTIMEOFDAY
-      GooTimer *timer = NULL;
-      if (profileCommands) 
-	timer = new GooTimer ();
-#endif
+      GooTimer timer;
 
       // Run the operation
       execOp(&obj, args, numArgs);
 
-#ifdef HAVE_GETTIMEOFDAY
       // Update the profile information
       if (profileCommands) {
 	GooHash *hash;
@@ -608,11 +603,9 @@ void Gfx::go(GBool topLevel) {
 	    hash->add (cmd_g, data_p);
 	  }
 	  
-	  data_p->addElement (timer->getElapsed ());
+	  data_p->addElement(timer.getElapsed ());
 	}
-        delete timer;
       }
-#endif
       obj.free();
       for (i = 0; i < numArgs; ++i)
 	args[i].free();
commit 6347915085a487da08d39a859f4261fa812dab09
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 24 01:08:17 2007 -0700

    Add Error.cc in msvc build and use setErrorFunction in perf-test.

diff --git a/makefile.vc b/makefile.vc
index 0b0f0ee..feb613b 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -82,7 +82,7 @@ GOO_OBJS=$(O)\FixedPoint.obj $(O)\GooHash.obj $(O)\GooList.obj $(O)\GooString.ob
 
 POPPLER_OBJS=$(O)\Annot.obj $(O)\Array.obj $(O)\BuiltinFont.obj $(O)\BuiltinFontTables.obj \
 	$(O)\CMap.obj $(O)\Catalog.obj $(O)\CharCodeToUnicode.obj $(O)\DCTStream.obj \
-	$(O)\Decrypt.obj $(O)\Dict.obj \
+	$(O)\Decrypt.obj $(O)\Dict.obj $(O)\Error.obj \
 	$(O)\FontEncodingTables.obj $(O)\FontInfo.obj $(O)\Form.obj $(O)\Function.obj \
 	$(O)\Gfx.obj $(O)\GfxFont.obj $(O)\GfxState.obj $(O)\GlobalParams.obj \
 	$(O)\GlobalParamsWin.obj \
@@ -95,7 +95,6 @@ POPPLER_OBJS=$(O)\Annot.obj $(O)\Array.obj $(O)\BuiltinFont.obj $(O)\BuiltinFont
 	$(O)\Stream.obj $(O)\TextOutputDev.obj $(O)\UnicodeMap.obj \
 	$(O)\UnicodeTypeTable.obj $(O)\XRef.obj
 
-#$(O)\Error.obj \
 # $(O)\FlateStream.obj 
 
 SPLASH_OBJS=$(O)\Splash.obj $(O)\SplashBitmap.obj $(O)\SplashClip.obj \
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 02dfd52..7697a74 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -36,6 +36,7 @@
 #include <dirent.h>
 #endif
 
+#include "Error.h"
 #include "ErrorCodes.h"
 #include "GooString.h"
 #include "GooList.h"
@@ -787,8 +788,7 @@ void OutputDebugString(const char *txt)
 #define _vsnprintf vsnprintf
 #endif
 
-void CDECL error(int pos, char *msg, ...) {
-    va_list args;
+void my_error(int pos, char *msg, va_list args) {
     char        buf[4096], *p = buf;
 
     // NB: this can be called before the globalParams object is created
@@ -805,7 +805,6 @@ void CDECL error(int pos, char *msg, ...) {
     }
 
     p = buf;
-    va_start(args, msg);
     p += _vsnprintf(p, sizeof(buf) - 1, msg, args);
     while ( p > buf  &&  isspace(p[-1]) )
             *--p = '\0';
@@ -813,7 +812,6 @@ void CDECL error(int pos, char *msg, ...) {
     *p++ = '\n';
     *p   = '\0';
     OutputDebugString(buf);
-    va_end(args);
 
     if (pos >= 0) {
         p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
@@ -826,7 +824,7 @@ void CDECL error(int pos, char *msg, ...) {
         if (gErrFile)
             fprintf(gErrFile, "Error: ");
     }
-
+#if 0
     p = buf;
     va_start(args, msg);
     p += _vsnprintf(p, sizeof(buf) - 3, msg, args);
@@ -839,6 +837,7 @@ void CDECL error(int pos, char *msg, ...) {
     if (gErrFile)
         fprintf(gErrFile, buf);
     va_end(args);
+#endif
 }
 
 void LogInfo(char *fmt, ...)
@@ -1314,6 +1313,7 @@ int main(int argc, char **argv)
 {
     //runAllUnitTests();
 
+    setErrorFunction(my_error);
     ParseCommandLine(argc, argv);
     if (0 == StrList_Len(&gArgsListRoot))
         PrintUsageAndExit(argc, argv);
commit ed01b3965c57ce2a4eabf9c46b5319ea627d3324
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 24 01:03:09 2007 -0700

    Match declaration of setErrorFunction with its definition.
    
    Also enable this code for Windows, since CDECL was what
    was throwing msvc off.

diff --git a/poppler/Error.cc b/poppler/Error.cc
index fe1413b..80e45aa 100644
--- a/poppler/Error.cc
+++ b/poppler/Error.cc
@@ -18,7 +18,7 @@
 #include "GlobalParams.h"
 #include "Error.h"
 
-static void CDECL defaultErrorFunction(int pos, char *msg, va_list args)
+static void defaultErrorFunction(int pos, char *msg, va_list args)
 {
   if (pos >= 0) {
     fprintf(stderr, "Error (%d): ", pos);
@@ -30,14 +30,12 @@ static void CDECL defaultErrorFunction(int pos, char *msg, va_list args)
   fflush(stderr);
 }
 
-#ifndef _MSC_VER
-static void CDECL (*errorFunction)(int , char *, va_list args) = defaultErrorFunction;
+static void (*errorFunction)(int, char *, va_list args) = defaultErrorFunction;
 
-void setErrorFunction(void CDECL (* f)(int , char *, va_list args))
+void setErrorFunction(void (* f)(int, char *, va_list args))
 {
     errorFunction = f;
 }
-#endif
 
 void CDECL error(int pos, char *msg, ...) {
   va_list args;
@@ -46,11 +44,7 @@ void CDECL error(int pos, char *msg, ...) {
     return;
   }
   va_start(args, msg);
-#ifdef _MSC_VER
-  defaultErrorFunction(pos, msg, args);
-#else
   (*errorFunction)(pos, msg, args);
-#endif
   va_end(args);
 }
 
commit 71fb15f8bd131a13d8cf0f394fe601cfbb6e1772
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 24 00:38:29 2007 -0700

    Even less compiler warnings.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 14db0d7..a51b6b6 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -592,7 +592,7 @@ static uint32_t luminocity(uint32_t x)
   int r = (x >> 16) & 0xff;
   int g = (x >>  8) & 0xff;
   int b = (x >>  0) & 0xff;
-  int y = 0.3 * r + 0.59 * g + 0.11 * b;
+  int y = (int) (0.3 * r + 0.59 * g + 0.11 * b);
   return y << 24;
 }
 
@@ -606,8 +606,8 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
 
     double x1, y1, x2, y2;
     cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
-    int width = ceil(x2) - floor(x1);
-    int height = ceil(y2) - floor(y1);
+    int width = (int)(ceil(x2) - floor(x1));
+    int height = (int)(ceil(y2) - floor(y1));
 
     cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
     cairo_t *maskCtx = cairo_create(source);
diff --git a/qt/poppler-page.cc b/qt/poppler-page.cc
index 4f630df..b59f699 100644
--- a/qt/poppler-page.cc
+++ b/qt/poppler-page.cc
@@ -339,6 +339,9 @@ QValueList<Link*> Page::links() const
           m_refGen = r->gen;
           copyString( m_uri, m->getTitle()->getCString() );
 */      break;
+        case actionSound:
+        /* TODO: write me */
+        break;
 
         case actionUnknown:
         break;
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 721e5c2..9a33050 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -59,6 +59,7 @@ static GooString* basename(GooString* str){
   return new GooString(str);
 }
 
+#if 0
 static GooString* Dirname(GooString* str){
   
   char *p=str->getCString();
@@ -68,6 +69,7 @@ static GooString* Dirname(GooString* str){
       return new GooString(p,i+1);
   return new GooString();
 } 
+#endif
 
 //------------------------------------------------------------------------
 // HtmlString
@@ -994,10 +996,9 @@ HtmlOutputDev::~HtmlOutputDev() {
       delete pages;
 }
 
-
-
 void HtmlOutputDev::startPage(int pageNum, GfxState *state) {
-  /*if (mode&&!xml){
+#if 0
+  if (mode&&!xml){
     if (write){
       write=gFalse;
       GooString* fname=Dirname(Docname);
@@ -1012,7 +1013,8 @@ void HtmlOutputDev::startPage(int pageNum, GfxState *state) {
     // else 
       fprintf(tin,"ROTATE=%d neg %d neg translate\n",state->getX1(),state->getY1());  
     }
-  }*/
+  }
+#endif
 
   this->pageNum = pageNum;
   GooString *str=basename(Docname);
commit 7ba3f198a0651d2a7c91b7d9e10a5173dc3de0a3
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 24 00:32:37 2007 -0700

    Even less compiler warnings.

diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
index bae8418..cd77151 100644
--- a/qt/poppler-document.cc
+++ b/qt/poppler-document.cc
@@ -30,6 +30,14 @@
 
 namespace Poppler {
 
+static GooString *QStringToGooString(const QString &s) {
+    int len = s.length();
+    char *cstring = (char *)gmallocn(s.length(), sizeof(char));
+    for (int i = 0; i < len; ++i)
+      cstring[i] = s.at(i).unicode();
+    return new GooString(cstring, len);
+}
+
 Document *Document::load(const QString &filePath)
 {
   if (!globalParams) {
diff --git a/qt/poppler-private.h b/qt/poppler-private.h
index 5a5a421..227547a 100644
--- a/qt/poppler-private.h
+++ b/qt/poppler-private.h
@@ -42,14 +42,6 @@ static QString unicodeToQString(Unicode* u, int len) {
     return ret;
 }
 
-static GooString *QStringToGooString(const QString &s) {
-    int len = s.length();
-    char *cstring = (char *)gmallocn(s.length(), sizeof(char));
-    for (int i = 0; i < len; ++i)
-      cstring[i] = s.at(i).unicode();
-    return new GooString(cstring, len);
-}
-
 static QString UnicodeParsedString(GooString *s1) {
     GBool isUnicode;
     int i;
diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index e34b1f2..5c21adf 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -36,6 +36,16 @@
 
 namespace Poppler {
 
+  static GooString *QStringToGooString(const QString &s) {
+      int len = s.length();
+      char *cstring = (char *)gmallocn(s.length(), sizeof(char));
+      for (int i = 0; i < len; ++i)
+        cstring[i] = s.at(i).unicode();
+      GooString *ret = new GooString(cstring, len);
+      gfree(cstring);
+      return ret;
+  }
+
   int DocumentData::count = 0;
 
   Document *Document::load(const QString &filePath, const QByteArray &ownerPassword,
diff --git a/qt4/src/poppler-form.cc b/qt4/src/poppler-form.cc
index c9f4239..51dc935 100644
--- a/qt4/src/poppler-form.cc
+++ b/qt4/src/poppler-form.cc
@@ -29,6 +29,21 @@
 
 namespace Poppler {
 
+static GooString *QStringToUnicodeGooString(const QString &s) {
+    int len = s.length() * 2 + 2;
+    char *cstring = (char *)gmallocn(len, sizeof(char));
+    cstring[0] = 0xfe;
+    cstring[1] = 0xff;
+    for (int i = 0; i < s.length(); ++i)
+    {
+      cstring[2+i*2] = s.at(i).row();
+      cstring[3+i*2] = s.at(i).cell();
+    }
+    GooString *ret = new GooString(cstring, len);
+    gfree(cstring);
+    return ret;
+}
+
 FormField::FormField(FormFieldData &dd)
   : m_formData(&dd)
 {
diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
index 35ed164..43a67c8 100644
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@ -50,31 +50,6 @@ namespace Poppler {
         return ret;
     }
 
-    static GooString *QStringToGooString(const QString &s) {
-        int len = s.length();
-        char *cstring = (char *)gmallocn(s.length(), sizeof(char));
-        for (int i = 0; i < len; ++i)
-          cstring[i] = s.at(i).unicode();
-        GooString *ret = new GooString(cstring, len);
-        gfree(cstring);
-        return ret;
-    }
-
-    static GooString *QStringToUnicodeGooString(const QString &s) {
-        int len = s.length() * 2 + 2;
-        char *cstring = (char *)gmallocn(len, sizeof(char));
-        cstring[0] = 0xfe;
-        cstring[1] = 0xff;
-        for (int i = 0; i < s.length(); ++i)
-        {
-          cstring[2+i*2] = s.at(i).row();
-          cstring[3+i*2] = s.at(i).cell();
-        }
-        GooString *ret = new GooString(cstring, len);
-        gfree(cstring);
-        return ret;
-    }
-
     static QString UnicodeParsedString(GooString *s1) {
         if ( !s1 || s1->getLength() == 0 )
             return QString();
commit ab1059f594cb9fccd8568ca2a535a363c7521daa
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 24 00:14:01 2007 -0700

    Don't break aliasing.

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 3f02013..1d59460 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -755,10 +755,6 @@ GBool GlobalParams::parseYesNo2(char *token, GBool *flag) {
 }
 
 GlobalParams::~GlobalParams() {
-  GooHashIter *iter;
-  GooString *key;
-  GooList *list;
-
   freeBuiltinFontTables();
 
   delete macRomanReverseMap;
@@ -772,9 +768,7 @@ GlobalParams::~GlobalParams() {
   deleteGooList(toUnicodeDirs, GooString);
   deleteGooHash(displayFonts, DisplayFontParam);
 #ifdef WIN32
-  if (winFontList) {
-    delete winFontList;
-  }
+  delete winFontList;
 #endif
   deleteGooHash(psFonts, PSFontParam);
   deleteGooList(psNamedFonts16, PSFontParam);
@@ -782,8 +776,12 @@ GlobalParams::~GlobalParams() {
   delete textEncoding;
   deleteGooList(fontDirs, GooString);
 
+  GooHashIter *iter;
+  GooString *key;
   cMapDirs->startIter(&iter);
-  while (cMapDirs->getNext(&iter, &key, (void **)&list)) {
+  void *val;
+  while (cMapDirs->getNext(&iter, &key, &val)) {
+    GooList* list = (GooList*)val;
     deleteGooList(list, GooString);
   }
   delete cMapDirs;
@@ -1481,28 +1479,26 @@ CharCodeToUnicode *GlobalParams::getCIDToUnicode(GooString *collection) {
 }
 
 CharCodeToUnicode *GlobalParams::getUnicodeToUnicode(GooString *fontName) {
-  CharCodeToUnicode *ctu;
-  GooHashIter *iter;
-  GooString *fontPattern, *fileName;
-
   lockGlobalParams;
-  fileName = NULL;
+  GooHashIter *iter;
   unicodeToUnicodes->startIter(&iter);
-  while (unicodeToUnicodes->getNext(&iter, &fontPattern, (void **)&fileName)) {
+  GooString *fileName = NULL;
+  GooString *fontPattern;
+  void *val;
+  while (!fileName && unicodeToUnicodes->getNext(&iter, &fontPattern, &val)) {
     if (strstr(fontName->getCString(), fontPattern->getCString())) {
       unicodeToUnicodes->killIter(&iter);
-      break;
+      fileName = (GooString*)val;
     }
-    fileName = NULL;
   }
+  CharCodeToUnicode *ctu = NULL;
   if (fileName) {
-    if (!(ctu = unicodeToUnicodeCache->getCharCodeToUnicode(fileName))) {
-      if ((ctu = CharCodeToUnicode::parseUnicodeToUnicode(fileName))) {
-	unicodeToUnicodeCache->add(ctu);
-      }
+    ctu = unicodeToUnicodeCache->getCharCodeToUnicode(fileName);
+    if (!ctu) {
+      ctu = CharCodeToUnicode::parseUnicodeToUnicode(fileName);
+      if (ctu)
+         unicodeToUnicodeCache->add(ctu);
     }
-  } else {
-    ctu = NULL;
   }
   unlockGlobalParams;
   return ctu;
commit 71c47b30adf687a0bcece22834933267053360de
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 23:49:31 2007 -0700

    Reduce compiler warnings.

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index d1eb99b..349514a 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2579,8 +2579,8 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
   JBIG2Bitmap *bitmap;
   GBool ltp;
   Guint ltpCX, cx, cx0, cx1, cx2;
-  JBIG2BitmapPtr cxPtr0, cxPtr1;
-  JBIG2BitmapPtr atPtr0, atPtr1, atPtr2, atPtr3;
+  JBIG2BitmapPtr cxPtr0 = {0}, cxPtr1 = {0};
+  JBIG2BitmapPtr atPtr0 = {0}, atPtr1 = {0}, atPtr2 = {0}, atPtr3 = {0};
   int *refLine, *codingLine;
   int code1, code2, code3;
   int x, y, a0, pix, i, refI, codingI;
@@ -3025,8 +3025,16 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
   JBIG2Bitmap *bitmap;
   GBool ltp;
   Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2;
-  JBIG2BitmapPtr cxPtr0, cxPtr1, cxPtr2, cxPtr3, cxPtr4, cxPtr5, cxPtr6;
-  JBIG2BitmapPtr tpgrCXPtr0, tpgrCXPtr1, tpgrCXPtr2;
+  JBIG2BitmapPtr cxPtr0 = {0};
+  JBIG2BitmapPtr cxPtr1 = {0};
+  JBIG2BitmapPtr cxPtr2 = {0};
+  JBIG2BitmapPtr cxPtr3 = {0};
+  JBIG2BitmapPtr cxPtr4 = {0};
+  JBIG2BitmapPtr cxPtr5 = {0};
+  JBIG2BitmapPtr cxPtr6 = {0};
+  JBIG2BitmapPtr tpgrCXPtr0 = {0};
+  JBIG2BitmapPtr tpgrCXPtr1 = {0};
+  JBIG2BitmapPtr tpgrCXPtr2 = {0};
   int x, y, pix;
 
   bitmap = new JBIG2Bitmap(0, w, h);
commit 8466d94929844c976bbad8bb7d1ea7f7f77cc196
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 23:34:52 2007 -0700

    Reduce compiler warnings. Tabs to spaces.

diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index a3a0c59..6930c12 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -2043,7 +2043,7 @@ void FoFiType1C::readTopDict() {
 // (if any) out of the FD.
 void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) {
   int pos, pSize, pOffset;
-  double fontMatrix[6];
+  double fontMatrix[6] = {0};
   GBool hasFontMatrix;
 
   hasFontMatrix = gFalse;
@@ -2057,21 +2057,21 @@ void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) {
     }
     if (!ops[nOps - 1].isNum) {
       if (ops[nOps - 1].op == 0x0012) {
-	if (nOps < 3) {
-	  parsedOk = gFalse;
-	  return;
-	}
-	pSize = (int)ops[0].num;
-	pOffset = (int)ops[1].num;
-	break;
+        if (nOps < 3) {
+          parsedOk = gFalse;
+          return;
+        }
+        pSize = (int)ops[0].num;
+        pOffset = (int)ops[1].num;
+        break;
       } else if (ops[nOps - 1].op == 0x0c07) {
-	fontMatrix[0] = ops[0].num;
-	fontMatrix[1] = ops[1].num;
-	fontMatrix[2] = ops[2].num;
-	fontMatrix[3] = ops[3].num;
-	fontMatrix[4] = ops[4].num;
-	fontMatrix[5] = ops[5].num;
-	hasFontMatrix = gTrue;
+        fontMatrix[0] = ops[0].num;
+        fontMatrix[1] = ops[1].num;
+        fontMatrix[2] = ops[2].num;
+        fontMatrix[3] = ops[3].num;
+        fontMatrix[4] = ops[4].num;
+        fontMatrix[5] = ops[5].num;
+        hasFontMatrix = gTrue;
       }
       nOps = 0;
     }
commit c53b8ccfba6fa4345086493f9e44212721c11d0a
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 23:23:34 2007 -0700

    Reduce number of compiler warnings.

diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 0db7620..15011e1 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -500,7 +500,7 @@ int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode *u, int size) {
 int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) {
   //look for charcode in map
   if (usize == 1) {
-    for (int i=0; i<mapLen; i++) {
+    for (CharCode i=0; i<mapLen; i++) {
       if (map[i] == ((*u)&0xff)) {
         *c = (char)map[i];
         return 1;
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index a533138..63b7732 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -564,9 +564,6 @@ void Gfx::go(GBool topLevel) {
   Object args[maxArgs];
   int numArgs, i;
   int lastAbortCheck;
-#ifdef HAVE_GETTIMEOFDAY
-  GooTimer *timer;
-#endif
 
   // scan a sequence of objects
   updateLevel = lastAbortCheck = 0;
@@ -586,6 +583,7 @@ void Gfx::go(GBool topLevel) {
 	fflush(stdout);
       }
 #ifdef HAVE_GETTIMEOFDAY
+      GooTimer *timer = NULL;
       if (profileCommands) 
 	timer = new GooTimer ();
 #endif
@@ -612,7 +610,7 @@ void Gfx::go(GBool topLevel) {
 	  
 	  data_p->addElement (timer->getElapsed ());
 	}
-	delete (timer);
+        delete timer;
       }
 #endif
       obj.free();
diff --git a/poppler/PageLabelInfo.cc b/poppler/PageLabelInfo.cc
index 8cd7282..6ca65e9 100644
--- a/poppler/PageLabelInfo.cc
+++ b/poppler/PageLabelInfo.cc
@@ -122,6 +122,7 @@ static int fromLatin(const char *buffer)
   return -1;
 }
 
+#ifdef TEST
 static void toLatin(int number, GooString *str, GBool uppercase) {
   char base, letter;
   int i, count;
@@ -137,6 +138,7 @@ static void toLatin(int number, GooString *str, GBool uppercase) {
   for (i = 0; i < count; i++)
     str->append(letter);
 }
+#endif
 
 PageLabelInfo::Interval::Interval(Object *dict, int baseA) {
   Object obj;
commit abede2a06c5c9dc97b40479deda49621458f1171
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 23:03:36 2007 -0700

    Reduce number of compiler warnings.

diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index a580d6b..562790d 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -268,7 +268,6 @@ static PopplerDest *
 dest_new_named (GooString *named_dest)
 {
 	PopplerDest *dest;
-	gchar *name;
 
 	dest = g_new0 (PopplerDest, 1);
 
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index 700fe13..a36dc4e 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -122,7 +122,6 @@ poppler_document_new_from_file (const char  *uri,
   PDFDoc *newDoc;
   GooString *filename_g;
   GooString *password_g;
-  int err;
   char *filename;
 
   if (!globalParams) {
@@ -141,8 +140,7 @@ poppler_document_new_from_file (const char  *uri,
     password_g = new GooString (password);
 
   newDoc = new PDFDoc(filename_g, password_g, password_g);
-  if (password_g)
-    delete password_g;
+  delete password_g;
 
   return _poppler_document_new_from_pdfdoc (newDoc, error);
 }
@@ -170,8 +168,6 @@ poppler_document_new_from_data (char        *data,
   PDFDoc *newDoc;
   MemStream *str;
   GooString *password_g;
-  int err;
-  char *filename;
 
   if (!globalParams) {
     globalParams = new GlobalParams();
@@ -186,8 +182,7 @@ poppler_document_new_from_data (char        *data,
     password_g = new GooString (password);
 
   newDoc = new PDFDoc(str, password_g, password_g);
-  if (password_g)
-    delete password_g;
+  delete password_g;
 
   return _poppler_document_new_from_pdfdoc (newDoc, error);
 }
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index 9765608..973794c 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -914,9 +914,8 @@ poppler_page_get_text (PopplerPage          *page,
 		       PopplerRectangle     *selection)
 {
   TextOutputDev *text_dev;
-  PDFDoc *doc;
   GooString *sel_text;
-  double height, y1, y2;
+  double height;
   char *result;
   SelectionStyle selection_style = selectionStyleGlyph;
   PDFRectangle pdf_selection;
diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
index 320e2cf..bae8418 100644
--- a/qt/poppler-document.cc
+++ b/qt/poppler-document.cc
@@ -206,7 +206,6 @@ QDateTime Document::getDate( const QString & type ) const
   }
 
   Object obj;
-  char *s;
   int year, mon, day, hour, min, sec;
   Dict *infoDict = info.getDict();
   QString result;
diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc
index 2e43935..0e3fe52 100644
--- a/qt4/src/poppler-annotation.cc
+++ b/qt4/src/poppler-annotation.cc
@@ -1442,6 +1442,7 @@ LinkAnnotation::LinkAnnotation( const QDomNode & node )
                 {
                     Poppler::LinkAction::ActionType act;
                     QString actString = qe.attribute( "action" );
+                    bool found = true;
                     if ( actString == "PageFirst" )
                         act = Poppler::LinkAction::PageFirst;
                     else if ( actString == "PagePrev" )
@@ -1466,8 +1467,13 @@ LinkAnnotation::LinkAnnotation( const QDomNode & node )
                         act = Poppler::LinkAction::GoToPage;
                     else if ( actString == "Close" )
                         act = Poppler::LinkAction::Close;
-                    Poppler::LinkAction * action = new Poppler::LinkAction( QRect(), act );
-                    d->linkDestination = action;
+                    else
+                        found = false;
+                    if (found)
+                    {
+                        Poppler::LinkAction * action = new Poppler::LinkAction( QRect(), act );
+                        d->linkDestination = action;
+                    }
                 }
                 else if ( type == "Movie" )
                 {
@@ -1590,10 +1596,14 @@ void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const
             }
             case Poppler::Link::Movie:
             {
-                Poppler::LinkMovie * movie = static_cast< Poppler::LinkMovie * >( d->linkDestination );
                 hyperlinkElement.setAttribute( "type", "Movie" );
                 break;
             }
+            case Poppler::Link::Sound:
+            {
+                // FIXME: implement me
+                break;
+            }
             case Poppler::Link::None:
                 break;
         }
commit 60f5bcea4a920441e25ae11d677636242aabb2db
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 22:48:06 2007 -0700

    Remove unused variables.

diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index e64a4f8..164679d 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -131,7 +131,7 @@ int main(int argc, char *argv[]) {
   SplashOutputDev *splashOut;
   GBool ok;
   int exitCode;
-  int pg, pg_num_len, pg_x_len, pg_y_len;
+  int pg, pg_num_len;
   double pg_w, pg_h, tmp;
 
   exitCode = 99;
commit 3179eee44eb0afbc642675268b9a4abb16ccdde3
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 22:47:21 2007 -0700

    Remove unused variables.

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index f88ffb0..721e5c2 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1084,8 +1084,6 @@ void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
 			      int width, int height, GBool invert,
 			      GBool inlineImg) {
 
-  int i, j;
-  
   if (ignore||complexMode) {
     OutputDev::drawImageMask(state, ref, str, width, height, invert, inlineImg);
     return;
@@ -1098,14 +1096,6 @@ void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
   int w0, h0, w1, h1;		// size of image
   double xt, yt, wt, ht;
   GBool rotate, xFlip, yFlip;
-  GBool dither;
-  int x, y;
-  int ix, iy;
-  int px1, px2, qx, dx;
-  int py1, py2, qy, dy;
-  Gulong pixel;
-  int nComps, nVals, nBits;
-  double r1, g1, b1;
  
   // get image position and size
   state->transform(0, 0, &xt, &yt);
@@ -1175,8 +1165,6 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
 			  int width, int height, GfxImageColorMap *colorMap,
 			  int *maskColors, GBool inlineImg) {
 
-  int i, j;
-   
   if (ignore||complexMode) {
     OutputDev::drawImage(state, ref, str, width, height, colorMap, 
 			 maskColors, inlineImg);
@@ -1184,23 +1172,12 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   }
 
   FILE *f1;
-  ImageStream *imgStr;
-  Guchar pixBuf[4];
-  GfxColor color;
   int c;
   
   int x0, y0;			// top left corner of image
   int w0, h0, w1, h1;		// size of image
   double xt, yt, wt, ht;
   GBool rotate, xFlip, yFlip;
-  GBool dither;
-  int x, y;
-  int ix, iy;
-  int px1, px2, qx, dx;
-  int py1, py2, qy, dy;
-  Gulong pixel;
-  int nComps, nVals, nBits;
-  double r1, g1, b1;
  
   // get image position and size
   state->transform(0, 0, &xt, &yt);
commit e9dc379190aa3166870d0b11a05ccc4e9dad2706
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 22:41:59 2007 -0700

    Remove unused variables.

diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index 1f509ea..134c05c 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -78,20 +78,16 @@ ArthurOutputDev::~ArthurOutputDev()
 }
 
 void ArthurOutputDev::startDoc(XRef *xrefA) {
-  int i;
-
   xref = xrefA;
-  if (m_fontEngine) {
-    delete m_fontEngine;
-  }
+  delete m_fontEngine;
   m_fontEngine = new SplashFontEngine(
 #if HAVE_T1LIB_H
-				    globalParams->getEnableT1lib(),
+  globalParams->getEnableT1lib(),
 #endif
 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
-				    globalParams->getEnableFreeType(),
+  globalParams->getEnableFreeType(),
 #endif
-				    globalParams->getAntialias());
+  globalParams->getAntialias());
 }
 
 void ArthurOutputDev::startPage(int pageNum, GfxState *state)
@@ -497,7 +493,6 @@ void ArthurOutputDev::drawChar(GfxState *state, double x, double y,
   // fill
   if (!(render & 1)) {
     int x0, y0, xFrac, yFrac;
-    SplashGlyphBitmap glyph;
 
     x0 = static_cast<int>(floor(x1));
     xFrac = splashFloor((x1 - x0) * splashFontFraction);
@@ -681,8 +676,7 @@ void ArthurOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   int x, y;
   ImageStream *imgStr;
   Guchar *pix;
-  GfxRGB rgb;
-  int alpha, i;
+  int i;
   double *ctm;
   QMatrix matrix;
   int is_identity_transform;
commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Sun Sep 23 22:28:16 2007 -0700

    replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) != a' which, due to type promotions, if a is int, is equivalent to a < 0; fix problems revealed by the change

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index b84e198..14b3ad5 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -12,6 +12,7 @@
 #pragma implementation
 #endif
 
+#include <assert.h>
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
@@ -110,11 +111,6 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
     goto err1;
   }
 
-  if (nObjects*(int)sizeof(int)/sizeof(int) != nObjects) {
-    error(-1, "Invalid 'nObjects'");
-    goto err1;
-  }
- 
   objs = new Object[nObjects];
   objNums = (int *)gmallocn(nObjects, sizeof(int));
   offsets = (int *)gmallocn(nObjects, sizeof(int));
@@ -400,11 +396,8 @@ GBool XRef::readXRefTable(Parser *parser, Guint *pos) {
 	   first + n > newSize && newSize > 0;
 	   newSize <<= 1) ;
       if (newSize < 0) {
-	goto err1;
-      }
-      if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
         error(-1, "Invalid 'obj' parameters'");
-        goto err1;
+	goto err1;
       }
  
       entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
@@ -515,10 +508,7 @@ GBool XRef::readXRefStream(Stream *xrefStr, Guint *pos) {
     goto err1;
   }
   if (newSize > size) {
-    if (newSize * (int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
-      error(-1, "Invalid 'size' parameter.");
-      return gFalse;
-    }
+    assert(newSize >= 0);
     entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
     for (i = size; i < newSize; ++i) {
       entries[i].offset = 0xffffffff;
@@ -608,9 +598,6 @@ GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) {
 	 first + n > newSize && newSize > 0;
 	 newSize <<= 1) ;
     if (newSize < 0) {
-      return gFalse;
-    }
-    if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
       error(-1, "Invalid 'size' inside xref table.");
       return gFalse;
     }
@@ -754,10 +741,6 @@ GBool XRef::constructXRef() {
 		    error(-1, "Bad object number");
 		    return gFalse;
 		  }
-                  if (newSize*(int)sizeof(XRefEntry)/sizeof(XRefEntry) != newSize) {
-                    error(-1, "Invalid 'obj' parameters.");
-                    return gFalse;
-                  }
 		  entries = (XRefEntry *)
 		      greallocn(entries, newSize, sizeof(XRefEntry));
 		  for (i = size; i < newSize; ++i) {
@@ -782,7 +765,7 @@ GBool XRef::constructXRef() {
     } else if (!strncmp(p, "endstream", 9)) {
       if (streamEndsLen == streamEndsSize) {
 	streamEndsSize += 64;
-        if (streamEndsSize*(int)sizeof(int)/sizeof(int) != streamEndsSize) {
+        if (streamEndsSize < 0) {
           error(-1, "Invalid 'endstream' parameter.");
           return gFalse;
         }
commit 5a1f670a4d16affeed86cdf643ab22f481caa3a5
Author: Krzysztof Kowalczyk <kkowalczyk at kjkubu.(none)>
Date:   Sun Sep 23 20:42:59 2007 -0700

    ignore *.o files

diff --git a/.gitignore b/.gitignore
index 3151685..11d96b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ poppler-splash.pc
 poppler.pc
 stamp-h1
 gtk-doc.make
+*.o
commit c156aed7234f82dea4cb384c1b8a7acdd34545be
Author: Krzysztof Kowalczyk <kkowalczyk at kjkubu.(none)>
Date:   Sun Sep 23 20:41:19 2007 -0700

    remove unused variables

diff --git a/poppler/ABWOutputDev.cc b/poppler/ABWOutputDev.cc
index e600f89..0c8f9d5 100644
--- a/poppler/ABWOutputDev.cc
+++ b/poppler/ABWOutputDev.cc
@@ -116,7 +116,6 @@ void ABWOutputDev::recursiveXYC(xmlNodePtr nodeset) {
   splits the page using splitNodes on that whitespace. It calls itself again
   with both the halves*/
   float bhs, bvs, X1, X2, Y1, Y2;
-  xmlNodePtr N_cur;
 
   bvs = getBiggestSeperator(nodeset, VERTICAL, &X1, &X2);
   bhs = getBiggestSeperator(nodeset, HORIZONTAL, &Y1, &Y2);
@@ -259,17 +258,15 @@ float ABWOutputDev::getBiggestSeperator(xmlNodePtr N_set, unsigned int direction
 
 void ABWOutputDev::updateFont(GfxState *state) {
   char buf[160];
-  double x,y;
   xmlNodePtr N_cur;
   GfxFont *font;
   bool found = false;
-  xmlChar val[8];
   bool isBold, isItalic, S_isBold, S_isItalic;
   isBold = isItalic = S_isBold =  S_isItalic = false;
   font = state->getFont();
   GooString *ftName;
   char *fnEnd, *fnName;
-  int fnLength, fnStart, ftSize;
+  int fnStart, ftSize;
   //the first time this function is called there is no funt.
   //Fixme: find out if that isn'y a bug
   if (font){
@@ -431,14 +428,12 @@ void ABWOutputDev::endWord(){
 }
 
 void ABWOutputDev::beginTextBlock(GfxState *state, double x, double y){
-  char buf[20];
   endTextBlock();
   N_Block = xmlNewChild(N_page, NULL, BAD_CAST "Textblock", NULL);
   beginWord(state,x,y);
 }
 
 void ABWOutputDev::endTextBlock(){
-  char buf[20];
   if (N_Block) {
     endWord();
     N_Block = NULL;  
@@ -458,7 +453,6 @@ void ABWOutputDev::interpretXYTree(){
 
 void ABWOutputDev::ATP_recursive(xmlNodePtr N_parent){
   xmlNodePtr N_first, N_second, N_line, N_tempCol, N_tempColset;
-  char buf[20];
 
   N_first  = N_parent->children;
   if (!N_first)
@@ -592,7 +586,7 @@ void ABWOutputDev::ATP_recursive(xmlNodePtr N_parent){
     }
     break;
   default:
-    double tX1=0, tX2=0, tY1=0, tY2=0;
+    //double tX1=0, tX2=0, tY1=0, tY2=0;
     //fprintf(stderr,"case default\n");
     N_line = xmlNewChild(N_Block, NULL, BAD_CAST "line", NULL);
     while (N_first){
commit d0bdef4752be5fa609a0766ee87aa54d51611d9a
Author: Krzysztof Kowalczyk <kkowalczyk at kjkubu.(none)>
Date:   Sat Sep 22 13:38:03 2007 -0700

    undo accidental changes to file permissions

diff --git a/msvc/poppler/poppler-config.h b/msvc/poppler/poppler-config.h
old mode 100755
new mode 100644
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
old mode 100755
new mode 100644
diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
old mode 100755
new mode 100644
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
old mode 100755
new mode 100644
diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
old mode 100755
new mode 100644
diff --git a/poppler/Form.cc b/poppler/Form.cc
old mode 100755
new mode 100644
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
old mode 100755
new mode 100644
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
old mode 100755
new mode 100644
diff --git a/poppler/Page.cc b/poppler/Page.cc
old mode 100755
new mode 100644
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
old mode 100755
new mode 100644
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
old mode 100755
new mode 100644
diff --git a/splash/Splash.cc b/splash/Splash.cc
old mode 100755
new mode 100644
diff --git a/splash/SplashFTFontEngine.cc b/splash/SplashFTFontEngine.cc
old mode 100755
new mode 100644
diff --git a/test/perf-test-preview-dummy.cc b/test/perf-test-preview-dummy.cc
old mode 100755
new mode 100644
diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc
old mode 100755
new mode 100644
diff --git a/test/perf-test.cc b/test/perf-test.cc
old mode 100755
new mode 100644
commit 6c69473f2f4a49757614ddd249e65bb7a13c63c1
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 08:09:53 2007 -0700

    undo accidental mode change

diff --git a/makefile.vc b/makefile.vc
old mode 100755
new mode 100644
commit e7e386e7ce8cb8eb8a7037ebdaa601524d332ae7
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 08:08:53 2007 -0700

    more simplification by removing unneded code

diff --git a/makefile.vc b/makefile.vc
old mode 100644
new mode 100755
index d657cbf..0b0f0ee
--- a/makefile.vc
+++ b/makefile.vc
@@ -60,7 +60,7 @@ CFLAGS = $(CFLAGS) /I$(ZLIB_DIR) /I$(JPEG_DIR) /I$(FREETYPE_DIR)\include
 
 LIBS = $(LIBS) kernel32.lib advapi32.lib user32.lib gdi32.lib
 
-LDFLAGS = $(LDFLAGS) /nologo /DEBUG
+LDFLAGS = $(LDFLAGS) /nologo /DEBUG /NODEFAULTLIB:libcmt
 
 #CFLAGS = $(CFLAGS) /D "USE_FIXEDPOINT"
 
diff --git a/test/perf-test.cc b/test/perf-test.cc
index cde1852..02dfd52 100755
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -64,22 +64,6 @@ extern void PreviewBitmapInit(void);
 extern void PreviewBitmapDestroy(void);
 extern void PreviewBitmapSplash(SplashBitmap *bmpSplash);
 
-class SizeD {
-public:
-    SizeD(double dx, double dy) { m_dx = dx; m_dy = dy; }
-    SizeD(int dx, int dy) { m_dx = (double)dx; m_dy = (double)dy; }
-    SizeD() { m_dx = 0; m_dy = 0; }
-    int dxI() { return (int)m_dx; }
-    int dyI() { return (int)m_dy; }
-    double dx() { return m_dx; }
-    double dy() { return m_dy; }
-    void setDx(double dx) { m_dx = dx; }
-    void setDy(double dy) { m_dy = dy; }
-private:
-    double m_dx;
-    double m_dy;
-};
-
 class PdfEnginePoppler {
 public:
     PdfEnginePoppler();
@@ -92,26 +76,15 @@ public:
         _fileName = (char*)strdup(fileName);
     }
 
-    bool validPageNo(int pageNo) const {
-        if ((pageNo >= 1) && (pageNo <= pageCount()))
-            return true;
-        return false;
-    }
-
     int pageCount(void) const { return _pageCount; }
 
-    virtual bool load(const char *fileName);
-    virtual int pageRotation(int pageNo);
-    virtual SizeD pageSize(int pageNo);
-    virtual SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
-                         GBool (*abortCheckCbkA)(void *data),
-                         void *abortCheckCbkDataA);
+    bool load(const char *fileName);
+    SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation);
 
-    PDFDoc* pdfDoc() { return _pdfDoc; }
     SplashOutputDev *   outputDevice();
 private:
-    char *_fileName;
-    int _pageCount;
+    char *              _fileName;
+    int                 _pageCount;
 
     PDFDoc *            _pdfDoc;
     SplashOutputDev *   _outputDev;
@@ -498,19 +471,6 @@ bool PdfEnginePoppler::load(const char *fileName)
     return true;
 }
 
-int PdfEnginePoppler::pageRotation(int pageNo)
-{
-    assert(validPageNo(pageNo));
-    return pdfDoc()->getPageRotate(pageNo);
-}
-
-SizeD PdfEnginePoppler::pageSize(int pageNo)
-{
-    double dx = pdfDoc()->getPageCropWidth(pageNo);
-    double dy = pdfDoc()->getPageCropHeight(pageNo);
-    return SizeD(dx, dy);
-}
-
 SplashOutputDev * PdfEnginePoppler::outputDevice() {
     if (!_outputDev) {
         GBool bitmapTopDown = gTrue;
@@ -521,10 +481,7 @@ SplashOutputDev * PdfEnginePoppler::outputDevice() {
     return _outputDev;
 }
 
-SplashBitmap *PdfEnginePoppler::renderBitmap(
-                           int pageNo, double zoomReal, int rotation,
-                           GBool (*abortCheckCbkA)(void *data),
-                           void *abortCheckCbkDataA)
+SplashBitmap *PdfEnginePoppler::renderBitmap(int pageNo, double zoomReal, int rotation)
 {
     assert(outputDevice());
     if (!outputDevice()) return NULL;
@@ -534,8 +491,8 @@ SplashBitmap *PdfEnginePoppler::renderBitmap(
     GBool  useMediaBox = gFalse;
     GBool  crop        = gTrue;
     GBool  doLinks     = gTrue;
-    _pdfDoc->displayPage(_outputDev, pageNo, hDPI, vDPI, rotation, useMediaBox, crop, doLinks,
-        abortCheckCbkA, abortCheckCbkDataA);
+    _pdfDoc->displayPage(_outputDev, pageNo, hDPI, vDPI, rotation, useMediaBox, 
+        crop, doLinks, NULL, NULL);
 
     SplashBitmap* bmp = _outputDev->takeBitmap();
     return bmp;
@@ -1015,7 +972,7 @@ static void RenderPdf(const char *fileName)
         SplashBitmap *bmpSplash = NULL;
 
         MsTimer msTimer;
-        bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0, NULL, NULL);
+        bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0);
         msTimer.stop();
         double timeInMs = msTimer.timeInMs();
         if (gfTimings)
@@ -1398,6 +1355,7 @@ int main(int argc, char **argv)
     PreviewBitmapDestroy();
     StrList_Destroy(&gArgsListRoot);
     delete globalParams;
+    free(gOutFileName);
     return 0;
 }
 
commit 3e10604637ec193269a3155985476d3b83dc7d62
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 07:48:38 2007 -0700

    for portability use bool/true/false instead of BOOL/TRUE/FALSE

diff --git a/test/perf-test.cc b/test/perf-test.cc
index fc309bb..cde1852 100755
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -48,10 +48,6 @@
 #include "SecurityHandler.h"
 #include "Link.h"
 
-#ifndef _MSC_VER
-typedef BOOL int;
-#endif
-
 #ifdef _MSC_VER
 #define strdup _strdup
 #endif
@@ -108,7 +104,7 @@ public:
     virtual int pageRotation(int pageNo);
     virtual SizeD pageSize(int pageNo);
     virtual SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
-                         BOOL (*abortCheckCbkA)(void *data),
+                         GBool (*abortCheckCbkA)(void *data),
                          void *abortCheckCbkDataA);
 
     PDFDoc* pdfDoc() { return _pdfDoc; }
@@ -146,12 +142,12 @@ static StrList *gArgsListRoot = NULL;
 #define TEXT_ARG            "-text"
 
 /* Should we record timings? True if -timings command-line argument was given. */
-static BOOL gfTimings = FALSE;
+static bool gfTimings = false;
 
 /* If true, we use render each page at resolution 'gResolutionX'/'gResolutionY'.
    If false, we render each page at its native resolution.
    True if -resolution NxM command-line argument was given. */
-static BOOL gfForceResolution = FALSE;
+static bool gfForceResolution = false;
 static int  gResolutionX = 0;
 static int  gResolutionY = 0;
 /* If NULL, we output the log info to stdout. If not NULL, should be a name
@@ -168,10 +164,10 @@ static FILE *   gErrFile = NULL;
 /* If True and a directory is given as a command-line argument, we'll process
    pdf files in sub-directories as well.
    Controlled by -recursive command-line argument */
-static BOOL gfRecursive = FALSE;
+static bool gfRecursive = false;
 
 /* If true, preview rendered image. To make sure that they're being rendered correctly. */
-static BOOL gfPreview = FALSE;
+static bool gfPreview = false;
 
 /* 1 second (1000 milliseconds) */
 #define SLOW_PREVIEW_TIME 1000
@@ -180,10 +176,10 @@ static BOOL gfPreview = FALSE;
    SLOW_PREVIEW_TIME. This is so that a human has enough time to see if the
    PDF renders ok. In release mode on fast processor pages take only ~100-200 ms
    to render and they go away too quickly to be inspected by a human. */
-static int gfSlowPreview = FALSE;
+static bool gfSlowPreview = false;
 
 /* If true, we only dump the text, not render */
-static int gfTextOnly = FALSE;
+static bool gfTextOnly = false;
 
 #define PAGE_NO_NOT_GIVEN -1
 
@@ -192,7 +188,7 @@ static int gfTextOnly = FALSE;
 static int  gPageNo = PAGE_NO_NOT_GIVEN;
 /* If true, will only load the file, not render any pages. Mostly for
    profiling load time */
-static BOOL gfLoadOnly = FALSE;
+static bool gfLoadOnly = false;
 
 #define PDF_FILE_DPI 72
 
@@ -275,43 +271,43 @@ char *str_dup(const char *str)
     return str_cat4(str, NULL, NULL, NULL);
 }
 
-int str_eq(const char *str1, const char *str2)
+bool str_eq(const char *str1, const char *str2)
 {
     if (!str1 && !str2)
-        return TRUE;
+        return true;
     if (!str1 || !str2)
-        return FALSE;
+        return false;
     if (0 == strcmp(str1, str2))
-        return TRUE;
-    return FALSE;
+        return true;
+    return false;
 }
 
-int str_ieq(const char *str1, const char *str2)
+bool str_ieq(const char *str1, const char *str2)
 {
     if (!str1 && !str2)
-        return TRUE;
+        return true;
     if (!str1 || !str2)
-        return FALSE;
+        return false;
     if (0 == _stricmp(str1, str2))
-        return TRUE;
-    return FALSE;
+        return true;
+    return false;
 }
 
-int str_endswith(const char *txt, const char *end)
+bool str_endswith(const char *txt, const char *end)
 {
     size_t end_len;
     size_t txt_len;
 
     if (!txt || !end)
-        return FALSE;
+        return false;
 
     txt_len = strlen(txt);
     end_len = strlen(end);
     if (end_len > txt_len)
-        return FALSE;
+        return false;
     if (str_eq(txt+txt_len-end_len, end))
-        return TRUE;
-    return FALSE;
+        return true;
+    return false;
 }
 
 /* TODO: probably should move to some other file and change name to
@@ -527,7 +523,7 @@ SplashOutputDev * PdfEnginePoppler::outputDevice() {
 
 SplashBitmap *PdfEnginePoppler::renderBitmap(
                            int pageNo, double zoomReal, int rotation,
-                           BOOL (*abortCheckCbkA)(void *data),
+                           GBool (*abortCheckCbkA)(void *data),
                            void *abortCheckCbkDataA)
 {
     assert(outputDevice());
@@ -757,15 +753,15 @@ int StrList_InsertAndOwn(StrList **root, char *txt)
     StrList *   el;
     assert(root && txt);
     if (!root || !txt)
-        return FALSE;
+        return false;
 
     el = (StrList*)malloc(sizeof(StrList));
     if (!el)
-        return FALSE;
+        return false;
     el->str = txt;
     el->next = *root;
     *root = el;
-    return TRUE;
+    return true;
 }
 
 int StrList_Insert(StrList **root, char *txt)
@@ -774,16 +770,16 @@ int StrList_Insert(StrList **root, char *txt)
 
     assert(root && txt);
     if (!root || !txt)
-        return FALSE;
+        return false;
     txtDup = str_dup(txt);
     if (!txtDup)
-        return FALSE;
+        return false;
 
     if (!StrList_InsertAndOwn(root, txtDup)) {
         free((void*)txtDup);
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 StrList* StrList_RemoveHead(StrList **root)
@@ -911,11 +907,11 @@ static void PrintUsageAndExit(int argc, char **argv)
     exit(0);
 }
 
-static int ShowPreview(void)
+static bool ShowPreview(void)
 {
     if (gfPreview || gfSlowPreview)
-        return TRUE;
-    return FALSE;
+        return true;
+    return false;
 }
 
 static void RenderPdfAsText(const char *fileName)
@@ -993,7 +989,7 @@ static void RenderPdf(const char *fileName)
     PdfEnginePoppler * engineSplash = NULL;
 
     // TODO: fails if file already exists and has read-only attribute
-    CopyFile(fileName, POPPLER_TMP_NAME, FALSE);
+    CopyFile(fileName, POPPLER_TMP_NAME, false);
     fileNameSplash = POPPLER_TMP_NAME;
 
     LogInfo("started: %s\n", fileName);
@@ -1049,7 +1045,7 @@ static void RenderFile(const char *fileName)
     RenderPdf(fileName);
 }
 
-static int ParseInteger(const char *start, const char *end, int *intOut)
+static bool ParseInteger(const char *start, const char *end, int *intOut)
 {
     char            numBuf[16];
     int             digitsCount;
@@ -1058,7 +1054,7 @@ static int ParseInteger(const char *start, const char *end, int *intOut)
     assert(start && end && intOut);
     assert(end >= start);
     if (!start || !end || !intOut || (start > end))
-        return FALSE;
+        return false;
 
     digitsCount = 0;
     tmp = start;
@@ -1066,24 +1062,24 @@ static int ParseInteger(const char *start, const char *end, int *intOut)
         if (isspace(*tmp)) {
             /* do nothing, we allow whitespace */
         } else if (!isdigit(*tmp))
-            return FALSE;
+            return false;
         numBuf[digitsCount] = *tmp;
         ++digitsCount;
         if (digitsCount == dimof(numBuf)-3) /* -3 to be safe */
-            return FALSE;
+            return false;
         ++tmp;
     }
     if (0 == digitsCount)
-        return FALSE;
+        return false;
     numBuf[digitsCount] = 0;
     *intOut = atoi(numBuf);
-    return TRUE;
+    return true;
 }
 
 /* Given 'resolutionString' in format NxM (e.g. "100x200"), parse the string and put N
    into 'resolutionXOut' and M into 'resolutionYOut'.
-   Return FALSE if there was an error (e.g. string is not in the right format */
-static int ParseResolutionString(const char *resolutionString, int *resolutionXOut, int *resolutionYOut)
+   Return false if there was an error (e.g. string is not in the right format */
+static bool ParseResolutionString(const char *resolutionString, int *resolutionXOut, int *resolutionYOut)
 {
     const char *    posOfX;
 
@@ -1091,21 +1087,21 @@ static int ParseResolutionString(const char *resolutionString, int *resolutionXO
     assert(resolutionXOut);
     assert(resolutionYOut);
     if (!resolutionString || !resolutionXOut || !resolutionYOut)
-        return FALSE;
+        return false;
     *resolutionXOut = 0;
     *resolutionYOut = 0;
     posOfX = strchr(resolutionString, 'X');
     if (!posOfX)
         posOfX = strchr(resolutionString, 'x');
     if (!posOfX)
-        return FALSE;
+        return false;
     if (posOfX == resolutionString)
-        return FALSE;
+        return false;
     if (!ParseInteger(resolutionString, posOfX-1, resolutionXOut))
-        return FALSE;
+        return false;
     if (!ParseInteger(posOfX+1, resolutionString+strlen(resolutionString)-1, resolutionYOut))
-        return FALSE;
-    return TRUE;
+        return false;
+    return true;
 }
 
 #ifdef DEBUG
@@ -1120,21 +1116,21 @@ static void u_ParseResolutionString(void)
         int             resX;
         int             resY;
     } testData[] = {
-        { "", FALSE, 0, 0 },
-        { "abc", FALSE, 0, 0},
-        { "34", FALSE, 0, 0},
-        { "0x0", TRUE, 0, 0},
-        { "0x1", TRUE, 0, 1},
-        { "0xab", FALSE, 0, 0},
-        { "1x0", TRUE, 1, 0},
-        { "100x200", TRUE, 100, 200},
-        { "58x58", TRUE, 58, 58},
-        { "  58x58", TRUE, 58, 58},
-        { "58x  58", TRUE, 58, 58},
-        { "58x58  ", TRUE, 58, 58},
-        { "     58  x  58  ", TRUE, 58, 58},
-        { "34x1234a", FALSE, 0, 0},
-        { NULL, FALSE, 0, 0}
+        { "", false, 0, 0 },
+        { "abc", false, 0, 0},
+        { "34", false, 0, 0},
+        { "0x0", true, 0, 0},
+        { "0x1", true, 0, 1},
+        { "0xab", false, 0, 0},
+        { "1x0", true, 1, 0},
+        { "100x200", true, 100, 200},
+        { "58x58", true, 58, 58},
+        { "  58x58", true, 58, 58},
+        { "58x  58", true, 58, 58},
+        { "58x58  ", true, 58, 58},
+        { "     58  x  58  ", true, 58, 58},
+        { "34x1234a", false, 0, 0},
+        { NULL, false, 0, 0}
     };
     for (i=0; NULL != testData[i].str; i++) {
         str = testData[i].str;
@@ -1167,16 +1163,16 @@ static void ParseCommandLine(int argc, char **argv)
         assert(arg);
         if ('-' == arg[0]) {
             if (str_ieq(arg, TIMINGS_ARG)) {
-                gfTimings = TRUE;
+                gfTimings = true;
             } else if (str_ieq(arg, RESOLUTION_ARG)) {
                 ++i;
                 if (i == argc)
                     PrintUsageAndExit(argc, argv); /* expect a file name after that */
                 if (!ParseResolutionString(argv[i], &gResolutionX, &gResolutionY))
                     PrintUsageAndExit(argc, argv);
-                gfForceResolution = TRUE;
+                gfForceResolution = true;
             } else if (str_ieq(arg, RECURSIVE_ARG)) {
-                gfRecursive = TRUE;
+                gfRecursive = true;
             } else if (str_ieq(arg, OUT_ARG)) {
                 /* expect a file name after that */
                 ++i;
@@ -1184,13 +1180,13 @@ static void ParseCommandLine(int argc, char **argv)
                     PrintUsageAndExit(argc, argv);
                 gOutFileName = str_dup(argv[i]);
             } else if (str_ieq(arg, PREVIEW_ARG)) {
-                gfPreview = TRUE;
+                gfPreview = true;
             } else if (str_ieq(arg, TEXT_ARG)) {
-                gfTextOnly = TRUE;
+                gfTextOnly = true;
             } else if (str_ieq(arg, SLOW_PREVIEW_ARG)) {
-                gfSlowPreview = TRUE;
+                gfSlowPreview = true;
             } else if (str_ieq(arg, LOAD_ONLY_ARG)) {
-                gfLoadOnly = TRUE;
+                gfLoadOnly = true;
             } else if (str_ieq(arg, PAGE_ARG)) {
                 /* expect an integer after that */
                 ++i;
@@ -1254,54 +1250,54 @@ Exit:
 #include <sys/types.h>
 #include <sys/stat.h>
 
-int IsDirectoryName(char *path)
+bool IsDirectoryName(char *path)
 {
     struct _stat    buf;
     int             result;
 
     result = _stat(path, &buf );
     if (0 != result)
-        return FALSE;
+        return false;
 
     if (buf.st_mode & _S_IFDIR)
-        return TRUE;
+        return true;
 
-    return FALSE;
+    return false;
 }
 
-int IsFileName(char *path)
+bool IsFileName(char *path)
 {
     struct _stat    buf;
     int             result;
 
     result = _stat(path, &buf );
     if (0 != result)
-        return FALSE;
+        return false;
 
     if (buf.st_mode & _S_IFREG)
-        return TRUE;
+        return true;
 
-    return FALSE;
+    return false;
 }
 #else
-int IsDirectoryName(char *path)
+bool IsDirectoryName(char *path)
 {
     /* TODO: implement me */
-    return FALSE;
+    return false;
 }
 
-int IsFileName(char *path)
+bool IsFileName(char *path)
 {
     /* TODO: implement me */
-    return TRUE;
+    return true;
 }
 #endif
 
-int IsPdfFileName(char *path)
+bool IsPdfFileName(char *path)
 {
     if (str_endswith(path, ".pdf"))
-        return TRUE;
-    return FALSE;
+        return true;
+    return false;
 }
 
 static void RenderDirectory(char *path)
commit 634718936f2a95fac2a9d12fcea483b3d0ca8fa6
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 07:41:14 2007 -0700

    simplify perf-test

diff --git a/test/perf-test-pdf-engine.h b/test/perf-test-pdf-engine.h
deleted file mode 100755
index 7c454aa..0000000
--- a/test/perf-test-pdf-engine.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef PDF_TEST_PDF_ENGINE_H_
-#define PDF_TEST_PDF_ENGINE_H_
-
-#include "ErrorCodes.h"
-#include "GooString.h"
-#include "GooList.h"
-#include "GlobalParams.h"
-#include "SplashBitmap.h"
-#include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
-#include "SplashOutputDev.h"
-#include "TextOutputDev.h"
-#include "PDFDoc.h"
-#include "SecurityHandler.h"
-#include "Link.h"
-
-#define INVALID_PAGE_NO     -1
-
-#ifdef _MSC_VER
-#define strdup _strdup
-#endif
-
-#define dimof(X)    (sizeof(X)/sizeof((X)[0]))
-
-class SizeD {
-public:
-    SizeD(double dx, double dy) { m_dx = dx; m_dy = dy; }
-    SizeD(int dx, int dy) { m_dx = (double)dx; m_dy = (double)dy; }
-    SizeD() { m_dx = 0; m_dy = 0; }
-    int dxI() { return (int)m_dx; }
-    int dyI() { return (int)m_dy; }
-    double dx() { return m_dx; }
-    double dy() { return m_dy; }
-    void setDx(double dx) { m_dx = dx; }
-    void setDy(double dy) { m_dy = dy; }
-private:
-    double m_dx;
-    double m_dy;
-};
-
-class PdfEnginePoppler {
-public:
-    PdfEnginePoppler();
-    ~PdfEnginePoppler();
-
-    const char *fileName(void) const { return _fileName; };
-
-    void setFileName(const char *fileName) {
-        assert(!_fileName);
-        _fileName = (char*)strdup(fileName);
-    }
-
-    bool validPageNo(int pageNo) const {
-        if ((pageNo >= 1) && (pageNo <= pageCount()))
-            return true;
-        return false;
-    }
-
-    int pageCount(void) const { return _pageCount; }
-
-    virtual bool load(const char *fileName);
-    virtual int pageRotation(int pageNo);
-    virtual SizeD pageSize(int pageNo);
-    virtual SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
-                         BOOL (*abortCheckCbkA)(void *data),
-                         void *abortCheckCbkDataA);
-
-    PDFDoc* pdfDoc() { return _pdfDoc; }
-    SplashOutputDev *   outputDevice();
-private:
-    char *_fileName;
-    int _pageCount;
-
-    PDFDoc *            _pdfDoc;
-    SplashOutputDev *   _outputDev;
-};
-
-
-#endif
diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc
index 5f3f09b..173a7a5 100755
--- a/test/perf-test-preview-win.cc
+++ b/test/perf-test-preview-win.cc
@@ -4,11 +4,10 @@
 /* This is a preview support for perf-test for Windows */
 
 #include <windows.h>
-
-#include "perf-test-pdf-engine.h"
-
 #include <assert.h>
 
+#include "SplashBitmap.h"
+
 #define WIN_CLASS_NAME  "PDFTEST_PDF_WIN"
 #define COL_WINDOW_BG RGB(0xff, 0xff, 0xff)
 
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 46a6d6b..fc309bb 100755
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -22,8 +22,6 @@
 #include <windows.h>
 #endif
 
-#include "perf-test-pdf-engine.h"
-
 #include <assert.h>
 #include <config.h>
 #include <stdio.h>
@@ -38,10 +36,30 @@
 #include <dirent.h>
 #endif
 
+#include "ErrorCodes.h"
+#include "GooString.h"
+#include "GooList.h"
+#include "GlobalParams.h"
+#include "SplashBitmap.h"
+#include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
+#include "SplashOutputDev.h"
+#include "TextOutputDev.h"
+#include "PDFDoc.h"
+#include "SecurityHandler.h"
+#include "Link.h"
+
 #ifndef _MSC_VER
 typedef BOOL int;
 #endif
 
+#ifdef _MSC_VER
+#define strdup _strdup
+#endif
+
+#define dimof(X)    (sizeof(X)/sizeof((X)[0]))
+
+#define INVALID_PAGE_NO     -1
+
 /* Those must be implemented in order to provide preview during execution.
    They can be no-ops. An implementation for windows is in
    perf-test-preview-win.cc
@@ -50,6 +68,59 @@ extern void PreviewBitmapInit(void);
 extern void PreviewBitmapDestroy(void);
 extern void PreviewBitmapSplash(SplashBitmap *bmpSplash);
 
+class SizeD {
+public:
+    SizeD(double dx, double dy) { m_dx = dx; m_dy = dy; }
+    SizeD(int dx, int dy) { m_dx = (double)dx; m_dy = (double)dy; }
+    SizeD() { m_dx = 0; m_dy = 0; }
+    int dxI() { return (int)m_dx; }
+    int dyI() { return (int)m_dy; }
+    double dx() { return m_dx; }
+    double dy() { return m_dy; }
+    void setDx(double dx) { m_dx = dx; }
+    void setDy(double dy) { m_dy = dy; }
+private:
+    double m_dx;
+    double m_dy;
+};
+
+class PdfEnginePoppler {
+public:
+    PdfEnginePoppler();
+    ~PdfEnginePoppler();
+
+    const char *fileName(void) const { return _fileName; };
+
+    void setFileName(const char *fileName) {
+        assert(!_fileName);
+        _fileName = (char*)strdup(fileName);
+    }
+
+    bool validPageNo(int pageNo) const {
+        if ((pageNo >= 1) && (pageNo <= pageCount()))
+            return true;
+        return false;
+    }
+
+    int pageCount(void) const { return _pageCount; }
+
+    virtual bool load(const char *fileName);
+    virtual int pageRotation(int pageNo);
+    virtual SizeD pageSize(int pageNo);
+    virtual SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
+                         BOOL (*abortCheckCbkA)(void *data),
+                         void *abortCheckCbkDataA);
+
+    PDFDoc* pdfDoc() { return _pdfDoc; }
+    SplashOutputDev *   outputDevice();
+private:
+    char *_fileName;
+    int _pageCount;
+
+    PDFDoc *            _pdfDoc;
+    SplashOutputDev *   _outputDev;
+};
+
 typedef struct StrList {
     struct StrList *next;
     char *          str;
commit 617550199762fab42ca2e202e641e047b3efbac0
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 05:20:16 2007 -0700

    simplify perf-test code

diff --git a/test/perf-test-pdf-engine.h b/test/perf-test-pdf-engine.h
old mode 100644
new mode 100755
index d000226..7c454aa
--- a/test/perf-test-pdf-engine.h
+++ b/test/perf-test-pdf-engine.h
@@ -37,55 +37,16 @@ private:
     double m_dy;
 };
 
-/* Abstract class representing cached bitmap. Allows different implementations
-   on different platforms. */
-class RenderedBitmap {
+class PdfEnginePoppler {
 public:
-    virtual ~RenderedBitmap() {};
-    virtual int dx() = 0;
-    virtual int dy() = 0;
-    virtual int rowSize() = 0;
-    virtual unsigned char *data() = 0;
-
-#ifdef WIN32
-    // TODO: this is for WINDOWS only
-    virtual HBITMAP createDIBitmap(HDC) = 0;
-    virtual void stretchDIBits(HDC, int, int, int, int) = 0;
-#endif
-};
-
-class RenderedBitmapSplash : public RenderedBitmap {
-public:
-    RenderedBitmapSplash(SplashBitmap *);
-    virtual ~RenderedBitmapSplash();
-
-    virtual int dx();
-    virtual int dy();
-    virtual int rowSize();
-    virtual unsigned char *data();
-
-#ifdef WIN32
-    virtual HBITMAP createDIBitmap(HDC);
-    virtual void stretchDIBits(HDC, int, int, int, int);
-#endif
-protected:
-    SplashBitmap *_bitmap;
-};
-
-class PdfEngine {
-public:
-    PdfEngine() : 
-        _fileName(0)
-        , _pageCount(INVALID_PAGE_NO) 
-    { }
-
-    virtual ~PdfEngine() { free((void*)_fileName); }
+    PdfEnginePoppler();
+    ~PdfEnginePoppler();
 
     const char *fileName(void) const { return _fileName; };
 
     void setFileName(const char *fileName) {
         assert(!_fileName);
-        _fileName = (const char*)strdup(fileName);
+        _fileName = (char*)strdup(fileName);
     }
 
     bool validPageNo(int pageNo) const {
@@ -96,32 +57,18 @@ public:
 
     int pageCount(void) const { return _pageCount; }
 
-    virtual bool load(const char *fileName) = 0;
-    virtual int pageRotation(int pageNo) = 0;
-    virtual SizeD pageSize(int pageNo) = 0;
-    virtual RenderedBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
-                         BOOL (*abortCheckCbkA)(void *data),
-                         void *abortCheckCbkDataA) = 0;
-
-protected:
-    const char *_fileName;
-    int _pageCount;
-};
-
-class PdfEnginePoppler : public PdfEngine {
-public:
-    PdfEnginePoppler();
-    virtual ~PdfEnginePoppler();
     virtual bool load(const char *fileName);
     virtual int pageRotation(int pageNo);
     virtual SizeD pageSize(int pageNo);
-    virtual RenderedBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
+    virtual SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
                          BOOL (*abortCheckCbkA)(void *data),
                          void *abortCheckCbkDataA);
 
     PDFDoc* pdfDoc() { return _pdfDoc; }
     SplashOutputDev *   outputDevice();
 private:
+    char *_fileName;
+    int _pageCount;
 
     PDFDoc *            _pdfDoc;
     SplashOutputDev *   _outputDev;
diff --git a/test/perf-test-preview-dummy.cc b/test/perf-test-preview-dummy.cc
old mode 100644
new mode 100755
index 6360486..10c5518
--- a/test/perf-test-preview-dummy.cc
+++ b/test/perf-test-preview-dummy.cc
@@ -6,9 +6,8 @@ Using this perf-test still works for performance testing, you just don't
 get any visual feedback during testing.
 */
 
-#include "perf-test-pdf-engine.h"
 
-void PreviewBitmapSplash(RenderedBitmap *bmpSplash)
+void PreviewBitmapSplash(SplashBitmap *bmpSplash)
 {
 }
 
diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc
old mode 100644
new mode 100755
index fdb11bd..5f3f09b
--- a/test/perf-test-preview-win.cc
+++ b/test/perf-test-preview-win.cc
@@ -3,6 +3,8 @@
 
 /* This is a preview support for perf-test for Windows */
 
+#include <windows.h>
+
 #include "perf-test-pdf-engine.h"
 
 #include <assert.h>
@@ -13,7 +15,7 @@
 static HWND             gHwndSplash;
 static HBRUSH           gBrushBg;
 
-static RenderedBitmap *gBmpSplash;
+static SplashBitmap *gBmpSplash;
 
 int rect_dx(RECT *r)
 {
@@ -29,6 +31,60 @@ int rect_dy(RECT *r)
     return dy;
 }
 
+static HBITMAP createDIBitmapCommon(SplashBitmap *bmp, HDC hdc)
+{
+    int bmpDx = bmp->getWidth();
+    int bmpDy = bmp->getHeight();
+    int bmpRowSize = bmp->getRowSize();
+
+    BITMAPINFOHEADER bmih;
+    bmih.biSize = sizeof(bmih);
+    bmih.biHeight = -bmpDy;
+    bmih.biWidth = bmpDx;
+    bmih.biPlanes = 1;
+    bmih.biBitCount = 24;
+    bmih.biCompression = BI_RGB;
+    bmih.biSizeImage = bmpDy * bmpRowSize;;
+    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
+    bmih.biClrUsed = bmih.biClrImportant = 0;
+
+    unsigned char* bmpData = bmp->getDataPtr();
+    HBITMAP hbmp = ::CreateDIBitmap(hdc, &bmih, CBM_INIT, bmpData, (BITMAPINFO *)&bmih , DIB_RGB_COLORS);
+    return hbmp;
+}
+
+static void stretchDIBitsCommon(SplashBitmap *bmp, HDC hdc, int leftMargin, int topMargin, int pageDx, int pageDy)
+{
+    int bmpDx = bmp->getWidth();
+    int bmpDy = bmp->getHeight();
+    int bmpRowSize = bmp->getRowSize();
+
+    BITMAPINFOHEADER bmih;
+    bmih.biSize = sizeof(bmih);
+    bmih.biHeight = -bmpDy;
+    bmih.biWidth = bmpDx;
+    bmih.biPlanes = 1;
+    // we could create this dibsection in monochrome
+    // if the printer is monochrome, to reduce memory consumption
+    // but splash is currently setup to return a full colour bitmap
+    bmih.biBitCount = 24;
+    bmih.biCompression = BI_RGB;
+    bmih.biSizeImage = bmpDy * bmpRowSize;;
+    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
+    bmih.biClrUsed = bmih.biClrImportant = 0;
+    SplashColorPtr bmpData = bmp->getDataPtr();
+
+    ::StretchDIBits(hdc,
+        // destination rectangle
+        -leftMargin, -topMargin, pageDx, pageDy,
+        // source rectangle
+        0, 0, bmpDx, bmpDy,
+        bmpData,
+        (BITMAPINFO *)&bmih ,
+        DIB_RGB_COLORS,
+        SRCCOPY);
+}
+
 /* Set the client area size of the window 'hwnd' to 'dx'/'dy'. */
 static void resizeClientArea(HWND hwnd, int x, int dx, int dy, int *dx_out)
 {
@@ -46,14 +102,14 @@ static void resizeClientArea(HWND hwnd, int x, int dx, int dy, int *dx_out)
         *dx_out = win_dx;
 }
 
-static void resizeClientAreaToRenderedBitmap(HWND hwnd, RenderedBitmap *bmp, int x, int *dxOut)
+static void resizeClientAreaToRenderedBitmap(HWND hwnd, SplashBitmap *bmp, int x, int *dxOut)
 {
-    int dx = bmp->dx();
-    int dy = bmp->dy();
+    int dx = bmp->getWidth();
+    int dy = bmp->getHeight();
     resizeClientArea(hwnd, x, dx, dy, dxOut);
 }
 
-static void drawBitmap(HWND hwnd, RenderedBitmap *bmp)
+static void drawBitmap(HWND hwnd, SplashBitmap *bmp)
 {
     PAINTSTRUCT     ps;
 
@@ -61,15 +117,15 @@ static void drawBitmap(HWND hwnd, RenderedBitmap *bmp)
     SetBkMode(hdc, TRANSPARENT);
     FillRect(hdc, &ps.rcPaint, gBrushBg);
 
-    HBITMAP hbmp = bmp->createDIBitmap(hdc);
+    HBITMAP hbmp = createDIBitmapCommon(bmp, hdc);
     if (hbmp) {
         HDC bmpDC = CreateCompatibleDC(hdc);
         if (bmpDC) {
             SelectObject(bmpDC, hbmp);
             int xSrc = 0, ySrc = 0;
             int xDest = 0, yDest = 0;
-            int bmpDx = bmp->dx();
-            int bmpDy = bmp->dy();
+            int bmpDx = bmp->getWidth();
+            int bmpDy = bmp->getHeight();
             BitBlt(hdc, xDest, yDest, bmpDx, bmpDy, bmpDC, xSrc, ySrc, SRCCOPY);
             DeleteDC(bmpDC);
             bmpDC = NULL;
@@ -82,9 +138,11 @@ static void drawBitmap(HWND hwnd, RenderedBitmap *bmp)
 
 static void onPaint(HWND hwnd)
 {
-    if (hwnd == gHwndSplash)
-        if (gBmpSplash)
+    if (hwnd == gHwndSplash) {
+        if (gBmpSplash) {
             drawBitmap(hwnd, gBmpSplash);
+        }
+    }
 }
 
 static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
@@ -209,7 +267,7 @@ static void UpdateWindows(void)
     pumpMessages();
 }
 
-void PreviewBitmapSplash(RenderedBitmap *bmpSplash)
+void PreviewBitmapSplash(SplashBitmap *bmpSplash)
 {
     if (!initWinIfNecessary())
         return;
diff --git a/test/perf-test.cc b/test/perf-test.cc
old mode 100644
new mode 100755
index 1f0991a..46a6d6b
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -48,7 +48,7 @@ typedef BOOL int;
 */
 extern void PreviewBitmapInit(void);
 extern void PreviewBitmapDestroy(void);
-extern void PreviewBitmapSplash(RenderedBitmap *bmpSplash);
+extern void PreviewBitmapSplash(SplashBitmap *bmpSplash);
 
 typedef struct StrList {
     struct StrList *next;
@@ -401,103 +401,9 @@ void SplashColorsInit(void)
     splashColorSet(SPLASH_COL_WHITE_PTR, 0xff, 0xff, 0xff, 0);
 }
 
-RenderedBitmapSplash::RenderedBitmapSplash(SplashBitmap *bitmap)
-{
-    _bitmap = bitmap;
-}
-
-RenderedBitmapSplash::~RenderedBitmapSplash() {
-    delete _bitmap;
-}
-
-int RenderedBitmapSplash::dx()
-{ 
-    return _bitmap->getWidth();
-}
-
-int RenderedBitmapSplash::dy()
-{ 
-    return _bitmap->getHeight();
-}
-
-int RenderedBitmapSplash::rowSize() 
-{ 
-    return _bitmap->getRowSize(); 
-}
-    
-unsigned char *RenderedBitmapSplash::data()
-{
-    return _bitmap->getDataPtr();
-}
-
-#ifdef WIN32
-static HBITMAP createDIBitmapCommon(RenderedBitmap *bmp, HDC hdc)
-{
-    int bmpDx = bmp->dx();
-    int bmpDy = bmp->dy();
-    int bmpRowSize = bmp->rowSize();
-
-    BITMAPINFOHEADER bmih;
-    bmih.biSize = sizeof(bmih);
-    bmih.biHeight = -bmpDy;
-    bmih.biWidth = bmpDx;
-    bmih.biPlanes = 1;
-    bmih.biBitCount = 24;
-    bmih.biCompression = BI_RGB;
-    bmih.biSizeImage = bmpDy * bmpRowSize;;
-    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
-    bmih.biClrUsed = bmih.biClrImportant = 0;
-
-    unsigned char* bmpData = bmp->data();
-    HBITMAP hbmp = ::CreateDIBitmap(hdc, &bmih, CBM_INIT, bmpData, (BITMAPINFO *)&bmih , DIB_RGB_COLORS);
-    return hbmp;
-}
-
-static void stretchDIBitsCommon(RenderedBitmap *bmp, HDC hdc, int leftMargin, int topMargin, int pageDx, int pageDy)
-{
-    int bmpDx = bmp->dx();
-    int bmpDy = bmp->dy();
-    int bmpRowSize = bmp->rowSize();
-
-    BITMAPINFOHEADER bmih;
-    bmih.biSize = sizeof(bmih);
-    bmih.biHeight = -bmpDy;
-    bmih.biWidth = bmpDx;
-    bmih.biPlanes = 1;
-    // we could create this dibsection in monochrome
-    // if the printer is monochrome, to reduce memory consumption
-    // but splash is currently setup to return a full colour bitmap
-    bmih.biBitCount = 24;
-    bmih.biCompression = BI_RGB;
-    bmih.biSizeImage = bmpDy * bmpRowSize;;
-    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
-    bmih.biClrUsed = bmih.biClrImportant = 0;
-    SplashColorPtr bmpData = bmp->data();
-
-    ::StretchDIBits(hdc,
-        // destination rectangle
-        -leftMargin, -topMargin, pageDx, pageDy,
-        // source rectangle
-        0, 0, bmpDx, bmpDy,
-        bmpData,
-        (BITMAPINFO *)&bmih ,
-        DIB_RGB_COLORS,
-        SRCCOPY);
-}
-
-HBITMAP RenderedBitmapSplash::createDIBitmap(HDC hdc)
-{
-    return createDIBitmapCommon(this, hdc);
-}
-
-void RenderedBitmapSplash::stretchDIBits(HDC hdc, int leftMargin, int topMargin, int pageDx, int pageDy)
-{
-    stretchDIBitsCommon(this, hdc, leftMargin, topMargin, pageDx, pageDy);
-}
-#endif
-
 PdfEnginePoppler::PdfEnginePoppler() : 
-    PdfEngine()
+   _fileName(0)
+   , _pageCount(INVALID_PAGE_NO) 
    , _pdfDoc(NULL)
    , _outputDev(NULL)
 {
@@ -505,6 +411,7 @@ PdfEnginePoppler::PdfEnginePoppler() :
 
 PdfEnginePoppler::~PdfEnginePoppler()
 {
+    free(_fileName);
     delete _outputDev;
     delete _pdfDoc;
 }
@@ -547,7 +454,7 @@ SplashOutputDev * PdfEnginePoppler::outputDevice() {
     return _outputDev;
 }
 
-RenderedBitmap *PdfEnginePoppler::renderBitmap(
+SplashBitmap *PdfEnginePoppler::renderBitmap(
                            int pageNo, double zoomReal, int rotation,
                            BOOL (*abortCheckCbkA)(void *data),
                            void *abortCheckCbkDataA)
@@ -564,10 +471,7 @@ RenderedBitmap *PdfEnginePoppler::renderBitmap(
         abortCheckCbkA, abortCheckCbkDataA);
 
     SplashBitmap* bmp = _outputDev->takeBitmap();
-    if (bmp)
-        return new RenderedBitmapSplash(bmp);
-
-    return NULL;
+    return bmp;
 }
 
 struct FindFileState {
@@ -1015,7 +919,7 @@ Exit:
 static void RenderPdf(const char *fileName)
 {
     const char *fileNameSplash = NULL;
-    PdfEngine * engineSplash = NULL;
+    PdfEnginePoppler * engineSplash = NULL;
 
     // TODO: fails if file already exists and has read-only attribute
     CopyFile(fileName, POPPLER_TMP_NAME, FALSE);
@@ -1041,7 +945,7 @@ static void RenderPdf(const char *fileName)
         if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
             continue;
 
-        RenderedBitmap *bmpSplash = NULL;
+        SplashBitmap *bmpSplash = NULL;
 
         MsTimer msTimer;
         bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0, NULL, NULL);
@@ -1051,7 +955,7 @@ static void RenderPdf(const char *fileName)
             if (!bmpSplash)
                 LogInfo("page splash %d: failed to render\n", curPage);
             else
-                LogInfo("page splash %d (%dx%d): %.2f ms\n", curPage, bmpSplash->dx(), bmpSplash->dy(), timeInMs);
+                LogInfo("page splash %d (%dx%d): %.2f ms\n", curPage, bmpSplash->getWidth(), bmpSplash->getHeight(), timeInMs);
 
         if (ShowPreview()) {
             PreviewBitmapSplash(bmpSplash);
commit fb5bf808b88992c1772a10e4ed9fe788fb618417
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 03:03:26 2007 -0700

    more msvc build fixes

diff --git a/makefile.vc b/makefile.vc
index 4bbd0ce..d657cbf 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -54,7 +54,7 @@ CFLAGS = $(CFLAGS) /Zi
 # /FAscu - generate assembly listings
 CFLAGS = $(CFLAGS) /FAscu
 
-CFLAGS = $(CFLAGS) /Imsvc /I. /Igoo /Ipoppler /Isplash /Ifofi /Itest
+CFLAGS = $(CFLAGS) /Imsvc /Imsvc/poppler /I. /Igoo /Ipoppler /Isplash /Ifofi /Itest
 
 CFLAGS = $(CFLAGS) /I$(ZLIB_DIR) /I$(JPEG_DIR) /I$(FREETYPE_DIR)\include
 
diff --git a/test/perf-test.cc b/test/perf-test.cc
index d122fb7..1f0991a 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -18,6 +18,10 @@
 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
 #endif
 
+#ifdef WIN32
+#include <windows.h>
+#endif
+
 #include "perf-test-pdf-engine.h"
 
 #include <assert.h>
commit 60829b08a7440f36014f68ec54bee7a742412738
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Fri Sep 21 03:02:34 2007 -0700

    msvc build fixes

diff --git a/msvc/poppler/poppler-config.h b/msvc/poppler/poppler-config.h
new file mode 100755
index 0000000..ed51b52
--- /dev/null
+++ b/msvc/poppler/poppler-config.h
@@ -0,0 +1,143 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
+// Copyright 1996-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef POPPLER_CONFIG_H
+#define POPPLER_CONFIG_H
+
+// We duplicate some of the config.h #define's here since they are
+// used in some of the header files we install.  The #ifndef/#endif
+// around #undef look odd, but it's to silence warnings about
+// redefining those symbols.
+
+/* Full path for the system-wide xpdfrc file. */
+#ifndef SYSTEM_XPDFRC
+/* #undef SYSTEM_XPDFRC */
+#endif
+
+/* Include support for OPI comments. */
+#ifndef OPI_SUPPORT
+#define OPI_SUPPORT 1
+#endif
+
+/* Enable word list support. */
+#ifndef TEXTOUT_WORD_LIST
+#define TEXTOUT_WORD_LIST 1
+#endif
+
+// Also, there's a couple of preprocessor symbols in the header files
+// that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and
+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// xpdf version
+#define xpdfVersion         "3.00"
+#define xpdfVersionNum      3.00
+#define xpdfMajorVersion    3
+#define xpdfMinorVersion    0
+#define xpdfMajorVersionStr "3"
+#define xpdfMinorVersionStr "0"
+
+// supported PDF version
+#define supportedPDFVersionStr "1.5"
+#define supportedPDFVersionNum 1.5
+
+// copyright notice
+#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC"
+
+// Windows resource file stuff
+#define winxpdfVersion "WinXpdf 3.00"
+#define xpdfCopyrightAmp "Copyright 1996-2004 Glyph && Cog, LLC"
+
+//------------------------------------------------------------------------
+// paper size
+//------------------------------------------------------------------------
+
+// default paper size (in points) for PostScript output
+#ifdef A4_PAPER
+#define defPaperWidth  595    // ISO A4 (210x297 mm)
+#define defPaperHeight 842
+#else
+#define defPaperWidth  612    // American letter (8.5x11")
+#define defPaperHeight 792
+#endif
+
+//------------------------------------------------------------------------
+// config file (xpdfrc) path
+//------------------------------------------------------------------------
+
+// user config file name, relative to the user's home directory
+#if defined(VMS) || (defined(WIN32) && !defined(__CYGWIN32__))
+#define xpdfUserConfigFile "xpdfrc"
+#else
+#define xpdfUserConfigFile ".xpdfrc"
+#endif
+
+// system config file name (set via the configure script)
+#ifdef SYSTEM_XPDFRC
+#define xpdfSysConfigFile SYSTEM_XPDFRC
+#else
+// under Windows, we get the directory with the executable and then
+// append this file name
+#define xpdfSysConfigFile "xpdfrc"
+#endif
+
+//------------------------------------------------------------------------
+// X-related constants
+//------------------------------------------------------------------------
+
+// default maximum size of color cube to allocate
+#define defaultRGBCube 5
+
+// number of fonts (combined t1lib, FreeType, X server) to cache
+#define xOutFontCacheSize 64
+
+// number of Type 3 fonts to cache
+#define xOutT3FontCacheSize 8
+
+//------------------------------------------------------------------------
+// popen
+//------------------------------------------------------------------------
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
+#endif
+
+#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(WIN32) || defined(__DJGPP__) || defined(MACOS)
+#define POPEN_READ_MODE "rb"
+#else
+#define POPEN_READ_MODE "r"
+#endif
+
+//------------------------------------------------------------------------
+// Win32 stuff
+//------------------------------------------------------------------------
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#ifndef CDECL
+#define CDECL __cdecl
+#endif
+#else
+#define CDECL
+#endif
+
+//------------------------------------------------------------------------
+// Compiler
+//------------------------------------------------------------------------
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
+	__attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define GCC_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
+
+#endif /* POPPLER_CONFIG_H */
commit 853c22a174bae81139edc9aeded7f26ae2655cef
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 23:21:35 2007 -0700

    add pre-made config.h for msvc build

diff --git a/msvc/config.h b/msvc/config.h
new file mode 100644
index 0000000..5c92cbc
--- /dev/null
+++ b/msvc/config.h
@@ -0,0 +1,62 @@
+/* Use libjpeg instead of builtin jpeg decoder. */
+#define ENABLE_LIBJPEG 1
+
+/* Have FreeType2 include files */
+#define HAVE_FREETYPE_H 1
+
+/* Use splash for rendering. */
+#define HAVE_SPLASH 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Enable multithreading support. */
+#define MULTITHREADED 1
+
+/* Name of package */
+#define PACKAGE "poppler"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "poppler 0.6"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.6"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable word list support. */
+#define TEXTOUT_WORD_LIST 1
+
+/* Throw exceptions to deal with not enough memory and similar problems */
+/* #undef USE_EXCEPTIONS */
+
+/* Version number of package */
+#define VERSION "0.6"
+
+#define snprintf _snprintf
+#define unlink _unlink
+#define fileno _fileno
+#define setmode _setmode
+
commit 31c43b118bd4372134018be6f6693f77d1f6a39b
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 22:10:09 2007 -0700

    remove unused variables

diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
old mode 100644
new mode 100755
index b080244..e1bf537
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -41,17 +41,15 @@ static void cairo_font_face_destroy (void *data)
 CairoFont *CairoFont::create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs) {
   Ref embRef;
   Object refObj, strObj;
-  GooString *tmpFileName, *fileName, *substName,*tmpFileName2;
+  GooString *tmpFileName, *fileName,*tmpFileName2;
   DisplayFontParam *dfp;
   FILE *tmpFile;
-  int c, i, n, code, cmap;
+  int c, i, n;
   GfxFontType fontType;
   char **enc;
   char *name;
   FoFiTrueType *ff;
   FoFiType1C *ff1c;
-  CharCodeToUnicode *ctu;
-  Unicode uBuf[8];
   Ref ref;
   static cairo_user_data_key_t cairo_font_face_key;
   cairo_font_face_t *cairo_font_face;
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
old mode 100644
new mode 100755
index 761ce14..14db0d7
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -589,7 +589,6 @@ typedef unsigned int uint32_t;
 
 static uint32_t luminocity(uint32_t x)
 {
-  int a = (x >> 24) & 0xff;
   int r = (x >> 16) & 0xff;
   int g = (x >>  8) & 0xff;
   int b = (x >>  0) & 0xff;
@@ -776,10 +775,8 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
 				    int width, int height, GBool invert,
 				    GBool inlineImg) {
   unsigned char *buffer;
-  unsigned char *dest;
   cairo_surface_t *image;
   cairo_pattern_t *pattern;
-  int x, y;
   ImageStream *imgStr;
   Guchar *pix;
   cairo_matrix_t matrix;
@@ -873,7 +870,6 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
   }
 
   int yp = height / scaledHeight;
-  int origYp = origHeight / scaledHeight;
   int yq = height % scaledHeight;
   int xp = width / scaledWidth;
   int xq = width % scaledWidth;
@@ -932,7 +928,6 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
     int xt = 0;
     int xSrc = 0;
     int x1 = k1;
-    int y1 = y + x1;
     int n = yStep > 0 ? yStep : 1;
     int origN = n;
 
@@ -1073,8 +1068,6 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
   cairo_surface_t *image;
   cairo_pattern_t *pattern;
   ImageStream *imgStr;
-  GfxRGB rgb;
-  int alpha, i;
   cairo_matrix_t matrix;
   int is_identity_transform;
 
@@ -1154,7 +1147,7 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
   cairo_surface_t *maskImage;
   cairo_pattern_t *maskPattern;
   Guchar *pix;
-  int x, y;
+  int y;
   for (y = 0; y < maskHeight; y++) {
     maskDest = (unsigned char *) (maskBuffer + y * row_stride);
     pix = maskImgStr->getLine();
@@ -1172,8 +1165,6 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
   cairo_surface_t *image;
   cairo_pattern_t *pattern;
   ImageStream *imgStr;
-  GfxRGB rgb;
-  int alpha, i;
   cairo_matrix_t matrix;
   cairo_matrix_t maskMatrix;
   int is_identity_transform;
@@ -1247,8 +1238,7 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   int x, y;
   ImageStream *imgStr;
   Guchar *pix;
-  GfxRGB rgb;
-  int alpha, i;
+  int i;
   cairo_matrix_t matrix;
   int is_identity_transform;
   
diff --git a/splash/SplashFTFontEngine.cc b/splash/SplashFTFontEngine.cc
old mode 100644
new mode 100755
index e84f056..98de374
--- a/splash/SplashFTFontEngine.cc
+++ b/splash/SplashFTFontEngine.cc
@@ -32,9 +32,11 @@ extern "C" int unlink(char *filename);
 
 //------------------------------------------------------------------------
 
+#if 0
 static void fileWrite(void *stream, char *data, int len) {
   fwrite(data, 1, len, (FILE *)stream);
 }
+#endif
 
 //------------------------------------------------------------------------
 // SplashFTFontEngine
commit 01b99f60e36dd955817f23911ef38947360f61f7
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 21:14:17 2007 -0700

    remove unused variables

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
old mode 100644
new mode 100755
index 18bd363..bd24a60
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -1179,7 +1179,6 @@ void GfxIndexedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 }
 
 void GfxIndexedColorSpace::getRGBLine(Guchar *in, unsigned int *out, int length) {
-  GfxColor color2;
   Guchar *line;
   int i, j, n;
 
@@ -3543,11 +3542,8 @@ void GfxImageColorMap::getRGB(Guchar *x, GfxRGB *rgb) {
 }
 
 void GfxImageColorMap::getGrayLine(Guchar *in, Guchar *out, int length) {
-  GfxColor color;
-  double *p;
   int i, j;
-  Guchar *inp, *outp, *tmp_line;
-  GfxColorSpace *base;
+  Guchar *inp, *tmp_line;
 
   switch (colorSpace->getMode()) {
   case csIndexed:
@@ -3576,11 +3572,8 @@ void GfxImageColorMap::getGrayLine(Guchar *in, Guchar *out, int length) {
 }
 
 void GfxImageColorMap::getRGBLine(Guchar *in, unsigned int *out, int length) {
-  GfxColor color;
-  double *p;
   int i, j;
-  Guchar *inp, *outp, *tmp_line;
-  GfxColorSpace *base;
+  Guchar *inp, *tmp_line;
 
   switch (colorSpace->getMode()) {
   case csIndexed:
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
old mode 100644
new mode 100755
index b510648..d8ae539
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -948,18 +948,15 @@ void SplashOutputDev::doUpdateFont(GfxState *state) {
   FoFiTrueType *ff;
   Ref embRef;
   Object refObj, strObj;
-  GooString *fileName, *substName;
+  GooString *fileName;
   char *tmpBuf;
   int tmpBufLen;
   Gushort *codeToGID;
   DisplayFontParam *dfp;
-  CharCodeToUnicode *ctu;
   double *textMat;
-  double m11, m12, m21, m22, w1, w2, fontSize;
+  double m11, m12, m21, m22, fontSize;
   SplashCoord mat[4];
-  char *name;
-  Unicode uBuf[8];
-  int c, substIdx, n, code, cmap;
+  int substIdx, n;
   int faceIndex = 0;
 
   needFontUpdate = gFalse;
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
old mode 100644
new mode 100755
index d02a248..e2aaa43
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -3578,7 +3578,6 @@ void TextSelectionSizer::visitLine (TextLine *line,
 {
   PDFRectangle *rect;
   double x1, y1, x2, y2, margin;
-  int i;
 
   margin = (line->yMax - line->yMin) / 8;
   x1 = line->edge[edge_begin];
@@ -3661,7 +3660,6 @@ void TextSelectionPainter::visitLine (TextLine *line,
 				      PDFRectangle *selection)
 {
   double x1, y1, x2, y2, margin;
-  int i;
   Matrix ctm, ictm;
 
   state->setFillColor(box_color);
@@ -3971,7 +3969,6 @@ GooList *TextPage::getSelectionRegion(PDFRectangle *selection,
 				      SelectionStyle style,
 				      double scale) {
   TextSelectionSizer sizer(this, scale);
-  GooList *region;
 
   visitSelection(&sizer, selection, style);
 
commit 7c406400532d68524a43cf963d894d3c4b269400
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 20:57:44 2007 -0700

    remove unused variables

diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
old mode 100644
new mode 100755
index 8702270..be31bd4
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -560,7 +560,6 @@ int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry)
 GBool NameTree::lookup(GooString *name, Object *obj)
 {
   Entry **entry;
-  char *cname;
 
   entry = (Entry **) bsearch(name, entries,
 			     length, sizeof(Entry *), Entry::cmp);
diff --git a/poppler/Form.cc b/poppler/Form.cc
old mode 100644
new mode 100755
index c01e99a..ffa51b9
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -140,8 +140,6 @@ FormWidgetButton::FormWidgetButton (XRef *xrefA, Object *aobj, unsigned num, Ref
   parent = p;
   type = formButton;
   onStr = NULL;
-  Dict *dict = obj.getDict();
-  Object obj1;
   state = gFalse;
   siblingsID = NULL;
 }
@@ -221,7 +219,6 @@ void FormWidgetButton::loadDefaults ()
           Dict *tmpDict2 = str->getDict();
           Object obj3;
           tmpDict2->lookup("Length", &obj3);
-          int c;
           onStr = new GooString ("D"); 
         }
         obj2.free();
@@ -260,7 +257,6 @@ FormWidgetText::FormWidgetText (XRef *xrefA, Object *aobj, unsigned num, Ref ref
 {
   parent = p;
   type = formText;
-  Dict *dict = aobj->getDict();
 }
 
 void FormWidgetText::loadDefaults ()
@@ -655,7 +651,6 @@ bool FormWidgetSignature::isReadOnly () const
 
 FormField::FormField(XRef* xrefA, Object *aobj, const Ref& aref, Form* aform, FormFieldType ty) 
 {
-  double t;
   xref = xrefA;
   aobj->copy(&obj);
   Dict* dict = obj.getDict();
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
old mode 100644
new mode 100755
index 28f070c..f890fd7
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -1635,7 +1635,7 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
       "Adobe-Korea1-UCS2",
       adobe_korea1_cmaps,
     },
-    0
+    {0, 0, 0, 0}
   };
   Unicode *humap = 0;
   Unicode *vumap = 0;
@@ -1643,7 +1643,6 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
   unsigned long n;
   int i;
   unsigned long code;
-  Unicode uBuf[8];
   int wmode;
   char **cmapName;
   CMap *cMap;
@@ -1782,13 +1781,12 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
   *mapsizep = n;
   if (humap != 0) delete[] humap;
   if (vumap != 0) delete[] vumap;
-end_0:
   return codeToGID;
 }
 
 double GfxCIDFont::getWidth (char* s, int len) {
   int nUsed;
-  double w, h, vx, vy;
+  double w;
   int a, b, m;
 
   CID cid = cMap->getCID(s, len, &nUsed);
diff --git a/poppler/Page.cc b/poppler/Page.cc
old mode 100644
new mode 100755
index c76569c..fb145ef
--- a/poppler/Page.cc
+++ b/poppler/Page.cc
@@ -298,7 +298,6 @@ Page::Page(XRef *xrefA, int numA, Dict *pageDict, PageAttrs *attrsA, Form *form)
   
   return;
 
- err3:
   trans.initNull();
  err2:
   annots.initNull();
@@ -357,6 +356,7 @@ Gfx *Page::createGfx(OutputDev *out, double hDPI, double vDPI,
   makeBox(hDPI, vDPI, rotate, useMediaBox, out->upsideDown(),
 	  sliceX, sliceY, sliceW, sliceH, &box, &crop);
   cropBox = getCropBox();
+  mediaBox = getMediaBox();
 
   if (globalParams->getPrintCommands()) {
     printf("***** MediaBox = ll:%g,%g ur:%g,%g\n",
diff --git a/splash/Splash.cc b/splash/Splash.cc
old mode 100644
new mode 100755
index ecb0881..45eb6fe
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -3011,7 +3011,10 @@ SplashError Splash::composite(SplashBitmap *src, int xSrc, int ySrc,
 void Splash::compositeBackground(SplashColorPtr color) {
   SplashColorPtr p;
   Guchar *q;
-  Guchar alpha, alpha1, c, color0, color1, color2, color3;
+  Guchar alpha, alpha1, c, color0, color1, color2;
+#if SPLASH_CMYK
+  Guchar color3;
+#endif
   int x, y, mask;
 
   switch (bitmap->mode) {
commit 70f23389c97b1870b7311d97322cdd16b580a79d
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 20:23:59 2007 -0700

    don't silence warnings about unused variables/functions to keep programmers honest

diff --git a/configure.ac b/configure.ac
index 4bdce05..9797b8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,7 +300,7 @@ if test "x$GCC" != xyes; then
 fi
 case "$enable_compile_warnings" in
   no)	;;
-  yes)	CXXFLAGS="-Wall -Wno-unused $CXXFLAGS" ;;
+  yes)	CXXFLAGS="-Wall $CXXFLAGS" ;;
   kde)	CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi \
 		-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align \
 		-Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith \
commit cdb6fcf98137473efd993e1374a6f010e9db67db
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Thu Sep 20 20:00:56 2007 -0700

    Remove unused variables

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
old mode 100644
new mode 100755
index 51dd904..d56e50f
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -822,7 +822,7 @@ void Annot::drawText(GooString *text, GooString *da, GfxFontDict *fontDict,
   GooString *tok;
   GfxFont *font;
   double fontSize, fontSize2, border, x, xPrev, y, w, w2, wMax;
-  int tfPos, tmPos, i, j, k, c;
+  int tfPos, tmPos, i, j, k;
 
   //~ if there is no MK entry, this should use the existing content stream,
   //~ and only replace the marked content portion of it
@@ -1152,7 +1152,7 @@ void Annot::drawListBox(GooString **text, GBool *selection,
   GooString *tok;
   GfxFont *font;
   double fontSize, fontSize2, border, x, y, w, wMax;
-  int tfPos, tmPos, i, j, c;
+  int tfPos, tmPos, i, j;
 
   //~ if there is no MK entry, this should use the existing content stream,
   //~ and only replace the marked content portion of it
@@ -1513,7 +1513,6 @@ Annots::Annots(XRef *xref, Catalog *catalog, Object *annotsObj) {
       //this way, it'll be possible for the annot to retrieve the corresponding
       //form widget
       Object obj2;
-      Ref* pref;
       if (annotsObj->arrayGet(i, &obj1)->isDict()) {
         if (annotsObj->arrayGetNF(i, &obj2)->isRef())
           annot = new Annot(xref, acroForm, obj1.getDict(), obj2.getRef(), catalog);
commit 0e76b49ac852a5a7ebae4c1f67b153e0b7c9f905
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Tue Sep 18 01:04:50 2007 -0700

    Explain how to compile on Windows using msvc makefile.

diff --git a/README.windows b/README.windows
new file mode 100644
index 0000000..3cdf0fc
--- /dev/null
+++ b/README.windows
@@ -0,0 +1,63 @@
+Overview.
+---------
+
+There are 2 ways to compile poppler on Windows:
+* using mingw compiler under cygwin
+* using native Visual Studio (msvc) makefile
+
+This document describes the second method.
+
+First, the native msvc makefile is meant as a template, not a final product.
+It only builds statically linked 'perf-test' executable. If you want to
+incorporate poppler into your own program, you can use msvc makefile as an
+example of how to compile poppler code on Windows with msvc.
+
+Poppler depends on 3 libraries that are not easily available on Windows:
+* freetype
+* libjpeg
+* zlib
+
+To make it easy, I've made those dependencies available as pre-compiled
+files. You need to download http://windevlibs.googlecode.com/files/ext.zip
+and unzip under 'ext' directory. Those are header files and static libraries
+for freetype, libjpeg and zlib.
+
+You can use your own static or dll versions of those dependencies (most likely
+that will require tweaking a makefile).
+
+Compilation.
+------------
+
+The msvc makefile is called 'makefile.vc' and you can compile poppler on command
+line with: 'nmake -f makefile.vc TARGET=rel' (or TARGET=dbg).
+
+You need to have nmake in your path. If you have Visual Studio 2005, you can
+setup the environment by executing 
+"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat" batch
+file (assuming standard installation).
+Other versions of Visual Studio have an equivalent of this file - it's just
+named differently.
+
+The build works for me with Visual Studio 2005 SP1 but Visual Studio 2005 and
+(free) Visual Studio 2005 Express should work as well.
+
+Other versions of Visual Studio should work as well (makefile might need to
+be tweaked since some of the linker/compiler flags might have changed).
+
+The result of compilation is a 'perftest.exe' in either 'rel' or 'dbg' directory.
+
+It's a command line application that shows the basics of using poppler API and
+is meant for regression and performance testing. You can use it like this:
+perftest -slowpreview file.pdf
+For more advanced usage, use --help option or consult the sources.
+
+When you have problems.
+-----------------------
+
+I would like to be able to say "post to a mailing list and you'll get help"
+but realistically, you're on your own.
+
+If there are problems, they're most likely due to different/incorrect setup
+on your machine and not in poppler code. This is a slightly advanced setup
+and you're expected to be able to understand errors from your compiler or
+linker and correct them.
commit c002b4dc75b2688ffe8a734cf3e15f5891797842
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Tue Sep 18 00:04:47 2007 -0700

    Add Windows/msvc makefile.
    
    Add native msvc windows makefile and pre-made
    config.h for windows in msvc directory.

diff --git a/makefile.vc b/makefile.vc
new file mode 100644
index 0000000..4bbd0ce
--- /dev/null
+++ b/makefile.vc
@@ -0,0 +1,149 @@
+# Makefile for Visual Studio
+# Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info)
+# This code is in public domain.
+CC = cl.exe
+LD = link.exe
+
+ZLIB_DIR=ext\zlib
+FREETYPE_DIR=ext\freetype231
+JPEG_DIR=ext\jpeg
+
+VALID_TARGET=no
+!if "$(TARGET)"=="rel"
+OUTDIR=rel
+#/Gy - separate functions for linker. Generates smaller code.
+#/GL - enables link-time code generation. Requires /LTCG in linker.
+#      generates smaller and faster code
+CFLAGS = $(CFLAGS) /D "NDEBUG" /D "_SECURE_CSL=0" /MD /Ox /Os /Gy /GL
+# /Gr - __fastcall calling convention. Generates smaller and faster code.
+#CFLAGS = $(CFLAGS) /Gr
+# /Oy - omits frame pointers. Should generate smaller code but I'm not seeing that,
+#       so I'm not enabling this function.
+#CFLAGS = $(CFLAGS) /Oy
+VALID_TARGET=yes
+!endif
+
+!if "$(TARGET)"=="dbg"
+OUTDIR=dbg
+CFLAGS = $(CFLAGS) /D "_DEBUG" /MDd /Od
+VALID_TARGET=yes
+!endif
+
+!if "$(ANALYZE)"=="yes"
+CFLAGS = $(CFLAGS) /analyze
+!endif
+
+O=$(OUTDIR)
+
+CFLAGS = $(CFLAGS) /nologo /c
+# standard windows defines
+CFLAGS = $(CFLAGS) /D "WIN32" /D "WINDOWS" /D "_WIN32_WINNT=0x0500"
+#CFLAGS = $(CFLAGS) /D "WIN32_LEAN_AND_MEAN"
+#CFLAGS = $(CFLAGS) /D "UNICODE" /D "_UNICODE"
+#CFLAGS = $(CFLAGS) /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE"
+CFLAGS = $(CFLAGS) /D "_CRT_SECURE_NO_WARNINGS"
+#CFLAGS = $(CFLAGS) /D "_DLL"
+
+#CFLAGS = $(CFLAGS) /wd4996
+
+CFLAGS = $(CFLAGS) /W3
+#CFLAGS = $(CFLAGS) /Wall
+# /GR- : disable C++ RTTI
+CFLAGS = $(CFLAGS) /GR-
+CFLAGS = $(CFLAGS) /Zi
+# /FAscu - generate assembly listings
+CFLAGS = $(CFLAGS) /FAscu
+
+CFLAGS = $(CFLAGS) /Imsvc /I. /Igoo /Ipoppler /Isplash /Ifofi /Itest
+
+CFLAGS = $(CFLAGS) /I$(ZLIB_DIR) /I$(JPEG_DIR) /I$(FREETYPE_DIR)\include
+
+LIBS = $(LIBS) kernel32.lib advapi32.lib user32.lib gdi32.lib
+
+LDFLAGS = $(LDFLAGS) /nologo /DEBUG
+
+#CFLAGS = $(CFLAGS) /D "USE_FIXEDPOINT"
+
+!if "$(TARGET)"=="rel"
+# /opt:ref - removes unused functions
+# /opt:icf - removes duplicate functions
+# /ltcg - link-time code generation. Generates smaller and faster code. Requires /GL when compiling.
+LDFLAGS = $(LDFLAGS) /opt:ref /opt:icf /opt:nowin98 /ltcg
+LIBS = $(LIBS) $(ZLIB_DIR)\zlib_s.lib $(JPEG_DIR)\jpeg_s.lib $(FREETYPE_DIR)\freetype231mt.lib
+!else
+LIBS = $(LIBS) $(ZLIB_DIR)\zlib_sd.lib $(JPEG_DIR)\jpeg_sd.lib $(FREETYPE_DIR)\freetype231mt_d.lib
+!endif
+
+FOFI_OBJS=$(O)\FoFiBase.obj $(O)\FoFiEncodings.obj $(O)\FoFiTrueType.obj \
+	$(O)\FoFiType1.obj $(O)\FoFiType1C.obj
+
+GOO_OBJS=$(O)\FixedPoint.obj $(O)\GooHash.obj $(O)\GooList.obj $(O)\GooString.obj \
+	$(O)\GooTimer.obj $(O)\gfile.obj $(O)\gmem.obj $(O)\gmempp.obj
+
+POPPLER_OBJS=$(O)\Annot.obj $(O)\Array.obj $(O)\BuiltinFont.obj $(O)\BuiltinFontTables.obj \
+	$(O)\CMap.obj $(O)\Catalog.obj $(O)\CharCodeToUnicode.obj $(O)\DCTStream.obj \
+	$(O)\Decrypt.obj $(O)\Dict.obj \
+	$(O)\FontEncodingTables.obj $(O)\FontInfo.obj $(O)\Form.obj $(O)\Function.obj \
+	$(O)\Gfx.obj $(O)\GfxFont.obj $(O)\GfxState.obj $(O)\GlobalParams.obj \
+	$(O)\GlobalParamsWin.obj \
+	$(O)\JArithmeticDecoder.obj $(O)\JBIG2Stream.obj $(O)\JPXStream.obj \
+	$(O)\Lexer.obj $(O)\Link.obj $(O)\NameToCharCode.obj $(O)\Object.obj \
+	$(O)\Outline.obj $(O)\OutputDev.obj $(O)\PDFDoc.obj $(O)\PDFDocEncoding.obj \
+	$(O)\Page.obj $(O)\PageLabelInfo.obj $(O)\PageTransition.obj $(O)\Parser.obj \
+	$(O)\PreScanOutputDev.obj $(O)\ProfileData.obj $(O)\PSTokenizer.obj \
+	$(O)\SecurityHandler.obj $(O)\Sound.obj $(O)\SplashOutputDev.obj \
+	$(O)\Stream.obj $(O)\TextOutputDev.obj $(O)\UnicodeMap.obj \
+	$(O)\UnicodeTypeTable.obj $(O)\XRef.obj
+
+#$(O)\Error.obj \
+# $(O)\FlateStream.obj 
+
+SPLASH_OBJS=$(O)\Splash.obj $(O)\SplashBitmap.obj $(O)\SplashClip.obj \
+	$(O)\SplashFTFont.obj $(O)\SplashFTFontEngine.obj $(O)\SplashFTFontFile.obj \
+	$(O)\SplashFont.obj $(O)\SplashFontEngine.obj $(O)\SplashFontFile.obj \
+	$(O)\SplashFontFileID.obj $(O)\SplashPath.obj $(O)\SplashPattern.obj \
+	$(O)\SplashScreen.obj $(O)\SplashState.obj $(O)\SplashT1Font.obj \
+	$(O)\SplashT1FontEngine.obj $(O)\SplashT1FontFile.obj \
+	$(O)\SplashXPath.obj $(O)\SplashXPathScanner.obj
+
+OBJS = $(GOO_OBJS) $(POPPLER_OBJS) $(SPLASH_OBJS) $(FOFI_OBJS) 
+
+PERFTEST_EXE=$(O)\perftest.exe
+PERFTEST_PDB=$(O)\perftest.pdb
+PERFTEST_OBJS=$(OBJS) $(O)\perf-test.obj $(O)\perf-test-preview-win.obj
+
+!if "$(VALID_TARGET)"=="yes"
+all: $(OUTDIR) $(PERFTEST_EXE)
+
+$(OUTDIR): force
+	@if not exist $(OUTDIR) mkdir $(OUTDIR)
+clean: force
+	-rmdir /S /Q $(OUTDIR)
+rebuild: clean all
+!else
+all clean: force
+	@echo TARGET must be set to dbg or rel
+!endif
+
+$(PERFTEST_EXE): $(PERFTEST_OBJS)
+	$(LD) $(LDFLAGS) /OUT:$@ \
+	/PDB:$(PERFTEST_PDB) \
+	$** $(LIBS) \
+	/SUBSYSTEM:CONSOLE /MACHINE:X86
+
+{fofi\}.cc{$(OUTDIR)}.obj::
+	$(CC) $(CFLAGS) -Fo$(OUTDIR)\ /Fd$(OUTDIR)\vc80.pdb /Fa$(OUTDIR)\ $<
+
+{goo\}.cc{$(OUTDIR)}.obj::
+	$(CC) $(CFLAGS) -Fo$(OUTDIR)\ /Fd$(OUTDIR)\vc80.pdb /Fa$(OUTDIR)\ $<
+
+{poppler\}.cc{$(OUTDIR)}.obj::
+	$(CC) $(CFLAGS) -Fo$(OUTDIR)\ /Fd$(OUTDIR)\vc80.pdb /Fa$(OUTDIR)\ $<
+
+{splash\}.cc{$(OUTDIR)}.obj::
+	$(CC) $(CFLAGS) -Fo$(OUTDIR)\ /Fd$(OUTDIR)\vc80.pdb /Fa$(OUTDIR)\ $<
+
+{test\}.cc{$(OUTDIR)}.obj::
+	$(CC) $(CFLAGS) -Fo$(OUTDIR)\ /Fd$(OUTDIR)\vc80.pdb /Fa$(OUTDIR)\ $<
+
+force: ;
commit 1f33fc58201c92120c587189d2e0e819f83167da
Author: Krzysztof Kowalczyk <kkowalczyk at tlapx60ubu.(none)>
Date:   Mon Sep 17 23:53:02 2007 -0700

    Start on a test program.
    
    Test program can be used for regression testing and
    performance testing. It renders a page (or pages)
    in a given PDF (or PDFs) and records rendering times.
    For historical reasons the code is ugly and probably
    only compiles on windows, but it'll get better.

diff --git a/test/perf-test-pdf-engine.h b/test/perf-test-pdf-engine.h
new file mode 100644
index 0000000..d000226
--- /dev/null
+++ b/test/perf-test-pdf-engine.h
@@ -0,0 +1,131 @@
+#ifndef PDF_TEST_PDF_ENGINE_H_
+#define PDF_TEST_PDF_ENGINE_H_
+
+#include "ErrorCodes.h"
+#include "GooString.h"
+#include "GooList.h"
+#include "GlobalParams.h"
+#include "SplashBitmap.h"
+#include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
+#include "SplashOutputDev.h"
+#include "TextOutputDev.h"
+#include "PDFDoc.h"
+#include "SecurityHandler.h"
+#include "Link.h"
+
+#define INVALID_PAGE_NO     -1
+
+#ifdef _MSC_VER
+#define strdup _strdup
+#endif
+
+#define dimof(X)    (sizeof(X)/sizeof((X)[0]))
+
+class SizeD {
+public:
+    SizeD(double dx, double dy) { m_dx = dx; m_dy = dy; }
+    SizeD(int dx, int dy) { m_dx = (double)dx; m_dy = (double)dy; }
+    SizeD() { m_dx = 0; m_dy = 0; }
+    int dxI() { return (int)m_dx; }
+    int dyI() { return (int)m_dy; }
+    double dx() { return m_dx; }
+    double dy() { return m_dy; }
+    void setDx(double dx) { m_dx = dx; }
+    void setDy(double dy) { m_dy = dy; }
+private:
+    double m_dx;
+    double m_dy;
+};
+
+/* Abstract class representing cached bitmap. Allows different implementations
+   on different platforms. */
+class RenderedBitmap {
+public:
+    virtual ~RenderedBitmap() {};
+    virtual int dx() = 0;
+    virtual int dy() = 0;
+    virtual int rowSize() = 0;
+    virtual unsigned char *data() = 0;
+
+#ifdef WIN32
+    // TODO: this is for WINDOWS only
+    virtual HBITMAP createDIBitmap(HDC) = 0;
+    virtual void stretchDIBits(HDC, int, int, int, int) = 0;
+#endif
+};
+
+class RenderedBitmapSplash : public RenderedBitmap {
+public:
+    RenderedBitmapSplash(SplashBitmap *);
+    virtual ~RenderedBitmapSplash();
+
+    virtual int dx();
+    virtual int dy();
+    virtual int rowSize();
+    virtual unsigned char *data();
+
+#ifdef WIN32
+    virtual HBITMAP createDIBitmap(HDC);
+    virtual void stretchDIBits(HDC, int, int, int, int);
+#endif
+protected:
+    SplashBitmap *_bitmap;
+};
+
+class PdfEngine {
+public:
+    PdfEngine() : 
+        _fileName(0)
+        , _pageCount(INVALID_PAGE_NO) 
+    { }
+
+    virtual ~PdfEngine() { free((void*)_fileName); }
+
+    const char *fileName(void) const { return _fileName; };
+
+    void setFileName(const char *fileName) {
+        assert(!_fileName);
+        _fileName = (const char*)strdup(fileName);
+    }
+
+    bool validPageNo(int pageNo) const {
+        if ((pageNo >= 1) && (pageNo <= pageCount()))
+            return true;
+        return false;
+    }
+
+    int pageCount(void) const { return _pageCount; }
+
+    virtual bool load(const char *fileName) = 0;
+    virtual int pageRotation(int pageNo) = 0;
+    virtual SizeD pageSize(int pageNo) = 0;
+    virtual RenderedBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
+                         BOOL (*abortCheckCbkA)(void *data),
+                         void *abortCheckCbkDataA) = 0;
+
+protected:
+    const char *_fileName;
+    int _pageCount;
+};
+
+class PdfEnginePoppler : public PdfEngine {
+public:
+    PdfEnginePoppler();
+    virtual ~PdfEnginePoppler();
+    virtual bool load(const char *fileName);
+    virtual int pageRotation(int pageNo);
+    virtual SizeD pageSize(int pageNo);
+    virtual RenderedBitmap *renderBitmap(int pageNo, double zoomReal, int rotation,
+                         BOOL (*abortCheckCbkA)(void *data),
+                         void *abortCheckCbkDataA);
+
+    PDFDoc* pdfDoc() { return _pdfDoc; }
+    SplashOutputDev *   outputDevice();
+private:
+
+    PDFDoc *            _pdfDoc;
+    SplashOutputDev *   _outputDev;
+};
+
+
+#endif
diff --git a/test/perf-test-preview-dummy.cc b/test/perf-test-preview-dummy.cc
new file mode 100644
index 0000000..6360486
--- /dev/null
+++ b/test/perf-test-preview-dummy.cc
@@ -0,0 +1,22 @@
+/* Copyright Krzysztof Kowalczyk 2006-2007
+   License: GPLv2 */
+
+/* This is a no-op preview support for perf-test.
+Using this perf-test still works for performance testing, you just don't
+get any visual feedback during testing.
+*/
+
+#include "perf-test-pdf-engine.h"
+
+void PreviewBitmapSplash(RenderedBitmap *bmpSplash)
+{
+}
+
+void PreviewBitmapDestroy(void)
+{
+}
+
+void PreviewBitmapInit(void)
+{
+}
+
diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc
new file mode 100644
index 0000000..fdb11bd
--- /dev/null
+++ b/test/perf-test-preview-win.cc
@@ -0,0 +1,222 @@
+/* Copyright Krzysztof Kowalczyk 2006-2007
+   License: GPLv2 */
+
+/* This is a preview support for perf-test for Windows */
+
+#include "perf-test-pdf-engine.h"
+
+#include <assert.h>
+
+#define WIN_CLASS_NAME  "PDFTEST_PDF_WIN"
+#define COL_WINDOW_BG RGB(0xff, 0xff, 0xff)
+
+static HWND             gHwndSplash;
+static HBRUSH           gBrushBg;
+
+static RenderedBitmap *gBmpSplash;
+
+int rect_dx(RECT *r)
+{
+    int dx = r->right - r->left;
+    assert(dx >= 0);
+    return dx;
+}
+
+int rect_dy(RECT *r)
+{
+    int dy = r->bottom - r->top;
+    assert(dy >= 0);
+    return dy;
+}
+
+/* Set the client area size of the window 'hwnd' to 'dx'/'dy'. */
+static void resizeClientArea(HWND hwnd, int x, int dx, int dy, int *dx_out)
+{
+    RECT rc;
+    GetClientRect(hwnd, &rc);
+    if ((rect_dx(&rc) == dx) && (rect_dy(&rc) == dy))
+        return;
+
+    RECT rw;
+    GetWindowRect(hwnd, &rw);
+    int win_dx = rect_dx(&rw) + (dx - rect_dx(&rc));
+    int win_dy = rect_dy(&rw) + (dy - rect_dy(&rc));
+    SetWindowPos(hwnd, NULL, x, 0, win_dx, win_dy, SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOZORDER);
+    if (dx_out)
+        *dx_out = win_dx;
+}
+
+static void resizeClientAreaToRenderedBitmap(HWND hwnd, RenderedBitmap *bmp, int x, int *dxOut)
+{
+    int dx = bmp->dx();
+    int dy = bmp->dy();
+    resizeClientArea(hwnd, x, dx, dy, dxOut);
+}
+
+static void drawBitmap(HWND hwnd, RenderedBitmap *bmp)
+{
+    PAINTSTRUCT     ps;
+
+    HDC hdc = BeginPaint(hwnd, &ps);
+    SetBkMode(hdc, TRANSPARENT);
+    FillRect(hdc, &ps.rcPaint, gBrushBg);
+
+    HBITMAP hbmp = bmp->createDIBitmap(hdc);
+    if (hbmp) {
+        HDC bmpDC = CreateCompatibleDC(hdc);
+        if (bmpDC) {
+            SelectObject(bmpDC, hbmp);
+            int xSrc = 0, ySrc = 0;
+            int xDest = 0, yDest = 0;
+            int bmpDx = bmp->dx();
+            int bmpDy = bmp->dy();
+            BitBlt(hdc, xDest, yDest, bmpDx, bmpDy, bmpDC, xSrc, ySrc, SRCCOPY);
+            DeleteDC(bmpDC);
+            bmpDC = NULL;
+        }
+        DeleteObject(hbmp);
+        hbmp = NULL;
+    }
+    EndPaint(hwnd, &ps);
+}
+
+static void onPaint(HWND hwnd)
+{
+    if (hwnd == gHwndSplash)
+        if (gBmpSplash)
+            drawBitmap(hwnd, gBmpSplash);
+}
+
+static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    switch (message)
+    {
+        case WM_CREATE:
+            // do nothing
+            break;
+
+        case WM_ERASEBKGND:
+            return TRUE;
+
+        case WM_PAINT:
+            /* it might happen that we get WM_PAINT after destroying a window */
+            onPaint(hwnd);
+            break;
+
+        case WM_DESTROY:
+            /* WM_DESTROY might be sent as a result of File\Close, in which case CloseWindow() has already been called */
+            break;
+
+        default:
+            return DefWindowProc(hwnd, message, wParam, lParam);
+    }
+    return 0;
+}
+
+static BOOL registerWinClass(void)
+{
+    WNDCLASSEX  wcex;
+    ATOM        atom;
+
+    wcex.cbSize = sizeof(WNDCLASSEX);
+
+    wcex.style          = CS_HREDRAW | CS_VREDRAW;
+    wcex.lpfnWndProc    = WndProc;
+    wcex.cbClsExtra     = 0;
+    wcex.cbWndExtra     = 0;
+    wcex.hInstance      = NULL;
+    wcex.hIcon          = NULL;
+    wcex.hCursor        = LoadCursor(NULL, IDC_ARROW);
+    wcex.hbrBackground  = NULL;
+    wcex.lpszMenuName   = NULL;
+    wcex.lpszClassName  = WIN_CLASS_NAME;
+    wcex.hIconSm        = NULL;
+
+    atom = RegisterClassEx(&wcex);
+    if (atom)
+        return TRUE;
+    return FALSE;
+}
+
+static bool initWinIfNecessary(void)
+{
+    if (gHwndSplash)
+        return true;
+
+    if (!registerWinClass())
+        return false;
+
+    gBrushBg = CreateSolidBrush(COL_WINDOW_BG);
+
+    gHwndSplash = CreateWindow(
+        WIN_CLASS_NAME, "Splash",
+        WS_OVERLAPPEDWINDOW,
+        CW_USEDEFAULT, 0,
+        CW_USEDEFAULT, 0,
+        NULL, NULL,
+        NULL, NULL);
+
+    if (!gHwndSplash)
+        return false;
+
+    ShowWindow(gHwndSplash, SW_HIDE);
+    return true;
+}
+
+static void pumpMessages(void)
+{
+    BOOL    isMessage;
+    MSG     msg;
+
+    for (;;) {
+        isMessage = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
+        if (!isMessage)
+            return;
+        TranslateMessage(&msg);
+        DispatchMessage(&msg);
+    }
+}
+
+void PreviewBitmapInit(void)
+{
+    /* no need to do anything */
+}
+
+static void deleteRenderedBitmaps()
+{
+    delete gBmpSplash;
+}
+
+void PreviewBitmapDestroy(void)
+{
+    PostQuitMessage(0);
+    pumpMessages();
+    deleteRenderedBitmaps();
+    DeleteObject(gBrushBg);
+}
+
+static void UpdateWindows(void)
+{
+    if (gBmpSplash) {
+        resizeClientAreaToRenderedBitmap(gHwndSplash, gBmpSplash, 0, NULL);
+        ShowWindow(gHwndSplash, SW_SHOW);
+        InvalidateRect(gHwndSplash, NULL, FALSE);
+        UpdateWindow(gHwndSplash);
+    } else {
+        ShowWindow(gHwndSplash, SW_HIDE);
+    }
+
+    pumpMessages();
+}
+
+void PreviewBitmapSplash(RenderedBitmap *bmpSplash)
+{
+    if (!initWinIfNecessary())
+        return;
+
+    deleteRenderedBitmaps();
+    gBmpSplash = bmpSplash;
+    UpdateWindows();
+}
+
+
diff --git a/test/perf-test.cc b/test/perf-test.cc
new file mode 100644
index 0000000..d122fb7
--- /dev/null
+++ b/test/perf-test.cc
@@ -0,0 +1,1428 @@
+/* Copyright Krzysztof Kowalczyk 2006-2007
+   License: GPLv2 */
+/*
+  A tool to stress-test poppler rendering and measure rendering times for
+  very simplistic performance measuring.
+
+  TODO:
+   * print more info about document like e.g. enumarate images,
+     streams, compression, encryption, password-protection. Each should have
+     a command-line arguments to turn it on/off
+   * never over-write file given as -out argument (optionally, provide -force
+     option to force writing the -out file). It's way too easy too lose results
+     of a previous run.
+*/
+
+#ifdef _MSC_VER
+// this sucks but I don't know any other way
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+
+#include "perf-test-pdf-engine.h"
+
+#include <assert.h>
+#include <config.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#ifndef _MSC_VER
+typedef BOOL int;
+#endif
+
+/* Those must be implemented in order to provide preview during execution.
+   They can be no-ops. An implementation for windows is in
+   perf-test-preview-win.cc
+*/
+extern void PreviewBitmapInit(void);
+extern void PreviewBitmapDestroy(void);
+extern void PreviewBitmapSplash(RenderedBitmap *bmpSplash);
+
+typedef struct StrList {
+    struct StrList *next;
+    char *          str;
+} StrList;
+
+/* List of all command-line arguments that are not switches.
+   We assume those are:
+     - names of PDF files
+     - names of a file with a list of PDF files
+     - names of directories with PDF files
+*/
+static StrList *gArgsListRoot = NULL;
+
+/* Names of all command-line switches we recognize */
+#define TIMINGS_ARG         "-timings"
+#define RESOLUTION_ARG      "-resolution"
+#define RECURSIVE_ARG       "-recursive"
+#define OUT_ARG             "-out"
+#define PREVIEW_ARG         "-preview"
+#define SLOW_PREVIEW_ARG    "-slowpreview"
+#define LOAD_ONLY_ARG       "-loadonly"
+#define PAGE_ARG            "-page"
+#define TEXT_ARG            "-text"
+
+/* Should we record timings? True if -timings command-line argument was given. */
+static BOOL gfTimings = FALSE;
+
+/* If true, we use render each page at resolution 'gResolutionX'/'gResolutionY'.
+   If false, we render each page at its native resolution.
+   True if -resolution NxM command-line argument was given. */
+static BOOL gfForceResolution = FALSE;
+static int  gResolutionX = 0;
+static int  gResolutionY = 0;
+/* If NULL, we output the log info to stdout. If not NULL, should be a name
+   of the file to which we output log info.
+   Controled by -out command-line argument. */
+static char *   gOutFileName = NULL;
+/* FILE * correspondig to gOutFileName or stdout if gOutFileName is NULL or
+   was invalid name */
+static FILE *   gOutFile = NULL;
+/* FILE * correspondig to gOutFileName or stderr if gOutFileName is NULL or
+   was invalid name */
+static FILE *   gErrFile = NULL;
+
+/* If True and a directory is given as a command-line argument, we'll process
+   pdf files in sub-directories as well.
+   Controlled by -recursive command-line argument */
+static BOOL gfRecursive = FALSE;
+
+/* If true, preview rendered image. To make sure that they're being rendered correctly. */
+static BOOL gfPreview = FALSE;
+
+/* 1 second (1000 milliseconds) */
+#define SLOW_PREVIEW_TIME 1000
+
+/* If true, preview rendered image in a slow mode i.e. delay displaying for
+   SLOW_PREVIEW_TIME. This is so that a human has enough time to see if the
+   PDF renders ok. In release mode on fast processor pages take only ~100-200 ms
+   to render and they go away too quickly to be inspected by a human. */
+static int gfSlowPreview = FALSE;
+
+/* If true, we only dump the text, not render */
+static int gfTextOnly = FALSE;
+
+#define PAGE_NO_NOT_GIVEN -1
+
+/* If equals PAGE_NO_NOT_GIVEN, we're in default mode where we render all pages.
+   If different, will only render this page */
+static int  gPageNo = PAGE_NO_NOT_GIVEN;
+/* If true, will only load the file, not render any pages. Mostly for
+   profiling load time */
+static BOOL gfLoadOnly = FALSE;
+
+#define PDF_FILE_DPI 72
+
+#define MAX_FILENAME_SIZE 1024
+
+/* DOS is 0xd 0xa */
+#define DOS_NEWLINE "\x0d\x0a"
+/* Mac is single 0xd */
+#define MAC_NEWLINE "\x0d"
+/* Unix is single 0xa (10) */
+#define UNIX_NEWLINE "\x0a"
+#define UNIX_NEWLINE_C 0xa
+
+#ifdef _WIN32
+  #define DIR_SEP_CHAR '\\'
+  #define DIR_SEP_STR  "\\"
+#else
+  #define DIR_SEP_CHAR '/'
+  #define DIR_SEP_STR  "/"
+#endif
+
+void memzero(void *data, size_t len)
+{
+    memset(data, 0, len);
+}
+
+void *zmalloc(size_t len)
+{
+    void *data = malloc(len);
+    if (data)
+        memzero(data, len);
+    return data;
+}
+
+/* Concatenate 4 strings. Any string can be NULL.
+   Caller needs to free() memory. */
+char *str_cat4(const char *str1, const char *str2, const char *str3, const char *str4)
+{
+    char *str;
+    char *tmp;
+    size_t str1_len = 0;
+    size_t str2_len = 0;
+    size_t str3_len = 0;
+    size_t str4_len = 0;
+
+    if (str1)
+        str1_len = strlen(str1);
+    if (str2)
+        str2_len = strlen(str2);
+    if (str3)
+        str3_len = strlen(str3);
+    if (str4)
+        str4_len = strlen(str4);
+
+    str = (char*)zmalloc(str1_len + str2_len + str3_len + str4_len + 1);
+    if (!str)
+        return NULL;
+
+    tmp = str;
+    if (str1) {
+        memcpy(tmp, str1, str1_len);
+        tmp += str1_len;
+    }
+    if (str2) {
+        memcpy(tmp, str2, str2_len);
+        tmp += str2_len;
+    }
+    if (str3) {
+        memcpy(tmp, str3, str3_len);
+        tmp += str3_len;
+    }
+    if (str4) {
+        memcpy(tmp, str4, str1_len);
+    }
+    return str;
+}
+
+char *str_dup(const char *str)
+{
+    return str_cat4(str, NULL, NULL, NULL);
+}
+
+int str_eq(const char *str1, const char *str2)
+{
+    if (!str1 && !str2)
+        return TRUE;
+    if (!str1 || !str2)
+        return FALSE;
+    if (0 == strcmp(str1, str2))
+        return TRUE;
+    return FALSE;
+}
+
+int str_ieq(const char *str1, const char *str2)
+{
+    if (!str1 && !str2)
+        return TRUE;
+    if (!str1 || !str2)
+        return FALSE;
+    if (0 == _stricmp(str1, str2))
+        return TRUE;
+    return FALSE;
+}
+
+int str_endswith(const char *txt, const char *end)
+{
+    size_t end_len;
+    size_t txt_len;
+
+    if (!txt || !end)
+        return FALSE;
+
+    txt_len = strlen(txt);
+    end_len = strlen(end);
+    if (end_len > txt_len)
+        return FALSE;
+    if (str_eq(txt+txt_len-end_len, end))
+        return TRUE;
+    return FALSE;
+}
+
+/* TODO: probably should move to some other file and change name to
+   sleep_milliseconds */
+void sleep_milliseconds(int milliseconds)
+{
+#ifdef WIN32
+    Sleep((DWORD)milliseconds);
+#else
+    struct timespec tv;
+    int             secs, nanosecs;
+    secs = milliseconds / 1000;
+    nanosecs = (milliseconds - (secs * 1000)) * 1000;
+    tv.tv_sec = (time_t) secs;
+    tv.tv_nsec = (long) nanosecs;
+    while (1)
+    {
+        int rval = nanosleep(&tv, &tv);
+        if (rval == 0)
+            /* Completed the entire sleep time; all done. */
+            return;
+        else if (errno == EINTR)
+            /* Interrupted by a signal. Try again. */
+            continue;
+        else
+            /* Some other error; bail out. */
+            return;
+    }
+    return;
+#endif
+}
+
+/* milli-second timer */
+typedef struct ms_timer {
+#ifdef _WIN32
+    LARGE_INTEGER   start;
+    LARGE_INTEGER   end;
+#else
+    struct timeval  start;
+    struct timeval  end;
+#endif
+} ms_timer;
+
+#ifdef _WIN32
+void ms_timer_start(ms_timer *timer)
+{
+    assert(timer);
+    if (!timer)
+        return;
+    QueryPerformanceCounter(&timer->start);
+}
+void ms_timer_stop(ms_timer *timer)
+{
+    assert(timer);
+    if (!timer)
+        return;
+    QueryPerformanceCounter(&timer->end);
+}
+
+double ms_timer_time_in_ms(ms_timer *timer)
+{
+    LARGE_INTEGER   freq;
+    double          time_in_secs;
+    QueryPerformanceFrequency(&freq);
+    time_in_secs = (double)(timer->end.QuadPart-timer->start.QuadPart)/(double)freq.QuadPart;
+    return time_in_secs * 1000.0;
+}
+#else
+void ms_timer_start(ms_timer *timer)
+{
+    assert(timer);
+    if (!timer)
+        return;
+    gettimeofday(&timer->start, NULL);
+}
+
+void ms_timer_stop(ms_timer *timer)
+{
+    assert(timer);
+    if (!timer)
+        return;
+    gettimeofday(&timer->end, NULL);
+}
+
+double ms_timer_time_in_ms(ms_timer *timer)
+{
+    double timeInMs;
+    time_t seconds;
+    int    usecs;
+
+    assert(timer);
+    if (!timer)
+        return 0.0;
+    /* TODO: this logic needs to be verified */
+    seconds = timer->end.tv_sec - timer->start.tv_sec;
+    usecs = timer->end.tv_usec - timer->start.tv_usec;
+    if (usecs < 0) {
+        --seconds;
+        usecs += 1000000;
+    }
+    timeInMs = (double)seconds*(double)1000.0 + (double)usecs/(double)1000.0;
+    return timeInMs;
+}
+#endif
+
+class MsTimer {
+public:
+    MsTimer() { ms_timer_start(&timer); }
+    void start(void) { ms_timer_start(&timer); }
+    void stop(void) { ms_timer_stop(&timer); }
+    double timeInMs(void) { return ms_timer_time_in_ms(&timer); }
+private:
+    ms_timer timer;
+};
+
+static SplashColorMode gSplashColorMode = splashModeBGR8;
+
+static SplashColor splashColRed;
+static SplashColor splashColGreen;
+static SplashColor splashColBlue;
+static SplashColor splashColWhite;
+static SplashColor splashColBlack;
+
+#define SPLASH_COL_RED_PTR (SplashColorPtr)&(splashColRed[0])
+#define SPLASH_COL_GREEN_PTR (SplashColorPtr)&(splashColGreen[0])
+#define SPLASH_COL_BLUE_PTR (SplashColorPtr)&(splashColBlue[0])
+#define SPLASH_COL_WHITE_PTR (SplashColorPtr)&(splashColWhite[0])
+#define SPLASH_COL_BLACK_PTR (SplashColorPtr)&(splashColBlack[0])
+
+static SplashColorPtr  gBgColor = SPLASH_COL_WHITE_PTR;
+
+static void splashColorSet(SplashColorPtr col, Guchar red, Guchar green, Guchar blue, Guchar alpha)
+{
+    switch (gSplashColorMode)
+    {
+        case splashModeBGR8:
+            col[0] = blue;
+            col[1] = green;
+            col[2] = red;
+            break;
+        case splashModeRGB8:
+            col[0] = red;
+            col[1] = green;
+            col[2] = blue;
+            break;
+        default:
+            assert(0);
+            break;
+    }
+}
+
+void SplashColorsInit(void)
+{
+    splashColorSet(SPLASH_COL_RED_PTR, 0xff, 0, 0, 0);
+    splashColorSet(SPLASH_COL_GREEN_PTR, 0, 0xff, 0, 0);
+    splashColorSet(SPLASH_COL_BLUE_PTR, 0, 0, 0xff, 0);
+    splashColorSet(SPLASH_COL_BLACK_PTR, 0, 0, 0, 0);
+    splashColorSet(SPLASH_COL_WHITE_PTR, 0xff, 0xff, 0xff, 0);
+}
+
+RenderedBitmapSplash::RenderedBitmapSplash(SplashBitmap *bitmap)
+{
+    _bitmap = bitmap;
+}
+
+RenderedBitmapSplash::~RenderedBitmapSplash() {
+    delete _bitmap;
+}
+
+int RenderedBitmapSplash::dx()
+{ 
+    return _bitmap->getWidth();
+}
+
+int RenderedBitmapSplash::dy()
+{ 
+    return _bitmap->getHeight();
+}
+
+int RenderedBitmapSplash::rowSize() 
+{ 
+    return _bitmap->getRowSize(); 
+}
+    
+unsigned char *RenderedBitmapSplash::data()
+{
+    return _bitmap->getDataPtr();
+}
+
+#ifdef WIN32
+static HBITMAP createDIBitmapCommon(RenderedBitmap *bmp, HDC hdc)
+{
+    int bmpDx = bmp->dx();
+    int bmpDy = bmp->dy();
+    int bmpRowSize = bmp->rowSize();
+
+    BITMAPINFOHEADER bmih;
+    bmih.biSize = sizeof(bmih);
+    bmih.biHeight = -bmpDy;
+    bmih.biWidth = bmpDx;
+    bmih.biPlanes = 1;
+    bmih.biBitCount = 24;
+    bmih.biCompression = BI_RGB;
+    bmih.biSizeImage = bmpDy * bmpRowSize;;
+    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
+    bmih.biClrUsed = bmih.biClrImportant = 0;
+
+    unsigned char* bmpData = bmp->data();
+    HBITMAP hbmp = ::CreateDIBitmap(hdc, &bmih, CBM_INIT, bmpData, (BITMAPINFO *)&bmih , DIB_RGB_COLORS);
+    return hbmp;
+}
+
+static void stretchDIBitsCommon(RenderedBitmap *bmp, HDC hdc, int leftMargin, int topMargin, int pageDx, int pageDy)
+{
+    int bmpDx = bmp->dx();
+    int bmpDy = bmp->dy();
+    int bmpRowSize = bmp->rowSize();
+
+    BITMAPINFOHEADER bmih;
+    bmih.biSize = sizeof(bmih);
+    bmih.biHeight = -bmpDy;
+    bmih.biWidth = bmpDx;
+    bmih.biPlanes = 1;
+    // we could create this dibsection in monochrome
+    // if the printer is monochrome, to reduce memory consumption
+    // but splash is currently setup to return a full colour bitmap
+    bmih.biBitCount = 24;
+    bmih.biCompression = BI_RGB;
+    bmih.biSizeImage = bmpDy * bmpRowSize;;
+    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
+    bmih.biClrUsed = bmih.biClrImportant = 0;
+    SplashColorPtr bmpData = bmp->data();
+
+    ::StretchDIBits(hdc,
+        // destination rectangle
+        -leftMargin, -topMargin, pageDx, pageDy,
+        // source rectangle
+        0, 0, bmpDx, bmpDy,
+        bmpData,
+        (BITMAPINFO *)&bmih ,
+        DIB_RGB_COLORS,
+        SRCCOPY);
+}
+
+HBITMAP RenderedBitmapSplash::createDIBitmap(HDC hdc)
+{
+    return createDIBitmapCommon(this, hdc);
+}
+
+void RenderedBitmapSplash::stretchDIBits(HDC hdc, int leftMargin, int topMargin, int pageDx, int pageDy)
+{
+    stretchDIBitsCommon(this, hdc, leftMargin, topMargin, pageDx, pageDy);
+}
+#endif
+
+PdfEnginePoppler::PdfEnginePoppler() : 
+    PdfEngine()
+   , _pdfDoc(NULL)
+   , _outputDev(NULL)
+{
+}
+
+PdfEnginePoppler::~PdfEnginePoppler()
+{
+    delete _outputDev;
+    delete _pdfDoc;
+}
+
+bool PdfEnginePoppler::load(const char *fileName)
+{
+    setFileName(fileName);
+    /* note: don't delete fileNameStr since PDFDoc takes ownership and deletes them itself */
+    GooString *fileNameStr = new GooString(fileName);
+    if (!fileNameStr) return false;
+
+    _pdfDoc = new PDFDoc(fileNameStr, NULL, NULL, (void*)NULL);
+    if (!_pdfDoc->isOk()) {
+        return false;
+    }
+    _pageCount = _pdfDoc->getNumPages();
+    return true;
+}
+
+int PdfEnginePoppler::pageRotation(int pageNo)
+{
+    assert(validPageNo(pageNo));
+    return pdfDoc()->getPageRotate(pageNo);
+}
+
+SizeD PdfEnginePoppler::pageSize(int pageNo)
+{
+    double dx = pdfDoc()->getPageCropWidth(pageNo);
+    double dy = pdfDoc()->getPageCropHeight(pageNo);
+    return SizeD(dx, dy);
+}
+
+SplashOutputDev * PdfEnginePoppler::outputDevice() {
+    if (!_outputDev) {
+        GBool bitmapTopDown = gTrue;
+        _outputDev = new SplashOutputDev(gSplashColorMode, 4, gFalse, gBgColor, bitmapTopDown);
+        if (_outputDev)
+            _outputDev->startDoc(_pdfDoc->getXRef());
+    }
+    return _outputDev;
+}
+
+RenderedBitmap *PdfEnginePoppler::renderBitmap(
+                           int pageNo, double zoomReal, int rotation,
+                           BOOL (*abortCheckCbkA)(void *data),
+                           void *abortCheckCbkDataA)
+{
+    assert(outputDevice());
+    if (!outputDevice()) return NULL;
+
+    double hDPI = (double)PDF_FILE_DPI * zoomReal * 0.01;
+    double vDPI = (double)PDF_FILE_DPI * zoomReal * 0.01;
+    GBool  useMediaBox = gFalse;
+    GBool  crop        = gTrue;
+    GBool  doLinks     = gTrue;
+    _pdfDoc->displayPage(_outputDev, pageNo, hDPI, vDPI, rotation, useMediaBox, crop, doLinks,
+        abortCheckCbkA, abortCheckCbkDataA);
+
+    SplashBitmap* bmp = _outputDev->takeBitmap();
+    if (bmp)
+        return new RenderedBitmapSplash(bmp);
+
+    return NULL;
+}
+
+struct FindFileState {
+    char path[MAX_FILENAME_SIZE];
+    char dirpath[MAX_FILENAME_SIZE]; /* current dir path */
+    char pattern[MAX_FILENAME_SIZE]; /* search pattern */
+    const char *bufptr;
+#ifdef WIN32
+    WIN32_FIND_DATA fileinfo;
+    HANDLE dir;
+#else
+    DIR *dir;
+#endif
+};
+
+#ifdef WIN32
+#include <windows.h>
+#include <sys/timeb.h>
+#include <direct.h>
+
+__inline char *getcwd(char *buffer, int maxlen)
+{
+    return _getcwd(buffer, maxlen);
+}
+
+int fnmatch(const char *pattern, const char *string, int flags)
+{
+    int prefix_len;
+    const char *star_pos = strchr(pattern, '*');
+    if (!star_pos)
+        return strcmp(pattern, string) != 0;
+
+    prefix_len = (int)(star_pos-pattern);
+    if (0 == prefix_len)
+        return 0;
+
+    if (0 == _strnicmp(pattern, string, prefix_len))
+        return 0;
+
+    return 1;
+}
+
+#else
+#include <fnmatch.h>
+#endif
+
+#ifdef WIN32
+/* on windows to query dirs we need foo\* to get files in this directory.
+    foo\ always fails and foo will return just info about foo directory,
+    not files in this directory */
+static void win_correct_path_for_FindFirstFile(char *path, int path_max_len)
+{
+    int path_len = strlen(path);
+    if (path_len >= path_max_len-4)
+        return;
+    if (DIR_SEP_CHAR != path[path_len])
+        path[path_len++] = DIR_SEP_CHAR;
+    path[path_len++] = '*';
+    path[path_len] = 0;
+}
+#endif
+
+FindFileState *find_file_open(const char *path, const char *pattern)
+{
+    FindFileState *s;
+
+    s = (FindFileState*)malloc(sizeof(FindFileState));
+    if (!s)
+        return NULL;
+    strcpy_s(s->path, sizeof(s->path), path);
+    strcpy_s(s->dirpath, sizeof(s->path), path);
+#ifdef WIN32
+    win_correct_path_for_FindFirstFile(s->path, sizeof(s->path));
+#endif
+    strcpy_s(s->pattern, sizeof(s->pattern), pattern);
+    s->bufptr = s->path;
+#ifdef WIN32
+    s->dir = INVALID_HANDLE_VALUE;
+#else
+    s->dir = NULL;
+#endif
+    return s;
+}
+
+#if 0 /* re-enable if we #define USE_OWN_GET_AUTH_DATA */
+void *StandardSecurityHandler::getAuthData()
+{
+    return NULL;
+}
+#endif
+
+char *makepath(char *buf, int buf_size, const char *path,
+               const char *filename)
+{
+    strcpy_s(buf, buf_size, path);
+    int len = strlen(path);
+    if (len > 0 && path[len - 1] != DIR_SEP_CHAR && len + 1 < buf_size) {
+        buf[len++] = DIR_SEP_CHAR;
+        buf[len] = '\0';
+    }
+    strcat_s(buf, buf_size, filename);
+    return buf;
+}
+
+#ifdef WIN32
+static int skip_matching_file(const char *filename)
+{
+    if (0 == strcmp(".", filename))
+        return 1;
+    if (0 == strcmp("..", filename))
+        return 1;
+    return 0;
+}
+#endif
+
+int find_file_next(FindFileState *s, char *filename, int filename_size_max)
+{
+#ifdef WIN32
+    int    fFound;
+    if (INVALID_HANDLE_VALUE == s->dir) {
+        s->dir = FindFirstFile(s->path, &(s->fileinfo));
+        if (INVALID_HANDLE_VALUE == s->dir)
+            return -1;
+        goto CheckFile;
+    }
+
+    while (1) {
+        fFound = FindNextFile(s->dir, &(s->fileinfo));
+        if (!fFound)
+            return -1;
+CheckFile:
+        if (skip_matching_file(s->fileinfo.cFileName))
+            continue;
+        if (0 == fnmatch(s->pattern, s->fileinfo.cFileName, 0) ) {
+            makepath(filename, filename_size_max, s->dirpath, s->fileinfo.cFileName);
+            return 0;
+        }
+    }
+#else
+    struct dirent *dirent;
+    const char *p;
+    char *q;
+
+    if (s->dir == NULL)
+        goto redo;
+
+    for (;;) {
+        dirent = readdir(s->dir);
+        if (dirent == NULL) {
+        redo:
+            if (s->dir) {
+                closedir(s->dir);
+                s->dir = NULL;
+            }
+            p = s->bufptr;
+            if (*p == '\0')
+                return -1;
+            /* CG: get_str(&p, s->dirpath, sizeof(s->dirpath), ":") */
+            q = s->dirpath;
+            while (*p != ':' && *p != '\0') {
+                if ((q - s->dirpath) < (int)sizeof(s->dirpath) - 1)
+                    *q++ = *p;
+                p++;
+            }
+            *q = '\0';
+            if (*p == ':')
+                p++;
+            s->bufptr = p;
+            s->dir = opendir(s->dirpath);
+            if (!s->dir)
+                goto redo;
+        } else {
+            if (fnmatch(s->pattern, dirent->d_name, 0) == 0) {
+                makepath(filename, filename_size_max,
+                         s->dirpath, dirent->d_name);
+                return 0;
+            }
+        }
+    }
+#endif
+}
+
+void find_file_close(FindFileState *s)
+{
+#ifdef WIN32
+    if (INVALID_HANDLE_VALUE != s->dir)
+       FindClose(s->dir);
+#else
+    if (s->dir)
+        closedir(s->dir);
+#endif
+    free(s);
+}
+
+int StrList_Len(StrList **root)
+{
+    int         len = 0;
+    StrList *   cur;
+    assert(root);
+    if (!root)
+        return 0;
+    cur = *root;
+    while (cur) {
+        ++len;
+        cur = cur->next;
+    }
+    return len;
+}
+
+int StrList_InsertAndOwn(StrList **root, char *txt)
+{
+    StrList *   el;
+    assert(root && txt);
+    if (!root || !txt)
+        return FALSE;
+
+    el = (StrList*)malloc(sizeof(StrList));
+    if (!el)
+        return FALSE;
+    el->str = txt;
+    el->next = *root;
+    *root = el;
+    return TRUE;
+}
+
+int StrList_Insert(StrList **root, char *txt)
+{
+    char *txtDup;
+
+    assert(root && txt);
+    if (!root || !txt)
+        return FALSE;
+    txtDup = str_dup(txt);
+    if (!txtDup)
+        return FALSE;
+
+    if (!StrList_InsertAndOwn(root, txtDup)) {
+        free((void*)txtDup);
+        return FALSE;
+    }
+    return TRUE;
+}
+
+StrList* StrList_RemoveHead(StrList **root)
+{
+    StrList *tmp;
+    assert(root);
+    if (!root)
+        return NULL;
+
+    if (!*root)
+        return NULL;
+    tmp = *root;
+    *root = tmp->next;
+    tmp->next = NULL;
+    return tmp;
+}
+
+void StrList_FreeElement(StrList *el)
+{
+    if (!el)
+        return;
+    free((void*)el->str);
+    free((void*)el);
+}
+
+void StrList_Destroy(StrList **root)
+{
+    StrList *   cur;
+    StrList *   next;
+
+    if (!root)
+        return;
+    cur = *root;
+    while (cur) {
+        next = cur->next;
+        StrList_FreeElement(cur);
+        cur = next;
+    }
+    *root = NULL;
+}
+
+#ifndef WIN32
+void OutputDebugString(const char *txt)
+{
+    /* do nothing */
+}
+#define _snprintf snprintf
+#define _vsnprintf vsnprintf
+#endif
+
+void CDECL error(int pos, char *msg, ...) {
+    va_list args;
+    char        buf[4096], *p = buf;
+
+    // NB: this can be called before the globalParams object is created
+    if (globalParams && globalParams->getErrQuiet()) {
+        return;
+    }
+
+    if (pos >= 0) {
+        p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
+        *p   = '\0';
+        OutputDebugString(p);
+    } else {
+        OutputDebugString("Error: ");
+    }
+
+    p = buf;
+    va_start(args, msg);
+    p += _vsnprintf(p, sizeof(buf) - 1, msg, args);
+    while ( p > buf  &&  isspace(p[-1]) )
+            *--p = '\0';
+    *p++ = '\r';
+    *p++ = '\n';
+    *p   = '\0';
+    OutputDebugString(buf);
+    va_end(args);
+
+    if (pos >= 0) {
+        p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
+        *p   = '\0';
+        OutputDebugString(buf);
+        if (gErrFile)
+            fprintf(gErrFile, buf);
+    } else {
+        OutputDebugString("Error: ");
+        if (gErrFile)
+            fprintf(gErrFile, "Error: ");
+    }
+
+    p = buf;
+    va_start(args, msg);
+    p += _vsnprintf(p, sizeof(buf) - 3, msg, args);
+    while ( p > buf  &&  isspace(p[-1]) )
+            *--p = '\0';
+    *p++ = '\r';
+    *p++ = '\n';
+    *p   = '\0';
+    OutputDebugString(buf);
+    if (gErrFile)
+        fprintf(gErrFile, buf);
+    va_end(args);
+}
+
+void LogInfo(char *fmt, ...)
+{
+    va_list args;
+    char        buf[4096], *p = buf;
+
+    p = buf;
+    va_start(args, fmt);
+    p += _vsnprintf(p, sizeof(buf) - 1, fmt, args);
+    *p   = '\0';
+    fprintf(gOutFile, buf);
+    va_end(args);
+    fflush(gOutFile);
+}
+
+static void PrintUsageAndExit(int argc, char **argv)
+{
+    printf("Usage: pdftest [-preview|-slowpreview] [-loadonly] [-timings] [-text] [-resolution NxM] [-recursive] [-page N] [-out out.txt] pdf-files-to-process\n");
+    for (int i=0; i < argc; i++) {
+        printf("i=%d, '%s'\n", i, argv[i]);
+    }
+    exit(0);
+}
+
+static int ShowPreview(void)
+{
+    if (gfPreview || gfSlowPreview)
+        return TRUE;
+    return FALSE;
+}
+
+static void RenderPdfAsText(const char *fileName)
+{
+    GooString *         fileNameStr = NULL;
+    PDFDoc *            pdfDoc = NULL;
+    GooString *         txt = NULL;
+
+    assert(fileName);
+    if (!fileName)
+        return;
+
+    LogInfo("started: %s\n", fileName);
+
+    TextOutputDev * textOut = new TextOutputDev(NULL, gTrue, gFalse, gFalse);
+    if (!textOut->isOk()) {
+        delete textOut;
+        return;
+    }
+
+    MsTimer msTimer;
+    /* note: don't delete fileNameStr since PDFDoc takes ownership and deletes them itself */
+    fileNameStr = new GooString(fileName);
+    if (!fileNameStr)
+        goto Exit;
+
+    pdfDoc = new PDFDoc(fileNameStr, NULL, NULL, NULL);
+    if (!pdfDoc->isOk()) {
+        error(-1, "RenderPdfFile(): failed to open PDF file %s\n", fileName);
+        goto Exit;
+    }
+
+    msTimer.stop();
+    double timeInMs = msTimer.timeInMs();
+    LogInfo("load: %.2f ms\n", timeInMs);
+
+    int pageCount = pdfDoc->getNumPages();
+    LogInfo("page count: %d\n", pageCount);
+
+    for (int curPage = 1; curPage <= pageCount; curPage++) {
+        if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
+            continue;
+
+        msTimer.start();
+        int rotate = 0;
+        GBool useMediaBox = gFalse;
+        GBool crop = gTrue;
+        GBool doLinks = gFalse;
+        pdfDoc->displayPage(textOut, curPage, 72, 72, rotate, useMediaBox, crop, doLinks);
+        txt = textOut->getText(0.0, 0.0, 10000.0, 10000.0);
+        msTimer.stop();
+        timeInMs = msTimer.timeInMs();
+        if (gfTimings)
+            LogInfo("page %d: %.2f ms\n", curPage, timeInMs);
+        printf("%s\n", txt->getCString());
+        delete txt;
+        txt = NULL;
+    }
+
+Exit:
+    LogInfo("finished: %s\n", fileName);
+    delete textOut;
+    delete pdfDoc;
+}
+
+#ifdef _MSC_VER
+#define POPPLER_TMP_NAME "c:\\poppler_tmp.pdf"
+#else
+#define POPPLER_TMP_NAME "/tmp/poppler_tmp.pdf"
+#endif
+
+static void RenderPdf(const char *fileName)
+{
+    const char *fileNameSplash = NULL;
+    PdfEngine * engineSplash = NULL;
+
+    // TODO: fails if file already exists and has read-only attribute
+    CopyFile(fileName, POPPLER_TMP_NAME, FALSE);
+    fileNameSplash = POPPLER_TMP_NAME;
+
+    LogInfo("started: %s\n", fileName);
+
+    engineSplash = new PdfEnginePoppler();
+
+    MsTimer msTimer;
+    if (!engineSplash->load(fileNameSplash)) {
+        LogInfo("failed to load splash\n");
+        goto Error;
+    }
+    msTimer.stop();
+    double timeInMs = msTimer.timeInMs();
+    LogInfo("load splash: %.2f ms\n", timeInMs);
+    int pageCount = engineSplash->pageCount();
+
+    LogInfo("page count: %d\n", pageCount);
+
+    for (int curPage = 1; curPage <= pageCount; curPage++) {
+        if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
+            continue;
+
+        RenderedBitmap *bmpSplash = NULL;
+
+        MsTimer msTimer;
+        bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0, NULL, NULL);
+        msTimer.stop();
+        double timeInMs = msTimer.timeInMs();
+        if (gfTimings)
+            if (!bmpSplash)
+                LogInfo("page splash %d: failed to render\n", curPage);
+            else
+                LogInfo("page splash %d (%dx%d): %.2f ms\n", curPage, bmpSplash->dx(), bmpSplash->dy(), timeInMs);
+
+        if (ShowPreview()) {
+            PreviewBitmapSplash(bmpSplash);
+            if (gfSlowPreview)
+                sleep_milliseconds(SLOW_PREVIEW_TIME);
+        }
+    }
+Error:
+    delete engineSplash;
+    LogInfo("finished: %s\n", fileName);
+}
+
+static void RenderFile(const char *fileName)
+{
+    if (gfTextOnly) {
+        RenderPdfAsText(fileName);
+        return;
+    }
+
+    RenderPdf(fileName);
+}
+
+static int ParseInteger(const char *start, const char *end, int *intOut)
+{
+    char            numBuf[16];
+    int             digitsCount;
+    const char *    tmp;
+
+    assert(start && end && intOut);
+    assert(end >= start);
+    if (!start || !end || !intOut || (start > end))
+        return FALSE;
+
+    digitsCount = 0;
+    tmp = start;
+    while (tmp <= end) {
+        if (isspace(*tmp)) {
+            /* do nothing, we allow whitespace */
+        } else if (!isdigit(*tmp))
+            return FALSE;
+        numBuf[digitsCount] = *tmp;
+        ++digitsCount;
+        if (digitsCount == dimof(numBuf)-3) /* -3 to be safe */
+            return FALSE;
+        ++tmp;
+    }
+    if (0 == digitsCount)
+        return FALSE;
+    numBuf[digitsCount] = 0;
+    *intOut = atoi(numBuf);
+    return TRUE;
+}
+
+/* Given 'resolutionString' in format NxM (e.g. "100x200"), parse the string and put N
+   into 'resolutionXOut' and M into 'resolutionYOut'.
+   Return FALSE if there was an error (e.g. string is not in the right format */
+static int ParseResolutionString(const char *resolutionString, int *resolutionXOut, int *resolutionYOut)
+{
+    const char *    posOfX;
+
+    assert(resolutionString);
+    assert(resolutionXOut);
+    assert(resolutionYOut);
+    if (!resolutionString || !resolutionXOut || !resolutionYOut)
+        return FALSE;
+    *resolutionXOut = 0;
+    *resolutionYOut = 0;
+    posOfX = strchr(resolutionString, 'X');
+    if (!posOfX)
+        posOfX = strchr(resolutionString, 'x');
+    if (!posOfX)
+        return FALSE;
+    if (posOfX == resolutionString)
+        return FALSE;
+    if (!ParseInteger(resolutionString, posOfX-1, resolutionXOut))
+        return FALSE;
+    if (!ParseInteger(posOfX+1, resolutionString+strlen(resolutionString)-1, resolutionYOut))
+        return FALSE;
+    return TRUE;
+}
+
+#ifdef DEBUG
+static void u_ParseResolutionString(void)
+{
+    int i;
+    int result, resX, resY;
+    const char *str;
+    struct TestData {
+        const char *    str;
+        int             result;
+        int             resX;
+        int             resY;
+    } testData[] = {
+        { "", FALSE, 0, 0 },
+        { "abc", FALSE, 0, 0},
+        { "34", FALSE, 0, 0},
+        { "0x0", TRUE, 0, 0},
+        { "0x1", TRUE, 0, 1},
+        { "0xab", FALSE, 0, 0},
+        { "1x0", TRUE, 1, 0},
+        { "100x200", TRUE, 100, 200},
+        { "58x58", TRUE, 58, 58},
+        { "  58x58", TRUE, 58, 58},
+        { "58x  58", TRUE, 58, 58},
+        { "58x58  ", TRUE, 58, 58},
+        { "     58  x  58  ", TRUE, 58, 58},
+        { "34x1234a", FALSE, 0, 0},
+        { NULL, FALSE, 0, 0}
+    };
+    for (i=0; NULL != testData[i].str; i++) {
+        str = testData[i].str;
+        result = ParseResolutionString(str, &resX, &resY);
+        assert(result == testData[i].result);
+        if (result) {
+            assert(resX == testData[i].resX);
+            assert(resY == testData[i].resY);
+        }
+    }
+}
+#endif
+
+static void runAllUnitTests(void)
+{
+#ifdef DEBUG
+    u_ParseResolutionString();
+#endif
+}
+
+static void ParseCommandLine(int argc, char **argv)
+{
+    char *      arg;
+
+    if (argc < 2)
+        PrintUsageAndExit(argc, argv);
+
+    for (int i=1; i < argc; i++) {
+        arg = argv[i];
+        assert(arg);
+        if ('-' == arg[0]) {
+            if (str_ieq(arg, TIMINGS_ARG)) {
+                gfTimings = TRUE;
+            } else if (str_ieq(arg, RESOLUTION_ARG)) {
+                ++i;
+                if (i == argc)
+                    PrintUsageAndExit(argc, argv); /* expect a file name after that */
+                if (!ParseResolutionString(argv[i], &gResolutionX, &gResolutionY))
+                    PrintUsageAndExit(argc, argv);
+                gfForceResolution = TRUE;
+            } else if (str_ieq(arg, RECURSIVE_ARG)) {
+                gfRecursive = TRUE;
+            } else if (str_ieq(arg, OUT_ARG)) {
+                /* expect a file name after that */
+                ++i;
+                if (i == argc)
+                    PrintUsageAndExit(argc, argv);
+                gOutFileName = str_dup(argv[i]);
+            } else if (str_ieq(arg, PREVIEW_ARG)) {
+                gfPreview = TRUE;
+            } else if (str_ieq(arg, TEXT_ARG)) {
+                gfTextOnly = TRUE;
+            } else if (str_ieq(arg, SLOW_PREVIEW_ARG)) {
+                gfSlowPreview = TRUE;
+            } else if (str_ieq(arg, LOAD_ONLY_ARG)) {
+                gfLoadOnly = TRUE;
+            } else if (str_ieq(arg, PAGE_ARG)) {
+                /* expect an integer after that */
+                ++i;
+                if (i == argc)
+                    PrintUsageAndExit(argc, argv);
+                gPageNo = atoi(argv[i]);
+                if (gPageNo < 1)
+                    PrintUsageAndExit(argc, argv);
+            } else {
+                /* unknown option */
+                PrintUsageAndExit(argc, argv);
+            }
+        } else {
+            /* we assume that this is not an option hence it must be
+               a name of PDF/directory/file with PDF names */
+            StrList_Insert(&gArgsListRoot, arg);
+        }
+    }
+}
+
+#if 0
+void RenderFileList(char *pdfFileList)
+{
+    char *data = NULL;
+    char *dataNormalized = NULL;
+    char *pdfFileName;
+    uint64_t fileSize;
+
+    assert(pdfFileList);
+    if (!pdfFileList)
+        return;
+    data = file_read_all(pdfFileList, &fileSize);
+    if (!data) {
+        error(-1, "couldn't load file '%s'", pdfFileList);
+        return;
+    }
+    dataNormalized = str_normalize_newline(data, UNIX_NEWLINE);
+    if (!dataNormalized) {
+        error(-1, "couldn't normalize data of file '%s'", pdfFileList);
+        goto Exit;
+    }
+    for (;;) {
+        pdfFileName = str_split_iter(&dataNormalized, UNIX_NEWLINE_C);
+        if (!pdfFileName)
+            break;
+        str_strip_ws_both(pdfFileName);
+        if (str_empty(pdfFileName)) {
+            free((void*)pdfFileName);
+            continue;
+        }
+        RenderFile(pdfFileName);
+        free((void*)pdfFileName);
+    }
+Exit:
+    free((void*)dataNormalized);
+    free((void*)data);
+}
+#endif
+
+#ifdef WIN32
+#include <sys/types.h>
+#include <sys/stat.h>
+
+int IsDirectoryName(char *path)
+{
+    struct _stat    buf;
+    int             result;
+
+    result = _stat(path, &buf );
+    if (0 != result)
+        return FALSE;
+
+    if (buf.st_mode & _S_IFDIR)
+        return TRUE;
+
+    return FALSE;
+}
+
+int IsFileName(char *path)
+{
+    struct _stat    buf;
+    int             result;
+
+    result = _stat(path, &buf );
+    if (0 != result)
+        return FALSE;
+
+    if (buf.st_mode & _S_IFREG)
+        return TRUE;
+
+    return FALSE;
+}
+#else
+int IsDirectoryName(char *path)
+{
+    /* TODO: implement me */
+    return FALSE;
+}
+
+int IsFileName(char *path)
+{
+    /* TODO: implement me */
+    return TRUE;
+}
+#endif
+
+int IsPdfFileName(char *path)
+{
+    if (str_endswith(path, ".pdf"))
+        return TRUE;
+    return FALSE;
+}
+
+static void RenderDirectory(char *path)
+{
+    FindFileState * ffs;
+    char            filename[MAX_FILENAME_SIZE];
+    StrList *       dirList = NULL;
+    StrList *       el;
+
+    StrList_Insert(&dirList, path);
+
+    while (0 != StrList_Len(&dirList)) {
+        el = StrList_RemoveHead(&dirList);
+        ffs = find_file_open(el->str, "*");
+        while (!find_file_next(ffs, filename, sizeof(filename))) {
+            if (IsDirectoryName(filename)) {
+                if (gfRecursive) {
+                    StrList_Insert(&dirList, filename);
+                }
+            } else if (IsFileName(filename)) {
+                if (IsPdfFileName(filename)) {
+                    RenderFile(filename);
+                }
+            }
+        }
+        find_file_close(ffs);
+        StrList_FreeElement(el);
+    }
+    StrList_Destroy(&dirList);
+}
+
+/* Render 'cmdLineArg', which can be:
+   - directory name
+   - name of PDF file
+   - name of text file with names of PDF files
+*/
+static void RenderCmdLineArg(char *cmdLineArg)
+{
+    assert(cmdLineArg);
+    if (!cmdLineArg)
+        return;
+    if (IsDirectoryName(cmdLineArg)) {
+        RenderDirectory(cmdLineArg);
+    } else if (IsFileName(cmdLineArg)) {
+        if (IsPdfFileName(cmdLineArg))
+            RenderFile(cmdLineArg);
+#if 0
+        else
+            RenderFileList(cmdLineArg);
+#endif
+    } else {
+        error(-1, "unexpected argument '%s'", cmdLineArg);
+    }
+}
+
+int main(int argc, char **argv)
+{
+    //runAllUnitTests();
+
+    ParseCommandLine(argc, argv);
+    if (0 == StrList_Len(&gArgsListRoot))
+        PrintUsageAndExit(argc, argv);
+    assert(gArgsListRoot);
+
+    SplashColorsInit();
+    globalParams = new GlobalParams();
+    if (!globalParams)
+        return 1;
+    globalParams->setErrQuiet(gFalse);
+    globalParams->setBaseDir("");
+
+    FILE * outFile = NULL;
+    if (gOutFileName) {
+        outFile = fopen(gOutFileName, "wb");
+        if (!outFile) {
+            printf("failed to open -out file %s\n", gOutFileName);
+            return 1;
+        }
+        gOutFile = outFile;
+    }
+    else
+        gOutFile = stdout;
+
+    if (gOutFileName)
+        gErrFile = outFile;
+    else
+        gErrFile = stderr;
+
+    PreviewBitmapInit();
+
+    StrList * curr = gArgsListRoot;
+    while (curr) {
+        RenderCmdLineArg(curr->str);
+        curr = curr->next;
+    }
+    if (outFile)
+        fclose(outFile);
+    PreviewBitmapDestroy();
+    StrList_Destroy(&gArgsListRoot);
+    delete globalParams;
+    return 0;
+}
+
commit b96db4ad27535c2666fccdfe0a3c04cc7c37792d
Author: Jeff Muizelaar <jeff at freiheit.infidigm.net>
Date:   Mon Sep 17 20:28:38 2007 -0400

    Avoid double free caused by 302 merge
    
    The ownership of the the string returned by getKey() changed with the 302 merge
    but this code was not updated. Found by Matthew Woehlke.

diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7985adc..e34b1f2 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -274,9 +274,7 @@ namespace Poppler {
 	Dict *infoDict = info.getDict();
 	// somehow iterate over keys in infoDict
 	for( int i=0; i < infoDict->getLength(); ++i ) {
-	    const char *aux = infoDict->getKey(i);
-	    keys.append( QString::fromAscii(aux) );
-	    delete[] aux;
+	    keys.append( QString::fromAscii(infoDict->getKey(i)) );
 	}
 
 	info.free();
commit 2a495f19d4465e15fd2fa96656d904315c79a443
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Sep 17 16:52:45 2007 -0400

    Simplify ChangeLog rule a bit.

diff --git a/ChangeLog.mk b/ChangeLog.mk
deleted file mode 100644
index 99f5ed6..0000000
--- a/ChangeLog.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-# Creating ChangeLog files from git log:
-
-# We always create a ChangeLog that contains the most recent changes, and
-# multiple others for changes between major releases (other than the last such
-# segment that we put in 'ChangeLog'.  The old ones are named
-# ChangeLog.pre-X.Y where X.Y is the version number of the major release.
-
-CURR_CHANGELOG_VERSION=$(CAIRO_VERSION_MAJOR).$$(echo "($(CAIRO_VERSION_MINOR)+1)/2*2" | bc)
-# examines $version
-PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
-			  then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
-			  else echo "$$version-1.0"; \
-			  fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
-
-CHANGELOGS = ChangeLog \
-	`version=$(CURR_CHANGELOG_VERSION); \
-	version=$(PREV_CHANGELOG_VERSION); \
-	while test "x$$version" != xinitial; do \
-		echo ChangeLog.pre-$$version; \
-		version=$(PREV_CHANGELOG_VERSION); \
-	done`
-
-MAINTAINERCLEANFILES += $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-*
-DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
-
-changelogs:
-	@$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
-
-dist-hook: changelogs
-	changelogs="$(CHANGELOGS)"; \
-	for changelog in $$changelogs; do \
-		cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
-		cp $$changelog $(distdir)/; \
-	done
-
-$(srcdir)/ChangeLog:
-	@if test -d "$(srcdir)/.git"; then \
-		version=$(CURR_CHANGELOG_VERSION); \
-		prev=$(PREV_CHANGELOG_VERSION).0; \
-		nearest_tag=`git-describe | sed 's/-.*//'`; \
-		before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
-		after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
-		$(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
-		echo Creating $@ && \
-		{ cat $$after; echo; cat $$before; } > $@; \
-	else \
-		test -f $@ || \
-		(echo A git checkout is required to generate $@ >&2 && \
-		 echo A git checkout is required to generate this file >> $@); \
-	fi
-
-DISTCLEANFILES += ChangeLog.cache-*
-
-ChangeLog.cache-*..: .git
-
-ChangeLog%: $(srcdir)/ChangeLog%
-
-$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
-	@echo Creating $@
-	@if test -d "$(srcdir)/.git"; then \
-	  (cd "$(srcdir)" && \
-	  version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
-	  if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
-		spec=$$version; \
-	  else \
-		to=$$version; \
-		test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
-		from=$(PREV_CHANGELOG_VERSION); \
-		test "x$$to" = x || version=$$version.0; \
-		test "x$$from" = xinitial || from=$$from.0; \
-		spec=$$from..$$to; \
-	  fi; \
-	  ./missing --run git-log --stat "$$spec") > $@.tmp \
-	  && mv -f $@.tmp $@ \
-	  || ($(RM) $@.tmp; \
-	      echo Failed to generate $@, your $@ may be outdated >&2); \
-	else \
-	  echo A git checkout is required to generate $@ >&2; \
-	fi
-
-.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
diff --git a/Makefile.am b/Makefile.am
index 3142b18..678b712 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,7 @@ pkgconfig_DATA =				\
 	$(qt_pc_file)                           \
 	$(qt4_pc_file)
 
-MAINTAINERCLEANFILES =
-DISTCLEANFILES =
-include ChangeLog.mk
\ No newline at end of file
+dist-hook: ChangeLog
+
+ChangeLog : .git/HEAD
+	git log --stat > ChangeLog
commit 7d5abbeec55e4b90b139671d96cfdf58bdab70b8
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Sep 17 15:45:26 2007 -0400

    Add dist hook to generate ChangeLog.
    
    Taken from cairo.  It still need some tweaking.

diff --git a/ChangeLog.mk b/ChangeLog.mk
new file mode 100644
index 0000000..99f5ed6
--- /dev/null
+++ b/ChangeLog.mk
@@ -0,0 +1,81 @@
+# Creating ChangeLog files from git log:
+
+# We always create a ChangeLog that contains the most recent changes, and
+# multiple others for changes between major releases (other than the last such
+# segment that we put in 'ChangeLog'.  The old ones are named
+# ChangeLog.pre-X.Y where X.Y is the version number of the major release.
+
+CURR_CHANGELOG_VERSION=$(CAIRO_VERSION_MAJOR).$$(echo "($(CAIRO_VERSION_MINOR)+1)/2*2" | bc)
+# examines $version
+PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
+			  then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
+			  else echo "$$version-1.0"; \
+			  fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
+
+CHANGELOGS = ChangeLog \
+	`version=$(CURR_CHANGELOG_VERSION); \
+	version=$(PREV_CHANGELOG_VERSION); \
+	while test "x$$version" != xinitial; do \
+		echo ChangeLog.pre-$$version; \
+		version=$(PREV_CHANGELOG_VERSION); \
+	done`
+
+MAINTAINERCLEANFILES += $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-*
+DISTCLEANFILES += $(srcdir)/ChangeLog.cache-*
+
+changelogs:
+	@$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
+
+dist-hook: changelogs
+	changelogs="$(CHANGELOGS)"; \
+	for changelog in $$changelogs; do \
+		cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
+		cp $$changelog $(distdir)/; \
+	done
+
+$(srcdir)/ChangeLog:
+	@if test -d "$(srcdir)/.git"; then \
+		version=$(CURR_CHANGELOG_VERSION); \
+		prev=$(PREV_CHANGELOG_VERSION).0; \
+		nearest_tag=`git-describe | sed 's/-.*//'`; \
+		before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
+		after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
+		$(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
+		echo Creating $@ && \
+		{ cat $$after; echo; cat $$before; } > $@; \
+	else \
+		test -f $@ || \
+		(echo A git checkout is required to generate $@ >&2 && \
+		 echo A git checkout is required to generate this file >> $@); \
+	fi
+
+DISTCLEANFILES += ChangeLog.cache-*
+
+ChangeLog.cache-*..: .git
+
+ChangeLog%: $(srcdir)/ChangeLog%
+
+$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
+	@echo Creating $@
+	@if test -d "$(srcdir)/.git"; then \
+	  (cd "$(srcdir)" && \
+	  version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
+	  if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
+		spec=$$version; \
+	  else \
+		to=$$version; \
+		test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
+		from=$(PREV_CHANGELOG_VERSION); \
+		test "x$$to" = x || version=$$version.0; \
+		test "x$$from" = xinitial || from=$$from.0; \
+		spec=$$from..$$to; \
+	  fi; \
+	  ./missing --run git-log --stat "$$spec") > $@.tmp \
+	  && mv -f $@.tmp $@ \
+	  || ($(RM) $@.tmp; \
+	      echo Failed to generate $@, your $@ may be outdated >&2); \
+	else \
+	  echo A git checkout is required to generate $@ >&2; \
+	fi
+
+.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog
diff --git a/Makefile.am b/Makefile.am
index fda19b0..3142b18 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,3 +46,7 @@ pkgconfig_DATA =				\
 	$(glib_pc_file)				\
 	$(qt_pc_file)                           \
 	$(qt4_pc_file)
+
+MAINTAINERCLEANFILES =
+DISTCLEANFILES =
+include ChangeLog.mk
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 81c75c2..4bdce05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 AC_INIT(poppler, 0.6)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AM_INIT_AUTOMAKE([foreign])
 AM_CONFIG_HEADER(config.h)
 AM_CONFIG_HEADER(poppler/poppler-config.h)
 
commit 15ad81c64cd8b1cb438d41be402daa19a239db3d
Author: Albert Astals Cid <tsdgeos at bluebox.localdomain>
Date:   Mon Sep 17 19:39:29 2007 +0200

    Use = instead of == in qt.m4

diff --git a/m4/qt.m4 b/m4/qt.m4
index c4dd67b..8320bbc 100644
--- a/m4/qt.m4
+++ b/m4/qt.m4
@@ -52,7 +52,7 @@ if test "x$qt_libdir" != "xno" ; then
     fi
 fi
 
-if test "x$have_qt" == "xyes"; then
+if test "x$have_qt" = "xyes"; then
     AC_LANG_PUSH([C++])
     pthread_needed=no
 
commit 70fabcb96e207b9b889bb32c0cf5ea3fc0aa08f8
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Sun Sep 16 20:40:53 2007 -0400

    Rename .cvsignore files to .gitignore and drop ChangeLog file.

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 3151685..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,25 +0,0 @@
-.cvsignore
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-missing
-poppler-cairo.pc
-poppler-glib.pc
-poppler-qt.pc
-poppler-qt4.pc
-poppler-splash.pc
-poppler.pc
-stamp-h1
-gtk-doc.make
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3151685
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,25 @@
+.cvsignore
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+poppler-cairo.pc
+poppler-glib.pc
+poppler-qt.pc
+poppler-qt4.pc
+poppler-splash.pc
+poppler.pc
+stamp-h1
+gtk-doc.make
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 5b87bff..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,4586 +0,0 @@
-2007-09-14  Krzysztof Kowalczyk  <kkowalczyk at gmail.com>
-
-	* poppler/GlobalParamsWin.cc:
-	Windows implementation for matching fonts that doesn't use
-	fontconfig.
-
-2007-09-13  Krzysztof Kowalczyk <kkowalczyk at gmail.com>
-
-	* poppler/DCTStream.h:
-	* poppler/Error.cc:
-	* poppler/FlateStream.h:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/Stream.cc:
-	* splash/SplashFTFontEngine.cc:
-	* splash/SplashFontEngine.cc:
-	* splash/SplashFontFile.cc:
-	* splash/SplashFontFile.h:
-	* splash/SplashT1FontEngine.cc:
-	Windows/msvc compilation fixes.
-
-2007-09-10  Albert Astals Cid <aacid at kde.org>
-
-	* autogen.sh: Support automake-1.10.
-	Patch by Krzysztof Kowalczyk <kkowalczyk at gmail.com>
-
-2007-09-07  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-ps-converter.cc:
-	Add PSConverter::setOutputDevice() to set a QIODevice where
-	writing the resulting PS.
-
-2007-09-05  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PSOutputDev.cc: Fix printing of second parameter
-	* qt4/src/poppler-ps-converter.cc: Fix Right<->Left interchange
-
-2007-09-05  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc:
-	* glib/demo/render.c: Fix build with --disable-cairo-output.
-	
-2007-09-05  Albert Astals Cid <aacid at kde.org>
-
-	* utils/pdftoppm.cc: Fix build on Sun Studio compiler.
-	Patch by Brian Cameron <brian.cameron at sun.com>
-
-2007-09-03  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac: Bump version to 0.6
-	* glib/Makefile.am
-	* poppler/Makefile.am
-	* qt/Makefile.am
-	* qt4/src/Makefile.am: Bump sonames
-
-2007-09-03  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/JBIG2Stream.cc:
-	* poppler/Stream.cc: Patch by Derek B. Noonburg <derekn at foolabs.com>
-	to fix some errors in CCITTFaxStream and JBIG2Stream.cc
-
-2007-09-03  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* gtk-doc.make:
-	* glib/poppler-document.cc:
-	* glib/poppler-form-field.cc:
-	* glib/poppler-page.cc:
-	* glib/reference/poppler-docs.sgml:
-	* glib/reference/poppler-sections.txt:
-	* glib/reference/poppler.types:
-	* glib/reference/tmpl/poppler-action.sgml:
-	* glib/reference/tmpl/poppler-attachment.sgml:
-	* glib/reference/tmpl/poppler-document.sgml:
-	* glib/reference/tmpl/poppler-enums.sgml:
-	* glib/reference/tmpl/poppler-form-field.sgml:
-	* glib/reference/tmpl/poppler-page.sgml:
-	* glib/reference/tmpl/poppler-private.sgml:
-	* glib/reference/tmpl/poppler.sgml: Update glib bindings API
-	documentation.
-	
-2007-09-02  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PDFDoc.cc: Don't enforce %%EOF at the end of file
-	* glib/demo/Makefile.am: Add $(top_builddir)/poppler/libpoppler.la
-	* poppler/TextOutputDev.cc: Patch from Ed Catmur <ed at catmur.co.uk> to
-	improve matching of half strings of decomposed characters/ligatures.
-	* poppler/GfxState.cc: Pad zeroes instead of aborting when rendering
-	1-bit images and the stream is "too short" to mimic Acroread and
-	ghostscript behaviour. Patch by <darren.kenny at sun.com>. Fixes #12208
-
-2007-09-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/Error.cc:
-	* poppler/Error.h: Report any cairo errors when destroying the cairo
-	context.
-
-2007-09-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/demo/Makefile.am: Only build the demo app if the cflags will be
-	appropriately set.
-
-2007-09-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-page.cc: Add note about clipping
-
-2007-08-30  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Form.h: Remove unused methods. Fixes 12013
-
-2007-08-30  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/TextOutputDev.cc:
-	* poppler/TextOutputDev.h:
-	* glib/poppler.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/test-poppler-glib.c: Add support for word and line
-	selections. Based on patch by Kristian Høgsberg. 
-	
-2007-08-27  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/UnicodeTypeTable.cc: Fix error on the NFKC text matching
-	routine. Fixes bug #11775. Patch by Ed Catmur <ed at catmur.co.uk>
-
-2007-08-27  Pino Toscano <pino at kde.org>
-
-	* qt4/src/Doxyfile:
-	* qt4/src/Mainpage.dox:
-	* qt4/src/poppler-annotation.h:
-	* qt4/src/poppler-form.h:
-	* qt4/src/poppler-link.h:
-	* qt4/src/poppler-qt4.h:
-	A few API documentation fixes and improvements.
-
-2007-08-27  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-link.h:
-	Initialise correctly, and missing empty destructor.
-	* qt4/src/poppler-annotation.cc:
-	Don't leak the private class.
-
-2007-08-26  Albert Astals Cid <aacid at kde.org>
-
-	* utils/ImageOutputDev.cc: Fix bug 12121 pdfimages produces inverted
-	image for black & white image
-
-2007-08-26  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-embeddedfile.cc:
-	* qt4/src/poppler-fontinfo.cc:
-	* qt4/src/poppler-form.cc:
-	* qt4/src/poppler-form.h:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-sound.cc:
-	* qt4/src/poppler-textbox.cc:
-	API work: remove 'const' and 'const&' from return values with Qt
-	classes; make the non-copiable classes really non-copiable;
-	uninline a Document::page() method; other related small changes.
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-link.h:
-	Make LinkDestination an implicitely shared class, with all the private
-	members into the private class; move all the private members of the
-	Link* classes into a common shared private.
-	* qt4/src/poppler-annotation.cc:
-	* qt4/src/poppler-annotation.h:
-	Move all the private members of the *Annotation classes into a common
-	shared private.
-
-2007-08-26  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* configure.ac:
-	* glib/Makefile.am:
-	* glib/demo/Makefile.am:
-	* glib/demo/fonts.[ch]:
-	* glib/demo/info.[ch]:
-	* glib/demo/links.[ch]:
-	* glib/demo/main.c:
-	* glib/demo/outline.[ch]:
-	* glib/demo/page.[ch]:
-	* glib/demo/render.[ch]:
-	* glib/demo/utils.[ch]: Add poppler glib demo tool.
-
-2007-08-23  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc: Add missing comma.
-
-2007-08-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-page.cc: pass in -1 to displaySlice so that it sets up
-	the slice size for us. This fixes the case of the wrong values being
-	used when the pdf was rotated on its side.
-	Fixes #11913.
-
-2007-08-22  Albert Astals Cid <aacid at kde.org>
-
-	* splash/SplashBitmap.cc:
-	* splash/SplashBitmap.h:
-	* utils/pdftoppm.cc: Add the following features to pdftoppm
-	  - if omitting input filename or using - for input filename
-	    reads pdf from stdin
-	  - if omitting output filename, prints output to stdout
-	  - create image of a cropped rectangle of the pdf
-	  - scale pdf to fit in a square of wanted size
-	Patch by Ilmari Heikkinen <ilmari.heikkinen at gmail.com>
-
-2007-08-22  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc: Fix debug spew. Patch from Matthias Clasen.
-
-2007-08-22  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Fix the computation of the padding in the
-	image scaling code.
-
-2007-08-19  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Avoid allocating the glyph array if
-	currentFont is not set in beginString. This closes a possible
-	memory leak.
-
-2007-08-16  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/JBIG2Stream.cc: Quick fix for bug #12014
-
-2007-08-15  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac:
-	* pòppler/Makefile.am: Patch by Vincent Torri <vtorri at univ-evry.fr> to
-	fix linking under MinGW
-	* poppler/Stream.cc: Fix CVE-2007-3387 by merging xpdf-3.02pl1.patch
-	* configure.ac: bump version to 0.5.91
-
-2007-08-07  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Don't use the prescaleMethod
-	when we have a rotation as that case has not been tested.
-	Also make sure that scaledHeight is at least 1.
-
-2007-08-06  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Annot.cc:
-	* poppler/Annot.h:
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	* poppler/Page.cc: Do not always regenerate appearance stream for
-	every form widget, but only when it's actually needed.
-	
-2007-07-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc: s/GList/GooList/ some Windows code.
-
-2007-07-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h: Add poppler_fonts_iter_get_file_name.
-
-2007-07-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.h: Add comment about CairoImageOutputDevice's
-	implementation.
-
-2007-07-31  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Form.cc:
-	* poppler/Form.h: Fix memory leak.
-	
-2007-07-31  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/CairoOutputDev.h: Empty implementation of transparency
-	groups and soft masks in CairoImageOutputDev. Fixes a crash in
-	poppler_page_get_image_mapping.
-	
-2007-07-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GfxFont.cc: Fix the case where the Encoding is "Identity"
-	and ToUnicode exists. GfxCIDFont::getCodeToGIDMap makes CIDTOGID map
-	from ToUnicde map, but when encoding is Identity, it should not use
-	ToUnicode map to get GID. If encoding is Identity, No CIDTOGID map is
-	needed.
-	Patch by Koji Otani.
-	Fixes #11413.
-
-2007-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Prescale image masks before giving them
-	to cairo to improve the quality of the scaled image. Improves #5589.
-
-2007-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* configure.ac: Update require cairo version to 1.4
-
-2007-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Add transparency group support.
-	Fixes #7856.
-
-2007-07-29  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: transform the original matrix for type3 fonts
-	instead of using set_matrix()
-
-2007-07-29  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/test-poppler-glib.c: include <time.h> to fix compilation.
-
-2007-07-28  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Annot.cc:
-	* poppler/Annot.h:
-	* poppler/Form.cc:
-	* poppler/Form.h: Make fieldLookup static in Form and use it from 
-	both Form and Annot.
-	
-2007-07-28  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-page.h: Remove unneeded declarations. Fixes bug
-	#11744. Patch by Kouhei	Sutou <kou at cozmixng.org>.
-	
-2007-07-27  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-private.h:
-	* glib/test-poppler-glib.c: Make PopplerFontInfo GObject. Patch by
-	Kouhei Sutou <kou at cozmixng.org>.
-	
-2007-07-24  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Annot.cc:
-	* poppler/Form.cc: Several fixes in forms. Generate appearance for
-	field buttons that don't have an AP dict. Do not remove the first
-	character of the second and following lines in multiline text
-	fields. Fix a crash with pdf documents created by ooo which have
-	radio buttons. Look for some inheritable attributes in the
-	parent when needed.
-	
-2007-07-15  Albert Astals Cid <aacid at kde.org>
-
-	* utils/HtmlOutputDev.cc:
-	* utils/HtmlOutputDev.h: Create the html files in the correct place,
-	not in the invocation dir. Fixes bug #11610
-
-2007-07-15  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/DCTStream.cc
-	* poppler/DCTStream.h: Implement less evil error handling. On a
-	error_exit level error we don't want to actually exit the program. See
-	http://bugs.kde.org/show_bug.cgi?id=147878 for a pdf with this
-	problem. libjpeg was printing "Bogus Huffman table definition" and
-	exiting the program.
-	* poppler/Stream.cc: Remove bogus #warning
-
-2007-07-14  Albert Astals Cid <aacid at kde.org>
-
-	* utils/pdftops.cc: init width/height to -1 so it is calculated if not
-	specified
-
-2007-07-14  Pino Toscano  <pino at kde.org>
-
-	* glib/poppler-action.h:
-	* glib/poppler-document.h: Remove trailing comma from the last
-	item of enums.
-	
-2007-07-14  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c: Make is_password a property instead of
-	a text form field type, since a text field could be multiline and
-	password at the same time.
-	
-2007-07-14  Albert Astals Cid <aacid at kde.org>
-
-	* fofi/FoFiTrueType.cc
-	* fofi/FoFiTrueType.h
-	* poppler/CairoFontEngine.cc
-	* poppler/CharCodeToUnicode.cc
-	* poppler/CharCodeToUnicode.h
-	* poppler/GfxFont.cc
-	* poppler/GfxFont.h
-	* poppler/SplashOutputDev.cc: Patch by  
-	Koji Otani <sho at bbr.jp> to fix several problems with Japanese fonts.
-	Fixes bug 11413
-
-2007-07-13  Pino Toscano <pino at kde.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-	* poppler/FontInfo.cc: Fix the FontInfoScanner::scan method to
-	actually scan the number of requested pages
-
-2007-07-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/GlobalParams.cc: Remove dead unused code from Win32 ifdef
-
-2007-07-11  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PSOutputDev.cc
-	* poppler/PSOutputDev.h
-	* utils/pdftohtml.cc: Fix bug 9746. pdftohtml complex mode had text
-	twice
-
-2007-07-11  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Form.cc:	
-	* poppler/XRef.cc:
-	* poppler/XRef.h: Fix memory leak.
-	
-2007-07-11  Albert Astals Cid <aacid at kde.org>
-
-	* goo/GooVector.h: Rename guard from _VECTOR_H to GOO_VECTOR_H
-	* goo/gfile.cc: GString -> GooString in Windows code
-	* poppler/GlobalParams.cc: GString -> GooString in Windows code
-	* splash/SplashT1FontEngine.cc
-	* splash/SplashT1FontEngine.h
-	* splash/SplashT1FontFile.cc
-	* splash/SplashT1FontFile.h: T1 code is not supported, but at least
-	make it compile :-D
-
-2007-07-11  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c: Add a method to get the max length
-	allowed in text form fields.
-	
-2007-07-09  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Annot.cc:
-	* poppler/Annot.h: Render '*' instead of the actual content in
-	password form fields. Patch by Julien Rebetez <julien at fhtagn.net>
-	
-2007-07-07  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c: Add a method to get the type of a Form
-	Field Button.
-	
-2007-07-07  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Form.cc: Fix a crash when setting state on buttons that
-	don't have state.
-	
-2007-07-06  Albert Astals Cid <aacid at kde.org>
-
-	* goo/GooString.cc:
-	* poppler/ABWOutputDev.cc: Build on Sun Force compiler, patch by
-	Darren Kenny <darren.kenny at sun.com>
-	* poppler/Form.cc: Fix a bug with FormField's destructor which was not
-	checking if the FormField is terminal to determine wether it needs to
-	delete children or widgets. Patch by  
-	Julien Rebetez <julien at fhtagn.net>
-
-2007-07-05  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc: Allow to set NULL in form fields
-	that can contain text.
-	
-2007-07-05  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-attachment.cc:
-	* glib/poppler-attachment.h:
-	* glib/test-poppler-glib.c: Rename cdate and mdate again to ctime
-	and mtime, since they are public attributes and we don't want to
-	break the API.
-	
-2007-07-04  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-form.cc: QStringToGooString ->
-	QStringToUnicodeGooString has FormWidgetText::setContent wants to have
-	the unicode formated string
-	* qt4/src/poppler-private.h: create QStringToUnicodeGooString
-
-2007-07-04  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc: Convert strings from UTF8 to UTF16BE
-	before setting them.
-	
-2007-07-04  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-attachment.cc:
-	* glib/poppler-attachment.h: Add size, creation and modification
-	date and checksum properties to attachments. Fix memory leaks.
-	* glib/test-poppler-glib.c:
-	* glib/poppler.h:
-	* glib/poppler-private.h:
-	* glib/poppler-document.cc: Add a function to convert a pdf date
-	into a GTime that is used by attachments and document
-	properties. Fix memory leak in attachments.
-	
-2007-07-03  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Catalog.cc: Fix crash, embeddedFileNameTree.getName(i)
-	returns a reference to its own data so does not have to be deleted
-	* qt4/tests/poppler-attachments.cpp: Delete the doc, just for sake of
-	correctness
-	* qt4/tests/poppler-fonts.cpp: For the sake of completeness, add all
-	the enums
-
-2007-07-03  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c: Add choice_commit_on_change function
-	to glib bindings.
-	
-2007-07-03  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c: Fix a typo. 
-	
-2007-07-03  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h: Add size and checksum properties to the embeded
-	files
-	* qt4/src/poppler-embeddedfile.cc:
-	* qt4/src/poppler-qt4.h: Add size and checksum properties to the qt4
-	frontend
-
-2007-07-02  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c:
-
-	Use FILE_SELECT instead of FILESELECT and fix a typo. Patch by
-	Kouhei Sutou
-	
-2007-07-02  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/test-poppler-glib.c:
-
-	Add poppler_form_field_is_read_only to glib bindings. Patch by
-	Kouhei Sutou
-	
-2007-06-30  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc: Use poppler_page_transition_get_type
-	instead of poppler_page_transition which doesn't exist. Patch by
-	Kouhei Sutou
-	
-2007-06-30  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/Makefile.am:
-	* glib/poppler-form-field.cc:
-	* glib/poppler-form-field.h:
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c: Improve forms API in the glib bindings
-	in order to make it more consistent with the current API and
-	easier to use.
-	
-2007-06-26  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Form.cc: Don't crash on documents with AcroForm but no
-	AcroForm->Fields (it's mandatory but...)
-
-2007-06-23  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* poppler/Annot.cc:
-	* poppler/Form.cc: Fix memory leaks. 
-
-2007-06-20  Albert Astals Cid <aacid at kde.org>
-
-	* glib/poppler-document.cc: Allow access to a document's metadata stream
-	through the glib binding. Patch by Jason Kivlighn
-	<jkivlighn at gmail.com> Approved by Carlos
-	
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-document.cc: Allow access to a document's metadata contents
-	from the qt4 binding. Based on patch by Jason Kivlighn
-	* qt4/tests/test-poppler-qt4.cpp: Print metadata if it exists
-
-2007-06-15  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/ABWOutputDev.cc: Replaces the getBiggestSeperator function
-	at the ABWoutputdev with one that is easier to read/debug
-	and less likely to contain bugs. Some cosmetic fixes at the
-	functions recursiveXYC and splitnodes. Patch by
-	Jauco Noordzij <jauco.noordzij at gmail.com>. More info at bug #11273
-
-2007-06-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/ABWOutputDev.cc
-	* poppler/ABWOutputDev.h: Remove dependency on debugxml. Patch by
-	Jauco Noordzij <jauco.noordzij at gmail.com>. Fixes bug #11187
-
-2007-06-13  Albert Astals Cid <aacid at kde.org>
-
-	* goo/FixedPoint.h
-	* goo/gmem.h
-	* poppler/SecurityHandler.h
-	* poppler/poppler-config.h.in
-	* utils/ImageOutputDev.h:
-	Patch by Axel Howind <Axel.Howind at htp-tel.de>
-	- include USE_EXCEPTIONS and USE_FIXEDPOINT in poppler-config.h.in
-	- fix typo (MULTITHREADED/MULTITHREADING) in poppler.config.h.in
-	- change installed headers to include poppler-config.h instead of
-	config.h
-	- use <poppler/poppler-config.h> instead of <poppler-config.h> so that
-	installed headers can be used without including .../include/poppler
-	in the include path
-
-2007-06-13  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac: Fix detection of glib
-
-2007-06-11  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/CMap.h:
-	* poppler/CharCodeToUnicode.h:
-	* poppler/GlobalParams.h:
-	* poppler/PageLabelInfo.h:
-	* poppler/UnicodeMap.h: Further include cleanup. Patch by Axel Howind
-	on bug #11228
-
-2007-06-11  Pino Toscano <pino at kde.org>
-
-	* qt/poppler-qt.h
-	* qt4/src/poppler-qt4.h: Headers cleanup
-
-2007-06-09  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Annot.cc: Fix leak
-
-2007-06-07  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/ABWOutputDev.cc: Change "and", "or", "not" to "&&", "||",
-	"!" for consistency with the rest of the code. Patch by Jens Granseuer
-
-2007-06-01  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/ArthurOutputDev.cc
-	* splash/SplashFTFont.cc
-	* splash/SplashMath.h: Make it compile with --enable-fixedpoint. Fixes
-	bug 11110
-
-2007-05-30  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac: Fix to check for glib-2.0 not glib that is 1.0. Patch
-	came though Pardus developers and they don't remember where they got
-	it from.
-
-2007-05-30  Albert Astals Cid <aacid at kde.org>
-
-	* utils/HtmlFonts.cc: Make pdftohtml not pollute stdout. Patch by
-	Nanning Buitenhuis <nanning at elvenkind.com>
-
-2007-05-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/gen-unicode-tables.py: Add this script to fix distcheck.
-
-2007-05-27  Carlos Garcia Campos <carlosgc at gnome.org>
-
-	* glib/test-poppler-glib.c: Add forms test
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	Fix indentation, some code cleanups and memory leaks.
-
-2007-05-27  Carlos Garcia Campos <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	Add missing image mapping type definition. 
-
-2007-05-27  Albert Astals Cid <aacid at kde.org>
-
-	* poppler-qt.pc.in:
-	* poppler-qt4.pc.in:
-	* qt/Makefile.am:
-	* qt4/src/Makefile.am: Install qt3 and qt4 headers in separate dirs.
-	That way be can reuse poppler-page-transition.h and distros don't get
-	conflicts when making separate qt3 and qt4 packages
-	* configure.ac:
-	* NEWS: Bump release to 0.5.9 (0.6 Release Candidate)
-
-2007-05-26  Albert Astals Cid <aacid at kde.org>
-	
-	* qt4/src/poppler-link-extractor.cc: Use correct page box to extract
-	link clickable area
-	* qt4/src/poppler-link-extractor-private.cc:
-	* qt4/src/poppler-link-extractor-private.h:
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-link.h: Return link coordinates in 0..1 range
-	instead of 0..size, much more easier to do user<->dev transformations
-	* qt4/src/poppler-private.h: Fix indentation
-
-2007-05-25  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GfxFont.cc:
-	* poppler/GfxFont.h:
-	* poppler/GlobalParams.cc:
-	Don't cache DisplayFontParams by font name, instead cache them
-	in GfxFont. Fixes #8140.
-
-2007-05-25  Carlos Garcia Campos <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.h:
-	Add selection style parameter to render_selection in order to allow
-	requesting selections of words and paragraphs. 
-
-2007-05-23  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h:
-	Better handle the setting of the vector antialiasing for Splash.
-	* qt4/src/Mainpage.dox:
-	* qt4/src/poppler-link.h:
-	* qt4/src/poppler-qt4.h:
-	A few of API documentation fixes and improvements.
-
-2007-05-21   Carlos Garcia Campos <carlosgc at gnome.org>
-
-	* glib/poppler-action.cc: Fix assert in bug 11023
-
-2007-05-21   Kouhei Sutou <kou at cozmixng.org>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	poppler_page_render_section() for cairo. Bug 7023
-
-2007-05-21   Carlos Garcia Campos <carlosgc at gnome.org>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c:
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Extend CairoOutputdev to do
-	image caching when rendering
-
-2007-05-21  Pino Toscano <pino at kde.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Annot.cc: avoid crashing if the font for the drawing methods
-	can not be found
-	* poppler/Form.cc: fix memory leak
-	* qt4/src/poppler-private.h: fix the UnicodeParsedString function to
-	really work and not crash
-	* splash/SplashTypes.h: RGB8X mode makes max number of components in
-	any SplashColor always be 4
-
-2007-05-17  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-link.cc:
-	Give some default values to LinkDestination
-	* qt4/src/poppler-private.h:
-	Fix memory leak when converting QString -> GooString
-
-2007-05-12  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Annot.cc: Only do appearance generation for text, choice or
-	other fields that contain text. Patch by Julien Rebetez.
-
-2007-05-07  Albert Astals Cid <aacid at kde.org>
-
-	* Catalog.cc: Fix leak
-	* Form.cc: Fix leak, provide empty FormPageWidgets::~FormPageWidgets
-	implementation
-	* Page.cc: Fix leak
-
-2007-05-01  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Makefile.am: Don't link cairo to all poppler, just to
-	poppler_cairo so when compiling the qt frontend and the glib frontend
-	the qt one does not end up depending on cairo
-
-2007-04-29  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/UnicodeTypeTable.cc: Make some of the unicode tables const
-	which gets rid of about 20k of data.
-
-		   text	   data	    bss	    dec	    hex	filename
-	before: 1415838	 128864	      8	1544710	 179206	libpoppler.so
-	after:	1404574	 140128	      8	1544710	 179206	libpoppler.so
-
-2007-04-29  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/SplashOutputDev.cc:
-	* qt/poppler-private.h:
-	* qt4/src/poppler-private.h:
-	* splash/Splash.cc:
-	* splash/SplashBitmap.cc:
-	* splash/SplashTypes.h: Rename splashModeRGBX8 to splashModeXBGR8 and
-	hopefully fix qt frontends image generation
-
-2007-04-28  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-ps-converter.cc:
-	* qt4/src/poppler-qt4.h: Replace Document::print function with lots of
-	arguments with a helper class with lots of functions. Will help
-	mantaining BC in case we decide to add more functionality to the
-	printing process.
-
-2007-04-28  Albert Astals Cid <aacid at kde.org>
-
-	* glib/poppler-document.h:
-	* poppler/FontInfo.h:
-	* qt/poppler-qt.h:
-	* qt4/src/poppler-qt4.h: GfxFontType changed, adapt enums of the
-	frontends and helper classes.
-
-2007-04-28  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-annotation.h:
-	Make the header clean.
-
-2007-04-28  Pino Toscano <pino at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	Hopefully fix the calculation of the image size when rendering using
-	ArthurOutputDev.
-
-2007-04-28  Pino Toscano <pino at kde.org>
-
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-link-extractor-private.h:
-	* qt4/src/poppler-link-extractor.cc:
-	* qt4/src/poppler-page-private.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h:
-	Getting the links of a page now is not more dependant on the current
-	output device, and can be done anytime; thus, the doLinks parameter
-	of the Page::render() can be dropped.
-
-2007-04-28  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/*: Stop requyring users to declare UNSTABLE_POPPLER_QT4
-
-2007-04-28  Carlos Garcia Campos <carlosgc at gnome.org>
-	reviewed and some code by: Albert Astals Cid <aacid at kde.org>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c:
-	* poppler/Makefile.am:
-	* poppler/PageTransition.cc:
-	* poppler/PageTransition.h:
-	* qt/poppler-page-transition.cc:
-	* qt/poppler-page-transition.h: Move Page Transition parsing from qt
-	frontends to poppler core. Expose Page transitions on the glib
-	frontend.
-
-2007-04-27  Albert Astals Cid <aacid at kde.org>
-
-	* glib/poppler-page.cc:
-	* poppler/PSOutputDev.cc:
-	* poppler/PSOutputDev.h:
-	* qt/poppler-document.cc:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-qt4.h:
-	* utils/pdftohtml.cc:
-	* utils/pdftops.cc:
-	Add option to force rasterizing the pages when printing them
-	Add functionality to output the title field on the PS file
-	Only Qt4 frontend exposes the functionality
-
-2007-04-26  Albert Astals Cid <aacid at kde.org>
-
-	* goo/Makefile.am: Remove duplicate gmem.h
-
-2007-04-25  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc: remove a delete[] no longer needed
-	* qt4/src/poppler-private: initilize m_hints
-
-2007-04-25  Albert Astals Cid <aacid at kde.org>
-
-	* ChangeLog:
-	* configure.ac:
-	* fofi/FoFiTrueType.cc:
-	* fofi/FoFiTrueType.h:
-	* fofi/FoFiType1.cc:
-	* fofi/FoFiType1C.cc:
-	* fofi/FoFiType1C.h:
-	* glib/poppler-action.cc:
-	* glib/poppler-document.cc:
-	* glib/poppler-page.cc:
-	* goo/FixedPoint.cc:
-	* goo/FixedPoint.h:
-	* goo/GooString.cc:
-	* goo/GooString.h:
-	* goo/Makefile.am:
-	* goo/gfile.cc:
-	* goo/gmem.cc:
-	* goo/gmem.h:
-	* poppler/ABWOutputDev.cc:
-	* poppler/ABWOutputDev.h:
-	* poppler/Annot.cc:
-	* poppler/Annot.h:
-	* poppler/ArthurOutputDev.cc:
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h:
-	* poppler/CharCodeToUnicode.cc:
-	* poppler/DCTStream.cc:
-	* poppler/DCTStream.h:
-	* poppler/Decrypt.cc:
-	* poppler/Decrypt.h:
-	* poppler/Dict.cc:
-	* poppler/Dict.h:
-	* poppler/FontInfo.cc:
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	* poppler/Function.cc:
-	* poppler/Function.h:
-	* poppler/Gfx.cc:
-	* poppler/Gfx.h:
-	* poppler/GfxFont.cc:
-	* poppler/GfxFont.h:
-	* poppler/GfxState.cc:
-	* poppler/GfxState.h:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/JBIG2Stream.cc:
-	* poppler/JBIG2Stream.h:
-	* poppler/JPXStream.cc:
-	* poppler/JPXStream.h:
-	* poppler/Lexer.cc:
-	* poppler/Link.cc:
-	* poppler/Link.h:
-	* poppler/Makefile.am:
-	* poppler/Object.cc:
-	* poppler/Object.h:
-	* poppler/Outline.cc:
-	* poppler/OutputDev.cc:
-	* poppler/OutputDev.h:
-	* poppler/PDFDoc.cc:
-	* poppler/PDFDoc.h:
-	* poppler/PSOutputDev.cc:
-	* poppler/PSOutputDev.h:
-	* poppler/PSTokenizer.cc:
-	* poppler/Page.cc:
-	* poppler/Page.h:
-	* poppler/PageLabelInfo.cc:
-	* poppler/Parser.cc:
-	* poppler/Parser.h:
-	* poppler/PreScanOutputDev.cc:
-	* poppler/PreScanOutputDev.h:
-	* poppler/SecurityHandler.cc:
-	* poppler/SecurityHandler.h:
-	* poppler/SplashOutputDev.cc:
-	* poppler/SplashOutputDev.h:
-	* poppler/Stream.cc:
-	* poppler/Stream.h:
-	* poppler/TextOutputDev.cc:
-	* poppler/TextOutputDev.h:
-	* poppler/XRef.cc:
-	* poppler/XRef.h:
-	* qt/poppler-document.cc:
-	* qt/poppler-page-transition.cc:
-	* qt/poppler-page.cc:
-	* qt/poppler-private.h:
-	* qt4/src/poppler-annotation-helper.h:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-embeddedfile.cc:
-	* qt4/src/poppler-form.cc:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h:
-	* splash/Splash.cc:
-	* splash/Splash.h:
-	* splash/SplashBitmap.cc:
-	* splash/SplashBitmap.h:
-	* splash/SplashClip.cc:
-	* splash/SplashClip.h:
-	* splash/SplashFTFont.cc:
-	* splash/SplashFTFont.h:
-	* splash/SplashFTFontEngine.cc:
-	* splash/SplashFTFontEngine.h:
-	* splash/SplashFTFontFile.cc:
-	* splash/SplashFTFontFile.h:
-	* splash/SplashFont.cc:
-	* splash/SplashFont.h:
-	* splash/SplashFontEngine.cc:
-	* splash/SplashFontEngine.h:
-	* splash/SplashFontFile.cc:
-	* splash/SplashFontFile.h:
-	* splash/SplashMath.h:
-	* splash/SplashPath.cc:
-	* splash/SplashPath.h:
-	* splash/SplashPattern.cc:
-	* splash/SplashPattern.h:
-	* splash/SplashScreen.cc:
-	* splash/SplashScreen.h:
-	* splash/SplashState.cc:
-	* splash/SplashState.h:
-	* splash/SplashT1Font.cc:
-	* splash/SplashT1Font.h:
-	* splash/SplashT1FontEngine.cc:
-	* splash/SplashT1FontFile.cc:
-	* splash/SplashT1FontFile.h:
-	* splash/SplashTypes.h:
-	* splash/SplashXPath.cc:
-	* splash/SplashXPath.h:
-	* splash/SplashXPathScanner.cc:
-	* splash/SplashXPathScanner.h:
-	* utils/HtmlOutputDev.cc:
-	* utils/HtmlOutputDev.h:
-	* utils/pdffonts.cc:
-	* utils/pdfinfo.cc:
-	* utils/pdftoabw.cc:
-	* utils/pdftohtml.cc:
-	* utils/pdftoppm.cc:
-	* utils/pdftops.cc:
-	* utils/pdftotext.cc:
-	Merge xpdf 3.02 changes
-
-2007-04-15  Pino Toscano <pino at kde.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-private.h:
-	Add the information about the open/close item in the DOM tree
-	of the TOC.
-
-2007-04-15  Albert Astals Cid <aacid at kde.org>
-
-	* utils/HtmlFonts.cc: Fix rendering of text colors on complex mode.
-	* utils/pdftohtml.cc: Fix rendering of links.
-
-2007-04-07  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* utils/pdftoabw.cc: Fixing passing the wrong type
-	to fprintf. Patch by Kouhei Sutou. Fixes #10554.
-
-2007-04-06  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/ABWOutputDev.cc:
-	* utils/pdftoabw.cc: Fix a number of issues with the new AbiWord code:
-		*) Allows you to save to a file other than stdout
-		*) Checks for error conditions when reading the PDF doc and
-		   writing the ABW doc
-		*) Removes dead code in pdftoabw.cc
-		*) Fixes a SEGV I encountered when converting my new home's floor plan
-		*) Returns proper error conditions should the conversion fail for any reason
-	Patch by Dominic Lachowicz
-
-2007-04-05  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PSOutputDev.cc: Readd code wrongly removed when doing the
-	GlobalParams cleaning
-
-2007-04-03  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* configure.ac:
-	* poppler/ABWOutputDev.cc:
-	* poppler/ABWOutputDev.h:
-	* poppler/Makefile.am:
-	* utils/Makefile.am:
-	* utils/pdftoabw.cc: Add AbiWord output device and pdftoabw program.
-	Patch by Jauco Noordzij. Autotools stuff by Dominic Lachowicz.
-
-2007-03-22  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Gfx.cc: Accept reals for width and height of images. Fixes
-	KDE bug 143322
-
-2007-03-15  Albert Astals Cid <aacid at kde.org>
-
-	* glib/Makefile.am: Make it build with BSD/Make. Patch by
-	Henry Precheur <henry at precheur.org>
-
-2007-03-07  Carlos Garcia Campos <carlosgc at gnome.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-        * poppler/Page.cc: Consider 0x0 boxes as invalid. Fixes
-	http://bugzilla.gnome.org/show_bug.cgi?id=408682
-
-2007-03-06  Pino Toscano <pino at kde.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-       * configure.ac:
-       * qt/Makefile.am:
-       * qt/poppler-link.cc:
-       * qt/poppler-page.cc:
-       * qt/poppler-private.h:
-       * qt4/poppler-link.cc:
-       Make the Qt4 frontend compilable again with no Splash.
-       Make the Qt3 frontend compilable with no Splash.
-
-2007-03-06  Julien Rebetez  <julien at fhtagn.net>
-	reviewed by: <aacid at kde.org>
-
-	* poppler/Annot.cc:
-	* poppler/Form.cc:
-	Fix uninitialized variables.
-	Properly escape parenthesis and slash in text field.
-
-2007-03-06  Brad Hards  <bradh at kde.org>
-
-	* configure.ac
-	* m4/qt.m4
-	* poppler/Makefile.am
-	* qt4/src/Makefile.am
-	* qt4/tests/Makefile.am
-	Switch to using pkg-config to find Qt4.
-
-2007-02-25  Julien Rebetez  <julienr at svn.gnome.org>
-	reviewed by: Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Annot.cc:
-	* poppler/Annot.h:
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	Fix compilation warnings.
-
-2007-02-25  Pino Toscano <pino at kde.org>
-            reviewed by: Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/Doxyfile:
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-annotation-helper.h:
-	* qt4/src/poppler-form.cc:
-	* qt4/src/poppler-form.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h:
-		Beginning of interactive forms support, first implementation in the
-		Qt4 frontend. It supports text and choice fields in a basic way.
-
-2007-02-25  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac:
-	* glib/poppler-document.cc:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/PSOutputDev.cc:
-	* qt/poppler-document.cc:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h:
-	* test/gtk-splash-test.cc:
-	* test/pdf-inspector.cc:
-	* utils/pdffonts.cc:
-	* utils/pdfimages.cc:
-	* utils/pdfinfo.cc:
-	* utils/pdftohtml.cc:
-	* utils/pdftoppm.cc:
-	* utils/pdftops.cc:
-	* utils/pdftotext.cc: Remove dependency on xpdfrc file and cleanup
-	                      GlobalParams accordingly
-
-2007-02-25  Julien Rebetez  <julienr at svn.gnome.org>
-            reviewed by: <aacid at kde.org>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	* poppler/Annot.cc:
-	* poppler/Annot.h:
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h:
-	* poppler/CharCodeToUnicode.cc:
-	* poppler/CharCodeToUnicode.h:
-	* poppler/Dict.cc:
-	* poppler/Dict.h:
-	* poppler/Form.cc:
-	* poppler/Form.h:
-	* poppler/GfxFont.cc:
-	* poppler/GfxFont.h:
-	* poppler/Makefile.am:
-	* poppler/Object.h:
-	* poppler/Page.cc:
-	* poppler/Page.h:
-	* poppler/XRef.cc:
-	* poppler/XRef.h:
-		Beginning of Interactive Form support:
-		Add a bunch of new classes (FormWidget / FormField) to deal with form
-		fields.
-		Add support for object modification through XRef::setModifiedObject, as
-		well as a function to write the Xref to a file, which will be used
-		to implement PDF writing.
-		Add some functions to glib wrapper to expose the new form features.
-
-2007-02-18  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac: Change {datadir}/poppler to {datarootdir}/poppler so
-	that i get /usr/local/share/poppler in config.h instead of
-	${prefix}/poppler Better fixes are welcome.
-
-2007-02-04  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Lexer.cc:
-	* poppler/Lexer.h: Patch to fix regression introduced by optimizations
-	in bugzilla issue 7808
-
-2007-01-31  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	Patch by Pino Toscano <pino at kde.org> to remove a nonsense done by him.
-
-	* qt4/tests/test-poppler-qt4.cpp:
-	Simply a bit. Patch by Pino Toscano <pino at kde.org>.
-
-2007-01-31  Albert Astals Cid <aacid at kde.org>
-
-	* m4/qt.m4: Fix Qt4 detection on Mac. Patch by Benjamin Reed 
-	<ranger at befunk.com>
-
-2007-01-28  Albert Astals Cid <aacid at kde.org>
-
-	* glib/poppler-document.cc: Plug memory leak in poppler-document.
-	Patch by Carlos Garcia Campos <carlosgc at gnome.org>
-	* glib/poppler-page.cc: Make link mapping coordinates follow page
-	rotation. Patch by Carlos Garcia Campos <carlosgc at gnome.org>
-	* glib/poppler-action.cc: Fix link destination coordinates. Patch by
-	Carlos Garcia Campos <carlosgc at gnome.org>
-
-2007-01-21  Albert Astals Cid <aacid at kde.org>
-
-	* poppler-document.cc:
-	* poppler-page.cc:
-	* poppler-private.h:
-	* poppler-qt4.h:
-	No need to destroy the Splash output device to change its paper color.
-	Add the possibility to set flags that affect the rendering (some
-	backends supports only some of them, though).
-	Add a Page::label to get the label associated with a page.
-	Patches by Pino Toscano <pino at kde.org>.
-
-2007-01-17  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Sound.h:
-	* poppler/Sound.cc:
-	* qt4/src/poppler-sound.cc: Move most of the sound reading code
-	into the Sound class, so frontends can use it easily.
-	Patch by Pino Toscano <pino at kde.org>.
-
-2007-01-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Stream.h:
-	* poppler/Stream.cc: Remove MemStream::setNeedFree method i really did
-	not need it
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h: Make Document::loadFromData work on
-	documents with a password and don't need to do a malloc and a memcpy.
-
-2007-01-13  Albert Astals Cid <aacid at kde.org>
-
-	* configure.ac
-	* poppler/Makefile.am
-	* qt4/src/Makefile.am
-	* qt4/src/poppler-document.cc
-	* qt4/src/poppler-link.cc
-	* qt4/src/poppler-page.cc
-	* qt4/src/poppler-private.h
-	* qt4/src/poppler-qt4.h: Make the Qt4 frontend compilable even with
-	no Splash backend. Patch by Pino Toscano <pino at kde.org>.
-
-2007-01-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Stream.h:
-	* poppler/Stream.cc: Add MemStream::setNeedFree method
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h: Add Document::loadFromData method
-
-2007-01-11  Albert Astals Cid <aacid at kde.org>
-
-	* goo/gmem.c: Merge change from xpdf-3.01pl2
-
-2007-01-11  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Catalog.h:
-	* poppler/Catalog.cc: Limit max depth of recursive calls on
-	readPageTree to fix MOAB-06-01-2007
-
-2007-01-06  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Sound.cc
-	* qt4/src/poppler-link.cc
-	* qt4/src/poppler-link.h
-	* qt4/src/poppler-page.cc
-	* qt4/src/poppler-sound.cc: Patch by Pino Toscano
-	<pino at kde.org> to fix some memory leaks when dealing with sounds.
-
-2007-01-04  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-private.h: gmallocn -> new[]
-
-2007-01-04  Albert Astals Cid <aacid at kde.org>
-
-	* qt/poppler-page-transition.cc: Fix memory leak. Patch by 
-	Tobias Koenig <tokoe at kde.org>
-
-2006-12-30  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-document.cc: Add const & to some parameters. Patch
-	by Pino Toscano <pino at kde.org>
-
-2006-12-29  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/UGooString.cc: Patch by Pino Toscano
-	<pino at kde.org> so that QStringToUGooString does not crash.
-
-2006-12-28  Brad Taylor  <brad at getcoded.net>
-	
-	* poppler/glib/poppler-document.h:
-	* poppler/glib/poppler-document.cc: Add poppler_document_new_from_data
-	  to allow loading PDFs out of memory.
-
-2006-12-28  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-embeddedfile.cc:
-	* qt4/src/poppler-document.cc:
-	* qt/poppler-document.cc: Fix memory leaks.
-
-2006-12-28  Albert Astals Cid <aacid at kde.org>
-
-	* goo/GooString.cc
-	* goo/GooString.h
-	* goo/gmem.c
-	* goo/gmem.h
-	* poppler/Lexer.cc
-	* poppler/Lexer.h
-	* poppler/PageLabelInfo.cc
-	* poppler/Parser.cc
-	* poppler/UGooString.cc
-	* poppler/UGooString.h: Patch by Krzysztof Kowalczyk
-	<kkowalczyk at gmail.com> to improve performance.
-	See bug 7808 for details.
-
-2006-12-28  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Annot.cc:
-	* poppler/Annot.h: Add type checking to processing of "Rect". Patch by
-	Scott Turner <scotty1024 at mac.com>
-
-2006-12-27  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Catalog.h:
-	* qt4/src/poppler-qt4.h: Remove , after last value of enum. Thanks to
-	André Wöbbeking
-
-2006-12-26  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc: Add Page::duration() function to the qt4
-	frontend.
-
-2006-12-26  Albert Astals Cid <aacid at kde.org>
-
-	* glib/test-poppler-glib.c:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* poppler/Page.cc:
-	* poppler/Page.h: Implement /Dur entry in page object. Patch by Carlos
-	Garcia Campos <carlosgc at gnome.org>
-
-2006-12-23  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PSTokenizer.cc: Enhance PSTokenizer::getToken performance.
-	Patch by Scott Turner <scotty1024 at mac.com>. In a random pdf i tested
-	the patchs improves PSTokenizer::getToken performance by 15%
-
-2006-12-23  Albert Astals Cid <aacid at kde.org>
-
-	* qt/poppler-page.cc: Fix memory leak in Page::textList. Patch by
-	Jerry Epplin <jepplin at globalvelocity.com>
-
-	* poppler/Page.cc: Fix memory leak when reading a wrong color map in a
-	thumbnail. Patch by Scott Turner <scotty1024 at mac.com>
-
-2006-12-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Fix scaling of maskedImage masks. They
-	should be scaled to the size of the image not the size of the mask.
-	Fixes #9403.
-
-2006-12-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc: Try to make zero-width lines as close to
-	one pixel wide as we can. Fixes #9393.
-
-2006-12-19  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/SplashOutputDev.cc: Fix gray calculation. Patch by Scott
-	Turner <scotty1024 at mac.com>
-
-2006-12-12  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Change a cairo_set_matrix to 
-	cairo_transform so that we don't blindly clobber the existing matrix.
-	Patch by Daniel Colascione.
-	Fixes #9190.
-
-2006-12-09  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Function.cc: Initialize PostScriptFunction::codeString to
-	NULL so that it can safely deleted if initialization fails.
-	Fixes #9263.
-
-2006-11-23  Albert Astals Cid <aacid at kde.org>
-
-	* m4/libjpeg.m4: Make JPEG library header search work under MSYS.
-	Patch by Alexis	Wilke
-
-2006-11-19  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-textbox.cc: Fix memory leaks
-	* splash/Splash.cc: Initialize the values of nClipRes
-
-2006-11-18  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc
-	* qt4/src/poppler-qt4.h: Add int marginRight, int marginBottom, int
-	marginLeft, int marginTop, bool strictMargins to Document::print()
-
-2006-11-15  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/Mainpage.dox:
-	* qt4/src/Doxyfile:
-	* qt4/src/poppler-annotation.h:
-	* qt4/src/poppler-link.h:
-	* qt4/src/poppler-qt4.h: Improve API documentation. Patch by
-	Pino Toscano.
-
-2006-11-15  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h: Generalize the way we render the pages:
-	merge all the Page::renderTo* functions in only one that renders on
-	a QImage, taking into account the currently chosen backend.
-	It is possible to switch rendering backend using the Document.
-	Patch by Pino Toscano.
-
-	* qt4/tests/stress-poppler-qt4.cpp:
-	* qt4/tests/test-password-qt4.cpp:
-	* qt4/tests/test-poppler-qt4.cpp: Adapt the tests to the changes in
-	the rendering API of Page. Patch by Pino Toscano.
-
-2006-11-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/ArthurOutputDev.cc: Small fix to get colors right
-
-2006-11-11  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/PSOutputDev.cc: Fix typo when outputing PS scale
-
-2006-11-07  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: take horizontal scaling into account
-	when updating the font. Also, cleanup some unused code. Fixes #8924.
-
-2006-10-18  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h: Do not crash when opening a
-	encrypted document. Do not crash when unlocking a locked
-	document.
-
-2006-10-12  Albert Astals Cid <aacid at kde.org>
-
-	* splash/Splash.cc:
-	* splash/SplashErrorCodes.h: Do not crash on documents that report a
-	0x0 mask for an image, like
-	http://bugs.kde.org/attachment.cgi?id=18083&action=view
-
-2006-10-08  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Link.cc:
-	* poppler/Link.h:
-	* poppler/Makefile.am:
-	* poppler/Page.cc:
-	* poppler/Page.h:
-	* poppler/Sound.cc:
-	* poppler/Sound.h: Make poppler able to read Sound objects, Sound
-	actions and Opening/Closing page actions. Patch by Pino Toscano.
-
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-link.h:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-sound.cc: Support for sounds, sound links and page
-	actions in the Qt4 backend. Patch by Pino Toscano.
-
-2006-09-30  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc: PA is optional, H is a name not a string
-
-2006-09-25  Albert Astals Cid <aacid at kde.org>
-
-	* glib/Makefile.am
-	* qt/Makefile.am
-	* qt4/src/Makefile.am
-	* qt4/tests/Makefile.am
-	* test/Makefile.am
-	* utils/Makefile.am: Add FONTCONFIG_CFLAGS FONTCONFIG_LIBS for people
-	that need them. Patch by morfoh at opensde.org. Fixes bug #8415
-
-2006-09-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Update list of bugs fixes, release 0.5.4.
-
-	* configure.ac: Check for gtk+ 2.8 for the gtk+ test case, invert
-	help text for zlib option (#7788, #7661).
-
-	* utils/pdftops.cc: Get duplex setting from GlobalParams.
-
-	* glib/poppler-page.cc (_poppler_page_new): Make PopplerPage
-	reference its document throughout the lifetime of the page (#7005).
-
-	* poppler/Gfx.cc: Remove the right out->updateAll() call.
-
-2006-09-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Sum up changes.
-
-	* configure.ac: Bump release to 0.5.4.
-
-	* poppler/Gfx.cc: Remove last remnant of erroneous type3 commit a
-	while back, fixing #8182.
-
-2006-09-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/TextOutputDev.cc: TextFontInfo stores a copy of a pointer
-	to a GfxFont but does not increment the reference count. Fix the
-	problem by calling incRefCnt and decRefCnt appropriately. Fixes #4649
-
-2006-09-19  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/GlobalParams.cc: Add scanEncodingDirs() to automatically
-	scan in any encodings found under ${datadir}/poppler.
-
-	* m4/define-dir.m4: New file, adds AC_DEFINE_DIR macro.
-
-2006-09-13  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Makefile.am (libpoppler_la_LIBADD): Add cairo libs to
-	link if configured.
-
-	* configure.ac: Tighten glib check (#7906), add check for C++
-	compiler (#8048).
-
-2006-09-11  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-annotation.cc:
-	* qt4/src/poppler-annotation.h:
-	* qt4/src/poppler-page.cc: Add support for LinkAnnotation. Patch by
-	Pino Toscano
-
-2006-09-08  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: The work-around for 1x1 imagemasks was
-	not calling cairo_set_source causing the rectangles to be drawn
-	the wrong colour occasionally. Fix by moving the existing call to
-	cairo_set_source above the work-around. Fixes #7113.
-
-2006-09-06  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Avoid crashing in CairoOutputDev if
-	endString is called without a corresponding beginString. Fixes #4515.
-
-2006-09-06  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* configure.ac:
-	* poppler/FlateStream.cc:
-	* poppler/FlateStream.h: Fix FlateStream to not read more than it
-	needs. This has a performance impact because our input buffer is now
-	only 1 byte large, however correctness is better than performance.
-	This should fix #3948.
-
-2006-09-04  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Initialize currentFont to NULL before
-	use. Found by Pascal Terjan. Fixes #7924.
-
-2006-09-03  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Dict.cc:
-	* poppler/Dict.h:
-	* poppler/Object.h:
-	* poppler/Parser.cc: Patch by Krzysztof Kowalczyk to increase speed by
-	means of doing less copies between objects. See bug 8112 for more
-	information.
-
-2006-08-25  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-private.h: Init m_fontInfoScanner to NULL. Discovered by
-	Rafael Rodríguez <rafael.rodriguez.tf at gmail.com>
-
-2006-08-16  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-page.cc: Report correct page size. Backport from Qt4
-	frontend. Patch by Wilfried Huss
-
-2006-08-16  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac: Add a warning saying zlib code is not perfect.
-
-2006-08-11  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Catalog.cc: Fix leak
-
-2006-08-10  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/SplashOutputDev.cc: Try to fix refs to fonts yet again.
-
-2006-08-05  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Catalog.cc: The name array can contain references to strings
-	instead of stings themselves, or at least PDF of
-	https://bugs.freedesktop.org/show_bug.cgi?id=7780 does. This makes it
-	work with that file
-	* qt4/src/poppler-embeddedfile.cc: Use UGooString for description
-
-2006-08-05  Albert Astals Cid  <aacid at kde.org>
-
-	* utils/pdftotext.cc:
-	* utils/pdfinfo.cc:
-	* utils/pdffonts.cc: Add the posibility of reading a file from stdin.
-	Patch by Dom Lachowicz
-
-2006-08-03  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac: Use the correct variable to output the utils status.
-	Patch by Dom Lachowicz
-
-2006-07-30  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/GfxState.cc: make nGfxBlendModeNames define return the
-	correct size of the gfxBlendModeNames array so it does not access
-	invalid memory areas when the blend mode is not found. Discovered by
-	Krzysztof Kowalczyk
-
-2006-07-29  Albert Astals Cid  <aacid at kde.org>
-
-	* splash/SplashFontEngine.cc:
-	* poppler/SplashOutputDev.cc: Fix memory leak when using embedded
-	fonts in the pdf file. Patch by Krzysztof Kowalczyk
-
-2006-07-29  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac: Disable qt and qt4 frontends if splash backend is
-	disabled
-
-2006-07-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc: Don't set font matrix translation
-	(fix from Behdad Esfahbod).
-
-2006-07-27  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Stream.cc: If you are going to test a variable, better
-	initialize it first ;-) Fixes bug 7646
-
-2006-07-26  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-document.cc:
-	* qt/poppler-private.h:
-	* qt/poppler-qt.h: Port the QDomDocument *Document::toc() const method
-	from the qt4 frontend to the qt frontend. Patch by Wilfried Huss
-
-2006-07-25  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc: Obey kdeprint masters in that a library
-	should output as much device independent PS as posible, so disabling
-	duplex printing for default is a good idea.
-
-2006-07-24  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac:
-	* poppler/Makefile.am: Move fontconfig dependency to libpoppler.
-
-2006-07-18  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Gfx.cc: fix opCloseStroke to match the behaviour of
-	a separate opClose and opStroke. Previously, opCloseStroke only
-	closes if there is a path however opClose closes unconditionally.
-
-2006-07-18  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/TextOutputDev.cc: call setDefaultCTM() after start page
-	like in Gfx.cc. This fixes a regression caused by the fix to #6948.
-
-2006-07-16  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/GfxState.cc: Do not crash when we can not
-	parse a GfxImageColorMap
-	Fixes crash on pdf that can be found at
-	http://bugs.kde.org/show_bug.cgi?id=130846
-
-2006-06-28  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/DCTStream.cc:
-	* poppler/DCTStream.h: Reset jpeg structures on reset.
-	Fixes crash while printing pdf at
-	http://bugs.kde.org/attachment.cgi?id=16818&action=view
-
-2006-06-25  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-document.cc
-	* qt/poppler-qt.h
-	* qt4/src/poppler-document.cc
-	* qt4/src/poppler-qt4.h: Ask for paper size width and height to pass
-	it to PSOutputDev
-
-2006-06-25  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/Makefile.am
-	* qt/poppler-document.cc
-	* qt/poppler-page.cc
-	* qt/poppler-private.h
-	* qt/poppler-qt.h
-	* qt/poppler-link.cc
-	* qt/poppler-link.h: Adding link support to Qt3 frontend, patch by  
-	Wilfried Huss based on Qt4 code
-
-2006-06-11  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/UGooString.cc: When any of the chars that we
-	are passing to the UGooString is not pdfencodable, do not
-	encode the string, because we loose information if we do,
-	this fixes rendering of 
-	http://publikationen.ub.uni-frankfurt.de/volltexte/2005/890/pdf/TR_abs_g.pdf
-	and other docs with type3 fonts and ligatures
-
-2006-06-01  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc: Add Rotation parameter that is  passed
-	to the respective output devs
-
-2006-06-01  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-document.cc:
-	* qt/poppler-qt.h: Add printing support, patch by  
-	Stefan Kebekus <stefan.kebekus at math.uni-koeln.de>
-
-2006-06-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/PSOutputDev.cc:
-	* poppler/PSOutputDev.h: Change filename parameter to PSOutputDev
-	constructor from char * to const char *.
-
-2006-05-31  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/SplashOutputDev.cc:
-	* splash/Splash.cc: Fix splashModeRGB8Qt mode, that is, make it
-	show images
-
-2006-05-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* TODO: Remove items's from my list that are done.
-
-2006-05-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Change the cairo backend to use the
-	transformation in cairo instead of doing all of the transformations in
-	the OutputDevice. Fixes #6948.
-
-2006-05-31  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Sum up changes.
-
-	* configure.ac: Bump release to 0.5.3.
-
-2006-05-30  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler-glib.pc.in: 
-	* configure.ac: Add poppler as a private requires if pkg-config
-	supports it.
-
-2006-05-30  Kristian Høgsberg  <krh at redhat.com>
-
-	* test/gtk-cairo-test.cc: Add --page option to gtk-cairo-test.
-
-2006-05-29  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoFontEngine.cc:
-	* poppler/CairoFontEngine.h:
-	* poppler/CairoOutputDev.cc: Allow CairoFont creation to fail more
-	gracefully. Fixes #4030.
-
-2006-05-27  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Back out the rest of krh's type3
-	font work. This fixes type3 fonts in CairoOutputDevice.
-
-2006-05-21  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/SplashOutputDev.cc:
-	* qt4/src/poppler-private.h:
-	* splash/Splash.cc:
-	* splash/SplashBitmap.cc:
-	* splash/SplashTypes.h: bring splashModeRGB8 back to the old code
-	(before Frank's patch), create splashModeRGB8Qt that has Frank's 
-	codepath and is used by Qt frontends. Fixes corruption on
-	other programs expecting the old behaviour.
-
-2006-05-23  Kristian Høgsberg  <krh at redhat.com>
-
-	* qt4/src/Makefile.am (libpoppler_qt4_la_SOURCES): Add missing
-	poppler-annotation-helper.h.
-
-2006-05-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Bump release.
-	* NEWS: Sum up changes.
-
-2006-05-22  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Rainer Keller to fix the ImageOutputDev (#6984).
-	
-	* utils/ImageOutputDev.cc (drawImage): Upate to work with new
-	16-bit color representation.
-
-	* utils/ImageOutputDev.h: Return gTrue for needNonText().
-
-2006-05-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc:
-	* poppler/CairoFontEngine.h: Back out type3 font work committed by
-	accident.
-
-2006-05-21  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	* qt/src/poppler-page.cc: Swap byte order on bigendian machines.
-	Thanks a lot to Jonathan Riddell <jr at jriddell.org> for letting me use
-	his minimac for	testing
-
-2006-05-19  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-action.h: 
-	* glib/poppler-action.cc: Add poppler_dest_get_type(), patch from
-	Kouhei Sutou (#6907).
-
-	* poppler-glib.pc.in (Requires): Add gdk-2.0 dependency, from
-	Kouhei Sutou (#6896).
-
-	* glib/poppler-document.h (POPPLER_TYPE_INDEX_ITER)
-	(POPPLER_TYPE_FONTS_ITER): Add these macros, patch from Kouhei
-	Sutou (#6897).
-
-	* glib/Makefile.am (INCLUDES): Add define for G_LOG_DOMAIN, from
-	Kouhei Sutou (#6899).
-
-	* glib/poppler-document.cc (poppler_document_save): Memleak patch
-	from Paolo Borelli (#6908).
-
-2006-05-19  Kristian Høgsberg  <krh at redhat.com>
-	
-	* TextOutputDev.h:
-	* TextOutputDev.cc:
-	* UnicodeTypeTable.h:
-	* UnicodeTypeTable.cc:
-	* UnicodeCClassTables.h:
-	* UnicodeCompTables.h:
-	* UnicodeDecompTables.h:
-	* gen-unicode-tables.py: Patch from Ed Catmur (#2929) to convert
-	search string and document text to unicode NFKC (compatibility
-	composition) before matching so ligatures match correctly.
-
-2006-05-19  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix the
-	rotation bug for real.
-
-2006-05-19  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Kouhei Sutou (#6905).
-	
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-private.h:
-	* glib/reference/tmpl/poppler-private.sgml:
-	* glib/reference/tmpl/poppler.sgml: Make PopplerPSOutput a proper
-	glib object.
-
-2006-05-19  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix
-	rotation bug (#6913, #6926).
-
-	Memory leak patch from Carlos Garcia Campos (#6947).
-
-	* glib/poppler-action.cc:
-	* glib/poppler-document.cc:
-	* glib/poppler-page.cc:
-	* poppler/CairoFontEngine.cc:
-	* poppler/CairoFontEngine.h:
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h:
-	* poppler/Gfx.cc:
-	* poppler/TextOutputDev.cc:  Fix various memory leaks.
-
-2006-05-19  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-link.cc: Patch by Pino Toscano, ensure the
-	splashoutput is created when parsing the TOC.
-
-2006-05-14  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/FontInfo.cc: Fix possible crash, half patch 
-	by Kouhei Sutou <kou at cozmixng.org>
-
-2006-05-13  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/GfxState.cc:
-	* poppler/GfxState.h: Fix memleak, patch by
-	        Carlos Garcia Campos <carlosgc at gnome.org>
-
-2006-05-13  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc: leak--
-	* qt4/src/poppler-private.h: Refcount globalparams
-	* qt4/tests/test-poppler-qt4.cpp: Some leaks less
-
-2006-05-12  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/Makefile.am
-	* qt4/src/poppler-annotation-helper.h
-	* qt4/src/poppler-annotation.cc
-	* qt4/src/poppler-annotation.h
-	* qt4/src/poppler-link.cc
-	* qt4/src/poppler-link.h
-	* qt4/src/poppler-page.cc
-	* qt4/src/poppler-qt4.h: Code for annotations stripped from oKular,
-	it's all based on Enrico's work, so ask him for details, the problem
-	is that he left KDE development a while ago.
-	
-
-2006-05-09  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-link.cc:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h: Adding links extraction code, should work as
-	  it is basically stripped out from kpdf
-
-2006-05-05  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Catalog.cc: Fix memleak, patch by  
-	Carlos Garcia Campos <carlosgc at gnome.org>
-
-2006-05-05  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Function.cc: quick fix for KDE bug #126760
-
-2006-05-04  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc: Implement search functionality 
-
-2006-05-02  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc:
-	* poppler/Gfx.cc:
-	* poppler/GfxFont.cc:
-	* poppler/GfxFont.h:
-	* poppler/GfxState.cc:
-	* poppler/TextOutputDev.cc: Patch from Gary Coady to add reference
-	counting to GfxFont so we don't crash on text selection (#4481).
-
-2006-05-01  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-textbox.cc: Add nextWord(), hasSpaceAfter() and
-	edge() to TextBox
-
-2006-05-01  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h: Add the possibility of setting the paper
-	color
-
-2006-04-29  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/JBIG2Stream.cc: fix memory leak. Bug 6765, reported by
-	Kjartan Maraas.
-
-2006-04-27  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: delete imgStr if some of the cairo
-	functions fail. Fixes coverty reports #2106, #2107, #2077 and 
-	bug #6764. Patch by Kjartan Maraas.
-
-2006-04-23  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-private.h: Protect us against a link not having
-	a destination or a namedDestination
-
-2006-04-18  Albert Astals Cid <aacid at kde.org>
-
-	* goo/GooVector.h: Fix typo that was preventing build with MSVC8
-	Discovered by Reece Dunn <msclrhd at hotmail.com>
-
-2006-04-16  Carlos Garcia Campos  <carlosgc at gnome.org>
-
-	* glib/poppler-action.cc:
-	* glib/poppler-action.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	Add support for named destinations and named actions.
-	
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	Allow to find named destinations in document.
-	
-2006-04-12  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Add support for masked images to the cairo
-	backend. CairoOutputDevice really should have been refactored before
-	committing this, but the results were so pretty I couldn't resist.
-	Fixes #6174.
-
-2006-04-12  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Fix breakage by krh by only calling
-	cairo_destroy on non-null.
-
-2006-04-11  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac:
-	* poppler-glib.pc.in:
-	* glib/Makefile.am:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.h:
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h:
-	* glib/poppler-features.h.in:
-	Make the CairoOutputDev render to a cairo_t instead of a
-	cairo_surface_t and expose that functionality in the glib wrapper
-	(poppler_page_render).
-
-	* test/Makefile.am:
-	* test/gtk-cairo-test.cc:
-	Update gtk-cairo-test to use this new interface and add a spin
-	button for changing page (#5951).
-
-	* utils/Makefile.am (EXTRA_DIST): Fix warning where this was
-	assigned twice.
-	
-2006-04-10  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: take originX and originY into account in
-	drawChar() to draw vertical text properly. Fixes #6551.
-
-2006-04-09  Albert Astals Cid <aacid at kde.org>
-
-	* m4/qt.m4: Improve for systems that need -pthread to be linked when
-	linking Qt. Patch by Diego Pettenò
-
-2006-04-08  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Makefile.am:
-	* qt4/src/Makefile.am: Don't link Qt4 in libpoppler when using Qt4 frontend
-	Patch by Stefan Schweizer
-
-2006-04-05  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/JBIG2Stream.cc: Fix for some buggy JBIG2 documents, patch by
-	Raj Kumar and Paul Walmsley. Fixes bug 6500
-
-2006-04-05  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: use a separate matrix for the softmask.
-	fixes #6492.
-
-2006-04-04  Albert Astals Cid <aacid at kde.org>
-
-	* splash/Splash.cc:
-	* splash/SplashBitmap.cc: Make Splashbitmap RGB8 use 32bits internally
-	* qt/poppler-page.cc:
-	* qt4/src/poppler-page.cc: Adapt to splashbitmap change so copying to
-	QImage is faster.
-	Patch by Frank Meerkötter slightly modified by Albert Astals Cid
-
-2006-04-04  Albert Astals Cid <aacid at kde.org>
-
-	* splash/SplashFTFont.cc: Fix crash when using fixedpoint math. Patch
-	by Frank Meerkoetter
-
-2006-04-02  Albert Astals Cid <aacid at kde.org>
-
-	* m4/qt.m4: Add QtXml lib to Qt4 binding as now it's needed
-	* qt4/src/poppler-document.cc: Add the possibility to get the toc of
-	a file, print it to PS and get a LinkDestination from a "symbolic" name
-	* qt4/src/poppler-page.cc: Add the possibility of getting the defaultCTM
-
-2006-04-01  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/XRef.cc: Fix parsing of some TOCs, bug was due a int to uint
-	comparison, sorry for introducing that bug. Fixes bug 6454
-
-2006-03-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-page.cc: Avoid strdup in poppler_page_get_property and
-	make code cleaner. Combined with the memleak fix closes #6187.
-	Patch by chpe.
-
-2006-03-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-page.cc: Fix memory leak in poppler_page_get_text
-	Patch by chpe.
-
-2006-03-20  Albert Astals Cid <aacid at kde.org>
-
-	* qt/poppler-document.cc:
-	* qt4/src/poppler-document.cc: Use UGooString for dates, fixes KDE
-	bug 123938
-
-2006-03-20  Carlos Garcia Campos  <calosgc at gnome.org>
-
-	reviewed by: Jeff Muizelaar <jeff at infidigm.net>
-
-	* glib/poppler-document.cc: Fix memory leak in poppler_font_info_free
-
-2006-03-20  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoFontEngine.h: remove unused variables
-
-2006-03-19  Albert Astals Cid <aacid at kde.org>
-
-	* utils/HtmlOutputDev.[cc|h]: Fix broken code
-
-2006-03-16  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/Page.cc: Remove a #ifdef that was never defined (nice to
-	have so sucky W args), probably came from gpdf (it's not on xpdf
-	sources) and was causing bugs 6079 and 6167
-
-2006-03-16  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/FontInfo.cc: Embedded fonts don't have a font file
-
-2006-03-14  Albert Astals Cid <aacid at kde.org>
-
-	* qt4/src/poppler-qt4.h: Fix compilation with gcc4.1, patch by  
-	Michael Olbrich
-
-2006-03-11  Albert Astals Cid <aacid at kde.org>
-
-	* poppler/FontInfo.cc:
-	* poppler/FontInfo.h: Add getFile() function that returns
-	the path of the font that is beign used in the system to
-	represent that font
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-fontinfo.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h: Add the file() function
-	* qt4/tests/poppler-fonts.cpp: Show the path of the font
-	used to represent each font
-
-2006-03-09  Albert Astals Cid <aacid at kde.org>
-
-	* glib/Makefile.am: Build with cairo disabled, patch by Eduardo de
-	Barros Lima
-
-2006-02-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Bump release to 0.5.1.
-
-	* NEWS: Sum up 0.5.1 changes so far.
-
-	* TextOutputDev.h: add getters for a couple of attributes.
-	
-	* glib/Makefile.am: 
-	* poppler/Makefile.am: Move cairo link dependency to glib bindings.
-
-2006-02-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* goo/gmem.c: (gmalloc), (grealloc):
-	* poppler/JBIG2Stream.cc:
-	* poppler/Stream.cc:
-	* poppler/Stream.h:
-	* splash/SplashXPathScanner.cc:
-
-	More integer overflow fixes from Derek Noonburg (#5922).
-
-2006-02-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/PSOutputDev.cc: Make PSOutputDev constructor respect
-	passed in paper size (#5946, #5749).
-
-2006-02-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc (info_dict_get_string): Refactor
-	_popper_goo_string_to_utf8() out into it's own function.
-
-	* glib/poppler-page.cc (poppler_page_get_property): Use
-	_popper_goo_string_to_utf8() here to convert ucs2 page labels.
-
-	* glib/poppler-page.cc (poppler_page_get_selection_region): Add
-	braces to fix warning.
-
-	* poppler/PageLabelInfo.cc: If the label prefix string has a ucs2
-	marker, append the number part of the label as ucs2 (#5952).
-
-2006-02-25  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Object.cc: Fix warning
-
-2006-02-23  Albert Astals Cid  <aacid at kde.org>
-
-	* utils/Makefile.am: Do not build pdftoppm when SplashOutputDev is
-	disabled as that does not work
-
-2006-02-18  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h:
-	* poppler/GfxState.cc:
-	* poppler/GfxState.h: Add support for drawSoftMaskedImage to
-	CairoOutputDev. Ugly but works.
-
-2006-02-16  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Work around cairo bug when scaling
-	1x1 bitmaps. Fixes #3387. Also gives a performance improvement.
-
-2006-02-16  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/Makefile.am:
-	* qt/Makefile.am:
-	* poppler/Makefile.am:
-	* glib/Makefile.am: Update soname as we are not really compatible
-	anymore with previous releases that had soname 0.0.0
-
-2006-02-13  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/ArthurOutputDev.cc: Make it compile after changing code so
-	we did not pass files to freetype but buffers
-
-2006-02-13  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/PSOutputDev.cc: Commit setupExternalCIDTrueTypeFont patch
-	kpdf got from Takashi Iwai (SuSe) a long time ago
-
-2006-02-06  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac:
-	* goo/FixedPoint.h:
-	* splash/Splash.cc:
-	* splash/SplashTypes.h: Various fixes from Frank Meerkötter to enable
-	fixedpoint arithmetic
-
-2006-02-06  Albert Astals Cid  <aacid at kde.org>
-	
-	* poppler/Annot.cc: Fix small leaks
-	* poppler/JBIG2Stream.cc: Remove check improving as really did not
-	improve anything
-	
-2006-02-05  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Gfx.cc: Fix small leak
-	* poppler/GfxFont.cc: I needed that guard in kpdf to fix a crash and
-	it surely does not hurt
-	* poppler/JBIG2Stream.cc: Improve check (comes from kpdf)
-	* poppler/SplashOutputDev.cc: Unneeded var--
-
-2006-02-04  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Gfx.cc:
-	* poppler/OutputDev.cc:
-	* poppler/OutputDev.h: Let output devices know about pdf grouping
-	operators.
-	Patch by Thorkild Stray.
-
-2006-02-04  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc: Check all fonts returned by fontconfig.
-	Discard the ones that are not truetype or type1. Fixes #5758.
-	Patch by Ed Catmur.
-
-2006-02-04  Albert Astals Cid  <aacid at kde.org>
-
-	* utils/Makefile.am:
-	* utils/pdftoppm.cc: Actually create pdftoppm patch by Stefan
-	Schweizer
-	* utils/pdf2xml.dtd: Added a DTD of the xml pdftohtml creates patch by
-	Stefan Schweizer
-	* poppler/SplashOutputDev.cc: Remove bug from "do not use an external
-	file to pass fonts to Freetype" patch, patch by Stefan Schweizer
-		
-
-2006-02-02  Albert Astals Cid  <aacid at kde.org>
-
-	* splash/SplashXPathScanner.cc: CVE-2006-0301 fix by Derek (xpdf man
-	itslef) got though Dirk Mueller of KDE security team
-
-2006-02-02  Albert Astals Cid  <aacid at kde.org>
-
-	* fofi/FoFiTrueType.cc:
-	* fofi/FoFiTrueType.h:
-	* fofi/FoFiType1C.h:
-	* goo/gfile.cc:
-	* poppler/GfxFont.cc:
-	* poppler/GfxFont.h:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/SplashOutputDev.cc:
-	* splash/SplashFTFontEngine.cc:
-	* splash/SplashFTFontEngine.h:
-	* splash/SplashFTFontFile.cc:
-	* splash/SplashFTFontFile.h:
-	* splash/SplashFontEngine.cc:
-	* splash/SplashFontEngine.h:
-	* splash/SplashFontFile.cc:
-	* splash/SplashFontFile.h:
-	* splash/SplashT1FontEngine.cc:
-	* splash/SplashT1FontFile.cc:
-	* splash/SplashT1FontFile.h: Merge patch to not use external file
-	  when passing the font to Freetype, original patch by Takashi Iwai
-	  adapted by me to kpdf rediffed by Stefan Schweizer against poppler
-	  cvs
-
-2006-01-31  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc (GlobalParams::getDisplayFont):
-	Allow ttc fonts to be used.
-
-2006-01-28  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* glib/poppler-attachment.h: fix compile by adding <time.h> include.
-	Acked-by: Jonathan Blanford <jrb at redhat.com>
-
-2006-01-26  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc: Patch from Christian Krause; handle
-	0-width lines (#5545).
-
-Tue Jan 24 01:19:40 2006  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/Makefile.am:
-	* glib/poppler-attachment.cc:
-	* glib/poppler-attachment.h:
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c:
-	* glib/reference/tmpl/poppler-enums.sgml:
-	* glib/reference/tmpl/poppler-unused.sgml: glib bindings for the
-	embedded file support.  It doesn't support mtime and ctime yet,
-	but the rest works.
-
-2006-01-23  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac:
-	* poppler/GlobalParams.cc:
-	* poppler/poppler-config.h.in:
-	* utils/pdftohtml.cc:
-	* utils/pdftops.cc: Respect command line paper size settings (#5641).
-	Drop the built-in paper sizes.
-
-2006-01-23  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/test-poppler-glib.c (print_document_info, print_index):
-	Move variable declarations to top (#5692).
-
-	* utils/*.cc: Move config.h #include to top of #include's (#5693).
-
-	* splash/SplashFTFont.cc: Don't use deprecated freetype include
-	files.
-
-2006-01-21  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* TODO: Add my todo list.
-
-2006-01-18  Albert Astals Cid  <aacid at kde.org>
-
-	* glib/poppler-action.cc:
-	* glib/poppler-document.cc:
-	* poppler/Annot.cc:
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h:
-	* poppler/Dict.cc:
-	* poppler/Dict.h:
-	* poppler/FontInfo.cc:
-	* poppler/Function.cc:
-	* poppler/Gfx.cc:
-	* poppler/GfxFont.cc:
-	* poppler/GfxState.cc:
-	* poppler/Link.cc:
-	* poppler/Link.h:
-	* poppler/Makefile.am:
-	* poppler/Object.h:
-	* poppler/Outline.cc:
-	* poppler/PDFDoc.cc:
-	* poppler/PDFDoc.h:
-	* poppler/PSOutputDev.cc:
-	* poppler/Page.cc:
-	* poppler/PageLabelInfo.cc:
-	* poppler/Parser.cc:
-	* poppler/SecurityHandler.cc:
-	* poppler/Stream.cc:
-	* poppler/XRef.cc:
-	* qt/poppler-document.cc:
-	* qt/poppler-page-transition.cc:
-	* qt4/src/Makefile.am:
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-qt4.h:
-	* qt4/tests/Makefile.am:
-	* utils/HtmlOutputDev.cc:
-	* utils/pdffonts.cc:
-	* utils/pdfinfo.cc:
-	* utils/pdftohtml.cc:
-	* utils/pdftotext.cc: Brad patch for embedded document extraction,
-	only has Qt4 bindings for now, needs Qt3 and glib work
-
-2006-01-18  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-page-transition.h:
-	* qt4/src/Doxyfile: Add some more documentation to PageTransition,
-	patch by Stefan Kebekus
-
-2006-01-18  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/CharCodeToUnicode.cc: Fix check for length that was not
-	having into account that there could be \n or \r in tokens an that
-	those do not have to be took into account. Fixes
-	http://bugs.kde.org/show_bug.cgi?id=120310
-
-2006-01-17  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Lexer.cc:
-	* poppler/Lexer.h:
-	* poppler/Parser.cc:
-	* poppler/Parser.h:
-	* poppler/XRef.cc:
-	* poppler/XRef.h: When doing the parsing check with XREF we did not
-	grow too much. Fixes serialata10a.pdf
-
-2006-01-12  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/GlobalParams.cc: Make buildFcPattern() static.
-
-2006-01-11  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/JBIG2Stream.cc:
-	* poppler/Stream.cc: Merge patch to fix CVE-2005-3624,
-	CVE-2005-3625 and CVE-2005-3627 issues.
-
-2006-01-10  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac:
-	* m4/qt.m4: Fix bugs created when splitting the code from
-	configure.ac, take QTDIR into account when looking for QtTestLib and
-	do not die if it is not found as it is not mandatory
-	* qt/poppler-page-transition.cc:
-	* qt/poppler-page.cc:
-	* qt/poppler-private.h:
-	* qt4/tests/Makefile.am:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/Makefile.am: Fix mess created my the moving and renaming of
-	PageTransition.cc
-
-2006-01-10  Kristian Høgsberg  <krh at redhat.com>
-
-	* splash/Makefile.am: Only install splash headers if
-	--enable-xpdf-headers is given.
-
-	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Set this here.
-
-2006-01-10  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h:
-	Fix the following fixme in CairoOutputDevice.
-
-	// FIXME: This is quite right yet, we need to accumulate all
-	// glyphs within one text object before we clip.  Right now this
-	// just add this one string.
-
-	The fix uses a strategy similar to the one the Splash backend.
-	textClipPath is used to store the appended path from each call to
-	endString(). The accumulated path is clipped in endTextObject.
-
-2006-01-08  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Don't try and load type3 fonts (#4030).
-
-2006-01-08  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Page.cc: use colToByte for reading thumbnails (#5420).
-	
-	Patch by Nickolay V. Shmyrev.
-
-2006-01-07  Jeff Muizelaar <jeff at infidigm.net>
-
-	* poppler/CairoOutputDev.cc: Initialize (fill|stroke)_opacity.
-
-2006-01-06  Kristian Høgsberg  <krh at redhat.com>
-
-	* qt/poppler-page.cc:
-	* qt/poppler-private.h:
-	* qt/poppler-qt.h:
-	* qt4/src/Makefile.am: 
-	* qt/Makefile.am: 
-	* poppler/Makefile.am: Move PageTransition to qt bindings, move
-	contents from Private.h to qt/poppler-private.h.
-
-	* poppler/TextOutputDev.cc (visitWord): Remove #warning.
-
-	* utils/Makefile.am (pdfimages_SOURCES): Add ImageOutputDev.h, use
-	dist_man1_MANS so we actually dist the man pages.
-
-	* goo/Makefile.am (poppler_goo_include_HEADERS): Add GooVector.h.
-
-	* glib/reference/Makefile.am: DOC_SOURCE_DIR must be relative to
-	$(srcdir), fix this to make distchek run.
-
-	* m4/qt.m4:
-	* m4/libjpeg.m4: 
-	* acinclude.m4:
-	* configure.ac: Split out Qt and libjpeg checks from configure.ac
-	and acinclude.m4 to m4/qt.m4 and m4/libjpeg.m4.
-
-2006-01-06  Albert Astals Cid  <aacid at kde.org>
-	
-	* poppler/DCTStream.cc: Fix handling of malformed jpeg streams like
-	the one at http://bugs.kde.org/show_bug.cgi?id=119569 
-
-2006-01-02  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-page.cc:
-	* qt/poppler-qt.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-qt4.h: Introduce variants of renderTo that return a
-	QImage and do not use a QPixmap so threading is possible.
-	
-2006-01-02  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/PageTransition.cc: Use error() insted of std::cerr
-
-Sun Jan  1 18:50:51 2006  Jonathan Blandford  <jrb at redhat.com>
-
-	* Makefile.am:
-	* autogen.sh:
-	* configure.ac:
-	* gtk-doc.make:
-	* glib/Makefile.am: enable gtk-doc support.
-
-2006-01-01  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-private.h:
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-document.cc: Don't create a SplashOutputDev for
-	every splashRenderToPixmap
-	* qt/poppler-page.cc:
-	* qt/poppler-private.h: Don't create a SplashOutputDev for every
-	renderToPixmap.
-
-Sun Jan  1 15:32:08 2006  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/reference/*: More gtk-doc work.  Not enabled for building
-	by default, but filled in.
-
-Fri Dec 30 21:08:33 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/*{cc,h}: Update inline doc comments.  This is in
-	preparation for gtk-doc support.
-
-2005-12-30  Albert Astals Cid  <aacid at kde.org>
-
-	* utils/HtmlOutputDev.cc:
-	* utils/ImageOutputDev.cc: Fix build when using --disable-libjpeg
-
-2005-12-28  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-private.h (Poppler): delete passwords after we've
-	initialised the PDFDoc
-
-	* qt4/src/poppler-qt4.h: Add warning about deleting the Document
-	when done.
-
-	* qt4/tests/check_*.cpp: Delete the Poppler::Document
-	and Poppler::Page objects to avoid leaks 
-
-	* qt4/tests/check_version.cpp: removed, there is a replacement
-	automated test.
-
-	* qt4/tests/poppler-fonts.cpp (main): Delete Poppler::Document on exit
-	to avoid a memory leak.
-
-	* qt4/tests/stress-poppler-qt4.cpp: Delete Poppler::Document and
-	Poppler::Page objects to avoid leaks.
-
-	* qt4/src/poppler-document.cc (Poppler): Delete *doc in 
-	Document::load(), to avoid a memory leak on failure.
-	Delete font results list, avoid a memory leak
-	Delete font scanner object, avoid a memory leak
-
-2005-12-27  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-qt4.h: 
-	* qt4/src/poppler-document.cc: add convertDate() function that
-	turns char* PDF date strings into QDateTime. This version handles
-	the timezone conversions. Refactored the existing date() method
-	to use it.
-	* qt4/tests/check_dateConversion.cpp: unit tests for convertDate()
-	* qt4/tests/check_metadata.cpp: update to reflect UTC.
-	* qt4/tests/.cvsignore: suppress check_dateConversion
-	
-	* qt4/src/Doxyfile (JAVADOC_AUTOBRIEF): Turned on automatic
-	\brief mode.
-
-	* qt4/src/poppler-qt4.h: Update API documentation. Patch from
-	Stefan Kebekus, with some changes. Removed \brief entries.
-
-2005-12-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Sum up 0.5 changes so far.
-
-	* acinclude.m4: Split jpeg macros out into this file.
-
-	* poppler/Stream.cc: Apply latest CVE-2005-3191 updates.
-
-2005-12-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* utils/Makefile.am: Add parseargs.h to sources and add
-	-I$(top_srcdir)/poppler to INCLUDES.
-
-	* poppler/CairoFontEngine.cc: Apply patch from Hiroyuki Ikezoe to
-	man non-embedded CJK fonts work.
-
-2005-12-18  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac: Better jpeg detection, refer to ml PCbsd problem
-	* utils/Makefile.am: Add fontconfig cflags to utils as not always is
-	on /usr/include Fixes build problems on Slackware. Patch adapted from
-	a Giovanni Venturi patch.
-	* poppler/Page.cc: Only discard cropbox sizes one by one and not
-	completely. Jeff and Martin were right.
-	
-2005-12-12  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Page.cc: Ignore cropBox if it seems incorrect.
-
-2005-12-12  Kristian Høgsberg  <krh at redhat.com>
-
-	* Makefile.am:
-	* configure.ac:
-	* goo/GooVector.h:
-	* utils/HtmlFonts.cc:
-	* utils/HtmlFonts.h:
-	* utils/HtmlLinks.cc:
-	* utils/HtmlLinks.h:
-	* utils/HtmlOutputDev.cc:
-	* utils/HtmlOutputDev.h:
-	* utils/ImageOutputDev.cc:
-	* utils/ImageOutputDev.h:
-	* utils/Makefile.am:
-	* utils/parseargs.c:
-	* utils/parseargs.h:
-	* utils/pdffonts.1:
-	* utils/pdffonts.cc:
-	* utils/pdfimages.1:
-	* utils/pdfimages.cc:
-	* utils/pdfinfo.1:
-	* utils/pdfinfo.cc:
-	* utils/pdftohtml.1:
-	* utils/pdftohtml.cc:
-	* utils/pdftoppm.1:
-	* utils/pdftoppm.cc:
-	* utils/pdftops.1:
-	* utils/pdftops.cc:
-	* utils/pdftotext.1:
-	* utils/pdftotext.cc: Add command line utilities from xpdf.
-
-2005-12-10  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/tests/test-poppler-qt4.cpp: The parameters x,y,w,h to the
-	method splashRenderToPixmap are now used. Convenient
-	defaults are provided. The test has been changed accordingly. Some
-	added documentation. Patch by Stefan Kebekus
-	
-2005-12-09  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/GfxState.cc: Use colToByte() for converting GxfColorComp
-	to bytes (really fix #5117).
-
-	* poppler/Stream.cc: Remove duplicated check (#5243).
-
-	* configure.ac: 
-	* poppler/Makefile.am (poppler_includedir): 
-	* goo/Makefile.am (poppler_goo_include_HEADERS): Make installation
-	of xpdf header files optional.
-
-2005-12-08  Albert Astals Cid  <aacid at kde.org>
-
-	* configure.ac: Detect if gettimeofday is available, fixes for correct
-	linking to Qt4 on windows
-	* goo/GooTimer.[cc|h]: Only build if gettimeofday is available
-	* poppler/Gfx.cc: Only use the timer for profiling if gettimeofday is
-	available
-	* poppler/GlobalParams.cc: Remove extra unlockGlobalParams that was
-	making windows hang
-	* splash/SplashFTFontEngine.cc: i need unistd.h on windows also
-	* splash/SplashFontFile.cc: i need unistd.h on windows also
-
-2005-12-08  Albert Astals Cid  <aacid at kde.org>
-
-	* glib/Makefile.am:
-	* poppler/Makefile.am:
-	* qt/Makefile.am:
-	* test/Makefile.am: Remove -DDATADIR we are not using if for anything
-	and it shadows a windows typedef
-
-2005-12-07  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/PDFDoc.cc: Remove the version check.
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-qt4.h: add in a new method infoKeys() - to get
-	  metadata keys
-
-	* qt4/tests/check_metadata.cpp: add unit test for infoKeys().
-
-2005-12-06  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/check_metadata.cpp : add unit tests
-	for date, more linearization, page sizes, number of pages
-
-2005-12-05  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/check_fonts.cpp (checkType3): Add another case to fonts
-	unit test
-	(checkTrueType): Add test for TrueType as well.
-
-2005-12-04  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/CairoFontEngine.cc: Correct fix for #5149, i broke it when
-	merging xpdf 3.01 patches
-
-2005-12-04  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/JPXStream.cc: Fix error in merging CAN-2005-3193 fix. Thanks  
-	Daniel Gryniewicz for notifying
-
-2005-12-04  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-qt.h:
-	* qt/poppler-fontinfo.h:
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-fontinfo.cc: Implement copy constructor of FontInfo needed
-	as Q[Value]List<FontInfo> uses it when appending
-
-2005-12-04  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/.cvsignore: Add unit test to cvs suppressions
-
-	* qt4/src/poppler-qt4.h:
-	  qt4/src/fontinfo.cc: add implementation for
-	FontInfo::typeName()
-
-	* qt4/tests/check_fonts.cpp:
-	* qt4/tests/Makefile.am: add unit test for fonts
-
-	* qt4/src/Mainpage.dox: Minor typo fixes.
-
-2005-12-03  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_set_selection_alpha): Use
-	Nickolays original fix instead of trying to be clever with
-	gdk_pixbuf_fill().
-
-	* poppler/CairoFontEngine.cc: Fix text corruption bug (#5149),
-	a rerun of an old classic (#3340).
-
-	* poppler/GfxState.cc: Fixing another problem with new GfxRGB
-	representation causing images to show up as random pixels (#5117).
-
-2005-12-03  Kristian Høgsberg  <krh at redhat.com>
-
-	* qt/Makefile.am (noinst_PROGRAMS): Only build qt test program if
-	splash is enabled.
-
-	* poppler/CairoOutputDev.cc: Remove unused grid snapping code,
-	sidestepping #4507.
-
-	* glib/poppler-document.h (PopplerPermissions): Breaking enum
-	definition over multiple lines confuses glib-mkenums (#4600).
-
-	* poppler/Makefile.am (libpoppler_la_LIBADD): Add FREETYPE_LIBS
-	(#4515).
-
-	* poppler/TextOutputDev.cc: 
-	* qt/poppler-qt.h: GCC-4.1 fixes (#5031).
-
-2005-12-03  Kristian Høgsberg  <krh at redhat.com>
-
-	Fixes from Nickolay V. Shmyrev:
-	
-	* poppler/TextOutputDev.cc (TextLine::visitSelection,
-	TextBlock::visitSelection): Fix selection crash with zero-width
-	word boxes or zero-height line boxes (#4402).
-
-	* poppler/CairoOutputDev.h: Fix wrong cairo-ft.h include (#4413).
-
-	* poppler/CairoOutputDev.cc (eoFill, fill): 
-	* glib/poppler-page.cc (poppler_page_render_selection): Update to
-	work with new GfxColor definition and use
-	cairo_pattern_create_rgba() to cache cairo_pattern_t's for the
-	fill and stroke colors.
-
-	* glib/poppler-page.cc (poppler_page_set_selection_alpha): Zero
-	out pixbuf first.
-
-2005-12-03  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-document.cc:
-	* qt/poppler-private.h:
-	* qt/poppler-qt.h: Backported font retrieving from Qt4 frontend
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-fontinfo.cc:
-	* qt4/src/poppler-textbox.cc: Remove implementation of that classes
-	from the header, use pimpl
-
-2005-12-03  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	* qt4/src/Doxyfile:
-	* qt4/src/poppler-qt4.h:
-	* qt4/tests/test-poppler-qt4.cpp: Updated documentation and removed
-	some BC functions that were not needed as we still do not guarantee
-	BC. Patch by Stefan Kebekus
-
-2005-12-01  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/JPXStream.cc:
-	* poppler/Stream.cc:
-	* poppler/Stream.h: Fix CAN-2005-3193 based on
-	ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.01pl1.patch
-
-2005-11-28  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-page,cc:
-	* qt4/src/poppler-page-qt,h: Fix QPixmap contents generation messed
-	when doing the xpdf 3.01 transition
-	* qt4/tests/test-poppler-qt4.cpp: Use Splash backend by default, added
-	-arthur option to use the Arthur backend
-
-2005-11-27  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-qt4.h: add some missing API documentation
-
-	* qt4/tests: updated unit tests to use Qt4.1 version of
-	QTestlib.
-
-2005-11-25  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-page.cc:
-	* qt4/src/poppler-qt.h: Some more functions, patch by Stefan Kebekus
-
-2005-11-21  Albert Astals Cid  <aacid at kde.org>
-	
-	* test/pdf-inspector.cc: Fix page range
-
-2005-11-21  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/poppler-page.cc:
-	* qt/poppler-qt.h: Some more functions, patch by Stefan Kebekus
-
-2005-11-21  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/Makefile.am: Fix build problems some people were having
-
-2005-11-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/GfxState.cc: Fix the byte_lookup initialization broken
-	by the merges (#4350).  Modify GfxColorSpace::getRGBLine() to work
-	with new GfXColor type.
-
-2005-11-17  Albert Astals Cid  <aacid at kde.org>
-
-	* splash/SplashFTFont.cc: Make it compile using FreeType 2.2.0
-	preversions
-
-2005-11-04  Albert Astals Cid  <aacid at kde.org>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-page.cc: Make it compile using --disable-cairo-output
-
-2005-11-01  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/Stream.h:
-	* poppler/OutputDev.h: Comment some unused parameters to calm down
-	compiler warnings
-
-2005-10-30  Albert Astals Cid  <aacid at kde.org>
-
-	* glib/poppler-page.cc
-	* poppler/ArthurOutputDev.cc
-	* poppler/ArthurOutputDev.h
-	* poppler/CairoOutputDev.cc
-	* poppler/CairoOutputDev.h
-	* poppler/Gfx.cc
-	* poppler/Gfx.h
-	* poppler/GfxState.cc
-	* poppler/GfxState.h
-	* poppler/OutputDev.cc
-	* poppler/OutputDev.h
-	* poppler/PDFDoc.cc
-	* poppler/PDFDoc.h
-	* poppler/PSOutputDev.cc
-	* poppler/PSOutputDev.h
-	* poppler/Page.cc
-	* poppler/Page.h
-	* poppler/SplashOutputDev.cc
-	* poppler/SplashOutputDev.h
-	* poppler/TextOutputDev.cc
-	* poppler/TextOutputDev.h
-	* qt/poppler-page.cc
-	* qt4/src/poppler-page.cc
-	* splash/Splash.cc
-	* splash/Splash.h
-	* splash/SplashBitmap.cc
-	* splash/SplashBitmap.h
-	* splash/SplashPattern.cc
-	* splash/SplashPattern.h
-	* splash/SplashState.cc
-	* splash/SplashState.h
-	* splash/SplashTypes.h
-	* test/gtk-cairo-test.cc
-	* test/gtk-splash-test.cc
-	* test/pdf-inspector.cc: Last xpdf 3.01 merges
-	
-
-2005-10-16  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/poppler-config.h.in (GCC_PRINTF_FORMAT): Remove evil
-	space character in macro definition.
-
-2005-10-16  Albert Astals Cid  <aacid at kde.org>
-
-	* splash/SplashXPathScanner.cc: Merge from xpdf 3.01
-	* splash/SplashScreen.[cc|h]: Merge from xpdf 3.01
-	* splash/SplashFTFont.cc: Merge from xpdf 3.01
-	* poppler/Annot.[cc|h]: Merge from xpdf 3.01
-	* poppler/FontInfo.cc
-	* poppler/Page.cc:
-	* poppler/PSOutputDev.cc: Changes needed due to Annot changes
-	* poppler/Function.[cc|h]: Merge from xpdf 3.01
-	* poppler/Stream.[cc|h]: Merge from xpdf 3.01
-	* poppler/GfxFont.cc: Merge from xpdf 3.01
-	
-2005-10-05  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_render_to_ps): Fix another
-	off-by-one page number error (#4555).
-
-2005-09-26  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* glib/poppler-action.cc:
-
-	Initialize window title even if the action is unknown
-
-2005-09-26  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* glib/poppler-action.cc:
-	* glib/poppler-action.h:
-
-	Implement launch action
-
-2005-09-20  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/GlobalParams.[cc|h]: Merge from xpdf 3.01
-	* poppler/Link.cc: Merge from xpdf 3.01
-	* poppler/Parser.cc: Merge from xpdf 3.01
-	* poppler/TextOutputDev.[cc|h]: Merge from xpdf 3.01
-	* poppler/UnicodeMap.cc: More grealloc -> greallocn
-	* poppler/UnicodeTypeTable.cc: Merge from xpdf 3.01
-	* poppler/XRef.cc: Merge from xpdf 3.01
-
-2005-09-20  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/XRef.cc:
-
-	Remove duplicated initialization
-
-2005-09-20  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/GlobalParams.cc:
-
-	s/G/Goo in not yet compiled plugins code 
-
-2005-09-20  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/Makefile.am:
-
-	Add XPDFPlugin*. Thanks to TSDgeos that noticed this.
-
-	* poppler/XpdfPluginAPI.cc:
-
-	Fixup
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/PDFDoc.cc:
-	* poppler/PDFDoc.h:
-	* poppler/XRef.cc:
-	* poppler/XRef.h:
-
-	Merge more from 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/XRef.cc:
-
-	Merge some initialization that I lost before
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/XRef.cc:
-
-	Merge change from 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/CharCodeToUnicode.cc:
-	* poppler/CharCodeToUnicode.h:
-
-	Improvements from xpdf 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/CMap.cc:
-
-	Improvements from xpdf 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/NameToUnicodeTable.h:
-	* poppler/UnicodeTypeTable.cc:
-	* poppler/UnicodeTypeTable.h:
-
-	Merge some unicode table changes from xpdf 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/SplashOutputDev.h:
-	* splash/Splash.cc:
-	* splash/Splash.h:
-
-	Modified region support from xpdf 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* goo/Makefile.am:
-	* poppler/DCTStream.h:
-	* poppler/Decrypt.cc:
-	* poppler/Decrypt.h:
-	* poppler/FlateStream.h:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/Makefile.am:
-	* poppler/PDFDoc.cc:
-	* poppler/PDFDoc.h:
-	* poppler/Parser.cc:
-	* poppler/Parser.h:
-	* poppler/Stream.cc:
-	* poppler/Stream.h:
-	* poppler/XRef.cc:
-	* poppler/XRef.h:
-	* poppler/poppler-config.h.in:
-
-	Merge security plugins support from xpdf 3.01
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* configure.ac:
-	* goo/Makefile.am:
-	* splash/Makefile.am:
-	* splash/SplashFTFont.cc:
-	* splash/SplashMath.h:
-	* splash/SplashTypes.h:
-	* goo/FixedPoint.cc:
-	* goo/FixedPoint.h:
-
-	Merge support for fixed point
-
-2005-09-16  Marco Pesenti Gritti  <mpg at redhat.com>
-
-	* poppler/ArthurOutputDev.cc:
-	* poppler/CairoFontEngine.cc:
-	* poppler/TextOutputDev.cc:
-	* poppler/UnicodeMap.cc:
-
-	Use mallocn when possible
-
-2005-09-16  Albert Astals Cid  <aacid at kde.org>
-	* splash/: Some merges from xpdf 3.01
-
-2005-09-16  Albert Astals Cid  <aacid at kde.org>
-	* configure.ac
-	* splash/SplashFTFontEngine.[cc|h]
-	* poppler/CairoFontEngine.[cc|h]: Merge the xpdf 3.01 change that uses
-	runtime detection of freetype version
-
-2005-09-15  Albert Astals Cid  <aacid at kde.org>
-	* poppler/: Some minor merges from xpdf 3.01
-
-2005-09-14  Albert Astals Cid  <aacid at kde.org>
-	* fofi/
-	* poppler/PSOutputDev.[cc|h]: Merge all xpdf 3.01 changes in fofi
-
-2005-09-06  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Enable A4_PAPER and OPI_SUPPORT by default.  There
-	is no reason to not enable OPI and the paper size should be
-	controlled by the application.
-
-	* test/Makefile.am (EXTRA_DIST): Add pdf-operators.c
-
-2005-09-03  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/ :
-	* configure.ac: switch qt4 unit tests to use QtTestLib, a more
-	capable system, and easier to maintain.
-
-2005-09-02  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc: Apply Marcos rotation fix.
-
-2005-08-31  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/JArithmeticDecoder.cc
-	* poppler/JArithmeticDecoder.h
-	* poppler/JBIG2Stream.cc
-	* poppler/JBIG2Stream.h: merge in some of the JBIG2 changes from
-	xpdf 3.0.1.
-
-
-2005-08-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac (HAVE_FREETYPE_H): Patch from Hiroyuki Ikezoe: Set
-	HAVE_FREETYPE_217_OR_OLDER to 0 if we found freetype using
-	pkg-config (#4223).
-
-2005-08-28  Brad Hards  <bradh at frogmouth.net>
-
-	* fofi/FoFiTrueType.cc: 
-	* goo/GooHash.cc:
-	* goo/GooHash.h:
-	* goo/GooList.cc:
-	* goo/GooList.h:
-	* goo/GooString.cc:
-	* goo/GooString.h:
-	* goo/gmem.c: merge the Goo* improvements from xpdf 3.0.1. This
-	change is based on martink's work (7-xpdf-3.01-goo-improvements.patch)
-	with some tweaking by me.
-
-2005-08-27  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/FlateStream.cc: Fix predictor leak.
-
-2005-08-27  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* configure.ac: Disable the zlib-based decoder by default. See #3948.
-
-2005-08-27  Brad Hards  <bradh at frogmouth.net>
-
-	* Merge the gmalloc -> gmallocn changes from xpdf 3.0.1. This
-	change is based on martink's work (13-xpdf-3.01-goo-allocn.patch)
-	with some tweaking by me. There may be some residual gmallocn
-	changes still to be merged.
-
-2005-08-24  Martin Kretzschmar  <martink at gnome.org>
-
-	* configure.ac: add /usr/include/qt4 to qt4_incdirs. That's what
-	Debian and Ubuntu use. Maybe we should just use pkg-config. If
-	it's usable with qt4.
-
-	* test/.cvsignore: ignore pdf_inspector binary.
-
-2005-08-24  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/TextOutputDev.cc: Push rotation argument down to
-	GfxState constructor.  This is still not completely functional yet.
-
-	* glib/poppler-page.cc (poppler_page_render_selection): Add
-	rotation argument so API is useful.  Not yet implemented.
-	(poppler_page_prepare_output_dev): Patch from Marco to fix
-	rotation using the cairo backend.
-
-Tue Aug 23 17:21:02 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* test/Makefile.am (gtk_cairo_test_LDADD): add
-	FREETYPE_{CFLAGS,LIBS} to the cairo deps
-	
-Tue Aug 23 13:38:01 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* configure.ac:
-	* poppler/Gfx.cc:
-	* poppler/Gfx.h:
-	* poppler/GlobalParams.cc:
-	* poppler/GlobalParams.h:
-	* poppler/Makefile.am:
-	* poppler/OutputDev.cc:
-	* poppler/OutputDev.h:
-	* poppler/ProfileData.cc:
-	* poppler/ProfileData.h:
-	* test/Makefile.am:
-	* test/pdf-inspector.cc:
-	* test/pdf-inspector.glade:
-	* test/pdf-operators.c: Initial cut at a pdf inspector.  This
-	should help us look at PDF files.
-
-2005-08-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/test-poppler-glib.c: Patch from Marco to simplify the glib
-	rotation API.
-
-2005-08-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Makefile.am (INCLUDES): Add FREETYPE_CFLAGS.
-
-	* configure.ac: Make freetype check use pkg-config if possible.
-
-2005-08-17  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/GfxFont.cc: Add fix discussed in #3131 to only use the
-	MacRoman char map if the font has one or the font dicts specifies
-	/MacRoman.
-
-2005-08-08  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/PDFDoc.cc: Improve the checking for %%EOF
-
-2005-08-06  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h: Use GdkColor for specifying selection
-	colors, we alreay depend on GDK anyway.
-
-2005-08-06  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/PDFDoc.cc: Increase the range for searching %%EOF up to
-	the 1024 bytes pdf spec says adobe checks for, needed
-	to work with http://bugs.kde.org/show_bug.cgi?id=110034 and some other
-	private pdf i got sent
-
-2005-08-06  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-document.cc:
-	* qt4/src/poppler-qt4.h: Add password arguments to document
-	constructor.
-
-	* qt4/src/Doxyfile: Add define so doxygen can extract the
-	API for Qt4 bindings again.
-
-	* qt4/tests/test-password-qt4.cpp: new test framework for
-	encrypted files.
-
-2005-08-05  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/TextOutputDev.cc (visitLine): Round selection
-	coordinates in device space, so selection isn't fuzzy.
-
-	* poppler/GfxState.cc: 
-	* poppler/GfxState.h: Add simple Matrix class.
-
-2005-08-05  Kristian Høgsberg  <krh at redhat.com>
-	
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* poppler/TextOutputDev.cc:
-	* poppler/TextOutputDev.h: Propagate selection colors to the glib API.
-
-2005-08-04  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/ArthurOutputDev.cc: Fix problem with drawing filled objects
-	that was introduced in Rev 1.4.
-
-2005-08-03  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/test-poppler-qt4.cpp (keyPressEvent): add support for
-	page-up / page-down keys to change which page is displayed, and
-	q to quit.
-
-2005-08-01  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/DCTStream.[cc|h]: Fix problem in the patch to fix #3299
-
-2005-08-01  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Dan Winship <danw at novell.com>
-	
-	* glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Set alpha to
-	0xff (opaque), not 0x00.
-
-2005-08-01  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/ArthurOutputDev.cc: Fix up the fill problem with
-	drawing text, where the "middle" of glyphs with a "hole" 
-	(like d, o, p, b, g) got filled. Also remove some debugging
-	code. The glyphs are still ugly though.
-
-2005-07-31  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/ArthurOutputDev.cc:  An initial version of proper
-	font handling, based on work by Albert Astals Cid. I changed
-	it to stroke the glyphs based on the SplashPath. In the longer
-	term, Arthur should use FreeType paths directly - hopefully
-	that will be less ugly, and not fill everything.
-
-2005-07-29  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests: add test cases for version and facing pagelayout.
-	Also updated .cvsignore for these and a couple of older files.
-
-	* poppler/ArthurOutputDev.cc (startPage): Make sure page is
-	filled white. Earlier versions of Qt4 seemed to have an
-	eggshell coloured background, but it changed to black at 
-	some point.
-
-	* poppler/ArthurOutputDev.cc: remove a couple more TODOs,
-	based on current Qt4 working OK.
-
-2005-07-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/TextOutputDev.cc: Finish TextSelectionDumper class for
-	extracting the text from a selection.  Add
-	TextPage::getSelectionText() and TextOutputDev::getSelectionText()
-	methods to expose the new functionality.
-
-	* glib/poppler-page.cc (poppler_page_get_text): Use
-	TextOutputDev::getSelectionText() to get the text from the
-	selection.
-
-	* glib/poppler-document.cc (poppler_document_new_from_file): 
-	* glib/poppler-page.cc (_poppler_page_new): Add extra NULL to
-	g_object_new() constructor to silence gcc warning about missing
-	sentinel.
-
-2005-07-28  Albert Astals Cid  <aacid at kde.org>
-
-	 * poppler/PageLabelInfo.[cc|h]: Fix memory leaks
-
-2005-07-28  Albert Astals Cid  <aacid at kde.org>
-
-	 * glib/poppler-document.cc:
-	 * poppler/CairoFontEngine.[cc|h]:
-	 * poppler/CairoOutputDev.cc:
-	 * poppler/GlobalParams.[cc|h]:
-	 * poppler/SplashOutputDev.[cc|h]:
-	 * qt/poppler-document.cc:
-	 * qt4/src/poppler-document.cc:
-	 * test/gtk-cairo-test.cc:
-	 * test/gtk-splash-test.cc:
-	   Use fontconfig for finding which font use for not embeded fonts
-
-2005-07-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/poppler-config.h.in: Add GCC_PRINTF_FORMAT macro to
-	annotate printf-like functions (#3638).
-	
-	* poppler/Error.h: Add GCC_PRINTF_FORMAT to error().
-
-	* poppler/PSOutputDev.h: Add GCC_PRINTF_FORMAT to
-	PSOutputDev::writePSFmt().
-
-	* poppler/PSOutputDev.cc, poppler/GlobalParams.cc: Quiet new
-	printf warnings.
-
-	* poppler/TextOutputDev.cc (TextBlock::visitSelection): Assign
-	start and stop coordinates in one place so we don't assign the
-	same point to both in some corner cases.
-	(TextWord::visitSelection): Initialize begin to len, not len + 1
-	to fix crash.
-
-	(TextWord::visitSelection, TextLine::visitSelection): Change
-	selection trigger; now midpoint of glyph must be included in
-	selection area for glyph to be in selection.
-
-2005-07-27  Martin Kretzschmar  <martink at gnome.org>
-
-	* poppler/PSOutputDev.cc (PSOutputDev): change the constructor to
-	take paper size and duplex setting parameters.
-	(init): add paper size and duplex parameters.
-	(writeDocSetup): add duplex parameter.
-
-	* poppler/PSOutputDev.h: update declarations.
-
-	* glib/poppler-private.h (struct _PopplerPSFile): store necessary
-	information to eventually construct a PSOutputDev.
-
-	* glib/poppler-page.cc (poppler_page_render_to_ps): initialize the
-	output dev if it doesn't exist yet.
-
-	* glib/poppler-document.cc (poppler_ps_file_new): don't create the
-	PSOutputDev here, just store filename and page range.
-	(poppler_ps_file_set_paper_size, poppler_ps_file_set_duplex): new
-	functions.
-	(poppler_ps_file_free): free the filename which we strdup now.
-
-	* glib/poppler-document.h: add prototypes.
-
-2005-07-26  Albert Astals Cid  <aacid at kde.org>
-
-	 * qt/test-poppler-qt-cpp: Fix mem leak
-
-2005-07-26  Kristian Høgsberg  <krh at redhat.com>
-
-	* fofi/FoFiType1.cc: Make check for end of encoding array a bit
-	more liberal so we don't crash on complex encoding arrays.
-
-2005-07-25  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/DCTStream.cc: Work on bad jpeg data that have garbage before
-	the start marker. Fixes bug #3299
-
-2005-07-22  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/CairoFontEngine.cc: Fix mem leak. Reported in bug #3586 by
-	Kjartan Maraas, initial patch by Martin Kretzschmar.
-
-2005-07-22  Albert Astals Cid  <aacid at kde.org>
-
-	* qt/test-poppler-qt.cpp: Make it possible to change the displayed
-	page using Up and Down keys
-
-2005-07-22  Albert Astals Cid  <aacid at kde.org>
-
-	* splash/Splash.cc: Fix bugs #3728 and #3750
-
-2005-07-20  Martin Kretzschmar  <martink at gnome.org>
-
-	* glib/poppler-document.cc (poppler_fonts_iter_get_name): if the
-	font is a subset, strip the ABCDEF+ tag.
-	(poppler_fonts_iter_get_full_name): does what the old get_name did.
-	(poppler_fonts_iter_get_font_type, poppler_fonts_iter_is_embedded)
-	(poppler_fonts_iter_is_subset): new wrappers.
-
-	* glib/poppler-document.h (PopplerFontType): new enum.
-	Update prototypes.
-
-2005-07-15  Martin Kretzschmar  <martink at gnome.org>
-
-	* test/gtk-cairo-test.cc: update for 2005-06-27 change to actually
-	display something again.
-
-2005-07-10  Brad Hards  <bradh at frogmouth.net>
-
-	* poppler/ArthurOutputDev.cc: General cleanup - removing
-	dead code, and some minor tweaks. No new features.
-
-2005-07-08  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_set_selection_alpha): Add
-	this function to initialize the alpha channel when using the
-	splash backend.
-
-	* poppler/TextOutputDev.cc (visitLine): Add missing scaling of
-	intra-line selection edges.
-
-2005-07-07  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_prepare_output_dev): Account
-	for page rotation when creating the cairo surface.
-
-2005-07-06  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Add out of
-	bounds checking (from Marco).
-
-2005-07-07  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-document.cc: 
-	* qt4/src/poppler-qt4.h: Add pageLayout() function for Qt4
-	bindings
-
-	* qt4/tests/check_pagelayout_single.cpp:
-	* qt4/tests/check_pagelayout_none.cpp:
-	* Makefile.am: Add unit tests for pageLayout()
-
-	* glib/poppler-document.cc (convert_page_mode): Update to
-	reflect the Catalog API change. I'm not that good at glib,
-	so this has a non-zero chance of being pure crackrock.
-
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h: update page mode options to PDF 1.6
-
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-document.cc: add Qt4 bindings for additional 
-	pageMode() value created by change above
-
-	* qt4/src/poppler-qt4.h: minor updates to API docs.
-	
-	* qt4/tests/Makefile.am:
-	* qt4/tests/check_pagemode_*.cpp: unit tests for Qt4 pageMode() call
-	and associated enum. This is the initial checkin for these files
-
-2005-07-06  Albert Astals Cid  <aacid at kde.org>
-
-	* poppler/PDFDoc.[cc|h]: Add checkFooter to check document ends with
-	%%EOF
-	* poppler/GfxFont.[cc|h]: Extract family, stretch and weight from the
-	font descriptor
-
-2005-07-06  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/Makefile.am:
-	* qt4/tests/check_linearised.cpp: Added unit test for linearised
-	property
-
-	* qt4/tests/poppler-fonts.cpp (main): update to reflect API change,
-	and also to show "[none]" if the font is nameless.
-
-	* qt4/src/poppler-document.cc (Poppler): 
-	* qt4/src/poppler-qt4.h: remove the unicode translation bool,
-	it is really an internal thing.
-
-2005-07-05  Albert Astals Cid  <aacid at kde.org>
-
-	* qt4/src/poppler-document.cc (Poppler): 
-	* qt4/src/poppler-qt4.h: Don't crash with files that have fonts with
-	no name, for example the one found at
-	http://bugs.kde.org/show_bug.cgi?id=101520.
-
-2005-07-05  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/tests/check_author.cpp:
-	* qt4/tests/check_permissions.cpp:
-	* Makefile.am:
-	* .cvsignore: add a couple more test cases
-	
-	* qt4/src/poppler-document.cc (Poppler): 
-	* qt4/src/poppler-qt4.h: Add Qt4 bindings for the 
-	additional user permission properties.
-
-	* poppler/XRef.h:
-	* poppler/Xref.cc:
-	* poppler/PDFDoc.h: Add some more user permissions properties -
-	high resolution printing, document assembly, extraction for
-	accessibility and form completion.
-
-2005-07-04  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/src/poppler-page.cc: fix typo bug that
-	prevented correct detection of upside down pages
-
-	* qt4/tests/check-orientation.cpp: fix path to
-	point to test module.
-	
-	* qt4/.cvsignore: update to reflect new files
-	
-	* qt4/tests/Makefile.am:
-	* qt4/tests/poppler-fonts.cpp: initial import of a simple font
-	metadata listing application.
-	
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-document.cc complete Qt4 font metadata handling
-	
-	* qt4/src/poppler-qt4.h:
-	* qt4/src/poppler-page.cc: change the render API to make it more
-	Qt-like.
-
-	* qt4/tests/test-poppler-qt4.cpp:
-	* qt4/tests/stress-poppler-qt4.cpp: update to reflect changes
-	to render API
-	
-	* poppler/FontInfo.h/cc: make FontInfo::type() return a enum
-	instead of a GooString. As discussed on mailing list, if you
-	want a string representation, you get to make one at the bindings
-	layer (ie typeName() didn't make the grade in the final patch)
-
-	* qt4/tests/poppler-fonts.cpp (main): change order in test
-	code to reflect actual testcase file
-
-2005-07-01  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/TextOutputDev.cc: Make selection also work when dragging
-	backwards in the text flow.  Currently this is a big pile of
-	if-statements, and there is certainly room for improvement.
-
-2005-06-30  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.h: * glib/poppler-page.cc
-	(poppler_page_copy_to_pixbuf): Fix splash compilation (patch from
-	Marco).
-	(poppler_page_render_to_pixbuf): Drop dest_x and dest_y
-	coordinates from this function.  This functionality can be
-	achieved using a sub-GdkPixbuf.
-
-	* glib/test-poppler-glib.c (main): Update test case.
-
-2005-06-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-private.h: Move TextOutputDev.h include here from
-	poppler-page.cc
-
-2005-06-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h:
-	* poppler/Page.cc:
-	* poppler/Page.h:
-	* poppler/TextOutputDev.cc:
-	* poppler/TextOutputDev.h: Add support for rendering real
-	selection (based on text flow).
-
-2005-06-28  Albert Astals Cid  <aacid at kde.org>
-	
-	* poppler/FontInfo.[cc,h]: Add FontInfo::getType()
-	
-2005-06-28  Albert Astals Cid  <aacid at kde.org>
-	
-	* poppler/ArthurOutputDev.cc: use transformation matrix for image
-	rendering
-
-2005-06-28  Brad Hards  <bradh at frogmouth.net>
-
-	* .cvsignore:
-	* qt4/.cvsignore:
-	* qt4/src/.cvsignore:
-	* qt4/tests/.cvsignore: update to reflect the Qt4 bindings.
-
-2005-06-28  Brad Hards  <bradh at frogmouth.net>
-
-	* qt4/:
-	* Makefile.am:
-	* configure.ac:
-	* poppler-qt4.pc.in: Initial import of Qt4 bindings, based
-	on the Qt3 bindings. API is still in flux.
-
-	* poppler/AuthurOutputDev.[cc,h]:
-	* poppler/Makefile.am: Initial import of Qt4 backend renderer. 
-	Incomplete at this stage.
-
-2005-06-27  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Change CairoOutputDev to render to a
-	given surface and let the user create that surface.
-	
-	* glib/poppler-document.cc:
-	* glib/poppler-page.cc:
-	* glib/poppler-private.h: Create the cairo image surface here
-	instead and pass it to the CairoOutputDev for rendering.
-	
-	* poppler/CairoOutputDevImage.cc:
-	* poppler/CairoOutputDevImage.h:
-	* poppler/CairoOutputDevX.cc:
-	* poppler/CairoOutputDevX.h:
-	* poppler/Makefile.am: Remove specialized cairo output devices.
-
-2005-06-26  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc:
-	* poppler/CairoOutputDev.h: Switch back to using drawChar() for
-	text, but utilize the beginString() and endString() hooks so we
-	can use cairo_show_glyphs() efficiently.
-
-2005-06-26  Albert Astals Cid <aacid at kde.org>
-	* qt/poppler-page.cc:
-	* qt/poppler-page.h: Add PageTransition class and 
-	PageTransition* Page::getTransition() const; to the qt frontend.
-
-2005-06-26  Martin Kretzschmar  <martink at gnome.org>
-
-	* glib/.cvsignore: add poppler-enums.[ch].
-
-	* configure.ac: require glib 2.4+ for g_value_take_string and
-	G_DEFINE_TYPE.
-
-2005-06-25  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Error.h: Maybe fix build on Solaris.
-
-2005-06-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS:
-	* configure.ac: Bump version to 0.3.3 and sum up changes since
-	last release.
-
-	* glib/poppler-page.cc (poppler_page_find_text): Initialize xMin
-	and yMin to avoid referencing unintialized memory (#3582).
-
-2005-06-20  Martin Kretzschmar  <martink at gnome.org>
-
-	* glib/poppler-document.cc (info_dict_get_string): convert
-	from PDFDocEncoding to UTF-8.
-
-2005-06-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.h: Clean up glib rotation implementation and add a
-	getter for rotation.  Patch from Marco.
-
-2005-06-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc:
-	* poppler/FontInfo.cc: Fixes from Marco to handle fonts without
-	name (typically type 3 fonts) and fix an iterator bug.
-
-2005-06-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_get_link_mapping): Adjust
-	link coordinates so they're relative to bounding box lower left
-	corner (#3396).
-
-2005-06-17  Kristian Høgsberg  <krh at redhat.com>
-
-	* autogen.sh: Patch from Emil Soleyman-Zomalan to enable checks
-	for automake >= 1.7 (#3554).
-
-2005-06-15  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h: Patch from Marco to get initial status
-	(open or closed) for bookmark subtrees.
-
-2005-06-13  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c:
-	* poppler/Makefile.am: Patch from Marco to extract font info from
-	document.
-
-2005-06-08  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc: Remember to delete tmpFileName.
-	Patch from Nikolai Weibull (#3491).
-
-2005-06-07  Kristian Høgsberg  <krh at redhat.com>
-
-	* qt/test-poppler-qt.cpp: Add stdlib.h include for exit().
-
-2005-06-02  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/TextOutputDev.h:
-	* qt/poppler-qt.h: Patch from Stanislav Brabec <sbrabec at suse.cz>
-	to fix gcc 4.0.1 warnings on undeclared friend classes.
-	
-	* test/gtk-splash-test.cc: Fix from Martin Kretzschmar
-	<martink at gnome.org> to compile with OPI enabled (#2911).
-
-2005-06-02  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Stanislav Brabec <sbrabec at suse.cz>:
-
-	* configure.ac:
-	* poppler-cairo.pc.in:
-	* poppler-glib.pc.in:
-	* poppler-qt.pc.in:
-	* poppler-splash.pc.in: Misc fixes to pkg-config files.
-
-2005-06-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* poppler/Error.cc:
-	* poppler/Error.h: Make error handling function setable through
-	setErrorFunction.
-
-	Based on a patch by Albert Astals Cid.
-
-2005-05-29  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/*: Add more meta data properties to poppler document.
-	Patch by Emil Soleyman-Zomalan (#3359).
-
-2005-05-26  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc (clip): Remove snapToGrid so clip()
-	prototype matches what Gfx actually calls (fixes clipping).
-	
-	* poppler/CairoOutputDev.cc: Update fill color, stroke color, fill
-	opacity and stroke opacity from GfxState on restore, since they
-	aren't handled by cairo_restore() (#3362).
-
-	* poppler/CairoOutputDev.cc: Comment out tolerance setting until
-	we figure out how cairo settings relate to pdf settings.
-
-	* poppler/CairoOutputDev.cc: Support fill and stroke opacity.
-	
-	* poppler/GfxState.cc: 
-	* poppler/GfxState.h: Add GfxColorSpace::getRGBLine here and
-	implement in subclasses.
-
-	* poppler/CairoOutputDev.cc (drawImage): Use getRGBLine here.
-
-Mon May 23 00:22:41 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-document.h: Add a permissions flag to the glib
-	bindings.
-
-2005-05-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc (poppler_ps_file_new): Fix off-by-one
-	error spotted by Jürg Billeter.
-
-2005-05-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc: Account for different row vs. column
-	vector conventions between cairo and poppler.
-
-	* poppler/CairoFontEngine.cc: Only get the code to gid map if
-	we're using freetype 2.1.7 or older (#3340).
-
-2005-05-19  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc: Only cast to Gfx8BitFont when we
-	know for sure we have a truetype font.
-	GfxCIDFont::getCIDToGIDLen() can return 0 in which case codeToGID
-	will be NULL, and we end up casting it to a Gfx8BitFont (#3265).
-
-2005-05-18  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Require cairo 0.5.0, bump release to 0.3.2.
-
-	* NEWS: Sum up latest changes.
-
-	* glib/poppler-document.cc (poppler_ps_file_new): Take a page
-	range here instead of just number of pages.
-	
-2005-05-17  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDevX.cc: 
-	* test/gtk-cairo-test.cc: Chase the cairo xlib constructor again.
-
-2005-05-16  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Christian Persch (#3300):
-	
-	* configure.ac: Check for glib-mkenums.
-
-	* glib/Makefile.am (poppler-enums.h): Generate glib enums at
-	compile time.
-
-	* glib/poppler-enums.c:
-	* glib/poppler-enums.h: Removed.
-
-2005-05-16  Kristian Høgsberg  <krh at redhat.com>
-	
-	* test/gtk-cairo-test.cc: Update this test case also.
-
-	* poppler/CairoOutputDevX.cc: Track changes to cairo Xlib surface
-	constructors.
-
-	* poppler/CairoFontEngine.cc (cairo_font_face_destroy): Make this
-	static.
-
-Thu May 12 23:10:45 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler.gidl: add metadata file.
-
-2005-05-12  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc: 
-	* poppler/CairoOutputDevX.cc: 
-	* poppler/CairoOutputDevImage.cc: 
-	* test/gtk-cairo-test.cc: Update to latest cairo changes, patch
-	from Jens Taprogge (#3281)
-
-2005-05-11  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler.cc (poppler_get_backend, poppler_get_version): Add
-	these functions so it's easy to tell if poppler is using cairo or
-	splash and what version.
-
-	* glib/test-poppler-glib.c (main): Print out version and backend.
-
-2005-05-06  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/Makefile.am (libpoppler_glib_la_LIBADD): Link poppler-glib
-	against poppler.
-
-	* qt/Makefile.am (libpoppler_qt_la_LIBADD): Ditto for qt.
-
-	* poppler-glib.pc (Libs): Drop -lpoppler from link.
-
-	* poppler-qt.pc (Libs): Ditto for qt.
-
-	* configure.ac: Test for both libqt-mt.la and libqt-mt.so in that
-	order.
-
-2005-05-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask,
-	CairoOutputDev::drawImage): Track cairo cvs API changes; use
-	cairo_mask() and cairo_paint() for drawing image masks and images.
-
-2005-05-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoOutputDev.cc: Fix matrix convention confusion.
-
-2005-05-04  Kristian Høgsberg  <krh at redhat.com>
-
-	Patches from Albert Astals Cid:
-	
-	* qt/poppler-page.cc (getText): Use QString::fromUtf8() instead of
-	implicit latin1 cast constructor.
-	
-	* qt/test-poppler-qt.cpp (main): Use a QLabel for showing text
-	instead of qDebug.
-
-Wed May  4 02:31:05 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-enums.c: (poppler_permissions_get_type):
-	* glib/poppler-enums.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.h:
-
-	Register a bunch of boxed types to test introspection, and for
-	LBs.  Also, remove unused 'popper_document_save()' (-:
-
-2005-05-01  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc:
-	* poppler/CairoFontEngine.h:
-	* poppler/CairoOutputDev.cc: Back out workaround for cairo 0.4.0
-	font API and port to new cairo head.
-
-2005-05-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* splash/SplashFTFont.cc (SplashFTFont::getGlyphPath):
-	Use FT_LOAD_NO_BITMAP to make sure we get outlines loaded instead
-	of bitmaps for use in FT_Outline_Decompose.
-
-	Patch from Albert Astals Cid.
-
-2005-05-01  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* goo/gmem.c: (gmalloc), (grealloc), (gfree):
-	* goo/gmem.h: make memory functions use size_t instead of int.
-	
-	Patch from Takashi Iwai through Albert Astals Cid.
-
-2005-04-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* qt/poppler-document.cc (Document::unlock) :
-	* qt/poppler-qt.h (Document::unlock):
-	Add const to the password argument.
-
-	Patch from Albert Astals Cid.
-
-2005-04-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* fofi/FoFiType1.cc (FoFiType1::parse):
-	Don't assume Encoding array of Type1 fonts end in "foo def".
-	http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF says
-	"This sequence of assignments must be followed by an instance of the
-	token def or readonly; such a token may not occur within the sequence
-	of assignments." so it must end with "readonly" "def" "readonly def"
-	(That is what most fonts are using and this is why it was not
-	crashing)
-
-	Patch from Albert Astals Cid.
-
-Fri Apr 29 14:54:44 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* goo/GooTimer.h: New class to do simple timing checks.
-
-	* glib/poppler-document.c: Patch from Martin Kretzschmar to really
-	set the PDF version correct.  Third time's the charm.
-
-2005-04-29  Kristian Høgsberg  <krh at bitplanet.net>
-
-	* configure.ac: Bump release to 0.3.1.
-
-	* NEWS: Write up news for 0.3.1 release.
-
-2005-04-28  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Martin Kretzschmar:
-
-	* poppler/GlobalParams.cc: use UTF-8 as the default text encoding.
-	Fixes Bug 2934.
-
-2005-04-27  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* configure.ac:
-	* poppler/FlateStream.cc:
-	* poppler/FlateStream.h:
-	* poppler/Makefile.am:
-	* poppler/Stream.cc:
-	* poppler/Stream.h: Add a reimplementation of FlateStream using
-	zlib.
-
-2005-04-27  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Catalog.cc (NameTree::lookup): Fix bsearch return value
-	NULL check.  Found by Albert Astals Cid.
-
-Tue Apr 26 13:13:42 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/test-poppler-glib.c (main): add a quick dump-to-text test.
-
-2005-04-24  Kristian Høgsberg  <krh at redhat.com>
-
-	* qt/Makefile.am (libpoppler_qt_la_SOURCES): Add poppler-private.h
-	to SOURCES.
-
-2005-04-23  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc: Use the right fileName for loading
-	CID fonts (#3114).
-
-2005-04-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Actually commit version number bump.
-
-2005-04-22  Martin Kretzschmar  <martink at gnome.org>
-
-	* poppler/CairoFontEngine.cc: declare matrix variable before the
-	first goto. Fixes build with gcc 3.3.
-
-Fri Apr 22 00:01:40 2005  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc: Hack around semi-broken cairo-0.4.0
-	font API to fix the problem where some glyphs would show up at the
-	wrong sizes.  We now create an FT_Face for each size and font
-	combination we encounter, since an FT_Face can't be shared between
-	several cairo_font_t.
-
-Thu Apr 21 15:43:52 2005  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Outline.cc: 
-	* poppler/Outline.h: Implement the documented behaviour for
-	Outline::getItems() and OutlineItem::getKids() and make
-	documentation more precise (Patch from Marco).
-
-Thu Apr 21 02:25:20 2005  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/CairoFontEngine.cc (CairoFont::getFont): Cache
-	cairo_font_t's for a given CairoFont.  With this patch cairo will
-	recognize glyphs coming from the same font as such and the glyph
-	cache will actually work.
-
-	* glib/poppler-document.cc (poppler_document_new_from_file): Add
-	output device (cairo or splash) to PopplerDocument and initialize
-	it in the constructor.
-
-	* glib/poppler-page.cc (splash_render_to_pixbuf,
-	cairo_render_to_pixbuf): Use output device from associated poppler
-	document instead of creating a new one.
-
-	* poppler-glib.pc.in (Requires): Add Requires: field.
-
-	* poppler/Page.cc (loadThumb): Remove unecessary and buggy call to
-	Stream::addFilters(), reported by Ryan Lortie (#3046).
-
-2005-04-13  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* qt/poppler-page.cc (Page::getText):
-	* qt/poppler-qt.h: add a getText method for getting
-	the text on a page
-
-	* qt/test-poppler-qt.c (PDFDisplay::PDFDisplay): 
-	add the option to display the text on a page
-
-	Patch from Albert Astals Cid.
-
-Tue Apr 19 17:21:19 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-document.cc (poppler_document_get_property): Use
-	%.2g instead.
-
-Tue Apr 19 17:11:52 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-document.cc (poppler_document_get_property): Use %g
-	instead of %f to avoid versioning like PDF-1.50000
-
-Tue Apr 19 15:43:35 2005  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-action.cc (_poppler_action_new): Handle NULL links
-	gracefully (fix from Jeff).
-
-Tue Apr 19 00:20:08 2005  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Catalog.cc: Fix from Marco to make sure we always
-	initialize Catalog::pageLabelInfo.
-
-Sat Apr 16 14:53:15 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/Makefile.am: Create poppler-enums.[ch]
-
-	* glib/poppler.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-action.h: Try to clean up the headers a bit
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h: Add support for document data.
-	Implemented as a lot of GObject properties. 
-
-	* glib/poppler-enums.c:
-	* glib/poppler-enums.h: New autogenerated files.
-
-	* glib/test-poppler-glib.c: Test the new document metadata.  Seems
-	to work nicely, other than the PDF string and View Prefs.
-
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h: Extend to support PageLayout.
-
-2005-04-14  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/poppler.h: Patch from Marco Pesenti Gritti to set page
-	orientaton.
-
-2005-04-13  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* poppler/CairoOutputDevImage.cc (getBitmap): remove unused
-	SplashBitmap. Patch from Albert Astals Cid.
-
-2005-04-12  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Add fontconfig to PKG_CHECK_MODULES for the cairo
-	backend too, since we shouldn't depend on cairo.pc to pull that in
-	for us.
-
-	* poppler/Makefile.am (INCLUDES): Add $(splash_includes) to
-	INCLUDES to make sure the fontconfig include path is added when
-	using the splash backend.
-
-2005-04-09  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* poppler-qt.h:
-	* poppler-document.cc (okToPrint, okToChange, okToCopy):
-	Patch from Albert Astals Cid adding more metadata exports
-
-2005-04-08  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler-qt.pc.in (Libs): Add -lpoppler to Libs.
-
-2005-04-07  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* configure.ac: redo the qt tests from Albert Astals Cid
-
-2005-04-07  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* qt/poppler-document.cc:
-	* qt/poppler-page.cc:
-	* qt/poppler-qt.h:
-	Patch from Albert Astals Cid adding consts and exporting some more
-	metadata.
-
-2005-04-07  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc: 
-	* glib/poppler-document.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h: Print to PS support from Marco Pesenti
-	Gritti.
-
-Thu Apr  7 12:25:39 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* configure.ac: check for qt, not glib, when enabling the qt
-	subdir
-
-2005-04-06  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* .cvsignore, glib/.cvsignore, qt/.cvsignore:
-	Add more things to .cvsignore.
-	Patch from Martin Kretzschmar.
-
-2005-04-06  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* poppler-page.cc (Page::Page, Page::~Page):
-	Construct and deconstruct the PageData object.
-	Patch from Albert Astals Cid.
-
-2005-04-06  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* Makefile.am, configure.ac: Add configuration for qt wrapper.
-	
-	* poppler-qt.pc.in:
-	* qt/Makefile.am:
-	* qt/poppler-document.cc:
-	* qt/poppler-page.cc:
-	* qt/poppler-private.h:
-	* qt/poppler-qt.h:
-	* qt/test-poppler-qt.cpp:
-	New files.
-
-2005-04-05  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Attempt to sum up changes since 0.1.2.
-
-	* configure.ac: Bump release to 0.2.0, add AC_DEFINEs for cairo
-	and splash availability.
-
-	* poppler/CairoFontEngine.cc: Disable hinting.
-
-	* glib/poppler-page.cc (poppler_page_render_to_pixbuf): Choose
-	either splash or cairo rendering, based on configure choice.
-	(cairo_render_to_pixbuf): New function to render using the cairo
-	backend.
-	(splash_render_to_pixbuf): Split out the splash code to this
-	function.
-
-2005-04-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* ChangeLog: Add this entry to test commit mailer script.
-	
-	* TODO: Add reminder about using PDF font descriptors with
-	fontconfig.
-
-	* configure.ac: Add checks for mkstemp() and mkstemps().
-
-	* glib/poppler-page.cc (poppler_page_find_text): Reverse
-	y-coordinates so we return PDF style coordinates.
-
-	From Maro Pesenti Gritti <mpgritti at gmail.com>:
-	
-	* configure.ac, poppler/Makefile.am: Check for fontconfig when
-	we're building the splash backend.
-
-	* glib/poppler-page.cc (poppler_page_get_text): New function to
-	select text on page.
-
-2005-04-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_find_text): Reverse list of
-	matches so we get them in the right order.
-
-2005-04-03  Martin Kretzschmar  <martink at gnome.org>
-
-	* poppler/DCTStream.h: Wrap #include <jpeglib.h> in extern "C"
-	Fixes build with unpatched libjpeg.
-
-2005-04-02  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	* poppler/Page.h:
-	* poppler/Page.cc (Page::Page):
-	Some initial infrastructure for supporting transitions.
-
-2005-03-31  Kristian Høgsberg  <krh at redhat.com>
-	
-	* glib/poppler-page.cc (poppler_page_render_to_pixbuf): Clip
-	output to destination pixbuf and fix RGB order.
-
-2005-03-31  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-page.cc (poppler_page_find_text): New function to
-	seach a page for occurrences of a given text string.
-
-	* glib/poppler-page.cc: Add g_return_if_fail() checks to a couple
-	of functions.
-	
-Thu Mar 31 00:26:20 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h (poppler_page_get_link_mapping,
-	poppler_page_free_link_mapping): New functions to get a mapping of
-	links to locations on the current document.
-
-2005-03-30  Jeff Muizelaar <jrmuizel at nit.ca>
-
-	* poppler/DCTStream.h: change x to unsigned int to eliminate
-	comparision warning
-
-2005-03-30  Jeff Muizelaar <jrmuizel at nit.ca>
-
-	* poppler/Catalog.cc: delete pageLabelInfo on deconstruction
-
-Tue Mar 29 23:07:17 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-page.h: Reformat.
-
-Tue Mar 29 22:49:15 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-action.[ch]: New item to encapsulate links.
-	* glib/poppler-document.[ch] (poppler_index_iter_get_action): New
-	function to get the action.  Also, fix some warnings.
-	* glib/poppler-private.h (_poppler_action_new): New function.
-	* glib/test-poppler-glib.c: Fix warnings.
-
-Tue Mar 29 02:36:00 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-document.[ch] (PopplerIndexIter): Add an iter to
-	extract the index from the doc.  Includes a bad hack, for now.
-
-Mon Mar 28 22:02:07 2005  Jonathan Blandford  <jrb at redhat.com>
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h (poppler_page_get_thumbnail_size): New
-	function. 
-	* poppler-glib.pc.in: add -lpoppler-glib to the libs line.
-
-2005-03-28  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Page.cc (loadThumb): Backend agnostic method for
-	extracting an embedded thumbnail iamge.
-
-	* poppler/Dict.cc (lookupInt): New convenience method.
-
-	* glib/poppler-page.cc (poppler_page_get_thumbnail): New glib
-	function for getting the embedded thumbnail image for a page.
-
-2005-03-25  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Check for fontconfig for glib bindings.
-
-2005-03-24  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/Makefile.am: Use POPPLER_GLIB_CFLAGS and POPPLER_GLIB_LIBS
-	instead of GTK_TEST_*.  Reported by Adam Jackson <ajax at nwnk.net>.
-
-2005-03-23  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Catalog.cc (indexToLabel, labelToIndex): Add stricter
-	checking of incoming labels and indices.
-
-	* glib/test-poppler-glib.c (main): Change test program to take the
-	page label from the command line.
-
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h: Add poppler_page_get_index() and rename
-	popper_page_get_dimension() to popper_page_get_size()
-
-2005-03-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc: Implement poppler_document_save().
-	
-	* glib/poppler-document.h: Add prototype and format headers
-	properly.
-
-2005-03-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Fix --disable-popper typo reported by Albert.
-	Require exactly cairo 0.4 since CVS cairo has API changes.
-
-2005-03-22  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/Array.cc:
-	* poppler/Array.h: Add getString() convenience method.
-	
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h: Optimize lookup of named destinations.
-
-2005-03-21  Kristian Høgsberg  <krh at redhat.com>
-	
-	* NEWS, TODO: Update these.
-
-2005-03-21  Kristian Høgsberg  <krh at redhat.com>
-
-	From Albert Astals Cid <tsdgeos at yahoo.es>:
-	
-	* poppler/Catalog.cc, poppler/Catalog.h: Parse PageMode setting
-	from the Catalog dict and expose it through getPageMode() method.
-
-2005-03-21  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h: Expose the document title as a GObject
-	property.
-	
-	* glib/poppler-page.cc: Expose the page label as a GObject
-	property.
-	
-	* glib/poppler-private.h: Add the page index to PopplerPage.
-	
-	* glib/test-poppler-glib.c: Print out page label and document
-	title.
-	
-	* poppler/Catalog.cc:
-	* poppler/Catalog.h: Add page label accessors.
-	
-	* poppler/PageLabelInfo.cc:
-	* poppler/PageLabelInfo.h: New files.
-
-	* poppler/Makefile.am: Add new files to sources.
-	
-2005-03-20  Kristian Høgsberg  <krh at redhat.com>
-
-	* glib/poppler-document.cc:
-	* glib/poppler-page.h:
-	* glib/poppler.cc:
-	* poppler/Array.cc:
-	* poppler/Array.h:
-	* poppler/Catalog.cc: Fix up filenames in #include statements and
-	comments.
-
-2005-03-19  Kristian Høgsberg  <krh at redhat.com>
-
-	Land the first bits of the glib wrapper.
-
-	* Makefile.am:
-	* configure.ac: Add new glib subdirectory and configure options
-	for glib wrapper.
-	
-	* glib/Makefile.am:
-	* glib/poppler-document.cc:
-	* glib/poppler-document.h:
-	* glib/poppler-page.cc:
-	* glib/poppler-page.h:
-	* glib/poppler-private.h:
-	* glib/poppler.cc:
-	* glib/poppler.h:
-	* glib/test-poppler-glib.c:
-	* poppler-glib.pc.in: New files.
-
-2005-03-16  Jeff Muizelaar  <jrmuizel at nit.ca>
-
-	From Dan Sheridan <dan.sheridan at postman.org.uk>
-
-	* poppler/XRef.cc (XRef::checkEncrypted):
-	The key length should be 5 for revision 2 documents.
-	
-2005-03-11  Kristian Høgsberg  <krh at redhat.com>
-
-	From  Jeff Muizelaar  <jrmuizel at nit.ca>:
-	
-	* poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask): Use
-	getLine instead of getPixel.
-	
-	* configure.ac: Add checks for libjpeg.
-
-	* DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am:
-	Conditionally use libjpeg instead of xpdf jpeg decoder.
-	
-2005-03-10  Kristian Høgsberg  <krh at redhat.com>
-
-	From Jeff Muizelaar <jrmuizel at nit.ca>:
-
-	* poppler/CairoFontEngine.cc (CairoFontEngine::getFont):
-	Don't print "Type 3 font!" message.
-
-	* poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask):
-	Enable image mask drawing and do it properly, albeit slowly.
-
-	* poppler/CairoOutputDev.h
-	(CairoOutputDev::interpretType3Chars): Return true so that 
-	Gfx.cc turns type3 characters into calls to drawImageMask
-	
-2005-03-09  Kristian Høgsberg  <krh at redhat.com>
-
-	* NEWS: Describe 0.1.2 (and 0.1.1) release.
-
-	* configure.ac: Bump poppler version to 0.1.2
-
-2005-03-09  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Bump cairo requirement to 0.4.
-
-2005-03-04  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Jeff Muizelaar <jrmuizel at nit.ca>.  Changed to allocate
-	glyphs using gmalloc.
-
-	* poppler/CairoOutputDev.cc (CairoOutputDev::drawString):
-	Implement drawString instead of drawChar. This change should
-	make clipping to a text path work and has a performance
-	improvement. Currently the code is a little ugly because we
-	can't concat matrices to cairo without losing our current font.
-
-	* poppler/CairoOutputDev.h (CairoOutputDev::useDrawChar):
-	Tell Gfx.cc that it should use drawString instead of drawChar.
-
-2005-03-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* test/gtk-cairo-test.cc (view_load): 
-	* test/gtk-splash-test.cc (view_load): Fix missing return
-	statement, and remove unused variables.
-
-	* configure.ac: Add configure option to enable the default KDE
-	flags as described by Albert Astals Cid <tsdgeos at yahoo.es>.
-
-	* TODO: Update with Jeff's items.
-
-	* .cvsignore:
-	* */.cvsignore: Add these to silence CVS.
-	
-	* configure.ac: Implement same check for gtk+-2.0 tests as for
-	cairo.
-
-2005-03-04  Kristian Høgsberg  <krh at redhat.com>
-
-	* configure.ac: Only fail hard in check for cairo if the user
-	specified --enable-cairo-output (from Brad Hards
-	<bradh at frogmouth.net>).  Print summary of configure results at the
-	end of configure script.
-
-	* poppler/poppler-config.h: Remove this file (noticed by Brad
-	Hards <bradh at frogmouth.net>).
-
-2005-03-03  Kristian Høgsberg  <krh at redhat.com>
-
-	Patch from Jeff Muizelaar <jrmuizel at nit.ca>:
-
-	* poppler/CairoOutputDev.cc (CairoOutputDev::drawImage,
-	CairoOutputDev::drawImageMask): destroy the image surface and
-	free the image buffer.
-	
-2005-03-03  Kristian Høgsberg  <krh at redhat.com>
-
-	* autogen.sh: Add -i to autoreconf invocation.
-
-	* autogen.sh: Add to CVS.
-
-2005-03-01  Kristian Høgsberg  <krh at redhat.com>
-
-	* poppler/*.h: Take config.h out of header files.
-
-	* configure.ac: Bump release to 0.1.1 to build a tar ball that
-	works with CVS evince.
-
-	* poppler.pc.in (Cflags): Change include dir to be poppler.
-
-	* poppler/Makefile.am (poppler_include_HEADERS): Add splash and
-	cairo headers.
-
-2005-02-27  Kristian Høgsberg  <krh at redhat.com>
-
-	* test/gtk-cairo-test.cc: Add cairo test case.
-
-	* configure.ac, poppler/Makefile.am, poppler/Cairo*: Add Alex
-	Larsons cairo output device.
-	
-	* configure.ac, Makefile.am: Make splash backend conditional. 
-	
-	* test/*: Add optional GdkRGB based test program (taken from
-	evince).
-	
-	* goo/*: rename files and functions to GooHash, GooString etc. to
-	avoid nasty glib clash.
-	
-	* poppler.pc.in: New file.
-
-	* configure.ac: Combining bits from evince configure.ac and
-	removing checks only required by the xpdf applications.
-
-	* everything: Created poppler as a fork of xpdf.
diff --git a/fofi/.cvsignore b/fofi/.cvsignore
deleted file mode 100644
index 62ab22b..0000000
--- a/fofi/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.cvsignore
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
-*.loT
diff --git a/fofi/.gitignore b/fofi/.gitignore
new file mode 100644
index 0000000..62ab22b
--- /dev/null
+++ b/fofi/.gitignore
@@ -0,0 +1,8 @@
+.cvsignore
+.deps
+.libs
+Makefile
+Makefile.in
+*.la
+*.lo
+*.loT
diff --git a/glib/.cvsignore b/glib/.cvsignore
deleted file mode 100644
index a22390b..0000000
--- a/glib/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.la
-*.lo
-.deps
-.libs
-Makefile
-Makefile.in
-poppler-enums.c
-poppler-enums.h
-poppler-features.h
-stamp-*
-test-poppler-glib
diff --git a/glib/.gitignore b/glib/.gitignore
new file mode 100644
index 0000000..a22390b
--- /dev/null
+++ b/glib/.gitignore
@@ -0,0 +1,11 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+poppler-enums.c
+poppler-enums.h
+poppler-features.h
+stamp-*
+test-poppler-glib
diff --git a/glib/reference/.cvsignore b/glib/reference/.cvsignore
deleted file mode 100644
index f908650..0000000
--- a/glib/reference/.cvsignore
+++ /dev/null
@@ -1,18 +0,0 @@
-Makefile
-Makefile.in
-poppler-decl-list.txt
-poppler-decl.txt
-poppler-undocumented.txt
-poppler-unused.txt
-poppler.args
-poppler.hierarchy
-poppler.interfaces
-poppler.prerequisites
-poppler.signals
-deprecated
-html
-xml
-*.stamp
-*.lo
-.libs
-version.xml
diff --git a/glib/reference/.gitignore b/glib/reference/.gitignore
new file mode 100644
index 0000000..f908650
--- /dev/null
+++ b/glib/reference/.gitignore
@@ -0,0 +1,18 @@
+Makefile
+Makefile.in
+poppler-decl-list.txt
+poppler-decl.txt
+poppler-undocumented.txt
+poppler-unused.txt
+poppler.args
+poppler.hierarchy
+poppler.interfaces
+poppler.prerequisites
+poppler.signals
+deprecated
+html
+xml
+*.stamp
+*.lo
+.libs
+version.xml
diff --git a/goo/.cvsignore b/goo/.cvsignore
deleted file mode 100644
index 62ab22b..0000000
--- a/goo/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.cvsignore
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
-*.loT
diff --git a/goo/.gitignore b/goo/.gitignore
new file mode 100644
index 0000000..62ab22b
--- /dev/null
+++ b/goo/.gitignore
@@ -0,0 +1,8 @@
+.cvsignore
+.deps
+.libs
+Makefile
+Makefile.in
+*.la
+*.lo
+*.loT
diff --git a/poppler/.cvsignore b/poppler/.cvsignore
deleted file mode 100644
index 73e9b19..0000000
--- a/poppler/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.cvsignore
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
-*.loT
-poppler-config.h
-stamp-h2
diff --git a/poppler/.gitignore b/poppler/.gitignore
new file mode 100644
index 0000000..73e9b19
--- /dev/null
+++ b/poppler/.gitignore
@@ -0,0 +1,10 @@
+.cvsignore
+.deps
+.libs
+Makefile
+Makefile.in
+*.la
+*.lo
+*.loT
+poppler-config.h
+stamp-h2
diff --git a/qt/.cvsignore b/qt/.cvsignore
deleted file mode 100644
index 1d002b9..0000000
--- a/qt/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-*.la
-*.lo
-Makefile
-Makefile.in
-test-poppler-qt
diff --git a/qt/.gitignore b/qt/.gitignore
new file mode 100644
index 0000000..1d002b9
--- /dev/null
+++ b/qt/.gitignore
@@ -0,0 +1,7 @@
+.deps
+.libs
+*.la
+*.lo
+Makefile
+Makefile.in
+test-poppler-qt
diff --git a/qt4/.cvsignore b/qt4/.cvsignore
deleted file mode 100644
index 22a4e72..0000000
--- a/qt4/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-
diff --git a/qt4/.gitignore b/qt4/.gitignore
new file mode 100644
index 0000000..22a4e72
--- /dev/null
+++ b/qt4/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+
diff --git a/qt4/src/.cvsignore b/qt4/src/.cvsignore
deleted file mode 100644
index e4dd82d..0000000
--- a/qt4/src/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-.libs
-*.la
-*.lo
-Makefile
-Makefile.in
-APIDOCS-html
-APIDOCS-latex
diff --git a/qt4/src/.gitignore b/qt4/src/.gitignore
new file mode 100644
index 0000000..e4dd82d
--- /dev/null
+++ b/qt4/src/.gitignore
@@ -0,0 +1,8 @@
+.deps
+.libs
+*.la
+*.lo
+Makefile
+Makefile.in
+APIDOCS-html
+APIDOCS-latex
diff --git a/qt4/tests/.cvsignore b/qt4/tests/.cvsignore
deleted file mode 100644
index 834feec..0000000
--- a/qt4/tests/.cvsignore
+++ /dev/null
@@ -1,20 +0,0 @@
-.deps
-.libs
-*.la
-*.lo
-*.moc
-Makefile
-Makefile.in
-stress-poppler-qt4
-test-poppler-qt4
-test-password-qt4
-poppler-attachments
-poppler-fonts
-check_attachments
-check_dateConversion
-check_fonts
-check_metadata
-check_permissions
-check_pagelayout
-check_pagemode
-
diff --git a/qt4/tests/.gitignore b/qt4/tests/.gitignore
new file mode 100644
index 0000000..834feec
--- /dev/null
+++ b/qt4/tests/.gitignore
@@ -0,0 +1,20 @@
+.deps
+.libs
+*.la
+*.lo
+*.moc
+Makefile
+Makefile.in
+stress-poppler-qt4
+test-poppler-qt4
+test-password-qt4
+poppler-attachments
+poppler-fonts
+check_attachments
+check_dateConversion
+check_fonts
+check_metadata
+check_permissions
+check_pagelayout
+check_pagemode
+
diff --git a/splash/.cvsignore b/splash/.cvsignore
deleted file mode 100644
index 62ab22b..0000000
--- a/splash/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.cvsignore
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
-*.loT
diff --git a/splash/.gitignore b/splash/.gitignore
new file mode 100644
index 0000000..62ab22b
--- /dev/null
+++ b/splash/.gitignore
@@ -0,0 +1,8 @@
+.cvsignore
+.deps
+.libs
+Makefile
+Makefile.in
+*.la
+*.lo
+*.loT
diff --git a/test/.cvsignore b/test/.cvsignore
deleted file mode 100644
index c95ea0d..0000000
--- a/test/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.la
-*.lo
-*.loT
-.cvsignore
-.deps
-.libs
-Makefile
-Makefile.in
-gtk-cairo-test
-gtk-splash-test
-pdf_inspector
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 0000000..c95ea0d
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1,11 @@
+*.la
+*.lo
+*.loT
+.cvsignore
+.deps
+.libs
+Makefile
+Makefile.in
+gtk-cairo-test
+gtk-splash-test
+pdf_inspector
diff --git a/utils/.cvsignore b/utils/.cvsignore
deleted file mode 100644
index 696f074..0000000
--- a/utils/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-pdffonts
-pdfimages
-pdfinfo
-pdftohtml
-pdftoppm
-pdftops
-pdftotext
-pdftoabw
diff --git a/utils/.gitignore b/utils/.gitignore
new file mode 100644
index 0000000..696f074
--- /dev/null
+++ b/utils/.gitignore
@@ -0,0 +1,12 @@
+.deps
+.libs
+Makefile
+Makefile.in
+pdffonts
+pdfimages
+pdfinfo
+pdftohtml
+pdftoppm
+pdftops
+pdftotext
+pdftoabw


More information about the poppler mailing list