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-2012 by George Williams */
2 /*
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are met:
5 
6  * Redistributions of source code must retain the above copyright notice, this
7  * list of conditions and the following disclaimer.
8 
9  * Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12 
13  * The name of the author may not be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15 
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 #include "fontforge.h"
28 #include <math.h>
29 #include "stemdb.h"
30 #include <utype.h>
31 #include <chardata.h>
32 #include "edgelist.h"
33 
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 undesirables */
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  const unichar_t *upt;
97  if ( enc<0x10000 && isalnum(enc) &&
98  ((enc>=32 && enc<128 ) || enc == 0xfe || enc==0xf0 || enc==0xdf ||
99  enc==0x131 ||
100  (enc>=0x391 && enc<=0x3f3 ) ||
101  (enc>=0x400 && enc<=0x4e9 ) )) {
102  /* no accented characters (or ligatures) */
103  if ( unicode_alternates[enc>>8]!=NULL &&
104  (upt =unicode_alternates[enc>>8][enc&0xff])!=NULL &&
105  upt[1]!='\0' )
106  continue;
107  SplineCharFindBounds(sf->glyphs[i],&b);
108  if ( b.miny==0 && b.maxy==0 )
109  continue;
110  if ( enc=='g' || enc=='j' || enc=='p' || enc=='q' || enc=='y' ||
111  enc==0xfe ||
112  enc==0x3c1 /* rho */ ||
113  enc==0x3c6 /* phi */ ||
114  enc==0x3c7 /* chi */ ||
115  enc==0x3c8 /* psi */ ||
116  enc==0x440 /* cyr er */ ||
117  enc==0x443 /* cyr u */ ||
118  enc==0x444 /* cyr ef */) {
119  descenth[0] += b.miny;
120  descenth[1] += b.miny*b.miny;
121  ++descenth[2];
122  } else if ( enc=='x' || enc=='r' || enc=='o' || enc=='e' ||
123  enc=='s' || enc=='c' || enc=='h' || enc=='k' ||
124  enc=='l' || enc=='m' || enc=='n' ||
125  enc==0x3b5 /* epsilon */ ||
126  enc==0x3b9 /* iota */ ||
127  enc==0x3ba /* kappa */ ||
128  enc==0x3bf /* omicron */ ||
129  enc==0x3c3 /* sigma */ ||
130  enc==0x3c5 /* upsilon */ ||
131  enc==0x430 /* cyr a */ ||
132  enc==0x432 /* cyr ve */ ||
133  enc==0x433 /* cyr ge */ ||
134  enc==0x435 /* cyr e */ ||
135  enc==0x436 /* cyr zhe */ ||
136  enc==0x438 /* cyr i */ ||
137  enc==0x43a /* cyr ka */ ||
138  enc==0x43d /* cyr en */ ||
139  enc==0x43e /* cyr o */ ||
140  enc==0x441 /* cyr es */ ||
141  enc==0x445 /* cyr ha */ ||
142  enc==0x447 /* cyr che */ ||
143  enc==0x448 /* cyr sha */ ||
144  enc==0x44f /* cyr ya */ ){
145  base[0] += b.miny;
146  base[1] += b.miny*b.miny;
147  ++base[2];
148  }
149  /* careful of lowercase digits, 6 and 8 should be ascenders */
150  if ( enc=='6' || enc=='8' ) {
151  digith[0] += b.maxy;
152  digith[1] += b.maxy*b.maxy;
153  ++digith[2];
154  } else if ( enc<0x10000 && isdigit(enc) ) {
155  otherdigits[0] += b.maxy;
156  otherdigits[1] += b.maxy*b.maxy;
157  ++otherdigits[2];
158  } else if ( enc<0x10000 && isupper(enc) && enc!=0x462 && enc!=0x490 ) {
159  caph[0] += b.maxy;
160  caph[1] += b.maxy*b.maxy;
161  ++caph[2];
162  } else if ( enc=='b' || enc=='d' || enc=='f' || enc=='h' || enc=='k' ||
163  enc == 'l' || enc==0xf0 || enc==0xfe || enc == 0xdf ||
164  enc == 0x3b2 || enc==0x3b6 || enc==0x3b8 || enc==0x3bb ||
165  enc == 0x3be ||
166  enc == 0x431 /* cyr be */ /* || enc == 0x444 - ef may have varible height */) {
167  ascenth[0] += b.maxy;
168  ascenth[1] += b.maxy*b.maxy;
169  ++ascenth[2];
170  } else if ( enc=='c' || enc=='e' || enc=='o' || enc=='s' || enc=='u' ||
171  enc=='v' || enc=='w' || enc=='x' || enc=='y' || enc=='z' ||
172  enc==0x3b5 /* epsilon */ ||
173  enc==0x3b9 /* iota */ ||
174  enc==0x3ba /* kappa */ ||
175  enc==0x3bc /* mu */ ||
176  enc==0x3bd /* nu */ ||
177  enc==0x3bf /* omicron */ ||
178  enc==0x3c0 /* pi */ ||
179  enc==0x3c1 /* rho */ ||
180  enc==0x3c5 /* upsilon */ ||
181  enc==0x433 /* cyr ge */ ||
182  enc==0x435 /* cyr e */ ||
183  enc==0x436 /* cyr zhe */ ||
184  enc==0x438 /* cyr i */ ||
185  enc==0x43b /* cyr el */ ||
186  enc==0x43d /* cyr en */ ||
187  enc==0x43e /* cyr o */ ||
188  enc==0x43f /* cyr pe */ ||
189  enc==0x440 /* cyr er */ ||
190  enc==0x441 /* cyr es */ ||
191  enc==0x442 /* cyr te */ ||
192  enc==0x443 /* cyr u */ ||
193  enc==0x445 /* cyr ha */ ||
194  enc==0x446 /* cyr tse */ ||
195  enc==0x447 /* cyr che */ ||
196  enc==0x448 /* cyr sha */ ||
197  enc==0x449 /* cyr shcha */ ||
198  enc==0x44a /* cyr hard sign */ ||
199  enc==0x44b /* cyr yery */ ||
200  enc==0x44c /* cyr soft sign */ ||
201  enc==0x44d /* cyr reversed e */ ||
202  enc==0x44f /* cyr ya */ ) {
203  xh[0] += b.maxy;
204  xh[1] += b.maxy*b.maxy;
205  ++xh[2];
206  }
207  }
208  }
209  if ( !ff_progress_next())
210  break;
211  }
212  if ( otherdigits[2]>0 && digith[2]>0 ) {
213  if ( otherdigits[0]/otherdigits[2] >= .95*digith[0]/digith[2] ) {
214  /* all digits are about the same height, not lowercase */
215  digith[0] += otherdigits[0];
216  digith[1] += otherdigits[1];
217  digith[2] += otherdigits[2];
218  }
219  }
220 
221  if ( xh[2]>1 ) {
222  xh[1] = sqrt((xh[1]-xh[0]*xh[0]/xh[2])/(xh[2]-1));
223  xh[0] /= xh[2];
224  }
225  if ( ascenth[2]>1 ) {
226  ascenth[1] = sqrt((ascenth[1]-ascenth[0]*ascenth[0]/ascenth[2])/(ascenth[2]-1));
227  ascenth[0] /= ascenth[2];
228  }
229  if ( caph[2]>1 ) {
230  caph[1] = sqrt((caph[1]-caph[0]*caph[0]/caph[2])/(caph[2]-1));
231  caph[0] /= caph[2];
232  }
233  if ( digith[2]>1 ) {
234  digith[1] = sqrt((digith[1]-digith[0]*digith[0]/digith[2])/(digith[2]-1));
235  digith[0] /= digith[2];
236  }
237  if ( base[2]>1 ) {
238  base[1] = sqrt((base[1]-base[0]*base[0]/base[2])/(base[2]-1));
239  base[0] /= base[2];
240  }
241  if ( descenth[2]>1 ) {
242  descenth[1] = sqrt((descenth[1]-descenth[0]*descenth[0]/descenth[2])/(descenth[2]-1));
243  descenth[0] /= descenth[2];
244  }
245 
246  /* we'll accept values between +/- 1sd of the mean */
247  /* array[0] == mean, array[1] == sd, array[2] == cnt, array[3]=min, array[4]==max */
248  if ( base[0]+base[1]<0 ) base[1] = -base[0]; /* Make sure 0 is within the base bluezone */
249  caph[3] = caph[4] = 0;
250  xh[3] = xh[4] = 0;
251  ascenth[3] = ascenth[4] = 0;
252  digith[3] = digith[4] = 0;
253  descenth[3] = descenth[4] = 0;
254  base[3] = base[4] = 0;
255  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
256  int enc = sf->glyphs[i]->unicodeenc;
257  const unichar_t *upt;
258  if ( enc<0x10000 && isalnum(enc) &&
259  ((enc>=32 && enc<128 ) || enc == 0xfe || enc==0xf0 || enc==0xdf ||
260  (enc>=0x391 && enc<=0x3f3 ) ||
261  (enc>=0x400 && enc<=0x4e9 ) )) {
262  /* no accented characters (or ligatures) */
263  if ( unicode_alternates[enc>>8]!=NULL &&
264  (upt =unicode_alternates[enc>>8][enc&0xff])!=NULL &&
265  upt[1]!='\0' )
266  continue;
267  SplineCharFindBounds(sf->glyphs[i],&b);
268  if ( b.miny==0 && b.maxy==0 )
269  continue;
270  if ( enc=='g' || enc=='j' || enc=='p' || enc=='q' || enc=='y' ||
271  enc==0xfe || enc == 0x3c6 || enc==0x3c8 ||
272  enc==0x440 || enc==0x443 || enc==0x444) {
273  AddBlue(b.miny,descenth,false);
274  } else {
275  /* O and o get forced into the baseline blue value even if they*/
276  /* are beyond 1 sd */
277  AddBlue(b.miny,base,enc=='O' || enc=='o');
278  }
279  if ( enc<0x10000 && isdigit(enc)) {
280  AddBlue(b.maxy,digith,false);
281  } else if ( enc<0x10000 && isupper(enc)) {
282  AddBlue(b.maxy,caph,enc=='O');
283  } else if ( enc=='b' || enc=='d' || enc=='f' || enc=='h' || enc=='k' ||
284  enc == 'l' || enc=='t' || enc==0xf0 || enc==0xfe || enc == 0xdf ||
285  enc == 0x3b2 || enc==0x3b6 || enc==0x3b8 || enc==0x3bb ||
286  enc == 0x3be ||
287  enc == 0x431 ) {
288  AddBlue(b.maxy,ascenth,false);
289  } else if ( enc=='c' || enc=='e' || enc=='o' || enc=='s' || enc=='u' ||
290  enc=='v' || enc=='w' || enc=='x' || enc=='y' || enc=='z' ||
291  enc==0x3b5 /* epsilon */ ||
292  enc==0x3b9 /* iota */ ||
293  enc==0x3ba /* kappa */ ||
294  enc==0x3bc /* mu */ ||
295  enc==0x3bd /* nu */ ||
296  enc==0x3bf /* omicron */ ||
297  enc==0x3c0 /* pi */ ||
298  enc==0x3c1 /* rho */ ||
299  enc==0x3c5 /* upsilon */ ||
300  enc==0x433 /* cyr ge */ ||
301  enc==0x435 /* cyr e */ ||
302  enc==0x436 /* cyr zhe */ ||
303  enc==0x438 /* cyr i */ ||
304  enc==0x43b /* cyr el */ ||
305  enc==0x43d /* cyr en */ ||
306  enc==0x43e /* cyr o */ ||
307  enc==0x43f /* cyr pe */ ||
308  enc==0x440 /* cyr er */ ||
309  enc==0x441 /* cyr es */ ||
310  enc==0x442 /* cyr te */ ||
311  enc==0x443 /* cyr u */ ||
312  enc==0x445 /* cyr ha */ ||
313  enc==0x446 /* cyr tse */ ||
314  enc==0x447 /* cyr che */ ||
315  enc==0x448 /* cyr sha */ ||
316  enc==0x449 /* cyr shcha */ ||
317  enc==0x44a /* cyr hard sign */ ||
318  enc==0x44b /* cyr yery */ ||
319  enc==0x44c /* cyr soft sign */ ||
320  enc==0x44d /* cyr reversed e */ ||
321  enc==0x44f /* cyr ya */ ) {
322  AddBlue(b.maxy,xh,enc=='o' || enc=='x');
323  }
324  }
325  }
326 
327  /* the descent blue zone merges into the base zone */
328  MergeZones(descenth,base);
329  MergeZones(xh,base);
330  MergeZones(ascenth,caph);
331  MergeZones(digith,caph);
332  MergeZones(xh,caph);
333  MergeZones(ascenth,digith);
334  MergeZones(xh,digith);
335 
336  if ( otherblues!=NULL )
337  for ( i=0; i<10; ++i )
338  otherblues[i] = 0;
339  for ( i=0; i<14; ++i )
340  blues[i] = 0;
341 
342  if ( otherblues!=NULL && descenth[2]!=0 ) {
343  otherblues[0] = descenth[3];
344  otherblues[1] = descenth[4];
345  }
346  i = 0;
347  if ( base[2]==0 && (xh[2]!=0 || ascenth[2]!=0 || caph[2]!=0 || digith[2]!=0 )) {
348  /* base line blue value must be present if any other value is */
349  /* make one up if we don't have one */
350  blues[0] = -20;
351  blues[1] = 0;
352  i = 2;
353  } else if ( base[2]!=0 ) {
354  blues[0] = base[3];
355  blues[1] = base[4];
356  i = 2;
357  }
358  if ( xh[2]!=0 ) {
359  blues[i++] = xh[3];
360  blues[i++] = xh[4];
361  }
362  if ( caph[2]!=0 ) {
363  blues[i++] = caph[3];
364  blues[i++] = caph[4];
365  }
366  if ( digith[2]!=0 ) {
367  blues[i++] = digith[3];
368  blues[i++] = digith[4];
369  }
370  if ( ascenth[2]!=0 ) {
371  blues[i++] = ascenth[3];
372  blues[i++] = ascenth[4];
373  }
374 
375  for ( j=0; j<i; j+=2 ) for ( k=j+2; k<i; k+=2 ) {
376  if ( blues[j]>blues[k] ) {
377  real temp = blues[j];
378  blues[j]=blues[k];
379  blues[k] = temp;
380  temp = blues[j+1];
381  blues[j+1] = blues[k+1];
382  blues[k+1] = temp;
383  }
384  }
385 }
386 
387 static int PVAddBlues(BlueData *bd,unsigned bcnt,char *pt) {
388  char *end;
389  real val1, val2;
390  unsigned i,j;
391 
392  if ( pt==NULL )
393 return( bcnt );
394 
395  while ( isspace(*pt) || *pt=='[' ) ++pt;
396  while ( *pt!=']' && *pt!='\0' ) {
397  val1 = strtod(pt,&end);
398  if ( *end=='\0' || end==pt )
399  break;
400  for ( pt=end; isspace(*pt) ; ++pt );
401  val2 = strtod(pt,&end);
402  if ( end==pt )
403  break;
404  if ( bcnt==0 || val1>bd->blues[bcnt-1][0] )
405  i = bcnt;
406  else {
407  for ( i=0; i<bcnt && val1>bd->blues[i][0]; ++i );
408  for ( j=bcnt; j>i; --j ) {
409  bd->blues[j][0] = bd->blues[j-1][0];
410  bd->blues[j][1] = bd->blues[j-1][1];
411  }
412  }
413  bd->blues[i][0] = val1;
414  bd->blues[i][1] = val2;
415  ++bcnt;
416  if ( bcnt>=sizeof(bd->blues)/sizeof(bd->blues[0]))
417  break;
418  for ( pt=end; isspace(*pt) ; ++pt );
419  }
420 return( bcnt );
421 }
422 
423 /* Quick and dirty (and sometimes wrong) approach to figure out the common */
424 /* alignment zones in latin (greek, cyrillic) alphabets */
425 void QuickBlues(SplineFont *_sf, int layer, BlueData *bd) {
426  real xheight = -1e10, caph = -1e10, ascent = -1e10, descent = 1e10, max, min;
427  real xheighttop = -1e10, caphtop = -1e10;
428  real numh = -1e10, numhtop = -1e10;
429  real base = -1e10, basebelow = 1e10;
430  SplineFont *sf;
431  SplinePoint *sp;
432  SplineSet *spl;
433  int i,j, bcnt;
434  SplineChar *t;
435  char *pt;
436 
437  /* Get the alignment zones we care most about */
438 
439  /* be careful of cid fonts */
440  if ( _sf->cidmaster!=NULL )
441  _sf = _sf->cidmaster;
442 
443  j=0;
444  do {
445  sf = ( _sf->subfontcnt==0 )? _sf : _sf->subfonts[j];
446  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
447  int enc = sf->glyphs[i]->unicodeenc;
448  if ( enc=='I' || enc=='O' || enc=='x' || enc=='o' || enc=='p' || enc=='l' ||
449 /* Jean-Christophe Dubacq points out that x-height should be calculated from */
450 /* various characters and not just x and o. Italic "x"s often have strange */
451 /* shapes */
452  enc=='A' || enc==0x391 || enc==0x410 ||
453  enc=='V' ||
454  enc=='u' || enc=='v' || enc=='w' || enc=='y' || enc=='z' ||
455  enc=='7' || enc=='8' || /* numbers with ascenders */
456  enc==0x399 || enc==0x39f || enc==0x3ba || enc==0x3bf || enc==0x3c1 || enc==0x3be || enc==0x3c7 ||
457  enc==0x41f || enc==0x41e || enc==0x43e || enc==0x43f || enc==0x440 || enc==0x452 || enc==0x445 ) {
458  t = sf->glyphs[i];
459  while ( t->layers[layer].splines==NULL && t->layers[layer].refs!=NULL )
460  t = t->layers[layer].refs->sc;
461  max = -1e10; min = 1e10;
462  if ( t->layers[layer].splines!=NULL ) {
463  for ( spl=t->layers[layer].splines; spl!=NULL; spl=spl->next ) {
464  for ( sp=spl->first; ; ) {
465  if ( sp->me.y > max ) max = sp->me.y;
466  if ( sp->me.y < min ) min = sp->me.y;
467  if ( sp->next==NULL )
468  break;
469  sp = sp->next->to;
470  if ( sp==spl->first )
471  break;
472  }
473  }
474  if ( enc>0x400 ) {
475  /* Only use ascent and descent here if we don't have anything better */
476  if ( enc==0x41f ) { caph = max; base = min; }
477  else if ( enc==0x41e ) { if ( max>caphtop ) caphtop = max; basebelow = min; }
478  else if ( enc==0x410 ) { if ( max>caphtop ) caphtop = max; }
479  else if ( enc==0x43f && xheight<0 ) xheight = max;
480  else if ( enc==0x445 && xheight<0 ) xheight = max;
481  else if ( enc==0x43e ) xheighttop = max;
482  else if ( enc==0x452 && ascent<0 ) ascent = max;
483  else if ( enc==0x440 && descent>0 ) descent = min;
484  } else if ( enc>0x300 ) {
485  if ( enc==0x399 ) { caph = max; base = min; }
486  else if ( enc==0x391 ) { if ( max>caphtop ) caphtop = max; }
487  else if ( enc==0x39f ) { if ( max>caphtop ) caphtop = max; basebelow = min; }
488  else if ( enc==0x3ba && xheight<0 ) xheight = max;
489  else if ( enc==0x3c7 && xheight<0 ) xheight = max;
490  else if ( enc==0x3bf ) xheighttop = max;
491  else if ( enc==0x3be && ascent<0 ) ascent = max;
492  else if ( enc==0x3c1 && descent>0 ) descent = min;
493  } else {
494  if ( enc=='I' ) { caph = max; base = min; }
495  else if ( enc=='O' ) { if ( max>caphtop ) caphtop = max; if ( basebelow<min ) basebelow = min; }
496  else if ( enc=='V' ) { if ( basebelow<min ) basebelow = min; }
497  else if ( enc=='A' ) { if ( max>caphtop ) caphtop = max; }
498  else if ( enc=='7' ) numh = max;
499  else if ( enc=='0' ) numhtop = max;
500  else if ( enc=='x' || enc=='o' || enc=='u' || enc=='v' ||
501  enc =='w' || enc=='y' || enc=='z' ) {
502  if ( xheighttop==-1e10 ) xheighttop = max;
503  if ( xheight==-1e10 ) xheight = max;
504  if ( max > xheighttop ) xheighttop = max;
505  else if ( max<xheight && max>20 ) xheight = max;
506  if ( enc=='y' && descent==1e10 ) descent = min;
507  } else if ( enc=='l' ) ascent = max;
508  else descent = min;
509  }
510  }
511  }
512  }
513  ++j;
514  } while ( j<_sf->subfontcnt );
515 
516  if ( basebelow==1e10 ) basebelow=-1e10;
517 
518  if ( caphtop<caph ) caphtop = caph; else if ( caph==-1e10 ) caph=caphtop;
519  if ( basebelow>base ) basebelow = base; else if ( base==-1e10 ) base=basebelow;
520  if ( base==-1e10 ) { base=basebelow = 0; }
521  if ( xheighttop<xheight ) xheighttop = xheight; else if ( xheight==-1e10 ) xheight=xheighttop;
522  bd->xheight = xheight; bd->xheighttop = xheighttop;
523  bd->caph = caph; bd->caphtop = caphtop;
524  bd->numh = numh; bd->numhtop = numhtop;
525  bd->ascent = ascent; bd->descent = descent;
526  bd->base = base; bd->basebelow = basebelow;
527 
528  bcnt = 0;
529  if ( (pt=PSDictHasEntry(sf->private,"BlueValues"))!=NULL )
530  bcnt = PVAddBlues(bd,bcnt,pt);
531  if ( (pt=PSDictHasEntry(sf->private,"OtherBlues"))!=NULL )
532  bcnt = PVAddBlues(bd,bcnt,pt);
533  if ( bcnt==0 ) {
534  if ( basebelow==-1e10 ) basebelow = base;
535  if ( base==-1e10 ) base = basebelow;
536  if ( xheight==-1e10 ) xheight = xheighttop;
537  if ( xheighttop==-1e10 ) xheighttop = xheight;
538  if ( caph==-1e10 ) caph = caphtop;
539  if ( caphtop==-1e10 ) caphtop = caph;
540  if ( numh==-1e10 ) numh = numhtop;
541  if ( numhtop==-1e10 ) numhtop = numh;
542  if ( numh!=-1e10 && (numhtop>caph-2 && numh<caphtop+2)) {
543  if ( numh<caph ) caph=numh;
544  if ( numhtop>caphtop ) caphtop = numhtop;
545  numh = numhtop = -1e10;
546  }
547  if ( ascent!=-1e10 && (ascent>caph-2 && ascent<caphtop+2)) {
548  if ( ascent<caph ) caph=ascent;
549  if ( ascent>caphtop ) caphtop = ascent;
550  ascent = -1e10;
551  }
552  if ( ascent!=-1e10 && (ascent>numh-2 && ascent<numhtop+2)) {
553  if ( ascent<numh ) numh=ascent;
554  if ( ascent>numhtop ) numhtop = ascent;
555  ascent = -1e10;
556  if ( numhtop>caph-2 && numh<caphtop+2 ) {
557  if ( numh<caph ) caph=numh;
558  if ( numhtop>caphtop ) caphtop = numhtop;
559  numh = numhtop = -1e10;
560  }
561  }
562 
563  if ( descent!=1e10 ) {
564  bd->blues[0][0] = bd->blues[0][1] = descent;
565  ++bcnt;
566  }
567  if ( basebelow!=-1e10 ) {
568  bd->blues[bcnt][0] = basebelow;
569  bd->blues[bcnt][1] = base;
570  ++bcnt;
571  }
572  if ( xheight!=-1e10 ) {
573  bd->blues[bcnt][0] = xheight;
574  bd->blues[bcnt][1] = xheighttop;
575  ++bcnt;
576  }
577  if ( numh!=-1e10 ) {
578  bd->blues[bcnt][0] = numh;
579  bd->blues[bcnt][1] = numhtop;
580  ++bcnt;
581  }
582  if ( caph!=-1e10 ) {
583  bd->blues[bcnt][0] = caph;
584  bd->blues[bcnt][1] = caphtop;
585  ++bcnt;
586  }
587  if ( ascent!=-1e10 ) {
588  bd->blues[bcnt][0] = bd->blues[bcnt][1] = ascent;
589  ++bcnt;
590  }
591  }
592  bd->bluecnt = bcnt;
593 }
594 
595 void ElFreeEI(EIList *el) {
596  EI *e, *next;
597 
598  for ( e = el->edges; e!=NULL; e = next ) {
599  next = e->next;
600  free(e);
601  }
602 }
603 
604 static int EIAddEdge(Spline *spline, real tmin, real tmax, EIList *el) {
605  EI *new = calloc(1,sizeof(EI));
606  real min, max, temp;
607  Spline1D *s;
608  real dxdtmin, dxdtmax, dydtmin, dydtmax;
609 
610  new->spline = spline;
611  new->tmin = tmin;
612  new->tmax = tmax;
613 
614  s = &spline->splines[1];
615  if (( dydtmin = (3*s->a*tmin + 2*s->b)*tmin + s->c )<0 ) dydtmin = -dydtmin;
616  if (( dydtmax = (3*s->a*tmax + 2*s->b)*tmax + s->c )<0 ) dydtmax = -dydtmax;
617  s = &spline->splines[0];
618  if (( dxdtmin = (3*s->a*tmin + 2*s->b)*tmin + s->c )<0 ) dxdtmin = -dxdtmin;
619  if (( dxdtmax = (3*s->a*tmax + 2*s->b)*tmax + s->c )<0 ) dxdtmax = -dxdtmax;
620 
621  /*s = &spline->splines[0];*/
622  min = ((s->a * tmin + s->b)* tmin + s->c)* tmin + s->d;
623  max = ((s->a * tmax + s->b)* tmax + s->c)* tmax + s->d;
624  if ( tmax==1 ) max = spline->to->me.x; /* beware rounding errors */
625  if ( !el->leavetiny && floor(min)==floor(max) ) { /* If it doesn't cross a pixel boundary then it might as well be vertical */
626  if ( tmin==0 ) max = min;
627  else if ( tmax==1 ) min = max;
628  else max = min;
629  }
630  if ( min==max )
631  new->vert = true;
632  else if ( min<max )
633  new->hup = true;
634  else {
635  temp = min; min = max; max=temp;
636  }
637  if ( !el->leavetiny && min+1>max ) new->almostvert = true;
638  if ( 40*dxdtmin<dydtmin ) new->vertattmin = true;
639  if ( 40*dxdtmax<dydtmax ) new->vertattmax = true;
640  /*if ( new->vertattmin && new->vertattmax && s->a==0 && s->b==0 ) new->almostvert = true;*/
641  new->coordmin[0] = min; new->coordmax[0] = max;
642  if ( el->coordmin[0]>min )
643  el->coordmin[0] = min;
644  if ( el->coordmax[0]<max )
645  el->coordmax[0] = max;
646 
647  s = &spline->splines[1];
648  min = ((s->a * tmin + s->b)* tmin + s->c)* tmin + s->d;
649  max = ((s->a * tmax + s->b)* tmax + s->c)* tmax + s->d;
650  if ( tmax==1 ) max = spline->to->me.y;
651  if ( !el->leavetiny && floor(min)==floor(max) ) { /* If it doesn't cross a pixel boundary then it might as well be horizontal */
652  if ( tmin==0 ) max = min;
653  else if ( tmax==1 ) min = max;
654  else max = min;
655  }
656  if ( min==max )
657  new->hor = true;
658  else if ( min<max )
659  new->vup = true;
660  else {
661  temp = min; min = max; max=temp;
662  }
663  if ( !el->leavetiny && min+1>max ) new->almosthor = true;
664  if ( 40*dydtmin<dxdtmin ) new->horattmin = true;
665  if ( 40*dydtmax<dxdtmax ) new->horattmax = true;
666  /*if ( new->horattmin && new->horattmax && s->a==0 && s->b==0 ) new->almosthor = true;*/
667  new->coordmin[1] = min; new->coordmax[1] = max;
668  if ( el->coordmin[1]>min )
669  el->coordmin[1] = min;
670  if ( el->coordmax[1]<max )
671  el->coordmax[1] = max;
672 
673  if ( new->hor && new->vert ) {
674  /* This spline is too small for us to notice */
675  free(new);
676 return( false );
677  } else {
678  new->next = el->edges;
679  el->edges = new;
680 
681  if ( el->splinelast!=NULL )
682  el->splinelast->splinenext = new;
683  el->splinelast = new;
684  if ( el->splinefirst==NULL )
685  el->splinefirst = new;
686 
687 return( true );
688  }
689 }
690 
691 static void EIAddSpline(Spline *spline, EIList *el) {
692  extended ts[6], temp;
693  int i, j, base, last;
694 
695  ts[0] = 0; ts[5] = 1.0;
696  SplineFindExtrema(&spline->splines[0],&ts[1],&ts[2]);
697  SplineFindExtrema(&spline->splines[1],&ts[3],&ts[4]);
698  /* avoid teeny tiny segments, they just confuse us */
699  SplineRemoveExtremaTooClose(&spline->splines[0],&ts[1],&ts[2]);
700  SplineRemoveExtremaTooClose(&spline->splines[1],&ts[3],&ts[4]);
701  for ( i=0; i<4; ++i ) for ( j=i+1; j<5; ++j ) {
702  if ( ts[i]>ts[j] ) {
703  temp = ts[i];
704  ts[i] = ts[j];
705  ts[j] = temp;
706  }
707  }
708  for ( base=0; ts[base]==-1; ++base);
709  for ( i=5; i>base ; --i ) {
710  if ( ts[i]==ts[i-1] ) {
711  for ( j=i-1; j>base; --j )
712  ts[j] = ts[j-1];
713  ts[j] = -1;
714  ++base;
715  }
716  }
717  last = base;
718  for ( i=base; i<5 ; ++i )
719  if ( EIAddEdge(spline,ts[last],ts[i+1],el) )
720  last = i+1;
721 }
722 
724  Spline *spline, *first;
725  SplineSet *spl;
726 
727  el->sc = sc;
728  if ( sc->layers[el->layer].splines==NULL )
729 return;
730 
731  el->coordmin[0] = el->coordmax[0] = sc->layers[el->layer].splines->first->me.x;
732  el->coordmin[1] = el->coordmax[1] = sc->layers[el->layer].splines->first->me.y;
733 
734  for ( spl = sc->layers[el->layer].splines; spl!=NULL; spl = spl->next ) if ( spl->first->prev!=NULL && spl->first->prev->from!=spl->first ) {
735  first = NULL;
736  for ( spline = spl->first->next; spline!=NULL && spline!=first; spline=spline->to->next ) {
737  EIAddSpline(spline,el);
738  if ( first==NULL ) first = spline;
739  }
740  if ( el->splinefirst!=NULL && spl->first->prev!=NULL )
741  el->splinelast->splinenext = el->splinefirst;
742  el->splinelast = NULL; el->splinefirst = NULL;
743  }
744 }
745 
746 static int IsBiggerSlope(EI *test, EI *base, int major) {
747  int other = !major;
748  real tdo, tdm, bdo, bdm, t;
749 
750  if (( major && test->vup ) || (!major && test->hup))
751  t = test->tmin;
752  else
753  t = test->tmax;
754  tdm = (3*test->spline->splines[major].a*t + 2*test->spline->splines[major].b)*t + test->spline->splines[major].c;
755  tdo = (3*test->spline->splines[other].a*t + 2*test->spline->splines[other].b)*t + test->spline->splines[other].c;
756 
757  if (( major && base->vup ) || (!major && base->hup))
758  t = base->tmin;
759  else
760  t = base->tmax;
761  bdm = (3*base->spline->splines[major].a*t + 2*base->spline->splines[major].b)*t + base->spline->splines[major].c;
762  bdo = (3*base->spline->splines[other].a*t + 2*base->spline->splines[other].b)*t + base->spline->splines[other].c;
763 
764  if ( tdm==0 && bdm==0 )
765 return( tdo > bdo );
766  if ( tdo==0 )
767 return( tdo>0 );
768  else if ( bdo==0 )
769 return( bdo>0 );
770 
771 return( tdo/tdm > bdo/bdm );
772 }
773 
774 void ELOrder(EIList *el, int major ) {
775  int other = !major;
776  int pos;
777  EI *ei, *prev, *test;
778 
779  el->low = floor(el->coordmin[major]); el->high = ceil(el->coordmax[major]);
780  el->cnt = el->high-el->low+1;
781  el->ordered = calloc(el->cnt,sizeof(EI *));
782  el->ends = calloc(el->cnt,1);
783 
784  for ( ei = el->edges; ei!=NULL ; ei=ei->next ) {
785  pos = ceil(ei->coordmax[major])-el->low;
786  el->ends[pos] = true;
787  pos = floor(ei->coordmin[major])-el->low;
788  ei->ocur = (ei->hup == ei->vup)?ei->coordmin[other]:ei->coordmax[other];
789  ei->tcur = ((major && ei->vup) || (!major && ei->hup)) ?
790  ei->tmin: ei->tmax;
791  if ( major ) {
792  ei->up = ei->vup;
793  ei->hv = (ei->vert || ei->almostvert);
794  ei->hvbottom = ei->vup ? ei->vertattmin : ei->vertattmax;
795  ei->hvtop =!ei->vup ? ei->vertattmin : ei->vertattmax;
796  if ( ei->hor || ei->almosthor)
797  continue;
798  } else {
799  ei->up = ei->hup;
800  ei->hv = (ei->hor || ei->almosthor);
801  ei->hvbottom = ei->hup ? ei->horattmin : ei->horattmax;
802  ei->hvtop =!ei->hup ? ei->horattmin : ei->horattmax;
803  if ( ei->vert || ei->almostvert)
804  continue;
805  }
806  if ( el->ordered[pos]==NULL || ei->ocur<el->ordered[pos]->ocur ) {
807  ei->ordered = el->ordered[pos];
808  el->ordered[pos] = ei;
809  } else {
810  for ( prev=el->ordered[pos], test = prev->ordered; test!=NULL;
811  prev = test, test = test->ordered ) {
812  if ( test->ocur>ei->ocur ||
813  (test->ocur==ei->ocur && IsBiggerSlope(test,ei,major)))
814  break;
815  }
816  ei->ordered = test;
817  prev->ordered = ei;
818  }
819  }
820 }
821 
823  HintInstance *n, *first = NULL, *last = NULL;
824 
825  while ( into!=NULL && hi!=NULL ) {
826  if ( into->begin<hi->begin ) {
827  n = into;
828  into = into->next;
829  } else {
830  n = hi;
831  hi = hi->next;
832  }
833  if ( first==NULL )
834  first = n;
835  else
836  last->next = n;
837  last = n;
838  }
839  if ( into!=NULL ) {
840  if ( first==NULL )
841  first = into;
842  else
843  last->next = into;
844  } else if ( hi!=NULL ) {
845  if ( first==NULL )
846  first = hi;
847  else
848  last->next = hi;
849  }
850 return( first );
851 }
852 
853 real EITOfNextMajor(EI *e, EIList *el, real sought_m ) {
854  /* We want to find t so that Mspline(t) = sought_m */
855  /* the curve is monotonic */
856  Spline1D *msp = &e->spline->splines[el->major];
857  real new_t;
858  real found_m;
859  real t_mmax, t_mmin;
860 
861  if ( msp->a==0 && msp->b==0 ) {
862  if ( msp->c == 0 ) {
863  IError("Hor/Vert line when not expected");
864 return( 0 );
865  }
866  new_t = (sought_m-msp->d)/(msp->c);
867 return( new_t );
868  }
869 
870  t_mmax = e->up?e->tmax:e->tmin;
871  t_mmin = e->up?e->tmin:e->tmax;
872  /* sought_m += el->low; */
873 
874  while ( 1 ) {
875  new_t = (t_mmin+t_mmax)/2;
876  found_m = ( ((msp->a*new_t+msp->b)*new_t+msp->c)*new_t + msp->d );
877  if ( found_m>sought_m-.001 && found_m<sought_m+.001 )
878 return( new_t );
879  if ( found_m > sought_m ) {
880  t_mmax = new_t;
881  } else {
882  t_mmin = new_t;
883  }
884  if ( t_mmax==t_mmin ) {
885  IError("EITOfNextMajor failed! on %s", el->sc!=NULL?el->sc->name:"Unknown" );
886 return( new_t );
887  }
888  }
889 }
890 
891 EI *EIActiveListReorder(EI *active,int *change) {
892  int any;
893  EI *pr, *apt;
894 
895  *change = false;
896  if ( active!=NULL ) {
897  any = true;
898  while ( any ) {
899  any = false;
900  for ( pr=NULL, apt=active; apt->aenext!=NULL; ) {
901  if ( apt->ocur <= apt->aenext->ocur ) {
902  /* still ordered */;
903  pr = apt;
904  apt = apt->aenext;
905  } else if ( pr==NULL ) {
906  active = apt->aenext;
907  apt->aenext = apt->aenext->aenext;
908  active->aenext = apt;
909  *change = true;
910  /* don't need to set any, since this reorder can't disorder the list */
911  pr = active;
912  } else {
913  pr->aenext = apt->aenext;
914  apt->aenext = apt->aenext->aenext;
915  pr->aenext->aenext = apt;
916  any = *change = true;
917  pr = pr->aenext;
918  }
919  }
920  }
921  }
922 return( active );
923 }
924 
925 EI *EIActiveEdgesRefigure(EIList *el, EI *active,real i,int major, int *_change) {
926  EI *apt, *pr, *npt;
927  int change = false, subchange;
928  int other = !major;
929 
930  /* first remove any entry which doesn't intersect the new scan line */
931  /* (ie. stopped on last line) */
932  for ( pr=NULL, apt=active; apt!=NULL; apt = apt->aenext ) {
933  if ( apt->coordmax[major]<i+el->low ) {
934  if ( pr==NULL )
935  active = apt->aenext;
936  else
937  pr->aenext = apt->aenext;
938  change = true;
939  } else
940  pr = apt;
941  }
942  /* then move the active list to the next line */
943  for ( apt=active; apt!=NULL; apt = apt->aenext ) {
944  Spline1D *osp = &apt->spline->splines[other];
945  apt->tcur = EITOfNextMajor(apt,el,i+el->low);
946  apt->ocur = ( ((osp->a*apt->tcur+osp->b)*apt->tcur+osp->c)*apt->tcur + osp->d );
947  }
948  /* reorder list */
949  active = EIActiveListReorder(active,&subchange);
950  if ( subchange ) change = true;
951 
952  /* Insert new nodes */
953  if ( el->ordered[(int) i]!=NULL ) change = true;
954  for ( pr=NULL, apt=active, npt=el->ordered[(int) i]; apt!=NULL && npt!=NULL; ) {
955  if ( npt->ocur<apt->ocur ) {
956  npt->aenext = apt;
957  if ( pr==NULL )
958  active = npt;
959  else
960  pr->aenext = npt;
961  pr = npt;
962  npt = npt->ordered;
963  } else {
964  pr = apt;
965  apt = apt->aenext;
966  }
967  }
968  while ( npt!=NULL ) {
969  npt->aenext = NULL;
970  if ( pr==NULL )
971  active = npt;
972  else
973  pr->aenext = npt;
974  pr = npt;
975  npt = npt->ordered;
976  }
977  *_change = change;
978 return( active );
979 }
980 
981 /* Should I consider e and n to be a continuation of the same spline? */
982 /* If we are at an intersection (and it's the same intersection on both) */
983 /* and they go in vaguely the same direction then we should */
984 /* Ah, but also if they are at different intersections and are connected */
985 /* by a series of horizontal/vertical lines (whichever are invisible to major)*/
986 /* then we still should. */
987 int EISameLine(EI *e, EI *n, real i, int major) {
988  EI *t;
989 
990  if ( n!=NULL && /*n->up==e->up &&*/
991  (ceil(e->coordmin[major])==i || floor(e->coordmin[major])==i || floor(e->coordmax[major])==i || ceil(e->coordmax[major])==i) &&
992  (ceil(n->coordmin[major])==i || floor(n->coordmin[major])==i || floor(n->coordmax[major])==i || ceil(n->coordmax[major])==i) ) {
993  if (
994  (n==e->splinenext && n->tmin==e->tmax &&
995  n->tcur<n->tmin+.2 && e->tcur>e->tmax-.2 ) ||
996  (n->splinenext==e && n->tmax==e->tmin &&
997  n->tcur>n->tmax-.2 && e->tcur<e->tmin+.2 ) )
998 return( true );
999  /* can be separated by a horizontal/vertical line in the other direction */
1000  if ( n->tmax==1 && e->tmin==0 && n->tcur>.8 && e->tcur<.2) {
1001  t = n;
1002  while ( (t = t->splinenext)!=e ) {
1003  if ( t==NULL || t==n ||
1004  (major && !t->hor) || ( !major && !t->vert ))
1005 return( false );
1006  }
1007 return( n->up==e->up );
1008  } else if ( n->tmin==0 && e->tmax==1 && n->tcur<.2 && e->tcur>.8) {
1009  t = e;
1010  while ( (t = t->splinenext)!=n ) {
1011  if ( t==NULL || t==e ||
1012  (major && !t->hor) || ( !major && !t->vert ))
1013 return( false );
1014  }
1015 return( n->up==e->up );
1016  }
1017  }
1018 return( false );
1019 }
1020 
1022  EI *n = e->aenext, *t;
1023 
1024  if ( n==NULL )
1025 return( false );
1026  if (
1027  (ceil(e->coordmin[major])==i || floor(e->coordmin[major])==i || floor(e->coordmax[major])==i || ceil(e->coordmax[major])==i) &&
1028  (ceil(n->coordmin[major])==i || floor(n->coordmin[major])==i || floor(n->coordmax[major])==i || ceil(n->coordmax[major])==i) ) {
1029  if (
1030  (n==e->splinenext && n->tmin==e->tmax &&
1031  n->tcur<n->tmin+.2 && e->tcur>e->tmax-.2 ) ||
1032  (n->splinenext==e && n->tmax==e->tmin &&
1033  n->tcur>n->tmax-.2 && e->tcur<e->tmin+.2 ) )
1034 return( n->up!=e->up );
1035  /* can be separated by a horizontal/vertical line in the other direction */
1036  if ( n->tmax==1 && e->tmin==0 && n->tcur>.8 && e->tcur<.2) {
1037  t = n;
1038  while ( (t = t->splinenext)!=e ) {
1039  if ( t==NULL || t==n ||
1040  (major && !t->hor) || ( !major && !t->vert ))
1041 return( false );
1042  }
1043 return( n->up!=e->up );
1044  } else if ( n->tmin==0 && e->tmax==1 && n->tcur<.2 && e->tcur>.8) {
1045  t = e;
1046  while ( (t = t->splinenext)!=n ) {
1047  if ( t==NULL || t==e ||
1048  (major && !t->hor) || ( !major && !t->vert ))
1049 return( false );
1050  }
1051 return( n->up!=e->up );
1052  }
1053  }
1054 return( false );
1055 }
1056 
1058  StemInfo *s, *t, *sn;
1059  const real BlueShift = 7;
1060  /* Suppose we have something that is a flex candidate */
1061  /* We might get two hints from it... one from the two end points */
1062  /* and one from the internal point */
1063 
1064  if ( stems==NULL )
1065 return( NULL );
1066 
1067  for ( s=stems; (sn = s->next)!=NULL; s = sn ) {
1068  if ( s->start+BlueShift > sn->start && s->width>0 && sn->width>0 &&
1069  s->start+s->width-BlueShift < sn->start+sn->width &&
1070  s->start+s->width+BlueShift > sn->start+sn->width &&
1071  s->where != NULL && sn->where != NULL &&
1072  s->where->next!=NULL && sn->where->next==NULL ) {
1073  t = sn->next;
1074  sn->next = NULL;
1075  StemInfoFree(sn);
1076  s->next = t;
1077  sn = t;
1078  if ( t==NULL )
1079  break;
1080  }
1081  }
1082 return( stems );
1083 }
1084 
1086  HintInstance *hi;
1087  real len = 0;
1088 
1089  for ( hi=stems->where; hi!=NULL; hi = hi->next )
1090  len += hi->end-hi->begin;
1091 return( len );
1092 }
1093 
1095  HintInstance *hi;
1096  real len = 0;
1097  real s, e;
1098 
1099  for ( ; mhi!=NULL; mhi = mhi->next ) {
1100  for ( hi = thi; hi!=NULL && hi->begin<=mhi->end; hi = hi->next ) {
1101  if ( hi->end<mhi->begin ) {
1102  thi = hi;
1103  continue;
1104  }
1105  s = hi->begin<mhi->begin?mhi->begin:hi->begin;
1106  e = hi->end>mhi->end?mhi->end:hi->end;
1107  if ( e<s )
1108  continue; /* Shouldn't happen */
1109  len += e-s;
1110  }
1111  }
1112 return( len );
1113 }
1114 
1116  StemInfo *s;
1117  int any= false;
1118  double end;
1119 
1120  for ( s=stems; s!=NULL ; s=s->next )
1121  s->hasconflicts = false;
1122  while ( stems!=NULL ) {
1123  end = stems->width<0 ? stems->start : stems->start+stems->width;
1124  for ( s=stems->next; s!=NULL && (s->width>0 ? s->start : s->start+s->width)<=end; s=s->next ) {
1125  stems->hasconflicts = true;
1126  s->hasconflicts = true;
1127  any = true;
1128  }
1129  stems = stems->next;
1130  }
1131 return( any );
1132 }
1133 
1135  HintInstance *first=NULL, *last, *cur, *p;
1136 
1137  while ( hi!=NULL ) {
1138  cur = chunkalloc(sizeof(HintInstance));
1139  if ( mul>0 ) {
1140  cur->begin = hi->begin*mul+offset;
1141  cur->end = hi->end*mul+offset;
1142  if ( first==NULL )
1143  first = cur;
1144  else
1145  last->next = cur;
1146  last = cur;
1147  } else {
1148  cur->begin = hi->end*mul+offset;
1149  cur->end = hi->begin*mul+offset;
1150  if ( first==NULL || cur->begin<first->begin ) {
1151  cur->next = first;
1152  first = cur;
1153  } else {
1154  for ( p=first, last=p->next; last!=NULL && cur->begin>last->begin; last=last->next );
1155  p->next = cur;
1156  cur->next = last;
1157  }
1158  }
1159  hi = hi->next;
1160  }
1161 return( first );
1162 }
1163 
1165  int i;
1166  HintInstance *head = NULL, *cur, *t;
1167  double mino, maxo;
1168  double dir = ((real *) &stem->unit.x)[major]<0 ? -1 : 1;
1169 
1170  for ( i=0; i<stem->activecnt; ++i ) {
1171  mino = dir*stem->active[i].start + ((real *) &stem->left.x)[major];
1172  maxo = dir*stem->active[i].end + ((real *) &stem->left.x)[major];
1173  cur = chunkalloc(sizeof(HintInstance));
1174  if ( dir>0 ) {
1175  cur->begin = mino;
1176  cur->end = maxo;
1177  if ( head==NULL )
1178  head = cur;
1179  else
1180  t->next = cur;
1181  t = cur;
1182  } else {
1183  cur->begin = maxo;
1184  cur->end = mino;
1185  cur->next = head;
1186  head = cur;
1187  }
1188  }
1189 return( head );
1190 }
1191 
1193  int i;
1194  HintInstance *head = NULL, *cur, *t;
1195 
1196  for ( i=0; i<stem->activecnt; ++i ) {
1197  cur = chunkalloc( sizeof( HintInstance ));
1198  cur->begin = stem->active[i].start;
1199  cur->end = stem->active[i].end;
1200  if ( head == NULL )
1201  head = cur;
1202  else
1203  t->next = cur;
1204  t = cur;
1205  }
1206 return( head );
1207 }
1208 
1210  int hvforce,int dforce ) {
1211 
1212  struct glyphdata *gd;
1213  struct stemdata *sd;
1214  int i, cnt=0, hneeds_gd=false, vneeds_gd=false, dneeds_gd=false;
1215  StemInfo *test;
1216  DStemInfo *dtest;
1217  double em_size = ( sc->parent != NULL ) ?
1218  sc->parent->ascent + sc->parent->descent : 1000;
1219 
1220  if ( hstem == NULL && vstem == NULL && dstem == NULL )
1221 return;
1222  /* If all stems already have active zones assigned (actual for .sfd */
1223  /* files), then there is no need to wast time generating glyph data for */
1224  /* this glyph */
1225  test = hstem;
1226  while ( !hneeds_gd && test != NULL ) {
1227  if ( test->where == NULL || hvforce ) hneeds_gd = true;
1228  test = test->next;
1229  }
1230  test = vstem;
1231  while ( !vneeds_gd && test != NULL ) {
1232  if ( test->where == NULL || hvforce ) vneeds_gd = true;
1233  test = test->next;
1234  }
1235  dtest = dstem;
1236  while ( !dneeds_gd && dtest != NULL ) {
1237  if ( dtest->where == NULL || dforce ) dneeds_gd = true;
1238  dtest = dtest->next;
1239  }
1240  if ( !hneeds_gd && !vneeds_gd && !dneeds_gd )
1241 return;
1242 
1243  gd = GlyphDataInit( sc,layer,em_size,!dneeds_gd );
1244  if ( gd == NULL )
1245 return;
1246 
1247  cnt = 0;
1248  if ( hstem != NULL && hneeds_gd ) {
1249  gd = StemInfoToStemData( gd,hstem,false );
1250  for ( i=cnt; i<gd->stemcnt; i++ ) {
1251  sd = &gd->stems[i];
1252  if ( hstem == NULL )
1253  break;
1254  if ( hstem->where == NULL || hvforce )
1255  hstem->where = StemAddHIFromActive( sd,false );
1256  hstem = hstem->next;
1257  }
1258  }
1259  cnt = gd->stemcnt;
1260  if ( vstem != NULL && vneeds_gd ) {
1261  gd = StemInfoToStemData( gd,vstem,true );
1262  for ( i=cnt; i<gd->stemcnt; i++ ) {
1263  sd = &gd->stems[i];
1264  if ( vstem == NULL )
1265  break;
1266  if ( vstem->where == NULL || hvforce )
1267  vstem->where = StemAddHIFromActive( sd,true );
1268  vstem = vstem->next;
1269  }
1270  }
1271  cnt = gd->stemcnt;
1272  if ( dstem != NULL && dneeds_gd ) {
1273  gd = DStemInfoToStemData( gd,dstem );
1274  for ( i=cnt; i<gd->stemcnt; i++ ) {
1275  sd = &gd->stems[i];
1276  if ( dstem == NULL )
1277  break;
1278  dstem->left = sd->left; dstem->right = sd->right;
1279  if ( dstem->where == NULL || dforce )
1280  dstem->where = DStemAddHIFromActive( sd );
1281  dstem = dstem->next;
1282  }
1283  }
1284  GlyphDataFree( gd );
1285 return;
1286 }
1287 
1288 /* We have got (either from a file or user specified) a diagonal stem,
1289  described by 4 base points (pairs of x and y coordinates). Some additional
1290  tests are required before we can add this stem to the given glyph. */
1292  DStemInfo *dn, *cur, *prev, *next, *temp;
1293  double dot, loff, roff, soff, dist_error_diag ;
1294  double ibegin, iend;
1295  int overlap;
1296  BasePoint *base, *nbase, *pbase;
1297  HintInstance *hi;
1298 
1299  if ( *ds == NULL ) {
1300  *ds = test;
1301 return( true );
1302  }
1303  dist_error_diag = ( sf->ascent + sf->descent ) * 0.0065;
1304 
1305  cur = prev = NULL;
1306  for ( dn=*ds ; dn!=NULL ; dn=dn->next ) {
1307  prev = cur; cur = dn;
1308 
1309  /* Compare the given stem with each of the existing diagonal stem
1310  * hints. First ensure that it is not an exact duplicate of an already
1311  * added stem. Then test if unit vectors are parallel and edges colinear.
1312  * In this case we should either preserve the existing stem or replace
1313  * it with the new one, but not keep them both */
1314  if (test->unit.x == dn->unit.x && test->unit.y == dn->unit.y &&
1315  test->left.x == dn->left.x && test->left.y == dn->left.y &&
1316  test->right.x == dn->right.x && test->right.y == dn->right.y ) {
1317  DStemInfoFree( test );
1318 return( false );
1319  }
1320  dot = ( test->unit.x * dn->unit.y ) -
1321  ( test->unit.y * dn->unit.x );
1322  if ( dot <= -0.5 || dot >= 0.5 )
1323  continue;
1324 
1325  loff = ( test->left.x - dn->left.x ) * dn->unit.y -
1326  ( test->left.y - dn->left.y ) * dn->unit.x;
1327  roff = ( test->right.x - dn->right.x ) * dn->unit.y -
1328  ( test->right.y - dn->right.y ) * dn->unit.x;
1329  if (loff <= -dist_error_diag || loff >= dist_error_diag ||
1330  roff <= -dist_error_diag || roff >= dist_error_diag )
1331  continue;
1332  soff = ( test->left.x - dn->left.x ) * dn->unit.x +
1333  ( test->left.y - dn->left.y ) * dn->unit.y;
1334  overlap = false;
1335  if ( dn->where != NULL && test->where != NULL && test->where->next == NULL ) {
1336  ibegin = test->where->begin + soff;
1337  iend = test->where->end + soff;
1338  for ( hi = dn->where; hi != NULL; hi = hi->next ) {
1339  if (( hi->begin <= ibegin && ibegin <= hi->end ) ||
1340  ( hi->begin <= iend && iend <= hi->end ) ||
1341  ( ibegin <= hi->begin && hi->end <= iend )) {
1342  overlap = true;
1343  break;
1344  }
1345  }
1346  } else
1347  overlap = true;
1348  /* It's probably a colinear dstem, as in older SFD files. Treat */
1349  /* it as one more instance for the already added stem */
1350  if ( !overlap ) {
1351  for ( hi=dn->where; hi->next != NULL; hi = hi->next ) ;
1352  hi->next = chunkalloc( sizeof( HintInstance ));
1353  hi->next->begin = ibegin; hi->next->end = iend;
1354  DStemInfoFree( test );
1355 return( false );
1356  /* The found stem is close but not identical to the stem we */
1357  /* are going to add. So just replace the older stem with the */
1358  /* new one */
1359  } else {
1360  test->next = dn->next;
1361  if ( prev == NULL )
1362  *ds = test;
1363  else
1364  prev->next = test;
1365  DStemInfoFree( dn );
1366 return( true );
1367  }
1368  }
1369 
1370  /* Insert the given stem to the list by such a way that diagonal
1371  * stems are ordered by the X coordinate of the left edge key point, and
1372  * by Y if X is the same. The order is arbitrary, but may be essential for
1373  * things like "W". So we should be sure that the autoinstructor will
1374  * process diagonals from left to right. */
1375  base = ( test->unit.y < 0 ) ? &test->right : &test->left;
1376  nbase = ( (*ds)->unit.y < 0 ) ? &(*ds)->right : &(*ds)->left;
1377 
1378  if ( base->x < nbase->x || ( base->x == nbase->x && base->y >= nbase->y )) {
1379  temp = *ds; *ds = test;
1380  (*ds)->next = temp;
1381  } else {
1382  for ( dn=*ds ; dn!=NULL && dn!=test ; dn=dn->next ) {
1383  next = dn->next;
1384  pbase = ( dn->unit.y < 0 ) ? &dn->right : &dn->left;
1385  if ( next != NULL )
1386  nbase = ( next->unit.y < 0 ) ? &next->right : &next->left;
1387 
1388  if (( pbase->x < base->x ||
1389  ( pbase->x == base->x && pbase->y >= base->y )) &&
1390  ( next == NULL || base->x < nbase->x ||
1391  ( base->x == nbase->x && base->y >= nbase->y ))) {
1392 
1393  test->next = next; dn->next = test;
1394  break;
1395  }
1396 
1397  }
1398  }
1399 return( true );
1400 }
1401 
1403  real omul, real oofset) {
1404  StemInfo *prev, *h, *n;
1405  real start, width;
1406 
1407  for ( ; rh!=NULL; rh=rh->next ) {
1408  start = rh->start*mul + offset;
1409  width = rh->width *mul;
1410  if ( width<0 ) {
1411  start += width; width = -width;
1412  }
1413  for ( h=into, prev=NULL; h!=NULL && (start>h->start || (start==h->start && width>h->width)); prev=h, h=h->next );
1414  if ( h==NULL || start!=h->start || width!=h->width ) {
1415  n = chunkalloc(sizeof(StemInfo));
1416  n->start = start; n->width = width;
1417  n->ghost = rh->ghost;
1418  n->next = h;
1419  if ( prev==NULL )
1420  into = n;
1421  else
1422  prev->next = n;
1423  n->where = HICopyTrans(rh->where,omul,oofset);
1424  } else
1425  h->where = HIMerge(h->where,HICopyTrans(rh->where,omul,oofset));
1426  }
1427 return( into );
1428 }
1429 
1431  real xmul,real xoffset,real ymul,real yoffset ) {
1432  DStemInfo *new;
1433  double dmul;
1434 
1435  for ( ; rh!=NULL; rh=rh->next ) {
1436  new = chunkalloc( sizeof( DStemInfo ));
1437  *new = *rh;
1438  new->left.x = xmul*new->left.x + xoffset;
1439  new->right.x = xmul*new->right.x + xoffset;
1440  new->left.y = ymul*new->left.y + yoffset;
1441  new->right.y = ymul*new->right.y + yoffset;
1442  new->next = NULL;
1443  if (( xmul < 0 && ymul > 0 ) || ( xmul > 0 && ymul < 0 ))
1444  new->unit.y = -new->unit.y;
1445  new->unit.x *= fabs( xmul ); new->unit.y *= fabs( ymul );
1446  dmul = sqrt( pow( new->unit.x,2 ) + pow( new->unit.y,2 ));
1447  new->unit.x /= dmul; new->unit.y /= dmul;
1448  if ( xmul < 0 ) dmul = -dmul;
1449  new->where = HICopyTrans( rh->where,dmul,0 );
1450 
1451  MergeDStemInfo( sf,&into,new );
1452  }
1453 return( into );
1454 }
1455 
1456 static void __SplineCharAutoHint( SplineChar *sc, int layer, BlueData *bd, int gen_undoes );
1457 
1458 static void AutoHintRefs(SplineChar *sc,int layer, BlueData *bd, int picky, int gen_undoes) {
1459  RefChar *ref;
1460 
1461  /* Add hints for base characters before accent hints => if there are any */
1462  /* conflicts, the base characters win */
1463  for ( ref=sc->layers[layer].refs; ref!=NULL; ref=ref->next ) {
1464  if ( ref->transform[1]==0 && ref->transform[2]==0 ) {
1465  if ( picky ) {
1466  if ( !ref->sc->manualhints && ref->sc->changedsincelasthinted &&
1467  (ref->sc->layers[layer].refs!=NULL &&
1468  ref->sc->layers[layer].splines==NULL))
1469  AutoHintRefs(ref->sc,layer,bd,true,gen_undoes);
1470  } else if ( !ref->sc->manualhints && ref->sc->changedsincelasthinted )
1471  __SplineCharAutoHint(ref->sc,layer,bd,gen_undoes);
1472  if ( ref->sc->unicodeenc!=-1 && ref->sc->unicodeenc<0x10000 &&
1473  isalnum(ref->sc->unicodeenc) ) {
1474  sc->hstem = RefHintsMerge(sc->hstem,ref->sc->hstem,ref->transform[3], ref->transform[5], ref->transform[0], ref->transform[4]);
1475  sc->vstem = RefHintsMerge(sc->vstem,ref->sc->vstem,ref->transform[0], ref->transform[4], ref->transform[3], ref->transform[5]);
1476  sc->dstem = RefDHintsMerge(sc->parent,sc->dstem,ref->sc->dstem,ref->transform[0], ref->transform[4], ref->transform[3], ref->transform[5]);
1477  }
1478  }
1479  }
1480 
1481  for ( ref=sc->layers[layer].refs; ref!=NULL; ref=ref->next ) {
1482  if ( ref->transform[1]==0 && ref->transform[2]==0 &&
1483  (ref->sc->unicodeenc==-1 || ref->sc->unicodeenc>=0x10000 ||
1484  !isalnum(ref->sc->unicodeenc)) ) {
1485  sc->hstem = RefHintsMerge(sc->hstem,ref->sc->hstem,ref->transform[3], ref->transform[5], ref->transform[0], ref->transform[4]);
1486  sc->vstem = RefHintsMerge(sc->vstem,ref->sc->vstem,ref->transform[0], ref->transform[4], ref->transform[3], ref->transform[5]);
1487  sc->dstem = RefDHintsMerge(sc->parent,sc->dstem,ref->sc->dstem,ref->transform[0], ref->transform[4], ref->transform[3], ref->transform[5]);
1488  }
1489  }
1490 
1491  sc->vconflicts = StemListAnyConflicts(sc->vstem);
1492  sc->hconflicts = StemListAnyConflicts(sc->hstem);
1493 }
1494 
1495 static void _SCClearHintMasks(SplineChar *sc,int layer, int counterstoo) {
1496  SplineSet *spl;
1497  SplinePoint *sp;
1498  RefChar *ref;
1499 
1500  if ( layer<0 || layer>=sc->layer_cnt )
1501  return;
1502 
1503  if ( counterstoo ) {
1504  free(sc->countermasks);
1505  sc->countermasks = NULL; sc->countermask_cnt = 0;
1506  }
1507 
1508  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
1509  for ( sp = spl->first ; ; ) {
1510  chunkfree(sp->hintmask,sizeof(HintMask));
1511  sp->hintmask = NULL;
1512  if ( sp->next==NULL )
1513  break;
1514  sp = sp->next->to;
1515  if ( sp==spl->first )
1516  break;
1517  }
1518  }
1519 
1520  for ( ref = sc->layers[layer].refs; ref!=NULL; ref=ref->next ) {
1521  for ( spl = ref->layers[0].splines; spl!=NULL; spl=spl->next ) {
1522  for ( sp = spl->first ; ; ) {
1523  chunkfree(sp->hintmask,sizeof(HintMask));
1524  sp->hintmask = NULL;
1525  if ( sp->next==NULL )
1526  break;
1527  sp = sp->next->to;
1528  if ( sp==spl->first )
1529  break;
1530  }
1531  }
1532  }
1533 }
1534 
1536  SplineChar *scs[MmMax];
1537  int hadh3, hadv3, i, vbase;
1538  HintMask mask;
1539  StemInfo *h;
1540 
1541  if ( sc->countermask_cnt!=0 )
1542 return;
1543 
1544  scs[0] = sc;
1545  hadh3 = CvtPsStem3(NULL,scs,1,true,false);
1546  hadv3 = CvtPsStem3(NULL,scs,1,false,false);
1547  if ( hadh3 || hadv3 ) {
1548  memset(mask,0,sizeof(mask));
1549  if ( hadh3 ) mask[0] = 0x80|0x40|0x20;
1550  if ( hadv3 ) {
1551  for ( h=sc->hstem, vbase=0; h!=NULL; h=h->next, ++vbase );
1552  for ( i=0; i<3 ; ++i ) {
1553  int j = i+vbase;
1554  mask[j>>3] |= (0x80>>(j&7));
1555  }
1556  }
1557  sc->countermask_cnt = 1;
1558  sc->countermasks = malloc(sizeof(HintMask));
1559  memcpy(sc->countermasks[0],mask,sizeof(HintMask));
1560 return;
1561  }
1562 }
1563 
1564 void SCClearHintMasks(SplineChar *sc,int layer,int counterstoo) {
1565  MMSet *mm = sc->parent->mm;
1566  int i;
1567 
1568  if ( mm==NULL )
1569  _SCClearHintMasks(sc,layer,counterstoo);
1570  else {
1571  for ( i=0; i<mm->instance_count; ++i ) {
1572  if ( sc->orig_pos<mm->instances[i]->glyphcnt )
1573  _SCClearHintMasks(mm->instances[i]->glyphs[sc->orig_pos],layer,counterstoo);
1574  }
1575  if ( sc->orig_pos<mm->normal->glyphcnt )
1576  _SCClearHintMasks(mm->normal->glyphs[sc->orig_pos],layer,counterstoo);
1577  }
1578 }
1579 
1581  StemInfo *possible=NULL;
1582  HintInstance *hi;
1583 
1584  if ( sp==NULL )
1585 return( NULL );
1586 
1587  for ( ; s!=NULL; s=s->next ) {
1588  if ( sp->me.y<s->start )
1589 return( possible );
1590  if ( s->start==sp->me.y || s->start+s->width==sp->me.y ) {
1591  if ( !s->hasconflicts )
1592 return( s );
1593  for ( hi=s->where; hi!=NULL; hi=hi->next ) {
1594  if ( hi->begin<=sp->me.x && hi->end>=sp->me.x )
1595 return( s );
1596  }
1597  if ( !s->used )
1598  possible = s;
1599  }
1600  }
1601 return( possible );
1602 }
1603 
1605  StemInfo *possible=NULL;
1606  HintInstance *hi;
1607 
1608  if ( sp==NULL )
1609 return( NULL );
1610 
1611  for ( ; s!=NULL; s=s->next ) {
1612  if ( sp->me.x<s->start )
1613 return( possible );
1614  if ( s->start==sp->me.x || s->start+s->width==sp->me.x ) {
1615  if ( !s->hasconflicts )
1616 return( s );
1617  for ( hi=s->where; hi!=NULL; hi=hi->next ) {
1618  if ( hi->begin<=sp->me.y && hi->end>=sp->me.y )
1619 return( s );
1620  }
1621  if ( !s->used )
1622  possible = s;
1623  }
1624  }
1625 return( possible );
1626 }
1627 
1628 /* Does h have a conflict with any of the stems in the list which have bits */
1629 /* set in the mask */
1631  while ( stems!=NULL && stems->start<=h->start+h->width ) {
1632  if ( stems->start+stems->width>=h->start && stems!=h ) {
1633  if ( stems->hintnumber!=-1 &&
1634  (mask[stems->hintnumber>>3]&(0x80>>(stems->hintnumber&7))) )
1635 return( true );
1636  }
1637  stems = stems->next;
1638  }
1639 return( false );
1640 }
1641 
1642 /* All instances of a MM set must have the same hint mask at all points */
1643 static void FigureHintMask(SplineChar *scs[MmMax], SplinePoint *to[MmMax], int instance_count,
1644  HintMask mask) {
1645  StemInfo *s;
1646  int i;
1647  SplinePoint *sp;
1648 
1649  memset(mask,'\0',sizeof(HintMask));
1650 
1651  /* Install all hints that are always active */
1652  i=0; {
1653  SplineChar *sc = scs[i];
1654 
1655  if ( sc==NULL )
1656 return;
1657 
1658  for ( s=sc->hstem; s!=NULL; s=s->next )
1659  if ( s->hintnumber!=-1 && !s->hasconflicts )
1660  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1661  for ( s=sc->vstem; s!=NULL; s=s->next )
1662  if ( s->hintnumber!=-1 && !s->hasconflicts )
1663  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1664 
1665  if ( sc->hconflicts ) {
1666  for ( sp=to[i]; sp!=NULL; ) {
1667  s = OnHHint(sp,sc->hstem);
1668  if ( s!=NULL && s->hintnumber!=-1 ) {
1669  if ( ConflictsWithMask(scs[i]->hstem,mask,s))
1670  break;
1671  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1672  }
1673  if ( sp->next==NULL )
1674  break;
1675  sp = sp->next->to;
1676  if ( to[i]==sp )
1677  break;
1678  }
1679  }
1680  if ( sc->vconflicts ) {
1681  for ( sp=to[i]; sp!=NULL; ) {
1682  s = OnVHint(sp,sc->vstem);
1683  if ( s!=NULL && s->hintnumber!=-1 ) {
1684  if ( ConflictsWithMask(scs[i]->vstem,mask,s))
1685  break;
1686  mask[s->hintnumber>>3] |= (0x80>>(s->hintnumber&7));
1687  }
1688  if ( sp->next==NULL )
1689  break;
1690  sp = sp->next->to;
1691  if ( to[i]==sp )
1692  break;
1693  }
1694  }
1695  }
1696  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
1697  chunkfree(to[i]->hintmask,sizeof(HintMask));
1698  to[i]->hintmask = chunkalloc(sizeof(HintMask));
1699  memcpy(to[i]->hintmask,mask,sizeof(HintMask));
1700  }
1701 }
1702 
1703 static int TestHintMask(SplineChar *scs[MmMax], SplinePoint *to[MmMax], int instance_count,
1704  HintMask mask) {
1705  StemInfo *h=NULL, *v=NULL;
1706  int i;
1707 
1708  for ( i=0; i<instance_count; ++i ) {
1709  SplineChar *sc = scs[i];
1710 
1711  if ( sc==NULL || (!sc->hconflicts && !sc->vconflicts ))
1712  continue;
1713 
1714  /* Does this point lie on any hints? */
1715  if ( scs[i]->hconflicts )
1716  h = OnHHint(to[i],sc->hstem);
1717  if ( scs[i]->vconflicts )
1718  v = OnVHint(to[i],sc->vstem);
1719 
1720  /* Need to set this hint */
1721  if ( (h!=NULL && h->hintnumber!=-1 && (mask[h->hintnumber>>3]&(0x80>>(h->hintnumber&7)))==0 ) ||
1722  (v!=NULL && v->hintnumber!=-1 && (mask[v->hintnumber>>3]&(0x80>>(v->hintnumber&7)))==0 ))
1723  break;
1724  }
1725  if ( i==instance_count ) /* All hint masks were ok */
1726 return( false );
1727 
1728  FigureHintMask(scs,to,instance_count,mask);
1729 return( true );
1730 }
1731 
1732 static void UnnumberHints(SplineChar *sc) {
1733  StemInfo *h;
1734 
1735  for ( h=sc->hstem; h!=NULL; h=h->next )
1736  h->hintnumber = -1;
1737  for ( h=sc->vstem; h!=NULL; h=h->next )
1738  h->hintnumber = -1;
1739 }
1740 
1741 static int NumberHints(SplineChar *sc) {
1742  StemInfo *h;
1743  int hcnt=0;
1744 
1745  for ( h=sc->hstem; h!=NULL; h=h->next )
1746  h->hintnumber = hcnt>=HntMax ? -1 : hcnt++;
1747  for ( h=sc->vstem; h!=NULL; h=h->next )
1748  h->hintnumber = hcnt>=HntMax ? -1 : hcnt++;
1749 return( hcnt );
1750 }
1751 
1752 static void UntickHints(SplineChar *sc) {
1753  StemInfo *h;
1754 
1755  for ( h=sc->hstem; h!=NULL; h=h->next )
1756  h->used = false;
1757  for ( h=sc->vstem; h!=NULL; h=h->next )
1758  h->used = false;
1759 }
1760 
1761 struct coords {
1763  struct coords *next;
1764 };
1765 
1766 typedef struct mmh {
1768  struct coords *where;
1769  struct mmh *next;
1771 
1772 static void AddCoord(MMH *mmh,SplinePoint *sps[MmMax],int instance_count, int ish) {
1773  struct coords *coords;
1774  int i;
1775 
1776  coords = chunkalloc(sizeof(struct coords));
1777  coords->next = mmh->where;
1778  mmh->where = coords;
1779  if ( ish )
1780  for ( i=0; i<instance_count; ++i )
1781  coords->coords[i] = sps[i]->me.x;
1782  else
1783  for ( i=0; i<instance_count; ++i )
1784  coords->coords[i] = sps[i]->me.y;
1785 }
1786 
1787 static MMH *AddHintSet(MMH *hints,StemInfo *h[MmMax], int instance_count,
1788  SplinePoint *sps[MmMax], int ish) {
1789  int i, cnt, bestc;
1790  MMH *test, *best;
1791 
1792  for ( i=0; i<instance_count; ++i )
1793  if ( h[i]==NULL )
1794 return( hints );
1795 
1796  best = NULL; bestc = 0;
1797  for ( test=hints; test!=NULL; test=test->next ) {
1798  cnt = 0;
1799  for ( i=0; i<instance_count; ++i )
1800  if ( test->hints[i]==h[i] )
1801  ++cnt;
1802  if ( cnt==instance_count ) {
1803  AddCoord(test,sps,instance_count,ish);
1804 return( hints );
1805  }
1806  if ( cnt>bestc ) {
1807  bestc = cnt;
1808  best = test;
1809  }
1810  }
1811  test = chunkalloc(sizeof(MMH));
1812  test->next = hints;
1813  AddCoord(test,sps,instance_count,ish);
1814  for ( i=0; i<instance_count; ++i )
1815  test->hints[i]=h[i];
1816  if ( bestc!=0 ) {
1817  for ( i=0; i<instance_count; ++i ) {
1818  if ( best->hints[i]==h[i] ) {
1819  h[i]->hasconflicts = true;
1820  test->map[i] = chunkalloc(sizeof(StemInfo));
1821  *test->map[i] = *h[i];
1822  test->map[i]->where = NULL;
1823  test->map[i]->used = true;
1824  h[i]->next = test->map[i];
1825  } else
1826  test->map[i] = h[i];
1827  }
1828  } else {
1829  for ( i=0; i<instance_count; ++i )
1830  test->map[i]=h[i];
1831  }
1832 return( test );
1833 }
1834 
1835 static int CompareMMH(MMH *mmh1,MMH *mmh2, int instance_count) {
1836  int i;
1837 
1838  if ( mmh1->map[0]==NULL )
1839 return( 1 );
1840  if ( mmh2->map[0]==NULL )
1841 return( -1 );
1842 
1843  for ( i=0; i<instance_count; ++i ) {
1844  if ( mmh1->map[i]->start!=mmh2->map[i]->start ) {
1845  if ( mmh1->map[i]->start > mmh2->map[i]->start )
1846 return( 1 );
1847  else
1848 return( -1 );
1849  }
1850  }
1851  for ( i=0; i<instance_count; ++i ) {
1852  if ( mmh1->map[i]->width!=mmh2->map[i]->width ) {
1853  if ( mmh1->map[i]->width > mmh2->map[i]->width )
1854 return( 1 );
1855  else
1856 return( -1 );
1857  }
1858  }
1859 return( 0 );
1860 }
1861 
1862 static MMH *SortMMH(MMH *head,int instance_count) {
1863  MMH *mmh, *p, *smallest, *psmallest, *test, *ptest;
1864 
1865  for ( mmh = head, p=NULL; mmh!=NULL ; ) {
1866  smallest = mmh; psmallest = p;
1867  ptest = mmh; test = mmh->next;
1868  while ( test!=NULL ) {
1869  if ( CompareMMH(test,smallest,instance_count)<0 ) {
1870  smallest = test;
1871  psmallest = ptest;
1872  }
1873  ptest = test;
1874  test = test->next;
1875  }
1876  if ( smallest!=mmh ) {
1877  if ( p==NULL )
1878  head = smallest;
1879  else
1880  p->next = smallest;
1881  if ( mmh->next==smallest ) {
1882  mmh->next = smallest->next;
1883  smallest->next = mmh;
1884  } else {
1885  test = mmh->next;
1886  mmh->next = smallest->next;
1887  smallest->next = test;
1888  psmallest->next = mmh;
1889  }
1890  }
1891  p = smallest;
1892  mmh = smallest->next;
1893  }
1894 return( head );
1895 }
1896 
1897 static int NumberMMH(MMH *mmh,int hstart,int instance_count) {
1898  int i;
1899  HintInstance *hi, *n;
1900  struct coords *coords;
1901 
1902  while ( mmh!=NULL ) {
1903  for ( i=0; i<instance_count; ++i ) {
1904  StemInfo *h = mmh->map[i];
1905  if ( h==NULL )
1906  continue;
1907 
1908  h->hintnumber = hstart;
1909 
1910  for ( hi=h->where; hi!=NULL; hi=n ) {
1911  n = hi->next;
1912  chunkfree(hi,sizeof(HintInstance));
1913  }
1914  h->where = NULL;
1915  for ( coords=mmh->where; coords!=NULL; coords = coords->next ) {
1916  hi = chunkalloc(sizeof(HintInstance));
1917  hi->next = h->where;
1918  h->where = hi;
1919  hi->begin = coords->coords[i]-1;
1920  hi->end = coords->coords[i]+1;
1921  }
1922  }
1923  if ( mmh->map[0]!=NULL ) ++hstart;
1924  mmh = mmh->next;
1925  }
1926 return( hstart );
1927 }
1928 
1929 static void SortMMH2(SplineChar *scs[MmMax],MMH *mmh,int instance_count,int ish) {
1930  int i;
1931  StemInfo *h, *n;
1932  MMH *m;
1933 
1934  for ( i=0; i<instance_count; ++i ) {
1935  for ( h= ish ? scs[i]->hstem : scs[i]->vstem; h!=NULL; h=n ) {
1936  n = h->next;
1937  if ( h->hintnumber==-1 )
1938  StemInfoFree(h);
1939  }
1940  n = NULL;
1941  for ( m = mmh ; m!=NULL; m=m->next ) {
1942  h = m->map[i];
1943  if ( n!=NULL )
1944  n->next = h;
1945  else if ( ish )
1946  scs[i]->hstem = h;
1947  else
1948  scs[i]->vstem = h;
1949  n = h;
1950  }
1951  if ( n!=NULL )
1952  n->next = NULL;
1953  else if ( ish )
1954  scs[i]->hstem = NULL;
1955  else
1956  scs[i]->vstem = NULL;
1957  }
1958 }
1959 
1960 static void MMHFreeList(MMH *mmh) {
1961  MMH *mn;
1962  struct coords *c, *n;
1963 
1964  for ( ; mmh!=NULL; mmh = mn ) {
1965  mn = mmh->next;
1966  for ( c=mmh->where; c!=NULL; c=n ) {
1967  n = c->next;
1968  chunkfree(c,sizeof(struct coords));
1969  }
1970  chunkfree(mmh,sizeof(struct coords));
1971  }
1972 }
1973 
1975  int instance_count, MMH **hs, MMH **vs) {
1976  SplinePoint *to[MmMax];
1977  StemInfo *h[MmMax], *v[MmMax];
1978  int i, anymore;
1979 
1980  for (;;) {
1981  for ( i=0; i<instance_count; ++i ) {
1982  if ( spl[i]!=NULL )
1983  to[i] = spl[i]->first;
1984  else
1985  to[i] = NULL;
1986  }
1987  for (;;) {
1988  for ( i=0; i<instance_count; ++i ) {
1989  h[i] = OnHHint(to[i],scs[i]->hstem);
1990  v[i] = OnVHint(to[i],scs[i]->vstem);
1991  }
1992  *hs = AddHintSet(*hs,h,instance_count,to,true);
1993  *vs = AddHintSet(*vs,v,instance_count,to,false);
1994  anymore = false;
1995  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
1996  if ( to[i]->next==NULL ) to[i] = NULL;
1997  else {
1998  to[i] = to[i]->next->to;
1999  if ( to[i]==spl[i]->first ) to[i] = NULL;
2000  }
2001  if ( to[i]!=NULL ) anymore = true;
2002  }
2003  if ( !anymore )
2004  break;
2005  }
2006  anymore = false;
2007  for ( i=0; i<instance_count; ++i ) {
2008  if ( spl[i]!=NULL )
2009  spl[i] = spl[i]->next;
2010  if ( spl[i]!=NULL ) anymore = true;
2011  }
2012  if ( !anymore )
2013  break;
2014  }
2015 }
2016 
2017 static void ResolveSplitHints(SplineChar *scs[16],int layer,int instance_count) {
2018  /* It is possible for a single hint in one mm instance to split into two */
2019  /* in a different MM set. For example, we have two stems which happen */
2020  /* to line up in one instance but which do not in another instance. */
2021  /* It is even possible that there could be no instance with any conflicts */
2022  /* but some of the intermediate forms might conflict. */
2023  /* We can't deal (nor can postscript) with the case where hints change order*/
2024  SplinePointList *spl[MmMax];
2025  RefChar *ref[MmMax];
2026  int i, hcnt, hmax=0, anymore;
2027  MMH *hs=NULL, *vs=NULL;
2028 
2029  for ( i=0; i<instance_count; ++i ) {
2030  hcnt = NumberHints(scs[i]);
2031  UntickHints(scs[i]);
2032  if ( hcnt>hmax ) hmax = hcnt;
2033  spl[i] = scs[i]->layers[layer].splines;
2034  }
2035  if ( hmax==0 )
2036 return;
2037 
2038  SplResolveSplitHints(scs,spl,instance_count,&hs,&vs);
2039  anymore = false;
2040  for ( i=0; i<instance_count; ++i ) {
2041  ref[i] = scs[i]->layers[layer].refs;
2042  if ( ref[i]!=NULL ) anymore = true;
2043  }
2044  while ( anymore ) {
2045  for ( i=0; i<instance_count; ++i )
2046  spl[i] = ( ref[i]!=NULL ) ? ref[i]->layers[0].splines : NULL;
2047  SplResolveSplitHints(scs,spl,instance_count,&hs,&vs);
2048  anymore = false;
2049  for ( i=0; i<instance_count; ++i ) {
2050  if ( ref[i]!=NULL ) {
2051  ref[i] = ref[i]->next;
2052  if ( ref[i]!=NULL ) anymore = true;
2053  }
2054  }
2055  }
2056 
2057  for ( i=0; i<instance_count; ++i )
2058  UnnumberHints(scs[i]);
2059  hs = SortMMH(hs,instance_count);
2060  vs = SortMMH(vs,instance_count);
2061  hcnt = NumberMMH(hs,0,instance_count);
2062  hcnt = NumberMMH(vs,hcnt,instance_count);
2063  SortMMH2(scs,hs,instance_count,true);
2064  SortMMH2(scs,vs,instance_count,false);
2065  MMHFreeList(hs);
2066  MMHFreeList(vs);
2067 }
2068 
2070  int instance_count, HintMask mask, int inited) {
2071  SplinePoint *to[MmMax];
2072  int i, anymore;
2073 
2074  anymore = false;
2075  for ( i=0; i<instance_count; ++i ) {
2076  if ( spl[i]!=NULL ) {
2077  SplineSetReverse(spl[i]);
2078  to[i] = spl[i]->first;
2079  anymore = true;
2080  } else
2081  to[i] = NULL;
2082  }
2083 
2084  /* Assign the initial hint mask */
2085  if ( anymore && !inited ) {
2086  FigureHintMask(scs,to,instance_count,mask);
2087  inited = true;
2088  }
2089 
2090  for (;;) {
2091  for ( i=0; i<instance_count; ++i ) {
2092  if ( spl[i]!=NULL )
2093  to[i] = spl[i]->first;
2094  else
2095  to[i] = NULL;
2096  }
2097  for (;;) {
2098  TestHintMask(scs,to,instance_count,mask);
2099  anymore = false;
2100  for ( i=0; i<instance_count; ++i ) if ( to[i]!=NULL ) {
2101  if ( to[i]->next==NULL ) to[i] = NULL;
2102  else {
2103  to[i] = to[i]->next->to;
2104  if ( to[i]==spl[i]->first ) to[i] = NULL;
2105  }
2106  if ( to[i]!=NULL ) anymore = true;
2107  }
2108  if ( !anymore )
2109  break;
2110  }
2111  anymore = false;
2112  for ( i=0; i<instance_count; ++i ) {
2113  if ( spl[i]!=NULL ) {
2114  SplineSetReverse(spl[i]);
2115  spl[i] = spl[i]->next;
2116  }
2117  if ( spl[i]!=NULL ) {
2118  anymore = true;
2119  SplineSetReverse(spl[i]);
2120  }
2121  }
2122  if ( !anymore )
2123  break;
2124  }
2125 return( inited );
2126 }
2127 
2129  SplineChar *scs[MmMax];
2130  SplinePointList *spl[MmMax];
2131  RefChar *ref[MmMax];
2132  MMSet *mm = sc->parent->mm;
2133  int i, instance_count, conflicts, anymore, inited;
2134  HintMask mask;
2135 
2136  if ( mm==NULL ) {
2137  scs[0] = sc;
2138  instance_count = 1;
2139  SCClearHintMasks(sc,layer,false);
2140  } else {
2141  if ( mm->apple )
2142 return;
2143  instance_count = mm->instance_count;
2144  for ( i=0; i<instance_count; ++i )
2145  if ( sc->orig_pos < mm->instances[i]->glyphcnt ) {
2146  scs[i] = mm->instances[i]->glyphs[sc->orig_pos];
2147  SCClearHintMasks(scs[i],layer,false);
2148  }
2149  ResolveSplitHints(scs,layer,instance_count);
2150  }
2151  conflicts = false;
2152  for ( i=0; i<instance_count; ++i ) {
2153  NumberHints(scs[i]);
2154  if ( scs[i]->hconflicts || scs[i]->vconflicts )
2155  conflicts = true;
2156  }
2157  if ( !conflicts && instance_count==1 ) { /* All hints always active */
2159 return; /* In an MM font we may still need to resolve things like different numbers of hints */
2160  }
2161 
2162  for ( i=0; i<instance_count; ++i ) {
2163  spl[i] = scs[i]->layers[layer].splines;
2164  ref[i] = scs[i]->layers[layer].refs;
2165  }
2166  inited = SplFigureHintMasks(scs,spl,instance_count,mask,false);
2167  for (;;) {
2168  for ( i=0; i<instance_count; ++i ) {
2169  if ( ref[i]!=NULL )
2170  spl[i] = ref[i]->layers[0].splines;
2171  }
2172  inited = SplFigureHintMasks(scs,spl,instance_count,mask,inited);
2173  anymore = false;
2174  for ( i=0; i<instance_count; ++i ) {
2175  if ( ref[i]!=NULL ) {
2176  ref[i] = ref[i]->next;
2177  if ( ref[i]!=NULL ) anymore = true;
2178  }
2179  }
2180  if ( !anymore )
2181  break;
2182  }
2183  if ( instance_count==1 )
2185 }
2186 
2187 static StemInfo *GDFindStems(struct glyphdata *gd, int major) {
2188  int i;
2189  StemInfo *head = NULL, *cur, *p, *t;
2190  StemBundle *bundle = major ? gd->vbundle : gd->hbundle;
2191  StemData *stem;
2192  int other = !major;
2193  double l, r;
2194 
2195  for ( i=0; i<bundle->cnt; ++i ) {
2196  stem = bundle->stemlist[i];
2197  l = (&stem->left.x)[other];
2198  r = (&stem->right.x)[other];
2199  cur = chunkalloc( sizeof( StemInfo ));
2200  if ( l<r ) {
2201  cur->start = l;
2202  cur->width = r - l;
2203  cur->haspointleft = stem->lpcnt > 0;
2204  cur->haspointright = stem->rpcnt > 0;
2205  } else {
2206  cur->start = r;
2207  cur->width = l - r;
2208  cur->haspointleft = stem->rpcnt > 0;
2209  cur->haspointright = stem->lpcnt > 0;
2210  }
2211  cur->ghost = stem->ghost;
2212  for ( p=NULL, t=head; t!=NULL ; p=t, t=t->next ) {
2213  if ( cur->start<=t->start )
2214  break;
2215  }
2216  cur->next = t;
2217  if ( p==NULL )
2218  head = cur;
2219  else
2220  p->next = cur;
2221  cur->where = StemAddHIFromActive(stem,major);
2222  }
2224 return( head );
2225 }
2226 
2227 static DStemInfo *GDFindDStems(struct glyphdata *gd) {
2228  int i;
2229  DStemInfo *head = NULL, *cur ;
2230  struct stemdata *stem;
2231 
2232  for ( i=0; i<gd->stemcnt; ++i ) {
2233  stem = &gd->stems[i];
2234  /* A real diagonal stem should consist of one or more continuous
2235  * ranges. Thus the number of active zones should be less then the
2236  * number of stem chunks (i. e. pairs of the opposite points). If
2237  * each chunk has its own active zone, then we probably have got
2238  * not a real stem, but rather two (or more) separate point pairs,
2239  * which occasionally happened to have nearly the same vectors and
2240  * to be positioned on the same lines */
2241  if ( stem->toobig )
2242  continue;
2243 
2244  if (( stem->unit.y > -.05 && stem->unit.y < .05 ) ||
2245  ( stem->unit.x > -.05 && stem->unit.x < .05 ))
2246  continue;
2247 
2248  if ( stem->lpcnt < 2 || stem->rpcnt < 2 )
2249  continue;
2250  cur = chunkalloc( sizeof(DStemInfo) );
2251  cur->left = stem->left;
2252  cur->right = stem->right;
2253  cur->unit = stem->unit;
2254  cur->where = DStemAddHIFromActive( stem );
2255  MergeDStemInfo(gd->sf, &head, cur);
2256  }
2257 return( head );
2258 }
2259 
2260 
2261 static bool inorder( real a, real b, real c )
2262 {
2263  return a < b && b < c;
2264 }
2265 
2266 /**
2267  * If fluffy is near enough to exact then clamp to exact.
2268  * If fluffy is more than Tolerance away from exact then
2269  * just return fluffy (no change).
2270  */
2271 static real clampToIfNear( real exact, real fluffy, real Tolerance )
2272 {
2273  if( inorder( exact - Tolerance, fluffy, exact + Tolerance ))
2274  return exact;
2275 
2276  return fluffy;
2277 }
2278 
2279 
2281  int gen_undoes ) {
2282  struct glyphdata *gd;
2283 
2284  StemInfosFree(sc->vstem); sc->vstem=NULL;
2285  StemInfosFree(sc->hstem); sc->hstem=NULL;
2286  DStemInfosFree(sc->dstem); sc->dstem=NULL;
2287  MinimumDistancesFree(sc->md); sc->md=NULL;
2288 
2289  free(sc->countermasks);
2290  sc->countermasks = NULL; sc->countermask_cnt = 0;
2291  /* We'll free the hintmasks when we call SCFigureHintMasks */
2292 
2293  sc->changedsincelasthinted = false;
2294  sc->manualhints = false;
2295 
2296  if ( (gd=gd2)==NULL )
2297  gd = GlyphDataBuild( sc,layer,bd,false );
2298  if ( gd!=NULL ) {
2299 
2300  sc->vstem = GDFindStems(gd,1);
2301  sc->hstem = GDFindStems(gd,0);
2302 
2303  if ( !gd->only_hv )
2304  sc->dstem = GDFindDStems(gd);
2305  if ( gd2==NULL ) GlyphDataFree(gd);
2306  }
2307 
2308  real AutohintRoundingTolerance = 0.005;
2309  StemInfo* s = sc->hstem;
2310  for( ; s; s = s->next )
2311  {
2312  s->width = clampToIfNear( 20.0, s->width, AutohintRoundingTolerance );
2313  s->width = clampToIfNear( 21.0, s->width, AutohintRoundingTolerance );
2314  }
2315 
2316  AutoHintRefs(sc,layer,bd,false,gen_undoes);
2317 }
2318 
2319 static void __SplineCharAutoHint( SplineChar *sc, int layer, BlueData *bd, int gen_undoes ) {
2320  MMSet *mm = sc->parent->mm;
2321  int i;
2322 
2323  if ( mm==NULL )
2324  _SplineCharAutoHint(sc,layer,bd,NULL,gen_undoes);
2325  else {
2326  for ( i=0; i<mm->instance_count; ++i )
2327  if ( sc->orig_pos < mm->instances[i]->glyphcnt )
2328  _SplineCharAutoHint(mm->instances[i]->glyphs[sc->orig_pos],layer,NULL,NULL,gen_undoes);
2329  if ( sc->orig_pos < mm->normal->glyphcnt )
2330  _SplineCharAutoHint(mm->normal->glyphs[sc->orig_pos],layer,NULL,NULL,gen_undoes);
2331  }
2333 }
2334 
2337 }
2338 
2340  RefChar *ref;
2341 
2342  if ( sc->ticked )
2343 return;
2344  for ( ref=sc->layers[ly_fore].refs; ref!=NULL; ref=ref->next ) {
2345  if ( !ref->sc->ticked )
2346  SFSCAutoHint(ref->sc,layer,bd);
2347  }
2348  sc->ticked = true;
2350 }
2351 
2353  int i,k;
2354  SplineFont *sf;
2355  BlueData *bd = NULL, _bd;
2356  SplineChar *sc;
2357 
2358  if ( _sf->mm==NULL ) {
2359  QuickBlues(_sf,layer,&_bd);
2360  bd = &_bd;
2361  }
2362 
2363  /* Tick the ones we don't want to AH, untick the ones that need AH */
2364  k=0;
2365  do {
2366  sf = _sf->subfontcnt==0 ? _sf : _sf->subfonts[k];
2367  for ( i=0; i<sf->glyphcnt; ++i ) if ( (sc = sf->glyphs[i])!=NULL )
2368  sc->ticked = ( !sc->changedsincelasthinted || sc->manualhints );
2369  ++k;
2370  } while ( k<_sf->subfontcnt );
2371 
2372  k=0;
2373  do {
2374  sf = _sf->subfontcnt==0 ? _sf : _sf->subfonts[k];
2375  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
2376  if ( sf->glyphs[i]->changedsincelasthinted &&
2377  !sf->glyphs[i]->manualhints )
2378  SFSCAutoHint(sf->glyphs[i],layer,bd);
2379  if ( !ff_progress_next()) {
2380  k = _sf->subfontcnt+1;
2381  break;
2382  }
2383  }
2384  ++k;
2385  } while ( k<_sf->subfontcnt );
2386 }
2387 
2389  int i,k;
2390  SplineFont *sf;
2391  BlueData *bd = NULL, _bd;
2392  SplineChar *sc;
2393 
2394  if ( _sf->mm==NULL ) {
2395  QuickBlues(_sf,layer,&_bd);
2396  bd = &_bd;
2397  }
2398 
2399  k=0;
2400  do {
2401  sf = _sf->subfontcnt==0 ? _sf : _sf->subfonts[k];
2402  for ( i=0; i<sf->glyphcnt; ++i ) if ( (sc = sf->glyphs[i])!=NULL ) {
2403  if ( sc->changedsincelasthinted &&
2404  !sc->manualhints &&
2405  (sc->layers[layer].refs!=NULL && sc->layers[layer].splines==NULL)) {
2406  StemInfosFree(sc->vstem); sc->vstem=NULL;
2407  StemInfosFree(sc->hstem); sc->hstem=NULL;
2408  AutoHintRefs(sc,layer,bd,true,true);
2409  }
2410  }
2411  ++k;
2412  } while ( k<_sf->subfontcnt );
2413 }
2414 
2415 static void FigureStems( SplineFont *sf, real snaps[12], real cnts[12],
2416  int which ) {
2417  int i, j, k, cnt, smax=0, smin=2000;
2418  real stemwidths[2000];
2419  StemInfo *stems, *test;
2420  int len;
2421  HintInstance *hi;
2422 
2423  memset(stemwidths,'\0',sizeof(stemwidths));
2424 
2425  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL ) {
2426  stems = which?sf->glyphs[i]->hstem:sf->glyphs[i]->vstem;
2427  for ( test=stems; test!=NULL; test = test->next ) if ( !test->ghost ) {
2428  if ( (j=test->width)<0 ) j= -j;
2429  if ( j<2000 ) {
2430  len = 0;
2431  for ( hi=test->where; hi!=NULL; hi=hi->next )
2432  len += hi->end-hi->begin;
2433  if ( len==0 ) len = 100;
2434  stemwidths[j] += len;
2435  if ( smax<j ) smax=j;
2436  if ( smin>j ) smin=j;
2437  }
2438  }
2439  }
2440 
2441  for ( i=smin, cnt=0; i<=smax; ++i ) {
2442  if ( stemwidths[i]!=0 )
2443  ++cnt;
2444  }
2445 
2446  if ( cnt>12 ) {
2447  /* Merge width windows */
2448  int windsize=3, j;
2449  for ( i=smin; i<=smax; ++i ) if ( stemwidths[i]!=0 ) {
2450  if ( (j = i-windsize)<0 ) j=0;
2451  for ( ; j<smax && j<=i+windsize; ++j )
2452  if ( stemwidths[i]<stemwidths[j] )
2453  break;
2454  if ( j==smax || j>i+windsize ) {
2455  if ( (j = i-windsize)<0 ) j=0;
2456  for ( ; j<smax && j<=i+windsize; ++j ) if ( j!=i ) {
2457  stemwidths[i] += stemwidths[j];
2458  stemwidths[j] = 0;
2459  }
2460  }
2461  }
2462  /* Merge adjacent widths */
2463  for ( i=smin; i<=smax; ++i ) {
2464  if ( i<=smax-1 && stemwidths[i]!=0 && stemwidths[i+1]!=0 ) {
2465  if ( stemwidths[i]>stemwidths[i+1] ) {
2466  stemwidths[i] += stemwidths[i+1];
2467  stemwidths[i+1] = 0;
2468  } else {
2469  if ( i<=smax-2 && stemwidths[i+2] && stemwidths[i+2]<stemwidths[i+1] ) {
2470  stemwidths[i+1] += stemwidths[i+2];
2471  stemwidths[i+2] = 0;
2472  }
2473  stemwidths[i+1] += stemwidths[i];
2474  stemwidths[i] = 0;
2475  ++i;
2476  }
2477  }
2478  }
2479  for ( i=smin, cnt=0; i<=smax; ++i ) {
2480  if ( stemwidths[i]!=0 )
2481  ++cnt;
2482  }
2483  }
2484  if ( cnt<=12 ) {
2485  for ( i=smin, cnt=0; i<=smax; ++i ) {
2486  if ( stemwidths[i]!=0 ) {
2487  snaps[cnt] = i;
2488  cnts[cnt++] = stemwidths[i];
2489  }
2490  }
2491  } else { real firstbiggest=0;
2492  for ( cnt = 0; cnt<12; ++cnt ) {
2493  int biggesti=0;
2494  real biggest=0;
2495  for ( i=smin; i<=smax; ++i ) {
2496  if ( stemwidths[i]>biggest ) { biggest = stemwidths[i]; biggesti=i; }
2497  }
2498  /* array must be sorted */
2499  if ( biggest<firstbiggest/6 )
2500  break;
2501  for ( j=0; j<cnt; ++j )
2502  if ( snaps[j]>biggesti )
2503  break;
2504  for ( k=cnt-1; k>=j; --k ) {
2505  snaps[k+1] = snaps[k];
2506  cnts[k+1]=cnts[k];
2507  }
2508  snaps[j] = biggesti;
2509  cnts[j] = biggest;
2510  stemwidths[biggesti] = 0;
2511  if ( firstbiggest==0 ) firstbiggest = biggest;
2512  }
2513  }
2514  for ( ; cnt<12; ++cnt ) {
2515  snaps[cnt] = 0;
2516  cnts[cnt] = 0;
2517  }
2518 }
2519 
2520 void FindHStems( SplineFont *sf, real snaps[12], real cnt[12]) {
2521  FigureStems(sf,snaps,cnt,1);
2522 }
2523 
2524 void FindVStems( SplineFont *sf, real snaps[12], real cnt[12]) {
2525  FigureStems(sf,snaps,cnt,0);
2526 }
2527 
2529  BasePoint nvec, pvec;
2530  double proj_same, proj_normal;
2531 
2532  if ( sp->nonextcp || sp->noprevcp )
2533 return( false ); /* No continuity of slopes */
2534 
2535  nvec.x = sp->nextcp.x - sp->me.x; nvec.y = sp->nextcp.y - sp->me.y;
2536  pvec.x = sp->me.x - sp->prevcp.x; pvec.y = sp->me.y - sp->prevcp.y;
2537 
2538  /* Avoid cases where the slopes are 180 out of phase */
2539  if ( (proj_same = nvec.x*pvec.x + nvec.y*pvec.y)<=0 )
2540 return( false );
2541  if ( (proj_normal = nvec.x*pvec.y - nvec.y*pvec.x)<0 )
2542  proj_normal = -proj_normal;
2543 
2544  /* Something is smooth if the normal projection is 0. Let's allow for */
2545  /* some rounding errors */
2546  if ( proj_same >= 16*proj_normal )
2547 return( true );
2548 
2549 return( false );
2550 }
2551 
2552 static int _SplineCharIsFlexible(SplineChar *sc, int layer, int blueshift) {
2553  /* Need two splines
2554  outer endpoints have same x (or y) values
2555  inner point must be less than 20 horizontal (v) units from the outer points
2556  inner point must also be less than BlueShift units (defaults to 7=>6)
2557  (can increase BlueShift up to 21)
2558  the inner point must be a local extremum
2559  the inner point's cps must be at the x (or y) value as the extremum
2560  (I think)
2561  */
2562  /* We want long, nearly straight stems. If the end-points should not have
2563  continuous slopes, or if they do, they must be horizontal/vertical.
2564  This is an heuristic requirement, not part of Adobe's spec.
2565  */
2566  SplineSet *spl;
2567  SplinePoint *sp, *np, *pp;
2568  int max=0, val;
2569  RefChar *r;
2570 
2571  if ( sc==NULL )
2572 return(false);
2573 
2574  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
2575  if ( spl->first->prev==NULL ) {
2576  /* Mark everything on the open path as inflexible */
2577  sp=spl->first;
2578  while ( 1 ) {
2579  sp->flexx = sp->flexy = false;
2580  if ( sp->next==NULL )
2581  break;
2582  sp = sp->next->to;
2583  }
2584  continue; /* Ignore open paths */
2585  }
2586  sp=spl->first;
2587  do {
2588  if ( sp->next==NULL || sp->prev==NULL )
2589  break;
2590  np = sp->next->to;
2591  pp = sp->prev->from;
2592  if ( !pp->flexx && !pp->flexy ) {
2593  sp->flexy = sp->flexx = 0;
2594  val = 0;
2595  if ( RealNear(sp->nextcp.x,sp->me.x) &&
2596  RealNear(sp->prevcp.x,sp->me.x) &&
2597  RealNear(np->me.x,pp->me.x) &&
2598  !RealNear(np->me.x,sp->me.x) &&
2599  (!IsFlexSmooth(pp) || RealNear(pp->nextcp.x,pp->me.x)) &&
2600  (!IsFlexSmooth(np) || RealNear(np->prevcp.x,np->me.x)) &&
2601  np->me.x-sp->me.x < blueshift &&
2602  np->me.x-sp->me.x > -blueshift ) {
2603  if ( (np->me.x>sp->me.x &&
2604  np->prevcp.x<=np->me.x && np->prevcp.x>=sp->me.x &&
2605  pp->nextcp.x<=pp->me.x && pp->prevcp.x>=sp->me.x ) ||
2606  (np->me.x<sp->me.x &&
2607  np->prevcp.x>=np->me.x && np->prevcp.x<=sp->me.x &&
2608  pp->nextcp.x>=pp->me.x && pp->prevcp.x<=sp->me.x )) {
2609  sp->flexx = true;
2610  val = np->me.x-sp->me.x;
2611  }
2612  }
2613  if ( RealNear(sp->nextcp.y,sp->me.y) &&
2614  RealNear(sp->prevcp.y,sp->me.y) &&
2615  RealNear(np->me.y,pp->me.y) &&
2616  !RealNear(np->me.y,sp->me.y) &&
2617  (!IsFlexSmooth(pp) || RealNear(pp->nextcp.y,pp->me.y)) &&
2618  (!IsFlexSmooth(np) || RealNear(np->prevcp.y,np->me.y)) &&
2619  np->me.y-sp->me.y < blueshift &&
2620  np->me.y-sp->me.y > -blueshift ) {
2621  if ( (np->me.y>sp->me.y &&
2622  np->prevcp.y<=np->me.y && np->prevcp.y>=sp->me.y &&
2623  pp->nextcp.y<=pp->me.y && pp->nextcp.y>=sp->me.y ) ||
2624  (np->me.y<sp->me.y &&
2625  np->prevcp.y>=np->me.y && np->prevcp.y<=sp->me.y &&
2626  pp->nextcp.y>=pp->me.y && pp->nextcp.y<=sp->me.y )) {
2627  sp->flexy = true;
2628  val = np->me.y-sp->me.y;
2629  }
2630  }
2631  if ( val<0 ) val = -val;
2632  if ( val>max ) max = val;
2633  }
2634  sp = np;
2635  } while ( sp!=spl->first );
2636  }
2637  sc->layers[layer].anyflexes = max>0;
2638  if ( max==0 )
2639  for ( r = sc->layers[layer].refs; r!=NULL ; r=r->next )
2640  if ( r->sc->layers[layer].anyflexes ) {
2641  sc->layers[layer].anyflexes = true;
2642  break;
2643  }
2644 return( max );
2645 }
2646 
2647 static void SCUnflex(SplineChar *sc, int layer) {
2648  SplineSet *spl;
2649  SplinePoint *sp;
2650 
2651  for ( spl = sc->layers[layer].splines; spl!=NULL; spl=spl->next ) {
2652  /* Mark everything on the path as inflexible */
2653  sp=spl->first;
2654  while ( 1 ) {
2655  sp->flexx = sp->flexy = false;
2656  if ( sp->next==NULL )
2657  break;
2658  sp = sp->next->to;
2659  if ( sp==spl->first )
2660  break;
2661  }
2662  }
2663  sc->layers[layer].anyflexes = false;
2664 }
2665 
2666 static void FlexDependents(SplineChar *sc,int layer) {
2667  struct splinecharlist *scl;
2668 
2669  sc->layers[layer].anyflexes = true;
2670  for ( scl = sc->dependents; scl!=NULL; scl=scl->next )
2671  FlexDependents(scl->sc,layer);
2672 }
2673 
2675  int i;
2676  int max=0, val;
2677  char *pt;
2678  int blueshift;
2679  /* if the return value is bigger than 6 and we don't have a BlueShift */
2680  /* then we must set BlueShift to ret+1 before saving private dictionary */
2681  /* If the first point in a spline set is flexible, then we must rotate */
2682  /* the splineset */
2683 
2685  for ( i=0; i<sf->glyphcnt; ++i ) if ( sf->glyphs[i]!=NULL )
2686  SCUnflex(sf->glyphs[i],layer);
2687 return( 0 );
2688  }
2689 
2690  pt = PSDictHasEntry(sf->private,"BlueShift");
2691  blueshift = 21; /* maximum posible flex, not default */
2692  if ( pt!=NULL ) {
2693  blueshift = strtol(pt,NULL,10);
2694  if ( blueshift>21 ) blueshift = 21;
2695  } else if ( PSDictHasEntry(sf->private,"BlueValues")!=NULL )
2696  blueshift = 7; /* The BlueValues array may depend on BlueShift having its default value */
2697 
2698  for ( i=0; i<sf->glyphcnt; ++i )
2699  if ( sf->glyphs[i]!=NULL ) if ( sf->glyphs[i]!=NULL ) {
2700  val = _SplineCharIsFlexible(sf->glyphs[i],layer,blueshift);
2701  if ( val>max ) max = val;
2702  if ( sf->glyphs[i]->layers[layer].anyflexes )
2703  FlexDependents(sf->glyphs[i],layer);
2704  }
2705 return( max );
2706 }
2707 
2708 
double __cdecl strtod(char const *_String, char **_EndPtr)
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
double __cdecl pow(double _X, double _Y)
static int pr(int(*writeFunc)(void *stream, const char *data, int size), void *stream, const char *data)
Definition: HTMLGen.cc:249
int xheight
Definition: afm2pl.c:213
#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
#define dn
Definition: devnag.c:324
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
static FIELD_PTR prev
Definition: genind.c:36
static FIELD_PTR begin
Definition: genind.c:37
#define dot
Definition: globals.h:56
__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
#define a(n)
Definition: gpos-common.c:148
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
voidp calloc()
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 fabs(x)
Definition: cpascal.h:211
#define floor(x)
Definition: cpascal.h:52
#define rh
Definition: texmfmem.h:173
#define malloc
Definition: alloca.c:91
#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
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
integer xoffset[256]
Definition: pbmtopk.c:48
integer yoffset[256]
Definition: pbmtopk.c:49
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
static int offset
Definition: ppmtogif.c:642
bstring c int memset(void *s, int c, int length)
int otherblues[10]
Definition: pt1.c:115
#define dir
#define flags
static DStemInfo * RefDHintsMerge(SplineFont *sf, DStemInfo *into, DStemInfo *rh, float xmul, float xoffset, float ymul, float yoffset)
Definition: autohint.c:1430
static void UnnumberHints(SplineChar *sc)
Definition: autohint.c:1732
HintInstance * HICopyTrans(HintInstance *hi, float mul, float offset)
Definition: autohint.c:1134
void _SplineCharAutoHint(SplineChar *sc, int layer, BlueData *bd, struct glyphdata *gd2, int gen_undoes)
Definition: autohint.c:2280
static Bool__ inorder(float a, float b, float c)
Definition: autohint.c:2261
static float clampToIfNear(float exact, float fluffy, float Tolerance)
Definition: autohint.c:2271
void SCGuessHintInstancesList(SplineChar *sc, int layer, StemInfo *hstem, StemInfo *vstem, DStemInfo *dstem, int hvforce, int dforce)
Definition: autohint.c:1209
static void FlexDependents(SplineChar *sc, int layer)
Definition: autohint.c:2666
static int PVAddBlues(BlueData *bd, unsigned bcnt, char *pt)
Definition: autohint.c:387
static MMH * AddHintSet(MMH *hints, StemInfo *h[16], int instance_count, SplinePoint *sps[16], int ish)
Definition: autohint.c:1787
float EITOfNextMajor(EI *e, EIList *el, float sought_m)
Definition: autohint.c:853
void ElFreeEI(EIList *el)
Definition: autohint.c:595
static int TestHintMask(SplineChar *scs[16], SplinePoint *to[16], int instance_count, HintMask mask)
Definition: autohint.c:1703
int SplineFontIsFlexible(SplineFont *sf, int layer, int flags)
Definition: autohint.c:2674
static int EIAddEdge(Spline *spline, float tmin, float tmax, EIList *el)
Definition: autohint.c:604
static StemInfo * OnVHint(SplinePoint *sp, StemInfo *s)
Definition: autohint.c:1604
static void SCUnflex(SplineChar *sc, int layer)
Definition: autohint.c:2647
static StemInfo * OnHHint(SplinePoint *sp, StemInfo *s)
Definition: autohint.c:1580
static MMH * SortMMH(MMH *head, int instance_count)
Definition: autohint.c:1862
static HintInstance * HIMerge(HintInstance *into, HintInstance *hi)
Definition: autohint.c:822
void SplineFontAutoHint(SplineFont *_sf, int layer)
Definition: autohint.c:2352
static int _SplineCharIsFlexible(SplineChar *sc, int layer, int blueshift)
Definition: autohint.c:2552
static int SplFigureHintMasks(SplineChar *scs[16], SplineSet *spl[16], int instance_count, HintMask mask, int inited)
Definition: autohint.c:2069
static void MMHFreeList(MMH *mmh)
Definition: autohint.c:1960
void SCClearHintMasks(SplineChar *sc, int layer, int counterstoo)
Definition: autohint.c:1564
static void SortMMH2(SplineChar *scs[16], MMH *mmh, int instance_count, int ish)
Definition: autohint.c:1929
static void UntickHints(SplineChar *sc)
Definition: autohint.c:1752
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
static void AutoHintRefs(SplineChar *sc, int layer, BlueData *bd, int picky, int gen_undoes)
Definition: autohint.c:1458
static void AddCoord(MMH *mmh, SplinePoint *sps[16], int instance_count, int ish)
Definition: autohint.c:1772
static void EIAddSpline(Spline *spline, EIList *el)
Definition: autohint.c:691
void SplineCharAutoHint(SplineChar *sc, int layer, BlueData *bd)
Definition: autohint.c:2335
static void AddBlue(float val, float array[5], int force)
Definition: autohint.c:50
void SplineFontAutoHintRefs(SplineFont *_sf, int layer)
Definition: autohint.c:2388
static int IsBiggerSlope(EI *test, EI *base, int major)
Definition: autohint.c:746
int StemListAnyConflicts(StemInfo *stems)
Definition: autohint.c:1115
void SCFigureHintMasks(SplineChar *sc, int layer)
Definition: autohint.c:2128
static void _SCClearHintMasks(SplineChar *sc, int layer, int counterstoo)
Definition: autohint.c:1495
static void MergeZones(float zone1[5], float zone2[5])
Definition: autohint.c:62
static DStemInfo * GDFindDStems(struct glyphdata *gd)
Definition: autohint.c:2227
static HintInstance * StemAddHIFromActive(struct stemdata *stem, int major)
Definition: autohint.c:1164
static void __SplineCharAutoHint(SplineChar *sc, int layer, BlueData *bd, int gen_undoes)
Definition: autohint.c:2319
static void SplResolveSplitHints(SplineChar *scs[16], SplineSet *spl[16], int instance_count, MMH **hs, MMH **vs)
Definition: autohint.c:1974
static void SCFigureSimpleCounterMasks(SplineChar *sc)
Definition: autohint.c:1535
static HintInstance * DStemAddHIFromActive(struct stemdata *stem)
Definition: autohint.c:1192
void QuickBlues(SplineFont *_sf, int layer, BlueData *bd)
Definition: autohint.c:425
void SFSCAutoHint(SplineChar *sc, int layer, BlueData *bd)
Definition: autohint.c:2339
int MergeDStemInfo(SplineFont *sf, DStemInfo **ds, DStemInfo *test)
Definition: autohint.c:1291
static void FigureStems(SplineFont *sf, float snaps[12], float cnts[12], int which)
Definition: autohint.c:2415
static int IsFlexSmooth(SplinePoint *sp)
Definition: autohint.c:2528
static StemInfo * GDFindStems(struct glyphdata *gd, int major)
Definition: autohint.c:2187
static int NumberMMH(MMH *mmh, int hstart, int instance_count)
Definition: autohint.c:1897
static StemInfo * StemRemoveFlexCandidates(StemInfo *stems)
Definition: autohint.c:1057
static int CompareMMH(MMH *mmh1, MMH *mmh2, int instance_count)
Definition: autohint.c:1835
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
static void FigureHintMask(SplineChar *scs[16], SplinePoint *to[16], int instance_count, HintMask mask)
Definition: autohint.c:1643
static int NumberHints(SplineChar *sc)
Definition: autohint.c:1741
void ELFindEdges(SplineChar *sc, EIList *el)
Definition: autohint.c:723
int EISameLine(EI *e, EI *n, float i, int major)
Definition: autohint.c:987
void ELOrder(EIList *el, int major)
Definition: autohint.c:774
static void ResolveSplitHints(SplineChar *scs[16], int layer, int instance_count)
Definition: autohint.c:2017
void FindVStems(SplineFont *sf, float snaps[12], float cnt[12])
Definition: autohint.c:2524
static int ConflictsWithMask(StemInfo *stems, HintMask mask, StemInfo *h)
Definition: autohint.c:1630
struct mmh MMH
float OpenTypeLoadHintEqualityTolerance
Definition: autohint.c:34
void FindHStems(SplineFont *sf, float snaps[12], float cnt[12])
Definition: autohint.c:2520
static StemInfo * RefHintsMerge(StemInfo *into, StemInfo *rh, float mul, float offset, float omul, float oofset)
Definition: autohint.c:1402
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
void StemInfosFree(StemInfo *h)
Definition: splineutil.c:2440
void DStemInfoFree(DStemInfo *h)
Definition: splineutil.c:2454
@ ps_flag_nohints
Definition: splinefont.h:1917
@ ps_flag_noflex
Definition: splinefont.h:1916
@ ly_fore
Definition: splinefont.h:1209
#define extended
Definition: splinefont.h:52
void DStemInfosFree(DStemInfo *h)
Definition: splineutil.c:2464
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
void MinimumDistancesFree(MinimumDistance *md)
Definition: splineutil.c:2610
#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
struct glyphdata * DStemInfoToStemData(struct glyphdata *gd, DStemInfo *dsi)
Definition: stemdb.c:4870
static double dist_error_diag
Definition: stemdb.c:48
struct glyphdata * GlyphDataInit(SplineChar *sc, int layer, double em_size, int only_hv)
Definition: stemdb.c:5725
void GlyphDataFree(struct glyphdata *gd)
Definition: stemdb.c:6021
struct glyphdata * GlyphDataBuild(SplineChar *sc, int layer, BlueData *bd, int use_existing)
Definition: stemdb.c:5851
struct glyphdata * StemInfoToStemData(struct glyphdata *gd, StemInfo *si, int is_v)
Definition: stemdb.c:4911
#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 isspace(ch)
Definition: utype.h:87
#define isupper(ch)
Definition: utype.h:80
#define isalnum(ch)
Definition: utype.h:84
#define mask(n)
Definition: lbitlib.c:93
test
Definition: parser.c:257
ShellFileEnvironment e
Definition: sh6.c:388
float x
Definition: splinefont.h:70
float y
Definition: splinefont.h:71
float basebelow
Definition: splinefont.h:314
int bluecnt
Definition: splinefont.h:318
float base
Definition: splinefont.h:314
float blues[12][2]
Definition: splinefont.h:319
float xheighttop
Definition: splinefont.h:312
float descent
Definition: splinefont.h:316
float caphtop
Definition: splinefont.h:313
float ascent
Definition: splinefont.h:315
float xheight
Definition: splinefont.h:312
float numh
Definition: splinefont.h:317
float caph
Definition: splinefont.h:313
float numhtop
Definition: splinefont.h:317
struct coords * next
Definition: autohint.c:1763
float coords[16]
Definition: autohint.c:1762
BasePoint right
Definition: splinefont.h:1178
HintInstance * where
Definition: splinefont.h:1179
struct dsteminfo * next
Definition: splinefont.h:1175
BasePoint left
Definition: splinefont.h:1178
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
int stemcnt
Definition: stemdb.h:53
struct stembundle * vbundle
Definition: stemdb.h:58
struct stemdata * stems
Definition: stemdb.h:54
struct stembundle * hbundle
Definition: stemdb.h:57
BlueData bd
Definition: stemdb.h:39
SplineFont * sf
Definition: stemdb.h:38
int layer
Definition: stemdb.h:42
int only_hv
Definition: stemdb.h:72
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
unsigned int apple
Definition: splinefont.h:1867
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
struct mmset * mm
Definition: splinefont.h:1768
struct splinefont * cidmaster
Definition: splinefont.h:1739
struct splinefont ** subfonts
Definition: splinefont.h:1738
int subfontcnt
Definition: splinefont.h:1737
SplineChar ** glyphs
Definition: splinefont.h:1690
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
DOUBLE y
Definition: type1.c:140
DOUBLE x
Definition: type1.c:139
struct stemdata ** stemlist
Definition: stemdb.h:204
int cnt
Definition: stemdb.h:203
BasePoint left
Definition: stemdb.h:153
BasePoint right
Definition: stemdb.h:154
float width
Definition: splinefont.h:1170
struct steminfo * next
Definition: splinefont.h:1139
float start
Definition: splinefont.h:1169
HintInstance * where
Definition: splinefont.h:1171
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
@ start
Definition: preamble.c:52
PATTERN * pt
Definition: vlna.c:74
#define end(cp)
Definition: zic.c:71