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)  

macbinary.c
Go to the documentation of this file.
1 /* Copyright (C) 2000-2008 by George Williams */
2 /*
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are met:
5 
6  * Redistributions of source code must retain the above copyright notice, this
7  * list of conditions and the following disclaimer.
8 
9  * Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12 
13  * The name of the author may not be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15 
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 #include "fontforgevw.h"
28 #include <stdlib.h>
29 #include <string.h>
30 #include <unistd.h>
31 #include <math.h>
32 #include <sys/types.h>
33 #include <sys/stat.h>
34 #include <time.h>
35 #include <ustring.h>
36 #include "ttf.h"
37 #include "psfont.h"
38 #ifdef LUA_FF_LIB
39 # undef __Mac
40 #endif
41 #if __Mac
42 # include <ctype.h>
43 # include </Developer/Headers/FlatCarbon/Files.h>
44 #else
45 # include <utype.h>
46 # undef __Mac
47 # define __Mac 0
48 #endif
49 
50 const int mac_dpi = 72;
51 /* I had always assumed that the mac still believed in 72dpi screens, but I */
52 /* see that in geneva under OS/9, the pointsize does not match the pixel */
53 /* size of the font. But the dpi is not constant (and the differences */
54 /* excede those supplied by rounding errors) varying between 96 and 84dpi */
55 
56 /* A Mac Resource fork */
57 /* http://developer.apple.com/techpubs/mac/MoreToolbox/MoreToolbox-9.html */
58 /* begins with a 16 byte header containing: */
59 /* resource start offset */
60 /* map start offset */
61 /* resource length */
62 /* map length */
63 /* then 256-16 bytes of zeros */
64 /* the resource section consists of (many) */
65 /* 4 byte length count */
66 /* resource data */
67 /* the map section contains */
68 /* A copy of the 16 byte header */
69 /* a 4 byte mac internal value (I hope) */
70 /* another 4 bytes of mac internal values (I hope) */
71 /* a 2 byte offset from the start of the map section to the list of resource types */
72 /* a 2 byte offset from the start of the map section to the list of resource names */
73 /* The resource type list consists of */
74 /* a 2 byte count of the number of resource types (-1) */
75 /* (many copies of) */
76 /* a 4 byte resource type ('FOND' for example) */
77 /* a 2 byte count of the number of resources of this type (-1) */
78 /* a 2 byte offset from the type list start to the resource table */
79 /* a resource table looks like */
80 /* a 2 byte offset from the resource name table to a pascal */
81 /* string containing this resource's name (or 0xffff for none) */
82 /* 1 byte of resource flags */
83 /* 3 bytes of offset from the resource section to the length & */
84 /* data of this instance of the resource type */
85 /* 4 bytes of 0 */
86 /* The resource name section consists of */
87 /* a bunch of pascal strings (ie. preceded by a length byte) */
88 
89 /* The POST resource isn't noticeably documented, it's pretty much a */
90 /* straight copy of the pfb file cut up into 0x800 byte chunks. */
91 /* (each section of the pfb file has it's own set of chunks, the last may be smaller than 0x800) */
92 /* The NFNT resource http://developer.apple.com/techpubs/mac/Text/Text-250.html */
93 /* The FOND resource http://developer.apple.com/techpubs/mac/Text/Text-269.html */
94 /* The sfnt resource is basically a copy of the ttf file */
95 
96 /* A MacBinary file */
97 /* http://www.lazerware.com/formats/macbinary.html */
98 /* begins with a 128 byte header */
99 /* (which specifies lengths for data/resource forks) */
100 /* (and contains mac type/creator data) */
101 /* (and other stuff) */
102 /* (and finally a crc checksum) */
103 /* is followed by the data section (padded to a mult of 128 bytes) */
104 /* is followed by the resource section (padded to a mult of 128 bytes) */
105 
106 /* ******************************** Creation ******************************** */
107 
108 
109 struct resource {
110  uint32 pos;
111  uint8 flags;
112  uint16 id;
113  char *name;
114  uint32 nameloc;
116 };
117 
118 struct resourcetype {
120  struct resource *res;
122 };
123 
125  char *macfilename;
126  char *binfilename; /* if macfilename is null and this is set we will figure out macfilename by removing .bin */
129 };
130 
131 
133  psf_shadow = 0x8, psf_condense = 0x10, psf_extend = 0x20
134 };
135 
136 uint16 _MacStyleCode(char *styles, SplineFont * sf, uint16 * psstylecode)
137 {
138  unsigned short stylecode = 0, psstyle = 0;
139 
140  if (strstrmatch(styles, "Bold") || strstrmatch(styles, "Demi") ||
141  strstrmatch(styles, "Heav") || strstrmatch(styles, "Blac") ||
142 /* A few fonts have German/French styles in their names */
143  strstrmatch(styles, "Fett") || strstrmatch(styles, "Gras")) {
144  stylecode = sf_bold;
145  psstyle = psf_bold;
146  } else if (sf != NULL && sf->weight != NULL &&
147  (strstrmatch(sf->weight, "Bold")
148  || strstrmatch(sf->weight, "Demi")
149  || strstrmatch(sf->weight, "Heav")
150  || strstrmatch(sf->weight, "Blac")
151  || strstrmatch(sf->weight, "Fett")
152  || strstrmatch(sf->weight, "Gras"))) {
153  stylecode = sf_bold;
154  psstyle = psf_bold;
155  }
156  /* URW uses four leter abbreviations of Italic and Oblique */
157  /* Somebody else uses two letter abbrevs */
158  if ((sf != NULL && sf->italicangle != 0) ||
159  strstrmatch(styles, "Ital") ||
160  strstrmatch(styles, "Obli") ||
161  strstrmatch(styles, "Slanted") ||
162  strstrmatch(styles, "Kurs") || strstr(styles, "It")) {
163  stylecode |= sf_italic;
164  psstyle |= psf_italic;
165  }
166  if (strstrmatch(styles, "Underline")) {
167  stylecode |= sf_underline;
168  }
169  if (strstrmatch(styles, "Outl")) {
170  stylecode |= sf_outline;
171  psstyle |= psf_outline;
172  }
173  if (strstr(styles, "Shadow") != NULL) {
174  stylecode |= sf_shadow;
175  psstyle |= psf_shadow;
176  }
177  if (strstrmatch(styles, "Cond") || strstr(styles, "Cn") ||
178  strstrmatch(styles, "Narrow")) {
179  stylecode |= sf_condense;
180  psstyle |= psf_condense;
181  }
182  if (strstrmatch(styles, "Exte") || strstr(styles, "Ex")) {
183  stylecode |= sf_extend;
184  psstyle |= psf_extend;
185  }
186  if ((psstyle & psf_extend) && (psstyle & psf_condense)) {
187  if (sf != NULL)
188  LogError(_
189  ("Warning: %s(%s) is both extended and condensed. That's impossible.\n"),
190  sf->fontname, sf->origname);
191  else
192  LogError(_
193  ("Warning: Both extended and condensed. That's impossible.\n"));
194  psstyle &= ~~psf_extend;
195  stylecode &= ~~sf_extend;
196  }
197  if (psstylecode != NULL)
198  *psstylecode = psstyle;
199  return (stylecode);
200 }
201 
202 
203 
204 /* ******************************** Reading ********************************* */
205 
206 static SplineFont *SearchPostscriptResources(FILE * f, long rlistpos,
207  int subcnt, long rdata_pos,
208  long name_list, int flags)
209 {
210  long here = ftell(f);
211  long *offsets, lenpos;
212  int rname = -1, tmp;
213  int ch1, ch2;
214  int len, type, i, j, rlen;
215  unsigned short id, *rsrcids;
216  /* I don't pretend to understand the rational behind the format of a */
217  /* postscript font. It appears to be split up into chunks where the */
218  /* maximum chunk size is 0x800, each section (ascii, binary, ascii, eof) */
219  /* has its own set of chunks (ie chunks don't cross sections) */
220  char *buffer = NULL;
221  int max = 0;
222  FILE *pfb;
223  FontDict *fd;
224  SplineFont *sf;
225  (void) name_list;
226  fseek(f, rlistpos, SEEK_SET);
227  rsrcids = gcalloc(subcnt, sizeof(short));
228  offsets = gcalloc(subcnt, sizeof(long));
229  for (i = 0; i < subcnt; ++i) {
230  rsrcids[i] = getushort(f);
231  tmp = (short) getushort(f);
232  if (rname == -1)
233  rname = tmp;
234  /* flags = */ getc(f);
235  ch1 = getc(f);
236  ch2 = getc(f);
237  offsets[i] = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
238  /* mbz = */ getlong(f);
239  }
240 
241  pfb = tmpfile();
242  if (pfb == NULL) {
243  LogError(_("Can't open temporary file for postscript output\n"));
244  fseek(f, here, SEEK_SET);
245  free(offsets);
246  return (NULL);
247  }
248 
249  putc(0x80, pfb);
250  putc(1, pfb);
251  lenpos = ftell(pfb);
252  putc(0, pfb);
253  putc(0, pfb);
254  putc(0, pfb);
255  putc(0, pfb);
256  len = 0;
257  type = 1;
258  id = 501;
259  for (i = 0; i < subcnt; ++i) {
260  for (j = 0; j < subcnt; ++j)
261  if (rsrcids[j] == id)
262  break;
263  if (j == subcnt) {
264  LogError(_("Missing POST resource %u\n"), id);
265  break;
266  }
267  id = id + 1;
268  fseek(f, offsets[j], SEEK_SET);
269  rlen = getlong(f);
270  ch1 = getc(f);
271  ch2 = getc(f);
272  rlen -= 2; /* those two bytes don't count as real data */
273  if (ch1 == type)
274  len += rlen;
275  else {
276  long hold = ftell(pfb);
277  fseek(pfb, lenpos, SEEK_SET);
278  putc(len >> 24, pfb);
279  putc((len >> 16) & 0xff, pfb);
280  putc((len >> 8) & 0xff, pfb);
281  putc(len & 0xff, pfb);
282  fseek(pfb, hold, SEEK_SET);
283  if (ch1 == 5) /* end of font mark */
284  break;
285  putc(0x80, pfb);
286  putc(ch1, pfb);
287  lenpos = ftell(pfb);
288  putc(0, pfb);
289  putc(0, pfb);
290  putc(0, pfb);
291  putc(0, pfb);
292  type = ch1;
293  len = rlen;
294  }
295  if (rlen > max) {
296  free(buffer);
297  max = rlen;
298  if (max < 0x800)
299  max = 0x800;
300  buffer = galloc(max);
301  if (buffer == NULL) {
302  LogError(_("Out of memory\n"));
303  exit(1);
304  }
305  }
306  if(fread(buffer, 1, rlen, f) != ((size_t)rlen) ) {
307  LogError(_("Unable to read %u bytes for buffer\n"),rlen);
308  exit(1);
309  }
310  fwrite(buffer, 1, rlen, pfb);
311  }
312  free(buffer);
313  free(offsets);
314  free(rsrcids);
315  putc(0x80, pfb);
316  putc(3, pfb);
317  fseek(pfb, lenpos, SEEK_SET);
318  putc(len >> 24, pfb);
319  putc((len >> 16) & 0xff, pfb);
320  putc((len >> 8) & 0xff, pfb);
321  putc(len & 0xff, pfb);
322  fseek(f, here, SEEK_SET);
323  rewind(pfb);
324  if (flags & ttf_onlynames)
325  return ((SplineFont *) _NamesReadPostscript(pfb)); /* This closes the font for us */
326 
327  fd = _ReadPSFont(pfb);
328  sf = NULL;
329  if (fd != NULL) {
330  sf = SplineFontFromPSFont(fd);
331  PSFontFree(fd);
332  /* There is no FOND in a postscript file, so we can't read any kerning */
333  }
334  fclose(pfb);
335  return (sf);
336 }
337 
338 static SplineFont *SearchTtfResources(FILE * f, long rlistpos, int subcnt,
339  long rdata_pos, long name_list,
340  char *filename, int flags,
341  enum openflags openflags)
342 {
343  long here, start = ftell(f);
344  long roff;
345  int rname = -1;
346  int ch1, ch2;
347  int len, i, rlen, ilen;
348  /* The sfnt resource is just a copy of the ttf file */
349  char *buffer = NULL;
350  int max = 0;
351  FILE *ttf;
352  SplineFont *sf;
353  int which = 0;
354  char **names;
355  char *pt, *lparen, *rparen;
356  char *chosenname = NULL;
357  (void) name_list;
358  fseek(f, rlistpos, SEEK_SET);
359  if (subcnt > 1 || (flags & ttf_onlynames)) {
360  names = gcalloc(subcnt + 1, sizeof(char *));
361  for (i = 0; i < subcnt; ++i) {
362  /* resource id = */ getushort(f);
363  /* rname = (short) */ getushort(f);
364  /* flags = */ getc(f);
365  ch1 = getc(f);
366  ch2 = getc(f);
367  roff = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
368  /* mbz = */ getlong(f);
369  here = ftell(f);
370  names[i] = TTFGetFontName(f, roff + 4, roff + 4);
371  if (names[i] == NULL) {
372  char buffer[32];
373  sprintf(buffer, "Nameless%d", i);
374  names[i] = copy(buffer);
375  }
376  fseek(f, here, SEEK_SET);
377  }
378  if (flags & ttf_onlynames) {
379  return ((SplineFont *) names);
380  }
381  if ((pt = strrchr(filename, '/')) == NULL)
382  pt = filename;
383  /* Someone gave me a font "Nafees Nastaleeq(Updated).ttf" and complained */
384  /* that ff wouldn't open it */
385  /* Now someone will complain about "Nafees(Updated).ttc(fo(ob)ar)" */
386  if ((lparen = strrchr(pt, '(')) != NULL &&
387  (rparen = strrchr(lparen, ')')) != NULL && rparen[1] == '\0') {
388  char *find = copy(lparen + 1);
389  pt = strchr(find, ')');
390  if (pt != NULL)
391  *pt = '\0';
392  for (which = subcnt - 1; which >= 0; --which)
393  if (strcmp(names[which], find) == 0)
394  break;
395  if (which == -1) {
396  char *end;
397  which = strtol(find, &end, 10);
398  if (*end != '\0')
399  which = -1;
400  }
401  if (which == -1) {
402  char *fn = copy(filename);
403  fn[lparen - filename] = '\0';
404  ff_post_error(_("Not in Collection"), _("%s is not in %.100s"),
405  find, fn);
406  free(fn);
407  }
408  free(find);
409  } else
410  which = 0;
411  if (lparen == NULL && which != -1)
412  chosenname = copy(names[which]);
413  for (i = 0; i < subcnt; ++i)
414  free(names[i]);
415  free(names);
416  fseek(f, rlistpos, SEEK_SET);
417  }
418 
419  for (i = 0; i < subcnt; ++i) {
420  /* resource id = */ getushort(f);
421  rname = (short) getushort(f);
422  /* flags = */ getc(f);
423  ch1 = getc(f);
424  ch2 = getc(f);
425  roff = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
426  /* mbz = */ getlong(f);
427  if (i != which)
428  continue;
429  here = ftell(f);
430 
431  ttf = tmpfile();
432  if (ttf == NULL) {
433  LogError(_("Can't open temporary file for truetype output.\n"));
434  continue;
435  }
436 
437  fseek(f, roff, SEEK_SET);
438  ilen = rlen = getlong(f);
439  if (rlen > 16 * 1024)
440  ilen = 16 * 1024;
441  if (ilen > max) {
442  free(buffer);
443  max = ilen;
444  if (max < 0x800)
445  max = 0x800;
446  buffer = malloc(max);
447  }
448  for (len = 0; len < rlen;) {
449  int temp = ilen;
450  if (rlen - len < ilen)
451  temp = rlen - len;
452  temp = fread(buffer, 1, temp, f);
453  if (temp == EOF)
454  break;
455  fwrite(buffer, 1, temp, ttf);
456  len += temp;
457  }
458  rewind(ttf);
459  sf = _SFReadTTF(ttf, flags, openflags, NULL, NULL);
460  fclose(ttf);
461  if (sf != NULL) {
462  free(buffer);
463  fseek(f, start, SEEK_SET);
464  if (sf->chosenname == NULL)
465  sf->chosenname = chosenname;
466  return (sf);
467  }
468  fseek(f, here, SEEK_SET);
469  }
470  free(chosenname);
471  free(buffer);
472  fseek(f, start, SEEK_SET);
473  return (NULL);
474 }
475 
476 typedef struct fond {
477  char *fondname;
478  int first, last;
480  struct assoc {
481  short size, style, id;
482  } *assoc;
483  /* size==0 => scalable */
484  /* style>>8 is the bit depth (0=>1, 1=>2, 2=>4, 3=>8) */
485  /* search order for ID is sfnt, NFNT, FONT */
487  struct stylewidths {
488  short style;
489  short *widthtab; /* 4.12 fixed number with the width specified as a fraction of an em */
492  struct stylekerns {
493  short style;
495  struct kerns {
496  unsigned char ch1, ch2;
497  short offset; /* 4.12 */
498  } *kerns;
500  char *psnames[48];
501  struct fond *next;
503 
504 struct MacFontRec {
505  short fontType;
506  short firstChar;
507  short lastChar;
508  short widthMax;
509  short kernMax; /* bb learing */
510  short Descent; /* maximum negative distance below baseline */
511  short fRectWidth; /* bounding box width */
512  short fRectHeight; /* bounding box height */
513  unsigned short *offsetWidths; /* offset to start of offset/width table */
514  /* 0xffff => undefined, else high byte is offset in locTable, */
515  /* low byte is width */
516  short ascent;
517  short descent;
518  short leading;
519  short rowWords; /* shorts per row */
520  unsigned short *fontImage; /* rowWords*fRectHeight */
521  /* Images for all characters plus one extra for undefined */
522  unsigned short *locs; /* lastchar-firstchar+3 words */
523  /* Horizontal offset to start of n'th character. Note: applies */
524  /* to each row. Missing characters have same loc as following */
525 };
526 
527 static void FondListFree(FOND * list)
528 {
529  FOND *next;
530  int i;
531 
532  while (list != NULL) {
533  next = list->next;
534  free(list->assoc);
535  for (i = 0; i < list->stylewidthcnt; ++i)
536  free(list->stylewidths[i].widthtab);
537  free(list->stylewidths);
538  for (i = 0; i < list->stylekerncnt; ++i)
539  free(list->stylekerns[i].kerns);
540  free(list->stylekerns);
541  for (i = 0; i < 48; ++i)
542  free(list->psnames[i]);
543  free(list);
544  list = next;
545  }
546 }
547 
548 /* There's probably only one fond in the file, but there could be more so be */
549 /* prepared... */
550 /* I want the fond: */
551 /* to get the fractional widths for the SWIDTH entry on bdf */
552 /* to get the font name */
553 /* to get the font association tables */
554 /* to get the style flags */
555 /* http://developer.apple.com/techpubs/mac/Text/Text-269.html */
556 static FOND *BuildFondList(FILE * f, long rlistpos, int subcnt, long rdata_pos,
557  long name_list, int flags)
558 {
559  long here, start = ftell(f);
560  long offset;
561  int rname = -1;
562  char name[300];
563  int ch1, ch2;
564  int i, j, k, cnt, isfixed;
565  FOND *head = NULL, *cur;
566  long widoff, kernoff, styleoff;
567 
568  fseek(f, rlistpos, SEEK_SET);
569  for (i = 0; i < subcnt; ++i) {
570  /* resource id = */ getushort(f);
571  rname = (short) getushort(f);
572  /* flags = */ getc(f);
573  ch1 = getc(f);
574  ch2 = getc(f);
575  offset = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
576  /* mbz = */ getlong(f);
577  here = ftell(f);
578 
579  cur = gcalloc(1, sizeof(FOND));
580  cur->next = head;
581  head = cur;
582 
583  if (rname != -1) {
584  fseek(f, name_list + rname, SEEK_SET);
585  ch1 = getc(f);
586  if( fread(name, 1, ch1, f) != ((size_t)ch1)) {
587  LogError(_("Unable to read %u bytes for name, but going on.\n"),ch1);
588  }
589  name[ch1] = '\0';
590  cur->fondname = copy(name);
591  }
592 
593  offset += 4;
594  fseek(f, offset, SEEK_SET);
595  isfixed = getushort(f) & 0x8000 ? 1 : 0;
596  /* family id = */ getushort(f);
597  cur->first = getushort(f);
598  cur->last = getushort(f);
599 /* on a 1 point font... */
600  /* ascent = */ getushort(f);
601  /* descent = (short) */ getushort(f);
602  /* leading = */ getushort(f);
603  /* widmax = */ getushort(f);
604  if ((widoff = getlong(f)) != 0)
605  widoff += offset;
606  if ((kernoff = getlong(f)) != 0)
607  kernoff += offset;
608  if ((styleoff = getlong(f)) != 0)
609  styleoff += offset;
610  for (j = 0; j < 9; ++j)
611  getushort(f);
612  /* internal & undefined, for international scripts = */ getlong(f);
613  /* version = */ getushort(f);
614  cur->assoc_cnt = getushort(f) + 1;
615  cur->assoc = gcalloc(cur->assoc_cnt, sizeof(struct assoc));
616  for (j = 0; j < cur->assoc_cnt; ++j) {
617  cur->assoc[j].size = getushort(f);
618  cur->assoc[j].style = getushort(f);
619  cur->assoc[j].id = getushort(f);
620  }
621  if (widoff != 0) {
622  fseek(f, widoff, SEEK_SET);
623  cnt = getushort(f) + 1;
624  cur->stylewidthcnt = cnt;
625  cur->stylewidths = gcalloc(cnt, sizeof(struct stylewidths));
626  for (j = 0; j < cnt; ++j) {
627  cur->stylewidths[j].style = getushort(f);
628  cur->stylewidths[j].widthtab =
629  galloc((cur->last - cur->first + 3) * sizeof(short));
630  for (k = cur->first; k <= cur->last + 2; ++k)
631  cur->stylewidths[j].widthtab[k] = getushort(f);
632  }
633  }
634  if (kernoff != 0 && (flags & ttf_onlykerns)) {
635  fseek(f, kernoff, SEEK_SET);
636  cnt = getushort(f) + 1;
637  cur->stylekerncnt = cnt;
638  cur->stylekerns = gcalloc(cnt, sizeof(struct stylekerns));
639  for (j = 0; j < cnt; ++j) {
640  cur->stylekerns[j].style = getushort(f);
641  cur->stylekerns[j].kernpairs = getushort(f);
642  cur->stylekerns[j].kerns =
643  galloc(cur->stylekerns[j].kernpairs * sizeof(struct kerns));
644  for (k = 0; k < cur->stylekerns[j].kernpairs; ++k) {
645  cur->stylekerns[j].kerns[k].ch1 = getc(f);
646  cur->stylekerns[j].kerns[k].ch2 = getc(f);
647  cur->stylekerns[j].kerns[k].offset = getushort(f);
648  }
649  }
650  }
651  if (styleoff != 0) {
652  uint8 stringoffsets[48];
653  int strcnt, stringlen, format;
654  char **strings, *pt;
655  fseek(f, styleoff, SEEK_SET);
656  /* class = */ getushort(f);
657  /* glyph encoding offset = */ getlong(f);
658  /* reserved = */ getlong(f);
659  for (j = 0; j < 48; ++j)
660  stringoffsets[j] = getc(f);
661  strcnt = getushort(f);
662  strings = galloc(strcnt * sizeof(char *));
663  for (j = 0; j < strcnt; ++j) {
664  stringlen = getc(f);
665  strings[j] = galloc(stringlen + 2);
666  strings[j][0] = stringlen;
667  strings[j][stringlen + 1] = '\0';
668  for (k = 0; k < stringlen; ++k)
669  strings[j][k + 1] = getc(f);
670  }
671  for (j = 0; j < 48; ++j) {
672  for (k = j - 1; k >= 0; --k)
673  if (stringoffsets[j] == stringoffsets[k])
674  break;
675  if (k != -1)
676  continue; /* this style doesn't exist */
677  format = stringoffsets[j] - 1;
678  stringlen = strings[0][0];
679  if (format != 0)
680  for (k = 0; k < strings[format][0]; ++k)
681  stringlen += strings[strings[format][k + 1] - 1][0];
682  pt = cur->psnames[j] = galloc(stringlen + 1);
683  strcpy(pt, strings[0] + 1);
684  pt += strings[0][0];
685  if (format != 0)
686  for (k = 0; k < strings[format][0]; ++k) {
687  strcpy(pt, strings[strings[format][k + 1] - 1] + 1);
688  pt += strings[strings[format][k + 1] - 1][0];
689  }
690  *pt = '\0';
691  }
692  for (j = 0; j < strcnt; ++j)
693  free(strings[j]);
694  free(strings);
695  }
696  fseek(f, here, SEEK_SET);
697  }
698  fseek(f, start, SEEK_SET);
699  return (head);
700 }
701 
702 static char *BuildName(char *family, int style)
703 {
704  char buffer[350] = "";
705 
706  strncpy(buffer, family, 200);
707  if (style != 0)
708  strcat(buffer, "-");
709  if (style & sf_bold)
710  strcat(buffer, "Bold");
711  if (style & sf_italic)
712  strcat(buffer, "Italic");
713  if (style & sf_underline)
714  strcat(buffer, "Underline");
715  if (style & sf_outline)
716  strcat(buffer, "Outline");
717  if (style & sf_shadow)
718  strcat(buffer, "Shadow");
719  if (style & sf_condense)
720  strcat(buffer, "Condensed");
721  if (style & sf_extend)
722  strcat(buffer, "Extended");
723  return (copy(buffer));
724 }
725 
726 static int GuessStyle(char *fontname, int *styles, int style_cnt)
727 {
728  int which, style;
729  char *stylenames = _GetModifiers(fontname, NULL, NULL);
730 
731  style = _MacStyleCode(stylenames, NULL, NULL);
732  for (which = style_cnt; which >= 0; --which)
733  if (styles[which] == style)
734  return (which);
735 
736  return (-1);
737 }
738 
739 static FOND *PickFOND(FOND * fondlist, char *filename, char **name, int *style)
740 {
741  int i, j;
742  FOND *test;
743  uint8 stylesused[96];
744  char **names;
745  FOND **fonds = NULL, *fond = NULL;
746  int *styles = NULL;
747  int cnt, which;
748  char *pt, *lparen;
749  char *find = NULL;
750 
751  if ((pt = strrchr(filename, '/')) != NULL)
752  pt = filename;
753  if ((lparen = strchr(filename, '(')) != NULL && strchr(lparen, ')') != NULL) {
754  find = copy(lparen + 1);
755  pt = strchr(find, ')');
756  if (pt != NULL)
757  *pt = '\0';
758  for (test = fondlist; test != NULL; test = test->next) {
759  for (i = 0; i < 48; ++i)
760  if (test->psnames[i] != NULL
761  && strcmp(find, test->psnames[i]) == 0) {
762  *style = (i & 3) | ((i & ~3) << 1); /* PS styles skip underline bit */
763  *name = copy(test->psnames[i]);
764  return (test);
765  }
766  }
767  }
768 
769  /* The file may contain multiple families, and each family may contain */
770  /* multiple styles (and each style may contain multiple sizes, but that's */
771  /* not an issue for us here) */
772  names = NULL;
773  for (i = 0; i < 2; ++i) {
774  cnt = 0;
775  for (test = fondlist; test != NULL; test = test->next)
776  if (test->fondname != NULL) {
777  memset(stylesused, 0, sizeof(stylesused));
778  for (j = 0; j < test->assoc_cnt; ++j) {
779  if (test->assoc[j].size != 0
780  && !stylesused[test->assoc[j].style]) {
781  stylesused[test->assoc[j].style] = true;
782  if (names != NULL) {
783  names[cnt] =
784  BuildName(test->fondname, test->assoc[j].style);
785  styles[cnt] = test->assoc[j].style;
786  fonds[cnt] = test;
787  }
788  ++cnt;
789  }
790  }
791  }
792  if (names == NULL) {
793  names = gcalloc(cnt + 1, sizeof(char *));
794  fonds = galloc(cnt * sizeof(FOND *));
795  styles = galloc(cnt * sizeof(int));
796  }
797  }
798 
799  if (find != NULL) {
800  for (which = cnt - 1; which >= 0; --which)
801  if (strcmp(names[which], find) == 0)
802  break;
803  if (which == -1 && strstrmatch(find, test->fondname) != NULL)
804  which = GuessStyle(find, styles, cnt);
805  if (which == -1) {
806  char *fn = copy(filename);
807  fn[lparen - filename] = '\0';
808  ff_post_error(_("Not in Collection"), _("%s is not in %.100s"),
809  find, fn);
810  free(fn);
811  }
812  free(find);
813  } else
814  which = 0;
815 
816  if (which != -1) {
817  fond = fonds[which];
818  *name = copy(names[which]);
819  *style = styles[which];
820  }
821  for (i = 0; i < cnt; ++i)
822  free(names[i]);
823  free(names);
824  free(fonds);
825  free(styles);
826  if (which == -1)
827  return (NULL);
828 
829  return (fond);
830 }
831 
832 
833 /* Look for kerning info and merge it into the currently existing font "into" */
835  FOND * fondlist, char *filename)
836 {
837  char *name;
838  int style;
839  FOND *fond;
840  int i, j;
841  int ch1, ch2, offset;
842  KernPair *kp;
843  SplineChar *sc1, *sc2;
844 
845  fond = PickFOND(fondlist, filename, &name, &style);
846  if (fond == NULL || into == NULL)
847  return (NULL);
848  for (i = 0; i < fond->stylekerncnt; ++i)
849  if (fond->stylekerns[i].style == style)
850  break;
851  if (i == fond->stylekerncnt) {
852  LogError(_("No kerning table for %s\n"), name);
853  free(name);
854  return (NULL);
855  }
856  for (j = 0; j < fond->stylekerns[i].kernpairs; ++j) {
857  ch1 = fond->stylekerns[i].kerns[j].ch1;
858  ch2 = fond->stylekerns[i].kerns[j].ch2;
859  offset =
860  (fond->stylekerns[i].kerns[j].offset *
861  (into->ascent + into->descent) + (1 << 11)) >> 12;
862  sc1 = SFMakeChar(into, map, ch1);
863  sc2 = SFMakeChar(into, map, ch2);
864  for (kp = sc1->kerns; kp != NULL; kp = kp->next)
865  if (kp->sc == sc2)
866  break;
867  if (kp == NULL) {
868  uint32 script;
869  kp = chunkalloc(sizeof(KernPair));
870  kp->sc = sc2;
871  kp->next = sc1->kerns;
872  sc1->kerns = kp;
874  if (script == DEFAULT_SCRIPT)
876  kp->subtable =
877  SFSubTableFindOrMake(sc1->parent, CHR('k', 'e', 'r', 'n'),
878  script, gpos_pair);
879  }
880  kp->off = offset;
881  }
882  return (into);
883 }
884 
885 /* Look for a bare truetype font in a binhex/macbinary wrapper */
887  int flags, enum openflags openflags)
888 {
889  FILE *temp ;
890  char *buffer ;
891  int len;
892  SplineFont *sf;
893 
894  if (flags & ttf_onlynames) {
895  char **ret;
896  char *temp = TTFGetFontName(binary, pos, pos);
897  if (temp == NULL)
898  return (NULL);
899  ret = galloc(2 * sizeof(char *));
900  ret[0] = temp;
901  ret[1] = NULL;
902  return ((SplineFont *) ret);
903  }
904  temp = tmpfile();
905  buffer = galloc(8192);
906 
907 
909  while (dlen > 0) {
910  len = dlen > 8192 ? 8192 : dlen;
911  len = fread(buffer, 1, dlen > 8192 ? 8192 : dlen, binary);
912  if (len == 0)
913  break;
914  fwrite(buffer, 1, len, temp);
915  dlen -= len;
916  }
917  rewind(temp);
919  fclose(temp);
920  free(buffer);
921  return (sf);
922 }
923 
925  int flags, enum openflags openflags,
926  SplineFont * into, EncMap * map)
927 {
928  /* If it is a good resource fork then the first 16 bytes are repeated */
929  /* at the location specified in bytes 4-7 */
930  /* We include an offset because if we are looking at a mac binary file */
931  /* the resource fork will actually start somewhere in the middle of the */
932  /* file, not at the beginning */
933  unsigned char buffer[16], buffer2[16];
934  long rdata_pos, map_pos, type_list, name_list, rpos;
935  int32 rdata_len, map_len;
936  uint32 nfnt_pos, font_pos, fond_pos;
937  unsigned long tag;
938  int i, cnt, subcnt, nfnt_subcnt = 0, font_subcnt = 0, fond_subcnt = 0;
939  SplineFont *sf;
940  FOND *fondlist = NULL;
941  fond_pos = 0;
942  fseek(f, offset, SEEK_SET);
943  if (fread(buffer, 1, 16, f) != 16)
944  return (NULL);
945  rdata_pos =
946  offset +
947  ((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]);
948  map_pos =
949  offset +
950  ((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | buffer[7]);
951  rdata_len =
952  ((buffer[8] << 24) | (buffer[9] << 16) | (buffer[10] << 8) |
953  buffer[11]);
954  map_len =
955  ((buffer[12] << 24) | (buffer[13] << 16) | (buffer[14] << 8) |
956  buffer[15]);
957  if (rdata_pos + rdata_len != map_pos || rdata_len == 0)
958  return (NULL);
959  fseek(f, map_pos, SEEK_SET);
960  buffer2[15] = buffer[15] + 1; /* make it be different */
961  if (fread(buffer2, 1, 16, f) != 16)
962  return (NULL);
963 
964 /* Apple's data fork resources appear to have a bunch of zeroes here instead */
965 /* of a copy of the first 16 bytes */
966  for (i = 0; i < 16; ++i)
967  if (buffer2[i] != 0)
968  break;
969  if (i != 16) {
970  for (i = 0; i < 16; ++i)
971  if (buffer[i] != buffer2[i])
972  return (NULL);
973  }
974  getlong(f); /* skip the handle to the next resource map */
975  getushort(f); /* skip the file resource number */
976  getushort(f); /* skip the attributes */
977  type_list = map_pos + getushort(f);
978  name_list = map_pos + getushort(f);
979 
981  cnt = getushort(f) + 1;
982  for (i = 0; i < cnt; ++i) {
983  tag = getlong(f);
984  /* printf( "%c%c%c%c\n", tag>>24, (tag>>16)&0xff, (tag>>8)&0xff, tag&0xff ); */
985  subcnt = getushort(f) + 1;
986  rpos = type_list + getushort(f);
987  sf = NULL;
988  if (tag == CHR('P', 'O', 'S', 'T') && !(flags & (ttf_onlystrikes | ttf_onlykerns))) /* No FOND */
989  sf = SearchPostscriptResources(f, rpos, subcnt, rdata_pos,
990  name_list, flags);
991  else if (tag == CHR('s', 'f', 'n', 't') && !(flags & ttf_onlykerns))
992  sf = SearchTtfResources(f, rpos, subcnt, rdata_pos, name_list,
994  else if (tag == CHR('N', 'F', 'N', 'T')) {
995  nfnt_pos = rpos;
996  nfnt_subcnt = subcnt;
997  } else if (tag == CHR('F', 'O', 'N', 'T')) {
998  font_pos = rpos;
999  font_subcnt = subcnt;
1000  } else if (tag == CHR('F', 'O', 'N', 'D')) {
1001  fond_pos = rpos;
1002  fond_subcnt = subcnt;
1003  }
1004  if (sf != NULL)
1005  return (sf);
1006  }
1007  if (flags & ttf_onlynames) /* Not interested in bitmap resources here */
1008  return (NULL);
1009 
1010  if (flags & ttf_onlykerns) { /* For kerns */
1011  if (fond_subcnt != 0)
1012  fondlist =
1013  BuildFondList(f, fond_pos, fond_subcnt, rdata_pos, name_list,
1014  flags);
1015  into = FindFamilyStyleKerns(into, map, fondlist, filename);
1016  FondListFree(fondlist);
1017  return (into);
1018  }
1019  /* Ok. If no outline font, try for a bitmap */
1020  if (nfnt_subcnt == 0) {
1021  nfnt_pos = font_pos;
1022  nfnt_subcnt = font_subcnt;
1023  }
1024  return ((SplineFont *) - 1); /* It's a valid resource file, but just has no fonts */
1025 }
1026 
1027 
1029  enum openflags openflags,
1030  SplineFont * into, EncMap * map)
1031 {
1032  unsigned char header[128];
1033  unsigned long offset, dlen, rlen;
1034 
1035  if (fread(header, 1, 128, f) != 128)
1036  return (NULL);
1037  if (header[0] != 0 || header[74] != 0 || header[82] != 0 || header[1] <= 0
1038  || header[1] > 33 || header[63] != 0 || header[2 + header[1]] != 0)
1039  return (NULL);
1040  dlen =
1041  ((header[0x53] << 24) | (header[0x54] << 16) | (header[0x55] << 8) |
1042  header[0x56]);
1043  rlen =
1044  ((header[0x57] << 24) | (header[0x58] << 16) | (header[0x59] << 8) |
1045  header[0x5a]);
1046  /* 128 bytes for header, then the dlen is padded to a 128 byte boundary */
1047  offset = 128 + ((dlen + 127) & ~127);
1048 /* Look for a bare truetype font in a binhex/macbinary wrapper */
1049  if (dlen != 0 && rlen <= dlen) {
1050  int pos = ftell(f);
1051  if (fread(header, 1, 4, f) != ((size_t)4)) {
1052  LogError(_("Unable to read 4 bytes for header, but going on.\n"));
1053  }
1054  header[5] = '\0';
1055  if (strcmp((char *) header, "OTTO") == 0
1056  || strcmp((char *) header, "true") == 0
1057  || strcmp((char *) header, "ttcf") == 0 || (header[0] == 0
1058  && header[1] == 1
1059  && header[2] == 0
1060  && header[3] == 0))
1061  return (MightBeTrueType(f, pos, dlen, flags, openflags));
1062  }
1063  return (IsResourceFork(f, offset, filename, flags, openflags, into, map));
1064 }
1065 
1066 static int lastch = 0, repeat = 0;
1067 static void outchr(FILE * binary, int ch)
1068 {
1069  int i;
1070 
1071  if (repeat) {
1072  if (ch == 0) {
1073  /* no repeat, output a literal 0x90 (the repeat flag) */
1074  lastch = 0x90;
1075  putc(lastch, binary);
1076  } else {
1077  for (i = 1; i < ch; ++i)
1078  putc(lastch, binary);
1079  }
1080  repeat = 0;
1081  } else if (ch == 0x90) {
1082  repeat = 1;
1083  } else {
1084  putc(ch, binary);
1085  lastch = ch;
1086  }
1087 }
1088 
1090  enum openflags openflags, SplineFont * into,
1091  EncMap * map)
1092 {
1093  /* convert file from 6bit to 8bit */
1094  /* interesting data is enclosed between two colons */
1095  FILE *binary = tmpfile();
1096  char *sixbit =
1097  "!\"#$%&'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr";
1098  int ch, val, cnt, i, dlen, rlen;
1099  unsigned char header[20];
1100  char *pt;
1101  SplineFont *ret;
1102 
1103  if (binary == NULL) {
1104  LogError(_("can't create temporary file\n"));
1105  return (NULL);
1106  }
1107 
1108  lastch = repeat = 0;
1109  while ((ch = getc(f)) != ':'); /* There may be comments before file start */
1110  cnt = val = 0;
1111  while ((ch = getc(f)) != ':') {
1112  if (isspace(ch))
1113  continue;
1114  for (pt = sixbit; *pt != ch && *pt != '\0'; ++pt);
1115  if (*pt == '\0') {
1116  fclose(binary);
1117  return (NULL);
1118  }
1119  val = (val << 6) | (pt - sixbit);
1120  if (++cnt == 4) {
1121  outchr(binary, (val >> 16) & 0xff);
1122  outchr(binary, (val >> 8) & 0xff);
1123  outchr(binary, val & 0xff);
1124  val = cnt = 0;
1125  }
1126  }
1127  if (cnt != 0) {
1128  if (cnt == 1)
1129  outchr(binary, val << 2);
1130  else if (cnt == 2) {
1131  val <<= 4;
1132  outchr(binary, (val >> 8) & 0xff);
1133  outchr(binary, val & 0xff);
1134  } else if (cnt == 3) {
1135  val <<= 6;
1136  outchr(binary, (val >> 16) & 0xff);
1137  outchr(binary, (val >> 8) & 0xff);
1138  outchr(binary, val & 0xff);
1139  }
1140  }
1141 
1142  rewind(binary);
1143  ch = getc(binary); /* Name length */
1144  /* skip name */
1145  for (i = 0; i < ch; ++i)
1146  getc(binary);
1147  if (getc(binary) != '\0') {
1148  fclose(binary);
1149  return (NULL);
1150  }
1151  if ( fread(header, 1, 20, binary) != 20 ) {
1152  LogError(_("Can't read 20 bytes for header\n"));
1153  return (NULL);
1154  }
1155  dlen =
1156  (header[10] << 24) | (header[11] << 16) | (header[12] << 8) |
1157  header[13];
1158  rlen =
1159  (header[14] << 24) | (header[15] << 16) | (header[16] << 8) |
1160  header[17];
1161 /* Look for a bare truetype font in a binhex/macbinary wrapper */
1162  if (dlen != 0 && rlen < dlen) {
1163  int pos = ftell(binary);
1164  if (fread(header, 1, 4, binary) != 4) {
1165  LogError(_("Can't read 4 bytes for header\n"));
1166  return (NULL);
1167  }
1168  header[5] = '\0';
1169  if (strcmp((char *) header, "OTTO") == 0
1170  || strcmp((char *) header, "true") == 0
1171  || strcmp((char *) header, "ttcf") == 0 || (header[0] == 0
1172  && header[1] == 1
1173  && header[2] == 0
1174  && header[3] == 0)) {
1176  fclose(binary);
1177  return (ret);
1178  }
1179  }
1180  if (rlen == 0) {
1181  fclose(binary);
1182  return (NULL);
1183  }
1184 
1185  ret =
1187  openflags, into, map);
1188 
1189  fclose(binary);
1190  return (ret);
1191 }
1192 
1194  enum openflags openflags, SplineFont * into,
1195  EncMap * map)
1196 {
1197  FILE *f;
1198  char *spt, *pt;
1199  SplineFont *sf;
1200  char *temp = filename, *lparen;
1201 
1202  if ((pt = strrchr(filename, '/')) == NULL)
1203  pt = filename;
1204  if ((lparen = strchr(pt, '(')) != NULL && strchr(lparen, ')') != NULL) {
1205  temp = copy(filename);
1206  temp[lparen - filename] = '\0';
1207  }
1208  f = fopen(temp, "rb");
1209  if (temp != filename)
1210  free(temp);
1211  if (f == NULL)
1212  return (NULL);
1213  spt = strrchr(filename, '/');
1214  if (spt == NULL)
1215  spt = filename;
1216  pt = strrchr(spt, '.');
1217  if (pt != NULL && (pt[1] == 'b' || pt[1] == 'B')
1218  && (pt[2] == 'i' || pt[2] == 'I') && (pt[3] == 'n' || pt[3] == 'N')
1219  && (pt[4] == '\0' || pt[4] == '(')) {
1220  if ((sf = IsResourceInBinary(f, filename, flags, openflags, into, map))) {
1221  fclose(f);
1222  return (sf);
1223  }
1224  } else if (pt != NULL && (pt[1] == 'h' || pt[1] == 'H')
1225  && (pt[2] == 'q' || pt[2] == 'Q') && (pt[3] == 'x'
1226  || pt[3] == 'X')
1227  && (pt[4] == '\0' || pt[4] == '(')) {
1228  if ((sf = IsResourceInHex(f, filename, flags, openflags, into, map))) {
1229  fclose(f);
1230  return (sf);
1231  }
1232  }
1233 
1234  sf = IsResourceFork(f, 0, filename, flags, openflags, into, map);
1235  fclose(f);
1236 #if __Mac
1237  if (sf == NULL)
1238  sf = HasResourceFork(filename, flags, openflags, into, map);
1239 #endif
1240  return (sf);
1241 }
1242 
1244  enum openflags openflags, SplineFont * into,
1245  EncMap * map)
1246 {
1247  char *spt, *pt, *dpt;
1248  char buffer[1400];
1249  SplineFont *sf;
1250 
1251  if ((sf = IsResourceInFile(filename, flags, openflags, into, map)))
1252  return (sf);
1253 
1254  /* Well, look in the resource fork directory (if it exists), the resource */
1255  /* fork is placed there in a seperate file on (some) non-Mac disks */
1257  spt = strrchr(buffer, '/');
1258  if (spt == NULL) {
1259  spt = buffer;
1260  pt = filename;
1261  } else {
1262  ++spt;
1263  pt = filename + (spt - buffer);
1264  }
1265  strcpy(spt, "resource.frk/");
1266  strcat(spt, pt);
1267  if ((sf = IsResourceInFile(buffer, flags, openflags, into, map)))
1268  return (sf);
1269 
1270  /* however the resource fork does not appear to do long names properly */
1271  /* names are always lower case 8.3, do some simple things to check */
1272  spt = strrchr(buffer, '/') + 1;
1273  for (pt = spt; *pt; ++pt)
1274  if (isupper(*pt))
1275  *pt = tolower(*pt);
1276  dpt = strchr(spt, '.');
1277  if (dpt == NULL)
1278  dpt = spt + strlen(spt);
1279  if (dpt - spt > 8 || strlen(dpt) > 4) {
1280  char exten[8];
1281  strncpy(exten, dpt, 7);
1282  exten[4] = '\0'; /* it includes the dot */
1283  if (dpt - spt > 6)
1284  dpt = spt + 6;
1285  *dpt++ = '~';
1286  *dpt++ = '1';
1287  strcpy(dpt, exten);
1288  }
1289  return (IsResourceInFile(buffer, flags, openflags, into, map));
1290 }
1291 
1292 
1293 static char *createtmpfile(char *filename)
1294 {
1295  char *p, *tempname;
1296  p = strrchr(filename,'/');
1297  if (p != NULL) {
1298  filename = p+1;
1299  }
1300  assert(strlen(filename)>=5);
1301  tempname = malloc(strlen(filename)+2);
1302  if (tempname == NULL) {
1303  LogError(_("Out of memory\n"));
1304  exit(1);
1305  }
1306  strcpy(tempname,filename);
1307  strcpy(tempname+strlen(tempname)-5,"XXXXXX"); /* dfont -> XXXXXX */
1308 
1309 #ifdef HAVE_MKSTEMP
1310  {
1311  int i = mkstemp(tempname);
1312  if (i) {
1313  close(i);
1314  }
1315  }
1316 #else
1317  mktemp(tempname);
1318 #endif
1319  return tempname;
1320 }
1321 
1322 static char *SearchTtfResourcesFile(FILE * f, long rlistpos, int subcnt,
1323  long rdata_pos, long name_list,
1324  char *filename, char *fontname)
1325 {
1326  long here;
1327  long roff;
1328  int rname = -1;
1329  int ch1, ch2;
1330  int len, i, rlen, ilen;
1331  /* The sfnt resource is just a copy of the ttf file */
1332  char *buffer = NULL;
1333  int max = 0;
1334  FILE *ttf;
1335  char *sf = NULL;
1336  int which = 0;
1337  char **names;
1338  (void)name_list;
1339  fseek(f, rlistpos, SEEK_SET);
1340  if (subcnt > 1) {
1341  names = gcalloc(subcnt + 1, sizeof(char *));
1342  for (i = 0; i < subcnt; ++i) {
1343  /* resource id = */ getushort(f);
1344  /* rname = (short) */ getushort(f);
1345  /* flags = */ getc(f);
1346  ch1 = getc(f);
1347  ch2 = getc(f);
1348  roff = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
1349  /* mbz = */ getlong(f);
1350  here = ftell(f);
1351  names[i] = TTFGetPSFontName(f, roff + 4, roff + 4);
1352  if (names[i] == NULL) {
1353  char buffer[32];
1354  sprintf(buffer, "Nameless%d", i);
1355  names[i] = copy(buffer);
1356  }
1357  fseek(f, here, SEEK_SET);
1358  }
1359  if (1) {
1360  char *find = fontname;
1361  for (which = subcnt - 1; which >= 0; --which)
1362  if (strcmp(names[which], find) == 0)
1363  break;
1364  if (which == -1) {
1365  char *end;
1366  which = strtol(find, &end, 10);
1367  if (*end != '\0')
1368  which = -1;
1369  }
1370  if (which == -1) {
1371  ff_post_error(_("Not in Collection"), _("%s is not in %.100s"),
1372  find, filename);
1373  }
1374  } else {
1375  which = 0;
1376  }
1377  for (i = 0; i < subcnt; ++i)
1378  free(names[i]);
1379  free(names);
1380  fseek(f, rlistpos, SEEK_SET);
1381  }
1382 
1383  for (i = 0; i < subcnt; ++i) {
1384  /* resource id = */ getushort(f);
1385  rname = (short) getushort(f);
1386  /* flags = */ getc(f);
1387  ch1 = getc(f);
1388  ch2 = getc(f);
1389  roff = rdata_pos + ((ch1 << 16) | (ch2 << 8) | getc(f));
1390  /* mbz = */ getlong(f);
1391  if (i != which)
1392  continue;
1393  here = ftell(f);
1394 
1396  ttf = fopen(sf, "wb");
1397  if (ttf == NULL) {
1398  LogError(_("Can't open temporary file for truetype output.\n"));
1399  continue;
1400  }
1401 
1402  fseek(f, roff, SEEK_SET);
1403  ilen = rlen = getlong(f);
1404  if (rlen > 16 * 1024)
1405  ilen = 16 * 1024;
1406  if (ilen > max) {
1407  free(buffer);
1408  max = ilen;
1409  if (max < 0x800)
1410  max = 0x800;
1411  buffer = malloc(max);
1412  }
1413  for (len = 0; len < rlen;) {
1414  int temp = ilen;
1415  if (rlen - len < ilen)
1416  temp = rlen - len;
1417  temp = fread(buffer, 1, temp, f);
1418  if (temp == EOF)
1419  break;
1420  fwrite(buffer, 1, temp, ttf);
1421  len += temp;
1422  }
1423  fclose(ttf);
1424  }
1425  free(buffer);
1426  return sf;
1427 }
1428 
1429 static char *IsResourceForkFile(FILE * f, char *filename, char *fontname)
1430 {
1431  /* If it is a good resource fork then the first 16 bytes are repeated */
1432  /* at the location specified in bytes 4-7 */
1433  /* We include an offset because if we are looking at a mac binary file */
1434  /* the resource fork will actually start somewhere in the middle of the */
1435  /* file, not at the beginning */
1436  unsigned char buffer[16], buffer2[16];
1437  long rdata_pos, map_pos, type_list, name_list, rpos;
1438  int32 rdata_len, map_len;
1439  uint32 fond_pos;
1440  unsigned long tag;
1441  int i, cnt, subcnt;
1442  char *sf = NULL;
1443  fond_pos = 0;
1444  fseek(f, 0, SEEK_SET);
1445  if (fread(buffer, 1, 16, f) != 16)
1446  return (NULL);
1447  rdata_pos =
1448  ((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]);
1449  map_pos =
1450  ((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | buffer[7]);
1451  rdata_len =
1452  ((buffer[8] << 24) | (buffer[9] << 16) | (buffer[10] << 8) |
1453  buffer[11]);
1454  map_len =
1455  ((buffer[12] << 24) | (buffer[13] << 16) | (buffer[14] << 8) |
1456  buffer[15]);
1457  if (rdata_pos + rdata_len != map_pos || rdata_len == 0)
1458  return (NULL);
1459  fseek(f, map_pos, SEEK_SET);
1460  buffer2[15] = buffer[15] + 1; /* make it be different */
1461  if (fread(buffer2, 1, 16, f) != 16)
1462  return (NULL);
1463  for (i = 0; i < 16; ++i)
1464  if (buffer2[i] != 0)
1465  break;
1466  if (i != 16) {
1467  for (i = 0; i < 16; ++i)
1468  if (buffer[i] != buffer2[i])
1469  return (NULL);
1470  }
1471  getlong(f); /* skip the handle to the next resource map */
1472  getushort(f); /* skip the file resource number */
1473  getushort(f); /* skip the attributes */
1474  type_list = map_pos + getushort(f);
1475  name_list = map_pos + getushort(f);
1477  cnt = getushort(f) + 1;
1478  for (i = 0; i < cnt; ++i) {
1479  tag = getlong(f);
1480  subcnt = getushort(f) + 1;
1481  rpos = type_list + getushort(f);
1482  sf = NULL;
1483  if (tag == CHR('s', 'f', 'n', 't')) {
1484  sf = SearchTtfResourcesFile(f, rpos, subcnt, rdata_pos, name_list,
1485  filename, fontname);
1486  }
1487  if (sf != NULL)
1488  return (sf);
1489  }
1490  return NULL;
1491 }
1492 
1493 
1494 /* filename "/opt/tex/texmf-fonts/fonts/data/LucidaGrande.dfont",
1495  fontname "Lucida Grande Bold"
1496  */
1498 {
1499  char *sf = NULL;
1500  FILE *f = fopen(filename, "rb");
1501  if (f == NULL)
1502  return (NULL);
1504  fclose(f);
1505  return sf;
1506 }
1507 
1509 {
1511 
1512  if (sf == NULL)
1513  LogError(_("Couldn't find a font file named %s\n"), filename);
1514  else if (sf == (SplineFont *) (-1)) {
1515  LogError(_
1516  ("%s is a mac resource file but contains no postscript or truetype fonts\n"),
1517  filename);
1518  sf = NULL;
1519  }
1520  return (sf);
1521 }
1522 
1524 {
1525  return ((char **) FindResourceFile(filename, ttf_onlynames, 0, NULL, NULL));
1526 }
1527 
1528 /* should try to optimize this */
1530  enum openflags openflags)
1531 {
1533 
1534  if (sf == NULL)
1535  LogError(_("Couldn't find a font file named %s\n"), filename);
1536  else if (sf == (SplineFont *) (-1)) {
1537  LogError(_
1538  ("%s is a mac resource file but contains no postscript or truetype fonts\n"),
1539  filename);
1540  sf = NULL;
1541  }
1542  return (sf);
1543 }
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
const char * fontname
Definition: afm2pl.c:186
#define type(a)
Definition: aptex-macros.h:171
#define head
Definition: aptex-macros.h:513
#define name
#define next(a)
Definition: aptex-macros.h:924
unsigned binary[4]
Definition: ascii85.c:46
static point_t cur
Definition: backend_eps.c:108
#define free(a)
Definition: decNumber.cpp:310
#define strrchr
Definition: detex.c:67
static int id
Definition: bifont.c:66
int mkstemp()
#define fopen
Definition: xxstdio.h:21
#define fread
Definition: xxstdio.h:25
#define fseek
Definition: xxstdio.h:30
#define ftell
Definition: xxstdio.h:31
int getlong(long *dest, int *j, const char *str)
Definition: dvi2tty.c:666
#define mktemp
Definition: dvi2xx.c:3706
char * strncpy()
int strcmp()
Definition: coll.cpp:143
char * strcpy()
char * temp
Definition: dvidvi.c:137
char * strings
Definition: dvidvi.c:141
static struct line hold
Definition: execute.c:172
static void
Definition: fpif.c:118
#define _(String)
Definition: ftxerr18.c:64
static gabc_style_bits styles
HashPtr2_T * type_list
static void copy(GlyphCachePtr *root)
Definition: gcache.c:378
mpz_t * f
Definition: gen-fib.c:34
#define strchr
Definition: gsftopk.c:59
string family
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define putc
Definition: jbib.h:20
#define SEEK_SET
Definition: jmemansi.c:26
#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
Arabic default style
Definition: afstyles.h:94
void exit()
#define EOF
Definition: afmparse.c:59
char * strstr()
#define fclose
Definition: debug.h:100
static int find(DIR *dp, char *name)
Definition: dirent.c:25
#define getc
Definition: line.c:39
#define close
Definition: win32lib.h:63
static int ret
Definition: convert.c:72
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
#define malloc
Definition: alloca.c:91
#define test
Definition: tie.c:129
#define sprintf
Definition: snprintf.c:44
unsigned short uint16
Definition: tiff.h:62
unsigned long uint32
Definition: tiff.h:68
long int32
Definition: tiff.h:67
unsigned char uint8
Definition: tiff.h:60
const int * pos
Definition: combiners.h:905
@ lparen
Definition: mtxline.h:22
@ rparen
Definition: mtxline.h:22
string fn
Definition: fc-lang.py:335
list names
Definition: fc-lang.py:151
int k
Definition: otp-parser.c:70
static int format
Definition: pbmclean.c:15
#define max(a, b)
Definition: pbmto4425.c:11
char * filename[256]
Definition: pbmtopk.c:46
static int cnt
Definition: pkout.c:166
static int32_t last
Definition: ppagelist.c:29
static int offset
Definition: ppmtogif.c:642
bstring c int memset(void *s, int c, int length)
#define map
#define flags
C API: Unicode string handling functions.
char * strstrmatch(const char *longer, const char *substr)
Definition: char.c:55
psstyle_flags
Definition: macbinary.c:106
@ psf_bold
Definition: macbinary.c:106
@ psf_extend
Definition: macbinary.c:107
@ psf_italic
Definition: macbinary.c:106
@ psf_shadow
Definition: macbinary.c:107
@ psf_outline
Definition: macbinary.c:106
@ psf_condense
Definition: macbinary.c:107
uint16 _MacStyleCode(const char *styles, SplineFont *sf, uint16 *psstylecode)
Definition: macbinary.c:109
int getushort(FILE *ttf)
Definition: parsettf.c:47
FontDict * _ReadPSFont(FILE *ps)
Definition: parsepfa.c:2569
void PSFontFree(FontDict *fd)
Definition: parsepfa.c:2667
const char * _GetModifiers(const char *fontname, const char *familyname, const char *weight)
Definition: splinefont.c:45
#define DEFAULT_SCRIPT
Definition: splinefont.h:343
uint32 SCScriptFromUnicode(SplineChar *sc)
Definition: tottfgpos.c:202
@ sf_condense
Definition: splinefont.h:1872
@ sf_extend
Definition: splinefont.h:1872
@ sf_bold
Definition: splinefont.h:1871
@ sf_italic
Definition: splinefont.h:1871
@ sf_underline
Definition: splinefont.h:1871
@ sf_outline
Definition: splinefont.h:1871
@ sf_shadow
Definition: splinefont.h:1872
@ ttf_onlynames
Definition: splinefont.h:2341
@ ttf_onlykerns
Definition: splinefont.h:2341
@ ttf_onlystrikes
Definition: splinefont.h:2341
@ gpos_pair
Definition: splinefont.h:365
openflags
Definition: splinefont.h:1914
#define chunkalloc(size)
Definition: splinefont.h:1947
#define ff_post_error
Definition: uiinterface.h:127
#define LogError
Definition: uiinterface.h:125
#define tolower(ch)
Definition: utype.h:137
#define isspace(ch)
Definition: utype.h:87
#define isupper(ch)
Definition: utype.h:80
test
Definition: parser.c:257
struct lookup_subtable * SFSubTableFindOrMake(SplineFont *sf, uint32 tag, uint32 script, int lookup_type)
Definition: lookups.c:3428
char * FindResourceTtfFont(char *filename, char *fontname)
Definition: macbinary.c:1497
SplineFont * SFReadMacBinaryInfo(char *filename, int flags, enum openflags openflags)
Definition: macbinary.c:1529
const int mac_dpi
Definition: macbinary.c:50
static FOND * BuildFondList(FILE *f, long rlistpos, int subcnt, long rdata_pos, long name_list, int flags)
Definition: macbinary.c:556
static char * BuildName(char *family, int style)
Definition: macbinary.c:702
struct fond FOND
static SplineFont * IsResourceFork(FILE *f, long offset, char *filename, int flags, enum openflags openflags, SplineFont *into, EncMap *map)
Definition: macbinary.c:924
SplineFont * SFReadMacBinary(char *filename, int flags, enum openflags openflags)
Definition: macbinary.c:1508
static SplineFont * FindResourceFile(char *filename, int flags, enum openflags openflags, SplineFont *into, EncMap *map)
Definition: macbinary.c:1243
static char * createtmpfile(char *filename)
Definition: macbinary.c:1293
static SplineFont * SearchPostscriptResources(FILE *f, long rlistpos, int subcnt, long rdata_pos, long name_list, int flags)
Definition: macbinary.c:206
static SplineFont * IsResourceInFile(char *filename, int flags, enum openflags openflags, SplineFont *into, EncMap *map)
Definition: macbinary.c:1193
static SplineFont * IsResourceInHex(FILE *f, char *filename, int flags, enum openflags openflags, SplineFont *into, EncMap *map)
Definition: macbinary.c:1089
static SplineFont * FindFamilyStyleKerns(SplineFont *into, EncMap *map, FOND *fondlist, char *filename)
Definition: macbinary.c:834
static int GuessStyle(char *fontname, int *styles, int style_cnt)
Definition: macbinary.c:726
static SplineFont * SearchTtfResources(FILE *f, long rlistpos, int subcnt, long rdata_pos, long name_list, char *filename, int flags, enum openflags openflags)
Definition: macbinary.c:338
char ** NamesReadMacBinary(char *filename)
Definition: macbinary.c:1523
static int repeat
Definition: macbinary.c:1066
static void FondListFree(FOND *list)
Definition: macbinary.c:527
static char * IsResourceForkFile(FILE *f, char *filename, char *fontname)
Definition: macbinary.c:1429
static int lastch
Definition: macbinary.c:1066
static SplineFont * MightBeTrueType(FILE *binary, int32 pos, int32 dlen, int flags, enum openflags openflags)
Definition: macbinary.c:886
static void outchr(FILE *binary, int ch)
Definition: macbinary.c:1067
static FOND * PickFOND(FOND *fondlist, char *filename, char **name, int *style)
Definition: macbinary.c:739
static char * SearchTtfResourcesFile(FILE *f, long rlistpos, int subcnt, long rdata_pos, long name_list, char *filename, char *fontname)
Definition: macbinary.c:1322
static SplineFont * IsResourceInBinary(FILE *f, char *filename, int flags, enum openflags openflags, SplineFont *into, EncMap *map)
Definition: macbinary.c:1028
char ** _NamesReadPostscript(FILE *ps)
Definition: parsepfa.c:2710
char * TTFGetFontName(FILE *ttf, int32 offset, int32 off2)
Definition: parsettf.c:504
char * TTFGetPSFontName(FILE *ttf, int32 offset, int32 off2)
Definition: parsettf.c:594
SplineFont * _SFReadTTF(FILE *ttf, int flags, enum openflags openflags, char *filename, struct fontdict *fd)
Definition: parsettf.c:5970
SplineChar * SFMakeChar(SplineFont *sf, EncMap *map, int enc)
Definition: splinefont.c:176
SplineFont * SplineFontFromPSFont(struct fontdict *fd)
Definition: splineutil.c:2275
void * gcalloc(int cnt, long size)
void * galloc(long size)
short descent
Definition: macbinary.c:517
short firstChar
Definition: macbinary.c:506
unsigned short * offsetWidths
Definition: macbinary.c:513
short Descent
Definition: macbinary.c:510
short fontType
Definition: macbinary.c:505
short ascent
Definition: macbinary.c:516
unsigned short * fontImage
Definition: macbinary.c:520
unsigned short * locs
Definition: macbinary.c:522
short leading
Definition: macbinary.c:518
short fRectWidth
Definition: macbinary.c:511
short rowWords
Definition: macbinary.c:519
short fRectHeight
Definition: macbinary.c:512
short kernMax
Definition: macbinary.c:509
short lastChar
Definition: macbinary.c:507
short widthMax
Definition: macbinary.c:508
Definition: utils.c:300
struct cell * next
short id
Definition: macbinary.c:481
short style
Definition: macbinary.c:481
short size
Definition: macbinary.c:481
unsigned char ch2
Definition: macbinary.c:496
unsigned char ch1
Definition: macbinary.c:496
struct fond::stylekerns::kerns * kerns
short * widthtab
Definition: macbinary.c:489
int first
Definition: macbinary.c:478
struct fond::stylekerns * stylekerns
struct fond::assoc * assoc
int stylekerncnt
Definition: macbinary.c:491
int stylewidthcnt
Definition: macbinary.c:486
char * psnames[48]
Definition: macbinary.c:500
char * fondname
Definition: macbinary.c:477
struct fond * next
Definition: macbinary.c:501
int assoc_cnt
Definition: macbinary.c:479
struct fond::stylewidths * stylewidths
int last
Definition: macbinary.c:478
Definition: ttf.h:354
Definition: sh5.c:97
Definition: ttf.h:392
uint32 creator
Definition: macbinary.c:128
char * macfilename
Definition: macbinary.c:125
char * binfilename
Definition: macbinary.c:126
uint32 pos
Definition: macbinary.c:98
uint8 flags
Definition: macbinary.c:99
char * name
Definition: macbinary.c:101
uint16 id
Definition: macbinary.c:100
uint32 nameloc
Definition: macbinary.c:102
uint32 nameptloc
Definition: macbinary.c:103
uint32 resloc
Definition: macbinary.c:121
struct resource * res
Definition: macbinary.c:120
uint32 tag
Definition: macbinary.c:119
Definition: tfmaux.c:31
struct splinefont * parent
Definition: splinefont.h:1346
KernPair * kerns
Definition: splinefont.h:1379
Definition: xmlparse.c:179
Definition: strexpr.c:21
#define CHR(x)
Definition: sysdep.h:200
#define FILE
Definition: t1stdio.h:34
ch
Definition: t4ht.c:1443
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
ch2
Definition: tex4ht.c:3229
val
Definition: tex4ht.c:3227
tag int tag
Definition: tex4ht.c:2554
static int pfb
Definition: type1asm.c:60
@ start
Definition: preamble.c:52
PATTERN * pt
Definition: vlna.c:74
#define buffer
Definition: xmlparse.c:611
#define end(cp)
Definition: zic.c:71