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)  

splinesave.c
Go to the documentation of this file.
1 /* Copyright (C) 2000-2012 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 "fontforge.h"
28 #include <math.h>
29 #include "psfont.h"
30 
33 
34 /* Let's talk about references. */
35 /* If we are doing Type1 output, then the obvious way of doing them is seac */
36 /* but that's so limitting. It only works for exactly two characters both */
37 /* of which are in Adobe's Standard Enc. Only translations allowed. Only */
38 /* one reference may be translated and the width of the char must match */
39 /* that of the non-translated reference */
40 /* The first extension we can make is to allow a single character reference */
41 /* by making the other character be a space */
42 /* But if we want to do more than that we must use subrs. If we have two */
43 /* refs in subrs then we can do translations by preceding the subr calls by */
44 /* appropriate rmovetos. Actually the specs say that only one rmoveto should */
45 /* precede a path, so that means we can't allow the subroutines to position */
46 /* themselves, they must just assume that they are called with the current */
47 /* position correct for the first point. But then we need to know where the */
48 /* first point should be placed, so we allocate a BasePoint to hold that info*/
49 /* and store it into the "keys" array (which the subrs don't use). Similarly */
50 /* we need to know where the subr will leave us, so we actually allocate 2 */
51 /* BasePoints, one containing the start point, one the end point */
52 /* But that's still not good enough, hints are defined in such a way that */
53 /* they are not relocateable. So our subrs can't include any hint definitions*/
54 /* (or if they do then that subr can't be translated at all). So hints must */
55 /* be set outside the subrs, and the subrs can't be for chars that need hint */
56 /* substitution. Unless... The subr will never be relocated. */
57 /* So we generate two types of reference subrs, one containing no hints, the*/
58 /* other containing all the hints, stems and flexes. The first type may be */
59 /* translated, the second cannot */
60 /* Type2 doesn't allow any seacs */
61 /* So everything must go in subrs. We have a slightly different problem here:*/
62 /* hintmasks need to know exactly how many stem hints there are in the char */
63 /* so we can't include any hintmask operators inside a subr (unless we */
64 /* guarantee that all invocations of that subr are done with the same number */
65 /* of hints in the character). This again means that no char with hint subs- */
66 /* titutions may be put in a subr. UNLESS all the other references in a */
67 /* refering character contain no hints */
68 
69 /* That's very complex. And it doesn't do a very good job. */
70 /* Instead let's take all strings bounded by either moveto or hintmask operators */
71 /* store these as potential subroutines. So a glyph becomes a sequence of */
72 /* potential subroutine calls preceded by the glyph header (width, hint decl,*/
73 /* counter declarations, etc.) and intersperced by hintmask/moveto operators */
74 /* Each time we get a potential subr we hash it and see if we've used that */
75 /* string before. If we have then we merge the two. Otherwise it's a new one.*/
76 /* Then at the end we see what strings get used often enough to go into subrs */
77 /* we create the subrs array from that. */
78 /* Then each glyph. We insert the preamble. We check of the potential subroutine */
79 /* became a real subroutine. If so we call it, else we insert the data inline*/
80 /* Do the same for the next hintmask/moveto and potential subroutine... */
81 
82 /* Then, on top of that I tried generating some full glyph subroutines, and */
83 /* to my surprise, it just made things worse. */
84 
86  uint8 *data; /* the charstring of the subr */
87  int len; /* the length of the charstring */
88  int idx; /* initially index into psubrs array */
89  /* then index into subrs array or -1 if none */
90  int cnt; /* the usage count */
91  int fd; /* Which sub font is it in */
92  /* -1 => used in more than one */
93  int next;
94  int full_glyph_index; /* Into the glyphbits array */
95  /* for full references */
96  BasePoint *startstop; /* Again for full references */
97 };
98 
99 struct bits {
101  int dlen;
103 };
104 
105 struct glyphbits {
107  int fd; /* Which subfont is it in */
108  int bcnt;
109  struct bits *bits;
111 };
112 
113 #define HSH_SIZE 511
114 /* In type2 charstrings we divide every character into bits where a bit is */
115 /* bounded by a hintmask/moveto. Each of these is a potential subroutine and */
116 /* is stored here */
117 typedef struct glyphinfo {
119  int pcnt, pmax;
121  struct glyphbits *gb, *active;
123  int layer;
124  int glyphcnt;
126  int bcnt, bmax;
127  struct bits *bits; /* For current glyph */
128  const int *bygid;
132 
133 struct mhlist {
135  int subr;
136  struct mhlist *next;
137 };
138 
139 struct hintdb {
141  int cnt; /* number of hints */
142  struct mhlist *sublist;
143  struct pschars *subrs;
144  /*SplineChar *sc;*/
147  unsigned int iscjk: 1; /* If cjk then don't do stem3 hints */
148  /* Will be done with counters instead */
149  /* actually, most of the time we can't use stem3s, only if those three*/
150  /* stems are always active and there are no other stems !(h/v)hasoverlap*/
151  unsigned int noconflicts: 1;
152  unsigned int startset: 1;
153  unsigned int skiphm: 1; /* Set when coming back to the start point of a contour. hintmask should be set the first time, not the second */
154  unsigned int donefirsthm: 1;
155  int cursub; /* Current subr number */
158 };
159 
160 static void GIContentsFree(GlyphInfo *gi,SplineChar *dummynotdef) {
161  int i,j;
162 
163  if ( gi->glyphcnt>0 && gi->gb[0].sc == dummynotdef ) {
164  if ( dummynotdef->layers!=NULL ) {
165  SplinePointListsFree(dummynotdef->layers[gi->layer].splines);
166  dummynotdef->layers[gi->layer].splines = NULL;
167  }
168  StemInfosFree(dummynotdef->hstem);
169  StemInfosFree(dummynotdef->vstem);
170  dummynotdef->vstem = dummynotdef->hstem = NULL;
171  free(dummynotdef->layers);
172  dummynotdef->layers = NULL;
173  }
174 
175  for ( i=0; i<gi->pcnt; ++i ) {
176  free(gi->psubrs[i].data);
177  free(gi->psubrs[i].startstop);
178  gi->psubrs[i].data = NULL;
179  gi->psubrs[i].startstop = NULL;
180  }
181  for ( i=0; i<gi->glyphcnt; ++i ) {
182  for ( j=0; j<gi->gb[i].bcnt; ++j )
183  free(gi->gb[i].bits[j].data);
184  free(gi->gb[i].bits);
185  gi->gb[i].bits = NULL;
186  gi->gb[i].bcnt = 0;
187  }
188 
189  gi->pcnt = 0;
190  gi->bcnt = 0;
191  gi->justbroken = 0;
192 }
193 
194 static void GIFree(GlyphInfo *gi,SplineChar *dummynotdef) {
195 
196  GIContentsFree(gi,dummynotdef);
197 
198  free(gi->gb);
199  free(gi->psubrs);
200  free(gi->bits);
201 }
202 
203 static void StartNextSubroutine(GrowBuf *gb,struct hintdb *hdb) {
204  GlyphInfo *gi;
205 
206  if ( hdb==NULL )
207 return;
208  gi = hdb->gi;
209  if ( gi==NULL )
210 return;
211  /* Store everything in the grow buf into the data/dlen of the next bit */
212  if ( gi->bcnt==-1 ) gi->bcnt = 0;
213  if ( gi->bcnt>=gi->bmax )
214  gi->bits = realloc(gi->bits,(gi->bmax+=20)*sizeof(struct bits));
215  gi->bits[gi->bcnt].dlen = gb->pt-gb->base;
216  gi->bits[gi->bcnt].data = malloc(gi->bits[gi->bcnt].dlen);
217  gi->bits[gi->bcnt].psub_index = -1;
218  memcpy(gi->bits[gi->bcnt].data,gb->base,gi->bits[gi->bcnt].dlen);
219  gb->pt = gb->base;
220  gi->justbroken = false;
221 }
222 
223 static int hashfunc(uint8 *data, int len) {
224  uint8 *end = data+len;
225  unsigned int hash = 0, r;
226 
227  while ( data<end ) {
228  r = (hash>>30)&3;
229  hash <<= 2;
230  hash = (hash|r)&0xffffffff;
231  hash ^= *data++;
232  }
233 return( hash%HSH_SIZE );
234 }
235 
236 static void BreakSubroutine(GrowBuf *gb,struct hintdb *hdb) {
237  GlyphInfo *gi;
238  struct potentialsubrs *ps;
239  int hash;
240  int pi;
241 
242  if ( hdb==NULL )
243 return;
244  gi = hdb->gi;
245  if ( gi==NULL )
246 return;
247  /* The stuff before the first moveto in a glyph (the header that sets */
248  /* the width, sets up the hints, counters, etc.) can't go into a subr */
249  if ( gi->bcnt==-1 ) {
250  gi->bcnt=0;
251  gi->justbroken = true;
252 return;
253  } else if ( gi->justbroken )
254 return;
255  /* Otherwise stuff everything in the growbuffer into a subr */
256  hash = hashfunc(gb->base,gb->pt-gb->base);
257  ps = NULL;
258  for ( pi=gi->hashed[hash]; pi!=-1; pi=gi->psubrs[pi].next ) {
259  ps = &gi->psubrs[pi];
260  if ( ps->len==gb->pt-gb->base && memcmp(ps->data,gb->base,gb->pt-gb->base)==0 )
261  break;
262  }
263  if ( pi==-1 ) {
264  if ( gi->pcnt>=gi->pmax )
265  gi->psubrs = realloc(gi->psubrs,(gi->pmax+=gi->glyphcnt)*sizeof(struct potentialsubrs));
266  ps = &gi->psubrs[gi->pcnt];
267  memset(ps,0,sizeof(*ps)); /* set cnt to 0 */
268  ps->idx = gi->pcnt++;
269  ps->len = gb->pt-gb->base;
270  ps->data = malloc(ps->len);
271  memcpy(ps->data,gb->base,ps->len);
272  ps->next = gi->hashed[hash];
273  gi->hashed[hash] = ps->idx;
274  ps->fd = gi->active->fd;
275  ps->full_glyph_index = -1;
276  }
277  if ( ps->fd!=gi->active->fd )
278  ps->fd = -1; /* used in multiple cid sub-fonts */
279  gi->bits[gi->bcnt].psub_index = ps->idx;
280  ++ps->cnt;
281  gb->pt = gb->base;
282  ++gi->bcnt;
283  gi->justbroken = true;
284 }
285 
286 static void MoveSubrsToChar(GlyphInfo *gi) {
287  struct glyphbits *active;
288 
289  if ( gi==NULL )
290 return;
291  active = gi->active;
292  active->bcnt = gi->bcnt;
293  active->bits = malloc(active->bcnt*sizeof(struct bits));
294  memcpy(active->bits,gi->bits,active->bcnt*sizeof(struct bits));
295  gi->bcnt = 0;
296 }
297 
298 static int NumberHints(SplineChar *scs[MmMax], int instance_count) {
299  int i,j, cnt=-1;
300  StemInfo *s;
301 
302  for ( j=0; j<instance_count; ++j ) {
303  for ( s=scs[j]->hstem, i=0; s!=NULL; s=s->next ) {
304  if ( i<HntMax )
305  s->hintnumber = i++;
306  else
307  s->hintnumber = -1;
308  }
309  for ( s=scs[j]->vstem; s!=NULL; s=s->next ) {
310  if ( i<HntMax )
311  s->hintnumber = i++;
312  else
313  s->hintnumber = -1;
314  }
315  if ( cnt==-1 )
316  cnt = i;
317  else if ( cnt!=i )
318  IError("MM font with different hint counts");
319  }
320 return( cnt );
321 }
322 
324  int i;
325  SplineChar *sc;
326  RefChar *r;
327 
328  for ( i=0; i<sf->glyphcnt; ++i ) if ( (sc = sf->glyphs[i])!=NULL ) {
329  for ( r = sc->layers[layer].refs; r!=NULL; r=r->next )
330  r->justtranslated = (r->transform[0]==1 && r->transform[3]==1 &&
331  r->transform[1]==0 && r->transform[2]==0);
332  }
333 }
334 
335 /* ************************************************************************** */
336 /* ********************** Type1 PostScript CharStrings ********************** */
337 /* ************************************************************************** */
338 
339 
340 static void AddNumber(GrowBuf *gb, real pos, int round) {
341  int dodiv = 0;
342  int val;
343  unsigned char *str;
344 
345  if ( gb->pt+8>=gb->end )
346  GrowBuffer(gb);
347 
348  if ( !round && pos!=floor(pos) ) {
349  {
350  if ( rint(pos*64)/64 == pos ) {
351  pos *= 64;
352  dodiv = 64;
353  } else {
354  pos *= 1024;
355  dodiv = 1024;
356  }
357  }
358  }
359  pos = rint(pos);
360  if ( dodiv>0 && floor(pos)/dodiv == floor(pos/dodiv) ) {
361  pos = rint(pos/dodiv);
362  dodiv = 0;
363  }
364  val = pos;
365  str = gb->pt;
366 
367  if ( pos>=-107 && pos<=107 )
368  *str++ = val+139;
369  else if ( pos>=108 && pos<=1131 ) {
370  val -= 108;
371  *str++ = (val>>8)+247;
372  *str++ = val&0xff;
373  } else if ( pos>=-1131 && pos<=-108 ) {
374  val = -val;
375  val -= 108;
376  *str++ = (val>>8)+251;
377  *str++ = val&0xff;
378  } else {
379  *str++ = '\377';
380  *str++ = (val>>24)&0xff;
381  *str++ = (val>>16)&0xff;
382  *str++ = (val>>8)&0xff;
383  *str++ = val&0xff;
384  }
385  if ( dodiv ) {
386  if ( dodiv<107 )
387  *str++ = dodiv+139;
388  else {
389  dodiv -= 108;
390  *str++ = (dodiv>>8)+247;
391  *str++ = dodiv&0xff;
392  }
393  *str++ = 12; /* div (byte1) */
394  *str++ = 12; /* div (byte2) */
395  }
396  gb->pt = str;
397 }
398 
399 /* When doing a multiple master font we have multiple instances of the same data */
400 /* which must all be added, and then a call made to the appropriate blend routine */
401 /* This is complicated because all the data may not fit on the stack so we */
402 /* may need to make multiple calls */
403 static void AddData(GrowBuf *gb, bigreal data[MmMax][6], int instances, int num_coords,
404  int round) {
405  int allsame = true, alls[6];
406  int i,j, chunk,min,max,subr;
407 
408  for ( j=0; j<num_coords; ++j ) {
409  alls[j] = true;
410  for ( i=1; i<instances; ++i ) {
411  if ( data[i][j]!=data[0][j] ) {
412  alls[j] = false;
413  allsame = false;
414  break;
415  }
416  }
417  }
418 
419  if ( allsame ) { /* No need for blending */
420  /* Probably a normal font, but possible in an mm */
421  for ( j=0; j<num_coords; ++j )
422  AddNumber(gb,data[0][j],round);
423 return;
424  }
425 
426  chunk = 22/instances;
427  if ( chunk == 5 ) chunk = 4; /* No subroutine for 5 items */
428  min = 0;
429  while ( min<num_coords ) {
430  while ( min<num_coords && alls[min] ) {
431  AddNumber(gb,data[0][min],round);
432  ++min;
433  }
434  max = min+chunk;
435  if ( max>num_coords ) max = num_coords;
436  while ( max-1>min && alls[max-1] )
437  --max;
438  if ( max-min==5 ) max=min+4;
439  if ( min<max ) {
440  for ( j=min; j<max; ++j )
441  AddNumber(gb,data[0][j],round);
442  for ( j=min; j<max; ++j )
443  for ( i=1; i<instances; ++i )
444  AddNumber(gb,data[i][j]-data[0][j],round);
445  subr = (j-min) + 4;
446  if ( j-min==6 ) subr = 9;
447  AddNumber(gb,subr,round);
448  if ( gb->pt+1>=gb->end )
449  GrowBuffer(gb);
450  *gb->pt++ = 10; /* callsubr */
451  min = j;
452  }
453  }
454 }
455 
456 int CvtPsStem3(GrowBuf *gb, SplineChar *scs[MmMax], int instance_count,
457  int ishstem, int round) {
458  StemInfo *h1, *h2, *h3;
459  StemInfo _h1, _h2, _h3;
460  bigreal data[MmMax][6];
461  int i;
462  real off;
463 
464  for ( i=0; i<instance_count; ++i ) {
465  if ( (ishstem && scs[i]->hconflicts) || (!ishstem && scs[i]->vconflicts))
466 return( false );
467  h1 = ishstem ? scs[i]->hstem : scs[i]->vstem;
468  if ( h1==NULL || (h2 = h1->next)==NULL || (h3=h2->next)==NULL )
469 return( false );
470  if ( h3->next!=NULL )
471 return( false );
472  off = ishstem ? 0 : scs[i]->lsidebearing;
473  if ( h1->width<0 ) {
474  _h1 = *h1;
475  _h1.start += _h1.width;
476  _h1.width = -_h1.width;
477  h1 = &_h1;
478  }
479  if ( h2->width<0 ) {
480  _h2 = *h2;
481  _h2.start += _h2.width;
482  _h2.width = -_h2.width;
483  h2 = &_h2;
484  }
485  if ( h3->width<0 ) {
486  _h3 = *h3;
487  _h3.start += _h3.width;
488  _h3.width = -_h3.width;
489  h3 = &_h3;
490  }
491 
492  if ( h1->start>h2->start ) {
493  StemInfo *ht = h1; h1 = h2; h2 = ht;
494  }
495  if ( h1->start>h3->start ) {
496  StemInfo *ht = h1; h1 = h3; h3 = ht;
497  }
498  if ( h2->start>h3->start ) {
499  StemInfo *ht = h2; h2 = h3; h3 = ht;
500  }
501  if ( h1->width != h3->width )
502 return( false );
503  if ( (h2->start+h2->width/2) - (h1->start+h1->width/2) !=
504  (h3->start+h3->width/2) - (h2->start+h2->width/2) )
505 return( false );
506  data[i][0] = h1->start-off;
507  data[i][1] = h1->width;
508  data[i][2] = h2->start-off;
509  data[i][3] = h2->width;
510  data[i][4] = h3->start-off;
511  data[i][5] = h3->width;
512  }
513  if ( gb==NULL )
514 return( true );
515  AddData(gb,data,instance_count,6,round);
516  if ( gb->pt+3>=gb->end )
517  GrowBuffer(gb);
518  *(gb->pt)++ = 12;
519  *(gb->pt)++ = ishstem?2:1; /* h/v stem3 */
520 return( true );
521 }
522 
523 static int _SCNeedsSubsPts(SplineChar *sc,int layer) {
524  RefChar *ref;
525 
526  if ( sc->hstem==NULL && sc->vstem==NULL )
527 return( false );
528 
529  if ( sc->layers[layer].splines!=NULL )
530 return( sc->layers[layer].splines->first->hintmask==NULL );
531 
532  for ( ref = sc->layers[layer].refs; ref!=NULL; ref=ref->next )
533  if ( ref->layers[0].splines!=NULL )
534 return( ref->layers[0].splines->first->hintmask==NULL );
535 
536 return( false ); /* It's empty. that's easy. */
537 }
538 
540  if ( (format!=ff_mma && format!=ff_mmb) || sc->parent->mm==NULL ) {
541  if ( !sc->hconflicts && !sc->vconflicts )
542 return( false ); /* No conflicts, no swap-over points needed */
543 return( _SCNeedsSubsPts(sc,layer));
544  } else {
545  MMSet *mm = sc->parent->mm;
546  int i;
547  for ( i=0; i<mm->instance_count; ++i ) if ( sc->orig_pos<mm->instances[i]->glyphcnt ) {
548  if ( _SCNeedsSubsPts(mm->instances[i]->glyphs[sc->orig_pos],layer) )
549 return( true );
550  }
551 return( false );
552  }
553 }
554 
555 #ifdef FONTFORGE_CONFIG_PS_REFS_GET_SUBRS
556 static int AlwaysSeacable(SplineChar *sc,int flags) {
557  struct splinecharlist *d;
558  RefChar *r;
559 
560  if ( sc->parent->cidmaster!=NULL ) /* Can't use seac in CID fonts, no encoding */
561 return( false );
562  if ( flags&ps_flag_noseac )
563 return( false );
564 
565  for ( d=sc->dependents; d!=NULL; d = d->next ) {
566  if ( d->sc->layers[layer].splines!=NULL ) /* I won't deal with things with both splines and refs. */
567  continue; /* skip it */
568  for ( r=d->sc->layers[layer].refs; r!=NULL; r=r->next ) {
569  if ( !r->justtranslated )
570  break; /* Can't deal with it either way */
571  }
572  if ( r!=NULL ) /* Bad transform matrix */
573  continue; /* Can't handle either way, skip */
574 
575  for ( r=d->sc->layers[layer].refs; r!=NULL; r=r->next ) {
576  if ( r->adobe_enc==-1 )
577 return( false ); /* not seacable, but could go in subr */
578  }
579  r = d->sc->layers[layer].refs;
580  if ( r->next!=NULL && r->next->next!=NULL )
581 return( false ); /* seac only takes 2 glyphs */
582  if ( r->next!=NULL &&
583  ((r->transform[4]!=0 || r->transform[5]!=0 || r->sc->width!=d->sc->width) &&
584  (r->next->transform[4]!=0 || r->next->transform[5]!=0 || r->next->sc->width!=d->sc->width)))
585 return( false ); /* seac only allows one to be translated, and the untranslated one must have the right width */
586  if ( r->next==NULL &&
587  (r->transform[4]!=0 || r->transform[5]!=0 || r->sc->width!=d->sc->width))
588 return( false );
589  }
590  /* Either always can be represented by seac, or sometimes by neither */
591 return( true );
592 }
593 
594 /* normally we can't put a character with hint conflicts into a subroutine */
595 /* (because when we would have to invoke the hints within the subr and */
596 /* hints are expressed as absolute positions, so if the char has been */
597 /* translated we can't do the hints right). BUT if the character is not */
598 /* translated, and if it has the right lbearing, then the hints in the */
599 /* ref will match those in the character and we can use a subroutine for */
600 /* both */
601 /* If at least one ref fits our requirements then return true */
602 /* The same reasoning applies to flex hints. There are absolute expressions */
603 /* in them too. */
604 static int SpecialCaseConflicts(SplineChar *sc) {
605  struct splinecharlist *d;
606  RefChar *r;
607  DBounds sb, db;
608 
610  for ( d=sc->dependents; d!=NULL; d = d->next ) {
611  SplineCharFindBounds(d->sc,&db);
612  if ( db.minx != sb.minx )
613  continue;
614  for ( r=d->sc->layers[layer].refs; r!=NULL; r=r->next )
615  if ( r->sc == sc && r->justtranslated &&
616  r->transform[4]==0 && r->transform[5]==0 )
617 return( true );
618  }
619 return( false );
620 }
621 
622 static BasePoint *FigureStartStop(SplineChar *sc, GlyphInfo *gi ) {
623  int m, didfirst;
624  SplineChar *msc;
625  SplineSet *spl;
626  RefChar *r;
627  BasePoint *startstop;
628 
629  /* We need to know the location of the first point on the */
630  /* first path (need to rmoveto it, and the location of the */
631  /* last point on the last path (will need to move from it */
632  /* for the next component) */
633 
634  startstop = calloc(2*gi->instance_count,sizeof(BasePoint));
635  for ( m=0; m<gi->instance_count; ++m ) {
636  if ( gi->instance_count==1 || sc->parent->mm==NULL )
637  msc = sc;
638  else
639  msc = sc->parent->mm->instances[m]->glyphs[sc->orig_pos];
640  didfirst = false;
641  spl = msc->layers[layer].splines;
642  if ( spl!=NULL ) {
643  startstop[0] = spl->first->me;
644  didfirst = true;
645  while ( spl!=NULL ) {
646  /* Closepath does NOT set the current point */
647  /* Remember we reverse PostScript */
648  if ( spl->last==spl->first && spl->first->next!=NULL &&
649  spl->first->next->knownlinear )
650  startstop[1] = spl->first->next->to->me;
651  else
652  startstop[1] = spl->last->me;
653  spl = spl->next;
654  }
655  }
656  for ( r=msc->layers[layer].refs; r!=NULL; r=r->next ) {
657  spl = r->layers[0].splines;
658  if ( spl!=NULL ) {
659  if ( !didfirst )
660  startstop[0] = spl->first->me;
661  didfirst = true;
662  }
663  while ( spl!=NULL ) {
664  /* Closepath does NOT set the current point */
665  /* Remember we reverse PostScript */
666  if ( spl->last==spl->first && spl->first->next!=NULL &&
667  spl->first->next->knownlinear )
668  startstop[1] = spl->first->next->to->me;
669  else
670  startstop[1] = spl->last->me;
671  spl = spl->next;
672  }
673  }
674  }
675 return( startstop );
676 }
677 #endif /* FONTFORGE_CONFIG_PS_REFS_GET_SUBRS */
678 
680  int width, i;
681 
682  width = -2;
683  for ( i=0; i<sf->glyphcnt; ++i ) if ( SCWorthOutputting(sf->glyphs[i]) &&
684  (strcmp(sf->glyphs[i]->name,".notdef")!=0 || sf->glyphs[i]->layers[ly_fore].splines!=NULL)) {
685  /* Only trust the width of notdef if it's got some content */
686  /* (at least as far as fixed pitch determination goes) */
687  if ( width==-2 ) width = sf->glyphs[i]->width;
688  else if ( width!=sf->glyphs[i]->width ) {
689  width = -1;
690  break;
691  }
692  }
693 return(width);
694 }
695 
697  int width, i;
698  int k;
699  SplineFont *sf;
700 
701  if ( _sf->cidmaster!=NULL ) _sf = _sf->cidmaster;
702  width = -2;
703  k=0;
704  do {
705  sf = _sf->subfonts==NULL? _sf : _sf->subfonts[k];
706  for ( i=0; i<sf->glyphcnt; ++i ) if ( SCWorthOutputting(sf->glyphs[i]) &&
707  strcmp(sf->glyphs[i]->name,".null")!=0 &&
708  strcmp(sf->glyphs[i]->name,"nonmarkingreturn")!=0 &&
709  (strcmp(sf->glyphs[i]->name,".notdef")!=0 || sf->glyphs[i]->layers[ly_fore].splines!=NULL)) {
710  /* Only trust the width of notdef if it's got some content */
711  /* (at least as far as fixed pitch determination goes) */
712  if ( width==-2 ) width = sf->glyphs[i]->width;
713  else if ( width!=sf->glyphs[i]->width ) {
714  width = -1;
715  break;
716  }
717  }
718  ++k;
719  } while ( k<_sf->subfontcnt );
720 return(width);
721 }
722 
723 /* ************************************************************************** */
724 /* ********************** Type2 PostScript CharStrings ********************** */
725 /* ************************************************************************** */
726 
727 static real myround2(real pos, int round) {
728  if ( round )
729 return( rint(pos));
730 
731 return( rint(65536*pos)/65536 );
732 }
733 
734 static void AddNumber2(GrowBuf *gb, real pos, int round) {
735  int val, factor;
736  unsigned char *str;
737 
738  if ( gb->pt+5>=gb->end )
739  GrowBuffer(gb);
740 
741  pos = rint(65536*pos)/65536;
742  if ( round )
743  pos = rint(pos);
744 
745  str = gb->pt;
746  if ( pos>32767.99 || pos<-32768 ) {
747  /* same logic for big ints and reals */
748  if ( pos>0x3fffffff || pos<-0x40000000 ) {
749  LogError( _("Number out of range: %g in type2 output (must be [-65536,65535])\n"),
750  pos );
751  if ( pos>0 ) pos = 0x3fffffff; else pos = -0x40000000;
752  }
753  for ( factor=2; factor<32768; factor<<=2 )
754  if ( pos/factor<32767.99 && pos/factor>-32768 )
755  break;
756  AddNumber2(gb,pos/factor,false);
757  AddNumber2(gb,factor,false);
758  if ( gb->pt+2>=gb->end )
759  GrowBuffer(gb);
760  *(gb->pt++) = 0x0c; /* Multiply operator */
761  *(gb->pt++) = 0x18;
762  } else if ( pos!=floor(pos )) {
763  val = pos*65536;
764  *str++ = '\377';
765  *str++ = (val>>24)&0xff;
766  *str++ = (val>>16)&0xff;
767  *str++ = (val>>8)&0xff;
768  *str++ = val&0xff;
769  } else {
770  val = rint(pos);
771  if ( pos>=-107 && pos<=107 )
772  *str++ = val+139;
773  else if ( pos>=108 && pos<=1131 ) {
774  val -= 108;
775  *str++ = (val>>8)+247;
776  *str++ = val&0xff;
777  } else if ( pos>=-1131 && pos<=-108 ) {
778  val = -val;
779  val -= 108;
780  *str++ = (val>>8)+251;
781  *str++ = val&0xff;
782  } else {
783  *str++ = 28;
784  *str++ = (val>>8)&0xff;
785  *str++ = val&0xff;
786  }
787  }
788  gb->pt = str;
789 }
790 
791 static void AddMask2(GrowBuf *gb,uint8 mask[12],int cnt, int oper) {
792  int i;
793 
794  if ( gb->pt+1+((cnt+7)>>3)>=gb->end )
795  GrowBuffer(gb);
796  *gb->pt++ = oper; /* hintmask,cntrmask */
797  for ( i=0; i< ((cnt+7)>>3); ++i )
798  *gb->pt++ = mask[i];
799 }
800 
801 static void CounterHints2(GrowBuf *gb, SplineChar *sc, int hcnt) {
802  int i;
803 
804  for ( i=0; i<sc->countermask_cnt; ++i )
805  AddMask2(gb,sc->countermasks[i],hcnt,20); /* cntrmask */
806 }
807 
808 static int HintSetup2(GrowBuf *gb,struct hintdb *hdb, SplinePoint *to, int break_subr ) {
809 
810  /* We might get a point with a hintmask in a glyph with no conflicts */
811  /* (ie. the initial point when we return to it at the end of the splineset*/
812  /* in that case hdb->cnt will be 0 and we should ignore it */
813  /* components in subroutines depend on not having any hintmasks */
814  if ( to->hintmask==NULL || hdb->cnt==0 || hdb->noconflicts || hdb->skiphm )
815 return( false );
816 
817  if ( memcmp(hdb->mask,*to->hintmask,(hdb->cnt+7)/8)==0 )
818 return( false );
819 
820  if ( break_subr )
821  BreakSubroutine(gb,hdb);
822 
823  AddMask2(gb,*to->hintmask,hdb->cnt,19); /* hintmask */
824  memcpy(hdb->mask,*to->hintmask,sizeof(HintMask));
825  hdb->donefirsthm = true;
826  if ( break_subr )
827  StartNextSubroutine(gb,hdb);
828 return( true );
829 }
830 
831 static void moveto2(GrowBuf *gb,struct hintdb *hdb,SplinePoint *to, int round) {
832  BasePoint temp, *tom;
833 
834  if ( gb->pt+18 >= gb->end )
835  GrowBuffer(gb);
836 
837  BreakSubroutine(gb,hdb);
838  HintSetup2(gb,hdb,to,false);
839  tom = &to->me;
840  if ( round ) {
841  temp.x = rint(tom->x);
842  temp.y = rint(tom->y);
843  tom = &temp;
844  }
845  if ( hdb->current.x==tom->x ) {
846  AddNumber2(gb,tom->y-hdb->current.y,round);
847  *(gb->pt)++ = 4; /* v move to */
848  } else if ( hdb->current.y==tom->y ) {
849  AddNumber2(gb,tom->x-hdb->current.x,round);
850  *(gb->pt)++ = 22; /* h move to */
851  } else {
852  AddNumber2(gb,tom->x-hdb->current.x,round);
853  AddNumber2(gb,tom->y-hdb->current.y,round);
854  *(gb->pt)++ = 21; /* r move to */
855  }
856  hdb->current.x = rint(32768*tom->x)/32768;
857  hdb->current.y = rint(32768*tom->y)/32768;
858  StartNextSubroutine(gb,hdb);
859 }
860 
861 static Spline *lineto2(GrowBuf *gb,struct hintdb *hdb,Spline *spline, Spline *done, int round) {
862  int cnt, hv, hvcnt;
863  Spline *test, *lastgood, *lasthvgood;
864  BasePoint temp1, temp2, *tom, *fromm;
865  int donehm;
866 
867  lastgood = NULL;
868  for ( test=spline, cnt=0; test->knownlinear && cnt<15; ) {
869  ++cnt;
870  lastgood = test;
871  test = test->to->next;
872  /* it will be smaller to use a closepath operator so ignore the */
873  /* ultimate spline */
874  if ( test==done || test==NULL || test->to->next==done )
875  break;
876  }
877 
878  HintSetup2(gb,hdb,spline->to,true);
879 
880  hv = -1; hvcnt=1; lasthvgood = NULL;
881  if ( spline->from->me.x==spline->to->me.x )
882  hv = 1; /* Vertical */
883  else if ( spline->from->me.y==spline->to->me.y )
884  hv = 0; /* Horizontal */
885  donehm = true;
886  if ( hv!=-1 ) {
887  lasthvgood = spline; hvcnt = 1;
888  if ( cnt!=1 ) {
889  for ( test=spline->to->next; test!=NULL ; test = test->to->next ) {
890  fromm = &test->from->me;
891  if ( round ) {
892  temp2.x = rint(fromm->x);
893  temp2.y = rint(fromm->y);
894  fromm = &temp2;
895  }
896  tom = &test->to->me;
897  if ( round ) {
898  temp1.x = rint(tom->x);
899  temp1.y = rint(tom->y);
900  tom = &temp1;
901  }
902  if ( hv==1 && tom->y==fromm->y )
903  hv = 0;
904  else if ( hv==0 && tom->x==fromm->x )
905  hv = 1;
906  else
907  break;
908  lasthvgood = test;
909  ++hvcnt;
910  if ( test==lastgood )
911  break;
912  }
913  }
914  donehm = true;
915  if ( hvcnt==cnt || hvcnt>=2 ) {
916  /* It's more efficient to do some h/v linetos */
917  for ( test=spline; ; test = test->to->next ) {
918  if ( !donehm && test->to->hintmask!=NULL )
919  break;
920  donehm = false;
921  fromm = &test->from->me;
922  if ( round ) {
923  temp2.x = rint(fromm->x);
924  temp2.y = rint(fromm->y);
925  fromm = &temp2;
926  }
927  tom = &test->to->me;
928  if ( round ) {
929  temp1.x = rint(tom->x);
930  temp1.y = rint(tom->y);
931  tom = &temp1;
932  }
933  if ( fromm->x==tom->x )
934  AddNumber2(gb,tom->y-fromm->y,round);
935  else
936  AddNumber2(gb,tom->x-fromm->x,round);
937  hdb->current.x = rint(32768*tom->x)/32768;
938  hdb->current.y = rint(32768*tom->y)/32768;
939  if ( test==lasthvgood ) {
940  test = test->to->next;
941  break;
942  }
943  }
944  if ( gb->pt+1 >= gb->end )
945  GrowBuffer(gb);
946  *(gb->pt)++ = spline->from->me.x==spline->to->me.x? 7 : 6;
947 return( test );
948  }
949  }
950 
951  for ( test=spline; test!=NULL; test = test->to->next ) {
952  if ( !donehm && test->to->hintmask!=NULL )
953  break;
954  donehm = false;
955  fromm = &test->from->me;
956  if ( round ) {
957  temp2.x = rint(fromm->x);
958  temp2.y = rint(fromm->y);
959  fromm = &temp2;
960  }
961  tom = &test->to->me;
962  if ( round ) {
963  temp1.x = rint(tom->x);
964  temp1.y = rint(tom->y);
965  tom = &temp1;
966  }
967  AddNumber2(gb,tom->x-fromm->x,round);
968  AddNumber2(gb,tom->y-fromm->y,round);
969  hdb->current.x = rint(32768*tom->x)/32768;
970  hdb->current.y = rint(32768*tom->y)/32768;
971  if ( test==lastgood ) {
972  test = test->to->next;
973  break;
974  }
975  }
976  if ( gb->pt+1 >= gb->end )
977  GrowBuffer(gb);
978  *(gb->pt)++ = 5; /* r line to */
979 return( test );
980 }
981 
982 static Spline *curveto2(GrowBuf *gb,struct hintdb *hdb,Spline *spline, Spline *done, int round) {
983  int cnt=0, hv;
984  Spline *first;
986  int donehm;
987 
988  HintSetup2(gb,hdb,spline->to,true);
989 
990  hv = -1;
991  if ( hdb->current.x==myround2(spline->from->nextcp.x,round) &&
993  hv = 1;
994  else if ( hdb->current.y==myround2(spline->from->nextcp.y,round) &&
996  hv = 0;
997  donehm = true;
998  if ( hv!=-1 ) {
999  first = spline; start = hdb->current;
1000  while (
1001  (hv==1 && hdb->current.x==myround2(spline->from->nextcp.x,round) &&
1003  (hv==0 && hdb->current.y==myround2(spline->from->nextcp.y,round) &&
1005  if ( !donehm && spline->to->hintmask!=NULL )
1006  break;
1007  donehm = false;
1008  if ( hv==1 ) {
1013  hv = 0;
1014  } else {
1019  hv = 1;
1020  }
1021  hdb->current.x = myround2(spline->to->me.x,round);
1022  hdb->current.y = myround2(spline->to->me.y,round);
1023  ++cnt;
1024  spline = spline->to->next;
1025  if ( spline==done || spline==NULL || cnt>9 || spline->knownlinear )
1026  break;
1027  }
1028  if ( gb->pt+1 >= gb->end )
1029  GrowBuffer(gb);
1030  *(gb->pt)++ = ( start.x==myround2(first->from->nextcp.x,round) && myround2(first->to->prevcp.y,round)==myround2(first->to->me.y,round) )?
1031  30:31; /* vhcurveto:hvcurveto */
1032 return( spline );
1033  }
1034  while ( cnt<6 ) {
1035  if ( !donehm && spline->to->hintmask!=NULL )
1036  break;
1037  donehm = false;
1038  hv = -1;
1039  if ( hdb->current.x==myround2(spline->from->nextcp.x,round) &&
1041  spline->to->next!=NULL &&
1044  break;
1045  else if ( hdb->current.y==myround2(spline->from->nextcp.y,round) &&
1047  spline->to->next!=NULL &&
1050  break;
1057  hdb->current.x = myround2(spline->to->me.x,round);
1058  hdb->current.y = myround2(spline->to->me.y,round);
1059  ++cnt;
1060  spline = spline->to->next;
1061  if ( spline==done || spline==NULL || spline->knownlinear )
1062  break;
1063  }
1064  if ( gb->pt+1 >= gb->end )
1065  GrowBuffer(gb);
1066  *(gb->pt)++ = 8; /* rrcurveto */
1067 return( spline );
1068 }
1069 
1070 static void flexto2(GrowBuf *gb,struct hintdb *hdb,Spline *pspline,int round) {
1071  BasePoint *c0, *c1, *mid, *end, *nc0, *nc1;
1072  Spline *nspline;
1073 
1074  c0 = &pspline->from->nextcp;
1075  c1 = &pspline->to->prevcp;
1076  mid = &pspline->to->me;
1077  nspline = pspline->to->next;
1078  nc0 = &nspline->from->nextcp;
1079  nc1 = &nspline->to->prevcp;
1080  end = &nspline->to->me;
1081 
1082  HintSetup2(gb,hdb,nspline->to,true);
1083 
1084  if ( myround2(c0->y,round)==hdb->current.y && myround2(nc1->y,round)==hdb->current.y &&
1085  myround2(end->y,round)==hdb->current.y &&
1086  myround2(c1->y,round)==myround2(mid->y,round) && myround2(nc0->y,round)==myround2(mid->y,round) ) {
1087  if ( gb->pt+7*6+2 >= gb->end )
1088  GrowBuffer(gb);
1089  AddNumber2(gb,myround2(c0->x,round)-hdb->current.x,round);
1092  AddNumber2(gb,myround2(mid->x,round)-myround2(c1->x,round),round);
1093  AddNumber2(gb,myround2(nc0->x,round)-myround2(mid->x,round),round);
1094  AddNumber2(gb,myround2(nc1->x,round)-myround2(nc0->x,round),round);
1095  AddNumber2(gb,myround2(end->x,round)-myround2(nc1->x,round),round);
1096  *gb->pt++ = 12; *gb->pt++ = 34; /* hflex */
1097  } else {
1098  if ( gb->pt+11*6+2 >= gb->end )
1099  GrowBuffer(gb);
1100  AddNumber2(gb,myround2(c0->x,round)-hdb->current.x,round);
1101  AddNumber2(gb,myround2(c0->y,round)-hdb->current.y,round);
1104  AddNumber2(gb,myround2(mid->x,round)-myround2(c1->x,round),round);
1105  AddNumber2(gb,myround2(mid->y,round)-myround2(c1->y,round),round);
1106  AddNumber2(gb,myround2(nc0->x,round)-myround2(mid->x,round),round);
1107  AddNumber2(gb,myround2(nc0->y,round)-myround2(mid->y,round),round);
1108  AddNumber2(gb,myround2(nc1->x,round)-myround2(nc0->x,round),round);
1109  AddNumber2(gb,myround2(nc1->y,round)-myround2(nc0->y,round),round);
1110  if ( hdb->current.y==myround2(end->y,round) )
1111  AddNumber2(gb,myround2(end->x,round)-myround2(nc1->x,round),round);
1112  else
1113  AddNumber2(gb,myround2(end->y,round)-myround2(nc1->y,round),round);
1114  *gb->pt++ = 12; *gb->pt++ = 37; /* flex1 */
1115  }
1116 
1117  hdb->current.x = rint(32768*end->x)/32768;
1118  hdb->current.y = rint(32768*end->y)/32768;
1119 }
1120 
1122  struct hintdb *hdb, int is_order2,int round ) {
1123  Spline *spline, *first;
1124  SplinePointList temp, *freeme = NULL;
1125  int unhinted = true;;
1126 
1127  if ( is_order2 )
1128  freeme = spl = SplineSetsPSApprox(spl);
1129 
1130  for ( ; spl!=NULL; spl = spl->next ) {
1131  first = NULL;
1132  SplineSetReverse(spl);
1133  /* PostScript and TrueType store their splines in in reverse */
1134  /* orientations. Annoying. Oh well. I shall adopt TrueType and */
1135  /* If I reverse the PS splinesets after reading them in, and then */
1136  /* again when saving them out, all should be well */
1137  if ( spl->first->flexy || spl->first->flexx ) {
1138  /* can't handle a flex (mid) point as the first point. rotate the */
1139  /* list by one, this is possible because only closed paths have */
1140  /* points marked as flex, and because we can't have two flex mid- */
1141  /* points in a row */
1142  if ( spl->first->hintmask==NULL || spl->first->next->to->hintmask!=NULL ) {
1143  /* But we can't rotate it if we expect it to provide us with */
1144  /* a hintmask. */
1145  temp = *spl;
1146  temp.first = temp.last = spl->first->next->to;
1147  spl = &temp;
1148  }
1149  if ( spl->first->flexy || spl->first->flexx ) {
1150  /* If we couldn't rotate, or if we rotated to something that */
1151  /* also is flexible, then just turn off flex. That's safe */
1152  spl->first->flexx = spl->first->flexy = false;
1153  }
1154  }
1155  if ( unhinted && hdb->cnt>0 && spl->first->hintmask!=NULL ) {
1156  hdb->mask[0] = ~(*spl->first->hintmask)[0]; /* Make it different */
1157  unhinted = false;
1158  }
1159  moveto2(gb,hdb,spl->first,round);
1160  for ( spline = spl->first->next; spline!=NULL && spline!=first; ) {
1161  if ( first==NULL ) first = spline;
1162  else if ( first->from==spline->to )
1163  hdb->skiphm = true;
1164  if ( spline->to->flexx || spline->to->flexy ) {
1165  flexto2(gb,hdb,spline,round); /* does two adjacent splines */
1166  spline = spline->to->next->to->next;
1167  } else if ( spline->knownlinear && spline->to == spl->first )
1168  /* In Type2 we don't even need a closepath to finish this off */
1169  /* (which is good, because there isn't a close path) */
1170  break;
1171  else if ( spline->knownlinear )
1172  spline = lineto2(gb,hdb,spline,first,round);
1173  else
1174  spline = curveto2(gb,hdb,spline,first,round);
1175  }
1176  hdb->skiphm = false;
1177  /* No closepath oper in type2 fonts, it's implied */
1178  SplineSetReverse(spl);
1179  /* Of course, I have to Reverse again to get back to my convention after*/
1180  /* saving */
1181  }
1182  SplinePointListsFree(freeme);
1183 }
1184 
1185 bool equalWithTolerence( real a, real b, real tolerence )
1186 {
1187 // printf("equalWithTolerence(1) a:%f b:%f tol:%f\n", a, b, tolerence );
1188 // printf("equalWithTolerence(2) a:%lf b:%lf tol:%lf\n", a, b, tolerence );
1189 
1190  if( tolerence == 0.0 )
1191  return a == b;
1192 
1193  return( (b - tolerence < a)
1194  && (b + tolerence > a ));
1195 }
1196 
1197 static void DumpHints(GrowBuf *gb,StemInfo *h,int oper,int midoper,int round) {
1198  real last = 0, cur;
1199  int cnt;
1200 
1201  if ( h==NULL )
1202 return;
1203  cnt = 0;
1204  while ( h && h->hintnumber!=-1 ) {
1205  /* Type2 hints do not support negative widths except in the case of */
1206  /* ghost (now called edge) hints */
1207  if ( cnt>24-2 ) { /* stack max = 48 numbers, => 24 hints, leave a bit of slop for the width */
1208  if ( gb->pt+1>=gb->end )
1209  GrowBuffer(gb);
1210  *gb->pt++ = midoper;
1211  cnt = 0;
1212  }
1213  cur = myround2(h->start,round) + myround2(h->width,round);
1214  if ( h->width<0 ) {
1215  AddNumber2(gb,cur-last,round);
1216  AddNumber2(gb,-myround2(h->width,round),round);
1217  cur -= myround2(h->width,round);
1218  } else if ( h->ghost ) {
1220  AddNumber2(gb,myround2(h->start,round)-last+20,round);
1221  AddNumber2(gb,-20,round);
1222  cur = myround2(h->start,round);
1223  } else {
1224  AddNumber2(gb,myround2(h->start+21,round)-last,round);
1225  AddNumber2(gb,-21,round);
1226  cur = myround2(h->start+21,round)-21;
1227  }
1228  } else {
1229  AddNumber2(gb,myround2(h->start,round)-last,round);
1230  AddNumber2(gb,myround2(h->width,round),round);
1231  }
1232  last = cur;
1233  h = h->next;
1234  ++cnt;
1235  }
1236  if ( oper!=-1 ) {
1237  if ( gb->pt+1>=gb->end )
1238  GrowBuffer(gb);
1239  *gb->pt++ = oper;
1240  }
1241 }
1242 
1243 static void DumpRefsHints(GrowBuf *gb, struct hintdb *hdb,RefChar *cur,StemInfo *h,StemInfo *v,
1244  BasePoint *trans, int round,int layer) {
1245  uint8 masks[12];
1246  int cnt, sets=0;
1247  StemInfo *rs;
1248 
1249  /* trans has already been rounded (whole char is translated by an integral amount) */
1250 
1251  /* If we have a subroutine containing conflicts, then its hints will match*/
1252  /* ours exactly, and we can use its hintmasks directly */
1253  if (( cur->sc->hconflicts || cur->sc->vconflicts ) &&
1254  cur->sc->layers[layer].splines!=NULL &&
1255  cur->sc->layers[layer].splines->first->hintmask!=NULL ) {
1256  AddMask2(gb,*cur->sc->layers[layer].splines->first->hintmask,hdb->cnt,19); /* hintmask */
1257  hdb->donefirsthm = true;
1258  memcpy(hdb->mask,*cur->sc->layers[layer].splines->first->hintmask,sizeof(HintMask));
1259 return;
1260  }
1261 
1262  if ( h==NULL && v==NULL )
1263  IError("hintmask invoked when there are no hints");
1264  memset(masks,'\0',sizeof(masks));
1265  cnt = 0;
1266  while ( h!=NULL && h->hintnumber>=0 ) {
1267  /* Horizontal stems are defined by vertical bounds */
1268  real pos = (round ? rint(h->start) : h->start) - trans->y;
1269  for ( rs = cur->sc->hstem; rs!=NULL; rs=rs->next ) {
1270  real rpos = round ? rint(rs->start) : rs->start;
1271  if ( rpos==pos && (round ? (rint(rs->width)==rint(h->width)) : (rs->width==h->width)) ) {
1272  masks[h->hintnumber>>3] |= 0x80>>(h->hintnumber&7);
1273  ++sets;
1274  break;
1275  } else if ( rpos>pos )
1276  break;
1277  }
1278  h = h->next; ++cnt;
1279  }
1280  while ( v!=NULL && v->hintnumber>=0 ) {
1281  real pos = (round ? rint(v->start) : v->start) - trans->x;
1282  for ( rs = cur->sc->vstem; rs!=NULL; rs=rs->next ) {
1283  real rpos = round ? rint(rs->start) : rs->start;
1284  if ( rpos==pos && (round ? (rint(rs->width)==rint(v->width)) : (rs->width==v->width)) ) {
1285  masks[v->hintnumber>>3] |= 0x80>>(v->hintnumber&7);
1286  ++sets;
1287  break;
1288  } else if ( rpos>pos )
1289  break;
1290  }
1291  v = v->next; ++cnt;
1292  }
1293  BreakSubroutine(gb,hdb);
1294  hdb->donefirsthm = true;
1295  /* if ( sets!=0 ) */ /* First ref will need a hintmask even if it has no hints (if there are conflicts) */
1296  AddMask2(gb,masks,cnt,19); /* hintmask */
1297 }
1298 
1299 static void DummyHintmask(GrowBuf *gb,struct hintdb *hdb) {
1300  HintMask hm;
1301 
1302  memset(hm,0,sizeof(hm));
1303  if ( hdb->cnt!=0 ) {
1304  BreakSubroutine(gb,hdb);
1305  hdb->donefirsthm = true;
1306  AddMask2(gb,hm,hdb->cnt,19); /* hintmask */
1307  }
1308 }
1309 
1310 static void SetTransformedHintMask(GrowBuf *gb,struct hintdb *hdb,
1312  HintMask hm;
1313 
1314  if ( HintMaskFromTransformedRef(ref,trans,sc,&hm)!=NULL ) {
1315  BreakSubroutine(gb,hdb);
1316  hdb->donefirsthm = true;
1317  AddMask2(gb,hm,hdb->cnt,19); /* hintmask */
1318  } else if ( !hdb->donefirsthm )
1319  DummyHintmask(gb,hdb);
1320 }
1321 
1322 static void ExpandRef2(GrowBuf *gb, SplineChar *sc, struct hintdb *hdb,
1323  RefChar *r, BasePoint *trans,
1324  struct pschars *subrs, int round,int layer) {
1325  BasePoint *bpt;
1326  BasePoint temp, rtrans;
1327  GlyphInfo *gi;
1328  /* The only refs I deal with here have no hint conflicts within them */
1329 
1330  rtrans.x = r->transform[4]+trans->x;
1331  rtrans.y = r->transform[5]+trans->y;
1332  if ( round ) {
1333  rtrans.x = rint(rtrans.x);
1334  rtrans.y = rint(rtrans.y);
1335  }
1336 
1337  BreakSubroutine(gb,hdb);
1338  if ( hdb->cnt>0 && !hdb->noconflicts )
1339  DumpRefsHints(gb,hdb,r,sc->hstem,sc->vstem,&rtrans,round,layer);
1340 
1341  /* Translate from end of last character to where this one should */
1342  /* start (we must have one moveto operator to start off, none */
1343  /* in the subr) */
1344  bpt = hdb->gi->psubrs[r->sc->lsidebearing].startstop;
1345  temp.x = bpt[0].x+rtrans.x;
1346  temp.y = bpt[0].y+rtrans.y;
1347  if ( hdb->current.x!=temp.x )
1348  AddNumber2(gb,temp.x-hdb->current.x,round);
1349  if ( hdb->current.y!=temp.y || hdb->current.x==temp.x )
1350  AddNumber2(gb,temp.y-hdb->current.y,round);
1351  if ( gb->pt+1>=gb->end )
1352  GrowBuffer(gb);
1353  *gb->pt++ = hdb->current.x==temp.x?4: /* vmoveto */
1354  hdb->current.y==temp.y?22: /* hmoveto */
1355  21; /* rmoveto */
1356  if ( r->sc->lsidebearing==0x7fff )
1357  IError("Attempt to reference an unreferenceable glyph %s", r->sc->name );
1358 
1359  gi = hdb->gi;
1360  StartNextSubroutine(gb,hdb);
1361  gi->bits[gi->bcnt].psub_index = r->sc->lsidebearing;
1362  ++gi->bcnt;
1363  gi->justbroken = true;
1364  hdb->current.x = bpt[1].x+rtrans.x;
1365  hdb->current.y = bpt[1].y+rtrans.y;
1366 }
1367 
1368 static void RSC2PS2(GrowBuf *gb, SplineChar *base,SplineChar *rsc,
1369  struct hintdb *hdb, BasePoint *trans, struct pschars *subrs,
1370  int flags, int layer ) {
1371  BasePoint subtrans;
1372  int stationary = trans->x==0 && trans->y==0;
1373  RefChar *r, *unsafe=NULL;
1374  int unsafecnt=0, allwithouthints=true;
1375  int round = (flags&ps_flag_round)? true : false;
1376  StemInfo *oldh, *oldv;
1377  int hc, vc;
1378  SplineSet *freeme, *temp;
1379  int wasntconflicted = hdb->noconflicts;
1380 
1381  if ( flags&ps_flag_nohints ) {
1382  oldh = rsc->hstem; oldv = rsc->vstem;
1383  hc = rsc->hconflicts; vc = rsc->vconflicts;
1384  rsc->hstem = NULL; rsc->vstem = NULL;
1385  rsc->hconflicts = false; rsc->vconflicts = false;
1386  } else {
1387  for ( r=rsc->layers[layer].refs; r!=NULL; r=r->next ) {
1388  /* Ensure hintmask on refs are set correctly */
1389  if (SCNeedsSubsPts(r->sc, ff_otf, layer))
1390  SCFigureHintMasks(r->sc, layer);
1391 
1392  if ( !r->justtranslated )
1393  continue;
1394  if ( r->sc->hconflicts || r->sc->vconflicts ) {
1395  ++unsafecnt;
1396  unsafe = r;
1397  } else if ( r->sc->hstem!=NULL || r->sc->vstem!=NULL )
1398  allwithouthints = false;
1399  }
1400  if ( !stationary )
1401  allwithouthints = false;
1402  if ( allwithouthints && unsafe!=NULL && hdb->cnt!=NumberHints(&unsafe->sc,1))
1403  allwithouthints = false; /* There are other hints elsewhere in the base glyph */
1404  }
1405 
1406  if ( unsafe && allwithouthints ) {
1407  if ( unsafe->sc->lsidebearing!=0x7fff ) {
1408  ExpandRef2(gb,base,hdb,unsafe,trans,subrs,round,layer);
1409  } else if ( unsafe->transform[4]==0 && unsafe->transform[5]==0 )
1410  RSC2PS2(gb,base,unsafe->sc,hdb,trans,subrs,flags,layer);
1411  else
1412  unsafe = NULL;
1413  } else
1414  unsafe = NULL;
1415 
1416  /* What is the hintmask state here? It should not matter */
1417  freeme = NULL; temp = rsc->layers[layer].splines;
1418  if ( base!=rsc )
1419  temp = freeme = SPLCopyTranslatedHintMasks(temp,base,rsc,trans);
1420  CvtPsSplineSet2(gb,temp,hdb,rsc->layers[layer].order2,round);
1421  SplinePointListsFree(freeme);
1422 
1423  for ( r = rsc->layers[layer].refs; r!=NULL; r = r->next ) if ( r!=unsafe ) {
1424  if ( !r->justtranslated ) {
1425  if ( !r->sc->hconflicts && !r->sc->vconflicts && !hdb->noconflicts &&
1426  r->transform[1]==0 && r->transform[2]==0 &&
1427  r->transform[0]>0 && r->transform[3]>0 )
1429  if ( !hdb->donefirsthm )
1430  DummyHintmask(gb,hdb);
1432  CvtPsSplineSet2(gb,temp,hdb,rsc->layers[layer].order2,round);
1434  } else if ( r->sc->lsidebearing!=0x7fff &&
1435  ((flags&ps_flag_nohints) ||
1436  (!r->sc->hconflicts && !r->sc->vconflicts)) ) {
1438  } else {
1439  subtrans.x = trans->x + r->transform[4];
1440  subtrans.y = trans->y + r->transform[5];
1441  if ( !hdb->noconflicts && !r->sc->hconflicts && !r->sc->vconflicts) {
1443  hdb->noconflicts = true;
1444  }
1445  RSC2PS2(gb,base,r->sc,hdb,&subtrans,subrs,flags,layer);
1446  hdb->noconflicts = wasntconflicted;
1447  }
1448  }
1449 
1450  if ( flags&ps_flag_nohints ) {
1451  rsc->hstem = oldh; rsc->vstem = oldv;
1452  rsc->hconflicts = hc; rsc->vconflicts = vc;
1453  }
1454 }
1455 
1456 static unsigned char *SplineChar2PS2(SplineChar *sc,int *len, int nomwid,
1457  int defwid, struct pschars *subrs, int flags,
1458  GlyphInfo *gi) {
1459  GrowBuf gb;
1460  unsigned char *ret;
1461  struct hintdb hdb;
1462  StemInfo *oldh, *oldv;
1463  int hc, vc;
1464  SplineChar *scs[MmMax];
1465  int round = (flags&ps_flag_round)? true : false;
1466  HintMask *hm = NULL;
1467  BasePoint trans;
1468 
1469  if ( autohint_before_generate && sc->changedsincelasthinted &&
1470  !sc->manualhints && !(flags&ps_flag_nohints))
1474 
1475  if ( flags&ps_flag_nohints ) {
1476  oldh = sc->hstem; oldv = sc->vstem;
1477  hc = sc->hconflicts; vc = sc->vconflicts;
1478  sc->hstem = NULL; sc->vstem = NULL;
1479  sc->hconflicts = false; sc->vconflicts = false;
1480  } else if ( sc->layers[gi->layer].splines!=NULL && !sc->vconflicts &&
1481  !sc->hconflicts ) {
1482  hm = sc->layers[gi->layer].splines->first->hintmask;
1483  sc->layers[gi->layer].splines->first->hintmask = NULL;
1484  }
1485 
1486  memset(&gb,'\0',sizeof(gb));
1487 
1488  GrowBuffer(&gb);
1489 
1490  /* store the width on the stack */
1491  if ( sc->width==defwid )
1492  /* Don't need to do anything for the width */;
1493  else
1494  AddNumber2(&gb,sc->width-nomwid,round);
1495 
1496  memset(&trans,'\0',sizeof(trans));
1497  memset(&hdb,'\0',sizeof(hdb));
1498  hdb.scs = scs;
1499  hdb.gi = gi;
1500  if ( gi!=NULL )
1501  gi->bcnt = -1;
1502  scs[0] = sc;
1503  hdb.noconflicts = !sc->hconflicts && !sc->vconflicts;
1504  hdb.cnt = NumberHints(hdb.scs,1);
1505  DumpHints(&gb,sc->hstem,sc->hconflicts || sc->vconflicts?18:1,
1506  sc->hconflicts || sc->vconflicts?18:1,round);
1507  DumpHints(&gb,sc->vstem,sc->hconflicts || sc->vconflicts?-1:3,
1508  sc->hconflicts || sc->vconflicts?23:3,round);
1509  CounterHints2(&gb, sc, hdb.cnt );
1510  RSC2PS2(&gb,sc,sc,&hdb,&trans,subrs,flags,gi->layer);
1511 
1512  if ( gi->bcnt==-1 ) { /* If it's whitespace */
1513  gi->bcnt = 0;
1514  StartNextSubroutine(&gb,&hdb);
1515  }
1516  BreakSubroutine(&gb,&hdb);
1518  ret = NULL;
1519 
1520  free(gb.base);
1521  if ( flags&ps_flag_nohints ) {
1522  sc->hstem = oldh; sc->vstem = oldv;
1523  sc->hconflicts = hc; sc->vconflicts = vc;
1524  } else if ( hm!=NULL )
1525  sc->layers[gi->layer].splines->first->hintmask = hm;
1526 return( ret );
1527 }
1528 
1529 static SplinePoint *LineTo(SplinePoint *last, int x, int y) {
1531  SplineMake3(last,sp);
1532 return( sp );
1533 }
1534 
1536  /* I'd always assumed that Type2 notdefs would look like type1 notdefs */
1537  /* but they don't, they look like truetype notdefs. And Ralf Stubner */
1538  /* points out that the spec says they should. So make a box here */
1539  int stem, ymax;
1540  SplineSet *inner, *ss;
1541  StemInfo *h, *hints;
1542 
1543  stem = (sf->ascent+sf->descent)/20;
1544  ymax = 2*sf->ascent/3;
1545 
1546  ss = chunkalloc(sizeof(SplineSet));
1547  ss->first = ss->last = SplinePointCreate(stem,0);
1548  ss->last = LineTo(ss->last,stem,ymax);
1549  ss->last = LineTo(ss->last,sc->width-stem,ymax);
1550  ss->last = LineTo(ss->last,sc->width-stem,0);
1551  SplineMake3(ss->last,ss->first);
1552  ss->last = ss->first;
1553 
1554  ss->next = inner = chunkalloc(sizeof(SplineSet));
1555  inner->first = inner->last = SplinePointCreate(2*stem,stem);
1556  inner->last = LineTo(inner->last,sc->width-2*stem,stem);
1557  inner->last = LineTo(inner->last,sc->width-2*stem,ymax-stem);
1558  inner->last = LineTo(inner->last,2*stem,ymax-stem);
1559  SplineMake3(inner->last,inner->first);
1560  inner->last = inner->first;
1561 
1562  sc->layers[layer].splines = ss;
1563 
1564  hints = chunkalloc(sizeof(StemInfo));
1565  hints->start = stem;
1566  hints->width = stem;
1567  hints->next = h = chunkalloc(sizeof(StemInfo));
1568  h->start = sc->width-2*stem;
1569  h->width = stem;
1570  sc->vstem = hints;
1571 
1572  hints = chunkalloc(sizeof(StemInfo));
1573  hints->start = 0;
1574  hints->width = stem;
1575  hints->next = h = chunkalloc(sizeof(StemInfo));
1576  h->start = ymax-stem;
1577  h->width = stem;
1578  sc->hstem = hints;
1579 }
1580 
1581 #ifdef FONTFORGE_CONFIG_PS_REFS_GET_SUBRS
1582 /* This char has hint conflicts. Check to see if we can put it into a subr */
1583 /* in spite of that. If there is at least one dependent character which: */
1584 /* refers to us without translating us */
1585 /* and all its other refs contain no hints at all */
1586 static int Type2SpecialCase(SplineChar *sc) {
1587  struct splinecharlist *d;
1588  RefChar *r;
1589 
1590  for ( d=sc->dependents; d!=NULL; d=d->next ) {
1591  for ( r=d->sc->layers[layer].refs; r!=NULL; r = r->next ) {
1592  if ( autohint_before_generate && r->sc!=NULL &&
1593  r->sc->changedsincelasthinted && !r->sc->manualhints )
1594  SplineCharAutoHint(r->sc,NULL);
1595  if ( r->transform[0]!=1 || r->transform[1]!=0 ||
1596  r->transform[2]!=0 || r->transform[3]!=1 )
1597  break;
1598  if ( r->sc!=sc && (r->sc->hstem!=NULL || r->sc->vstem!=NULL))
1599  break;
1600  if ( r->sc==sc && (r->transform[4]!=0 || r->transform[5]!=0))
1601  break;
1602  }
1603  if ( r==NULL )
1604 return( true );
1605  }
1606 return( false );
1607 }
1608 #endif /* FONTFORGE_CONFIG_PS_REFS_GET_SUBRS */
1609 
1610 /* Mark those glyphs which can live totally in subrs */
1611 static void SplineFont2FullSubrs2(int flags,GlyphInfo *gi) {
1612  int i;
1613  SplineChar *sc;
1614 #ifdef FONTFORGE_CONFIG_PS_REFS_GET_SUBRS
1615  int cc;
1616  RefChar *r;
1617  struct potentialsubrs *ps;
1618  SplineSet *spl;
1619 #endif /* FONTFORGE_CONFIG_PS_REFS_GET_SUBRS */
1620 
1622  SplineFontAutoHintRefs(gi->sf,gi->layer);
1623 
1624  for ( i=0; i<gi->glyphcnt; ++i ) if ( (sc=gi->gb[i].sc)!=NULL )
1625  sc->lsidebearing = 0x7fff;
1626 
1627 /* This code allows us to put whole glyphs into subroutines */
1628 /* I found slight improvements in space on some fonts, and large increases */
1629 /* in others. So I'm disabling it for now */
1630 #ifdef FONTFORGE_CONFIG_PS_REFS_GET_SUBRS
1631  /* We don't allow refs to refs. It's too complex */
1632  for ( i=0; i<gi->glyphcnt; ++i ) if ( (sc=gi->gb[i].sc)!=NULL ) {
1633  if ( SCWorthOutputting(sc) &&
1634  (( sc->layers[layer].refs==NULL && sc->dependents!=NULL &&
1635  ( (!sc->hconflicts && !sc->vconflicts) ||
1636  Type2SpecialCase(sc)) ) )) {
1637  /* if the glyph is a single contour with no hintmasks then */
1638  /* our single contour code will find it. If we do it here too */
1639  /* we'll get a subr which points to another subr. Very dull and */
1640  /* a waste of space */
1641  cc = 0;
1642  for ( spl=sc->layers[layer].splines; spl!=NULL; spl=spl->next )
1643  ++cc;
1644  for ( r= sc->layers[layer].refs; r!=NULL && cc<2 ; r=r->next ) {
1645  for ( spl=r->layers[0].splines; spl!=NULL; spl=spl->next )
1646  ++cc;
1647  }
1648  if ( cc<2 )
1649  continue;
1650  /* Put the */
1651  /* character into a subr if it is referenced by other characters */
1652  if ( gi->pcnt>=gi->pmax )
1653  gi->psubrs = realloc(gi->psubrs,(gi->pmax+=gi->glyphcnt)*sizeof(struct potentialsubrs));
1654  ps = &gi->psubrs[gi->pcnt];
1655  memset(ps,0,sizeof(*ps)); /* set cnt to 0 */
1656  ps->idx = gi->pcnt++;
1657  ps->full_glyph_index = i;
1658  sc->lsidebearing = gi->pcnt-1;
1659  ps->startstop = FigureStartStop(sc,gi);
1660  }
1661  }
1662 #endif /* FONTFORGE_CONFIG_PS_REFS_GET_SUBRS */
1663 }
1664 
1665 struct pschars *SplineFont2ChrsSubrs2(SplineFont *sf, int nomwid, int defwid,
1666  const int *bygid, int cnt, int flags, struct pschars **_subrs, int layer) {
1667  struct pschars *subrs, *chrs;
1668  int i,j,k,scnt;
1669  SplineChar *sc;
1670  GlyphInfo gi;
1671  SplineChar dummynotdef;
1672 
1675 
1676  memset(&gi,0,sizeof(gi));
1677  memset(&gi.hashed,-1,sizeof(gi.hashed));
1678  gi.instance_count = 1;
1679  gi.sf = sf;
1680  gi.layer = layer;
1681  gi.glyphcnt = cnt;
1682  gi.bygid = bygid;
1683  gi.gb = calloc(cnt,sizeof(struct glyphbits));
1684  gi.pmax = 3*cnt;
1685  gi.psubrs = malloc(gi.pmax*sizeof(struct potentialsubrs));
1686  for ( i=0; i<cnt; ++i ) {
1687  int gid = bygid[i];
1688  if ( i==0 && gid==-1 ) {
1689  sc = &dummynotdef;
1690  memset(sc,0,sizeof(dummynotdef));
1691  dummynotdef.name = ".notdef";
1692  dummynotdef.parent = sf;
1693  dummynotdef.layer_cnt = sf->layer_cnt;
1694  dummynotdef.layers = calloc(sf->layer_cnt,sizeof(Layer));
1695  dummynotdef.width = SFOneWidth(sf);
1696  if ( dummynotdef.width==-1 )
1697  dummynotdef.width = (sf->ascent+sf->descent)/2;
1698  Type2NotDefSplines(sf,&dummynotdef,layer);
1699  } else if ( gid!=-1 )
1700  sc = sf->glyphs[gid];
1701  else
1702  continue;
1703  gi.gb[i].sc = sc;
1704  if ( autohint_before_generate && sc!=NULL &&
1705  sc->changedsincelasthinted && !sc->manualhints &&
1708  sc->lsidebearing = 0x7fff;
1709  }
1712 
1713  for ( i=0; i<cnt; ++i ) {
1714  if ( (sc = gi.gb[i].sc)==NULL )
1715  continue;
1716  gi.active = &gi.gb[i];
1717  SplineChar2PS2(sc,NULL,nomwid,defwid,NULL,flags,&gi);
1718  ff_progress_next();
1719  }
1720 
1721  for ( i=scnt=0; i<gi.pcnt; ++i ) {
1722  /* A subroutine call takes somewhere between 2 and 4 bytes itself. */
1723  /* and we must add a return statement to the end. We don't want to */
1724  /* make things bigger */
1725  /* if we have more than 65535 subrs a subr call can take 9 bytes */
1726  if ( gi.psubrs[i].full_glyph_index!=-1 )
1727  gi.psubrs[i].idx = scnt++;
1728  else if ( gi.psubrs[i].cnt*gi.psubrs[i].len>(gi.psubrs[i].cnt*4)+gi.psubrs[i].len+1 )
1729  gi.psubrs[i].idx = scnt++;
1730  else
1731  gi.psubrs[i].idx = -1;
1732  }
1733  subrs = calloc(1,sizeof(struct pschars));
1734  subrs->cnt = scnt;
1735  subrs->next = scnt;
1736  subrs->lens = malloc(scnt*sizeof(int));
1737  subrs->values = malloc(scnt*sizeof(unsigned char *));
1738  subrs->bias = scnt<1240 ? 107 :
1739  scnt<33900 ? 1131 : 32768;
1740  for ( i=0; i<gi.pcnt; ++i ) {
1741  if ( gi.psubrs[i].idx != -1 ) {
1742  scnt = gi.psubrs[i].idx;
1743  subrs->lens[scnt] = gi.psubrs[i].len+1;
1744  subrs->values[scnt] = malloc(subrs->lens[scnt]);
1745  memcpy(subrs->values[scnt],gi.psubrs[i].data,gi.psubrs[i].len);
1746  subrs->values[scnt][gi.psubrs[i].len] = 11; /* Add a return to end of subr */
1747  }
1748  }
1749 
1750  chrs = calloc(1,sizeof(struct pschars));
1751  chrs->cnt = cnt;
1752  chrs->next = cnt;
1753  chrs->lens = malloc(cnt*sizeof(int));
1754  chrs->values = malloc(cnt*sizeof(unsigned char *));
1755  chrs->keys = malloc(cnt*sizeof(char *));
1756  for ( i=0; i<cnt; ++i ) {
1757  int len=0;
1758  uint8 *vals;
1759  struct glyphbits *gb = &gi.gb[i];
1760  if ( gb->sc==NULL )
1761  continue;
1762  chrs->keys[i] = copy(gb->sc->name);
1763  for ( k=0; k<2; ++k ) if ( k!=0 || gb->sc->lsidebearing!=0x7fff ) {
1764  for ( j=0; j<gb->bcnt; ++j ) {
1765  if ( k!=0 || j!=0 )
1766  len += gb->bits[j].dlen;
1767  if ( k==1 && gb->sc->lsidebearing!=0x7fff ) {
1768  int si = gi.psubrs[ gb->sc->lsidebearing ].idx;
1769  len += 1 + (si<=107 && si>=-107?1:si<=1131 && si>=-1131?2:si>=-32768 && si<32767?3:8);
1770  break;
1771  }
1772  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 )
1773  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1774  else {
1775  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1776  /* space for the number (subroutine index) */
1777  if ( si>=-107 && si<=107 )
1778  ++len;
1779  else if ( si>=-1131 && si<=1131 )
1780  len += 2;
1781  else if ( si>=-32768 && si<=32767 )
1782  len += 3;
1783  else
1784  len += 8;
1785  /* space for the subroutine operator */
1786  ++len;
1787  }
1788  }
1789  if ( k==0 ) {
1790  int si = gi.psubrs[ gb->sc->lsidebearing ].idx;
1791  subrs->lens[si] = len+1;
1792  vals = subrs->values[si] = malloc(len+2);
1793  } else {
1794  chrs->lens[i] = len+1;
1795  vals = chrs->values[i] = malloc(len+2); /* space for endchar and a final NUL (which is really meaningless, but makes me feel better) */
1796  }
1797 
1798  len = 0;
1799  for ( j=0; j<gb->bcnt; ++j ) {
1800  int si;
1801  if ( k!=0 || j!=0 ) {
1802  memcpy(vals+len,gb->bits[j].data,gb->bits[j].dlen);
1803  len += gb->bits[j].dlen;
1804  }
1805  si = 0x80000000;
1806  if ( k==1 && gb->sc->lsidebearing!=0x7fff )
1807  si = gi.psubrs[ gb->sc->lsidebearing ].idx - subrs->bias;
1808  else if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 ) {
1809  memcpy(vals+len,gi.psubrs[ gb->bits[j].psub_index ].data,
1810  gi.psubrs[ gb->bits[j].psub_index ].len);
1811  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1812  } else
1813  si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1814  if ( si!=0x80000000 ) {
1815  /* space for the number (subroutine index) */
1816  if ( si>=-107 && si<=107 )
1817  vals[len++] = si+139;
1818  else if ( si>0 && si<=1131 ) {
1819  si-=108;
1820  vals[len++] = (si>>8)+247;
1821  vals[len++] = si&0xff;
1822  } else if ( si>=-1131 && si<0 ) {
1823  si=(-si)-108;
1824  vals[len++] = (si>>8)+251;
1825  vals[len++] = si&0xff;
1826  } else if ( si>=-32768 && si<=32767 ) {
1827  vals[len++] = 28;
1828  vals[len++] = (si>>8)&0xff;
1829  vals[len++] = si&0xff;
1830  } else {
1831  /* store as fixed point, then multiply by 64. Takes 8 bytes */
1832  si *= (65536/64);
1833  vals[len++] = '\377';
1834  vals[len++] = (si>>24)&0xff;
1835  vals[len++] = (si>>16)&0xff;
1836  vals[len++] = (si>>8)&0xff;
1837  vals[len++] = si&0xff;
1838  vals[len++] = 64 + 139;
1839  vals[len++] = 0xc; vals[len++] = 0x18; /* Multiply */
1840  }
1841 
1842  /* space for the subroutine operator */
1843  vals[len++] = 10;
1844  }
1845  if ( k==1 && gb->sc->lsidebearing!=0x7fff )
1846  break;
1847  }
1848  if ( k==0 ) {
1849  vals[len++] = 11; /* return */
1850  vals[len] = '\0';
1851  } else {
1852  vals[len++] = 14; /* endchar */
1853  vals[len] = '\0';
1854  }
1855  }
1856  }
1857 
1858  GIFree(&gi,&dummynotdef);
1859  *_subrs = subrs;
1860 return( chrs );
1861 }
1862 
1863 struct pschars *CID2ChrsSubrs2(SplineFont *cidmaster,struct fd2data *fds,
1864  int flags, struct pschars **_glbls, int layer) {
1865  struct pschars *chrs, *glbls;
1866  int i, j, cnt, cid, max, fd;
1867  int *scnts;
1868  SplineChar *sc;
1869  SplineFont *sf = NULL;
1870  /* In a cid-keyed font, cid 0 is defined to be .notdef so there are no */
1871  /* special worries. If it is defined we use it. If it is not defined */
1872  /* we add it. */
1873  GlyphInfo gi;
1874  SplineChar dummynotdef;
1875 
1876  max = 0;
1877  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1878  if ( max<cidmaster->subfonts[i]->glyphcnt )
1879  max = cidmaster->subfonts[i]->glyphcnt;
1880  MarkTranslationRefs(cidmaster->subfonts[i],layer);
1881  }
1882  cnt = 1; /* for .notdef */
1883  for ( cid = 1; cid<max; ++cid ) {
1884  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1885  sf = cidmaster->subfonts[i];
1886  if ( cid<sf->glyphcnt && (sc=sf->glyphs[cid])!=NULL ) {
1887  sc->ttf_glyph = -1;
1888  sc->lsidebearing = 0x7fff;
1889  if ( SCWorthOutputting(sc))
1890  ++cnt;
1891  break;
1892  }
1893  }
1894  }
1895 
1896  memset(&gi,0,sizeof(gi));
1897  memset(&gi.hashed,-1,sizeof(gi.hashed));
1898  gi.instance_count = 1;
1899  gi.sf = sf;
1900  gi.glyphcnt = cnt;
1901  gi.bygid = NULL;
1902  gi.gb = calloc(cnt,sizeof(struct glyphbits));
1903  gi.pmax = 3*cnt;
1904  gi.psubrs = malloc(gi.pmax*sizeof(struct potentialsubrs));
1905  gi.layer = layer;
1906 
1907  for ( cid = cnt = 0; cid<max; ++cid ) {
1908  sf = NULL;
1909  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1910  sf = cidmaster->subfonts[i];
1911  if ( cid<sf->glyphcnt && SCWorthOutputting(sf->glyphs[cid]) )
1912  break;
1913  }
1914  if ( cid!=0 && i==cidmaster->subfontcnt ) {
1915  sc=NULL;
1916  } else if ( i==cidmaster->subfontcnt ) {
1917  /* They didn't define CID 0 */
1918  sc = &dummynotdef;
1919  /* Place it in the final subfont (which is what sf points to) */
1920  memset(sc,0,sizeof(dummynotdef));
1921  dummynotdef.name = ".notdef";
1922  dummynotdef.parent = sf;
1923  dummynotdef.layer_cnt = layer+1;
1924  dummynotdef.layers = calloc(layer+1,sizeof(Layer));
1925  dummynotdef.width = SFOneWidth(sf);
1926  if ( dummynotdef.width==-1 )
1927  dummynotdef.width = (sf->ascent+sf->descent);
1928  Type2NotDefSplines(sf,&dummynotdef,layer);
1929  gi.gb[cnt].sc = sc;
1930  gi.gb[cnt].fd = i = cidmaster->subfontcnt-1;
1931  } else {
1932  gi.gb[cnt].sc = sc = sf->glyphs[cid];
1933  gi.gb[cnt].fd = i;
1934  }
1935  if ( sc!=NULL ) {
1936  sc->lsidebearing = 0x7fff;
1937  gi.active = &gi.gb[cnt];
1938  sc->ttf_glyph = cnt++;
1939  SplineChar2PS2(sc,NULL,fds[i].nomwid,fds[i].defwid,NULL,flags,&gi);
1940  }
1941  ff_progress_next();
1942  }
1943 
1944  scnts = calloc( cidmaster->subfontcnt+1,sizeof(int));
1945  for ( i=0; i<gi.pcnt; ++i ) {
1946  gi.psubrs[i].idx = -1;
1947  if ( gi.psubrs[i].cnt*gi.psubrs[i].len>(gi.psubrs[i].cnt*4)+gi.psubrs[i].len+1 )
1948  gi.psubrs[i].idx = scnts[gi.psubrs[i].fd+1]++;
1949  }
1950 
1951  glbls = calloc(1,sizeof(struct pschars));
1952  glbls->cnt = scnts[0];
1953  glbls->next = scnts[0];
1954  glbls->lens = malloc(scnts[0]*sizeof(int));
1955  glbls->values = malloc(scnts[0]*sizeof(unsigned char *));
1956  glbls->bias = scnts[0]<1240 ? 107 :
1957  scnts[0]<33900 ? 1131 : 32768;
1958  for ( fd=0; fd<cidmaster->subfontcnt; ++fd ) {
1959  fds[fd].subrs = calloc(1,sizeof(struct pschars));
1960  fds[fd].subrs->cnt = scnts[fd+1];
1961  fds[fd].subrs->next = scnts[fd+1];
1962  fds[fd].subrs->lens = malloc(scnts[fd+1]*sizeof(int));
1963  fds[fd].subrs->values = malloc(scnts[fd+1]*sizeof(unsigned char *));
1964  fds[fd].subrs->bias = scnts[fd+1]<1240 ? 107 :
1965  scnts[fd+1]<33900 ? 1131 : 32768;
1966  }
1967  free( scnts);
1968 
1969  for ( i=0; i<gi.pcnt; ++i ) {
1970  if ( gi.psubrs[i].idx != -1 ) {
1971  struct pschars *subrs = gi.psubrs[i].fd==-1 ? glbls : fds[gi.psubrs[i].fd].subrs;
1972  int scnt = gi.psubrs[i].idx;
1973  subrs->lens[scnt] = gi.psubrs[i].len+1;
1974  subrs->values[scnt] = malloc(subrs->lens[scnt]);
1975  memcpy(subrs->values[scnt],gi.psubrs[i].data,gi.psubrs[i].len);
1976  subrs->values[scnt][gi.psubrs[i].len] = 11; /* Add a return to end of subr */
1977  }
1978  }
1979 
1980 
1981  chrs = calloc(1,sizeof(struct pschars));
1982  chrs->cnt = cnt;
1983  chrs->next = cnt;
1984  chrs->lens = malloc(cnt*sizeof(int));
1985  chrs->values = malloc(cnt*sizeof(unsigned char *));
1986  chrs->keys = malloc(cnt*sizeof(char *));
1987  for ( i=0; i<cnt; ++i ) {
1988  int len=0;
1989  struct glyphbits *gb = &gi.gb[i];
1990  chrs->keys[i] = copy(gb->sc->name);
1991  for ( j=0; j<gb->bcnt; ++j ) {
1992  len += gb->bits[j].dlen;
1993  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 )
1994  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1995  else {
1996  struct pschars *subrs = gi.psubrs[gb->bits[j].psub_index].fd==-1 ? glbls : fds[gi.psubrs[gb->bits[j].psub_index].fd].subrs;
1997  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1998  /* space for the number (subroutine index) */
1999  if ( si>=-107 && si<=107 )
2000  ++len;
2001  else if ( si>=-1131 && si<=1131 )
2002  len += 2;
2003  else if ( si>=-32768 && si<=32767 )
2004  len += 3;
2005  else
2006  len += 8;
2007  /* space for the subroutine operator */
2008  ++len;
2009  }
2010  }
2011  chrs->lens[i] = len+1;
2012  chrs->values[i] = malloc(len+2); /* space for endchar and a final NUL (which is really meaningless, but makes me feel better) */
2013 
2014  len = 0;
2015  for ( j=0; j<gb->bcnt; ++j ) {
2016  memcpy(chrs->values[i]+len,gb->bits[j].data,gb->bits[j].dlen);
2017  len += gb->bits[j].dlen;
2018  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 ) {
2019  memcpy(chrs->values[i]+len,gi.psubrs[ gb->bits[j].psub_index ].data,
2020  gi.psubrs[ gb->bits[j].psub_index ].len);
2021  len += gi.psubrs[ gb->bits[j].psub_index ].len;
2022  } else {
2023  struct pschars *subrs = gi.psubrs[gb->bits[j].psub_index].fd==-1 ? glbls : fds[gi.psubrs[gb->bits[j].psub_index].fd].subrs;
2024  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
2025  /* space for the number (subroutine index) */
2026  if ( si>=-107 && si<=107 )
2027  chrs->values[i][len++] = si+139;
2028  else if ( si>0 && si<=1131 ) {
2029  si-=108;
2030  chrs->values[i][len++] = (si>>8)+247;
2031  chrs->values[i][len++] = si&0xff;
2032  } else if ( si>=-1131 && si<0 ) {
2033  si=(-si)-108;
2034  chrs->values[i][len++] = (si>>8)+251;
2035  chrs->values[i][len++] = si&0xff;
2036  } else if ( si>=-32768 && si<=32767 ) {
2037  chrs->values[i][len++] = 28;
2038  chrs->values[i][len++] = (si>>8)&0xff;
2039  chrs->values[i][len++] = si&0xff;
2040  } else {
2041  /* store as fixed point, then multiply by 64. Takes 8 bytes */
2042  si *= (65536/64);
2043  chrs->values[i][len++] = '\377';
2044  chrs->values[i][len++] = (si>>24)&0xff;
2045  chrs->values[i][len++] = (si>>16)&0xff;
2046  chrs->values[i][len++] = (si>>8)&0xff;
2047  chrs->values[i][len++] = si&0xff;
2048  chrs->values[i][len++] = 64 + 139;
2049  chrs->values[i][len++] = 0xc; chrs->values[i][len++] = 0x18; /* Multiply */
2050  }
2051  /* space for the subroutine operator */
2052  if ( gi.psubrs[ gb->bits[j].psub_index ].fd==-1 ) {
2053  chrs->values[i][len++] = 29;
2054  } else
2055  chrs->values[i][len++] = 10;
2056  }
2057  }
2058  chrs->values[i][len++] = 14; /* endchar */
2059  chrs->values[i][len] = '\0';
2060  }
2061  GIFree(&gi,&dummynotdef);
2062  *_glbls = glbls;
2063 return( chrs );
2064 }
2065 
double __cdecl rint(double _X)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
#define sc
Definition: aptex-macros.h:57
#define active
Definition: aptex-macros.h:325
#define width(a)
Definition: aptex-macros.h:198
#define next(a)
Definition: aptex-macros.h:924
static int hc[66]
Definition: aptex.h:612
#define hash
Definition: aptex.h:388
static point_t cur
Definition: backend_eps.c:108
#define b
Definition: jpegint.h:372
@ hstem
Definition: cscommands.h:12
@ vstem
Definition: cscommands.h:26
#define free(a)
Definition: decNumber.cpp:310
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
double real
Definition: dvips.h:66
int strcmp()
Definition: coll.cpp:143
char * temp
Definition: dvidvi.c:137
struct rect data
Definition: dvipdfm.c:64
#define _(String)
Definition: ftxerr18.c:64
static void copy(GlyphCachePtr *root)
Definition: gcache.c:378
#define s
Definition: afcover.h:80
#define a(n)
Definition: gpos-common.c:148
#define d(n)
Definition: gpos-common.c:151
int base
Definition: gsftopk.c:1502
#define memcmp(s1, s2, n)
Definition: gsftopk.c:66
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
for(n=0;n< outline->n_points;n++)
Definition: ftbbox.c:494
kerning y
Definition: ttdriver.c:212
static const unsigned long masks[]
Definition: gd_gif_out.c:1483
float factor
Definition: dimen.c:22
voidp calloc()
static int ret
Definition: convert.c:72
#define floor(x)
Definition: cpascal.h:52
#define malloc
Definition: alloca.c:91
#define test
Definition: tie.c:129
unsigned char uint8
Definition: tiff.h:60
const int * pos
Definition: combiners.h:905
#define realloc
Definition: glob.c:206
static double const pi
Definition: clipper.cpp:53
float x
Definition: cordic.py:15
list sets
Definition: fc-lang.py:150
dictionary off
Definition: fc-lang.py:226
def ref(x)
Definition: pdf-org.py:104
int k
Definition: otp-parser.c:70
static int format
Definition: pbmclean.c:15
#define min(a, b)
Definition: pbmplus.h:223
#define max(a, b)
Definition: pbmto4425.c:11
#define round(a)
Definition: pbmtopk.c:22
static bool ps
Definition: pdftocairo.cc:91
static int cnt
Definition: pkout.c:166
real to[600]
Definition: pmxab.c:87
static int32_t last
Definition: ppagelist.c:29
static int32_t first
Definition: ppagelist.c:29
int db
Definition: ppmqvga.c:68
int r
Definition: ppmqvga.c:68
bstring c int memset(void *s, int c, int length)
FontScalableRec vals
Definition: ps2pk.c:202
#define flags
void SplineCharAutoHint(SplineChar *sc, int layer, BlueData *bd)
Definition: autohint.c:2335
void SplineFontAutoHintRefs(SplineFont *_sf, int layer)
Definition: autohint.c:2388
void SCFigureHintMasks(SplineChar *sc, int layer)
Definition: autohint.c:2128
#define MmMax
Definition: splinefont.h:58
void StemInfosFree(StemInfo *h)
Definition: splineutil.c:2440
@ ps_flag_nohints
Definition: splinefont.h:1917
@ ps_flag_noseac
Definition: splinefont.h:1927
@ ps_flag_round
Definition: splinefont.h:1920
SplinePointList * SPLCopyTranslatedHintMasks(SplinePointList *base, SplineChar *basesc, SplineChar *subsc, BasePoint *trans)
Definition: splineutil.c:1134
@ ly_fore
Definition: splinefont.h:1209
SplinePoint * SplinePointCreate(float x, float y)
Definition: splineutil.c:120
fontformat
Definition: splinefont.h:1953
@ ff_mma
Definition: splinefont.h:1953
@ ff_mmb
Definition: splinefont.h:1953
@ ff_otf
Definition: splinefont.h:1956
uint8 HintMask[96/8]
Definition: splinefont.h:949
void SplineCharFindBounds(SplineChar *sc, DBounds *bounds)
Definition: splineutil.c:438
SplineSet * SplineSetsPSApprox(SplineSet *ss)
Definition: splineorder2.c:997
#define bigreal
Definition: splinefont.h:49
SplinePointList * SPLCopyTransformedHintMasks(RefChar *r, SplineChar *basesc, BasePoint *trans, int layer)
Definition: splineutil.c:1226
#define chunkalloc(size)
Definition: splinefont.h:1947
Spline * SplineMake3(SplinePoint *from, SplinePoint *to)
Definition: splineutil.c:133
HintMask * HintMaskFromTransformedRef(RefChar *ref, BasePoint *trans, SplineChar *basesc, HintMask *hm)
Definition: splineutil.c:1058
SplineSet * SplineSetReverse(SplineSet *spl)
Definition: splineutil2.c:1264
#define HntMax
Definition: splinefont.h:948
void SplinePointListsFree(SplinePointList *head)
Definition: splineutil.c:179
static int NumberHints(SplineChar *scs[16], int instance_count)
Definition: splinesave.c:298
static void RSC2PS2(GrowBuf *gb, SplineChar *base, SplineChar *rsc, struct hintdb *hdb, BasePoint *trans, struct pschars *subrs, int flags, int layer)
Definition: splinesave.c:1368
static void CvtPsSplineSet2(GrowBuf *gb, SplinePointList *spl, struct hintdb *hdb, int is_order2, int round)
Definition: splinesave.c:1121
static void SplineFont2FullSubrs2(int flags, GlyphInfo *gi)
Definition: splinesave.c:1611
static void Type2NotDefSplines(SplineFont *sf, SplineChar *sc, int layer)
Definition: splinesave.c:1535
static void GIFree(GlyphInfo *gi, SplineChar *dummynotdef)
Definition: splinesave.c:194
float GenerateHintWidthEqualityTolerance
Definition: splinesave.c:31
static void AddNumber(GrowBuf *gb, float pos, int round)
Definition: splinesave.c:340
struct glyphinfo GlyphInfo
static void StartNextSubroutine(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:203
static void MarkTranslationRefs(SplineFont *sf, int layer)
Definition: splinesave.c:323
static void DumpHints(GrowBuf *gb, StemInfo *h, int oper, int midoper, int round)
Definition: splinesave.c:1197
static void ExpandRef2(GrowBuf *gb, SplineChar *sc, struct hintdb *hdb, RefChar *r, BasePoint *trans, struct pschars *subrs, int round, int layer)
Definition: splinesave.c:1322
static void GIContentsFree(GlyphInfo *gi, SplineChar *dummynotdef)
Definition: splinesave.c:160
static int hashfunc(uint8 *data, int len)
Definition: splinesave.c:223
static void AddMask2(GrowBuf *gb, uint8 mask[12], int cnt, int oper)
Definition: splinesave.c:791
static float myround2(float pos, int round)
Definition: splinesave.c:727
static void moveto2(GrowBuf *gb, struct hintdb *hdb, SplinePoint *to, int round)
Definition: splinesave.c:831
static void DummyHintmask(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:1299
static Spline * curveto2(GrowBuf *gb, struct hintdb *hdb, Spline *spline, Spline *done, int round)
Definition: splinesave.c:982
static void DumpRefsHints(GrowBuf *gb, struct hintdb *hdb, RefChar *cur, StemInfo *h, StemInfo *v, BasePoint *trans, int round, int layer)
Definition: splinesave.c:1243
static void AddNumber2(GrowBuf *gb, float pos, int round)
Definition: splinesave.c:734
static void CounterHints2(GrowBuf *gb, SplineChar *sc, int hcnt)
Definition: splinesave.c:801
static void SetTransformedHintMask(GrowBuf *gb, struct hintdb *hdb, SplineChar *sc, RefChar *ref, BasePoint *trans, int round)
Definition: splinesave.c:1310
int autohint_before_generate
Definition: splinesave.c:32
int SFOneWidth(SplineFont *sf)
Definition: splinesave.c:679
static Spline * lineto2(GrowBuf *gb, struct hintdb *hdb, Spline *spline, Spline *done, int round)
Definition: splinesave.c:861
int CvtPsStem3(GrowBuf *gb, SplineChar *scs[16], int instance_count, int ishstem, int round)
Definition: splinesave.c:456
static void MoveSubrsToChar(GlyphInfo *gi)
Definition: splinesave.c:286
struct pschars * SplineFont2ChrsSubrs2(SplineFont *sf, int nomwid, int defwid, const int *bygid, int cnt, int flags, struct pschars **_subrs, int layer)
Definition: splinesave.c:1665
static int HintSetup2(GrowBuf *gb, struct hintdb *hdb, SplinePoint *to, int break_subr)
Definition: splinesave.c:808
#define HSH_SIZE
Definition: splinesave.c:113
static unsigned char * SplineChar2PS2(SplineChar *sc, int *len, int nomwid, int defwid, struct pschars *subrs, int flags, GlyphInfo *gi)
Definition: splinesave.c:1456
static SplinePoint * LineTo(SplinePoint *last, int x, int y)
Definition: splinesave.c:1529
static void flexto2(GrowBuf *gb, struct hintdb *hdb, Spline *pspline, int round)
Definition: splinesave.c:1070
static void BreakSubroutine(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:236
int CIDOneWidth(SplineFont *_sf)
Definition: splinesave.c:696
static int SCNeedsSubsPts(SplineChar *sc, enum fontformat format, int layer)
Definition: splinesave.c:539
static int _SCNeedsSubsPts(SplineChar *sc, int layer)
Definition: splinesave.c:523
static void AddData(GrowBuf *gb, double data[16][6], int instances, int num_coords, int round)
Definition: splinesave.c:403
struct pschars * CID2ChrsSubrs2(SplineFont *cidmaster, struct fd2data *fds, int flags, struct pschars **_glbls, int layer)
Definition: splinesave.c:1863
Bool__ equalWithTolerence(float a, float b, float tolerence)
Definition: splinesave.c:1185
#define ff_progress_next
Definition: uiinterface.h:141
#define IError
Definition: uiinterface.h:124
#define LogError
Definition: uiinterface.h:125
static void chunk(LexState *ls)
Definition: minilua.c:4678
#define mask(n)
Definition: lbitlib.c:93
test
Definition: parser.c:257
#define SCWorthOutputting(a)
Definition: splinefont.h:2357
static void GrowBuffer(GrowBuf *gb)
Definition: splinesave.c:207
#define str(s)
Definition: sh6.c:399
float x
Definition: splinefont.h:70
float y
Definition: splinefont.h:71
Definition: namelist.c:170
uint8 * data
Definition: splinesave.c:100
int psub_index
Definition: splinesave.c:102
int dlen
Definition: splinesave.c:101
double y
Definition: splinefont.h:79
double x
Definition: splinefont.h:78
float minx
Definition: splinefont.h:95
struct pschars * subrs
Definition: psfont.h:175
struct bits * bits
Definition: splinesave.c:109
uint8 wasseac
Definition: splinesave.c:110
SplineChar * sc
Definition: splinesave.c:106
SplineChar * sc
Definition: splinesave.c:116
struct glyphinfo::glyphbits::bits * bits
int justbroken
Definition: splinesave.c:129
struct glyphbits * gb
Definition: splinesave.c:121
const int * bygid
Definition: splinesave.c:128
int subfontcnt
Definition: splinesave.c:125
int glyphcnt
Definition: splinesave.c:124
int instance_count
Definition: splinesave.c:130
int hashed[511]
Definition: splinesave.c:120
SplineFont * sf
Definition: splinesave.c:122
struct glyphbits * active
Definition: splinesave.c:121
struct bits * bits
Definition: splinesave.c:127
struct potentialsubrs * psubrs
Definition: splinesave.c:118
unsigned char * pt
Definition: splinefont.h:1964
unsigned char * base
Definition: splinefont.h:1965
unsigned char * end
Definition: splinefont.h:1966
int instance_count
Definition: splinesave.c:146
unsigned int iscjk
Definition: splinesave.c:147
int cursub
Definition: splinesave.c:155
struct pschars * subrs
Definition: splinesave.c:143
unsigned int startset
Definition: splinesave.c:152
struct mhlist * sublist
Definition: splinesave.c:142
unsigned int skiphm
Definition: splinesave.c:153
unsigned int noconflicts
Definition: splinesave.c:151
uint8 mask[96/8]
Definition: splinesave.c:140
DBasePoint current
Definition: splinesave.c:156
GlyphInfo * gi
Definition: splinesave.c:157
SplineChar ** scs
Definition: splinesave.c:145
int cnt
Definition: splinesave.c:141
unsigned int donefirsthm
Definition: splinesave.c:154
Definition: edgelist.h:31
float width
Definition: edgelist.h:32
struct hints * next
Definition: edgelist.h:37
RefChar * refs
Definition: splinefont.h:1202
unsigned int order2
Definition: splinefont.h:1194
SplinePointList * splines
Definition: splinefont.h:1201
uint8 mask[96/8]
Definition: splinesave.c:134
struct mhlist * next
Definition: splinesave.c:136
int subr
Definition: splinesave.c:135
int instance_count
Definition: splinefont.h:1856
SplineFont ** instances
Definition: splinefont.h:1857
BasePoint * startstop
Definition: splinesave.c:96
int full_glyph_index
Definition: splinesave.c:94
uint8 * data
Definition: splinesave.c:86
int next
Definition: splinefont.h:135
int cnt
Definition: splinefont.h:135
int bias
Definition: splinefont.h:139
char ** keys
Definition: splinefont.h:136
uint8 ** values
Definition: splinefont.h:137
int * lens
Definition: splinefont.h:138
float transform[6]
Definition: splinefont.h:1114
struct splinechar * sc
Definition: splinefont.h:1119
Definition: tfmaux.c:31
SplinePoint * to
Definition: splinefont.h:1038
unsigned int knownlinear
Definition: splinefont.h:1030
SplinePoint * from
Definition: splinefont.h:1037
struct splinefont * parent
Definition: splinefont.h:1346
int16 lsidebearing
Definition: splinefont.h:1330
unsigned int vconflicts
Definition: splinefont.h:1354
int16 width
Definition: splinefont.h:1329
StemInfo * vstem
Definition: splinefont.h:1341
Layer * layers
Definition: splinefont.h:1337
unsigned int hconflicts
Definition: splinefont.h:1355
char * name
Definition: splinefont.h:1326
StemInfo * hstem
Definition: splinefont.h:1340
struct splinefont * cidmaster
Definition: splinefont.h:1739
struct splinefont ** subfonts
Definition: splinefont.h:1738
int subfontcnt
Definition: splinefont.h:1737
SplineChar ** glyphs
Definition: splinefont.h:1690
unsigned int flexy
Definition: splinefont.h:965
BasePoint me
Definition: splinefont.h:953
struct spline * next
Definition: splinefont.h:979
unsigned int flexx
Definition: splinefont.h:966
HintMask * hintmask
Definition: splinefont.h:981
BasePoint nextcp
Definition: splinefont.h:954
BasePoint prevcp
Definition: splinefont.h:955
struct splinepointlist * next
Definition: splinefont.h:1073
SplinePoint * last
Definition: splinefont.h:1072
SplinePoint * first
Definition: splinefont.h:1072
Definition: type1.c:137
float width
Definition: splinefont.h:1170
struct steminfo * next
Definition: splinefont.h:1139
float start
Definition: splinefont.h:1169
Definition: strexpr.c:21
#define c1
Definition: t1io.c:52
int subrs
Definition: t1part.c:260
int j
Definition: t4ht.c:1589
val
Definition: tex4ht.c:3227
m
Definition: tex4ht.c:3990
#define sp
Definition: stack.c:11
int hints
Definition: ttf2pt1.c:133
Definition: sd.h:149
@ start
Definition: preamble.c:52
#define end(cp)
Definition: zic.c:71
static zic_t trans[50]
Definition: zic.c:412