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)  

GfxFont.cc
Go to the documentation of this file.
1 //========================================================================
2 //
3 // GfxFont.cc
4 //
5 // Copyright 1996-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8 
9 //========================================================================
10 //
11 // Modified under the Poppler project - http://poppler.freedesktop.org
12 //
13 // All changes made under the Poppler project to this file are licensed
14 // under GPL version 2 or later
15 //
16 // Copyright (C) 2005, 2006, 2008-2010, 2012, 2014, 2015, 2017-2020 Albert Astals Cid <aacid@kde.org>
17 // Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
18 // Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
19 // Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
20 // Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
21 // Copyright (C) 2007 Koji Otani <sho@bbr.jp>
22 // Copyright (C) 2007 Ed Catmur <ed@catmur.co.uk>
23 // Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org>
24 // Copyright (C) 2008 Ed Avis <eda@waniasset.com>
25 // Copyright (C) 2008, 2010 Hib Eris <hib@hiberis.nl>
26 // Copyright (C) 2009 Peter Kerzum <kerzum@yandex-team.ru>
27 // Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu>
28 // Copyright (C) 2011 Axel Strübing <axel.struebing@freenet.de>
29 // Copyright (C) 2011, 2012, 2014 Adrian Johnson <ajohnson@redneon.com>
30 // Copyright (C) 2012 Yi Yang <ahyangyi@gmail.com>
31 // Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
32 // Copyright (C) 2012, 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
33 // Copyright (C) 2013-2016, 2018 Jason Crain <jason@aquaticape.us>
34 // Copyright (C) 2014 Olly Betts <olly@survex.com>
35 // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
36 // Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
37 // Copyright (C) 2019 LE GARREC Vincent <legarrec.vincent@gmail.com>
38 //
39 // To see a description of the changes please see the Changelog file that
40 // came with your tarball or type make ChangeLog if you are building from git
41 //
42 //========================================================================
43 
44 #include <config.h>
45 
46 #include <cstdio>
47 #include <cstdlib>
48 #include <cstring>
49 #include <cctype>
50 #include <cmath>
51 #include <climits>
52 #include <algorithm>
53 #include "goo/gmem.h"
54 #include "Error.h"
55 #include "Object.h"
56 #include "Dict.h"
57 #include "GlobalParams.h"
58 #include "CMap.h"
59 #include "CharCodeToUnicode.h"
60 #include "FontEncodingTables.h"
61 #include "BuiltinFont.h"
62 #include "UnicodeTypeTable.h"
63 #include <fofi/FoFiIdentifier.h>
64 #include <fofi/FoFiType1.h>
65 #include <fofi/FoFiType1C.h>
66 #include <fofi/FoFiTrueType.h>
67 #include "GfxFont.h"
68 #include "PSOutputDev.h"
69 
70 //------------------------------------------------------------------------
71 
72 struct Base14FontMapEntry
73 {
74  const char *altName;
75  const char *base14Name;
76 };
77 
78 static const Base14FontMapEntry base14FontMap[] = { { "Arial", "Helvetica" },
79  { "Arial,Bold", "Helvetica-Bold" },
80  { "Arial,BoldItalic", "Helvetica-BoldOblique" },
81  { "Arial,Italic", "Helvetica-Oblique" },
82  { "Arial-Bold", "Helvetica-Bold" },
83  { "Arial-BoldItalic", "Helvetica-BoldOblique" },
84  { "Arial-BoldItalicMT", "Helvetica-BoldOblique" },
85  { "Arial-BoldMT", "Helvetica-Bold" },
86  { "Arial-Italic", "Helvetica-Oblique" },
87  { "Arial-ItalicMT", "Helvetica-Oblique" },
88  { "ArialMT", "Helvetica" },
89  { "Courier", "Courier" },
90  { "Courier,Bold", "Courier-Bold" },
91  { "Courier,BoldItalic", "Courier-BoldOblique" },
92  { "Courier,Italic", "Courier-Oblique" },
93  { "Courier-Bold", "Courier-Bold" },
94  { "Courier-BoldOblique", "Courier-BoldOblique" },
95  { "Courier-Oblique", "Courier-Oblique" },
96  { "CourierNew", "Courier" },
97  { "CourierNew,Bold", "Courier-Bold" },
98  { "CourierNew,BoldItalic", "Courier-BoldOblique" },
99  { "CourierNew,Italic", "Courier-Oblique" },
100  { "CourierNew-Bold", "Courier-Bold" },
101  { "CourierNew-BoldItalic", "Courier-BoldOblique" },
102  { "CourierNew-Italic", "Courier-Oblique" },
103  { "CourierNewPS-BoldItalicMT", "Courier-BoldOblique" },
104  { "CourierNewPS-BoldMT", "Courier-Bold" },
105  { "CourierNewPS-ItalicMT", "Courier-Oblique" },
106  { "CourierNewPSMT", "Courier" },
107  { "Helvetica", "Helvetica" },
108  { "Helvetica,Bold", "Helvetica-Bold" },
109  { "Helvetica,BoldItalic", "Helvetica-BoldOblique" },
110  { "Helvetica,Italic", "Helvetica-Oblique" },
111  { "Helvetica-Bold", "Helvetica-Bold" },
112  { "Helvetica-BoldItalic", "Helvetica-BoldOblique" },
113  { "Helvetica-BoldOblique", "Helvetica-BoldOblique" },
114  { "Helvetica-Italic", "Helvetica-Oblique" },
115  { "Helvetica-Oblique", "Helvetica-Oblique" },
116  { "Symbol", "Symbol" },
117  { "Symbol,Bold", "Symbol" },
118  { "Symbol,BoldItalic", "Symbol" },
119  { "Symbol,Italic", "Symbol" },
120  { "SymbolMT", "Symbol" },
121  { "SymbolMT,Bold", "Symbol" },
122  { "SymbolMT,BoldItalic", "Symbol" },
123  { "SymbolMT,Italic", "Symbol" },
124  { "Times-Bold", "Times-Bold" },
125  { "Times-BoldItalic", "Times-BoldItalic" },
126  { "Times-Italic", "Times-Italic" },
127  { "Times-Roman", "Times-Roman" },
128  { "TimesNewRoman", "Times-Roman" },
129  { "TimesNewRoman,Bold", "Times-Bold" },
130  { "TimesNewRoman,BoldItalic", "Times-BoldItalic" },
131  { "TimesNewRoman,Italic", "Times-Italic" },
132  { "TimesNewRoman-Bold", "Times-Bold" },
133  { "TimesNewRoman-BoldItalic", "Times-BoldItalic" },
134  { "TimesNewRoman-Italic", "Times-Italic" },
135  { "TimesNewRomanPS", "Times-Roman" },
136  { "TimesNewRomanPS-Bold", "Times-Bold" },
137  { "TimesNewRomanPS-BoldItalic", "Times-BoldItalic" },
138  { "TimesNewRomanPS-BoldItalicMT", "Times-BoldItalic" },
139  { "TimesNewRomanPS-BoldMT", "Times-Bold" },
140  { "TimesNewRomanPS-Italic", "Times-Italic" },
141  { "TimesNewRomanPS-ItalicMT", "Times-Italic" },
142  { "TimesNewRomanPSMT", "Times-Roman" },
143  { "TimesNewRomanPSMT,Bold", "Times-Bold" },
144  { "TimesNewRomanPSMT,BoldItalic", "Times-BoldItalic" },
145  { "TimesNewRomanPSMT,Italic", "Times-Italic" },
146  { "ZapfDingbats", "ZapfDingbats" } };
147 
148 //------------------------------------------------------------------------
149 
150 // index: {fixed:0, sans-serif:4, serif:8} + bold*2 + italic
151 // NB: must be in same order as psSubstFonts in PSOutputDev.cc
152 static const char *base14SubstFonts[14] = { "Courier", "Courier-Oblique", "Courier-Bold", "Courier-BoldOblique", "Helvetica", "Helvetica-Oblique", "Helvetica-Bold", "Helvetica-BoldOblique", "Times-Roman", "Times-Italic", "Times-Bold",
153  "Times-BoldItalic",
154  // the last two are never used for substitution
155  "Symbol", "ZapfDingbats" };
156 
157 //------------------------------------------------------------------------
158 
159 static int parseCharName(char *charName, Unicode *uBuf, int uLen, bool names, bool ligatures, bool numeric, bool hex, bool variants);
160 
161 //------------------------------------------------------------------------
162 
163 static int readFromStream(void *data)
164 {
165  return ((Stream *)data)->getChar();
166 }
167 
168 //------------------------------------------------------------------------
169 // GfxFontLoc
170 //------------------------------------------------------------------------
171 
173 {
174  path = nullptr;
175  fontNum = 0;
176  encoding = nullptr;
177  substIdx = -1;
178 }
179 
181 {
182  if (path) {
183  delete path;
184  }
185  if (encoding) {
186  delete encoding;
187  }
188 }
189 
190 //------------------------------------------------------------------------
191 // GfxFont
192 //------------------------------------------------------------------------
193 
194 GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict)
195 {
196  GooString *nameA;
197  Ref embFontIDA;
198  GfxFontType typeA;
199  GfxFont *font;
200 
201  // get base font name
202  nameA = nullptr;
203  Object obj1 = fontDict->lookup("BaseFont");
204  if (obj1.isName()) {
205  nameA = new GooString(obj1.getName());
206  }
207 
208  // get embedded font ID and font type
209  typeA = getFontType(xref, fontDict, &embFontIDA);
210 
211  // create the font object
212  font = nullptr;
213  if (typeA < fontCIDType0) {
214  font = new Gfx8BitFont(xref, tagA, idA, nameA, typeA, embFontIDA, fontDict);
215  } else {
216  font = new GfxCIDFont(xref, tagA, idA, nameA, typeA, embFontIDA, fontDict);
217  }
218 
219  return font;
220 }
221 
222 GfxFont::GfxFont(const char *tagA, Ref idA, const GooString *nameA, GfxFontType typeA, Ref embFontIDA)
223 {
224  ok = false;
225  tag = new GooString(tagA);
226  id = idA;
227  name = nameA;
228  type = typeA;
229  embFontID = embFontIDA;
230  embFontName = nullptr;
231  family = nullptr;
234  refCnt = 1;
235  encodingName = new GooString("");
236  hasToUnicode = false;
237 }
238 
240 {
241  delete tag;
242  delete family;
243  if (name) {
244  delete name;
245  }
246  if (embFontName) {
247  delete embFontName;
248  }
249  if (encodingName) {
250  delete encodingName;
251  }
252 }
253 
255 {
256  refCnt++;
257 }
258 
260 {
261  if (--refCnt == 0)
262  delete this;
263 }
264 
265 bool GfxFont::isSubset() const
266 {
267  if (name) {
268  int i;
269  for (i = 0; i < name->getLength(); ++i) {
270  if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') {
271  break;
272  }
273  }
274  return i == 6 && name->getLength() > 7 && name->getChar(6) == '+';
275  }
276  return false;
277 }
278 
280 {
281  if (!name) {
282  return {};
283  }
284 
285  if (!isSubset()) {
286  return name->toStr();
287  }
288 
289  return name->toStr().substr(7);
290 }
291 
292 // This function extracts three pieces of information:
293 // 1. the "expected" font type, i.e., the font type implied by
294 // Font.Subtype, DescendantFont.Subtype, and
295 // FontDescriptor.FontFile3.Subtype
296 // 2. the embedded font object ID
297 // 3. the actual font type - determined by examining the embedded font
298 // if there is one, otherwise equal to the expected font type
299 // If the expected and actual font types don't match, a warning
300 // message is printed. The expected font type is not used for
301 // anything else.
302 GfxFontType GfxFont::getFontType(XRef *xref, Dict *fontDict, Ref *embID)
303 {
304  GfxFontType t, expectedType;
305  FoFiIdentifierType fft;
306  Dict *fontDict2;
307  bool isType0, err;
308 
309  t = fontUnknownType;
310  *embID = Ref::INVALID();
311  err = false;
312 
313  Object subtype = fontDict->lookup("Subtype");
314  expectedType = fontUnknownType;
315  isType0 = false;
316  if (subtype.isName("Type1") || subtype.isName("MMType1")) {
317  expectedType = fontType1;
318  } else if (subtype.isName("Type1C")) {
319  expectedType = fontType1C;
320  } else if (subtype.isName("Type3")) {
321  expectedType = fontType3;
322  } else if (subtype.isName("TrueType")) {
323  expectedType = fontTrueType;
324  } else if (subtype.isName("Type0")) {
325  isType0 = true;
326  } else {
327  error(errSyntaxWarning, -1, "Unknown font type: '{0:s}'", subtype.isName() ? subtype.getName() : "???");
328  }
329 
330  fontDict2 = fontDict;
331  Object obj1 = fontDict->lookup("DescendantFonts");
332  Object obj2; // Do not move to inside the if
333  // we need it around so that fontDict2 remains valid
334  if (obj1.isArray()) {
335  if (obj1.arrayGetLength() == 0) {
336  error(errSyntaxWarning, -1, "Empty DescendantFonts array in font");
337  } else {
338  obj2 = obj1.arrayGet(0);
339  if (obj2.isDict()) {
340  if (!isType0) {
341  error(errSyntaxWarning, -1, "Non-CID font with DescendantFonts array");
342  }
343  fontDict2 = obj2.getDict();
344  subtype = fontDict2->lookup("Subtype");
345  if (subtype.isName("CIDFontType0")) {
346  if (isType0) {
347  expectedType = fontCIDType0;
348  }
349  } else if (subtype.isName("CIDFontType2")) {
350  if (isType0) {
351  expectedType = fontCIDType2;
352  }
353  }
354  }
355  }
356  }
357 
358  Object fontDesc = fontDict2->lookup("FontDescriptor");
359  if (fontDesc.isDict()) {
360  Object obj3 = fontDesc.dictLookupNF("FontFile").copy();
361  if (obj3.isRef()) {
362  *embID = obj3.getRef();
363  if (expectedType != fontType1) {
364  err = true;
365  }
366  }
367  if (*embID == Ref::INVALID() && (obj3 = fontDesc.dictLookupNF("FontFile2").copy(), obj3.isRef())) {
368  *embID = obj3.getRef();
369  if (isType0) {
370  expectedType = fontCIDType2;
371  } else if (expectedType != fontTrueType) {
372  err = true;
373  }
374  }
375  if (*embID == Ref::INVALID() && (obj3 = fontDesc.dictLookupNF("FontFile3").copy(), obj3.isRef())) {
376  *embID = obj3.getRef();
377  Object obj4 = obj3.fetch(xref);
378  if (obj4.isStream()) {
379  subtype = obj4.streamGetDict()->lookup("Subtype");
380  if (subtype.isName("Type1")) {
381  if (expectedType != fontType1) {
382  err = true;
383  expectedType = isType0 ? fontCIDType0 : fontType1;
384  }
385  } else if (subtype.isName("Type1C")) {
386  if (expectedType == fontType1) {
387  expectedType = fontType1C;
388  } else if (expectedType != fontType1C) {
389  err = true;
390  expectedType = isType0 ? fontCIDType0C : fontType1C;
391  }
392  } else if (subtype.isName("TrueType")) {
393  if (expectedType != fontTrueType) {
394  err = true;
395  expectedType = isType0 ? fontCIDType2 : fontTrueType;
396  }
397  } else if (subtype.isName("CIDFontType0C")) {
398  if (expectedType == fontCIDType0) {
399  expectedType = fontCIDType0C;
400  } else {
401  err = true;
402  expectedType = isType0 ? fontCIDType0C : fontType1C;
403  }
404  } else if (subtype.isName("OpenType")) {
405  if (expectedType == fontTrueType) {
406  expectedType = fontTrueTypeOT;
407  } else if (expectedType == fontType1) {
408  expectedType = fontType1COT;
409  } else if (expectedType == fontCIDType0) {
410  expectedType = fontCIDType0COT;
411  } else if (expectedType == fontCIDType2) {
412  expectedType = fontCIDType2OT;
413  } else {
414  err = true;
415  }
416  } else {
417  error(errSyntaxError, -1, "Unknown font type '{0:s}'", subtype.isName() ? subtype.getName() : "???");
418  }
419  }
420  }
421  }
422 
423  t = fontUnknownType;
424  if (*embID != Ref::INVALID()) {
425  Object obj3(*embID);
426  Object obj4 = obj3.fetch(xref);
427  if (obj4.isStream()) {
428  obj4.streamReset();
430  obj4.streamClose();
431  switch (fft) {
432  case fofiIdType1PFA:
433  case fofiIdType1PFB:
434  t = fontType1;
435  break;
436  case fofiIdCFF8Bit:
437  t = isType0 ? fontCIDType0C : fontType1C;
438  break;
439  case fofiIdCFFCID:
440  t = fontCIDType0C;
441  break;
442  case fofiIdTrueType:
444  t = isType0 ? fontCIDType2 : fontTrueType;
445  break;
447  t = isType0 ? fontCIDType0COT : fontType1COT;
448  break;
450  t = fontCIDType0COT;
451  break;
452  default:
453  error(errSyntaxError, -1, "Embedded font file may be invalid");
454  break;
455  }
456  }
457  }
458 
459  if (t == fontUnknownType) {
460  t = expectedType;
461  }
462 
463  if (t != expectedType) {
464  err = true;
465  }
466 
467  if (err) {
468  error(errSyntaxWarning, -1, "Mismatch between font type and embedded font file");
469  }
470 
471  return t;
472 }
473 
474 void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict)
475 {
476  double t;
477 
478  // assume Times-Roman by default (for substitution purposes)
479  flags = fontSerif;
480 
481  missingWidth = 0;
482 
483  Object obj1 = fontDict->lookup("FontDescriptor");
484  if (obj1.isDict()) {
485 
486  // get flags
487  Object obj2 = obj1.dictLookup("Flags");
488  if (obj2.isInt()) {
489  flags = obj2.getInt();
490  }
491 
492  // get name
493  obj2 = obj1.dictLookup("FontName");
494  if (obj2.isName()) {
495  embFontName = new GooString(obj2.getName());
496  }
497  if (embFontName == nullptr) {
498  // get name with typo
499  obj2 = obj1.dictLookup("Fontname");
500  if (obj2.isName()) {
501  embFontName = new GooString(obj2.getName());
502  error(errSyntaxWarning, -1, "The file uses Fontname instead of FontName please notify the creator that the file is broken");
503  }
504  }
505 
506  // get family
507  obj2 = obj1.dictLookup("FontFamily");
508  if (obj2.isString())
509  family = new GooString(obj2.getString());
510 
511  // get stretch
512  obj2 = obj1.dictLookup("FontStretch");
513  if (obj2.isName()) {
514  if (strcmp(obj2.getName(), "UltraCondensed") == 0)
516  else if (strcmp(obj2.getName(), "ExtraCondensed") == 0)
518  else if (strcmp(obj2.getName(), "Condensed") == 0)
519  stretch = Condensed;
520  else if (strcmp(obj2.getName(), "SemiCondensed") == 0)
522  else if (strcmp(obj2.getName(), "Normal") == 0)
523  stretch = Normal;
524  else if (strcmp(obj2.getName(), "SemiExpanded") == 0)
526  else if (strcmp(obj2.getName(), "Expanded") == 0)
527  stretch = Expanded;
528  else if (strcmp(obj2.getName(), "ExtraExpanded") == 0)
530  else if (strcmp(obj2.getName(), "UltraExpanded") == 0)
532  else
533  error(errSyntaxWarning, -1, "Invalid Font Stretch");
534  }
535 
536  // get weight
537  obj2 = obj1.dictLookup("FontWeight");
538  if (obj2.isNum()) {
539  if (obj2.getNum() == 100)
540  weight = W100;
541  else if (obj2.getNum() == 200)
542  weight = W200;
543  else if (obj2.getNum() == 300)
544  weight = W300;
545  else if (obj2.getNum() == 400)
546  weight = W400;
547  else if (obj2.getNum() == 500)
548  weight = W500;
549  else if (obj2.getNum() == 600)
550  weight = W600;
551  else if (obj2.getNum() == 700)
552  weight = W700;
553  else if (obj2.getNum() == 800)
554  weight = W800;
555  else if (obj2.getNum() == 900)
556  weight = W900;
557  else
558  error(errSyntaxWarning, -1, "Invalid Font Weight");
559  }
560 
561  // look for MissingWidth
562  obj2 = obj1.dictLookup("MissingWidth");
563  if (obj2.isNum()) {
564  missingWidth = obj2.getNum();
565  }
566 
567  // get Ascent and Descent
568  obj2 = obj1.dictLookup("Ascent");
569  if (obj2.isNum()) {
570  t = 0.001 * obj2.getNum();
571  // some broken font descriptors specify a negative ascent
572  if (t < 0) {
573  t = -t;
574  }
575  // some broken font descriptors set ascent and descent to 0;
576  // others set it to ridiculous values (e.g., 32768)
577  if (t != 0 && t < 3) {
578  ascent = t;
579  }
580  }
581  obj2 = obj1.dictLookup("Descent");
582  if (obj2.isNum()) {
583  t = 0.001 * obj2.getNum();
584  // some broken font descriptors specify a positive descent
585  if (t > 0) {
586  t = -t;
587  }
588  // some broken font descriptors set ascent and descent to 0
589  if (t != 0 && t > -3) {
590  descent = t;
591  }
592  }
593 
594  // font FontBBox
595  obj2 = obj1.dictLookup("FontBBox");
596  if (obj2.isArray()) {
597  for (int i = 0; i < 4 && i < obj2.arrayGetLength(); ++i) {
598  Object obj3 = obj2.arrayGet(i);
599  if (obj3.isNum()) {
600  fontBBox[i] = 0.001 * obj3.getNum();
601  }
602  }
603  }
604  }
605 }
606 
608 {
609  GooString *buf;
610 
611  Object obj1 = fontDict->lookup("ToUnicode");
612  if (!obj1.isStream()) {
613  return nullptr;
614  }
615  buf = new GooString();
616  obj1.getStream()->fillGooString(buf);
617  obj1.streamClose();
618  if (ctu) {
619  ctu->mergeCMap(buf, nBits);
620  } else {
621  ctu = CharCodeToUnicode::parseCMap(buf, nBits);
622  }
623  hasToUnicode = true;
624  delete buf;
625  return ctu;
626 }
627 
629 {
630  GfxFontLoc *fontLoc;
631  SysFontType sysFontType;
632  GooString *path, *base14Name, *substName;
633  int substIdx, fontNum;
634  bool embed;
635 
636  if (type == fontType3) {
637  return nullptr;
638  }
639 
640  //----- embedded font
641  if (embFontID != Ref::INVALID()) {
642  embed = true;
643  Object refObj(embFontID);
644  Object embFontObj = refObj.fetch(xref);
645  if (!embFontObj.isStream()) {
646  error(errSyntaxError, -1, "Embedded font object is wrong type");
647  embed = false;
648  }
649  if (embed) {
650  if (ps) {
651  switch (type) {
652  case fontType1:
653  case fontType1C:
654  case fontType1COT:
655  embed = ps->getEmbedType1();
656  break;
657  case fontTrueType:
658  case fontTrueTypeOT:
659  embed = ps->getEmbedTrueType();
660  break;
661  case fontCIDType0C:
662  case fontCIDType0COT:
663  embed = ps->getEmbedCIDPostScript();
664  break;
665  case fontCIDType2:
666  case fontCIDType2OT:
667  embed = ps->getEmbedCIDTrueType();
668  break;
669  default:
670  break;
671  }
672  }
673  if (embed) {
674  fontLoc = new GfxFontLoc();
675  fontLoc->locType = gfxFontLocEmbedded;
676  fontLoc->fontType = type;
677  fontLoc->embFontID = embFontID;
678  return fontLoc;
679  }
680  }
681  }
682 
683  //----- PS passthrough
684  if (ps && !isCIDFont() && ps->getFontPassthrough()) {
685  fontLoc = new GfxFontLoc();
686  fontLoc->locType = gfxFontLocResident;
687  fontLoc->fontType = fontType1;
688  fontLoc->path = name->copy();
689  return fontLoc;
690  }
691 
692  //----- PS resident Base-14 font
693  if (ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) {
694  fontLoc = new GfxFontLoc();
695  fontLoc->locType = gfxFontLocResident;
696  fontLoc->fontType = fontType1;
697  fontLoc->path = new GooString(((Gfx8BitFont *)this)->base14->base14Name);
698  return fontLoc;
699  }
700 
701  //----- external font file (fontFile, fontDir)
702  if (name && (path = globalParams->findFontFile(name))) {
703  if ((fontLoc = getExternalFont(path, isCIDFont()))) {
704  return fontLoc;
705  }
706  }
707 
708  //----- external font file for Base-14 font
709  if (!ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) {
710  base14Name = new GooString(((Gfx8BitFont *)this)->base14->base14Name);
711  if ((path = globalParams->findBase14FontFile(base14Name, this))) {
712  if ((fontLoc = getExternalFont(path, false))) {
713  delete base14Name;
714  return fontLoc;
715  }
716  }
717  delete base14Name;
718  }
719 
720  //----- system font
721  if ((path = globalParams->findSystemFontFile(this, &sysFontType, &fontNum))) {
722  if (isCIDFont()) {
723  if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) {
724  fontLoc = new GfxFontLoc();
725  fontLoc->locType = gfxFontLocExternal;
726  fontLoc->fontType = fontCIDType2;
727  fontLoc->path = path;
728  fontLoc->fontNum = fontNum;
729  return fontLoc;
730  }
731  } else {
732  if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) {
733  fontLoc = new GfxFontLoc();
734  fontLoc->locType = gfxFontLocExternal;
735  fontLoc->fontType = fontTrueType;
736  fontLoc->path = path;
737  return fontLoc;
738  } else if (sysFontType == sysFontPFA || sysFontType == sysFontPFB) {
739  fontLoc = new GfxFontLoc();
740  fontLoc->locType = gfxFontLocExternal;
741  fontLoc->fontType = fontType1;
742  fontLoc->path = path;
743  fontLoc->fontNum = fontNum;
744  return fontLoc;
745  }
746  }
747  delete path;
748  }
749 
750  if (!isCIDFont()) {
751 
752  //----- 8-bit font substitution
753  if (flags & fontFixedWidth) {
754  substIdx = 0;
755  } else if (flags & fontSerif) {
756  substIdx = 8;
757  } else {
758  substIdx = 4;
759  }
760  if (isBold()) {
761  substIdx += 2;
762  }
763  if (isItalic()) {
764  substIdx += 1;
765  }
766  substName = new GooString(base14SubstFonts[substIdx]);
767  if (ps) {
768  error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:s}'", base14SubstFonts[substIdx], name ? name->c_str() : "null");
769  fontLoc = new GfxFontLoc();
770  fontLoc->locType = gfxFontLocResident;
771  fontLoc->fontType = fontType1;
772  fontLoc->path = substName;
773  fontLoc->substIdx = substIdx;
774  return fontLoc;
775  } else {
776  path = globalParams->findFontFile(substName);
777  delete substName;
778  if (path) {
779  if ((fontLoc = getExternalFont(path, false))) {
780  error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:s}'", base14SubstFonts[substIdx], name ? name->c_str() : "");
781  name = new GooString(base14SubstFonts[substIdx]);
782  fontLoc->substIdx = substIdx;
783  return fontLoc;
784  }
785  }
786  }
787 
788  // failed to find a substitute font
789  return nullptr;
790  }
791 
792  // failed to find a substitute font
793  return nullptr;
794 }
795 
797 {
798  GooString *path;
799 
800  path = globalParams->findFontFile(base14Name);
801  if (!path) {
802  return nullptr;
803  }
804  return getExternalFont(path, false);
805 }
806 
808 {
809  FoFiIdentifierType fft;
810  GfxFontType fontType;
811  GfxFontLoc *fontLoc;
812 
813  fft = FoFiIdentifier::identifyFile(path->c_str());
814  switch (fft) {
815  case fofiIdType1PFA:
816  case fofiIdType1PFB:
817  fontType = fontType1;
818  break;
819  case fofiIdCFF8Bit:
820  fontType = fontType1C;
821  break;
822  case fofiIdCFFCID:
823  fontType = fontCIDType0C;
824  break;
825  case fofiIdTrueType:
827  fontType = cid ? fontCIDType2 : fontTrueType;
828  break;
830  fontType = fontType1COT;
831  break;
833  fontType = fontCIDType0COT;
834  break;
835  case fofiIdUnknown:
836  case fofiIdError:
837  default:
838  fontType = fontUnknownType;
839  break;
840  }
841  if (fontType == fontUnknownType || (cid ? (fontType < fontCIDType0) : (fontType >= fontCIDType0))) {
842  delete path;
843  return nullptr;
844  }
845  fontLoc = new GfxFontLoc();
846  fontLoc->locType = gfxFontLocExternal;
847  fontLoc->fontType = fontType;
848  fontLoc->path = path;
849  return fontLoc;
850 }
851 
853 {
854  char *buf;
855  Stream *str;
856 
857  Object obj1(embFontID);
858  Object obj2 = obj1.fetch(xref);
859  if (!obj2.isStream()) {
860  error(errSyntaxError, -1, "Embedded font file is not a stream");
862  *len = 0;
863  return nullptr;
864  }
865  str = obj2.getStream();
866 
867  buf = (char *)str->toUnsignedChars(len);
868  str->close();
869 
870  return buf;
871 }
872 
874 {
875  const char *name;
876  const char *alt;
877 };
878 
879 static const AlternateNameMap alternateNameMap[] = { { "fi", "f_i" }, { "fl", "f_l" }, { "ff", "f_f" }, { "ffi", "f_f_i" }, { "ffl", "f_f_l" }, { nullptr, nullptr } };
880 
881 const char *GfxFont::getAlternateName(const char *name)
882 {
884  while (map->name) {
885  if (strcmp(name, map->name) == 0) {
886  return map->alt;
887  }
888  map++;
889  }
890  return nullptr;
891 }
892 
893 //------------------------------------------------------------------------
894 // Gfx8BitFont
895 //------------------------------------------------------------------------
896 
897 // Parse character names of the form 'Axx', 'xx', 'Ann', 'ABnn', or
898 // 'nn', where 'A' and 'B' are any letters, 'xx' is two hex digits,
899 // and 'nn' is decimal digits.
900 static bool parseNumericName(const char *s, bool hex, unsigned int *u)
901 {
902  char *endptr;
903 
904  // Strip leading alpha characters.
905  if (hex) {
906  int n = 0;
907 
908  // Get string length while ignoring junk at end.
909  while (isalnum(s[n]))
910  ++n;
911 
912  // Only 2 hex characters with optional leading alpha is allowed.
913  if (n == 3 && isalpha(*s)) {
914  ++s;
915  } else if (n != 2) {
916  return false;
917  }
918  } else {
919  // Strip up to two alpha characters.
920  for (int i = 0; i < 2 && isalpha(*s); ++i)
921  ++s;
922  }
923 
924  int v = strtol(s, &endptr, hex ? 16 : 10);
925 
926  if (endptr == s)
927  return false;
928 
929  // Skip trailing junk characters.
930  while (*endptr != '\0' && !isalnum(*endptr))
931  ++endptr;
932 
933  if (*endptr == '\0') {
934  if (u)
935  *u = v;
936  return true;
937  }
938  return false;
939 }
940 
941 // Returns true if the font has character names like xx or Axx which
942 // should be parsed for hex or decimal values.
943 static bool testForNumericNames(Dict *fontDict, bool hex)
944 {
945  bool numeric = true;
946 
947  Object enc = fontDict->lookup("Encoding");
948  if (!enc.isDict()) {
949  return false;
950  }
951 
952  Object diff = enc.dictLookup("Differences");
953  if (!diff.isArray()) {
954  return false;
955  }
956 
957  for (int i = 0; i < diff.arrayGetLength() && numeric; ++i) {
958  Object obj = diff.arrayGet(i);
959  if (obj.isInt()) {
960  // All sequences must start between character codes 0 and 5.
961  if (obj.getInt() > 5)
962  numeric = false;
963  } else if (obj.isName()) {
964  // All character names must successfully parse.
965  if (!parseNumericName(obj.getName(), hex, nullptr))
966  numeric = false;
967  } else {
968  numeric = false;
969  }
970  }
971 
972  return numeric;
973 }
974 
975 Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, GfxFontType typeA, Ref embFontIDA, Dict *fontDict) : GfxFont(tagA, idA, nameA, typeA, embFontIDA)
976 {
977  GooString *name2;
978  const BuiltinFont *builtinFont;
979  const char **baseEnc;
980  bool baseEncFromFontFile;
981  char *buf;
982  int len;
983  FoFiType1 *ffT1;
984  FoFiType1C *ffT1C;
985  char *charName;
986  bool missing, hex;
987  bool numeric;
988  Unicode toUnicode[256];
989  Unicode uBuf[8];
990  double mul;
991  int firstChar, lastChar;
992  unsigned short w;
993  Object obj1;
994  int n, i, a, b, m;
995 
996  refCnt = 1;
997  ctu = nullptr;
998 
999  // do font name substitution for various aliases of the Base 14 font
1000  // names
1001  base14 = nullptr;
1002  if (name) {
1003  name2 = name->copy();
1004  i = 0;
1005  while (i < name2->getLength()) {
1006  if (name2->getChar(i) == ' ') {
1007  name2->del(i);
1008  } else {
1009  ++i;
1010  }
1011  }
1012  a = 0;
1013  b = sizeof(base14FontMap) / sizeof(Base14FontMapEntry);
1014  // invariant: base14FontMap[a].altName <= name2 < base14FontMap[b].altName
1015  while (b - a > 1) {
1016  m = (a + b) / 2;
1017  if (name2->cmp(base14FontMap[m].altName) >= 0) {
1018  a = m;
1019  } else {
1020  b = m;
1021  }
1022  }
1023  if (!name2->cmp(base14FontMap[a].altName)) {
1024  base14 = &base14FontMap[a];
1025  }
1026  delete name2;
1027  }
1028 
1029  // is it a built-in font?
1030  builtinFont = nullptr;
1031  if (base14) {
1032  for (const BuiltinFont &bf : builtinFonts) {
1033  if (!strcmp(base14->base14Name, bf.name)) {
1034  builtinFont = &bf;
1035  break;
1036  }
1037  }
1038  }
1039 
1040  // default ascent/descent values
1041  if (builtinFont) {
1042  ascent = 0.001 * builtinFont->ascent;
1043  descent = 0.001 * builtinFont->descent;
1044  fontBBox[0] = 0.001 * builtinFont->bbox[0];
1045  fontBBox[1] = 0.001 * builtinFont->bbox[1];
1046  fontBBox[2] = 0.001 * builtinFont->bbox[2];
1047  fontBBox[3] = 0.001 * builtinFont->bbox[3];
1048  } else {
1049  ascent = 0.95;
1050  descent = -0.35;
1051  fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
1052  }
1053 
1054  // get info from font descriptor
1055  readFontDescriptor(xref, fontDict);
1056 
1057  // for non-embedded fonts, don't trust the ascent/descent/bbox
1058  // values from the font descriptor
1059  if (builtinFont && embFontID == Ref::INVALID()) {
1060  ascent = 0.001 * builtinFont->ascent;
1061  descent = 0.001 * builtinFont->descent;
1062  fontBBox[0] = 0.001 * builtinFont->bbox[0];
1063  fontBBox[1] = 0.001 * builtinFont->bbox[1];
1064  fontBBox[2] = 0.001 * builtinFont->bbox[2];
1065  fontBBox[3] = 0.001 * builtinFont->bbox[3];
1066  }
1067 
1068  // get font matrix
1069  fontMat[0] = fontMat[3] = 1;
1070  fontMat[1] = fontMat[2] = fontMat[4] = fontMat[5] = 0;
1071  obj1 = fontDict->lookup("FontMatrix");
1072  if (obj1.isArray()) {
1073  for (i = 0; i < 6 && i < obj1.arrayGetLength(); ++i) {
1074  Object obj2 = obj1.arrayGet(i);
1075  if (obj2.isNum()) {
1076  fontMat[i] = obj2.getNum();
1077  }
1078  }
1079  }
1080 
1081  // get Type 3 bounding box, font definition, and resources
1082  if (type == fontType3) {
1083  obj1 = fontDict->lookup("FontBBox");
1084  if (obj1.isArray()) {
1085  for (i = 0; i < 4 && i < obj1.arrayGetLength(); ++i) {
1086  Object obj2 = obj1.arrayGet(i);
1087  if (obj2.isNum()) {
1088  fontBBox[i] = obj2.getNum();
1089  }
1090  }
1091  }
1092  charProcs = fontDict->lookup("CharProcs");
1093  if (!charProcs.isDict()) {
1094  error(errSyntaxError, -1, "Missing or invalid CharProcs dictionary in Type 3 font");
1095  charProcs.setToNull();
1096  }
1097  resources = fontDict->lookup("Resources");
1098  if (!resources.isDict()) {
1099  resources.setToNull();
1100  }
1101  }
1102 
1103  //----- build the font encoding -----
1104 
1105  // Encodings start with a base encoding, which can come from
1106  // (in order of priority):
1107  // 1. FontDict.Encoding or FontDict.Encoding.BaseEncoding
1108  // - MacRoman / MacExpert / WinAnsi / Standard
1109  // 2. embedded or external font file
1110  // 3. default:
1111  // - builtin --> builtin encoding
1112  // - TrueType --> WinAnsiEncoding
1113  // - others --> StandardEncoding
1114  // and then add a list of differences (if any) from
1115  // FontDict.Encoding.Differences.
1116 
1117  // check FontDict for base encoding
1118  hasEncoding = false;
1119  usesMacRomanEnc = false;
1120  baseEnc = nullptr;
1121  baseEncFromFontFile = false;
1122  obj1 = fontDict->lookup("Encoding");
1123  if (obj1.isDict()) {
1124  Object obj2 = obj1.dictLookup("BaseEncoding");
1125  if (obj2.isName("MacRomanEncoding")) {
1126  hasEncoding = true;
1127  usesMacRomanEnc = true;
1128  baseEnc = macRomanEncoding;
1129  } else if (obj2.isName("MacExpertEncoding")) {
1130  hasEncoding = true;
1131  baseEnc = macExpertEncoding;
1132  } else if (obj2.isName("WinAnsiEncoding")) {
1133  hasEncoding = true;
1134  baseEnc = winAnsiEncoding;
1135  }
1136  } else if (obj1.isName("MacRomanEncoding")) {
1137  hasEncoding = true;
1138  usesMacRomanEnc = true;
1139  baseEnc = macRomanEncoding;
1140  } else if (obj1.isName("MacExpertEncoding")) {
1141  hasEncoding = true;
1142  baseEnc = macExpertEncoding;
1143  } else if (obj1.isName("WinAnsiEncoding")) {
1144  hasEncoding = true;
1145  baseEnc = winAnsiEncoding;
1146  }
1147 
1148  // check embedded font file for base encoding
1149  // (only for Type 1 fonts - trying to get an encoding out of a
1150  // TrueType font is a losing proposition)
1151  ffT1 = nullptr;
1152  ffT1C = nullptr;
1153  buf = nullptr;
1154  if (type == fontType1 && embFontID != Ref::INVALID()) {
1155  if ((buf = readEmbFontFile(xref, &len))) {
1156  if ((ffT1 = FoFiType1::make(buf, len))) {
1157  if (ffT1->getName()) {
1158  if (embFontName) {
1159  delete embFontName;
1160  }
1161  embFontName = new GooString(ffT1->getName());
1162  }
1163  if (!baseEnc) {
1164  baseEnc = (const char **)ffT1->getEncoding();
1165  baseEncFromFontFile = true;
1166  }
1167  }
1168  gfree(buf);
1169  }
1170  } else if (type == fontType1C && embFontID != Ref::INVALID()) {
1171  if ((buf = readEmbFontFile(xref, &len))) {
1172  if ((ffT1C = FoFiType1C::make(buf, len))) {
1173  if (ffT1C->getName()) {
1174  if (embFontName) {
1175  delete embFontName;
1176  }
1177  embFontName = new GooString(ffT1C->getName());
1178  }
1179  if (!baseEnc) {
1180  baseEnc = (const char **)ffT1C->getEncoding();
1181  baseEncFromFontFile = true;
1182  }
1183  }
1184  gfree(buf);
1185  }
1186  }
1187 
1188  // get default base encoding
1189  if (!baseEnc) {
1190  if (builtinFont && embFontID == Ref::INVALID()) {
1191  baseEnc = builtinFont->defaultBaseEnc;
1192  hasEncoding = true;
1193  } else if (type == fontTrueType) {
1194  baseEnc = winAnsiEncoding;
1195  } else {
1196  baseEnc = standardEncoding;
1197  }
1198  }
1199 
1200  if (baseEncFromFontFile) {
1201  encodingName->Set("Builtin");
1202  } else if (baseEnc == winAnsiEncoding) {
1203  encodingName->Set("WinAnsi");
1204  } else if (baseEnc == macRomanEncoding) {
1205  encodingName->Set("MacRoman");
1206  } else if (baseEnc == macExpertEncoding) {
1207  encodingName->Set("MacExpert");
1208  } else if (baseEnc == symbolEncoding) {
1209  encodingName->Set("Symbol");
1210  } else if (baseEnc == zapfDingbatsEncoding) {
1211  encodingName->Set("ZapfDingbats");
1212  } else {
1213  encodingName->Set("Standard");
1214  }
1215 
1216  // copy the base encoding
1217  for (i = 0; i < 256; ++i) {
1218  enc[i] = (char *)baseEnc[i];
1219  if ((encFree[i] = baseEncFromFontFile) && enc[i]) {
1220  enc[i] = copyString(baseEnc[i]);
1221  }
1222  }
1223 
1224  // some Type 1C font files have empty encodings, which can break the
1225  // T1C->T1 conversion (since the 'seac' operator depends on having
1226  // the accents in the encoding), so we fill in any gaps from
1227  // StandardEncoding
1229  for (i = 0; i < 256; ++i) {
1230  if (!enc[i] && standardEncoding[i]) {
1231  enc[i] = (char *)standardEncoding[i];
1232  encFree[i] = false;
1233  }
1234  }
1235  }
1236 
1237  // merge differences into encoding
1238  if (obj1.isDict()) {
1239  Object obj2 = obj1.dictLookup("Differences");
1240  if (obj2.isArray()) {
1241  encodingName->Set("Custom");
1242  hasEncoding = true;
1243  int code = 0;
1244  for (i = 0; i < obj2.arrayGetLength(); ++i) {
1245  Object obj3 = obj2.arrayGet(i);
1246  if (obj3.isInt()) {
1247  code = obj3.getInt();
1248  } else if (obj3.isName()) {
1249  if (code >= 0 && code < 256) {
1250  if (encFree[code]) {
1251  gfree(enc[code]);
1252  }
1253  enc[code] = copyString(obj3.getName());
1254  encFree[code] = true;
1255  ++code;
1256  }
1257  } else {
1258  error(errSyntaxError, -1, "Wrong type in font encoding resource differences ({0:s})", obj3.getTypeName());
1259  }
1260  }
1261  }
1262  }
1263  delete ffT1;
1264  delete ffT1C;
1265 
1266  //----- build the mapping to Unicode -----
1267 
1268  // pass 1: use the name-to-Unicode mapping table
1269  missing = hex = false;
1270  bool isZapfDingbats = name && name->endsWith("ZapfDingbats");
1271  for (int code = 0; code < 256; ++code) {
1272  if ((charName = enc[code])) {
1273  if (isZapfDingbats) {
1274  // include ZapfDingbats names
1275  toUnicode[code] = globalParams->mapNameToUnicodeAll(charName);
1276  } else {
1277  toUnicode[code] = globalParams->mapNameToUnicodeText(charName);
1278  }
1279  if (!toUnicode[code] && strcmp(charName, ".notdef")) {
1280  // if it wasn't in the name-to-Unicode table, check for a
1281  // name that looks like 'Axx' or 'xx', where 'A' is any letter
1282  // and 'xx' is two hex digits
1283  if ((strlen(charName) == 3 && isalpha(charName[0]) && isxdigit(charName[1]) && isxdigit(charName[2])
1284  && ((charName[1] >= 'a' && charName[1] <= 'f') || (charName[1] >= 'A' && charName[1] <= 'F') || (charName[2] >= 'a' && charName[2] <= 'f') || (charName[2] >= 'A' && charName[2] <= 'F')))
1285  || (strlen(charName) == 2 && isxdigit(charName[0]) && isxdigit(charName[1]) &&
1286  // Only check idx 1 to avoid misidentifying a decimal
1287  // number like a0
1288  ((charName[1] >= 'a' && charName[1] <= 'f') || (charName[1] >= 'A' && charName[1] <= 'F')))) {
1289  hex = true;
1290  }
1291  missing = true;
1292  }
1293  } else {
1294  toUnicode[code] = 0;
1295  }
1296  }
1297 
1298  numeric = testForNumericNames(fontDict, hex);
1299 
1300  // construct the char code -> Unicode mapping object
1302 
1303  // pass 1a: Expand ligatures in the Alphabetic Presentation Form
1304  // block (eg "fi", "ffi") to normal form
1305  for (int code = 0; code < 256; ++code) {
1306  if (unicodeIsAlphabeticPresentationForm(toUnicode[code])) {
1307  Unicode *normalized = unicodeNormalizeNFKC(&toUnicode[code], 1, &len, nullptr);
1308  if (len > 1)
1309  ctu->setMapping((CharCode)code, normalized, len);
1310  gfree(normalized);
1311  }
1312  }
1313 
1314  // pass 2: try to fill in the missing chars, looking for ligatures, numeric
1315  // references and variants
1316  if (missing) {
1317  for (int code = 0; code < 256; ++code) {
1318  if (!toUnicode[code]) {
1319  if ((charName = enc[code]) && strcmp(charName, ".notdef")
1320  && (n = parseCharName(charName, uBuf, sizeof(uBuf) / sizeof(*uBuf),
1321  false, // don't check simple names (pass 1)
1322  true, // do check ligatures
1323  numeric, hex,
1324  true))) { // do check variants
1325  ctu->setMapping((CharCode)code, uBuf, n);
1326  continue;
1327  }
1328 
1329  // do a simple pass-through
1330  // mapping for unknown character names
1331  uBuf[0] = code;
1332  ctu->setMapping((CharCode)code, uBuf, 1);
1333  }
1334  }
1335  }
1336 
1337  // merge in a ToUnicode CMap, if there is one -- this overwrites
1338  // existing entries in ctu, i.e., the ToUnicode CMap takes
1339  // precedence, but the other encoding info is allowed to fill in any
1340  // holes
1341  readToUnicodeCMap(fontDict, 16, ctu);
1342 
1343  //----- get the character widths -----
1344 
1345  // initialize all widths
1346  for (double &width : widths) {
1347  width = missingWidth * 0.001;
1348  }
1349 
1350  // use widths from font dict, if present
1351  obj1 = fontDict->lookup("FirstChar");
1352  firstChar = obj1.isInt() ? obj1.getInt() : 0;
1353  if (firstChar < 0 || firstChar > 255) {
1354  firstChar = 0;
1355  }
1356  obj1 = fontDict->lookup("LastChar");
1357  lastChar = obj1.isInt() ? obj1.getInt() : 255;
1358  if (lastChar < 0 || lastChar > 255) {
1359  lastChar = 255;
1360  }
1361  mul = (type == fontType3) ? fontMat[0] : 0.001;
1362  obj1 = fontDict->lookup("Widths");
1363  if (obj1.isArray()) {
1364  flags |= fontFixedWidth;
1365  if (obj1.arrayGetLength() < lastChar - firstChar + 1) {
1366  lastChar = firstChar + obj1.arrayGetLength() - 1;
1367  }
1368  for (int code = firstChar; code <= lastChar; ++code) {
1369  Object obj2 = obj1.arrayGet(code - firstChar);
1370  if (obj2.isNum()) {
1371  widths[code] = obj2.getNum() * mul;
1372  if (fabs(widths[code] - widths[firstChar]) > 0.00001) {
1373  flags &= ~~fontFixedWidth;
1374  }
1375  }
1376  }
1377 
1378  // use widths from built-in font
1379  } else if (builtinFont) {
1380  // this is a kludge for broken PDF files that encode char 32
1381  // as .notdef
1382  if (builtinFont->getWidth("space", &w)) {
1383  widths[32] = 0.001 * w;
1384  }
1385  for (int code = 0; code < 256; ++code) {
1386  if (enc[code] && builtinFont->getWidth(enc[code], &w)) {
1387  widths[code] = 0.001 * w;
1388  }
1389  }
1390 
1391  // couldn't find widths -- use defaults
1392  } else {
1393  // this is technically an error -- the Widths entry is required
1394  // for all but the Base-14 fonts -- but certain PDF generators
1395  // apparently don't include widths for Arial and TimesNewRoman
1396  if (isFixedWidth()) {
1397  i = 0;
1398  } else if (isSerif()) {
1399  i = 8;
1400  } else {
1401  i = 4;
1402  }
1403  if (isBold()) {
1404  i += 2;
1405  }
1406  if (isItalic()) {
1407  i += 1;
1408  }
1409  builtinFont = builtinFontSubst[i];
1410  // this is a kludge for broken PDF files that encode char 32
1411  // as .notdef
1412  if (builtinFont->getWidth("space", &w)) {
1413  widths[32] = 0.001 * w;
1414  }
1415  for (int code = 0; code < 256; ++code) {
1416  if (enc[code] && builtinFont->getWidth(enc[code], &w)) {
1417  widths[code] = 0.001 * w;
1418  }
1419  }
1420  }
1421 
1422  ok = true;
1423 }
1424 
1426 {
1427  int i;
1428 
1429  for (i = 0; i < 256; ++i) {
1430  if (encFree[i] && enc[i]) {
1431  gfree(enc[i]);
1432  }
1433  }
1434  ctu->decRefCnt();
1435 }
1436 
1437 // This function is in part a derived work of the Adobe Glyph Mapping
1438 // Convention: http://www.adobe.com/devnet/opentype/archives/glyph.html
1439 // Algorithmic comments are excerpted from that document to aid
1440 // maintainability.
1441 static int parseCharName(char *charName, Unicode *uBuf, int uLen, bool names, bool ligatures, bool numeric, bool hex, bool variants)
1442 {
1443  if (uLen <= 0) {
1444  error(errInternal, -1,
1445  "Zero-length output buffer (recursion overflow?) in "
1446  "parseCharName, component \"{0:s}\"",
1447  charName);
1448  return 0;
1449  }
1450  // Step 1: drop all the characters from the glyph name starting with the
1451  // first occurrence of a period (U+002E FULL STOP), if any.
1452  if (variants) {
1453  char *var_part = strchr(charName, '.');
1454  if (var_part == charName) {
1455  return 0; // .notdef or similar
1456  } else if (var_part != nullptr) {
1457  // parse names of the form 7.oldstyle, P.swash, s.sc, etc.
1458  char *main_part = copyString(charName, var_part - charName);
1459  bool namesRecurse = true, variantsRecurse = false;
1460  int n = parseCharName(main_part, uBuf, uLen, namesRecurse, ligatures, numeric, hex, variantsRecurse);
1461  gfree(main_part);
1462  return n;
1463  }
1464  }
1465  // Step 2: split the remaining string into a sequence of components, using
1466  // underscore (U+005F LOW LINE) as the delimiter.
1467  if (ligatures && strchr(charName, '_')) {
1468  // parse names of the form A_a (e.g. f_i, T_h, l_quotesingle)
1469  char *lig_part, *lig_end, *lig_copy;
1470  int n = 0, m;
1471  lig_part = lig_copy = copyString(charName);
1472  do {
1473  if ((lig_end = strchr(lig_part, '_')))
1474  *lig_end = '\0';
1475  if (lig_part[0] != '\0') {
1476  bool namesRecurse = true, ligaturesRecurse = false;
1477  if ((m = parseCharName(lig_part, uBuf + n, uLen - n, namesRecurse, ligaturesRecurse, numeric, hex, variants)))
1478  n += m;
1479  else
1480  error(errSyntaxWarning, -1,
1481  "Could not parse ligature component \"{0:s}\" of \"{1:s}\" in "
1482  "parseCharName",
1483  lig_part, charName);
1484  }
1485  if (lig_end) {
1486  lig_part = lig_end + 1;
1487  }
1488  } while (lig_end && n < uLen);
1489  gfree(lig_copy);
1490  return n;
1491  }
1492  // Step 3: map each component to a character string according to the
1493  // procedure below, and concatenate those strings; the result is the
1494  // character string to which the glyph name is mapped.
1495  // 3.1. if the font is Zapf Dingbats (PostScript FontName ZapfDingbats), and
1496  // the component is in the ZapfDingbats list, then map it to the
1497  // corresponding character in that list.
1498  // 3.2. otherwise, if the component is in the Adobe Glyph List, then map it
1499  // to the corresponding character in that list.
1500  if (names && (uBuf[0] = globalParams->mapNameToUnicodeText(charName))) {
1501  return 1;
1502  }
1503  unsigned int n = strlen(charName);
1504  // 3.3. otherwise, if the component is of the form "uni" (U+0075 U+006E
1505  // U+0069) followed by a sequence of uppercase hexadecimal digits (0 .. 9,
1506  // A .. F, i.e. U+0030 .. U+0039, U+0041 .. U+0046), the length of that
1507  // sequence is a multiple of four, and each group of four digits represents
1508  // a number in the set {0x0000 .. 0xD7FF, 0xE000 .. 0xFFFF}, then interpret
1509  // each such number as a Unicode scalar value and map the component to the
1510  // string made of those scalar values. Note that the range and digit length
1511  // restrictions mean that the "uni" prefix can be used only with Unicode
1512  // values from the Basic Multilingual Plane (BMP).
1513  if (n >= 7 && (n % 4) == 3 && !strncmp(charName, "uni", 3)) {
1514  int i;
1515  unsigned int m;
1516  for (i = 0, m = 3; i < uLen && m < n; m += 4) {
1517  if (isxdigit(charName[m]) && isxdigit(charName[m + 1]) && isxdigit(charName[m + 2]) && isxdigit(charName[m + 3])) {
1518  unsigned int u;
1519  sscanf(charName + m, "%4x", &u);
1520  if (u <= 0xD7FF || (0xE000 <= u && u <= 0xFFFF)) {
1521  uBuf[i++] = u;
1522  }
1523  }
1524  }
1525  return i;
1526  }
1527  // 3.4. otherwise, if the component is of the form "u" (U+0075) followed by
1528  // a sequence of four to six uppercase hexadecimal digits {0 .. 9, A .. F}
1529  // (U+0030 .. U+0039, U+0041 .. U+0046), and those digits represent a
1530  // number in {0x0000 .. 0xD7FF, 0xE000 .. 0x10FFFF}, then interpret this
1531  // number as a Unicode scalar value and map the component to the string
1532  // made of this scalar value.
1533  if (n >= 5 && n <= 7 && charName[0] == 'u' && isxdigit(charName[1]) && isxdigit(charName[2]) && isxdigit(charName[3]) && isxdigit(charName[4]) && (n <= 5 || isxdigit(charName[5])) && (n <= 6 || isxdigit(charName[6]))) {
1534  unsigned int u;
1535  sscanf(charName + 1, "%x", &u);
1536  if (u <= 0xD7FF || (0xE000 <= u && u <= 0x10FFFF)) {
1537  uBuf[0] = u;
1538  return 1;
1539  }
1540  }
1541  // Not in Adobe Glyph Mapping convention: look for names like xx
1542  // or Axx and parse for hex or decimal values.
1543  if (numeric && parseNumericName(charName, hex, uBuf))
1544  return 1;
1545  // 3.5. otherwise, map the component to the empty string
1546  return 0;
1547 }
1548 
1549 int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code, Unicode const **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const
1550 {
1551  CharCode c;
1552 
1553  *code = c = (CharCode)(*s & 0xff);
1554  *uLen = ctu->mapToUnicode(c, u);
1555  *dx = widths[c];
1556  *dy = *ox = *oy = 0;
1557  return 1;
1558 }
1559 
1561 {
1562  return ctu;
1563 }
1564 
1566 {
1567  int *map;
1568  int cmapPlatform, cmapEncoding;
1569  int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
1570  bool useMacRoman, useUnicode;
1571  char *charName;
1572  Unicode u;
1573  int code, i, n;
1574 
1575  map = (int *)gmallocn(256, sizeof(int));
1576  for (i = 0; i < 256; ++i) {
1577  map[i] = 0;
1578  }
1579 
1580  // To match up with the Adobe-defined behaviour, we choose a cmap
1581  // like this:
1582  // 1. If the PDF font has an encoding:
1583  // 1a. If the TrueType font has a Microsoft Unicode
1584  // cmap or a non-Microsoft Unicode cmap, use it, and use the
1585  // Unicode indexes, not the char codes.
1586  // 1b. If the PDF font specified MacRomanEncoding and the
1587  // TrueType font has a Macintosh Roman cmap, use it, and
1588  // reverse map the char names through MacRomanEncoding to
1589  // get char codes.
1590  // 1c. If the PDF font is symbolic and the TrueType font has a
1591  // Microsoft Symbol cmap, use it, and use char codes
1592  // directly (possibly with an offset of 0xf000).
1593  // 1d. If the TrueType font has a Macintosh Roman cmap, use it,
1594  // as in case 1a.
1595  // 2. If the PDF font does not have an encoding or the PDF font is
1596  // symbolic:
1597  // 2a. If the TrueType font has a Macintosh Roman cmap, use it,
1598  // and use char codes directly (possibly with an offset of
1599  // 0xf000).
1600  // 2b. If the TrueType font has a Microsoft Symbol cmap, use it,
1601  // and use char codes directly (possible with an offset of
1602  // 0xf000).
1603  // 3. If none of these rules apply, use the first cmap and hope for
1604  // the best (this shouldn't happen).
1605  unicodeCmap = macRomanCmap = msSymbolCmap = -1;
1606  for (i = 0; i < ff->getNumCmaps(); ++i) {
1607  cmapPlatform = ff->getCmapPlatform(i);
1608  cmapEncoding = ff->getCmapEncoding(i);
1609  if ((cmapPlatform == 3 && cmapEncoding == 1) || cmapPlatform == 0) {
1610  unicodeCmap = i;
1611  } else if (cmapPlatform == 1 && cmapEncoding == 0) {
1612  macRomanCmap = i;
1613  } else if (cmapPlatform == 3 && cmapEncoding == 0) {
1614  msSymbolCmap = i;
1615  }
1616  }
1617  cmap = 0;
1618  useMacRoman = false;
1619  useUnicode = false;
1620  if (hasEncoding || type == fontType1) {
1621  if (unicodeCmap >= 0) {
1622  cmap = unicodeCmap;
1623  useUnicode = true;
1624  } else if (usesMacRomanEnc && macRomanCmap >= 0) {
1625  cmap = macRomanCmap;
1626  useMacRoman = true;
1627  } else if ((flags & fontSymbolic) && msSymbolCmap >= 0) {
1628  cmap = msSymbolCmap;
1629  } else if ((flags & fontSymbolic) && macRomanCmap >= 0) {
1630  cmap = macRomanCmap;
1631  } else if (macRomanCmap >= 0) {
1632  cmap = macRomanCmap;
1633  useMacRoman = true;
1634  }
1635  } else {
1636  if (msSymbolCmap >= 0) {
1637  cmap = msSymbolCmap;
1638  } else if (macRomanCmap >= 0) {
1639  cmap = macRomanCmap;
1640  }
1641  }
1642 
1643  // reverse map the char names through MacRomanEncoding, then map the
1644  // char codes through the cmap
1645  if (useMacRoman) {
1646  for (i = 0; i < 256; ++i) {
1647  if ((charName = enc[i])) {
1648  if ((code = globalParams->getMacRomanCharCode(charName))) {
1649  map[i] = ff->mapCodeToGID(cmap, code);
1650  }
1651  } else {
1652  map[i] = -1;
1653  }
1654  }
1655 
1656  // map Unicode through the cmap
1657  } else if (useUnicode) {
1658  const Unicode *uAux;
1659  for (i = 0; i < 256; ++i) {
1660  if (((charName = enc[i]) && (u = globalParams->mapNameToUnicodeAll(charName))))
1661  map[i] = ff->mapCodeToGID(cmap, u);
1662  else {
1663  n = ctu->mapToUnicode((CharCode)i, &uAux);
1664  if (n > 0)
1665  map[i] = ff->mapCodeToGID(cmap, uAux[0]);
1666  else
1667  map[i] = -1;
1668  }
1669  }
1670 
1671  // map the char codes through the cmap, possibly with an offset of
1672  // 0xf000
1673  } else {
1674  for (i = 0; i < 256; ++i) {
1675  if (!(map[i] = ff->mapCodeToGID(cmap, i))) {
1676  map[i] = ff->mapCodeToGID(cmap, 0xf000 + i);
1677  }
1678  }
1679  }
1680 
1681  // try the TrueType 'post' table to handle any unmapped characters
1682  for (i = 0; i < 256; ++i) {
1683  if (map[i] <= 0 && (charName = enc[i])) {
1684  map[i] = ff->mapNameToGID(charName);
1685  }
1686  }
1687 
1688  return map;
1689 }
1690 
1692 {
1693  return charProcs.isDict() ? charProcs.getDict() : nullptr;
1694 }
1695 
1697 {
1698  if (enc[code] && charProcs.isDict()) {
1699  return charProcs.dictLookup(enc[code]);
1700  } else {
1701  return Object(objNull);
1702  }
1703 }
1704 
1706 {
1707  if (enc[code] && charProcs.isDict()) {
1708  return charProcs.dictLookupNF(enc[code]).copy();
1709  } else {
1710  return Object(objNull);
1711  }
1712 }
1713 
1715 {
1716  return resources.isDict() ? resources.getDict() : nullptr;
1717 }
1718 
1719 //------------------------------------------------------------------------
1720 // GfxCIDFont
1721 //------------------------------------------------------------------------
1722 
1724 {
1725  bool operator()(const GfxFontCIDWidthExcep w1, const GfxFontCIDWidthExcep w2) { return w1.first < w2.first; }
1726 };
1727 
1729 {
1730  bool operator()(const GfxFontCIDWidthExcepV &w1, const GfxFontCIDWidthExcepV &w2) { return w1.first < w2.first; }
1731 };
1732 
1733 GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, GfxFontType typeA, Ref embFontIDA, Dict *fontDict) : GfxFont(tagA, idA, nameA, typeA, embFontIDA)
1734 {
1735  Dict *desFontDict;
1736  Object desFontDictObj;
1737  Object obj1, obj2, obj3, obj4, obj5, obj6;
1738  int c1, c2;
1739  int excepsSize;
1740 
1741  refCnt = 1;
1742  ascent = 0.95;
1743  descent = -0.35;
1744  fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
1745  collection = nullptr;
1746  cMap = nullptr;
1747  ctu = nullptr;
1748  ctuUsesCharCode = true;
1749  widths.defWidth = 1.0;
1750  widths.defHeight = -1.0;
1751  widths.defVY = 0.880;
1752  widths.exceps = nullptr;
1753  widths.nExceps = 0;
1754  widths.excepsV = nullptr;
1755  widths.nExcepsV = 0;
1756  cidToGID = nullptr;
1757  cidToGIDLen = 0;
1758 
1759  // get the descendant font
1760  obj1 = fontDict->lookup("DescendantFonts");
1761  if (!obj1.isArray() || obj1.arrayGetLength() == 0) {
1762  error(errSyntaxError, -1, "Missing or empty DescendantFonts entry in Type 0 font");
1763  return;
1764  }
1765  desFontDictObj = obj1.arrayGet(0);
1766  if (!desFontDictObj.isDict()) {
1767  error(errSyntaxError, -1, "Bad descendant font in Type 0 font");
1768  return;
1769  }
1770  desFontDict = desFontDictObj.getDict();
1771 
1772  // get info from font descriptor
1773  readFontDescriptor(xref, desFontDict);
1774 
1775  //----- encoding info -----
1776 
1777  // char collection
1778  obj1 = desFontDict->lookup("CIDSystemInfo");
1779  if (!obj1.isDict()) {
1780  error(errSyntaxError, -1, "Missing CIDSystemInfo dictionary in Type 0 descendant font");
1781  return;
1782  }
1783  obj2 = obj1.dictLookup("Registry");
1784  obj3 = obj1.dictLookup("Ordering");
1785  if (!obj2.isString() || !obj3.isString()) {
1786  error(errSyntaxError, -1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font");
1787  return;
1788  }
1789  collection = obj2.getString()->copy()->append('-')->append(obj3.getString());
1790 
1791  // look for a ToUnicode CMap
1792  if (!(ctu = readToUnicodeCMap(fontDict, 16, nullptr))) {
1793  ctuUsesCharCode = false;
1794 
1795  // use an identity mapping for the "Adobe-Identity" and
1796  // "Adobe-UCS" collections
1797  if (!collection->cmp("Adobe-Identity") || !collection->cmp("Adobe-UCS")) {
1799  } else {
1800  // look for a user-supplied .cidToUnicode file
1802  // I'm not completely sure that this is the best thing to do
1803  // but it seems to produce better results when the .cidToUnicode
1804  // files from the poppler-data package are missing. At least
1805  // we know that assuming the Identity mapping is definitely wrong.
1806  // -- jrmuizel
1807  static const char *knownCollections[] = {
1808  "Adobe-CNS1", "Adobe-GB1", "Adobe-Japan1", "Adobe-Japan2", "Adobe-Korea1",
1809  };
1810  for (const char *knownCollection : knownCollections) {
1811  if (collection->cmp(knownCollection) == 0) {
1812  error(errSyntaxError, -1, "Missing language pack for '{0:t}' mapping", collection);
1813  return;
1814  }
1815  }
1816  error(errSyntaxError, -1, "Unknown character collection '{0:t}'", collection);
1817  // fall-through, assuming the Identity mapping -- this appears
1818  // to match Adobe's behavior
1819  }
1820  }
1821  }
1822 
1823  // encoding (i.e., CMap)
1824  obj1 = fontDict->lookup("Encoding");
1825  if (obj1.isNull()) {
1826  error(errSyntaxError, -1, "Missing Encoding entry in Type 0 font");
1827  return;
1828  }
1829  if (!(cMap = CMap::parse(nullptr, collection, &obj1))) {
1830  return;
1831  }
1832  if (cMap->getCMapName()) {
1833  encodingName->Set(cMap->getCMapName()->c_str());
1834  } else {
1835  encodingName->Set("Custom");
1836  }
1837 
1838  // CIDToGIDMap (for embedded TrueType fonts)
1839  obj1 = desFontDict->lookup("CIDToGIDMap");
1840  if (obj1.isStream()) {
1841  cidToGIDLen = 0;
1842  int i = 64;
1843  cidToGID = (int *)gmallocn(i, sizeof(int));
1844  obj1.streamReset();
1845  while ((c1 = obj1.streamGetChar()) != EOF && (c2 = obj1.streamGetChar()) != EOF) {
1846  if (cidToGIDLen == i) {
1847  i *= 2;
1848  cidToGID = (int *)greallocn(cidToGID, i, sizeof(int));
1849  }
1850  cidToGID[cidToGIDLen++] = (c1 << 8) + c2;
1851  }
1852  } else if (!obj1.isName("Identity") && !obj1.isNull()) {
1853  error(errSyntaxError, -1, "Invalid CIDToGIDMap entry in CID font");
1854  }
1855 
1856  //----- character metrics -----
1857 
1858  // default char width
1859  obj1 = desFontDict->lookup("DW");
1860  if (obj1.isInt()) {
1861  widths.defWidth = obj1.getInt() * 0.001;
1862  }
1863 
1864  // char width exceptions
1865  obj1 = desFontDict->lookup("W");
1866  if (obj1.isArray()) {
1867  excepsSize = 0;
1868  int i = 0;
1869  while (i + 1 < obj1.arrayGetLength()) {
1870  obj2 = obj1.arrayGet(i);
1871  obj3 = obj1.arrayGet(i + 1);
1872  if (obj2.isInt() && obj3.isInt() && i + 2 < obj1.arrayGetLength()) {
1873  obj4 = obj1.arrayGet(i + 2);
1874  if (obj4.isNum()) {
1875  if (widths.nExceps == excepsSize) {
1876  excepsSize += 16;
1878  }
1879  widths.exceps[widths.nExceps].first = obj2.getInt();
1880  widths.exceps[widths.nExceps].last = obj3.getInt();
1881  widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
1882  ++widths.nExceps;
1883  } else {
1884  error(errSyntaxError, -1, "Bad widths array in Type 0 font");
1885  }
1886  i += 3;
1887  } else if (obj2.isInt() && obj3.isArray()) {
1888  if (widths.nExceps + obj3.arrayGetLength() > excepsSize) {
1889  excepsSize = (widths.nExceps + obj3.arrayGetLength() + 15) & ~15;
1891  }
1892  int j = obj2.getInt();
1893  if (likely(j < INT_MAX - obj3.arrayGetLength())) {
1894  for (int k = 0; k < obj3.arrayGetLength(); ++k) {
1895  obj4 = obj3.arrayGet(k);
1896  if (obj4.isNum()) {
1899  widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
1900  ++j;
1901  ++widths.nExceps;
1902  } else {
1903  error(errSyntaxError, -1, "Bad widths array in Type 0 font");
1904  }
1905  }
1906  }
1907  i += 2;
1908  } else {
1909  error(errSyntaxError, -1, "Bad widths array in Type 0 font");
1910  ++i;
1911  }
1912  }
1914  }
1915 
1916  // default metrics for vertical font
1917  obj1 = desFontDict->lookup("DW2");
1918  if (obj1.isArray() && obj1.arrayGetLength() == 2) {
1919  obj2 = obj1.arrayGet(0);
1920  if (obj2.isNum()) {
1921  widths.defVY = obj2.getNum() * 0.001;
1922  }
1923  obj2 = obj1.arrayGet(1);
1924  if (obj2.isNum()) {
1925  widths.defHeight = obj2.getNum() * 0.001;
1926  }
1927  }
1928 
1929  // char metric exceptions for vertical font
1930  obj1 = desFontDict->lookup("W2");
1931  if (obj1.isArray()) {
1932  excepsSize = 0;
1933  int i = 0;
1934  while (i + 1 < obj1.arrayGetLength()) {
1935  obj2 = obj1.arrayGet(i);
1936  obj3 = obj1.arrayGet(i + 1);
1937  if (obj2.isInt() && obj3.isInt() && i + 4 < obj1.arrayGetLength()) {
1938  if ((obj4 = obj1.arrayGet(i + 2), obj4.isNum()) && (obj5 = obj1.arrayGet(i + 3), obj5.isNum()) && (obj6 = obj1.arrayGet(i + 4), obj6.isNum())) {
1939  if (widths.nExcepsV == excepsSize) {
1940  excepsSize += 16;
1942  }
1945  widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001;
1946  widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001;
1947  widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001;
1948  ++widths.nExcepsV;
1949  } else {
1950  error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font");
1951  }
1952  i += 5;
1953  } else if (obj2.isInt() && obj3.isArray()) {
1954  if (widths.nExcepsV + obj3.arrayGetLength() / 3 > excepsSize) {
1955  excepsSize = (widths.nExcepsV + obj3.arrayGetLength() / 3 + 15) & ~15;
1957  }
1958  int j = obj2.getInt();
1959  for (int k = 0; k < obj3.arrayGetLength(); k += 3) {
1960  if ((obj4 = obj3.arrayGet(k), obj4.isNum()) && (obj5 = obj3.arrayGet(k + 1), obj5.isNum()) && (obj6 = obj3.arrayGet(k + 2), obj6.isNum())) {
1963  widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001;
1964  widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001;
1965  widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001;
1966  ++j;
1967  ++widths.nExcepsV;
1968  } else {
1969  error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font");
1970  }
1971  }
1972  i += 2;
1973  } else {
1974  error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font");
1975  ++i;
1976  }
1977  }
1979  }
1980 
1981  ok = true;
1982 }
1983 
1985 {
1986  if (collection) {
1987  delete collection;
1988  }
1989  if (cMap) {
1990  cMap->decRefCnt();
1991  }
1992  if (ctu) {
1993  ctu->decRefCnt();
1994  }
1995  gfree(widths.exceps);
1996  gfree(widths.excepsV);
1997  if (cidToGID) {
1998  gfree(cidToGID);
1999  }
2000 }
2001 
2002 int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code, Unicode const **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const
2003 {
2004  CID cid;
2005  CharCode dummy;
2006  double w, h, vx, vy;
2007  int n, a, b, m;
2008 
2009  if (!cMap) {
2010  *code = 0;
2011  *uLen = 0;
2012  *dx = *dy = 0;
2013  return 1;
2014  }
2015 
2016  *code = (CharCode)(cid = cMap->getCID(s, len, &dummy, &n));
2017  if (ctu) {
2018  if (hasToUnicode) {
2019  int i = 0, c = 0;
2020  while (i < n) {
2021  c = (c << 8) + (s[i] & 0xff);
2022  ++i;
2023  }
2024  *uLen = ctu->mapToUnicode(c, u);
2025  } else {
2026  *uLen = ctu->mapToUnicode(cid, u);
2027  }
2028  } else {
2029  *uLen = 0;
2030  }
2031 
2032  // horizontal
2033  if (cMap->getWMode() == 0) {
2034  w = getWidth(cid);
2035  h = vx = vy = 0;
2036 
2037  // vertical
2038  } else {
2039  w = 0;
2040  h = widths.defHeight;
2041  vx = getWidth(cid) / 2;
2042  vy = widths.defVY;
2043  if (widths.nExcepsV > 0 && cid >= widths.excepsV[0].first) {
2044  a = 0;
2045  b = widths.nExcepsV;
2046  // invariant: widths.excepsV[a].first <= cid < widths.excepsV[b].first
2047  while (b - a > 1) {
2048  m = (a + b) / 2;
2049  if (widths.excepsV[m].last <= cid) {
2050  a = m;
2051  } else {
2052  b = m;
2053  }
2054  }
2055  if (cid <= widths.excepsV[a].last) {
2056  h = widths.excepsV[a].height;
2057  vx = widths.excepsV[a].vx;
2058  vy = widths.excepsV[a].vy;
2059  }
2060  }
2061  }
2062 
2063  *dx = w;
2064  *dy = h;
2065  *ox = vx;
2066  *oy = vy;
2067 
2068  return n;
2069 }
2070 
2072 {
2073  return cMap ? cMap->getWMode() : 0;
2074 }
2075 
2077 {
2078  return ctu;
2079 }
2080 
2082 {
2083  return cMap ? cMap->getCollection() : nullptr;
2084 }
2085 
2086 int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi, Unicode unicode, bool wmode)
2087 {
2088  unsigned short gid = ff->mapCodeToGID(cmapi, unicode);
2089  if (wmode) {
2090  unsigned short vgid = ff->mapToVertGID(gid);
2091  if (vgid != 0)
2092  gid = vgid;
2093  }
2094  return gid;
2095 }
2096 
2097 int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *codeToGIDLen)
2098 {
2099 #define N_UCS_CANDIDATES 2
2100  /* space characters */
2101  static const unsigned long spaces[] = { 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x00A0, 0x200B, 0x2060, 0x3000, 0xFEFF, 0 };
2102  static const char *adobe_cns1_cmaps[] = { "UniCNS-UTF32-V", "UniCNS-UCS2-V", "UniCNS-UTF32-H", "UniCNS-UCS2-H", nullptr };
2103  static const char *adobe_gb1_cmaps[] = { "UniGB-UTF32-V", "UniGB-UCS2-V", "UniGB-UTF32-H", "UniGB-UCS2-H", nullptr };
2104  static const char *adobe_japan1_cmaps[] = { "UniJIS-UTF32-V", "UniJIS-UCS2-V", "UniJIS-UTF32-H", "UniJIS-UCS2-H", nullptr };
2105  static const char *adobe_japan2_cmaps[] = { "UniHojo-UTF32-V", "UniHojo-UCS2-V", "UniHojo-UTF32-H", "UniHojo-UCS2-H", nullptr };
2106  static const char *adobe_korea1_cmaps[] = { "UniKS-UTF32-V", "UniKS-UCS2-V", "UniKS-UTF32-H", "UniKS-UCS2-H", nullptr };
2107  static struct CMapListEntry
2108  {
2109  const char *collection;
2110  const char *scriptTag;
2111  const char *languageTag;
2112  const char *toUnicodeMap;
2113  const char **CMaps;
2114  } CMapList[] = { {
2115  "Adobe-CNS1",
2116  "hani",
2117  "CHN ",
2118  "Adobe-CNS1-UCS2",
2119  adobe_cns1_cmaps,
2120  },
2121  {
2122  "Adobe-GB1",
2123  "hani",
2124  "CHN ",
2125  "Adobe-GB1-UCS2",
2126  adobe_gb1_cmaps,
2127  },
2128  {
2129  "Adobe-Japan1",
2130  "kana",
2131  "JAN ",
2132  "Adobe-Japan1-UCS2",
2133  adobe_japan1_cmaps,
2134  },
2135  {
2136  "Adobe-Japan2",
2137  "kana",
2138  "JAN ",
2139  "Adobe-Japan2-UCS2",
2140  adobe_japan2_cmaps,
2141  },
2142  {
2143  "Adobe-Korea1",
2144  "hang",
2145  "KOR ",
2146  "Adobe-Korea1-UCS2",
2147  adobe_korea1_cmaps,
2148  },
2149  { nullptr, nullptr, nullptr, nullptr, nullptr } };
2150  Unicode *humap = nullptr;
2151  Unicode *vumap = nullptr;
2152  Unicode *tumap = nullptr;
2153  int *codeToGID = nullptr;
2154  int i;
2155  unsigned long code;
2156  int wmode;
2157  const char **cmapName;
2158  CMapListEntry *lp;
2159  int cmap;
2160  int cmapPlatform, cmapEncoding;
2161  Ref embID;
2162 
2163  *codeToGIDLen = 0;
2164  if (!ctu || !getCollection())
2165  return nullptr;
2166  if (getCollection()->cmp("Adobe-Identity") == 0)
2167  return nullptr;
2168  if (getEmbeddedFontID(&embID)) {
2169  /* if this font is embedded font,
2170  * CIDToGIDMap should be embedded in PDF file
2171  * and already set. So return it.
2172  */
2173  *codeToGIDLen = getCIDToGIDLen();
2174  return getCIDToGID();
2175  }
2176 
2177  /* we use only unicode cmap */
2178  cmap = -1;
2179  for (i = 0; i < ff->getNumCmaps(); ++i) {
2180  cmapPlatform = ff->getCmapPlatform(i);
2181  cmapEncoding = ff->getCmapEncoding(i);
2182  if (cmapPlatform == 3 && cmapEncoding == 10) {
2183  /* UCS-4 */
2184  cmap = i;
2185  /* use UCS-4 cmap */
2186  break;
2187  } else if (cmapPlatform == 3 && cmapEncoding == 1) {
2188  /* Unicode */
2189  cmap = i;
2190  } else if (cmapPlatform == 0 && cmap < 0) {
2191  cmap = i;
2192  }
2193  }
2194  if (cmap < 0)
2195  return nullptr;
2196 
2197  wmode = getWMode();
2198  for (lp = CMapList; lp->collection != nullptr; lp++) {
2199  if (strcmp(lp->collection, getCollection()->c_str()) == 0) {
2200  break;
2201  }
2202  }
2203  const unsigned int n = 65536;
2204  tumap = new Unicode[n];
2205  humap = new Unicode[n * N_UCS_CANDIDATES];
2206  memset(humap, 0, sizeof(Unicode) * n * N_UCS_CANDIDATES);
2207  if (lp->collection != nullptr) {
2208  CharCodeToUnicode *tctu;
2209  GooString tname(lp->toUnicodeMap);
2210 
2211  if ((tctu = CharCodeToUnicode::parseCMapFromFile(&tname, 16)) != nullptr) {
2212  CharCode cid;
2213  for (cid = 0; cid < n; cid++) {
2214  int len;
2215  const Unicode *ucodes;
2216 
2217  len = tctu->mapToUnicode(cid, &ucodes);
2218  if (len == 1) {
2219  tumap[cid] = ucodes[0];
2220  } else {
2221  /* if not single character, ignore it */
2222  tumap[cid] = 0;
2223  }
2224  }
2225  delete tctu;
2226  }
2227  vumap = new Unicode[n];
2228  memset(vumap, 0, sizeof(Unicode) * n);
2229  for (cmapName = lp->CMaps; *cmapName != nullptr; cmapName++) {
2230  GooString cname(*cmapName);
2231 
2232  CMap *cnameCMap;
2233  if ((cnameCMap = globalParams->getCMap(getCollection(), &cname)) != nullptr) {
2234  if (cnameCMap->getWMode()) {
2235  cnameCMap->setReverseMap(vumap, n, 1);
2236  } else {
2237  cnameCMap->setReverseMap(humap, n, N_UCS_CANDIDATES);
2238  }
2239  cnameCMap->decRefCnt();
2240  }
2241  }
2242  ff->setupGSUB(lp->scriptTag, lp->languageTag);
2243  } else {
2244  error(errSyntaxError, -1, "Unknown character collection {0:t}\n", getCollection());
2245  if (ctu) {
2246  CharCode cid;
2247  for (cid = 0; cid < n; cid++) {
2248  const Unicode *ucode;
2249 
2250  if (ctu->mapToUnicode(cid, &ucode))
2251  humap[cid * N_UCS_CANDIDATES] = ucode[0];
2252  else
2253  humap[cid * N_UCS_CANDIDATES] = 0;
2254  for (i = 1; i < N_UCS_CANDIDATES; i++) {
2255  humap[cid * N_UCS_CANDIDATES + i] = 0;
2256  }
2257  }
2258  }
2259  }
2260  // map CID -> Unicode -> GID
2261  codeToGID = (int *)gmallocn(n, sizeof(int));
2262  for (code = 0; code < n; ++code) {
2263  Unicode unicode;
2264  unsigned long gid;
2265 
2266  unicode = 0;
2267  gid = 0;
2268  if (humap != nullptr) {
2269  for (i = 0; i < N_UCS_CANDIDATES && gid == 0 && (unicode = humap[code * N_UCS_CANDIDATES + i]) != 0; i++) {
2270  gid = mapCodeToGID(ff, cmap, unicode, false);
2271  }
2272  }
2273  if (gid == 0 && vumap != nullptr) {
2274  unicode = vumap[code];
2275  if (unicode != 0) {
2276  gid = mapCodeToGID(ff, cmap, unicode, true);
2277  if (gid == 0 && tumap != nullptr) {
2278  if ((unicode = tumap[code]) != 0) {
2279  gid = mapCodeToGID(ff, cmap, unicode, true);
2280  }
2281  }
2282  }
2283  }
2284  if (gid == 0 && tumap != nullptr) {
2285  if ((unicode = tumap[code]) != 0) {
2286  gid = mapCodeToGID(ff, cmap, unicode, false);
2287  }
2288  }
2289  if (gid == 0) {
2290  /* special handling space characters */
2291  const unsigned long *p;
2292 
2293  if (humap != nullptr)
2294  unicode = humap[code];
2295  if (unicode != 0) {
2296  /* check if code is space character , so map code to 0x0020 */
2297  for (p = spaces; *p != 0; p++) {
2298  if (*p == unicode) {
2299  unicode = 0x20;
2300  gid = mapCodeToGID(ff, cmap, unicode, wmode);
2301  break;
2302  }
2303  }
2304  }
2305  }
2306  codeToGID[code] = gid;
2307  }
2308  *codeToGIDLen = n;
2309  if (humap != nullptr)
2310  delete[] humap;
2311  if (tumap != nullptr)
2312  delete[] tumap;
2313  if (vumap != nullptr)
2314  delete[] vumap;
2315  return codeToGID;
2316 }
2317 
2318 double GfxCIDFont::getWidth(CID cid) const
2319 {
2320  double w;
2321  int a, b, m;
2322 
2323  w = widths.defWidth;
2324  if (widths.nExceps > 0 && cid >= widths.exceps[0].first) {
2325  a = 0;
2326  b = widths.nExceps;
2327  // invariant: widths.exceps[a].first <= cid < widths.exceps[b].first
2328  while (b - a > 1) {
2329  m = (a + b) / 2;
2330  if (widths.exceps[m].first <= cid) {
2331  a = m;
2332  } else {
2333  b = m;
2334  }
2335  }
2336  if (cid <= widths.exceps[a].last) {
2337  w = widths.exceps[a].width;
2338  }
2339  }
2340  return w;
2341 }
2342 
2343 double GfxCIDFont::getWidth(char *s, int len) const
2344 {
2345  int nUsed;
2346  CharCode c;
2347 
2348  CID cid = cMap->getCID(s, len, &c, &nUsed);
2349  return getWidth(cid);
2350 }
2351 
2352 //------------------------------------------------------------------------
2353 // GfxFontDict
2354 //------------------------------------------------------------------------
2355 
2356 GfxFontDict::GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict)
2357 {
2358  int i;
2359  Ref r;
2360 
2361  numFonts = fontDict->getLength();
2362  fonts = (GfxFont **)gmallocn(numFonts, sizeof(GfxFont *));
2363  for (i = 0; i < numFonts; ++i) {
2364  const Object &obj1 = fontDict->getValNF(i);
2365  Object obj2 = obj1.fetch(xref);
2366  if (obj2.isDict()) {
2367  if (obj1.isRef()) {
2368  r = obj1.getRef();
2369  } else if (fontDictRef) {
2370  // legal generation numbers are five digits, so we use a
2371  // 6-digit number here
2372  r.gen = 100000 + fontDictRef->num;
2373  r.num = i;
2374  } else {
2375  // no indirect reference for this font, or for the containing
2376  // font dict, so hash the font and use that
2377  r.gen = 100000;
2378  r.num = hashFontObject(&obj2);
2379  }
2380  fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i), r, obj2.getDict());
2381  if (fonts[i] && !fonts[i]->isOk()) {
2382  // XXX: it may be meaningful to distinguish between
2383  // NULL and !isOk() so that when we do lookups
2384  // we can tell the difference between a missing font
2385  // and a font that is just !isOk()
2386  fonts[i]->decRefCnt();
2387  fonts[i] = nullptr;
2388  }
2389  } else {
2390  error(errSyntaxError, -1, "font resource is not a dictionary");
2391  fonts[i] = nullptr;
2392  }
2393  }
2394 }
2395 
2397 {
2398  int i;
2399 
2400  for (i = 0; i < numFonts; ++i) {
2401  if (fonts[i]) {
2402  fonts[i]->decRefCnt();
2403  }
2404  }
2405  gfree(fonts);
2406 }
2407 
2409 {
2410  int i;
2411 
2412  for (i = 0; i < numFonts; ++i) {
2413  if (fonts[i] && fonts[i]->matches(tag)) {
2414  return fonts[i];
2415  }
2416  }
2417  return nullptr;
2418 }
2419 
2420 // FNV-1a hash
2421 class FNVHash
2422 {
2423 public:
2424  FNVHash() { h = 2166136261U; }
2425 
2426  void hash(char c)
2427  {
2428  h ^= c & 0xff;
2429  h *= 16777619;
2430  }
2431 
2432  void hash(const char *p, int n)
2433  {
2434  int i;
2435  for (i = 0; i < n; ++i) {
2436  hash(p[i]);
2437  }
2438  }
2439 
2440  int get31() { return (h ^ (h >> 31)) & 0x7fffffff; }
2441 
2442 private:
2443  unsigned int h;
2444 };
2445 
2447 {
2448  FNVHash h;
2449 
2450  hashFontObject1(obj, &h);
2451  return h.get31();
2452 }
2453 
2455 {
2456  const GooString *s;
2457  const char *p;
2458  double r;
2459  int n, i;
2460 
2461  switch (obj->getType()) {
2462  case objBool:
2463  h->hash('b');
2464  h->hash(obj->getBool() ? 1 : 0);
2465  break;
2466  case objInt:
2467  h->hash('i');
2468  n = obj->getInt();
2469  h->hash((char *)&n, sizeof(int));
2470  break;
2471  case objReal:
2472  h->hash('r');
2473  r = obj->getReal();
2474  h->hash((char *)&r, sizeof(double));
2475  break;
2476  case objString:
2477  h->hash('s');
2478  s = obj->getString();
2479  h->hash(s->c_str(), s->getLength());
2480  break;
2481  case objName:
2482  h->hash('n');
2483  p = obj->getName();
2484  h->hash(p, (int)strlen(p));
2485  break;
2486  case objNull:
2487  h->hash('z');
2488  break;
2489  case objArray:
2490  h->hash('a');
2491  n = obj->arrayGetLength();
2492  h->hash((char *)&n, sizeof(int));
2493  for (i = 0; i < n; ++i) {
2494  const Object &obj2 = obj->arrayGetNF(i);
2495  hashFontObject1(&obj2, h);
2496  }
2497  break;
2498  case objDict:
2499  h->hash('d');
2500  n = obj->dictGetLength();
2501  h->hash((char *)&n, sizeof(int));
2502  for (i = 0; i < n; ++i) {
2503  p = obj->dictGetKey(i);
2504  h->hash(p, (int)strlen(p));
2505  const Object &obj2 = obj->dictGetValNF(i);
2506  hashFontObject1(&obj2, h);
2507  }
2508  break;
2509  case objStream:
2510  // this should never happen - streams must be indirect refs
2511  break;
2512  case objRef:
2513  h->hash('f');
2514  n = obj->getRefNum();
2515  h->hash((char *)&n, sizeof(int));
2516  n = obj->getRefGen();
2517  h->hash((char *)&n, sizeof(int));
2518  break;
2519  default:
2520  h->hash('u');
2521  break;
2522  }
2523 }
BuiltinFont * builtinFontSubst[]
BuiltinFont builtinFonts[]
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
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
int code
Definition: aftopl.c:52
#define font
Definition: aptex-macros.h:175
#define width(a)
Definition: aptex-macros.h:198
#define name
#define subtype(a)
Definition: aptex-macros.h:172
#define w1
int cmp(const void *p, const void *q)
Definition: bkmk2uni.c:1611
Definition: CMap.h:33
const GooString * getCMapName() const
Definition: CMap.h:68
void decRefCnt()
Definition: CMap.cc:343
CID getCID(char *s, int len, CharCode *c, int *nUsed)
Definition: CMap.cc:360
int getWMode()
Definition: CMap.h:67
void setReverseMap(unsigned int *rmap, unsigned int rmapSize, unsigned int ncand)
Definition: CMap.cc:421
static CMap * parse(CMapCache *cache, GString *collectionA, Object *obj)
Definition: CMap.cc:52
GString * getCollection()
Definition: CMap.h:55
int mapToUnicode(CharCode c, Unicode *u, int size)
static CharCodeToUnicode * makeIdentityMapping()
static CharCodeToUnicode * parseCMapFromFile(const GooString *fileName, int nBits)
static CharCodeToUnicode * make8BitToUnicode(Unicode *toUnicode)
static CharCodeToUnicode * parseCMap(GString *buf, int nBits)
void setMapping(CharCode c, Unicode *u, int len)
void mergeCMap(GString *buf, int nBits)
Definition: Dict.h:29
char * getKey(int i)
Definition: Dict.cc:135
int getLength()
Definition: Dict.h:48
Object * lookup(const char *key, Object *obj, int recursion=0)
Definition: Dict.cc:122
Object * getValNF(int i, Object *obj)
Definition: Dict.cc:143
int get31()
Definition: GfxFont.cc:2440
void hash(char c)
Definition: GfxFont.cc:2426
Guint h
Definition: GfxFont.cc:2222
void hash(const char *p, int n)
Definition: GfxFont.cc:2432
FNVHash()
Definition: GfxFont.cc:2424
static FoFiIdentifierType identifyStream(int(*getChar)(void *data), void *data)
static FoFiIdentifierType identifyFile(char *fileName)
int mapNameToGID(char *name)
int setupGSUB(const char *scriptName)
int getCmapEncoding(int i)
int getCmapPlatform(int i)
int mapCodeToGID(int i, int c)
unsigned int mapToVertGID(unsigned int orgGID)
static FoFiType1C * make(char *fileA, int lenA)
Definition: FoFiType1C.cc:97
char ** getEncoding()
Definition: FoFiType1C.cc:166
char * getName()
Definition: FoFiType1C.cc:162
char ** getEncoding()
Definition: FoFiType1.cc:76
static FoFiType1 * make(char *fileA, int lenA)
Definition: FoFiType1.cc:26
char * getName()
Definition: FoFiType1.cc:69
GString * copy()
Definition: GString.h:42
char getChar(int i)
Definition: GString.h:86
int cmp(GString *str)
Definition: GString.cc:777
int getLength()
Definition: GString.h:80
GString * append(char c)
Definition: GString.cc:218
Object * getCharProcNF(int code, Object *proc)
Definition: GfxFont.cc:1562
Dict * getResources()
Definition: GfxFont.cc:1571
Object charProcs
Definition: GfxFont.h:309
double widths[256]
Definition: GfxFont.h:308
GBool baseEncFromFontFile
Definition: GfxFont.h:306
CharCodeToUnicode * ctu
Definition: GfxFont.h:303
char encFree[256]
Definition: GfxFont.h:301
Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, GfxFontType typeA, Ref embFontIDA, Dict *fontDict)
Definition: GfxFont.cc:885
GBool usesMacRomanEnc
Definition: GfxFont.h:305
Object * getCharProc(int code, Object *proc)
Definition: GfxFont.cc:1553
Base14FontMapEntry * base14
Definition: GfxFont.h:299
Dict * getCharProcs()
Definition: GfxFont.cc:1549
virtual ~Gfx8BitFont()
Definition: GfxFont.cc:1381
Object resources
Definition: GfxFont.h:310
CharCodeToUnicode * getToUnicode()
Definition: GfxFont.cc:1410
int * getCodeToGIDMap(FoFiTrueType *ff)
Definition: GfxFont.cc:1415
virtual int getNextChar(char *s, int len, CharCode *code, Unicode *u, int uSize, int *uLen, double *dx, double *dy, double *ox, double *oy)
Definition: GfxFont.cc:1398
GBool hasEncoding
Definition: GfxFont.h:304
int * getCIDToGID()
Definition: GfxFont.h:347
virtual int getWMode()
Definition: GfxFont.cc:2046
GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, GfxFontType typeA, Ref embFontIDA, Dict *fontDict)
Definition: GfxFont.cc:1634
int * cidToGID
Definition: GfxFont.h:370
GString * getCollection()
Definition: GfxFont.cc:2057
GfxFontCIDWidths widths
Definition: GfxFont.h:369
double getWidth(CID cid)
Definition: GfxFont.cc:2061
GString * collection
Definition: GfxFont.h:364
CharCodeToUnicode * ctu
Definition: GfxFont.h:366
GBool ctuUsesCharCode
Definition: GfxFont.h:367
virtual ~GfxCIDFont()
Definition: GfxFont.cc:1954
int mapCodeToGID(FoFiTrueType *ff, int cmapi, Unicode unicode, bool wmode)
Definition: GfxFont.cc:2086
int * getCodeToGIDMap(FoFiTrueType *ff, int *codeToGIDLen)
Definition: GfxFont.cc:2097
CharCodeToUnicode * getToUnicode()
Definition: GfxFont.cc:2050
CMap * cMap
Definition: GfxFont.h:365
int getCIDToGIDLen()
Definition: GfxFont.h:348
virtual int getNextChar(char *s, int len, CharCode *code, Unicode *u, int uSize, int *uLen, double *dx, double *dy, double *ox, double *oy)
Definition: GfxFont.cc:1971
int cidToGIDLen
Definition: GfxFont.h:372
GfxFont * lookup(char *tag)
Definition: GfxFont.cc:2170
int numFonts
Definition: GfxFont.h:467
int hashFontObject(Object *obj)
Definition: GfxFont.cc:2225
GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict)
Definition: GfxFont.cc:2120
void hashFontObject1(Object *obj, FNVHash *h)
Definition: GfxFont.cc:2232
GHash * fonts
Definition: GfxFont.h:404
int fontNum
Definition: GfxFont.h:107
GfxFontLocType locType
Definition: GfxFont.h:99
GString * encoding
Definition: GfxFont.h:112
int substIdx
Definition: GfxFont.h:116
Ref embFontID
Definition: GfxFont.h:101
GfxFontLoc()
Definition: GfxFont.cc:146
GString * path
Definition: GfxFont.h:103
GfxFontType fontType
Definition: GfxFont.h:100
~GfxFontLoc()
Definition: GfxFont.cc:154
GooString * family
Definition: GfxFont.h:313
GBool getEmbeddedFontID(Ref *embID)
Definition: GfxFont.h:164
GBool isFixedWidth()
Definition: GfxFont.h:173
Ref embFontID
Definition: GfxFont.h:232
CharCodeToUnicode * readToUnicodeCMap(Dict *fontDict, int nBits, CharCodeToUnicode *ctu)
Definition: GfxFont.cc:517
GBool isBold()
Definition: GfxFont.h:177
static GfxFontLoc * getExternalFont(GString *path, int fontNum, double oblique, GBool cid)
Definition: GfxFont.cc:788
char * readEmbFontFile(XRef *xref, int *len)
Definition: GfxFont.cc:840
void incRefCnt()
Definition: GfxFont.cc:254
GString * name
Definition: GfxFont.h:228
static const char * getAlternateName(const char *name)
Definition: GfxFont.cc:881
GBool hasToUnicode
Definition: GfxFont.h:239
GooString * encodingName
Definition: GfxFont.h:328
double ascent
Definition: GfxFont.h:236
GfxFontLoc * locateFont(XRef *xref, GBool ps)
Definition: GfxFont.cc:545
std::string getNameWithoutSubsetTag() const
Definition: GfxFont.cc:279
static GfxFontLoc * locateBase14Font(GString *base14Name)
Definition: GfxFont.cc:776
GfxFontType type
Definition: GfxFont.h:229
int flags
Definition: GfxFont.h:230
GBool isSerif()
Definition: GfxFont.h:174
double descent
Definition: GfxFont.h:237
double fontBBox[4]
Definition: GfxFont.h:234
GString * embFontName
Definition: GfxFont.h:231
void decRefCnt()
Definition: GfxFont.cc:259
virtual ~GfxFont()
Definition: GfxFont.cc:213
Weight weight
Definition: GfxFont.h:315
void readFontDescriptor(XRef *xref, Dict *fontDict)
Definition: GfxFont.cc:417
GBool isItalic()
Definition: GfxFont.h:176
Stretch stretch
Definition: GfxFont.h:314
int refCnt
Definition: GfxFont.h:325
bool isSubset() const
Definition: GfxFont.cc:265
GBool ok
Definition: GfxFont.h:240
GString * tag
Definition: GfxFont.h:226
double missingWidth
Definition: GfxFont.h:235
virtual GBool isCIDFont()
Definition: GfxFont.h:160
static GfxFont * makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict)
Definition: GfxFont.cc:167
static GfxFontType getFontType(XRef *xref, Dict *fontDict, Ref *embID)
Definition: GfxFont.cc:233
@ WeightNotDefined
Definition: GfxFont.h:170
@ W800
Definition: GfxFont.h:178
@ W300
Definition: GfxFont.h:173
@ W400
Definition: GfxFont.h:174
@ W100
Definition: GfxFont.h:171
@ W600
Definition: GfxFont.h:176
@ W200
Definition: GfxFont.h:172
@ W500
Definition: GfxFont.h:175
@ W700
Definition: GfxFont.h:177
@ W900
Definition: GfxFont.h:179
GfxFont(const char *tagA, Ref idA, GString *nameA, GfxFontType typeA, Ref embFontIDA)
Definition: GfxFont.cc:201
@ SemiExpanded
Definition: GfxFont.h:162
@ ExtraExpanded
Definition: GfxFont.h:164
@ Condensed
Definition: GfxFont.h:159
@ UltraCondensed
Definition: GfxFont.h:157
@ SemiCondensed
Definition: GfxFont.h:160
@ UltraExpanded
Definition: GfxFont.h:165
@ Normal
Definition: GfxFont.h:161
@ Expanded
Definition: GfxFont.h:163
@ ExtraCondensed
Definition: GfxFont.h:158
@ StretchNotDefined
Definition: GfxFont.h:156
double fontMat[6]
Definition: GfxFont.h:233
GString * findFontFile(GString *fontName)
CMap * getCMap(GString *collection, GString *cMapName)
Unicode mapNameToUnicodeText(const char *charName)
CharCodeToUnicode * getCIDToUnicode(GString *collection)
GString * findBase14FontFile(GString *fontName, int *fontNum, double *oblique)
CharCode getMacRomanCharCode(char *charName)
Unicode mapNameToUnicodeAll(const char *charName)
GString * findSystemFontFile(GString *fontName, SysFontType *type, int *fontNum)
char getChar(int i) const
Definition: GooString.h:148
GooString * del(int i, int n=1)
Definition: GooString.h:214
GooString * Set(const GooString *newStr)
Definition: GooString.h:83
int cmp(const GooString *str) const
Definition: GooString.h:224
Definition: Object.h:84
Ref getRef()
Definition: Object.h:163
GBool isDict()
Definition: Object.h:137
Object * dictLookup(const char *key, Object *obj, int recursion=0)
Definition: Object.h:266
void setToNull()
Definition: Object.h:259
double getReal()
Definition: Object.h:156
Stream * getStream()
Definition: Object.h:162
GBool isNum()
Definition: Object.h:132
void streamClose()
Definition: Object.h:296
double getNum()
Definition: Object.h:157
Object * arrayGetNF(int i, Object *obj)
Definition: Object.h:245
GBool isName()
Definition: Object.h:134
const char * getTypeName()
Definition: Object.cc:156
GBool isStream()
Definition: Object.h:138
GBool isRef()
Definition: Object.h:139
GBool getBool()
Definition: Object.h:154
int getRefGen()
Definition: Object.h:165
Object * copy(Object *obj)
Definition: Object.cc:80
Object * fetch(XRef *xref, Object *obj, int recursion=0)
Definition: Object.cc:114
int dictGetLength()
Definition: Object.h:254
char * getName()
Definition: Object.h:159
int getInt()
Definition: Object.h:155
GBool isInt()
Definition: Object.h:130
Dict * streamGetDict()
Definition: Object.h:317
ObjType getType()
Definition: Object.h:128
int arrayGetLength()
Definition: Object.h:236
GBool isArray()
Definition: Object.h:136
void streamReset()
Definition: Object.h:293
int streamGetChar()
Definition: Object.h:299
GBool isString()
Definition: Object.h:133
GString * getString()
Definition: Object.h:158
Dict * getDict()
Definition: Object.h:161
char * dictGetKey(int i)
Definition: Object.h:272
Object * dictLookupNF(const char *key, Object *obj)
Definition: Object.h:269
GBool isNull()
Definition: Object.h:135
int getRefNum()
Definition: Object.h:164
Object * dictGetValNF(int i, Object *obj)
Definition: Object.h:278
Object * arrayGet(int i, Object *obj, int recursion=0)
Definition: Object.h:242
Definition: Stream.h:67
void fillGooString(GooString *s)
Definition: Stream.h:153
Definition: XRef.h:58
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define dummy
Definition: devnag.c:313
#define gfree(p)
Definition: dt2dv.c:326
int dummy
Definition: dummy.c:29
int w
Definition: dviconv.c:26
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
#define hex(c)
Definition: kanji.c:63
int strcmp()
Definition: coll.cpp:143
int sscanf()
#define error(a)
Definition: dviinfo.c:48
struct rect data
Definition: dvipdfm.c:64
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
#define w2
void * greallocn(void *p, int nObjs, int objSize)
Definition: gmem.cc:291
void * gmallocn(int nObjs, int objSize)
Definition: gmem.cc:204
char * copyString(const char *s)
Definition: gmem.cc:390
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
#define strchr
Definition: gsftopk.c:59
int unicode
Definition: hbf2gf.c:267
#define likely(x)
Definition: jbig2arith.cc:115
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
#define EOF
Definition: afmparse.c:59
FoFiIdentifierType
@ fofiIdCFF8Bit
@ fofiIdTrueTypeCollection
@ fofiIdUnknown
@ fofiIdType1PFA
@ fofiIdOpenTypeCFFCID
@ fofiIdTrueType
@ fofiIdCFFCID
@ fofiIdOpenTypeCFF8Bit
@ fofiIdError
@ fofiIdType1PFB
unsigned int CharCode
Definition: CharTypes.h:22
unsigned int CID
Definition: CharTypes.h:16
@ errSyntaxError
Definition: Error.h:25
@ errSyntaxWarning
Definition: Error.h:23
@ errInternal
Definition: Error.h:34
const char * macRomanEncoding[256]
const char * zapfDingbatsEncoding[256]
const char * symbolEncoding[256]
const char * macExpertEncoding[256]
const char * winAnsiEncoding[256]
const char * standardEncoding[256]
#define fontFixedWidth
Definition: GfxFont.h:125
GfxFontType
Definition: GfxFont.h:38
@ fontType1COT
Definition: GfxFont.h:43
@ fontCIDType0C
Definition: GfxFont.h:49
@ fontCIDType2OT
Definition: GfxFont.h:52
@ fontUnknownType
Definition: GfxFont.h:40
@ fontType1
Definition: GfxFont.h:41
@ fontCIDType2
Definition: GfxFont.h:51
@ fontTrueType
Definition: GfxFont.h:45
@ fontType3
Definition: GfxFont.h:44
@ fontType1C
Definition: GfxFont.h:42
@ fontTrueTypeOT
Definition: GfxFont.h:46
@ fontCIDType0
Definition: GfxFont.h:48
@ fontCIDType0COT
Definition: GfxFont.h:50
#define fontSerif
Definition: GfxFont.h:126
#define fontSymbolic
Definition: GfxFont.h:127
@ gfxFontLocResident
Definition: GfxFont.h:90
@ gfxFontLocEmbedded
Definition: GfxFont.h:88
@ gfxFontLocExternal
Definition: GfxFont.h:89
GlobalParams * globalParams
SysFontType
Definition: GlobalParams.h:54
@ sysFontTTC
Definition: GlobalParams.h:58
@ sysFontPFB
Definition: GlobalParams.h:56
@ sysFontPFA
Definition: GlobalParams.h:55
@ sysFontTTF
Definition: GlobalParams.h:57
@ objBool
Definition: Object.h:48
@ objNull
Definition: Object.h:53
@ objArray
Definition: Object.h:56
@ objString
Definition: Object.h:51
@ objDict
Definition: Object.h:57
@ objStream
Definition: Object.h:58
@ objRef
Definition: Object.h:59
@ objInt
Definition: Object.h:49
@ objReal
Definition: Object.h:50
@ objName
Definition: Object.h:52
#define buf
#define INT_MAX
Definition: c-minmax.h:53
int numeric(char c)
Definition: sort.c:236
#define fabs(x)
Definition: cpascal.h:211
#define string
Definition: ctangleboot.c:111
int strncmp()
int getLength(char *s)
Definition: lengths.c:99
@ err
Definition: mtxline.h:24
list names
Definition: fc-lang.py:151
int k
Definition: otp-parser.c:70
static bool ps
Definition: pdftocairo.cc:91
int r
Definition: ppmqvga.c:68
bstring c int memset(void *s, int c, int length)
#define map
static int parseCharName(char *charName, Unicode *uBuf, int uLen, bool names, bool ligatures, bool numeric, bool hex, bool variants)
Definition: GfxFont.cc:1441
static const Base14FontMapEntry base14FontMap[]
Definition: GfxFont.cc:78
static bool testForNumericNames(Dict *fontDict, bool hex)
Definition: GfxFont.cc:943
static bool parseNumericName(const char *s, bool hex, unsigned int *u)
Definition: GfxFont.cc:900
#define N_UCS_CANDIDATES
static const char * base14SubstFonts[14]
Definition: GfxFont.cc:152
static const AlternateNameMap alternateNameMap[]
Definition: GfxFont.cc:879
static int readFromStream(void *data)
Definition: GfxFont.cc:163
bool unicodeIsAlphabeticPresentationForm(Unicode c)
Unicode * unicodeNormalizeNFKC(const Unicode *in, int len, int *out_len, int **indices)
#define isalpha(ch)
Definition: utype.h:82
#define isalnum(ch)
Definition: utype.h:84
static int sort(lua_State *L)
Definition: ltablib.c:411
#define str(s)
Definition: sh6.c:399
const char * alt
Definition: GfxFont.cc:876
const char * name
Definition: GfxFont.cc:875
const char * base14Name
Definition: GfxFont.cc:43
const char * altName
Definition: GfxFont.cc:42
bool getWidth(const char *n, unsigned short *w) const
Definition: BuiltinFont.h:41
const char ** defaultBaseEnc
Definition: BuiltinFont.h:27
short ascent
Definition: BuiltinFont.h:29
short descent
Definition: BuiltinFont.h:30
short bbox[4]
Definition: BuiltinFont.h:31
double defVY
Definition: GfxFont.h:75
GfxFontCIDWidthExcep * exceps
Definition: GfxFont.h:76
GfxFontCIDWidthExcepV * excepsV
Definition: GfxFont.h:79
double defWidth
Definition: GfxFont.h:73
double defHeight
Definition: GfxFont.h:74
Definition: Object.h:37
static constexpr Ref INVALID()
Definition: Object.h:94
int num
Definition: Object.h:38
bool operator()(const GfxFontCIDWidthExcep w1, const GfxFontCIDWidthExcep w2)
Definition: GfxFont.cc:1725
bool operator()(const GfxFontCIDWidthExcepV &w1, const GfxFontCIDWidthExcepV &w2)
Definition: GfxFont.cc:1730
Definition: inftrees.h:24
Definition: pbmfont.h:11
Definition: tpic.c:45
Definition: dvips.h:235
Definition: xmlparse.c:179
pointer path
Definition: t1imager.h:36
#define c2
Definition: t1io.c:53
#define c1
Definition: t1io.c:52
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
#define xref
Definition: tex2xindy.c:758
int diff
Definition: tex4ht.c:3815
m
Definition: tex4ht.c:3990
#define lig_end(a)
Definition: texfont.h:555
TT_CharMap cmap
Definition: ttf2pfb.c:163
unsigned int * lp
Definition: ttf.c:84