w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

GlobalParams.cc
Go to the documentation of this file.
1 //========================================================================
2 //
3 // GlobalParams.cc
4 //
5 // Copyright 2001-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8 // Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
9 // See top-level ChangeLog for a list of all modifications
10 //========================================================================
11 
12 #include <aconf.h>
13 
14 #ifdef USE_GCC_PRAGMAS
15 #pragma implementation
16 #endif
17 
18 #include <string.h>
19 #include <stdio.h>
20 #include <stdarg.h>
21 #include <ctype.h>
22 #include <time.h>
23 #ifdef _WIN32
24 # include <shlobj.h>
25 #endif
26 #if HAVE_PAPER_H
27 #include <paper.h>
28 #endif
29 #if HAVE_FONTCONFIG
30 # include <fontconfig/fontconfig.h>
31 #endif
32 #include "gmem.h"
33 #include "gmempp.h"
34 #include "GString.h"
35 #include "GList.h"
36 #include "GHash.h"
37 #include "gfile.h"
38 #include "FoFiIdentifier.h"
39 #include "Error.h"
40 #include "NameToCharCode.h"
41 #include "CharCodeToUnicode.h"
42 #include "UnicodeRemapping.h"
43 #include "UnicodeMap.h"
44 #include "CMap.h"
45 #include "BuiltinFontTables.h"
46 #include "FontEncodingTables.h"
47 #include "GlobalParams.h"
48 
49 #ifdef _WIN32
50 # undef strcasecmp
51 # undef strncasecmp
52 # define strcasecmp _stricmp
53 # define strncasecmp _strnicmp
54 #else
55 # include <strings.h>
56 #endif
57 
58 #if MULTITHREADED
59 # define lockGlobalParams gLockMutex(&mutex)
60 # define lockUnicodeMapCache gLockMutex(&unicodeMapCacheMutex)
61 # define lockCMapCache gLockMutex(&cMapCacheMutex)
62 # define unlockGlobalParams gUnlockMutex(&mutex)
63 # define unlockUnicodeMapCache gUnlockMutex(&unicodeMapCacheMutex)
64 # define unlockCMapCache gUnlockMutex(&cMapCacheMutex)
65 #else
66 # define lockGlobalParams
67 # define lockUnicodeMapCache
68 # define lockCMapCache
69 # define unlockGlobalParams
70 # define unlockUnicodeMapCache
71 # define unlockCMapCache
72 #endif
73 
74 #include "NameToUnicodeTable.h"
75 #include "UnicodeMapTables.h"
76 #include "UTF8.h"
77 
78 //------------------------------------------------------------------------
79 
80 #define cidToUnicodeCacheSize 4
81 #define unicodeToUnicodeCacheSize 4
82 
83 //------------------------------------------------------------------------
84 
85 static struct {
86  const char *name;
87  const char *t1FileName;
88  const char *ttFileName;
89  const char *macFileName; // may be .dfont, .ttf, or .ttc
90  const char *macFontName; // font name inside .dfont or .ttc
91  const char *obliqueFont; // name of font to oblique
92  double obliqueFactor; // oblique sheer factor
93 } displayFontTab[] = {
94  {"Courier", "n022003l.pfb", "cour.ttf", "Courier", "Courier", NULL, 0},
95  {"Courier-Bold", "n022004l.pfb", "courbd.ttf", "Courier", "Courier Bold", NULL, 0},
96  {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557},
97  {"Courier-Oblique", "n022023l.pfb", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557},
98  {"Helvetica", "n019003l.pfb", "arial.ttf", "Helvetica", "Helvetica", NULL, 0},
99  {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", "Helvetica", "Helvetica Bold", NULL, 0},
100  {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557},
101  {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557},
102  {"Symbol", "s050000l.pfb", NULL, "Symbol", "Symbol", NULL, 0},
103  {"Times-Bold", "n021004l.pfb", "timesbd.ttf", "Times", "Times Bold", NULL, 0},
104  {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", "Times", "Times Bold Italic", NULL, 0},
105  {"Times-Italic", "n021023l.pfb", "timesi.ttf", "Times", "Times Italic", NULL, 0},
106  {"Times-Roman", "n021003l.pfb", "times.ttf", "Times", "Times Roman", NULL, 0},
107  {"ZapfDingbats", "d050000l.pfb", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0},
108  {NULL}
109 };
110 
111 #ifdef _WIN32
112 static const char *displayFontDirs[] = {
113  "c:/windows/fonts",
114  "c:/winnt/fonts",
115  NULL
116 };
117 #else
118 static const char *displayFontDirs[] = {
119  "/usr/share/ghostscript/fonts",
120  "/usr/local/share/ghostscript/fonts",
121  "/usr/share/fonts/default/Type1",
122  "/usr/share/fonts/default/ghostscript",
123  "/usr/share/fonts/type1/gsfonts",
124 #if defined(__sun) && defined(__SVR4)
125  "/usr/sfw/share/ghostscript/fonts",
126 #endif
127  NULL
128 };
129 #endif
130 
131 #ifdef __APPLE__
132 static const char *macSystemFontPath = "/System/Library/Fonts";
133 #endif
134 
136  Base14FontInfo(GString *fileNameA, int fontNumA, double obliqueA) {
137  fileName = fileNameA;
138  fontNum = fontNumA;
139  oblique = obliqueA;
140  }
142  delete fileName;
143  }
145  int fontNum;
146  double oblique;
147 };
148 
149 //------------------------------------------------------------------------
150 
152 
153 const char *GlobalParams::defaultTextEncoding = "Latin1";
154 
155 //------------------------------------------------------------------------
156 // PSFontParam16
157 //------------------------------------------------------------------------
158 
160  GString *psFontNameA, GString *encodingA) {
161  name = nameA;
162  wMode = wModeA;
163  psFontName = psFontNameA;
164  encoding = encodingA;
165 }
166 
168  delete name;
169  delete psFontName;
170  delete encoding;
171 }
172 
173 //------------------------------------------------------------------------
174 // SysFontInfo
175 //------------------------------------------------------------------------
176 
177 class SysFontInfo {
178 public:
179 
183  int fontNum; // for TrueType collections
184 
185  SysFontInfo(GString *nameA, GString *pathA, SysFontType typeA, int fontNumA);
186  ~SysFontInfo();
190  int match(GString *nameA);
191 };
192 
194  SysFontType typeA, int fontNumA) {
195  name = nameA;
196  path = pathA;
197  type = typeA;
198  fontNum = fontNumA;
199 }
200 
202  delete name;
203  delete path;
204 }
205 
206 // Remove space/comma/dash/underscore chars.
207 // Uppercase the name.
209  GString *out = new GString();
210  for (char *p = in->getCString(); *p; ++p) {
211  if (*p == ' ' || *p == ',' || *p == '-' || *p == '_') {
212  // skip
213  } else if (*p >= 'a' && *p <= 'z') {
214  out->append((char)(*p & 0xdf));
215  } else {
216  out->append(*p);
217  }
218  }
219  return out;
220 }
221 
222 // Remove trailing "Identity-H"/"Identity-V" from the name.
223 // Split the name into tokens at space/comma/dash/underscore.
224 // Remove trailing "MT" or "BT" from tokens.
225 // Remove trailing "PS" and "WGL4" from tokens.
226 // Uppercase each token.
227 // Concatenate tokens (dropping the space/comma/dash chars).
229  GString *out = new GString();
230  char *p0 = in->getCString();
231  while (*p0) {
232  if (!strcmp(p0, "Identity-H") || !strcmp(p0, "Identity-V")) {
233  break;
234  }
235  char *p1;
236  for (p1 = p0 + 1;
237  *p1 && *p1 != ' ' && *p1 != ',' && *p1 != '-' && *p1 != '_';
238  ++p1) ;
239  char *p2 = p1;
240  if (p2 - p0 >= 2 && (p2[-2] == 'B' || p2[-2] == 'M') && p2[-1] == 'T') {
241  p2 -= 2;
242  }
243  if (p2 - p0 >= 2 && p2[-2] == 'P' && p2[-1] == 'S') {
244  p2 -= 2;
245  }
246  if (p2 - p0 >= 4 &&
247  p2[-4] == 'W' && p2[-3] == 'G' && p2[-2] == 'L' && p2[-1] == '4') {
248  p2 -= 4;
249  }
250  for (; p0 < p2; ++p0) {
251  if (*p0 >= 'a' && *p0 <= 'z') {
252  out->append((char)(*p0 & 0xdf));
253  } else {
254  out->append(*p0);
255  }
256  }
257  for (p0 = p1; *p0 == ' ' || *p0 == ',' || *p0 == '-' || *p0 == '_'; ++p0) ;
258  }
259  return out;
260 }
261 
262 // Remove trailing bold/italic/regular/roman tags from the name.
263 // (Note: the names have already been uppercased by mungeName1/2.)
265  *bold = gFalse;
266  *italic = gFalse;
267  int n = name->getLength();
268  while (1) {
269  if (n >= 4 && !strcmp(name->getCString() + n - 4, "BOLD")) {
270  name->del(n - 4, 4);
271  n -= 4;
272  *bold = gTrue;
273  } else if (n >= 6 && !strcmp(name->getCString() + n - 6, "ITALIC")) {
274  name->del(n - 6, 6);
275  n -= 6;
276  *italic = gTrue;
277  } else if (n >= 7 && !strcmp(name->getCString() + n - 7, "REGULAR")) {
278  name->del(n - 7, 7);
279  n -= 7;
280  } else if (n >= 5 && !strcmp(name->getCString() + n - 5, "ROMAN")) {
281  name->del(n - 5, 5);
282  n -= 5;
283  } else {
284  break;
285  }
286  }
287 }
288 
289 // Returns a score indicating how well this font matches [nameA]. A
290 // higher score is better. Zero indicates a non-match.
292  // fast fail: check if the first two letters match
293  if (strncasecmp(name->getCString(), nameA->getCString(), 2)) {
294  return 0;
295  }
296 
297  GString *pdfName1 = mungeName1(nameA);
298  GString *sysName1 = mungeName1(name);
299  if (!pdfName1->cmp(sysName1)) {
300  delete pdfName1;
301  delete sysName1;
302  return 8;
303  }
304 
305  GString *pdfName2 = mungeName2(nameA);
306  GString *sysName2 = mungeName2(name);
307  if (!pdfName2->cmp(sysName2)) {
308  delete pdfName1;
309  delete sysName1;
310  delete pdfName2;
311  delete sysName2;
312  return 7;
313  }
314 
315  GBool pdfBold1, pdfItalic1, sysBold1, sysItalic1;
316  mungeName3(pdfName1, &pdfBold1, &pdfItalic1);
317  mungeName3(sysName1, &sysBold1, &sysItalic1);
318  int eq1 = !pdfName1->cmp(sysName1);
319 
320  GBool pdfBold2, pdfItalic2, sysBold2, sysItalic2;
321  mungeName3(pdfName2, &pdfBold2, &pdfItalic2);
322  mungeName3(sysName2, &sysBold2, &sysItalic2);
323  int eq2 =!pdfName2->cmp(sysName2);
324 
325  delete pdfName1;
326  delete sysName1;
327  delete pdfName2;
328  delete sysName2;
329 
330  if (eq1 && pdfBold1 == sysBold1 && pdfItalic1 == sysItalic1) {
331  return 6;
332  }
333  if (eq2 && pdfBold2 == sysBold2 && pdfItalic2 == sysItalic2) {
334  return 5;
335  }
336  if (eq1 && pdfItalic1 == sysItalic1) {
337  return 4;
338  }
339  if (eq2 && pdfItalic2 == sysItalic2) {
340  return 3;
341  }
342  if (eq1) {
343  return 2;
344  }
345  if (eq2) {
346  return 1;
347  }
348 
349  return 0;
350 }
351 
352 //------------------------------------------------------------------------
353 // SysFontList
354 //------------------------------------------------------------------------
355 
356 class SysFontList {
357 public:
358 
359  SysFontList();
360  ~SysFontList();
362 
363 #ifdef _WIN32
364  void scanWindowsFonts(char *winFontDir);
365 #endif
366 
367 #if HAVE_FONTCONFIG
368  void scanFontconfigFonts();
369 #endif
370 
371 private:
372 
373 #ifdef _WIN32
374  SysFontInfo *makeWindowsFont(char *name, int fontNum,
375  char *path);
376 #endif
377 
378  GList *fonts; // [SysFontInfo]
379 };
380 
382  fonts = new GList();
383 }
384 
387 }
388 
391  int score = 0;
392  for (int i = 0; i < fonts->getLength(); ++i) {
393  SysFontInfo *fi = (SysFontInfo *)fonts->get(i);
394  int s = fi->match(name);
395  if (s > score) {
396  match = fi;
397  score = s;
398  }
399  }
400  return match;
401 }
402 
403 #ifdef _WIN32
404 void SysFontList::scanWindowsFonts(char *winFontDir) {
405  OSVERSIONINFO version;
406  const char *path;
407  DWORD idx, valNameLen, dataLen, type;
408  HKEY regKey;
409  char valName[1024], data[1024];
410  int n, fontNum;
411  char *p0, *p1;
412  GString *fontPath;
413 
414  version.dwOSVersionInfoSize = sizeof(version);
415  GetVersionEx(&version);
416  if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) {
417  path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\";
418  } else {
419  path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\";
420  }
421  if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0,
422  KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS,
423  &regKey) == ERROR_SUCCESS) {
424  idx = 0;
425  while (1) {
426  valNameLen = sizeof(valName) - 1;
427  dataLen = sizeof(data) - 1;
428  if (RegEnumValueA(regKey, idx, valName, &valNameLen, NULL,
429  &type, (LPBYTE)data, &dataLen) != ERROR_SUCCESS) {
430  break;
431  }
432  if (type == REG_SZ &&
433  valNameLen > 0 && valNameLen < sizeof(valName) &&
434  dataLen > 0 && dataLen < sizeof(data)) {
435  valName[valNameLen] = '\0';
436  data[dataLen] = '\0';
437  n = (int)strlen(data);
438  if (!strcasecmp(data + n - 4, ".ttf") ||
439  !strcasecmp(data + n - 4, ".ttc") ||
440  !strcasecmp(data + n - 4, ".otf")) {
441  fontPath = new GString(data);
442  if (!(dataLen >= 3 && data[1] == ':' && data[2] == '\\')) {
443  fontPath->insert(0, '\\');
444  fontPath->insert(0, winFontDir);
445  }
446  p0 = valName;
447  fontNum = 0;
448  while (*p0) {
449  p1 = strstr(p0, " & ");
450  if (p1) {
451  *p1 = '\0';
452  p1 = p1 + 3;
453  } else {
454  p1 = p0 + strlen(p0);
455  }
456  fonts->append(makeWindowsFont(p0, fontNum,
457  fontPath->getCString()));
458  p0 = p1;
459  ++fontNum;
460  }
461  delete fontPath;
462  }
463  }
464  ++idx;
465  }
466  RegCloseKey(regKey);
467  }
468 }
469 
470 SysFontInfo *SysFontList::makeWindowsFont(char *name, int fontNum,
471  char *path) {
472  int n = (int)strlen(name);
473 
474  // remove trailing ' (TrueType)' or ' (OpenType)'
475  if (n > 11 && (!strncmp(name + n - 11, " (TrueType)", 11) ||
476  !strncmp(name + n - 11, " (OpenType)", 11))) {
477  n -= 11;
478  }
479 
481  if (!strcasecmp(path + strlen(path) - 4, ".ttc")) {
482  type = sysFontTTC;
483  } else if (!strcasecmp(path + strlen(path) - 4, ".otf")) {
484  type = sysFontOTF;
485  } else {
486  type = sysFontTTF;
487  }
488 
489  return new SysFontInfo(new GString(name, n), new GString(path),
490  type, fontNum);
491 }
492 #endif // _WIN32
493 
494 #if HAVE_FONTCONFIG
495 void SysFontList::scanFontconfigFonts() {
496  FcConfig *cfg;
498  FcObjectSet *objSet;
499  FcFontSet *fontSet;
500  char *name, *file;
502  int fontNum, i, n;
503 
504  if (!(cfg = FcInitLoadConfigAndFonts())) {
505  return;
506  }
507 
511  NULL);
513  fontSet = FcFontList(cfg, pattern, objSet);
515  FcObjectSetDestroy(objSet);
516 
517  if (fontSet) {
518  for (i = 0; i < fontSet->nfont; ++i) {
519 
520  //--- font file, font type
521  if (FcPatternGetString(fontSet->fonts[i], FC_FILE, 0,
522  (FcChar8 **)&file)
523  != FcResultMatch) {
524  continue;
525  }
526  n = (int)strlen(file);
527  if (n > 4 && !strcasecmp(file + n - 4, ".pfa")) {
528  type = sysFontPFA;
529  } else if (n > 4 && !strcasecmp(file + n - 4, ".pfb")) {
530  type = sysFontPFB;
531  } else if (n > 4 && !strcasecmp(file + n - 4, ".ttf")) {
532  type = sysFontTTF;
533  } else if (n > 4 && !strcasecmp(file + n - 4, ".otf")) {
534  type = sysFontOTF;
535  } else {
536  continue;
537  }
538 
539  //--- font number
540  if (FcPatternGetInteger(fontSet->fonts[i], FC_INDEX, 0, &fontNum)
541  != FcResultMatch) {
542  fontNum = 0;
543  }
544 
545  //--- font name
546  if (FcPatternGetString(fontSet->fonts[i], FC_FULLNAME, 0,
547  (FcChar8 **)&name)
548  != FcResultMatch) {
549  continue;
550  }
551 
552  fonts->append(new SysFontInfo(new GString(name), new GString(file),
553  type, fontNum));
554  }
555 
556  FcFontSetDestroy(fontSet);
557  }
558 
559  FcConfigDestroy(cfg);
560 }
561 #endif // HAVE_FONTCONFIG
562 
563 //------------------------------------------------------------------------
564 // KeyBinding
565 //------------------------------------------------------------------------
566 
567 KeyBinding::KeyBinding(int codeA, int modsA, int contextA, const char *cmd0) {
568  code = codeA;
569  mods = modsA;
570  context = contextA;
571  cmds = new GList();
572  cmds->append(new GString(cmd0));
573 }
574 
575 KeyBinding::KeyBinding(int codeA, int modsA, int contextA,
576  const char *cmd0, const char *cmd1) {
577  code = codeA;
578  mods = modsA;
579  context = contextA;
580  cmds = new GList();
581  cmds->append(new GString(cmd0));
582  cmds->append(new GString(cmd1));
583 }
584 
585 KeyBinding::KeyBinding(int codeA, int modsA, int contextA, GList *cmdsA) {
586  code = codeA;
587  mods = modsA;
588  context = contextA;
589  cmds = cmdsA;
590 }
591 
594 }
595 
596 //------------------------------------------------------------------------
597 // PopupMenuCmd
598 //------------------------------------------------------------------------
599 
601  label = labelA;
602  cmds = cmdsA;
603 }
604 
606  delete label;
608 }
609 
610 //------------------------------------------------------------------------
611 // parsing
612 //------------------------------------------------------------------------
613 
615  UnicodeMap *map;
616  GString *fileName;
617  FILE *f;
618  int i;
619 
620 #if MULTITHREADED
621  gInitMutex(&mutex);
624 #endif
625 
626 #ifdef _WIN32
627  tlsWin32ErrorInfo = TlsAlloc();
628 #endif
629 
631 
632  // scan the encoding in reverse because we want the lowest-numbered
633  // index for each char name ('space' is encoded twice)
635  for (i = 255; i >= 0; --i) {
636  if (macRomanEncoding[i]) {
638  }
639  }
640 
641 #ifdef _WIN32
642  // baseDir will be set by a call to setBaseDir
643  baseDir = new GString();
644 #else
645  baseDir = appendToPath(getHomeDir(), ".xpdf");
646 #endif
647  configFileVars = new GHash(gTrue);
648  setDataDirVar();
650  cidToUnicodes = new GHash(gTrue);
652  residentUnicodeMaps = new GHash();
653  unicodeMaps = new GHash(gTrue);
654  cMapDirs = new GHash(gTrue);
655  toUnicodeDirs = new GList();
657  fontFiles = new GHash(gTrue);
658  fontDirs = new GList();
659  ccFontFiles = new GHash(gTrue);
660  base14SysFonts = new GHash(gTrue);
661  sysFonts = new SysFontList();
662 #if HAVE_PAPER_H
663  char *paperName;
664  const struct paper *paperType;
665  paperinit();
666  if ((paperName = systempapername())) {
667  paperType = paperinfo(paperName);
668  psPaperWidth = (int)paperpswidth(paperType);
669  psPaperHeight = (int)paperpsheight(paperType);
670  } else {
671  error(errConfig, -1, "No paper information available - using defaults");
674  }
675  paperdone();
676 #else
679 #endif
683  psCrop = gTrue;
687  psCenter = gTrue;
688  psDuplex = gFalse;
689  psLevel = psLevel2;
690  psResidentFonts = new GHash(gTrue);
691  psResidentFonts16 = new GList();
692  psResidentFontsCC = new GList();
698  psPreload = gFalse;
699  psOPI = gFalse;
700  psASCIIHex = gFalse;
701  psLZW = gTrue;
703  psMinLineWidth = 0;
704  psRasterResolution = 300;
706  psRasterSliceSize = 20000000;
710 #if defined(_WIN32)
711  textEOL = eolDOS;
712 #else
713  textEOL = eolUnix;
714 #endif
717  initialZoom = new GString("125");
718  defaultFitZoom = 0;
719  initialDisplayMode = new GString("continuous");
723  initialSelectMode = new GString("linear");
724  maxTileWidth = 1500;
725  maxTileHeight = 1500;
726  tileCacheSize = 10;
727  workerThreads = 1;
730  antialias = gTrue;
735  screenSize = -1;
736  screenDotRadius = -1;
737  screenGamma = 1.0;
738  screenBlackThreshold = 0.0;
739  screenWhiteThreshold = 1.0;
740  minLineWidth = 0.0;
745  paperColor = new GString("#ffffff");
746  matteColor = new GString("#808080");
747  fullScreenMatteColor = new GString("#000000");
748  selectionColor = new GString("#8080ff");
751  movieCommand = NULL;
756  droppedFonts = new GHash(gTrue);
758  popupMenuCmds = new GList();
759  tabStateFile = appendToPath(getHomeDir(), ".xpdf.tab-state");
761  errQuiet = gFalse;
762  debugLogFile = NULL;
763 
768  cMapCache = new CMapCache();
769 
770  // set up the initial nameToUnicode table
771  for (i = 0; nameToUnicodeTab[i].name; ++i) {
773  }
774 
775  // set up the residentUnicodeMaps table
776  map = new UnicodeMap("Latin1", gFalse,
778  residentUnicodeMaps->add(map->getEncodingName(), map);
779  map = new UnicodeMap("ASCII7", gFalse,
781  residentUnicodeMaps->add(map->getEncodingName(), map);
782  map = new UnicodeMap("Symbol", gFalse,
784  residentUnicodeMaps->add(map->getEncodingName(), map);
785  map = new UnicodeMap("ZapfDingbats", gFalse, zapfDingbatsUnicodeMapRanges,
787  residentUnicodeMaps->add(map->getEncodingName(), map);
788  map = new UnicodeMap("UTF-8", gTrue, &mapUTF8);
789  residentUnicodeMaps->add(map->getEncodingName(), map);
790  map = new UnicodeMap("UCS-2", gTrue, &mapUCS2);
791  residentUnicodeMaps->add(map->getEncodingName(), map);
792 
793  // look for a user config file, then a system-wide config file
794  f = NULL;
795  fileName = NULL;
796  if (cfgFileName && cfgFileName[0]) {
797 #ifndef PDF_PARSER_ONLY
799  if (!(f = fopen(fileName->getCString(), "r"))) {
800  delete fileName;
801  }
802  }
803  if (!f) {
805  if (!(f = fopen(fileName->getCString(), "r"))) {
806  delete fileName;
807  }
808  }
809  if (!f) {
810 #ifdef _WIN32
811  char buf[512];
812  i = GetModuleFileNameA(NULL, buf, sizeof(buf));
813  if (i <= 0 || i >= sizeof(buf)) {
814  // error or path too long for buffer - just use the current dir
815  buf[0] = '\0';
816  }
817  fileName = grabPath(buf);
819 #else
821 #endif
822  if (!(f = fopen(fileName->getCString(), "r"))) {
823  delete fileName;
824  }
825  }
826  if (f) {
827  parseFile(fileName, f);
828  delete fileName;
829  fclose(f);
830 #endif /* !PDF_PARSER_ONLY */
831  }
832 }
833 
835  GString *dir;
836 
837 #if defined(XPDFRC_DATADIR)
838  dir = new GString(XPDFRC_DATADIR);
839 #elif defined(_WIN32)
840  wchar_t buf[512];
841  DWORD n = GetModuleFileNameW(NULL, buf, sizeof(buf) / sizeof(wchar_t));
842  if (n <= 0 || n >= sizeof(buf)) {
843  // error or path too long for buffer - just use the current dir
844  buf[0] = L'\0';
845  }
846  GString *path = fileNameToUTF8(buf);
847  dir = grabPath(path->getCString());
848  delete path;
849  appendToPath(dir, "data");
850 #else
851  //~ may be useful to allow the options of using the install dir
852  //~ and/or the user's home dir (?)
853  dir = new GString("./data");
854 #endif
855 
856  configFileVars->add(new GString("DATADIR"), dir);
857 }
858 
860  keyBindings = new GList();
861 
862  //----- mouse buttons
864  xpdfKeyContextAny, "startSelection"));
867  "startExtendedSelection"));
869  xpdfKeyContextAny, "endSelection"));
872  "endSelection"));
875  "selectWord"));
878  "selectLine"));
880  xpdfKeyContextAny, "followLinkNoSel"));
883  "followLinkInNewTab"));
885  xpdfKeyContextAny, "startPan"));
887  xpdfKeyContextAny, "endPan"));
889  xpdfKeyContextAny, "postPopupMenu"));
892  "scrollUpPrevPage(16)"));
895  "scrollDownNextPage(16)"));
897  xpdfKeyContextAny, "scrollLeft(16)"));
899  xpdfKeyContextAny, "scrollRight(16)"));
901  xpdfKeyContextAny, "zoomIn"));
903  xpdfKeyContextAny, "zoomOut"));
904 
905  //----- control keys
907  xpdfKeyContextAny, "open"));
909  xpdfKeyContextAny, "reload"));
911  xpdfKeyContextAny, "find"));
913  xpdfKeyContextAny, "findNext"));
915  xpdfKeyContextAny, "copy"));
917  xpdfKeyContextAny, "print"));
919  xpdfKeyContextAny, "zoomPercent(125)"));
921  xpdfKeyContextAny, "zoomIn"));
923  xpdfKeyContextAny, "zoomIn"));
925  xpdfKeyContextAny, "zoomOut"));
927  xpdfKeyContextAny, "saveAs"));
929  xpdfKeyContextAny, "newTab"));
931  xpdfKeyContextAny, "newWindow"));
933  xpdfKeyContextAny, "closeTabOrQuit"));
936  "toggleFullScreenMode"));
938  xpdfKeyContextAny, "quit"));
940  xpdfKeyContextAny, "nextTab"));
943  xpdfKeyContextAny, "prevTab"));
945  xpdfKeyContextAny, "help"));
946 
947  //----- alt keys
949  xpdfKeyContextAny, "goBackward"));
951  xpdfKeyContextAny, "goForward"));
952 
953  //----- home/end keys
955  xpdfKeyContextAny, "gotoPage(1)"));
957  xpdfKeyContextAny, "scrollToTopLeft"));
959  xpdfKeyContextAny, "gotoLastPage"));
962  "scrollToBottomRight"));
963 
964  //----- pgup/pgdn keys
966  xpdfKeyContextAny, "pageUp"));
968  xpdfKeyContextAny, "pageDown"));
970  xpdfKeyContextAny, "prevPage"));
972  xpdfKeyContextAny, "nextPage"));
975  "prevPageNoScroll"));
978  "nextPageNoScroll"));
979 
980  //----- esc key
983  "windowMode"));
984 
985  //----- arrow keys
987  xpdfKeyContextAny, "scrollLeft(16)"));
989  xpdfKeyContextAny, "scrollRight(16)"));
991  xpdfKeyContextAny, "scrollUp(16)"));
993  xpdfKeyContextAny, "scrollDown(16)"));
995  xpdfKeyContextAny, "prevPage"));
997  xpdfKeyContextAny, "nextPage"));
1000  "prevPageNoScroll"));
1003  "nextPageNoScroll"));
1004 
1005  //----- letter keys
1007  xpdfKeyContextAny, "pageDown"));
1009  xpdfKeyContextAny, "focusToPageNum"));
1011  xpdfKeyContextAny, "zoomFitPage"));
1013  xpdfKeyContextAny, "zoomFitWidth"));
1014 }
1015 
1017  int line;
1018  char buf[512];
1019 
1020  line = 1;
1021  while (getLine(buf, sizeof(buf) - 1, f)) {
1023  ++line;
1024  }
1025 }
1026 
1028  GList *tokens;
1029  GString *cmd, *incFile;
1030  FILE *f2;
1031 
1032  // break the line into tokens
1033  tokens = parseLineTokens(buf, fileName, line);
1034 
1035  // parse the line
1036  if (tokens->getLength() > 0 &&
1037  ((GString *)tokens->get(0))->getChar(0) != '#') {
1038  cmd = (GString *)tokens->get(0);
1039  if (!cmd->cmp("include")) {
1040  if (tokens->getLength() == 2) {
1041  incFile = (GString *)tokens->get(1);
1042  if ((f2 = openFile(incFile->getCString(), "r"))) {
1043  parseFile(incFile, f2);
1044  fclose(f2);
1045  } else {
1046  error(errConfig, -1,
1047  "Couldn't find included config file: '{0:t}' ({1:t}:{2:d})",
1048  incFile, fileName, line);
1049  }
1050  } else {
1051  error(errConfig, -1, "Bad 'include' config file command ({0:t}:{1:d})",
1052  fileName, line);
1053  }
1054  } else if (!cmd->cmp("nameToUnicode")) {
1055  parseNameToUnicode(tokens, fileName, line);
1056  } else if (!cmd->cmp("cidToUnicode")) {
1057  parseCIDToUnicode(tokens, fileName, line);
1058  } else if (!cmd->cmp("unicodeToUnicode")) {
1060  } else if (!cmd->cmp("unicodeMap")) {
1061  parseUnicodeMap(tokens, fileName, line);
1062  } else if (!cmd->cmp("cMapDir")) {
1063  parseCMapDir(tokens, fileName, line);
1064  } else if (!cmd->cmp("toUnicodeDir")) {
1065  parseToUnicodeDir(tokens, fileName, line);
1066  } else if (!cmd->cmp("unicodeRemapping")) {
1068  } else if (!cmd->cmp("fontFile")) {
1069  parseFontFile(tokens, fileName, line);
1070  } else if (!cmd->cmp("fontDir")) {
1071  parseFontDir(tokens, fileName, line);
1072  } else if (!cmd->cmp("fontFileCC")) {
1073  parseFontFileCC(tokens, fileName, line);
1074  } else if (!cmd->cmp("psPaperSize")) {
1075  parsePSPaperSize(tokens, fileName, line);
1076  } else if (!cmd->cmp("psImageableArea")) {
1078  } else if (!cmd->cmp("psCrop")) {
1079  parseYesNo("psCrop", &psCrop, tokens, fileName, line);
1080  } else if (!cmd->cmp("psUseCropBoxAsPage")) {
1081  parseYesNo("psUseCropBoxAsPage", &psUseCropBoxAsPage,
1082  tokens, fileName, line);
1083  } else if (!cmd->cmp("psExpandSmaller")) {
1084  parseYesNo("psExpandSmaller", &psExpandSmaller,
1085  tokens, fileName, line);
1086  } else if (!cmd->cmp("psShrinkLarger")) {
1087  parseYesNo("psShrinkLarger", &psShrinkLarger, tokens, fileName, line);
1088  } else if (!cmd->cmp("psCenter")) {
1089  parseYesNo("psCenter", &psCenter, tokens, fileName, line);
1090  } else if (!cmd->cmp("psDuplex")) {
1091  parseYesNo("psDuplex", &psDuplex, tokens, fileName, line);
1092  } else if (!cmd->cmp("psLevel")) {
1093  parsePSLevel(tokens, fileName, line);
1094  } else if (!cmd->cmp("psResidentFont")) {
1095  parsePSResidentFont(tokens, fileName, line);
1096  } else if (!cmd->cmp("psResidentFont16")) {
1098  } else if (!cmd->cmp("psResidentFontCC")) {
1100  } else if (!cmd->cmp("psEmbedType1Fonts")) {
1101  parseYesNo("psEmbedType1", &psEmbedType1, tokens, fileName, line);
1102  } else if (!cmd->cmp("psEmbedTrueTypeFonts")) {
1103  parseYesNo("psEmbedTrueType", &psEmbedTrueType,
1104  tokens, fileName, line);
1105  } else if (!cmd->cmp("psEmbedCIDPostScriptFonts")) {
1106  parseYesNo("psEmbedCIDPostScript", &psEmbedCIDPostScript,
1107  tokens, fileName, line);
1108  } else if (!cmd->cmp("psEmbedCIDTrueTypeFonts")) {
1109  parseYesNo("psEmbedCIDTrueType", &psEmbedCIDTrueType,
1110  tokens, fileName, line);
1111  } else if (!cmd->cmp("psFontPassthrough")) {
1112  parseYesNo("psFontPassthrough", &psFontPassthrough,
1113  tokens, fileName, line);
1114  } else if (!cmd->cmp("psPreload")) {
1115  parseYesNo("psPreload", &psPreload, tokens, fileName, line);
1116  } else if (!cmd->cmp("psOPI")) {
1117  parseYesNo("psOPI", &psOPI, tokens, fileName, line);
1118  } else if (!cmd->cmp("psASCIIHex")) {
1119  parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line);
1120  } else if (!cmd->cmp("psLZW")) {
1121  parseYesNo("psLZW", &psLZW, tokens, fileName, line);
1122  } else if (!cmd->cmp("psUncompressPreloadedImages")) {
1123  parseYesNo("psUncompressPreloadedImages", &psUncompressPreloadedImages,
1124  tokens, fileName, line);
1125  } else if (!cmd->cmp("psMinLineWidth")) {
1126  parseFloat("psMinLineWidth", &psMinLineWidth,
1127  tokens, fileName, line);
1128  } else if (!cmd->cmp("psRasterResolution")) {
1129  parseFloat("psRasterResolution", &psRasterResolution,
1130  tokens, fileName, line);
1131  } else if (!cmd->cmp("psRasterMono")) {
1132  parseYesNo("psRasterMono", &psRasterMono, tokens, fileName, line);
1133  } else if (!cmd->cmp("psRasterSliceSize")) {
1134  parseInteger("psRasterSliceSize", &psRasterSliceSize,
1135  tokens, fileName, line);
1136  } else if (!cmd->cmp("psAlwaysRasterize")) {
1137  parseYesNo("psAlwaysRasterize", &psAlwaysRasterize,
1138  tokens, fileName, line);
1139  } else if (!cmd->cmp("psNeverRasterize")) {
1140  parseYesNo("psNeverRasterize", &psNeverRasterize,
1141  tokens, fileName, line);
1142  } else if (!cmd->cmp("textEncoding")) {
1143  parseString("textEncoding", &textEncoding, tokens, fileName, line);
1144  } else if (!cmd->cmp("textEOL")) {
1145  parseTextEOL(tokens, fileName, line);
1146  } else if (!cmd->cmp("textPageBreaks")) {
1147  parseYesNo("textPageBreaks", &textPageBreaks,
1148  tokens, fileName, line);
1149  } else if (!cmd->cmp("textKeepTinyChars")) {
1150  parseYesNo("textKeepTinyChars", &textKeepTinyChars,
1151  tokens, fileName, line);
1152  } else if (!cmd->cmp("initialZoom")) {
1153  parseString("initialZoom", &initialZoom, tokens, fileName, line);
1154  } else if (!cmd->cmp("defaultFitZoom")) {
1155  parseInteger("defaultFitZoom", &defaultFitZoom, tokens, fileName, line);
1156  } else if (!cmd->cmp("initialDisplayMode")) {
1157  parseString("initialDisplayMode", &initialDisplayMode,
1158  tokens, fileName, line);
1159  } else if (!cmd->cmp("initialToolbarState")) {
1160  parseYesNo("initialToolbarState", &initialToolbarState,
1161  tokens, fileName, line);
1162  } else if (!cmd->cmp("initialSidebarState")) {
1163  parseYesNo("initialSidebarState", &initialSidebarState,
1164  tokens, fileName, line);
1165  } else if (!cmd->cmp("initialSidebarWidth")) {
1166  parseInteger("initialSidebarWidth", &initialSidebarWidth,
1167  tokens, fileName, line);
1168  } else if (!cmd->cmp("initialSelectMode")) {
1169  parseString("initialSelectMode", &initialSelectMode,
1170  tokens, fileName, line);
1171  } else if (!cmd->cmp("maxTileWidth")) {
1172  parseInteger("maxTileWidth", &maxTileWidth, tokens, fileName, line);
1173  } else if (!cmd->cmp("maxTileHeight")) {
1174  parseInteger("maxTileHeight", &maxTileHeight, tokens, fileName, line);
1175  } else if (!cmd->cmp("tileCacheSize")) {
1176  parseInteger("tileCacheSize", &tileCacheSize, tokens, fileName, line);
1177  } else if (!cmd->cmp("workerThreads")) {
1178  parseInteger("workerThreads", &workerThreads, tokens, fileName, line);
1179  } else if (!cmd->cmp("enableFreeType")) {
1180  parseYesNo("enableFreeType", &enableFreeType, tokens, fileName, line);
1181  } else if (!cmd->cmp("disableFreeTypeHinting")) {
1182  parseYesNo("disableFreeTypeHinting", &disableFreeTypeHinting,
1183  tokens, fileName, line);
1184  } else if (!cmd->cmp("antialias")) {
1185  parseYesNo("antialias", &antialias, tokens, fileName, line);
1186  } else if (!cmd->cmp("vectorAntialias")) {
1187  parseYesNo("vectorAntialias", &vectorAntialias,
1188  tokens, fileName, line);
1189  } else if (!cmd->cmp("antialiasPrinting")) {
1190  parseYesNo("antialiasPrinting", &antialiasPrinting,
1191  tokens, fileName, line);
1192  } else if (!cmd->cmp("strokeAdjust")) {
1193  parseStrokeAdjust(tokens, fileName, line);
1194  } else if (!cmd->cmp("screenType")) {
1195  parseScreenType(tokens, fileName, line);
1196  } else if (!cmd->cmp("screenSize")) {
1197  parseInteger("screenSize", &screenSize, tokens, fileName, line);
1198  } else if (!cmd->cmp("screenDotRadius")) {
1199  parseInteger("screenDotRadius", &screenDotRadius,
1200  tokens, fileName, line);
1201  } else if (!cmd->cmp("screenGamma")) {
1202  parseFloat("screenGamma", &screenGamma,
1203  tokens, fileName, line);
1204  } else if (!cmd->cmp("screenBlackThreshold")) {
1205  parseFloat("screenBlackThreshold", &screenBlackThreshold,
1206  tokens, fileName, line);
1207  } else if (!cmd->cmp("screenWhiteThreshold")) {
1208  parseFloat("screenWhiteThreshold", &screenWhiteThreshold,
1209  tokens, fileName, line);
1210  } else if (!cmd->cmp("minLineWidth")) {
1211  parseFloat("minLineWidth", &minLineWidth,
1212  tokens, fileName, line);
1213  } else if (!cmd->cmp("enablePathSimplification")) {
1214  parseYesNo("enablePathSimplification", &enablePathSimplification,
1215  tokens, fileName, line);
1216  } else if (!cmd->cmp("drawAnnotations")) {
1217  parseYesNo("drawAnnotations", &drawAnnotations,
1218  tokens, fileName, line);
1219  } else if (!cmd->cmp("drawFormFields")) {
1220  parseYesNo("drawFormFields", &drawFormFields,
1221  tokens, fileName, line);
1222  } else if (!cmd->cmp("overprintPreview")) {
1223  parseYesNo("overprintPreview", &overprintPreview,
1224  tokens, fileName, line);
1225  } else if (!cmd->cmp("paperColor")) {
1226  parseString("paperColor", &paperColor, tokens, fileName, line);
1227  } else if (!cmd->cmp("matteColor")) {
1228  parseString("matteColor", &matteColor, tokens, fileName, line);
1229  } else if (!cmd->cmp("fullScreenMatteColor")) {
1230  parseString("fullScreenMatteColor", &fullScreenMatteColor,
1231  tokens, fileName, line);
1232  } else if (!cmd->cmp("selectionColor")) {
1233  parseString("selectionColor", &selectionColor, tokens, fileName, line);
1234  } else if (!cmd->cmp("reverseVideoInvertImages")) {
1235  parseYesNo("reverseVideoInvertImages", &reverseVideoInvertImages,
1236  tokens, fileName, line);
1237  } else if (!cmd->cmp("launchCommand")) {
1238  parseString("launchCommand", &launchCommand, tokens, fileName, line);
1239  } else if (!cmd->cmp("movieCommand")) {
1240  parseString("movieCommand", &movieCommand, tokens, fileName, line);
1241  } else if (!cmd->cmp("defaultPrinter")) {
1242  parseString("defaultPrinter", &defaultPrinter, tokens, fileName, line);
1243  } else if (!cmd->cmp("mapNumericCharNames")) {
1244  parseYesNo("mapNumericCharNames", &mapNumericCharNames,
1245  tokens, fileName, line);
1246  } else if (!cmd->cmp("mapUnknownCharNames")) {
1247  parseYesNo("mapUnknownCharNames", &mapUnknownCharNames,
1248  tokens, fileName, line);
1249  } else if (!cmd->cmp("mapExtTrueTypeFontsViaUnicode")) {
1250  parseYesNo("mapExtTrueTypeFontsViaUnicode",
1252  tokens, fileName, line);
1253  } else if (!cmd->cmp("dropFont")) {
1254  parseDropFont(tokens, fileName, line);
1255  } else if (!cmd->cmp("bind")) {
1256  parseBind(tokens, fileName, line);
1257  } else if (!cmd->cmp("unbind")) {
1258  parseUnbind(tokens, fileName, line);
1259  } else if (!cmd->cmp("popupMenuCmd")) {
1260  parsePopupMenuCmd(tokens, fileName, line);
1261  } else if (!cmd->cmp("tabStateFile")) {
1262  parseString("tabStateFile", &tabStateFile, tokens, fileName, line);
1263  } else if (!cmd->cmp("printCommands")) {
1264  parseYesNo("printCommands", &printCommands, tokens, fileName, line);
1265  } else if (!cmd->cmp("errQuiet")) {
1266  parseYesNo("errQuiet", &errQuiet, tokens, fileName, line);
1267  } else if (!cmd->cmp("debugLogFile")) {
1268  parseString("debugLogFile", &debugLogFile, tokens, fileName, line);
1269  } else {
1270  error(errConfig, -1, "Unknown config file command '{0:t}' ({1:t}:{2:d})",
1271  cmd, fileName, line);
1272  if (!cmd->cmp("displayFontX") ||
1273  !cmd->cmp("displayNamedCIDFontX") ||
1274  !cmd->cmp("displayCIDFontX")) {
1275  error(errConfig, -1, "Xpdf no longer supports X fonts");
1276  } else if (!cmd->cmp("enableT1lib")) {
1277  error(errConfig, -1, "Xpdf no longer uses t1lib");
1278  } else if (!cmd->cmp("t1libControl") || !cmd->cmp("freetypeControl")) {
1279  error(errConfig, -1,
1280  "The t1libControl and freetypeControl options have been replaced by the enableT1lib, enableFreeType, and antialias options");
1281  } else if (!cmd->cmp("fontpath") || !cmd->cmp("fontmap")) {
1282  error(errConfig, -1,
1283  "The config file format has changed since Xpdf 0.9x");
1284  } else if (!cmd->cmp("enableXFA")) {
1285  error(errConfig, -1, "The enableXFA option is no longer used");
1286  }
1287  }
1288  }
1289 
1290  deleteGList(tokens, GString);
1291 }
1292 
1293 // Split a line into a sequence of tokens. Tokens are separated by
1294 // whitespace. Each token is one of:
1295 // - unquoted string, which can contain any char other than
1296 // whitespace, and which cannot start with a single quote, double
1297 // quote, or at-double-quote (xxxx)
1298 // - single-quoted string, which can contain any char other than the
1299 // single quote ('xxxx')
1300 // - double-quoted string, which can contain any char other than the
1301 // double quote ("xxxx")
1302 // - at-double-quoted string, which can contain variables and escape
1303 // chars (@"xxxx")
1304 // - variables look like ${name}
1305 // - special chars (${}") can be escaped with %, e.g.,
1306 // @"foo%"bar", @"foo%$bar", @"foo%%bar"
1308  GList *tokens = new GList();
1309  char *p1 = buf;
1310  while (*p1) {
1311  for (; *p1 && isspace(*p1); ++p1) ;
1312  if (!*p1) {
1313  break;
1314  }
1315  if (*p1 == '"' || *p1 == '\'') {
1316  char *p2;
1317  for (p2 = p1 + 1; *p2 && *p2 != *p1; ++p2) ;
1318  ++p1;
1319  tokens->append(new GString(p1, (int)(p2 - p1)));
1320  p1 = *p2 ? p2 + 1 : p2;
1321  } else if (*p1 == '@' && p1[1] == '"') {
1322  GString *token = new GString();
1323  char *p2 = p1 + 2;
1324  while (*p2 && *p2 != '"') {
1325  if (*p2 == '%' && p2[1]) {
1326  token->append(p2[1]);
1327  p2 += 2;
1328  } else if (*p2 == '$' && p2[1] == '{') {
1329  p2 += 2;
1330  char *p3;
1331  for (p3 = p2; *p3 && *p3 != '}'; ++p3) ;
1332  GString *varName = new GString(p2, (int)(p3 - p2));
1333  GString *varValue = (GString *)configFileVars->lookup(varName);
1334  if (varValue) {
1335  token->append(varValue);
1336  } else {
1337  error(errConfig, -1, "Unknown config file variable '%t'", varName);
1338  }
1339  delete varName;
1340  p2 = *p3 ? p3 + 1 : p3;
1341  } else {
1342  token->append(*p2);
1343  ++p2;
1344  }
1345  }
1346  tokens->append(token);
1347  p1 = *p2 ? p2 + 1 : p2;
1348  } else {
1349  char *p2;
1350  for (p2 = p1 + 1; *p2 && !isspace(*p2); ++p2) ;
1351  tokens->append(new GString(p1, (int)(p2 - p1)));
1352  p1 = p2;
1353  }
1354  }
1355  return tokens;
1356 }
1357 
1359  int line) {
1360  GString *name;
1361  char *tok1, *tok2;
1362  FILE *f;
1363  char buf[256];
1364  int line2;
1365  Unicode u;
1366 
1367  if (tokens->getLength() != 2) {
1368  error(errConfig, -1,
1369  "Bad 'nameToUnicode' config file command ({0:t}:{1:d})",
1370  fileName, line);
1371  return;
1372  }
1373  name = (GString *)tokens->get(1);
1374  if (!(f = openFile(name->getCString(), "r"))) {
1375  error(errConfig, -1, "Couldn't open 'nameToUnicode' file '{0:t}'", name);
1376  return;
1377  }
1378  line2 = 1;
1379  while (getLine(buf, sizeof(buf), f)) {
1380  tok1 = strtok(buf, " \t\r\n");
1381  tok2 = strtok(NULL, " \t\r\n");
1382  if (tok1 && tok2) {
1383  sscanf(tok1, "%x", &u);
1384  nameToUnicode->add(tok2, u);
1385  } else {
1386  error(errConfig, -1, "Bad line in 'nameToUnicode' file ({0:t}:{1:d})",
1387  name, line2);
1388  }
1389  ++line2;
1390  }
1391  fclose(f);
1392 }
1393 
1395  int line) {
1396  GString *collection, *name, *old;
1397 
1398  if (tokens->getLength() != 3) {
1399  error(errConfig, -1,
1400  "Bad 'cidToUnicode' config file command ({0:t}:{1:d})",
1401  fileName, line);
1402  return;
1403  }
1404  collection = (GString *)tokens->get(1);
1405  name = (GString *)tokens->get(2);
1406  if ((old = (GString *)cidToUnicodes->remove(collection))) {
1407  delete old;
1408  }
1409  cidToUnicodes->add(collection->copy(), name->copy());
1410 }
1411 
1413  int line) {
1414  GString *font, *file, *old;
1415 
1416  if (tokens->getLength() != 3) {
1417  error(errConfig, -1,
1418  "Bad 'unicodeToUnicode' config file command ({0:t}:{1:d})",
1419  fileName, line);
1420  return;
1421  }
1422  font = (GString *)tokens->get(1);
1423  file = (GString *)tokens->get(2);
1424  if ((old = (GString *)unicodeToUnicodes->remove(font))) {
1425  delete old;
1426  }
1427  unicodeToUnicodes->add(font->copy(), file->copy());
1428 }
1429 
1431  int line) {
1432  GString *encodingName, *name, *old;
1433 
1434  if (tokens->getLength() != 3) {
1435  error(errConfig, -1, "Bad 'unicodeMap' config file command ({0:t}:{1:d})",
1436  fileName, line);
1437  return;
1438  }
1439  encodingName = (GString *)tokens->get(1);
1440  name = (GString *)tokens->get(2);
1441  if ((old = (GString *)unicodeMaps->remove(encodingName))) {
1442  delete old;
1443  }
1444  unicodeMaps->add(encodingName->copy(), name->copy());
1445 }
1446 
1448  GString *collection, *dir;
1449  GList *list;
1450 
1451  if (tokens->getLength() != 3) {
1452  error(errConfig, -1, "Bad 'cMapDir' config file command ({0:t}:{1:d})",
1453  fileName, line);
1454  return;
1455  }
1456  collection = (GString *)tokens->get(1);
1457  dir = (GString *)tokens->get(2);
1458  if (!(list = (GList *)cMapDirs->lookup(collection))) {
1459  list = new GList();
1460  cMapDirs->add(collection->copy(), list);
1461  }
1462  list->append(dir->copy());
1463 }
1464 
1466  int line) {
1467  if (tokens->getLength() != 2) {
1468  error(errConfig, -1,
1469  "Bad 'toUnicodeDir' config file command ({0:t}:{1:d})",
1470  fileName, line);
1471  return;
1472  }
1473  toUnicodeDirs->append(((GString *)tokens->get(1))->copy());
1474 }
1475 
1477  int line) {
1478  if (tokens->getLength() != 2) {
1479  error(errConfig, -1,
1480  "Bad 'unicodeRemapping' config file command ({0:t}:{1:d})",
1481  fileName, line);
1482  return;
1483  }
1484  unicodeRemapping->parseFile((GString *)tokens->get(1));
1485 }
1486 
1488  if (tokens->getLength() != 3) {
1489  error(errConfig, -1, "Bad 'fontFile' config file command ({0:t}:{1:d})",
1490  fileName, line);
1491  return;
1492  }
1493  fontFiles->add(((GString *)tokens->get(1))->copy(),
1494  ((GString *)tokens->get(2))->copy());
1495 }
1496 
1498  if (tokens->getLength() != 2) {
1499  error(errConfig, -1, "Bad 'fontDir' config file command ({0:t}:{1:d})",
1500  fileName, line);
1501  return;
1502  }
1503  fontDirs->append(((GString *)tokens->get(1))->copy());
1504 }
1505 
1507  int line) {
1508  if (tokens->getLength() != 3) {
1509  error(errConfig, -1, "Bad 'fontFileCC' config file command ({0:t}:{1:d})",
1510  fileName, line);
1511  return;
1512  }
1513  ccFontFiles->add(((GString *)tokens->get(1))->copy(),
1514  ((GString *)tokens->get(2))->copy());
1515 }
1516 
1518  int line) {
1519  GString *tok;
1520 
1521  if (tokens->getLength() == 2) {
1522  tok = (GString *)tokens->get(1);
1523  if (!setPSPaperSize(tok->getCString())) {
1524  error(errConfig, -1,
1525  "Bad 'psPaperSize' config file command ({0:s}:{1:d})",
1526  fileName, line);
1527  }
1528  } else if (tokens->getLength() == 3) {
1529  tok = (GString *)tokens->get(1);
1530  psPaperWidth = atoi(tok->getCString());
1531  tok = (GString *)tokens->get(2);
1532  psPaperHeight = atoi(tok->getCString());
1536  } else {
1537  error(errConfig, -1, "Bad 'psPaperSize' config file command ({0:t}:{1:d})",
1538  fileName, line);
1539  }
1540 }
1541 
1543  int line) {
1544  if (tokens->getLength() != 5) {
1545  error(errConfig, -1,
1546  "Bad 'psImageableArea' config file command ({0:t}:{1:d})",
1547  fileName, line);
1548  return;
1549  }
1550  psImageableLLX = atoi(((GString *)tokens->get(1))->getCString());
1551  psImageableLLY = atoi(((GString *)tokens->get(2))->getCString());
1552  psImageableURX = atoi(((GString *)tokens->get(3))->getCString());
1553  psImageableURY = atoi(((GString *)tokens->get(4))->getCString());
1554 }
1555 
1557  GString *tok;
1558 
1559  if (tokens->getLength() != 2) {
1560  error(errConfig, -1, "Bad 'psLevel' config file command ({0:t}:{1:d})",
1561  fileName, line);
1562  return;
1563  }
1564  tok = (GString *)tokens->get(1);
1565  if (!tok->cmp("level1")) {
1566  psLevel = psLevel1;
1567  } else if (!tok->cmp("level1sep")) {
1568  psLevel = psLevel1Sep;
1569  } else if (!tok->cmp("level2")) {
1570  psLevel = psLevel2;
1571  } else if (!tok->cmp("level2gray")) {
1573  } else if (!tok->cmp("level2sep")) {
1574  psLevel = psLevel2Sep;
1575  } else if (!tok->cmp("level3")) {
1576  psLevel = psLevel3;
1577  } else if (!tok->cmp("level3gray")) {
1579  } else if (!tok->cmp("level3Sep")) {
1580  psLevel = psLevel3Sep;
1581  } else {
1582  error(errConfig, -1, "Bad 'psLevel' config file command ({0:t}:{1:d})",
1583  fileName, line);
1584  }
1585 }
1586 
1588  int line) {
1589  if (tokens->getLength() != 3) {
1590  error(errConfig, -1, "Bad 'psResidentFont' config file command ({0:t}:{1:d})",
1591  fileName, line);
1592  return;
1593  }
1594  psResidentFonts->add(((GString *)tokens->get(1))->copy(),
1595  ((GString *)tokens->get(2))->copy());
1596 }
1597 
1599  int line) {
1601  int wMode;
1602  GString *tok;
1603 
1604  if (tokens->getLength() != 5) {
1605  error(errConfig, -1, "Bad 'psResidentFont16' config file command ({0:t}:{1:d})",
1606  fileName, line);
1607  return;
1608  }
1609  tok = (GString *)tokens->get(2);
1610  if (!tok->cmp("H")) {
1611  wMode = 0;
1612  } else if (!tok->cmp("V")) {
1613  wMode = 1;
1614  } else {
1615  error(errConfig, -1, "Bad wMode in psResidentFont16 config file command ({1:t}:{2:d})",
1616  fileName, line);
1617  return;
1618  }
1619  param = new PSFontParam16(((GString *)tokens->get(1))->copy(),
1620  wMode,
1621  ((GString *)tokens->get(3))->copy(),
1622  ((GString *)tokens->get(4))->copy());
1624 }
1625 
1627  int line) {
1629  int wMode;
1630  GString *tok;
1631 
1632  if (tokens->getLength() != 5) {
1633  error(errConfig, -1, "Bad 'psResidentFontCC' config file command ({0:t}:{1:d})",
1634  fileName, line);
1635  return;
1636  }
1637  tok = (GString *)tokens->get(2);
1638  if (!tok->cmp("H")) {
1639  wMode = 0;
1640  } else if (!tok->cmp("V")) {
1641  wMode = 1;
1642  } else {
1643  error(errConfig, -1, "Bad wMode in psResidentFontCC config file command ({1:t}:{2:d})",
1644  fileName, line);
1645  return;
1646  }
1647  param = new PSFontParam16(((GString *)tokens->get(1))->copy(),
1648  wMode,
1649  ((GString *)tokens->get(3))->copy(),
1650  ((GString *)tokens->get(4))->copy());
1652 }
1653 
1655  GString *tok;
1656 
1657  if (tokens->getLength() != 2) {
1658  error(errConfig, -1, "Bad 'textEOL' config file command ({0:t}:{1:d})",
1659  fileName, line);
1660  return;
1661  }
1662  tok = (GString *)tokens->get(1);
1663  if (!tok->cmp("unix")) {
1664  textEOL = eolUnix;
1665  } else if (!tok->cmp("dos")) {
1666  textEOL = eolDOS;
1667  } else if (!tok->cmp("mac")) {
1668  textEOL = eolMac;
1669  } else {
1670  error(errConfig, -1, "Bad 'textEOL' config file command ({0:t}:{1:d})",
1671  fileName, line);
1672  }
1673 }
1674 
1676  int line) {
1677  GString *tok;
1678 
1679  if (tokens->getLength() != 2) {
1680  error(errConfig, -1,
1681  "Bad 'strokeAdjust' config file command ({0:t}:{1:d})",
1682  fileName, line);
1683  return;
1684  }
1685  tok = (GString *)tokens->get(1);
1686  if (!tok->cmp("no")) {
1688  } else if (!tok->cmp("yes")) {
1690  } else if (!tok->cmp("cad")) {
1692  } else {
1693  error(errConfig, -1,
1694  "Bad 'strokeAdjust' config file command ({0:t}:{1:d})",
1695  fileName, line);
1696  }
1697 }
1698 
1700  int line) {
1701  GString *tok;
1702 
1703  if (tokens->getLength() != 2) {
1704  error(errConfig, -1, "Bad 'screenType' config file command ({0:t}:{1:d})",
1705  fileName, line);
1706  return;
1707  }
1708  tok = (GString *)tokens->get(1);
1709  if (!tok->cmp("dispersed")) {
1711  } else if (!tok->cmp("clustered")) {
1713  } else if (!tok->cmp("stochasticClustered")) {
1715  } else {
1716  error(errConfig, -1, "Bad 'screenType' config file command ({0:t}:{1:d})",
1717  fileName, line);
1718  }
1719 }
1720 
1722  if (tokens->getLength() != 2) {
1723  error(errConfig, -1, "Bad 'dropFont' config file command ({0:t}:{1:d})",
1724  fileName, line);
1725  return;
1726  }
1727  droppedFonts->add(((GString *)tokens->get(1))->copy(), 1);
1728 }
1729 
1732  GList *cmds;
1733  int code, mods, context, i;
1734 
1735  if (tokens->getLength() < 4) {
1736  error(errConfig, -1, "Bad 'bind' config file command ({0:t}:{1:d})",
1737  fileName, line);
1738  return;
1739  }
1740  if (!parseKey((GString *)tokens->get(1), (GString *)tokens->get(2),
1741  &code, &mods, &context,
1742  "bind", tokens, fileName, line)) {
1743  return;
1744  }
1745  for (i = 0; i < keyBindings->getLength(); ++i) {
1747  if (binding->code == code &&
1748  binding->mods == mods &&
1749  binding->context == context) {
1750  delete (KeyBinding *)keyBindings->del(i);
1751  break;
1752  }
1753  }
1754  cmds = new GList();
1755  for (i = 3; i < tokens->getLength(); ++i) {
1756  cmds->append(((GString *)tokens->get(i))->copy());
1757  }
1758  keyBindings->append(new KeyBinding(code, mods, context, cmds));
1759 }
1760 
1763  int code, mods, context, i;
1764 
1765  if (tokens->getLength() != 3) {
1766  error(errConfig, -1, "Bad 'unbind' config file command ({0:t}:{1:d})",
1767  fileName, line);
1768  return;
1769  }
1770  if (!parseKey((GString *)tokens->get(1), (GString *)tokens->get(2),
1771  &code, &mods, &context,
1772  "unbind", tokens, fileName, line)) {
1773  return;
1774  }
1775  for (i = 0; i < keyBindings->getLength(); ++i) {
1777  if (binding->code == code &&
1778  binding->mods == mods &&
1779  binding->context == context) {
1780  delete (KeyBinding *)keyBindings->del(i);
1781  break;
1782  }
1783  }
1784 }
1785 
1787  int *code, int *mods, int *context,
1788  const char *cmdName,
1789  GList *tokens, GString *fileName, int line) {
1790  char *p0;
1791  int btn;
1792 
1793  *mods = xpdfKeyModNone;
1794  p0 = modKeyStr->getCString();
1795  while (1) {
1796  if (!strncmp(p0, "shift-", 6)) {
1797  *mods |= xpdfKeyModShift;
1798  p0 += 6;
1799  } else if (!strncmp(p0, "ctrl-", 5)) {
1800  *mods |= xpdfKeyModCtrl;
1801  p0 += 5;
1802  } else if (!strncmp(p0, "alt-", 4)) {
1803  *mods |= xpdfKeyModAlt;
1804  p0 += 4;
1805  } else {
1806  break;
1807  }
1808  }
1809 
1810  if (!strcmp(p0, "space")) {
1811  *code = ' ';
1812  } else if (!strcmp(p0, "tab")) {
1813  *code = xpdfKeyCodeTab;
1814  } else if (!strcmp(p0, "return")) {
1816  } else if (!strcmp(p0, "enter")) {
1818  } else if (!strcmp(p0, "backspace")) {
1820  } else if (!strcmp(p0, "esc")) {
1821  *code = xpdfKeyCodeEsc;
1822  } else if (!strcmp(p0, "insert")) {
1824  } else if (!strcmp(p0, "delete")) {
1826  } else if (!strcmp(p0, "home")) {
1827  *code = xpdfKeyCodeHome;
1828  } else if (!strcmp(p0, "end")) {
1829  *code = xpdfKeyCodeEnd;
1830  } else if (!strcmp(p0, "pgup")) {
1831  *code = xpdfKeyCodePgUp;
1832  } else if (!strcmp(p0, "pgdn")) {
1833  *code = xpdfKeyCodePgDn;
1834  } else if (!strcmp(p0, "left")) {
1835  *code = xpdfKeyCodeLeft;
1836  } else if (!strcmp(p0, "right")) {
1838  } else if (!strcmp(p0, "up")) {
1839  *code = xpdfKeyCodeUp;
1840  } else if (!strcmp(p0, "down")) {
1841  *code = xpdfKeyCodeDown;
1842  } else if (p0[0] == 'f' && p0[1] >= '1' && p0[1] <= '9' && !p0[2]) {
1843  *code = xpdfKeyCodeF1 + (p0[1] - '1');
1844  } else if (p0[0] == 'f' &&
1845  ((p0[1] >= '1' && p0[1] <= '2' && p0[2] >= '0' && p0[2] <= '9') ||
1846  (p0[1] == '3' && p0[2] >= '0' && p0[2] <= '5')) &&
1847  !p0[3]) {
1848  *code = xpdfKeyCodeF1 + 10 * (p0[1] - '0') + (p0[2] - '0') - 1;
1849  } else if (!strncmp(p0, "mousePress", 10) &&
1850  p0[10] >= '0' && p0[10] <= '9' &&
1851  (!p0[11] || (p0[11] >= '0' && p0[11] <= '9' && !p0[12])) &&
1852  (btn = atoi(p0 + 10)) >= 1 && btn <= 32) {
1853  *code = xpdfKeyCodeMousePress1 + btn - 1;
1854  } else if (!strncmp(p0, "mouseRelease", 12) &&
1855  p0[12] >= '0' && p0[12] <= '9' &&
1856  (!p0[13] || (p0[13] >= '0' && p0[13] <= '9' && !p0[14])) &&
1857  (btn = atoi(p0 + 12)) >= 1 && btn <= 32) {
1858  *code = xpdfKeyCodeMouseRelease1 + btn - 1;
1859  } else if (!strncmp(p0, "mouseClick", 10) &&
1860  p0[10] >= '0' && p0[10] <= '9' &&
1861  (!p0[11] || (p0[11] >= '0' && p0[11] <= '9' && !p0[12])) &&
1862  (btn = atoi(p0 + 10)) >= 1 && btn <= 32) {
1863  *code = xpdfKeyCodeMouseClick1 + btn - 1;
1864  } else if (!strncmp(p0, "mouseDoubleClick", 16) &&
1865  p0[16] >= '0' && p0[16] <= '9' &&
1866  (!p0[17] || (p0[17] >= '0' && p0[17] <= '9' && !p0[18])) &&
1867  (btn = atoi(p0 + 16)) >= 1 && btn <= 32) {
1868  *code = xpdfKeyCodeMouseDoubleClick1 + btn - 1;
1869  } else if (!strncmp(p0, "mouseTripleClick", 16) &&
1870  p0[16] >= '0' && p0[16] <= '9' &&
1871  (!p0[17] || (p0[17] >= '0' && p0[17] <= '9' && !p0[18])) &&
1872  (btn = atoi(p0 + 16)) >= 1 && btn <= 32) {
1873  *code = xpdfKeyCodeMouseTripleClick1 + btn - 1;
1874  } else if (*p0 >= 0x20 && *p0 <= 0x7e && !p0[1]) {
1875  *code = (int)*p0;
1876  } else {
1877  error(errConfig, -1,
1878  "Bad key/modifier in '{0:s}' config file command ({1:t}:{2:d})",
1879  cmdName, fileName, line);
1880  return gFalse;
1881  }
1882 
1883  p0 = contextStr->getCString();
1884  if (!strcmp(p0, "any")) {
1886  } else {
1888  while (1) {
1889  if (!strncmp(p0, "fullScreen", 10)) {
1891  p0 += 10;
1892  } else if (!strncmp(p0, "window", 6)) {
1894  p0 += 6;
1895  } else if (!strncmp(p0, "continuous", 10)) {
1897  p0 += 10;
1898  } else if (!strncmp(p0, "singlePage", 10)) {
1900  p0 += 10;
1901  } else if (!strncmp(p0, "overLink", 8)) {
1903  p0 += 8;
1904  } else if (!strncmp(p0, "offLink", 7)) {
1906  p0 += 7;
1907  } else if (!strncmp(p0, "outline", 7)) {
1909  p0 += 7;
1910  } else if (!strncmp(p0, "mainWin", 7)) {
1912  p0 += 7;
1913  } else if (!strncmp(p0, "scrLockOn", 9)) {
1915  p0 += 9;
1916  } else if (!strncmp(p0, "scrLockOff", 10)) {
1918  p0 += 10;
1919  } else {
1920  error(errConfig, -1,
1921  "Bad context in '{0:s}' config file command ({1:t}:{2:d})",
1922  cmdName, fileName, line);
1923  return gFalse;
1924  }
1925  if (!*p0) {
1926  break;
1927  }
1928  if (*p0 != ',') {
1929  error(errConfig, -1,
1930  "Bad context in '{0:s}' config file command ({1:t}:{2:d})",
1931  cmdName, fileName, line);
1932  return gFalse;
1933  }
1934  ++p0;
1935  }
1936  }
1937 
1938  return gTrue;
1939 }
1940 
1942  GString *fileName, int line) {
1943  GList *cmds;
1944  int i;
1945 
1946  if (tokens->getLength() < 3) {
1947  error(errConfig, -1,
1948  "Bad 'popupMenuCmd' config file command ({0:t}:{1:d})",
1949  fileName, line);
1950  return;
1951  }
1952  cmds = new GList();
1953  for (i = 2; i < tokens->getLength(); ++i) {
1954  cmds->append(((GString *)tokens->get(i))->copy());
1955  }
1956  popupMenuCmds->append(new PopupMenuCmd(((GString *)tokens->get(1))->copy(),
1957  cmds));
1958 }
1959 
1960 void GlobalParams::parseYesNo(const char *cmdName, GBool *flag,
1961  GList *tokens, GString *fileName, int line) {
1962  GString *tok;
1963 
1964  if (tokens->getLength() != 2) {
1965  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
1966  cmdName, fileName, line);
1967  return;
1968  }
1969  tok = (GString *)tokens->get(1);
1970  if (!parseYesNo2(tok->getCString(), flag)) {
1971  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
1972  cmdName, fileName, line);
1973  }
1974 }
1975 
1977  if (!strcmp(token, "yes")) {
1978  *flag = gTrue;
1979  } else if (!strcmp(token, "no")) {
1980  *flag = gFalse;
1981  } else {
1982  return gFalse;
1983  }
1984  return gTrue;
1985 }
1986 
1987 void GlobalParams::parseString(const char *cmdName, GString **s,
1988  GList *tokens, GString *fileName, int line) {
1989  if (tokens->getLength() != 2) {
1990  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
1991  cmdName, fileName, line);
1992  return;
1993  }
1994  if (*s) {
1995  delete *s;
1996  }
1997  *s = ((GString *)tokens->get(1))->copy();
1998 }
1999 
2000 void GlobalParams::parseInteger(const char *cmdName, int *val,
2001  GList *tokens, GString *fileName, int line) {
2002  GString *tok;
2003  int i;
2004 
2005  if (tokens->getLength() != 2) {
2006  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2007  cmdName, fileName, line);
2008  return;
2009  }
2010  tok = (GString *)tokens->get(1);
2011  if (tok->getLength() == 0) {
2012  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2013  cmdName, fileName, line);
2014  return;
2015  }
2016  if (tok->getChar(0) == '-') {
2017  i = 1;
2018  } else {
2019  i = 0;
2020  }
2021  for (; i < tok->getLength(); ++i) {
2022  if (tok->getChar(i) < '0' || tok->getChar(i) > '9') {
2023  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2024  cmdName, fileName, line);
2025  return;
2026  }
2027  }
2028  *val = atoi(tok->getCString());
2029 }
2030 
2031 void GlobalParams::parseFloat(const char *cmdName, double *val,
2032  GList *tokens, GString *fileName, int line) {
2033  GString *tok;
2034  int i;
2035 
2036  if (tokens->getLength() != 2) {
2037  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2038  cmdName, fileName, line);
2039  return;
2040  }
2041  tok = (GString *)tokens->get(1);
2042  if (tok->getLength() == 0) {
2043  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2044  cmdName, fileName, line);
2045  return;
2046  }
2047  if (tok->getChar(0) == '-') {
2048  i = 1;
2049  } else {
2050  i = 0;
2051  }
2052  for (; i < tok->getLength(); ++i) {
2053  if (!((tok->getChar(i) >= '0' && tok->getChar(i) <= '9') ||
2054  tok->getChar(i) == '.')) {
2055  error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
2056  cmdName, fileName, line);
2057  return;
2058  }
2059  }
2060  *val = atof(tok->getCString());
2061 }
2062 
2064  GHashIter *iter;
2065  GString *key;
2066  GList *list;
2067 
2069 
2070  delete macRomanReverseMap;
2071 
2072  delete baseDir;
2074  delete nameToUnicode;
2080  delete unicodeRemapping;
2085  delete sysFonts;
2089  delete textEncoding;
2090  delete initialZoom;
2091  delete initialDisplayMode;
2092  delete initialSelectMode;
2093  if (paperColor) {
2094  delete paperColor;
2095  }
2096  if (matteColor) {
2097  delete matteColor;
2098  }
2099  if (fullScreenMatteColor) {
2100  delete fullScreenMatteColor;
2101  }
2102  if (selectionColor) {
2103  delete selectionColor;
2104  }
2105  if (launchCommand) {
2106  delete launchCommand;
2107  }
2108  if (movieCommand) {
2109  delete movieCommand;
2110  }
2111  if (defaultPrinter) {
2112  delete defaultPrinter;
2113  }
2114  delete droppedFonts;
2117  delete tabStateFile;
2118 
2119  cMapDirs->startIter(&iter);
2120  while (cMapDirs->getNext(&iter, &key, (void **)&list)) {
2122  }
2123  delete cMapDirs;
2124 
2125  delete cidToUnicodeCache;
2126  delete unicodeToUnicodeCache;
2127  delete unicodeMapCache;
2128  delete cMapCache;
2129 
2130 #if MULTITHREADED
2131  gDestroyMutex(&mutex);
2134 #endif
2135 }
2136 
2137 //------------------------------------------------------------------------
2138 
2139 void GlobalParams::setBaseDir(const char *dir) {
2140  delete baseDir;
2141  baseDir = new GString(dir);
2142 }
2143 
2144 #ifdef _WIN32
2145 static void getWinFontDir(char *winFontDir) {
2146  HMODULE shell32Lib;
2147  BOOL (__stdcall *SHGetSpecialFolderPathFunc)(HWND hwndOwner,
2148  LPSTR lpszPath,
2149  int nFolder,
2150  BOOL fCreate);
2151  char *p;
2152  int i;
2153 
2154  // SHGetSpecialFolderPath isn't available in older versions of
2155  // shell32.dll (Win95 and WinNT4), so do a dynamic load
2156  winFontDir[0] = '\0';
2157  if ((shell32Lib = LoadLibraryA("shell32.dll"))) {
2158  if ((SHGetSpecialFolderPathFunc =
2159  (BOOL (__stdcall *)(HWND hwndOwner, LPSTR lpszPath,
2160  int nFolder, BOOL fCreate))
2161  GetProcAddress(shell32Lib, "SHGetSpecialFolderPathA"))) {
2162  if (!(*SHGetSpecialFolderPathFunc)(NULL, winFontDir,
2163  CSIDL_FONTS, FALSE)) {
2164  winFontDir[0] = '\0';
2165  }
2166  // kludge: Terminal Server changes CSIDL_FONTS to something like
2167  // "C:\Users\whatever\Windows\Fonts", which doesn't actually
2168  // contain any fonts -- kill that, so we hit the fallback code
2169  // below.
2170  for (p = winFontDir; *p; ++p) {
2171  if (!strncasecmp(p, "\\Users\\", 7)) {
2172  winFontDir[0] = '\0';
2173  break;
2174  }
2175  }
2176  }
2177  FreeLibrary(shell32Lib);
2178  }
2179  // if something went wrong, or we're on a Terminal Server, try using
2180  // %SYSTEMROOT%\Fonts
2181  if (!winFontDir[0]) {
2182  GetSystemWindowsDirectoryA(winFontDir, MAX_PATH - 6);
2183  winFontDir[MAX_PATH - 7] = '\0';
2184  i = (int)strlen(winFontDir);
2185  if (winFontDir[i-1] != '\\') {
2186  winFontDir[i++] = '\\';
2187  }
2188  strcpy(winFontDir + i, "Fonts");
2189  }
2190 }
2191 #endif
2192 
2193 #ifdef __APPLE__
2194 // Apple dfonts and ttc fonts seem to randomly and interchangeably use
2195 // space and hyphen, and sometimes drop the separator entirely.
2196 static GBool macFontNameMatches(GString *name1, const char *name2) {
2197  const char *p1, *p2;
2198  char c1, c2;
2199 
2200  p1 = name1->getCString();
2201  p2 = name2;
2202  while (*p1 && *p2) {
2203  c1 = *p1;
2204  c2 = *p2;
2205  if (c2 == ' ') {
2206  // * space or hyphen matches a space in the pattern
2207  // * separators can also be dropped, in which case we move to
2208  // the next char in the pattern
2209  if (c1 == ' ' || c1 == '-') {
2210  ++p1;
2211  }
2212  } else {
2213  if (c1 != c2) {
2214  return gFalse;
2215  }
2216  ++p1;
2217  }
2218  ++p2;
2219  }
2220  if (*p1 || *p2) {
2221  return gFalse;
2222  }
2223  return gTrue;
2224 }
2225 #endif
2226 
2228  GString *fontName;
2229  GString *fileName;
2230  int fontNum;
2231  const char *s;
2232  Base14FontInfo *base14;
2233 #ifdef _WIN32
2234  char winFontDir[MAX_PATH];
2235 #endif
2236 #ifdef __APPLE__
2237  static const char *macFontExts[3] = { "dfont", "ttc", "ttf" };
2238  GList *dfontFontNames;
2239  GBool found;
2240  int k;
2241 #endif
2242  FILE *f;
2243  int i, j;
2244 
2245 #ifdef _WIN32
2246  getWinFontDir(winFontDir);
2247 #endif
2248 #ifdef __APPLE__
2249  dfontFontNames = NULL;
2250 #endif
2251  for (i = 0; displayFontTab[i].name; ++i) {
2252  if (fontFiles->lookup(displayFontTab[i].name)) {
2253  continue;
2254  }
2255  fontName = new GString(displayFontTab[i].name);
2256  fileName = NULL;
2257  fontNum = 0;
2258  if (dir) {
2260  if ((f = fopen(fileName->getCString(), "rb"))) {
2261  fclose(f);
2262  } else {
2263  delete fileName;
2264  fileName = NULL;
2265  }
2266  }
2267 #ifdef _WIN32
2268  if (!fileName && winFontDir[0] && displayFontTab[i].ttFileName) {
2269  fileName = appendToPath(new GString(winFontDir),
2271  if ((f = fopen(fileName->getCString(), "rb"))) {
2272  fclose(f);
2273  } else {
2274  delete fileName;
2275  fileName = NULL;
2276  }
2277  }
2278 #endif
2279 #ifdef __APPLE__
2280  // Check for Mac OS X system fonts.
2281  s = displayFontTab[i].macFileName;
2282  if (dfontFontNames && i > 0 &&
2283  (!s || strcmp(s, displayFontTab[i-1].macFileName))) {
2284  deleteGList(dfontFontNames, GString);
2285  dfontFontNames = NULL;
2286  }
2287  if (!fileName && s) {
2288  for (j = 0; j < 3; ++j) {
2289  fileName = GString::format("{0:s}/{1:s}.{2:s}",
2290  macSystemFontPath, s, macFontExts[j]);
2291  if (!(f = fopen(fileName->getCString(), "rb"))) {
2292  delete fileName;
2293  fileName = NULL;
2294  } else {
2295  fclose(f);
2296  found = gFalse;
2297  // for .dfont or .ttc, we need to scan the font list
2298  if (j < 2) {
2299  if (!dfontFontNames) {
2300  dfontFontNames =
2301  FoFiIdentifier::getFontList(fileName->getCString());
2302  }
2303  if (dfontFontNames) {
2304  for (k = 0; k < dfontFontNames->getLength(); ++k) {
2305  if (macFontNameMatches((GString *)dfontFontNames->get(k),
2306  displayFontTab[i].macFontName)) {
2307  fontNum = k;
2308  found = gTrue;
2309  break;
2310  }
2311  }
2312  }
2313  // for .ttf, we just use the font
2314  } else {
2315  found = gTrue;
2316  }
2317  if (!found) {
2318  delete fileName;
2319  fileName = NULL;
2320  }
2321  break;
2322  }
2323  }
2324  }
2325 #endif // __APPLE__
2326  // On Linux, this checks the "standard" ghostscript font
2327  // directories. On Windows, it checks the "standard" system font
2328  // directories (because SHGetSpecialFolderPath(CSIDL_FONTS)
2329  // doesn't work on Win 2k Server or Win2003 Server, or with older
2330  // versions of shell32.dll).
2331 #ifdef _WIN32
2332  s = displayFontTab[i].ttFileName;
2333 #else
2334  s = displayFontTab[i].t1FileName;
2335 #endif
2336  if (!fileName && s) {
2337  for (j = 0; !fileName && displayFontDirs[j]; ++j) {
2339  if ((f = fopen(fileName->getCString(), "rb"))) {
2340  fclose(f);
2341  } else {
2342  delete fileName;
2343  fileName = NULL;
2344  }
2345  }
2346  }
2347  if (!fileName) {
2348  delete fontName;
2349  continue;
2350  }
2351  base14SysFonts->add(fontName, new Base14FontInfo(fileName, fontNum, 0));
2352  }
2353 #ifdef __APPLE__
2354  if (dfontFontNames) {
2355  deleteGList(dfontFontNames, GString);
2356  }
2357 #endif
2358  for (i = 0; displayFontTab[i].name; ++i) {
2359  if (!base14SysFonts->lookup(displayFontTab[i].name) &&
2360  !fontFiles->lookup(displayFontTab[i].name)) {
2361  if (displayFontTab[i].obliqueFont &&
2362  ((base14 = (Base14FontInfo *)base14SysFonts
2365  new GString(displayFontTab[i].name),
2366  new Base14FontInfo(base14->fileName->copy(),
2367  base14->fontNum,
2368  displayFontTab[i].obliqueFactor));
2369  } else {
2370 // Do not display unnecessary looking message on W32
2371 #ifndef _WIN32
2372  error(errConfig, -1, "No display font for '{0:s}'",
2373  displayFontTab[i].name);
2374 #endif
2375  }
2376  }
2377  }
2378 #ifdef _WIN32
2379  if (winFontDir[0]) {
2380  sysFonts->scanWindowsFonts(winFontDir);
2381  }
2382 #endif
2383 #if HAVE_FONTCONFIG
2384  sysFonts->scanFontconfigFonts();
2385 #endif
2386 }
2387 
2388 //------------------------------------------------------------------------
2389 // accessors
2390 //------------------------------------------------------------------------
2391 
2393  // no need to lock - macRomanReverseMap is constant
2394  return macRomanReverseMap->lookup(charName);
2395 }
2396 
2398  GString *s;
2399 
2401  s = baseDir->copy();
2403  return s;
2404 }
2405 
2407  // no need to lock - nameToUnicode is constant
2408  return nameToUnicode->lookup(charName);
2409 }
2410 
2412  UnicodeMap *map;
2413 
2415  map = (UnicodeMap *)residentUnicodeMaps->lookup(encodingName);
2417  if (map) {
2418  map->incRefCnt();
2419  }
2420  return map;
2421 }
2422 
2424  GString *fileName;
2425  FILE *f;
2426 
2428  if ((fileName = (GString *)unicodeMaps->lookup(encodingName))) {
2429  f = openFile(fileName->getCString(), "r");
2430  } else {
2431  f = NULL;
2432  }
2434  return f;
2435 }
2436 
2438  GList *list;
2439  GString *dir;
2440  GString *fileName;
2441  FILE *f;
2442  int i;
2443 
2445  if (!(list = (GList *)cMapDirs->lookup(collection))) {
2447  return NULL;
2448  }
2449  for (i = 0; i < list->getLength(); ++i) {
2450  dir = (GString *)list->get(i);
2451  fileName = appendToPath(dir->copy(), cMapName->getCString());
2452  f = openFile(fileName->getCString(), "r");
2453  delete fileName;
2454  if (f) {
2456  return f;
2457  }
2458  }
2460  return NULL;
2461 }
2462 
2464  GString *dir, *fileName;
2465  FILE *f;
2466  int i;
2467 
2469  for (i = 0; i < toUnicodeDirs->getLength(); ++i) {
2470  dir = (GString *)toUnicodeDirs->get(i);
2471  fileName = appendToPath(dir->copy(), name->getCString());
2472  f = openFile(fileName->getCString(), "r");
2473  delete fileName;
2474  if (f) {
2476  return f;
2477  }
2478  }
2480  return NULL;
2481 }
2482 
2484  return unicodeRemapping;
2485 }
2486 
2488  static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc", ".otf" };
2489  GString *path, *dir;
2490 #ifdef _WIN32
2491  GString *fontNameU;
2492 #endif
2493  const char *ext;
2494  FILE *f;
2495  int i, j;
2496 
2498  if ((path = (GString *)fontFiles->lookup(fontName))) {
2499  path = path->copy();
2501  return path;
2502  }
2503  for (i = 0; i < fontDirs->getLength(); ++i) {
2504  dir = (GString *)fontDirs->get(i);
2505  for (j = 0; j < (int)(sizeof(exts) / sizeof(exts[0])); ++j) {
2506  ext = exts[j];
2507 #ifdef _WIN32
2508  fontNameU = fileNameToUTF8(fontName->getCString());
2509  path = appendToPath(dir->copy(), fontNameU->getCString());
2510  delete fontNameU;
2511 #else
2512  path = appendToPath(dir->copy(), fontName->getCString());
2513 #endif
2514  path->append(ext);
2515  if ((f = openFile(path->getCString(), "rb"))) {
2516  fclose(f);
2518  return path;
2519  }
2520  delete path;
2521  }
2522  }
2524  return NULL;
2525 }
2526 
2528  double *oblique) {
2529  Base14FontInfo *fi;
2530  GString *path;
2531 
2533  if ((fi = (Base14FontInfo *)base14SysFonts->lookup(fontName))) {
2534  path = fi->fileName->copy();
2535  *fontNum = fi->fontNum;
2536  *oblique = fi->oblique;
2538  return path;
2539  }
2541  *fontNum = 0;
2542  *oblique = 0;
2543  return findFontFile(fontName);
2544 }
2545 
2547  SysFontType *type,
2548  int *fontNum) {
2549  SysFontInfo *fi;
2550  GString *path;
2551 
2552  path = NULL;
2554  if ((fi = sysFonts->find(fontName))) {
2555  path = fi->path->copy();
2556  *type = fi->type;
2557  *fontNum = fi->fontNum;
2558  }
2560  return path;
2561 }
2562 
2564  GString *path;
2565 
2567  if ((path = (GString *)ccFontFiles->lookup(collection))) {
2568  path = path->copy();
2569  }
2571  return path;
2572 }
2573 
2575  int w;
2576 
2578  w = psPaperWidth;
2580  return w;
2581 }
2582 
2584  int h;
2585 
2587  h = psPaperHeight;
2589  return h;
2590 }
2591 
2592 void GlobalParams::getPSImageableArea(int *llx, int *lly, int *urx, int *ury) {
2594  *llx = psImageableLLX;
2595  *lly = psImageableLLY;
2596  *urx = psImageableURX;
2597  *ury = psImageableURY;
2599 }
2600 
2602  GBool f;
2603 
2605  f = psCrop;
2607  return f;
2608 }
2609 
2611  GBool f;
2612 
2616  return f;
2617 }
2618 
2620  GBool f;
2621 
2623  f = psExpandSmaller;
2625  return f;
2626 }
2627 
2629  GBool f;
2630 
2632  f = psShrinkLarger;
2634  return f;
2635 }
2636 
2638  GBool f;
2639 
2641  f = psCenter;
2643  return f;
2644 }
2645 
2647  GBool d;
2648 
2650  d = psDuplex;
2652  return d;
2653 }
2654 
2656  PSLevel level;
2657 
2659  level = psLevel;
2661  return level;
2662 }
2663 
2665  GString *psName;
2666 
2668  if ((psName = (GString *)psResidentFonts->lookup(fontName))) {
2669  psName = psName->copy();
2670  }
2672  return psName;
2673 }
2674 
2676  GList *names;
2677  GHashIter *iter;
2678  GString *name;
2679  GString *psName;
2680 
2681  names = new GList();
2683  psResidentFonts->startIter(&iter);
2684  while (psResidentFonts->getNext(&iter, &name, (void **)&psName)) {
2685  names->append(psName->copy());
2686  }
2688  return names;
2689 }
2690 
2692  int wMode) {
2693  PSFontParam16 *p;
2694  int i;
2695 
2697  p = NULL;
2698  for (i = 0; i < psResidentFonts16->getLength(); ++i) {
2700  if (!(p->name->cmp(fontName)) && p->wMode == wMode) {
2701  break;
2702  }
2703  p = NULL;
2704  }
2706  return p;
2707 }
2708 
2710  int wMode) {
2711  PSFontParam16 *p;
2712  int i;
2713 
2715  p = NULL;
2716  for (i = 0; i < psResidentFontsCC->getLength(); ++i) {
2718  if (!(p->name->cmp(collection)) && p->wMode == wMode) {
2719  break;
2720  }
2721  p = NULL;
2722  }
2724  return p;
2725 }
2726 
2728  GBool e;
2729 
2731  e = psEmbedType1;
2733  return e;
2734 }
2735 
2737  GBool e;
2738 
2740  e = psEmbedTrueType;
2742  return e;
2743 }
2744 
2746  GBool e;
2747 
2751  return e;
2752 }
2753 
2755  GBool e;
2756 
2760  return e;
2761 }
2762 
2764  GBool e;
2765 
2767  e = psFontPassthrough;
2769  return e;
2770 }
2771 
2773  GBool preload;
2774 
2776  preload = psPreload;
2778  return preload;
2779 }
2780 
2782  GBool opi;
2783 
2785  opi = psOPI;
2787  return opi;
2788 }
2789 
2791  GBool ah;
2792 
2794  ah = psASCIIHex;
2796  return ah;
2797 }
2798 
2800  GBool ah;
2801 
2803  ah = psLZW;
2805  return ah;
2806 }
2807 
2809  GBool ah;
2810 
2814  return ah;
2815 }
2816 
2818  double w;
2819 
2821  w = psMinLineWidth;
2823  return w;
2824 }
2825 
2827  double res;
2828 
2832  return res;
2833 }
2834 
2836  GBool mono;
2837 
2839  mono = psRasterMono;
2841  return mono;
2842 }
2843 
2845  int slice;
2846 
2848  slice = psRasterSliceSize;
2850  return slice;
2851 }
2852 
2854  GBool rast;
2855 
2857  rast = psAlwaysRasterize;
2859  return rast;
2860 }
2861 
2863  GBool rast;
2864 
2866  rast = psNeverRasterize;
2868  return rast;
2869 }
2870 
2872  GString *s;
2873 
2875  s = textEncoding->copy();
2877  return s;
2878 }
2879 
2881  GList *list; // [GString]
2882  GHashIter *iter;
2883  GString *key;
2884  void *val;
2885 
2886  list = new GList();
2889  while (residentUnicodeMaps->getNext(&iter, &key, &val)) {
2890  list->append(key->copy());
2891  }
2892  unicodeMaps->startIter(&iter);
2893  while (unicodeMaps->getNext(&iter, &key, &val)) {
2894  list->append(key->copy());
2895  }
2897  return list;
2898 }
2899 
2902 
2904  eol = textEOL;
2906  return eol;
2907 }
2908 
2910  GBool pageBreaks;
2911 
2913  pageBreaks = textPageBreaks;
2915  return pageBreaks;
2916 }
2917 
2919  GBool tiny;
2920 
2922  tiny = textKeepTinyChars;
2924  return tiny;
2925 }
2926 
2928  GString *s;
2929 
2931  s = initialZoom->copy();
2933  return s;
2934 }
2935 
2937  int z;
2938 
2940  z = defaultFitZoom;
2942  return z;
2943 }
2944 
2946  GString *s;
2947 
2949  s = initialDisplayMode->copy();
2951  return s;
2952 }
2953 
2955  GBool state;
2956 
2960  return state;
2961 }
2962 
2964  GBool state;
2965 
2969  return state;
2970 }
2971 
2973  int w;
2974 
2978  return w;
2979 }
2980 
2982  GString *s;
2983 
2985  s = initialSelectMode->copy();
2987  return s;
2988 }
2989 
2991  int w;
2992 
2994  w = maxTileWidth;
2996  return w;
2997 }
2998 
3000  int h;
3001 
3003  h = maxTileHeight;
3005  return h;
3006 }
3007 
3009  int n;
3010 
3012  n = tileCacheSize;
3014  return n;
3015 }
3016 
3018  int n;
3019 
3021  n = workerThreads;
3023  return n;
3024 }
3025 
3027  GBool f;
3028 
3030  f = enableFreeType;
3032  return f;
3033 }
3034 
3036  GBool f;
3037 
3041  return f;
3042 }
3043 
3044 
3046  GBool f;
3047 
3049  f = antialias;
3051  return f;
3052 }
3053 
3055  GBool f;
3056 
3058  f = vectorAntialias;
3060  return f;
3061 }
3062 
3064  GBool f;
3065 
3067  f = antialiasPrinting;
3069  return f;
3070 }
3071 
3074 
3076  mode = strokeAdjust;
3078  return mode;
3079 }
3080 
3082  ScreenType t;
3083 
3085  t = screenType;
3087  return t;
3088 }
3089 
3091  int size;
3092 
3094  size = screenSize;
3096  return size;
3097 }
3098 
3100  int r;
3101 
3103  r = screenDotRadius;
3105  return r;
3106 }
3107 
3109  double gamma;
3110 
3112  gamma = screenGamma;
3114  return gamma;
3115 }
3116 
3118  double thresh;
3119 
3123  return thresh;
3124 }
3125 
3127  double thresh;
3128 
3132  return thresh;
3133 }
3134 
3136  double w;
3137 
3139  w = minLineWidth;
3141  return w;
3142 }
3143 
3145  GBool en;
3146 
3150  return en;
3151 }
3152 
3154  GBool draw;
3155 
3159  return draw;
3160 }
3161 
3163  GBool draw;
3164 
3166  draw = drawFormFields;
3168  return draw;
3169 }
3170 
3171 
3172 
3174  GString *s;
3175 
3177  s = paperColor->copy();
3179  return s;
3180 }
3181 
3183  GString *s;
3184 
3186  s = matteColor->copy();
3188  return s;
3189 }
3190 
3192  GString *s;
3193 
3197  return s;
3198 }
3199 
3201  GString *s;
3202 
3204  s = selectionColor->copy();
3206  return s;
3207 }
3208 
3210  GBool invert;
3211 
3215  return invert;
3216 }
3217 
3219  GString *s;
3220 
3224  return s;
3225 }
3226 
3228  GBool map;
3229 
3233  return map;
3234 }
3235 
3237  GBool map;
3238 
3242  return map;
3243 }
3244 
3246  GBool map;
3247 
3251  return map;
3252 }
3253 
3254 GBool GlobalParams::isDroppedFont(const char *fontName) {
3255  GBool isDropped;
3256 
3258  isDropped = droppedFonts->lookupInt(fontName) != 0;
3260  return isDropped;
3261 }
3262 
3265  GList *cmds;
3266  int modMask;
3267  int i, j;
3268 
3270  cmds = NULL;
3271  // for ASCII chars, ignore the shift modifier
3272  modMask = (code >= 0x21 && code <= 0xff) ? ~xpdfKeyModShift : ~0;
3273  for (i = 0; i < keyBindings->getLength(); ++i) {
3275  if (binding->code == code &&
3276  (binding->mods & modMask) == (mods & modMask) &&
3277  (~binding->context | context) == ~0) {
3278  cmds = new GList();
3279  for (j = 0; j < binding->cmds->getLength(); ++j) {
3280  cmds->append(((GString *)binding->cmds->get(j))->copy());
3281  }
3282  break;
3283  }
3284  }
3286  return cmds;
3287 }
3288 
3290  return keyBindings;
3291 }
3292 
3294  int n;
3295 
3297  n = popupMenuCmds->getLength();
3299  return n;
3300 }
3301 
3303  PopupMenuCmd *cmd;
3304 
3306  if (idx < popupMenuCmds->getLength()) {
3308  } else {
3309  cmd = NULL;
3310  }
3312  return cmd;
3313 }
3314 
3316  GString *s;
3317 
3319  s = tabStateFile->copy();
3321  return s;
3322 }
3323 
3325  GBool p;
3326 
3328  p = printCommands;
3330  return p;
3331 }
3332 
3334  // no locking -- this function may get called from inside a locked
3335  // section
3336  return errQuiet;
3337 }
3338 
3340  return debugLogFile;
3341 }
3342 
3343 void GlobalParams::debugLogPrintf(const char *fmt, ...) {
3344  GString *path;
3345  FILE *f;
3346  GBool needClose;
3347  time_t t;
3348  struct tm tm;
3349  va_list args;
3350 
3351  if (!(path = getDebugLogFile())) {
3352  return;
3353  }
3354  needClose = gFalse;
3355  if (!path->cmp("-")) {
3356  f = stdout;
3357  } else if (!path->cmp("+")) {
3358  f = stderr;
3359  } else {
3360  f = fopen(path->getCString(), "a");
3361  needClose = gTrue;
3362  }
3363  if (!f) {
3364  return;
3365  }
3366  t = time(NULL);
3367 #ifdef _WIN32
3368  localtime_s(&tm, &t);
3369 #else
3370  localtime_r(&t, &tm);
3371 #endif
3372  fprintf(f, "[%04d-%02d-%02d %02d:%02d:%02d] ",
3373  tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
3374  tm.tm_hour, tm.tm_min, tm.tm_sec);
3375  va_start(args, fmt);
3376  vfprintf(f, fmt, args);
3377  va_end(args);
3378  fflush(f);
3379  if (needClose) {
3380  fclose(f);
3381  }
3382 }
3383 
3385  GString *fileName;
3386  CharCodeToUnicode *ctu;
3387 
3389  if (!(ctu = cidToUnicodeCache->getCharCodeToUnicode(collection))) {
3390  if ((fileName = (GString *)cidToUnicodes->lookup(collection)) &&
3391  (ctu = CharCodeToUnicode::parseCIDToUnicode(fileName, collection))) {
3392  cidToUnicodeCache->add(ctu);
3393  }
3394  }
3396  return ctu;
3397 }
3398 
3400  CharCodeToUnicode *ctu;
3401  GHashIter *iter;
3402  GString *fontPattern, *fileName;
3403 
3405  fileName = NULL;
3406  unicodeToUnicodes->startIter(&iter);
3407  while (unicodeToUnicodes->getNext(&iter, &fontPattern, (void **)&fileName)) {
3408  if (strstr(fontName->getCString(), fontPattern->getCString())) {
3409  unicodeToUnicodes->killIter(&iter);
3410  break;
3411  }
3412  fileName = NULL;
3413  }
3414  if (fileName) {
3417  unicodeToUnicodeCache->add(ctu);
3418  }
3419  }
3420  } else {
3421  ctu = NULL;
3422  }
3424  return ctu;
3425 }
3426 
3428  return getUnicodeMap2(encodingName);
3429 }
3430 
3432  UnicodeMap *map;
3433 
3434  if (!(map = getResidentUnicodeMap(encodingName))) {
3436  map = unicodeMapCache->getUnicodeMap(encodingName);
3438  }
3439  return map;
3440 }
3441 
3442 CMap *GlobalParams::getCMap(GString *collection, GString *cMapName) {
3443  CMap *cMap;
3444 
3445  lockCMapCache;
3446  cMap = cMapCache->getCMap(collection, cMapName);
3448  return cMap;
3449 }
3450 
3452  return getUnicodeMap2(textEncoding);
3453 }
3454 
3455 //------------------------------------------------------------------------
3456 // functions to set parameters
3457 //------------------------------------------------------------------------
3458 
3461 }
3462 
3465  fontFiles->add(fontName, path);
3467 }
3468 
3471  if (!strcmp(size, "match")) {
3472  psPaperWidth = psPaperHeight = -1;
3473  } else if (!strcmp(size, "letter")) {
3474  psPaperWidth = 612;
3475  psPaperHeight = 792;
3476  } else if (!strcmp(size, "legal")) {
3477  psPaperWidth = 612;
3478  psPaperHeight = 1008;
3479  } else if (!strcmp(size, "A4")) {
3480  psPaperWidth = 595;
3481  psPaperHeight = 842;
3482  } else if (!strcmp(size, "A3")) {
3483  psPaperWidth = 842;
3484  psPaperHeight = 1190;
3485  } else {
3487  return gFalse;
3488  }
3493  return gTrue;
3494 }
3495 
3498  psPaperWidth = width;
3499  psImageableLLX = 0;
3502 }
3503 
3507  psImageableLLY = 0;
3510 }
3511 
3512 void GlobalParams::setPSImageableArea(int llx, int lly, int urx, int ury) {
3514  psImageableLLX = llx;
3515  psImageableLLY = lly;
3516  psImageableURX = urx;
3517  psImageableURY = ury;
3519 }
3520 
3523  psCrop = crop;
3525 }
3526 
3529  psUseCropBoxAsPage = crop;
3531 }
3532 
3537 }
3538 
3543 }
3544 
3547  psCenter = center;
3549 }
3550 
3553  psDuplex = duplex;
3555 }
3556 
3559  psLevel = level;
3561 }
3562 
3565  psEmbedType1 = embed;
3567 }
3568 
3571  psEmbedTrueType = embed;
3573 }
3574 
3577  psEmbedCIDPostScript = embed;
3579 }
3580 
3583  psEmbedCIDTrueType = embed;
3585 }
3586 
3589  psFontPassthrough = passthrough;
3591 }
3592 
3595  psPreload = preload;
3597 }
3598 
3601  psOPI = opi;
3603 }
3604 
3607  psASCIIHex = hex;
3609 }
3610 
3611 void GlobalParams::setTextEncoding(const char *encodingName) {
3613  delete textEncoding;
3614  textEncoding = new GString(encodingName);
3616 }
3617 
3620  if (!strcmp(s, "unix")) {
3621  textEOL = eolUnix;
3622  } else if (!strcmp(s, "dos")) {
3623  textEOL = eolDOS;
3624  } else if (!strcmp(s, "mac")) {
3625  textEOL = eolMac;
3626  } else {
3628  return gFalse;
3629  }
3631  return gTrue;
3632 }
3633 
3636  textPageBreaks = pageBreaks;
3638 }
3639 
3644 }
3645 
3648  delete initialZoom;
3649  initialZoom = new GString(s);
3651 }
3652 
3654  GBool ok;
3655 
3657  ok = parseYesNo2(s, &enableFreeType);
3659  return ok;
3660 }
3661 
3662 
3664  GBool ok;
3665 
3667  ok = parseYesNo2(s, &antialias);
3669  return ok;
3670 }
3671 
3673  GBool ok;
3674 
3676  ok = parseYesNo2(s, &vectorAntialias);
3678  return ok;
3679 }
3680 
3683  screenType = t;
3685 }
3686 
3689  screenSize = size;
3691 }
3692 
3695  screenDotRadius = r;
3697 }
3698 
3701  screenGamma = gamma;
3703 }
3704 
3709 }
3710 
3715 }
3716 
3719  drawFormFields = draw;
3721 }
3722 
3725  overprintPreview = preview;
3727 }
3728 
3729 
3730 
3735 }
3736 
3741 }
3742 
3747 }
3748 
3749 void GlobalParams::setTabStateFile(char *tabStateFileA) {
3751  delete tabStateFile;
3752  tabStateFile = new GString(tabStateFileA);
3754 }
3755 
3758  printCommands = printCommandsA;
3760 }
3761 
3764  errQuiet = errQuietA;
3766 }
3767 
3768 #ifdef _WIN32
3769 void GlobalParams::setWin32ErrorInfo(const char *func, DWORD code) {
3770  XpdfWin32ErrorInfo *errorInfo;
3771 
3772  if (tlsWin32ErrorInfo == TLS_OUT_OF_INDEXES) {
3773  return;
3774  }
3775  errorInfo = (XpdfWin32ErrorInfo *)TlsGetValue(tlsWin32ErrorInfo);
3776  if (!errorInfo) {
3777  errorInfo = new XpdfWin32ErrorInfo();
3778  TlsSetValue(tlsWin32ErrorInfo, errorInfo);
3779  }
3780  errorInfo->func = func;
3781  errorInfo->code = code;
3782 }
3783 
3784 XpdfWin32ErrorInfo *GlobalParams::getWin32ErrorInfo() {
3785  XpdfWin32ErrorInfo *errorInfo;
3786 
3787  if (tlsWin32ErrorInfo == TLS_OUT_OF_INDEXES) {
3788  return NULL;
3789  }
3790  errorInfo = (XpdfWin32ErrorInfo *)TlsGetValue(tlsWin32ErrorInfo);
3791  if (!errorInfo) {
3792  errorInfo = new XpdfWin32ErrorInfo();
3793  TlsSetValue(tlsWin32ErrorInfo, errorInfo);
3794  errorInfo->func = NULL;
3795  errorInfo->code = 0;
3796  }
3797  return errorInfo;
3798 }
3799 #endif
void freeBuiltinFontTables()
void initBuiltinFontTables()
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
#define deleteGHash(hash, T)
Definition: GHash.h:63
#define deleteGList(list, T)
Definition: GList.h:94
#define gDestroyMutex(m)
Definition: GMutex.h:52
#define gInitMutex(m)
Definition: GMutex.h:51
int mapUCS2(Unicode u, char *buf, int bufSize)
Definition: UTF8.cc:48
int mapUTF8(Unicode u, char *buf, int bufSize)
Definition: UTF8.cc:12
int level
Definition: afm2pl.c:1694
long * italic
Definition: afm2tfm.c:1034
double ury
Definition: aftopl.c:56
int code
Definition: aftopl.c:52
double urx
Definition: aftopl.c:55
double lly
Definition: aftopl.c:54
int lookup(const char *)
double llx
Definition: aftopl.c:53
#define state
Definition: aptex-macros.h:996
#define font
Definition: aptex-macros.h:175
#define match
Definition: aptex-macros.h:359
#define width(a)
Definition: aptex-macros.h:198
#define type(a)
Definition: aptex-macros.h:171
#define height(a)
Definition: aptex-macros.h:200
#define param(a, b)
#define mode
Definition: aptex-macros.h:510
char * p2
Definition: bmpfont.h:62
char * p1
Definition: bmpfont.h:62
#define localtime_r(T, BUF)
Definition: CMap.h:98
CMap * getCMap(GString *collection, GString *cMapName)
Definition: CMap.cc:409
Definition: CMap.h:33
void add(CharCodeToUnicode *ctu)
CharCodeToUnicode * getCharCodeToUnicode(GString *tag)
static CharCodeToUnicode * parseUnicodeToUnicode(GString *fileName)
static CharCodeToUnicode * parseCIDToUnicode(GString *fileName, GString *collection)
static GList * getFontList(char *fileName)
Definition: GHash.h:26
void killIter(GHashIter **iter)
Definition: GHash.cc:311
GBool getNext(GHashIter **iter, GString **key, void **val)
Definition: GHash.cc:271
void startIter(GHashIter **iter)
Definition: GHash.cc:265
void add(GString *key, void *val)
Definition: GHash.cc:67
void * lookup(GString *key)
Definition: GHash.cc:133
void * remove(GString *key)
Definition: GHash.cc:173
int lookupInt(GString *key)
Definition: GHash.cc:143
Definition: GList.h:24
int getLength()
Definition: GList.h:39
void * del(int i)
Definition: GList.cc:85
void append(void *p)
Definition: GList.cc:53
void * get(int i)
Definition: GList.h:48
GString * copy()
Definition: GString.h:42
int cmp(GString *str)
Definition: GString.cc:777
static GString * format(const char *fmt,...)
Definition: GString.cc:189
GString * insert(int i, char c)
Definition: GString.cc:682
char * getCString()
Definition: GString.h:83
int getLength()
Definition: GString.h:80
GString * del(int i, int n=1)
Definition: GString.cc:740
GString * getInitialDisplayMode()
void parseFile(GString *fileName, FILE *f)
NameToCharCode * macRomanReverseMap
Definition: GlobalParams.h:461
GBool parseYesNo2(char *token, GBool *flag)
GList * getKeyBinding(int code, int mods, int context)
static const char * defaultTextEncoding
Definition: GlobalParams.h:411
int getTileCacheSize()
PSLevel getPSLevel()
double screenBlackThreshold
Definition: GlobalParams.h:568
GBool getPSFontPassthrough()
PopupMenuCmd * getPopupMenuCmd(int idx)
void setBaseDir(const char *dir)
GBool getPSEmbedType1()
GHash * base14SysFonts
Definition: GlobalParams.h:492
GBool psEmbedType1
Definition: GlobalParams.h:517
GBool setEnableFreeType(char *s)
GBool reverseVideoInvertImages
Definition: GlobalParams.h:580
void parseYesNo(const char *cmdName, GBool *flag, GList *tokens, GString *fileName, int line)