sync to HEAD. forward-port: make final tricks, user parameters and more.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=355324
This commit is contained in:
Enrico Ros 2004-10-17 16:42:05 +00:00
parent 5cca518867
commit 2ab9bd5a4d
9 changed files with 21 additions and 17 deletions

View file

@ -1,4 +1,4 @@
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../goo $(LIBFREETYPE_CFLAGS)
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../goo $(LIBFREETYPE_CFLAGS) $(USER_INCLUDES)
libsplash_la_SOURCES = Splash.cc SplashBitmap.cc SplashClip.cc SplashFTFont.cc SplashFTFontEngine.cc \
SplashFTFontFile.cc SplashFont.cc SplashFontEngine.cc SplashFontFile.cc SplashFontFileID.cc \

View file

@ -31,7 +31,7 @@ extern "C" int unlink(char *filename);
//------------------------------------------------------------------------
static void fileWrite(void *stream, const char *data, int len) {
static void FT_fileWrite(void *stream, const char *data, int len) {
fwrite(data, 1, len, (FILE *)stream);
}
@ -113,7 +113,7 @@ SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
delete ff;
return NULL;
}
ff->writeTTF(&fileWrite, tmpFile);
ff->writeTTF(&FT_fileWrite, tmpFile);
delete ff;
fclose(tmpFile);
ret = SplashFTFontFile::loadTrueTypeFont(this, idA,

View file

@ -36,7 +36,7 @@ int SplashT1FontEngine::t1libInitCount = 0;
//------------------------------------------------------------------------
static void fileWrite(void *stream, const char *data, int len) {
static void T1_fileWrite(void *stream, const char *data, int len) {
fwrite(data, 1, len, (FILE *)stream);
}
@ -105,7 +105,7 @@ SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA,
delete ff;
return NULL;
}
ff->convertToType1(NULL, gTrue, &fileWrite, tmpFile);
ff->convertToType1(NULL, gTrue, &T1_fileWrite, tmpFile);
delete ff;
fclose(tmpFile);
ret = SplashT1FontFile::loadType1Font(this, idA, tmpFileName->getCString(),

View file

@ -36,7 +36,7 @@ struct CMapVectorEntry {
//------------------------------------------------------------------------
static int getCharFromFile(void *data) {
static int CMap_getCharFromFile(void *data) {
return fgetc((FILE *)data);
}
@ -68,7 +68,7 @@ CMap *CMap::parse(CMapCache *cache, GString *collectionA,
cmap = new CMap(collectionA->copy(), cMapNameA->copy());
pst = new PSTokenizer(&getCharFromFile, f);
pst = new PSTokenizer(&CMap_getCharFromFile, f);
pst->getToken(tok1, sizeof(tok1), &n1);
while (pst->getToken(tok2, sizeof(tok2), &n2)) {
if (!strcmp(tok2, "usecmap")) {

View file

@ -48,7 +48,7 @@ static int getCharFromString(void *data) {
return c;
}
static int getCharFromFile(void *data) {
static int CharCodeToUnicode_getCharFromFile(void *data) {
return fgetc((FILE *)data);
}
@ -222,7 +222,7 @@ void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data,
if (tok1[0] == '/') {
name = new GString(tok1 + 1);
if ((f = globalParams->findToUnicodeFile(name))) {
parseCMap1(&getCharFromFile, f, nBits);
parseCMap1(&CharCodeToUnicode_getCharFromFile, f, nBits);
fclose(f);
} else {
error(-1, "Couldn't find ToUnicode CMap file for '%s'",

View file

@ -84,6 +84,7 @@ static const char *displayFontDirs[] = {
"/usr/share/ghostscript/fonts",
"/usr/local/share/ghostscript/fonts",
"/usr/share/fonts/default/Type1",
"/usr/share/fonts/type1/gsfonts",
NULL
};

View file

@ -23,7 +23,7 @@
// A '1' in this array means the character is white space. A '1' or
// '2' means the character ends a name or command.
static char specialChars[256] = {
static char Lexer_specialChars[256] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
@ -129,7 +129,7 @@ Object *Lexer::getObj(Object *obj) {
comment = gFalse;
} else if (c == '%') {
comment = gTrue;
} else if (specialChars[c] != 1) {
} else if (Lexer_specialChars[c] != 1) {
break;
}
}
@ -300,7 +300,7 @@ Object *Lexer::getObj(Object *obj) {
case '/':
p = tokBuf;
n = 0;
while ((c = lookChar()) != EOF && !specialChars[c]) {
while ((c = lookChar()) != EOF && !Lexer_specialChars[c]) {
getChar();
if (c == '#') {
c2 = lookChar();
@ -369,7 +369,7 @@ Object *Lexer::getObj(Object *obj) {
} else if (c == EOF) {
error(getPos(), "Unterminated hex string");
break;
} else if (specialChars[c] != 1) {
} else if (Lexer_specialChars[c] != 1) {
c2 = c2 << 4;
if (c >= '0' && c <= '9')
c2 += c - '0';
@ -432,7 +432,7 @@ Object *Lexer::getObj(Object *obj) {
p = tokBuf;
*p++ = c;
n = 1;
while ((c = lookChar()) != EOF && !specialChars[c]) {
while ((c = lookChar()) != EOF && !Lexer_specialChars[c]) {
getChar();
if (++n == tokBufSize) {
error(getPos(), "Command token too long");

View file

@ -20,7 +20,7 @@
// A '1' in this array means the character is white space. A '1' or
// '2' means the character ends a name or command.
static char specialChars[256] = {
static char PSTokenizer_specialChars[256] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
@ -69,7 +69,7 @@ GBool PSTokenizer::getToken(char *buf, int size, int *length) {
}
} else if (c == '%') {
comment = gTrue;
} else if (specialChars[c] != 1) {
} else if (PSTokenizer_specialChars[c] != 1) {
break;
}
}
@ -103,7 +103,7 @@ GBool PSTokenizer::getToken(char *buf, int size, int *length) {
}
}
} else if (c != '[' && c != ']') {
while ((c = lookChar()) != EOF && !specialChars[c]) {
while ((c = lookChar()) != EOF && !PSTokenizer_specialChars[c]) {
getChar();
if (i < size - 1) {
buf[i++] = c;

View file

@ -1,3 +1,5 @@
#ifndef STREAM_CCITT_H
#define STREAM_CCITT_H
//========================================================================
//
// Stream-CCITT.h
@ -457,3 +459,4 @@ static CCITTCode blackTab3[64] = {
{2, 2}, {2, 2}, {2, 2}, {2, 2},
{2, 2}, {2, 2}, {2, 2}, {2, 2}
};
#endif