Hi,

Attached is a patch to fix compilation in windows with Visual Studio 2008.
The patch is against svn trunk.

Kovid.

-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
Index: src/PdfImage.cpp
===================================================================
--- src/PdfImage.cpp    (revision 1261)
+++ src/PdfImage.cpp    (working copy)
@@ -627,7 +627,7 @@
 
     long lLen = static_cast<long>(pInfo->rowbytes * height);
     char* pBuffer = static_cast<char*>(malloc(sizeof(char) * lLen));
-    png_bytep pRows[height];
+    png_bytepp pRows = 
static_cast<png_bytepp>(malloc(sizeof(png_bytep)*height));
     for(int y=0; y<height; y++)
     {
         pRows[y] = reinterpret_cast<png_bytep>(pBuffer + (y * 
pInfo->rowbytes));
@@ -672,6 +672,7 @@
     this->SetImageData( width, height, pInfo->bit_depth, &stream );
     
     free(pBuffer);
+    free(pRows);
 }
 #endif // PODOFO_HAVE_PNG_LIB

Index: src/PdfFiltersPrivate.cpp
===================================================================
--- src/PdfFiltersPrivate.cpp   (revision 1261)
+++ src/PdfFiltersPrivate.cpp   (working copy)
@@ -1019,7 +1019,7 @@
 /*
  * Prepare for input from a memory buffer.
  */
-GLOBAL(void)
+void
 jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET * buffer, size_t bufsize)
 {
     my_src_ptr src;


Attachment: pgpLMMHqPM7hz.pgp
Description: PGP signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to