Commit 2ab9bd5a authored by Enrico Ros's avatar Enrico Ros
Browse files

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

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=355324
parent 5cca5188
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 \
......
......@@ -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,
......
......@@ -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(),
......
......@@ -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")) {
......
......@@ -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'",
......
......@@ -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
};
......
......@@ -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");
......
......@@ -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;
......
#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
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