Commit 26580308 authored by Albert Astals Cid's avatar Albert Astals Cid

xpdf303: char * -> const char *

parent c899d26e
......@@ -101,7 +101,7 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if(CMAKE_COMPILER_IS_GNUCXX)
# set the default compile warnings
set(DEFAULT_COMPILE_WARNINGS_NO)
set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings -Wcast-align -fno-exceptions -fno-check-new -fno-common")
set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common")
set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}")
......
......@@ -568,7 +568,7 @@ if test "x$GCC" != xyes; then
fi
case "$enable_compile_warnings" in
no) ;;
yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;;
yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;;
kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \
-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \
-Wconversion -Wall -W -Wpointer-arith \
......
......@@ -28,7 +28,7 @@
using namespace poppler;
void detail::error_function(int pos, char *msg, va_list args)
void detail::error_function(int pos, const char *msg, va_list args)
{
std::ostringstream oss;
if (pos >= 0) {
......
......@@ -37,7 +37,7 @@ namespace poppler
namespace detail
{
void error_function(int pos, char *msg, va_list args);
void error_function(int pos, const char *msg, va_list args);
rectf pdfrectangle_to_rectf(const PDFRectangle &pdfrect);
......
......@@ -17,7 +17,7 @@
//------------------------------------------------------------------------
typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len);
//------------------------------------------------------------------------
// FoFiBase
......
......@@ -19,7 +19,7 @@
// Type 1 and 1C font data
//------------------------------------------------------------------------
char *fofiType1StandardEncoding[256] = {
const char *fofiType1StandardEncoding[256] = {
NULL,
NULL,
NULL,
......@@ -278,7 +278,7 @@ char *fofiType1StandardEncoding[256] = {
NULL
};
char *fofiType1ExpertEncoding[256] = {
const char *fofiType1ExpertEncoding[256] = {
NULL,
NULL,
NULL,
......@@ -541,7 +541,7 @@ char *fofiType1ExpertEncoding[256] = {
// Type 1C font data
//------------------------------------------------------------------------
char *fofiType1CStdStrings[391] = {
const char *fofiType1CStdStrings[391] = {
".notdef",
"space",
"exclam",
......
......@@ -19,14 +19,14 @@
// Type 1 and 1C font data
//------------------------------------------------------------------------
extern char *fofiType1StandardEncoding[256];
extern char *fofiType1ExpertEncoding[256];
extern const char *fofiType1StandardEncoding[256];
extern const char *fofiType1ExpertEncoding[256];
//------------------------------------------------------------------------
// Type 1C font data
//------------------------------------------------------------------------
extern char *fofiType1CStdStrings[391];
extern const char *fofiType1CStdStrings[391];
extern Gushort fofiType1CISOAdobeCharset[229];
extern Gushort fofiType1CExpertCharset[166];
extern Gushort fofiType1CExpertSubsetCharset[87];
......
......@@ -164,7 +164,7 @@ static int cmpTrueTypeTableTag(const void *p1, const void *p2) {
//------------------------------------------------------------------------
struct T42Table {
char *tag; // 4-byte tag
const char *tag; // 4-byte tag
GBool required; // required by the TrueType spec?
};
......@@ -194,7 +194,7 @@ static T42Table t42Tables[nT42Tables] = {
// Glyph names in some arbitrary standard order that Apple uses for
// their TrueType fonts.
static char *macGlyphNames[258] = {
static const char *macGlyphNames[258] = {
".notdef", "null", "CR", "space",
"exclam", "quotedbl", "numbersign", "dollar",
"percent", "ampersand", "quotesingle", "parenleft",
......@@ -530,7 +530,7 @@ void FoFiTrueType::convertToType42(char *psName, char **encoding,
(*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
}
void FoFiTrueType::convertToType1(char *psName, char **newEncoding,
void FoFiTrueType::convertToType1(char *psName, const char **newEncoding,
GBool ascii, FoFiOutputFunc outputFunc,
void *outputStream) {
FoFiType1C *ff;
......@@ -1424,7 +1424,7 @@ void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc,
void FoFiTrueType::cvtEncoding(char **encoding,
FoFiOutputFunc outputFunc,
void *outputStream) {
char *name;
const char *name;
GooString *buf;
int i;
......@@ -2085,7 +2085,7 @@ void FoFiTrueType::readPostTable() {
}
}
int FoFiTrueType::seekTable(char *tag) {
int FoFiTrueType::seekTable(const char *tag) {
Guint tagI;
int i;
......
......@@ -114,7 +114,7 @@ public:
// otherwise it will be left as binary data. If <psName> is
// non-NULL, it will be used as the PostScript font name. (Only
// useful for OpenType CFF fonts.)
void convertToType1(char *psName, char **newEncoding, GBool ascii,
void convertToType1(char *psName, const char **newEncoding, GBool ascii,
FoFiOutputFunc outputFunc, void *outputStream);
// Convert to a Type 2 CIDFont, suitable for embedding in a
......@@ -176,7 +176,7 @@ private:
Guint computeTableChecksum(Guchar *data, int length);
void parse();
void readPostTable();
int seekTable(char *tag);
int seekTable(const char *tag);
Guint charToTag(const char *tagName);
Guint doMapToVertGID(Guint orgGID);
Guint scanLookupList(Guint listIndex, Guint orgGID);
......
......@@ -90,7 +90,7 @@ char **FoFiType1::getEncoding() {
return encoding;
}
void FoFiType1::writeEncoded(char **newEncoding,
void FoFiType1::writeEncoded(const char **newEncoding,
FoFiOutputFunc outputFunc, void *outputStream) {
char buf[512];
char *line, *line2, *p;
......@@ -213,7 +213,7 @@ void FoFiType1::parse() {
// get encoding
} else if (!encoding &&
!strncmp(line, "/Encoding StandardEncoding def", 30)) {
encoding = fofiType1StandardEncoding;
encoding = (char **)fofiType1StandardEncoding;
} else if (!encoding &&
!strncmp(line, "/Encoding 256 array", 19)) {
encoding = (char **)gmallocn(256, sizeof(char *));
......
......@@ -39,7 +39,7 @@ public:
char **getEncoding();
// Write a version of the Type 1 font file with a new encoding.
void writeEncoded(char **newEncoding,
void writeEncoded(const char **newEncoding,
FoFiOutputFunc outputFunc, void *outputStream);
private:
......
......@@ -144,7 +144,7 @@ Gushort *FoFiType1C::getCIDToGIDMap(int *nCIDs) {
return map;
}
void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii,
void FoFiType1C::convertToType1(char *psName, const char **newEncoding, GBool ascii,
FoFiOutputFunc outputFunc,
void *outputStream) {
int psNameLen;
......@@ -153,7 +153,7 @@ void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii,
Type1CIndexVal val;
GooString *buf;
char buf2[256];
char **enc;
const char **enc;
GBool ok;
int i;
......@@ -265,7 +265,7 @@ void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii,
(*outputFunc)(outputStream, "256 array\n", 10);
(*outputFunc)(outputStream,
"0 1 255 {1 index exch /.notdef put} for\n", 40);
enc = newEncoding ? newEncoding : encoding;
enc = newEncoding ? newEncoding : (const char **)encoding;
for (i = 0; i < 256; ++i) {
if (enc[i]) {
buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]);
......@@ -1083,7 +1083,7 @@ void FoFiType1C::convertToType0(char *psName,
gfree(cidMap);
}
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
int offset, int nBytes,
Type1CIndex *subrIdx,
Type1CPrivateDict *pDict) {
......@@ -1809,7 +1809,7 @@ void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) {
charBuf->append((char *)buf, n);
}
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, char *s) {
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) {
Guchar *p;
Guchar x;
......@@ -2278,10 +2278,10 @@ void FoFiType1C::buildEncoding() {
int pos, c, sid, nLeft, nSups, i, j;
if (topDict.encodingOffset == 0) {
encoding = fofiType1StandardEncoding;
encoding = (char **)fofiType1StandardEncoding;
} else if (topDict.encodingOffset == 1) {
encoding = fofiType1ExpertEncoding;
encoding = (char **)fofiType1ExpertEncoding;
} else {
encoding = (char **)gmallocn(256, sizeof(char *));
......
......@@ -171,7 +171,7 @@ public:
// font. If <ascii> is true the eexec section will be hex-encoded,
// otherwise it will be left as binary data. If <psName> is non-NULL,
// it will be used as the PostScript font name.
void convertToType1(char *psName, char **newEncoding, GBool ascii,
void convertToType1(char *psName, const char **newEncoding, GBool ascii,
FoFiOutputFunc outputFunc, void *outputStream);
// Convert to a Type 0 CIDFont, suitable for embedding in a
......@@ -189,7 +189,7 @@ public:
private:
FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
int offset, int nBytes,
Type1CIndex *subrIdx,
Type1CPrivateDict *pDict);
......@@ -199,7 +199,7 @@ private:
void cvtGlyphWidth(GBool useOp, GooString *charBuf,
Type1CPrivateDict *pDict);
void cvtNum(double x, GBool isFP, GooString *charBuf);
void eexecWrite(Type1CEexecBuf *eb, char *s);
void eexecWrite(Type1CEexecBuf *eb, const char *s);
void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n);
GBool parse();
void readTopDict();
......
......@@ -145,7 +145,7 @@ int GooHash::lookupInt(GooString *key) {
return p->val.i;
}
void *GooHash::lookup(char *key) {
void *GooHash::lookup(const char *key) {
GooHashBucket *p;
int h;
......@@ -155,7 +155,7 @@ void *GooHash::lookup(char *key) {
return p->val.p;
}
int GooHash::lookupInt(char *key) {
int GooHash::lookupInt(const char *key) {
GooHashBucket *p;
int h;
......@@ -211,7 +211,7 @@ int GooHash::removeInt(GooString *key) {
return val;
}
void *GooHash::remove(char *key) {
void *GooHash::remove(const char *key) {
GooHashBucket *p;
GooHashBucket **q;
void *val;
......@@ -234,7 +234,7 @@ void *GooHash::remove(char *key) {
return val;
}
int GooHash::removeInt(char *key) {
int GooHash::removeInt(const char *key) {
GooHashBucket *p;
GooHashBucket **q;
int val;
......@@ -344,7 +344,7 @@ GooHashBucket *GooHash::find(GooString *key, int *h) {
return NULL;
}
GooHashBucket *GooHash::find(char *key, int *h) {
GooHashBucket *GooHash::find(const char *key, int *h) {
GooHashBucket *p;
*h = hash(key);
......@@ -357,7 +357,7 @@ GooHashBucket *GooHash::find(char *key, int *h) {
}
int GooHash::hash(GooString *key) {
char *p;
const char *p;
unsigned int h;
int i;
......@@ -368,8 +368,8 @@ int GooHash::hash(GooString *key) {
return (int)(h % size);
}
int GooHash::hash(char *key) {
char *p;
int GooHash::hash(const char *key) {
const char *p;
unsigned int h;
h = 0;
......
......@@ -32,12 +32,12 @@ public:
void replace(GooString *key, int val);
void *lookup(GooString *key);
int lookupInt(GooString *key);
void *lookup(char *key);
int lookupInt(char *key);
void *lookup(const char *key);
int lookupInt(const char *key);
void *remove(GooString *key);
int removeInt(GooString *key);
void *remove(char *key);
int removeInt(char *key);
void *remove(const char *key);
int removeInt(const char *key);
int getLength() { return len; }
void startIter(GooHashIter **iter);
GBool getNext(GooHashIter **iter, GooString **key, void **val);
......@@ -48,9 +48,9 @@ private:
void expand();
GooHashBucket *find(GooString *key, int *h);
GooHashBucket *find(char *key, int *h);
GooHashBucket *find(const char *key, int *h);
int hash(GooString *key);
int hash(char *key);
int hash(const char *key);
GBool deleteKeys; // set if key strings should be deleted
int size; // number of buckets
......
......@@ -81,7 +81,7 @@ enum GooStringFormatType {
fmtSpace
};
static char *formatStrings[] = {
static const char *formatStrings[] = {
"d", "x", "o", "b", "ud", "ux", "uo", "ub",
"ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb",
"f", "gs", "g",
......@@ -211,13 +211,13 @@ GooString::GooString(GooString *str1, GooString *str2) {
GooString *GooString::fromInt(int x) {
char buf[24]; // enough space for 64-bit ints plus a little extra
char *p;
const char *p;
int len;
formatInt(x, buf, sizeof(buf), gFalse, 0, 10, &p, &len);
return new GooString(p, len);
}
GooString *GooString::format(char *fmt, ...) {
GooString *GooString::format(const char *fmt, ...) {
va_list argList;
GooString *s;
......@@ -228,7 +228,7 @@ GooString *GooString::format(char *fmt, ...) {
return s;
}
GooString *GooString::formatv(char *fmt, va_list argList) {
GooString *GooString::formatv(const char *fmt, va_list argList) {
GooString *s;
s = new GooString();
......@@ -263,7 +263,7 @@ GooString *GooString::append(const char *str, int lengthA) {
return this;
}
GooString *GooString::appendf(char *fmt, ...) {
GooString *GooString::appendf(const char *fmt, ...) {
va_list argList;
va_start(argList, fmt);
......@@ -272,7 +272,7 @@ GooString *GooString::appendf(char *fmt, ...) {
return this;
}
GooString *GooString::appendfv(char *fmt, va_list argList) {
GooString *GooString::appendfv(const char *fmt, va_list argList) {
GooStringFormatArg *args;
int argsLen, argsSize;
GooStringFormatArg arg;
......@@ -281,7 +281,7 @@ GooString *GooString::appendfv(char *fmt, va_list argList) {
GooStringFormatType ft;
char buf[65];
int len, i;
char *p0, *p1, *str;
const char *p0, *p1, *str;
argsLen = 0;
argsSize = 8;
......@@ -519,7 +519,7 @@ GooString *GooString::appendfv(char *fmt, va_list argList) {
void GooString::formatInt(long x, char *buf, int bufSize,
GBool zeroFill, int width, int base,
char **p, int *len) {
const char **p, int *len) {
static char vals[17] = "0123456789abcdef";
GBool neg;
int start, i, j;
......@@ -551,7 +551,7 @@ void GooString::formatInt(long x, char *buf, int bufSize,
void GooString::formatUInt(Gulong x, char *buf, int bufSize,
GBool zeroFill, int width, int base,
char **p, int *len) {
const char **p, int *len) {
static char vals[17] = "0123456789abcdef";
int i, j;
......@@ -574,7 +574,7 @@ void GooString::formatUInt(Gulong x, char *buf, int bufSize,
}
void GooString::formatDouble(double x, char *buf, int bufSize, int prec,
GBool trim, char **p, int *len) {
GBool trim, const char **p, int *len) {
GBool neg, started;
double x2;
int d, i, j;
......@@ -613,7 +613,7 @@ void GooString::formatDouble(double x, char *buf, int bufSize, int prec,
}
void GooString::formatDoubleSmallAware(double x, char *buf, int bufSize, int prec,
GBool trim, char **p, int *len)
GBool trim, const char **p, int *len)
{
double absX = fabs(x);
if (absX >= 0.1) {
......
......@@ -88,8 +88,8 @@ public:
// t -- GooString *
// w -- blank space; arg determines width
// To get literal curly braces, use {{ or }}.
static GooString *format(char *fmt, ...);
static GooString *formatv(char *fmt, va_list argList);
static GooString *format(const char *fmt, ...);
static GooString *formatv(const char *fmt, va_list argList);
// Destructor.
~GooString();
......@@ -115,8 +115,8 @@ public:
GooString *append(const char *str, int lengthA=CALC_STRING_LEN);
// Append a formatted string.
GooString *appendf(char *fmt, ...);
GooString *appendfv(char *fmt, va_list argList);
GooString *appendf(const char *fmt, ...);
GooString *appendfv(const char *fmt, va_list argList);
// Insert a character or string.
GooString *insert(int i, char c);
......@@ -166,14 +166,14 @@ private:
void resize(int newLength);
static void formatInt(long x, char *buf, int bufSize,
GBool zeroFill, int width, int base,
char **p, int *len);
const char **p, int *len);
static void formatUInt(Gulong x, char *buf, int bufSize,
GBool zeroFill, int width, int base,
char **p, int *len);
const char **p, int *len);
static void formatDouble(double x, char *buf, int bufSize, int prec,
GBool trim, char **p, int *len);
GBool trim, const char **p, int *len);
static void formatDoubleSmallAware(double x, char *buf, int bufSize, int prec,
GBool trim, char **p, int *len);
GBool trim, const char **p, int *len);
};
#endif
......@@ -123,7 +123,7 @@ GooString *getCurrentDir() {
return new GooString();
}
GooString *appendToPath(GooString *path, char *fileName) {
GooString *appendToPath(GooString *path, const char *fileName) {
#if defined(VMS)
//---------- VMS ----------
//~ this should handle everything necessary for file
......@@ -458,7 +458,7 @@ time_t getModTime(char *fileName) {
#endif
}
GBool openTempFile(GooString **name, FILE **f, char *mode) {
GBool openTempFile(GooString **name, FILE **f, const char *mode) {
#if defined(_WIN32)
//---------- Win32 ----------
char *tempDir;
......
......@@ -79,7 +79,7 @@ extern GooString *getCurrentDir();
// Append a file name to a path string. <path> may be an empty
// string, denoting the current directory). Returns <path>.
extern GooString *appendToPath(GooString *path, char *fileName);
extern GooString *appendToPath(GooString *path, const char *fileName);
// Grab the path from the front of the file name. If there is no
// directory component in <fileName>, returns an empty string.
......@@ -102,7 +102,7 @@ extern time_t getModTime(char *fileName);
// should be done to the returned file pointer; the file may be
// reopened later for reading, but not for writing. The <mode> string
// should be "w" or "wb". Returns true on success.
extern GBool openTempFile(GooString **name, FILE **f, char *mode);
extern GBool openTempFile(GooString **name, FILE **f, const char *mode);
// Execute <command>. Returns true on success.
extern GBool executeCommand(char *cmd);
......
......@@ -310,7 +310,7 @@ void gMemReport(FILE *f) {
}
#endif
char *copyString(char *s) {
char *copyString(const char *s) {
char *s1;
s1 = (char *)gmalloc(strlen(s) + 1);
......
......@@ -78,7 +78,7 @@ extern void gMemReport(FILE *f);
/*
* Allocate memory and copy a string into it.
*/
extern char *copyString(char *s);
extern char *copyString(const char *s);
/*
* Allocate memory and copy a limited-length string to it.
......
......@@ -1079,7 +1079,7 @@ void Annot::setPage(Ref *pageRef, int pageIndex)
page = pageIndex;
}
void Annot::setAppearanceState(char *state) {
void Annot::setAppearanceState(const char *state) {
if (!state)
return;
......@@ -1298,9 +1298,9 @@ void Annot::createForm(double *bbox, GBool transparencyGroup, Object *resDict, O
aStream->initStream(mStream);
}
void Annot::createResourcesDict(char *formName, Object *formStream,
char *stateName,
double opacity, char *blendMode,
void Annot::createResourcesDict(const char *formName, Object *formStream,
const char *stateName,
double opacity, const char *blendMode,
Object *resDict) {
Object gsDict, stateDict, formDict, obj1;
......
......@@ -485,7 +485,7 @@ public:
void setPage(Ref *pageRef, int pageIndex);
void setAppearanceState(char *state);
void setAppearanceState(const char *state);
// getters
XRef *getXRef() const { return xref; }
......@@ -524,8 +524,8 @@ protected:
void drawCircleTopLeft(double cx, double cy, double r);
void drawCircleBottomRight(double cx, double cy, double r);
void createForm(double *bbox, GBool transparencyGroup, Object *resDict, Object *aStream);
void createResourcesDict(char *formName, Object *formStream, char *stateName,
double opacity, char *blendMode, Object *resDict);
void createResourcesDict(const char *formName, Object *formStream, const char *stateName,
double opacity, const char *blendMode, Object *resDict);
GBool isVisible(GBool printing);
// Updates the field key of the annotation dictionary
......
......@@ -352,7 +352,7 @@ void ArthurOutputDev::updateFont(GfxState *state)
if (!(fontFile = m_fontEngine->loadType1Font(
id,
fontsrc,
((Gfx8BitFont *)gfxFont)->getEncoding()))) {
(const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
error(-1, "Couldn't create a font for '%s'",
gfxFont->getName() ? gfxFont->getName()->getCString()
: "(unnamed)");
......@@ -363,7 +363,7 @@ void ArthurOutputDev::updateFont(GfxState *state)
if (!(fontFile = m_fontEngine->loadType1CFont(
id,
fontsrc,
((Gfx8BitFont *)gfxFont)->getEncoding()))) {
(const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
error(-1, "Couldn't create a font for '%s'",
gfxFont->getName() ? gfxFont->getName()->getCString()
: "(unnamed)");
......@@ -374,7 +374,7 @@ void ArthurOutputDev::updateFont(GfxState *state)
if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(
id,
fontsrc,
((Gfx8BitFont *)gfxFont)->getEncoding()))) {
(const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
error(-1, "Couldn't create a font for '%s'",
gfxFont->getName() ? gfxFont->getName()->getCString()
: "(unnamed)");
......
......@@ -39,7 +39,7 @@ BuiltinFontWidths::~BuiltinFontWidths() {
gfree(tab);
}
GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) {
int h;
BuiltinFontWidth *p;
......@@ -53,8 +53,8 @@ GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
return gFalse;
}
int BuiltinFontWidths::hash(char *name) {
char *p;
int BuiltinFontWidths::hash(const char *name) {
const char *p;
unsigned int h;
h = 0;
......
......@@ -21,8 +21,8 @@ class BuiltinFontWidths;
//------------------------------------------------------------------------
struct BuiltinFont {
char *name;
char **defaultBaseEnc;
const char *name;
const char **defaultBaseEnc;
short ascent;
short descent;
short bbox[4];
......@@ -32,7 +32,7 @@ struct BuiltinFont {
//------------------------------------------------------------------------
struct BuiltinFontWidth {
char *name;
const char *name;
Gushort width;
BuiltinFontWidth *next;
};
......@@ -42,11 +42,11 @@ 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;
int size;
......
......@@ -225,7 +225,7 @@ int DCTStream::lookChar() {
return *current;
}
GooString *DCTStream::getPSFilter(int psLevel, char *indent) {
GooString *DCTStream::getPSFilter(int psLevel, const char *indent) {
GooString *s;
if (psLevel < 2) {
......
......@@ -66,7 +66,7 @@ public:
virtual void reset();
virtual int getChar();
virtual int lookChar();
virtual GooString *getPSFilter(int psLevel, char *indent);
virtual GooString *getPSFilter(int psLevel, const char *indent);
virtual GBool isBinary(GBool last = gTrue);
Stream *getRawStream() { return str; }
......
......@@ -118,7 +118,7 @@ void Dict::add(char *key, Object *val) {
++length;
}
inline DictEntry *Dict::find(char *key) {
inline DictEntry *Dict::find(const char *key) {
if (!sorted && length >= SORT_LENGTH_LOWER_LIMIT)
{