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)  

XeTeX_ext.c
Go to the documentation of this file.
1 /****************************************************************************\
2  Part of the XeTeX typesetting system
3  Copyright (c) 1994-2008 by SIL International
4  Copyright (c) 2009, 2011 by Jonathan Kew
5  Copyright (c) 2012-2015 by Khaled Hosny
6  Copyright (c) 2012, 2013 by Jiang Jiang
7 
8  SIL Author(s): Jonathan Kew
9 
10 Permission is hereby granted, free of charge, to any person obtaining
11 a copy of this software and associated documentation files (the
12 "Software"), to deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify, merge, publish,
14 distribute, sublicense, and/or sell copies of the Software, and to
15 permit persons to whom the Software is furnished to do so, subject to
16 the following conditions:
17 
18 The above copyright notice and this permission notice shall be
19 included in all copies or substantial portions of the Software.
20 
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
25 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
26 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 
29 Except as contained in this notice, the name of the copyright holders
30 shall not be used in advertising or otherwise to promote the sale,
31 use or other dealings in this Software without prior written
32 authorization from the copyright holders.
33 \****************************************************************************/
34 
35 /* XeTeX_ext.c
36  * additional plain C extensions for XeTeX - mostly platform-neutral
37  */
38 
39 #include <w2c/config.h>
40 
41 /*
42  * From TeX Live 2021, we use pplib by Pawe\l Jackowski instead of
43  * libpoppler
44  */
45 #include <ppapi.h>
46 
47 #include <png.h>
48 #include <zlib.h>
49 #include <graphite2/Font.h>
50 
51 #ifdef _MSC_VER
52 #undef timezone
53 #endif
54 
55 #include <time.h> /* For `struct tm'. */
56 #if defined (HAVE_SYS_TIME_H)
57 #include <sys/time.h>
58 #elif defined (HAVE_SYS_TIMEB_H)
59 #include <sys/timeb.h>
60 #endif
61 
62 #define EXTERN extern
63 #include "xetexd.h"
64 
65 #include "XeTeX_ext.h"
66 
67 #include <teckit/TECkit_Engine.h>
68 
69 #include <kpathsea/c-ctype.h>
70 #include <kpathsea/line.h>
71 #include <kpathsea/readable.h>
72 #include <kpathsea/variable.h>
73 #include <kpathsea/absolute.h>
74 #if defined(WIN32)
75 #include <kpathsea/concatn.h>
76 #endif
77 
78 #include <math.h> /* for fabs() */
79 
80 #if defined(__STDC__)
81 #include <locale.h>
82 #endif
83 
84 #include <signal.h> /* Catch interrupts. */
85 
86 #include "XeTeXLayoutInterface.h"
87 
88 #include "XeTeXswap.h"
89 
90 #include <unicode/ubidi.h>
91 #include <unicode/ubrk.h>
92 #include <unicode/ucnv.h>
93 
94 #include <assert.h>
95 
96 /* for reading input files, we don't need the default locking routines
97  as xetex is a single-threaded program */
98 #ifdef WIN32
99 #ifdef __MINGW32__
100 /* MinGW (both 32- and 64-bit) has problems with _getc_nolock() and/or _ungetc_nolock() */
101 #define GETC(f) getc(f)
102 #define UNGETC(c,f) ungetc(c,f)
103 #else
104 #define GETC(f) _getc_nolock(f)
105 #define UNGETC(c,f) _ungetc_nolock(c,f)
106 #endif
107 #else
108 #define GETC(f) getc_unlocked(f)
109 #define UNGETC(c,f) ungetc(c,f)
110 #endif
111 
112 /* tables/values used in UTF-8 interpretation -
113  code is based on ConvertUTF.[ch] sample code
114  published by the Unicode consortium */
115 const uint32_t
117  0x00000000UL,
118  0x00003080UL,
119  0x000E2080UL,
120  0x03C82080UL,
121  0xFA082080UL,
122  0x82082080UL
123 };
124 
125 const uint8_t
127  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
128  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
129  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
130  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
131  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
132  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
133  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
134  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
135 };
136 
137 const uint8_t
139  0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC
140 };
141 
142 const int halfShift = 10;
143 const uint32_t halfBase = 0x0010000UL;
144 const uint32_t halfMask = 0x3FFUL;
145 const uint32_t kSurrogateHighStart = 0xD800UL;
146 const uint32_t kSurrogateHighEnd = 0xDBFFUL;
147 const uint32_t kSurrogateLowStart = 0xDC00UL;
148 const uint32_t kSurrogateLowEnd = 0xDFFFUL;
149 const uint32_t byteMask = 0x000000BFUL;
150 const uint32_t byteMark = 0x00000080UL;
151 
152 
153 /* if the user specifies a paper size or output driver program */
154 const char *papersize;
155 const char *outputdriver = "xdvipdfmx -q -E"; /* default to portable xdvipdfmx driver */
156 
157 
158 void initversionstring(char **versions)
159 {
160 #ifndef XETEX_MAC
161  int fc_version = FcGetVersion();
162 #endif
163  FT_Int ftMajor, ftMinor, ftPatch;
164  int grMajor, grMinor, grBugfix;
165  UVersionInfo icuVersion;
166  char icu_version[U_MAX_VERSION_STRING_LENGTH] = "";
167 
168  const_string fmt =
169  "Compiled with ICU version %s; using %s\n"
170  "Compiled with zlib version %s; using %s\n"
171  "Compiled with FreeType2 version %d.%d.%d; using %d.%d.%d\n"
172  "Compiled with Graphite2 version %d.%d.%d; using %d.%d.%d\n"
173  "Compiled with HarfBuzz version %s; using %s\n"
174  "Compiled with libpng version %s; using %s\n"
175  "Compiled with pplib version %s\n"
176 #ifdef XETEX_MAC
177  "Using Mac OS X Core Text and Cocoa frameworks\n"
178 #else
179  "Compiled with fontconfig version %d.%d.%d; using %d.%d.%d\n"
180 #endif
181  ;
182 
183  int len = strlen(fmt)
185  + strlen(icu_version)
193 #ifndef XETEX_MAC
194  + 6 * 3 /* for fontconfig version #s (won't really need 3 digits per field!) */
195 #endif
196  + 6 * 3 /* for graphite2 version #s (ditto) */
197  + 6 * 3; /* for freetype version #s (ditto) */
198 
199  *versions = (char *) xmalloc(len + 1);
200  /* len will be more than enough, because of the placeholder chars in fmt
201  that get replaced by the arguments */
202 
203  u_getVersion(icuVersion);
204  u_versionToString(icuVersion, icu_version);
205 
207  fprintf(stderr, "FreeType initialization failed!\n");
208  exit(9);
209  }
210  FT_Library_Version(gFreeTypeLibrary, &ftMajor, &ftMinor, &ftPatch);
211 
212  gr_engine_version(&grMajor, &grMinor, &grBugfix);
213 
214  (void)sprintf(*versions, fmt,
215  U_ICU_VERSION, icu_version,
218  ftMajor, ftMinor, ftPatch,
220  grMajor, grMinor, grBugfix,
223 #ifndef XETEX_MAC
224  ,
225  FC_VERSION / 10000, (FC_VERSION % 10000) / 100, FC_VERSION % 100,
226  fc_version / 10000, (fc_version % 10000) / 100, fc_version % 100
227 #endif
228  );
229 }
230 
231 
232 void
234 {
235  if ((f->encodingMode == ICUMAPPING) && (f->conversionData != NULL))
236  ucnv_close((UConverter*)(f->conversionData));
237  f->conversionData = 0;
238 
239  switch (mode) {
240  case UTF8:
241  case UTF16BE:
242  case UTF16LE:
243  case RAW:
244  f->encodingMode = mode;
245  break;
246 
247  case ICUMAPPING:
248  {
249  char* name = gettexstring(encodingData);
252  if (cnv == NULL) {
253  begindiagnostic();
254  printnl('E');
255  printcstring("rror ");
256  printint(err);
257  printcstring(" creating Unicode converter for `");
259  printcstring("'; reading as raw bytes");
260  enddiagnostic(1);
261  f->encodingMode = RAW;
262  } else {
263  f->encodingMode = ICUMAPPING;
264  f->conversionData = cnv;
265  }
266  free(name);
267  }
268  break;
269  }
270 }
271 
272 static void
274 {
275  fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n",
276  (unsigned) bufsize);
277  fputs ("Please increase buf_size in texmf.cnf.\n", stderr);
278  uexit (1);
279 }
280 
281 static void
282 conversion_error(int errcode)
283 {
284  begindiagnostic();
285  printnl('U');
286  printcstring("nicode conversion failed (ICU error code = ");
287  printint(errcode);
288  printcstring(") discarding any remaining text");
289  enddiagnostic(1);
290 }
291 
292 #ifdef WORDS_BIGENDIAN
293 #define NATIVE_UTF32 kForm_UTF32BE
294 #else
295 #define NATIVE_UTF32 kForm_UTF32LE
296 #endif
297 
298 static void
300 {
301  static TECkit_Converter normalizers[2] = { NULL, NULL };
302 
304  UInt32 inUsed, outUsed;
305  TECkit_Converter *normPtr = &normalizers[norm - 1];
306  if (*normPtr == NULL) {
309  &*normPtr);
310  if (status != kStatus_NoError) {
311  fprintf(stderr, "! Failed to create normalizer: error code = %d\n", (int)status);
312  uexit (1);
313  }
314  }
315 
316  status = TECkit_ConvertBuffer(*normPtr, (Byte*)buf, len * sizeof(UInt32), &inUsed,
317  (Byte*)&buffer[first], sizeof(*buffer) * (bufsize - first), &outUsed, 1);
318  if (status != kStatus_NoError)
319  buffer_overflow();
320  last = first + outUsed / sizeof(*buffer);
321 }
322 
323 #ifdef WORDS_BIGENDIAN
324 #define UCNV_UTF32_NativeEndian UCNV_UTF32_BigEndian
325 #else
326 #define UCNV_UTF32_NativeEndian UCNV_UTF32_LittleEndian
327 #endif
328 
329 int
331 {
332 static char* byteBuffer = NULL;
333 static uint32_t *utf32Buf = NULL;
334  int i, tmpLen;
335  int norm = getinputnormalizationstate();
336 #ifdef WIN32
337  const int fd = fileno(f->f);
338  if (fd == _fileno(stdin) && _isatty(fd)) {
339  f->encodingMode = WIN32CONSOLE;
340  }
341 #endif
342 
343  last = first;
344 
345  if (f->encodingMode == ICUMAPPING) {
346  uint32_t bytesRead = 0;
347  UConverter* cnv;
348  int outLen;
350 
351  if (byteBuffer == NULL)
352  byteBuffer = (char*) xmalloc(bufsize + 1);
353 
354  /* Recognize either LF or CR as a line terminator; skip initial LF if prev line ended with CR. */
355  i = GETC(f->f);
356  if (f->skipNextLF) {
357  f->skipNextLF = 0;
358  if (i == '\n')
359  i = GETC(f->f);
360  }
361 
362  if (i != EOF && i != '\n' && i != '\r')
363  byteBuffer[bytesRead++] = i;
364  if (i != EOF && i != '\n' && i != '\r')
365  while (bytesRead < bufsize && (i = GETC(f->f)) != EOF && i != '\n' && i != '\r')
366  byteBuffer[bytesRead++] = i;
367 
368  if (i == EOF && errno != EINTR && bytesRead == 0)
369  return false;
370 
371  if (i != EOF && i != '\n' && i != '\r')
372  buffer_overflow();
373 
374  /* now apply the mapping to turn external bytes into Unicode characters in buffer */
375  cnv = (UConverter*)(f->conversionData);
376  switch (norm) {
377  case 1: // NFC
378  case 2: // NFD
379  if (utf32Buf == NULL)
380  utf32Buf = (uint32_t*) xcalloc(bufsize, sizeof(uint32_t));
382  (char*)utf32Buf, bufsize * sizeof(*utf32Buf),
383  byteBuffer, bytesRead, &errorCode);
384  if (errorCode != 0) {
386  return false;
387  }
388  apply_normalization(utf32Buf, tmpLen / sizeof(*utf32Buf), norm); // sets 'last' correctly
389  break;
390 
391  default: // none
393  (char*)&buffer[first], sizeof(*buffer) * (bufsize - first),
394  byteBuffer, bytesRead, &errorCode);
395  if (errorCode != 0) {
397  return false;
398  }
399  outLen /= sizeof(*buffer);
400  last = first + outLen;
401  break;
402  }
403  } else {
404  /* Recognize either LF or CR as a line terminator; skip initial LF if prev line ended with CR. */
405  i = get_uni_c(f);
406  if (f->skipNextLF) {
407  f->skipNextLF = 0;
408  if (i == '\n')
409  i = get_uni_c(f);
410  }
411 
412  switch (norm) {
413  case 1: // NFC
414  case 2: // NFD
415  // read Unicode chars into utf32Buf as UTF32
416  if (utf32Buf == NULL)
417  utf32Buf = (uint32_t*) xcalloc(bufsize, sizeof(uint32_t));
418  tmpLen = 0;
419  if (i != EOF && i != '\n' && i != '\r')
420  utf32Buf[tmpLen++] = i;
421  if (i != EOF && i != '\n' && i != '\r')
422  while (tmpLen < bufsize && (i = get_uni_c(f)) != EOF && i != '\n' && i != '\r')
423  utf32Buf[tmpLen++] = i;
424 
425  if (i == EOF && errno != EINTR && tmpLen == 0)
426  return false;
427 
428  /* We didn't get the whole line because our buffer was too small. */
429  if (i != EOF && i != '\n' && i != '\r')
430  buffer_overflow();
431  apply_normalization(utf32Buf, tmpLen, norm);
432  break;
433 
434  default: // none
435 #ifdef WIN32
436  if (f->encodingMode == WIN32CONSOLE && i == 0x1a) /* Ctrl+Z */
437  return false;
438 #endif
439  if (last < bufsize && i != EOF && i != '\n' && i != '\r')
440  buffer[last++] = i;
441  if (i != EOF && i != '\n' && i != '\r')
442  while (last < bufsize && (i = get_uni_c(f)) != EOF && i != '\n' && i != '\r')
443  buffer[last++] = i;
444 
445  if (i == EOF && errno != EINTR && last == first)
446  return false;
447 
448  /* We didn't get the whole line because our buffer was too small. */
449  if (i != EOF && i != '\n' && i != '\r')
450  buffer_overflow();
451  break;
452  }
453  }
454 
455  /* If line ended with CR, remember to skip following LF. */
456  if (i == '\r')
457  f->skipNextLF = 1;
458 
459  buffer[last] = ' ';
460  if (last >= maxbufstack)
461  maxbufstack = last;
462 
463  /* Trim trailing space or EOL characters. */
464 #define IS_SPC_OR_EOL(c) ((c) == ' ' || (c) == '\r' || (c) == '\n')
465  while (last > first && IS_SPC_OR_EOL(buffer[last - 1]))
466  --last;
467 
468  return true;
469 }
470 
471 static void die(const_string s, int i)
472 {
473  fprintf(stderr, s, i);
474  fprintf(stderr, " - exiting\n");
475  exit(3);
476 }
477 
479 static int brkLocaleStrNum = 0;
480 
481 void
482 linebreakstart(int f, integer localeStrNum, uint16_t* text, integer textLength)
483 {
485  char* locale = (char*)gettexstring(localeStrNum);
486 
487  if (fontarea[f] == OTGR_FONT_FLAG && strcmp(locale, "G") == 0) {
489  if (initGraphiteBreaking(engine, text, textLength))
490  /* user asked for Graphite line breaking and the font supports it */
491  return;
492  }
493 
494  if ((localeStrNum != brkLocaleStrNum) && (brkIter != NULL)) {
496  brkIter = NULL;
497  }
498 
499  if (brkIter == NULL) {
501  if (U_FAILURE(status)) {
502  begindiagnostic();
503  printnl('E');
504  printcstring("rror ");
505  printint(status);
506  printcstring(" creating linebreak iterator for locale `");
508  printcstring("'; trying default locale `en_us'.");
509  enddiagnostic(1);
510  if (brkIter != NULL)
513  brkIter = ubrk_open(UBRK_LINE, "en_us", NULL, 0, &status);
514  }
515  free(locale);
516  brkLocaleStrNum = localeStrNum;
517  }
518 
519  if (brkIter == NULL) {
520  die("! failed to create linebreak iterator, status=%d", (int)status);
521  }
522 
523  ubrk_setText(brkIter, (UChar*) text, textLength, &status);
524 }
525 
526 int
528 {
529  if (brkIter != NULL)
530  return ubrk_next((UBreakIterator*)brkIter);
531  else
532  return findNextGraphiteBreak();
533 }
534 
535 int
537 {
538  /* \XeTeXinputencoding "enc-name"
539  * -> name is packed in |nameoffile| as a C string, starting at [1]
540  * Check if it's a built-in name; if not, try to open an ICU converter by that name
541  */
543  UConverter* cnv;
544  char* name = (char*)nameoffile + 1;
545  *info = 0;
546  if (strcasecmp(name, "auto") == 0) {
547  return AUTO;
548  }
549  if (strcasecmp(name, "utf8") == 0) {
550  return UTF8;
551  }
552  if (strcasecmp(name, "utf16") == 0) { /* depends on host platform */
553 #ifdef WORDS_BIGENDIAN
554  return UTF16BE;
555 #else
556  return UTF16LE;
557 #endif
558  }
559  if (strcasecmp(name, "utf16be") == 0) {
560  return UTF16BE;
561  }
562  if (strcasecmp(name, "utf16le") == 0) {
563  return UTF16LE;
564  }
565  if (strcasecmp(name, "bytes") == 0) {
566  return RAW;
567  }
568 
569  /* try for an ICU converter */
570  cnv = ucnv_open(name, &err);
571  if (cnv == NULL) {
572  begindiagnostic();
573  printnl('U'); /* ensure message starts on a new line */
574  printcstring("nknown encoding `");
576  printcstring("'; reading as raw bytes");
577  enddiagnostic(1);
578  return RAW;
579  } else {
580  ucnv_close(cnv);
581  *info = maketexstring(name);
582  return ICUMAPPING;
583  }
584 }
585 
586 void
587 printutf8str(const unsigned char* str, int len)
588 {
589  while (len-- > 0)
590  printrawchar(*(str++), true); /* bypass utf-8 encoding done in print_char() */
591 }
592 
593 void
594 printchars(const unsigned short* str, int len)
595 {
596  while (len-- > 0)
597  printchar(*(str++));
598 }
599 
600 #ifdef WORDS_BIGENDIAN
601 #define UTF16_NATIVE kForm_UTF16BE
602 #else
603 #define UTF16_NATIVE kForm_UTF16LE
604 #endif
605 
606 static void*
607 load_mapping_file(const char* s, const char* e, char byteMapping)
608 {
609  char* mapPath;
610  TECkit_Converter cnv = 0;
611  char* buffer = (char*) xmalloc(e - s + 5);
612  strncpy(buffer, s, e - s);
613  buffer[e - s] = 0;
614  strcat(buffer, ".tec");
615  mapPath = kpse_find_file(buffer, kpse_miscfonts_format, 1);
616 
617  if (mapPath) {
618  FILE* mapFile = fopen(mapPath, FOPEN_RBIN_MODE);
619  free(mapPath);
620  if (mapFile) {
621  uint32_t mappingSize;
622  Byte* mapping;
623  /* TECkit_Status status; */
624  fseek(mapFile, 0, SEEK_END);
625  mappingSize = ftell(mapFile);
626  fseek(mapFile, 0, SEEK_SET);
627  mapping = (Byte*) xmalloc(mappingSize);
628  fread(mapping, 1, mappingSize, mapFile);
629  fclose(mapFile);
630  if (byteMapping != 0)
631  /* status = */ TECkit_CreateConverter(mapping, mappingSize,
632  false,
634  &cnv);
635  else
636  /* status = */ TECkit_CreateConverter(mapping, mappingSize,
637  true,
639  &cnv);
640  free(mapping);
641  }
642  if (cnv == NULL)
643  fontmappingwarning(buffer, strlen(buffer), 2); /* not loadable */
644  else if (gettracingfontsstate() > 1)
645  fontmappingwarning(buffer, strlen(buffer), 0); /* tracing */
646  } else {
647  fontmappingwarning(buffer, strlen(buffer), 1); /* not found */
648  }
649 
650  free(buffer);
651 
652  return cnv;
653 }
654 
656 void
658 {
659  char* cp = strstr((char*)nameoffile + 1, ":mapping=");
660  if (saved_mapping_name != NULL) {
663  }
664  if (cp != NULL) {
665  *cp = 0;
666  cp += 9;
667  while (*cp && *cp <= ' ')
668  ++cp;
669  if (*cp)
671  }
672 }
673 
674 void*
676 {
677  void* rval = NULL;
678  if (saved_mapping_name != NULL) {
683  }
684  return rval;
685 }
686 
687 int
689 {
690  UniChar in = c;
691  Byte out[2];
692  UInt32 inUsed, outUsed;
693  /* TECkit_Status status; */
694  /* status = */ TECkit_ConvertBuffer((TECkit_Converter)cnv,
695  (const Byte*)&in, sizeof(in), &inUsed, out, sizeof(out), &outUsed, 1);
696  if (outUsed < 1)
697  return 0;
698  else
699  return out[0];
700 }
701 
702 double
703 read_double(const char** s)
704 {
705  int neg = 0;
706  double val = 0.0;
707  const char* cp = *s;
708 
709  while (*cp == ' '|| *cp == '\t')
710  ++cp;
711  if (*cp == '-') {
712  neg = 1;
713  ++cp;
714  } else if (*cp == '+') {
715  ++cp;
716  }
717 
718  while (*cp >= '0' && *cp <= '9') {
719  val = val * 10.0 + *cp - '0';
720  ++cp;
721  }
722  if (*cp == '.') {
723  double dec = 10.0;
724  ++cp;
725  while (*cp >= '0' && *cp <= '9') {
726  val = val + (*cp - '0') / dec;
727  ++cp;
728  dec = dec * 10.0;
729  }
730  }
731  *s = cp;
732 
733  return neg ? -val : val;
734 }
735 
736 static hb_tag_t
737 read_tag_with_param(const char* cp, int* param)
738 {
739  const char* cp2;
740  hb_tag_t tag;
741 
742  cp2 = cp;
743  while (*cp2 && (*cp2 != ':') && (*cp2 != ';') && (*cp2 != ',') && (*cp2 != '='))
744  ++cp2;
745 
746  tag = hb_tag_from_string(cp, cp2 - cp);
747 
748  cp = cp2;
749  if (*cp == '=') {
750  int neg = 0;
751  ++cp;
752  if (*cp == '-') {
753  ++neg;
754  ++cp;
755  }
756  while (*cp >= '0' && *cp <= '9') {
757  *param = *param * 10 + *cp - '0';
758  ++cp;
759  }
760  if (neg)
761  *param = -(*param);
762  }
763 
764  return tag;
765 }
766 
767 unsigned int
768 read_rgb_a(const char** cp)
769 {
770  uint32_t rgbValue = 0;
771  uint32_t alpha = 0;
772  int i;
773  for (i = 0; i < 6; ++i) {
774  if ((**cp >= '0') && (**cp <= '9'))
775  rgbValue = (rgbValue << 4) + **cp - '0';
776  else if ((**cp >= 'A') && (**cp <= 'F'))
777  rgbValue = (rgbValue << 4) + **cp - 'A' + 10;
778  else if ((**cp >= 'a') && (**cp <= 'f'))
779  rgbValue = (rgbValue << 4) + **cp - 'a' + 10;
780  else
781  return 0x000000FF;
782  (*cp)++;
783  }
784  rgbValue <<= 8;
785  for (i = 0; i < 2; ++i) {
786  if ((**cp >= '0') && (**cp <= '9'))
787  alpha = (alpha << 4) + **cp - '0';
788  else if ((**cp >= 'A') && (**cp <= 'F'))
789  alpha = (alpha << 4) + **cp - 'A' + 10;
790  else if ((**cp >= 'a') && (**cp <= 'f'))
791  alpha = (alpha << 4) + **cp - 'a' + 10;
792  else
793  break;
794  (*cp)++;
795  }
796  if (i == 2)
797  rgbValue += alpha;
798  else
799  rgbValue += 0xFF;
800  return rgbValue;
801 }
802 
803 int
804 readCommonFeatures(const char* feat, const char* end, float* extend, float* slant, float* embolden, float* letterspace, uint32_t* rgbValue)
805  // returns 1 to go to next_option, -1 for bad_option, 0 to continue
806 {
807  const char* sep;
808  if (strncmp(feat, "mapping", 7) == 0) {
809  sep = feat + 7;
810  if (*sep != '=')
811  return -1;
812  loadedfontmapping = load_mapping_file(sep + 1, end, 0);
813  return 1;
814  }
815 
816  if (strncmp(feat, "extend", 6) == 0) {
817  sep = feat + 6;
818  if (*sep != '=')
819  return -1;
820  ++sep;
821  *extend = read_double(&sep);
822  return 1;
823  }
824 
825  if (strncmp(feat, "slant", 5) == 0) {
826  sep = feat + 5;
827  if (*sep != '=')
828  return -1;
829  ++sep;
830  *slant = read_double(&sep);
831  return 1;
832  }
833 
834  if (strncmp(feat, "embolden", 8) == 0) {
835  sep = feat + 8;
836  if (*sep != '=')
837  return -1;
838  ++sep;
839  *embolden = read_double(&sep);
840  return 1;
841  }
842 
843  if (strncmp(feat, "letterspace", 11) == 0) {
844  sep = feat + 11;
845  if (*sep != '=')
846  return -1;
847  ++sep;
849  return 1;
850  }
851 
852  if (strncmp(feat, "color", 5) == 0) {
853  const char* s;
854  sep = feat + 5;
855  if (*sep != '=')
856  return -1;
857  ++sep;
858  s = sep;
859  *rgbValue = read_rgb_a(&sep);
860  if ((sep == s+6) || (sep == s+8))
861  loadedfontflags |= FONT_FLAGS_COLORED;
862  else
863  return -1;
864  return 1;
865  }
866 
867  return 0;
868 }
869 
870 static bool
871 readFeatureNumber(const char* s, const char* e, hb_tag_t* f, int* v)
872  /* s...e is a "id=setting" string; */
873 {
874  *f = 0;
875  *v = 0;
876  if (*s < '0' || *s > '9')
877  return false;
878  while (*s >= '0' && *s <= '9')
879  *f = *f * 10 + *s++ - '0';
880  while ((*s == ' ') || (*s == '\t'))
881  ++s;
882  if (*s++ != '=')
883  /* no setting was specified */
884  return false;
885 
886  if (*s < '0' || *s > '9')
887  return false;
888  while (*s >= '0' && *s <= '9')
889  *v = *v * 10 + *s++ - '0';
890  while ((*s == ' ') || (*s == '\t'))
891  ++s;
892  if (s != e)
893  return false;
894  return true;
895 }
896 
897 static void*
898 loadOTfont(PlatformFontRef fontRef, XeTeXFont font, Fixed scaled_size, char* cp1)
899 {
902  char * language = NULL;
904  char** shapers = NULL; /* NULL-terminated array */
905  int nFeatures = 0;
906  int nShapers = 0;
907 
908  char* cp2;
909  char* cp3;
910 
911  hb_tag_t tag;
912 
913  uint32_t rgbValue = 0x000000FF;
914 
915  float extend = 1.0;
916  float slant = 0.0;
917  float embolden = 0.0;
918  float letterspace = 0.0;
919 
920  int i;
921 
922  char reqEngine = getReqEngine();
923 
924  if (reqEngine == 'O' || reqEngine == 'G') {
925  shapers = (char**) xrealloc(shapers, (nShapers + 1) * sizeof(char *));
926  if (reqEngine == 'O') {
927  static char ot_const[] = "ot";
928  shapers[nShapers] = ot_const;
929  } else if (reqEngine == 'G') {
930  static char graphite2_const[] = "graphite2";
931  shapers[nShapers] = graphite2_const;
932  }
933  nShapers++;
934  }
935 
936  if (reqEngine == 'G') {
937  char* tmpShapers[] = {shapers[0]};
938  /* create a default engine so we can query the font for Graphite features;
939  * because of font caching, it's cheap to discard this and create the real one later */
941  features, nFeatures, tmpShapers, rgbValue, extend, slant, embolden);
942 
943  if (engine == NULL)
944  return NULL;
945  }
946 
947  /* scan the feature string (if any) */
948  if (cp1 != NULL) {
949  while (*cp1) {
950  if ((*cp1 == ':') || (*cp1 == ';') || (*cp1 == ','))
951  ++cp1;
952  while ((*cp1 == ' ') || (*cp1 == '\t')) /* skip leading whitespace */
953  ++cp1;
954  if (*cp1 == 0) /* break if end of string */
955  break;
956 
957  cp2 = cp1;
958  while (*cp2 && (*cp2 != ':') && (*cp2 != ';') && (*cp2 != ','))
959  ++cp2;
960 
961  if (strncmp(cp1, "script", 6) == 0) {
962  cp3 = cp1 + 6;
963  if (*cp3 != '=')
964  goto bad_option;
965  ++cp3;
966  script = hb_tag_from_string(cp3, cp2 - cp3);
967  goto next_option;
968  }
969 
970  if (strncmp(cp1, "language", 8) == 0) {
971  cp3 = cp1 + 8;
972  if (*cp3 != '=')
973  goto bad_option;
974  ++cp3;
975  language = (char*)xmalloc(cp2 - cp3 + 1);
976  language[cp2 - cp3] = '\0';
977  memcpy(language, cp3, cp2 - cp3);
978  goto next_option;
979  }
980 
981  if (strncmp(cp1, "shaper", 6) == 0) {
982  cp3 = cp1 + 6;
983  if (*cp3 != '=')
984  goto bad_option;
985  ++cp3;
986  shapers = (char**) xrealloc(shapers, (nShapers + 1) * sizeof(char *));
987  /* some dumb systems have no strndup() */
988  shapers[nShapers] = strdup(cp3);
989  shapers[nShapers][cp2 - cp3] = '\0';
990  nShapers++;
991  goto next_option;
992  }
993 
994  i = readCommonFeatures(cp1, cp2, &extend, &slant, &embolden, &letterspace, &rgbValue);
995  if (i == 1)
996  goto next_option;
997  else if (i == -1)
998  goto bad_option;
999 
1000  if (reqEngine == 'G') {
1001  int value = 0;
1002  if (readFeatureNumber(cp1, cp2, &tag, &value)
1003  || findGraphiteFeature(engine, cp1, cp2, &tag, &value)) {
1004  features = (hb_feature_t*) xrealloc(features, (nFeatures + 1) * sizeof(hb_feature_t));
1005  features[nFeatures].tag = tag;
1006  features[nFeatures].value = value;
1007  features[nFeatures].start = 0;
1008  features[nFeatures].end = (unsigned int) -1;
1009  nFeatures++;
1010  goto next_option;
1011  }
1012  }
1013 
1014  if (*cp1 == '+') {
1015  int param = 0;
1016  tag = read_tag_with_param(cp1 + 1, &param);
1017  features = (hb_feature_t*) xrealloc(features, (nFeatures + 1) * sizeof(hb_feature_t));
1018  features[nFeatures].tag = tag;
1019  features[nFeatures].start = 0;
1020  features[nFeatures].end = (unsigned int) -1;
1021  // for backward compatibility with pre-0.9999 where feature
1022  // indices started from 0
1023  if (param >= 0)
1024  param++;
1025  features[nFeatures].value = param;
1026  nFeatures++;
1027  goto next_option;
1028  }
1029 
1030  if (*cp1 == '-') {
1031  ++cp1;
1032  tag = hb_tag_from_string(cp1, cp2 - cp1);
1033  features = (hb_feature_t*) xrealloc(features, (nFeatures + 1) * sizeof(hb_feature_t));
1034  features[nFeatures].tag = tag;
1035  features[nFeatures].start = 0;
1036  features[nFeatures].end = (unsigned int) -1;
1037  features[nFeatures].value = 0;
1038  nFeatures++;
1039  goto next_option;
1040  }
1041 
1042  if (strncmp(cp1, "vertical", 8) == 0) {
1043  cp3 = cp2;
1044  if (*cp3 == ';' || *cp3 == ':' || *cp3 == ',')
1045  --cp3;
1046  while (*cp3 == '\0' || *cp3 == ' ' || *cp3 == '\t')
1047  --cp3;
1048  if (*cp3)
1049  ++cp3;
1050  if (cp3 == cp1 + 8) {
1051  loadedfontflags |= FONT_FLAGS_VERTICAL;
1052  goto next_option;
1053  }
1054  }
1055 
1056  bad_option:
1057  fontfeaturewarning((void*) cp1, cp2 - cp1, 0, 0);
1058 
1059  next_option:
1060  cp1 = cp2;
1061  }
1062  }
1063 
1064  if (shapers != NULL) {
1065  shapers = (char**) xrealloc(shapers, (nShapers + 1) * sizeof(char *));
1066  shapers[nShapers] = NULL;
1067  }
1068 
1069  if (embolden != 0.0)
1070  embolden = embolden * Fix2D(scaled_size) / 100.0;
1071 
1072  if (letterspace != 0.0)
1073  loadedfontletterspace = (letterspace / 100.0) * scaled_size;
1074 
1075  if ((loadedfontflags & FONT_FLAGS_COLORED) == 0)
1076  rgbValue = 0x000000FF;
1077 
1078  if ((loadedfontflags & FONT_FLAGS_VERTICAL) != 0)
1079  setFontLayoutDir(font, 1);
1080 
1082  features, nFeatures, shapers, rgbValue, extend, slant, embolden);
1083 
1084  if (engine == 0) {
1085  // only free these if creation failed, otherwise the engine now owns them
1086  free(features);
1087  free(shapers);
1088  } else {
1089  nativefonttypeflag = OTGR_FONT_FLAG;
1090  }
1091 
1092  return engine;
1093 }
1094 
1095 static void
1096 splitFontName(char* name, char** var, char** feat, char** end, int* index)
1097 {
1098  *var = NULL;
1099  *feat = NULL;
1100  *index = 0;
1101  if (*name == '[') {
1102  int withinFileName = 1;
1103 #ifdef WIN32
1104  char* start = name + 1;
1105 #endif
1106  ++name;
1107  while (*name) {
1108  if (withinFileName && *name == ']') {
1109  withinFileName = 0;
1110  if (*var == NULL)
1111  *var = name;
1112  } else if (*name == ':') {
1113  if (withinFileName && *var == NULL
1114 #ifdef WIN32
1115  && !((name - start == 1) && isalpha(*start))
1116 #endif
1117  ) {
1118  *var = name;
1119  ++name;
1120  while (*name >= '0' && *name <= '9')
1121  *index = *index * 10 + *name++ - '0';
1122  --name;
1123  } else if (!withinFileName && *feat == NULL)
1124  *feat = name;
1125  }
1126  ++name;
1127  }
1128  *end = name;
1129  } else {
1130  while (*name) {
1131  if (*name == '/' && *var == NULL && *feat == NULL)
1132  *var = name;
1133  else if (*name == ':' && *feat == NULL)
1134  *feat = name;
1135  ++name;
1136  }
1137  *end = name;
1138  }
1139  if (*feat == NULL)
1140  *feat = name;
1141  if (*var == NULL)
1142  *var = *feat;
1143 }
1144 
1145 void*
1146 findnativefont(unsigned char* uname, integer scaled_size)
1147  /* scaled_size here is in TeX points, or is a negative integer for 'scaled' */
1148 {
1149  void* rval = NULL;
1150  char* nameString;
1151  char* var;
1152  char* feat;
1153  char* end;
1154  char* name = (char*)uname;
1155  char* varString = NULL;
1156  char* featString = NULL;
1157  PlatformFontRef fontRef;
1158  XeTeXFont font = NULL;
1159  int index = 0;
1160 
1161  loadedfontmapping = NULL;
1162  loadedfontflags = 0;
1163  loadedfontletterspace = 0;
1164 
1165  splitFontName(name, &var, &feat, &end, &index);
1166  nameString = (char*) xmalloc(var - name + 1);
1167  strncpy(nameString, name, var - name);
1168  nameString[var - name] = 0;
1169 
1170  if (feat > var) {
1171  varString = (char*) xmalloc(feat - var);
1172  strncpy(varString, var + 1, feat - var - 1);
1173  varString[feat - var - 1] = 0;
1174  }
1175 
1176  if (end > feat) {
1177  featString = (char*) xmalloc(end - feat);
1178  strncpy(featString, feat + 1, end - feat - 1);
1179  featString[end - feat - 1] = 0;
1180  }
1181 
1182  // check for "[filename]" form, don't search maps in this case
1183  if (nameString[0] == '[') {
1184  char* path = kpse_find_file(nameString + 1, kpse_opentype_format, 0);
1185  if (path == NULL)
1186  path = kpse_find_file(nameString + 1, kpse_truetype_format, 0);
1187  if (path == NULL)
1188  path = kpse_find_file(nameString + 1, kpse_type1_format, 0);
1189  if (path != NULL) {
1190  if (scaled_size < 0) {
1191  font = createFontFromFile(path, index, 655360L);
1192  if (font != NULL) {
1193  Fixed dsize = D2Fix(getDesignSize(font));
1194  if (scaled_size == -1000)
1195  scaled_size = dsize;
1196  else
1197  scaled_size = zxnoverd(dsize, -scaled_size, 1000);
1198  deleteFont(font);
1199  }
1200  }
1201  font = createFontFromFile(path, index, scaled_size);
1202  if (font != NULL) {
1204 
1205  /* This is duplicated in XeTeXFontMgr::findFont! */
1206  setReqEngine(0);
1207  if (varString) {
1208  if (strncmp(varString, "/AAT", 4) == 0)
1209  setReqEngine('A');
1210  else if ((strncmp(varString, "/OT", 3) == 0) || (strncmp(varString, "/ICU", 4) == 0))
1211  setReqEngine('O');
1212  else if (strncmp(varString, "/GR", 3) == 0)
1213  setReqEngine('G');
1214  }
1215 
1216  rval = loadOTfont(0, font, scaled_size, featString);
1217  if (rval == NULL)
1218  deleteFont(font);
1219  if (rval != NULL && gettracingfontsstate() > 0) {
1220  begindiagnostic();
1221  zprintnl(' ');
1222  printcstring("-> ");
1223  printcstring(path);
1224  zenddiagnostic(0);
1225  }
1226  }
1227  }
1228  } else {
1229  fontRef = findFontByName(nameString, varString, Fix2D(scaled_size));
1230 
1231  if (fontRef != 0) {
1232  /* update nameoffile to the full name of the font, for error messages during font loading */
1233  const char* fullName = getFullName(fontRef);
1234  namelength = strlen(fullName);
1235  if (featString != NULL)
1236  namelength += strlen(featString) + 1;
1237  if (varString != NULL)
1238  namelength += strlen(varString) + 1;
1239  free(nameoffile);
1240  nameoffile = xmalloc(namelength + 4); /* +2 would be correct: initial space, final NUL */
1241  nameoffile[0] = ' ';
1242  strcpy((char*)nameoffile + 1, fullName);
1243 
1244  if (scaled_size < 0) {
1245  font = createFont(fontRef, scaled_size);
1246  if (font != NULL) {
1247  Fixed dsize = D2Fix(getDesignSize(font));
1248  if (scaled_size == -1000)
1249  scaled_size = dsize;
1250  else
1251  scaled_size = zxnoverd(dsize, -scaled_size, 1000);
1252  deleteFont(font);
1253  }
1254  }
1255 
1256  font = createFont(fontRef, scaled_size);
1257  if (font != NULL) {
1258 #ifdef XETEX_MAC
1259  /* decide whether to use AAT or OpenType rendering with this font */
1260  if (getReqEngine() == 'A') {
1261  rval = loadAATfont(fontRef, scaled_size, featString);
1262  if (rval == NULL)
1263  deleteFont(font);
1264  } else {
1265  if (getReqEngine() == 'O' || getReqEngine() == 'G' ||
1267  rval = loadOTfont(fontRef, font, scaled_size, featString);
1268 
1269  /* loadOTfont failed or the above check was false */
1270  if (rval == NULL)
1271  rval = loadAATfont(fontRef, scaled_size, featString);
1272 
1273  if (rval == NULL)
1274  deleteFont(font);
1275  }
1276 #else
1277  rval = loadOTfont(fontRef, font, scaled_size, featString);
1278  if (rval == NULL)
1279  deleteFont(font);
1280 #endif
1281  }
1282 
1283  /* append the style and feature strings, so that \show\fontID will give a full result */
1284  if (varString != NULL && *varString != 0) {
1285  strcat((char*)nameoffile + 1, "/");
1286  strcat((char*)nameoffile + 1, varString);
1287  }
1288  if (featString != NULL && *featString != 0) {
1289  strcat((char*)nameoffile + 1, ":");
1290  strcat((char*)nameoffile + 1, featString);
1291  }
1292  namelength = strlen((char*)nameoffile + 1);
1293  }
1294  }
1295 
1296  if (varString != NULL)
1297  free(varString);
1298 
1299  if (featString != NULL)
1300  free(featString);
1301 
1302  free(nameString);
1303 
1304  return rval;
1305 }
1306 
1307 void
1308 releasefontengine(void* engine, int type_flag)
1309 {
1310 #ifdef XETEX_MAC
1311  if (type_flag == AAT_FONT_FLAG) {
1312  CFRelease((CFDictionaryRef)engine);
1313  } else
1314 #endif
1315  if (type_flag == OTGR_FONT_FLAG) {
1317  }
1318 }
1319 
1320 /* params are given as 'integer' in the header file, but are really TeX scaled integers */
1321 void
1322 otgetfontmetrics(void* pEngine, scaled* ascent, scaled* descent, scaled* xheight, scaled* capheight, scaled* slant)
1323 {
1325  float a, d;
1326 
1328  *ascent = D2Fix(a);
1329  *descent = D2Fix(d);
1330 
1332  + getSlantFactor(engine));
1333 
1334  /* get cap and x height from OS/2 table */
1335  getCapAndXHeight(engine, &a, &d);
1336  *capheight = D2Fix(a);
1337  *xheight = D2Fix(d);
1338 
1339  /* fallback in case the font does not have OS/2 table */
1340  if (*xheight == 0) {
1341  int glyphID = mapCharToGlyph(engine, 'x');
1342  if (glyphID != 0) {
1343  getGlyphHeightDepth(engine, glyphID, &a, &d);
1344  *xheight = D2Fix(a);
1345  } else {
1346  *xheight = *ascent / 2; /* arbitrary figure if there's no 'x' in the font */
1347  }
1348  }
1349 
1350  if (*capheight == 0) {
1351  int glyphID = mapCharToGlyph(engine, 'X');
1352  if (glyphID != 0) {
1353  getGlyphHeightDepth(engine, glyphID, &a, &d);
1354  *capheight = D2Fix(a);
1355  } else {
1356  *capheight = *ascent; /* arbitrary figure if there's no 'X' in the font */
1357  }
1358  }
1359 }
1360 
1361 integer
1362 otfontget(integer what, void* pEngine)
1363 {
1365  XeTeXFont fontInst = getFont(engine);
1366  switch (what) {
1367  case XeTeX_count_glyphs:
1368  return countGlyphs(fontInst);
1369  break;
1370 
1371  case XeTeX_count_features: /* ie Graphite features */
1372  return countGraphiteFeatures(engine);
1373  break;
1374 
1376  return countScripts(fontInst);
1377  break;
1378  }
1379  return 0;
1380 }
1381 
1382 
1383 integer
1385 {
1387  XeTeXFont fontInst = getFont(engine);
1388  switch (what) {
1390  return countLanguages(fontInst, param);
1391  break;
1392 
1393  case XeTeX_OT_script_code:
1394  return getIndScript(fontInst, param);
1395  break;
1396 
1397  /* for graphite fonts...*/
1398  case XeTeX_feature_code:
1400  break;
1402  return 1;
1403  break;
1404  case XeTeX_count_selectors:
1406  break;
1407  }
1408  return 0;
1409 }
1410 
1411 
1412 integer
1413 otfontget2(integer what, void* pEngine, integer param1, integer param2)
1414 {
1416  XeTeXFont fontInst = getFont(engine);
1417  switch (what) {
1419  return getIndLanguage(fontInst, param1, param2);
1420  break;
1421 
1423  return countFeatures(fontInst, param1, param2);
1424  break;
1425 
1426  /* for graphite fonts */
1427  case XeTeX_selector_code:
1428  return getGraphiteFeatureSettingCode(engine, param1, param2);
1429  break;
1431  return getGraphiteFeatureDefaultSetting(engine, param1) == param2;
1432  break;
1433  }
1434 
1435  return 0;
1436 }
1437 
1438 
1439 integer
1440 otfontget3(integer what, void* pEngine, integer param1, integer param2, integer param3)
1441 {
1443  XeTeXFont fontInst = getFont(engine);
1444  switch (what) {
1445  case XeTeX_OT_feature_code:
1446  return getIndFeature(fontInst, param1, param2, param3);
1447  break;
1448  }
1449 
1450  return 0;
1451 }
1452 
1453 void
1454 grprintfontname(integer what, void* pEngine, integer param1, integer param2)
1455 {
1456  char* name = NULL;
1458  switch (what) {
1459  case XeTeX_feature_name:
1460  name = getGraphiteFeatureLabel(engine, param1);
1461  break;
1462  case XeTeX_selector_name:
1463  name = getGraphiteFeatureSettingLabel(engine, param1, param2);
1464  break;
1465  }
1466 
1467  if (name != NULL) {
1468  printcstring(name);
1470  }
1471 }
1472 
1473 integer
1474 grfontgetnamed(integer what, void* pEngine)
1475 {
1476  long rval = -1;
1478  switch (what) {
1480  rval = findGraphiteFeatureNamed(engine, (const char*)nameoffile + 1, namelength);
1481  break;
1482  }
1483  return rval;
1484 }
1485 
1486 integer
1488 {
1489  long rval = -1;
1491  switch (what) {
1494  break;
1495  }
1496  return rval;
1497 }
1498 
1499 #define XDV_FLAG_VERTICAL 0x0100
1500 #define XDV_FLAG_COLORED 0x0200
1501 #define XDV_FLAG_EXTEND 0x1000
1502 #define XDV_FLAG_SLANT 0x2000
1503 #define XDV_FLAG_EMBOLDEN 0x4000
1504 
1505 #ifdef XETEX_MAC
1506 static UInt32
1507 cgColorToRGBA32(CGColorRef color)
1508 {
1509  const CGFloat *components = CGColorGetComponents(color);
1510 
1511  UInt32 rval = (UInt8)(components[0] * 255.0 + 0.5);
1512  rval <<= 8;
1513  rval += (UInt8)(components[1] * 255.0 + 0.5);
1514  rval <<= 8;
1515  rval += (UInt8)(components[2] * 255.0 + 0.5);
1516  rval <<= 8;
1517  rval += (UInt8)(components[3] * 255.0 + 0.5);
1518  return rval;
1519 }
1520 #endif
1521 
1522 static int xdvBufSize = 0;
1523 
1524 int
1526 {
1527  unsigned char* cp;
1528  uint16_t* glyphIDs;
1529  memoryword* p = (memoryword*) pNode;
1530  void* glyph_info;
1532  Fixed width;
1534 
1535  int i = glyphCount * native_glyph_info_size + 8; /* to guarantee enough space in the buffer */
1536  if (i > xdvBufSize) {
1537  if (xdvbuffer != NULL)
1538  free(xdvbuffer);
1539  xdvBufSize = ((i / 1024) + 1) * 1024;
1540  xdvbuffer = (char*) xmalloc(xdvBufSize);
1541  }
1542 
1543  glyph_info = native_glyph_info_ptr(p);
1544  locations = (FixedPoint*)glyph_info;
1545  glyphIDs = (uint16_t*)(locations + glyphCount);
1546 
1547  cp = (unsigned char*)xdvbuffer;
1548 
1549  width = node_width(p);
1550  *cp++ = (width >> 24) & 0xff;
1551  *cp++ = (width >> 16) & 0xff;
1552  *cp++ = (width >> 8) & 0xff;
1553  *cp++ = width & 0xff;
1554 
1555  *cp++ = (glyphCount >> 8) & 0xff;
1556  *cp++ = glyphCount & 0xff;
1557 
1558  for (i = 0; i < glyphCount; ++i) {
1559  Fixed x = locations[i].x;
1560  Fixed y = locations[i].y;
1561  *cp++ = (x >> 24) & 0xff;
1562  *cp++ = (x >> 16) & 0xff;
1563  *cp++ = (x >> 8) & 0xff;
1564  *cp++ = x & 0xff;
1565  *cp++ = (y >> 24) & 0xff;
1566  *cp++ = (y >> 16) & 0xff;
1567  *cp++ = (y >> 8) & 0xff;
1568  *cp++ = y & 0xff;
1569  }
1570 
1571  for (i = 0; i < glyphCount; ++i) {
1572  uint16_t g = glyphIDs[i];
1573  *cp++ = (g >> 8) & 0xff;
1574  *cp++ = g & 0xff;
1575  }
1576 
1577  return ((char*)cp - xdvbuffer);
1578 }
1579 
1580 int
1582 {
1583  uint16_t flags = 0;
1584  uint32_t rgba;
1585  Fixed size;
1586  char* filename;
1587  uint32_t index;
1588  uint8_t filenameLen;
1589  int fontDefLength;
1590  char* cp;
1591  /* PlatformFontRef fontRef = 0; */
1592  float extend = 1.0;
1593  float slant = 0.0;
1594  float embolden = 0.0;
1595 
1596 #ifdef XETEX_MAC
1597  CFDictionaryRef attributes = NULL;
1598 
1599  if (fontarea[f] == AAT_FONT_FLAG) {
1600  CTFontRef font;
1601  CGColorRef color;
1602  CGAffineTransform t;
1603  CFNumberRef emboldenNumber;
1604  CGFloat fSize;
1605 
1606  attributes = (CFDictionaryRef) fontlayoutengine[f];
1607  font = CFDictionaryGetValue(attributes, kCTFontAttributeName);
1608 
1610  assert(filename);
1611 
1612  if (CFDictionaryGetValue(attributes, kCTVerticalFormsAttributeName))
1614 
1615  color = (CGColorRef) CFDictionaryGetValue(attributes, kCTForegroundColorAttributeName);
1616  if (color)
1617  rgba = cgColorToRGBA32(color);
1618 
1619  t = CTFontGetMatrix(font);
1620  extend = t.a;
1621  slant = t.c;
1622 
1623  emboldenNumber = CFDictionaryGetValue(attributes, kXeTeXEmboldenAttributeName);
1624  if (emboldenNumber)
1625  CFNumberGetValue(emboldenNumber, kCFNumberFloatType, &embolden);
1626 
1627  fSize = CTFontGetSize(font);
1628  size = D2Fix(fSize);
1629  } else
1630 #endif
1631  if (fontarea[f] == OTGR_FONT_FLAG) {
1633 
1635  /* fontRef = */ getFontRef(engine);
1637  assert(filename);
1638 
1639  rgba = getRgbValue(engine);
1640  if ((fontflags[f] & FONT_FLAGS_VERTICAL) != 0)
1642 
1645  embolden = getEmboldenFactor(engine);
1646 
1648  } else {
1649  fprintf(stderr, "\n! Internal error: bad native font flag in `make_font_def'\n");
1650  exit(3);
1651  }
1652 
1653  filenameLen = strlen(filename);
1654 
1655  /* parameters after internal font ID:
1656  // size[4]
1657  // flags[2]
1658  // l[1] n[l]
1659  // if flags & COLORED:
1660  // c[4]
1661  */
1662 
1663  fontDefLength
1664  = 4 /* size */
1665  + 2 /* flags */
1666  + 1 /* name length */
1667  + filenameLen
1668  + 4 /* face index */;
1669 
1670  if ((fontflags[f] & FONT_FLAGS_COLORED) != 0) {
1671  fontDefLength += 4; /* 32-bit RGBA value */
1673  }
1674 
1675  if (extend != 1.0) {
1676  fontDefLength += 4;
1678  }
1679  if (slant != 0.0) {
1680  fontDefLength += 4;
1681  flags |= XDV_FLAG_SLANT;
1682  }
1683  if (embolden != 0.0) {
1684  fontDefLength += 4;
1686  }
1687 
1688  if (fontDefLength > xdvBufSize) {
1689  if (xdvbuffer != NULL)
1690  free(xdvbuffer);
1691  xdvBufSize = ((fontDefLength / 1024) + 1) * 1024;
1692  xdvbuffer = (char*) xmalloc(xdvBufSize);
1693  }
1694  cp = xdvbuffer;
1695 
1696  *(Fixed*)cp = SWAP32(size);
1697  cp += 4;
1698 
1699  *(uint16_t*)cp = SWAP16(flags);
1700  cp += 2;
1701 
1702  *(uint8_t*)cp = filenameLen;
1703  cp += 1;
1704  memcpy(cp, filename, filenameLen);
1705  cp += filenameLen;
1706 
1707  *(uint32_t*)cp = SWAP32(index);
1708  cp += 4;
1709 
1710  if ((fontflags[f] & FONT_FLAGS_COLORED) != 0) {
1711  *(uint32_t*)cp = SWAP32(rgba);
1712  cp += 4;
1713  }
1714 
1715  if (flags & XDV_FLAG_EXTEND) {
1716  Fixed f = D2Fix(extend);
1717  *(uint32_t*)(cp) = SWAP32(f);
1718  cp += 4;
1719  }
1720  if (flags & XDV_FLAG_SLANT) {
1721  Fixed f = D2Fix(slant);
1722  *(uint32_t*)(cp) = SWAP32(f);
1723  cp += 4;
1724  }
1725  if (flags & XDV_FLAG_EMBOLDEN) {
1726  Fixed f = D2Fix(embolden);
1727  *(uint32_t*)(cp) = SWAP32(f);
1728  cp += 4;
1729  }
1730 
1731  free((char*) filename);
1732 
1733  return fontDefLength;
1734 }
1735 
1736 int
1737 applymapping(void* pCnv, uint16_t* txtPtr, int txtLen)
1738 {
1740  UInt32 inUsed, outUsed;
1742  static UInt32 outLength = 0;
1743 
1744  /* allocate outBuffer if not big enough */
1745  if (outLength < txtLen * sizeof(UniChar) + 32) {
1746  if (mappedtext != 0)
1747  free(mappedtext);
1748  outLength = txtLen * sizeof(UniChar) + 32;
1749  mappedtext = xmalloc(outLength);
1750  }
1751 
1752  /* try the mapping */
1753 retry:
1755  (Byte*)txtPtr, txtLen * sizeof(UniChar), &inUsed,
1756  (Byte*)mappedtext, outLength, &outUsed, true);
1757 
1758  switch (status) {
1759  case kStatus_NoError:
1760  txtPtr = (UniChar*)mappedtext;
1761  return outUsed / sizeof(UniChar);
1762 
1764  outLength += (txtLen * sizeof(UniChar)) + 32;
1765  free(mappedtext);
1766  mappedtext = xmalloc(outLength);
1767  goto retry;
1768 
1769  default:
1770  return 0;
1771  }
1772 }
1773 
1774 static void
1775 snap_zone(scaled* value, scaled snap_value, scaled fuzz)
1776 {
1777  scaled difference = *value - snap_value;
1778  if (difference <= fuzz && difference >= -fuzz)
1779  *value = snap_value;
1780 }
1781 
1782 void
1784 {
1785 #define QUAD(f) fontinfo[6+parambase[f]].cint
1786 #define X_HEIGHT(f) fontinfo[5+parambase[f]].cint
1787 #define CAP_HEIGHT(f) fontinfo[8+parambase[f]].cint
1788 
1789  float ht = 0.0;
1790  float dp = 0.0;
1791  Fixed fuzz;
1792 
1793 #ifdef XETEX_MAC
1794  if (fontarea[font] == AAT_FONT_FLAG) {
1796  int gid = MapCharToGlyph_AAT(attributes, ch);
1797  GetGlyphHeightDepth_AAT(attributes, gid, &ht, &dp);
1798  } else
1799 #endif
1800  if (fontarea[font] == OTGR_FONT_FLAG) {
1802  int gid = mapCharToGlyph(engine, ch);
1803  getGlyphHeightDepth(engine, gid, &ht, &dp);
1804  } else {
1805  fprintf(stderr, "\n! Internal error: bad native font flag in `get_native_char_height_depth`\n");
1806  exit(3);
1807  }
1808 
1809  *height = D2Fix(ht);
1810  *depth = D2Fix(dp);
1811 
1812  /* snap to "known" zones for baseline, x-height, cap-height if within 4% of em-size */
1813  fuzz = QUAD(font) / 25;
1814  snap_zone(depth, 0, fuzz);
1815  snap_zone(height, 0, fuzz);
1816  snap_zone(height, X_HEIGHT(font), fuzz);
1817  snap_zone(height, CAP_HEIGHT(font), fuzz);
1818 }
1819 
1820 scaled
1822 {
1823  scaled h, d;
1824  getnativecharheightdepth(f, c, &h, &d);
1825  return h;
1826 }
1827 
1828 scaled
1830 {
1831  scaled h, d;
1832  getnativecharheightdepth(f, c, &h, &d);
1833  return d;
1834 }
1835 
1836 void
1838 {
1839  float l, r;
1840 
1841 #ifdef XETEX_MAC
1842  if (fontarea[font] == AAT_FONT_FLAG) {
1844  int gid = MapCharToGlyph_AAT(attributes, ch);
1845  GetGlyphSidebearings_AAT(attributes, gid, &l, &r);
1846  } else
1847 #endif
1848  if (fontarea[font] == OTGR_FONT_FLAG) {
1850  int gid = mapCharToGlyph(engine, ch);
1851  getGlyphSidebearings(engine, gid, &l, &r);
1852  } else {
1853  fprintf(stderr, "\n! Internal error: bad native font flag in `get_native_char_side_bearings'\n");
1854  exit(3);
1855  }
1856 
1857  *lsb = D2Fix(l);
1858  *rsb = D2Fix(r);
1859 }
1860 
1861 scaled
1863 {
1864 /* edge codes 1,2,3,4 => L T R B */
1865  float a, b;
1866 
1867 #ifdef XETEX_MAC
1868  if (fontarea[font] == AAT_FONT_FLAG) {
1870  if (edge & 1)
1871  GetGlyphSidebearings_AAT(attributes, gid, &a, &b);
1872  else
1873  GetGlyphHeightDepth_AAT(attributes, gid, &a, &b);
1874  } else
1875 #endif
1876  if (fontarea[font] == OTGR_FONT_FLAG) {
1878  if (edge & 1)
1879  getGlyphSidebearings(engine, gid, &a, &b);
1880  else
1881  getGlyphHeightDepth(engine, gid, &a, &b);
1882  } else {
1883  fprintf(stderr, "\n! Internal error: bad native font flag in `get_glyph_bounds'\n");
1884  exit(3);
1885  }
1886  return D2Fix((edge <= 2) ? a : b);
1887 }
1888 
1889 scaled
1891 {
1892  scaled lsb, rsb;
1893  getnativecharsidebearings(f, c, &lsb, &rsb);
1894  if (rsb < 0)
1895  return fontletterspace[f] - rsb;
1896  else
1897  return fontletterspace[f];
1898 }
1899 
1900 scaled
1902 {
1903  scaled wd = 0;
1904 #ifdef XETEX_MAC
1905  if (fontarea[f] == AAT_FONT_FLAG) {
1907  int gid = MapCharToGlyph_AAT(attributes, c);
1908  wd = D2Fix(GetGlyphWidth_AAT(attributes, gid));
1909  } else
1910 #endif
1911  if (fontarea[f] == OTGR_FONT_FLAG) {
1913  int gid = mapCharToGlyph(engine, c);
1914  wd = D2Fix(getGlyphWidthFromEngine(engine, gid));
1915  } else {
1916  fprintf(stderr, "\n! Internal error: bad native font flag in `get_native_char_wd'\n");
1917  exit(3);
1918  }
1919  return wd;
1920 }
1921 
1922 uint16_t
1923 get_native_glyph(void* pNode, unsigned index)
1924 {
1925  memoryword* node = (memoryword*)pNode;
1927  uint16_t* glyphIDs = (uint16_t*)(locations + native_glyph_count(node));
1928  if (index >= native_glyph_count(node))
1929  return 0;
1930  else
1931  return glyphIDs[index];
1932 }
1933 
1934 void
1936 {
1937  memoryword* node = (memoryword*)pNode;
1938  unsigned f = native_font(node);
1939 
1940 #ifdef XETEX_MAC /* separate Mac-only codepath for AAT fonts */
1941  if (fontarea[f] == AAT_FONT_FLAG) {
1942  (void)DoAATLayout(node, 1);
1943  return;
1944  }
1945 #endif
1946 
1947  /* save desired width */
1948  int savedWidth = node_width(node);
1949 
1951 
1952  if (node_width(node) != savedWidth) {
1953  /* see how much adjustment is needed overall */
1954  double justAmount = Fix2D(savedWidth - node_width(node));
1955 
1956  /* apply justification to spaces (or if there are none, distribute it to all glyphs as a last resort) */
1958  uint16_t* glyphIDs = (uint16_t*)(locations + native_glyph_count(node));
1960  int spaceCount = 0, i;
1961 
1962  int spaceGlyph = mapchartoglyph(f, ' ');
1963  for (i = 0; i < glyphCount; ++i)
1964  if (glyphIDs[i] == spaceGlyph)
1965  spaceCount++;
1966 
1967  if (spaceCount > 0) {
1968  double adjustment = 0;
1969  int spaceIndex = 0;
1970  for (i = 0; i < glyphCount; ++i) {
1971  locations[i].x = D2Fix(Fix2D(locations[i].x) + adjustment);
1972  if (glyphIDs[i] == spaceGlyph) {
1973  spaceIndex++;
1974  adjustment = justAmount * spaceIndex / spaceCount;
1975  }
1976  }
1977  } else {
1978  for (i = 1; i < glyphCount; ++i)
1979  locations[i].x = D2Fix(Fix2D(locations[i].x) + justAmount * i / (glyphCount - 1));
1980  }
1981 
1982  node_width(node) = savedWidth;
1983  }
1984 }
1985 
1986 void
1987 measure_native_node(void* pNode, int use_glyph_metrics)
1988 {
1989  memoryword* node = (memoryword*)pNode;
1990  int txtLen = native_length(node);
1991  uint16_t* txtPtr = (uint16_t*)(node + native_node_size);
1992 
1993  unsigned f = native_font(node);
1994 
1995 #ifdef XETEX_MAC
1996  if (fontarea[f] == AAT_FONT_FLAG) {
1997  /* we're using this font in AAT mode, so fontlayoutengine[f] is actually a CFDictionaryRef */
1998  DoAATLayout(node, 0);
1999  } else
2000 #endif
2001  if (fontarea[f] == OTGR_FONT_FLAG) {
2002  /* using this font in OT Layout mode, so fontlayoutengine[f] is actually a XeTeXLayoutEngine */
2003 
2005 
2007  uint16_t* glyphIDs;
2008  Fixed* glyphAdvances = NULL;
2009  int totalGlyphCount = 0;
2010 
2011  /* need to find direction runs within the text, and call layoutChars separately for each */
2012 
2014  void* glyph_info = 0;
2015  static FloatPoint* positions = 0;
2016  static float* advances = 0;
2017  static uint32_t* glyphs = 0;
2018 
2019  UBiDi* pBiDi = ubidi_open();
2020 
2022  ubidi_setPara(pBiDi, (const UChar*) txtPtr, txtLen, getDefaultDirection(engine), NULL, &errorCode);
2023 
2024  dir = ubidi_getDirection(pBiDi);
2025  if (dir == UBIDI_MIXED) {
2026  /* we actually do the layout twice here, once to count glyphs and then again to get them;
2027  which is inefficient, but i figure that MIXED is a relatively rare occurrence, so i can't be
2028  bothered to deal with the memory reallocation headache of doing it differently
2029  */
2030  int nRuns = ubidi_countRuns(pBiDi, &errorCode);
2031  double width = 0;
2032  int i, runIndex;
2033  int32_t logicalStart, length;
2034  for (runIndex = 0; runIndex < nRuns; ++runIndex) {
2035  dir = ubidi_getVisualRun(pBiDi, runIndex, &logicalStart, &length);
2036  totalGlyphCount += layoutChars(engine, txtPtr, logicalStart, length, txtLen, (dir == UBIDI_RTL));
2037  }
2038 
2039  if (totalGlyphCount > 0) {
2040  double x, y;
2041  glyph_info = xcalloc(totalGlyphCount, native_glyph_info_size);
2042  locations = (FixedPoint*)glyph_info;
2043  glyphIDs = (uint16_t*)(locations + totalGlyphCount);
2044  glyphAdvances = (Fixed*) xcalloc(totalGlyphCount, sizeof(Fixed));
2045  totalGlyphCount = 0;
2046 
2047  x = y = 0.0;
2048  for (runIndex = 0; runIndex < nRuns; ++runIndex) {
2049  int nGlyphs;
2050  dir = ubidi_getVisualRun(pBiDi, runIndex, &logicalStart, &length);
2051  nGlyphs = layoutChars(engine, txtPtr, logicalStart, length, txtLen,
2052  (dir == UBIDI_RTL));
2053 
2054  glyphs = (uint32_t*) xcalloc(nGlyphs, sizeof(uint32_t));
2055  positions = (FloatPoint*) xcalloc(nGlyphs + 1, sizeof(FloatPoint));
2056  advances = (float*) xcalloc(nGlyphs, sizeof(float));
2057 
2059  getGlyphAdvances(engine, advances);
2060  getGlyphPositions(engine, positions);
2061 
2062  for (i = 0; i < nGlyphs; ++i) {
2063  glyphIDs[totalGlyphCount] = glyphs[i];
2064  locations[totalGlyphCount].x = D2Fix(positions[i].x + x);
2065  locations[totalGlyphCount].y = D2Fix(positions[i].y + y);
2066  glyphAdvances[totalGlyphCount] = D2Fix(advances[i]);
2067  ++totalGlyphCount;
2068  }
2069  x += positions[nGlyphs].x;
2070  y += positions[nGlyphs].y;
2071 
2072  free(glyphs);
2073  free(positions);
2074  free(advances);
2075  }
2076  width = x;
2077  }
2078 
2079  node_width(node) = D2Fix(width);
2080  native_glyph_count(node) = totalGlyphCount;
2081  native_glyph_info_ptr(node) = glyph_info;
2082  } else {
2083  double width = 0;
2084  totalGlyphCount = layoutChars(engine, txtPtr, 0, txtLen, txtLen, (dir == UBIDI_RTL));
2085 
2086  glyphs = (uint32_t*) xcalloc(totalGlyphCount, sizeof(uint32_t));
2087  positions = (FloatPoint*) xcalloc(totalGlyphCount + 1, sizeof(FloatPoint));
2088  advances = (float*) xcalloc(totalGlyphCount, sizeof(float));
2089 
2091  getGlyphAdvances(engine, advances);
2092  getGlyphPositions(engine, positions);
2093 
2094  if (totalGlyphCount > 0) {
2095  int i;
2096  glyph_info = xcalloc(totalGlyphCount, native_glyph_info_size);
2097  locations = (FixedPoint*)glyph_info;
2098  glyphIDs = (uint16_t*)(locations + totalGlyphCount);
2099  glyphAdvances = (Fixed*) xcalloc(totalGlyphCount, sizeof(Fixed));
2100  for (i = 0; i < totalGlyphCount; ++i) {
2101  glyphIDs[i] = glyphs[i];
2102  glyphAdvances[i] = D2Fix(advances[i]);
2103  locations[i].x = D2Fix(positions[i].x);
2104  locations[i].y = D2Fix(positions[i].y);
2105  }
2106  width = positions[totalGlyphCount].x;
2107  }
2108 
2109  node_width(node) = D2Fix(width);
2110  native_glyph_count(node) = totalGlyphCount;
2111  native_glyph_info_ptr(node) = glyph_info;
2112 
2113  free(glyphs);
2114  free(positions);
2115  free(advances);
2116  }
2117 
2118  ubidi_close(pBiDi);
2119 
2120 
2121  if (fontletterspace[f] != 0) {
2122  Fixed lsDelta = 0;
2123  Fixed lsUnit = fontletterspace[f];
2124  int i;
2125  for (i = 0; i < totalGlyphCount; ++i) {
2126  if (glyphAdvances[i] == 0 && lsDelta != 0)
2127  lsDelta -= lsUnit;
2128  locations[i].x += lsDelta;
2129  lsDelta += lsUnit;
2130  }
2131  if (lsDelta != 0) {
2132  lsDelta -= lsUnit;
2133  node_width(node) += lsDelta;
2134  }
2135  }
2136  free(glyphAdvances);
2137  } else {
2138  fprintf(stderr, "\n! Internal error: bad native font flag in `measure_native_node'\n");
2139  exit(3);
2140  }
2141 
2142  if (use_glyph_metrics == 0 || native_glyph_count(node) == 0) {
2143  /* for efficiency, height and depth are the font's ascent/descent,
2144  not true values based on the actual content of the word,
2145  unless use_glyph_metrics is non-zero */
2146  node_height(node) = heightbase[f];
2147  node_depth(node) = depthbase[f];
2148  } else {
2149  /* this iterates over the glyph data whether it comes from AAT or OT layout */
2151  uint16_t* glyphIDs = (uint16_t*)(locations + native_glyph_count(node));
2152  float yMin = 65536.0;
2153  float yMax = -65536.0;
2154  int i;
2155  for (i = 0; i < native_glyph_count(node); ++i) {
2156  float ht, dp;
2157  float y = Fix2D(-locations[i].y); /* NB negative is upwards in locations[].y! */
2158 
2159  GlyphBBox bbox;
2160  if (getCachedGlyphBBox(f, glyphIDs[i], &bbox) == 0) {
2161 #ifdef XETEX_MAC
2162  if (fontarea[f] == AAT_FONT_FLAG)
2164  else
2165 #endif
2166  if (fontarea[f] == OTGR_FONT_FLAG)
2168 
2169  cacheGlyphBBox(f, glyphIDs[i], &bbox);
2170  }
2171 
2172  ht = bbox.yMax;
2173  dp = -bbox.yMin;
2174 
2175  if (y + ht > yMax)
2176  yMax = y + ht;
2177  if (y - dp < yMin)
2178  yMin = y - dp;
2179  }
2180  node_height(node) = D2Fix(yMax);
2181  node_depth(node) = -D2Fix(yMin);
2182  }
2183 }
2184 
2185 Fixed
2187 {
2188  memoryword* node = (memoryword*) pNode;
2189  unsigned f = native_font(node);
2190  unsigned n = native_glyph_count(node);
2191  if (n > 0) {
2193  uint16_t* glyphIDs = (uint16_t*)(locations + n);
2194 
2195 #ifdef XETEX_MAC
2196  if (fontarea[f] == AAT_FONT_FLAG)
2197  return D2Fix(GetGlyphItalCorr_AAT((CFDictionaryRef)(fontlayoutengine[f]), glyphIDs[n-1]))
2198  + fontletterspace[f];
2199 #endif
2200  if (fontarea[f] == OTGR_FONT_FLAG)
2201  return D2Fix(getGlyphItalCorr((XeTeXLayoutEngine)(fontlayoutengine[f]), glyphIDs[n-1]))
2202  + fontletterspace[f];
2203  }
2204 
2205  return 0;
2206 }
2207 
2208 
2209 Fixed
2211 {
2212  memoryword* node = (memoryword*) pNode;
2213  uint16_t gid = native_glyph(node);
2214  unsigned f = native_font(node);
2215 
2216 #ifdef XETEX_MAC
2217  if (fontarea[f] == AAT_FONT_FLAG)
2219 #endif
2220  if (fontarea[f] == OTGR_FONT_FLAG)
2222 
2223  return 0; /* can't actually happen */
2224 }
2225 
2226 void
2227 measure_native_glyph(void* pNode, int use_glyph_metrics)
2228 {
2229  memoryword* node = (memoryword*) pNode;
2230  uint16_t gid = native_glyph(node);
2231  unsigned f = native_font(node);
2232 
2233  float ht = 0.0;
2234  float dp = 0.0;
2235 
2236 #ifdef XETEX_MAC
2237  if (fontarea[f] == AAT_FONT_FLAG) {
2239  node_width(node) = D2Fix(GetGlyphWidth_AAT(attributes, gid));
2240  if (use_glyph_metrics)
2241  GetGlyphHeightDepth_AAT(attributes, gid, &ht, &dp);
2242  } else
2243 #endif
2244  if (fontarea[f] == OTGR_FONT_FLAG) {
2246  XeTeXFont fontInst = getFont(engine);
2247  node_width(node) = D2Fix(getGlyphWidth(fontInst, gid));
2248  if (use_glyph_metrics)
2249  getGlyphHeightDepth(engine, gid, &ht, &dp);
2250  } else {
2251  fprintf(stderr, "\n! Internal error: bad native font flag in `measure_native_glyph'\n");
2252  exit(3);
2253  }
2254 
2255  if (use_glyph_metrics) {
2256  node_height(node) = D2Fix(ht);
2257  node_depth(node) = D2Fix(dp);
2258  } else {
2259  node_height(node) = heightbase[f];
2260  node_depth(node) = depthbase[f];
2261  }
2262 }
2263 
2264 integer
2266 {
2267  if (ch > 0x10ffff || ((ch >= 0xd800) && (ch <= 0xdfff)))
2268  return 0;
2269 #ifdef XETEX_MAC
2270  if (fontarea[font] == AAT_FONT_FLAG)
2272  else
2273 #endif
2274  if (fontarea[font] == OTGR_FONT_FLAG)
2276  else {
2277  fprintf(stderr, "\n! Internal error: bad native font flag in `map_char_to_glyph'\n");
2278  exit(3);
2279  }
2280 }
2281 
2282 integer
2284  /* glyph name is at nameoffile+1 */
2285 {
2286 #ifdef XETEX_MAC
2287  if (fontarea[font] == AAT_FONT_FLAG)
2288  return MapGlyphToIndex_AAT((CFDictionaryRef)(fontlayoutengine[font]), (const char*)nameoffile + 1);
2289  else
2290 #endif
2291  if (fontarea[font] == OTGR_FONT_FLAG)
2292  return mapGlyphToIndex((XeTeXLayoutEngine)(fontlayoutengine[font]), (const char*)nameoffile + 1);
2293  else {
2294  fprintf(stderr, "\n! Internal error: bad native font flag in `map_glyph_to_index'\n");
2295  exit(3);
2296  }
2297 }
2298 
2299 integer
2301 {
2302 #ifdef XETEX_MAC
2303  if (fontarea[font] == AAT_FONT_FLAG)
2305  else
2306 #endif
2307  if (fontarea[font] == OTGR_FONT_FLAG)
2309  else {
2310  fprintf(stderr, "\n! Internal error: bad native font flag in `get_font_char_range'\n");
2311  exit(3);
2312  }
2313 }
2314 
2315 Fixed D2Fix(double d)
2316 {
2317  Fixed rval = (int)(d * 65536.0 + 0.5);
2318  return rval;
2319 }
2320 
2321 double Fix2D(Fixed f)
2322 {
2323  double rval = f / 65536.0;
2324  return rval;
2325 }
2326 
2327 /* these are here, not XeTeX_mac.c, because we need stubs on other platforms */
2328 void
2330 {
2331 #ifdef XETEX_MAC
2332  CTFontRef font = fontFromAttributes(attributes);
2333 
2334  *ascent = D2Fix(CTFontGetAscent(font));
2335  *descent = D2Fix(CTFontGetDescent(font));
2336  *xheight = D2Fix(CTFontGetXHeight(font));
2337  *capheight = D2Fix(CTFontGetCapHeight(font));
2338  *slant = D2Fix(tan(-CTFontGetSlantAngle(font) * M_PI / 180.0));
2339 #endif
2340 }
2341 
2342 int
2344 {
2345  int rval = -1;
2346 
2347 #ifdef XETEX_MAC
2348  CTFontRef font = fontFromAttributes(attributes);
2349  CFArrayRef list;
2350 
2351  switch (what) {
2352  case XeTeX_count_glyphs:
2353  rval = CTFontGetGlyphCount(font);
2354  break;
2355 
2356  case XeTeX_count_features:
2357  list = CTFontCopyFeatures(font);
2358  if (list) {
2359  rval = CFArrayGetCount(list);
2360  CFRelease(list);
2361  }
2362  break;
2363  }
2364 #endif
2365  return rval;
2366 }
2367 
2368 int
2369 aatfontget1(int what, CFDictionaryRef attributes, int param)
2370 {
2371  int rval = -1;
2372 
2373 #ifdef XETEX_MAC
2374  CTFontRef font = fontFromAttributes(attributes);
2375 
2376  switch (what) {
2377  case XeTeX_feature_code:
2378  {
2379  CFArrayRef features = CTFontCopyFeatures(font);
2380  if (features) {
2381  if (CFArrayGetCount(features) > param) {
2382  CFDictionaryRef feature = CFArrayGetValueAtIndex(features, param);
2383  CFNumberRef identifier = CFDictionaryGetValue(feature, kCTFontFeatureTypeIdentifierKey);
2384  if (identifier)
2385  CFNumberGetValue(identifier, kCFNumberIntType, &rval);
2386  }
2387  CFRelease(features);
2388  }
2389  break;
2390  }
2391 
2393  {
2394  CFArrayRef features = CTFontCopyFeatures(font);
2395  if (features) {
2396  CFBooleanRef value;
2397  CFDictionaryRef feature = findDictionaryInArrayWithIdentifier(features, kCTFontFeatureTypeIdentifierKey, param);
2398  Boolean found = CFDictionaryGetValueIfPresent(feature, kCTFontFeatureTypeExclusiveKey, (const void **)&value);
2399  if (found)
2400  rval = CFBooleanGetValue(value);
2401  CFRelease(features);
2402  }
2403  break;
2404  }
2405 
2406  case XeTeX_count_selectors:
2407  {
2408  CFArrayRef features = CTFontCopyFeatures(font);
2409  if (features) {
2410  CFDictionaryRef feature = findDictionaryInArrayWithIdentifier(features, kCTFontFeatureTypeIdentifierKey, param);
2411  if (feature) {
2412  CFArrayRef selectors = CFDictionaryGetValue(feature, kCTFontFeatureTypeSelectorsKey);
2413  if (selectors)
2414  rval = CFArrayGetCount(selectors);
2415  }
2416  CFRelease(features);
2417  }
2418  break;
2419  }
2420  }
2421 #endif
2422 
2423  return rval;
2424 }
2425 
2426 int
2427 aatfontget2(int what, CFDictionaryRef attributes, int param1, int param2)
2428 {
2429  int rval = -1;
2430 
2431 #ifdef XETEX_MAC
2432  CTFontRef font = fontFromAttributes(attributes);
2433  CFArrayRef features = CTFontCopyFeatures(font);
2434  if (features) {
2435  CFDictionaryRef feature = findDictionaryInArrayWithIdentifier(features, kCTFontFeatureTypeIdentifierKey, param1);
2436  if (feature) {
2437  CFArrayRef selectors = CFDictionaryGetValue(feature, kCTFontFeatureTypeSelectorsKey);
2438  if (selectors) {
2440  switch (what) {
2441  case XeTeX_selector_code:
2442  if (CFArrayGetCount(selectors) > param2) {
2443  CFNumberRef identifier;
2444  selector = CFArrayGetValueAtIndex(selectors, param2);
2445  identifier = CFDictionaryGetValue(selector, kCTFontFeatureSelectorIdentifierKey);
2446  if (identifier)
2447  CFNumberGetValue(identifier, kCFNumberIntType, &rval);
2448  }
2449  break;
2451  selector = findDictionaryInArrayWithIdentifier(selectors, kCTFontFeatureSelectorIdentifierKey, param2);
2452  if (selector) {
2453  CFBooleanRef isDefault;
2454  Boolean found = CFDictionaryGetValueIfPresent(selector, kCTFontFeatureSelectorDefaultKey, (const void **)&isDefault);
2455  if (found)
2456  rval = CFBooleanGetValue(isDefault);
2457  }
2458  break;
2459  }
2460  }
2461  }
2462  CFRelease(features);
2463  }
2464 #endif
2465 
2466  return rval;
2467 }
2468 
2469 int
2471 {
2472  int rval = -1;
2473 
2474 #ifdef XETEX_MAC
2476  {
2477  CTFontRef font = fontFromAttributes(attributes);
2478  CFArrayRef features = CTFontCopyFeatures(font);
2479  if (features) {
2480  CFDictionaryRef feature = findDictionaryInArray(features, kCTFontFeatureTypeNameKey,
2481  (const char*)nameoffile + 1, namelength);
2482  if (feature) {
2483  CFNumberRef identifier = CFDictionaryGetValue(feature, kCTFontFeatureTypeIdentifierKey);
2484  CFNumberGetValue(identifier, kCFNumberIntType, &rval);
2485  }
2486  CFRelease(features);
2487  }
2488  }
2489 #endif
2490 
2491  return rval;
2492 }
2493 
2494 int
2496 {
2497  int rval = -1;
2498 
2499 #ifdef XETEX_MAC
2500  CTFontRef font = fontFromAttributes(attributes);
2501 
2503  CFArrayRef features = CTFontCopyFeatures(font);
2504  if (features) {
2505  CFDictionaryRef feature = findDictionaryInArrayWithIdentifier(features, kCTFontFeatureTypeIdentifierKey, param);
2506  if (feature) {
2507  CFNumberRef selector = findSelectorByName(feature, (const char*)nameoffile + 1, namelength);
2508  if (selector)
2509  CFNumberGetValue(selector, kCFNumberIntType, &rval);
2510  }
2511  CFRelease(features);
2512  }
2513  }
2514 #endif
2515 
2516  return rval;
2517 }
2518 
2519 void
2520 aatprintfontname(int what, CFDictionaryRef attributes, int param1, int param2)
2521 {
2522 #ifdef XETEX_MAC
2523  CFStringRef name = NULL;
2525  CTFontRef font = fontFromAttributes(attributes);
2526  CFArrayRef features = CTFontCopyFeatures(font);
2527  if (features) {
2529  kCTFontFeatureTypeIdentifierKey,
2530  param1);
2531  if (feature) {
2532  if (what == XeTeX_feature_name)
2533  name = CFDictionaryGetValue(feature, kCTFontFeatureTypeNameKey);
2534  else {
2535  CFArrayRef selectors = CFDictionaryGetValue(feature, kCTFontFeatureTypeSelectorsKey);
2537  kCTFontFeatureSelectorIdentifierKey,
2538  param2);
2539  if (selector)
2540  name = CFDictionaryGetValue(selector, kCTFontFeatureSelectorNameKey);
2541  }
2542  }
2543  CFRelease(features);
2544  }
2545  }
2546 
2547  if (name) {
2548  CFIndex len = CFStringGetLength(name);
2549  UniChar* buf = xcalloc(len, sizeof(UniChar));
2550  CFStringGetCharacters(name, CFRangeMake(0, len), buf);
2551  printchars(buf, len);
2552  free(buf);
2553  }
2554 #endif
2555 }
2556 
2557 void
2559 {
2560  const char* s;
2561  int len = 0;
2562 #ifdef XETEX_MAC
2563  if (fontarea[font] == AAT_FONT_FLAG) {
2565  } else
2566 #endif
2567  if (fontarea[font] == OTGR_FONT_FLAG) {
2569  s = getGlyphName(getFont(engine), gid, &len);
2570  } else {
2571  fprintf(stderr, "\n! Internal error: bad native font flag in `print_glyph_name'\n");
2572  exit(3);
2573  }
2574  while (len-- > 0)
2575  printchar(*s++);
2576 }
2577 
2578 int
2579 u_open_in(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode, integer encodingData)
2580 {
2581  boolean rval;
2582  *f = (unicodefile) xmalloc(sizeof(UFILE));
2583  (*f)->encodingMode = 0;
2584  (*f)->conversionData = 0;
2585  (*f)->savedChar = -1;
2586  (*f)->skipNextLF = 0;
2587  rval = open_input (&((*f)->f), filefmt, fopen_mode);
2588  if (rval) {
2589  int B1, B2;
2590  if (mode == AUTO) {
2591  /* sniff encoding form */
2592  B1 = GETC((*f)->f);
2593  B2 = GETC((*f)->f);
2594  if (B1 == 0xfe && B2 == 0xff)
2595  mode = UTF16BE;
2596  else if (B2 == 0xfe && B1 == 0xff)
2597  mode = UTF16LE;
2598  else if (B1 == 0 && B2 != 0) {
2599  mode = UTF16BE;
2600  rewind((*f)->f);
2601  } else if (B2 == 0 && B1 != 0) {
2602  mode = UTF16LE;
2603  rewind((*f)->f);
2604  } else if (B1 == 0xef && B2 == 0xbb) {
2605  int B3 = GETC((*f)->f);
2606  if (B3 == 0xbf)
2607  mode = UTF8;
2608  }
2609  if (mode == AUTO) {
2610  rewind((*f)->f);
2611  mode = UTF8;
2612  }
2613  }
2614 
2615  setinputfileencoding(*f, mode, encodingData);
2616  }
2617  return rval;
2618 }
2619 
2620 void
2622 {
2623  if (f != 0) {
2624  fclose((*f)->f);
2625  if (((*f)->encodingMode == ICUMAPPING) && ((*f)->conversionData != NULL))
2626  ucnv_close((*f)->conversionData);
2627  free(*f);
2628  }
2629 }
2630 
2631 #if defined(WIN32)
2632 static int
2633 Isspace(char c)
2634 {
2635  return (c == ' ' || c == '\t');
2636 }
2637 #endif
2638 
2639 int
2641 {
2642  if (nopdfoutput) {
2643  return open_output(fptr, FOPEN_WBIN_MODE);
2644  } else {
2645  const char *p = (const char*)nameoffile+1;
2646  char *cmd, *q, *bindir = NULL;
2647  int len = strlen(p);
2648  while (*p)
2649  if (*p++ == '\"')
2650  ++len;
2651  len += strlen(outputdriver);
2652 #ifndef WIN32
2653  if (!kpse_absolute_p(outputdriver, true))
2654  bindir = kpse_var_value("SELFAUTOLOC");
2655  if (bindir)
2656  len += strlen(bindir) + 1;
2657 #endif
2658  if (output_directory)
2660  len += 10; /* space for -o flag, quotes, NUL */
2661  for (p = (const char*)nameoffile+1; *p; p++)
2662  if (*p == '\"')
2663  ++len; /* allow extra space to escape quotes in filename */
2664  cmd = xmalloc(len);
2665 #ifdef WIN32
2667 #else
2668  if (bindir) {
2669  strcpy(cmd, bindir);
2670  strcat(cmd, "/");
2671  strcat(cmd, outputdriver);
2672  } else {
2674  }
2675 #endif
2676  strcat(cmd, " -o \"");
2677  if (output_directory) {
2680  output_directory[len-1] = '\0';
2681  strcat(cmd, output_directory);
2682  strcat(cmd, "/");
2683  }
2684  q = cmd + strlen(cmd);
2685  for (p = (const char*)nameoffile+1; *p; p++) {
2686  if (*p == '\"')
2687  *q++ = '\\';
2688  *q++ = *p;
2689  }
2690  *q++ = '\"';
2691  *q = '\0';
2692  if (papersize != 0) {
2693  char* cmd2 = concat3(cmd, " -p ", papersize);
2694  free(cmd);
2695  cmd = cmd2;
2696  }
2697  if (output_directory) {
2698  char *fullname = concat3(output_directory, "/", (const char*)nameoffile+1);
2699  free(nameoffile);
2700  namelength = strlen(fullname);
2701  nameoffile = (unsigned char*) xmalloc(namelength + 2);
2702  strcpy((char*)nameoffile+1, fullname);
2703  free(fullname);
2704  }
2705 #if defined(WIN32)
2706  {
2707  wchar_t *tmp1w;
2708  char *p, *pp, *fullcmd, *prgnam;
2709  bindir = kpse_var_value("SELFAUTOLOC");
2710  for(pp = bindir; *pp; pp++) {
2711  if(*pp == '/') *pp = '\\';
2712  }
2713  pp = cmd;
2714  while(Isspace(*pp))
2715  pp++;
2716  prgnam = xmalloc(strlen(cmd));
2717  p = prgnam;
2718  while(!Isspace(*pp)) {
2719  *p++ = *pp++;
2720  }
2721  *p = '\0';
2722  fullcmd = concatn("\"\"", bindir, "\\", prgnam, "\"", pp, "\"", NULL);
2723  tmp1w = get_wstring_from_mbstring(CP_UTF8, (const char *)fullcmd, tmp1w=NULL);
2724  *fptr = _wpopen(tmp1w, L"wb");
2725  free(bindir);
2726  free(prgnam);
2727  free(fullcmd);
2728  free(tmp1w);
2729  }
2730 #else
2731  *fptr = popen(cmd, "w");
2732 #endif
2733  free(cmd);
2734  return (*fptr != 0);
2735  }
2736 }
2737 
2738 int
2740 {
2741  if (nopdfoutput) {
2742  if (fclose(fptr) != 0)
2743  return errno;
2744  } else {
2745  return pclose(fptr);
2746  }
2747  return 0;
2748 }
2749 
2750 int
2752 {
2753  int rval;
2754  int c;
2755 #ifdef WIN32
2756  HANDLE hStdin;
2757  DWORD ret;
2758  wint_t wc[1];
2759 #endif
2760 
2761  if (f->savedChar != -1) {
2762  rval = f->savedChar;
2763  f->savedChar = -1;
2764  return rval;
2765  }
2766 
2767  switch (f->encodingMode) {
2768  case UTF8:
2769  c = rval = GETC(f->f);
2770  if (rval != EOF) {
2771  uint16_t extraBytes = bytesFromUTF8[rval];
2772  switch (extraBytes) { /* note: code falls through cases! */
2773  case 3: c = GETC(f->f);
2774  if (c < 0x80 || c >= 0xc0) goto bad_utf8;
2775  rval <<= 6; rval += c;
2776  case 2: c = GETC(f->f);
2777  if (c < 0x80 || c >= 0xc0) goto bad_utf8;
2778  rval <<= 6; rval += c;
2779  case 1: c = GETC(f->f);
2780  if (c < 0x80 || c >= 0xc0) goto bad_utf8;
2781  rval <<= 6; rval += c;
2782  case 0:
2783  break;
2784 
2785  bad_utf8:
2786  if (c != EOF)
2787  UNGETC(c, f->f);
2788  case 5:
2789  case 4:
2790  badutf8warning();
2791  return 0xfffd; /* return without adjusting by offsetsFromUTF8 */
2792  };
2793  rval -= offsetsFromUTF8[extraBytes];
2794  if (rval < 0 || rval > 0x10ffff) {
2795  badutf8warning();
2796  return 0xfffd;
2797  }
2798  }
2799  break;
2800 
2801  case UTF16BE:
2802  rval = GETC(f->f);
2803  if (rval != EOF) {
2804  rval <<= 8;
2805  rval += GETC(f->f);
2806  if (rval >= 0xd800 && rval <= 0xdbff) {
2807  int lo = GETC(f->f);
2808  lo <<= 8;
2809  lo += GETC(f->f);
2810  if (lo >= 0xdc00 && lo <= 0xdfff)
2811  rval = 0x10000 + (rval - 0xd800) * 0x400 + (lo - 0xdc00);
2812  else {
2813  rval = 0xfffd;
2814  f->savedChar = lo;
2815  }
2816  } else if (rval >= 0xdc00 && rval <= 0xdfff)
2817  rval = 0xfffd;
2818  }
2819  break;
2820 
2821  case UTF16LE:
2822  rval = GETC(f->f);
2823  if (rval != EOF) {
2824  rval += (GETC(f->f) << 8);
2825  if (rval >= 0xd800 && rval <= 0xdbff) {
2826  int lo = GETC(f->f);
2827  lo += (GETC(f->f) << 8);
2828  if (lo >= 0xdc00 && lo <= 0xdfff)
2829  rval = 0x10000 + (rval - 0xd800) * 0x400 + (lo - 0xdc00);
2830  else {
2831  rval = 0xfffd;
2832  f->savedChar = lo;
2833  }
2834  } else if (rval >= 0xdc00 && rval <= 0xdfff)
2835  rval = 0xfffd;
2836  }
2837  break;
2838 
2839 #ifdef WIN32
2840  case WIN32CONSOLE:
2841  hStdin = GetStdHandle(STD_INPUT_HANDLE);
2842  if (ReadConsoleW(hStdin, wc, 1, &ret, NULL) == 0) {
2843  rval = EOF;
2844  break;
2845  }
2846  rval = wc[0];
2847  if (rval >= 0xd800 && rval <= 0xdbff) {
2848  int lo;
2849  if (ReadConsoleW(hStdin, wc, 1, &ret, NULL) == 0) {
2850  rval = EOF;
2851  break;
2852  }
2853  lo = wc[0];
2854  if (lo >= 0xdc00 && lo <= 0xdfff)
2855  rval = 0x10000 + (rval - 0xd800) * 0x400 + (lo - 0xdc00);
2856  else {
2857  rval = 0xfffd;
2858  f->savedChar = lo;
2859  }
2860  } else if (rval >= 0xdc00 && rval <= 0xdfff)
2861  rval = 0xfffd;
2862  break;
2863 #endif
2864 
2865  case RAW:
2866  rval = GETC(f->f);
2867  break;
2868 
2869  default:
2870  /* this can't happen */
2871  fprintf(stderr, "! Internal error---file input mode=%d.\n", f->encodingMode);
2872  uexit(3);
2873  }
2874 
2875  return rval;
2876 }
2877 
2878 void
2880 {
2881  unsigned char* s = nameoffile + 1;
2882  uint32_t rval;
2883  uint16_t* t;
2884  static int name16len = 0;
2885  if (name16len <= namelength) {
2886  if (nameoffile16 != 0)
2887  free(nameoffile16);
2888  name16len = namelength + 10;
2889  nameoffile16 = (uint16_t*) xcalloc(name16len, sizeof(uint16_t));
2890  }
2891  t = nameoffile16;
2892  while (s <= nameoffile + namelength) {
2893  uint16_t extraBytes;
2894  rval = *(s++);
2895  extraBytes = bytesFromUTF8[rval];
2896  switch (extraBytes) { /* note: code falls through cases! */
2897  case 5: rval <<= 6; if (*s) rval += *(s++);
2898  case 4: rval <<= 6; if (*s) rval += *(s++);
2899  case 3: rval <<= 6; if (*s) rval += *(s++);
2900  case 2: rval <<= 6; if (*s) rval += *(s++);
2901  case 1: rval <<= 6; if (*s) rval += *(s++);
2902  case 0: ;
2903  };
2904  rval -= offsetsFromUTF8[extraBytes];
2905  if (rval > 0xffff) {
2906  rval -= 0x10000;
2907  *(t++) = 0xd800 + rval / 0x0400;
2908  *(t++) = 0xdc00 + rval % 0x0400;
2909  } else {
2910  *(t++) = rval;
2911  }
2912  }
2913  namelength16 = t - nameoffile16;
2914 }
2915 
2916 
2917 integer get_native_word_cp(void* pNode, int side)
2918 {
2919  memoryword* node = (memoryword*)pNode;
2921  uint16_t* glyphIDs = (uint16_t*)(locations + native_glyph_count(node));
2924  uint16_t actual_glyph;
2925 
2926  if (glyphCount == 0)
2927  return 0;
2928 
2929  switch (side) {
2930  case LEFT_SIDE:
2931  actual_glyph = *glyphIDs;
2932  break;
2933  case RIGHT_SIDE:
2934  actual_glyph = glyphIDs[glyphCount - 1];
2935  break;
2936  default:
2937  assert(0); // we should not reach this point
2938  }
2939  return get_cp_code(f, actual_glyph, side);
2940 }
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
unsigned short wint_t
Definition: CPAL.d:4748
FILE *__cdecl _wpopen(wchar_t const *_Command, wchar_t const *_Mode)
double __cdecl tan(double _X)
TECkit_Status WINAPI TECkit_CreateConverter(Byte *mapping, UInt32 mappingSize, Byte mapForward, UInt16 inputForm, UInt16 outputForm, TECkit_Converter *converter)
Definition: Engine.cpp:1925
TECkit_Status WINAPI TECkit_ConvertBuffer(TECkit_Converter converter, Byte *inBuffer, UInt32 inLength, UInt32 *inUsed, Byte *outBuffer, UInt32 outLength, UInt32 *outUsed, Byte inputIsComplete)
Definition: Engine.cpp:2047
#define strdup
Definition: Utility.h:167
float getGlyphWidth(XeTeXFont font, uint32_t gid)
const char * getGlyphName(XeTeXFont font, uint16_t gid, int *len)
int getFontCharRange(XeTeXLayoutEngine engine, int reqFirst)
const char * getFullName(PlatformFontRef fontRef)
XeTeXFont createFontFromFile(const char *filename, int index, Fixed pointSize)
void getGlyphBounds(XeTeXLayoutEngine engine, uint32_t glyphID, GlyphBBox *bbox)
int mapGlyphToIndex(XeTeXLayoutEngine engine, const char *glyphName)
unsigned int countFeatures(XeTeXFont font, hb_tag_t script, hb_tag_t language)
uint32_t countGraphiteFeatureSettings(XeTeXLayoutEngine engine, uint32_t featureID)
uint32_t getGraphiteFeatureSettingCode(XeTeXLayoutEngine engine, uint32_t featureID, uint32_t index)
uint32_t countGraphiteFeatures(XeTeXLayoutEngine engine)
int findNextGraphiteBreak(void)
float getPointSize(XeTeXLayoutEngine engine)
XeTeXLayoutEngine createLayoutEngine(PlatformFontRef fontRef, XeTeXFont font, hb_tag_t script, char *language, hb_feature_t *features, int nFeatures, char **shapers, uint32_t rgbValue, float extend, float slant, float embolden)
hb_tag_t getIndScript(XeTeXFont font, unsigned int index)
int getCachedGlyphBBox(uint16_t fontID, uint16_t glyphID, GlyphBBox *bbox)
void getAscentAndDescent(XeTeXLayoutEngine engine, float *ascent, float *descent)
void deleteLayoutEngine(XeTeXLayoutEngine engine)
void getGlyphAdvances(XeTeXLayoutEngine engine, float advances[])
float getEmboldenFactor(XeTeXLayoutEngine engine)
void setReqEngine(char reqEngine)
unsigned int countLanguages(XeTeXFont font, hb_tag_t script)
hb_tag_t getIndFeature(XeTeXFont font, hb_tag_t script, hb_tag_t language, unsigned int index)
void getGlyphHeightDepth(XeTeXLayoutEngine engine, uint32_t glyphID, float *height, float *depth)
void getGlyphPositions(XeTeXLayoutEngine engine, FloatPoint positions[])
void * getFontTablePtr(XeTeXFont font, uint32_t tableTag)
PlatformFontRef findFontByName(const char *name, char *var, double size)
char getReqEngine()
XeTeXFont createFont(PlatformFontRef fontRef, Fixed pointSize)
Fixed getSlant(XeTeXFont font)
float getGlyphItalCorr(XeTeXLayoutEngine engine, uint32_t glyphID)
uint32_t getGraphiteFeatureDefaultSetting(XeTeXLayoutEngine engine, uint32_t featureID)
char * getFontFilename(XeTeXLayoutEngine engine, uint32_t *index)
float getGlyphWidthFromEngine(XeTeXLayoutEngine engine, uint32_t glyphID)
void cacheGlyphBBox(uint16_t fontID, uint16_t glyphID, const GlyphBBox *bbox)
void getGlyphSidebearings(XeTeXLayoutEngine engine, uint32_t glyphID, float *lsb, float *rsb)
void setFontLayoutDir(XeTeXFont font, int vertical)
float getExtendFactor(XeTeXLayoutEngine engine)
long findGraphiteFeatureSettingNamed(XeTeXLayoutEngine engine, uint32_t id, const char *name, int namelength)
Bool__ findGraphiteFeature(XeTeXLayoutEngine engine, const char *s, const char *e, hb_tag_t *f, int *v)
char * getGraphiteFeatureSettingLabel(XeTeXLayoutEngine engine, uint32_t featureID, uint32_t settingID)
uint32_t getRgbValue(XeTeXLayoutEngine engine)
int getDefaultDirection(XeTeXLayoutEngine engine)
XeTeXFont getFont(XeTeXLayoutEngine engine)
float getSlantFactor(XeTeXLayoutEngine engine)
void getGlyphs(XeTeXLayoutEngine engine, uint32_t glyphs[])
void getCapAndXHeight(XeTeXLayoutEngine engine, float *capheight, float *xheight)
Bool__ initGraphiteBreaking(XeTeXLayoutEngine engine, const uint16_t *txtPtr, int txtLen)
void deleteFont(XeTeXFont font)
PlatformFontRef getFontRef(XeTeXLayoutEngine engine)
long findGraphiteFeatureNamed(XeTeXLayoutEngine engine, const char *name, int namelength)
char * getGraphiteFeatureLabel(XeTeXLayoutEngine engine, uint32_t featureID)
unsigned int countScripts(XeTeXFont font)
hb_tag_t getIndLanguage(XeTeXFont font, hb_tag_t script, unsigned int index)
unsigned int countGlyphs(XeTeXFont font)
double getDesignSize(XeTeXFont font)
uint32_t mapCharToGlyph(XeTeXLayoutEngine engine, uint32_t charCode)
int layoutChars(XeTeXLayoutEngine engine, uint16_t chars[], int32_t offset, int32_t count, int32_t max, Bool__ rightToLeft)
uint32_t getGraphiteFeatureCode(XeTeXLayoutEngine engine, uint32_t index)
struct XeTeXLayoutEngine_rec * XeTeXLayoutEngine
struct XeTeXFont_rec * XeTeXFont
int halfShift
Definition: XeTeX_ext.c:142
void printglyphname(integer font, integer gid)
Definition: XeTeX_ext.c:2558
int linebreaknext(void)
Definition: XeTeX_ext.c:527
static UBreakIterator * brkIter
Definition: XeTeX_ext.c:478
integer grfontgetnamed(integer what, void *pEngine)
Definition: XeTeX_ext.c:1474
void aatgetfontmetrics(CFDictionaryRef attributes, integer *ascent, integer *descent, integer *xheight, integer *capheight, integer *slant)
Definition: XeTeX_ext.c:2329
#define XDV_FLAG_SLANT
Definition: XeTeX_ext.c:1502
integer otfontget3(integer what, void *pEngine, integer param1, integer param2, integer param3)
Definition: XeTeX_ext.c:1440
uint32_t halfMask
Definition: XeTeX_ext.c:144
static hb_tag_t read_tag_with_param(char *cp, int *param)
Definition: XeTeX_ext.c:737
scaled getnativecharht(integer f, integer c)
Definition: XeTeX_ext.c:1821
uint32_t halfBase
Definition: XeTeX_ext.c:143
int aatfontgetnamed(int what, CFDictionaryRef attributes)
Definition: XeTeX_ext.c:2470
void u_close_inout(unicodefile *f)
Definition: XeTeX_ext.c:2621
uint8_t firstByteMark[7]
Definition: XeTeX_ext.c:138
int u_open_in(unicodefile *f, integer filefmt, const_string fopen_mode, integer mode, integer encodingData)
Definition: XeTeX_ext.c:2579
integer otfontget1(integer what, void *pEngine, integer param)
Definition: XeTeX_ext.c:1384
void measure_native_node(void *pNode, int use_glyph_metrics)
Definition: XeTeX_ext.c:1987
int applymapping(void *pCnv, uint16_t *txtPtr, int txtLen)
Definition: XeTeX_ext.c:1737
#define UCNV_UTF32_NativeEndian
Definition: XeTeX_ext.c:326
static Bool__ readFeatureNumber(char *s, char *e, hb_tag_t *f, int *v)
Definition: XeTeX_ext.c:871
void checkfortfmfontmapping(void)
Definition: XeTeX_ext.c:657
uint32_t kSurrogateLowEnd
Definition: XeTeX_ext.c:148
scaled getnativecharic(integer f, integer c)
Definition: XeTeX_ext.c:1890
scaled getnativechardp(integer f, integer c)
Definition: XeTeX_ext.c:1829
uint32_t byteMark
Definition: XeTeX_ext.c:150
uint32_t kSurrogateLowStart
Definition: XeTeX_ext.c:147
static void buffer_overflow(void)
Definition: XeTeX_ext.c:273
static void snap_zone(scaled *value, scaled snap_value, scaled fuzz)
Definition: XeTeX_ext.c:1775
Fixed D2Fix(double d)
Definition: XeTeX_ext.c:2315
void getnativecharheightdepth(integer font, integer ch, scaled *height, scaled *depth)
Definition: XeTeX_ext.c:1783
void otgetfontmetrics(void *pEngine, scaled *ascent, scaled *descent, scaled *xheight, scaled *capheight, scaled *slant)
Definition: XeTeX_ext.c:1322
int open_dvi_output(FILE **fptr)
Definition: XeTeX_ext.c:2640
int applytfmfontmapping(void *cnv, int c)
Definition: XeTeX_ext.c:688
#define NATIVE_UTF32
Definition: XeTeX_ext.c:295
#define UNGETC(c, f)
Definition: XeTeX_ext.c:109
#define GETC(f)
Definition: XeTeX_ext.c:108
uint32_t kSurrogateHighEnd
Definition: XeTeX_ext.c:146
int aatfontgetnamed1(int what, CFDictionaryRef attributes, int param)
Definition: XeTeX_ext.c:2495
integer mapchartoglyph(integer font, integer ch)
Definition: XeTeX_ext.c:2265
void releasefontengine(void *engine, int type_flag)
Definition: XeTeX_ext.c:1308
static int brkLocaleStrNum
Definition: XeTeX_ext.c:479
#define XDV_FLAG_EXTEND
Definition: XeTeX_ext.c:1501
void printchars(unsigned short *str, int len)
Definition: XeTeX_ext.c:594
void * findnativefont(unsigned char *uname, integer scaled_size)
Definition: XeTeX_ext.c:1146
uint32_t offsetsFromUTF8[6]
Definition: XeTeX_ext.c:116
#define X_HEIGHT(f)
static void apply_normalization(uint32_t *buf, int len, int norm)
Definition: XeTeX_ext.c:299
char * outputdriver
Definition: XeTeX_ext.c:155
void makeutf16name(void)
Definition: XeTeX_ext.c:2879
void grprintfontname(integer what, void *pEngine, integer param1, integer param2)
Definition: XeTeX_ext.c:1454
unsigned int read_rgb_a(char **cp)
Definition: XeTeX_ext.c:768
int makeXDVGlyphArrayData(void *pNode)
Definition: XeTeX_ext.c:1525
#define QUAD(f)
void store_justified_native_glyphs(void *pNode)
Definition: XeTeX_ext.c:1935
int aatfontget(int what, CFDictionaryRef attributes)
Definition: XeTeX_ext.c:2343
double read_double(char **s)
Definition: XeTeX_ext.c:703
static void conversion_error(int errcode)
Definition: XeTeX_ext.c:282
Fixed get_native_glyph_italic_correction(void *pNode)
Definition: XeTeX_ext.c:2210
int getencodingmodeandinfo(integer *info)
Definition: XeTeX_ext.c:536
integer otfontget2(integer what, void *pEngine, integer param1, integer param2)
Definition: XeTeX_ext.c:1413
double Fix2D(Fixed f)
Definition: XeTeX_ext.c:2321
integer getfontcharrange(integer font, int first)
Definition: XeTeX_ext.c:2300
scaled getglyphbounds(integer font, integer edge, integer gid)
Definition: XeTeX_ext.c:1862
void getnativecharsidebearings(integer font, integer ch, scaled *lsb, scaled *rsb)
Definition: XeTeX_ext.c:1837
uint16_t get_native_glyph(void *pNode, unsigned index)
Definition: XeTeX_ext.c:1923
integer mapglyphtoindex(integer font)
Definition: XeTeX_ext.c:2283
int input_line(UFILE *f)
Definition: XeTeX_ext.c:330
int readCommonFeatures(char *feat, char *end, float *extend, float *slant, float *embolden, float *letterspace, uint32_t *rgbValue)
Definition: XeTeX_ext.c:804
scaled getnativecharwd(integer f, integer c)
Definition: XeTeX_ext.c:1901
void initversionstring(char **versions)
Definition: XeTeX_ext.c:158
int aatfontget1(int what, CFDictionaryRef attributes, int param)
Definition: XeTeX_ext.c:2369
int aatfontget2(int what, CFDictionaryRef attributes, int param1, int param2)
Definition: XeTeX_ext.c:2427
uint8_t bytesFromUTF8[256]
Definition: XeTeX_ext.c:126
void printutf8str(unsigned char *str, int len)
Definition: XeTeX_ext.c:587
void aatprintfontname(int what, CFDictionaryRef attributes, int param1, int param2)
Definition: XeTeX_ext.c:2520
#define CAP_HEIGHT(f)
static void die(const_string s, int i)
Definition: XeTeX_ext.c:471
void measure_native_glyph(void *pNode, int use_glyph_metrics)
Definition: XeTeX_ext.c:2227
Fixed get_native_italic_correction(void *pNode)
Definition: XeTeX_ext.c:2186
#define IS_SPC_OR_EOL(c)
#define XDV_FLAG_VERTICAL
Definition: XeTeX_ext.c:1499
int get_uni_c(UFILE *f)
Definition: XeTeX_ext.c:2751
static void * load_mapping_file(char *s, char *e, char byteMapping)
Definition: XeTeX_ext.c:607
#define XDV_FLAG_COLORED
Definition: XeTeX_ext.c:1500
static int xdvBufSize
Definition: XeTeX_ext.c:1522
integer get_native_word_cp(void *pNode, int side)
Definition: XeTeX_ext.c:2917
char * saved_mapping_name
Definition: XeTeX_ext.c:655
#define XDV_FLAG_EMBOLDEN
Definition: XeTeX_ext.c:1503
int makefontdef(integer f)
Definition: XeTeX_ext.c:1581
static void * loadOTfont(PlatformFontRef fontRef, XeTeXFont font, Fixed scaled_size, char *cp1)
Definition: XeTeX_ext.c:898
integer grfontgetnamed1(integer what, void *pEngine, integer param)
Definition: XeTeX_ext.c:1487
int dviclose(FILE *fptr)
Definition: XeTeX_ext.c:2739
uint32_t byteMask
Definition: XeTeX_ext.c:149
#define UTF16_NATIVE
Definition: XeTeX_ext.c:603
char * papersize
Definition: XeTeX_ext.c:154
uint32_t kSurrogateHighStart
Definition: XeTeX_ext.c:145
integer otfontget(integer what, void *pEngine)
Definition: XeTeX_ext.c:1362
void setinputfileencoding(UFILE *f, integer mode, integer encodingData)
Definition: XeTeX_ext.c:233
static void splitFontName(char *name, char **var, char **feat, char **end, int *index)
Definition: XeTeX_ext.c:1096
void * loadtfmfontmapping(void)
Definition: XeTeX_ext.c:675
void linebreakstart(int f, integer localeStrNum, uint16_t *text, integer textLength)
Definition: XeTeX_ext.c:482
#define kGSUB
Definition: XeTeX_ext.h:124
#define XeTeX_OT_language_code
Definition: XeTeX_ext.h:96
#define native_length(node)
Definition: XeTeX_ext.h:115
#define XeTeX_feature_code
Definition: XeTeX_ext.h:84
#define XeTeX_OT_feature_code
Definition: XeTeX_ext.h:97
#define native_glyph_info_size
Definition: XeTeX_ext.h:119
#define node_width(node)
Definition: XeTeX_ext.h:112
#define OTGR_FONT_FLAG
Definition: XeTeX_ext.h:45
struct UFILE * unicodefile
Definition: XeTeX_ext.h:41
#define node_height(node)
Definition: XeTeX_ext.h:114
#define XeTeX_OT_count_features
Definition: XeTeX_ext.h:94
void * CFDictionaryRef
Definition: XeTeX_ext.h:265
FT_Library gFreeTypeLibrary
#define XeTeX_selector_code
Definition: XeTeX_ext.h:88
#define XeTeX_is_default_selector
Definition: XeTeX_ext.h:90
#define AAT_FONT_FLAG
Definition: XeTeX_ext.h:44
#define XeTeX_count_features
Definition: XeTeX_ext.h:83
#define XeTeX_count_selectors
Definition: XeTeX_ext.h:87
#define XeTeX_count_glyphs
Definition: XeTeX_ext.h:81
#define node_depth(node)
Definition: XeTeX_ext.h:113
#define XeTeX_is_exclusive_feature
Definition: XeTeX_ext.h:86
#define XeTeX_find_feature_by_name
Definition: XeTeX_ext.h:85
#define XeTeX_selector_name
Definition: XeTeX_ext.h:102
#define FONT_FLAGS_COLORED
Definition: XeTeX_ext.h:47
#define FONT_FLAGS_VERTICAL
Definition: XeTeX_ext.h:48
#define native_glyph_count(node)
Definition: XeTeX_ext.h:117
#define XeTeX_feature_name
Definition: XeTeX_ext.h:101
#define kGPOS
Definition: XeTeX_ext.h:125
#define XeTeX_OT_script_code
Definition: XeTeX_ext.h:95
#define XeTeX_OT_count_scripts
Definition: XeTeX_ext.h:92
#define native_font(node)
Definition: XeTeX_ext.h:116
#define native_glyph_info_ptr(node)
Definition: XeTeX_ext.h:118
#define native_glyph(p)
Definition: XeTeX_ext.h:121
#define XeTeX_OT_count_languages
Definition: XeTeX_ext.h:93
#define XeTeX_find_selector_by_name
Definition: XeTeX_ext.h:89
const CFStringRef kXeTeXEmboldenAttributeName
Definition: XeTeX_mac.c:539
double GetGlyphWidth_AAT(CFDictionaryRef attributes, UInt16 gid)
Definition: XeTeX_mac.c:256
CFDictionaryRef findDictionaryInArrayWithIdentifier(CFArrayRef array, const void *identifierKey, int identifier)
Definition: XeTeX_mac.c:471
char * GetGlyphNameFromCTFont(CTFontRef ctFontRef, UInt16 gid, int *len)
Definition: XeTeX_mac.c:352
double GetGlyphItalCorr_AAT(CFDictionaryRef attributes, UInt16 gid)
Definition: XeTeX_mac.c:289
void GetGlyphHeightDepth_AAT(CFDictionaryRef attributes, UInt16 gid, float *ht, float *dp)
Definition: XeTeX_mac.c:264
int GetFontCharRange_AAT(CFDictionaryRef attributes, int reqFirst)
Definition: XeTeX_mac.c:375
CFNumberRef findSelectorByName(CFDictionaryRef feature, const char *name, int nameLength)
Definition: XeTeX_mac.c:517
void * loadAATfont(CTFontDescriptorRef descriptor, integer scaled_size, const char *cp1)
Definition: XeTeX_mac.c:542
char * getFileNameFromCTFont(CTFontRef ctFontRef, uint32_t *index)
Definition: XeTeX_mac.c:405
int MapCharToGlyph_AAT(CFDictionaryRef attributes, UInt32 ch)
Definition: XeTeX_mac.c:326
void GetGlyphBBox_AAT(CFDictionaryRef attributes, UInt16 gid, GlyphBBox *bbox)
Definition: XeTeX_mac.c:242
CFDictionaryRef findDictionaryInArray(CFArrayRef array, const void *nameKey, const char *name, int nameLength)
Definition: XeTeX_mac.c:494
void GetGlyphSidebearings_AAT(CFDictionaryRef attributes, UInt16 gid, float *lsb, float *rsb)
Definition: XeTeX_mac.c:276
void DoAATLayout(void *p, int justify)
Definition: XeTeX_mac.c:80
CTFontRef fontFromAttributes(CFDictionaryRef attributes)
Definition: XeTeX_mac.c:67
CTFontRef fontFromInteger(integer font)
Definition: XeTeX_mac.c:73
int MapGlyphToIndex_AAT(CFDictionaryRef attributes, const char *glyphName)
Definition: XeTeX_mac.c:345
void ** fontlayoutengine
integer * fontarea
void zprintnl(int s)
void zenddiagnostic(int nl)
Fixed loadedfontdesignsize
void begindiagnostic(void)
int gettracingfontsstate(void)
static uint16_t SWAP16(const uint16_t p)
Definition: XeTeXswap.h:39
static uint32_t SWAP32(const uint32_t p)
Definition: XeTeXswap.h:49
cp
Definition: action.c:1035
int xheight
Definition: afm2pl.c:213
q
Definition: afm2pl.c:2287
float capheight
Definition: afm2tfm.c:240
#define font
Definition: aptex-macros.h:175
#define width(a)
Definition: aptex-macros.h:198
#define depth(a)
Definition: aptex-macros.h:199
#define name
#define language
Definition: aptex-macros.h:837
#define height(a)
Definition: aptex-macros.h:200
#define slant(f)
#define param(a, b)
#define mode
Definition: aptex-macros.h:510
static uint32_t selector
Definition: aptex.h:305
static void dec(struct edge *e, int h)
int(* fptr)(const void *, const void *)
Definition: cfg.h:16
uint32_t tag
Definition: otfdescrip.cc:20
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
static Tfeature feat[21]
Definition: control.c:55
UConverter * cnv
Definition: date.c:55
#define free(a)
Definition: decNumber.cpp:310
void glyphs(int opcode)
Definition: disdvi.c:775
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
#define fopen
Definition: xxstdio.h:21
#define fread
Definition: xxstdio.h:25
#define fseek
Definition: xxstdio.h:30
#define ftell
Definition: xxstdio.h:31
#define FOPEN_RBIN_MODE
Definition: dvips.h:86
char * strncpy()
int strcmp()
Definition: coll.cpp:143
char * strcpy()
#define IS_DIR_SEP
Definition: dvidvi.c:106
#define info
Definition: dviinfo.c:42
#define FcGetVersion
Definition: fcalias.h:172
#define FC_VERSION
Definition: fontconfig.h:58
static void
Definition: fpif.c:118
#define WIN32
Definition: ft_conf.h:24
mpz_t * f
Definition: gen-fib.c:34
mpz_t pp
Definition: gen-psqr.c:108
#define B2
Definition: mod_34lsub1.c:69
#define B1
Definition: mod_34lsub1.c:68
#define B3
Definition: mod_34lsub1.c:70
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
#define d(n)
Definition: gpos-common.c:151
static void * xrealloc(char *oldp, unsigned size)
Definition: gsftopk.c:643
#define FOPEN_WBIN_MODE
Definition: gsftopk.c:171
#define memcpy(d, s, n)
Definition: gsftopk.c:64
FILE * out
Definition: hbf2gf.c:286
int get_cp_code(int fontNum, unsigned int code, int side)
Definition: hz.cpp:58
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define bufsize
#define SEEK_SET
Definition: jmemansi.c:26
unsigned int UInt32
Definition: bzip2.c:165
unsigned char UChar
Definition: bzip2.c:163
TT_Int32 Fixed
Definition: tttypes.h:45
FT_Library_Version(FT_Library library, FT_Int *amajor, FT_Int *aminor, FT_Int *apatch)
Definition: ftobjs.c:5322
#define FREETYPE_PATCH
Definition: freetype.h:4770
#define FREETYPE_MAJOR
Definition: freetype.h:4768
#define FREETYPE_MINOR
Definition: freetype.h:4769
FT_Init_FreeType(FT_Library *alibrary)
Definition: ftinit.c:199
cannot open resource broken file module version is too low unimplemented feature broken offset within table missing module invalid glyph index unsupported glyph image format invalid outline too many hints invalid object handle invalid module handle invalid size handle invalid charmap handle invalid stream handle too many extensions unlisted object invalid stream seek invalid stream read invalid frame operation invalid frame read raster corrupted negative height while rastering invalid opcode stack overflow bad argument invalid reference found ENDF opcode in execution stream invalid code range too many function definitions SFNT font table missing locations(loca) table missing" ) FT_ERRORDEF_( Name_Table_Missing
signed int FT_Int
Definition: fttypes.h:220
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript xE2 x82 x92 xE2 x82 x80 xEA x93 xB3 xF0 x96 xB9 xA1 xF0 x96 xB9 x9B xF0 x96 xB9 xAF xE1 x80 x9D xE1 x80 x84 xE1 x80 x82 no script
Definition: afscript.h:271
FT_BBox bbox
Definition: ftbbox.c:467
#define SEEK_END
Definition: ftzconf.h:251
unsigned char Byte
Definition: ftzconf.h:219
#define ZLIB_VERSION
Definition: zlib.h:40
void exit()
#define EOF
Definition: afmparse.c:59
kerning y
Definition: ttdriver.c:212
#define M_PI
Definition: gd.h:236
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
#define PNG_LIBPNG_VER_STRING
Definition: png.h:281
#define zlib_version
Definition: zlib.h:214
int errno
#define xstrdup(s)
Definition: writet1.c:34
#define xmalloc(size)
Definition: writet1.c:33
#define buf
char * concat3(const char *s1, const char *s2, const char *s3)
Definition: utils.c:178
#define strcasecmp
Definition: c-auto.h:150
char * strstr()
string concatn(const_string str1,...)
Definition: concatn.c:28
#define fclose
Definition: debug.h:100
wchar_t * get_wstring_from_mbstring(int cp, const char *mbstr, wchar_t *wstr)
Definition: knj.c:38
string engine
Definition: kpsewhich.c:51
KPSEDLL address xcalloc(size_t nelem, size_t elsize)
Definition: xcalloc.c:23
#define popen(cmd, mode)
Definition: mingw32.h:91
const char * const_string
Definition: simpletypes.h:59
@ kpse_truetype_format
Definition: types.h:139
@ kpse_miscfonts_format
Definition: types.h:144
@ kpse_type1_format
Definition: types.h:135
@ kpse_opentype_format
Definition: types.h:150
#define fileno
Definition: win32lib.h:72
#define pclose(file)
Definition: win32lib.h:271
static int ret
Definition: convert.c:72
#define fputs
Definition: mendex.h:67
#define fprintf
Definition: mendex.h:64
#define printcstring(STR)
Definition: cpascal.h:232
#define length(c)
Definition: ctangleboot.c:65
#define identifier
Definition: ctangleboot.c:122
boolean open_input(FILE **, int, const_string fopen_mode)
Definition: openclose.c:197
string output_directory
Definition: openclose.c:81
unsigned namelength
Definition: texfileio.c:69
string nameoffile
Definition: texfileio.c:68
strnumber maketexstring(const char *)
Definition: stringpool.c:249
int strncmp()
#define sprintf
Definition: snprintf.c:44
cell * list
Definition: list_routines.h:30
#define cmd(arg)
Definition: mitsu.h:44
unsigned int DWORD
Definition: mktexlib.h:49
char png_libpng_ver[]
Definition: mplibstuff.c:112
@ err
Definition: mtxline.h:24
float x
Definition: cordic.py:15
bindir
Definition: mftrace.py:47
union value value
Definition: obx.h:44
static const Mapping features[]
Definition: otfdescrip.cc:537
static double extend
Definition: otftotfm.cc:277
int letterspace
Definition: otftotfm.cc:279
#define Isspace(c)
Definition: p2clib.c:20
int integer
Definition: pbmtopk.c:38
char * filename[256]
Definition: pbmtopk.c:46
int Boolean
Definition: pgmcrater.c:64
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF rsb
#define index(s, c)
Definition: plain2.h:351
#define uexit
Definition: pmakempx.c:110
static enum alpha_handling alpha
Definition: pngtopnm.c:70
static int32_t last
Definition: ppagelist.c:29
static int32_t first
Definition: ppagelist.c:29
static int size
Definition: ppmlabel.c:24
int g
Definition: ppmqvga.c:68
int r
Definition: ppmqvga.c:68
#define GR2_VERSION_BUGFIX
Definition: Font.h:33
#define GR2_VERSION_MINOR
Definition: Font.h:32
GR2_API void gr_engine_version(int *nMajor, int *nMinor, int *nBugFix)
Definition: gr_font.cpp:35
#define GR2_VERSION_MAJOR
Definition: Font.h:31
GR2_API void gr_label_destroy(void *label)
#define dir
#define status
#define flags
hb_tag_t hb_tag_from_string(const char *str, int len)
Definition: hb-common.cc:102
const char * hb_version_string()
Definition: hb-common.cc:664
struct hb_feature_t hb_feature_t
uint32_t hb_tag_t
Definition: hb-common.h:147
#define HB_TAG_NONE
Definition: hb-common.h:165
#define HB_VERSION_STRING
Definition: hb-version.h:43
static char sep[2]
Definition: pdftoppm.cc:115
#define pplib_version
Definition: ppapi.h:11
#define isalpha(ch)
Definition: utype.h:82
RETTYPE mp_ptr mp_size_t mp_srcptr dp
Definition: sec_div.c:70
#define str(s)
Definition: sh6.c:399
ShellFileEnvironment e
Definition: sh6.c:388
UInt16 UniChar
Definition: TECkit_Common.h:39
long TECkit_Status
Definition: TECkit_Common.h:49
#define kForm_Bytes
Definition: TECkit_Common.h:87
unsigned char UInt8
Definition: TECkit_Common.h:32
#define kStatus_OutputBufferFull
Definition: TECkit_Common.h:59
#define kStatus_NoError
Definition: TECkit_Common.h:54
struct Opaque_TECkit_Converter * TECkit_Converter
Definition: TECkit_Engine.h:73
#define kForm_NFD
Definition: TECkit_Engine.h:63
#define kForm_NFC
Definition: TECkit_Engine.h:62
static FILE * in
Definition: squeeze.c:36
float x
Definition: XeTeX_ext.h:67
float y
Definition: XeTeX_ext.h:68
Definition: ufile.h:64
Definition: nsfix.c:44
Definition: utils.c:300
Definition: pdfdev.c:706
Definition: pbmfont.h:11
Definition: mendex.h:20
Definition: tpic.c:45
Definition: dvips.h:235
Definition: xmlparse.c:179
Definition: strexpr.c:21
Definition: sh.h:1782
#define FILE
Definition: t1stdio.h:34
ch
Definition: t4ht.c:1443
*job_name strlen((char *) job_name) - 4)
glyphCount
Definition: tex4ht.c:3600
char fmt[256]
Definition: tex4ht.c:3925
val
Definition: tex4ht.c:3227
found
Definition: tex4ht.c:5000
tag int tag
Definition: tex4ht.c:2554
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
void open_output(void)
Definition: output.c:1344
#define RIGHT_SIDE
Definition: preamble.h:19
#define LEFT_SIDE
Definition: preamble.h:21
int mapping
Definition: ttf2pfb.c:116
C API: Bidi algorithm.
UBiDiDirection
Definition: ubidi.h:428
@ UBIDI_MIXED
Definition: ubidi.h:459
@ UBIDI_RTL
Definition: ubidi.h:452
@ L
Definition: ubidiimp.h:45
C API: BreakIterator.
@ UBRK_LINE
Definition: ubrk.h:108
struct UBreakIterator UBreakIterator
Definition: ubrk.h:31
C API: Character conversion.
Definition: obx.h:51
#define ubrk_next
Definition: urename.h:497
#define ubidi_setPara
Definition: urename.h:476
#define ubidi_close
Definition: urename.h:427
#define u_versionToString
Definition: urename.h:410
#define ucnv_close
Definition: urename.h:625
#define ucnv_toAlgorithmic
Definition: urename.h:705
#define ubrk_open
Definition: urename.h:498
#define ucnv_open
Definition: urename.h:687
#define ubidi_getDirection
Definition: urename.h:434
#define u_getVersion
Definition: urename.h:283
#define ubidi_getVisualRun
Definition: urename.h:460
#define ubidi_open
Definition: urename.h:467
#define ubidi_countRuns
Definition: urename.h:429
#define ubrk_setText
Definition: urename.h:505
#define ubrk_close
Definition: urename.h:485
static const char * locale
Definition: uresb.c:52
@ start
Definition: preamble.c:52
UErrorCode
Definition: utypes.h:431
@ U_ZERO_ERROR
Definition: utypes.h:465
#define U_FAILURE(x)
Definition: utypes.h:735
#define U_ICU_VERSION
Definition: uvernum.h:142
uint8_t UVersionInfo[4]
Definition: uversion.h:59
#define U_MAX_VERSION_STRING_LENGTH
Definition: uversion.h:53
#define AUTO
Definition: variant.hpp:890
long long scaled
Definition: vf_ng.c:93
#define ICUMAPPING
Definition: xetex.h:114
#define UTF16BE
Definition: xetex.h:111
#define RAW
Definition: xetex.h:113
#define native_node_size
Definition: xetex.h:35
#define UTF16LE
Definition: xetex.h:112
#define UTF8
Definition: xetex.h:110
#define errorCode
Definition: xmlparse.c:601
#define end(cp)
Definition: zic.c:71