Commit e38ffea6 authored by Adrian Johnson's avatar Adrian Johnson

Fix some -Wundef warnings

parent 9bb84057
......@@ -10,7 +10,7 @@
#include <config.h>
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
#ifdef USE_GCC_PRAGMAS
#pragma implementation
......
......@@ -127,7 +127,7 @@ extern XpdfPluginVecTable xpdfPluginVecTable;
GlobalParams *globalParams = NULL;
#if ENABLE_RELOCATABLE && defined(_WIN32)
#if defined(ENABLE_RELOCATABLE) && defined(_WIN32)
/* search for data relative to where we are installed */
......
......@@ -67,10 +67,10 @@
#include "Catalog.h"
#include "Page.h"
#include "Stream.h"
#if ENABLE_ZLIB
#ifdef ENABLE_ZLIB
# include "FlateEncoder.h"
#endif
#if ENABLE_ZLIB_UNCOMPRESS
#ifdef ENABLE_ZLIB_UNCOMPRESS
# include "FlateStream.h"
#endif
#include "Annot.h"
......@@ -78,7 +78,7 @@
#include "PreScanOutputDev.h"
#include "FileSpec.h"
#include "CharCodeToUnicode.h"
#if HAVE_SPLASH
#ifdef HAVE_SPLASH
# include "splash/Splash.h"
# include "splash/SplashBitmap.h"
# include "SplashOutputDev.h"
......@@ -3282,7 +3282,7 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
paperColor[0] = 0xff;
splashOut = new SplashOutputDev(splashModeMono8, 1, gFalse,
paperColor, gFalse);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
} else if (level == psLevel1Sep || level == psLevel2Sep ||
level == psLevel3Sep || globalParams->getOverprintPreview()) {
numComps = 4;
......
This diff is collapsed.
......@@ -404,7 +404,7 @@ private:
void setupScreenParams(double hDPI, double vDPI);
SplashPattern *getColor(GfxGray gray);
SplashPattern *getColor(GfxRGB *rgb);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
SplashPattern *getColor(GfxCMYK *cmyk);
SplashPattern *getColor(GfxColor *deviceN);
#endif
......
......@@ -839,7 +839,7 @@ namespace Poppler {
}
bool isOverprintPreviewAvailable() {
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
return true;
#else
return false;
......
......@@ -305,7 +305,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h,
#if defined(HAVE_SPLASH)
SplashColor bgColor;
GBool overprintPreview = gFalse;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
overprintPreview = m_page->parentDoc->m_hints & Document::OverprintPreview ? gTrue : gFalse;
if (overprintPreview)
{
......@@ -338,7 +338,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h,
}
SplashColorMode colorMode = splashModeXBGR8;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (overprintPreview) colorMode = splashModeDeviceN8;
#endif
......
......@@ -836,7 +836,7 @@ namespace Poppler {
}
bool isOverprintPreviewAvailable() {
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
return true;
#else
return false;
......
......@@ -307,7 +307,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h,
#if defined(HAVE_SPLASH)
SplashColor bgColor;
GBool overprintPreview = gFalse;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
overprintPreview = m_page->parentDoc->m_hints & Document::OverprintPreview ? gTrue : gFalse;
if (overprintPreview)
{
......@@ -340,7 +340,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h,
}
SplashColorMode colorMode = splashModeXBGR8;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (overprintPreview) colorMode = splashModeDeviceN8;
#endif
......
This diff is collapsed.
......@@ -62,7 +62,7 @@ typedef void (*SplashICCTransform)(void *data, SplashBitmap *bitmap);
//------------------------------------------------------------------------
enum SplashPipeResultColorCtrl {
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
splashPipeResultColorNoAlphaBlendCMYK,
splashPipeResultColorNoAlphaBlendDeviceN,
#endif
......@@ -70,13 +70,13 @@ enum SplashPipeResultColorCtrl {
splashPipeResultColorNoAlphaBlendMono,
splashPipeResultColorAlphaNoBlendMono,
splashPipeResultColorAlphaNoBlendRGB,
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
splashPipeResultColorAlphaNoBlendCMYK,
splashPipeResultColorAlphaNoBlendDeviceN,
#endif
splashPipeResultColorAlphaBlendMono,
splashPipeResultColorAlphaBlendRGB
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
,
splashPipeResultColorAlphaBlendCMYK,
splashPipeResultColorAlphaBlendDeviceN
......@@ -298,7 +298,7 @@ private:
void pipeRunSimpleRGB8(SplashPipe *pipe);
void pipeRunSimpleXBGR8(SplashPipe *pipe);
void pipeRunSimpleBGR8(SplashPipe *pipe);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
void pipeRunSimpleCMYK8(SplashPipe *pipe);
void pipeRunSimpleDeviceN8(SplashPipe *pipe);
#endif
......@@ -307,7 +307,7 @@ private:
void pipeRunAARGB8(SplashPipe *pipe);
void pipeRunAAXBGR8(SplashPipe *pipe);
void pipeRunAABGR8(SplashPipe *pipe);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
void pipeRunAACMYK8(SplashPipe *pipe);
void pipeRunAADeviceN8(SplashPipe *pipe);
#endif
......
......@@ -90,7 +90,7 @@ SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPadA,
rowSize = -1;
}
break;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashModeCMYK8:
if (width > 0 && width <= INT_MAX / 4) {
rowSize = width * 4;
......@@ -247,7 +247,7 @@ SplashError SplashBitmap::writePNMFile(FILE *f) {
}
break;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashModeCMYK8:
case splashModeDeviceN8:
// PNM doesn't support CMYK
......@@ -308,7 +308,7 @@ void SplashBitmap::getPixel(int x, int y, SplashColorPtr pixel) {
pixel[1] = p[1];
pixel[2] = p[0];
break;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashModeCMYK8:
p = &data[y * rowSize + 4 * x];
pixel[0] = p[0];
......@@ -376,7 +376,7 @@ SplashError SplashBitmap::writeImgFile(SplashImageFileFormat format, FILE *f, in
#endif
#ifdef ENABLE_LIBJPEG
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashFormatJpegCMYK:
writer = new JpegWriter(JpegWriter::CMYK);
setJpegParams(writer, params);
......@@ -403,7 +403,7 @@ SplashError SplashBitmap::writeImgFile(SplashImageFileFormat format, FILE *f, in
case splashModeBGR8:
writer = new TiffWriter(TiffWriter::RGB);
break;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashModeCMYK8:
case splashModeDeviceN8:
writer = new TiffWriter(TiffWriter::CMYK);
......@@ -443,7 +443,7 @@ void SplashBitmap::getRGBLine(int yl, SplashColorPtr line) {
m = byteToDbl(col[1]);
y = byteToDbl(col[2]);
k = byteToDbl(col[3]);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (separationList->getLength() > 0) {
for (int i = 0; i < separationList->getLength(); i++) {
if (col[i+4] > 0) {
......@@ -489,7 +489,7 @@ void SplashBitmap::getXBGRLine(int yl, SplashColorPtr line, ConversionMode conve
m = byteToDbl(col[1]);
y = byteToDbl(col[2]);
k = byteToDbl(col[3]);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (separationList->getLength() > 0) {
for (int i = 0; i < separationList->getLength(); i++) {
if (col[i+4] > 0) {
......@@ -593,7 +593,7 @@ GBool SplashBitmap::convertToXBGR(ConversionMode conversionMode) {
return newdata != NULL;
}
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
void SplashBitmap::getCMYKLine(int yl, SplashColorPtr line) {
SplashColor col;
......@@ -637,7 +637,7 @@ void SplashBitmap::getCMYKLine(int yl, SplashColorPtr line) {
SplashError SplashBitmap::writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int vDPI, SplashColorMode imageWriterFormat) {
if (mode != splashModeRGB8 && mode != splashModeMono8 && mode != splashModeMono1 && mode != splashModeXBGR8 && mode != splashModeBGR8
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
&& mode != splashModeCMYK8 && mode != splashModeDeviceN8
#endif
) {
......@@ -650,7 +650,7 @@ SplashError SplashBitmap::writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int
}
switch (mode) {
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
case splashModeCMYK8:
if (writer->supportCMYK()) {
SplashColorPtr row;
......
......@@ -96,7 +96,7 @@ public:
void getPixel(int x, int y, SplashColorPtr pixel);
void getRGBLine(int y, SplashColorPtr line);
void getXBGRLine(int y, SplashColorPtr line, ConversionMode conversionMode = conversionOpaque);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
void getCMYKLine(int y, SplashColorPtr line);
#endif
Guchar getAlpha(int x, int y);
......
......@@ -65,7 +65,7 @@ SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
FT_Face face;
int div;
int x, y;
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
SplashCoord scale;
#endif
......@@ -87,7 +87,7 @@ SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
div = face->bbox.xMax > 20000 ? 65536 : 1;
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
scale = (SplashCoord)1 / (SplashCoord)face->units_per_EM;
// transform the four corners of the font bounding box -- the min
......@@ -204,7 +204,7 @@ SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
}
// compute the transform matrix
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
matrix.xx = (FT_Fixed)((mat[0] / size).get16Dot16());
matrix.yx = (FT_Fixed)((mat[1] / size).get16Dot16());
matrix.xy = (FT_Fixed)((mat[2] / size).get16Dot16());
......
......@@ -54,7 +54,7 @@ public:
// Create a font engine.
SplashFontEngine(
#if HAVE_T1LIB_H
#ifdef HAVE_T1LIB_H
GBool enableT1lib,
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
......@@ -99,7 +99,7 @@ private:
SplashFont *fontCache[splashFontCacheSize];
#if HAVE_T1LIB_H
#ifdef HAVE_T1LIB_H
SplashT1FontEngine *t1Engine;
#endif
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
......
......@@ -23,7 +23,7 @@
#include "poppler-config.h"
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
#include "goo/FixedPoint.h"
#else
#include <math.h>
......@@ -31,9 +31,9 @@
#include "SplashTypes.h"
static inline SplashCoord splashAbs(SplashCoord x) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::abs(x);
#elif USE_FLOAT
#elif defined(USE_FLOAT)
return fabsf(x);
#else
return fabs(x);
......@@ -41,11 +41,11 @@ static inline SplashCoord splashAbs(SplashCoord x) {
}
static inline int splashFloor(SplashCoord x) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::floor(x);
#elif USE_FLOAT
#elif defined(USE_FLOAT)
return (int)floorf(x);
#elif __GNUC__ && __i386__
#elif defined(__GNUC__) && defined(__i386__)
// floor() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with
// some inline assembly
......@@ -64,7 +64,7 @@ static inline int splashFloor(SplashCoord x) {
: "=m" (oldCW), "=m" (newCW), "=m" (result), "=r" (t)
: "m" (x));
return result;
#elif defined(WIN32) && defined(_M_IX86)
#elif defined(WIN32) && defined(_M_IX86)
// floor() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with
// some inline assembly
......@@ -81,18 +81,18 @@ static inline int splashFloor(SplashCoord x) {
__asm fistp DWORD PTR result
__asm fldcw WORD PTR oldCW
return result;
#else
#else
if (x > 0) return (int)x;
else return (int)floor(x);
#endif
#endif
}
static inline int splashCeil(SplashCoord x) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::ceil(x);
#elif USE_FLOAT
#elif defined(USE_FLOAT)
return (int)ceilf(x);
#elif __GNUC__ && __i386__
#elif defined(__GNUC__) && defined(__i386__)
// ceil() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with
// some inline assembly
......@@ -134,9 +134,9 @@ static inline int splashCeil(SplashCoord x) {
}
static inline int splashRound(SplashCoord x) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::round(x);
#elif __GNUC__ && __i386__
#elif defined(__GNUC__) && defined(__i386__)
// this could use round-to-nearest mode and avoid the "+0.5",
// but that produces slightly different results (because i+0.5
// sometimes rounds up and sometimes down using the even rule)
......@@ -180,7 +180,7 @@ static inline int splashRound(SplashCoord x) {
}
static inline SplashCoord splashAvg(SplashCoord x, SplashCoord y) {
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
return FixedPoint::avg(x, y);
#else
return 0.5 * (x + y);
......@@ -188,9 +188,9 @@ static inline SplashCoord splashAvg(SplashCoord x, SplashCoord y) {
}
static inline SplashCoord splashSqrt(SplashCoord x) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::sqrt(x);
#elif USE_FLOAT
#elif defined(USE_FLOAT)
return sqrtf(x);
#else
return sqrt(x);
......@@ -198,9 +198,9 @@ static inline SplashCoord splashSqrt(SplashCoord x) {
}
static inline SplashCoord splashPow(SplashCoord x, SplashCoord y) {
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
return FixedPoint::pow(x, y);
#elif USE_FLOAT
#elif defined(USE_FLOAT)
return powf(x, y);
#else
return pow(x, y);
......@@ -212,7 +212,7 @@ static inline SplashCoord splashDist(SplashCoord x0, SplashCoord y0,
SplashCoord dx, dy;
dx = x1 - x0;
dy = y1 - y0;
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
// this handles the situation where dx*dx or dy*dy is too large to
// fit in the 16.16 fixed point format
SplashCoord dxa, dya, d;
......@@ -235,7 +235,7 @@ static inline SplashCoord splashDist(SplashCoord x0, SplashCoord y0,
static inline GBool splashCheckDet(SplashCoord m11, SplashCoord m12,
SplashCoord m21, SplashCoord m22,
SplashCoord epsilon) {
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
return FixedPoint::checkDet(m11, m12, m21, m22, epsilon);
#else
return fabs(m11 * m22 - m12 * m21) >= epsilon;
......
......@@ -39,7 +39,7 @@
// number of components in each color mode
int splashColorModeNComps[] = {
1, 1, 3, 3, 4
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
, 4, 4 + SPOT_NCOMPS
#endif
};
......@@ -83,7 +83,7 @@ SplashState::SplashState(int width, int height, GBool vectorAntialias,
rgbTransferG[i] = (Guchar)i;
rgbTransferB[i] = (Guchar)i;
grayTransfer[i] = (Guchar)i;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
cmykTransferC[i] = (Guchar)i;
cmykTransferM[i] = (Guchar)i;
cmykTransferY[i] = (Guchar)i;
......@@ -136,7 +136,7 @@ SplashState::SplashState(int width, int height, GBool vectorAntialias,
rgbTransferG[i] = (Guchar)i;
rgbTransferB[i] = (Guchar)i;
grayTransfer[i] = (Guchar)i;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
cmykTransferC[i] = (Guchar)i;
cmykTransferM[i] = (Guchar)i;
cmykTransferY[i] = (Guchar)i;
......@@ -187,7 +187,7 @@ SplashState::SplashState(SplashState *state) {
memcpy(rgbTransferG, state->rgbTransferG, 256);
memcpy(rgbTransferB, state->rgbTransferB, 256);
memcpy(grayTransfer, state->grayTransfer, 256);
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
memcpy(cmykTransferC, state->cmykTransferC, 256);
memcpy(cmykTransferM, state->cmykTransferM, 256);
memcpy(cmykTransferY, state->cmykTransferY, 256);
......@@ -249,7 +249,7 @@ void SplashState::setSoftMask(SplashBitmap *softMaskA) {
void SplashState::setTransfer(Guchar *red, Guchar *green, Guchar *blue,
Guchar *gray) {
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
int i;
for (i = 0; i < 256; ++i) {
......
......@@ -124,7 +124,7 @@ private:
rgbTransferG[256],
rgbTransferB[256];
Guchar grayTransfer[256];
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
Guchar cmykTransferC[256],
cmykTransferM[256],
cmykTransferY[256],
......
......@@ -31,10 +31,10 @@
// coordinates
//------------------------------------------------------------------------
#if USE_FIXEDPOINT
#if defined(USE_FIXEDPOINT)
#include "goo/FixedPoint.h"
typedef FixedPoint SplashCoord;
#elif USE_FLOAT
#elif defined(USE_FLOAT)
typedef float SplashCoord;
#else
typedef double SplashCoord;
......@@ -64,7 +64,7 @@ enum SplashColorMode {
// BGRBGR...
splashModeXBGR8 // 1 byte per component, 4 bytes per pixel:
// XBGRXBGR...
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
,
splashModeCMYK8, // 1 byte per component, 4 bytes per pixel:
// CMYKCMYK...
......@@ -85,7 +85,7 @@ enum SplashThinLineMode {
extern int splashColorModeNComps[];
// max number of components in any SplashColor
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
#define splashMaxColorComps SPOT_NCOMPS+4
#else
#define splashMaxColorComps 4
......@@ -104,7 +104,7 @@ static inline Guchar splashBGR8R(SplashColorPtr bgr8) { return bgr8[2]; }
static inline Guchar splashBGR8G(SplashColorPtr bgr8) { return bgr8[1]; }
static inline Guchar splashBGR8B(SplashColorPtr bgr8) { return bgr8[0]; }
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
// CMYK8
static inline Guchar splashCMYK8C(SplashColorPtr cmyk8) { return cmyk8[0]; }
static inline Guchar splashCMYK8M(SplashColorPtr cmyk8) { return cmyk8[1]; }
......@@ -123,7 +123,7 @@ static inline void splashClearColor(SplashColorPtr dest) {
dest[0] = 0;
dest[1] = 0;
dest[2] = 0;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
dest[3] = 0;
for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
dest[i] = 0;
......@@ -134,7 +134,7 @@ static inline void splashColorCopy(SplashColorPtr dest, SplashColorPtr src) {
dest[0] = src[0];
dest[1] = src[1];
dest[2] = src[2];
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
dest[3] = src[3];
for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
dest[i] = src[i];
......@@ -145,7 +145,7 @@ static inline void splashColorXor(SplashColorPtr dest, SplashColorPtr src) {
dest[0] ^= src[0];
dest[1] ^= src[1];
dest[2] ^= src[2];
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
dest[3] ^= src[3];
for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
dest[i] ^= src[i];
......
......@@ -289,7 +289,7 @@ void SplashXPath::addCurve(SplashCoord x0, SplashCoord y0,
SplashCoord dx, dy, mx, my, d1, d2, flatness2;
int p1, p2, p3;
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
flatness2 = flatness;
#else
flatness2 = flatness * flatness;
......@@ -333,7 +333,7 @@ void SplashXPath::addCurve(SplashCoord x0, SplashCoord y0,
// line)
mx = (xl0 + xr3) * 0.5;
my = (yl0 + yr3) * 0.5;
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
d1 = splashDist(xx1, yy1, mx, my);
d2 = splashDist(xx2, yy2, mx, my);
#else
......@@ -411,7 +411,7 @@ void SplashXPath::addSegment(SplashCoord x0, SplashCoord y0,
segs[length].dxdy = segs[length].dydx = 0;
segs[length].flags |= splashXPathVert;
} else {
#if USE_FIXEDPOINT
#ifdef USE_FIXEDPOINT
if (FixedPoint::divCheck(x1 - x0, y1 - y0, &segs[length].dxdy)) {
segs[length].dydx = (SplashCoord)1 / segs[length].dxdy;
} else {
......
......@@ -90,7 +90,7 @@ static GBool tiff = gFalse;
static GooString jpegOpt;
static int jpegQuality = -1;
static bool jpegProgressive = false;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
static GBool overprint = gFalse;
#endif
static char enableFreeTypeStr[16] = "";
......@@ -159,14 +159,14 @@ static const ArgDesc argDesc[] = {
#if ENABLE_LIBJPEG
{"-jpeg", argFlag, &jpeg, 0,
"generate a JPEG file"},
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
{"-jpegcmyk",argFlag, &jpegcmyk, 0,
"generate a CMYK JPEG file"},
#endif
{"-jpegopt", argGooString, &jpegOpt, 0,
"jpeg options, with format <opt1>=<val1>[,<optN>=<valN>]*"},
#endif
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
{"-overprint",argFlag, &overprint, 0,
"enable overprint"},
#endif
......@@ -350,7 +350,7 @@ static void processPageJobs() {
// process the job
SplashOutputDev *splashOut = new SplashOutputDev(mono ? splashModeMono1 :
gray ? splashModeMono8 :
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
(jpegcmyk || overprint) ? splashModeDeviceN8 :
#endif
splashModeRGB8, 4, gFalse, *pageJob.paperColor, gTrue, thinLineMode);
......@@ -517,7 +517,7 @@ int main(int argc, char *argv[]) {
}
// write PPM files
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (jpegcmyk || overprint) {
globalParams->setOverprintPreview(gTrue);
for (int cp = 0; cp < SPOT_NCOMPS+4; cp++)
......@@ -534,7 +534,7 @@ int main(int argc, char *argv[]) {
splashOut = new SplashOutputDev(mono ? splashModeMono1 :
gray ? splashModeMono8 :
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
(jpegcmyk || overprint) ? splashModeDeviceN8 :
#endif
splashModeRGB8, 4,
......
......@@ -112,7 +112,7 @@ static char userPassword[33] = "\001";
static GBool quiet = gFalse;
static GBool printVersion = gFalse;
static GBool printHelp = gFalse;
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
static GBool overprint = gFalse;
#endif
......@@ -185,7 +185,7 @@ static const ArgDesc argDesc[] = {
"owner password (for encrypted files)"},
{"-upw", argString, userPassword, sizeof(userPassword),
"user password (for encrypted files)"},
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
{"-overprint",argFlag, &overprint, 0,
"enable overprint"},
#endif
......@@ -286,7 +286,7 @@ int main(int argc, char *argv[]) {
goto err0;
}
}
#if SPLASH_CMYK
#ifdef SPLASH_CMYK
if (overprint) {
globalParams->setOverprintPreview(gTrue);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment