From kde-commits Tue Sep 23 13:12:38 2003 From: George Staikos Date: Tue, 23 Sep 2003 13:12:38 +0000 To: kde-commits Subject: kdegraphics/kpdf/xpdf X-MARC-Message: https://marc.info/?l=kde-commits&m=106432775018591 CVS commit by staikos: surprise surprise surprise! more glib code finds its way into KDE CVS and guess who gets to waste time fixing it? dirty deeds done dirt cheap. author: breaking compilation on purpose is not acceptable. when your app stops compiling, so does the module as a whole. I fixed a few warnings too, but it will take many hours to fix them all probably. M +3 -3 BuiltinFont.cc 1.4 M +3 -3 BuiltinFont.h 1.6 M +10 -6 XOutputDev.cc 1.6 --- kdegraphics/kpdf/xpdf/BuiltinFont.cc #1.3:1.4 @@ -40,5 +40,5 @@ BuiltinFontWidths::~BuiltinFontWidths() } -GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) { +GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) { int h; BuiltinFontWidth *p; @@ -54,6 +54,6 @@ GBool BuiltinFontWidths::getWidth(char * } -int BuiltinFontWidths::hash(char *name) { - char *p; +int BuiltinFontWidths::hash(const char *name) { + const char *p; unsigned int h; --- kdegraphics/kpdf/xpdf/BuiltinFont.h #1.5:1.6 @@ -25,5 +25,5 @@ class BuiltinFontWidths; struct BuiltinFont { const char *name; - const char **defaultBaseEnc; + char **defaultBaseEnc; short ascent; short descent; @@ -45,9 +45,9 @@ public: BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); ~BuiltinFontWidths(); - GBool getWidth(char *name, Gushort *width); + GBool getWidth(const char *name, Gushort *width); private: - int hash(char *name); + int hash(const char *name); BuiltinFontWidth **tab; --- kdegraphics/kpdf/xpdf/XOutputDev.cc #1.5:1.6 @@ -35,13 +35,15 @@ #include "TextOutputDev.h" #include "XOutputDev.h" -#if HAVE_T1LIB_H +#ifdef HAVE_T1LIB_H #include "T1Font.h" #endif -#if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H) +#if defined(FREETYPE2) && (defined(HAVE_FREETYPE_FREETYPE_H) || defined(HAVE_FREETYPE_H)) #include "FTFont.h" #endif -#if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H) +#ifndef FREETYPE2 +#if defined(HAVE_FREETYPE_FREETYPE_H) || defined(HAVE_FREETYPE_H) #include "TTFont.h" #endif +#endif #ifdef VMS @@ -131,5 +133,5 @@ void XOutputFont::getCharPath(GfxState * } -#if HAVE_T1LIB_H +#ifdef HAVE_T1LIB_H //------------------------------------------------------------------------ // XOutputT1Font @@ -185,5 +187,5 @@ void XOutputT1Font::getCharPath(GfxState #endif // HAVE_T1LIB_H -#if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H) +#if defined(FREETYPE2) && (defined(HAVE_FREETYPE_FREETYPE_H) || defined(HAVE_FREETYPE_H)) //------------------------------------------------------------------------ // XOutputFTFont @@ -1351,5 +1353,6 @@ XOutputFont *XOutputFontCache::tryGetFTF #endif // FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H) -#if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H) +#ifndef FREETYPE2 +#if defined(HAVE_FREETYPE_FREETYPE_H) || defined(HAVE_FREETYPE_H) XOutputFont *XOutputFontCache::tryGetTTFont(XRef *xref, GfxFont *gfxFont, @@ -1480,4 +1483,5 @@ XOutputFont *XOutputFontCache::tryGetTTF return font; } +#endif #endif // !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)