View | Details | Raw Unified
Collapse All | Expand All

(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.cc (-2 / +2 lines)
 Lines 20-26    Link Here 
// FoFiBase
// FoFiBase
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FoFiBase::FoFiBase(char *fileA, int lenA, GBool freeFileDataA) {
FoFiBase::FoFiBase(const char *fileA, int lenA, GBool freeFileDataA) {
  fileData = file = (Guchar *)fileA;
  fileData = file = (Guchar *)fileA;
  len = lenA;
  len = lenA;
  freeFileData = freeFileDataA;
  freeFileData = freeFileDataA;
 Lines 32-38    Link Here 
  }
  }
}
}
char *FoFiBase::readFile(char *fileName, int *fileLen) {
const char *FoFiBase::readFile(const char *fileName, int *fileLen) {
  FILE *f;
  FILE *f;
  char *buf;
  char *buf;
  int n;
  int n;
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.h (-3 / +3 lines)
 Lines 19-25    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len);
//------------------------------------------------------------------------
//------------------------------------------------------------------------
// FoFiBase
// FoFiBase
 Lines 32-39    Link Here 
protected:
protected:
  FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
  FoFiBase(const char *fileA, int lenA, GBool freeFileDataA);
  static char *readFile(char *fileName, int *fileLen);
  static const char *readFile(const char *fileName, int *fileLen);
  // S = signed / U = unsigned
  // S = signed / U = unsigned
  // 8/16/32/Var = word length, in bytes
  // 8/16/32/Var = word length, in bytes
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.cc (-3 / +3 lines)
 Lines 19-25    Link Here 
// Type 1 and 1C font data
// Type 1 and 1C font data
//------------------------------------------------------------------------
//------------------------------------------------------------------------
char *fofiType1StandardEncoding[256] = {
const char *fofiType1StandardEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 278-284    Link Here 
  NULL
  NULL
};
};
char *fofiType1ExpertEncoding[256] = {
const char *fofiType1ExpertEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 541-547    Link Here 
// Type 1C font data
// Type 1C font data
//------------------------------------------------------------------------
//------------------------------------------------------------------------
char *fofiType1CStdStrings[391] = {
const char *fofiType1CStdStrings[391] = {
  ".notdef",
  ".notdef",
  "space",
  "space",
  "exclam",
  "exclam",
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.h (-3 / +3 lines)
 Lines 21-34    Link Here 
// Type 1 and 1C font data
// Type 1 and 1C font data
//------------------------------------------------------------------------
//------------------------------------------------------------------------
extern char *fofiType1StandardEncoding[256];
extern const char *fofiType1StandardEncoding[256];
extern char *fofiType1ExpertEncoding[256];
extern const char *fofiType1ExpertEncoding[256];
//------------------------------------------------------------------------
//------------------------------------------------------------------------
// Type 1C font data
// Type 1C font data
//------------------------------------------------------------------------
//------------------------------------------------------------------------
extern char *fofiType1CStdStrings[391];
extern const char *fofiType1CStdStrings[391];
extern Gushort fofiType1CISOAdobeCharset[229];
extern Gushort fofiType1CISOAdobeCharset[229];
extern Gushort fofiType1CExpertCharset[166];
extern Gushort fofiType1CExpertCharset[166];
extern Gushort fofiType1CExpertSubsetCharset[87];
extern Gushort fofiType1CExpertSubsetCharset[87];
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.cc (-29 / +29 lines)
 Lines 143-149    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct T42Table {
struct T42Table {
  char *tag;			// 4-byte tag
  const char *tag;		// 4-byte tag
  GBool required;		// required by the TrueType spec?
  GBool required;		// required by the TrueType spec?
};
};
 Lines 173-179    Link Here 
// Glyph names in some arbitrary standard order that Apple uses for
// Glyph names in some arbitrary standard order that Apple uses for
// their TrueType fonts.
// their TrueType fonts.
static char *macGlyphNames[258] = {
static const char *macGlyphNames[258] = {
  ".notdef",        "null",           "CR",             "space",
  ".notdef",        "null",           "CR",             "space",
  "exclam",         "quotedbl",       "numbersign",     "dollar",
  "exclam",         "quotedbl",       "numbersign",     "dollar",
  "percent",        "ampersand",      "quotesingle",    "parenleft",
  "percent",        "ampersand",      "quotesingle",    "parenleft",
 Lines 245-251    Link Here 
// FoFiTrueType
// FoFiTrueType
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA) {
FoFiTrueType *FoFiTrueType::make(const char *fileA, int lenA) {
  FoFiTrueType *ff;
  FoFiTrueType *ff;
  ff = new FoFiTrueType(fileA, lenA, gFalse);
  ff = new FoFiTrueType(fileA, lenA, gFalse);
 Lines 256-264    Link Here 
  return ff;
  return ff;
}
}
FoFiTrueType *FoFiTrueType::load(char *fileName) {
FoFiTrueType *FoFiTrueType::load(const char *fileName) {
  FoFiTrueType *ff;
  FoFiTrueType *ff;
  char *fileA;
  const char *fileA;
  int lenA;
  int lenA;
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
 Lines 272-278    Link Here 
  return ff;
  return ff;
}
}
FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA):
FoFiTrueType::FoFiTrueType(const char *fileA, int lenA, GBool freeFileDataA):
  FoFiBase(fileA, lenA, freeFileDataA)
  FoFiBase(fileA, lenA, freeFileDataA)
{
{
  tables = NULL;
  tables = NULL;
 Lines 388-394    Link Here 
  return gid;
  return gid;
}
}
int FoFiTrueType::mapNameToGID(char *name) {
int FoFiTrueType::mapNameToGID(const char *name) {
  if (!nameToGID) {
  if (!nameToGID) {
    return 0;
    return 0;
  }
  }
 Lines 408-414    Link Here 
  if (!checkRegion(tables[i].offset, tables[i].len)) {
  if (!checkRegion(tables[i].offset, tables[i].len)) {
    return NULL;
    return NULL;
  }
  }
  if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
  if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset,
			      tables[i].len))) {
			      tables[i].len))) {
    return NULL;
    return NULL;
  }
  }
 Lines 441-447    Link Here 
  return 3;
  return 3;
}
}
void FoFiTrueType::convertToType42(char *psName, char **encoding,
void FoFiTrueType::convertToType42(const char *psName, const char **encoding,
				   Gushort *codeToGID,
				   Gushort *codeToGID,
				   FoFiOutputFunc outputFunc,
				   FoFiOutputFunc outputFunc,
				   void *outputStream) {
				   void *outputStream) {
 Lines 481-487    Link Here 
  (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
  (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
}
}
void FoFiTrueType::convertToType1(char *psName, char **newEncoding,
void FoFiTrueType::convertToType1(const char *psName, const char **newEncoding,
				  GBool ascii, FoFiOutputFunc outputFunc,
				  GBool ascii, FoFiOutputFunc outputFunc,
				  void *outputStream) {
				  void *outputStream) {
  FoFiType1C *ff;
  FoFiType1C *ff;
 Lines 494-500    Link Here 
  if (!checkRegion(tables[i].offset, tables[i].len)) {
  if (!checkRegion(tables[i].offset, tables[i].len)) {
    return;
    return;
  }
  }
  if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
  if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset,
			      tables[i].len))) {
			      tables[i].len))) {
    return;
    return;
  }
  }
 Lines 502-508    Link Here 
  delete ff;
  delete ff;
}
}
void FoFiTrueType::convertToCIDType2(char *psName,
void FoFiTrueType::convertToCIDType2(const char *psName,
				     Gushort *cidMap, int nCIDs,
				     Gushort *cidMap, int nCIDs,
				     GBool needVerticalMetrics,
				     GBool needVerticalMetrics,
				     FoFiOutputFunc outputFunc,
				     FoFiOutputFunc outputFunc,
 Lines 632-638    Link Here 
		56);
		56);
}
}
void FoFiTrueType::convertToCIDType0(char *psName,
void FoFiTrueType::convertToCIDType0(const char *psName,
				     FoFiOutputFunc outputFunc,
				     FoFiOutputFunc outputFunc,
				     void *outputStream) {
				     void *outputStream) {
  FoFiType1C *ff;
  FoFiType1C *ff;
 Lines 645-651    Link Here 
  if (!checkRegion(tables[i].offset, tables[i].len)) {
  if (!checkRegion(tables[i].offset, tables[i].len)) {
    return;
    return;
  }
  }
  if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
  if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset,
			      tables[i].len))) {
			      tables[i].len))) {
    return;
    return;
  }
  }
 Lines 653-659    Link Here 
  delete ff;
  delete ff;
}
}
void FoFiTrueType::convertToType0(char *psName, Gushort *cidMap, int nCIDs,
void FoFiTrueType::convertToType0(const char *psName, Gushort *cidMap, int nCIDs,
				  GBool needVerticalMetrics,
				  GBool needVerticalMetrics,
				  FoFiOutputFunc outputFunc,
				  FoFiOutputFunc outputFunc,
				  void *outputStream) {
				  void *outputStream) {
 Lines 736-742    Link Here 
  (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
  (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
}
}
void FoFiTrueType::convertToType0(char *psName,
void FoFiTrueType::convertToType0(const char *psName,
				  FoFiOutputFunc outputFunc,
				  FoFiOutputFunc outputFunc,
				  void *outputStream) {
				  void *outputStream) {
  FoFiType1C *ff;
  FoFiType1C *ff;
 Lines 749-755    Link Here 
  if (!checkRegion(tables[i].offset, tables[i].len)) {
  if (!checkRegion(tables[i].offset, tables[i].len)) {
    return;
    return;
  }
  }
  if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
  if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset,
			      tables[i].len))) {
			      tables[i].len))) {
    return;
    return;
  }
  }
 Lines 758-764    Link Here 
}
}
void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc,
void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc,
			    void *outputStream, char *name,
			    void *outputStream, const char *name,
			    Gushort *codeToGID) {
			    Gushort *codeToGID) {
  // this substitute cmap table maps char codes 0000-ffff directly to
  // this substitute cmap table maps char codes 0000-ffff directly to
  // glyphs 0000-ffff
  // glyphs 0000-ffff
 Lines 930-936    Link Here 
  if (!missingCmap && !missingName && !missingPost && !missingOS2 &&
  if (!missingCmap && !missingName && !missingPost && !missingOS2 &&
      !unsortedLoca && !badCmapLen && !abbrevHMTX && nZeroLengthTables == 0 &&
      !unsortedLoca && !badCmapLen && !abbrevHMTX && nZeroLengthTables == 0 &&
      !name && !codeToGID) {
      !name && !codeToGID) {
    (*outputFunc)(outputStream, (char *)file, len);
    (*outputFunc)(outputStream, (const char *)file, len);
    goto done1;
    goto done1;
  }
  }
 Lines 1279-1292    Link Here 
  for (i = 0; i < nNewTables; ++i) {
  for (i = 0; i < nNewTables; ++i) {
    if (newTables[i].tag == headTag) {
    if (newTables[i].tag == headTag) {
      if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
      if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
	(*outputFunc)(outputStream, (char *)file + newTables[i].origOffset, 8);
	(*outputFunc)(outputStream, (const char *)file + newTables[i].origOffset, 8);
	checksumBuf[0] = fileChecksum >> 24;
	checksumBuf[0] = fileChecksum >> 24;
	checksumBuf[1] = fileChecksum >> 16;
	checksumBuf[1] = fileChecksum >> 16;
	checksumBuf[2] = fileChecksum >> 8;
	checksumBuf[2] = fileChecksum >> 8;
	checksumBuf[3] = fileChecksum;
	checksumBuf[3] = fileChecksum;
	(*outputFunc)(outputStream, checksumBuf, 4);
	(*outputFunc)(outputStream, checksumBuf, 4);
	(*outputFunc)(outputStream,
	(*outputFunc)(outputStream,
		      (char *)file + newTables[i].origOffset + 12,
		      (const char *)file + newTables[i].origOffset + 12,
		      newTables[i].len - 12);
		      newTables[i].len - 12);
      } else {
      } else {
	for (j = 0; j < newTables[i].len; ++j) {
	for (j = 0; j < newTables[i].len; ++j) {
 Lines 1330-1336    Link Here 
	if (n > 0) {
	if (n > 0) {
	  k = locaTable[j].origOffset;
	  k = locaTable[j].origOffset;
	  if (checkRegion(pos + k, n)) {
	  if (checkRegion(pos + k, n)) {
	    (*outputFunc)(outputStream, (char *)file + pos + k, n);
	    (*outputFunc)(outputStream, (const char *)file + pos + k, n);
	  } else {
	  } else {
	    for (k = 0; k < n; ++k) {
	    for (k = 0; k < n; ++k) {
	      (*outputFunc)(outputStream, "\0", 1);
	      (*outputFunc)(outputStream, "\0", 1);
 Lines 1343-1349    Link Here 
      }
      }
    } else {
    } else {
      if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
      if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
	(*outputFunc)(outputStream, (char *)file + newTables[i].origOffset,
	(*outputFunc)(outputStream, (const char *)file + newTables[i].origOffset,
		      newTables[i].len);
		      newTables[i].len);
      } else {
      } else {
	for (j = 0; j < newTables[i].len; ++j) {
	for (j = 0; j < newTables[i].len; ++j) {
 Lines 1366-1375    Link Here 
  gfree(locaTable);
  gfree(locaTable);
}
}
void FoFiTrueType::cvtEncoding(char **encoding,
void FoFiTrueType::cvtEncoding(const char **encoding,
			       FoFiOutputFunc outputFunc,
			       FoFiOutputFunc outputFunc,
			       void *outputStream) {
			       void *outputStream) {
  char *name;
  const char *name;
  GString *buf;
  GString *buf;
  int i;
  int i;
 Lines 1395-1405    Link Here 
  (*outputFunc)(outputStream, "readonly def\n", 13);
  (*outputFunc)(outputStream, "readonly def\n", 13);
}
}
void FoFiTrueType::cvtCharStrings(char **encoding,
void FoFiTrueType::cvtCharStrings(const char **encoding,
				  Gushort *codeToGID,
				  Gushort *codeToGID,
				  FoFiOutputFunc outputFunc,
				  FoFiOutputFunc outputFunc,
				  void *outputStream) {
				  void *outputStream) {
  char *name;
  const char *name;
  GString *buf;
  GString *buf;
  char buf2[16];
  char buf2[16];
  int i, k;
  int i, k;
 Lines 1980-1986    Link Here 
	if (!ok || !checkRegion(stringPos + 1, m)) {
	if (!ok || !checkRegion(stringPos + 1, m)) {
	  goto err;
	  goto err;
	}
	}
	name = new GString((char *)&file[stringPos + 1], m);
	name = new GString((const char *)&file[stringPos + 1], m);
	nameToGID->removeInt(name);
	nameToGID->removeInt(name);
	nameToGID->add(name, i);
	nameToGID->add(name, i);
	++stringIdx;
	++stringIdx;
 Lines 2010-2016    Link Here 
  }
  }
}
}
int FoFiTrueType::seekTable(char *tag) {
int FoFiTrueType::seekTable(const char *tag) {
  Guint tagI;
  Guint tagI;
  int i;
  int i;
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.h (-14 / +14 lines)
 Lines 31-40    Link Here 
public:
public:
  // Create a FoFiTrueType object from a memory buffer.
  // Create a FoFiTrueType object from a memory buffer.
  static FoFiTrueType *make(char *fileA, int lenA);
  static FoFiTrueType *make(const char *fileA, int lenA);
  // Create a FoFiTrueType object from a file on disk.
  // Create a FoFiTrueType object from a file on disk.
  static FoFiTrueType *load(char *fileName);
  static FoFiTrueType *load(const char *fileName);
  virtual ~FoFiTrueType();
  virtual ~FoFiTrueType();
 Lines 61-67    Link Here 
  // Returns the GID corresponding to <name> according to the post
  // Returns the GID corresponding to <name> according to the post
  // table.  Returns 0 if there is no mapping for <name> or if the
  // table.  Returns 0 if there is no mapping for <name> or if the
  // font does not have a post table.
  // font does not have a post table.
  int mapNameToGID(char *name);
  int mapNameToGID(const char *name);
  // Return the mapping from CIDs to GIDs, and return the number of
  // Return the mapping from CIDs to GIDs, and return the number of
  // CIDs in *<nCIDs>.  This is only useful for CID fonts.  (Only
  // CIDs in *<nCIDs>.  This is only useful for CID fonts.  (Only
 Lines 84-90    Link Here 
  // If <encoding> is NULL, the encoding is unknown or undefined.  The
  // If <encoding> is NULL, the encoding is unknown or undefined.  The
  // <codeToGID> array specifies the mapping from char codes to GIDs.
  // <codeToGID> array specifies the mapping from char codes to GIDs.
  // (Not useful for OpenType CFF fonts.)
  // (Not useful for OpenType CFF fonts.)
  void convertToType42(char *psName, char **encoding,
  void convertToType42(const char *psName, const char **encoding,
		       Gushort *codeToGID,
		       Gushort *codeToGID,
		       FoFiOutputFunc outputFunc, void *outputStream);
		       FoFiOutputFunc outputFunc, void *outputStream);
 Lines 95-101    Link Here 
  // otherwise it will be left as binary data.  If <psName> is
  // otherwise it will be left as binary data.  If <psName> is
  // non-NULL, it will be used as the PostScript font name.  (Only
  // non-NULL, it will be used as the PostScript font name.  (Only
  // useful for OpenType CFF fonts.)
  // useful for OpenType CFF fonts.)
  void convertToType1(char *psName, char **newEncoding, GBool ascii,
  void convertToType1(const char *psName, const char **newEncoding, GBool ascii,
		      FoFiOutputFunc outputFunc, void *outputStream);
		      FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 2 CIDFont, suitable for embedding in a
  // Convert to a Type 2 CIDFont, suitable for embedding in a
 Lines 103-116    Link Here 
  // name (so we don't need to depend on the 'name' table in the
  // name (so we don't need to depend on the 'name' table in the
  // font).  The <cidMap> array maps CIDs to GIDs; it has <nCIDs>
  // font).  The <cidMap> array maps CIDs to GIDs; it has <nCIDs>
  // entries.  (Not useful for OpenType CFF fonts.)
  // entries.  (Not useful for OpenType CFF fonts.)
  void convertToCIDType2(char *psName, Gushort *cidMap, int nCIDs,
  void convertToCIDType2(const char *psName, Gushort *cidMap, int nCIDs,
			 GBool needVerticalMetrics,
			 GBool needVerticalMetrics,
			 FoFiOutputFunc outputFunc, void *outputStream);
			 FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 0 CIDFont, suitable for embedding in a
  // Convert to a Type 0 CIDFont, suitable for embedding in a
  // PostScript file.  <psName> will be used as the PostScript font
  // PostScript file.  <psName> will be used as the PostScript font
  // name.  (Only useful for OpenType CFF fonts.)
  // name.  (Only useful for OpenType CFF fonts.)
  void convertToCIDType0(char *psName,
  void convertToCIDType0(const char *psName,
			 FoFiOutputFunc outputFunc, void *outputStream);
			 FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 0 (but non-CID) composite font, suitable for
  // Convert to a Type 0 (but non-CID) composite font, suitable for
 Lines 118-131    Link Here 
  // PostScript font name (so we don't need to depend on the 'name'
  // PostScript font name (so we don't need to depend on the 'name'
  // table in the font).  The <cidMap> array maps CIDs to GIDs; it has
  // table in the font).  The <cidMap> array maps CIDs to GIDs; it has
  // <nCIDs> entries.  (Not useful for OpenType CFF fonts.)
  // <nCIDs> entries.  (Not useful for OpenType CFF fonts.)
  void convertToType0(char *psName, Gushort *cidMap, int nCIDs,
  void convertToType0(const char *psName, Gushort *cidMap, int nCIDs,
		      GBool needVerticalMetrics,
		      GBool needVerticalMetrics,
		      FoFiOutputFunc outputFunc, void *outputStream);
		      FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 0 (but non-CID) composite font, suitable for
  // Convert to a Type 0 (but non-CID) composite font, suitable for
  // embedding in a PostScript file.  <psName> will be used as the
  // embedding in a PostScript file.  <psName> will be used as the
  // PostScript font name.  (Only useful for OpenType CFF fonts.)
  // PostScript font name.  (Only useful for OpenType CFF fonts.)
  void convertToType0(char *psName,
  void convertToType0(const char *psName,
		      FoFiOutputFunc outputFunc, void *outputStream);
		      FoFiOutputFunc outputFunc, void *outputStream);
  // Write a clean TTF file, filling in missing tables and correcting
  // Write a clean TTF file, filling in missing tables and correcting
 Lines 135-149    Link Here 
  // complete and correct, it will be written unmodified.  (Not useful
  // complete and correct, it will be written unmodified.  (Not useful
  // for OpenType CFF fonts.)
  // for OpenType CFF fonts.)
  void writeTTF(FoFiOutputFunc outputFunc, void *outputStream,
  void writeTTF(FoFiOutputFunc outputFunc, void *outputStream,
		char *name = NULL, Gushort *codeToGID = NULL);
		const char *name = NULL, Gushort *codeToGID = NULL);
private:
private:
  FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA);
  FoFiTrueType(const char *fileA, int lenA, GBool freeFileDataA);
  void cvtEncoding(char **encoding,
  void cvtEncoding(const char **encoding,
		   FoFiOutputFunc outputFunc,
		   FoFiOutputFunc outputFunc,
		   void *outputStream);
		   void *outputStream);
  void cvtCharStrings(char **encoding,
  void cvtCharStrings(const char **encoding,
		      Gushort *codeToGID,
		      Gushort *codeToGID,
		      FoFiOutputFunc outputFunc,
		      FoFiOutputFunc outputFunc,
		      void *outputStream);
		      void *outputStream);
 Lines 156-162    Link Here 
  Guint computeTableChecksum(Guchar *data, int length);
  Guint computeTableChecksum(Guchar *data, int length);
  void parse();
  void parse();
  void readPostTable();
  void readPostTable();
  int seekTable(char *tag);
  int seekTable(const char *tag);
  TrueTypeTable *tables;
  TrueTypeTable *tables;
  int nTables;
  int nTables;
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.cc (-17 / +18 lines)
 Lines 22-33    Link Here 
// FoFiType1
// FoFiType1
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FoFiType1 *FoFiType1::make(char *fileA, int lenA) {
FoFiType1 *FoFiType1::make(const char *fileA, int lenA) {
  return new FoFiType1(fileA, lenA, gFalse);
  return new FoFiType1(fileA, lenA, gFalse);
}
}
FoFiType1 *FoFiType1::load(char *fileName) {
FoFiType1 *FoFiType1::load(const char *fileName) {
  char *fileA;
  const char *fileA;
  int lenA;
  int lenA;
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
 Lines 36-42    Link Here 
  return new FoFiType1(fileA, lenA, gTrue);
  return new FoFiType1(fileA, lenA, gTrue);
}
}
FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA):
FoFiType1::FoFiType1(const char *fileA, int lenA, GBool freeFileDataA):
  FoFiBase(fileA, lenA, freeFileDataA)
  FoFiBase(fileA, lenA, freeFileDataA)
{
{
  name = NULL;
  name = NULL;
 Lines 48-93    Link Here 
  int i;
  int i;
  if (name) {
  if (name) {
    gfree(name);
    gfree(const_cast<char*>(name));
  }
  }
  if (encoding && encoding != fofiType1StandardEncoding) {
  if (encoding && encoding != fofiType1StandardEncoding) {
    for (i = 0; i < 256; ++i) {
    for (i = 0; i < 256; ++i) {
      gfree(encoding[i]);
      gfree(const_cast<char*>(encoding[i]));
    }
    }
    gfree(encoding);
    gfree(encoding);
  }
  }
}
}
char *FoFiType1::getName() {
const char *FoFiType1::getName() {
  if (!parsed) {
  if (!parsed) {
    parse();
    parse();
  }
  }
  return name;
  return name;
}
}
char **FoFiType1::getEncoding() {
const char **FoFiType1::getEncoding() {
  if (!parsed) {
  if (!parsed) {
    parse();
    parse();
  }
  }
  return encoding;
  return encoding;
}
}
void FoFiType1::writeEncoded(char **newEncoding,
void FoFiType1::writeEncoded(const char **newEncoding,
			     FoFiOutputFunc outputFunc, void *outputStream) {
			     FoFiOutputFunc outputFunc, void *outputStream) {
  char buf[512];
  char buf[512];
  char *line, *line2, *p;
  const char *line, *line2, *p;
  int i;
  int i;
  // copy everything up to the encoding
  // copy everything up to the encoding
  for (line = (char *)file;
  for (line = (const char *)file;
       line && strncmp(line, "/Encoding", 9);
       line && strncmp(line, "/Encoding", 9);
       line = getNextLine(line)) ;
       line = getNextLine(line)) ;
  if (!line) {
  if (!line) {
    // no encoding - just copy the whole font file
    // no encoding - just copy the whole font file
    (*outputFunc)(outputStream, (char *)file, len);
    (*outputFunc)(outputStream, (const char *)file, len);
    return;
    return;
  }
  }
  (*outputFunc)(outputStream, (char *)file, line - (char *)file);
  (*outputFunc)(outputStream, (const char *)file, line - (const char *)file);
  // write the new encoding
  // write the new encoding
  (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
  (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
 Lines 150-161    Link Here 
    // copy everything after the encoding
    // copy everything after the encoding
    if (line) {
    if (line) {
      (*outputFunc)(outputStream, line, ((char *)file + len) - line);
      (*outputFunc)(outputStream, line, ((const char *)file + len) - line);
    }
    }
  }
  }
}
}
char *FoFiType1::getNextLine(char *line) {
const char *FoFiType1::getNextLine(const char *line) {
  while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') {
  while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') {
    ++line;
    ++line;
  }
  }
 Lines 172-178    Link Here 
}
}
void FoFiType1::parse() {
void FoFiType1::parse() {
  char *line, *line1, *p, *p2;
  const char *line, *line1;
  char *p, *p2;
  char buf[256];
  char buf[256];
  char c;
  char c;
  int n, code, i, j;
  int n, code, i, j;
 Lines 197-203    Link Here 
      encoding = fofiType1StandardEncoding;
      encoding = fofiType1StandardEncoding;
    } else if (!encoding &&
    } else if (!encoding &&
	       !strncmp(line, "/Encoding 256 array", 19)) {
	       !strncmp(line, "/Encoding 256 array", 19)) {
      encoding = (char **)gmallocn(256, sizeof(char *));
      encoding = (const char **)gmallocn(256, sizeof(char *));
      for (j = 0; j < 256; ++j) {
      for (j = 0; j < 256; ++j) {
	encoding[j] = NULL;
	encoding[j] = NULL;
      }
      }
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.cc (-23 / +23 lines)
 Lines 28-34    Link Here 
// FoFiType1C
// FoFiType1C
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FoFiType1C *FoFiType1C::make(char *fileA, int lenA) {
FoFiType1C *FoFiType1C::make(const char *fileA, int lenA) {
  FoFiType1C *ff;
  FoFiType1C *ff;
  ff = new FoFiType1C(fileA, lenA, gFalse);
  ff = new FoFiType1C(fileA, lenA, gFalse);
 Lines 39-47    Link Here 
  return ff;
  return ff;
}
}
FoFiType1C *FoFiType1C::load(char *fileName) {
FoFiType1C *FoFiType1C::load(const char *fileName) {
  FoFiType1C *ff;
  FoFiType1C *ff;
  char *fileA;
  const char *fileA;
  int lenA;
  int lenA;
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
  if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
 Lines 55-61    Link Here 
  return ff;
  return ff;
}
}
FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA):
FoFiType1C::FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA):
  FoFiBase(fileA, lenA, freeFileDataA)
  FoFiBase(fileA, lenA, freeFileDataA)
{
{
  name = NULL;
  name = NULL;
 Lines 75-81    Link Here 
      encoding != fofiType1StandardEncoding &&
      encoding != fofiType1StandardEncoding &&
      encoding != fofiType1ExpertEncoding) {
      encoding != fofiType1ExpertEncoding) {
    for (i = 0; i < 256; ++i) {
    for (i = 0; i < 256; ++i) {
      gfree(encoding[i]);
      gfree(const_cast<char*>(encoding[i]));
    }
    }
    gfree(encoding);
    gfree(encoding);
  }
  }
 Lines 93-103    Link Here 
  }
  }
}
}
char *FoFiType1C::getName() {
const char *FoFiType1C::getName() {
  return name ? name->getCString() : (char *)NULL;
  return name ? name->getCString() : (const char *)NULL;
}
}
char **FoFiType1C::getEncoding() {
const char **FoFiType1C::getEncoding() {
  return encoding;
  return encoding;
}
}
 Lines 129-135    Link Here 
  return map;
  return map;
}
}
void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii,
void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, GBool ascii,
				FoFiOutputFunc outputFunc,
				FoFiOutputFunc outputFunc,
				void *outputStream) {
				void *outputStream) {
  int psNameLen;
  int psNameLen;
 Lines 138-144    Link Here 
  Type1CIndexVal val;
  Type1CIndexVal val;
  GString *buf;
  GString *buf;
  char buf2[256];
  char buf2[256];
  char **enc;
  const char **enc;
  GBool ok;
  GBool ok;
  int i;
  int i;
 Lines 429-435    Link Here 
  (*outputFunc)(outputStream, "cleartomark\n", 12);
  (*outputFunc)(outputStream, "cleartomark\n", 12);
}
}
void FoFiType1C::convertToCIDType0(char *psName,
void FoFiType1C::convertToCIDType0(const char *psName,
				   FoFiOutputFunc outputFunc,
				   FoFiOutputFunc outputFunc,
				   void *outputStream) {
				   void *outputStream) {
  int *cidMap;
  int *cidMap;
 Lines 755-761    Link Here 
  gfree(cidMap);
  gfree(cidMap);
}
}
void FoFiType1C::convertToType0(char *psName,
void FoFiType1C::convertToType0(const char *psName,
				FoFiOutputFunc outputFunc,
				FoFiOutputFunc outputFunc,
				void *outputStream) {
				void *outputStream) {
  int *cidMap;
  int *cidMap;
 Lines 1066-1072    Link Here 
  gfree(cidMap);
  gfree(cidMap);
}
}
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
			       int offset, int nBytes,
			       int offset, int nBytes,
			       Type1CIndex *subrIdx,
			       Type1CIndex *subrIdx,
			       Type1CPrivateDict *pDict) {
			       Type1CPrivateDict *pDict) {
 Lines 1789-1798    Link Here 
      n = 5;
      n = 5;
    }
    }
  }
  }
  charBuf->append((char *)buf, n);
  charBuf->append((const char *)buf, n);
}
}
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, char *s) {
void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) {
  Guchar *p;
  Guchar *p;
  Guchar x;
  Guchar x;
 Lines 1808-1814    Link Here 
	eb->line = 0;
	eb->line = 0;
      }
      }
    } else {
    } else {
      (*eb->outputFunc)(eb->outputStream, (char *)&x, 1);
      (*eb->outputFunc)(eb->outputStream, (const char *)&x, 1);
    }
    }
  }
  }
}
}
 Lines 1831-1837    Link Here 
	eb->line = 0;
	eb->line = 0;
      }
      }
    } else {
    } else {
      (*eb->outputFunc)(eb->outputStream, (char *)&x, 1);
      (*eb->outputFunc)(eb->outputStream, (const char *)&x, 1);
    }
    }
  }
  }
}
}
 Lines 1866-1872    Link Here 
  if (!parsedOk) {
  if (!parsedOk) {
    return gFalse;
    return gFalse;
  }
  }
  name = new GString((char *)&file[val.pos], val.len);
  name = new GString((const char *)&file[val.pos], val.len);
  // read the top dict for the first font
  // read the top dict for the first font
  readTopDict();
  readTopDict();
 Lines 2267-2273    Link Here 
    encoding = fofiType1ExpertEncoding;
    encoding = fofiType1ExpertEncoding;
  } else {
  } else {
    encoding = (char **)gmallocn(256, sizeof(char *));
    encoding = (const char **)gmallocn(256, sizeof(char *));
    for (i = 0; i < 256; ++i) {
    for (i = 0; i < 256; ++i) {
      encoding[i] = NULL;
      encoding[i] = NULL;
    }
    }
 Lines 2290-2296    Link Here 
	  return;
	  return;
	}
	}
	if (encoding[c]) {
	if (encoding[c]) {
	  gfree(encoding[c]);
	  gfree(const_cast<char*>(encoding[c]));
	}
	}
	encoding[c] = copyString(getString(charset[i], buf, &parsedOk));
	encoding[c] = copyString(getString(charset[i], buf, &parsedOk));
      }
      }
 Lines 2309-2315    Link Here 
	for (j = 0; j <= nLeft && nCodes < nGlyphs; ++j) {
	for (j = 0; j <= nLeft && nCodes < nGlyphs; ++j) {
	  if (c < 256) {
	  if (c < 256) {
	    if (encoding[c]) {
	    if (encoding[c]) {
	      gfree(encoding[c]);
	      gfree(const_cast<char*>(encoding[c]));
	    }
	    }
	    encoding[c] = copyString(getString(charset[nCodes], buf,
	    encoding[c] = copyString(getString(charset[nCodes], buf,
					       &parsedOk));
					       &parsedOk));
 Lines 2335-2341    Link Here 
	  return;
	  return;
	}
	}
	if (encoding[c]) {
	if (encoding[c]) {
	  gfree(encoding[c]);
	  gfree(const_cast<char*>(encoding[c]));
	}
	}
	encoding[c] = copyString(getString(sid, buf, &parsedOk));
	encoding[c] = copyString(getString(sid, buf, &parsedOk));
      }
      }
 Lines 2593-2599    Link Here 
      if ((n = val.len) > 255) {
      if ((n = val.len) > 255) {
	n = 255;
	n = 255;
      }
      }
      strncpy(buf, (char *)&file[val.pos], n);
      strncpy(buf, (const char *)&file[val.pos], n);
      buf[n] = '\0';
      buf[n] = '\0';
    } else {
    } else {
      buf[0] = '\0';
      buf[0] = '\0';
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.h (-11 / +11 lines)
 Lines 135-153    Link Here 
public:
public:
  // Create a FoFiType1C object from a memory buffer.
  // Create a FoFiType1C object from a memory buffer.
  static FoFiType1C *make(char *fileA, int lenA);
  static FoFiType1C *make(const char *fileA, int lenA);
  // Create a FoFiType1C object from a file on disk.
  // Create a FoFiType1C object from a file on disk.
  static FoFiType1C *load(char *fileName);
  static FoFiType1C *load(const char *fileName);
  virtual ~FoFiType1C();
  virtual ~FoFiType1C();
  // Return the font name.
  // Return the font name.
  char *getName();
  const char *getName();
  // Return the encoding, as an array of 256 names (any of which may
  // Return the encoding, as an array of 256 names (any of which may
  // be NULL).  This is only useful with 8-bit fonts.
  // be NULL).  This is only useful with 8-bit fonts.
  char **getEncoding();
  const char **getEncoding();
  // Return the mapping from CIDs to GIDs, and return the number of
  // Return the mapping from CIDs to GIDs, and return the number of
  // CIDs in *<nCIDs>.  This is only useful for CID fonts.
  // CIDs in *<nCIDs>.  This is only useful for CID fonts.
 Lines 159-183    Link Here 
  // font.  If <ascii> is true the eexec section will be hex-encoded,
  // 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,
  // otherwise it will be left as binary data.  If <psName> is non-NULL,
  // it will be used as the PostScript font name.
  // it will be used as the PostScript font name.
  void convertToType1(char *psName, char **newEncoding, GBool ascii,
  void convertToType1(const char *psName, const char **newEncoding, GBool ascii,
		      FoFiOutputFunc outputFunc, void *outputStream);
		      FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 0 CIDFont, suitable for embedding in a
  // Convert to a Type 0 CIDFont, suitable for embedding in a
  // PostScript file.  <psName> will be used as the PostScript font
  // PostScript file.  <psName> will be used as the PostScript font
  // name.
  // name.
  void convertToCIDType0(char *psName,
  void convertToCIDType0(const char *psName,
			 FoFiOutputFunc outputFunc, void *outputStream);
			 FoFiOutputFunc outputFunc, void *outputStream);
  // Convert to a Type 0 (but non-CID) composite font, suitable for
  // Convert to a Type 0 (but non-CID) composite font, suitable for
  // embedding in a PostScript file.  <psName> will be used as the
  // embedding in a PostScript file.  <psName> will be used as the
  // PostScript font name.
  // PostScript font name.
  void convertToType0(char *psName,
  void convertToType0(const char *psName,
		      FoFiOutputFunc outputFunc, void *outputStream);
		      FoFiOutputFunc outputFunc, void *outputStream);
private:
private:
  FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
  FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA);
  void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
  void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
		     int offset, int nBytes,
		     int offset, int nBytes,
		     Type1CIndex *subrIdx,
		     Type1CIndex *subrIdx,
		     Type1CPrivateDict *pDict);
		     Type1CPrivateDict *pDict);
 Lines 187-193    Link Here 
  void cvtGlyphWidth(GBool useOp, GString *charBuf,
  void cvtGlyphWidth(GBool useOp, GString *charBuf,
		     Type1CPrivateDict *pDict);
		     Type1CPrivateDict *pDict);
  void cvtNum(double x, GBool isFP, GString *charBuf);
  void cvtNum(double x, GBool isFP, GString *charBuf);
  void eexecWrite(Type1CEexecBuf *eb, char *s);
  void eexecWrite(Type1CEexecBuf *eb, const char *s);
  void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n);
  void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n);
  GBool parse();
  GBool parse();
  void readTopDict();
  void readTopDict();
 Lines 204-210    Link Here 
  char *getString(int sid, char *buf, GBool *ok);
  char *getString(int sid, char *buf, GBool *ok);
  GString *name;
  GString *name;
  char **encoding;
  const char **encoding;
  Type1CIndex nameIdx;
  Type1CIndex nameIdx;
  Type1CIndex topDictIdx;
  Type1CIndex topDictIdx;
(-) texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.h (-9 / +9 lines)
 Lines 26-58    Link Here 
public:
public:
  // Create a FoFiType1 object from a memory buffer.
  // Create a FoFiType1 object from a memory buffer.
  static FoFiType1 *make(char *fileA, int lenA);
  static FoFiType1 *make(const char *fileA, int lenA);
  // Create a FoFiType1 object from a file on disk.
  // Create a FoFiType1 object from a file on disk.
  static FoFiType1 *load(char *fileName);
  static FoFiType1 *load(const char *fileName);
  virtual ~FoFiType1();
  virtual ~FoFiType1();
  // Return the font name.
  // Return the font name.
  char *getName();
  const char *getName();
  // Return the encoding, as an array of 256 names (any of which may
  // Return the encoding, as an array of 256 names (any of which may
  // be NULL).
  // be NULL).
  char **getEncoding();
  const char **getEncoding();
  // Write a version of the Type 1 font file with a new encoding.
  // 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);
		    FoFiOutputFunc outputFunc, void *outputStream);
private:
private:
  FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
  FoFiType1(const char *fileA, int lenA, GBool freeFileDataA);
  char *getNextLine(char *line);
  const char *getNextLine(const char *line);
  void parse();
  void parse();
  char *name;
  const char *name;
  char **encoding;
  const char **encoding;
  GBool parsed;
  GBool parsed;
};
};
(-) texlive-20080816-source/libs/xpdf.orig/goo/gfile.cc (-11 / +11 lines)
 Lines 83-89    Link Here 
#elif defined(__EMX__) || defined(WIN32)
#elif defined(__EMX__) || defined(WIN32)
  //---------- OS/2+EMX and Win32 ----------
  //---------- OS/2+EMX and Win32 ----------
  char *s;
  const char *s;
  GString *ret;
  GString *ret;
  if ((s = getenv("HOME")))
  if ((s = getenv("HOME")))
 Lines 102-108    Link Here 
#else
#else
  //---------- Unix ----------
  //---------- Unix ----------
  char *s;
  const char *s;
  struct passwd *pw;
  struct passwd *pw;
  GString *ret;
  GString *ret;
 Lines 140-146    Link Here 
  return new GString();
  return new GString();
}
}
GString *appendToPath(GString *path, char *fileName) {
GString *appendToPath(GString *path, const char *fileName) {
#if defined(VMS)
#if defined(VMS)
  //---------- VMS ----------
  //---------- VMS ----------
  //~ this should handle everything necessary for file
  //~ this should handle everything necessary for file
 Lines 306-312    Link Here 
#endif
#endif
}
}
GString *grabPath(char *fileName) {
GString *grabPath(const char *fileName) {
#ifdef VMS
#ifdef VMS
  //---------- VMS ----------
  //---------- VMS ----------
  char *p;
  char *p;
 Lines 355-361    Link Here 
#endif
#endif
}
}
GBool isAbsolutePath(char *path) {
GBool isAbsolutePath(const char *path) {
#ifdef VMS
#ifdef VMS
  //---------- VMS ----------
  //---------- VMS ----------
  return strchr(path, ':') ||
  return strchr(path, ':') ||
 Lines 461-467    Link Here 
#endif
#endif
}
}
time_t getModTime(char *fileName) {
time_t getModTime(const char *fileName) {
#ifdef WIN32
#ifdef WIN32
  //~ should implement this, but it's (currently) only used in xpdf
  //~ should implement this, but it's (currently) only used in xpdf
  return 0;
  return 0;
 Lines 476-485    Link Here 
}
}
#ifndef PDF_PARSER_ONLY
#ifndef PDF_PARSER_ONLY
GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) {
GBool openTempFile(GString **name, FILE **f, const char *mode, const char *ext) {
#if defined(WIN32)
#if defined(WIN32)
  //---------- Win32 ----------
  //---------- Win32 ----------
  char *tempDir;
  const char *tempDir;
  GString *s, *s2;
  GString *s, *s2;
  char buf[32];
  char buf[32];
  FILE *f2;
  FILE *f2;
 Lines 586-592    Link Here 
}
}
#endif
#endif
GBool executeCommand(char *cmd) {
GBool executeCommand(const char *cmd) {
#ifdef VMS
#ifdef VMS
  return system(cmd) ? gTrue : gFalse;
  return system(cmd) ? gTrue : gFalse;
#else
#else
 Lines 627-633    Link Here 
// GDir and GDirEntry
// GDir and GDirEntry
//------------------------------------------------------------------------
//------------------------------------------------------------------------
GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) {
GDirEntry::GDirEntry(const char *dirPath, const char *nameA, GBool doStat) {
#ifdef VMS
#ifdef VMS
  char *p;
  char *p;
#elif defined(WIN32)
#elif defined(WIN32)
 Lines 666-672    Link Here 
  delete name;
  delete name;
}
}
GDir::GDir(char *name, GBool doStatA) {
GDir::GDir(const char *name, GBool doStatA) {
  path = new GString(name);
  path = new GString(name);
  doStat = doStatA;
  doStat = doStatA;
#if defined(WIN32)
#if defined(WIN32)
(-) texlive-20080816-source/libs/xpdf.orig/goo/gfile.h (-8 / +8 lines)
 Lines 60-73    Link Here 
// Append a file name to a path string.  <path> may be an empty
// Append a file name to a path string.  <path> may be an empty
// string, denoting the current directory).  Returns <path>.
// string, denoting the current directory).  Returns <path>.
extern GString *appendToPath(GString *path, char *fileName);
extern GString *appendToPath(GString *path, const char *fileName);
// Grab the path from the front of the file name.  If there is no
// Grab the path from the front of the file name.  If there is no
// directory component in <fileName>, returns an empty string.
// directory component in <fileName>, returns an empty string.
extern GString *grabPath(char *fileName);
extern GString *grabPath(const char *fileName);
// Is this an absolute path or file name?
// Is this an absolute path or file name?
extern GBool isAbsolutePath(char *path);
extern GBool isAbsolutePath(const char *path);
// Make this path absolute by prepending current directory (if path is
// Make this path absolute by prepending current directory (if path is
// relative) or prepending user's directory (if path starts with '~').
// relative) or prepending user's directory (if path starts with '~').
 Lines 75-81    Link Here 
// Get the modification time for <fileName>.  Returns 0 if there is an
// Get the modification time for <fileName>.  Returns 0 if there is an
// error.
// error.
extern time_t getModTime(char *fileName);
extern time_t getModTime(const char *fileName);
// Create a temporary file and open it for writing.  If <ext> is not
// Create a temporary file and open it for writing.  If <ext> is not
// NULL, it will be used as the file name extension.  Returns both the
// NULL, it will be used as the file name extension.  Returns both the
 Lines 83-92    Link Here 
// should be done to the returned file pointer; the file may be
// should be done to the returned file pointer; the file may be
// reopened later for reading, but not for writing.  The <mode> string
// reopened later for reading, but not for writing.  The <mode> string
// should be "w" or "wb".  Returns true on success.
// should be "w" or "wb".  Returns true on success.
extern GBool openTempFile(GString **name, FILE **f, char *mode, char *ext);
extern GBool openTempFile(GString **name, FILE **f, const char *mode, const char *ext);
// Execute <command>.  Returns true on success.
// Execute <command>.  Returns true on success.
extern GBool executeCommand(char *cmd);
extern GBool executeCommand(const char *cmd);
// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line
// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line
// conventions.
// conventions.
 Lines 99-105    Link Here 
class GDirEntry {
class GDirEntry {
public:
public:
  GDirEntry(char *dirPath, char *nameA, GBool doStat);
  GDirEntry(const char *dirPath, const char *nameA, GBool doStat);
  ~GDirEntry();
  ~GDirEntry();
  GString *getName() { return name; }
  GString *getName() { return name; }
  GBool isDir() { return dir; }
  GBool isDir() { return dir; }
 Lines 113-119    Link Here 
class GDir {
class GDir {
public:
public:
  GDir(char *name, GBool doStatA = gTrue);
  GDir(const char *name, GBool doStatA = gTrue);
  ~GDir();
  ~GDir();
  GDirEntry *getNextEntry();
  GDirEntry *getNextEntry();
  void rewind();
  void rewind();
(-) texlive-20080816-source/libs/xpdf.orig/goo/GHash.cc (-7 / +7 lines)
 Lines 145-151    Link Here 
  return p->val.i;
  return p->val.i;
}
}
void *GHash::lookup(char *key) {
void *GHash::lookup(const char *key) {
  GHashBucket *p;
  GHashBucket *p;
  int h;
  int h;
 Lines 155-161    Link Here 
  return p->val.p;
  return p->val.p;
}
}
int GHash::lookupInt(char *key) {
int GHash::lookupInt(const char *key) {
  GHashBucket *p;
  GHashBucket *p;
  int h;
  int h;
 Lines 211-217    Link Here 
  return val;
  return val;
}
}
void *GHash::remove(char *key) {
void *GHash::remove(const char *key) {
  GHashBucket *p;
  GHashBucket *p;
  GHashBucket **q;
  GHashBucket **q;
  void *val;
  void *val;
 Lines 234-240    Link Here 
  return val;
  return val;
}
}
int GHash::removeInt(char *key) {
int GHash::removeInt(const char *key) {
  GHashBucket *p;
  GHashBucket *p;
  GHashBucket **q;
  GHashBucket **q;
  int val;
  int val;
 Lines 344-350    Link Here 
  return NULL;
  return NULL;
}
}
GHashBucket *GHash::find(char *key, int *h) {
GHashBucket *GHash::find(const char *key, int *h) {
  GHashBucket *p;
  GHashBucket *p;
  *h = hash(key);
  *h = hash(key);
 Lines 368-375    Link Here 
  return (int)(h % size);
  return (int)(h % size);
}
}
int GHash::hash(char *key) {
int GHash::hash(const char *key) {
  char *p;
  const char *p;
  unsigned int h;
  unsigned int h;
  h = 0;
  h = 0;
(-) texlive-20080816-source/libs/xpdf.orig/goo/GHash.h (-6 / +6 lines)
 Lines 34-45    Link Here 
  void replace(GString *key, int val);
  void replace(GString *key, int val);
  void *lookup(GString *key);
  void *lookup(GString *key);
  int lookupInt(GString *key);
  int lookupInt(GString *key);
  void *lookup(char *key);
  void *lookup(const char *key);
  int lookupInt(char *key);
  int lookupInt(const char *key);
  void *remove(GString *key);
  void *remove(GString *key);
  int removeInt(GString *key);
  int removeInt(GString *key);
  void *remove(char *key);
  void *remove(const char *key);
  int removeInt(char *key);
  int removeInt(const char *key);
  int getLength() { return len; }
  int getLength() { return len; }
  void startIter(GHashIter **iter);
  void startIter(GHashIter **iter);
  GBool getNext(GHashIter **iter, GString **key, void **val);
  GBool getNext(GHashIter **iter, GString **key, void **val);
 Lines 50-58    Link Here 
  void expand();
  void expand();
  GHashBucket *find(GString *key, int *h);
  GHashBucket *find(GString *key, int *h);
  GHashBucket *find(char *key, int *h);
  GHashBucket *find(const char *key, int *h);
  int hash(GString *key);
  int hash(GString *key);
  int hash(char *key);
  int hash(const char *key);
  GBool deleteKeys;		// set if key strings should be deleted
  GBool deleteKeys;		// set if key strings should be deleted
  int size;			// number of buckets
  int size;			// number of buckets
(-) texlive-20080816-source/libs/xpdf.orig/goo/gmem.cc (-1 / +1 lines)
 Lines 255-261    Link Here 
}
}
#endif
#endif
char *copyString(char *s) {
char *copyString(const char *s) {
  char *s1;
  char *s1;
  s1 = (char *)gmalloc(strlen(s) + 1);
  s1 = (char *)gmalloc(strlen(s) + 1);
(-) texlive-20080816-source/libs/xpdf.orig/goo/gmem.h (-1 / +1 lines)
 Lines 70-76    Link Here 
/*
/*
 * Allocate memory and copy a string into it.
 * Allocate memory and copy a string into it.
 */
 */
extern char *copyString(char *s);
extern char *copyString(const char *s);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
(-) texlive-20080816-source/libs/xpdf.orig/goo/GString.cc (-6 / +7 lines)
 Lines 101-107    Link Here 
  fmtSpace
  fmtSpace
};
};
static char *formatStrings[] = {
static const char *formatStrings[] = {
  "d", "x", "o", "b", "ud", "ux", "uo", "ub",
  "d", "x", "o", "b", "ud", "ux", "uo", "ub",
  "ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb",
  "ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb",
  "f", "g",
  "f", "g",
 Lines 192-198    Link Here 
  return new GString(p, len);
  return new GString(p, len);
}
}
GString *GString::format(char *fmt, ...) {
GString *GString::format(const char *fmt, ...) {
  va_list argList;
  va_list argList;
  GString *s;
  GString *s;
 Lines 203-209    Link Here 
  return s;
  return s;
}
}
GString *GString::formatv(char *fmt, va_list argList) {
GString *GString::formatv(const char *fmt, va_list argList) {
  GString *s;
  GString *s;
  s = new GString();
  s = new GString();
 Lines 254-260    Link Here 
  return this;
  return this;
}
}
GString *GString::appendf(char *fmt, ...) {
GString *GString::appendf(const char *fmt, ...) {
  va_list argList;
  va_list argList;
  va_start(argList, fmt);
  va_start(argList, fmt);
 Lines 263-269    Link Here 
  return this;
  return this;
}
}
GString *GString::appendfv(char *fmt, va_list argList) {
GString *GString::appendfv(const char *fmt, va_list argList) {
  GStringFormatArg *args;
  GStringFormatArg *args;
  int argsLen, argsSize;
  int argsLen, argsSize;
  GStringFormatArg arg;
  GStringFormatArg arg;
 Lines 272-278    Link Here 
  GStringFormatType ft;
  GStringFormatType ft;
  char buf[65];
  char buf[65];
  int len, i;
  int len, i;
  char *p0, *p1, *str;
  const char *p0, *p1;
  char *str;
  argsLen = 0;
  argsLen = 0;
  argsSize = 8;
  argsSize = 8;
(-) texlive-20080816-source/libs/xpdf.orig/goo/GString.h (-4 / +4 lines)
 Lines 67-74    Link Here 
  //     t -- GString *
  //     t -- GString *
  //     w -- blank space; arg determines width
  //     w -- blank space; arg determines width
  // To get literal curly braces, use {{ or }}.
  // To get literal curly braces, use {{ or }}.
  static GString *format(char *fmt, ...);
  static GString *format(const char *fmt, ...);
  static GString *formatv(char *fmt, va_list argList);
  static GString *formatv(const char *fmt, va_list argList);
  // Destructor.
  // Destructor.
  ~GString();
  ~GString();
 Lines 95-102    Link Here 
  GString *append(const char *str, int lengthA);
  GString *append(const char *str, int lengthA);
  // Append a formatted string.
  // Append a formatted string.
  GString *appendf(char *fmt, ...);
  GString *appendf(const char *fmt, ...);
  GString *appendfv(char *fmt, va_list argList);
  GString *appendfv(const char *fmt, va_list argList);
  // Insert a character or string.
  // Insert a character or string.
  GString *insert(int i, char c);
  GString *insert(int i, char c);
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.cc (-3 / +3 lines)
 Lines 39-45    Link Here 
  gfree(tab);
  gfree(tab);
}
}
GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) {
  int h;
  int h;
  BuiltinFontWidth *p;
  BuiltinFontWidth *p;
 Lines 53-60    Link Here 
  return gFalse;
  return gFalse;
}
}
int BuiltinFontWidths::hash(char *name) {
int BuiltinFontWidths::hash(const char *name) {
  char *p;
  const char *p;
  unsigned int h;
  unsigned int h;
  h = 0;
  h = 0;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.h (-5 / +5 lines)
 Lines 23-30    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct BuiltinFont {
struct BuiltinFont {
  char *name;
  const char *name;
  char **defaultBaseEnc;
  const char **defaultBaseEnc;
  short ascent;
  short ascent;
  short descent;
  short descent;
  short bbox[4];
  short bbox[4];
 Lines 34-40    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct BuiltinFontWidth {
struct BuiltinFontWidth {
  char *name;
  const char *name;
  Gushort width;
  Gushort width;
  BuiltinFontWidth *next;
  BuiltinFontWidth *next;
};
};
 Lines 44-54    Link Here 
  BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
  BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
  ~BuiltinFontWidths();
  ~BuiltinFontWidths();
  GBool getWidth(char *name, Gushort *width);
  GBool getWidth(const char *name, Gushort *width);
private:
private:
  int hash(char *name);
  int hash(const char *name);
  BuiltinFontWidth **tab;
  BuiltinFontWidth **tab;
  int size;
  int size;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/CharCodeToUnicode.cc (-2 / +2 lines)
 Lines 189-195    Link Here 
CharCodeToUnicode *CharCodeToUnicode::parseCMap(GString *buf, int nBits) {
CharCodeToUnicode *CharCodeToUnicode::parseCMap(GString *buf, int nBits) {
  CharCodeToUnicode *ctu;
  CharCodeToUnicode *ctu;
  char *p;
  const char *p;
  ctu = new CharCodeToUnicode(NULL);
  ctu = new CharCodeToUnicode(NULL);
  p = buf->getCString();
  p = buf->getCString();
 Lines 198-204    Link Here 
}
}
void CharCodeToUnicode::mergeCMap(GString *buf, int nBits) {
void CharCodeToUnicode::mergeCMap(GString *buf, int nBits) {
  char *p;
  const char *p;
  p = buf->getCString();
  p = buf->getCString();
  parseCMap1(&getCharFromString, &p, nBits);
  parseCMap1(&getCharFromString, &p, nBits);
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.cc (-2 / +2 lines)
 Lines 184-190    Link Here 
#endif
#endif
}
}
void CMap::useCMap(CMapCache *cache, char *useName) {
void CMap::useCMap(CMapCache *cache, const char *useName) {
  GString *useNameStr;
  GString *useNameStr;
  CMap *subCMap;
  CMap *subCMap;
 Lines 327-333    Link Here 
  return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA);
  return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA);
}
}
CID CMap::getCID(char *s, int len, int *nUsed) {
CID CMap::getCID(const char *s, int len, int *nUsed) {
  CMapVectorEntry *vec;
  CMapVectorEntry *vec;
  int n, i;
  int n, i;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.h (-2 / +2 lines)
 Lines 51-57    Link Here 
  // Return the CID corresponding to the character code starting at
  // Return the CID corresponding to the character code starting at
  // <s>, which contains <len> bytes.  Sets *<nUsed> to the number of
  // <s>, which contains <len> bytes.  Sets *<nUsed> to the number of
  // bytes used by the char code.
  // bytes used by the char code.
  CID getCID(char *s, int len, int *nUsed);
  CID getCID(const char *s, int len, int *nUsed);
  // Return the writing mode (0=horizontal, 1=vertical).
  // Return the writing mode (0=horizontal, 1=vertical).
  int getWMode() { return wMode; }
  int getWMode() { return wMode; }
 Lines 60-66    Link Here 
  CMap(GString *collectionA, GString *cMapNameA);
  CMap(GString *collectionA, GString *cMapNameA);
  CMap(GString *collectionA, GString *cMapNameA, int wModeA);
  CMap(GString *collectionA, GString *cMapNameA, int wModeA);
  void useCMap(CMapCache *cache, char *useName);
  void useCMap(CMapCache *cache, const char *useName);
  void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src);
  void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src);
  void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end,
  void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end,
		    Guint nBytes);
		    Guint nBytes);
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.cc (-7 / +7 lines)
 Lines 34-46    Link Here 
  int i;
  int i;
  for (i = 0; i < length; ++i) {
  for (i = 0; i < length; ++i) {
    gfree(entries[i].key);
    gfree(const_cast<char*>(entries[i].key));
    entries[i].val.free();
    entries[i].val.free();
  }
  }
  gfree(entries);
  gfree(entries);
}
}
void Dict::add(char *key, Object *val) {
void Dict::add(const char *key, Object *val) {
  if (length == size) {
  if (length == size) {
    if (length == 0) {
    if (length == 0) {
      size = 8;
      size = 8;
 Lines 54-60    Link Here 
  ++length;
  ++length;
}
}
inline DictEntry *Dict::find(char *key) {
inline DictEntry *Dict::find(const char *key) {
  int i;
  int i;
  for (i = 0; i < length; ++i) {
  for (i = 0; i < length; ++i) {
 Lines 64-88    Link Here 
  return NULL;
  return NULL;
}
}
GBool Dict::is(char *type) {
GBool Dict::is(const char *type) {
  DictEntry *e;
  DictEntry *e;
  return (e = find("Type")) && e->val.isName(type);
  return (e = find("Type")) && e->val.isName(type);
}
}
Object *Dict::lookup(char *key, Object *obj) {
Object *Dict::lookup(const char *key, Object *obj) {
  DictEntry *e;
  DictEntry *e;
  return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
  return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
}
}
Object *Dict::lookupNF(char *key, Object *obj) {
Object *Dict::lookupNF(const char *key, Object *obj) {
  DictEntry *e;
  DictEntry *e;
  return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
  return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
}
}
char *Dict::getKey(int i) {
const char *Dict::getKey(int i) {
  return entries[i].key;
  return entries[i].key;
}
}
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.h (-7 / +7 lines)
 Lines 22-28    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct DictEntry {
struct DictEntry {
  char *key;
  const char *key;
  Object val;
  Object val;
};
};
 Lines 43-60    Link Here 
  int getLength() { return length; }
  int getLength() { return length; }
  // Add an entry.  NB: does not copy key.
  // Add an entry.  NB: does not copy key.
  void add(char *key, Object *val);
  void add(const char *key, Object *val);
  // Check if dictionary is of specified type.
  // Check if dictionary is of specified type.
  GBool is(char *type);
  GBool is(const char *type);
  // Look up an entry and return the value.  Returns a null object
  // Look up an entry and return the value.  Returns a null object
  // if <key> is not in the dictionary.
  // if <key> is not in the dictionary.
  Object *lookup(char *key, Object *obj);
  Object *lookup(const char *key, Object *obj);
  Object *lookupNF(char *key, Object *obj);
  Object *lookupNF(const char *key, Object *obj);
  // Iterative accessors.
  // Iterative accessors.
  char *getKey(int i);
  const char *getKey(int i);
  Object *getVal(int i, Object *obj);
  Object *getVal(int i, Object *obj);
  Object *getValNF(int i, Object *obj);
  Object *getValNF(int i, Object *obj);
 Lines 71-77    Link Here 
  int length;			// number of entries in dictionary
  int length;			// number of entries in dictionary
  int ref;			// reference count
  int ref;			// reference count
  DictEntry *find(char *key);
  DictEntry *find(const char *key);
};
};
#endif
#endif
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Error.cc (-1 / +1 lines)
 Lines 18-24    Link Here 
#include "GlobalParams.h"
#include "GlobalParams.h"
#include "Error.h"
#include "Error.h"
void CDECL error(int pos, char *msg, ...) {
void CDECL error(int pos, const char *msg, ...) {
  va_list args;
  va_list args;
  // NB: this can be called before the globalParams object is created
  // NB: this can be called before the globalParams object is created
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Error.h (-1 / +1 lines)
 Lines 18-23    Link Here 
#include <stdio.h>
#include <stdio.h>
#include "config.h"
#include "config.h"
extern void CDECL error(int pos, char *msg, ...);
extern void CDECL error(int pos, const char *msg, ...);
#endif
#endif
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.cc (-7 / +7 lines)
 Lines 10-16    Link Here 
#include <stdlib.h>
#include <stdlib.h>
#include "FontEncodingTables.h"
#include "FontEncodingTables.h"
char *macRomanEncoding[256] = {
const char *macRomanEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 269-275    Link Here 
  "caron"
  "caron"
};
};
char *macExpertEncoding[256] = {
const char *macExpertEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 528-534    Link Here 
  NULL
  NULL
};
};
char *winAnsiEncoding[256] = {
const char *winAnsiEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 787-793    Link Here 
  "ydieresis"
  "ydieresis"
};
};
char *standardEncoding[256] = {
const char *standardEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 1046-1052    Link Here 
  NULL
  NULL
};
};
char *expertEncoding[256] = {
const char *expertEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 1305-1311    Link Here 
  "Ydieresissmall"
  "Ydieresissmall"
};
};
char *symbolEncoding[256] = {
const char *symbolEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
 Lines 1564-1570    Link Here 
  NULL
  NULL
};
};
char *zapfDingbatsEncoding[256] = {
const char *zapfDingbatsEncoding[256] = {
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.h (-7 / +7 lines)
 Lines 9-20    Link Here 
#ifndef FONTENCODINGTABLES_H
#ifndef FONTENCODINGTABLES_H
#define FONTENCODINGTABLES_H
#define FONTENCODINGTABLES_H
extern char *macRomanEncoding[];
extern const char *macRomanEncoding[];
extern char *macExpertEncoding[];
extern const char *macExpertEncoding[];
extern char *winAnsiEncoding[];
extern const char *winAnsiEncoding[];
extern char *standardEncoding[];
extern const char *standardEncoding[];
extern char *expertEncoding[];
extern const char *expertEncoding[];
extern char *symbolEncoding[];
extern const char *symbolEncoding[];
extern char *zapfDingbatsEncoding[];
extern const char *zapfDingbatsEncoding[];
#endif
#endif
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Function.cc (-2 / +2 lines)
 Lines 749-755    Link Here 
// Note: 'if' and 'ifelse' are parsed separately.
// Note: 'if' and 'ifelse' are parsed separately.
// The rest are listed here in alphabetical order.
// The rest are listed here in alphabetical order.
// The index in this table is equivalent to the entry in PSOp.
// The index in this table is equivalent to the entry in PSOp.
char *psOpNames[] = {
const char *psOpNames[] = {
  "abs",
  "abs",
  "add",
  "add",
  "and",
  "and",
 Lines 1086-1092    Link Here 
GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) {
GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) {
  GString *tok;
  GString *tok;
  char *p;
  const char *p;
  GBool isReal;
  GBool isReal;
  int opPtr, elsePtr;
  int opPtr, elsePtr;
  int a, b, mid, cmp;
  int a, b, mid, cmp;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.cc (-20 / +20 lines)
 Lines 33-40    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct StdFontMapEntry {
struct StdFontMapEntry {
  char *altName;
  const char *altName;
  char *properName;
  const char *properName;
};
};
// Acrobat 4.0 and earlier substituted Base14-compatible fonts without
// Acrobat 4.0 and earlier substituted Base14-compatible fonts without
 Lines 100-106    Link Here 
// GfxFont
// GfxFont
//------------------------------------------------------------------------
//------------------------------------------------------------------------
GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) {
GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict) {
  GString *nameA;
  GString *nameA;
  GfxFont *font;
  GfxFont *font;
  Object obj1;
  Object obj1;
 Lines 136-142    Link Here 
  return font;
  return font;
}
}
GfxFont::GfxFont(char *tagA, Ref idA, GString *nameA) {
GfxFont::GfxFont(const char *tagA, Ref idA, GString *nameA) {
  ok = gFalse;
  ok = gFalse;
  tag = new GString(tagA);
  tag = new GString(tagA);
  id = idA;
  id = idA;
 Lines 331-338    Link Here 
}
}
void GfxFont::findExtFontFile() {
void GfxFont::findExtFontFile() {
  static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
  static const char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
  static char *ttExts[] = { ".ttf", NULL };
  static const char *ttExts[] = { ".ttf", NULL };
  if (name) {
  if (name) {
    if (type == fontType1) {
    if (type == fontType1) {
 Lines 343-349    Link Here 
  }
  }
}
}
char *GfxFont::readExtFontFile(int *len) {
const char *GfxFont::readExtFontFile(int *len) {
  FILE *f;
  FILE *f;
  char *buf;
  char *buf;
 Lines 363-369    Link Here 
  return buf;
  return buf;
}
}
char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
const char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
  char *buf;
  char *buf;
  Object obj1, obj2;
  Object obj1, obj2;
  Stream *str;
  Stream *str;
 Lines 404-423    Link Here 
// Gfx8BitFont
// Gfx8BitFont
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
			 GfxFontType typeA, Dict *fontDict):
			 GfxFontType typeA, Dict *fontDict):
  GfxFont(tagA, idA, nameA)
  GfxFont(tagA, idA, nameA)
{
{
  GString *name2;
  GString *name2;
  BuiltinFont *builtinFont;
  BuiltinFont *builtinFont;
  char **baseEnc;
  const char **baseEnc;
  GBool baseEncFromFontFile;
  GBool baseEncFromFontFile;
  char *buf;
  const char *buf;
  int len;
  int len;
  FoFiType1 *ffT1;
  FoFiType1 *ffT1;
  FoFiType1C *ffT1C;
  FoFiType1C *ffT1C;
  int code, code2;
  int code, code2;
  char *charName;
  const char *charName;
  GBool missing, hex;
  GBool missing, hex;
  Unicode toUnicode[256];
  Unicode toUnicode[256];
  CharCodeToUnicode *utu, *ctu2;
  CharCodeToUnicode *utu, *ctu2;
 Lines 627-633    Link Here 
    }
    }
  }
  }
  if (buf) {
  if (buf) {
    gfree(buf);
    gfree(const_cast<char*>(buf));
  }
  }
  // get default base encoding
  // get default base encoding
 Lines 677-683    Link Here 
	} else if (obj3.isName()) {
	} else if (obj3.isName()) {
	  if (code >= 0 && code < 256) {
	  if (code >= 0 && code < 256) {
	    if (encFree[code]) {
	    if (encFree[code]) {
	      gfree(enc[code]);
	      gfree(const_cast<char*>(enc[code]));
	    }
	    }
	    enc[code] = copyString(obj3.getName());
	    enc[code] = copyString(obj3.getName());
	    encFree[code] = gTrue;
	    encFree[code] = gTrue;
 Lines 895-901    Link Here 
  for (i = 0; i < 256; ++i) {
  for (i = 0; i < 256; ++i) {
    if (encFree[i] && enc[i]) {
    if (encFree[i] && enc[i]) {
      gfree(enc[i]);
      gfree(const_cast<char*>(enc[i]));
    }
    }
  }
  }
  ctu->decRefCnt();
  ctu->decRefCnt();
 Lines 907-913    Link Here 
  }
  }
}
}
int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code,
int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code,
			     Unicode *u, int uSize, int *uLen,
			     Unicode *u, int uSize, int *uLen,
			     double *dx, double *dy, double *ox, double *oy) {
			     double *dx, double *dy, double *ox, double *oy) {
  CharCode c;
  CharCode c;
 Lines 929-935    Link Here 
  int cmapPlatform, cmapEncoding;
  int cmapPlatform, cmapEncoding;
  int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
  int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
  GBool useMacRoman, useUnicode;
  GBool useMacRoman, useUnicode;
  char *charName;
  const char *charName;
  Unicode u;
  Unicode u;
  int code, i, n;
  int code, i, n;
 Lines 1074-1080    Link Here 
         ((GfxFontCIDWidthExcepV *)w2)->first;
         ((GfxFontCIDWidthExcepV *)w2)->first;
}
}
GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
		       Dict *fontDict):
		       Dict *fontDict):
  GfxFont(tagA, idA, nameA)
  GfxFont(tagA, idA, nameA)
{
{
 Lines 1411-1417    Link Here 
  }
  }
}
}
int GfxCIDFont::getNextChar(char *s, int len, CharCode *code,
int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code,
			    Unicode *u, int uSize, int *uLen,
			    Unicode *u, int uSize, int *uLen,
			    double *dx, double *dy, double *ox, double *oy) {
			    double *dx, double *dy, double *ox, double *oy) {
  CID cid;
  CID cid;
 Lines 1556-1562    Link Here 
  gfree(fonts);
  gfree(fonts);
}
}
GfxFont *GfxFontDict::lookup(char *tag) {
GfxFont *GfxFontDict::lookup(const char *tag) {
  int i;
  int i;
  for (i = 0; i < numFonts; ++i) {
  for (i = 0; i < numFonts; ++i) {
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.h (-14 / +14 lines)
 Lines 89-97    Link Here 
public:
public:
  // Build a GfxFont object.
  // Build a GfxFont object.
  static GfxFont *makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict);
  static GfxFont *makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict);
  GfxFont(char *tagA, Ref idA, GString *nameA);
  GfxFont(const char *tagA, Ref idA, GString *nameA);
  virtual ~GfxFont();
  virtual ~GfxFont();
 Lines 104-110    Link Here 
  Ref *getID() { return &id; }
  Ref *getID() { return &id; }
  // Does this font match the tag?
  // Does this font match the tag?
  GBool matches(char *tagA) { return !tag->cmp(tagA); }
  GBool matches(const char *tagA) { return !tag->cmp(tagA); }
  // Get base font name.
  // Get base font name.
  GString *getName() { return name; }
  GString *getName() { return name; }
 Lines 152-159    Link Here 
  virtual int getWMode() { return 0; }
  virtual int getWMode() { return 0; }
  // Read an external or embedded font file into a buffer.
  // Read an external or embedded font file into a buffer.
  char *readExtFontFile(int *len);
  const char *readExtFontFile(int *len);
  char *readEmbFontFile(XRef *xref, int *len);
  const char *readEmbFontFile(XRef *xref, int *len);
  // Get the next char from a string <s> of <len> bytes, returning the
  // Get the next char from a string <s> of <len> bytes, returning the
  // char <code>, its Unicode mapping <u>, its displacement vector
  // char <code>, its Unicode mapping <u>, its displacement vector
 Lines 161-167    Link Here 
  // is the number of entries available in <u>, and <uLen> is set to
  // is the number of entries available in <u>, and <uLen> is set to
  // the number actually used.  Returns the number of bytes used by
  // the number actually used.  Returns the number of bytes used by
  // the char code.
  // the char code.
  virtual int getNextChar(char *s, int len, CharCode *code,
  virtual int getNextChar(const char *s, int len, CharCode *code,
			  Unicode *u, int uSize, int *uLen,
			  Unicode *u, int uSize, int *uLen,
			  double *dx, double *dy, double *ox, double *oy) = 0;
			  double *dx, double *dy, double *ox, double *oy) = 0;
 Lines 196-218    Link Here 
class Gfx8BitFont: public GfxFont {
class Gfx8BitFont: public GfxFont {
public:
public:
  Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
  Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
	      GfxFontType typeA, Dict *fontDict);
	      GfxFontType typeA, Dict *fontDict);
  virtual ~Gfx8BitFont();
  virtual ~Gfx8BitFont();
  virtual int getNextChar(char *s, int len, CharCode *code,
  virtual int getNextChar(const char *s, int len, CharCode *code,
			  Unicode *u, int uSize, int *uLen,
			  Unicode *u, int uSize, int *uLen,
			  double *dx, double *dy, double *ox, double *oy);
			  double *dx, double *dy, double *ox, double *oy);
  // Return the encoding.
  // Return the encoding.
  char **getEncoding() { return enc; }
  const char **getEncoding() { return enc; }
  // Return the Unicode map.
  // Return the Unicode map.
  CharCodeToUnicode *getToUnicode();
  CharCodeToUnicode *getToUnicode();
  // Return the character name associated with <code>.
  // Return the character name associated with <code>.
  char *getCharName(int code) { return enc[code]; }
  const char *getCharName(int code) { return enc[code]; }
  // Returns true if the PDF font specified an encoding.
  // Returns true if the PDF font specified an encoding.
  GBool getHasEncoding() { return hasEncoding; }
  GBool getHasEncoding() { return hasEncoding; }
 Lines 238-244    Link Here 
private:
private:
  char *enc[256];		// char code --> char name
  const char *enc[256];		// char code --> char name
  char encFree[256];		// boolean for each char name: if set,
  char encFree[256];		// boolean for each char name: if set,
				//   the string is malloc'ed
				//   the string is malloc'ed
  CharCodeToUnicode *ctu;	// char code --> Unicode
  CharCodeToUnicode *ctu;	// char code --> Unicode
 Lines 256-269    Link Here 
class GfxCIDFont: public GfxFont {
class GfxCIDFont: public GfxFont {
public:
public:
  GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
  GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
	     Dict *fontDict);
	     Dict *fontDict);
  virtual ~GfxCIDFont();
  virtual ~GfxCIDFont();
  virtual GBool isCIDFont() { return gTrue; }
  virtual GBool isCIDFont() { return gTrue; }
  virtual int getNextChar(char *s, int len, CharCode *code,
  virtual int getNextChar(const char *s, int len, CharCode *code,
			  Unicode *u, int uSize, int *uLen,
			  Unicode *u, int uSize, int *uLen,
			  double *dx, double *dy, double *ox, double *oy);
			  double *dx, double *dy, double *ox, double *oy);
 Lines 305-311    Link Here 
  ~GfxFontDict();
  ~GfxFontDict();
  // Get the specified font.
  // Get the specified font.
  GfxFont *lookup(char *tag);
  GfxFont *lookup(const char *tag);
  // Iterative access.
  // Iterative access.
  int getNumFonts() { return numFonts; }
  int getNumFonts() { return numFonts; }
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.cc (-4 / +4 lines)
 Lines 35-41    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct GfxBlendModeInfo {
struct GfxBlendModeInfo {
  char *name;
  const char *name;
  GfxBlendMode mode;
  GfxBlendMode mode;
};
};
 Lines 66-72    Link Here 
// NB: This must match the GfxColorSpaceMode enum defined in
// NB: This must match the GfxColorSpaceMode enum defined in
// GfxState.h
// GfxState.h
static char *gfxColorSpaceModeNames[] = {
static const char *gfxColorSpaceModeNames[] = {
  "DeviceGray",
  "DeviceGray",
  "CalGray",
  "CalGray",
  "DeviceRGB",
  "DeviceRGB",
 Lines 157-163    Link Here 
  return nGfxColorSpaceModes;
  return nGfxColorSpaceModes;
}
}
char *GfxColorSpace::getColorSpaceModeName(int idx) {
const char *GfxColorSpace::getColorSpaceModeName(int idx) {
  return gfxColorSpaceModeNames[idx];
  return gfxColorSpaceModeNames[idx];
}
}
 Lines 949-955    Link Here 
  int indexHighA;
  int indexHighA;
  Object obj1;
  Object obj1;
  int x;
  int x;
  char *s;
  const char *s;
  int n, i, j;
  int n, i, j;
  if (arr->getLength() != 4) {
  if (arr->getLength() != 4) {
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.h (-1 / +1 lines)
 Lines 164-170    Link Here 
  static int getNumColorSpaceModes();
  static int getNumColorSpaceModes();
  // Return the name of the <idx>th color space mode.
  // Return the name of the <idx>th color space mode.
  static char *getColorSpaceModeName(int idx);
  static const char *getColorSpaceModeName(int idx);
private:
private:
};
};
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.cc (-44 / +44 lines)
 Lines 117-125    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
static struct {
static struct {
  char *name;
  const char *name;
  char *t1FileName;
  const char *t1FileName;
  char *ttFileName;
  const char *ttFileName;
} displayFontTab[] = {
} displayFontTab[] = {
  {"Courier",               "n022003l.pfb", "cour.ttf"},
  {"Courier",               "n022003l.pfb", "cour.ttf"},
  {"Courier-Bold",          "n022004l.pfb", "courbd.ttf"},
  {"Courier-Bold",          "n022004l.pfb", "courbd.ttf"},
 Lines 139-151    Link Here 
};
};
#ifdef WIN32
#ifdef WIN32
static char *displayFontDirs[] = {
static const char *displayFontDirs[] = {
  "c:/windows/fonts",
  "c:/windows/fonts",
  "c:/winnt/fonts",
  "c:/winnt/fonts",
  NULL
  NULL
};
};
#else
#else
static char *displayFontDirs[] = {
static const char *displayFontDirs[] = {
  "/usr/share/ghostscript/fonts",
  "/usr/share/ghostscript/fonts",
  "/usr/local/share/ghostscript/fonts",
  "/usr/local/share/ghostscript/fonts",
  "/usr/share/fonts/default/Type1",
  "/usr/share/fonts/default/Type1",
 Lines 205-211    Link Here 
  GBool bold, italic;
  GBool bold, italic;
  static WinFontInfo *make(GString *nameA, GBool boldA, GBool italicA,
  static WinFontInfo *make(GString *nameA, GBool boldA, GBool italicA,
			   HKEY regKey, char *winFontDir);
			   HKEY regKey, const char *winFontDir);
  WinFontInfo(GString *nameA, GBool boldA, GBool italicA,
  WinFontInfo(GString *nameA, GBool boldA, GBool italicA,
	      GString *fileNameA);
	      GString *fileNameA);
  virtual ~WinFontInfo();
  virtual ~WinFontInfo();
 Lines 213-219    Link Here 
};
};
WinFontInfo *WinFontInfo::make(GString *nameA, GBool boldA, GBool italicA,
WinFontInfo *WinFontInfo::make(GString *nameA, GBool boldA, GBool italicA,
			       HKEY regKey, char *winFontDir) {
			       HKEY regKey, const char *winFontDir) {
  GString *regName;
  GString *regName;
  GString *fileNameA;
  GString *fileNameA;
  char buf[MAX_PATH];
  char buf[MAX_PATH];
 Lines 280-286    Link Here 
class WinFontList {
class WinFontList {
public:
public:
  WinFontList(char *winFontDirA);
  WinFontList(const char *winFontDirA);
  ~WinFontList();
  ~WinFontList();
  WinFontInfo *find(GString *font);
  WinFontInfo *find(GString *font);
 Lines 297-308    Link Here 
  GList *fonts;			// [WinFontInfo]
  GList *fonts;			// [WinFontInfo]
  HDC dc;			// (only used during enumeration)
  HDC dc;			// (only used during enumeration)
  HKEY regKey;			// (only used during enumeration)
  HKEY regKey;			// (only used during enumeration)
  char *winFontDir;		// (only used during enumeration)
  const char *winFontDir;	// (only used during enumeration)
};
};
WinFontList::WinFontList(char *winFontDirA) {
WinFontList::WinFontList(const char *winFontDirA) {
  OSVERSIONINFO version;
  OSVERSIONINFO version;
  char *path;
  const char *path;
  fonts = new GList();
  fonts = new GList();
  dc = GetDC(NULL);
  dc = GetDC(NULL);
 Lines 463-469    Link Here 
// KeyBinding
// KeyBinding
//------------------------------------------------------------------------
//------------------------------------------------------------------------
KeyBinding::KeyBinding(int codeA, int modsA, int contextA, char *cmd0) {
KeyBinding::KeyBinding(int codeA, int modsA, int contextA, const char *cmd0) {
  code = codeA;
  code = codeA;
  mods = modsA;
  mods = modsA;
  context = contextA;
  context = contextA;
 Lines 472-478    Link Here 
}
}
KeyBinding::KeyBinding(int codeA, int modsA, int contextA,
KeyBinding::KeyBinding(int codeA, int modsA, int contextA,
		       char *cmd0, char *cmd1) {
		       const char *cmd0, const char *cmd1) {
  code = codeA;
  code = codeA;
  mods = modsA;
  mods = modsA;
  context = contextA;
  context = contextA;
 Lines 501-507    Link Here 
class Plugin {
class Plugin {
public:
public:
  static Plugin *load(char *type, char *name);
  static Plugin *load(const char *type, const char *name);
  ~Plugin();
  ~Plugin();
private:
private:
 Lines 515-521    Link Here 
#endif
#endif
};
};
Plugin *Plugin::load(char *type, char *name) {
Plugin *Plugin::load(const char *type, const char *name) {
  GString *path;
  GString *path;
  Plugin *plugin;
  Plugin *plugin;
  XpdfPluginVecTable *vt;
  XpdfPluginVecTable *vt;
 Lines 677-683    Link Here 
  displayCIDFonts = new GHash();
  displayCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
#if HAVE_PAPER_H
#if HAVE_PAPER_H
  char *paperName;
  const char *paperName;
  const struct paper *paperType;
  const struct paper *paperType;
  paperinit();
  paperinit();
  if ((paperName = systempapername())) {
  if ((paperName = systempapername())) {
 Lines 771-777    Link Here 
}
}
GlobalParams::GlobalParams(char *cfgFileName) {
GlobalParams::GlobalParams(const char *cfgFileName) {
  UnicodeMap *map;
  UnicodeMap *map;
  GString *fileName;
  GString *fileName;
  FILE *f;
  FILE *f;
 Lines 811-817    Link Here 
  displayCIDFonts = new GHash();
  displayCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
#if HAVE_PAPER_H
#if HAVE_PAPER_H
  char *paperName;
  const char *paperName;
  const struct paper *paperType;
  const struct paper *paperType;
  paperinit();
  paperinit();
  if ((paperName = systempapername())) {
  if ((paperName = systempapername())) {
 Lines 1096-1102    Link Here 
  }
  }
}
}
void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
void GlobalParams::parseLine(const char *buf, GString *fileName, int line) {
  GList *tokens;
  GList *tokens;
  GString *cmd, *incFile;
  GString *cmd, *incFile;
  char *p1, *p2;
  char *p1, *p2;
 Lines 1531-1537    Link Here 
  psFonts->add(param->pdfFontName, param);
  psFonts->add(param->pdfFontName, param);
}
}
void GlobalParams::parsePSFont16(char *cmdName, GList *fontList,
void GlobalParams::parsePSFont16(const char *cmdName, GList *fontList,
				 GList *tokens, GString *fileName, int line) {
				 GList *tokens, GString *fileName, int line) {
  PSFontParam *param;
  PSFontParam *param;
  int wMode;
  int wMode;
 Lines 1692-1700    Link Here 
GBool GlobalParams::parseKey(GString *modKeyStr, GString *contextStr,
GBool GlobalParams::parseKey(GString *modKeyStr, GString *contextStr,
			     int *code, int *mods, int *context,
			     int *code, int *mods, int *context,
			     char *cmdName,
			     const char *cmdName,
			     GList *tokens, GString *fileName, int line) {
			     GList *tokens, GString *fileName, int line) {
  char *p0;
  const char *p0;
  *mods = xpdfKeyModNone;
  *mods = xpdfKeyModNone;
  p0 = modKeyStr->getCString();
  p0 = modKeyStr->getCString();
 Lines 1821-1827    Link Here 
}
}
#endif
#endif
void GlobalParams::parseCommand(char *cmdName, GString **val,
void GlobalParams::parseCommand(const char *cmdName, GString **val,
				GList *tokens, GString *fileName, int line) {
				GList *tokens, GString *fileName, int line) {
  if (tokens->getLength() != 2) {
  if (tokens->getLength() != 2) {
    error(-1, "Bad '%s' config file command (%s:%d)",
    error(-1, "Bad '%s' config file command (%s:%d)",
 Lines 1834-1840    Link Here 
  *val = ((GString *)tokens->get(1))->copy();
  *val = ((GString *)tokens->get(1))->copy();
}
}
void GlobalParams::parseYesNo(char *cmdName, GBool *flag,
void GlobalParams::parseYesNo(const char *cmdName, GBool *flag,
			      GList *tokens, GString *fileName, int line) {
			      GList *tokens, GString *fileName, int line) {
  GString *tok;
  GString *tok;
 Lines 1850-1856    Link Here 
  }
  }
}
}
GBool GlobalParams::parseYesNo2(char *token, GBool *flag) {
GBool GlobalParams::parseYesNo2(const char *token, GBool *flag) {
  if (!strcmp(token, "yes")) {
  if (!strcmp(token, "yes")) {
    *flag = gTrue;
    *flag = gTrue;
  } else if (!strcmp(token, "no")) {
  } else if (!strcmp(token, "no")) {
 Lines 1861-1867    Link Here 
  return gTrue;
  return gTrue;
}
}
void GlobalParams::parseInteger(char *cmdName, int *val,
void GlobalParams::parseInteger(const char *cmdName, int *val,
				GList *tokens, GString *fileName, int line) {
				GList *tokens, GString *fileName, int line) {
  GString *tok;
  GString *tok;
  int i;
  int i;
 Lines 1892-1898    Link Here 
  *val = atoi(tok->getCString());
  *val = atoi(tok->getCString());
}
}
void GlobalParams::parseFloat(char *cmdName, double *val,
void GlobalParams::parseFloat(const char *cmdName, double *val,
			      GList *tokens, GString *fileName, int line) {
			      GList *tokens, GString *fileName, int line) {
  GString *tok;
  GString *tok;
  int i;
  int i;
 Lines 1992-2003    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void GlobalParams::setBaseDir(char *dir) {
void GlobalParams::setBaseDir(const char *dir) {
  delete baseDir;
  delete baseDir;
  baseDir = new GString(dir);
  baseDir = new GString(dir);
}
}
void GlobalParams::setupBaseFonts(char *dir) {
void GlobalParams::setupBaseFonts(const char *dir) {
  GString *fontName;
  GString *fontName;
  GString *fileName;
  GString *fileName;
#ifdef WIN32
#ifdef WIN32
 Lines 2109-2115    Link Here 
// accessors
// accessors
//------------------------------------------------------------------------
//------------------------------------------------------------------------
CharCode GlobalParams::getMacRomanCharCode(char *charName) {
CharCode GlobalParams::getMacRomanCharCode(const char *charName) {
  // no need to lock - macRomanReverseMap is constant
  // no need to lock - macRomanReverseMap is constant
  return macRomanReverseMap->lookup(charName);
  return macRomanReverseMap->lookup(charName);
}
}
 Lines 2123-2129    Link Here 
  return s;
  return s;
}
}
Unicode GlobalParams::mapNameToUnicode(char *charName) {
Unicode GlobalParams::mapNameToUnicode(const char *charName) {
  // no need to lock - nameToUnicode is constant
  // no need to lock - nameToUnicode is constant
  return nameToUnicode->lookup(charName);
  return nameToUnicode->lookup(charName);
}
}
 Lines 2456-2464    Link Here 
  return tiny;
  return tiny;
}
}
GString *GlobalParams::findFontFile(GString *fontName, char **exts) {
GString *GlobalParams::findFontFile(GString *fontName, const char **exts) {
  GString *dir, *fileName;
  GString *dir, *fileName;
  char **ext;
  const char **ext;
  FILE *f;
  FILE *f;
  int i;
  int i;
 Lines 2745-2751    Link Here 
  unlockGlobalParams;
  unlockGlobalParams;
}
}
void GlobalParams::setPSFile(char *file) {
void GlobalParams::setPSFile(const char *file) {
  lockGlobalParams;
  lockGlobalParams;
  if (psFile) {
  if (psFile) {
    delete psFile;
    delete psFile;
 Lines 2754-2760    Link Here 
  unlockGlobalParams;
  unlockGlobalParams;
}
}
GBool GlobalParams::setPSPaperSize(char *size) {
GBool GlobalParams::setPSPaperSize(const char *size) {
  lockGlobalParams;
  lockGlobalParams;
  if (!strcmp(size, "match")) {
  if (!strcmp(size, "match")) {
    psPaperWidth = psPaperHeight = -1;
    psPaperWidth = psPaperHeight = -1;
 Lines 2884-2897    Link Here 
  unlockGlobalParams;
  unlockGlobalParams;
}
}
void GlobalParams::setTextEncoding(char *encodingName) {
void GlobalParams::setTextEncoding(const char *encodingName) {
  lockGlobalParams;
  lockGlobalParams;
  delete textEncoding;
  delete textEncoding;
  textEncoding = new GString(encodingName);
  textEncoding = new GString(encodingName);
  unlockGlobalParams;
  unlockGlobalParams;
}
}
GBool GlobalParams::setTextEOL(char *s) {
GBool GlobalParams::setTextEOL(const char *s) {
  lockGlobalParams;
  lockGlobalParams;
  if (!strcmp(s, "unix")) {
  if (!strcmp(s, "unix")) {
    textEOL = eolUnix;
    textEOL = eolUnix;
 Lines 2919-2925    Link Here 
  unlockGlobalParams;
  unlockGlobalParams;
}
}
void GlobalParams::setInitialZoom(char *s) {
void GlobalParams::setInitialZoom(const char *s) {
  lockGlobalParams;
  lockGlobalParams;
  delete initialZoom;
  delete initialZoom;
  initialZoom = new GString(s);
  initialZoom = new GString(s);
 Lines 2932-2938    Link Here 
  unlockGlobalParams;
  unlockGlobalParams;
}
}
GBool GlobalParams::setEnableT1lib(char *s) {
GBool GlobalParams::setEnableT1lib(const char *s) {
  GBool ok;
  GBool ok;
  lockGlobalParams;
  lockGlobalParams;
 Lines 2941-2947    Link Here 
  return ok;
  return ok;
}
}
GBool GlobalParams::setEnableFreeType(char *s) {
GBool GlobalParams::setEnableFreeType(const char *s) {
  GBool ok;
  GBool ok;
  lockGlobalParams;
  lockGlobalParams;
 Lines 2951-2957    Link Here 
}
}
GBool GlobalParams::setAntialias(char *s) {
GBool GlobalParams::setAntialias(const char *s) {
  GBool ok;
  GBool ok;
  lockGlobalParams;
  lockGlobalParams;
 Lines 2960-2966    Link Here 
  return ok;
  return ok;
}
}
GBool GlobalParams::setVectorAntialias(char *s) {
GBool GlobalParams::setVectorAntialias(const char *s) {
  GBool ok;
  GBool ok;
  lockGlobalParams;
  lockGlobalParams;
 Lines 3037-3043    Link Here 
#endif
#endif
}
}
XpdfSecurityHandler *GlobalParams::getSecurityHandler(char *name) {
XpdfSecurityHandler *GlobalParams::getSecurityHandler(const char *name) {
#ifdef ENABLE_PLUGINS
#ifdef ENABLE_PLUGINS
  XpdfSecurityHandler *hdlr;
  XpdfSecurityHandler *hdlr;
  int i;
  int i;
 Lines 3075-3081    Link Here 
// plugins
// plugins
//------------------------------------------------------------------------
//------------------------------------------------------------------------
GBool GlobalParams::loadPlugin(char *type, char *name) {
GBool GlobalParams::loadPlugin(const char *type, const char *name) {
  Plugin *plugin;
  Plugin *plugin;
  if (!(plugin = Plugin::load(type, name))) {
  if (!(plugin = Plugin::load(type, name))) {
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.h (-27 / +27 lines)
 Lines 172-179    Link Here 
				//   together)
				//   together)
  GList *cmds;			// list of commands [GString]
  GList *cmds;			// list of commands [GString]
  KeyBinding(int codeA, int modsA, int contextA, char *cmd0);
  KeyBinding(int codeA, int modsA, int contextA, const char *cmd0);
  KeyBinding(int codeA, int modsA, int contextA, char *cmd0, char *cmd1);
  KeyBinding(int codeA, int modsA, int contextA, const char *cmd0, const char *cmd1);
  KeyBinding(int codeA, int modsA, int contextA, GList *cmdsA);
  KeyBinding(int codeA, int modsA, int contextA, GList *cmdsA);
  ~KeyBinding();
  ~KeyBinding();
};
};
 Lines 232-257    Link Here 
  // Initialize the global parameters by attempting to read a config
  // Initialize the global parameters by attempting to read a config
  // file.
  // file.
  GlobalParams(char *cfgFileName);
  GlobalParams(const char *cfgFileName);
  // Initialize it without reading the config
  // Initialize it without reading the config
  GlobalParams();
  GlobalParams();
  ~GlobalParams();
  ~GlobalParams();
  void setBaseDir(char *dir);
  void setBaseDir(const char *dir);
  void setupBaseFonts(char *dir);
  void setupBaseFonts(const char *dir);
#ifndef PDF_PARSER_ONLY
#ifndef PDF_PARSER_ONLY
  void parseLine(char *buf, GString *fileName, int line);
  void parseLine(const char *buf, GString *fileName, int line);
#endif
#endif
  //----- accessors
  //----- accessors
  CharCode getMacRomanCharCode(char *charName);
  CharCode getMacRomanCharCode(const char *charName);
  GString *getBaseDir();
  GString *getBaseDir();
  Unicode mapNameToUnicode(char *charName);
  Unicode mapNameToUnicode(const char *charName);
  UnicodeMap *getResidentUnicodeMap(GString *encodingName);
  UnicodeMap *getResidentUnicodeMap(GString *encodingName);
  FILE *getUnicodeMapFile(GString *encodingName);
  FILE *getUnicodeMapFile(GString *encodingName);
  FILE *findCMapFile(GString *collection, GString *cMapName);
  FILE *findCMapFile(GString *collection, GString *cMapName);
 Lines 281-287    Link Here 
  EndOfLineKind getTextEOL();
  EndOfLineKind getTextEOL();
  GBool getTextPageBreaks();
  GBool getTextPageBreaks();
  GBool getTextKeepTinyChars();
  GBool getTextKeepTinyChars();
  GString *findFontFile(GString *fontName, char **exts);
  GString *findFontFile(GString *fontName, const char **exts);
  GString *getInitialZoom();
  GString *getInitialZoom();
  GBool getContinuousView();
  GBool getContinuousView();
  GBool getEnableT1lib();
  GBool getEnableT1lib();
 Lines 314-321    Link Here 
  //----- functions to set parameters
  //----- functions to set parameters
  void addDisplayFont(DisplayFontParam *param);
  void addDisplayFont(DisplayFontParam *param);
  void setPSFile(char *file);
  void setPSFile(const char *file);
  GBool setPSPaperSize(char *size);
  GBool setPSPaperSize(const char *size);
  void setPSPaperWidth(int width);
  void setPSPaperWidth(int width);
  void setPSPaperHeight(int height);
  void setPSPaperHeight(int height);
  void setPSImageableArea(int llx, int lly, int urx, int ury);
  void setPSImageableArea(int llx, int lly, int urx, int ury);
 Lines 332-347    Link Here 
  void setPSPreload(GBool preload);
  void setPSPreload(GBool preload);
  void setPSOPI(GBool opi);
  void setPSOPI(GBool opi);
  void setPSASCIIHex(GBool hex);
  void setPSASCIIHex(GBool hex);
  void setTextEncoding(char *encodingName);
  void setTextEncoding(const char *encodingName);
  GBool setTextEOL(char *s);
  GBool setTextEOL(const char *s);
  void setTextPageBreaks(GBool pageBreaks);
  void setTextPageBreaks(GBool pageBreaks);
  void setTextKeepTinyChars(GBool keep);
  void setTextKeepTinyChars(GBool keep);
  void setInitialZoom(char *s);
  void setInitialZoom(const char *s);
  void setContinuousView(GBool cont);
  void setContinuousView(GBool cont);
  GBool setEnableT1lib(char *s);
  GBool setEnableT1lib(const char *s);
  GBool setEnableFreeType(char *s);
  GBool setEnableFreeType(const char *s);
  GBool setAntialias(char *s);
  GBool setAntialias(const char *s);
  GBool setVectorAntialias(char *s);
  GBool setVectorAntialias(const char *s);
  void setScreenType(ScreenType t);
  void setScreenType(ScreenType t);
  void setScreenSize(int size);
  void setScreenSize(int size);
  void setScreenDotRadius(int r);
  void setScreenDotRadius(int r);
 Lines 356-362    Link Here 
  //----- security handlers
  //----- security handlers
  void addSecurityHandler(XpdfSecurityHandler *handler);
  void addSecurityHandler(XpdfSecurityHandler *handler);
  XpdfSecurityHandler *getSecurityHandler(char *name);
  XpdfSecurityHandler *getSecurityHandler(const char *name);
private:
private:
 Lines 378-384    Link Here 
  void parsePSImageableArea(GList *tokens, GString *fileName, int line);
  void parsePSImageableArea(GList *tokens, GString *fileName, int line);
  void parsePSLevel(GList *tokens, GString *fileName, int line);
  void parsePSLevel(GList *tokens, GString *fileName, int line);
  void parsePSFont(GList *tokens, GString *fileName, int line);
  void parsePSFont(GList *tokens, GString *fileName, int line);
  void parsePSFont16(char *cmdName, GList *fontList,
  void parsePSFont16(const char *cmdName, GList *fontList,
		     GList *tokens, GString *fileName, int line);
		     GList *tokens, GString *fileName, int line);
  void parseTextEncoding(GList *tokens, GString *fileName, int line);
  void parseTextEncoding(GList *tokens, GString *fileName, int line);
  void parseTextEOL(GList *tokens, GString *fileName, int line);
  void parseTextEOL(GList *tokens, GString *fileName, int line);
 Lines 390-410    Link Here 
  void parseUnbind(GList *tokens, GString *fileName, int line);
  void parseUnbind(GList *tokens, GString *fileName, int line);
  GBool parseKey(GString *modKeyStr, GString *contextStr,
  GBool parseKey(GString *modKeyStr, GString *contextStr,
		 int *code, int *mods, int *context,
		 int *code, int *mods, int *context,
		 char *cmdName,
		 const char *cmdName,
		 GList *tokens, GString *fileName, int line);
		 GList *tokens, GString *fileName, int line);
#endif
#endif
  void parseCommand(char *cmdName, GString **val,
  void parseCommand(const char *cmdName, GString **val,
		    GList *tokens, GString *fileName, int line);
		    GList *tokens, GString *fileName, int line);
  void parseYesNo(char *cmdName, GBool *flag,
  void parseYesNo(const char *cmdName, GBool *flag,
		  GList *tokens, GString *fileName, int line);
		  GList *tokens, GString *fileName, int line);
  GBool parseYesNo2(char *token, GBool *flag);
  GBool parseYesNo2(const char *token, GBool *flag);
  void parseInteger(char *cmdName, int *val,
  void parseInteger(const char *cmdName, int *val,
		    GList *tokens, GString *fileName, int line);
		    GList *tokens, GString *fileName, int line);
  void parseFloat(char *cmdName, double *val,
  void parseFloat(const char *cmdName, double *val,
		  GList *tokens, GString *fileName, int line);
		  GList *tokens, GString *fileName, int line);
  UnicodeMap *getUnicodeMap2(GString *encodingName);
  UnicodeMap *getUnicodeMap2(GString *encodingName);
#ifdef ENABLE_PLUGINS
#ifdef ENABLE_PLUGINS
  GBool loadPlugin(char *type, char *name);
  GBool loadPlugin(const char *type, const char *name);
#endif
#endif
  //----- static tables
  //----- static tables
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Link.cc (-1 / +1 lines)
 Lines 626-632    Link Here 
// LinkUnknown
// LinkUnknown
//------------------------------------------------------------------------
//------------------------------------------------------------------------
LinkUnknown::LinkUnknown(char *actionA) {
LinkUnknown::LinkUnknown(const char *actionA) {
  action = new GString(actionA);
  action = new GString(actionA);
}
}
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Link.h (-1 / +1 lines)
 Lines 284-290    Link Here 
public:
public:
  // Build a LinkUnknown with the specified action type.
  // Build a LinkUnknown with the specified action type.
  LinkUnknown(char *actionA);
  LinkUnknown(const char *actionA);
  // Destructor.
  // Destructor.
  virtual ~LinkUnknown();
  virtual ~LinkUnknown();
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.cc (-6 / +6 lines)
 Lines 19-25    Link Here 
//------------------------------------------------------------------------
//------------------------------------------------------------------------
struct NameToCharCodeEntry {
struct NameToCharCodeEntry {
  char *name;
  const char *name;
  CharCode c;
  CharCode c;
};
};
 Lines 41-53    Link Here 
  for (i = 0; i < size; ++i) {
  for (i = 0; i < size; ++i) {
    if (tab[i].name) {
    if (tab[i].name) {
      gfree(tab[i].name);
      gfree(const_cast<char*>(tab[i].name));
    }
    }
  }
  }
  gfree(tab);
  gfree(tab);
}
}
void NameToCharCode::add(char *name, CharCode c) {
void NameToCharCode::add(const char *name, CharCode c) {
  NameToCharCodeEntry *oldTab;
  NameToCharCodeEntry *oldTab;
  int h, i, oldSize;
  int h, i, oldSize;
 Lines 89-95    Link Here 
  ++len;
  ++len;
}
}
CharCode NameToCharCode::lookup(char *name) {
CharCode NameToCharCode::lookup(const char *name) {
  int h;
  int h;
  h = hash(name);
  h = hash(name);
 Lines 104-111    Link Here 
  return 0;
  return 0;
}
}
int NameToCharCode::hash(char *name) {
int NameToCharCode::hash(const char *name) {
  char *p;
  const char *p;
  unsigned int h;
  unsigned int h;
  h = 0;
  h = 0;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.h (-3 / +3 lines)
 Lines 27-38    Link Here 
  NameToCharCode();
  NameToCharCode();
  ~NameToCharCode();
  ~NameToCharCode();
  void add(char *name, CharCode c);
  void add(const char *name, CharCode c);
  CharCode lookup(char *name);
  CharCode lookup(const char *name);
private:
private:
  int hash(char *name);
  int hash(const char *name);
  NameToCharCodeEntry *tab;
  NameToCharCodeEntry *tab;
  int size;
  int size;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/NameToUnicodeTable.h (-1 / +1 lines)
 Lines 8-14    Link Here 
static struct {
static struct {
  Unicode u;
  Unicode u;
  char *name;
  const char *name;
} nameToUnicodeTab[] = {
} nameToUnicodeTab[] = {
  {0x0021, "!"},
  {0x0021, "!"},
  {0x0023, "#"},
  {0x0023, "#"},
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Object.cc (-4 / +4 lines)
 Lines 24-30    Link Here 
// Object
// Object
//------------------------------------------------------------------------
//------------------------------------------------------------------------
char *objTypeNames[numObjTypes] = {
const char *objTypeNames[numObjTypes] = {
  "boolean",
  "boolean",
  "integer",
  "integer",
  "real",
  "real",
 Lines 112-118    Link Here 
    delete string;
    delete string;
    break;
    break;
  case objName:
  case objName:
    gfree(name);
    gfree(const_cast<char*>(name));
    break;
    break;
  case objArray:
  case objArray:
    if (!array->decRef()) {
    if (!array->decRef()) {
 Lines 130-136    Link Here 
    }
    }
    break;
    break;
  case objCmd:
  case objCmd:
    gfree(cmd);
    gfree(const_cast<char*>(cmd));
    break;
    break;
  default:
  default:
    break;
    break;
 Lines 141-147    Link Here 
  type = objNone;
  type = objNone;
}
}
char *Object::getTypeName() {
const char *Object::getTypeName() {
  return objTypeNames[type];
  return objTypeNames[type];
}
}
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Object.h (-25 / +25 lines)
 Lines 89-95    Link Here 
    { initObj(objReal); real = realA; return this; }
    { initObj(objReal); real = realA; return this; }
  Object *initString(GString *stringA)
  Object *initString(GString *stringA)
    { initObj(objString); string = stringA; return this; }
    { initObj(objString); string = stringA; return this; }
  Object *initName(char *nameA)
  Object *initName(const char *nameA)
    { initObj(objName); name = copyString(nameA); return this; }
    { initObj(objName); name = copyString(nameA); return this; }
  Object *initNull()
  Object *initNull()
    { initObj(objNull); return this; }
    { initObj(objNull); return this; }
 Lines 99-105    Link Here 
  Object *initStream(Stream *streamA);
  Object *initStream(Stream *streamA);
  Object *initRef(int numA, int genA)
  Object *initRef(int numA, int genA)
    { initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
    { initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
  Object *initCmd(char *cmdA)
  Object *initCmd(const char *cmdA)
    { initObj(objCmd); cmd = copyString(cmdA); return this; }
    { initObj(objCmd); cmd = copyString(cmdA); return this; }
  Object *initError()
  Object *initError()
    { initObj(objError); return this; }
    { initObj(objError); return this; }
 Lines 135-145    Link Here 
  GBool isNone() { return type == objNone; }
  GBool isNone() { return type == objNone; }
  // Special type checking.
  // Special type checking.
  GBool isName(char *nameA)
  GBool isName(const char *nameA)
    { return type == objName && !strcmp(name, nameA); }
    { return type == objName && !strcmp(name, nameA); }
  GBool isDict(char *dictType);
  GBool isDict(const char *dictType);
  GBool isStream(char *dictType);
  GBool isStream(const char *dictType);
  GBool isCmd(char *cmdA)
  GBool isCmd(const char *cmdA)
    { return type == objCmd && !strcmp(cmd, cmdA); }
    { return type == objCmd && !strcmp(cmd, cmdA); }
  // Accessors.  NB: these assume object is of correct type.
  // Accessors.  NB: these assume object is of correct type.
 Lines 148-161    Link Here 
  double getReal() { return real; }
  double getReal() { return real; }
  double getNum() { return type == objInt ? (double)intg : real; }
  double getNum() { return type == objInt ? (double)intg : real; }
  GString *getString() { return string; }
  GString *getString() { return string; }
  char *getName() { return name; }
  const char *getName() { return name; }
  Array *getArray() { return array; }
  Array *getArray() { return array; }
  Dict *getDict() { return dict; }
  Dict *getDict() { return dict; }
  Stream *getStream() { return stream; }
  Stream *getStream() { return stream; }
  Ref getRef() { return ref; }
  Ref getRef() { return ref; }
  int getRefNum() { return ref.num; }
  int getRefNum() { return ref.num; }
  int getRefGen() { return ref.gen; }
  int getRefGen() { return ref.gen; }
  char *getCmd() { return cmd; }
  const char *getCmd() { return cmd; }
  // Array accessors.
  // Array accessors.
  int arrayGetLength();
  int arrayGetLength();
 Lines 165-180    Link Here 
  // Dict accessors.
  // Dict accessors.
  int dictGetLength();
  int dictGetLength();
  void dictAdd(char *key, Object *val);
  void dictAdd(const char *key, Object *val);
  GBool dictIs(char *dictType);
  GBool dictIs(const char *dictType);
  Object *dictLookup(char *key, Object *obj);
  Object *dictLookup(const char *key, Object *obj);
  Object *dictLookupNF(char *key, Object *obj);
  Object *dictLookupNF(const char *key, Object *obj);
  char *dictGetKey(int i);
  const char *dictGetKey(int i);
  Object *dictGetVal(int i, Object *obj);
  Object *dictGetVal(int i, Object *obj);
  Object *dictGetValNF(int i, Object *obj);
  Object *dictGetValNF(int i, Object *obj);
  // Stream accessors.
  // Stream accessors.
  GBool streamIs(char *dictType);
  GBool streamIs(const char *dictType);
  void streamReset();
  void streamReset();
  void streamClose();
  void streamClose();
  int streamGetChar();
  int streamGetChar();
 Lines 185-191    Link Here 
  Dict *streamGetDict();
  Dict *streamGetDict();
  // Output.
  // Output.
  char *getTypeName();
  const char *getTypeName();
  void print(FILE *f = stdout);
  void print(FILE *f = stdout);
  // Memory testing.
  // Memory testing.
 Lines 199-210    Link Here 
    int intg;			//   integer
    int intg;			//   integer
    double real;		//   real
    double real;		//   real
    GString *string;		//   string
    GString *string;		//   string
    char *name;			//   name
    const char *name;		//   name
    Array *array;		//   array
    Array *array;		//   array
    Dict *dict;			//   dictionary
    Dict *dict;			//   dictionary
    Stream *stream;		//   stream
    Stream *stream;		//   stream
    Ref ref;			//   indirect reference
    Ref ref;			//   indirect reference
    char *cmd;			//   command
    const char *cmd;		//   command
  };
  };
#ifdef DEBUG_MEM
#ifdef DEBUG_MEM
 Lines 240-261    Link Here 
inline int Object::dictGetLength()
inline int Object::dictGetLength()
  { return dict->getLength(); }
  { return dict->getLength(); }
inline void Object::dictAdd(char *key, Object *val)
inline void Object::dictAdd(const char *key, Object *val)
  { dict->add(key, val); }
  { dict->add(key, val); }
inline GBool Object::dictIs(char *dictType)
inline GBool Object::dictIs(const char *dictType)
  { return dict->is(dictType); }
  { return dict->is(dictType); }
inline GBool Object::isDict(char *dictType)
inline GBool Object::isDict(const char *dictType)
  { return type == objDict && dictIs(dictType); }
  { return type == objDict && dictIs(dictType); }
inline Object *Object::dictLookup(char *key, Object *obj)
inline Object *Object::dictLookup(const char *key, Object *obj)
  { return dict->lookup(key, obj); }
  { return dict->lookup(key, obj); }
inline Object *Object::dictLookupNF(char *key, Object *obj)
inline Object *Object::dictLookupNF(const char *key, Object *obj)
  { return dict->lookupNF(key, obj); }
  { return dict->lookupNF(key, obj); }
inline char *Object::dictGetKey(int i)
inline const char *Object::dictGetKey(int i)
  { return dict->getKey(i); }
  { return dict->getKey(i); }
inline Object *Object::dictGetVal(int i, Object *obj)
inline Object *Object::dictGetVal(int i, Object *obj)
 Lines 270-279    Link Here 
#include "Stream.h"
#include "Stream.h"
inline GBool Object::streamIs(char *dictType)
inline GBool Object::streamIs(const char *dictType)
  { return stream->getDict()->is(dictType); }
  { return stream->getDict()->is(dictType); }
inline GBool Object::isStream(char *dictType)
inline GBool Object::isStream(const char *dictType)
  { return type == objStream && streamIs(dictType); }
  { return type == objStream && streamIs(dictType); }
inline void Object::streamReset()
inline void Object::streamReset()
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Page.cc (-1 / +1 lines)
 Lines 184-190    Link Here 
  resources.free();
  resources.free();
}
}
GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) {
GBool PageAttrs::readBox(Dict *dict, const char *key, PDFRectangle *box) {
  PDFRectangle tmp;
  PDFRectangle tmp;
  double t;
  double t;
  Object obj1, obj2;
  Object obj1, obj2;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Page.h (-1 / +1 lines)
 Lines 114-120    Link Here 
private:
private:
  GBool readBox(Dict *dict, char *key, PDFRectangle *box);
  GBool readBox(Dict *dict, const char *key, PDFRectangle *box);
  PDFRectangle mediaBox;
  PDFRectangle mediaBox;
  PDFRectangle cropBox;
  PDFRectangle cropBox;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.cc (-10 / +10 lines)
 Lines 85-91    Link Here 
  return buf;
  return buf;
}
}
GString *Stream::getPSFilter(int psLevel, char *indent) {
GString *Stream::getPSFilter(int psLevel, const char *indent) {
  return new GString();
  return new GString();
}
}
 Lines 133-139    Link Here 
  return str;
  return str;
}
}
Stream *Stream::makeFilter(char *name, Stream *str, Object *params) {
Stream *Stream::makeFilter(const char *name, Stream *str, Object *params) {
  int pred;			// parameters
  int pred;			// parameters
  int colors;
  int colors;
  int bits;
  int bits;
 Lines 878-884    Link Here 
  return buf;
  return buf;
}
}
GString *ASCIIHexStream::getPSFilter(int psLevel, char *indent) {
GString *ASCIIHexStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 2) {
  if (psLevel < 2) {
 Lines 959-965    Link Here 
  return b[index];
  return b[index];
}
}
GString *ASCII85Stream::getPSFilter(int psLevel, char *indent) {
GString *ASCII85Stream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 2) {
  if (psLevel < 2) {
 Lines 1145-1151    Link Here 
  return code;
  return code;
}
}
GString *LZWStream::getPSFilter(int psLevel, char *indent) {
GString *LZWStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 2 || pred) {
  if (psLevel < 2 || pred) {
 Lines 1186-1192    Link Here 
  eof = gFalse;
  eof = gFalse;
}
}
GString *RunLengthStream::getPSFilter(int psLevel, char *indent) {
GString *RunLengthStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 2) {
  if (psLevel < 2) {
 Lines 1834-1840    Link Here 
  return (inputBuf >> (inputBits - n)) & (0xffff >> (16 - n));
  return (inputBuf >> (inputBits - n)) & (0xffff >> (16 - n));
}
}
GString *CCITTFaxStream::getPSFilter(int psLevel, char *indent) {
GString *CCITTFaxStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  char s1[50];
  char s1[50];
 Lines 3289-3295    Link Here 
  return (c1 << 8) + c2;
  return (c1 << 8) + c2;
}
}
GString *DCTStream::getPSFilter(int psLevel, char *indent) {
GString *DCTStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 2) {
  if (psLevel < 2) {
 Lines 4051-4057    Link Here 
  return c;
  return c;
}
}
GString *FlateStream::getPSFilter(int psLevel, char *indent) {
GString *FlateStream::getPSFilter(int psLevel, const char *indent) {
  GString *s;
  GString *s;
  if (psLevel < 3 || pred) {
  if (psLevel < 3 || pred) {
 Lines 4466-4472    Link Here 
}
}
GBool ASCIIHexEncoder::fillBuf() {
GBool ASCIIHexEncoder::fillBuf() {
  static char *hex = "0123456789abcdef";
  static const char *hex = "0123456789abcdef";
  int c;
  int c;
  if (eof) {
  if (eof) {
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.h (-14 / +14 lines)
 Lines 154-160    Link Here 
  virtual void setPos(Guint pos, int dir = 0) = 0;
  virtual void setPos(Guint pos, int dir = 0) = 0;
  // Get PostScript command for the filter(s).
  // Get PostScript command for the filter(s).
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  // Does this stream type potentially contain non-printable chars?
  // Does this stream type potentially contain non-printable chars?
  virtual GBool isBinary(GBool last = gTrue) = 0;
  virtual GBool isBinary(GBool last = gTrue) = 0;
 Lines 185-191    Link Here 
private:
private:
  Stream *makeFilter(char *name, Stream *str, Object *params);
  Stream *makeFilter(const char *name, Stream *str, Object *params);
  int ref;			// reference count
  int ref;			// reference count
};
};
 Lines 440-446    Link Here 
  virtual int getChar()
  virtual int getChar()
    { int c = lookChar(); buf = EOF; return c; }
    { int c = lookChar(); buf = EOF; return c; }
  virtual int lookChar();
  virtual int lookChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 463-469    Link Here 
  virtual int getChar()
  virtual int getChar()
    { int ch = lookChar(); ++index; return ch; }
    { int ch = lookChar(); ++index; return ch; }
  virtual int lookChar();
  virtual int lookChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 489-495    Link Here 
  virtual int getChar();
  virtual int getChar();
  virtual int lookChar();
  virtual int lookChar();
  virtual int getRawChar();
  virtual int getRawChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 533-539    Link Here 
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
  virtual int lookChar()
  virtual int lookChar()
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 564-570    Link Here 
  virtual int getChar()
  virtual int getChar()
    { int c = lookChar(); buf = EOF; return c; }
    { int c = lookChar(); buf = EOF; return c; }
  virtual int lookChar();
  virtual int lookChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 637-643    Link Here 
  virtual void close();
  virtual void close();
  virtual int getChar();
  virtual int getChar();
  virtual int lookChar();
  virtual int lookChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
  Stream *getRawStream() { return str; }
  Stream *getRawStream() { return str; }
 Lines 740-746    Link Here 
  virtual int getChar();
  virtual int getChar();
  virtual int lookChar();
  virtual int lookChar();
  virtual int getRawChar();
  virtual int getRawChar();
  virtual GString *getPSFilter(int psLevel, char *indent);
  virtual GString *getPSFilter(int psLevel, const char *indent);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
private:
private:
 Lines 793-799    Link Here 
  virtual void reset() {}
  virtual void reset() {}
  virtual int getChar() { return EOF; }
  virtual int getChar() { return EOF; }
  virtual int lookChar() { return EOF; }
  virtual int lookChar() { return EOF; }
  virtual GString *getPSFilter(int psLevel, char *indent)  { return NULL; }
  virtual GString *getPSFilter(int psLevel, const char *indent)  { return NULL; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
};
};
 Lines 810-816    Link Here 
  virtual void reset();
  virtual void reset();
  virtual int getChar();
  virtual int getChar();
  virtual int lookChar();
  virtual int lookChar();
  virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; }
  virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; }
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isBinary(GBool last = gTrue);
  virtual GBool isEncoder() { return gTrue; }
  virtual GBool isEncoder() { return gTrue; }
 Lines 835-841    Link Here 
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
  virtual int lookChar()
  virtual int lookChar()
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
  virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; }
  virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
  virtual GBool isEncoder() { return gTrue; }
  virtual GBool isEncoder() { return gTrue; }
 Lines 865-871    Link Here 
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
  virtual int lookChar()
  virtual int lookChar()
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
  virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; }
  virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
  virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
  virtual GBool isEncoder() { return gTrue; }
  virtual GBool isEncoder() { return gTrue; }
 Lines 895-901    Link Here 
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
  virtual int lookChar()
  virtual int lookChar()
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
    { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
  virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; }
  virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; }
  virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
  virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
  virtual GBool isEncoder() { return gTrue; }
  virtual GBool isEncoder() { return gTrue; }
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.cc (-2 / +2 lines)
 Lines 121-127    Link Here 
#endif
#endif
}
}
UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA,
UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA,
		       UnicodeMapRange *rangesA, int lenA) {
		       UnicodeMapRange *rangesA, int lenA) {
  encodingName = new GString(encodingNameA);
  encodingName = new GString(encodingNameA);
  unicodeOut = unicodeOutA;
  unicodeOut = unicodeOutA;
 Lines 136-142    Link Here 
#endif
#endif
}
}
UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA,
UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA,
		       UnicodeMapFunc funcA) {
		       UnicodeMapFunc funcA) {
  encodingName = new GString(encodingNameA);
  encodingName = new GString(encodingNameA);
  unicodeOut = unicodeOutA;
  unicodeOut = unicodeOutA;
(-) texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.h (-2 / +2 lines)
 Lines 53-64    Link Here 
  static UnicodeMap *parse(GString *encodingNameA);
  static UnicodeMap *parse(GString *encodingNameA);
  // Create a resident UnicodeMap.
  // Create a resident UnicodeMap.
  UnicodeMap(char *encodingNameA, GBool unicodeOutA,
  UnicodeMap(const char *encodingNameA, GBool unicodeOutA,
	     UnicodeMapRange *rangesA, int lenA);
	     UnicodeMapRange *rangesA, int lenA);
  // Create a resident UnicodeMap that uses a function instead of a
  // Create a resident UnicodeMap that uses a function instead of a
  // list of ranges.
  // list of ranges.
  UnicodeMap(char *encodingNameA, GBool unicodeOutA,
  UnicodeMap(const char *encodingNameA, GBool unicodeOutA,
	     UnicodeMapFunc funcA);
	     UnicodeMapFunc funcA);
  ~UnicodeMap();
  ~UnicodeMap();