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)  

fccfg.c
Go to the documentation of this file.
1 /*
2  * fontconfig/src/fccfg.c
3  *
4  * Copyright © 2000 Keith Packard
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of the author(s) not be used in
11  * advertising or publicity pertaining to distribution of the software without
12  * specific, written prior permission. The authors make no
13  * representations about the suitability of this software for any purpose. It
14  * is provided "as is" without express or implied warranty.
15  *
16  * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18  * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22  * PERFORMANCE OF THIS SOFTWARE.
23  */
24 
25 /* Objects MT-safe for readonly access. */
26 
27 #ifdef _WIN32
28 #define PIC 1
29 extern char * kpse_var_value(char *a);
30 #endif
31 
32 #include "fcint.h"
33 #ifdef HAVE_DIRENT_H
34 #include <dirent.h>
35 #endif
36 #include <sys/types.h>
37 
38 #if defined (_WIN32) && !defined (R_OK)
39 #define R_OK 4
40 #endif
41 
42 #if defined(_WIN32) && !defined(S_ISFIFO)
43 #define S_ISFIFO(m) 0
44 #endif
45 
46 static FcConfig *_fcConfig; /* MT-safe */
47 static FcMutex *_lock;
48 
49 static void
51 {
52  FcMutex *lock;
53 retry:
55  if (!lock)
56  {
57  lock = (FcMutex *) malloc (sizeof (FcMutex));
58  FcMutexInit (lock);
60  {
62  goto retry;
63  }
64  FcMutexLock (lock);
65  /* Initialize random state */
66  FcRandom ();
67  return;
68  }
69  FcMutexLock (lock);
70 }
71 
72 static void
74 {
75  FcMutex *lock;
78 }
79 
80 static void
81 free_lock (void)
82 {
83  FcMutex *lock;
86  {
88  free (lock);
89  }
90 }
91 
92 static FcConfig *
94 {
96 retry:
98  if (!config)
99  {
101 
103  if (config)
105  goto retry;
106  }
107  }
108  return config;
109 }
110 
111 static void
113 {
115 }
116 
117 static void
119 {
121 }
122 
123 FcBool
125 {
126  return FcConfigEnsure () ? FcTrue : FcFalse;
127 }
128 
129 void
131 {
133  if (cfg && fc_atomic_ptr_cmpexch (&_fcConfig, cfg, NULL))
134  FcConfigDestroy (cfg);
135  free_lock ();
136 }
137 
138 static FcChar8 *
140 {
141  char resolved_name[FC_PATH_MAX+1];
142  char *resolved_ret;
143 
144  if (!path)
145  return NULL;
146 
147 #ifndef _WIN32
148  resolved_ret = realpath((const char *) path, resolved_name);
149 #else
150  if (GetFullPathNameA ((LPCSTR) path, FC_PATH_MAX, resolved_name, NULL) == 0)
151  {
152  fprintf (stderr, "Fontconfig warning: GetFullPathNameA failed.\n");
153  return NULL;
154  }
155  resolved_ret = resolved_name;
156 #endif
157  if (resolved_ret)
158  path = (FcChar8 *) resolved_ret;
159  return FcStrCopyFilename(path);
160 }
161 
162 FcConfig *
164 {
165  FcSetName set;
166  FcConfig *config;
167  FcMatchKind k;
168  FcBool err = FcFalse;
169 
170  config = malloc (sizeof (FcConfig));
171  if (!config)
172  goto bail0;
173 
174  config->configDirs = FcStrSetCreate ();
175  if (!config->configDirs)
176  goto bail1;
177 
178  config->configMapDirs = FcStrSetCreate();
179  if (!config->configMapDirs)
180  goto bail1_5;
181 
182  config->configFiles = FcStrSetCreate ();
183  if (!config->configFiles)
184  goto bail2;
185 
186  config->fontDirs = FcStrSetCreate ();
187  if (!config->fontDirs)
188  goto bail3;
189 
190  config->acceptGlobs = FcStrSetCreate ();
191  if (!config->acceptGlobs)
192  goto bail4;
193 
194  config->rejectGlobs = FcStrSetCreate ();
195  if (!config->rejectGlobs)
196  goto bail5;
197 
198  config->acceptPatterns = FcFontSetCreate ();
199  if (!config->acceptPatterns)
200  goto bail6;
201 
202  config->rejectPatterns = FcFontSetCreate ();
203  if (!config->rejectPatterns)
204  goto bail7;
205 
206  config->cacheDirs = FcStrSetCreate ();
207  if (!config->cacheDirs)
208  goto bail8;
209 
210  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
211  {
213  if (!config->subst[k])
214  err = FcTrue;
215  }
216  if (err)
217  goto bail9;
218 
219  config->maxObjects = 0;
220  for (set = FcSetSystem; set <= FcSetApplication; set++)
221  config->fonts[set] = 0;
222 
223  config->rescanTime = time(0);
224  config->rescanInterval = 30;
225 
226  config->expr_pool = NULL;
227 
228  config->sysRoot = FcConfigRealPath((const FcChar8 *) getenv("FONTCONFIG_SYSROOT"));
229 
230  config->rulesetList = FcPtrListCreate (FcDestroyAsRuleSet);
231  if (!config->rulesetList)
232  goto bail9;
233  config->availConfigFiles = FcStrSetCreate ();
234  if (!config->availConfigFiles)
235  goto bail10;
236 
237  FcRefInit (&config->ref, 1);
238 
239  return config;
240 
241 bail10:
242  FcPtrListDestroy (config->rulesetList);
243 bail9:
244  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
245  if (config->subst[k])
246  FcPtrListDestroy (config->subst[k]);
247  FcStrSetDestroy (config->cacheDirs);
248 bail8:
249  FcFontSetDestroy (config->rejectPatterns);
250 bail7:
251  FcFontSetDestroy (config->acceptPatterns);
252 bail6:
253  FcStrSetDestroy (config->rejectGlobs);
254 bail5:
255  FcStrSetDestroy (config->acceptGlobs);
256 bail4:
257  FcStrSetDestroy (config->fontDirs);
258 bail3:
259  FcStrSetDestroy (config->configFiles);
260 bail2:
261  FcStrSetDestroy (config->configMapDirs);
262 bail1_5:
263  FcStrSetDestroy (config->configDirs);
264 bail1:
265  free (config);
266 bail0:
267  return 0;
268 }
269 
270 static FcFileTime
272 {
274  FcFileTime newest = { 0, FcFalse };
275  FcChar8 *file;
276  struct stat statb;
277 
278  if (list)
279  {
280  while ((file = FcStrListNext (list)))
281  if (FcStat (file, &statb) == 0)
282  if (!newest.set || statb.st_mtime - newest.time > 0)
283  {
284  newest.set = FcTrue;
285  newest.time = statb.st_mtime;
286  }
288  }
289  return newest;
290 }
291 
292 FcBool
294 {
295  FcFileTime config_time, config_dir_time, font_time;
296  time_t now = time(0);
297  FcBool ret = FcTrue;
298 
300  if (!config)
301  return FcFalse;
302 
303  config_time = FcConfigNewestFile (config->configFiles);
304  config_dir_time = FcConfigNewestFile (config->configDirs);
305  font_time = FcConfigNewestFile (config->fontDirs);
306  if ((config_time.set && config_time.time - config->rescanTime > 0) ||
307  (config_dir_time.set && (config_dir_time.time - config->rescanTime) > 0) ||
308  (font_time.set && (font_time.time - config->rescanTime) > 0))
309  {
310  /* We need to check for potential clock problems here (OLPC ticket #6046) */
311  if ((config_time.set && (config_time.time - now) > 0) ||
312  (config_dir_time.set && (config_dir_time.time - now) > 0) ||
313  (font_time.set && (font_time.time - now) > 0))
314  {
315  fprintf (stderr,
316  "Fontconfig warning: Directory/file mtime in the future. New fonts may not be detected.\n");
317  config->rescanTime = now;
318  goto bail;
319  }
320  else
321  {
322  ret = FcFalse;
323  goto bail;
324  }
325  }
326  config->rescanTime = now;
327 bail:
329 
330  return ret;
331 }
332 
333 FcExpr *
335 {
336  if (!config->expr_pool || config->expr_pool->next == config->expr_pool->end)
337  {
338  FcExprPage *new_page;
339 
340  new_page = malloc (sizeof (FcExprPage));
341  if (!new_page)
342  return 0;
343 
344  new_page->next_page = config->expr_pool;
345  new_page->next = new_page->exprs;
346  config->expr_pool = new_page;
347  }
348 
349  return config->expr_pool->next++;
350 }
351 
352 FcConfig *
354 {
355  if (!config)
356  {
357  /* lock during obtaining the value from _fcConfig and count up refcount there,
358  * there are the race between them.
359  */
360  lock_config ();
361  retry:
363  if (!config)
364  {
365  unlock_config ();
366 
368  if (!config)
369  goto retry;
370  lock_config ();
372  {
374  goto retry;
375  }
376  }
377  FcRefInc (&config->ref);
378  unlock_config ();
379  }
380  else
381  FcRefInc (&config->ref);
382 
383  return config;
384 }
385 
386 void
388 {
389  FcSetName set;
390  FcExprPage *page;
391  FcMatchKind k;
392 
393  if (FcRefDec (&config->ref) != 1)
394  return;
395 
397 
398  FcStrSetDestroy (config->configDirs);
399  FcStrSetDestroy (config->configMapDirs);
400  FcStrSetDestroy (config->fontDirs);
401  FcStrSetDestroy (config->cacheDirs);
402  FcStrSetDestroy (config->configFiles);
403  FcStrSetDestroy (config->acceptGlobs);
404  FcStrSetDestroy (config->rejectGlobs);
405  FcFontSetDestroy (config->acceptPatterns);
406  FcFontSetDestroy (config->rejectPatterns);
407 
408  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
409  FcPtrListDestroy (config->subst[k]);
410  FcPtrListDestroy (config->rulesetList);
411  FcStrSetDestroy (config->availConfigFiles);
412  for (set = FcSetSystem; set <= FcSetApplication; set++)
413  if (config->fonts[set])
414  FcFontSetDestroy (config->fonts[set]);
415 
416  page = config->expr_pool;
417  while (page)
418  {
419  FcExprPage *next = page->next_page;
420  free (page);
421  page = next;
422  }
423  if (config->sysRoot)
424  FcStrFree (config->sysRoot);
425 
426  free (config);
427 }
428 
429 /*
430  * Add cache to configuration, adding fonts and directories
431  */
432 
433 FcBool
435  FcSetName set, FcStrSet *dirSet, FcChar8 *forDir)
436 {
437  FcFontSet *fs;
438  intptr_t *dirs;
439  int i;
440  FcBool relocated = FcFalse;
441 
442  if (strcmp ((char *)FcCacheDir(cache), (char *)forDir) != 0)
443  relocated = FcTrue;
444 
445  /*
446  * Add fonts
447  */
448  fs = FcCacheSet (cache);
449  if (fs)
450  {
451  int nref = 0;
452 
453  for (i = 0; i < fs->nfont; i++)
454  {
455  FcPattern *font = FcFontSetFont (fs, i);
456  FcChar8 *font_file;
457  FcChar8 *relocated_font_file = NULL;
458 
459  if (FcPatternObjectGetString (font, FC_FILE_OBJECT,
460  0, &font_file) == FcResultMatch)
461  {
462  if (relocated)
463  {
464  FcChar8 *slash = FcStrLastSlash (font_file);
465  relocated_font_file = FcStrBuildFilename (forDir, slash + 1, NULL);
466  font_file = relocated_font_file;
467  }
468 
469  /*
470  * Check to see if font is banned by filename
471  */
472  if (!FcConfigAcceptFilename (config, font_file))
473  {
474  free (relocated_font_file);
475  continue;
476  }
477  }
478 
479  /*
480  * Check to see if font is banned by pattern
481  */
483  {
484  free (relocated_font_file);
485  continue;
486  }
487 
488  if (relocated_font_file)
489  {
490  font = FcPatternCacheRewriteFile (font, cache, relocated_font_file);
491  free (relocated_font_file);
492  }
493 
494  if (FcFontSetAdd (config->fonts[set], font))
495  nref++;
496  }
497  FcDirCacheReference (cache, nref);
498  }
499 
500  /*
501  * Add directories
502  */
503  dirs = FcCacheDirs (cache);
504  if (dirs)
505  {
506  for (i = 0; i < cache->dirs_count; i++)
507  {
508  const FcChar8 *dir = FcCacheSubdir (cache, i);
509  FcChar8 *s = NULL;
510 
511  if (relocated)
512  {
514  dir = s = FcStrBuildFilename (forDir, base, NULL);
515  FcStrFree (base);
516  }
518  FcStrSetAddFilename (dirSet, dir);
519  if (s)
520  FcStrFree (s);
521  }
522  }
523  return FcTrue;
524 }
525 
526 static FcBool
528 {
529  FcStrList *dirlist;
530  FcChar8 *dir;
531  FcCache *cache;
532 
533  dirlist = FcStrListCreate (dirSet);
534  if (!dirlist)
535  return FcFalse;
536 
537  while ((dir = FcStrListNext (dirlist)))
538  {
539  if (FcDebug () & FC_DBG_FONTSET)
540  printf ("adding fonts from %s\n", dir);
542  if (!cache)
543  continue;
544  FcConfigAddCache (config, cache, set, dirSet, dir);
546  }
547  FcStrListDone (dirlist);
548  return FcTrue;
549 }
550 
551 /*
552  * Scan the current list of directories in the configuration
553  * and build the set of available fonts.
554  */
555 
556 FcBool
558 {
559  FcFontSet *fonts;
560  FcBool ret = FcTrue;
561 
563  if (!config)
564  return FcFalse;
565 
566  fonts = FcFontSetCreate ();
567  if (!fonts)
568  {
569  ret = FcFalse;
570  goto bail;
571  }
572 
574 
575  if (!FcConfigAddDirList (config, FcSetSystem, config->fontDirs))
576  {
577  ret = FcFalse;
578  goto bail;
579  }
580  if (FcDebug () & FC_DBG_FONTSET)
582 bail:
584 
585  return ret;
586 }
587 
588 FcBool
590 {
591  FcConfig *cfg;
592 
593  if (config)
594  {
595  if (!config->fonts[FcSetSystem])
596  if (!FcConfigBuildFonts (config))
597  return FcFalse;
598  FcRefInc (&config->ref);
599  }
600 
601  lock_config ();
602 retry:
603  cfg = fc_atomic_ptr_get (&_fcConfig);
604 
605  if (config == cfg)
606  {
607  unlock_config ();
608  if (config)
610  return FcTrue;
611  }
612 
613  if (!fc_atomic_ptr_cmpexch (&_fcConfig, cfg, config))
614  goto retry;
615  unlock_config ();
616  if (cfg)
617  FcConfigDestroy (cfg);
618 
619  return FcTrue;
620 }
621 
622 FcConfig *
624 {
625  return FcConfigEnsure ();
626 }
627 
628 FcBool
630  const FcChar8 *d)
631 {
632  return FcStrSetAddFilename (config->configDirs, d);
633 }
634 
635 FcStrList *
637 {
638  FcStrList *ret;
639 
641  if (!config)
642  return NULL;
643  ret = FcStrListCreate (config->configDirs);
645 
646  return ret;
647 }
648 
649 FcBool
651  const FcChar8 *d,
652  const FcChar8 *m,
653  const FcChar8 *salt)
654 {
655  if (FcDebug() & FC_DBG_CACHE)
656  {
657  if (m)
658  {
659  printf ("%s -> %s%s%s%s\n", d, m, salt ? " (salt: " : "", salt ? (const char *)salt : "", salt ? ")" : "");
660  }
661  else if (salt)
662  {
663  printf ("%s%s%s%s\n", d, salt ? " (salt: " : "", salt ? (const char *)salt : "", salt ? ")" : "");
664  }
665  }
666  return FcStrSetAddFilenamePairWithSalt (config->fontDirs, d, m, salt);
667 }
668 
669 FcBool
671 {
672  if (FcDebug() & FC_DBG_CACHE)
673  {
674  printf ("Reset font directories!\n");
675  }
676  return FcStrSetDeleteAll (config->fontDirs);
677 }
678 
679 FcStrList *
681 {
682  FcStrList *ret;
683 
685  if (!config)
686  return NULL;
687  ret = FcStrListCreate (config->fontDirs);
689 
690  return ret;
691 }
692 
693 static FcBool
695  const FcChar8 *start)
696 {
697  int len = strlen((char *) start);
698 
699  if (strncmp((char *) path, (char *) start, len) != 0)
700  return FcFalse;
701 
702  switch (path[len]) {
703  case '\0':
704  case FC_DIR_SEPARATOR:
705  return FcTrue;
706  default:
707  return FcFalse;
708  }
709 }
710 
711 FcChar8 *
713  const FcChar8 *path)
714 {
715  FcStrList *list;
716  FcChar8 *dir;
717  const FcChar8 *map, *rpath;
718  FcChar8 *retval;
719 
721  if (!list)
722  return 0;
723  while ((dir = FcStrListNext(list)))
725  break;
727  if (!dir)
728  return 0;
730  if (!map)
731  return 0;
732  rpath = path + strlen ((char *) dir);
733  while (*rpath == '/')
734  rpath++;
735  retval = FcStrBuildFilename(map, rpath, NULL);
736  if (retval)
737  {
738  size_t len = strlen ((const char *) retval);
739  while (len > 0 && retval[len-1] == '/')
740  len--;
741  /* trim the last slash */
742  retval[len] = 0;
743  }
744  return retval;
745 }
746 
747 const FcChar8 *
749  const FcChar8 *path)
750 {
751  FcStrList *list;
752  FcChar8 *dir;
753 
755  if (!list)
756  return NULL;
757  while ((dir = FcStrListNext (list)))
759  break;
761  if (!dir)
762  return NULL;
763 
764  return FcStrTripleThird (dir);
765 }
766 
767 FcBool
769  const FcChar8 *d)
770 {
771  return FcStrSetAddFilename (config->cacheDirs, d);
772 }
773 
774 FcStrList *
776 {
777  FcStrList *ret;
778 
780  if (!config)
781  return NULL;
782  ret = FcStrListCreate (config->cacheDirs);
784 
785  return ret;
786 }
787 
788 FcBool
790  const FcChar8 *f)
791 {
792  FcBool ret;
794 
795  if (!file)
796  return FcFalse;
797 
798  ret = FcStrSetAdd (config->configFiles, file);
799  FcStrFree (file);
800  return ret;
801 }
802 
803 FcStrList *
805 {
806  FcStrList *ret;
807 
809  if (!config)
810  return NULL;
811  ret = FcStrListCreate (config->configFiles);
813 
814  return ret;
815 }
816 
817 FcChar8 *
819 {
820  return NULL;
821 }
822 
823 FcFontSet *
825  FcSetName set)
826 {
827  if (!config)
828  {
830  if (!config)
831  return 0;
832  }
833  return config->fonts[set];
834 }
835 
836 void
838  FcFontSet *fonts,
839  FcSetName set)
840 {
841  if (config->fonts[set])
842  FcFontSetDestroy (config->fonts[set]);
843  config->fonts[set] = fonts;
844 }
845 
846 
847 FcBlanks *
849 {
850  /* Deprecated. */
851  return NULL;
852 }
853 
854 void
856 {
857  /* Deprecated. */
858 }
859 
860 FcBool
862 {
863  /* Deprecated. */
864  return FcFalse;
865 }
866 
867 FcBool
869 {
870  /* Deprecated. */
871  return FcFalse;
872 }
873 
874 FcBlanks *
876 {
877  /* Deprecated. */
878  return NULL;
879 }
880 
881 FcBool
884 {
885  /* Deprecated. */
886  return FcFalse;
887 }
888 
889 
890 int
892 {
893  int ret;
894 
896  if (!config)
897  return 0;
898  ret = config->rescanInterval;
900 
901  return ret;
902 }
903 
904 FcBool
906 {
908  if (!config)
909  return FcFalse;
910  config->rescanInterval = rescanInterval;
912 
913  return FcTrue;
914 }
915 
916 /*
917  * A couple of typos escaped into the library
918  */
919 int
921 {
923 }
924 
925 FcBool
927 {
928  return FcConfigSetRescanInterval (config, rescanInterval);
929 }
930 
931 FcBool
933  FcRule *rule,
935 {
936  /* deprecated */
937  return FcFalse;
938 }
939 
940 static FcValue
942 {
943  switch (v.type)
944  {
945  case FcTypeInteger:
946  v.type = FcTypeDouble;
947  v.u.d = (double) v.u.i;
948  /* Fallthrough */
949  case FcTypeDouble:
950  if (u.type == FcTypeRange && buf)
951  {
952  v.u.r = FcRangePromote (v.u.d, buf);
953  v.type = FcTypeRange;
954  }
955  break;
956  case FcTypeVoid:
957  if (u.type == FcTypeMatrix)
958  {
959  v.u.m = &FcIdentityMatrix;
960  v.type = FcTypeMatrix;
961  }
962  else if (u.type == FcTypeLangSet && buf)
963  {
964  v.u.l = FcLangSetPromote (NULL, buf);
965  v.type = FcTypeLangSet;
966  }
967  else if (u.type == FcTypeCharSet && buf)
968  {
969  v.u.c = FcCharSetPromote (buf);
970  v.type = FcTypeCharSet;
971  }
972  break;
973  case FcTypeString:
974  if (u.type == FcTypeLangSet && buf)
975  {
976  v.u.l = FcLangSetPromote (v.u.s, buf);
977  v.type = FcTypeLangSet;
978  }
979  break;
980  default:
981  break;
982  }
983  return v;
984 }
985 
986 FcBool
988  unsigned int op_,
989  const FcValue *right_o)
990 {
991  FcValue left;
992  FcValue right;
993  FcBool ret = FcFalse;
994  FcOp op = FC_OP_GET_OP (op_);
995  int flags = FC_OP_GET_FLAGS (op_);
996 
997  if (left_o->type != right_o->type)
998  {
999  left = FcValueCanonicalize(left_o);
1000  right = FcValueCanonicalize(right_o);
1001  FcValuePromotionBuffer buf1, buf2;
1002  left = FcConfigPromote (left, right, &buf1);
1003  right = FcConfigPromote (right, left, &buf2);
1004  left_o = &left;
1005  right_o = &right;
1006  if (left_o->type != right_o->type)
1007  {
1008  if (op == FcOpNotEqual || op == FcOpNotContains)
1009  ret = FcTrue;
1010  return ret;
1011  }
1012  }
1013  switch (left_o->type) {
1014  case FcTypeUnknown:
1015  break; /* No way to guess how to compare for this object */
1016  case FcTypeInteger: {
1017  int l = left_o->u.i;
1018  int r = right_o->u.i;
1019  switch ((int) op) {
1020  case FcOpEqual:
1021  case FcOpContains:
1022  case FcOpListing:
1023  ret = l == r;
1024  break;
1025  case FcOpNotEqual:
1026  case FcOpNotContains:
1027  ret = l != r;
1028  break;
1029  case FcOpLess:
1030  ret = l < r;
1031  break;
1032  case FcOpLessEqual:
1033  ret = l <= r;
1034  break;
1035  case FcOpMore:
1036  ret = l > r;
1037  break;
1038  case FcOpMoreEqual:
1039  ret = l >= r;
1040  break;
1041  default:
1042  break;
1043  }
1044  break;
1045  }
1046  case FcTypeDouble: {
1047  double l = left_o->u.d;
1048  double r = right_o->u.d;
1049  switch ((int) op) {
1050  case FcOpEqual:
1051  case FcOpContains:
1052  case FcOpListing:
1053  ret = l == r;
1054  break;
1055  case FcOpNotEqual:
1056  case FcOpNotContains:
1057  ret = l != r;
1058  break;
1059  case FcOpLess:
1060  ret = l < r;
1061  break;
1062  case FcOpLessEqual:
1063  ret = l <= r;
1064  break;
1065  case FcOpMore:
1066  ret = l > r;
1067  break;
1068  case FcOpMoreEqual:
1069  ret = l >= r;
1070  break;
1071  default:
1072  break;
1073  }
1074  break;
1075  }
1076  case FcTypeBool: {
1077  FcBool l = left_o->u.b;
1078  FcBool r = right_o->u.b;
1079  switch ((int) op) {
1080  case FcOpEqual:
1081  ret = l == r;
1082  break;
1083  case FcOpContains:
1084  case FcOpListing:
1085  ret = l == r || l >= FcDontCare;
1086  break;
1087  case FcOpNotEqual:
1088  ret = l != r;
1089  break;
1090  case FcOpNotContains:
1091  ret = !(l == r || l >= FcDontCare);
1092  break;
1093  case FcOpLess:
1094  ret = l != r && r >= FcDontCare;
1095  break;
1096  case FcOpLessEqual:
1097  ret = l == r || r >= FcDontCare;
1098  break;
1099  case FcOpMore:
1100  ret = l != r && l >= FcDontCare;
1101  break;
1102  case FcOpMoreEqual:
1103  ret = l == r || l >= FcDontCare;
1104  break;
1105  default:
1106  break;
1107  }
1108  break;
1109  }
1110  case FcTypeString: {
1111  const FcChar8 *l = FcValueString (left_o);
1112  const FcChar8 *r = FcValueString (right_o);
1113  switch ((int) op) {
1114  case FcOpEqual:
1115  case FcOpListing:
1117  ret = FcStrCmpIgnoreBlanksAndCase (l, r) == 0;
1118  else
1119  ret = FcStrCmpIgnoreCase (l, r) == 0;
1120  break;
1121  case FcOpContains:
1122  ret = FcStrStrIgnoreCase (l, r) != 0;
1123  break;
1124  case FcOpNotEqual:
1126  ret = FcStrCmpIgnoreBlanksAndCase (l, r) != 0;
1127  else
1128  ret = FcStrCmpIgnoreCase (l, r) != 0;
1129  break;
1130  case FcOpNotContains:
1131  ret = FcStrStrIgnoreCase (l, r) == 0;
1132  break;
1133  default:
1134  break;
1135  }
1136  break;
1137  }
1138  case FcTypeMatrix: {
1139  switch ((int) op) {
1140  case FcOpEqual:
1141  case FcOpContains:
1142  case FcOpListing:
1143  ret = FcMatrixEqual (left_o->u.m, right_o->u.m);
1144  break;
1145  case FcOpNotEqual:
1146  case FcOpNotContains:
1147  ret = !FcMatrixEqual (left_o->u.m, right_o->u.m);
1148  break;
1149  default:
1150  break;
1151  }
1152  break;
1153  }
1154  case FcTypeCharSet: {
1155  const FcCharSet *l = FcValueCharSet (left_o);
1156  const FcCharSet *r = FcValueCharSet (right_o);
1157  switch ((int) op) {
1158  case FcOpContains:
1159  case FcOpListing:
1160  /* left contains right if right is a subset of left */
1161  ret = FcCharSetIsSubset (r, l);
1162  break;
1163  case FcOpNotContains:
1164  /* left contains right if right is a subset of left */
1165  ret = !FcCharSetIsSubset (r, l);
1166  break;
1167  case FcOpEqual:
1168  ret = FcCharSetEqual (l, r);
1169  break;
1170  case FcOpNotEqual:
1171  ret = !FcCharSetEqual (l, r);
1172  break;
1173  default:
1174  break;
1175  }
1176  break;
1177  }
1178  case FcTypeLangSet: {
1179  const FcLangSet *l = FcValueLangSet (left_o);
1180  const FcLangSet *r = FcValueLangSet (right_o);
1181  switch ((int) op) {
1182  case FcOpContains:
1183  case FcOpListing:
1184  ret = FcLangSetContains (l, r);
1185  break;
1186  case FcOpNotContains:
1187  ret = !FcLangSetContains (l, r);
1188  break;
1189  case FcOpEqual:
1190  ret = FcLangSetEqual (l, r);
1191  break;
1192  case FcOpNotEqual:
1193  ret = !FcLangSetEqual (l, r);
1194  break;
1195  default:
1196  break;
1197  }
1198  break;
1199  }
1200  case FcTypeVoid:
1201  switch ((int) op) {
1202  case FcOpEqual:
1203  case FcOpContains:
1204  case FcOpListing:
1205  ret = FcTrue;
1206  break;
1207  default:
1208  break;
1209  }
1210  break;
1211  case FcTypeFTFace:
1212  switch ((int) op) {
1213  case FcOpEqual:
1214  case FcOpContains:
1215  case FcOpListing:
1216  ret = left_o->u.f == right_o->u.f;
1217  break;
1218  case FcOpNotEqual:
1219  case FcOpNotContains:
1220  ret = left_o->u.f != right_o->u.f;
1221  break;
1222  default:
1223  break;
1224  }
1225  break;
1226  case FcTypeRange: {
1227  const FcRange *l = FcValueRange (left_o);
1228  const FcRange *r = FcValueRange (right_o);
1229  ret = FcRangeCompare (op, l, r);
1230  break;
1231  }
1232  }
1233  return ret;
1234 }
1235 
1236 
1237 #define _FcDoubleFloor(d) ((int) (d))
1238 #define _FcDoubleCeil(d) ((double) (int) (d) == (d) ? (int) (d) : (int) ((d) + 1))
1239 #define FcDoubleFloor(d) ((d) >= 0 ? _FcDoubleFloor(d) : -_FcDoubleCeil(-(d)))
1240 #define FcDoubleCeil(d) ((d) >= 0 ? _FcDoubleCeil(d) : -_FcDoubleFloor(-(d)))
1241 #define FcDoubleRound(d) FcDoubleFloor ((d) + 0.5)
1242 #define FcDoubleTrunc(d) ((d) >= 0 ? _FcDoubleFloor (d) : -_FcDoubleFloor (-(d)))
1243 
1244 static FcValue
1246 {
1247  FcValue v, vl, vr, vle, vre;
1248  FcMatrix *m;
1249  FcChar8 *str;
1250  FcOp op = FC_OP_GET_OP (e->op);
1251  FcValuePromotionBuffer buf1, buf2;
1252 
1253  switch ((int) op) {
1254  case FcOpInteger:
1255  v.type = FcTypeInteger;
1256  v.u.i = e->u.ival;
1257  break;
1258  case FcOpDouble:
1259  v.type = FcTypeDouble;
1260  v.u.d = e->u.dval;
1261  break;
1262  case FcOpString:
1263  v.type = FcTypeString;
1264  v.u.s = e->u.sval;
1265  v = FcValueSave (v);
1266  break;
1267  case FcOpMatrix:
1268  {
1269  FcMatrix m;
1270  FcValue xx, xy, yx, yy;
1271  v.type = FcTypeMatrix;
1272  xx = FcConfigPromote (FcConfigEvaluate (p, p_pat, kind, e->u.mexpr->xx), v, NULL);
1273  xy = FcConfigPromote (FcConfigEvaluate (p, p_pat, kind, e->u.mexpr->xy), v, NULL);
1274  yx = FcConfigPromote (FcConfigEvaluate (p, p_pat, kind, e->u.mexpr->yx), v, NULL);
1275  yy = FcConfigPromote (FcConfigEvaluate (p, p_pat, kind, e->u.mexpr->yy), v, NULL);
1276  if (xx.type == FcTypeDouble && xy.type == FcTypeDouble &&
1277  yx.type == FcTypeDouble && yy.type == FcTypeDouble)
1278  {
1279  m.xx = xx.u.d;
1280  m.xy = xy.u.d;
1281  m.yx = yx.u.d;
1282  m.yy = yy.u.d;
1283  v.u.m = &m;
1284  }
1285  else
1286  v.type = FcTypeVoid;
1287  v = FcValueSave (v);
1288  }
1289  break;
1290  case FcOpCharSet:
1291  v.type = FcTypeCharSet;
1292  v.u.c = e->u.cval;
1293  v = FcValueSave (v);
1294  break;
1295  case FcOpLangSet:
1296  v.type = FcTypeLangSet;
1297  v.u.l = e->u.lval;
1298  v = FcValueSave (v);
1299  break;
1300  case FcOpRange:
1301  v.type = FcTypeRange;
1302  v.u.r = e->u.rval;
1303  v = FcValueSave (v);
1304  break;
1305  case FcOpBool:
1306  v.type = FcTypeBool;
1307  v.u.b = e->u.bval;
1308  break;
1309  case FcOpField:
1310  if (kind == FcMatchFont && e->u.name.kind == FcMatchPattern)
1311  {
1312  if (FcResultMatch != FcPatternObjectGet (p_pat, e->u.name.object, 0, &v))
1313  v.type = FcTypeVoid;
1314  }
1315  else if (kind == FcMatchPattern && e->u.name.kind == FcMatchFont)
1316  {
1317  fprintf (stderr,
1318  "Fontconfig warning: <name> tag has target=\"font\" in a <match target=\"pattern\">.\n");
1319  v.type = FcTypeVoid;
1320  }
1321  else
1322  {
1323  if (FcResultMatch != FcPatternObjectGet (p, e->u.name.object, 0, &v))
1324  v.type = FcTypeVoid;
1325  }
1326  v = FcValueSave (v);
1327  break;
1328  case FcOpConst:
1329  if (FcNameConstant (e->u.constant, &v.u.i))
1330  v.type = FcTypeInteger;
1331  else
1332  v.type = FcTypeVoid;
1333  break;
1334  case FcOpQuest:
1335  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1336  if (vl.type == FcTypeBool)
1337  {
1338  if (vl.u.b)
1339  v = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right->u.tree.left);
1340  else
1341  v = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right->u.tree.right);
1342  }
1343  else
1344  v.type = FcTypeVoid;
1345  FcValueDestroy (vl);
1346  break;
1347  case FcOpEqual:
1348  case FcOpNotEqual:
1349  case FcOpLess:
1350  case FcOpLessEqual:
1351  case FcOpMore:
1352  case FcOpMoreEqual:
1353  case FcOpContains:
1354  case FcOpNotContains:
1355  case FcOpListing:
1356  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1357  vr = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right);
1358  v.type = FcTypeBool;
1359  v.u.b = FcConfigCompareValue (&vl, e->op, &vr);
1360  FcValueDestroy (vl);
1361  FcValueDestroy (vr);
1362  break;
1363  case FcOpOr:
1364  case FcOpAnd:
1365  case FcOpPlus:
1366  case FcOpMinus:
1367  case FcOpTimes:
1368  case FcOpDivide:
1369  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1370  vr = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right);
1371  vle = FcConfigPromote (vl, vr, &buf1);
1372  vre = FcConfigPromote (vr, vle, &buf2);
1373  if (vle.type == vre.type)
1374  {
1375  switch ((int) vle.type) {
1376  case FcTypeDouble:
1377  switch ((int) op) {
1378  case FcOpPlus:
1379  v.type = FcTypeDouble;
1380  v.u.d = vle.u.d + vre.u.d;
1381  break;
1382  case FcOpMinus:
1383  v.type = FcTypeDouble;
1384  v.u.d = vle.u.d - vre.u.d;
1385  break;
1386  case FcOpTimes:
1387  v.type = FcTypeDouble;
1388  v.u.d = vle.u.d * vre.u.d;
1389  break;
1390  case FcOpDivide:
1391  v.type = FcTypeDouble;
1392  v.u.d = vle.u.d / vre.u.d;
1393  break;
1394  default:
1395  v.type = FcTypeVoid;
1396  break;
1397  }
1398  if (v.type == FcTypeDouble &&
1399  v.u.d == (double) (int) v.u.d)
1400  {
1401  v.type = FcTypeInteger;
1402  v.u.i = (int) v.u.d;
1403  }
1404  break;
1405  case FcTypeBool:
1406  switch ((int) op) {
1407  case FcOpOr:
1408  v.type = FcTypeBool;
1409  v.u.b = vle.u.b || vre.u.b;
1410  break;
1411  case FcOpAnd:
1412  v.type = FcTypeBool;
1413  v.u.b = vle.u.b && vre.u.b;
1414  break;
1415  default:
1416  v.type = FcTypeVoid;
1417  break;
1418  }
1419  break;
1420  case FcTypeString:
1421  switch ((int) op) {
1422  case FcOpPlus:
1423  v.type = FcTypeString;
1424  str = FcStrPlus (vle.u.s, vre.u.s);
1425  v.u.s = FcStrdup (str);
1426  FcStrFree (str);
1427 
1428  if (!v.u.s)
1429  v.type = FcTypeVoid;
1430  break;
1431  default:
1432  v.type = FcTypeVoid;
1433  break;
1434  }
1435  break;
1436  case FcTypeMatrix:
1437  switch ((int) op) {
1438  case FcOpTimes:
1439  v.type = FcTypeMatrix;
1440  m = malloc (sizeof (FcMatrix));
1441  if (m)
1442  {
1443  FcMatrixMultiply (m, vle.u.m, vre.u.m);
1444  v.u.m = m;
1445  }
1446  else
1447  {
1448  v.type = FcTypeVoid;
1449  }
1450  break;
1451  default:
1452  v.type = FcTypeVoid;
1453  break;
1454  }
1455  break;
1456  case FcTypeCharSet:
1457  switch ((int) op) {
1458  case FcOpPlus:
1459  v.type = FcTypeCharSet;
1460  v.u.c = FcCharSetUnion (vle.u.c, vre.u.c);
1461  if (!v.u.c)
1462  v.type = FcTypeVoid;
1463  break;
1464  case FcOpMinus:
1465  v.type = FcTypeCharSet;
1466  v.u.c = FcCharSetSubtract (vle.u.c, vre.u.c);
1467  if (!v.u.c)
1468  v.type = FcTypeVoid;
1469  break;
1470  default:
1471  v.type = FcTypeVoid;
1472  break;
1473  }
1474  break;
1475  case FcTypeLangSet:
1476  switch ((int) op) {
1477  case FcOpPlus:
1478  v.type = FcTypeLangSet;
1479  v.u.l = FcLangSetUnion (vle.u.l, vre.u.l);
1480  if (!v.u.l)
1481  v.type = FcTypeVoid;
1482  break;
1483  case FcOpMinus:
1484  v.type = FcTypeLangSet;
1485  v.u.l = FcLangSetSubtract (vle.u.l, vre.u.l);
1486  if (!v.u.l)
1487  v.type = FcTypeVoid;
1488  break;
1489  default:
1490  v.type = FcTypeVoid;
1491  break;
1492  }
1493  break;
1494  default:
1495  v.type = FcTypeVoid;
1496  break;
1497  }
1498  }
1499  else
1500  v.type = FcTypeVoid;
1501  FcValueDestroy (vl);
1502  FcValueDestroy (vr);
1503  break;
1504  case FcOpNot:
1505  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1506  switch ((int) vl.type) {
1507  case FcTypeBool:
1508  v.type = FcTypeBool;
1509  v.u.b = !vl.u.b;
1510  break;
1511  default:
1512  v.type = FcTypeVoid;
1513  break;
1514  }
1515  FcValueDestroy (vl);
1516  break;
1517  case FcOpFloor:
1518  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1519  switch ((int) vl.type) {
1520  case FcTypeInteger:
1521  v = vl;
1522  break;
1523  case FcTypeDouble:
1524  v.type = FcTypeInteger;
1525  v.u.i = FcDoubleFloor (vl.u.d);
1526  break;
1527  default:
1528  v.type = FcTypeVoid;
1529  break;
1530  }
1531  FcValueDestroy (vl);
1532  break;
1533  case FcOpCeil:
1534  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1535  switch ((int) vl.type) {
1536  case FcTypeInteger:
1537  v = vl;
1538  break;
1539  case FcTypeDouble:
1540  v.type = FcTypeInteger;
1541  v.u.i = FcDoubleCeil (vl.u.d);
1542  break;
1543  default:
1544  v.type = FcTypeVoid;
1545  break;
1546  }
1547  FcValueDestroy (vl);
1548  break;
1549  case FcOpRound:
1550  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1551  switch ((int) vl.type) {
1552  case FcTypeInteger:
1553  v = vl;
1554  break;
1555  case FcTypeDouble:
1556  v.type = FcTypeInteger;
1557  v.u.i = FcDoubleRound (vl.u.d);
1558  break;
1559  default:
1560  v.type = FcTypeVoid;
1561  break;
1562  }
1563  FcValueDestroy (vl);
1564  break;
1565  case FcOpTrunc:
1566  vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1567  switch ((int) vl.type) {
1568  case FcTypeInteger:
1569  v = vl;
1570  break;
1571  case FcTypeDouble:
1572  v.type = FcTypeInteger;
1573  v.u.i = FcDoubleTrunc (vl.u.d);
1574  break;
1575  default:
1576  v.type = FcTypeVoid;
1577  break;
1578  }
1579  FcValueDestroy (vl);
1580  break;
1581  default:
1582  v.type = FcTypeVoid;
1583  break;
1584  }
1585  return v;
1586 }
1587 
1588 /* The bulk of the time in FcConfigSubstitute is spent walking
1589  * lists of family names. We speed this up with a hash table.
1590  * Since we need to take the ignore-blanks option into account,
1591  * we use two separate hash tables.
1592  */
1593 typedef struct
1594 {
1595  int count;
1597 
1598 
1599 typedef struct
1600 {
1603 } FamilyTable;
1604 
1605 static FcBool
1607  FcOp _op,
1608  const FcChar8 *s)
1609 {
1610  FamilyTableEntry *fe;
1611  int flags = FC_OP_GET_FLAGS (_op);
1612  FcHashTable *hash;
1613 
1615  hash = table->family_blank_hash;
1616  else
1617  hash = table->family_hash;
1618 
1619  return FcHashTableFind (hash, (const void *)s, (void **)&fe);
1620 }
1621 
1622 static void
1625 {
1626  FcValueListPtr ll;
1627  for (ll = values; ll; ll = FcValueListNext (ll))
1628  {
1629  const FcChar8 *s = FcValueString (&ll->value);
1630  FamilyTableEntry *fe;
1631 
1632  if (!FcHashTableFind (table->family_hash, (const void *)s, (void **)&fe))
1633  {
1634  fe = malloc (sizeof (FamilyTableEntry));
1635  fe->count = 0;
1636  FcHashTableAdd (table->family_hash, (void *)s, fe);
1637  }
1638  fe->count++;
1639 
1640  if (!FcHashTableFind (table->family_blank_hash, (const void *)s, (void **)&fe))
1641  {
1642  fe = malloc (sizeof (FamilyTableEntry));
1643  fe->count = 0;
1644  FcHashTableAdd (table->family_blank_hash, (void *)s, fe);
1645  }
1646  fe->count++;
1647  }
1648 }
1649 
1650 static void
1652  const FcChar8 *s)
1653 {
1654  FamilyTableEntry *fe;
1655 
1656  if (FcHashTableFind (table->family_hash, (void *)s, (void **)&fe))
1657  {
1658  fe->count--;
1659  if (fe->count == 0)
1660  FcHashTableRemove (table->family_hash, (void *)s);
1661  }
1662 
1663  if (FcHashTableFind (table->family_blank_hash, (void *)s, (void **)&fe))
1664  {
1665  fe->count--;
1666  if (fe->count == 0)
1667  FcHashTableRemove (table->family_blank_hash, (void *)s);
1668  }
1669 }
1670 
1671 static FcBool
1672 copy_string (const void *src, void **dest)
1673 {
1674  *dest = strdup ((char *)src);
1675  return FcTrue;
1676 }
1677 
1678 static void
1680  FcPattern *p)
1681 {
1682  FcPatternElt *e;
1683 
1687  NULL,
1688  free,
1689  free);
1693  NULL,
1694  free,
1695  free);
1696  e = FcPatternObjectFindElt (p, FC_FAMILY_OBJECT);
1697  if (e)
1699 }
1700 
1701 static void
1703 {
1704  if (table->family_blank_hash)
1705  FcHashTableDestroy (table->family_blank_hash);
1706  if (table->family_hash)
1707  FcHashTableDestroy (table->family_hash);
1708 }
1709 
1710 static FcValueList *
1712  FcPattern *p_pat,
1713  FcMatchKind kind,
1714  FcTest *t,
1716  FamilyTable *table)
1717 {
1718  FcValueList *ret = 0;
1719  FcExpr *e = t->expr;
1720  FcValue value;
1721  FcValueList *v;
1722 
1723  while (e)
1724  {
1725  /* Compute the value of the match expression */
1726  if (FC_OP_GET_OP (e->op) == FcOpComma)
1727  {
1728  value = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1729  e = e->u.tree.right;
1730  }
1731  else
1732  {
1733  value = FcConfigEvaluate (p, p_pat, kind, e);
1734  e = 0;
1735  }
1736 
1737  if (t->object == FC_FAMILY_OBJECT && table)
1738  {
1739  if (!FamilyTableLookup (table, t->op, FcValueString (&value)))
1740  {
1741  ret = 0;
1742  goto done;
1743  }
1744  }
1745  for (v = values; v; v = FcValueListNext(v))
1746  {
1747  /* Compare the pattern value to the match expression value */
1748  if (FcConfigCompareValue (&v->value, t->op, &value))
1749  {
1750  if (!ret)
1751  ret = v;
1752  if (t->qual != FcQualAll)
1753  break;
1754  }
1755  else
1756  {
1757  if (t->qual == FcQualAll)
1758  {
1759  ret = 0;
1760  break;
1761  }
1762  }
1763  }
1764 done:
1766  }
1767  return ret;
1768 }
1769 
1770 static FcValueList *
1772 {
1773  FcValueList *l;
1774 
1775  if (!e)
1776  return 0;
1777  l = (FcValueList *) malloc (sizeof (FcValueList));
1778  if (!l)
1779  return 0;
1780  if (FC_OP_GET_OP (e->op) == FcOpComma)
1781  {
1782  l->value = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
1783  l->next = FcConfigValues (p, p_pat, kind, e->u.tree.right, binding);
1784  }
1785  else
1786  {
1787  l->value = FcConfigEvaluate (p, p_pat, kind, e);
1788  l->next = NULL;
1789  }
1790  l->binding = binding;
1791  if (l->value.type == FcTypeVoid)
1792  {
1794 
1795  free (l);
1796  l = next;
1797  }
1798 
1799  return l;
1800 }
1801 
1802 static FcBool
1805  FcBool append,
1806  FcValueList *new,
1807  FcObject object,
1808  FamilyTable *table)
1809 {
1810  FcValueListPtr *prev, l, last, v;
1811  FcValueBinding sameBinding;
1812 
1813  /*
1814  * Make sure the stored type is valid for built-in objects
1815  */
1816  for (l = new; l != NULL; l = FcValueListNext (l))
1817  {
1818  if (!FcObjectValidType (object, l->value.type))
1819  {
1820  fprintf (stderr,
1821  "Fontconfig warning: FcPattern object %s does not accept value", FcObjectName (object));
1822  FcValuePrintFile (stderr, l->value);
1823  fprintf (stderr, "\n");
1824 
1825  if (FcDebug () & FC_DBG_EDIT)
1826  {
1827  printf ("Not adding\n");
1828  }
1829 
1830  return FcFalse;
1831  }
1832  }
1833 
1834  if (object == FC_FAMILY_OBJECT && table)
1835  {
1836  FamilyTableAdd (table, new);
1837  }
1838 
1839  if (position)
1840  sameBinding = position->binding;
1841  else
1842  sameBinding = FcValueBindingWeak;
1843  for (v = new; v != NULL; v = FcValueListNext(v))
1844  if (v->binding == FcValueBindingSame)
1845  v->binding = sameBinding;
1846  if (append)
1847  {
1848  if (position)
1849  prev = &position->next;
1850  else
1851  for (prev = head; *prev != NULL;
1852  prev = &(*prev)->next)
1853  ;
1854  }
1855  else
1856  {
1857  if (position)
1858  {
1859  for (prev = head; *prev != NULL;
1860  prev = &(*prev)->next)
1861  {
1862  if (*prev == position)
1863  break;
1864  }
1865  }
1866  else
1867  prev = head;
1868 
1869  if (FcDebug () & FC_DBG_EDIT)
1870  {
1871  if (*prev == NULL)
1872  printf ("position not on list\n");
1873  }
1874  }
1875 
1876  if (FcDebug () & FC_DBG_EDIT)
1877  {
1878  printf ("%s list before ", append ? "Append" : "Prepend");
1880  printf ("\n");
1881  }
1882 
1883  if (new)
1884  {
1885  last = new;
1886  while (last->next != NULL)
1887  last = last->next;
1888 
1889  last->next = *prev;
1890  *prev = new;
1891  }
1892 
1893  if (FcDebug () & FC_DBG_EDIT)
1894  {
1895  printf ("%s list after ", append ? "Append" : "Prepend");
1897  printf ("\n");
1898  }
1899 
1900  return FcTrue;
1901 }
1902 
1903 static void
1906  FcObject object,
1907  FamilyTable *table)
1908 {
1910 
1911  if (object == FC_FAMILY_OBJECT && table)
1912  {
1914  }
1915 
1916  for (prev = head; *prev != NULL; prev = &(*prev)->next)
1917  {
1918  if (*prev == position)
1919  {
1920  *prev = position->next;
1921  position->next = NULL;
1923  break;
1924  }
1925  }
1926 }
1927 
1928 static void
1930  FcObject object,
1931  FcValueList *list,
1932  FcBool append,
1933  FamilyTable *table)
1934 {
1935  if (list)
1936  {
1938 
1939  if (!e)
1940  return;
1941  FcConfigAdd (&e->values, 0, append, list, object, table);
1942  }
1943 }
1944 
1945 /*
1946  * Delete all values associated with a field
1947  */
1948 static void
1950  FcObject object,
1951  FamilyTable *table)
1952 {
1953  FcPatternElt *e = FcPatternObjectFindElt (p, object);
1954  if (!e)
1955  return;
1956  while (e->values != NULL)
1957  FcConfigDel (&e->values, e->values, object, table);
1958 }
1959 
1960 static void
1962  FcObject object)
1963 {
1964  FcPatternElt *e = FcPatternObjectFindElt (p, object);
1965  if (!e)
1966  return;
1967  if (e->values == NULL)
1968  FcPatternObjectDel (p, object);
1969 }
1970 
1971 FcBool
1973  FcPattern *p,
1974  FcPattern *p_pat,
1975  FcMatchKind kind)
1976 {
1977  FcValue v;
1978  FcPtrList *s;
1979  FcPtrListIter iter, iter2;
1980  FcRule *r;
1981  FcRuleSet *rs;
1982  FcValueList *l, **value = NULL, *vl;
1983  FcPattern *m;
1984  FcStrSet *strs;
1985  FcObject object = FC_INVALID_OBJECT;
1986  FcPatternElt **elt = NULL, *e;
1987  int i, nobjs;
1988  FcBool retval = FcTrue;
1989  FcTest **tst = NULL;
1990  FamilyTable data;
1991  FamilyTable *table = &data;
1992 
1993  if (kind < FcMatchKindBegin || kind >= FcMatchKindEnd)
1994  return FcFalse;
1995 
1997  if (!config)
1998  return FcFalse;
1999 
2000  s = config->subst[kind];
2001  if (kind == FcMatchPattern)
2002  {
2003  strs = FcGetDefaultLangs ();
2004  if (strs)
2005  {
2007  FcChar8 *lang;
2008  FcValue v;
2009  FcLangSet *lsund = FcLangSetCreate ();
2010 
2011  FcLangSetAdd (lsund, (const FcChar8 *)"und");
2013  while (l && (lang = FcStrListNext (l)))
2014  {
2015  FcPatternElt *e = FcPatternObjectFindElt (p, FC_LANG_OBJECT);
2016 
2017  if (e)
2018  {
2019  FcValueListPtr ll;
2020 
2021  for (ll = FcPatternEltValues (e); ll; ll = FcValueListNext (ll))
2022  {
2024 
2025  if (vv.type == FcTypeLangSet)
2026  {
2027  FcLangSet *ls = FcLangSetCreate ();
2028  FcBool b;
2029 
2030  FcLangSetAdd (ls, lang);
2031  b = FcLangSetContains (vv.u.l, ls);
2032  FcLangSetDestroy (ls);
2033  if (b)
2034  goto bail_lang;
2035  if (FcLangSetContains (vv.u.l, lsund))
2036  goto bail_lang;
2037  }
2038  else
2039  {
2040  if (FcStrCmpIgnoreCase (vv.u.s, lang) == 0)
2041  goto bail_lang;
2042  if (FcStrCmpIgnoreCase (vv.u.s, (const FcChar8 *)"und") == 0)
2043  goto bail_lang;
2044  }
2045  }
2046  }
2047  v.type = FcTypeString;
2048  v.u.s = lang;
2049 
2051  }
2052  bail_lang:
2053  FcStrListDone (l);
2054  FcLangSetDestroy (lsund);
2055  }
2056  if (FcPatternObjectGet (p, FC_PRGNAME_OBJECT, 0, &v) == FcResultNoMatch)
2057  {
2059  if (prgname)
2060  FcPatternObjectAddString (p, FC_PRGNAME_OBJECT, prgname);
2061  }
2062  }
2063 
2064  nobjs = FC_MAX_BASE_OBJECT + config->maxObjects + 2;
2065  value = (FcValueList **) malloc (SIZEOF_VOID_P * nobjs);
2066  if (!value)
2067  {
2068  retval = FcFalse;
2069  goto bail1;
2070  }
2071  elt = (FcPatternElt **) malloc (SIZEOF_VOID_P * nobjs);
2072  if (!elt)
2073  {
2074  retval = FcFalse;
2075  goto bail1;
2076  }
2077  tst = (FcTest **) malloc (SIZEOF_VOID_P * nobjs);
2078  if (!tst)
2079  {
2080  retval = FcFalse;
2081  goto bail1;
2082  }
2083 
2084  if (FcDebug () & FC_DBG_EDIT)
2085  {
2086  printf ("FcConfigSubstitute ");
2087  FcPatternPrint (p);
2088  }
2089 
2090  FamilyTableInit (&data, p);
2091 
2092  FcPtrListIterInit (s, &iter);
2093  for (; FcPtrListIterIsValid (s, &iter); FcPtrListIterNext (s, &iter))
2094  {
2095  rs = (FcRuleSet *) FcPtrListIterGetValue (s, &iter);
2096  if (FcDebug () & FC_DBG_EDIT)
2097  {
2098  printf ("\nRule Set: %s\n", rs->name);
2099  }
2100  FcPtrListIterInit (rs->subst[kind], &iter2);
2101  for (; FcPtrListIterIsValid (rs->subst[kind], &iter2); FcPtrListIterNext (rs->subst[kind], &iter2))
2102  {
2103  r = (FcRule *) FcPtrListIterGetValue (rs->subst[kind], &iter2);
2104  for (i = 0; i < nobjs; i++)
2105  {
2106  elt[i] = NULL;
2107  value[i] = NULL;
2108  tst[i] = NULL;
2109  }
2110  for (; r; r = r->next)
2111  {
2112  switch (r->type) {
2113  case FcRuleUnknown:
2114  /* shouldn't be reached */
2115  break;
2116  case FcRuleTest:
2117  object = FC_OBJ_ID (r->u.test->object);
2118  /*
2119  * Check the tests to see if
2120  * they all match the pattern
2121  */
2122  if (FcDebug () & FC_DBG_EDIT)
2123  {
2124  printf ("FcConfigSubstitute test ");
2125  FcTestPrint (r->u.test);
2126  }
2127  if (kind == FcMatchFont && r->u.test->kind == FcMatchPattern)
2128  {
2129  m = p_pat;
2130  table = NULL;
2131  }
2132  else
2133  {
2134  m = p;
2135  table = &data;
2136  }
2137  if (m)
2138  e = FcPatternObjectFindElt (m, r->u.test->object);
2139  else
2140  e = NULL;
2141  /* different 'kind' won't be the target of edit */
2142  if (!elt[object] && kind == r->u.test->kind)
2143  {
2144  elt[object] = e;
2145  tst[object] = r->u.test;
2146  }
2147  /*
2148  * If there's no such field in the font,
2149  * then FcQualAll matches while FcQualAny does not
2150  */
2151  if (!e)
2152  {
2153  if (r->u.test->qual == FcQualAll)
2154  {
2155  value[object] = NULL;
2156  continue;
2157  }
2158  else
2159  {
2160  if (FcDebug () & FC_DBG_EDIT)
2161  printf ("No match\n");
2162  goto bail;
2163  }
2164  }
2165  /*
2166  * Check to see if there is a match, mark the location
2167  * to apply match-relative edits
2168  */
2169  vl = FcConfigMatchValueList (m, p_pat, kind, r->u.test, e->values, table);
2170  /* different 'kind' won't be the target of edit */
2171  if (!value[object] && kind == r->u.test->kind)
2172  value[object] = vl;
2173  if (!vl ||
2174  (r->u.test->qual == FcQualFirst && vl != e->values) ||
2175  (r->u.test->qual == FcQualNotFirst && vl == e->values))
2176  {
2177  if (FcDebug () & FC_DBG_EDIT)
2178  printf ("No match\n");
2179  goto bail;
2180  }
2181  break;
2182  case FcRuleEdit:
2183  object = FC_OBJ_ID (r->u.edit->object);
2184  if (FcDebug () & FC_DBG_EDIT)
2185  {
2186  printf ("Substitute ");
2187  FcEditPrint (r->u.edit);
2188  printf ("\n\n");
2189  }
2190  /*
2191  * Evaluate the list of expressions
2192  */
2193  l = FcConfigValues (p, p_pat, kind, r->u.edit->expr, r->u.edit->binding);
2194  if (tst[object] && (tst[object]->kind == FcMatchFont || kind == FcMatchPattern))
2195  elt[object] = FcPatternObjectFindElt (p, tst[object]->object);
2196 
2197  switch (FC_OP_GET_OP (r->u.edit->op)) {
2198  case FcOpAssign:
2199  /*
2200  * If there was a test, then replace the matched
2201  * value with the new list of values
2202  */
2203  if (value[object])
2204  {
2205  FcValueList *thisValue = value[object];
2206  FcValueList *nextValue = l;
2207 
2208  /*
2209  * Append the new list of values after the current value
2210  */
2211  FcConfigAdd (&elt[object]->values, thisValue, FcTrue, l, r->u.edit->object, table);
2212  /*
2213  * Delete the marked value
2214  */
2215  if (thisValue)
2216  FcConfigDel (&elt[object]->values, thisValue, object, table);
2217  /*
2218  * Adjust a pointer into the value list to ensure
2219  * future edits occur at the same place
2220  */
2221  value[object] = nextValue;
2222  break;
2223  }
2224  /* fall through ... */
2225  case FcOpAssignReplace:
2226  /*
2227  * Delete all of the values and insert
2228  * the new set
2229  */
2230  FcConfigPatternDel (p, r->u.edit->object, table);
2231  FcConfigPatternAdd (p, r->u.edit->object, l, FcTrue, table);
2232  /*
2233  * Adjust a pointer into the value list as they no
2234  * longer point to anything valid
2235  */
2236  value[object] = NULL;
2237  break;
2238  case FcOpPrepend:
2239  if (value[object])
2240  {
2241  FcConfigAdd (&elt[object]->values, value[object], FcFalse, l, r->u.edit->object, table);
2242  break;
2243  }
2244  /* fall through ... */
2245  case FcOpPrependFirst:
2246  FcConfigPatternAdd (p, r->u.edit->object, l, FcFalse, table);
2247  break;
2248  case FcOpAppend:
2249  if (value[object])
2250  {
2251  FcConfigAdd (&elt[object]->values, value[object], FcTrue, l, r->u.edit->object, table);
2252  break;
2253  }
2254  /* fall through ... */
2255  case FcOpAppendLast:
2256  FcConfigPatternAdd (p, r->u.edit->object, l, FcTrue, table);
2257  break;
2258  case FcOpDelete:
2259  if (value[object])
2260  {
2261  FcConfigDel (&elt[object]->values, value[object], object, table);
2263  break;
2264  }
2265  /* fall through ... */
2266  case FcOpDeleteAll:
2267  FcConfigPatternDel (p, r->u.edit->object, table);
2269  break;
2270  default:
2272  break;
2273  }
2274  /*
2275  * Now go through the pattern and eliminate
2276  * any properties without data
2277  */
2278  FcConfigPatternCanon (p, r->u.edit->object);
2279 
2280  if (FcDebug () & FC_DBG_EDIT)
2281  {
2282  printf ("FcConfigSubstitute edit");
2283  FcPatternPrint (p);
2284  }
2285  break;
2286  }
2287  }
2288  bail:;
2289  }
2290  }
2291  if (FcDebug () & FC_DBG_EDIT)
2292  {
2293  printf ("FcConfigSubstitute done");
2294  FcPatternPrint (p);
2295  }
2296 bail1:
2298  if (elt)
2299  free (elt);
2300  if (value)
2301  free (value);
2302  if (tst)
2303  free (tst);
2305 
2306  return retval;
2307 }
2308 
2309 FcBool
2311  FcPattern *p,
2312  FcMatchKind kind)
2313 {
2314  return FcConfigSubstituteWithPat (config, p, 0, kind);
2315 }
2316 
2317 #if defined (_WIN32)
2318 
2319 static FcChar8 fontconfig_path[1000] = ""; /* MT-dontcare */
2320 FcChar8 fontconfig_instprefix[1000] = ""; /* MT-dontcare */
2321 
2322 # if (defined (PIC) || defined (DLL_EXPORT))
2323 
2324 #if 0
2325 BOOL WINAPI
2326 DllMain (HINSTANCE hinstDLL,
2327  DWORD fdwReason,
2328  LPVOID lpvReserved);
2329 
2330 BOOL WINAPI
2331 DllMain (HINSTANCE hinstDLL,
2332  DWORD fdwReason,
2333  LPVOID lpvReserved)
2334 {
2335  FcChar8 *p;
2336 
2337  switch (fdwReason) {
2338  case DLL_PROCESS_ATTACH:
2339  if (!GetModuleFileName ((HMODULE) hinstDLL, (LPCH) fontconfig_path,
2340  sizeof (fontconfig_path)))
2341  break;
2342 
2343  /* If the fontconfig DLL is in a "bin" or "lib" subfolder,
2344  * assume it's a Unix-style installation tree, and use
2345  * "etc/fonts" in there as FONTCONFIG_PATH. Otherwise use the
2346  * folder where the DLL is as FONTCONFIG_PATH.
2347  */
2348  p = (FcChar8 *) strrchr ((const char *) fontconfig_path, '\\');
2349  if (p)
2350  {
2351  *p = '\0';
2352  p = (FcChar8 *) strrchr ((const char *) fontconfig_path, '\\');
2353  if (p && (FcStrCmpIgnoreCase (p + 1, (const FcChar8 *) "bin") == 0 ||
2354  FcStrCmpIgnoreCase (p + 1, (const FcChar8 *) "lib") == 0))
2355  *p = '\0';
2356  strcat ((char *) fontconfig_instprefix, (char *) fontconfig_path);
2357  strcat ((char *) fontconfig_path, "\\etc\\fonts");
2358  }
2359  else
2360  fontconfig_path[0] = '\0';
2361 
2362  break;
2363  }
2364 
2365  return TRUE;
2366 }
2367 
2368 #endif /* 0 */
2369 # endif /* PIC */
2370 
2371 #undef FONTCONFIG_PATH
2372 
2373 #endif /* _WIN32 */
2374 
2375 #undef FONTCONFIG_FILE
2376 #define FONTCONFIG_FILE "fonts.conf"
2377 
2378 static FcChar8 *
2380 {
2381  FcChar8 *path;
2382  int size, osize;
2383 
2384  if (!dir)
2385  dir = (FcChar8 *) "";
2386 
2387  osize = strlen ((char *) dir) + 1 + strlen ((char *) file) + 1;
2388  /*
2389  * workaround valgrind warning because glibc takes advantage of how it knows memory is
2390  * allocated to implement strlen by reading in groups of 4
2391  */
2392  size = (osize + 3) & ~3;
2393 
2394  path = malloc (size);
2395  if (!path)
2396  return 0;
2397 
2398  strcpy ((char *) path, (const char *) dir);
2399  /* make sure there's a single separator */
2400 #ifdef _WIN32
2401  if ((!path[0] || (path[strlen((char *) path)-1] != '/' &&
2402  path[strlen((char *) path)-1] != '\\')) &&
2403  !(file[0] == '/' ||
2404  file[0] == '\\' ||
2405  (isalpha (file[0]) && file[1] == ':' && (file[2] == '/' || file[2] == '\\'))))
2406  strcat ((char *) path, "\\");
2407 #else
2408  if ((!path[0] || path[strlen((char *) path)-1] != '/') && file[0] != '/')
2409  strcat ((char *) path, "/");
2410  else
2411  osize--;
2412 #endif
2413  strcat ((char *) path, (char *) file);
2414 
2415  if (access ((char *) path, R_OK) == 0)
2416  return path;
2417 
2418  FcStrFree (path);
2419 
2420  return 0;
2421 }
2422 
2423 static FcChar8 **
2425 {
2426  FcChar8 **path;
2427  FcChar8 *env, *e, *colon;
2428  FcChar8 *dir;
2429  int npath;
2430  int i;
2431 
2432  npath = 2; /* default dir + null */
2433 /*
2434  I allow only one font config directory given by
2435  XE_FONTCONFIG_PATH or FONTCONFIG_PATH.
2436  Thus env = NULL in the following.
2437 */
2438 #if !defined(_WIN32)
2439  env = (FcChar8 *) getenv ("XE_FONTCONFIG_PATH_EXTRA");
2440  if (!env)
2441  env = (FcChar8 *) getenv ("FONTCONFIG_PATH_EXTRA");
2442  if (env)
2443  env = strdup(env);
2444  if (env)
2445  {
2446  e = env;
2447  npath++;
2448  while (*e)
2449  if (*e++ == FC_SEARCH_PATH_SEPARATOR)
2450  npath++;
2451  }
2452 #else
2453  env = NULL;
2454 #endif /* !_WIN32 */
2455  path = calloc (npath, sizeof (FcChar8 *));
2456  if (!path)
2457  goto bail0;
2458 
2459  for(i=0; i < npath; i++)
2460  path[i] = NULL;
2461 
2462  i = 0;
2463 
2464  if (env)
2465  {
2466  e = env;
2467  while (*e)
2468  {
2469  colon = (FcChar8 *) strchr ((char *) e, FC_SEARCH_PATH_SEPARATOR);
2470  if (!colon)
2471  colon = e + strlen ((char *) e);
2472  path[i] = malloc (colon - e + 1);
2473  if (!path[i])
2474  goto bail1;
2475  strncpy ((char *) path[i], (const char *) e, colon - e);
2476  path[i][colon - e] = '\0';
2477  if (*colon)
2478  e = colon + 1;
2479  else
2480  e = colon;
2481  i++;
2482  }
2483  free (env); /* because we strduped */
2484  }
2485 
2486 #ifdef _WIN32
2487  if (fontconfig_path[0] == '\0') {
2488  char *p;
2489 /*
2490 XE_FONTCONFIG_PATH precedes --ak
2491 */
2492  p = kpse_var_value("XE_FONTCONFIG_PATH");
2493  if(p == NULL)
2494  p = kpse_var_value("FONTCONFIG_PATH");
2495  if(p == NULL) {
2496  fprintf(stderr, "I cannot determine FONTCONFIG_PATH. ");
2497  fprintf(stderr, "Define FONTCONFIG_PATH in texmf.cnf.\n");
2498  exit(1);
2499  } else {
2500  strcpy(fontconfig_path, p);
2501  free(p);
2502  }
2503  }
2504 #endif
2505 
2506 #if defined(_WIN32)
2507  dir = (FcChar8 *) fontconfig_path;
2508 #else
2509  dir = (FcChar8 *) FONTCONFIG_PATH;
2510 #endif /* _WIN32 */
2511 
2512  path[i] = malloc (strlen ((char *) dir) + 1);
2513  if (!path[i])
2514  goto bail1;
2515  strcpy ((char *) path[i], (const char *) dir);
2516  return path;
2517 
2518 bail1:
2519  for (i = 0; path[i]; i++)
2520  free (path[i]);
2521  free (path);
2522 bail0:
2523  return 0;
2524 }
2525 
2526 static void
2528 {
2529  FcChar8 **p;
2530 
2531  for (p = path; *p; p++)
2532  free (*p);
2533  free (path);
2534 }
2535 
2536 #ifdef _WIN32
2538 #else
2539 static FcBool _FcConfigHomeEnabled = FcTrue; /* MT-goodenough */
2540 #endif
2541 
2542 FcChar8 *
2544 {
2545 #ifdef _WIN32
2546  return NULL;
2547 #endif
2548 
2550  {
2551  char *home = getenv ("HOME");
2552 
2553 #ifdef _WIN32
2554  if (home == NULL)
2555  home = getenv ("USERPROFILE");
2556 #endif
2557 
2558  return (FcChar8 *) home;
2559  }
2560  return 0;
2561 }
2562 
2563 FcChar8 *
2565 {
2566  const char *env = getenv ("XDG_CACHE_HOME");
2567  FcChar8 *ret = NULL;
2568 
2569  if (!_FcConfigHomeEnabled)
2570  return NULL;
2571  if (env && env[0])
2572  ret = FcStrCopy ((const FcChar8 *)env);
2573  else
2574  {
2575  const FcChar8 *home = FcConfigHome ();
2576  size_t len = home ? strlen ((const char *)home) : 0;
2577 
2578  ret = malloc (len + 7 + 1);
2579  if (ret)
2580  {
2581  if (home)
2582  memcpy (ret, home, len);
2583  memcpy (&ret[len], FC_DIR_SEPARATOR_S ".cache", 7);
2584  ret[len + 7] = 0;
2585  }
2586  }
2587 
2588  return ret;
2589 }
2590 
2591 FcChar8 *
2593 {
2594  const char *env = getenv ("XDG_CONFIG_HOME");
2595  FcChar8 *ret = NULL;
2596 
2597  if (!_FcConfigHomeEnabled)
2598  return NULL;
2599  if (env)
2600  ret = FcStrCopy ((const FcChar8 *)env);
2601  else
2602  {
2603  const FcChar8 *home = FcConfigHome ();
2604  size_t len = home ? strlen ((const char *)home) : 0;
2605 
2606  ret = malloc (len + 8 + 1);
2607  if (ret)
2608  {
2609  if (home)
2610  memcpy (ret, home, len);
2611  memcpy (&ret[len], FC_DIR_SEPARATOR_S ".config", 8);
2612  ret[len + 8] = 0;
2613  }
2614  }
2615 
2616  return ret;
2617 }
2618 
2619 FcChar8 *
2621 {
2622  const char *env = getenv ("XDG_DATA_HOME");
2623  FcChar8 *ret = NULL;
2624 
2625  if (!_FcConfigHomeEnabled)
2626  return NULL;
2627  if (env)
2628  ret = FcStrCopy ((const FcChar8 *)env);
2629  else
2630  {
2631  const FcChar8 *home = FcConfigHome ();
2632  size_t len = home ? strlen ((const char *)home) : 0;
2633 
2634  ret = malloc (len + 13 + 1);
2635  if (ret)
2636  {
2637  if (home)
2638  memcpy (ret, home, len);
2639  memcpy (&ret[len], FC_DIR_SEPARATOR_S ".local" FC_DIR_SEPARATOR_S "share", 13);
2640  ret[len + 13] = 0;
2641  }
2642  }
2643 
2644  return ret;
2645 }
2646 
2647 FcBool
2649 {
2652  return prev;
2653 }
2654 
2655 FcChar8 *
2657  const FcChar8 *url)
2658 {
2659  FcChar8 *file, *dir, **path, **p;
2660  const FcChar8 *sysroot;
2661 
2663  if (!config)
2664  return NULL;
2665  sysroot = FcConfigGetSysRoot (config);
2666  if (!url || !*url)
2667  {
2668 #ifdef _WIN32
2669  url = (FcChar8 *) kpse_var_value ("FONTCONFIG_FILE");
2670 #else
2671  url = (FcChar8 *) getenv ("FONTCONFIG_FILE");
2672 #endif
2673  if (!url)
2674  url = (FcChar8 *) FONTCONFIG_FILE;
2675  }
2676  file = 0;
2677 
2678  if (FcStrIsAbsoluteFilename(url))
2679  {
2680  if (sysroot)
2681  {
2682  size_t len = strlen ((const char *) sysroot);
2683 
2684  /* Workaround to avoid adding sysroot repeatedly */
2685  if (strncmp ((const char *) url, (const char *) sysroot, len) == 0)
2686  sysroot = NULL;
2687  }
2688  file = FcConfigFileExists (sysroot, url);
2689  goto bail;
2690  }
2691 
2692  if (*url == '~')
2693  {
2694  dir = FcConfigHome ();
2695  if (dir)
2696  {
2697  FcChar8 *s;
2698 
2699  if (sysroot)
2700  s = FcStrBuildFilename (sysroot, dir, NULL);
2701  else
2702  s = dir;
2703  file = FcConfigFileExists (s, url + 1);
2704  if (sysroot)
2705  FcStrFree (s);
2706  }
2707  else
2708  file = 0;
2709  }
2710  else
2711  {
2712  path = FcConfigGetPath ();
2713  if (!path)
2714  {
2715  file = NULL;
2716  goto bail;
2717  }
2718  for (p = path; *p; p++)
2719  {
2720  FcChar8 *s;
2721 
2722  if (sysroot)
2723  s = FcStrBuildFilename (sysroot, *p, NULL);
2724  else
2725  s = *p;
2726  file = FcConfigFileExists (s, url);
2727  if (sysroot)
2728  FcStrFree (s);
2729  if (file)
2730  break;
2731  }
2733  }
2734 bail:
2736 
2737  return file;
2738 }
2739 
2740 FcChar8 *
2742 {
2743  return FcConfigGetFilename (NULL, url);
2744 }
2745 
2746 FcChar8 *
2748  const FcChar8 *url)
2749 {
2750  FcChar8 *n = FcConfigGetFilename (config, url);
2751 
2752  if (n)
2753  {
2755  ssize_t len;
2756  struct stat sb;
2757 
2758  if ((len = FcReadLink (n, buf, sizeof (buf) - 1)) != -1)
2759  {
2760  buf[len] = 0;
2761 
2762  /* We try to pick up a config from FONTCONFIG_FILE
2763  * when url is null. don't try to address the real filename
2764  * if it is a named pipe.
2765  */
2766  if (!url && FcStat (n, &sb) == 0 && S_ISFIFO (sb.st_mode))
2767  return n;
2768  else if (!FcStrIsAbsoluteFilename (buf))
2769  {
2771  FcStrFree (n);
2772  if (!dirname)
2773  return NULL;
2774 
2776  FcStrFree (dirname);
2777  if (!path)
2778  return NULL;
2779 
2781  FcStrFree (path);
2782  }
2783  else
2784  {
2785  FcStrFree (n);
2786  n = FcStrdup (buf);
2787  }
2788  }
2789  }
2790 
2791  return n;
2792 }
2793 
2794 /*
2795  * Manage the application-specific fonts
2796  */
2797 
2798 FcBool
2800  const FcChar8 *file)
2801 {
2802  FcFontSet *set;
2803  FcStrSet *subdirs;
2804  FcStrList *sublist;
2805  FcChar8 *subdir;
2806  FcBool ret = FcTrue;
2807 
2809  if (!config)
2810  return FcFalse;
2811 
2812  subdirs = FcStrSetCreateEx (FCSS_GROW_BY_64);
2813  if (!subdirs)
2814  {
2815  ret = FcFalse;
2816  goto bail;
2817  }
2818 
2820  if (!set)
2821  {
2822  set = FcFontSetCreate ();
2823  if (!set)
2824  {
2825  FcStrSetDestroy (subdirs);
2826  ret = FcFalse;
2827  goto bail;
2828  }
2830  }
2831 
2832  if (!FcFileScanConfig (set, subdirs, file, config))
2833  {
2834  FcStrSetDestroy (subdirs);
2835  ret = FcFalse;
2836  goto bail;
2837  }
2838  if ((sublist = FcStrListCreate (subdirs)))
2839  {
2840  while ((subdir = FcStrListNext (sublist)))
2841  {
2842  FcConfigAppFontAddDir (config, subdir);
2843  }
2844  FcStrListDone (sublist);
2845  }
2846  FcStrSetDestroy (subdirs);
2847 bail:
2849 
2850  return ret;
2851 }
2852 
2853 FcBool
2855  const FcChar8 *dir)
2856 {
2857  FcFontSet *set;
2858  FcStrSet *dirs;
2859  FcBool ret = FcTrue;
2860 
2862  if (!config)
2863  return FcFalse;
2864 
2866  if (!dirs)
2867  {
2868  ret = FcFalse;
2869  goto bail;
2870  }
2871 
2873  if (!set)
2874  {
2875  set = FcFontSetCreate ();
2876  if (!set)
2877  {
2878  FcStrSetDestroy (dirs);
2879  ret = FcFalse;
2880  goto bail;
2881  }
2883  }
2884 
2885  FcStrSetAddFilename (dirs, dir);
2886 
2888  {
2889  FcStrSetDestroy (dirs);
2890  ret = FcFalse;
2891  goto bail;
2892  }
2893  FcStrSetDestroy (dirs);
2894 bail:
2896 
2897  return ret;
2898 }
2899 
2900 void
2902 {
2904  if (!config)
2905  return;
2906 
2908 
2910 }
2911 
2912 /*
2913  * Manage filename-based font source selectors
2914  */
2915 
2916 FcBool
2918  const FcChar8 *glob,
2919  FcBool accept)
2920 {
2921  FcStrSet *set = accept ? config->acceptGlobs : config->rejectGlobs;
2922 
2923  return FcStrSetAdd (set, glob);
2924 }
2925 
2926 static FcBool
2928  const FcChar8 *string)
2929 {
2930  int i;
2931 
2932  for (i = 0; i < globs->num; i++)
2933  if (FcStrGlobMatch (globs->strs[i], string))
2934  return FcTrue;
2935  return FcFalse;
2936 }
2937 
2938 FcBool
2940  const FcChar8 *filename)
2941 {
2942  if (FcConfigGlobsMatch (config->acceptGlobs, filename))
2943  return FcTrue;
2944  if (FcConfigGlobsMatch (config->rejectGlobs, filename))
2945  return FcFalse;
2946  return FcTrue;
2947 }
2948 
2949 /*
2950  * Manage font-pattern based font source selectors
2951  */
2952 
2953 FcBool
2955  FcPattern *pattern,
2956  FcBool accept)
2957 {
2958  FcFontSet *set = accept ? config->acceptPatterns : config->rejectPatterns;
2959 
2960  return FcFontSetAdd (set, pattern);
2961 }
2962 
2963 static FcBool
2965  const FcPattern *font)
2966 {
2967  int i;
2968 
2969  for (i = 0; i < patterns->nfont; i++)
2970  if (FcListPatternMatchAny (patterns->fonts[i], font))
2971  return FcTrue;
2972  return FcFalse;
2973 }
2974 
2975 FcBool
2977  const FcPattern *font)
2978 {
2979  if (FcConfigPatternsMatch (config->acceptPatterns, font))
2980  return FcTrue;
2981  if (FcConfigPatternsMatch (config->rejectPatterns, font))
2982  return FcFalse;
2983  return FcTrue;
2984 }
2985 
2986 const FcChar8 *
2988 {
2989  if (!config)
2990  {
2992  if (!config)
2993  return NULL;
2994  }
2995  return config->sysRoot;
2996 }
2997 
2998 void
3000  const FcChar8 *sysroot)
3001 {
3002  FcChar8 *s = NULL;
3003  FcBool init = FcFalse;
3004  int nretry = 3;
3005 
3006 retry:
3007  if (!config)
3008  {
3009  /* We can't use FcConfigGetCurrent() here to ensure
3010  * the sysroot is set prior to initialize FcConfig,
3011  * to avoid loading caches from non-sysroot dirs.
3012  * So postpone the initialization later.
3013  */
3015  if (!config)
3016  {
3017  config = FcConfigCreate ();
3018  if (!config)
3019  return;
3020  init = FcTrue;
3021  }
3022  }
3023 
3024  if (sysroot)
3025  {
3026  s = FcConfigRealPath(sysroot);
3027  if (!s)
3028  return;
3029  }
3030 
3031  if (config->sysRoot)
3032  FcStrFree (config->sysRoot);
3033 
3034  config->sysRoot = s;
3035  if (init)
3036  {
3038  if (!config)
3039  {
3040  /* Something failed. this is usually unlikely. so retrying */
3041  init = FcFalse;
3042  if (--nretry == 0)
3043  {
3044  fprintf (stderr, "Fontconfig warning: Unable to initialize config and retry limit exceeded. sysroot functionality may not work as expected.\n");
3045  return;
3046  }
3047  goto retry;
3048  }
3050  /* FcConfigSetCurrent() increases the refcount.
3051  * decrease it here to avoid the memory leak.
3052  */
3054  }
3055 }
3056 
3057 FcRuleSet *
3059 {
3060  FcRuleSet *ret = (FcRuleSet *) malloc (sizeof (FcRuleSet));
3061  FcMatchKind k;
3062  const FcChar8 *p;
3063 
3064  if (!name)
3065  p = (const FcChar8 *)"";
3066  else
3067  p = name;
3068 
3069  if (ret)
3070  {
3071  ret->name = FcStrdup (p);
3072  ret->description = NULL;
3073  ret->domain = NULL;
3074  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
3075  ret->subst[k] = FcPtrListCreate (FcDestroyAsRule);
3076  FcRefInit (&ret->ref, 1);
3077  }
3078 
3079  return ret;
3080 }
3081 
3082 void
3084 {
3085  FcMatchKind k;
3086 
3087  if (!rs)
3088  return;
3089  if (FcRefDec (&rs->ref) != 1)
3090  return;
3091 
3092  if (rs->name)
3093  FcStrFree (rs->name);
3094  if (rs->description)
3095  FcStrFree (rs->description);
3096  if (rs->domain)
3097  FcStrFree (rs->domain);
3098  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
3099  FcPtrListDestroy (rs->subst[k]);
3100 
3101  free (rs);
3102 }
3103 
3104 void
3106 {
3107  if (!FcRefIsConst (&rs->ref))
3108  FcRefInc (&rs->ref);
3109 }
3110 
3111 void
3113  FcBool flag)
3114 {
3115  if (rs)
3116  {
3117  rs->enabled = flag;
3118  /* XXX: we may want to provide a feature
3119  * to enable/disable rulesets through API
3120  * in the future?
3121  */
3122  }
3123 }
3124 
3125 void
3127  const FcChar8 *domain,
3128  const FcChar8 *description)
3129 {
3130  if (rs->domain)
3131  FcStrFree (rs->domain);
3132  if (rs->description)
3133  FcStrFree (rs->description);
3134 
3135  rs->domain = domain ? FcStrdup (domain) : NULL;
3137 }
3138 
3139 int
3141  FcRule *rule,
3142  FcMatchKind kind)
3143 {
3144  FcPtrListIter iter;
3145  FcRule *r;
3146  int n = 0, ret;
3147 
3148  if (!rs ||
3149  kind < FcMatchKindBegin || kind >= FcMatchKindEnd)
3150  return -1;
3151  FcPtrListIterInitAtLast (rs->subst[kind], &iter);
3152  if (!FcPtrListIterAdd (rs->subst[kind], &iter, rule))
3153  return -1;
3154 
3155  for (r = rule; r; r = r->next)
3156  {
3157  switch (r->type)
3158  {
3159  case FcRuleTest:
3160  if (r->u.test)
3161  {
3162  if (r->u.test->kind == FcMatchDefault)
3163  r->u.test->kind = kind;
3164  if (n < r->u.test->object)
3165  n = r->u.test->object;
3166  }
3167  break;
3168  case FcRuleEdit:
3169  if (n < r->u.edit->object)
3170  n = r->u.edit->object;
3171  break;
3172  default:
3173  break;
3174  }
3175  }
3176  if (FcDebug () & FC_DBG_EDIT)
3177  {
3178  printf ("Add Rule(kind:%d, name: %s) ", kind, rs->name);
3179  FcRulePrint (rule);
3180  }
3182 
3183  return ret < 0 ? 0 : ret;
3184 }
3185 
3186 void
3188  FcConfigFileInfoIter *iter)
3189 {
3190  FcConfig *c;
3191  FcPtrListIter *i = (FcPtrListIter *)iter;
3192 
3193  if (!config)
3194  c = FcConfigGetCurrent ();
3195  else
3196  c = config;
3197  FcPtrListIterInit (c->rulesetList, i);
3198 }
3199 
3200 FcBool
3202  FcConfigFileInfoIter *iter)
3203 {
3204  FcConfig *c;
3205  FcPtrListIter *i = (FcPtrListIter *)iter;
3206 
3207  if (!config)
3208  c = FcConfigGetCurrent ();
3209  else
3210  c = config;
3211  if (FcPtrListIterIsValid (c->rulesetList, i))
3212  {
3213  FcPtrListIterNext (c->rulesetList, i);
3214  }
3215  else
3216  return FcFalse;
3217 
3218  return FcTrue;
3219 }
3220 
3221 FcBool
3223  FcConfigFileInfoIter *iter,
3224  FcChar8 **name,
3225  FcChar8 **description,
3226  FcBool *enabled)
3227 {
3228  FcConfig *c;
3229  FcRuleSet *r;
3230  FcPtrListIter *i = (FcPtrListIter *)iter;
3231 
3232  if (!config)
3233  c = FcConfigGetCurrent ();
3234  else
3235  c = config;
3236  if (!FcPtrListIterIsValid (c->rulesetList, i))
3237  return FcFalse;
3238  r = FcPtrListIterGetValue (c->rulesetList, i);
3239  if (name)
3240  *name = FcStrdup (r->name && r->name[0] ? r->name : (const FcChar8 *) "fonts.conf");
3241  if (description)
3242  *description = FcStrdup (!r->description ? _("No description") :
3243  dgettext (r->domain ? (const char *) r->domain : GETTEXT_PACKAGE "-conf",
3244  (const char *) r->description));
3245  if (enabled)
3246  *enabled = r->enabled;
3247 
3248  return FcTrue;
3249 }
3250 
3251 #define __fccfg__
3252 #include "fcaliastail.h"
3253 #undef __fccfg__
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
#define WINAPI
#define strdup
Definition: Utility.h:167
static char * dirname(mrb_state *mrb, const char *path)
Definition: apilist.c:64
#define head
Definition: aptex-macros.h:513
#define name
#define next(a)
Definition: aptex-macros.h:924
#define hash
Definition: aptex.h:388
#define n
Definition: t4ht.c:1290
#define SIZEOF_VOID_P
Definition: config-vc6.h:198
#define b
Definition: jpegint.h:372
static U_NAMESPACE_USE UnicodeString ** strs
Definition: dbgutil.cpp:25
BOOL
Definition: dd.h:100
@ TRUE
Definition: dd.h:102
#define free(a)
Definition: decNumber.cpp:310
int ssize_t
Definition: defines.h:155
#define strrchr
Definition: detex.c:67
static const char description[]
Definition: drvwmf.cpp:127
#define R_OK
Definition: defs.h:31
int v
Definition: dviconv.c:10
static int xx[600]
Definition: psspecial.c:35
static int yy[600]
Definition: psspecial.c:35
char * strncpy()
int strcmp()
Definition: coll.cpp:143
int printf()
char * strcpy()
long vv
Definition: dvi2xx.h:581
char * prgname
Definition: dviinfo.c:66
struct rect data
Definition: dvipdfm.c:64
long int flag
Definition: f2c.h:53
#define FcStrPlus
Definition: fcalias.h:394
#define FcStrStrIgnoreCase
Definition: fcalias.h:404
#define FcStrBasename
Definition: fcalias.h:422
#define FcInitLoadConfigAndFonts
Definition: fcalias.h:166
#define FcStrListDone
Definition: fcalias.h:444
#define FcGetDefaultLangs
Definition: fcalias.h:132
#define FcLangSetSubtract
Definition: fcalias.h:208
#define FcCharSetEqual
Definition: fcalias.h:100
#define FcCharSetUnion
Definition: fcalias.h:104
#define FcLangSetCreate
Definition: fcalias.h:184
#define FcStrSetCreate
Definition: fcalias.h:424
#define FcMatrixEqual
Definition: fcalias.h:254
#define FcStrDirname
Definition: fcalias.h:420
#define FcDirCacheUnload
Definition: fcalias.h:152
#define FcLangSetEqual
Definition: fcalias.h:200
#define FcLangSetDestroy
Definition: fcalias.h:186
#define FcMatrixMultiply
Definition: fcalias.h:256
#define FcFontSetCreate
Definition: fcalias.h:158
#define FcPatternPrint
Definition: fcalias.h:128
#define FcDirCacheRead
Definition: fcalias.h:148
#define FcFontSetAdd
Definition: fcalias.h:162
#define FcStrCopyFilename
Definition: fcalias.h:392
#define FcStrListCreate
Definition: fcalias.h:438
#define FcStrSetDestroy
Definition: fcalias.h:436
#define FcStrSetAdd
Definition: fcalias.h:430
#define FcLangSetAdd
Definition: fcalias.h:190
#define FcStrBuildFilename
Definition: fcalias.h:418
#define FcNameConstant
Definition: fcalias.h:276
#define FcFontSetPrint
Definition: fcalias.h:130
#define FcCharSetIsSubset
Definition: fcalias.h:118
#define FcStrCmpIgnoreCase
Definition: fcalias.h:400
#define FcFontSetDestroy
Definition: fcalias.h:160
#define FcStrFree
Definition: fcalias.h:396
#define FcStrSetAddFilename
Definition: fcalias.h:432
#define FcLangSetUnion
Definition: fcalias.h:206
#define FcValueSave
Definition: fcalias.h:294
#define FcCharSetSubtract
Definition: fcalias.h:106
#define FcStrListNext
Definition: fcalias.h:442
#define FcStrCopy
Definition: fcalias.h:390
#define FcLangSetContains
Definition: fcalias.h:198
#define FcValueDestroy
Definition: fcalias.h:290
static int FcRefInc(FcRef *r)
Definition: fcatomic.h:141
#define fc_atomic_ptr_get(P)
Definition: fcatomic.h:121
static FcBool FcRefIsConst(const FcRef *r)
Definition: fcatomic.h:145
static int FcRefDec(FcRef *r)
Definition: fcatomic.h:142
#define fc_atomic_ptr_cmpexch(P, O, N)
Definition: fcatomic.h:122
static void FcRefInit(FcRef *r, int v)
Definition: fcatomic.h:140
void FcDirCacheReference(FcCache *cache, int nref)
Definition: fccache.c:1026
void FcConfigSetFonts(FcConfig *config, FcFontSet *fonts, FcSetName set)
Definition: fccfg.c:837
FcChar8 * FcConfigGetFilename(FcConfig *config, const FcChar8 *url)
Definition: fccfg.c:2656
static void FcConfigPatternCanon(FcPattern *p, FcObject object)
Definition: fccfg.c:1961
FcBool FcConfigSetRescanInterval(FcConfig *config, int rescanInterval)
Definition: fccfg.c:905
FcStrList * FcConfigGetConfigFiles(FcConfig *config)
Definition: fccfg.c:804
void FcRuleSetEnable(FcRuleSet *rs, FcBool flag)
Definition: fccfg.c:3112
FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4)
Definition: fccfg.c:861
FcChar8 * FcConfigXdgCacheHome(void)
Definition: fccfg.c:2564
#define FcDoubleRound(d)
Definition: fccfg.c:1241
void FcRuleSetReference(FcRuleSet *rs)
Definition: fccfg.c:3105
FcConfig * FcConfigReference(FcConfig *config)
Definition: fccfg.c:353
FcBool FcConfigGlobAdd(FcConfig *config, const FcChar8 *glob, FcBool accept)
Definition: fccfg.c:2917
void FcRuleSetAddDescription(FcRuleSet *rs, const FcChar8 *domain, const FcChar8 *description)
Definition: fccfg.c:3126
void FcConfigFini(void)
Definition: fccfg.c:130
FcBool FcConfigBuildFonts(FcConfig *config)
Definition: fccfg.c:557
FcBool FcConfigSetCurrent(FcConfig *config)
Definition: fccfg.c:589
static FcValueList * FcConfigMatchValueList(FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcTest *t, FcValueList *values, FamilyTable *table)
Definition: fccfg.c:1711
static FcConfig * _fcConfig
Definition: fccfg.c:46
FcBool FcConfigPatternsAdd(FcConfig *config, FcPattern *pattern, FcBool accept)
Definition: fccfg.c:2954
static FcValue FcConfigPromote(FcValue v, FcValue u, FcValuePromotionBuffer *buf)
Definition: fccfg.c:941
const FcChar8 * FcConfigGetSysRoot(const FcConfig *config)
Definition: fccfg.c:2987
FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 *dir)
Definition: fccfg.c:2854
FcBool FcConfigAcceptFont(FcConfig *config, const FcPattern *font)
Definition: fccfg.c:2976
static FcBool FcConfigGlobsMatch(const FcStrSet *globs, const FcChar8 *string)
Definition: fccfg.c:2927
FcBlanks * FcConfigGetBlanks(FcConfig *config)
Definition: fccfg.c:875
static void lock_config(void)
Definition: fccfg.c:50
FcBool FcConfigUptoDate(FcConfig *config)
Definition: fccfg.c:293
FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4)
Definition: fccfg.c:868
static FcBool FcConfigAddDirList(FcConfig *config, FcSetName set, FcStrSet *dirSet)
Definition: fccfg.c:527
FcConfig * FcConfigGetCurrent(void)
Definition: fccfg.c:623
int FcConfigGetRescanInterval(FcConfig *config)
Definition: fccfg.c:891
static void FcConfigFreePath(FcChar8 **path)
Definition: fccfg.c:2527
static FcChar8 * FcConfigFileExists(const FcChar8 *dir, const FcChar8 *file)
Definition: fccfg.c:2379
FcBool FcConfigCompareValue(const FcValue *left_o, unsigned int op_, const FcValue *right_o)
Definition: fccfg.c:987
FcStrList * FcConfigGetConfigDirs(FcConfig *config)
Definition: fccfg.c:636
FcChar8 * FcConfigFilename(const FcChar8 *url)
Definition: fccfg.c:2741
FcStrList * FcConfigGetCacheDirs(FcConfig *config)
Definition: fccfg.c:775
static void FcDestroyAsRuleSet(void *data)
Definition: fccfg.c:118
static FcValueList * FcConfigValues(FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e, FcValueBinding binding)
Definition: fccfg.c:1771
FcChar8 * FcConfigMapFontPath(FcConfig *config, const FcChar8 *path)
Definition: fccfg.c:712
static FcChar8 * FcConfigRealPath(const FcChar8 *path)
Definition: fccfg.c:139
FcBool FcConfigFileInfoIterGet(FcConfig *config, FcConfigFileInfoIter *iter, FcChar8 **name, FcChar8 **description, FcBool *enabled)
Definition: fccfg.c:3222
FcBool FcConfigInit(void)
Definition: fccfg.c:124
FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set)
Definition: fccfg.c:824
FcBool FcConfigAddConfigDir(FcConfig *config, const FcChar8 *d)
Definition: fccfg.c:629
static void FamilyTableDel(FamilyTable *table, const FcChar8 *s)
Definition: fccfg.c:1651
void FcConfigFileInfoIterInit(FcConfig *config, FcConfigFileInfoIter *iter)
Definition: fccfg.c:3187
FcBool FcConfigAddBlank(FcConfig *config, FcChar32 blank)
Definition: fccfg.c:882
FcBool FcConfigEnableHome(FcBool enable)
Definition: fccfg.c:2648
FcBool FcConfigResetFontDirs(FcConfig *config)
Definition: fccfg.c:670
const FcChar8 * FcConfigMapSalt(FcConfig *config, const FcChar8 *path)
Definition: fccfg.c:748
static void FamilyTableAdd(FamilyTable *table, FcValueListPtr values)
Definition: fccfg.c:1623
static FcMutex * _lock
Definition: fccfg.c:47
static FcBool _FcConfigHomeEnabled
Definition: fccfg.c:2539
FcBool FcConfigAddCache(FcConfig *config, FcCache *cache, FcSetName set, FcStrSet *dirSet, FcChar8 *forDir)
Definition: fccfg.c:434
FcBool FcConfigAddConfigFile(FcConfig *config, const FcChar8 *f)
Definition: fccfg.c:789
#define FcDoubleTrunc(d)
Definition: fccfg.c:1242
FcBool FcConfigAddRule(FcConfig *config, FcRule *rule, FcMatchKind kind)
Definition: fccfg.c:932
FcBool FcConfigAcceptFilename(FcConfig *config, const FcChar8 *filename)
Definition: fccfg.c:2939
static FcBool FcConfigPatternsMatch(const FcFontSet *patterns, const FcPattern *font)
Definition: fccfg.c:2964
static FcBool FamilyTableLookup(FamilyTable *table, FcOp _op, const FcChar8 *s)
Definition: fccfg.c:1606
FcBool FcConfigAddFontDir(FcConfig *config, const FcChar8 *d, const FcChar8 *m, const FcChar8 *salt)
Definition: fccfg.c:650
FcBool FcConfigFileInfoIterNext(FcConfig *config, FcConfigFileInfoIter *iter)
Definition: fccfg.c:3201
void FcConfigAppFontClear(FcConfig *config)
Definition: fccfg.c:2901
static void FamilyTableInit(FamilyTable *table, FcPattern *p)
Definition: fccfg.c:1679
static void FcDestroyAsRule(void *data)
Definition: fccfg.c:112
static void FcConfigPatternDel(FcPattern *p, FcObject object, FamilyTable *table)
Definition: fccfg.c:1949
void FcConfigSetSysRoot(FcConfig *config, const FcChar8 *sysroot)
Definition: fccfg.c:2999
static FcFileTime FcConfigNewestFile(FcStrSet *files)
Definition: fccfg.c:271
static FcChar8 ** FcConfigGetPath(void)
Definition: fccfg.c:2424
FcConfig * FcConfigCreate(void)
Definition: fccfg.c:163
void FcBlanksDestroy(FcBlanks *b)
Definition: fccfg.c:855
FcChar8 * FcConfigXdgConfigHome(void)
Definition: fccfg.c:2592
FcChar8 * FcConfigHome(void)
Definition: fccfg.c:2543
static FcBool copy_string(const void *src, void **dest)
Definition: fccfg.c:1672
FcRuleSet * FcRuleSetCreate(const FcChar8 *name)
Definition: fccfg.c:3058
FcStrList * FcConfigGetFontDirs(FcConfig *config)
Definition: fccfg.c:680
#define FcDoubleCeil(d)
Definition: fccfg.c:1240
static FcBool FcConfigPathStartsWith(const FcChar8 *path, const FcChar8 *start)
Definition: fccfg.c:694
static void FcConfigDel(FcValueListPtr *head, FcValueList *position, FcObject object, FamilyTable *table)
Definition: fccfg.c:1904
#define FcDoubleFloor(d)
Definition: fccfg.c:1239
static void unlock_config(void)
Definition: fccfg.c:73
static void FcConfigPatternAdd(FcPattern *p, FcObject object, FcValueList *list, FcBool append, FamilyTable *table)
Definition: fccfg.c:1929
FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern *p, FcPattern *p_pat, FcMatchKind kind)
Definition: fccfg.c:1972
static FcConfig * FcConfigEnsure(void)
Definition: fccfg.c:93
void FcConfigDestroy(FcConfig *config)
Definition: fccfg.c:387
static FcValue FcConfigEvaluate(FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
Definition: fccfg.c:1245
int FcRuleSetAdd(FcRuleSet *rs, FcRule *rule, FcMatchKind kind)
Definition: fccfg.c:3140
FcBool FcConfigAddCacheDir(FcConfig *config, const FcChar8 *d)
Definition: fccfg.c:768
FcChar8 * FcConfigGetCache(FcConfig *config)
Definition: fccfg.c:818
#define FONTCONFIG_FILE
Definition: fccfg.c:2376
FcExpr * FcConfigAllocExpr(FcConfig *config)
Definition: fccfg.c:334
FcBlanks * FcBlanksCreate(void)
Definition: fccfg.c:848
static FcBool FcConfigAdd(FcValueListPtr *head, FcValueList *position, FcBool append, FcValueList *new, FcObject object, FamilyTable *table)
Definition: fccfg.c:1803
FcChar8 * FcConfigRealFilename(FcConfig *config, const FcChar8 *url)
Definition: fccfg.c:2747
void FcRuleSetDestroy(FcRuleSet *rs)
Definition: fccfg.c:3083
static void free_lock(void)
Definition: fccfg.c:81
static void FamilyTableClear(FamilyTable *table)
Definition: fccfg.c:1702
FcChar8 * FcConfigXdgDataHome(void)
Definition: fccfg.c:2620
FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, FcMatchKind kind)
Definition: fccfg.c:2310
FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 *file)
Definition: fccfg.c:2799
FcCharSet * FcCharSetPromote(FcValuePromotionBuffer *vbuf)
Definition: fccharset.c:46
int32_t FcRandom(void)
Definition: fccompat.c:183
ssize_t FcReadLink(const FcChar8 *pathname, FcChar8 *buf, size_t bufsiz)
Definition: fccompat.c:278
void FcValueListPrint(FcValueListPtr l)
Definition: fcdbg.c:130
void FcValueListPrintWithPosition(FcValueListPtr l, const FcValueListPtr pos)
Definition: fcdbg.c:118
void FcTestPrint(const FcTest *test)
Definition: fcdbg.c:469
void FcValuePrintFile(FILE *f, const FcValue v)
Definition: fcdbg.c:74
void FcRulePrint(const FcRule *rule)
Definition: fcdbg.c:516
void FcEditPrint(const FcEdit *edit)
Definition: fcdbg.c:507
FcChar8 * FcGetPrgname(void)
Definition: fcdefault.c:112
FcPublic int FcConfigGetRescanInverval(FcConfig *config)
FcPublic FcBool FcConfigSetRescanInverval(FcConfig *config, int rescanInterval)
FcBool FcFileScanConfig(FcFontSet *set, FcStrSet *dirs, const FcChar8 *file, FcConfig *config)
Definition: fcdir.c:134
const FcChar8 lang[6]
Definition: fcfreetype.c:56
FcHashTable * FcHashTableCreate(FcHashFunc hash_func, FcCompareFunc compare_func, FcCopyFunc key_copy_func, FcCopyFunc value_copy_func, FcDestroyFunc key_destroy_func, FcDestroyFunc value_destroy_func)
Definition: fchash.c:53
FcBool FcHashTableAdd(FcHashTable *table, void *key, void *value)
Definition: fchash.c:183
FcBool FcHashTableFind(FcHashTable *table, const void *key, void **value)
Definition: fchash.c:100
void FcHashTableDestroy(FcHashTable *table)
Definition: fchash.c:76
FcBool FcHashTableRemove(FcHashTable *table, void *key)
Definition: fchash.c:199
FcConfig * FcInitLoadOwnConfigAndFonts(FcConfig *config)
Definition: fcinit.c:233
const FcMatrix FcIdentityMatrix
Definition: fcmatrix.c:30
FcChar32(* FcHashFunc)(const void *data)
Definition: fcint.h:414
FcBool FcObjectValidType(FcObject object, FcType type)
Definition: fcname.c:73
int FcStat(const FcChar8 *file, struct stat *statb)
Definition: fcstat.c:127
#define FC_DBG_FONTSET
Definition: fcint.h:105
#define FC_SEARCH_PATH_SEPARATOR
Definition: fcint.h:78
FcStrSet * FcStrSetCreateEx(unsigned int control)
Definition: fcstr.c:1250
FcValue FcValueCanonicalize(const FcValue *v)
Definition: fcpat.c:69
FcPatternElt * FcPatternObjectFindElt(const FcPattern *p, FcObject object)
Definition: fcpat.c:510
@ FcOpFlagIgnoreBlanks
Definition: fcint.h:262
FcBool FcListPatternMatchAny(const FcPattern *p, const FcPattern *font)
Definition: fclist.c:210
@ FC_INVALID_OBJECT
Definition: fcint.h:1046
#define FcValueCharSet(v)
Definition: fcint.h:192
const FcChar8 * FcStrTripleThird(FcChar8 *str)
Definition: fcstr.c:1415
@ FcOpFloor
Definition: fcint.h:257
@ FcOpMoreEqual
Definition: fcint.h:255
@ FcOpString
Definition: fcint.h:246
@ FcOpComma
Definition: fcint.h:257
@ FcOpMatrix
Definition: fcint.h:246
@ FcOpDelete
Definition: fcint.h:251
@ FcOpLessEqual
Definition: fcint.h:255
@ FcOpAnd
Definition: fcint.h:253
@ FcOpCeil
Definition: fcint.h:257
@ FcOpMore
Definition: fcint.h:255
@ FcOpNot
Definition: fcint.h:257
@ FcOpNotEqual
Definition: fcint.h:253
@ FcOpListing
Definition: fcint.h:254
@ FcOpDivide
Definition: fcint.h:256
@ FcOpAppend
Definition: fcint.h:250
@ FcOpPrepend
Definition: fcint.h:250
@ FcOpAssignReplace
Definition: fcint.h:249
@ FcOpRange
Definition: fcint.h:246
@ FcOpConst
Definition: fcint.h:248
@ FcOpNotContains
Definition: fcint.h:254
@ FcOpPlus
Definition: fcint.h:256
@ FcOpCharSet
Definition: fcint.h:246
@ FcOpAppendLast
Definition: fcint.h:250
@ FcOpOr
Definition: fcint.h:253
@ FcOpDeleteAll
Definition: fcint.h:251
@ FcOpQuest
Definition: fcint.h:252
@ FcOpDouble
Definition: fcint.h:246
@ FcOpEqual
Definition: fcint.h:253
@ FcOpPrependFirst
Definition: fcint.h:250
@ FcOpBool
Definition: fcint.h:246
@ FcOpMinus
Definition: fcint.h:256
@ FcOpTimes
Definition: fcint.h:256
@ FcOpField
Definition: fcint.h:248
@ FcOpTrunc
Definition: fcint.h:257
@ FcOpAssign
Definition: fcint.h:249
@ FcOpLangSet
Definition: fcint.h:246
@ FcOpInteger
Definition: fcint.h:246
@ FcOpContains
Definition: fcint.h:254
@ FcOpLess
Definition: fcint.h:255
@ FcOpRound
Definition: fcint.h:257
FcResult FcPatternObjectGetString(const FcPattern *p, FcObject object, int n, FcChar8 **s)
Definition: fcpat.c:1075
FcBool FcStrGlobMatch(const FcChar8 *glob, const FcChar8 *string)
Definition: fcstr.c:492
#define FC_DIR_SEPARATOR
Definition: fcint.h:79
FcBool FcPatternObjectAddString(FcPattern *p, FcObject object, const FcChar8 *s)
Definition: fcpat.c:867
#define FCSS_GROW_BY_64
Definition: fcint.h:385
FcBool FcPatternObjectAddWithBinding(FcPattern *p, FcObject object, FcValue value, FcValueBinding binding, FcBool append)
Definition: fcpat.c:695
#define FC_PATH_MAX
Definition: fcint.h:87
FcBool FcPtrListIterIsValid(const FcPtrList *list, const FcPtrListIter *iter)
Definition: fcptrlist.c:113
void FcPtrListIterInit(const FcPtrList *list, FcPtrListIter *iter)
Definition: fcptrlist.c:72
#define FcMatchDefault
Definition: fcint.h:317
void FcPtrListDestroy(FcPtrList *list)
Definition: fcptrlist.c:56
FcRange * FcRangePromote(double v, FcValuePromotionBuffer *vbuf)
Definition: fcrange.c:82
#define FcCacheSubdir(c, i)
Definition: fcint.h:436
FcPatternElt * FcPatternObjectInsertElt(FcPattern *p, FcObject object)
Definition: fcpat.c:519
FcChar8 * FcStrCanonFilename(const FcChar8 *s)
Definition: fcstr.c:1211
FcBool FcStrSetAddFilenamePairWithSalt(FcStrSet *strs, const FcChar8 *d, const FcChar8 *m, const FcChar8 *salt)
Definition: fcstr.c:1440
@ FcRuleEdit
Definition: fcint.h:345
@ FcRuleUnknown
Definition: fcint.h:345
@ FcRuleTest
Definition: fcint.h:345
#define FcValueLangSet(v)
Definition: fcint.h:193
#define FC_OBJ_ID(_n_)
Definition: fcint.h:212
FcBool FcPtrListIterAdd(FcPtrList *list, FcPtrListIter *iter, void *data)
Definition: fcptrlist.c:135
#define FC_UNUSED
Definition: fcint.h:95
FcBool FcStrSetDeleteAll(FcStrSet *set)
Definition: fcstr.c:1542
FcBool FcRangeCompare(FcOp op, const FcRange *a, const FcRange *b)
Definition: fcrange.c:103
int FcObject
Definition: fcint.h:206
const FcChar8 * FcStrTripleSecond(FcChar8 *s)
Definition: fcstr.c:1405
FcChar32 FcStrHashIgnoreBlanksAndCase(const FcChar8 *s)
Definition: fcstr.c:328
void FcValueListDestroy(FcValueListPtr l)
Definition: fcpat.c:140
FcPattern * FcPatternCacheRewriteFile(const FcPattern *pat, FcCache *cache, const FcChar8 *relocated_font_file)
Definition: fcpat.c:386
FcChar32 FcStrHashIgnoreCase(const FcChar8 *s)
Definition: fcstr.c:315
#define FcCacheDir(c)
Definition: fcint.h:433
#define FC_OP_GET_FLAGS(_x_)
Definition: fcint.h:266
FcBool FcPtrListIterNext(const FcPtrList *list, FcPtrListIter *iter)
Definition: fcptrlist.c:99
enum _FcOp FcOp
#define FcCacheSet(c)
Definition: fcint.h:435
@ FcQualNotFirst
Definition: fcint.h:314
@ FcQualAll
Definition: fcint.h:314
@ FcQualFirst
Definition: fcint.h:314
#define FcFontSetFont(fs, i)
Definition: fcint.h:239
FcPtrList * FcPtrListCreate(FcDestroyFunc func)
Definition: fcptrlist.c:42
#define FcValueListNext(vl)
Definition: fcint.h:204
void FcRuleDestroy(FcRule *rule)
Definition: fcxml.c:83
#define FC_DIR_SEPARATOR_S
Definition: fcint.h:80
int(* FcCompareFunc)(const void *v1, const void *v2)
Definition: fcint.h:415
#define FcValueString(v)
Definition: fcint.h:191
#define FC_DBG_EDIT
Definition: fcint.h:104
FcBool FcStrIsAbsoluteFilename(const FcChar8 *s)
Definition: fcstr.c:952
#define FC_DBG_CACHE
Definition: fcint.h:106
const char * FcObjectName(FcObject object)
Definition: fcname.c:127
#define FcStrdup(s)
Definition: fcint.h:146
FcChar8 * FcStrLastSlash(const FcChar8 *path)
Definition: fcstr.c:1069
#define FcValueRange(v)
Definition: fcint.h:194
#define FC_OP_GET_OP(_x_)
Definition: fcint.h:265
#define FcDebug()
Definition: fcint.h:899
FcBool(* FcCopyFunc)(const void *src, void **dest)
Definition: fcint.h:416
void FcPtrListIterInitAtLast(FcPtrList *list, FcPtrListIter *iter)
Definition: fcptrlist.c:83
FcBool FcPatternObjectDel(FcPattern *p, FcObject object)
Definition: fcpat.c:780
void * FcPtrListIterGetValue(const FcPtrList *list, const FcPtrListIter *iter)
Definition: fcptrlist.c:122
#define FcPatternEltValues(pe)
Definition: fcint.h:226
#define FC_MAX_BASE_OBJECT
Definition: fcint.h:1051
int FcStrCmpIgnoreBlanksAndCase(const FcChar8 *s1, const FcChar8 *s2)
Definition: fcstr.c:273
#define FcCacheDirs(c)
Definition: fcint.h:434
FcLangSet * FcLangSetPromote(const FcChar8 *lang, FcValuePromotionBuffer *buf)
Definition: fclang.c:756
FcResult FcPatternObjectGet(const FcPattern *p, FcObject object, int id, FcValue *v)
Definition: fcpat.c:1000
static void FcMutexLock(FcMutex *m)
Definition: fcmutex.h:122
static void FcMutexInit(FcMutex *m)
Definition: fcmutex.h:121
static void FcMutexFinish(FcMutex *m)
Definition: fcmutex.h:124
fc_mutex_impl_t FcMutex
Definition: fcmutex.h:120
static void FcMutexUnlock(FcMutex *m)
Definition: fcmutex.h:123
enum _FcSetName FcSetName
unsigned char FcChar8
Definition: fontconfig.h:43
enum _FcValueBinding FcValueBinding
@ FcSetSystem
Definition: fontconfig.h:303
@ FcSetApplication
Definition: fontconfig.h:304
#define FcFalse
Definition: fontconfig.h:75
@ FcTypeMatrix
Definition: fontconfig.h:208
@ FcTypeDouble
Definition: fontconfig.h:205
@ FcTypeFTFace
Definition: fontconfig.h:210
@ FcTypeCharSet
Definition: fontconfig.h:209
@ FcTypeBool
Definition: fontconfig.h:207
@ FcTypeVoid
Definition: fontconfig.h:203
@ FcTypeLangSet
Definition: fontconfig.h:211
@ FcTypeInteger
Definition: fontconfig.h:204
@ FcTypeRange
Definition: fontconfig.h:212
@ FcTypeUnknown
Definition: fontconfig.h:202
@ FcTypeString
Definition: fontconfig.h:206
@ FcMatchPattern
Definition: fontconfig.h:290
@ FcMatchKindBegin
Definition: fontconfig.h:292
@ FcMatchFont
Definition: fontconfig.h:290
@ FcMatchKindEnd
Definition: fontconfig.h:291
struct _FcBlanks FcBlanks
Definition: fontconfig.h:329
#define FcDontCare
Definition: fontconfig.h:77
#define FcTrue
Definition: fontconfig.h:76
enum _FcMatchKind FcMatchKind
@ FcResultMatch
Definition: fontconfig.h:241
@ FcResultNoMatch
Definition: fontconfig.h:241
@ FcValueBindingWeak
Definition: fontconfig.h:246
@ FcValueBindingSame
Definition: fontconfig.h:246
int FcBool
Definition: fontconfig.h:46
unsigned int FcChar32
Definition: fontconfig.h:45
static void
Definition: fpif.c:118
#define _(String)
Definition: ftxerr18.c:64
mpz_t * f
Definition: gen-fib.c:34
#define s
Definition: afcover.h:80
static FIELD_PTR prev
Definition: genind.c:36
int glob()
#define colon
Definition: globals.h:58
#define blank
Definition: globals.h:55
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
#define d(n)
Definition: gpos-common.c:151
int base
Definition: gsftopk.c:1502
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
int kind
Definition: image.c:8980
void * object
Definition: jmemsys.h:48
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
void exit()
@ right
Definition: annotate.c:15
signed int intptr_t
Definition: stdint.h:118
char * getenv()
static Ref * fonts
Definition: pdffonts.cc:91
struct config_s config
voidp calloc()
#define buf
#define access
Definition: win32lib.h:59
#define S_ISFIFO(m)
Definition: win32lib.h:211
static int ret
Definition: convert.c:72
#define fprintf
Definition: mendex.h:64
#define malloc
Definition: alloca.c:91
#define dest
long time_t
Definition: types.h:18
int strncmp()
cell * list
Definition: list_routines.h:30
static UHashtable * cache
unsigned int DWORD
Definition: mktexlib.h:49
@ err
Definition: mtxline.h:24
union value value
Definition: obx.h:44
const_string * files[3]
Definition: omfonts.c:102
int k
Definition: otp-parser.c:70
sixteenbits patterns[]
Definition: pbmpscale.c:36
char * filename[256]
Definition: pbmtopk.c:46
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 init[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 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
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
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF tst
static int32_t last
Definition: ppagelist.c:29
static int size
Definition: ppmlabel.c:24
int r
Definition: ppmqvga.c:68
time_t time()
#define dir
#define map
#define flags
#define isalpha(ch)
Definition: utype.h:82
#define flag
Definition: round_prec.c:45
lft_cell * left
Definition: routines.h:73
static UMutex lock
Definition: serv.cpp:336
#define str(s)
Definition: sh6.c:399
ShellFileEnvironment e
Definition: sh6.c:388
FcHashTable * family_hash
Definition: fccfg.c:1602
FcHashTable * family_blank_hash
Definition: fccfg.c:1601
FcExpr exprs[(1024 - 2 - 2) *sizeof(void *)/sizeof(FcExpr)]
Definition: fcint.h:309
FcExprPage * next_page
Definition: fcint.h:307
FcExpr * next
Definition: fcint.h:308
Definition: fcint.h:284
FcBool set
Definition: fcint.h:590
time_t time
Definition: fcint.h:589
FcChar8 * description
Definition: fcint.h:360
FcChar8 * domain
Definition: fcint.h:361
FcChar8 * name
Definition: fcint.h:359
FcPtrList * subst[FcMatchKindEnd]
Definition: fcint.h:363
FcBool enabled
Definition: fcint.h:362
FcRef ref
Definition: fcint.h:358
Definition: fcint.h:348
int num
Definition: fcint.h:392
FcChar8 ** strs
Definition: fcint.h:394
Definition: fcint.h:319
FcValue value
Definition: fcint.h:200
const FcLangSet * l
Definition: fontconfig.h:272
union _FcValue::@935 u
FcType type
Definition: fontconfig.h:263
void * f
Definition: fontconfig.h:271
const FcChar8 * s
Definition: fontconfig.h:265
FcBool b
Definition: fontconfig.h:267
const FcCharSet * c
Definition: fontconfig.h:270
const FcMatrix * m
Definition: fontconfig.h:269
double d
Definition: fontconfig.h:268
Definition: sh.h:1689
Definition: filedef.h:30
Definition: pbmfont.h:11
Definition: ttf.h:354
Definition: sh.h:1226
Definition: mendex.h:14
Definition: tpic.c:45
Definition: rule.h:21
Definition: dvips.h:235
Definition: table.h:30
Definition: splinefont.h:579
pointer path
Definition: t1imager.h:36
*job_name strlen((char *) job_name) - 4)
char * file
Definition: t4ht.c:931
m
Definition: tex4ht.c:3990
op
Definition: tex4ht.c:3129
page
Definition: tex4ht.c:3916
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
#define dgettext(Domainname, Msgid)
Definition: gettext.h:70
Definition: obx.h:51
@ start
Definition: preamble.c:52
@ enable
Definition: preamble.c:51
#define append(a, b)
Definition: y.tab.c:257