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-2008 by George Williams */
2 /*
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are met:
5 
6  * Redistributions of source code must retain the above copyright notice, this
7  * list of conditions and the following disclaimer.
8 
9  * Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12 
13  * The name of the author may not be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15 
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 #include "pfaedit.h"
28 #include <stdio.h>
29 #include <math.h>
30 #include "splinefont.h"
31 #include "psfont.h"
32 #include <ustring.h>
33 #include <string.h>
34 #include <utype.h>
35 
37 
38 /* Let's talk about references. */
39 /* If we are doing Type1 output, then the obvious way of doing them is seac */
40 /* but that's so limitting. It only works for exactly two characters both */
41 /* of which are in Adobe's Standard Enc. Only translations allowed. Only */
42 /* one reference may be translated and the width of the char must match */
43 /* that of the non-translated reference */
44 /* The first extension we can make is to allow a single character reference */
45 /* by making the other character be a space */
46 /* But if we want to do more than that we must use subrs. If we have two */
47 /* refs in subrs then we can do translations by preceding the subr calls by */
48 /* appropriate rmovetos. Actually the specs say that only one rmoveto should */
49 /* precede a path, so that means we can't allow the subroutines to position */
50 /* themselves, they must just assume that they are called with the current */
51 /* position correct for the first point. But then we need to know where the */
52 /* first point should be placed, so we allocate a BasePoint to hold that info*/
53 /* and store it into the "keys" array (which the subrs don't use). Similarly */
54 /* we need to know where the subr will leave us, so we actually allocate 2 */
55 /* BasePoints, one containing the start point, one the end point */
56 /* But that's still not good enough, hints are defined in such a way that */
57 /* they are not relocateable. So our subrs can't include any hint definitions*/
58 /* (or if they do then that subr can't be translated at all). So hints must */
59 /* be set outside the subrs, and the subrs can't be for chars that need hint */
60 /* substitution. Unless... The subr will never be relocated. */
61 /* So we generate two types of reference subrs, one containing no hints, the*/
62 /* other containing all the hints, stems and flexes. The first type may be */
63 /* translated, the second cannot */
64 /* Type2 doesn't allow any seacs */
65 /* So everything must go in subrs. We have a slightly different problem here:*/
66 /* hintmasks need to know exactly how many stem hints there are in the char */
67 /* so we can't include any hintmask operators inside a subr (unless we */
68 /* guarantee that all invocations of that subr are done with the same number */
69 /* of hints in the character). This again means that no char with hint subs- */
70 /* titutions may be put in a subr. UNLESS all the other references in a */
71 /* refering character contain no hints */
72 
73 /* That's very complex. And it doesn't do a very good job. */
74 /* Instead let's take all strings bounded by either moveto or hintmask operators */
75 /* store these as potential subroutines. So a glyph becomes a sequence of */
76 /* potential subroutine calls preceded by the glyph header (width, hint decl,*/
77 /* counter declarations, etc.) and intersperced by hintmask/moveto operators */
78 /* Each time we get a potential subr we hash it and see if we've used that */
79 /* string before. If we have then we merge the two. Otherwise it's a new one.*/
80 /* Then at the end we see what strings get used often enough to go into subrs */
81 /* we create the subrs array from that. */
82 /* Then each glyph. We insert the preamble. We check of the potential subroutine */
83 /* became a real subroutine. If so we call it, else we insert the data inline*/
84 /* Do the same for the next hintmask/moveto and potential subroutine... */
85 
86 /* Then, on top of that I tried generating some full glyph subroutines, and */
87 /* to my surprise, it just made things worse. */
88 
89 typedef struct growbuf {
90  unsigned char *pt;
91  unsigned char *base;
92  unsigned char *end;
94 
95 #define HSH_SIZE 511
96 /* In type2 charstrings we divide every character into bits where a bit is */
97 /* bounded by a hintmask/moveto. Each of these is a potential subroutine and */
98 /* is stored here */
99 typedef struct glyphinfo {
100  struct potentialsubrs {
101  uint8 *data; /* the charstring of the subr */
102  int len; /* the length of the charstring */
103  int idx; /* initially index into psubrs array */
104  /* then index into subrs array or -1 if none */
105  int cnt; /* the usage count */
106  int fd; /* Which sub font is it in */
107  /* -1 => used in more than one */
108  int next;
109  int full_glyph_index; /* Into the glyphbits array */
110  /* for full references */
111  BasePoint *startstop; /* Again for full references */
112  } *psubrs;
113  int pcnt, pmax;
114  int hashed[HSH_SIZE];
115  struct glyphbits {
117  int fd; /* Which subfont is it in */
118  int bcnt;
119  struct bits {
121  int dlen;
123  } *bits;
125  } *gb, *active;
126  SplineFont *sf;
127  int layer;
128  int glyphcnt;
129  int subfontcnt;
130  int bcnt, bmax;
131  struct bits *bits; /* For current glyph */
132  const int *bygid;
133  int justbroken;
134  int instance_count;
136 
137 struct mhlist {
138  uint8 mask[HntMax/8];
139  int subr;
140  struct mhlist *next;
141 };
142 
143 struct hintdb {
144  uint8 mask[HntMax/8];
145  int cnt; /* number of hints */
146  struct mhlist *sublist;
147  struct pschars *subrs;
148  /*SplineChar *sc;*/
149  SplineChar **scs;
150  int instance_count;
151  unsigned int iscjk: 1; /* If cjk then don't do stem3 hints */
152  /* Will be done with counters instead */
153  /* actually, most of the time we can't use stem3s, only if those three*/
154  /* stems are always active and there are no other stems !(h/v)hasoverlap*/
155  unsigned int noconflicts: 1;
156  unsigned int startset: 1;
157  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 */
158  unsigned int donefirsthm: 1;
159  int cursub; /* Current subr number */
161  GlyphInfo *gi;
162 };
163 
164 static void GIContentsFree(GlyphInfo *gi,SplineChar *dummynotdef) {
165  int i,j;
166 
167  if ( gi->glyphcnt>0 && gi->gb[0].sc == dummynotdef ) {
168  if ( dummynotdef->layers!=NULL ) {
169  SplinePointListsFree(dummynotdef->layers[gi->layer].splines);
170  dummynotdef->layers[gi->layer].splines = NULL;
171  }
172  StemInfosFree(dummynotdef->hstem);
173  StemInfosFree(dummynotdef->vstem);
174  dummynotdef->vstem = dummynotdef->hstem = NULL;
175  free(dummynotdef->layers);
176  dummynotdef->layers = NULL;
177  }
178 
179  for ( i=0; i<gi->pcnt; ++i ) {
180  free(gi->psubrs[i].data);
181  free(gi->psubrs[i].startstop);
182  gi->psubrs[i].data = NULL;
183  gi->psubrs[i].startstop = NULL;
184  }
185  for ( i=0; i<gi->glyphcnt; ++i ) {
186  for ( j=0; j<gi->gb[i].bcnt; ++j )
187  free(gi->gb[i].bits[j].data);
188  free(gi->gb[i].bits);
189  gi->gb[i].bits = NULL;
190  gi->gb[i].bcnt = 0;
191  }
192 
193  gi->pcnt = 0;
194  gi->bcnt = 0;
195  gi->justbroken = 0;
196 }
197 
198 static void GIFree(GlyphInfo *gi,SplineChar *dummynotdef) {
199 
200  GIContentsFree(gi,dummynotdef);
201 
202  free(gi->gb);
203  free(gi->psubrs);
204  free(gi->bits);
205 }
206 
207 static void GrowBuffer(GrowBuf *gb) {
208  if ( gb->base==NULL ) {
209  gb->base = gb->pt = galloc(200);
210  gb->end = gb->base + 200;
211  } else {
212  int len = (gb->end-gb->base) + 400;
213  int off = gb->pt-gb->base;
214  gb->base = grealloc(gb->base,len);
215  gb->end = gb->base + len;
216  gb->pt = gb->base+off;
217  }
218 }
219 
220 static void StartNextSubroutine(GrowBuf *gb,struct hintdb *hdb) {
221  GlyphInfo *gi;
222 
223  if ( hdb==NULL )
224 return;
225  gi = hdb->gi;
226  if ( gi==NULL )
227 return;
228  /* Store everything in the grow buf into the data/dlen of the next bit */
229  if ( gi->bcnt==-1 ) gi->bcnt = 0;
230  if ( gi->bcnt>=gi->bmax )
231  gi->bits = grealloc(gi->bits,(gi->bmax+=20)*sizeof(struct bits));
232  gi->bits[gi->bcnt].dlen = gb->pt-gb->base;
233  gi->bits[gi->bcnt].data = galloc(gi->bits[gi->bcnt].dlen);
234  gi->bits[gi->bcnt].psub_index = -1;
235  memcpy(gi->bits[gi->bcnt].data,gb->base,gi->bits[gi->bcnt].dlen);
236  gb->pt = gb->base;
237  gi->justbroken = false;
238 }
239 
240 static int hashfunc(uint8 *data, int len) {
241  uint8 *end = data+len;
242  unsigned int hash = 0, r;
243 
244  while ( data<end ) {
245  r = (hash>>30)&3;
246  hash <<= 2;
247  hash = (hash|r)&0xffffffff;
248  hash ^= *data++;
249  }
250 return( hash%HSH_SIZE );
251 }
252 
253 static void BreakSubroutine(GrowBuf *gb,struct hintdb *hdb) {
254  GlyphInfo *gi;
255  struct potentialsubrs *ps;
256  int hash;
257  int pi;
258 
259  if ( hdb==NULL )
260 return;
261  gi = hdb->gi;
262  if ( gi==NULL )
263 return;
264  /* The stuff before the first moveto in a glyph (the header that sets */
265  /* the width, sets up the hints, counters, etc.) can't go into a subr */
266  if ( gi->bcnt==-1 ) {
267  gi->bcnt=0;
268  gi->justbroken = true;
269 return;
270  } else if ( gi->justbroken )
271 return;
272  /* Otherwise stuff everything in the growbuffer into a subr */
273  hash = hashfunc(gb->base,gb->pt-gb->base);
274  ps = NULL;
275  for ( pi=gi->hashed[hash]; pi!=-1; pi=gi->psubrs[pi].next ) {
276  ps = &gi->psubrs[pi];
277  if ( ps->len==gb->pt-gb->base && memcmp(ps->data,gb->base,gb->pt-gb->base)==0 )
278  break;
279  }
280  if ( pi==-1 ) {
281  if ( gi->pcnt>=gi->pmax )
282  gi->psubrs = grealloc(gi->psubrs,(gi->pmax+=gi->glyphcnt)*sizeof(struct potentialsubrs));
283  ps = &gi->psubrs[gi->pcnt];
284  memset(ps,0,sizeof(*ps)); /* set cnt to 0 */
285  ps->idx = gi->pcnt++;
286  ps->len = gb->pt-gb->base;
287  ps->data = galloc(ps->len);
288  memcpy(ps->data,gb->base,ps->len);
289  ps->next = gi->hashed[hash];
290  gi->hashed[hash] = ps->idx;
291  ps->fd = gi->active->fd;
292  ps->full_glyph_index = -1;
293  }
294  if ( ps->fd!=gi->active->fd )
295  ps->fd = -1; /* used in multiple cid sub-fonts */
296  gi->bits[gi->bcnt].psub_index = ps->idx;
297  ++ps->cnt;
298  gb->pt = gb->base;
299  ++gi->bcnt;
300  gi->justbroken = true;
301 }
302 
303 static void MoveSubrsToChar(GlyphInfo *gi) {
304  struct glyphbits *active;
305 
306  if ( gi==NULL )
307 return;
308  active = gi->active;
309  active->bcnt = gi->bcnt;
310  active->bits = galloc(active->bcnt*sizeof(struct bits));
311  memcpy(active->bits,gi->bits,active->bcnt*sizeof(struct bits));
312  gi->bcnt = 0;
313 }
314 
315 static int NumberHints(SplineChar *scs[MmMax], int instance_count) {
316  int i,j, cnt=-1;
317  StemInfo *s;
318 
319  for ( j=0; j<instance_count; ++j ) {
320  for ( s=scs[j]->hstem, i=0; s!=NULL; s=s->next ) {
321  if ( i<HntMax )
322  s->hintnumber = i++;
323  else
324  s->hintnumber = -1;
325  }
326  for ( s=scs[j]->vstem; s!=NULL; s=s->next ) {
327  if ( i<HntMax )
328  s->hintnumber = i++;
329  else
330  s->hintnumber = -1;
331  }
332  if ( cnt==-1 )
333  cnt = i;
334  else if ( cnt!=i )
335  IError("MM font with different hint counts");
336  }
337 return( cnt );
338 }
339 
341  RefChar *rnext;
342 
343  while ( ref!=NULL ) {
344  rnext = ref->next;
345  /* don't free the splines */
346  chunkfree(ref,sizeof(RefChar));
347  ref = rnext;
348  }
349 }
350 
352  int i;
353  SplineChar *sc;
354  RefChar *r;
355 
356  for ( i=0; i<sf->glyphcnt; ++i ) if ( (sc = sf->glyphs[i])!=NULL ) {
357  for ( r = sc->layers[layer].refs; r!=NULL; r=r->next )
358  r->justtranslated = (r->transform[0]==1 && r->transform[3]==1 &&
359  r->transform[1]==0 && r->transform[2]==0);
360  }
361 }
362 
363 /* ************************************************************************** */
364 /* ********************** Type1 PostScript CharStrings ********************** */
365 /* ************************************************************************** */
366 
367 static real myround( real pos, int round ) {
368  if ( round )
369 return( rint( pos ));
370  else
371 return( rint( pos*100. )/100. );
372 }
373 
374 static void AddNumber(GrowBuf *gb, real pos, int round) {
375  int dodiv = 0;
376  int val;
377  unsigned char *str;
378 
379  if ( gb->pt+8>=gb->end )
380  GrowBuffer(gb);
381 
382  pos = rint(100*pos)/100;
383 
384  if ( !round && pos!=floor(pos)) {
385  pos *= 100;
386  dodiv = true;
387  }
388  str = gb->pt;
389  val = rint(pos);
390  if ( pos>=-107 && pos<=107 )
391  *str++ = val+139;
392  else if ( pos>=108 && pos<=1131 ) {
393  val -= 108;
394  *str++ = (val>>8)+247;
395  *str++ = val&0xff;
396  } else if ( pos>=-1131 && pos<=-108 ) {
397  val = -val;
398  val -= 108;
399  *str++ = (val>>8)+251;
400  *str++ = val&0xff;
401  } else {
402  *str++ = '\377';
403  *str++ = (val>>24)&0xff;
404  *str++ = (val>>16)&0xff;
405  *str++ = (val>>8)&0xff;
406  *str++ = val&0xff;
407  }
408  if ( dodiv ) {
409  *str++ = 100+139; /* 100 */
410  *str++ = 12; /* div (byte1) */
411  *str++ = 12; /* div (byte2) */
412  }
413  gb->pt = str;
414 }
415 
416 /* When doing a multiple master font we have multiple instances of the same data */
417 /* which must all be added, and then a call made to the appropriate blend routine */
418 /* This is complicated because all the data may not fit on the stack so we */
419 /* may need to make multiple calls */
420 static void AddData(GrowBuf *gb, real data[MmMax][6], int instances, int num_coords,
421  int round) {
422  int allsame = true, alls[6];
423  int i,j, chunk,min,max,subr;
424 
425  for ( j=0; j<num_coords; ++j ) {
426  alls[j] = true;
427  for ( i=1; i<instances; ++i ) {
428  if ( data[i][j]!=data[0][j] ) {
429  alls[j] = false;
430  allsame = false;
431  break;
432  }
433  }
434  }
435 
436  if ( allsame ) { /* No need for blending */
437  /* Probably a normal font, but possible in an mm */
438  for ( j=0; j<num_coords; ++j )
439  AddNumber(gb,data[0][j],round);
440 return;
441  }
442 
443  chunk = 22/instances;
444  if ( chunk == 5 ) chunk = 4; /* No subroutine for 5 items */
445  min = 0;
446  while ( min<num_coords ) {
447  while ( min<num_coords && alls[min] ) {
448  AddNumber(gb,data[0][min],round);
449  ++min;
450  }
451  max = min+chunk;
452  if ( max>num_coords ) max = num_coords;
453  while ( max-1>min && alls[max-1] )
454  --max;
455  if ( max-min==5 ) max=min+4;
456  if ( min<max ) {
457  for ( j=min; j<max; ++j )
458  AddNumber(gb,data[0][j],round);
459  for ( j=min; j<max; ++j )
460  for ( i=1; i<instances; ++i )
461  AddNumber(gb,data[i][j]-data[0][j],round);
462  subr = (j-min) + 4;
463  if ( j-min==6 ) subr = 9;
464  AddNumber(gb,subr,round);
465  if ( gb->pt+1>=gb->end )
466  GrowBuffer(gb);
467  *gb->pt++ = 10; /* callsubr */
468  min = j;
469  }
470  }
471 }
472 
473 int CvtPsStem3(GrowBuf *gb, SplineChar *scs[MmMax], int instance_count,
474  int ishstem, int round) {
475  StemInfo *h1, *h2, *h3;
476  StemInfo _h1, _h2, _h3;
477  real data[MmMax][6];
478  int i;
479  real off;
480 
481  for ( i=0; i<instance_count; ++i ) {
482  if ( (ishstem && scs[i]->hconflicts) || (!ishstem && scs[i]->vconflicts))
483 return( false );
484  h1 = ishstem ? scs[i]->hstem : scs[i]->vstem;
485  if ( h1==NULL || (h2 = h1->next)==NULL || (h3=h2->next)==NULL )
486 return( false );
487  if ( h3->next!=NULL )
488 return( false );
489  off = ishstem ? 0 : scs[i]->lsidebearing;
490  if ( h1->width<0 ) {
491  _h1 = *h1;
492  _h1.start += _h1.width;
493  _h1.width = -_h1.width;
494  h1 = &_h1;
495  }
496  if ( h2->width<0 ) {
497  _h2 = *h2;
498  _h2.start += _h2.width;
499  _h2.width = -_h2.width;
500  h2 = &_h2;
501  }
502  if ( h3->width<0 ) {
503  _h3 = *h3;
504  _h3.start += _h3.width;
505  _h3.width = -_h3.width;
506  h3 = &_h3;
507  }
508 
509  if ( h1->start>h2->start ) {
510  StemInfo *ht = h1; h1 = h2; h2 = ht;
511  }
512  if ( h1->start>h3->start ) {
513  StemInfo *ht = h1; h1 = h3; h3 = ht;
514  }
515  if ( h2->start>h3->start ) {
516  StemInfo *ht = h2; h2 = h3; h3 = ht;
517  }
518  if ( h1->width != h3->width )
519 return( false );
520  if ( (h2->start+h2->width/2) - (h1->start+h1->width/2) !=
521  (h3->start+h3->width/2) - (h2->start+h2->width/2) )
522 return( false );
523  data[i][0] = h1->start-off;
524  data[i][1] = h1->width;
525  data[i][2] = h2->start-off;
526  data[i][3] = h2->width;
527  data[i][4] = h3->start-off;
528  data[i][5] = h3->width;
529  }
530  if ( gb==NULL )
531 return( true );
532  AddData(gb,data,instance_count,6,round);
533  if ( gb->pt+3>=gb->end )
534  GrowBuffer(gb);
535  *(gb->pt)++ = 12;
536  *(gb->pt)++ = ishstem?2:1; /* h/v stem3 */
537 return( true );
538 }
539 
540 static int _SCNeedsSubsPts(SplineChar *sc,int layer) {
541  RefChar *ref;
542 
543  if ( sc->hstem==NULL && sc->vstem==NULL )
544 return( false );
545 
546  if ( sc->layers[layer].splines!=NULL )
547 return( sc->layers[layer].splines->first->hintmask==NULL );
548 
549  for ( ref = sc->layers[layer].refs; ref!=NULL; ref=ref->next )
550  if ( ref->layers[0].splines!=NULL )
551 return( ref->layers[0].splines->first->hintmask==NULL );
552 
553 return( false ); /* It's empty. that's easy. */
554 }
555 
557  if ( (format!=ff_mma && format!=ff_mmb) || sc->parent->mm==NULL ) {
558  if ( !sc->hconflicts && !sc->vconflicts )
559 return( false ); /* No conflicts, no swap-over points needed */
560 return( _SCNeedsSubsPts(sc,layer));
561  } else {
562  MMSet *mm = sc->parent->mm;
563  int i;
564  for ( i=0; i<mm->instance_count; ++i ) if ( sc->orig_pos<mm->instances[i]->glyphcnt ) {
565  if ( _SCNeedsSubsPts(mm->instances[i]->glyphs[sc->orig_pos],layer) )
566 return( true );
567  }
568 return( false );
569  }
570 }
571 
572 /* Mark those glyphs which can live totally in subrs */
573 static void SplineFont2FullSubrs1(int flags,GlyphInfo *gi) {
574  int i;
575  SplineChar *sc;
576 
577  for ( i=0; i<gi->glyphcnt; ++i ) if ( (sc=gi->gb[i].sc)!=NULL )
578  sc->ttf_glyph = 0x7fff;
579 
580 }
581 
583  int width, i;
584 
585  width = -2;
586  for ( i=0; i<sf->glyphcnt; ++i ) if ( SCWorthOutputting(sf->glyphs[i]) &&
587  (strcmp(sf->glyphs[i]->name,".notdef")!=0 || sf->glyphs[i]->layers[ly_fore].splines!=NULL)) {
588  /* Only trust the width of notdef if it's got some content */
589  /* (at least as far as fixed pitch determination goes) */
590  if ( width==-2 ) width = sf->glyphs[i]->width;
591  else if ( width!=sf->glyphs[i]->width ) {
592  width = -1;
593  break;
594  }
595  }
596 return(width);
597 }
598 
600  int width, i;
601  int k;
602  SplineFont *sf;
603 
604  if ( _sf->cidmaster!=NULL ) _sf = _sf->cidmaster;
605  width = -2;
606  k=0;
607  do {
608  sf = _sf->subfonts==NULL? _sf : _sf->subfonts[k];
609  for ( i=0; i<sf->glyphcnt; ++i ) if ( SCWorthOutputting(sf->glyphs[i]) &&
610  strcmp(sf->glyphs[i]->name,".null")!=0 &&
611  strcmp(sf->glyphs[i]->name,"nonmarkingreturn")!=0 &&
612  (strcmp(sf->glyphs[i]->name,".notdef")!=0 || sf->glyphs[i]->layers[ly_fore].splines!=NULL)) {
613  /* Only trust the width of notdef if it's got some content */
614  /* (at least as far as fixed pitch determination goes) */
615  if ( width==-2 ) width = sf->glyphs[i]->width;
616  else if ( width!=sf->glyphs[i]->width ) {
617  width = -1;
618  break;
619  }
620  }
621  ++k;
622  } while ( k<_sf->subfontcnt );
623 return(width);
624 }
625 
626 
627 static void SetupType1Subrs(struct pschars *subrs,GlyphInfo *gi) {
628  int scnt, call_size;
629  int i;
630 
631  scnt = subrs->next;
632  call_size = gi->pcnt+scnt<1131 ? 3 : 6;
633  for ( i=0; i<gi->pcnt; ++i ) {
634  /* A subroutine call takes somewhere between 2 and 6 bytes itself. */
635  /* and we must add a return statement to the end. We don't want to */
636  /* make things bigger */
637  if ( gi->psubrs[i].full_glyph_index!=-1 )
638  gi->psubrs[i].idx = scnt++;
639  else if ( gi->psubrs[i].cnt*gi->psubrs[i].len>(gi->psubrs[i].cnt*call_size)+gi->psubrs[i].len+1 )
640  gi->psubrs[i].idx = scnt++;
641  else
642  gi->psubrs[i].idx = -1;
643  }
644 
645  subrs->cnt = scnt;
646  subrs->next = scnt;
647  subrs->lens = grealloc(subrs->lens,scnt*sizeof(int));
648  subrs->values = grealloc(subrs->values,scnt*sizeof(unsigned char *));
649 
650  for ( i=0; i<gi->pcnt; ++i ) {
651  scnt = gi->psubrs[i].idx;
652  if ( scnt==-1 || gi->psubrs[i].full_glyph_index != -1 )
653  continue;
654  subrs->lens[scnt] = gi->psubrs[i].len+1;
655  subrs->values[scnt] = galloc(subrs->lens[scnt]);
656  memcpy(subrs->values[scnt],gi->psubrs[i].data,gi->psubrs[i].len);
657  subrs->values[scnt][gi->psubrs[i].len] = 11; /* Add a return to end of subr */
658  }
659 }
660 
661 static void SetupType1Chrs(struct pschars *chrs,struct pschars *subrs,GlyphInfo *gi, int iscid) {
662  int i,k,j;
663 
664  /* If a glyph lives entirely in a subroutine then we need to create both */
665  /* the subroutine entry, and the char entry which calls the subr. */
666  /* The subroutine entry will be everything EXCEPT the glyph header */
667  /* the char entry will be the glyph header and a subroutine call */
668  /* If the glyph does not go into a subr then everything goes into the char */
669  for ( i=0; i<gi->glyphcnt; ++i ) {
670  int len=0;
671  struct glyphbits *gb = &gi->gb[i];
672  if ( gb->sc==NULL )
673  continue;
674  if ( !iscid )
675  chrs->keys[i] = copy(gb->sc->name);
676  for ( k=0; k<2; ++k ) if ( k!=0 || gb->sc->ttf_glyph!=0x7fff ) {
677  uint8 *vals;
678  for ( j=0; j<gb->bcnt; ++j ) {
679  if ( k!=0 || j!=0 )
680  len += gb->bits[j].dlen;
681  if ( k==1 && gb->sc->ttf_glyph!=0x7fff ) {
682  int si = gi->psubrs[ gb->sc->ttf_glyph ].idx;
683  len += 1 + (si<=107?1:si<=1131?2:5);
684  break;
685  }
686  if ( gi->psubrs[ gb->bits[j].psub_index ].idx==-1 )
687  len += gi->psubrs[ gb->bits[j].psub_index ].len;
688  else {
689  int si = gi->psubrs[ gb->bits[j].psub_index ].idx;
690  len += 1 + (si<=107?1:si<=1131?2:5);
691  /* Space for a subr call & the sub number to call */
692  }
693  }
694  if ( k==0 ) {
695  int si = gi->psubrs[ gb->sc->ttf_glyph ].idx;
696  subrs->lens[si] = len+1;
697  vals = subrs->values[si] = galloc(len+2);
698  } else {
699  /* Don't need or want and endchar if we are using seac */
700  chrs->lens[i] = len + !gb->wasseac;
701  vals = chrs->values[i] = galloc(len+2); /* space for endchar and a final NUL (which is really meaningless, but makes me feel better) */
702  }
703 
704  len = 0;
705  for ( j=0; j<gb->bcnt; ++j ) {
706  int si;
707  if ( k!=0 || j!=0 ) {
708  memcpy(vals+len,gb->bits[j].data,gb->bits[j].dlen);
709  len += gb->bits[j].dlen;
710  }
711  si = -1;
712  if ( k==1 && gb->sc->ttf_glyph!=0x7fff )
713  si = gi->psubrs[ gb->sc->ttf_glyph ].idx;
714  else if ( gi->psubrs[ gb->bits[j].psub_index ].idx==-1 ) {
715  memcpy(vals+len,gi->psubrs[ gb->bits[j].psub_index ].data,
716  gi->psubrs[ gb->bits[j].psub_index ].len);
717  len += gi->psubrs[ gb->bits[j].psub_index ].len;
718  } else
719  si = gi->psubrs[ gb->bits[j].psub_index ].idx;
720  if ( si!=-1 ) {
721  /* space for the number (subroutine index) */
722  if ( si<=107 )
723  vals[len++] = si+139;
724  else if ( si>0 && si<=1131 ) {
725  si-=108;
726  vals[len++] = (si>>8)+247;
727  vals[len++] = si&0xff;
728  } else {
729  vals[len++] = '\377';
730  vals[len++] = (si>>24)&0xff;
731  vals[len++] = (si>>16)&0xff;
732  vals[len++] = (si>>8)&0xff;
733  vals[len++] = si&0xff;
734  }
735  /* space for the subroutine operator */
736  vals[len++] = 10;
737  }
738  if ( k==1 && gb->sc->ttf_glyph!=0x7fff )
739  break;
740  }
741  if ( k==0 ) {
742  vals[len++] = 11; /* return */
743  vals[len] = '\0';
744  } else if ( gb->wasseac ) {
745  /* Don't want an endchar */
746  vals[len] = '\0';
747  } else {
748  vals[len++] = 14; /* endchar */
749  vals[len] = '\0';
750  }
751  }
752  }
753 }
754 
755 /* ************************************************************************** */
756 /* ********************** Type2 PostScript CharStrings ********************** */
757 /* ************************************************************************** */
758 
759 #if 0
760 static int real_warn = false;
761 #endif
762 
763 static real myround2(real pos, int round) {
764  if ( round )
765 return( rint(pos));
766 
767 return( rint(65536*pos)/65536 );
768 }
769 
770 static void AddNumber2(GrowBuf *gb, real pos, int round) {
771  int val, factor;
772  unsigned char *str;
773 
774  if ( gb->pt+5>=gb->end )
775  GrowBuffer(gb);
776 
777  pos = rint(65536*pos)/65536;
778  if ( round )
779  pos = rint(pos);
780 
781  str = gb->pt;
782  if ( pos>32767.99 || pos<-32768 ) {
783  /* same logic for big ints and reals */
784  if ( pos>0x3fffffff || pos<-0x40000000 ) {
785  LogError( _("Number out of range: %g in type2 output (must be [-65536,65535])\n"),
786  pos );
787  if ( pos>0 ) pos = 0x3fffffff; else pos = -0x40000000;
788  }
789  for ( factor=2; factor<32768; factor<<=2 )
790  if ( pos/factor<32767.99 && pos/factor>-32768 )
791  break;
792  AddNumber2(gb,pos/factor,false);
793  AddNumber2(gb,factor,false);
794  if ( gb->pt+2>=gb->end )
795  GrowBuffer(gb);
796  *(gb->pt++) = 0x0c; /* Multiply operator */
797  *(gb->pt++) = 0x18;
798  } else if ( pos!=floor(pos )) {
799  val = pos*65536;
800  *str++ = '\377';
801  *str++ = (val>>24)&0xff;
802  *str++ = (val>>16)&0xff;
803  *str++ = (val>>8)&0xff;
804  *str++ = val&0xff;
805  } else {
806  val = rint(pos);
807  if ( pos>=-107 && pos<=107 )
808  *str++ = val+139;
809  else if ( pos>=108 && pos<=1131 ) {
810  val -= 108;
811  *str++ = (val>>8)+247;
812  *str++ = val&0xff;
813  } else if ( pos>=-1131 && pos<=-108 ) {
814  val = -val;
815  val -= 108;
816  *str++ = (val>>8)+251;
817  *str++ = val&0xff;
818  } else {
819  *str++ = 28;
820  *str++ = (val>>8)&0xff;
821  *str++ = val&0xff;
822  }
823  }
824  gb->pt = str;
825 }
826 
827 static void AddMask2(GrowBuf *gb,uint8 mask[12],int cnt, int oper) {
828  int i;
829 
830  if ( gb->pt+1+((cnt+7)>>3)>=gb->end )
831  GrowBuffer(gb);
832  *gb->pt++ = oper; /* hintmask,cntrmask */
833  for ( i=0; i< ((cnt+7)>>3); ++i )
834  *gb->pt++ = mask[i];
835 }
836 
837 static void CounterHints2(GrowBuf *gb, SplineChar *sc, int hcnt) {
838  int i;
839 
840  for ( i=0; i<sc->countermask_cnt; ++i )
841  AddMask2(gb,sc->countermasks[i],hcnt,20); /* cntrmask */
842 }
843 
844 static int HintSetup2(GrowBuf *gb,struct hintdb *hdb, SplinePoint *to, int break_subr ) {
845 
846  /* We might get a point with a hintmask in a glyph with no conflicts */
847  /* (ie. the initial point when we return to it at the end of the splineset*/
848  /* in that case hdb->cnt will be 0 and we should ignore it */
849  /* components in subroutines depend on not having any hintmasks */
850  if ( to->hintmask==NULL || hdb->cnt==0 || hdb->noconflicts || hdb->skiphm )
851 return( false );
852 
853  if ( memcmp(hdb->mask,*to->hintmask,(hdb->cnt+7)/8)==0 )
854 return( false );
855 
856  if ( break_subr )
857  BreakSubroutine(gb,hdb);
858 
859  AddMask2(gb,*to->hintmask,hdb->cnt,19); /* hintmask */
860  memcpy(hdb->mask,*to->hintmask,sizeof(HintMask));
861  hdb->donefirsthm = true;
862  if ( break_subr )
863  StartNextSubroutine(gb,hdb);
864 return( true );
865 }
866 
867 static void moveto2(GrowBuf *gb,struct hintdb *hdb,SplinePoint *to, int round) {
868  BasePoint temp, *tom;
869 
870  if ( gb->pt+18 >= gb->end )
871  GrowBuffer(gb);
872 
873  BreakSubroutine(gb,hdb);
874  HintSetup2(gb,hdb,to,false);
875  tom = &to->me;
876  if ( round ) {
877  temp.x = rint(tom->x);
878  temp.y = rint(tom->y);
879  tom = &temp;
880  }
881 #if 0
882  if ( hdb->current.x==tom->x && hdb->current.y==tom->y ) {
883  /* we're already here */
884  /* Yes, but a move is required anyway at char start */
885  } else
886 #endif
887  if ( hdb->current.x==tom->x ) {
888  AddNumber2(gb,tom->y-hdb->current.y,round);
889  *(gb->pt)++ = 4; /* v move to */
890  } else if ( hdb->current.y==tom->y ) {
891  AddNumber2(gb,tom->x-hdb->current.x,round);
892  *(gb->pt)++ = 22; /* h move to */
893  } else {
894  AddNumber2(gb,tom->x-hdb->current.x,round);
895  AddNumber2(gb,tom->y-hdb->current.y,round);
896  *(gb->pt)++ = 21; /* r move to */
897  }
898  hdb->current.x = rint(32768*tom->x)/32768;
899  hdb->current.y = rint(32768*tom->y)/32768;
900  StartNextSubroutine(gb,hdb);
901 }
902 
903 static Spline *lineto2(GrowBuf *gb,struct hintdb *hdb,Spline *spline, Spline *done, int round) {
904  int cnt, hv, hvcnt;
905  Spline *test, *lastgood, *lasthvgood;
906  BasePoint temp1, temp2, *tom, *fromm;
907  int donehm;
908 
909  lastgood = NULL;
910  for ( test=spline, cnt=0; test->knownlinear && cnt<15; ) {
911  ++cnt;
912  lastgood = test;
913  test = test->to->next;
914  /* it will be smaller to use a closepath operator so ignore the */
915  /* ultimate spline */
916  if ( test==done || test==NULL || test->to->next==done )
917  break;
918  }
919 
920  HintSetup2(gb,hdb,spline->to,true);
921 
922  hv = -1; hvcnt=1; lasthvgood = NULL;
923  if ( spline->from->me.x==spline->to->me.x )
924  hv = 1; /* Vertical */
925  else if ( spline->from->me.y==spline->to->me.y )
926  hv = 0; /* Horizontal */
927  donehm = true;
928  if ( hv!=-1 ) {
929  lasthvgood = spline; hvcnt = 1;
930  if ( cnt!=1 ) {
931  for ( test=spline->to->next; test!=NULL ; test = test->to->next ) {
932  fromm = &test->from->me;
933  if ( round ) {
934  temp2.x = rint(fromm->x);
935  temp2.y = rint(fromm->y);
936  fromm = &temp2;
937  }
938  tom = &test->to->me;
939  if ( round ) {
940  temp1.x = rint(tom->x);
941  temp1.y = rint(tom->y);
942  tom = &temp1;
943  }
944  if ( hv==1 && tom->y==fromm->y )
945  hv = 0;
946  else if ( hv==0 && tom->x==fromm->x )
947  hv = 1;
948  else
949  break;
950  lasthvgood = test;
951  ++hvcnt;
952  if ( test==lastgood )
953  break;
954  }
955  }
956  donehm = true;
957  if ( hvcnt==cnt || hvcnt>=2 ) {
958  /* It's more efficient to do some h/v linetos */
959  for ( test=spline; ; test = test->to->next ) {
960  if ( !donehm && test->to->hintmask!=NULL )
961  break;
962  donehm = false;
963  fromm = &test->from->me;
964  if ( round ) {
965  temp2.x = rint(fromm->x);
966  temp2.y = rint(fromm->y);
967  fromm = &temp2;
968  }
969  tom = &test->to->me;
970  if ( round ) {
971  temp1.x = rint(tom->x);
972  temp1.y = rint(tom->y);
973  tom = &temp1;
974  }
975  if ( fromm->x==tom->x )
976  AddNumber2(gb,tom->y-fromm->y,round);
977  else
978  AddNumber2(gb,tom->x-fromm->x,round);
979  hdb->current.x = rint(32768*tom->x)/32768;
980  hdb->current.y = rint(32768*tom->y)/32768;
981  if ( test==lasthvgood ) {
982  test = test->to->next;
983  break;
984  }
985  }
986  if ( gb->pt+1 >= gb->end )
987  GrowBuffer(gb);
988  *(gb->pt)++ = spline->from->me.x==spline->to->me.x? 7 : 6;
989 return( test );
990  }
991  }
992 
993  for ( test=spline; test!=NULL; test = test->to->next ) {
994  if ( !donehm && test->to->hintmask!=NULL )
995  break;
996  donehm = false;
997  fromm = &test->from->me;
998  if ( round ) {
999  temp2.x = rint(fromm->x);
1000  temp2.y = rint(fromm->y);
1001  fromm = &temp2;
1002  }
1003  tom = &test->to->me;
1004  if ( round ) {
1005  temp1.x = rint(tom->x);
1006  temp1.y = rint(tom->y);
1007  tom = &temp1;
1008  }
1009  AddNumber2(gb,tom->x-fromm->x,round);
1010  AddNumber2(gb,tom->y-fromm->y,round);
1011  hdb->current.x = rint(32768*tom->x)/32768;
1012  hdb->current.y = rint(32768*tom->y)/32768;
1013  if ( test==lastgood ) {
1014  test = test->to->next;
1015  break;
1016  }
1017  }
1018  if ( gb->pt+1 >= gb->end )
1019  GrowBuffer(gb);
1020  *(gb->pt)++ = 5; /* r line to */
1021 return( test );
1022 }
1023 
1024 static Spline *curveto2(GrowBuf *gb,struct hintdb *hdb,Spline *spline, Spline *done, int round) {
1025  int cnt=0, hv;
1026  Spline *first;
1027  DBasePoint start;
1028  int donehm;
1029 
1030  HintSetup2(gb,hdb,spline->to,true);
1031 
1032  hv = -1;
1033  if ( hdb->current.x==myround2(spline->from->nextcp.x,round) &&
1035  hv = 1;
1036  else if ( hdb->current.y==myround2(spline->from->nextcp.y,round) &&
1038  hv = 0;
1039  donehm = true;
1040  if ( hv!=-1 ) {
1041  first = spline; start = hdb->current;
1042  while (
1043  (hv==1 && hdb->current.x==myround2(spline->from->nextcp.x,round) &&
1045  (hv==0 && hdb->current.y==myround2(spline->from->nextcp.y,round) &&
1047  if ( !donehm && spline->to->hintmask!=NULL )
1048  break;
1049  donehm = false;
1050  if ( hv==1 ) {
1055  hv = 0;
1056  } else {
1061  hv = 1;
1062  }
1063  hdb->current.x = myround2(spline->to->me.x,round);
1064  hdb->current.y = myround2(spline->to->me.y,round);
1065  ++cnt;
1066  spline = spline->to->next;
1067  if ( spline==done || spline==NULL || cnt>9 || spline->knownlinear )
1068  break;
1069  }
1070  if ( gb->pt+1 >= gb->end )
1071  GrowBuffer(gb);
1072  *(gb->pt)++ = ( start.x==myround2(first->from->nextcp.x,round) && myround2(first->to->prevcp.y,round)==myround2(first->to->me.y,round) )?
1073  30:31; /* vhcurveto:hvcurveto */
1074 return( spline );
1075  }
1076  while ( cnt<6 ) {
1077  if ( !donehm && spline->to->hintmask!=NULL )
1078  break;
1079  donehm = false;
1080  hv = -1;
1081  if ( hdb->current.x==myround2(spline->from->nextcp.x,round) &&
1083  spline->to->next!=NULL &&
1086  break;
1087  else if ( hdb->current.y==myround2(spline->from->nextcp.y,round) &&
1089  spline->to->next!=NULL &&
1092  break;
1099  hdb->current.x = myround2(spline->to->me.x,round);
1100  hdb->current.y = myround2(spline->to->me.y,round);
1101  ++cnt;
1102  spline = spline->to->next;
1103  if ( spline==done || spline==NULL || spline->knownlinear )
1104  break;
1105  }
1106  if ( gb->pt+1 >= gb->end )
1107  GrowBuffer(gb);
1108  *(gb->pt)++ = 8; /* rrcurveto */
1109 return( spline );
1110 }
1111 
1112 static void flexto2(GrowBuf *gb,struct hintdb *hdb,Spline *pspline,int round) {
1113  BasePoint *c0, *c1, *mid, *end, *nc0, *nc1;
1114  Spline *nspline;
1115 
1116  c0 = &pspline->from->nextcp;
1117  c1 = &pspline->to->prevcp;
1118  mid = &pspline->to->me;
1119  nspline = pspline->to->next;
1120  nc0 = &nspline->from->nextcp;
1121  nc1 = &nspline->to->prevcp;
1122  end = &nspline->to->me;
1123 
1124  HintSetup2(gb,hdb,nspline->to,true);
1125 
1126  if ( myround2(c0->y,round)==hdb->current.y && myround2(nc1->y,round)==hdb->current.y &&
1127  myround2(end->y,round)==hdb->current.y &&
1128  myround2(c1->y,round)==myround2(mid->y,round) && myround2(nc0->y,round)==myround2(mid->y,round) ) {
1129  if ( gb->pt+7*6+2 >= gb->end )
1130  GrowBuffer(gb);
1131  AddNumber2(gb,myround2(c0->x,round)-hdb->current.x,round);
1134  AddNumber2(gb,myround2(mid->x,round)-myround2(c1->x,round),round);
1135  AddNumber2(gb,myround2(nc0->x,round)-myround2(mid->x,round),round);
1136  AddNumber2(gb,myround2(nc1->x,round)-myround2(nc0->x,round),round);
1137  AddNumber2(gb,myround2(end->x,round)-myround2(nc1->x,round),round);
1138  *gb->pt++ = 12; *gb->pt++ = 34; /* hflex */
1139  } else {
1140  if ( gb->pt+11*6+2 >= gb->end )
1141  GrowBuffer(gb);
1142  AddNumber2(gb,myround2(c0->x,round)-hdb->current.x,round);
1143  AddNumber2(gb,myround2(c0->y,round)-hdb->current.y,round);
1146  AddNumber2(gb,myround2(mid->x,round)-myround2(c1->x,round),round);
1147  AddNumber2(gb,myround2(mid->y,round)-myround2(c1->y,round),round);
1148  AddNumber2(gb,myround2(nc0->x,round)-myround2(mid->x,round),round);
1149  AddNumber2(gb,myround2(nc0->y,round)-myround2(mid->y,round),round);
1150  AddNumber2(gb,myround2(nc1->x,round)-myround2(nc0->x,round),round);
1151  AddNumber2(gb,myround2(nc1->y,round)-myround2(nc0->y,round),round);
1152  if ( hdb->current.y==myround2(end->y,round) )
1153  AddNumber2(gb,myround2(end->x,round)-myround2(nc1->x,round),round);
1154  else
1155  AddNumber2(gb,myround2(end->y,round)-myround2(nc1->y,round),round);
1156  *gb->pt++ = 12; *gb->pt++ = 37; /* flex1 */
1157  }
1158 
1159  hdb->current.x = rint(32768*end->x)/32768;
1160  hdb->current.y = rint(32768*end->y)/32768;
1161 }
1162 
1164  struct hintdb *hdb, int is_order2,int round ) {
1165  Spline *spline, *first;
1166  SplinePointList temp, *freeme = NULL;
1167  int unhinted = true;;
1168 
1169  if ( is_order2 )
1170  freeme = spl = SplineSetsPSApprox(spl);
1171 
1172  for ( ; spl!=NULL; spl = spl->next ) {
1173  first = NULL;
1174  SplineSetReverse(spl);
1175  /* PostScript and TrueType store their splines in in reverse */
1176  /* orientations. Annoying. Oh well. I shall adopt TrueType and */
1177  /* If I reverse the PS splinesets after reading them in, and then */
1178  /* again when saving them out, all should be well */
1179  if ( spl->first->flexy || spl->first->flexx ) {
1180  /* can't handle a flex (mid) point as the first point. rotate the */
1181  /* list by one, this is possible because only closed paths have */
1182  /* points marked as flex, and because we can't have two flex mid- */
1183  /* points in a row */
1184  if ( spl->first->hintmask==NULL || spl->first->next->to->hintmask!=NULL ) {
1185  /* But we can't rotate it if we expect it to provide us with */
1186  /* a hintmask. */
1187  temp = *spl;
1188  temp.first = temp.last = spl->first->next->to;
1189  spl = &temp;
1190  }
1191  if ( spl->first->flexy || spl->first->flexx ) {
1192  /* If we couldn't rotate, or if we rotated to something that */
1193  /* also is flexible, then just turn off flex. That's safe */
1194  spl->first->flexx = spl->first->flexy = false;
1195  }
1196  }
1197  if ( unhinted && hdb->cnt>0 && spl->first->hintmask!=NULL ) {
1198  hdb->mask[0] = ~(*spl->first->hintmask)[0]; /* Make it different */
1199  unhinted = false;
1200  }
1201  moveto2(gb,hdb,spl->first,round);
1202  for ( spline = spl->first->next; spline!=NULL && spline!=first; ) {
1203  if ( first==NULL ) first = spline;
1204  else if ( first->from==spline->to )
1205  hdb->skiphm = true;
1206  if ( spline->to->flexx || spline->to->flexy ) {
1207  flexto2(gb,hdb,spline,round); /* does two adjacent splines */
1208  spline = spline->to->next->to->next;
1209  } else if ( spline->knownlinear && spline->to == spl->first )
1210  /* In Type2 we don't even need a closepath to finish this off */
1211  /* (which is good, because there isn't a close path) */
1212  break;
1213  else if ( spline->knownlinear )
1214  spline = lineto2(gb,hdb,spline,first,round);
1215  else
1216  spline = curveto2(gb,hdb,spline,first,round);
1217  }
1218  hdb->skiphm = false;
1219  /* No closepath oper in type2 fonts, it's implied */
1220  SplineSetReverse(spl);
1221  /* Of course, I have to Reverse again to get back to my convention after*/
1222  /* saving */
1223  }
1224  SplinePointListsFree(freeme);
1225 }
1226 
1227 static void DumpHints(GrowBuf *gb,StemInfo *h,int oper,int midoper,int round) {
1228  real last = 0, cur;
1229  int cnt;
1230 
1231  if ( h==NULL )
1232 return;
1233  cnt = 0;
1234  while ( h!=NULL && h->hintnumber!=-1 ) {
1235  /* Type2 hints do not support negative widths except in the case of */
1236  /* ghost (now called edge) hints */
1237  if ( cnt>24-1 ) { /* stack max = 48 numbers, => 24 hints, leave a bit of slop for the width */
1238  if ( gb->pt+1>=gb->end )
1239  GrowBuffer(gb);
1240  *gb->pt++ = midoper;
1241  cnt = 0;
1242  }
1243  cur = myround2(h->start,round) + myround2(h->width,round);
1244  if ( h->width<0 ) {
1245  AddNumber2(gb,cur-last,round);
1246  AddNumber2(gb,-myround2(h->width,round),round);
1247  cur -= myround2(h->width,round);
1248  } else if ( h->ghost ) {
1249  if ( h->width==20 ) {
1250  AddNumber2(gb,myround2(h->start,round)-last+20,round);
1251  AddNumber2(gb,-20,round);
1252  cur = myround2(h->start,round);
1253  } else {
1254  AddNumber2(gb,myround2(h->start+21,round)-last,round);
1255  AddNumber2(gb,-21,round);
1256  cur = myround2(h->start+21,round)-21;
1257  }
1258  } else {
1259  AddNumber2(gb,myround2(h->start,round)-last,round);
1260  AddNumber2(gb,myround2(h->width,round),round);
1261  }
1262  last = cur;
1263  h = h->next;
1264  ++cnt;
1265  }
1266  if ( oper!=-1 ) {
1267  if ( gb->pt+1>=gb->end )
1268  GrowBuffer(gb);
1269  *gb->pt++ = oper;
1270  }
1271 }
1272 
1273 static void DumpRefsHints(GrowBuf *gb, struct hintdb *hdb,RefChar *cur,StemInfo *h,StemInfo *v,
1274  BasePoint *trans, int round,int layer) {
1275  uint8 masks[12];
1276  int cnt, sets=0;
1277  StemInfo *rs;
1278 
1279  /* trans has already been rounded (whole char is translated by an integral amount) */
1280 
1281  /* If we have a subroutine containing conflicts, then its hints will match*/
1282  /* ours exactly, and we can use its hintmasks directly */
1283  if (( cur->sc->hconflicts || cur->sc->vconflicts ) &&
1284  cur->sc->layers[layer].splines!=NULL &&
1285  cur->sc->layers[layer].splines->first->hintmask!=NULL ) {
1286  AddMask2(gb,*cur->sc->layers[layer].splines->first->hintmask,hdb->cnt,19); /* hintmask */
1287  hdb->donefirsthm = true;
1288  memcpy(hdb->mask,*cur->sc->layers[layer].splines->first->hintmask,sizeof(HintMask));
1289 return;
1290  }
1291 
1292  if ( h==NULL && v==NULL )
1293  IError("hintmask invoked when there are no hints");
1294  memset(masks,'\0',sizeof(masks));
1295  cnt = 0;
1296  while ( h!=NULL && h->hintnumber>=0 ) {
1297  /* Horizontal stems are defined by vertical bounds */
1298  real pos = (round ? rint(h->start) : h->start) - trans->y;
1299  for ( rs = cur->sc->hstem; rs!=NULL; rs=rs->next ) {
1300  real rpos = round ? rint(rs->start) : rs->start;
1301  if ( rpos==pos && (round ? (rint(rs->width)==rint(h->width)) : (rs->width==h->width)) ) {
1302  masks[h->hintnumber>>3] |= 0x80>>(h->hintnumber&7);
1303  ++sets;
1304  break;
1305  } else if ( rpos>pos )
1306  break;
1307  }
1308  h = h->next; ++cnt;
1309  }
1310  while ( v!=NULL && v->hintnumber>=0 ) {
1311  real pos = (round ? rint(v->start) : v->start) - trans->x;
1312  for ( rs = cur->sc->vstem; rs!=NULL; rs=rs->next ) {
1313  real rpos = round ? rint(rs->start) : rs->start;
1314  if ( rpos==pos && (round ? (rint(rs->width)==rint(v->width)) : (rs->width==v->width)) ) {
1315  masks[v->hintnumber>>3] |= 0x80>>(v->hintnumber&7);
1316  ++sets;
1317  break;
1318  } else if ( rpos>pos )
1319  break;
1320  }
1321  v = v->next; ++cnt;
1322  }
1323  BreakSubroutine(gb,hdb);
1324  hdb->donefirsthm = true;
1325  /* if ( sets!=0 ) */ /* First ref will need a hintmask even if it has no hints (if there are conflicts) */
1326  AddMask2(gb,masks,cnt,19); /* hintmask */
1327 }
1328 
1329 static void DummyHintmask(GrowBuf *gb,struct hintdb *hdb) {
1330  HintMask hm;
1331 
1332  memset(hm,0,sizeof(hm));
1333  if ( hdb->cnt!=0 ) {
1334  BreakSubroutine(gb,hdb);
1335  hdb->donefirsthm = true;
1336  AddMask2(gb,hm,hdb->cnt,19); /* hintmask */
1337  }
1338 }
1339 
1340 static void SetTransformedHintMask(GrowBuf *gb,struct hintdb *hdb,
1342  HintMask hm;
1343 
1344  if ( HintMaskFromTransformedRef(ref,trans,sc,&hm)!=NULL ) {
1345  BreakSubroutine(gb,hdb);
1346  hdb->donefirsthm = true;
1347  AddMask2(gb,hm,hdb->cnt,19); /* hintmask */
1348  } else if ( !hdb->donefirsthm )
1349  DummyHintmask(gb,hdb);
1350 }
1351 
1352 static void ExpandRef2(GrowBuf *gb, SplineChar *sc, struct hintdb *hdb,
1353  RefChar *r, BasePoint *trans,
1354  struct pschars *subrs, int round,int layer) {
1355  BasePoint *bpt;
1356  BasePoint temp, rtrans;
1357  GlyphInfo *gi;
1358  /* The only refs I deal with here have no hint conflicts within them */
1359 
1360  rtrans.x = r->transform[4]+trans->x;
1361  rtrans.y = r->transform[5]+trans->y;
1362  if ( round ) {
1363  rtrans.x = rint(rtrans.x);
1364  rtrans.y = rint(rtrans.y);
1365  }
1366 
1367  BreakSubroutine(gb,hdb);
1368  if ( hdb->cnt>0 && !hdb->noconflicts )
1369  DumpRefsHints(gb,hdb,r,sc->hstem,sc->vstem,&rtrans,round,layer);
1370 
1371  /* Translate from end of last character to where this one should */
1372  /* start (we must have one moveto operator to start off, none */
1373  /* in the subr) */
1374  bpt = hdb->gi->psubrs[r->sc->lsidebearing].startstop;
1375  temp.x = bpt[0].x+rtrans.x;
1376  temp.y = bpt[0].y+rtrans.y;
1377  if ( hdb->current.x!=temp.x )
1378  AddNumber2(gb,temp.x-hdb->current.x,round);
1379  if ( hdb->current.y!=temp.y || hdb->current.x==temp.x )
1380  AddNumber2(gb,temp.y-hdb->current.y,round);
1381  if ( gb->pt+1>=gb->end )
1382  GrowBuffer(gb);
1383  *gb->pt++ = hdb->current.x==temp.x?4: /* vmoveto */
1384  hdb->current.y==temp.y?22: /* hmoveto */
1385  21; /* rmoveto */
1386  if ( r->sc->lsidebearing==0x7fff )
1387  IError("Attempt to reference an unreferenceable glyph %s", r->sc->name );
1388 
1389  gi = hdb->gi;
1390  StartNextSubroutine(gb,hdb);
1391  gi->bits[gi->bcnt].psub_index = r->sc->lsidebearing;
1392  ++gi->bcnt;
1393  gi->justbroken = true;
1394  hdb->current.x = bpt[1].x+rtrans.x;
1395  hdb->current.y = bpt[1].y+rtrans.y;
1396 }
1397 
1398 static void RSC2PS2(GrowBuf *gb, SplineChar *base,SplineChar *rsc,
1399  struct hintdb *hdb, BasePoint *trans, struct pschars *subrs,
1400  int flags, int layer ) {
1401  BasePoint subtrans;
1402  int stationary = trans->x==0 && trans->y==0;
1403  RefChar *r, *unsafe=NULL;
1404  int unsafecnt=0, allwithouthints=true;
1405  int round = (flags&ps_flag_round)? true : false;
1406  StemInfo *oldh = NULL, *oldv = NULL;
1407  int hc = 0, vc = 0;
1408  SplineSet *freeme, *temp;
1409  int wasntconflicted = hdb->noconflicts;
1410 
1411  if ( flags&ps_flag_nohints ) {
1412  oldh = rsc->hstem; oldv = rsc->vstem;
1413  hc = rsc->hconflicts; vc = rsc->vconflicts;
1414  rsc->hstem = NULL; rsc->vstem = NULL;
1415  rsc->hconflicts = false; rsc->vconflicts = false;
1416  } else {
1417  for ( r=rsc->layers[layer].refs; r!=NULL; r=r->next ) {
1418  if ( !r->justtranslated )
1419  continue;
1420  if ( r->sc->hconflicts || r->sc->vconflicts ) {
1421  ++unsafecnt;
1422  unsafe = r;
1423  } else if ( r->sc->hstem!=NULL || r->sc->vstem!=NULL )
1424  allwithouthints = false;
1425  }
1426  if ( !stationary )
1427  allwithouthints = false;
1428  if ( allwithouthints && unsafe!=NULL && hdb->cnt!=NumberHints(&unsafe->sc,1))
1429  allwithouthints = false; /* There are other hints elsewhere in the base glyph */
1430  }
1431 
1432  if ( unsafe && allwithouthints ) {
1433  if ( unsafe->sc->lsidebearing!=0x7fff ) {
1434  ExpandRef2(gb,base,hdb,unsafe,trans,subrs,round,layer);
1435  } else if ( unsafe->transform[4]==0 && unsafe->transform[5]==0 )
1436  RSC2PS2(gb,base,unsafe->sc,hdb,trans,subrs,flags,layer);
1437  else
1438  unsafe = NULL;
1439  } else
1440  unsafe = NULL;
1441 
1442  /* What is the hintmask state here? It should not matter */
1443  freeme = NULL; temp = rsc->layers[layer].splines;
1444  if ( base!=rsc )
1445  temp = freeme = SPLCopyTranslatedHintMasks(temp,base,rsc,trans);
1446  CvtPsSplineSet2(gb,temp,hdb,rsc->layers[layer].order2,round);
1447  SplinePointListsFree(freeme);
1448 
1449  for ( r = rsc->layers[layer].refs; r!=NULL; r = r->next ) if ( r!=unsafe ) {
1450  if ( !r->justtranslated ) {
1451  if ( !r->sc->hconflicts && !r->sc->vconflicts && !hdb->noconflicts &&
1452  r->transform[1]==0 && r->transform[2]==0 &&
1453  r->transform[0]>0 && r->transform[3]>0 )
1455  if ( !hdb->donefirsthm )
1456  DummyHintmask(gb,hdb);
1458  CvtPsSplineSet2(gb,temp,hdb,rsc->layers[layer].order2,round);
1460  } else if ( r->sc->lsidebearing!=0x7fff &&
1461  ((flags&ps_flag_nohints) ||
1462  (!r->sc->hconflicts && !r->sc->vconflicts)) ) {
1464  } else {
1465  subtrans.x = trans->x + r->transform[4];
1466  subtrans.y = trans->y + r->transform[5];
1467  if ( !hdb->noconflicts && !r->sc->hconflicts && !r->sc->vconflicts) {
1469  hdb->noconflicts = true;
1470  }
1471  RSC2PS2(gb,base,r->sc,hdb,&subtrans,subrs,flags,layer);
1472  hdb->noconflicts = wasntconflicted;
1473  }
1474  }
1475 
1476  if ( flags&ps_flag_nohints ) {
1477  rsc->hstem = oldh; rsc->vstem = oldv;
1478  rsc->hconflicts = hc; rsc->vconflicts = vc;
1479  }
1480 }
1481 
1482 static unsigned char *SplineChar2PS2(SplineChar *sc,int *len, int nomwid,
1483  int defwid, struct pschars *subrs, int flags,
1484  GlyphInfo *gi) {
1485  GrowBuf gb;
1486  unsigned char *ret;
1487  struct hintdb hdb;
1488  StemInfo *oldh = NULL, *oldv = NULL;
1489  int hc = 0, vc = 0;
1490  SplineChar *scs[MmMax];
1491  int round = (flags&ps_flag_round)? true : false;
1492  HintMask *hm = NULL;
1493  BasePoint trans;
1494 
1497 
1498  if ( flags&ps_flag_nohints ) {
1499  oldh = sc->hstem; oldv = sc->vstem;
1500  hc = sc->hconflicts; vc = sc->vconflicts;
1501  sc->hstem = NULL; sc->vstem = NULL;
1502  sc->hconflicts = false; sc->vconflicts = false;
1503  } else if ( sc->layers[gi->layer].splines!=NULL && !sc->vconflicts &&
1504  !sc->hconflicts ) {
1505  hm = sc->layers[gi->layer].splines->first->hintmask;
1506  sc->layers[gi->layer].splines->first->hintmask = NULL;
1507  }
1508 
1509  memset(&gb,'\0',sizeof(gb));
1510 
1511  GrowBuffer(&gb);
1512 
1513  /* store the width on the stack */
1514  if ( sc->width==defwid )
1515  /* Don't need to do anything for the width */;
1516  else
1517  AddNumber2(&gb,sc->width-nomwid,round);
1518 
1519  memset(&trans,'\0',sizeof(trans));
1520  memset(&hdb,'\0',sizeof(hdb));
1521  hdb.scs = scs;
1522  hdb.gi = gi;
1523  if ( gi!=NULL )
1524  gi->bcnt = -1;
1525  scs[0] = sc;
1526  hdb.noconflicts = !sc->hconflicts && !sc->vconflicts;
1527  hdb.cnt = NumberHints(hdb.scs,1);
1528  DumpHints(&gb,sc->hstem,sc->hconflicts || sc->vconflicts?18:1,
1529  sc->hconflicts || sc->vconflicts?18:1,round);
1530  DumpHints(&gb,sc->vstem,sc->hconflicts || sc->vconflicts?-1:3,
1531  sc->hconflicts || sc->vconflicts?23:3,round);
1532  CounterHints2(&gb, sc, hdb.cnt );
1533  RSC2PS2(&gb,sc,sc,&hdb,&trans,subrs,flags,gi->layer);
1534 
1535  if ( gi->bcnt==-1 ) { /* If it's whitespace */
1536  gi->bcnt = 0;
1537  StartNextSubroutine(&gb,&hdb);
1538  }
1539  BreakSubroutine(&gb,&hdb);
1541  ret = NULL;
1542 
1543  free(gb.base);
1544  if ( flags&ps_flag_nohints ) {
1545  sc->hstem = oldh; sc->vstem = oldv;
1546  sc->hconflicts = hc; sc->vconflicts = vc;
1547  } else if ( hm!=NULL )
1548  sc->layers[gi->layer].splines->first->hintmask = hm;
1549 return( ret );
1550 }
1551 
1552 static SplinePoint *FFLineTo(SplinePoint *last, int x, int y) {
1554  SplineMake3(last,sp);
1555 return( sp );
1556 }
1557 
1559  /* I'd always assumed that Type2 notdefs would look like type1 notdefs */
1560  /* but they don't, they look like truetype notdefs. And Ralf Stubner */
1561  /* points out that the spec says they should. So make a box here */
1562  int stem, ymax;
1563  SplineSet *inner, *ss;
1564  StemInfo *h, *hints;
1565 
1566  stem = (sf->ascent+sf->descent)/20;
1567  ymax = 2*sf->ascent/3;
1568 
1569  ss = chunkalloc(sizeof(SplineSet));
1570  ss->first = ss->last = SplinePointCreate(stem,0);
1571  ss->last = FFLineTo(ss->last,stem,ymax);
1572  ss->last = FFLineTo(ss->last,sc->width-stem,ymax);
1573  ss->last = FFLineTo(ss->last,sc->width-stem,0);
1574  SplineMake3(ss->last,ss->first);
1575  ss->last = ss->first;
1576 
1577  ss->next = inner = chunkalloc(sizeof(SplineSet));
1578  inner->first = inner->last = SplinePointCreate(2*stem,stem);
1579  inner->last = FFLineTo(inner->last,sc->width-2*stem,stem);
1580  inner->last = FFLineTo(inner->last,sc->width-2*stem,ymax-stem);
1581  inner->last = FFLineTo(inner->last,2*stem,ymax-stem);
1582  SplineMake3(inner->last,inner->first);
1583  inner->last = inner->first;
1584 
1585  sc->layers[layer].splines = ss;
1586 
1587  hints = chunkalloc(sizeof(StemInfo));
1588  hints->start = stem;
1589  hints->width = stem;
1590  hints->next = h = chunkalloc(sizeof(StemInfo));
1591  h->start = sc->width-2*stem;
1592  h->width = stem;
1593  sc->vstem = hints;
1594 
1595  hints = chunkalloc(sizeof(StemInfo));
1596  hints->start = 0;
1597  hints->width = stem;
1598  hints->next = h = chunkalloc(sizeof(StemInfo));
1599  h->start = ymax-stem;
1600  h->width = stem;
1601  sc->hstem = hints;
1602 }
1603 
1604 /* Mark those glyphs which can live totally in subrs */
1606  int i;
1607  SplineChar *sc;
1608 
1609  for ( i=0; i<gi->glyphcnt; ++i ) if ( (sc=gi->gb[i].sc)!=NULL )
1610  sc->lsidebearing = 0x7fff;
1611 
1612 }
1613 
1614 struct pschars *SplineFont2ChrsSubrs2(SplineFont *sf, int nomwid, int defwid,
1615  const int *bygid, int cnt, int flags, struct pschars **_subrs, int layer) {
1616  struct pschars *subrs, *chrs;
1617  int i,j,k,scnt;
1618  SplineChar *sc;
1619  GlyphInfo gi;
1620  SplineChar dummynotdef;
1621 
1622  memset(&gi,0,sizeof(gi));
1623  memset(&gi.hashed,-1,sizeof(gi.hashed));
1624  gi.instance_count = 1;
1625  gi.sf = sf;
1626  gi.layer = layer;
1627  gi.glyphcnt = cnt;
1628  gi.bygid = bygid;
1629  gi.gb = gcalloc(cnt,sizeof(struct glyphbits));
1630  gi.pmax = 3*cnt;
1631  gi.psubrs = galloc(gi.pmax*sizeof(struct potentialsubrs));
1632  for ( i=0; i<cnt; ++i ) {
1633  int gid = bygid[i];
1634  if ( i==0 && gid==-1 ) {
1635  sc = &dummynotdef;
1636  memset(sc,0,sizeof(dummynotdef));
1637  dummynotdef.name = ".notdef";
1638  dummynotdef.parent = sf;
1639  dummynotdef.layer_cnt = sf->layer_cnt;
1640  dummynotdef.layers = gcalloc(sf->layer_cnt,sizeof(Layer));
1641  dummynotdef.width = SFOneWidth(sf);
1642  if ( dummynotdef.width==-1 )
1643  dummynotdef.width = (sf->ascent+sf->descent)/2;
1644  Type2NotDefSplines(sf,&dummynotdef,layer);
1645  } else if ( gid!=-1 )
1646  sc = sf->glyphs[gid];
1647  else
1648  continue;
1649  gi.gb[i].sc = sc;
1650  sc->lsidebearing = 0x7fff;
1651  }
1654 
1655  for ( i=0; i<cnt; ++i ) {
1656  if ( (sc = gi.gb[i].sc)==NULL )
1657  continue;
1658  gi.active = &gi.gb[i];
1659  SplineChar2PS2(sc,NULL,nomwid,defwid,NULL,flags,&gi);
1660  ff_progress_next();
1661  }
1662 
1663  for ( i=scnt=0; i<gi.pcnt; ++i ) {
1664  /* A subroutine call takes somewhere between 2 and 4 bytes itself. */
1665  /* and we must add a return statement to the end. We don't want to */
1666  /* make things bigger */
1667  /* if we have more than 65535 subrs a subr call can take 9 bytes */
1668  if ( gi.psubrs[i].full_glyph_index!=-1 )
1669  gi.psubrs[i].idx = scnt++;
1670  else if ( gi.psubrs[i].cnt*gi.psubrs[i].len>(gi.psubrs[i].cnt*4)+gi.psubrs[i].len+1 )
1671  gi.psubrs[i].idx = scnt++;
1672  else
1673  gi.psubrs[i].idx = -1;
1674  }
1675  subrs = gcalloc(1,sizeof(struct pschars));
1676  subrs->cnt = scnt;
1677  subrs->next = scnt;
1678  subrs->lens = galloc(scnt*sizeof(int));
1679  subrs->values = galloc(scnt*sizeof(unsigned char *));
1680  subrs->bias = scnt<1240 ? 107 :
1681  scnt<33900 ? 1131 : 32768;
1682  for ( i=0; i<gi.pcnt; ++i ) {
1683  if ( gi.psubrs[i].idx != -1 ) {
1684  scnt = gi.psubrs[i].idx;
1685  subrs->lens[scnt] = gi.psubrs[i].len+1;
1686  subrs->values[scnt] = galloc(subrs->lens[scnt]);
1687  memcpy(subrs->values[scnt],gi.psubrs[i].data,gi.psubrs[i].len);
1688  subrs->values[scnt][gi.psubrs[i].len] = 11; /* Add a return to end of subr */
1689  }
1690  }
1691 
1692  chrs = gcalloc(1,sizeof(struct pschars));
1693  chrs->cnt = cnt;
1694  chrs->next = cnt;
1695  chrs->lens = galloc(cnt*sizeof(int));
1696  chrs->values = galloc(cnt*sizeof(unsigned char *));
1697  chrs->keys = galloc(cnt*sizeof(char *));
1698  for ( i=0; i<cnt; ++i ) {
1699  int len=0;
1700  uint8 *vals;
1701  struct glyphbits *gb = &gi.gb[i];
1702  if ( gb->sc==NULL )
1703  continue;
1704  chrs->keys[i] = copy(gb->sc->name);
1705  for ( k=0; k<2; ++k ) if ( k!=0 || gb->sc->lsidebearing!=0x7fff ) {
1706  for ( j=0; j<gb->bcnt; ++j ) {
1707  if ( k!=0 || j!=0 )
1708  len += gb->bits[j].dlen;
1709  if ( k==1 && gb->sc->lsidebearing!=0x7fff ) {
1710  int si = gi.psubrs[ gb->sc->lsidebearing ].idx;
1711  len += 1 + (si<=107 && si>=-107?1:si<=1131 && si>=-1131?2:si>=-32768 && si<32767?3:8);
1712  break;
1713  }
1714  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 )
1715  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1716  else {
1717  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1718  /* space for the number (subroutine index) */
1719  if ( si>=-107 && si<=107 )
1720  ++len;
1721  else if ( si>=-1131 && si<=1131 )
1722  len += 2;
1723  else if ( si>=-32768 && si<=32767 )
1724  len += 3;
1725  else
1726  len += 8;
1727  /* space for the subroutine operator */
1728  ++len;
1729  }
1730  }
1731  if ( k==0 ) {
1732  int si = gi.psubrs[ gb->sc->lsidebearing ].idx;
1733  subrs->lens[si] = len+1;
1734  vals = subrs->values[si] = galloc(len+2);
1735  } else {
1736  chrs->lens[i] = len+1;
1737  vals = chrs->values[i] = galloc(len+2); /* space for endchar and a final NUL (which is really meaningless, but makes me feel better) */
1738  }
1739 
1740  len = 0;
1741  for ( j=0; j<gb->bcnt; ++j ) {
1742  int si;
1743  if ( k!=0 || j!=0 ) {
1744  memcpy(vals+len,gb->bits[j].data,gb->bits[j].dlen);
1745  len += gb->bits[j].dlen;
1746  }
1747  si = 0x80000000;
1748  if ( k==1 && gb->sc->lsidebearing!=0x7fff )
1749  si = gi.psubrs[ gb->sc->lsidebearing ].idx - subrs->bias;
1750  else if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 ) {
1751  memcpy(vals+len,gi.psubrs[ gb->bits[j].psub_index ].data,
1752  gi.psubrs[ gb->bits[j].psub_index ].len);
1753  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1754  } else
1755  si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1756  if ( si!=0x80000000 ) {
1757  /* space for the number (subroutine index) */
1758  if ( si>=-107 && si<=107 )
1759  vals[len++] = si+139;
1760  else if ( si>0 && si<=1131 ) {
1761  si-=108;
1762  vals[len++] = (si>>8)+247;
1763  vals[len++] = si&0xff;
1764  } else if ( si>=-1131 && si<0 ) {
1765  si=(-si)-108;
1766  vals[len++] = (si>>8)+251;
1767  vals[len++] = si&0xff;
1768  } else if ( si>=-32768 && si<=32767 ) {
1769  vals[len++] = 28;
1770  vals[len++] = (si>>8)&0xff;
1771  vals[len++] = si&0xff;
1772  } else {
1773  /* store as fixed point, then multiply by 64. Takes 8 bytes */
1774  si *= (65536/64);
1775  vals[len++] = '\377';
1776  vals[len++] = (si>>24)&0xff;
1777  vals[len++] = (si>>16)&0xff;
1778  vals[len++] = (si>>8)&0xff;
1779  vals[len++] = si&0xff;
1780  vals[len++] = 64 + 139;
1781  vals[len++] = 0xc; vals[len++] = 0x18; /* Multiply */
1782  }
1783 
1784  /* space for the subroutine operator */
1785  vals[len++] = 10;
1786  }
1787  if ( k==1 && gb->sc->lsidebearing!=0x7fff )
1788  break;
1789  }
1790  if ( k==0 ) {
1791  vals[len++] = 11; /* return */
1792  vals[len] = '\0';
1793  } else {
1794  vals[len++] = 14; /* endchar */
1795  vals[len] = '\0';
1796  }
1797  }
1798  }
1799 
1800  GIFree(&gi,&dummynotdef);
1801  *_subrs = subrs;
1802 return( chrs );
1803 }
1804 
1805 struct pschars *CID2ChrsSubrs2(SplineFont *cidmaster,struct fd2data *fds,
1806  int flags, struct pschars **_glbls, int layer) {
1807  struct pschars *chrs, *glbls;
1808  int i, j, cnt, cid, max, fd;
1809  int *scnts;
1810  SplineChar *sc;
1811  SplineFont *sf = NULL;
1812  /* In a cid-keyed font, cid 0 is defined to be .notdef so there are no */
1813  /* special worries. If it is defined we use it. If it is not defined */
1814  /* we add it. */
1815  GlyphInfo gi;
1816  SplineChar dummynotdef;
1817 
1818  max = 0;
1819  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1820  if ( max<cidmaster->subfonts[i]->glyphcnt )
1821  max = cidmaster->subfonts[i]->glyphcnt;
1822  MarkTranslationRefs(cidmaster->subfonts[i],layer);
1823  }
1824  cnt = 1; /* for .notdef */
1825  for ( cid = 1; cid<max; ++cid ) {
1826  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1827  sf = cidmaster->subfonts[i];
1828  if ( cid<sf->glyphcnt && (sc=sf->glyphs[cid])!=NULL ) {
1829  sc->ttf_glyph = -1;
1830  sc->lsidebearing = 0x7fff;
1831  if ( SCWorthOutputting(sc))
1832  ++cnt;
1833  break;
1834  }
1835  }
1836  }
1837 
1838  memset(&gi,0,sizeof(gi));
1839  memset(&gi.hashed,-1,sizeof(gi.hashed));
1840  gi.instance_count = 1;
1841  gi.sf = sf;
1842  gi.glyphcnt = cnt;
1843  gi.bygid = NULL;
1844  gi.gb = gcalloc(cnt,sizeof(struct glyphbits));
1845  gi.pmax = 3*cnt;
1846  gi.psubrs = galloc(gi.pmax*sizeof(struct potentialsubrs));
1847  gi.layer = layer;
1848 
1849  for ( cid = cnt = 0; cid<max; ++cid ) {
1850  sf = NULL;
1851  for ( i=0; i<cidmaster->subfontcnt; ++i ) {
1852  sf = cidmaster->subfonts[i];
1853  if ( cid<sf->glyphcnt && SCWorthOutputting(sf->glyphs[cid]) )
1854  break;
1855  }
1856  if ( cid!=0 && i==cidmaster->subfontcnt ) {
1857  sc=NULL;
1858  } else if ( i==cidmaster->subfontcnt ) {
1859  /* They didn't define CID 0 */
1860  sc = &dummynotdef;
1861  /* Place it in the final subfont (which is what sf points to) */
1862  memset(sc,0,sizeof(dummynotdef));
1863  dummynotdef.name = ".notdef";
1864  dummynotdef.parent = sf;
1865  dummynotdef.layer_cnt = layer+1;
1866  dummynotdef.layers = gcalloc(layer+1,sizeof(Layer));
1867  dummynotdef.width = SFOneWidth(sf);
1868  if ( dummynotdef.width==-1 )
1869  dummynotdef.width = (sf->ascent+sf->descent);
1870  Type2NotDefSplines(sf,&dummynotdef,layer);
1871  gi.gb[cnt].sc = sc;
1872  gi.gb[cnt].fd = i = cidmaster->subfontcnt-1;
1873 #if 0 && HANYANG /* Too much stuff knows the glyph cnt, can't refigure it here at the end */
1874  } else if ( sf->glyphs[cid]->compositionunit ) {
1875  sc=NULL; /* don't output it, should be in a subroutine */;
1876 #endif
1877  } else {
1878  gi.gb[cnt].sc = sc = sf->glyphs[cid];
1879  gi.gb[cnt].fd = i;
1880  }
1881  if ( sc!=NULL ) {
1882  sc->lsidebearing = 0x7fff;
1883  gi.active = &gi.gb[cnt];
1884  sc->ttf_glyph = cnt++;
1885  SplineChar2PS2(sc,NULL,fds[i].nomwid,fds[i].defwid,NULL,flags,&gi);
1886  }
1887  ff_progress_next();
1888  }
1889 
1890  scnts = gcalloc( cidmaster->subfontcnt+1,sizeof(int));
1891  for ( i=0; i<gi.pcnt; ++i ) {
1892  gi.psubrs[i].idx = -1;
1893  if ( gi.psubrs[i].cnt*gi.psubrs[i].len>(gi.psubrs[i].cnt*4)+gi.psubrs[i].len+1 )
1894  gi.psubrs[i].idx = scnts[gi.psubrs[i].fd+1]++;
1895  }
1896 
1897  glbls = gcalloc(1,sizeof(struct pschars));
1898  glbls->cnt = scnts[0];
1899  glbls->next = scnts[0];
1900  glbls->lens = galloc(scnts[0]*sizeof(int));
1901  glbls->values = galloc(scnts[0]*sizeof(unsigned char *));
1902  glbls->bias = scnts[0]<1240 ? 107 :
1903  scnts[0]<33900 ? 1131 : 32768;
1904  for ( fd=0; fd<cidmaster->subfontcnt; ++fd ) {
1905  fds[fd].subrs = gcalloc(1,sizeof(struct pschars));
1906  fds[fd].subrs->cnt = scnts[fd+1];
1907  fds[fd].subrs->next = scnts[fd+1];
1908  fds[fd].subrs->lens = galloc(scnts[fd+1]*sizeof(int));
1909  fds[fd].subrs->values = galloc(scnts[fd+1]*sizeof(unsigned char *));
1910  fds[fd].subrs->bias = scnts[fd+1]<1240 ? 107 :
1911  scnts[fd+1]<33900 ? 1131 : 32768;
1912  }
1913  free( scnts);
1914 
1915  for ( i=0; i<gi.pcnt; ++i ) {
1916  if ( gi.psubrs[i].idx != -1 ) {
1917  struct pschars *subrs = gi.psubrs[i].fd==-1 ? glbls : fds[gi.psubrs[i].fd].subrs;
1918  int scnt = gi.psubrs[i].idx;
1919  subrs->lens[scnt] = gi.psubrs[i].len+1;
1920  subrs->values[scnt] = galloc(subrs->lens[scnt]);
1921  memcpy(subrs->values[scnt],gi.psubrs[i].data,gi.psubrs[i].len);
1922  subrs->values[scnt][gi.psubrs[i].len] = 11; /* Add a return to end of subr */
1923  }
1924  }
1925 
1926 
1927  chrs = gcalloc(1,sizeof(struct pschars));
1928  chrs->cnt = cnt;
1929  chrs->next = cnt;
1930  chrs->lens = galloc(cnt*sizeof(int));
1931  chrs->values = galloc(cnt*sizeof(unsigned char *));
1932  chrs->keys = galloc(cnt*sizeof(char *));
1933  for ( i=0; i<cnt; ++i ) {
1934  int len=0;
1935  struct glyphbits *gb = &gi.gb[i];
1936  chrs->keys[i] = copy(gb->sc->name);
1937  for ( j=0; j<gb->bcnt; ++j ) {
1938  len += gb->bits[j].dlen;
1939  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 )
1940  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1941  else {
1942  struct pschars *subrs = gi.psubrs[gb->bits[j].psub_index].fd==-1 ? glbls : fds[gi.psubrs[gb->bits[j].psub_index].fd].subrs;
1943  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1944  /* space for the number (subroutine index) */
1945  if ( si>=-107 && si<=107 )
1946  ++len;
1947  else if ( si>=-1131 && si<=1131 )
1948  len += 2;
1949  else if ( si>=-32768 && si<=32767 )
1950  len += 3;
1951  else
1952  len += 8;
1953  /* space for the subroutine operator */
1954  ++len;
1955  }
1956  }
1957  chrs->lens[i] = len+1;
1958  chrs->values[i] = galloc(len+2); /* space for endchar and a final NUL (which is really meaningless, but makes me feel better) */
1959 
1960  len = 0;
1961  for ( j=0; j<gb->bcnt; ++j ) {
1962  memcpy(chrs->values[i]+len,gb->bits[j].data,gb->bits[j].dlen);
1963  len += gb->bits[j].dlen;
1964  if ( gi.psubrs[ gb->bits[j].psub_index ].idx==-1 ) {
1965  memcpy(chrs->values[i]+len,gi.psubrs[ gb->bits[j].psub_index ].data,
1966  gi.psubrs[ gb->bits[j].psub_index ].len);
1967  len += gi.psubrs[ gb->bits[j].psub_index ].len;
1968  } else {
1969  struct pschars *subrs = gi.psubrs[gb->bits[j].psub_index].fd==-1 ? glbls : fds[gi.psubrs[gb->bits[j].psub_index].fd].subrs;
1970  int si = gi.psubrs[ gb->bits[j].psub_index ].idx - subrs->bias;
1971  /* space for the number (subroutine index) */
1972  if ( si>=-107 && si<=107 )
1973  chrs->values[i][len++] = si+139;
1974  else if ( si>0 && si<=1131 ) {
1975  si-=108;
1976  chrs->values[i][len++] = (si>>8)+247;
1977  chrs->values[i][len++] = si&0xff;
1978  } else if ( si>=-1131 && si<0 ) {
1979  si=(-si)-108;
1980  chrs->values[i][len++] = (si>>8)+251;
1981  chrs->values[i][len++] = si&0xff;
1982  } else if ( si>=-32768 && si<=32767 ) {
1983  chrs->values[i][len++] = 28;
1984  chrs->values[i][len++] = (si>>8)&0xff;
1985  chrs->values[i][len++] = si&0xff;
1986  } else {
1987  /* store as fixed point, then multiply by 64. Takes 8 bytes */
1988  si *= (65536/64);
1989  chrs->values[i][len++] = '\377';
1990  chrs->values[i][len++] = (si>>24)&0xff;
1991  chrs->values[i][len++] = (si>>16)&0xff;
1992  chrs->values[i][len++] = (si>>8)&0xff;
1993  chrs->values[i][len++] = si&0xff;
1994  chrs->values[i][len++] = 64 + 139;
1995  chrs->values[i][len++] = 0xc; chrs->values[i][len++] = 0x18; /* Multiply */
1996  }
1997  /* space for the subroutine operator */
1998  if ( gi.psubrs[ gb->bits[j].psub_index ].fd==-1 ) {
1999  chrs->values[i][len++] = 29;
2000  } else
2001  chrs->values[i][len++] = 10;
2002  }
2003  }
2004  chrs->values[i][len++] = 14; /* endchar */
2005  chrs->values[i][len] = '\0';
2006  }
2007  GIFree(&gi,&dummynotdef);
2008  *_glbls = glbls;
2009 return( chrs );
2010 }
2011 
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
static int hc[66]
Definition: aptex.h:612
#define hash
Definition: aptex.h:388
static point_t cur
Definition: backend_eps.c:108
@ 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
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
static int ret
Definition: convert.c:72
#define floor(x)
Definition: cpascal.h:52
#define test
Definition: tie.c:129
unsigned char uint8
Definition: tiff.h:60
const int * pos
Definition: combiners.h:905
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 r
Definition: ppmqvga.c:68
bstring c int memset(void *s, int c, int length)
FontScalableRec vals
Definition: ps2pk.c:202
#define flags
C API: Unicode string handling functions.
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_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
SplineSet * SplineSetsPSApprox(SplineSet *ss)
Definition: splineorder2.c:997
SplinePointList * SPLCopyTransformedHintMasks(RefChar *r, SplineChar *basesc, BasePoint *trans, int layer)
Definition: splineutil.c:1226
#define chunkalloc(size)
Definition: splinefont.h:1947
#define chunkfree(item, size)
Definition: splinefont.h:1948
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
struct glyphinfo GlyphInfo
int autohint_before_generate
Definition: splinesave.c:32
int SFOneWidth(SplineFont *sf)
Definition: splinesave.c:679
int CvtPsStem3(GrowBuf *gb, SplineChar *scs[16], int instance_count, int ishstem, int round)
Definition: splinesave.c:456
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
int CIDOneWidth(SplineFont *_sf)
Definition: splinesave.c:696
struct pschars * CID2ChrsSubrs2(SplineFont *cidmaster, struct fd2data *fds, int flags, struct pschars **_glbls, int layer)
Definition: splinesave.c:1863
#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 int NumberHints(SplineChar *scs[16], int instance_count)
Definition: splinesave.c:315
static void RSC2PS2(GrowBuf *gb, SplineChar *base, SplineChar *rsc, struct hintdb *hdb, BasePoint *trans, struct pschars *subrs, int flags, int layer)
Definition: splinesave.c:1398
static void CvtPsSplineSet2(GrowBuf *gb, SplinePointList *spl, struct hintdb *hdb, int is_order2, int round)
Definition: splinesave.c:1163
static void SplineFont2FullSubrs2(int flags, GlyphInfo *gi)
Definition: splinesave.c:1605
static void Type2NotDefSplines(SplineFont *sf, SplineChar *sc, int layer)
Definition: splinesave.c:1558
static void SetupType1Chrs(struct pschars *chrs, struct pschars *subrs, GlyphInfo *gi, int iscid)
Definition: splinesave.c:661
static void SplineFont2FullSubrs1(int flags, GlyphInfo *gi)
Definition: splinesave.c:573
static void GIFree(GlyphInfo *gi, SplineChar *dummynotdef)
Definition: splinesave.c:198
static void StartNextSubroutine(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:220
static void MarkTranslationRefs(SplineFont *sf, int layer)
Definition: splinesave.c:351
static void DumpHints(GrowBuf *gb, StemInfo *h, int oper, int midoper, int round)
Definition: splinesave.c:1227
static void ExpandRef2(GrowBuf *gb, SplineChar *sc, struct hintdb *hdb, RefChar *r, BasePoint *trans, struct pschars *subrs, int round, int layer)
Definition: splinesave.c:1352
static void GIContentsFree(GlyphInfo *gi, SplineChar *dummynotdef)
Definition: splinesave.c:164
void RefCharsFreeRef(RefChar *ref)
Definition: splinesave.c:340
static int hashfunc(uint8 *data, int len)
Definition: splinesave.c:240
static void AddMask2(GrowBuf *gb, uint8 mask[12], int cnt, int oper)
Definition: splinesave.c:827
static void moveto2(GrowBuf *gb, struct hintdb *hdb, SplinePoint *to, int round)
Definition: splinesave.c:867
static SplinePoint * FFLineTo(SplinePoint *last, int x, int y)
Definition: splinesave.c:1552
static void DummyHintmask(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:1329
static Spline * curveto2(GrowBuf *gb, struct hintdb *hdb, Spline *spline, Spline *done, int round)
Definition: splinesave.c:1024
static void DumpRefsHints(GrowBuf *gb, struct hintdb *hdb, RefChar *cur, StemInfo *h, StemInfo *v, BasePoint *trans, int round, int layer)
Definition: splinesave.c:1273
static void AddNumber(GrowBuf *gb, double pos, int round)
Definition: splinesave.c:374
static double myround(double pos, int round)
Definition: splinesave.c:367
static void CounterHints2(GrowBuf *gb, SplineChar *sc, int hcnt)
Definition: splinesave.c:837
static void SetTransformedHintMask(GrowBuf *gb, struct hintdb *hdb, SplineChar *sc, RefChar *ref, BasePoint *trans, int round)
Definition: splinesave.c:1340
static Spline * lineto2(GrowBuf *gb, struct hintdb *hdb, Spline *spline, Spline *done, int round)
Definition: splinesave.c:903
static void MoveSubrsToChar(GlyphInfo *gi)
Definition: splinesave.c:303
static int HintSetup2(GrowBuf *gb, struct hintdb *hdb, SplinePoint *to, int break_subr)
Definition: splinesave.c:844
#define HSH_SIZE
Definition: splinesave.c:95
static void AddNumber2(GrowBuf *gb, double pos, int round)
Definition: splinesave.c:770
static unsigned char * SplineChar2PS2(SplineChar *sc, int *len, int nomwid, int defwid, struct pschars *subrs, int flags, GlyphInfo *gi)
Definition: splinesave.c:1482
static void SetupType1Subrs(struct pschars *subrs, GlyphInfo *gi)
Definition: splinesave.c:627
struct growbuf GrowBuf
static double myround2(double pos, int round)
Definition: splinesave.c:763
static void flexto2(GrowBuf *gb, struct hintdb *hdb, Spline *pspline, int round)
Definition: splinesave.c:1112
static void BreakSubroutine(GrowBuf *gb, struct hintdb *hdb)
Definition: splinesave.c:253
static int SCNeedsSubsPts(SplineChar *sc, enum fontformat format, int layer)
Definition: splinesave.c:556
static int _SCNeedsSubsPts(SplineChar *sc, int layer)
Definition: splinesave.c:540
static void AddData(GrowBuf *gb, double data[16][6], int instances, int num_coords, int round)
Definition: splinesave.c:420
static void GrowBuffer(GrowBuf *gb)
Definition: splinesave.c:207
void * gcalloc(int cnt, long size)
#define grealloc
Definition: basics.h:41
void * galloc(long size)
#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
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
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
#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