head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2009.05.24.09.30.26; author rse; state Exp; branches; next 1.2; commitid O9Dd8LTG5VAQF6Pt; 1.2 date 2009.05.09.07.45.08; author rse; state Exp; branches; next 1.1; commitid RzWLf2X376iCzaNt; 1.1 date 2008.12.19.19.44.54; author rse; state Exp; branches; next ; commitid jcWAA4Z5upGx57vt; desc @@ 1.3 log @upgrading package: djvulibre 3.5.21 -> 3.5.22 @ text @Index: libdjvu/atomic.cpp --- libdjvu/atomic.cpp.orig 2008-08-03 05:54:01 +0200 +++ libdjvu/atomic.cpp 2009-05-24 11:27:28 +0200 @@@@ -280,7 +280,7 @@@@ // PART3 - THE IMPLEMENTATION */ -#if HAVE_SYNC +#if 0 /* We have fast synchronization */ @ 1.2 log @apply a bunch of Debian patches @ text @a0 66 Index: gui/nsdejavu/nsdejavu.c --- gui/nsdejavu/nsdejavu.c.orig 2007-04-23 15:01:27 +0200 +++ gui/nsdejavu/nsdejavu.c 2009-05-09 09:37:18 +0200 @@@@ -2054,9 +2054,9 @@@@ } if (new_window) { - NPSetWindowCallbackStruct *cbs - = (NPSetWindowCallbackStruct *) win_str->ws_info; - Display * displ=cbs->display; + Display *displ = 0; + if (NPN_GetValue(np_inst, NPNVxDisplay, &displ) != NPERR_NO_ERROR) + displ = ((NPSetWindowCallbackStruct *)(win_str->ws_info))->display; if (!IsConnectionOK(FALSE)) return NPERR_GENERIC_ERROR; if (Attach(displ, new_window, id) < 0) Index: libdjvu/DjVuDocEditor.cpp --- libdjvu/DjVuDocEditor.cpp.orig 2008-08-05 22:50:35 +0200 +++ libdjvu/DjVuDocEditor.cpp 2009-05-09 09:37:18 +0200 @@@@ -134,11 +134,6 @@@@ DjVuDocEditor::~DjVuDocEditor(void) { - if (!tmp_doc_url.is_empty()) - { - tmp_doc_url.deletefile(); - } - GCriticalSectionLock lock(&thumb_lock); thumb_map.empty(); DataPool::close_all(); @@@@ -192,18 +187,15 @@@@ orig_doc_type==OLD_INDEXED || orig_doc_type==SINGLE_PAGE) { - // Suxx. I need to convert it NOW. - // We will unlink this file in the destructor - tmp_doc_url=GURL::Filename::Native(tmpnam(0)); - const GP gstr(ByteStream::create(tmp_doc_url, "wb")); - tmp_doc->write(gstr, true); // Force DJVM format - gstr->flush(); - doc_pool=DataPool::create(tmp_doc_url); + // Suxx. I need to convert it now. + GP gstr = ByteStream::create(); // Convert in memory. + tmp_doc->write(gstr, true); // Force DJVM format + gstr->seek(0); + doc_pool=DataPool::create(gstr); } // OK. Now doc_pool contains data of the document in one of the // new formats. It will be a lot easier to insert/delete pages now. - // 'doc_url' below of course doesn't refer to the file with the converted // data, but we will take care of it by redirecting the request_data(). initialized=true; Index: libdjvu/DjVuDocEditor.h --- libdjvu/DjVuDocEditor.h.orig 2007-05-19 05:07:33 +0200 +++ libdjvu/DjVuDocEditor.h 2009-05-09 09:37:18 +0200 @@@@ -403,7 +403,6 @@@@ bool initialized; GURL doc_url; GP doc_pool; - GURL tmp_doc_url; int orig_doc_type; int orig_doc_pages; d3 1 a3 1 +++ libdjvu/atomic.cpp 2009-05-09 09:37:18 +0200 a12 92 Index: libdjvu/ddjvuapi.pc.in --- libdjvu/ddjvuapi.pc.in.orig 2005-12-04 02:36:26 +0100 +++ libdjvu/ddjvuapi.pc.in 2009-05-09 09:37:18 +0200 @@@@ -8,5 +8,6 @@@@ Version: @@PACKAGE_VERSION@@ Requires: Conflicts: -Libs: -L${libdir} -ldjvulibre @@JPEG_LIBS@@ @@PTHREAD_LIBS@@ @@LIBS@@ +Libs: -L${libdir} -ldjvulibre +Libs.private: @@JPEG_LIBS@@ @@PTHREAD_LIBS@@ @@LIBS@@ Cflags: -I${includedir} @@JPEG_CFLAGS@@ @@PTHREAD_CFLAGS@@ Index: tools/Makefile.in --- tools/Makefile.in.orig 2008-07-03 00:43:53 +0200 +++ tools/Makefile.in 2009-05-09 09:37:18 +0200 @@@@ -53,8 +53,8 @@@@ INCS = -I${top_builddir} -I${top_srcdir} -I${top_srcdir}/libdjvu -I${srcdir} FLAGS = ${DEFS} ${INCS} ${OPTS} ${JPEG_CFLAGS} ${TIFF_CFLAGS} ${THREAD_CFLAGS} -LIBS= @@LDFLAGS@@ ${JPEG_LIBS} ${THREAD_LIBS} @@LIBS@@ -MORELIBS= @@LDFLAGS@@ ${JPEG_LIBS} ${TIFF_LIBS} ${THREAD_LIBS} @@LIBS@@ +LIBS= @@LDFLAGS@@ @@LIBS@@ +MORELIBS= @@LDFLAGS@@ ${TIFF_LIBS} @@LIBS@@ CFLAGS = ${FLAGS} @@CPPFLAGS@@ @@CFLAGS@@ CXXFLAGS = ${FLAGS} ${CXXRPOFLAGS} @@CPPFLAGS@@ @@CXXFLAGS@@ Index: tools/ddjvu.cpp --- tools/ddjvu.cpp.orig 2008-08-05 22:48:20 +0200 +++ tools/ddjvu.cpp 2009-05-09 09:37:18 +0200 @@@@ -81,7 +81,7 @@@@ #include "libdjvu/ddjvuapi.h" #include "tiff2pdf.h" -#if defined(WIN32) || defined(__CYGWIN32__) +#if defined(WIN32) && !defined(__CYGWIN32__) # include # define dup _dup # define lseek _lseek @@@@ -235,7 +235,7 @@@@ void -render(ddjvu_page_t *page) +render(ddjvu_page_t *page, int pageno) { ddjvu_rect_t prect; ddjvu_rect_t rrect; @@@@ -370,7 +370,7 @@@@ break; } if (! (fmt = ddjvu_format_create(style, 0, 0))) - die(i18n("Cannot determine pixel style")); + die(i18n("Cannot determine pixel style for page %d"), pageno); ddjvu_format_set_row_order(fmt, 1); /* Allocate buffer */ if (style == DDJVU_FORMAT_MSBTOLSB) @@@@ -380,12 +380,13 @@@@ else rowsize = rrect.w * 3; if (! (image = (char*)malloc(rowsize * rrect.h))) - die(i18n("Cannot allocate image buffer")); + die(i18n("Cannot allocate image buffer for page %d"), pageno); /* Render */ timingdata[2] = ticks(); if (! ddjvu_page_render(page, mode, &prect, &rrect, fmt, rowsize, image)) - die(i18n("Cannot render image")); + if (style != DDJVU_FORMAT_MSBTOLSB && style != DDJVU_FORMAT_LSBTOMSB) + memset(image, 0xFF, rowsize * rrect.h); timingdata[3] = ticks(); if (flag_verbose) if (timingdata[2] != timingdata[3]) @@@@ -624,7 +625,7 @@@@ } /* Render */ inform(page, pageno); - render(page); + render(page, pageno); ddjvu_page_release(page); } Index: xmltools/Makefile.in --- xmltools/Makefile.in.orig 2007-12-06 19:17:40 +0100 +++ xmltools/Makefile.in 2009-05-09 09:37:18 +0200 @@@@ -51,7 +51,7 @@@@ INCS = -I${top_builddir} -I${top_srcdir}/libdjvu -I${srcdir} FLAGS = ${DEFS} ${INCS} ${OPTS} ${JPEG_CFLAGS} ${THREAD_CFLAGS} -LIBS= @@LDFLAGS@@ ${JPEG_LIBS} ${THREAD_LIBS} @@LIBS@@ +LIBS= @@LDFLAGS@@ @@LIBS@@ CFLAGS = ${FLAGS} @@CPPFLAGS@@ @@CFLAGS@@ CXXFLAGS = ${FLAGS} ${CXXRPOFLAGS} @@CPPFLAGS@@ @@CXXFLAGS@@ @ 1.1 log @new package: djvulibre 3.5.21 (DjVu Library) @ text @d1 66 d69 1 a69 1 +++ libdjvu/atomic.cpp 2008-12-19 20:24:20 +0100 d79 92 @