[poppler] 5 commits - poppler/ABWOutputDev.cc poppler/PSOutputDev.cc poppler/TextOutputDev.cc test/perf-test.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Dec 21 13:10:47 PST 2008
poppler/ABWOutputDev.cc | 3 ++-
poppler/PSOutputDev.cc | 3 ++-
poppler/TextOutputDev.cc | 14 ++++++++------
test/perf-test.cc | 6 ++++--
4 files changed, 16 insertions(+), 10 deletions(-)
New commits:
commit f6d84dcfc9cc587c7408af79b1ee7658d456f8d8
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Dec 21 22:09:00 2008 +0100
Fix compile warning to suggest parentheses and/or
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 14ffb37..fea4702 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -18,6 +18,7 @@
// Copyright (C) 2007, 2008 Adrian Johnson <ajohnson at redneon.com>
// Copyright (C) 2008 Koji Otani <sho at bbr.jp>
// Copyright (C) 2008 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008 Hib Eris <hib at hiberis.nl>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -3810,8 +3811,8 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
(selection->x2 < p->xMax && selection->y2 < p->yMax))
if (begin == NULL)
begin = p;
- if ((selection->x1 > p->xMin && selection->y1 > p->yMin ||
- selection->x2 > p->xMin && selection->y2 > p->yMin) && (begin != NULL)) {
+ if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
+ (selection->x2 > p->xMin && selection->y2 > p->yMin)) && (begin != NULL)) {
end = p->next;
current = p;
}
@@ -3895,8 +3896,9 @@ void TextBlock::visitSelection(TextSelectionVisitor *visitor,
stop_y = selection->y1;
}
- if ((selection->x1 > p->xMin && selection->y1 > p->yMin ||
- selection->x2 > p->xMin && selection->y2 > p->yMin) && (begin != NULL))
+ if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
+ (selection->x2 > p->xMin && selection->y2 > p->yMin))
+ && (begin != NULL))
end = p->next;
}
@@ -3973,8 +3975,8 @@ void TextPage::visitSelection(TextSelectionVisitor *visitor,
stop_y = selection->y1;
}
- if (selection->x1 > b->xMin && selection->y1 > b->yMin ||
- selection->x2 > b->xMin && selection->y2 > b->yMin)
+ if ((selection->x1 > b->xMin && selection->y1 > b->yMin) ||
+ (selection->x2 > b->xMin && selection->y2 > b->yMin))
end = i + 1;
}
commit 15205403eaa95d6fba0e36983de993877dd3a983
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Dec 21 21:59:45 2008 +0100
Fix warning to suggest parentheses inside shift
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index a111894..b94eb42 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -19,6 +19,7 @@
// Copyright (C) 2006 Jeff Muizelaar <jeff at infidigm.net>
// Copyright (C) 2007, 2008 Brad Hards <bradh at kde.org>
// Copyright (C) 2008 Koji Otani <sho at bbr.jp>
+// Copyright (C) 2008 Hib Eris <hib at hiberis.nl>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -6171,7 +6172,7 @@ void PSOutputDev::cvtFunction(Function *func) {
writePSFmt("{0:d} index {1:d} get dup\n",
i + k/2 + (1 << (m-j)) - k, j);
writePS("3 2 roll mul exch 1 exch sub 3 2 roll mul add\n");
- writePSFmt("{0:d} 1 roll\n", k/2 + (1 << m-j) - k - 1);
+ writePSFmt("{0:d} 1 roll\n", k/2 + (1 << (m-j)) - k - 1);
}
// [e01] [efrac] s'(0) s'(1) ... s(2^(m-j-1)-1)
}
commit cc24f37e582bfc0069faf286da97a48fe4794db1
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Dec 21 21:35:29 2008 +0100
Fix compile warning on ambiguous else
diff --git a/test/perf-test.cc b/test/perf-test.cc
index 135ed34..4de17ae 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -937,11 +937,12 @@ static void RenderPdf(const char *fileName)
bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0);
msTimer.stop();
double timeInMs = msTimer.getElapsed();
- if (gfTimings)
+ 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->getWidth(), bmpSplash->getHeight(), timeInMs);
+ }
if (ShowPreview()) {
PreviewBitmapSplash(bmpSplash);
commit a8cc4ad8c2da804f25db8cca1c85433d5a63307c
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Dec 21 21:34:28 2008 +0100
Fix compile warning on format not a string literal
diff --git a/test/perf-test.cc b/test/perf-test.cc
index a9fa50b..135ed34 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -1,4 +1,5 @@
/* Copyright Krzysztof Kowalczyk 2006-2007
+ Copyright Hib Eris <hib at hiberis.nl> 2008
License: GPLv2 */
/*
A tool to stress-test poppler rendering and measure rendering times for
@@ -802,7 +803,7 @@ void LogInfo(char *fmt, ...)
va_start(args, fmt);
p += _vsnprintf(p, sizeof(buf) - 1, fmt, args);
*p = '\0';
- fprintf(gOutFile, buf);
+ fprintf(gOutFile, "%s", buf);
va_end(args);
fflush(gOutFile);
}
commit 3cbbf8226730aa7ee6273e154e4a9d58670a3cda
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Dec 21 21:30:54 2008 +0100
Fix compile warning about uninitialized variable
diff --git a/poppler/ABWOutputDev.cc b/poppler/ABWOutputDev.cc
index 06809d2..3a8e739 100644
--- a/poppler/ABWOutputDev.cc
+++ b/poppler/ABWOutputDev.cc
@@ -4,6 +4,7 @@
//
// Copyright 2006-2007 Jauco Noordzij <jauco at jauco.nl>
// Copyright 2007 Dominic Lachowicz <cinamod at hotmail.com>
+// Copyright 2008 Hib Eris <hib at hiberis.nl>
//
// Based somewhat on HtmlOutputDev.cc
//
@@ -455,7 +456,7 @@ void ABWOutputDev::interpretXYTree(){
}
void ABWOutputDev::ATP_recursive(xmlNodePtr N_parent){
- xmlNodePtr N_first, N_second, N_line, N_tempCol, N_tempColset;
+ xmlNodePtr N_first, N_second, N_line, N_tempCol, N_tempColset = NULL;
N_first = N_parent->children;
if (!N_first)
More information about the poppler
mailing list