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)  

autohint.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 "stemdb.h"
32 #include <utype.h>
33 #include <chardata.h>
34 #include "edgelist.h"
35 
36 /* to create a type 1 font we must come up with the following entries for the
37  private dictionary:
38  BlueValues -- an array of 2n entries where Blue[2i]<Blue[2i+1] max n=7, Blue[i]>0
39  OtherBlues -- (optional) OtherBlue[i]<0
40  (blue zones should be at least 3 units appart)
41  StdHW -- (o) array with one entry, standard hstem height
42  StdVW -- (o) ditto vstem width
43  StemSnapH -- (o) up to 12 numbers containing various hstem heights (includes StdHW), small widths first
44  StemSnapV -- (o) ditto, vstem
45 This file has routines to figure out at least some of these
46 
47 Also other routines to guess at good per-character hints
48 */
49 
50 static void AddBlue(real val, real array[5], int force) {
51  val = rint(val);
52  if ( !force && (val<array[0]-array[1] || val >array[0]+array[1] ))
53 return; /* Outside of one sd */
54  if ( array[3]==0 && array[4]==0 )
55  array[3] = array[4] = val;
56  else if ( val>array[4] )
57  array[4] = val;
58  else if ( val<array[3] )
59  array[3] = val;
60 }
61 
62 static void MergeZones(real zone1[5], real zone2[5]) {
63  if ( zone1[2]!=0 && zone2[2]!=0 &&
64  ((zone1[4]+3>zone2[3] && zone1[3]<=zone2[3]) ||
65  (zone2[4]+3>zone1[3] && zone2[3]<=zone1[3]) )) {
66  if (( zone2[0]<zone1[0]-zone1[1] || zone2[0] >zone1[0]+zone1[1] ) &&
67  ( zone1[0]<zone2[0]-zone2[1] || zone1[0] >zone2[0]+zone2[1] ))
68  /* the means of the zones are too far appart, don't merge em */;
69  else {
70  if ( zone1[0]<zone2[0] ) zone2[0] = zone1[0];
71  if ( zone1[1]>zone2[1] ) zone2[1] = zone1[1];
72  }
73  zone1[2] = 0;
74  }
75 }
76 
77 /* I can deal with latin, greek and cyrillic because the they all come from */
78 /* the same set of letter shapes and have all evolved together and have */
79 /* various common features (ascenders, descenders, lower case, etc.). Other */
80 /* scripts don't fit */
82  real caph[5], xh[5], ascenth[5], digith[5], descenth[5], base[5];
83  real otherdigits[5];
84  int i, j, k;
85  DBounds b;
86 
87  /* Go through once to get some idea of the average value so we can weed */
88  /* out undesireables */
89  caph[0] = caph[1] = caph[2] = xh[0] = xh[1] = xh[2] = 0;
90  ascenth[0] = ascenth[1] = ascenth[2] = digith[0] = digith[1] = digith[2] = 0;
91  descenth[0] = descenth[1] = descenth[2] = base[0] = base[1] = base[2] = 0;
92  otherdigits[0] = otherdigits[1] = otherdigits[2] = 0;
93  for ( i=0; i<sf->glyphcnt; ++i ) {
94  if ( sf->glyphs[i]!=NULL && sf->glyphs[i]->layers[layer].splines!=NULL ) {
95  int enc = sf->glyphs[i]->unicodeenc;
96 #ifndef LUA_FF_LIB
97  const unichar_t *upt;
98 #endif
99  if ( enc<0x10000 && isalnum(enc) &&
100  ((enc>=32 && enc<128 ) || enc == 0xfe || enc==0xf0 || enc==0xdf ||
101  enc==0x131 ||
102  (enc>=0x391 && enc<=0x3f3 ) ||
103  (enc>=0x400 && enc<=0x4e9 ) )) {
104  /* no accented characters (or ligatures) */
105 #ifndef LUA_FF_LIB
106  if ( unicode_alternates[enc>>8]!=NULL &&
107  (upt =unicode_alternates[enc>>8][enc&0xff])!=NULL &&
108  upt[1]!='\0' )
109  continue;
110 #endif
111  SplineCharFindBounds(sf->glyphs[i],&b);
112  if ( b.miny==0 && b.maxy==0 )
113  continue;
114  if ( enc=='g' || enc=='j' || enc=='p' || enc=='q' || enc=='y' ||
115  enc==0xfe ||
116  enc==0x3c1 /* rho */ ||
117  enc==0x3c6 /* phi */ ||
118  enc==0x3c7 /* chi */ ||
119  enc==0x3c8 /* psi */ ||
120  enc==0x440 /* cyr er */ ||
121  enc==0x443 /* cyr u */ ||
122  enc==0x444 /* cyr ef */) {
123  descenth[0] += b.miny;
124  descenth[1] += b.miny*b.miny;
125  ++descenth[2];
126  } else if ( enc=='x' || enc=='r' || enc=='o' || enc=='e' ||
127  enc=='s' || enc=='c' || enc=='h' || enc=='k' ||
128  enc=='l' || enc=='m' || enc=='n' ||
129  enc==0x3b5 /* epsilon */ ||
130  enc==0x3b9 /* iota */ ||
131  enc==0x3ba /* kappa */ ||
132  enc==0x3bf /* omicron */ ||
133  enc==0x3c3 /* sigma */ ||
134  enc==0x3c5 /* upsilon */ ||
135  enc==0x430 /* cyr a */ ||
136  enc==0x432 /* cyr ve */ ||
137  enc==0x433 /* cyr ge */ ||
138  enc==0x435 /* cyr e */ ||
139  enc==0x436 /* cyr zhe */ ||
140  enc==0x438 /* cyr i */ ||
141  enc==0x43a /* cyr ka */ ||
142  enc==0x43d /* cyr en */ ||
143  enc==0x43e /* cyr o */ ||
144  enc==0x441 /* cyr es */ ||
145  enc==0x445 /* cyr ha */ ||
146  enc==0x447 /* cyr che */ ||
147  enc==0x448 /* cyr sha */ ||
148  enc==0x44f /* cyr ya */ ){
149  base[0] += b.miny;
150  base[1] += b.miny*b.miny;
151  ++base[2];
152  }
153  /* careful of lowercase digits, 6 and 8 should be ascenders */
154  if ( enc=='6' || enc=='8' ) {
155  digith[0] += b.maxy;
156  digith[1] += b.maxy*b.maxy;
157  ++digith[2];
158  } else if ( enc<0x10000 && isdigit(enc) ) {
159  otherdigits[0] += b.maxy;
160  otherdigits[1] += b.maxy*b.maxy;
161  ++otherdigits[2];
162  } else if ( enc<0x10000 && isupper(enc) && enc!=0x462 && enc!=0x490 ) {
163  caph[0] += b.maxy;
164  caph[1] += b.maxy*b.maxy;
165  ++caph[2];
166  } else if ( enc=='b' || enc=='d' || enc=='f' || enc=='h' || enc=='k' ||
167  enc == 'l' || enc==0xf0 || enc==0xfe || enc == 0xdf ||
168  enc == 0x3b2 || enc==0x3b6 || enc==0x3b8 || enc==0x3bb ||
169  enc == 0x3be ||
170  enc == 0x431 /* cyr be */ /* || enc == 0x444 - ef may have varible height */) {
171  ascenth[0] += b.maxy;
172  ascenth[1] += b.maxy*b.maxy;
173  ++ascenth[2];
174  } else if ( enc=='c' || enc=='e' || enc=='o' || enc=='s' || enc=='u' ||
175  enc=='u' || enc=='v' || enc=='w' || enc=='x' || enc=='y' ||
176  enc=='z' ||
177  enc==0x3b5 /* epsilon */ ||
178  enc==0x3b9 /* iota */ ||
179  enc==0x3ba /* kappa */ ||
180  enc==0x3bc /* mu */ ||
181  enc==0x3bd /* nu */ ||
182  enc==0x3bf /* omicron */ ||
183  enc==0x3c0 /* pi */ ||
184  enc==0x3c1 /* rho */ ||
185  enc==0x3c5 /* upsilon */ ||
186  enc==0x433 /* cyr ge */ ||
187  enc==0x435 /* cyr e */ ||
188  enc==0x436 /* cyr zhe */ ||
189  enc==0x438 /* cyr i */ ||
190  enc==0x43b /* cyr el */ ||
191  enc==0x43d /* cyr en */ ||
192  enc==0x43e /* cyr o */ ||
193  enc==0x43f /* cyr pe */ ||
194  enc==0x440 /* cyr er */ ||
195  enc==0x441 /* cyr es */ ||
196  enc==0x442 /* cyr te */ ||
197  enc==0x443 /* cyr u */ ||
198  enc==0x445 /* cyr ha */ ||
199  enc==0x446 /* cyr tse */ ||
200  enc==0x447 /* cyr che */ ||
201  enc==0x448 /* cyr sha */ ||
202  enc==0x449 /* cyr shcha */ ||
203  enc==0x44a /* cyr hard sign */ ||
204  enc==0x44b /* cyr yery */ ||
205  enc==0x44c /* cyr soft sign */ ||
206  enc==0x44d /* cyr reversed e */ ||
207  enc==0x44f /* cyr ya */ ) {
208  xh[0] += b.maxy;
209  xh[1] += b.maxy*b.maxy;
210  ++xh[2];
211  }
212  }
213  }
214  if ( !ff_progress_next())
215  break;
216  }
217  if ( otherdigits[2]>0 && digith[2]>0 ) {
218  if ( otherdigits[0]/otherdigits[2] >= .95*digith[0]/digith[2] ) {
219  /* all digits are about the same height, not lowercase */
220  digith[0] += otherdigits[0];
221  digith[1] += otherdigits[1];
222  digith[2] += otherdigits[2];
223  }
224  }
225 
226  if ( xh[2]>1 ) {
227  xh[1] = sqrt((xh[1]-xh[0]*xh[0]/xh[2])/(xh[2]-1));
228  xh[0] /= xh[2];
229  }
230  if ( ascenth[2]>1 ) {
231  ascenth[1] = sqrt((ascenth[1]-ascenth[0]*ascenth[0]/ascenth[2])/(ascenth[2]-1));
232  ascenth[0] /= ascenth[2];
233  }
234  if ( caph[2]>1 ) {
235  caph[1] = sqrt((caph[1]-caph[0]*caph[0]/caph[2])/(caph[2]-1));
236  caph[0] /= caph[2];
237  }
238  if ( digith[2]>1 ) {
239  digith[1] = sqrt((digith[1]-digith[0]*digith[0]/digith[2])/(digith[2]-1));
240  digith[0] /= digith[2];
241  }
242  if ( base[2]>1 ) {
243  base[1] = sqrt((base[1]-base[0]*base[0]/base[2])/(base[2]-1));
244  base[0] /= base[2];
245  }
246  if ( descenth[2]>1 ) {
247  descenth[1] = sqrt((descenth[1]-descenth[0]*descenth[0]/descenth[2])/(descenth[2]-1));
248  descenth[0] /= descenth[2];
249  }
250 
251  /* we'll accept values between +/- 1sd of the mean */
252  /* array[0] == mean, array[1] == sd, array[2] == cnt, array[3]=min, array[4]==max */
253  if ( base[0]+base[1]<0 ) base[1] = -base[0]; /* Make sure 0 is within the base bluezone */
254  caph[3] = caph[4] = 0;
255  xh[3] = xh[4] = 0;
256  ascenth[3] = ascenth[4] = 0;
257  digith[3] = digith[4] = 0;
258  descenth[3] = descenth[4] = 0;
259  base[3] = base[4] = 0;
260  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
261  int enc = sf->glyphs[i]->unicodeenc;
262 #ifndef LUA_FF_LIB
263  const unichar_t *upt;
264 #endif
265  if ( enc<0x10000 && isalnum(enc) &&
266  ((enc>=32 && enc<128 ) || enc == 0xfe || enc==0xf0 || enc==0xdf ||
267  (enc>=0x391 && enc<=0x3f3 ) ||
268  (enc>=0x400 && enc<=0x4e9 ) )) {
269  /* no accented characters (or ligatures) */
270 #ifndef LUA_FF_LIB
271  if ( unicode_alternates[enc>>8]!=NULL &&
272  (upt =unicode_alternates[enc>>8][enc&0xff])!=NULL &&
273  upt[1]!='\0' )
274  continue;
275 #endif
276  SplineCharFindBounds(sf->glyphs[i],&b);
277  if ( b.miny==0 && b.maxy==0 )
278  continue;
279  if ( enc=='g' || enc=='j' || enc=='p' || enc=='q' || enc=='y' ||
280  enc==0xfe || enc == 0x3c6 || enc==0x3c8 ||
281  enc==0x440 || enc==0x443 || enc==0x444) {
282  AddBlue(b.miny,descenth,false);
283  } else {
284  /* O and o get forced into the baseline blue value even if they*/
285  /* are beyond 1 sd */
286  AddBlue(b.miny,base,enc=='O' || enc=='o');
287  }
288  if ( enc<0x10000 && isdigit(enc)) {
289  AddBlue(b.maxy,digith,false);
290  } else if ( enc<0x10000 && isupper(enc)) {
291  AddBlue(b.maxy,caph,enc=='O');
292  } else if ( enc=='b' || enc=='d' || enc=='f' || enc=='h' || enc=='k' ||
293  enc == 'l' || enc=='t' || enc==0xf0 || enc==0xfe || enc == 0xdf ||
294  enc == 0x3b2 || enc==0x3b6 || enc==0x3b8 || enc==0x3bb ||
295  enc == 0x3be ||
296  enc == 0x431 ) {
297  AddBlue(b.maxy,ascenth,false);
298  } else if ( enc=='c' || enc=='e' || enc=='o' || enc=='s' || enc=='u' ||
299  enc=='u' || enc=='v' || enc=='w' || enc=='x' || enc=='y' ||
300  enc=='z' ||
301  enc==0x3b5 /* epsilon */ ||
302  enc==0x3b9 /* iota */ ||
303  enc==0x3ba /* kappa */ ||
304  enc==0x3bc /* mu */ ||
305  enc==0x3bd /* nu */ ||
306  enc==0x3bf /* omicron */ ||
307  enc==0x3c0 /* pi */ ||
308  enc==0x3c1 /* rho */ ||
309  enc==0x3c5 /* upsilon */ ||
310  enc==0x433 /* cyr ge */ ||
311  enc==0x435 /* cyr e */ ||
312  enc==0x436 /* cyr zhe */ ||
313  enc==0x438 /* cyr i */ ||
314  enc==0x43b /* cyr el */ ||
315  enc==0x43d /* cyr en */ ||
316  enc==0x43e /* cyr o */ ||
317  enc==0x43f /* cyr pe */ ||
318  enc==0x440 /* cyr er */ ||
319  enc==0x441 /* cyr es */ ||
320  enc==0x442 /* cyr te */ ||
321  enc==0x443 /* cyr u */ ||
322  enc==0x445 /* cyr ha */ ||
323  enc==0x446 /* cyr tse */ ||
324  enc==0x447 /* cyr che */ ||
325  enc==0x448 /* cyr sha */ ||
326  enc==0x449 /* cyr shcha */ ||
327  enc==0x44a /* cyr hard sign */ ||
328  enc==0x44b /* cyr yery */ ||
329  enc==0x44c /* cyr soft sign */ ||
330  enc==0x44d /* cyr reversed e */ ||
331  enc==0x44f /* cyr ya */ ) {
332  AddBlue(b.maxy,xh,enc=='o' || enc=='x');
333  }
334  }
335  }
336 
337  /* the descent blue zone merges into the base zone */
338  MergeZones(descenth,base);
339  MergeZones(xh,base);
340  MergeZones(ascenth,caph);
341  MergeZones(digith,caph);
342  MergeZones(xh,caph);
343  MergeZones(ascenth,digith);
344  MergeZones(xh,digith);
345 
346  if ( otherblues!=NULL )
347  for ( i=0; i<10; ++i )
348  otherblues[i] = 0;
349  for ( i=0; i<14; ++i )
350  blues[i] = 0;
351 
352  if ( otherblues!=NULL && descenth[2]!=0 ) {
353  otherblues[0] = descenth[3];
354  otherblues[1] = descenth[4];
355  }
356  i = 0;
357  if ( base[2]==0 && (xh[2]!=0 || ascenth[2]!=0 || caph[2]!=0 || digith[2]!=0 )) {
358  /* base line blue value must be present if any other value is */
359  /* make one up if we don't have one */
360  blues[0] = -20;
361  blues[1] = 0;
362  i = 2;
363  } else if ( base[2]!=0 ) {
364  blues[0] = base[3];
365  blues[1] = base[4];
366  i = 2;
367  }
368  if ( xh[2]!=0 ) {
369  blues[i++] = xh[3];
370  blues[i++] = xh[4];
371  }
372  if ( caph[2]!=0 ) {
373  blues[i++] = caph[3];
374  blues[i++] = caph[4];
375  }
376  if ( digith[2]!=0 ) {
377  blues[i++] = digith[3];
378  blues[i++] = digith[4];
379  }
380  if ( ascenth[2]!=0 ) {
381  blues[i++] = ascenth[3];
382  blues[i++] = ascenth[4];
383  }
384 
385  for ( j=0; j<i; j+=2 ) for ( k=j+2; k<i; k+=2 ) {
386  if ( blues[j]>blues[k] ) {
387  real temp = blues[j];
388  blues[j]=blues[k];
389  blues[k] = temp;
390  temp = blues[j+1];
391  blues[j+1] = blues[k+1];
392  blues[k+1] = temp;
393  }
394  }
395 }
396 
397 void ElFreeEI(EIList *el) {
398  EI *e, *next;
399 
400  for ( e = el->edges; e!=NULL; e = next ) {
401  next = e->next;
402  free(e);
403  }
404 }
405 
406 static int EIAddEdge(Spline *spline, real tmin, real tmax, EIList *el) {
407  EI *new = gcalloc(1,sizeof(EI));
408  real min, max, temp;
409  Spline1D *s;
410  real dxdtmin, dxdtmax, dydtmin, dydtmax;
411 
412  new->spline = spline;
413  new->tmin = tmin;
414  new->tmax = tmax;
415 
416  s = &spline->splines[1];
417  if (( dydtmin = (3*s->a*tmin + 2*s->b)*tmin + s->c )<0 ) dydtmin = -dydtmin;
418  if (( dydtmax = (3*s->a*tmax + 2*s->b)*tmax + s->c )<0 ) dydtmax = -dydtmax;
419  s = &spline->splines[0];
420  if (( dxdtmin = (3*s->a*tmin + 2*s->b)*tmin + s->c )<0 ) dxdtmin = -dxdtmin;
421  if (( dxdtmax = (3*s->a*tmax + 2*s->b)*tmax + s->c )<0 ) dxdtmax = -dxdtmax;
422 
423  /*s = &spline->splines[0];*/
424  min = ((s->a * tmin + s->b)* tmin + s->c)* tmin + s->d;
425  max = ((s->a * tmax + s->b)* tmax + s->c)* tmax + s->d;
426  if ( tmax==1 ) max = spline->to->me.x; /* beware rounding errors */
427  if ( !el->leavetiny && floor(min)==floor(max) ) { /* If it doesn't cross a pixel boundary then it might as well be vertical */
428  if ( tmin==0 ) max = min;
429  else if ( tmax==1 ) min = max;
430  else max = min;
431  }
432  if ( min==max )
433  new->vert = true;
434  else if ( min<max )
435  new->hup = true;
436  else {
437  temp = min; min = max; max=temp;
438  }
439  if ( !el->leavetiny && min+1>max ) new->almostvert = true;
440  if ( 40*dxdtmin<dydtmin ) new->vertattmin = true;
441  if ( 40*dxdtmax<dydtmax ) new->vertattmax = true;
442  /*if ( new->vertattmin && new->vertattmax && s->a==0 && s->b==0 ) new->almostvert = true;*/
443  new->coordmin[0] = min; new->coordmax[0] = max;
444  if ( el->coordmin[0]>min )
445  el->coordmin[0] = min;
446  if ( el->coordmax[0]<max )
447  el->coordmax[0] = max;
448 
449  s = &spline->splines[1];
450  min = ((s->a * tmin + s->b)* tmin + s->c)* tmin + s->d;
451  max = ((s->a * tmax + s->b)* tmax + s->c)* tmax + s->d;
452  if ( tmax==1 ) max = spline->to->me.y;
453  if ( !el->leavetiny && floor(min)==floor(max) ) { /* If it doesn't cross a pixel boundary then it might as well be horizontal */
454  if ( tmin==0 ) max = min;
455  else if ( tmax==1 ) min = max;
456  else max = min;
457  }
458  if ( min==max )
459  new->hor = true;
460  else if ( min<max )
461  new->vup = true;
462  else {
463  temp = min; min = max; max=temp;
464  }
465  if ( !el->leavetiny && min+1>max ) new->almosthor = true;
466  if ( 40*dydtmin<dxdtmin ) new->horattmin = true;
467  if ( 40*dydtmax<dxdtmax ) new->horattmax = true;
468  /*if ( new->horattmin && new->horattmax && s->a==0 && s->b==0 ) new->almosthor = true;*/
469  new->coordmin[1] = min; new->coordmax[1] = max;
470  if ( el->coordmin[1]>min )
471  el->coordmin[1] = min;
472  if ( el->coordmax[1]<max )
473  el->coordmax[1] = max;
474 
475  if ( new->hor && new->vert ) {
476  /* This spline is too small for us to notice */
477  free(new);
478 return( false );
479  } else {
480  new->next = el->edges;
481  el->edges = new;
482 
483  if ( el->splinelast!=NULL )
484  el->splinelast->splinenext = new;
485  el->splinelast = new;
486  if ( el->splinefirst==NULL )
487  el->splinefirst = new;
488 
489 return( true );
490  }
491 }
492 
493 static void EIAddSpline(Spline *spline, EIList *el) {
494  extended ts[6], temp;
495  int i, j, base, last;
496 
497  ts[0] = 0; ts[5] = 1.0;
498  SplineFindExtrema(&spline->splines[0],&ts[1],&ts[2]);
499  SplineFindExtrema(&spline->splines[1],&ts[3],&ts[4]);
500  /* avoid teeny tiny segments, they just confuse us */
501  SplineRemoveExtremaTooClose(&spline->splines[0],&ts[1],&ts[2]);
502  SplineRemoveExtremaTooClose(&spline->splines[1],&ts[3],&ts[4]);
503  for ( i=0; i<4; ++i ) for ( j=i+1; j<5; ++j ) {
504  if ( ts[i]>ts[j] ) {
505  temp = ts[i];
506  ts[i] = ts[j];
507  ts[j] = temp;
508  }
509  }
510  for ( base=0; ts[base]==-1; ++base);
511  for ( i=5; i>base ; --i ) {
512  if ( ts[i]==ts[i-1] ) {
513  for ( j=i-1; j>base; --j )
514  ts[j] = ts[j-1];
515  ts[j] = -1;
516  ++base;
517  }
518  }
519  last = base;
520  for ( i=base; i<5 ; ++i )
521  if ( EIAddEdge(spline,ts[last],ts[i+1],el) )
522  last = i+1;
523 }
524 
526  Spline *spline, *first;
527  SplineSet *spl;
528 
529  el->sc = sc;
530  if ( sc->layers[el->layer].splines==NULL )
531 return;
532 
533  el->coordmin[0] = el->coordmax[0] = sc->layers[el->layer].splines->first->me.x;
534  el->coordmin[1] = el->coordmax[1] = sc->layers[el->layer].splines->first->me.y;
535 
536  for ( spl = sc->layers[el->layer].splines; spl!=NULL; spl = spl->next ) if ( spl->first->prev!=NULL && spl->first->prev->from!=spl->first ) {
537  first = NULL;
538  for ( spline = spl->first->next; spline!=NULL && spline!=first; spline=spline->to->next ) {
539  EIAddSpline(spline,el);
540  if ( first==NULL ) first = spline;
541  }
542  if ( el->splinefirst!=NULL && spl->first->prev!=NULL )
543  el->splinelast->splinenext = el->splinefirst;
544  el->splinelast = NULL; el->splinefirst = NULL;
545  }
546 }
547 
548 static int IsBiggerSlope(EI *test, EI *base, int major) {
549  int other = !major;
550  real tdo, tdm, bdo, bdm, t;
551 
552  if (( major && test->vup ) || (!major && test->hup))
553  t = test->tmin;
554  else
555  t = test->tmax;
556  tdm = (3*test->spline->splines[major].a*t + 2*test->spline->splines[major].b)*t + test->spline->splines[major].c;
557  tdo = (3*test->spline->splines[other].a*t + 2*test->spline->splines[other].b)*t + test->spline->splines[other].c;
558 
559  if (( major && base->vup ) || (!major && base->hup))
560  t = base->tmin;
561  else
562  t = base->tmax;
563  bdm = (3*base->spline->splines[major].a*t + 2*base->spline->splines[major].b)*t + base->spline->splines[major].c;
564  bdo = (3*base->spline->splines[other].a*t + 2*base->spline->splines[other].b)*t + base->spline->splines[other].c;
565 
566  if ( tdm==0 && bdm==0 )
567 return( tdo > bdo );
568  if ( tdo==0 )
569 return( tdo>0 );
570  else if ( bdo==0 )
571 return( bdo>0 );
572 
573 return( tdo/tdm > bdo/bdm );
574 }
575 
576 void ELOrder(EIList *el, int major ) {
577  int other = !major;
578  int pos;
579  EI *ei, *prev, *test;
580 
581  el->low = floor(el->coordmin[major]); el->high = ceil(el->coordmax[major]);
582  el->cnt = el->high-el->low+1;
583  el->ordered = gcalloc(el->cnt,sizeof(EI *));
584  el->ends = gcalloc(el->cnt,1);
585 
586  for ( ei = el->edges; ei!=NULL ; ei=ei->next ) {
587  pos = ceil(ei->coordmax[major])-el->low;
588  el->ends[pos] = true;
589  pos = floor(ei->coordmin[major])-el->low;
590  ei->ocur = (ei->hup == ei->vup)?ei->coordmin[other]:ei->coordmax[other];
591  ei->tcur = ((major && ei->vup) || (!major && ei->hup)) ?
592  ei->tmin: ei->tmax;
593  if ( major ) {
594  ei->up = ei->vup;
595  ei->hv = (ei->vert || ei->almostvert);
596  ei->hvbottom = ei->vup ? ei->vertattmin : ei->vertattmax;
597  ei->hvtop =!ei->vup ? ei->vertattmin : ei->vertattmax;
598  if ( ei->hor || ei->almosthor)
599  continue;
600  } else {
601  ei->up = ei->hup;
602  ei->hv = (ei->hor || ei->almosthor);
603  ei->hvbottom = ei->hup ? ei->horattmin : ei->horattmax;
604  ei->hvtop =!ei->hup ? ei->horattmin : ei->horattmax;
605  if ( ei->vert || ei->almostvert)
606  continue;
607  }
608  if ( el->ordered[pos]==NULL || ei->ocur<el->ordered[pos]->ocur ) {
609  ei->ordered = el->ordered[pos];
610  el->ordered[pos] = ei;
611  } else {
612  for ( prev=el->ordered[pos], test = prev->ordered; test!=NULL;
613  prev = test, test = test->ordered ) {
614  if ( test->ocur>ei->ocur ||
615  (test->ocur==ei->ocur && IsBiggerSlope(test,ei,major)))
616  break;
617  }
618  ei->ordered = test;
619  prev->ordered = ei;
620  }
621  }
622 }
623 
625  HintInstance *n, *first = NULL, *last = NULL;
626 
627  while ( into!=NULL && hi!=NULL ) {
628  if ( into->begin<hi->begin ) {
629  n = into;
630  into = into->next;
631  } else {
632  n = hi;
633  hi = hi->next;
634  }
635  if ( first==NULL )
636  first = n;
637  else
638  last->next = n;
639  last = n;
640  }
641  if ( into!=NULL ) {
642  if ( first==NULL )
643  first = into;
644  else
645  last->next = into;
646  } else if ( hi!=NULL ) {
647  if ( first==NULL )
648  first = hi;
649  else
650  last->next = hi;
651  }
652 return( first );
653 }
654 
655 StemInfo *HintCleanup(StemInfo *stem,int dosort,int instance_count) {
656  StemInfo *s, *p=NULL, *t, *pt, *sn;
657  int swap;
658 
659  for ( s=stem; s!=NULL; p=s, s=s->next ) {
660  if ( s->width<0 ) {
661  s->start += s->width;
662  s->width = -s->width;
663  s->ghost = true;
664  }
665  s->reordered = false;
666  if ( p!=NULL && p->start> s->start )
667  dosort = true;
668  }
669  if ( dosort ) {
670  for ( p=NULL, s=stem; s!=NULL; p=s, s = sn ) {
671  sn = s->next;
672  for ( pt=s, t=sn; t!=NULL; pt=t, t=t->next ) {
673  if ( instance_count>1 &&
674  t->u.unblended!=NULL && s->u.unblended!=NULL ) {
675  int temp = UnblendedCompare((*t->u.unblended)[0],(*s->u.unblended)[0],instance_count);
676  if ( temp==0 )
677  swap = UnblendedCompare((*t->u.unblended)[1],(*s->u.unblended)[1],instance_count);
678  else
679  swap = temp<0;
680  } else if ( t->start<s->start )
681  swap=true;
682  else if ( t->start>s->start )
683  swap = false;
684  else
685  swap = (t->width<s->width);
686  if ( swap ) {
687  s->next = t->next;
688  if ( pt==s ) {
689  t->next = s;
690  sn = s;
691  } else {
692  t->next = sn;
693  pt->next = s;
694  }
695  if ( p==NULL )
696  stem = t;
697  else
698  p->next = t;
699  pt = s; /* swap s and t */
700  s = t;
701  t = pt;
702  }
703  }
704  }
705  /* Remove duplicates */
706  if ( stem!=NULL ) for ( p=stem, s=stem->next; s!=NULL; s = sn ) {
707  sn = s->next;
708  if ( p->start==s->start && p->width==s->width && p->hintnumber==s->hintnumber ) {
709  p->where = HIMerge(p->where,s->where);
710  s->where = NULL;
711  p->next = sn;
712  StemInfoFree(s);
713  } else
714  p = s;
715  }
716  }
717 return( stem );
718 }
719 
720 real EITOfNextMajor(EI *e, EIList *el, real sought_m ) {
721  /* We want to find t so that Mspline(t) = sought_m */
722  /* the curve is monotonic */
723  Spline1D *msp = &e->spline->splines[el->major];
724  real new_t;
725  real found_m;
726  real t_mmax, t_mmin;
727 
728  if ( msp->a==0 && msp->b==0 ) {
729  if ( msp->c == 0 ) {
730  IError("Hor/Vert line when not expected");
731 return( 0 );
732  }
733  new_t = (sought_m-msp->d)/(msp->c);
734 return( new_t );
735  }
736 
737  t_mmax = e->up?e->tmax:e->tmin;
738  t_mmin = e->up?e->tmin:e->tmax;
739  /* sought_m += el->low; */
740 
741  while ( 1 ) {
742  new_t = (t_mmin+t_mmax)/2;
743  found_m = ( ((msp->a*new_t+msp->b)*new_t+msp->c)*new_t + msp->d );
744  if ( found_m>sought_m-.001 && found_m<sought_m+.001 )
745 return( new_t );
746  if ( found_m > sought_m ) {
747  t_mmax = new_t;
748  } else {
749  t_mmin = new_t;
750  }
751  if ( t_mmax==t_mmin ) {
752  IError("EITOfNextMajor failed! on %s", el->sc!=NULL?el->sc->name:"Unknown" );
753 return( new_t );
754  }
755  }
756 }
757 
758 EI *EIActiveListReorder(EI *active,int *change) {
759  int any;
760  EI *pr, *apt;
761 
762  *change = false;
763  if ( active!=NULL ) {
764  any = true;
765  while ( any ) {
766  any = false;
767  for ( pr=NULL, apt=active; apt->aenext!=NULL; ) {
768  if ( apt->ocur <= apt->aenext->ocur ) {
769  /* still ordered */;
770  pr = apt;
771  apt = apt->aenext;
772  } else if ( pr==NULL ) {
773  active = apt->aenext;
774  apt->aenext = apt->aenext->aenext;
775  active->aenext = apt;
776  *change = true;
777  /* don't need to set any, since this reorder can't disorder the list */
778  pr = active;
779  } else {
780  pr->aenext = apt->aenext;
781  apt->aenext = apt->aenext->aenext;
782  pr->aenext->aenext = apt;
783  any = *change = true;
784  pr = pr->aenext;
785  }
786  }
787  }
788  }
789 return( active );
790 }
791 
792 EI *EIActiveEdgesRefigure(EIList *el, EI *active,real i,int major, int *_change) {
793  EI *apt, *pr, *npt;
794  int change = false, subchange;
795  int other = !major;
796 
797  /* first remove any entry which doesn't intersect the new scan line */
798  /* (ie. stopped on last line) */
799  for ( pr=NULL, apt=active; apt!=NULL; apt = apt->aenext ) {
800  if ( apt->coordmax[major]<i+el->low ) {
801  if ( pr==NULL )
802  active = apt->aenext;
803  else
804  pr->aenext = apt->aenext;
805  change = true;
806  } else
807  pr = apt;
808  }
809  /* then move the active list to the next line */
810  for ( apt=active; apt!=NULL; apt = apt->aenext ) {
811  Spline1D *osp = &apt->spline->splines[other];
812  apt->tcur = EITOfNextMajor(apt,el,i+el->low);
813  apt->ocur = ( ((osp->a*apt->tcur+osp->b)*apt->tcur+osp->c)*apt->tcur + osp->d );
814  }
815  /* reorder list */
816  active = EIActiveListReorder(active,&subchange);
817  if ( subchange ) change = true;
818 
819  /* Insert new nodes */
820  if ( el->ordered[(int) i]!=NULL ) change = true;
821  for ( pr=NULL, apt=active, npt=el->ordered[(int) i]; apt!=NULL && npt!=NULL; ) {
822  if ( npt->ocur<apt->ocur ) {
823  npt->aenext = apt;
824  if ( pr==NULL )
825  active = npt;
826  else
827  pr->aenext = npt;
828  pr = npt;
829  npt = npt->ordered;
830  } else {
831  pr = apt;
832  apt = apt->aenext;
833  }
834  }
835  while ( npt!=NULL ) {
836  npt->aenext = NULL;
837  if ( pr==NULL )
838  active = npt;
839  else
840  pr->aenext = npt;
841  pr = npt;
842  npt = npt->ordered;
843  }
844  *_change = change;
845 return( active );
846 }
847 
848 
849 int EISkipExtremum(EI *e, real i, int major) {
850  EI *n = e->aenext, *t;
851 
852  if ( n==NULL )
853 return( false );
854  if (
855  (ceil(e->coordmin[major])==i || floor(e->coordmin[major])==i || floor(e->coordmax[major])==i || ceil(e->coordmax[major])==i) &&
856  (ceil(n->coordmin[major])==i || floor(n->coordmin[major])==i || floor(n->coordmax[major])==i || ceil(n->coordmax[major])==i) ) {
857  if (
858  (n==e->splinenext && n->tmin==e->tmax &&
859  n->tcur<n->tmin+.2 && e->tcur>e->tmax-.2 ) ||
860  (n->splinenext==e && n->tmax==e->tmin &&
861  n->tcur>n->tmax-.2 && e->tcur<e->tmin+.2 ) )
862 return( n->up!=e->up );
863  /* can be separated by a horizontal/vertical line in the other direction */
864  if ( n->tmax==1 && e->tmin==0 && n->tcur>.8 && e->tcur<.2) {
865  t = n;
866  while ( (t = t->splinenext)!=e ) {
867  if ( t==NULL || t==n ||
868  (major && !t->hor) || ( !major && !t->vert ))
869 return( false );
870  }
871 return( n->up!=e->up );
872  } else if ( n->tmin==0 && e->tmax==1 && n->tcur<.2 && e->tcur>.8) {
873  t = e;
874  while ( (t = t->splinenext)!=n ) {
875  if ( t==NULL || t==e ||
876  (major && !t->hor) || ( !major && !t->vert ))
877 return( false );
878  }
879 return( n->up!=e->up );
880  }
881  }
882 return( false );
883 }
884 
885 
887  HintInstance *hi;
888  real len = 0;
889 
890  for ( hi=stems->where; hi!=NULL; hi = hi->next )
891  len += hi->end-hi->begin;
892 return( len );
893 }
894 
896  HintInstance *hi;
897  real len = 0;
898  real s, e;
899 
900  for ( ; mhi!=NULL; mhi = mhi->next ) {
901  for ( hi = thi; hi!=NULL && hi->begin<=mhi->end; hi = hi->next ) {
902  if ( hi->end<mhi->begin ) {
903  thi = hi;
904  continue;
905  }
906  s = hi->begin<mhi->begin?mhi->begin:hi->begin;
907  e = hi->end>mhi->end?mhi->end:hi->end;
908  if ( e<s )
909  continue; /* Shouldn't happen */
910  len += e-s;
911  }
912  }
913 return( len );
914 }
915 
916 
918  StemInfo *s;
919  int any= false;
920  double end;
921 
922  for ( s=stems; s!=NULL ; s=s->next )
923  s->hasconflicts = false;
924  while ( stems!=NULL ) {
925  end = stems->width<0 ? stems->start : stems->start+stems->width;
926  for ( s=stems->next; s!=NULL && (s->width>0 ? s->start : s->start+s->width)<end; s=s->next ) {
927  stems->hasconflicts = true;
928  s->hasconflicts = true;
929  any = true;
930  }
931  stems = stems->next;
932  }
933 return( any );
934 }
935 
937  SplinePoint *starts[20], *ends[20];
938  int spt=0, ept=0;
939  SplinePointList *spl;
940  SplinePoint *sp, *np;
941  int sm, wm, i, j, val;
942  real coord;
943  HintInstance *head, *test, *cur, *prev;
944 
945  for ( spl=sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
946  for ( sp=spl->first; ; sp = np ) {
947  coord = (major?sp->me.x:sp->me.y);
948  sm = coord>=stem->start-off && coord<=stem->start+off;
949  wm = coord>=stem->start+stem->width-off && coord<=stem->start+stem->width+off;
950  if ( sm && spt<20 )
951  starts[spt++] = sp;
952  if ( wm && ept<20 )
953  ends[ept++] = sp;
954  if ( sp->next==NULL )
955  break;
956  np = sp->next->to;
957  if ( np==spl->first )
958  break;
959  }
960  }
961 
962  head = NULL;
963  for ( i=0; i<spt; ++i ) {
964  val = 0x80000000;
965  for ( j=0; j<ept; ++j ) {
966  if ( major && starts[i]->me.y>=ends[j]->me.y-1 && starts[i]->me.y<=ends[j]->me.y+1 ) {
967  val = starts[i]->me.y;
968  break;
969  } else if ( !major && starts[i]->me.x>=ends[j]->me.x-1 && starts[i]->me.x<=ends[j]->me.x+1 ) {
970  val = starts[i]->me.x;
971  break;
972  }
973  }
974  if ( (unsigned)val!=0x80000000 ) {
975  for ( prev=NULL, test=head; test!=NULL && val>test->begin; prev=test, test=test->next );
976  if ( test==NULL || val!=test->begin ) {
977  cur = chunkalloc(sizeof(HintInstance));
978  cur->begin = cur->end = val;
979  cur->next = test;
980  if ( prev==NULL ) head = cur;
981  else prev->next = cur;
982  }
983  }
984  }
985 return( head );
986 }
987 
989  SplinePointList *spl;
990  SplinePoint *sp, *np;
991  int sm, wm, off;
992  real ob, oe;
993  HintInstance *s=NULL, *w=NULL, *cur, *p, *t, *n, *w2;
994  /* We've got a hint (from somewhere, old data, reading in a font, user specified etc.) */
995  /* but we don't have HintInstance info. So see if we can find those data */
996  /* Will get confused by stems with holes in them (for example if you make */
997  /* a hint from one side of an H to the other, it will get the whole thing */
998  /* not just the cross stem) */
999 
1000  for ( spl=sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
1001  for ( sp=spl->first; ; sp = np ) {
1002  sm = (major?sp->me.x:sp->me.y)==stem->start;
1003  wm = (major?sp->me.x:sp->me.y)==stem->start+stem->width;
1004  if ( sp->next==NULL )
1005  break;
1006  np = sp->next->to;
1007  if ( sm || wm ) {
1008  if ( !major ) {
1009  if ( np->me.y==sp->me.y ) {
1010  ob = sp->me.x; oe = np->me.x;
1011  } else if ( sp->nextcp.y==sp->me.y ) {
1012  ob = sp->me.x; oe = (sp->me.x+sp->nextcp.x)/2;
1013  if ( sp->prevcp.y==sp->me.y )
1014  ob = (sp->prevcp.x+sp->me.x)/2;
1015  } else if ( sp->prevcp.y==sp->me.y ) {
1016  ob = sp->me.x; oe = (sp->prevcp.x+sp->me.x)/2;
1017  } else
1018  sm = wm = false;
1019  } else {
1020  if ( np->me.x==sp->me.x ) {
1021  ob = sp->me.y; oe = np->me.y;
1022  } else if ( sp->nextcp.x==sp->me.x ) {
1023  ob = sp->me.y; oe = (sp->nextcp.y+sp->me.y)/2;
1024  if ( sp->prevcp.x==sp->me.x )
1025  ob = (sp->prevcp.y+sp->me.y)/2;
1026  } else if ( sp->prevcp.x==sp->me.x ) {
1027  ob = sp->me.y; oe = (sp->prevcp.y+sp->me.y)/2;
1028  } else
1029  sm = wm = false;
1030  }
1031  }
1032  if ( sm || wm ) {
1033  cur = chunkalloc(sizeof(HintInstance));
1034  if ( ob>oe ) { real temp=ob; ob=oe; oe=temp;}
1035  cur->begin = ob;
1036  cur->end = oe;
1037  if ( sm ) {
1038  if ( s==NULL || s->begin>cur->begin ) {
1039  cur->next = s;
1040  s = cur;
1041  } else {
1042  p = s;
1043  for ( t=s->next; t!=NULL && t->begin<cur->begin; p=t, t=t->next );
1044  p->next = cur; cur->next = t;
1045  }
1046  } else {
1047  if ( w==NULL || w->begin>cur->begin ) {
1048  cur->next = w;
1049  w = cur;
1050  } else {
1051  p = w;
1052  for ( t=w->next; t!=NULL && t->begin<cur->begin; p=t, t=t->next );
1053  p->next = cur; cur->next = t;
1054  }
1055  }
1056  }
1057  if ( np==spl->first )
1058  break;
1059  }
1060  }
1061 
1062  /* Now we know what the right side of the stem looks like, and we know */
1063  /* what the left side looks like. They may not look the same (H for example) */
1064  /* Figure out the set where both are active */
1065  /* Unless it's a ghost hint */
1066  if ( stem->width==20 && s==NULL && w!=NULL ) {
1067  s = w;
1068  w = NULL;
1069  } else if ( stem->width==21 && s!=NULL && w==NULL) {
1070  /* Just use s */;
1071  } else for ( p=NULL, t=s; t!=NULL; t=n ) {
1072  n = t->next;
1073  for ( w2=w; w2!=NULL && w2->begin<t->end ; w2=w2->next ) {
1074  if ( w2->end<=t->begin )
1075  continue;
1076  if ( w2->begin<=t->begin && w2->end>=t->end ) {
1077  /* Perfect match */
1078  break;
1079  }
1080  if ( w2->begin>=t->begin )
1081  t->begin = w2->begin;
1082  if ( w2->end<=t->end ) {
1083  cur = chunkalloc(sizeof(HintInstance));
1084  cur->begin = w2->end;
1085  cur->end = t->end;
1086  cur->next = n;
1087  t->next = cur;
1088  n = cur;
1089  t->end = w2->end;
1090  }
1091  break;
1092  }
1093  if ( w2!=NULL && w2->begin>=t->end )
1094  w2 = NULL;
1095  if ( w2==NULL && w!=NULL ) {
1096  HintInstance *best = NULL;
1097  double best_off=1e10, off;
1098  for ( w2=w; w2!=NULL ; w2=w2->next ) {
1099  if ( w2->end<=t->begin )
1100  off = t->begin - w2->end;
1101  else
1102  off = w2->begin - t->end;
1103  if ( best==NULL && off<best_off ) {
1104  best = w2;
1105  best_off = off;
1106  }
1107  }
1108  if ( best!=NULL && best_off<stem->width ) {
1109  w2 = best;
1110  if( w2->begin<t->begin )
1111  t->begin = w2->begin;
1112  if ( w2->end>t->end )
1113  t->end = w2->end;
1114  }
1115  }
1116  if ( w2==NULL ) {
1117  /* No match for t (or if there were it wasn't complete) get rid */
1118  /* of what's left of t */
1119  chunkfree(t,sizeof(*t));
1120  if ( p==NULL )
1121  s = n;
1122  else
1123  p->next = n;
1124  } else
1125  p = t;
1126  }
1127  while ( w!=NULL ) {
1128  n = w->next;
1129  chunkfree(w,sizeof(*w));
1130  w=n;
1131  }
1132 
1133  /* If we couldn't find anything, then see if there are two points which */
1134  /* have the same x or y value and whose other coordinates match those of */
1135  /* the hint */
1136  /* Surprisingly many fonts have hints which don't accurately match the */
1137  /* points. Perhaps BlueFuzz (default 1) applies here too */
1138  for ( off=0; off<1 && s==NULL; ++off )
1140 
1141  stem->where = s;
1142 }
1143 
1145  StemInfo *h;
1146  for ( h= sc->hstem; h!=NULL; h=h->next ) {
1147  if ( h->where==NULL ) {
1149  }
1150  }
1151 }
1152 
1154  StemInfo *h;
1155  for ( h= sc->vstem; h!=NULL; h=h->next ) {
1156  if ( h->where==NULL ) {
1158  }
1159  }
1160 }
1161 
1162 
1163 static void _SCClearHintMasks(SplineChar *sc,int layer, int counterstoo) {
1164  SplineSet *spl;
1165  SplinePoint *sp;
1166  RefChar *ref;
1167 
1168  if ( counterstoo ) {
1169  free(sc->countermasks);
1170  sc->countermasks = NULL; sc->countermask_cnt = 0;
1171  }
1172 
1173  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
1174  for ( sp = spl->first ; ; ) {
1175  chunkfree(sp->hintmask,sizeof(HintMask));
1176  sp->hintmask = NULL;
1177  if ( sp->next==NULL )
1178  break;
1179  sp = sp->next->to;
1180  if ( sp==spl->first )
1181  break;
1182  }
1183  }
1184 
1185  for ( ref = sc->layers[layer].refs; ref!=NULL; ref=ref->next ) {
1186  for ( spl = ref->layers[0].splines; spl!=NULL; spl=spl->next ) {
1187  for ( sp = spl->first ; ; ) {
1188  chunkfree(sp->hintmask,sizeof(HintMask));
1189  sp->hintmask = NULL;
1190  if ( sp->next==NULL )
1191  break;
1192  sp = sp->next->to;
1193  if ( sp==spl->first )
1194  break;
1195  }
1196  }
1197  }
1198 }
1199 
1200 
1202  SplineChar *scs[MmMax];
1203  int hadh3, hadv3, i, vbase;
1204  HintMask mask;
1205  StemInfo *h;
1206 
1207  if ( sc->countermask_cnt!=0 )
1208 return;
1209 
1210  scs[0] = sc;
1211  hadh3 = CvtPsStem3(NULL,scs,1,true,false);
1212  hadv3 = CvtPsStem3(NULL,scs,1,false,false);
1213  if ( hadh3 || hadv3 ) {
1214  memset(mask,0,sizeof(mask));
1215  if ( hadh3 ) mask[0] = 0x80|0x40|0x20;
1216  if ( hadv3 ) {
1217  for ( h=sc->hstem, vbase=0; h!=NULL; h=h->next, ++vbase );
1218  for ( i=0; i<3 ; ++i ) {
1219  int j = i+vbase;
1220  mask[j>>3] |= (0x80>>(j&7));
1221  }
1222  }
1223  sc->countermask_cnt = 1;
1224  sc->countermasks = galloc(sizeof(HintMask));
1225  memcpy(sc->countermasks[0],mask,sizeof(HintMask));
1226 return;
1227  }
1228 }
1229 
1230 void SCClearHintMasks(SplineChar *sc,int layer,int counterstoo) {
1231  MMSet *mm = sc->parent->mm;
1232  int i;
1233 
1234  if ( mm==NULL )
1235  _SCClearHintMasks(sc,layer,counterstoo);
1236  else {
1237  for ( i=0; i<mm->instance_count; ++i ) {
1238  if ( sc->orig_pos<mm->instances[i]->glyphcnt )
1239  _SCClearHintMasks(mm->instances[i]->glyphs[sc->orig_pos],layer,counterstoo);
1240  }
1241  if ( sc->orig_pos<mm->normal->glyphcnt )
1242  _SCClearHintMasks(mm->normal->glyphs[sc->orig_pos],layer,counterstoo);
1243  }
1244 }
1245 
1247  StemInfo *possible=NULL;
1248  HintInstance *hi;
1249 
1250  if ( sp==NULL )
1251 return( NULL );
1252 
1253  for ( ; s!=NULL; s=s->next ) {
1254  if ( sp->me.y<s->start )
1255 return( possible );
1256  if ( s->start==sp->me.y || s->start+s->width==sp->me.y ) {
1257  if ( !s->hasconflicts )
1258 return( s );
1259  for ( hi=s->where; hi!=NULL; hi=hi->next ) {
1260  if ( hi->begin<=sp->me.x && hi->end>=sp->me.x )
1261 return( s );
1262  }
1263  if ( !s->used )
1264  possible = s;
1265  }
1266  }
1267 return( possible );
1268 }
1269 
1271  StemInfo *possible=NULL;
1272  HintInstance *hi;
1273 
1274  if ( sp==NULL )
1275 return( NULL );
1276 
1277  for ( ; s!=NULL; s=s->next ) {
1278  if ( sp->me.x<s->start )
1279 return( possible );
1280  if ( s->start==sp->me.x || s->start+s->width==sp->me.x ) {
1281  if ( !s->hasconflicts )
1282 return( s );
1283  for ( hi=s->where; hi!=NULL; hi=hi->next ) {
1284  if ( hi->begin<=sp->me.y && hi->end>=sp->me.y )
1285 return( s );
1286  }
1287  if ( !s->used )
1288  possible = s;
1289  }
1290  }
1291 return( possible );
1292 }
1293 
1294 /* Does h have a conflict with any of the stems in the list which have bits */
1295 /* set in the mask */
1297  while ( stems!=NULL && stems->start<h->start+h->width ) {
1298  if ( stems->start+stems->width>=h->start && stems!=h ) {
1299  if ( stems->hintnumber!=-1 &&
1300  (mask[stems->hintnumber>>3]&(0x80>>(stems->hintnumber&7))) )
1301 return( true );
1302  }
1303  stems = stems->next;
1304  }
1305 return( false );
1306 }
1307 
1308 /* All instances of a MM set must have the same hint mask at all points */
1309 static void FigureHintMask(SplineChar *scs[MmMax], SplinePoint *to[MmMax], int instance_count,
1310  HintMask mask) {
1311  StemInfo *s;
1312  int i;
1313  SplinePoint *sp;
1314 
1315  memset(mask,'\0',sizeof(HintMask));
1316 
1317  /* Install all hints that are always active */
1318  i=0; {
1319  SplineChar *sc = scs[i];
1320 
1321  if ( sc==NULL )
1322 return;
1323 
1324  for ( s=sc->hstem; s!=NULL; s=s->next )
1325  if ( s->hintnumber!=-1 && !s->hasconflicts )
1326  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1327  for ( s=sc->vstem; s!=NULL; s=s->next )
1328  if ( s->hintnumber!=-1 && !s->hasconflicts )
1329  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1330 
1331  if ( sc->hconflicts ) {
1332  for ( sp=to[i]; sp!=NULL; ) {
1333  s = OnHHint(sp,sc->hstem);
1334  if ( s!=NULL && s->hintnumber!=-1 ) {
1335  if ( ConflictsWithMask(scs[i]->hstem,mask,s))
1336  break;
1337  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1338  }
1339  if ( sp->next==NULL )
1340  break;
1341  sp = sp->next->to;
1342  if ( to[i]==sp )
1343  break;
1344  }
1345  }
1346  if ( sc->vconflicts ) {
1347  for ( sp=to[i]; sp!=NULL; ) {
1348  s = OnVHint(sp,sc->vstem);
1349  if ( s!=NULL && s->hintnumber!=-1 ) {
1350  if ( ConflictsWithMask(scs[i]->vstem,mask,s))
1351  break;
1352  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1353  }
1354  if ( sp->next==NULL )
1355  break;
1356  sp = sp->next->to;
1357  if ( to[i]==sp )
1358  break;
1359  }
1360  }
1361  }
1362  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
1363  chunkfree(to[i]->hintmask,sizeof(HintMask));
1364  to[i]->hintmask = chunkalloc(sizeof(HintMask));
1365  memcpy(to[i]->hintmask,mask,sizeof(HintMask));
1366  }
1367 }
1368 
1369 static int TestHintMask(SplineChar *scs[MmMax], SplinePoint *to[MmMax], int instance_count,
1370  HintMask mask) {
1371  StemInfo *h=NULL, *v=NULL;
1372  int i;
1373 
1374  for ( i=0; i<instance_count; ++i ) {
1375  SplineChar *sc = scs[i];
1376 
1377  if ( sc==NULL || (!sc->hconflicts && !sc->vconflicts ))
1378  continue;
1379 
1380  /* Does this point lie on any hints? */
1381  if ( scs[i]->hconflicts )
1382  h = OnHHint(to[i],sc->hstem);
1383  if ( scs[i]->vconflicts )
1384  v = OnVHint(to[i],sc->vstem);
1385 
1386  /* Need to set this hint */
1387  if ( (h!=NULL && h->hintnumber!=-1 && (mask[h->hintnumber>>3]&(0x80>>(h->hintnumber&7)))==0 ) ||
1388  (v!=NULL && v->hintnumber!=-1 && (mask[v->hintnumber>>3]&(0x80>>(v->hintnumber&7)))==0 ))
1389  break;
1390  }
1391  if ( i==instance_count ) /* All hint masks were ok */
1392 return( false );
1393 
1394  FigureHintMask(scs,to,instance_count,mask);
1395 return( true );
1396 }
1397 
1398 static void UnnumberHints(SplineChar *sc) {
1399  StemInfo *h;
1400 
1401  for ( h=sc->hstem; h!=NULL; h=h->next )
1402  h->hintnumber = -1;
1403  for ( h=sc->vstem; h!=NULL; h=h->next )
1404  h->hintnumber = -1;
1405 }
1406 
1407 static int NumberHints(SplineChar *sc) {
1408  StemInfo *h;
1409  int hcnt=0;
1410 
1411  for ( h=sc->hstem; h!=NULL; h=h->next )
1412  h->hintnumber = hcnt>=HntMax ? -1 : hcnt++;
1413  for ( h=sc->vstem; h!=NULL; h=h->next )
1414  h->hintnumber = hcnt>=HntMax ? -1 : hcnt++;
1415 return( hcnt );
1416 }
1417 
1418 static void UntickHints(SplineChar *sc) {
1419  StemInfo *h;
1420 
1421  for ( h=sc->hstem; h!=NULL; h=h->next )
1422  h->used = false;
1423  for ( h=sc->vstem; h!=NULL; h=h->next )
1424  h->used = false;
1425 }
1426 
1427 struct coords {
1429  struct coords *next;
1430 };
1431 
1432 typedef struct mmh {
1433  StemInfo *hints[MmMax], *map[MmMax];
1434  struct coords *where;
1435  struct mmh *next;
1437 
1438 static void AddCoord(MMH *mmh,SplinePoint *sps[MmMax],int instance_count, int ish) {
1439  struct coords *coords;
1440  int i;
1441 
1442  coords = chunkalloc(sizeof(struct coords));
1443  coords->next = mmh->where;
1444  mmh->where = coords;
1445  if ( ish )
1446  for ( i=0; i<instance_count; ++i )
1447  coords->coords[i] = sps[i]->me.x;
1448  else
1449  for ( i=0; i<instance_count; ++i )
1450  coords->coords[i] = sps[i]->me.y;
1451 }
1452 
1453 static MMH *AddHintSet(MMH *hints,StemInfo *h[MmMax], int instance_count,
1454  SplinePoint *sps[MmMax], int ish) {
1455  int i, cnt, bestc;
1456  MMH *test, *best;
1457 
1458  for ( i=0; i<instance_count; ++i )
1459  if ( h[i]==NULL )
1460 return( hints );
1461 
1462  best = NULL; bestc = 0;
1463  for ( test=hints; test!=NULL; test=test->next ) {
1464  cnt = 0;
1465  for ( i=0; i<instance_count; ++i )
1466  if ( test->hints[i]==h[i] )
1467  ++cnt;
1468  if ( cnt==instance_count ) {
1469  AddCoord(test,sps,instance_count,ish);
1470 return( hints );
1471  }
1472  if ( cnt>bestc ) {
1473  bestc = cnt;
1474  best = test;
1475  }
1476  }
1477  test = chunkalloc(sizeof(MMH));
1478  test->next = hints;
1479  AddCoord(test,sps,instance_count,ish);
1480  for ( i=0; i<instance_count; ++i )
1481  test->hints[i]=h[i];
1482  if ( bestc!=0 ) {
1483  for ( i=0; i<instance_count; ++i ) {
1484  if ( best->hints[i]==h[i] ) {
1485  h[i]->hasconflicts = true;
1486  test->map[i] = chunkalloc(sizeof(StemInfo));
1487  *test->map[i] = *h[i];
1488  test->map[i]->where = NULL;
1489  test->map[i]->used = true;
1490  h[i]->next = test->map[i];
1491  } else
1492  test->map[i] = h[i];
1493  }
1494  } else {
1495  for ( i=0; i<instance_count; ++i )
1496  test->map[i]=h[i];
1497  }
1498 return( test );
1499 }
1500 
1501 static int CompareMMH(MMH *mmh1,MMH *mmh2, int instance_count) {
1502  int i;
1503 
1504  if ( mmh1->map[0]==NULL )
1505 return( 1 );
1506  if ( mmh2->map[0]==NULL )
1507 return( -1 );
1508 
1509  for ( i=0; i<instance_count; ++i ) {
1510  if ( mmh1->map[i]->start!=mmh2->map[i]->start ) {
1511  if ( mmh1->map[i]->start > mmh2->map[i]->start )
1512 return( 1 );
1513  else
1514 return( -1 );
1515  }
1516  }
1517  for ( i=0; i<instance_count; ++i ) {
1518  if ( mmh1->map[i]->width!=mmh2->map[i]->width ) {
1519  if ( mmh1->map[i]->width > mmh2->map[i]->width )
1520 return( 1 );
1521  else
1522 return( -1 );
1523  }
1524  }
1525 return( 0 );
1526 }
1527 
1528 static MMH *SortMMH(MMH *head,int instance_count) {
1529  MMH *mmh, *p, *smallest, *psmallest, *test, *ptest;
1530 
1531  for ( mmh = head, p=NULL; mmh!=NULL ; ) {
1532  smallest = mmh; psmallest = p;
1533  ptest = mmh; test = mmh->next;
1534  while ( test!=NULL ) {
1535  if ( CompareMMH(test,smallest,instance_count)<0 ) {
1536  smallest = test;
1537  psmallest = ptest;
1538  }
1539  ptest = test;
1540  test = test->next;
1541  }
1542  if ( smallest!=mmh ) {
1543  if ( p==NULL )
1544  head = smallest;
1545  else
1546  p->next = smallest;
1547  if ( mmh->next==smallest ) {
1548  mmh->next = smallest->next;
1549  smallest->next = mmh;
1550  } else {
1551  test = mmh->next;
1552  mmh->next = smallest->next;
1553  smallest->next = test;
1554  psmallest->next = mmh;
1555  }
1556  }
1557  p = smallest;
1558  mmh = smallest->next;
1559  }
1560 return( head );
1561 }
1562 
1563 static int NumberMMH(MMH *mmh,int hstart,int instance_count) {
1564  int i;
1565  HintInstance *hi, *n;
1566  struct coords *coords;
1567 
1568  while ( mmh!=NULL ) {
1569  for ( i=0; i<instance_count; ++i ) {
1570  StemInfo *h = mmh->map[i];
1571  if ( h==NULL )
1572  continue;
1573 
1574  h->hintnumber = hstart;
1575 
1576  for ( hi=h->where; hi!=NULL; hi=n ) {
1577  n = hi->next;
1578  chunkfree(hi,sizeof(HintInstance));
1579  }
1580  h->where = NULL;
1581  for ( coords=mmh->where; coords!=NULL; coords = coords->next ) {
1582  hi = chunkalloc(sizeof(HintInstance));
1583  hi->next = h->where;
1584  h->where = hi;
1585  hi->begin = coords->coords[i]-1;
1586  hi->end = coords->coords[i]+1;
1587  }
1588  }
1589  if ( mmh->map[0]!=NULL ) ++hstart;
1590  mmh = mmh->next;
1591  }
1592 return( hstart );
1593 }
1594 
1595 static void SortMMH2(SplineChar *scs[MmMax],MMH *mmh,int instance_count,int ish) {
1596  int i;
1597  StemInfo *h, *n;
1598  MMH *m;
1599 
1600  for ( i=0; i<instance_count; ++i ) {
1601  for ( h= ish ? scs[i]->hstem : scs[i]->vstem; h!=NULL; h=n ) {
1602  n = h->next;
1603  if ( h->hintnumber==-1 )
1604  StemInfoFree(h);
1605  }
1606  n = NULL;
1607  for ( m = mmh ; m!=NULL; m=m->next ) {
1608  h = m->map[i];
1609  if ( n!=NULL )
1610  n->next = h;
1611  else if ( ish )
1612  scs[i]->hstem = h;
1613  else
1614  scs[i]->vstem = h;
1615  n = h;
1616  }
1617  if ( n!=NULL )
1618  n->next = NULL;
1619  else if ( ish )
1620  scs[i]->hstem = NULL;
1621  else
1622  scs[i]->vstem = NULL;
1623  }
1624 }
1625 
1626 static void MMHFreeList(MMH *mmh) {
1627  MMH *mn;
1628  struct coords *c, *n;
1629 
1630  for ( ; mmh!=NULL; mmh = mn ) {
1631  mn = mmh->next;
1632  for ( c=mmh->where; c!=NULL; c=n ) {
1633  n = c->next;
1634  chunkfree(c,sizeof(struct coords));
1635  }
1636  chunkfree(mmh,sizeof(struct coords));
1637  }
1638 }
1639 
1641  int instance_count, MMH **hs, MMH **vs) {
1642  SplinePoint *to[MmMax];
1643  StemInfo *h[MmMax], *v[MmMax];
1644  int i, anymore;
1645 
1646  forever {
1647  for ( i=0; i<instance_count; ++i ) {
1648  if ( spl[i]!=NULL )
1649  to[i] = spl[i]->first;
1650  else
1651  to[i] = NULL;
1652  }
1653  forever {
1654  for ( i=0; i<instance_count; ++i ) {
1655  h[i] = OnHHint(to[i],scs[i]->hstem);
1656  v[i] = OnVHint(to[i],scs[i]->vstem);
1657  }
1658  *hs = AddHintSet(*hs,h,instance_count,to,true);
1659  *vs = AddHintSet(*vs,v,instance_count,to,false);
1660  anymore = false;
1661  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
1662  if ( to[i]->next==NULL ) to[i] = NULL;
1663  else {
1664  to[i] = to[i]->next->to;
1665  if ( to[i]==spl[i]->first ) to[i] = NULL;
1666  }
1667  if ( to[i]!=NULL ) anymore = true;
1668  }
1669  if ( !anymore )
1670  break;
1671  }
1672  anymore = false;
1673  for ( i=0; i<instance_count; ++i ) {
1674  if ( spl[i]!=NULL )
1675  spl[i] = spl[i]->next;
1676  if ( spl[i]!=NULL ) anymore = true;
1677  }
1678  if ( !anymore )
1679  break;
1680  }
1681 }
1682 
1683 static void ResolveSplitHints(SplineChar *scs[16],int layer,int instance_count) {
1684  /* It is possible for a single hint in one mm instance to split into two */
1685  /* in a different MM set. For example, we have two stems which happen */
1686  /* to line up in one instance but which do not in another instance. */
1687  /* It is even possible that there could be no instance with any conflicts */
1688  /* but some of the intermediate forms might conflict. */
1689  /* We can't deal (nor can postscript) with the case where hints change order*/
1690  SplinePointList *spl[MmMax];
1691  RefChar *ref[MmMax];
1692  int i, hcnt, hmax=0, anymore;
1693  MMH *hs=NULL, *vs=NULL;
1694 
1695  for ( i=0; i<instance_count; ++i ) {
1696  hcnt = NumberHints(scs[i]);
1697  UntickHints(scs[i]);
1698  if ( hcnt>hmax ) hmax = hcnt;
1699  spl[i] = scs[i]->layers[layer].splines;
1700  }
1701  if ( hmax==0 )
1702 return;
1703 
1704  SplResolveSplitHints(scs,spl,instance_count,&hs,&vs);
1705  anymore = false;
1706  for ( i=0; i<instance_count; ++i ) {
1707  ref[i] = scs[i]->layers[layer].refs;
1708  if ( ref[i]!=NULL ) anymore = true;
1709  }
1710  while ( anymore ) {
1711  for ( i=0; i<instance_count; ++i )
1712  spl[i] = ( ref[i]!=NULL ) ? ref[i]->layers[0].splines : NULL;
1713  SplResolveSplitHints(scs,spl,instance_count,&hs,&vs);
1714  anymore = false;
1715  for ( i=0; i<instance_count; ++i ) {
1716  if ( ref[i]!=NULL ) {
1717  ref[i] = ref[i]->next;
1718  if ( ref[i]!=NULL ) anymore = true;
1719  }
1720  }
1721  }
1722 
1723  for ( i=0; i<instance_count; ++i )
1724  UnnumberHints(scs[i]);
1725  hs = SortMMH(hs,instance_count);
1726  vs = SortMMH(vs,instance_count);
1727  hcnt = NumberMMH(hs,0,instance_count);
1728  hcnt = NumberMMH(vs,hcnt,instance_count);
1729  SortMMH2(scs,hs,instance_count,true);
1730  SortMMH2(scs,vs,instance_count,false);
1731  MMHFreeList(hs);
1732  MMHFreeList(vs);
1733 }
1734 
1736  int instance_count, HintMask mask, int inited) {
1737  SplinePoint *to[MmMax];
1738  int i, anymore;
1739 
1740  anymore = false;
1741  for ( i=0; i<instance_count; ++i ) {
1742  if ( spl[i]!=NULL ) {
1743  SplineSetReverse(spl[i]);
1744  to[i] = spl[i]->first;
1745  anymore = true;
1746  } else
1747  to[i] = NULL;
1748  }
1749 
1750  /* Assign the initial hint mask */
1751  if ( anymore && !inited ) {
1752  FigureHintMask(scs,to,instance_count,mask);
1753  inited = true;
1754  }
1755 
1756  forever {
1757  for ( i=0; i<instance_count; ++i ) {
1758  if ( spl[i]!=NULL )
1759  to[i] = spl[i]->first;
1760  else
1761  to[i] = NULL;
1762  }
1763  forever {
1764  TestHintMask(scs,to,instance_count,mask);
1765  anymore = false;
1766  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
1767  if ( to[i]->next==NULL ) to[i] = NULL;
1768  else {
1769  to[i] = to[i]->next->to;
1770  if ( to[i]==spl[i]->first ) to[i] = NULL;
1771  }
1772  if ( to[i]!=NULL ) anymore = true;
1773  }
1774  if ( !anymore )
1775  break;
1776  }
1777  anymore = false;
1778  for ( i=0; i<instance_count; ++i ) {
1779  if ( spl[i]!=NULL ) {
1780  SplineSetReverse(spl[i]);
1781  spl[i] = spl[i]->next;
1782  }
1783  if ( spl[i]!=NULL ) {
1784  anymore = true;
1785  SplineSetReverse(spl[i]);
1786  }
1787  }
1788  if ( !anymore )
1789  break;
1790  }
1791 return( inited );
1792 }
1793 
1795  SplineChar *scs[MmMax];
1796  SplinePointList *spl[MmMax];
1797  RefChar *ref[MmMax];
1798  MMSet *mm = sc->parent->mm;
1799  int i, instance_count, conflicts, anymore, inited;
1800  HintMask mask;
1801 
1802  if ( mm==NULL ) {
1803  scs[0] = sc;
1804  instance_count = 1;
1805  SCClearHintMasks(sc,layer,false);
1806  } else {
1807  instance_count = mm->instance_count;
1808  for ( i=0; i<instance_count; ++i )
1809  if ( sc->orig_pos < mm->instances[i]->glyphcnt ) {
1810  scs[i] = mm->instances[i]->glyphs[sc->orig_pos];
1811  SCClearHintMasks(scs[i],layer,false);
1812  }
1813  ResolveSplitHints(scs,layer,instance_count);
1814  }
1815  conflicts = false;
1816  for ( i=0; i<instance_count; ++i ) {
1817  NumberHints(scs[i]);
1818  if ( scs[i]->hconflicts || scs[i]->vconflicts )
1819  conflicts = true;
1820  }
1821  if ( !conflicts && instance_count==1 ) { /* All hints always active */
1823 return; /* In an MM font we may still need to resolve things like different numbers of hints */
1824  }
1825 
1826  for ( i=0; i<instance_count; ++i ) {
1827  spl[i] = scs[i]->layers[layer].splines;
1828  ref[i] = scs[i]->layers[layer].refs;
1829  }
1830  inited = SplFigureHintMasks(scs,spl,instance_count,mask,false);
1831  forever {
1832  for ( i=0; i<instance_count; ++i ) {
1833  if ( ref[i]!=NULL )
1834  spl[i] = ref[i]->layers[0].splines;
1835  }
1836  inited = SplFigureHintMasks(scs,spl,instance_count,mask,inited);
1837  anymore = false;
1838  for ( i=0; i<instance_count; ++i ) {
1839  if ( ref[i]!=NULL ) {
1840  ref[i] = ref[i]->next;
1841  if ( ref[i]!=NULL ) anymore = true;
1842  }
1843  }
1844  if ( !anymore )
1845  break;
1846  }
1847  if ( instance_count==1 )
1849 }
1850 
1851 
1852 
1853 static void FigureStems( SplineFont *sf, real snaps[12], real cnts[12],
1854  int which ) {
1855  int i, j, k, cnt, smax=0, smin=2000;
1856  real stemwidths[2000];
1857  StemInfo *stems, *test;
1858  int len;
1859  HintInstance *hi;
1860 
1861  memset(stemwidths,'\0',sizeof(stemwidths));
1862 
1863  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
1864  stems = which?sf->glyphs[i]->hstem:sf->glyphs[i]->vstem;
1865  for ( test=stems; test!=NULL; test = test->next ) if ( !test->ghost ) {
1866  if ( (j=test->width)<0 ) j= -j;
1867  if ( j<2000 ) {
1868  len = 0;
1869  for ( hi=test->where; hi!=NULL; hi=hi->next )
1870  len += hi->end-hi->begin;
1871  if ( len==0 ) len = 100;
1872  stemwidths[j] += len;
1873  if ( smax<j ) smax=j;
1874  if ( smin>j ) smin=j;
1875  }
1876  }
1877  }
1878 
1879  for ( i=smin, cnt=0; i<=smax; ++i ) {
1880  if ( stemwidths[i]!=0 )
1881  ++cnt;
1882  }
1883 
1884  if ( cnt>12 ) {
1885  /* Merge width windows */
1886  int windsize=3, j;
1887  for ( i=smin; i<=smax; ++i ) if ( stemwidths[i]!=0 ) {
1888  if ( (j = i-windsize)<0 ) j=0;
1889  for ( ; j<smax && j<=i+windsize; ++j )
1890  if ( stemwidths[i]<stemwidths[j] )
1891  break;
1892  if ( j==smax || j>i+windsize ) {
1893  if ( (j = i-windsize)<0 ) j=0;
1894  for ( ; j<smax && j<=i+windsize; ++j ) if ( j!=i ) {
1895  stemwidths[i] += stemwidths[j];
1896  stemwidths[j] = 0;
1897  }
1898  }
1899  }
1900  /* Merge adjacent widths */
1901  for ( i=smin; i<=smax; ++i ) {
1902  if ( stemwidths[i]!=0 && i<=smax-1 && stemwidths[i+1]!=0 ) {
1903  if ( stemwidths[i]>stemwidths[i+1] ) {
1904  stemwidths[i] += stemwidths[i+1];
1905  stemwidths[i+1] = 0;
1906  } else {
1907  if ( i<=smax-2 && stemwidths[i+2] && stemwidths[i+2]<stemwidths[i+1] ) {
1908  stemwidths[i+1] += stemwidths[i+2];
1909  stemwidths[i+2] = 0;
1910  }
1911  stemwidths[i+1] += stemwidths[i];
1912  stemwidths[i] = 0;
1913  ++i;
1914  }
1915  }
1916  }
1917  for ( i=smin, cnt=0; i<=smax; ++i ) {
1918  if ( stemwidths[i]!=0 )
1919  ++cnt;
1920  }
1921  }
1922  if ( cnt<=12 ) {
1923  for ( i=smin, cnt=0; i<=smax; ++i ) {
1924  if ( stemwidths[i]!=0 ) {
1925  snaps[cnt] = i;
1926  cnts[cnt++] = stemwidths[i];
1927  }
1928  }
1929  } else { real firstbiggest=0;
1930  for ( cnt = 0; cnt<12; ++cnt ) {
1931  int biggesti=0;
1932  real biggest=0;
1933  for ( i=smin; i<=smax; ++i ) {
1934  if ( stemwidths[i]>biggest ) { biggest = stemwidths[i]; biggesti=i; }
1935  }
1936  /* array must be sorted */
1937  if ( biggest<firstbiggest/6 )
1938  break;
1939  for ( j=0; j<cnt; ++j )
1940  if ( snaps[j]>biggesti )
1941  break;
1942  for ( k=cnt-1; k>=j; --k ) {
1943  snaps[k+1] = snaps[k];
1944  cnts[k+1]=cnts[k];
1945  }
1946  snaps[j] = biggesti;
1947  cnts[j] = biggest;
1948  stemwidths[biggesti] = 0;
1949  if ( firstbiggest==0 ) firstbiggest = biggest;
1950  }
1951  }
1952  for ( ; cnt<12; ++cnt ) {
1953  snaps[cnt] = 0;
1954  cnts[cnt] = 0;
1955  }
1956 }
1957 
1958 void FindHStems( SplineFont *sf, real snaps[12], real cnt[12]) {
1959  FigureStems(sf,snaps,cnt,1);
1960 }
1961 
1962 void FindVStems( SplineFont *sf, real snaps[12], real cnt[12]) {
1963  FigureStems(sf,snaps,cnt,0);
1964 }
1965 
1967  BasePoint nvec, pvec;
1968  double proj_same, proj_normal;
1969 
1970  if ( sp->nonextcp || sp->noprevcp )
1971 return( false ); /* No continuity of slopes */
1972 
1973  nvec.x = sp->nextcp.x - sp->me.x; nvec.y = sp->nextcp.y - sp->me.y;
1974  pvec.x = sp->me.x - sp->prevcp.x; pvec.y = sp->me.y - sp->prevcp.y;
1975 
1976  /* Avoid cases where the slopes are 180 out of phase */
1977  if ( (proj_same = nvec.x*pvec.x + nvec.y*pvec.y)<=0 )
1978 return( false );
1979  if ( (proj_normal = nvec.x*pvec.y - nvec.y*pvec.x)<0 )
1980  proj_normal = -proj_normal;
1981 
1982  /* Something is smooth if the normal projection is 0. Let's allow for */
1983  /* some rounding errors */
1984  if ( proj_same >= 16*proj_normal )
1985 return( true );
1986 
1987 return( false );
1988 }
1989 
1990 static int _SplineCharIsFlexible(SplineChar *sc, int layer, int blueshift) {
1991  /* Need two splines
1992  outer endpoints have same x (or y) values
1993  inner point must be less than 20 horizontal (v) units from the outer points
1994  inner point must also be less than BlueShift units (defaults to 7=>6)
1995  (can increase BlueShift up to 21)
1996  the inner point must be a local extremum
1997  the inner point's cps must be at the x (or y) value as the extremum
1998  (I think)
1999  */
2000  /* We want long, nearly straight stems. If the end-points should not have
2001  continuous slopes, or if they do, they must be horizontal/vertical.
2002  This is an heuristic requirement, not part of Adobe's spec.
2003  */
2004  SplineSet *spl;
2005  SplinePoint *sp, *np, *pp;
2006  int max=0, val;
2007  RefChar *r;
2008 
2009  if ( sc==NULL )
2010 return(false);
2011 
2012  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
2013  if ( spl->first->prev==NULL ) {
2014  /* Mark everything on the open path as inflexible */
2015  sp=spl->first;
2016  while ( 1 ) {
2017  sp->flexx = sp->flexy = false;
2018  if ( sp->next==NULL )
2019  break;
2020  sp = sp->next->to;
2021  }
2022  continue; /* Ignore open paths */
2023  }
2024  sp=spl->first;
2025  do {
2026  if ( sp->next==NULL || sp->prev==NULL )
2027  break;
2028  np = sp->next->to;
2029  pp = sp->prev->from;
2030  if ( !pp->flexx && !pp->flexy ) {
2031  sp->flexy = sp->flexx = 0;
2032  val = 0;
2033  if ( RealNear(sp->nextcp.x,sp->me.x) &&
2034  RealNear(sp->prevcp.x,sp->me.x) &&
2035  RealNear(np->me.x,pp->me.x) &&
2036  !RealNear(np->me.x,sp->me.x) &&
2037  (!IsFlexSmooth(pp) || RealNear(pp->nextcp.x,pp->me.x)) &&
2038  (!IsFlexSmooth(np) || RealNear(np->prevcp.x,np->me.x)) &&
2039  np->me.x-sp->me.x < blueshift &&
2040  np->me.x-sp->me.x > -blueshift ) {
2041  if ( (np->me.x>sp->me.x &&
2042  np->prevcp.x<=np->me.x && np->prevcp.x>=sp->me.x &&
2043  pp->nextcp.x<=pp->me.x && pp->prevcp.x>=sp->me.x ) ||
2044  (np->me.x<sp->me.x &&
2045  np->prevcp.x>=np->me.x && np->prevcp.x<=sp->me.x &&
2046  pp->nextcp.x>=pp->me.x && pp->prevcp.x<=sp->me.x )) {
2047  sp->flexx = true;
2048  val = np->me.x-sp->me.x;
2049  }
2050  }
2051  if ( RealNear(sp->nextcp.y,sp->me.y) &&
2052  RealNear(sp->prevcp.y,sp->me.y) &&
2053  RealNear(np->me.y,pp->me.y) &&
2054  !RealNear(np->me.y,sp->me.y) &&
2055  (!IsFlexSmooth(pp) || RealNear(pp->nextcp.y,pp->me.y)) &&
2056  (!IsFlexSmooth(np) || RealNear(np->prevcp.y,np->me.y)) &&
2057  np->me.y-sp->me.y < blueshift &&
2058  np->me.y-sp->me.y > -blueshift ) {
2059  if ( (np->me.y>sp->me.y &&
2060  np->prevcp.y<=np->me.y && np->prevcp.y>=sp->me.y &&
2061  pp->nextcp.y<=pp->me.y && pp->nextcp.y>=sp->me.y ) ||
2062  (np->me.y<sp->me.y &&
2063  np->prevcp.y>=np->me.y && np->prevcp.y<=sp->me.y &&
2064  pp->nextcp.y>=pp->me.y && pp->nextcp.y<=sp->me.y )) {
2065  sp->flexy = true;
2066  val = np->me.y-sp->me.y;
2067  }
2068  }
2069  if ( val<0 ) val = -val;
2070  if ( val>max ) max = val;
2071  }
2072  sp = np;
2073  } while ( sp!=spl->first );
2074  }
2075  sc->layers[layer].anyflexes = max>0;
2076  if ( max==0 )
2077  for ( r = sc->layers[layer].refs; r!=NULL ; r=r->next )
2078  if ( r->sc->layers[layer].anyflexes ) {
2079  sc->layers[layer].anyflexes = true;
2080  break;
2081  }
2082 return( max );
2083 }
2084 
2085 
2086 
2087 static void SCUnflex(SplineChar *sc, int layer) {
2088  SplineSet *spl;
2089  SplinePoint *sp;
2090 
2091  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
2092  /* Mark everything on the path as inflexible */
2093  sp=spl->first;
2094  while ( 1 ) {
2095  sp->flexx = sp->flexy = false;
2096  if ( sp->next==NULL )
2097  break;
2098  sp = sp->next->to;
2099  if ( sp==spl->first )
2100  break;
2101  }
2102  }
2103  sc->layers[layer].anyflexes = false;
2104 }
2105 
2106 static void FlexDependents(SplineChar *sc,int layer) {
2107  struct splinecharlist *scl;
2108 
2109  sc->layers[layer].anyflexes = true;
2110  for ( scl = sc->dependents; scl!=NULL; scl=scl->next )
2111  FlexDependents(scl->sc,layer);
2112 }
2113 
2115  int i;
2116  int max=0, val;
2117  char *pt;
2118  int blueshift;
2119  /* if the return value is bigger than 6 and we don't have a BlueShift */
2120  /* then we must set BlueShift to ret+1 before saving private dictionary */
2121  /* If the first point in a spline set is flexible, then we must rotate */
2122  /* the splineset */
2123 
2125  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL )
2126  SCUnflex(sf->glyphs[i],layer);
2127 return( 0 );
2128  }
2129 
2130  pt = PSDictHasEntry(sf->private,"BlueShift");
2131  blueshift = 21; /* maximum posible flex, not default */
2132  if ( pt!=NULL ) {
2133  blueshift = strtol(pt,NULL,10);
2134  if ( blueshift>21 ) blueshift = 21;
2135  } else if ( PSDictHasEntry(sf->private,"BlueValues")!=NULL )
2136  blueshift = 7; /* The BlueValues array may depend on BlueShift having its default value */
2137 
2138  for ( i=0; i<sf->glyphcnt; ++i )
2139  if ( sf->glyphs[i]!=NULL ) if ( sf->glyphs[i]!=NULL ) {
2140  val = _SplineCharIsFlexible(sf->glyphs[i],layer,blueshift);
2141  if ( val>max ) max = val;
2142  if ( sf->glyphs[i]->layers[layer].anyflexes )
2143  FlexDependents(sf->glyphs[i],layer);
2144  }
2145 return( max );
2146 }
2147 
2148 
double __cdecl rint(double _X)
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
static int pr(int(*writeFunc)(void *stream, const char *data, int size), void *stream, const char *data)
Definition: HTMLGen.cc:249
#define sc
Definition: aptex-macros.h:57
#define active
Definition: aptex-macros.h:325
#define width(a)
Definition: aptex-macros.h:198
#define head
Definition: aptex-macros.h:513
#define next(a)
Definition: aptex-macros.h:924
static point_t cur
Definition: backend_eps.c:108
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
@ hstem
Definition: cscommands.h:12
@ vstem
Definition: cscommands.h:26
#define free(a)
Definition: decNumber.cpp:310
int w
Definition: dviconv.c:26
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
static int np
Definition: bifont.c:64
double real
Definition: dvips.h:66
double sqrt()
char * temp
Definition: dvidvi.c:137
mpz_t pp
Definition: gen-psqr.c:108
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
#define w2
static FIELD_PTR prev
Definition: genind.c:36
__gmp_expr< mpf_t, __gmp_unary_expr< __gmp_expr< mpf_t, U >, __gmp_ceil_function > > ceil(const __gmp_expr< mpf_t, U > &expr)
Definition: gmpxx.h:3340
#define c(n)
Definition: gpos-common.c:150
int base
Definition: gsftopk.c:1502
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
for(n=0;n< outline->n_points;n++)
Definition: ftbbox.c:494
#define forever
Definition: ftrandom.c:53
void * new(uint32_t size)
Definition: mem.c:34
int major
Definition: pdfcolor.c:526
static dpx_stack coords
Definition: specials.c:313
struct stem stems[128]
Definition: type1.c:298
static struct blues_struct * blues
Definition: type1.c:217
#define floor(x)
Definition: cpascal.h:52
#define test
Definition: tie.c:129
#define isdigit(c)
Definition: snprintf.c:177
const int * pos
Definition: combiners.h:905
@ other
Definition: mtxline.h:22
dictionary off
Definition: fc-lang.py:226
def ref(x)
Definition: pdf-org.py:104
int k
Definition: otp-parser.c:70
#define min(a, b)
Definition: pbmplus.h:223
#define max(a, b)
Definition: pbmto4425.c:11
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
static int cnt
Definition: pkout.c:166
real to[600]
Definition: pmxab.c:87
int hmax
Definition: pnmhistmap.c:37
static int force
Definition: pnmtopng.c:115
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)
int otherblues[10]
Definition: pt1.c:115
#define flags
float EITOfNextMajor(EI *e, EIList *el, float sought_m)
Definition: autohint.c:853
void ElFreeEI(EIList *el)
Definition: autohint.c:595
int SplineFontIsFlexible(SplineFont *sf, int layer, int flags)
Definition: autohint.c:2674
void SCClearHintMasks(SplineChar *sc, int layer, int counterstoo)
Definition: autohint.c:1564
EI * EIActiveListReorder(EI *active, int *change)
Definition: autohint.c:891
float HIlen(StemInfo *stems)
Definition: autohint.c:1085
float HIoverlap(HintInstance *mhi, HintInstance *thi)
Definition: autohint.c:1094
int StemListAnyConflicts(StemInfo *stems)
Definition: autohint.c:1115
void SCFigureHintMasks(SplineChar *sc, int layer)
Definition: autohint.c:2128
void FindBlues(SplineFont *sf, int layer, float blues[14], float otherblues[10])
Definition: autohint.c:81
int EISkipExtremum(EI *e, float i, int major)
Definition: autohint.c:1021
EI * EIActiveEdgesRefigure(EIList *el, EI *active, float i, int major, int *_change)
Definition: autohint.c:925
void ELFindEdges(SplineChar *sc, EIList *el)
Definition: autohint.c:723
void ELOrder(EIList *el, int major)
Definition: autohint.c:774
void FindVStems(SplineFont *sf, float snaps[12], float cnt[12])
Definition: autohint.c:2524
struct mmh MMH
void FindHStems(SplineFont *sf, float snaps[12], float cnt[12])
Definition: autohint.c:2520
char * PSDictHasEntry(struct psdict *dict, const char *key)
Definition: dumppfa.c:36
int CvtPsStem3(struct growbuf *gb, SplineChar *scs[16], int instance_count, int ishstem, int round)
Definition: splinesave.c:456
#define MmMax
Definition: splinefont.h:58
int RealNear(float a, float b)
Definition: splineutil2.c:112
@ ps_flag_nohints
Definition: splinefont.h:1917
@ ps_flag_noflex
Definition: splinefont.h:1916
#define extended
Definition: splinefont.h:52
uint8 HintMask[96/8]
Definition: splinefont.h:949
void SplineCharFindBounds(SplineChar *sc, DBounds *bounds)
Definition: splineutil.c:438
void SplineRemoveExtremaTooClose(Spline1D *sp, double *_t1, double *_t2)
Definition: splineutil.c:1840
#define chunkalloc(size)
Definition: splinefont.h:1947
#define chunkfree(item, size)
Definition: splinefont.h:1948
void SplineFindExtrema(const Spline1D *sp, double *_t1, double *_t2)
Definition: splineutil.c:1668
SplineSet * SplineSetReverse(SplineSet *spl)
Definition: splineutil2.c:1264
#define HntMax
Definition: splinefont.h:948
void StemInfoFree(StemInfo *h)
Definition: splineutil.c:2430
#define ff_progress_next
Definition: uiinterface.h:141
#define IError
Definition: uiinterface.h:124
const unichar_t *const *const unicode_alternates[]
Definition: unialt.c:8890
uint32 unichar_t
Definition: basics.h:51
#define isupper(ch)
Definition: utype.h:80
#define isalnum(ch)
Definition: utype.h:84
#define mask(n)
Definition: lbitlib.c:93
#define swap(sp)
Definition: interp.c:123
test
Definition: parser.c:257
static void AddBlue(double val, double array[5], int force)
Definition: autohint.c:50
static void UnnumberHints(SplineChar *sc)
Definition: autohint.c:1398
static void FlexDependents(SplineChar *sc, int layer)
Definition: autohint.c:2106
static void SCGuessHintInstancesLight(SplineChar *sc, int layer, StemInfo *stem, int major)
Definition: autohint.c:988
static MMH * AddHintSet(MMH *hints, StemInfo *h[16], int instance_count, SplinePoint *sps[16], int ish)
Definition: autohint.c:1453
static void FigureStems(SplineFont *sf, double snaps[12], double cnts[12], int which)
Definition: autohint.c:1853
static int TestHintMask(SplineChar *scs[16], SplinePoint *to[16], int instance_count, HintMask mask)
Definition: autohint.c:1369
static StemInfo * OnVHint(SplinePoint *sp, StemInfo *s)
Definition: autohint.c:1270
static void SCUnflex(SplineChar *sc, int layer)
Definition: autohint.c:2087
static StemInfo * OnHHint(SplinePoint *sp, StemInfo *s)
Definition: autohint.c:1246
static MMH * SortMMH(MMH *head, int instance_count)
Definition: autohint.c:1528
static HintInstance * HIMerge(HintInstance *into, HintInstance *hi)
Definition: autohint.c:624
static int _SplineCharIsFlexible(SplineChar *sc, int layer, int blueshift)
Definition: autohint.c:1990
static int SplFigureHintMasks(SplineChar *scs[16], SplineSet *spl[16], int instance_count, HintMask mask, int inited)
Definition: autohint.c:1735
static void MMHFreeList(MMH *mmh)
Definition: autohint.c:1626
static void SortMMH2(SplineChar *scs[16], MMH *mmh, int instance_count, int ish)
Definition: autohint.c:1595
static HintInstance * SCGuessHintPoints(SplineChar *sc, int layer, StemInfo *stem, int major, int off)
Definition: autohint.c:936
static void UntickHints(SplineChar *sc)
Definition: autohint.c:1418
static void AddCoord(MMH *mmh, SplinePoint *sps[16], int instance_count, int ish)
Definition: autohint.c:1438
static void EIAddSpline(Spline *spline, EIList *el)
Definition: autohint.c:493
static int IsBiggerSlope(EI *test, EI *base, int major)
Definition: autohint.c:548
static void _SCClearHintMasks(SplineChar *sc, int layer, int counterstoo)
Definition: autohint.c:1163
StemInfo * HintCleanup(StemInfo *stem, int dosort, int instance_count)
Definition: autohint.c:655
static void SplResolveSplitHints(SplineChar *scs[16], SplineSet *spl[16], int instance_count, MMH **hs, MMH **vs)
Definition: autohint.c:1640
static void SCFigureSimpleCounterMasks(SplineChar *sc)
Definition: autohint.c:1201
static int EIAddEdge(Spline *spline, double tmin, double tmax, EIList *el)
Definition: autohint.c:406
static int IsFlexSmooth(SplinePoint *sp)
Definition: autohint.c:1966
static int NumberMMH(MMH *mmh, int hstart, int instance_count)
Definition: autohint.c:1563
static int CompareMMH(MMH *mmh1, MMH *mmh2, int instance_count)
Definition: autohint.c:1501
void SCGuessHHintInstancesList(SplineChar *sc, int layer)
Definition: autohint.c:1144
void SCGuessVHintInstancesList(SplineChar *sc, int layer)
Definition: autohint.c:1153
static void FigureHintMask(SplineChar *scs[16], SplinePoint *to[16], int instance_count, HintMask mask)
Definition: autohint.c:1309
static int NumberHints(SplineChar *sc)
Definition: autohint.c:1407
static void MergeZones(double zone1[5], double zone2[5])
Definition: autohint.c:62
static void ResolveSplitHints(SplineChar *scs[16], int layer, int instance_count)
Definition: autohint.c:1683
static int ConflictsWithMask(StemInfo *stems, HintMask mask, StemInfo *h)
Definition: autohint.c:1296
int UnblendedCompare(double u1[16], double u2[16], int cnt)
Definition: psread.c:3034
void * gcalloc(int cnt, long size)
void * galloc(long size)
ShellFileEnvironment e
Definition: sh6.c:388
struct PATTERN * next
Definition: vlna.c:66
float x
Definition: splinefont.h:70
float y
Definition: splinefont.h:71
Definition: libppm5.c:414
struct coords * next
Definition: autohint.c:1763
float coords[16]
Definition: autohint.c:1762
unsigned hup
Definition: edgelist.h:106
float coordmin[2]
Definition: edgelist.h:92
unsigned vup
Definition: edgelist.h:107
unsigned int horattmin
Definition: edgelist.h:102
struct edgeinfo * next
Definition: edgelist.h:110
unsigned int horattmax
Definition: edgelist.h:103
unsigned int hvtop
Definition: edgelist.h:97
unsigned int almosthor
Definition: edgelist.h:100
float ocur
Definition: edgelist.h:109
unsigned int vert
Definition: edgelist.h:99
unsigned int hor
Definition: edgelist.h:98
unsigned int almostvert
Definition: edgelist.h:101
float tmin
Definition: edgelist.h:91
float tcur
Definition: edgelist.h:108
unsigned int hv
Definition: edgelist.h:95
struct edgeinfo * aenext
Definition: edgelist.h:112
float coordmax[2]
Definition: edgelist.h:93
unsigned int vertattmax
Definition: edgelist.h:105
unsigned int vertattmin
Definition: edgelist.h:104
struct edgeinfo * splinenext
Definition: edgelist.h:113
float tmax
Definition: edgelist.h:91
Spline * spline
Definition: edgelist.h:90
unsigned int up
Definition: edgelist.h:94
struct edgeinfo * ordered
Definition: edgelist.h:111
unsigned int hvbottom
Definition: edgelist.h:96
char * ends
Definition: edgelist.h:124
EI * splinefirst
Definition: edgelist.h:128
EI * edges
Definition: edgelist.h:119
int major
Definition: edgelist.h:127
unsigned leavetiny
Definition: edgelist.h:130
float coordmax[2]
Definition: edgelist.h:121
float coordmin[2]
Definition: edgelist.h:120
int layer
Definition: edgelist.h:126
SplineChar * sc
Definition: edgelist.h:125
EI * splinelast
Definition: edgelist.h:128
int high
Definition: edgelist.h:122
int low
Definition: edgelist.h:122
EI ** ordered
Definition: edgelist.h:123
int cnt
Definition: edgelist.h:122
Definition: ttf.h:354
struct hintinstance * next
Definition: splinefont.h:1132
Definition: edgelist.h:31
RefChar * refs
Definition: splinefont.h:1202
SplinePointList * splines
Definition: splinefont.h:1201
Definition: autohint.c:1766
struct coords * where
Definition: autohint.c:1768
StemInfo * hints[16]
Definition: autohint.c:1767
struct mmh * next
Definition: autohint.c:1769
StemInfo * map[16]
Definition: autohint.c:1767
SplineFont * normal
Definition: splinefont.h:1858
int instance_count
Definition: splinefont.h:1856
SplineFont ** instances
Definition: splinefont.h:1857
Definition: tfmaux.c:31
float a
Definition: splinefont.h:1010
float d
Definition: splinefont.h:1010
float b
Definition: splinefont.h:1010
float c
Definition: splinefont.h:1010
Spline1D splines[2]
Definition: splinefont.h:1039
SplinePoint * to
Definition: splinefont.h:1038
SplinePoint * from
Definition: splinefont.h:1037
Layer * layers
Definition: splinefont.h:1337
char * name
Definition: splinefont.h:1326
struct splinecharlist * next
Definition: splinefont.h:1314
struct splinechar * sc
Definition: splinefont.h:1314
SplineChar ** glyphs
Definition: splinefont.h:1690
BasePoint me
Definition: splinefont.h:953
struct spline * next
Definition: splinefont.h:979
struct spline * prev
Definition: splinefont.h:980
struct splinepointlist * next
Definition: splinefont.h:1073
SplinePoint * first
Definition: splinefont.h:1072
Definition: type1.c:137
float width
Definition: splinefont.h:1170
float start
Definition: splinefont.h:1169
Definition: dvips.h:235
struct t * next
Definition: dvips.h:237
Definition: strexpr.c:21
int j
Definition: t4ht.c:1589
while(temp)
Definition: t4ht.c:858
val
Definition: tex4ht.c:3227
m
Definition: tex4ht.c:3990
#define sp
Definition: stack.c:11
int hints
Definition: ttf2pt1.c:133
PATTERN * pt
Definition: vlna.c:74
#define end(cp)
Definition: zic.c:71