Back to index

tetex-bin  3.0
Public Member Functions | Private Member Functions | Private Attributes
GlobalParams Class Reference

#include <GlobalParams.h>

Collaboration diagram for GlobalParams:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GlobalParams (char *cfgFileName)
 GlobalParams ()
 ~GlobalParams ()
void setupBaseFonts (char *dir)
CharCode getMacRomanCharCode (char *charName)
Unicode mapNameToUnicode (char *charName)
UnicodeMapgetResidentUnicodeMap (GString *encodingName)
FILEgetUnicodeMapFile (GString *encodingName)
FILEfindCMapFile (GString *collection, GString *cMapName)
FILEfindToUnicodeFile (GString *name)
DisplayFontParamgetDisplayFont (GString *fontName)
DisplayFontParamgetDisplayCIDFont (GString *fontName, GString *collection)
GStringgetPSFile ()
int getPSPaperWidth ()
int getPSPaperHeight ()
void getPSImageableArea (int *llx, int *lly, int *urx, int *ury)
GBool getPSDuplex ()
GBool getPSCrop ()
GBool getPSExpandSmaller ()
GBool getPSShrinkLarger ()
GBool getPSCenter ()
PSLevel getPSLevel ()
PSFontParamgetPSFont (GString *fontName)
PSFontParamgetPSFont16 (GString *fontName, GString *collection, int wMode)
GBool getPSEmbedType1 ()
GBool getPSEmbedTrueType ()
GBool getPSEmbedCIDPostScript ()
GBool getPSEmbedCIDTrueType ()
GBool getPSOPI ()
GBool getPSASCIIHex ()
GStringgetTextEncodingName ()
EndOfLineKind getTextEOL ()
GBool getTextPageBreaks ()
GBool getTextKeepTinyChars ()
GStringfindFontFile (GString *fontName, char **exts)
GStringgetInitialZoom ()
GBool getEnableT1lib ()
GBool getEnableFreeType ()
GBool getAntialias ()
GStringgetURLCommand ()
GStringgetMovieCommand ()
GBool getMapNumericCharNames ()
GBool getPrintCommands ()
GBool getErrQuiet ()
CharCodeToUnicodegetCIDToUnicode (GString *collection)
CharCodeToUnicodegetUnicodeToUnicode (GString *fontName)
UnicodeMapgetUnicodeMap (GString *encodingName)
CMapgetCMap (GString *collection, GString *cMapName)
UnicodeMapgetTextEncoding ()
void addDisplayFont (DisplayFontParam *param)
void setPSFile (char *file)
GBool setPSPaperSize (char *size)
void setPSPaperWidth (int width)
void setPSPaperHeight (int height)
void setPSImageableArea (int llx, int lly, int urx, int ury)
void setPSDuplex (GBool duplex)
void setPSCrop (GBool crop)
void setPSExpandSmaller (GBool expand)
void setPSShrinkLarger (GBool shrink)
void setPSCenter (GBool center)
void setPSLevel (PSLevel level)
void setPSEmbedType1 (GBool embed)
void setPSEmbedTrueType (GBool embed)
void setPSEmbedCIDPostScript (GBool embed)
void setPSEmbedCIDTrueType (GBool embed)
void setPSOPI (GBool opi)
void setPSASCIIHex (GBool hex)
void setTextEncoding (char *encodingName)
GBool setTextEOL (char *s)
void setTextPageBreaks (GBool pageBreaks)
void setTextKeepTinyChars (GBool keep)
void setInitialZoom (char *s)
GBool setEnableT1lib (char *s)
GBool setEnableFreeType (char *s)
GBool setAntialias (char *s)
void setMapNumericCharNames (GBool map)
void setPrintCommands (GBool printCommandsA)
void setErrQuiet (GBool errQuietA)

Private Member Functions

void parseFile (GString *fileName, FILE *f)
void parseNameToUnicode (GList *tokens, GString *fileName, int line)
void parseCIDToUnicode (GList *tokens, GString *fileName, int line)
void parseUnicodeToUnicode (GList *tokens, GString *fileName, int line)
void parseUnicodeMap (GList *tokens, GString *fileName, int line)
void parseCMapDir (GList *tokens, GString *fileName, int line)
void parseToUnicodeDir (GList *tokens, GString *fileName, int line)
void parseDisplayFont (GList *tokens, GHash *fontHash, DisplayFontParamKind kind, GString *fileName, int line)
void parsePSFile (GList *tokens, GString *fileName, int line)
void parsePSPaperSize (GList *tokens, GString *fileName, int line)
void parsePSImageableArea (GList *tokens, GString *fileName, int line)
void parsePSLevel (GList *tokens, GString *fileName, int line)
void parsePSFont (GList *tokens, GString *fileName, int line)
void parsePSFont16 (char *cmdName, GList *fontList, GList *tokens, GString *fileName, int line)
void parseTextEncoding (GList *tokens, GString *fileName, int line)
void parseTextEOL (GList *tokens, GString *fileName, int line)
void parseFontDir (GList *tokens, GString *fileName, int line)
void parseInitialZoom (GList *tokens, GString *fileName, int line)
void parseCommand (char *cmdName, GString **val, GList *tokens, GString *fileName, int line)
void parseYesNo (char *cmdName, GBool *flag, GList *tokens, GString *fileName, int line)
GBool parseYesNo2 (char *token, GBool *flag)
UnicodeMapgetUnicodeMap2 (GString *encodingName)

Private Attributes

NameToCharCodemacRomanReverseMap
NameToCharCodenameToUnicode
GHashcidToUnicodes
GHashunicodeToUnicodes
GHashresidentUnicodeMaps
GHashunicodeMaps
GHashcMapDirs
GListtoUnicodeDirs
GHashdisplayFonts
GHashdisplayCIDFonts
GHashdisplayNamedCIDFonts
GStringpsFile
int psPaperWidth
int psPaperHeight
int psImageableLLX
int psImageableLLY
int psImageableURX
int psImageableURY
GBool psCrop
GBool psExpandSmaller
GBool psShrinkLarger
GBool psCenter
GBool psDuplex
PSLevel psLevel
GHashpsFonts
GListpsNamedFonts16
GListpsFonts16
GBool psEmbedType1
GBool psEmbedTrueType
GBool psEmbedCIDPostScript
GBool psEmbedCIDTrueType
GBool psOPI
GBool psASCIIHex
GStringtextEncoding
EndOfLineKind textEOL
GBool textPageBreaks
GBool textKeepTinyChars
GListfontDirs
GStringinitialZoom
GBool enableT1lib
GBool enableFreeType
GBool antialias
GStringurlCommand
GStringmovieCommand
GBool mapNumericCharNames
GBool printCommands
GBool errQuiet
CharCodeToUnicodeCachecidToUnicodeCache
CharCodeToUnicodeCacheunicodeToUnicodeCache
UnicodeMapCacheunicodeMapCache
CMapCachecMapCache

Detailed Description

Definition at line 109 of file GlobalParams.h.


Constructor & Destructor Documentation

GlobalParams::GlobalParams ( char *  cfgFileName)

Definition at line 271 of file GlobalParams.cc.

                                            {
  UnicodeMap *map;
  GString *fileName;
  FILE *f;
  int i;

#if MULTITHREADED
  gInitMutex(&mutex);
  gInitMutex(&unicodeMapCacheMutex);
  gInitMutex(&cMapCacheMutex);
#endif

  initBuiltinFontTables();

  // scan the encoding in reverse because we want the lowest-numbered
  // index for each char name ('space' is encoded twice)
  macRomanReverseMap = new NameToCharCode();
  for (i = 255; i >= 0; --i) {
    if (macRomanEncoding[i]) {
      macRomanReverseMap->add(macRomanEncoding[i], (CharCode)i);
    }
  }

  nameToUnicode = new NameToCharCode();
  cidToUnicodes = new GHash(gTrue);
  unicodeToUnicodes = new GHash(gTrue);
  residentUnicodeMaps = new GHash();
  unicodeMaps = new GHash(gTrue);
  cMapDirs = new GHash(gTrue);
  toUnicodeDirs = new GList();
  displayFonts = new GHash();
  displayCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
#if HAVE_PAPER_H
  char *paperName;
  const struct paper *paperType;
  paperinit();
  if ((paperName = systempapername())) {
    paperType = paperinfo(paperName);
    psPaperWidth = (int)paperpswidth(paperType);
    psPaperHeight = (int)paperpsheight(paperType);
  } else {
    error(-1, "No paper information available - using defaults");
    psPaperWidth = defPaperWidth;
    psPaperHeight = defPaperHeight;
  }
  paperdone();
#else
  psPaperWidth = defPaperWidth;
  psPaperHeight = defPaperHeight;
#endif
  psImageableLLX = psImageableLLY = 0;
  psImageableURX = psPaperWidth;
  psImageableURY = psPaperHeight;
  psCrop = gTrue;
  psExpandSmaller = gFalse;
  psShrinkLarger = gTrue;
  psCenter = gTrue;
  psDuplex = gFalse;
  psLevel = psLevel2;
  psFile = NULL;
  psFonts = new GHash();
  psNamedFonts16 = new GList();
  psFonts16 = new GList();
  psEmbedType1 = gTrue;
  psEmbedTrueType = gTrue;
  psEmbedCIDPostScript = gTrue;
  psEmbedCIDTrueType = gTrue;
  psOPI = gFalse;
  psASCIIHex = gFalse;
  textEncoding = new GString("Latin1");
#if defined(WIN32)
  textEOL = eolDOS;
#elif defined(MACOS)
  textEOL = eolMac;
#else
  textEOL = eolUnix;
#endif
  textPageBreaks = gTrue;
  textKeepTinyChars = gFalse;
  fontDirs = new GList();
  initialZoom = new GString("125");
  enableT1lib = gTrue;
  enableFreeType = gTrue;
  antialias = gTrue;
  urlCommand = NULL;
  movieCommand = NULL;
  mapNumericCharNames = gTrue;
  printCommands = gFalse;
  errQuiet = gFalse;

  cidToUnicodeCache = new CharCodeToUnicodeCache(cidToUnicodeCacheSize);
  unicodeToUnicodeCache =
      new CharCodeToUnicodeCache(unicodeToUnicodeCacheSize);
  unicodeMapCache = new UnicodeMapCache();
  cMapCache = new CMapCache();

  // set up the initial nameToUnicode table
  for (i = 0; nameToUnicodeTab[i].name; ++i) {
    nameToUnicode->add(nameToUnicodeTab[i].name, nameToUnicodeTab[i].u);
  }

  // set up the residentUnicodeMaps table
  map = new UnicodeMap("Latin1", gFalse,
                     latin1UnicodeMapRanges, latin1UnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("ASCII7", gFalse,
                     ascii7UnicodeMapRanges, ascii7UnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("Symbol", gFalse,
                     symbolUnicodeMapRanges, symbolUnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("ZapfDingbats", gFalse, zapfDingbatsUnicodeMapRanges,
                     zapfDingbatsUnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("UTF-8", gTrue, &mapUTF8);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("UCS-2", gTrue, &mapUCS2);
  residentUnicodeMaps->add(map->getEncodingName(), map);

  // look for a user config file, then a system-wide config file
  f = NULL;
  fileName = NULL;
  if (cfgFileName && cfgFileName[0]) {
    fileName = new GString(cfgFileName);
    if (!(f = fopen(fileName->getCString(), "r"))) {
      delete fileName;
    }
  }
  if (!f) {
    fileName = appendToPath(getHomeDir(), xpdfUserConfigFile);
    if (!(f = fopen(fileName->getCString(), "r"))) {
      delete fileName;
    }
  }
  if (!f) {
#if defined(WIN32) && !defined(__CYGWIN32__)
    char buf[512];
    i = GetModuleFileName(NULL, buf, sizeof(buf));
    if (i <= 0 || i >= sizeof(buf)) {
      // error or path too long for buffer - just use the current dir
      buf[0] = '\0';
    }
    fileName = grabPath(buf);
    appendToPath(fileName, xpdfSysConfigFile);
#else
    fileName = new GString(xpdfSysConfigFile);
#endif
    if (!(f = fopen(fileName->getCString(), "r"))) {
      delete fileName;
    }
  }
  if (f) {
    parseFile(fileName, f);
    delete fileName;
    fclose(f);
  }
}

Here is the call graph for this function:

Definition at line 152 of file GlobalParams.cc.

                           {
  UnicodeMap *map;
  int i;

#if MULTITHREADED
  gInitMutex(&mutex);
  gInitMutex(&unicodeMapCacheMutex);
  gInitMutex(&cMapCacheMutex);
#endif

  initBuiltinFontTables();

  // scan the encoding in reverse because we want the lowest-numbered
  // index for each char name ('space' is encoded twice)
  macRomanReverseMap = new NameToCharCode();
  for (i = 255; i >= 0; --i) {
    if (macRomanEncoding[i]) {
      macRomanReverseMap->add(macRomanEncoding[i], (CharCode)i);
    }
  }

  nameToUnicode = new NameToCharCode();
  cidToUnicodes = new GHash(gTrue);
  unicodeToUnicodes = new GHash(gTrue);
  residentUnicodeMaps = new GHash();
  unicodeMaps = new GHash(gTrue);
  cMapDirs = new GHash(gTrue);
  toUnicodeDirs = new GList();
  displayFonts = new GHash();
  displayCIDFonts = new GHash();
  displayNamedCIDFonts = new GHash();
#if HAVE_PAPER_H
  char *paperName;
  const struct paper *paperType;
  paperinit();
  if ((paperName = systempapername())) {
    paperType = paperinfo(paperName);
    psPaperWidth = (int)paperpswidth(paperType);
    psPaperHeight = (int)paperpsheight(paperType);
  } else {
    error(-1, "No paper information available - using defaults");
    psPaperWidth = defPaperWidth;
    psPaperHeight = defPaperHeight;
  }
  paperdone();
#else
  psPaperWidth = defPaperWidth;
  psPaperHeight = defPaperHeight;
#endif
  psImageableLLX = psImageableLLY = 0;
  psImageableURX = psPaperWidth;
  psImageableURY = psPaperHeight;
  psCrop = gTrue;
  psExpandSmaller = gFalse;
  psShrinkLarger = gTrue;
  psCenter = gTrue;
  psDuplex = gFalse;
  psLevel = psLevel2;
  psFile = NULL;
  psFonts = new GHash();
  psNamedFonts16 = new GList();
  psFonts16 = new GList();
  psEmbedType1 = gTrue;
  psEmbedTrueType = gTrue;
  psEmbedCIDPostScript = gTrue;
  psEmbedCIDTrueType = gTrue;
  psOPI = gFalse;
  psASCIIHex = gFalse;
  textEncoding = new GString("Latin1");
#if defined(WIN32)
  textEOL = eolDOS;
#elif defined(MACOS)
  textEOL = eolMac;
#else
  textEOL = eolUnix;
#endif
  textPageBreaks = gTrue;
  textKeepTinyChars = gFalse;
  fontDirs = new GList();
  initialZoom = new GString("125");
  enableT1lib = gTrue;
  enableFreeType = gTrue;
  antialias = gTrue;
  urlCommand = NULL;
  movieCommand = NULL;
  mapNumericCharNames = gTrue;
  printCommands = gFalse;
  errQuiet = gFalse;

  cidToUnicodeCache = new CharCodeToUnicodeCache(cidToUnicodeCacheSize);
  unicodeToUnicodeCache =
      new CharCodeToUnicodeCache(unicodeToUnicodeCacheSize);
  unicodeMapCache = new UnicodeMapCache();
  cMapCache = new CMapCache();

  // set up the initial nameToUnicode table
  for (i = 0; nameToUnicodeTab[i].name; ++i) {
    nameToUnicode->add(nameToUnicodeTab[i].name, nameToUnicodeTab[i].u);
  }

  // set up the residentUnicodeMaps table
  map = new UnicodeMap("Latin1", gFalse,
                     latin1UnicodeMapRanges, latin1UnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("ASCII7", gFalse,
                     ascii7UnicodeMapRanges, ascii7UnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("Symbol", gFalse,
                     symbolUnicodeMapRanges, symbolUnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("ZapfDingbats", gFalse, zapfDingbatsUnicodeMapRanges,
                     zapfDingbatsUnicodeMapLen);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("UTF-8", gTrue, &mapUTF8);
  residentUnicodeMaps->add(map->getEncodingName(), map);
  map = new UnicodeMap("UCS-2", gTrue, &mapUCS2);
  residentUnicodeMaps->add(map->getEncodingName(), map);
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 1549 of file GlobalParams.cc.

                                                         {
  DisplayFontParam *old;

  lockGlobalParams;
  if ((old = (DisplayFontParam *)displayFonts->remove(param->name))) {
    delete old;
  }
  displayFonts->add(param->name, param);
  unlockGlobalParams;
}

Here is the call graph for this function:

Here is the caller graph for this function:

FILE * GlobalParams::findCMapFile ( GString collection,
GString cMapName 
)

Definition at line 1098 of file GlobalParams.cc.

                                                                       {
  GList *list;
  GString *dir;
  GString *fileName;
  FILE *f;
  int i;

  lockGlobalParams;
  if (!(list = (GList *)cMapDirs->lookup(collection))) {
    unlockGlobalParams;
    return NULL;
  }
  for (i = 0; i < list->getLength(); ++i) {
    dir = (GString *)list->get(i);
    fileName = appendToPath(dir->copy(), cMapName->getCString());
    f = fopen(fileName->getCString(), "r");
    delete fileName;
    if (f) {
      unlockGlobalParams;
      return f;
    }
  }
  unlockGlobalParams;
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

GString * GlobalParams::findFontFile ( GString fontName,
char **  exts 
)

Definition at line 1386 of file GlobalParams.cc.

                                                                  {
  GString *dir, *fileName;
  char **ext;
  FILE *f;
  int i;

  lockGlobalParams;
  for (i = 0; i < fontDirs->getLength(); ++i) {
    dir = (GString *)fontDirs->get(i);
    for (ext = exts; *ext; ++ext) {
      fileName = appendToPath(dir->copy(), fontName->getCString());
      fileName->append(*ext);
      if ((f = fopen(fileName->getCString(), "rb"))) {
       fclose(f);
       unlockGlobalParams;
       return fileName;
      }
      delete fileName;
    }
  }
  unlockGlobalParams;
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1124 of file GlobalParams.cc.

                                                   {
  GString *dir, *fileName;
  FILE *f;
  int i;

  lockGlobalParams;
  for (i = 0; i < toUnicodeDirs->getLength(); ++i) {
    dir = (GString *)toUnicodeDirs->get(i);
    fileName = appendToPath(dir->copy(), name->getCString());
    f = fopen(fileName->getCString(), "r");
    delete fileName;
    if (f) {
      unlockGlobalParams;
      return f;
    }
  }
  unlockGlobalParams;
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1438 of file GlobalParams.cc.

Definition at line 1474 of file GlobalParams.cc.

                                                                    {
  GString *fileName;
  CharCodeToUnicode *ctu;

  lockGlobalParams;
  if (!(ctu = cidToUnicodeCache->getCharCodeToUnicode(collection))) {
    if ((fileName = (GString *)cidToUnicodes->lookup(collection)) &&
       (ctu = CharCodeToUnicode::parseCIDToUnicode(fileName, collection))) {
      cidToUnicodeCache->add(ctu);
    }
  }
  unlockGlobalParams;
  return ctu;
}

Here is the call graph for this function:

Here is the caller graph for this function:

CMap * GlobalParams::getCMap ( GString collection,
GString cMapName 
)

Definition at line 1532 of file GlobalParams.cc.

                                                                  {
  CMap *cMap;

  lockCMapCache;
  cMap = cMapCache->getCMap(collection, cMapName);
  unlockCMapCache;
  return cMap;
}

Here is the call graph for this function:

Here is the caller graph for this function:

DisplayFontParam * GlobalParams::getDisplayCIDFont ( GString fontName,
GString collection 
)

Definition at line 1153 of file GlobalParams.cc.

                                                                 {
  DisplayFontParam *dfp;

  lockGlobalParams;
  if (!fontName ||
      !(dfp = (DisplayFontParam *)displayNamedCIDFonts->lookup(fontName))) {
    dfp = (DisplayFontParam *)displayCIDFonts->lookup(collection);
  }
  unlockGlobalParams;
  return dfp;
}

Here is the call graph for this function:

Definition at line 1144 of file GlobalParams.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1428 of file GlobalParams.cc.

Definition at line 1419 of file GlobalParams.cc.

Definition at line 1465 of file GlobalParams.cc.

Here is the caller graph for this function:

Definition at line 1410 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1062 of file GlobalParams.cc.

                                                         {
  // no need to lock - macRomanReverseMap is constant
  return macRomanReverseMap->lookup(charName);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1447 of file GlobalParams.cc.

Here is the caller graph for this function:

Definition at line 160 of file GlobalParams.h.

{ return movieCommand; }

Definition at line 1456 of file GlobalParams.cc.

Here is the caller graph for this function:

Definition at line 1341 of file GlobalParams.cc.

Definition at line 1229 of file GlobalParams.cc.

Definition at line 1202 of file GlobalParams.cc.

Definition at line 1238 of file GlobalParams.cc.

Definition at line 1314 of file GlobalParams.cc.

Definition at line 1323 of file GlobalParams.cc.

Definition at line 1305 of file GlobalParams.cc.

Definition at line 1296 of file GlobalParams.cc.

Definition at line 1211 of file GlobalParams.cc.

Definition at line 1166 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1256 of file GlobalParams.cc.

Here is the call graph for this function:

PSFontParam * GlobalParams::getPSFont16 ( GString fontName,
GString collection,
int  wMode 
)

Definition at line 1265 of file GlobalParams.cc.

                                                                   {
  PSFontParam *p;
  int i;

  lockGlobalParams;
  p = NULL;
  if (fontName) {
    for (i = 0; i < psNamedFonts16->getLength(); ++i) {
      p = (PSFontParam *)psNamedFonts16->get(i);
      if (!p->pdfFontName->cmp(fontName) &&
         p->wMode == wMode) {
       break;
      }
      p = NULL;
    }
  }
  if (!p && collection) {
    for (i = 0; i < psFonts16->getLength(); ++i) {
      p = (PSFontParam *)psFonts16->get(i);
      if (!p->pdfFontName->cmp(collection) &&
         p->wMode == wMode) {
       break;
      }
      p = NULL;
    }
  }
  unlockGlobalParams;
  return p;
}

Here is the call graph for this function:

void GlobalParams::getPSImageableArea ( int llx,
int lly,
int urx,
int ury 
)

Definition at line 1247 of file GlobalParams.cc.

Definition at line 1332 of file GlobalParams.cc.

                             {
  GBool opi;

  lockGlobalParams;
  opi = psOPI;
  unlockGlobalParams;
  return opi;
}

Definition at line 1184 of file GlobalParams.cc.

Definition at line 1175 of file GlobalParams.cc.

Definition at line 1220 of file GlobalParams.cc.

Definition at line 1072 of file GlobalParams.cc.

                                                                     {
  UnicodeMap *map;

  lockGlobalParams;
  map = (UnicodeMap *)residentUnicodeMaps->lookup(encodingName);
  unlockGlobalParams;
  if (map) {
    map->incRefCnt();
  }
  return map;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1541 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1350 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1359 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1377 of file GlobalParams.cc.

                                         {
  GBool tiny;

  lockGlobalParams;
  tiny = textKeepTinyChars;
  unlockGlobalParams;
  return tiny;
}

Definition at line 1368 of file GlobalParams.cc.

                                      {
  GBool pageBreaks;

  lockGlobalParams;
  pageBreaks = textPageBreaks;
  unlockGlobalParams;
  return pageBreaks;
}

Definition at line 1517 of file GlobalParams.cc.

                                                             {
  return getUnicodeMap2(encodingName);
}

Here is the call graph for this function:

UnicodeMap * GlobalParams::getUnicodeMap2 ( GString encodingName) [private]

Definition at line 1521 of file GlobalParams.cc.

                                                              {
  UnicodeMap *map;

  if (!(map = getResidentUnicodeMap(encodingName))) {
    lockUnicodeMapCache;
    map = unicodeMapCache->getUnicodeMap(encodingName);
    unlockUnicodeMapCache;
  }
  return map;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1084 of file GlobalParams.cc.

                                                           {
  GString *fileName;
  FILE *f;

  lockGlobalParams;
  if ((fileName = (GString *)unicodeMaps->lookup(encodingName))) {
    f = fopen(fileName->getCString(), "r");
  } else {
    f = NULL;
  }
  unlockGlobalParams;
  return f;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1489 of file GlobalParams.cc.

                                                                      {
  CharCodeToUnicode *ctu;
  GHashIter *iter;
  GString *fontPattern, *fileName;

  lockGlobalParams;
  fileName = NULL;
  unicodeToUnicodes->startIter(&iter);
  while (unicodeToUnicodes->getNext(&iter, &fontPattern, (void **)&fileName)) {
    if (strstr(fontName->getCString(), fontPattern->getCString())) {
      unicodeToUnicodes->killIter(&iter);
      break;
    }
    fileName = NULL;
  }
  if (fileName) {
    if (!(ctu = unicodeToUnicodeCache->getCharCodeToUnicode(fileName))) {
      if ((ctu = CharCodeToUnicode::parseUnicodeToUnicode(fileName))) {
       unicodeToUnicodeCache->add(ctu);
      }
    }
  } else {
    ctu = NULL;
  }
  unlockGlobalParams;
  return ctu;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 159 of file GlobalParams.h.

{ return urlCommand; }

Definition at line 1067 of file GlobalParams.cc.

                                                     {
  // no need to lock - nameToUnicode is constant
  return nameToUnicode->lookup(charName);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseCIDToUnicode ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 632 of file GlobalParams.cc.

                                           {
  GString *collection, *name, *old;

  if (tokens->getLength() != 3) {
    error(-1, "Bad 'cidToUnicode' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  collection = (GString *)tokens->get(1);
  name = (GString *)tokens->get(2);
  if ((old = (GString *)cidToUnicodes->remove(collection))) {
    delete old;
  }
  cidToUnicodes->add(collection->copy(), name->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseCMapDir ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 683 of file GlobalParams.cc.

                                                                          {
  GString *collection, *dir;
  GList *list;

  if (tokens->getLength() != 3) {
    error(-1, "Bad 'cMapDir' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  collection = (GString *)tokens->get(1);
  dir = (GString *)tokens->get(2);
  if (!(list = (GList *)cMapDirs->lookup(collection))) {
    list = new GList();
    cMapDirs->add(collection->copy(), list);
  }
  list->append(dir->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseCommand ( char *  cmdName,
GString **  val,
GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 918 of file GlobalParams.cc.

                                                                        {
  if (tokens->getLength() != 2) {
    error(-1, "Bad '%s' config file command (%s:%d)",
         cmdName, fileName->getCString(), line);
    return;
  }
  if (*val) {
    delete *val;
  }
  *val = ((GString *)tokens->get(1))->copy();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseDisplayFont ( GList tokens,
GHash fontHash,
DisplayFontParamKind  kind,
GString fileName,
int  line 
) [private]

Definition at line 711 of file GlobalParams.cc.

                                                             {
  DisplayFontParam *param, *old;

  if (tokens->getLength() < 2) {
    goto err1;
  }
  param = new DisplayFontParam(((GString *)tokens->get(1))->copy(), kind);
  
  switch (kind) {
  case displayFontT1:
    if (tokens->getLength() != 3) {
      goto err2;
    }
    param->t1.fileName = ((GString *)tokens->get(2))->copy();
    break;
  case displayFontTT:
    if (tokens->getLength() != 3) {
      goto err2;
    }
    param->tt.fileName = ((GString *)tokens->get(2))->copy();
    break;
  }

  if ((old = (DisplayFontParam *)fontHash->remove(param->name))) {
    delete old;
  }
  fontHash->add(param->name, param);
  return;

 err2:
  delete param;
 err1:
  error(-1, "Bad 'display*Font*' config file command (%s:%d)",
       fileName->getCString(), line);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseFile ( GString fileName,
FILE f 
) [private]

Definition at line 430 of file GlobalParams.cc.

                                                       {
  int line;
  GList *tokens;
  GString *cmd, *incFile;
  char *p1, *p2;
  char buf[512];
  FILE *f2;

  line = 1;
  while (getLine(buf, sizeof(buf) - 1, f)) {

    // break the line into tokens
    tokens = new GList();
    p1 = buf;
    while (*p1) {
      for (; *p1 && isspace(*p1); ++p1) ;
      if (!*p1) {
       break;
      }
      if (*p1 == '"' || *p1 == '\'') {
       for (p2 = p1 + 1; *p2 && *p2 != *p1; ++p2) ;
       ++p1;
      } else {
       for (p2 = p1 + 1; *p2 && !isspace(*p2); ++p2) ;
      }
      tokens->append(new GString(p1, p2 - p1));
      p1 = *p2 ? p2 + 1 : p2;
    }

    if (tokens->getLength() > 0 &&
       ((GString *)tokens->get(0))->getChar(0) != '#') {
      cmd = (GString *)tokens->get(0);
      if (!cmd->cmp("include")) {
       if (tokens->getLength() == 2) {
         incFile = (GString *)tokens->get(1);
         if ((f2 = fopen(incFile->getCString(), "r"))) {
           parseFile(incFile, f2);
           fclose(f2);
         } else {
           error(-1, "Couldn't find included config file: '%s' (%s:%d)",
                incFile->getCString(), fileName->getCString(), line);
         }
       } else {
         error(-1, "Bad 'include' config file command (%s:%d)",
              fileName->getCString(), line);
       }
      } else if (!cmd->cmp("nameToUnicode")) {
       parseNameToUnicode(tokens, fileName, line);
      } else if (!cmd->cmp("cidToUnicode")) {
       parseCIDToUnicode(tokens, fileName, line);
      } else if (!cmd->cmp("unicodeToUnicode")) {
       parseUnicodeToUnicode(tokens, fileName, line);
      } else if (!cmd->cmp("unicodeMap")) {
       parseUnicodeMap(tokens, fileName, line);
      } else if (!cmd->cmp("cMapDir")) {
       parseCMapDir(tokens, fileName, line);
      } else if (!cmd->cmp("toUnicodeDir")) {
       parseToUnicodeDir(tokens, fileName, line);
      } else if (!cmd->cmp("displayFontT1")) {
       parseDisplayFont(tokens, displayFonts, displayFontT1, fileName, line);
      } else if (!cmd->cmp("displayFontTT")) {
       parseDisplayFont(tokens, displayFonts, displayFontTT, fileName, line);
      } else if (!cmd->cmp("displayNamedCIDFontT1")) {
       parseDisplayFont(tokens, displayNamedCIDFonts,
                      displayFontT1, fileName, line);
      } else if (!cmd->cmp("displayCIDFontT1")) {
       parseDisplayFont(tokens, displayCIDFonts,
                      displayFontT1, fileName, line);
      } else if (!cmd->cmp("displayNamedCIDFontTT")) {
       parseDisplayFont(tokens, displayNamedCIDFonts,
                      displayFontTT, fileName, line);
      } else if (!cmd->cmp("displayCIDFontTT")) {
       parseDisplayFont(tokens, displayCIDFonts,
                      displayFontTT, fileName, line);
      } else if (!cmd->cmp("psFile")) {
       parsePSFile(tokens, fileName, line);
      } else if (!cmd->cmp("psFont")) {
       parsePSFont(tokens, fileName, line);
      } else if (!cmd->cmp("psNamedFont16")) {
       parsePSFont16("psNamedFont16", psNamedFonts16,
                    tokens, fileName, line);
      } else if (!cmd->cmp("psFont16")) {
       parsePSFont16("psFont16", psFonts16, tokens, fileName, line);
      } else if (!cmd->cmp("psPaperSize")) {
       parsePSPaperSize(tokens, fileName, line);
      } else if (!cmd->cmp("psImageableArea")) {
       parsePSImageableArea(tokens, fileName, line);
      } else if (!cmd->cmp("psCrop")) {
       parseYesNo("psCrop", &psCrop, tokens, fileName, line);
      } else if (!cmd->cmp("psExpandSmaller")) {
       parseYesNo("psExpandSmaller", &psExpandSmaller,
                 tokens, fileName, line);
      } else if (!cmd->cmp("psShrinkLarger")) {
       parseYesNo("psShrinkLarger", &psShrinkLarger, tokens, fileName, line);
      } else if (!cmd->cmp("psCenter")) {
       parseYesNo("psCenter", &psCenter, tokens, fileName, line);
      } else if (!cmd->cmp("psDuplex")) {
       parseYesNo("psDuplex", &psDuplex, tokens, fileName, line);
      } else if (!cmd->cmp("psLevel")) {
       parsePSLevel(tokens, fileName, line);
      } else if (!cmd->cmp("psEmbedType1Fonts")) {
       parseYesNo("psEmbedType1", &psEmbedType1, tokens, fileName, line);
      } else if (!cmd->cmp("psEmbedTrueTypeFonts")) {
       parseYesNo("psEmbedTrueType", &psEmbedTrueType,
                 tokens, fileName, line);
      } else if (!cmd->cmp("psEmbedCIDPostScriptFonts")) {
       parseYesNo("psEmbedCIDPostScript", &psEmbedCIDPostScript,
                 tokens, fileName, line);
      } else if (!cmd->cmp("psEmbedCIDTrueTypeFonts")) {
       parseYesNo("psEmbedCIDTrueType", &psEmbedCIDTrueType,
                 tokens, fileName, line);
      } else if (!cmd->cmp("psOPI")) {
       parseYesNo("psOPI", &psOPI, tokens, fileName, line);
      } else if (!cmd->cmp("psASCIIHex")) {
       parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line);
      } else if (!cmd->cmp("textEncoding")) {
       parseTextEncoding(tokens, fileName, line);
      } else if (!cmd->cmp("textEOL")) {
       parseTextEOL(tokens, fileName, line);
      } else if (!cmd->cmp("textPageBreaks")) {
       parseYesNo("textPageBreaks", &textPageBreaks,
                 tokens, fileName, line);
      } else if (!cmd->cmp("textKeepTinyChars")) {
       parseYesNo("textKeepTinyChars", &textKeepTinyChars,
                 tokens, fileName, line);
      } else if (!cmd->cmp("fontDir")) {
       parseFontDir(tokens, fileName, line);
      } else if (!cmd->cmp("initialZoom")) {
       parseInitialZoom(tokens, fileName, line);
      } else if (!cmd->cmp("enableT1lib")) {
       parseYesNo("enableT1lib", &enableT1lib, tokens, fileName, line);
      } else if (!cmd->cmp("enableFreeType")) {
       parseYesNo("enableFreeType", &enableFreeType, tokens, fileName, line);
      } else if (!cmd->cmp("antialias")) {
       parseYesNo("antialias", &antialias, tokens, fileName, line);
      } else if (!cmd->cmp("urlCommand")) {
       parseCommand("urlCommand", &urlCommand, tokens, fileName, line);
      } else if (!cmd->cmp("movieCommand")) {
       parseCommand("movieCommand", &movieCommand, tokens, fileName, line);
      } else if (!cmd->cmp("mapNumericCharNames")) {
       parseYesNo("mapNumericCharNames", &mapNumericCharNames,
                 tokens, fileName, line);
      } else if (!cmd->cmp("printCommands")) {
       parseYesNo("printCommands", &printCommands, tokens, fileName, line);
      } else if (!cmd->cmp("errQuiet")) {
       parseYesNo("errQuiet", &errQuiet, tokens, fileName, line);
      } else {
       error(-1, "Unknown config file command '%s' (%s:%d)",
             cmd->getCString(), fileName->getCString(), line);
       if (!cmd->cmp("displayFontX") ||
           !cmd->cmp("displayNamedCIDFontX") ||
           !cmd->cmp("displayCIDFontX")) {
         error(-1, "-- Xpdf no longer supports X fonts");
       } else if (!cmd->cmp("t1libControl") || !cmd->cmp("freetypeControl")) {
         error(-1, "-- The t1libControl and freetypeControl options have been replaced");
         error(-1, "   by the enableT1lib, enableFreeType, and antialias options");
       } else if (!cmd->cmp("fontpath") || !cmd->cmp("fontmap")) {
         error(-1, "-- the config file format has changed since Xpdf 0.9x");
       }
      }
    }

    deleteGList(tokens, GString);
    ++line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseFontDir ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 898 of file GlobalParams.cc.

                                                                          {
  if (tokens->getLength() != 2) {
    error(-1, "Bad 'fontDir' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  fontDirs->append(((GString *)tokens->get(1))->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseInitialZoom ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 907 of file GlobalParams.cc.

                                                             {
  if (tokens->getLength() != 2) {
    error(-1, "Bad 'initialZoom' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  delete initialZoom;
  initialZoom = ((GString *)tokens->get(1))->copy();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseNameToUnicode ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 597 of file GlobalParams.cc.

                                              {
  GString *name;
  char *tok1, *tok2;
  FILE *f;
  char buf[256];
  int line2;
  Unicode u;

  if (tokens->getLength() != 2) {
    error(-1, "Bad 'nameToUnicode' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  name = (GString *)tokens->get(1);
  if (!(f = fopen(name->getCString(), "r"))) {
    error(-1, "Couldn't open 'nameToUnicode' file '%s'",
         name->getCString());
    return;
  }
  line2 = 1;
  while (getLine(buf, sizeof(buf), f)) {
    tok1 = strtok(buf, " \t\r\n");
    tok2 = strtok(NULL, " \t\r\n");
    if (tok1 && tok2) {
      sscanf(tok1, "%x", &u);
      nameToUnicode->add(tok2, u);
    } else {
      error(-1, "Bad line in 'nameToUnicode' file (%s:%d)", name, line2);
    }
    ++line2;
  }
  fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSFile ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 813 of file GlobalParams.cc.

                                                                         {
  if (tokens->getLength() != 2) {
    error(-1, "Bad 'psFile' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  if (psFile) {
    delete psFile;
  }
  psFile = ((GString *)tokens->get(1))->copy();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSFont ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 825 of file GlobalParams.cc.

                                                                         {
  PSFontParam *param;

  if (tokens->getLength() != 3) {
    error(-1, "Bad 'psFont' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  param = new PSFontParam(((GString *)tokens->get(1))->copy(), 0,
                       ((GString *)tokens->get(2))->copy(), NULL);
  psFonts->add(param->pdfFontName, param);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSFont16 ( char *  cmdName,
GList fontList,
GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 838 of file GlobalParams.cc.

                                                                         {
  PSFontParam *param;
  int wMode;
  GString *tok;

  if (tokens->getLength() != 5) {
    error(-1, "Bad '%s' config file command (%s:%d)",
         cmdName, fileName->getCString(), line);
    return;
  }
  tok = (GString *)tokens->get(2);
  if (!tok->cmp("H")) {
    wMode = 0;
  } else if (!tok->cmp("V")) {
    wMode = 1;
  } else {
    error(-1, "Bad '%s' config file command (%s:%d)",
         cmdName, fileName->getCString(), line);
    return;
  }
  param = new PSFontParam(((GString *)tokens->get(1))->copy(),
                       wMode,
                       ((GString *)tokens->get(3))->copy(),
                       ((GString *)tokens->get(4))->copy());
  fontList->append(param);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSImageableArea ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 773 of file GlobalParams.cc.

                                             {
  if (tokens->getLength() != 5) {
    error(-1, "Bad 'psImageableArea' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  psImageableLLX = atoi(((GString *)tokens->get(1))->getCString());
  psImageableLLY = atoi(((GString *)tokens->get(2))->getCString());
  psImageableURX = atoi(((GString *)tokens->get(3))->getCString());
  psImageableURY = atoi(((GString *)tokens->get(4))->getCString());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSLevel ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 786 of file GlobalParams.cc.

                                                                          {
  GString *tok;

  if (tokens->getLength() != 2) {
    error(-1, "Bad 'psLevel' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  tok = (GString *)tokens->get(1);
  if (!tok->cmp("level1")) {
    psLevel = psLevel1;
  } else if (!tok->cmp("level1sep")) {
    psLevel = psLevel1Sep;
  } else if (!tok->cmp("level2")) {
    psLevel = psLevel2;
  } else if (!tok->cmp("level2sep")) {
    psLevel = psLevel2Sep;
  } else if (!tok->cmp("level3")) {
    psLevel = psLevel3;
  } else if (!tok->cmp("level3Sep")) {
    psLevel = psLevel3Sep;
  } else {
    error(-1, "Bad 'psLevel' config file command (%s:%d)",
         fileName->getCString(), line);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parsePSPaperSize ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 749 of file GlobalParams.cc.

                                          {
  GString *tok;

  if (tokens->getLength() == 2) {
    tok = (GString *)tokens->get(1);
    if (!setPSPaperSize(tok->getCString())) {
      error(-1, "Bad 'psPaperSize' config file command (%s:%d)",
           fileName->getCString(), line);
    }
  } else if (tokens->getLength() == 3) {
    tok = (GString *)tokens->get(1);
    psPaperWidth = atoi(tok->getCString());
    tok = (GString *)tokens->get(2);
    psPaperHeight = atoi(tok->getCString());
    psImageableLLX = psImageableLLY = 0;
    psImageableURX = psPaperWidth;
    psImageableURY = psPaperHeight;
  } else {
    error(-1, "Bad 'psPaperSize' config file command (%s:%d)",
         fileName->getCString(), line);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseTextEncoding ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 866 of file GlobalParams.cc.

                                           {
  if (tokens->getLength() != 2) {
    error(-1, "Bad 'textEncoding' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  delete textEncoding;
  textEncoding = ((GString *)tokens->get(1))->copy();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseTextEOL ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 877 of file GlobalParams.cc.

                                                                          {
  GString *tok;

  if (tokens->getLength() != 2) {
    error(-1, "Bad 'textEOL' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  tok = (GString *)tokens->get(1);
  if (!tok->cmp("unix")) {
    textEOL = eolUnix;
  } else if (!tok->cmp("dos")) {
    textEOL = eolDOS;
  } else if (!tok->cmp("mac")) {
    textEOL = eolMac;
  } else {
    error(-1, "Bad 'textEOL' config file command (%s:%d)",
         fileName->getCString(), line);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseToUnicodeDir ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 701 of file GlobalParams.cc.

                                           {
  if (tokens->getLength() != 2) {
    error(-1, "Bad 'toUnicodeDir' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  toUnicodeDirs->append(((GString *)tokens->get(1))->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseUnicodeMap ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 666 of file GlobalParams.cc.

                                         {
  GString *encodingName, *name, *old;

  if (tokens->getLength() != 3) {
    error(-1, "Bad 'unicodeMap' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  encodingName = (GString *)tokens->get(1);
  name = (GString *)tokens->get(2);
  if ((old = (GString *)unicodeMaps->remove(encodingName))) {
    delete old;
  }
  unicodeMaps->add(encodingName->copy(), name->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseUnicodeToUnicode ( GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 649 of file GlobalParams.cc.

                                              {
  GString *font, *file, *old;

  if (tokens->getLength() != 3) {
    error(-1, "Bad 'unicodeToUnicode' config file command (%s:%d)",
         fileName->getCString(), line);
    return;
  }
  font = (GString *)tokens->get(1);
  file = (GString *)tokens->get(2);
  if ((old = (GString *)unicodeToUnicodes->remove(font))) {
    delete old;
  }
  unicodeToUnicodes->add(font->copy(), file->copy());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GlobalParams::parseYesNo ( char *  cmdName,
GBool flag,
GList tokens,
GString fileName,
int  line 
) [private]

Definition at line 931 of file GlobalParams.cc.

                                                                       {
  GString *tok;

  if (tokens->getLength() != 2) {
    error(-1, "Bad '%s' config file command (%s:%d)",
         cmdName, fileName->getCString(), line);
    return;
  }
  tok = (GString *)tokens->get(1);
  if (!parseYesNo2(tok->getCString(), flag)) {
    error(-1, "Bad '%s' config file command (%s:%d)",
         cmdName, fileName->getCString(), line);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

GBool GlobalParams::parseYesNo2 ( char *  token,
GBool flag 
) [private]

Definition at line 947 of file GlobalParams.cc.

                                                        {
  if (!strcmp(token, "yes")) {
    *flag = gTrue;
  } else if (!strcmp(token, "no")) {
    *flag = gFalse;
  } else {
    return gFalse;
  }
  return gTrue;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1754 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1744 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1735 of file GlobalParams.cc.

Here is the call graph for this function:

Definition at line 1775 of file GlobalParams.cc.

Here is the caller graph for this function:

Definition at line 1728 of file GlobalParams.cc.

Definition at line 1769 of file GlobalParams.cc.

Definition at line 1687 of file GlobalParams.cc.

Definition at line 1639 of file GlobalParams.cc.

Definition at line 1621 of file GlobalParams.cc.

Definition at line 1645 of file GlobalParams.cc.

Definition at line 1669 of file GlobalParams.cc.

Definition at line 1675 of file GlobalParams.cc.

Definition at line 1663 of file GlobalParams.cc.

Definition at line 1657 of file GlobalParams.cc.

Definition at line 1627 of file GlobalParams.cc.

void GlobalParams::setPSFile ( char *  file)

Definition at line 1560 of file GlobalParams.cc.

void GlobalParams::setPSImageableArea ( int  llx,
int  lly,
int  urx,
int  ury 
)

Definition at line 1651 of file GlobalParams.cc.

Definition at line 1681 of file GlobalParams.cc.

Definition at line 1569 of file GlobalParams.cc.

                                             {
  lockGlobalParams;
  if (!strcmp(size, "match")) {
    psPaperWidth = psPaperHeight = -1;
  } else if (!strcmp(size, "letter")) {
    psPaperWidth = 612;
    psPaperHeight = 792;
  } else if (!strcmp(size, "legal")) {
    psPaperWidth = 612;
    psPaperHeight = 1008;
  } else if (!strcmp(size, "A4")) {
    psPaperWidth = 595;
    psPaperHeight = 842;
  } else if (!strcmp(size, "A3")) {
    psPaperWidth = 842;
    psPaperHeight = 1190;
  } else {
    unlockGlobalParams;
    return gFalse;
  }
  psImageableLLX = psImageableLLY = 0;
  psImageableURX = psPaperWidth;
  psImageableURY = psPaperHeight;
  unlockGlobalParams;
  return gTrue;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1633 of file GlobalParams.cc.

void GlobalParams::setTextEncoding ( char *  encodingName)

Definition at line 1693 of file GlobalParams.cc.

Definition at line 1700 of file GlobalParams.cc.

                                      {
  lockGlobalParams;
  if (!strcmp(s, "unix")) {
    textEOL = eolUnix;
  } else if (!strcmp(s, "dos")) {
    textEOL = eolDOS;
  } else if (!strcmp(s, "mac")) {
    textEOL = eolMac;
  } else {
    unlockGlobalParams;
    return gFalse;
  }
  unlockGlobalParams;
  return gTrue;
}

Here is the call graph for this function:

Definition at line 1716 of file GlobalParams.cc.

Definition at line 1012 of file GlobalParams.cc.

                                           {
  GString *fontName;
  GString *fileName;
  FILE *f;
  DisplayFontParam *dfp;
  int i, j;

  for (i = 0; displayFontTab[i].name; ++i) {
    fontName = new GString(displayFontTab[i].name);
    if (getDisplayFont(fontName)) {
      delete fontName;
      continue;
    }
    fileName = NULL;
    if (dir) {
      fileName = appendToPath(new GString(dir), displayFontTab[i].fileName);
      if ((f = fopen(fileName->getCString(), "rb"))) {
       fclose(f);
      } else {
       delete fileName;
       fileName = NULL;
      }
    }
#ifndef WIN32
    for (j = 0; !fileName && displayFontDirs[j]; ++j) {
      fileName = appendToPath(new GString(displayFontDirs[j]),
                           displayFontTab[i].fileName);
      if ((f = fopen(fileName->getCString(), "rb"))) {
       fclose(f);
      } else {
       delete fileName;
       fileName = NULL;
      }
    }
#endif
    if (!fileName) {
      error(-1, "No display font for '%s'", displayFontTab[i].name);
      delete fontName;
      continue;
    }
    dfp = new DisplayFontParam(fontName, displayFontT1);
    dfp->t1.fileName = fileName;
    globalParams->addDisplayFont(dfp);
  }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 293 of file GlobalParams.h.

Definition at line 300 of file GlobalParams.h.

Definition at line 242 of file GlobalParams.h.

Definition at line 303 of file GlobalParams.h.

Definition at line 251 of file GlobalParams.h.

Definition at line 256 of file GlobalParams.h.

Definition at line 254 of file GlobalParams.h.

Definition at line 258 of file GlobalParams.h.

Definition at line 292 of file GlobalParams.h.

Definition at line 291 of file GlobalParams.h.

Definition at line 298 of file GlobalParams.h.

Definition at line 289 of file GlobalParams.h.

Definition at line 290 of file GlobalParams.h.

Definition at line 236 of file GlobalParams.h.

Definition at line 296 of file GlobalParams.h.

Definition at line 295 of file GlobalParams.h.

Definition at line 241 of file GlobalParams.h.

Definition at line 297 of file GlobalParams.h.

Definition at line 282 of file GlobalParams.h.

Definition at line 270 of file GlobalParams.h.

Definition at line 267 of file GlobalParams.h.

Definition at line 271 of file GlobalParams.h.

Definition at line 279 of file GlobalParams.h.

Definition at line 280 of file GlobalParams.h.

Definition at line 278 of file GlobalParams.h.

Definition at line 277 of file GlobalParams.h.

Definition at line 268 of file GlobalParams.h.

Definition at line 260 of file GlobalParams.h.

Definition at line 273 of file GlobalParams.h.

Definition at line 276 of file GlobalParams.h.

Definition at line 263 of file GlobalParams.h.

Definition at line 263 of file GlobalParams.h.

Definition at line 263 of file GlobalParams.h.

Definition at line 263 of file GlobalParams.h.

Definition at line 272 of file GlobalParams.h.

Definition at line 275 of file GlobalParams.h.

Definition at line 281 of file GlobalParams.h.

Definition at line 262 of file GlobalParams.h.

Definition at line 261 of file GlobalParams.h.

Definition at line 269 of file GlobalParams.h.

Definition at line 247 of file GlobalParams.h.

Definition at line 283 of file GlobalParams.h.

Definition at line 285 of file GlobalParams.h.

Definition at line 288 of file GlobalParams.h.

Definition at line 287 of file GlobalParams.h.

Definition at line 253 of file GlobalParams.h.

Definition at line 302 of file GlobalParams.h.

Definition at line 249 of file GlobalParams.h.

Definition at line 301 of file GlobalParams.h.

Definition at line 245 of file GlobalParams.h.

Definition at line 294 of file GlobalParams.h.


The documentation for this class was generated from the following files: