[poppler] 5 commits - configure.ac poppler/Annot.cc poppler/CairoFontEngine.cc poppler/CairoOutputDev.cc poppler/Catalog.cc poppler/Form.cc poppler/GfxFont.cc poppler/GfxState.cc poppler/Page.cc poppler/SplashOutputDev.cc poppler/TextOutputDev.cc splash/Splash.cc splash/SplashFTFontEngine.cc
Krzysztof Kowalczyk
kjk at kemper.freedesktop.org
Fri Sep 21 00:58:39 PDT 2007
configure.ac | 2 +-
poppler/Annot.cc | 5 ++---
poppler/CairoFontEngine.cc | 6 ++----
poppler/CairoOutputDev.cc | 14 ++------------
poppler/Catalog.cc | 1 -
poppler/Form.cc | 5 -----
poppler/GfxFont.cc | 6 ++----
poppler/GfxState.cc | 11 ++---------
poppler/Page.cc | 2 +-
poppler/SplashOutputDev.cc | 9 +++------
poppler/TextOutputDev.cc | 3 ---
splash/Splash.cc | 5 ++++-
splash/SplashFTFontEngine.cc | 2 ++
13 files changed, 21 insertions(+), 50 deletions(-)
New commits:
diff-tree 31c43b118bd4372134018be6f6693f77d1f6a39b (from 01b99f60e36dd955817f23911ef38947360f61f7)
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 (voi
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::drawImageMaskPresca
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::drawImageMaskPresca
}
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::drawImageMaskPresca
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(Gfx
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
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
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
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
diff-tree 01b99f60e36dd955817f23911ef38947360f61f7 (from 7c406400532d68524a43cf963d894d3c4b269400)
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(GfxCol
}
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,
}
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(Gucha
}
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(GfxSt
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 (Text
{
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 (Te
PDFRectangle *selection)
{
double x1, y1, x2, y2, margin;
- int i;
Matrix ctm, ictm;
state->setFillColor(box_color);
@@ -3971,7 +3969,6 @@ GooList *TextPage::getSelectionRegion(PD
SelectionStyle style,
double scale) {
TextSelectionSizer sizer(this, scale);
- GooList *region;
visitSelection(&sizer, selection, style);
diff-tree 7c406400532d68524a43cf963d894d3c4b269400 (from 70f23389c97b1870b7311d97322cdd16b580a79d)
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 *voi
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
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 *xr
{
parent = p;
type = formText;
- Dict *dict = aobj->getDict();
}
void FormWidgetText::loadDefaults ()
@@ -655,7 +651,6 @@ bool FormWidgetSignature::isReadOnly ()
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(FoF
"Adobe-Korea1-UCS2",
adobe_korea1_cmaps,
},
- 0
+ {0, 0, 0, 0}
};
Unicode *humap = 0;
Unicode *vumap = 0;
@@ -1643,7 +1643,6 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoF
unsigned long n;
int i;
unsigned long code;
- Unicode uBuf[8];
int wmode;
char **cmapName;
CMap *cMap;
@@ -1782,13 +1781,12 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoF
*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 *
return;
- err3:
trans.initNull();
err2:
annots.initNull();
@@ -357,6 +356,7 @@ Gfx *Page::createGfx(OutputDev *out, dou
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(SplashBitm
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) {
diff-tree 70f23389c97b1870b7311d97322cdd16b580a79d (from cdb6fcf98137473efd993e1374a6f010e9db67db)
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 \
diff-tree cdb6fcf98137473efd993e1374a6f010e9db67db (from 0e76b49ac852a5a7ebae4c1f67b153e0b7c9f905)
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, Go
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
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 *cata
//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);
More information about the poppler
mailing list