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)  

fccache.c
Go to the documentation of this file.
1 /*
2  * Copyright © 2000 Keith Packard
3  * Copyright © 2005 Patrick Lam
4  *
5  * Permission to use, copy, modify, distribute, and sell this software and its
6  * documentation for any purpose is hereby granted without fee, provided that
7  * the above copyright notice appear in all copies and that both that
8  * copyright notice and this permission notice appear in supporting
9  * documentation, and that the name of the author(s) not be used in
10  * advertising or publicity pertaining to distribution of the software without
11  * specific, written prior permission. The authors make no
12  * representations about the suitability of this software for any purpose. It
13  * is provided "as is" without express or implied warranty.
14  *
15  * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17  * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21  * PERFORMANCE OF THIS SOFTWARE.
22  */
23 #include "fcint.h"
24 #include "fcarch.h"
25 #include "fcmd5.h"
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <fcntl.h>
29 #ifdef HAVE_DIRENT_H
30 #include <dirent.h>
31 #endif
32 #include <string.h>
33 #include <limits.h>
34 #include <sys/types.h>
35 #include <sys/stat.h>
36 
37 #ifndef _WIN32
38  #include <sys/time.h>
39 #else
40  #include <winsock2.h> /* for struct timeval */
41 #endif
42 
43 #include <assert.h>
44 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
45 # include <unistd.h>
46 # include <sys/mman.h>
47 #endif
48 #if defined(_WIN32)
49 #include <sys/locking.h>
50 #endif
51 
52 #ifndef O_BINARY
53 #define O_BINARY 0
54 #endif
55 
56 FcBool
58  FcBool force,
60 {
61  return FcTrue;
62 }
63 
64 FcBool
67 {
68  FcBool ret = FcTrue;
69 #ifndef _WIN32
70  const FcChar8 *sysroot;
71  FcChar8 *target, *d;
72  struct stat statb;
73  struct timeval times[2];
74 
76  if (!config)
77  return FcFalse;
78  sysroot = FcConfigGetSysRoot (config);
79  if (sysroot)
80  d = FcStrBuildFilename (sysroot, dir, NULL);
81  else
83  if (FcStat (d, &statb) != 0)
84  {
85  ret = FcFalse;
86  goto bail;
87  }
88  target = FcStrBuildFilename (d, ".uuid", NULL);
89  ret = unlink ((char *) target) == 0;
90  if (ret)
91  {
92  times[0].tv_sec = statb.st_atime;
93  times[1].tv_sec = statb.st_mtime;
94 #ifdef HAVE_STRUCT_STAT_ST_MTIM
95  times[0].tv_usec = statb.st_atim.tv_nsec / 1000;
96  times[1].tv_usec = statb.st_mtim.tv_nsec / 1000;
97 #else
98  times[0].tv_usec = 0;
99  times[1].tv_usec = 0;
100 #endif
101  if (utimes ((const char *) d, times) != 0)
102  {
103  fprintf (stderr, "Unable to revert mtime: %s\n", d);
104  }
105  }
106  FcStrFree (target);
107 bail:
108  FcStrFree (d);
109 #endif
111 
112  return ret;
113 }
114 
115 #define CACHEBASE_LEN (1 + 36 + 1 + sizeof (FC_ARCHITECTURE) + sizeof (FC_CACHE_SUFFIX))
116 
117 static FcBool
119 {
120  enum {
121  MMAP_NOT_INITIALIZED = 0,
122  MMAP_USE,
123  MMAP_DONT_USE,
124  MMAP_CHECK_FS,
125  } status;
126  static void *static_status;
127 
128  status = (intptr_t) fc_atomic_ptr_get (&static_status);
129 
130  if (status == MMAP_NOT_INITIALIZED)
131  {
132  const char *env = getenv ("FONTCONFIG_USE_MMAP");
133  FcBool use;
134  if (env && FcNameBool ((const FcChar8 *) env, &use))
135  status = use ? MMAP_USE : MMAP_DONT_USE;
136  else
137  status = MMAP_CHECK_FS;
138  (void) fc_atomic_ptr_cmpexch (&static_status, NULL, (void *) status);
139  }
140 
141  if (status == MMAP_CHECK_FS)
142  return FcIsFsMmapSafe (fd);
143  else
144  return status == MMAP_USE;
145 
146 }
147 
148 static const char bin2hex[] = { '0', '1', '2', '3',
149  '4', '5', '6', '7',
150  '8', '9', 'a', 'b',
151  'c', 'd', 'e', 'f' };
152 
153 static FcChar8 *
155 {
156  FcChar8 *mapped_dir = NULL;
157  unsigned char hash[16];
158  FcChar8 *hex_hash, *key = NULL;
159  int cnt;
160  struct MD5Context ctx;
161  const FcChar8 *salt, *orig_dir = NULL;
162 
163  salt = FcConfigMapSalt (config, dir);
164  /* Obtain a path where "dir" is mapped to.
165  * In case:
166  * <remap-dir as-path="/usr/share/fonts">/run/host/fonts</remap-dir>
167  *
168  * FcConfigMapFontPath (config, "/run/host/fonts") will returns "/usr/share/fonts".
169  */
170  mapped_dir = FcConfigMapFontPath(config, dir);
171  if (mapped_dir)
172  {
173  orig_dir = dir;
174  dir = mapped_dir;
175  }
176  if (salt)
177  {
178  size_t dl = strlen ((const char *) dir);
179  size_t sl = strlen ((const char *) salt);
180 
181  key = (FcChar8 *) malloc (dl + sl + 1);
182  memcpy (key, dir, dl);
183  memcpy (key + dl, salt, sl + 1);
184  key[dl + sl] = 0;
185  if (!orig_dir)
186  orig_dir = dir;
187  dir = key;
188  }
189  MD5Init (&ctx);
190  MD5Update (&ctx, (const unsigned char *)dir, strlen ((const char *) dir));
191 
192  MD5Final (hash, &ctx);
193 
194  if (key)
195  FcStrFree (key);
196 
197  cache_base[0] = '/';
198  hex_hash = cache_base + 1;
199  for (cnt = 0; cnt < 16; ++cnt)
200  {
201  hex_hash[2*cnt ] = bin2hex[hash[cnt] >> 4];
202  hex_hash[2*cnt+1] = bin2hex[hash[cnt] & 0xf];
203  }
204  hex_hash[2*cnt] = 0;
205  strcat ((char *) cache_base, "-" FC_ARCHITECTURE FC_CACHE_SUFFIX);
206  if (FcDebug() & FC_DBG_CACHE)
207  {
208  printf ("cache: %s (dir: %s%s%s%s%s%s)\n", cache_base, orig_dir ? orig_dir : dir, mapped_dir ? " (mapped to " : "", mapped_dir ? (char *)mapped_dir : "", mapped_dir ? ")" : "", salt ? ", salt: " : "", salt ? (char *)salt : "");
209  }
210 
211  if (mapped_dir)
212  FcStrFree(mapped_dir);
213 
214  return cache_base;
215 }
216 
217 #ifndef _WIN32
218 static FcChar8 *
220 {
221  FcChar8 *target, *fuuid;
222  const FcChar8 *sysroot = FcConfigGetSysRoot (config);
223  int fd;
224 
225  /* We don't need to apply remapping here. because .uuid was created at that very directory
226  * to determine the cache name no matter where it was mapped to.
227  */
228  cache_base[0] = 0;
229  if (sysroot)
230  target = FcStrBuildFilename (sysroot, dir, NULL);
231  else
232  target = FcStrdup (dir);
233  fuuid = FcStrBuildFilename (target, ".uuid", NULL);
234  if ((fd = FcOpen ((char *) fuuid, O_RDONLY)) != -1)
235  {
236  char suuid[37];
237  ssize_t len;
238 
239  memset (suuid, 0, sizeof (suuid));
240  len = read (fd, suuid, 36);
241  suuid[36] = 0;
242  close (fd);
243  if (len < 0)
244  goto bail;
245  cache_base[0] = '/';
246  strcpy ((char *)&cache_base[1], suuid);
247  strcat ((char *) cache_base, "-" FC_ARCHITECTURE FC_CACHE_SUFFIX);
248  if (FcDebug () & FC_DBG_CACHE)
249  {
250  printf ("cache fallbacks to: %s (dir: %s)\n", cache_base, dir);
251  }
252  }
253 bail:
254  FcStrFree (fuuid);
255  FcStrFree (target);
256 
257  return cache_base;
258 }
259 #endif
260 
261 FcBool
263 {
264  FcChar8 *cache_hashed = NULL;
265  FcChar8 cache_base[CACHEBASE_LEN];
266 #ifndef _WIN32
267  FcChar8 uuid_cache_base[CACHEBASE_LEN];
268 #endif
269  FcStrList *list;
270  FcChar8 *cache_dir;
271  const FcChar8 *sysroot;
272  FcBool ret = FcTrue;
273 
275  if (!config)
276  return FcFalse;
277  sysroot = FcConfigGetSysRoot (config);
278 
279  FcDirCacheBasenameMD5 (config, dir, cache_base);
280 #ifndef _WIN32
281  FcDirCacheBasenameUUID (config, dir, uuid_cache_base);
282 #endif
283 
284  list = FcStrListCreate (config->cacheDirs);
285  if (!list)
286  {
287  ret = FcFalse;
288  goto bail;
289  }
290 
291  while ((cache_dir = FcStrListNext (list)))
292  {
293  if (sysroot)
294  cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL);
295  else
296  cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL);
297  if (!cache_hashed)
298  break;
299  (void) unlink ((char *) cache_hashed);
300  FcStrFree (cache_hashed);
301 #ifndef _WIN32
302  if (uuid_cache_base[0] != 0)
303  {
304  if (sysroot)
305  cache_hashed = FcStrBuildFilename (sysroot, cache_dir, uuid_cache_base, NULL);
306  else
307  cache_hashed = FcStrBuildFilename (cache_dir, uuid_cache_base, NULL);
308  if (!cache_hashed)
309  break;
310  (void) unlink ((char *) cache_hashed);
311  FcStrFree (cache_hashed);
312  }
313 #endif
314  }
317  /* return FcFalse if something went wrong */
318  if (cache_dir)
319  ret = FcFalse;
320 bail:
322 
323  return ret;
324 }
325 
326 static int
327 FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat)
328 {
329  int fd;
330 
331 #ifdef _WIN32
332  if (FcStat (cache_file, file_stat) < 0)
333  return -1;
334 #endif
335  fd = FcOpen((char *) cache_file, O_RDONLY | O_BINARY);
336  if (fd < 0)
337  return fd;
338 #ifndef _WIN32
339  if (fstat (fd, file_stat) < 0)
340  {
341  close (fd);
342  return -1;
343  }
344 #endif
345  return fd;
346 }
347 
348 /*
349  * Look for a cache file for the specified dir. Attempt
350  * to use each one we find, stopping when the callback
351  * indicates success
352  */
353 static FcBool
355  FcBool (*callback) (FcConfig *config, int fd, struct stat *fd_stat,
356  struct stat *dir_stat, struct timeval *cache_mtime, void *closure),
357  void *closure, FcChar8 **cache_file_ret)
358 {
359  int fd = -1;
360  FcChar8 cache_base[CACHEBASE_LEN];
361  FcStrList *list;
362  FcChar8 *cache_dir, *d;
363  struct stat file_stat, dir_stat;
364  FcBool ret = FcFalse;
365  const FcChar8 *sysroot = FcConfigGetSysRoot (config);
366  struct timeval latest_mtime = (struct timeval){ 0 };
367 
368  if (sysroot)
369  d = FcStrBuildFilename (sysroot, dir, NULL);
370  else
371  d = FcStrdup (dir);
372  if (FcStatChecksum (d, &dir_stat) < 0)
373  {
374  FcStrFree (d);
375  return FcFalse;
376  }
377  FcStrFree (d);
378 
379  FcDirCacheBasenameMD5 (config, dir, cache_base);
380 
381  list = FcStrListCreate (config->cacheDirs);
382  if (!list)
383  return FcFalse;
384 
385  while ((cache_dir = FcStrListNext (list)))
386  {
387  FcChar8 *cache_hashed;
388 #ifndef _WIN32
389  FcBool retried = FcFalse;
390 #endif
391 
392  if (sysroot)
393  cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL);
394  else
395  cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL);
396  if (!cache_hashed)
397  break;
398 #ifndef _WIN32
399  retry:
400 #endif
401  fd = FcDirCacheOpenFile (cache_hashed, &file_stat);
402  if (fd >= 0) {
403  ret = (*callback) (config, fd, &file_stat, &dir_stat, &latest_mtime, closure);
404  close (fd);
405  if (ret)
406  {
407  if (cache_file_ret)
408  {
409  if (*cache_file_ret)
410  FcStrFree (*cache_file_ret);
411  *cache_file_ret = cache_hashed;
412  }
413  else
414  FcStrFree (cache_hashed);
415  }
416  else
417  FcStrFree (cache_hashed);
418  }
419 #ifndef _WIN32
420  else if (!retried)
421  {
422  FcChar8 uuid_cache_base[CACHEBASE_LEN];
423 
424  retried = FcTrue;
425  FcDirCacheBasenameUUID (config, dir, uuid_cache_base);
426  if (uuid_cache_base[0] != 0)
427  {
428  FcStrFree (cache_hashed);
429  if (sysroot)
430  cache_hashed = FcStrBuildFilename (sysroot, cache_dir, uuid_cache_base, NULL);
431  else
432  cache_hashed = FcStrBuildFilename (cache_dir, uuid_cache_base, NULL);
433  if (!cache_hashed)
434  break;
435  goto retry;
436  }
437  else
438  FcStrFree (cache_hashed);
439  }
440 #endif
441  else
442  FcStrFree (cache_hashed);
443  }
445 
446  if (closure)
447  return !!(*((FcCache **)closure) != NULL);
448  return ret;
449 }
450 
451 #define FC_CACHE_MIN_MMAP 1024
452 
453 /*
454  * Skip list element, make sure the 'next' pointer is the last thing
455  * in the structure, it will be allocated large enough to hold all
456  * of the necessary pointers
457  */
458 
459 typedef struct _FcCacheSkip FcCacheSkip;
460 
461 struct _FcCacheSkip {
465  void *allocated;
471 };
472 
473 /*
474  * The head of the skip list; pointers for every possible level
475  * in the skip list, plus the largest level in the list
476  */
477 
478 #define FC_CACHE_MAX_LEVEL 16
479 
480 /* Protected by cache_lock below */
482 static int fcCacheMaxLevel;
483 
484 
486 
487 static void
489 {
490  FcMutex *lock;
491 retry:
493  if (!lock) {
494  lock = (FcMutex *) malloc (sizeof (FcMutex));
495  FcMutexInit (lock);
498  goto retry;
499  }
500 
501  FcMutexLock (lock);
502  /* Initialize random state */
503  FcRandom ();
504  return;
505  }
506  FcMutexLock (lock);
507 }
508 
509 static void
511 {
512  FcMutex *lock;
515 }
516 
517 static void
518 free_lock (void)
519 {
520  FcMutex *lock;
524  free (lock);
525  }
526 }
527 
528 
529 
530 /*
531  * Generate a random level number, distributed
532  * so that each level is 1/4 as likely as the one before
533  *
534  * Note that level numbers run 1 <= level <= MAX_LEVEL
535  */
536 static int
538 {
539  /* tricky bit -- each bit is '1' 75% of the time */
540  long int bits = FcRandom () | FcRandom ();
541  int level = 0;
542 
543  while (++level < FC_CACHE_MAX_LEVEL)
544  {
545  if (bits & 1)
546  break;
547  bits >>= 1;
548  }
549  return level;
550 }
551 
552 /*
553  * Insert cache into the list
554  */
555 static FcBool
556 FcCacheInsert (FcCache *cache, struct stat *cache_stat)
557 {
559  FcCacheSkip *s, **next;
560  int i, level;
561 
562  lock_cache ();
563 
564  /*
565  * Find links along each chain
566  */
568  for (i = fcCacheMaxLevel; --i >= 0; )
569  {
570  for (; (s = next[i]); next = s->next)
571  if (s->cache > cache)
572  break;
573  update[i] = &next[i];
574  }
575 
576  /*
577  * Create new list element
578  */
579  level = random_level ();
580  if (level > fcCacheMaxLevel)
581  {
582  level = fcCacheMaxLevel + 1;
585  }
586 
587  s = malloc (sizeof (FcCacheSkip) + (level - 1) * sizeof (FcCacheSkip *));
588  if (!s)
589  return FcFalse;
590 
591  s->cache = cache;
592  s->size = cache->size;
593  s->allocated = NULL;
594  FcRefInit (&s->ref, 1);
595  if (cache_stat)
596  {
597  s->cache_dev = cache_stat->st_dev;
598  s->cache_ino = cache_stat->st_ino;
599  s->cache_mtime = cache_stat->st_mtime;
600 #ifdef HAVE_STRUCT_STAT_ST_MTIM
601  s->cache_mtime_nano = cache_stat->st_mtim.tv_nsec;
602 #else
603  s->cache_mtime_nano = 0;
604 #endif
605  }
606  else
607  {
608  s->cache_dev = 0;
609  s->cache_ino = 0;
610  s->cache_mtime = 0;
611  s->cache_mtime_nano = 0;
612  }
613 
614  /*
615  * Insert into all fcCacheChains
616  */
617  for (i = 0; i < level; i++)
618  {
619  s->next[i] = *update[i];
620  *update[i] = s;
621  }
622 
623  unlock_cache ();
624  return FcTrue;
625 }
626 
627 static FcCacheSkip *
629 {
630  int i;
632  FcCacheSkip *s;
633 
634  if (!object)
635  return NULL;
636 
637  /*
638  * Walk chain pointers one level at a time
639  */
640  for (i = fcCacheMaxLevel; --i >= 0;)
641  while (next[i] && (char *) object >= ((char *) next[i]->cache + next[i]->size))
642  next = next[i]->next;
643  /*
644  * Here we are
645  */
646  s = next[0];
647  if (s && (char *) object < ((char *) s->cache + s->size))
648  return s;
649  return NULL;
650 }
651 
652 static FcCacheSkip *
653 FcCacheFindByAddr (void *object)
654 {
655  FcCacheSkip *ret;
656  lock_cache ();
657  ret = FcCacheFindByAddrUnlocked (object);
658  unlock_cache ();
659  return ret;
660 }
661 
662 static void
664 {
666  FcCacheSkip *s, **next;
667  int i;
668  void *allocated;
669 
670  /*
671  * Find links along each chain
672  */
674  for (i = fcCacheMaxLevel; --i >= 0; )
675  {
676  for (; (s = next[i]); next = s->next)
677  if (s->cache >= cache)
678  break;
679  update[i] = &next[i];
680  }
681  s = next[0];
682  for (i = 0; i < fcCacheMaxLevel && *update[i] == s; i++)
683  *update[i] = s->next[i];
685  fcCacheMaxLevel--;
686 
687  if (s)
688  {
689  allocated = s->allocated;
690  while (allocated)
691  {
692  /* First element in allocated chunk is the free list */
693  next = *(void **)allocated;
694  free (allocated);
695  allocated = next;
696  }
697  free (s);
698  }
699 }
700 
701 static FcCache *
702 FcCacheFindByStat (struct stat *cache_stat)
703 {
704  FcCacheSkip *s;
705 
706  lock_cache ();
707  for (s = fcCacheChains[0]; s; s = s->next[0])
708  if (s->cache_dev == cache_stat->st_dev &&
709  s->cache_ino == cache_stat->st_ino &&
710  s->cache_mtime == cache_stat->st_mtime)
711  {
712 #ifdef HAVE_STRUCT_STAT_ST_MTIM
713  if (s->cache_mtime_nano != cache_stat->st_mtim.tv_nsec)
714  continue;
715 #endif
716  FcRefInc (&s->ref);
717  unlock_cache ();
718  return s->cache;
719  }
720  unlock_cache ();
721  return NULL;
722 }
723 
724 static void
726 {
728 
729  switch (cache->magic) {
731  free (cache);
732  break;
733  case FC_CACHE_MAGIC_MMAP:
734 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
735  munmap (cache, cache->size);
736 #elif defined(_WIN32)
737  UnmapViewOfFile (cache);
738 #endif
739  break;
740  }
741 }
742 
743 void
745 {
746  FcCacheSkip *skip = FcCacheFindByAddr (object);
747 
748  if (skip)
749  FcRefInc (&skip->ref);
750 }
751 
752 void
754 {
755  FcCacheSkip *skip;
756 
757  lock_cache ();
758  skip = FcCacheFindByAddrUnlocked (object);
759  if (skip)
760  {
761  if (FcRefDec (&skip->ref) == 1)
763  }
764  unlock_cache ();
765 }
766 
767 void *
769 {
770  FcCacheSkip *skip;
771  void *allocated = NULL;
772 
773  lock_cache ();
775  if (skip)
776  {
777  void *chunk = malloc (sizeof (void *) + len);
778  if (chunk)
779  {
780  /* First element in allocated chunk is the free list */
781  *(void **)chunk = skip->allocated;
782  skip->allocated = chunk;
783  /* Return the rest */
784  allocated = ((FcChar8 *)chunk) + sizeof (void *);
785  }
786  }
787  unlock_cache ();
788  return allocated;
789 }
790 
791 void
793 {
794  int i;
795 
796  for (i = 0; i < FC_CACHE_MAX_LEVEL; i++)
797  {
798  if (FcDebug() & FC_DBG_CACHE)
799  {
800  if (fcCacheChains[i] != NULL)
801  {
803  printf("Fontconfig error: not freed %p (dir: %s, refcount %" FC_ATOMIC_INT_FORMAT ")\n", s->cache, FcCacheDir(s->cache), s->ref.count);
804  }
805  }
806  else
807  assert (fcCacheChains[i] == NULL);
808  }
809  assert (fcCacheMaxLevel == 0);
810 
811  free_lock ();
812 }
813 
814 static FcBool
816 {
817  struct stat dir_static;
818  FcBool fnano = FcTrue;
819 
820  if (!dir_stat)
821  {
822  const FcChar8 *sysroot = FcConfigGetSysRoot (config);
823  FcChar8 *d;
824 
825  if (sysroot)
826  d = FcStrBuildFilename (sysroot, FcCacheDir (cache), NULL);
827  else
828  d = FcStrdup (FcCacheDir (cache));
829  if (FcStatChecksum (d, &dir_static) < 0)
830  {
831  FcStrFree (d);
832  return FcFalse;
833  }
834  FcStrFree (d);
835  dir_stat = &dir_static;
836  }
837 #ifdef HAVE_STRUCT_STAT_ST_MTIM
838  fnano = (cache->checksum_nano == dir_stat->st_mtim.tv_nsec);
839  if (FcDebug () & FC_DBG_CACHE)
840  printf ("FcCacheTimeValid dir \"%s\" cache checksum %d.%ld dir checksum %d.%ld\n",
841  FcCacheDir (cache), cache->checksum, (long)cache->checksum_nano, (int) dir_stat->st_mtime, dir_stat->st_mtim.tv_nsec);
842 #else
843  if (FcDebug () & FC_DBG_CACHE)
844  printf ("FcCacheTimeValid dir \"%s\" cache checksum %d dir checksum %d\n",
845  FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime);
846 #endif
847 
848  return dir_stat->st_mtime == 0 || (cache->checksum == (int) dir_stat->st_mtime && fnano);
849 }
850 
851 static FcBool
853 {
854  char *base = (char *)cache;
855  char *end = base + cache->size;
856  intptr_t *dirs;
857  FcFontSet *fs;
858  int i, j;
859 
860  if (cache->dir < 0 || cache->dir > cache->size - sizeof (intptr_t) ||
861  memchr (base + cache->dir, '\0', cache->size - cache->dir) == NULL)
862  return FcFalse;
863 
864  if (cache->dirs < 0 || cache->dirs >= cache->size ||
865  cache->dirs_count < 0 ||
866  cache->dirs_count > (cache->size - cache->dirs) / sizeof (intptr_t))
867  return FcFalse;
868 
869  dirs = FcCacheDirs (cache);
870  if (dirs)
871  {
872  for (i = 0; i < cache->dirs_count; i++)
873  {
874  FcChar8 *dir;
875 
876  if (dirs[i] < 0 ||
877  dirs[i] > end - (char *) dirs - sizeof (intptr_t))
878  return FcFalse;
879 
880  dir = FcOffsetToPtr (dirs, dirs[i], FcChar8);
881  if (memchr (dir, '\0', end - (char *) dir) == NULL)
882  return FcFalse;
883  }
884  }
885 
886  if (cache->set < 0 || cache->set > cache->size - sizeof (FcFontSet))
887  return FcFalse;
888 
889  fs = FcCacheSet (cache);
890  if (fs)
891  {
892  if (fs->nfont > (end - (char *) fs) / sizeof (FcPattern))
893  return FcFalse;
894 
895  if (!FcIsEncodedOffset(fs->fonts))
896  return FcFalse;
897 
898  for (i = 0; i < fs->nfont; i++)
899  {
900  FcPattern *font = FcFontSetFont (fs, i);
901  FcPatternElt *e;
903  char *last_offset;
904 
905  if ((char *) font < base ||
906  (char *) font > end - sizeof (FcFontSet) ||
907  font->elts_offset < 0 ||
908  font->elts_offset > end - (char *) font ||
909  font->num > (end - (char *) font - font->elts_offset) / sizeof (FcPatternElt) ||
910  !FcRefIsConst (&font->ref))
911  return FcFalse;
912 
913 
914  e = FcPatternElts(font);
915  if (e->values != 0 && !FcIsEncodedOffset(e->values))
916  return FcFalse;
917 
918  for (j = 0; j < font->num; j++)
919  {
920  last_offset = (char *) font + font->elts_offset;
922  {
923  if ((char *) l < last_offset || (char *) l > end - sizeof (*l) ||
924  (l->next != NULL && !FcIsEncodedOffset(l->next)))
925  return FcFalse;
926  last_offset = (char *) l + 1;
927  }
928  }
929  }
930  }
931 
932  return FcTrue;
933 }
934 
935 /*
936  * Map a cache file into memory
937  */
938 static FcCache *
939 FcDirCacheMapFd (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat)
940 {
941  FcCache *cache;
942  FcBool allocated = FcFalse;
943 
944  if (fd_stat->st_size > INTPTR_MAX ||
945  fd_stat->st_size < (int) sizeof (FcCache))
946  return NULL;
947  cache = FcCacheFindByStat (fd_stat);
948  if (cache)
949  {
950  if (FcCacheTimeValid (config, cache, dir_stat))
951  return cache;
953  cache = NULL;
954  }
955 
956  /*
957  * Large cache files are mmap'ed, smaller cache files are read. This
958  * balances the system cost of mmap against per-process memory usage.
959  */
960  if (FcCacheIsMmapSafe (fd) && fd_stat->st_size >= FC_CACHE_MIN_MMAP)
961  {
962 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
963  cache = mmap (0, fd_stat->st_size, PROT_READ, MAP_SHARED, fd, 0);
964 #if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
965  posix_fadvise (fd, 0, fd_stat->st_size, POSIX_FADV_WILLNEED);
966 #endif
967  if (cache == MAP_FAILED)
968  cache = NULL;
969 #elif defined(_WIN32)
970  {
971  HANDLE hFileMap;
972 
973  cache = NULL;
974  hFileMap = CreateFileMapping((HANDLE) _get_osfhandle(fd), NULL,
975  PAGE_READONLY, 0, 0, NULL);
976  if (hFileMap != NULL)
977  {
978  cache = MapViewOfFile (hFileMap, FILE_MAP_READ, 0, 0,
979  fd_stat->st_size);
980  CloseHandle (hFileMap);
981  }
982  }
983 #endif
984  }
985  if (!cache)
986  {
987  cache = malloc (fd_stat->st_size);
988  if (!cache)
989  return NULL;
990 
991  if (read (fd, cache, fd_stat->st_size) != fd_stat->st_size)
992  {
993  free (cache);
994  return NULL;
995  }
996  allocated = FcTrue;
997  }
998  if (cache->magic != FC_CACHE_MAGIC_MMAP ||
999  cache->version < FC_CACHE_VERSION_NUMBER ||
1000  cache->size != (intptr_t) fd_stat->st_size ||
1002  !FcCacheTimeValid (config, cache, dir_stat) ||
1003  !FcCacheInsert (cache, fd_stat))
1004  {
1005  if (allocated)
1006  free (cache);
1007  else
1008  {
1009 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
1010  munmap (cache, fd_stat->st_size);
1011 #elif defined(_WIN32)
1012  UnmapViewOfFile (cache);
1013 #endif
1014  }
1015  return NULL;
1016  }
1017 
1018  /* Mark allocated caches so they're freed rather than unmapped */
1019  if (allocated)
1020  cache->magic = FC_CACHE_MAGIC_ALLOC;
1021 
1022  return cache;
1023 }
1024 
1025 void
1027 {
1029 
1030  if (skip)
1031  FcRefAdd (&skip->ref, nref);
1032 }
1033 
1034 void
1036 {
1038 }
1039 
1040 static FcBool
1041 FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure)
1042 {
1043  FcCache *cache = FcDirCacheMapFd (config, fd, fd_stat, dir_stat);
1044  struct timeval cache_mtime, zero_mtime = { 0, 0}, dir_mtime;
1045 
1046  if (!cache)
1047  return FcFalse;
1048  cache_mtime.tv_sec = fd_stat->st_mtime;
1049  dir_mtime.tv_sec = dir_stat->st_mtime;
1050 #ifdef HAVE_STRUCT_STAT_ST_MTIM
1051  cache_mtime.tv_usec = fd_stat->st_mtim.tv_nsec / 1000;
1052  dir_mtime.tv_usec = dir_stat->st_mtim.tv_nsec / 1000;
1053 #else
1054  cache_mtime.tv_usec = 0;
1055  dir_mtime.tv_usec = 0;
1056 #endif
1057  /* special take care of OSTree */
1058  if (!timercmp (&zero_mtime, &dir_mtime, !=))
1059  {
1060  if (!timercmp (&zero_mtime, &cache_mtime, !=))
1061  {
1062  if (*((FcCache **) closure))
1063  FcDirCacheUnload (*((FcCache **) closure));
1064  }
1065  else if (*((FcCache **) closure) && !timercmp (&zero_mtime, latest_cache_mtime, !=))
1066  {
1068  return FcFalse;
1069  }
1070  else if (timercmp (latest_cache_mtime, &cache_mtime, <))
1071  {
1072  if (*((FcCache **) closure))
1073  FcDirCacheUnload (*((FcCache **) closure));
1074  }
1075  }
1076  else if (timercmp (latest_cache_mtime, &cache_mtime, <))
1077  {
1078  if (*((FcCache **) closure))
1079  FcDirCacheUnload (*((FcCache **) closure));
1080  }
1081  else
1082  {
1084  return FcFalse;
1085  }
1086  latest_cache_mtime->tv_sec = cache_mtime.tv_sec;
1087  latest_cache_mtime->tv_usec = cache_mtime.tv_usec;
1088  *((FcCache **) closure) = cache;
1089  return FcTrue;
1090 }
1091 
1092 FcCache *
1094 {
1095  FcCache *cache = NULL;
1096 
1098  if (!config)
1099  return NULL;
1100  if (!FcDirCacheProcess (config, dir,
1102  &cache, cache_file))
1103  cache = NULL;
1104 
1106 
1107  return cache;
1108 }
1109 
1110 FcCache *
1111 FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat)
1112 {
1113  int fd;
1114  FcCache *cache;
1115  struct stat my_file_stat;
1116  FcConfig *config;
1117 
1118  if (!file_stat)
1119  file_stat = &my_file_stat;
1121  if (!config)
1122  return NULL;
1123  fd = FcDirCacheOpenFile (cache_file, file_stat);
1124  if (fd < 0)
1125  return NULL;
1126  cache = FcDirCacheMapFd (config, fd, file_stat, NULL);
1128  close (fd);
1129  return cache;
1130 }
1131 
1132 static int
1133 FcDirChecksum (struct stat *statb)
1134 {
1135  int ret = (int) statb->st_mtime;
1136  char *endptr;
1137  char *source_date_epoch;
1138  unsigned long long epoch;
1139 
1140  source_date_epoch = getenv("SOURCE_DATE_EPOCH");
1141  if (source_date_epoch)
1142  {
1143  errno = 0;
1144  epoch = strtoull(source_date_epoch, &endptr, 10);
1145 
1146  if (endptr == source_date_epoch)
1147  fprintf (stderr,
1148  "Fontconfig: SOURCE_DATE_EPOCH invalid\n");
1149  else if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
1150  || (errno != 0 && epoch == 0))
1151  fprintf (stderr,
1152  "Fontconfig: SOURCE_DATE_EPOCH: strtoull: %s: %" FC_UINT64_FORMAT "\n",
1153  strerror(errno), epoch);
1154  else if (*endptr != '\0')
1155  fprintf (stderr,
1156  "Fontconfig: SOURCE_DATE_EPOCH has trailing garbage\n");
1157  else if (epoch > ULONG_MAX)
1158  fprintf (stderr,
1159  "Fontconfig: SOURCE_DATE_EPOCH must be <= %lu but saw: %" FC_UINT64_FORMAT "\n",
1160  ULONG_MAX, epoch);
1161  else if (epoch < ret)
1162  /* Only override if directory is newer */
1163  ret = (int) epoch;
1164  }
1165 
1166  return ret;
1167 }
1168 
1169 static int64_t
1170 FcDirChecksumNano (struct stat *statb)
1171 {
1172 #ifdef HAVE_STRUCT_STAT_ST_MTIM
1173  /* No nanosecond component to parse */
1174  if (getenv("SOURCE_DATE_EPOCH"))
1175  return 0;
1176  return statb->st_mtim.tv_nsec;
1177 #else
1178  return 0;
1179 #endif
1180 }
1181 
1182 /*
1183  * Validate a cache file by reading the header and checking
1184  * the magic number and the size field
1185  */
1186 static FcBool
1187 FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure FC_UNUSED)
1188 {
1189  FcBool ret = FcTrue;
1190  FcCache c;
1191 
1192  if (read (fd, &c, sizeof (FcCache)) != sizeof (FcCache))
1193  ret = FcFalse;
1194  else if (c.magic != FC_CACHE_MAGIC_MMAP)
1195  ret = FcFalse;
1196  else if (c.version < FC_CACHE_VERSION_NUMBER)
1197  ret = FcFalse;
1198  else if (fd_stat->st_size != c.size)
1199  ret = FcFalse;
1200  else if (c.checksum != FcDirChecksum (dir_stat))
1201  ret = FcFalse;
1202 #ifdef HAVE_STRUCT_STAT_ST_MTIM
1203  else if (c.checksum_nano != FcDirChecksumNano (dir_stat))
1204  ret = FcFalse;
1205 #endif
1206  return ret;
1207 }
1208 
1209 static FcBool
1211 {
1212  return FcDirCacheProcess (config, dir,
1214  NULL, NULL);
1215 }
1216 
1217 FcBool
1219 {
1220  FcConfig *config;
1221  FcBool ret;
1222 
1224  if (!config)
1225  return FcFalse;
1226 
1229 
1230  return ret;
1231 }
1232 
1233 /*
1234  * Build a cache structure from the given contents
1235  */
1236 FcCache *
1237 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs)
1238 {
1240  FcCache *cache;
1241  int i;
1242  FcChar8 *dir_serialize;
1243  intptr_t *dirs_serialize;
1244  FcFontSet *set_serialize;
1245 
1246  if (!serialize)
1247  return NULL;
1248  /*
1249  * Space for cache structure
1250  */
1251  FcSerializeReserve (serialize, sizeof (FcCache));
1252  /*
1253  * Directory name
1254  */
1256  goto bail1;
1257  /*
1258  * Subdirs
1259  */
1260  FcSerializeAlloc (serialize, dirs, dirs->num * sizeof (FcChar8 *));
1261  for (i = 0; i < dirs->num; i++)
1262  if (!FcStrSerializeAlloc (serialize, dirs->strs[i]))
1263  goto bail1;
1264 
1265  /*
1266  * Patterns
1267  */
1268  if (!FcFontSetSerializeAlloc (serialize, set))
1269  goto bail1;
1270 
1271  /* Serialize layout complete. Now allocate space and fill it */
1272  cache = malloc (serialize->size);
1273  if (!cache)
1274  goto bail1;
1275  /* shut up valgrind */
1276  memset (cache, 0, serialize->size);
1277 
1278  serialize->linear = cache;
1279 
1280  cache->magic = FC_CACHE_MAGIC_ALLOC;
1281  cache->version = FC_CACHE_VERSION_NUMBER;
1282  cache->size = serialize->size;
1283  cache->checksum = FcDirChecksum (dir_stat);
1284  cache->checksum_nano = FcDirChecksumNano (dir_stat);
1285 
1286  /*
1287  * Serialize directory name
1288  */
1289  dir_serialize = FcStrSerialize (serialize, dir);
1290  if (!dir_serialize)
1291  goto bail2;
1292  cache->dir = FcPtrToOffset (cache, dir_serialize);
1293 
1294  /*
1295  * Serialize sub dirs
1296  */
1297  dirs_serialize = FcSerializePtr (serialize, dirs);
1298  if (!dirs_serialize)
1299  goto bail2;
1300  cache->dirs = FcPtrToOffset (cache, dirs_serialize);
1301  cache->dirs_count = dirs->num;
1302  for (i = 0; i < dirs->num; i++)
1303  {
1304  FcChar8 *d_serialize = FcStrSerialize (serialize, dirs->strs[i]);
1305  if (!d_serialize)
1306  goto bail2;
1307  dirs_serialize[i] = FcPtrToOffset (dirs_serialize, d_serialize);
1308  }
1309 
1310  /*
1311  * Serialize font set
1312  */
1313  set_serialize = FcFontSetSerialize (serialize, set);
1314  if (!set_serialize)
1315  goto bail2;
1316  cache->set = FcPtrToOffset (cache, set_serialize);
1317 
1319 
1321 
1322  return cache;
1323 
1324 bail2:
1325  free (cache);
1326 bail1:
1328  return NULL;
1329 }
1330 
1331 FcCache *
1332 FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs)
1333 {
1334  FcCache *new;
1336  const FcChar8 *dir = FcCacheDir (cache);
1337 
1338  new = FcDirCacheBuild (set, dir, dir_stat, dirs);
1339  FcFontSetDestroy (set);
1340 
1341  return new;
1342 }
1343 
1344 /* write serialized state to the cache file */
1345 FcBool
1347 {
1348  FcChar8 *dir = FcCacheDir (cache);
1349  FcChar8 cache_base[CACHEBASE_LEN];
1350  FcChar8 *cache_hashed;
1351  int fd;
1352  FcAtomic *atomic;
1353  FcStrList *list;
1354  FcChar8 *cache_dir = NULL;
1355  FcChar8 *test_dir, *d = NULL;
1356  FcCacheSkip *skip;
1357  struct stat cache_stat;
1358  unsigned int magic;
1359  int written;
1360  const FcChar8 *sysroot = FcConfigGetSysRoot (config);
1361 
1362  /*
1363  * Write it to the first directory in the list which is writable
1364  */
1365 
1366  list = FcStrListCreate (config->cacheDirs);
1367  if (!list)
1368  return FcFalse;
1369  while ((test_dir = FcStrListNext (list)))
1370  {
1371  if (d)
1372  FcStrFree (d);
1373  if (sysroot)
1374  d = FcStrBuildFilename (sysroot, test_dir, NULL);
1375  else
1376  d = FcStrCopyFilename (test_dir);
1377 
1378  if (access ((char *) d, W_OK) == 0)
1379  {
1380  cache_dir = FcStrCopyFilename (d);
1381  break;
1382  }
1383  else
1384  {
1385  /*
1386  * If the directory doesn't exist, try to create it
1387  */
1388  if (access ((char *) d, F_OK) == -1) {
1389  if (FcMakeDirectory (d))
1390  {
1391  cache_dir = FcStrCopyFilename (d);
1392  /* Create CACHEDIR.TAG */
1394  break;
1395  }
1396  }
1397  /*
1398  * Otherwise, try making it writable
1399  */
1400  else if (chmod ((char *) d, 0755) == 0)
1401  {
1402  cache_dir = FcStrCopyFilename (d);
1403  /* Try to create CACHEDIR.TAG too */
1405  break;
1406  }
1407  }
1408  }
1409  if (!test_dir)
1410  fprintf (stderr, "Fontconfig error: No writable cache directories\n");
1411  if (d)
1412  FcStrFree (d);
1413  FcStrListDone (list);
1414  if (!cache_dir)
1415  return FcFalse;
1416 
1417  FcDirCacheBasenameMD5 (config, dir, cache_base);
1418  cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL);
1419  FcStrFree (cache_dir);
1420  if (!cache_hashed)
1421  return FcFalse;
1422 
1423  if (FcDebug () & FC_DBG_CACHE)
1424  printf ("FcDirCacheWriteDir dir \"%s\" file \"%s\"\n",
1425  dir, cache_hashed);
1426 
1427  atomic = FcAtomicCreate ((FcChar8 *)cache_hashed);
1428  if (!atomic)
1429  goto bail1;
1430 
1431  if (!FcAtomicLock (atomic))
1432  goto bail3;
1433 
1434  fd = FcOpen((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666);
1435  if (fd == -1)
1436  goto bail4;
1437 
1438  /* Temporarily switch magic to MMAP while writing to file */
1439  magic = cache->magic;
1440  if (magic != FC_CACHE_MAGIC_MMAP)
1441  cache->magic = FC_CACHE_MAGIC_MMAP;
1442 
1443  /*
1444  * Write cache contents to file
1445  */
1446  written = write (fd, cache, cache->size);
1447 
1448  /* Switch magic back */
1449  if (magic != FC_CACHE_MAGIC_MMAP)
1450  cache->magic = magic;
1451 
1452  if (written != cache->size)
1453  {
1454  perror ("write cache");
1455  goto bail5;
1456  }
1457 
1458  close(fd);
1460  goto bail4;
1461 
1462  /* If the file is small, update the cache chain entry such that the
1463  * new cache file is not read again. If it's large, we don't do that
1464  * such that we reload it, using mmap, which is shared across processes.
1465  */
1466  if (cache->size < FC_CACHE_MIN_MMAP && FcStat (cache_hashed, &cache_stat))
1467  {
1468  lock_cache ();
1470  {
1471  skip->cache_dev = cache_stat.st_dev;
1472  skip->cache_ino = cache_stat.st_ino;
1473  skip->cache_mtime = cache_stat.st_mtime;
1474 #ifdef HAVE_STRUCT_STAT_ST_MTIM
1475  skip->cache_mtime_nano = cache_stat.st_mtim.tv_nsec;
1476 #else
1477  skip->cache_mtime_nano = 0;
1478 #endif
1479  }
1480  unlock_cache ();
1481  }
1482 
1483  FcStrFree (cache_hashed);
1486  return FcTrue;
1487 
1488  bail5:
1489  close (fd);
1490  bail4:
1492  bail3:
1494  bail1:
1495  FcStrFree (cache_hashed);
1496  return FcFalse;
1497 }
1498 
1499 FcBool
1501 {
1502  DIR *d;
1503  struct dirent *ent;
1504  FcChar8 *dir;
1505  FcBool ret = FcTrue;
1506  FcBool remove;
1507  FcCache *cache;
1508  struct stat target_stat;
1509  const FcChar8 *sysroot;
1510  FcConfig *config;
1511 
1513  if (!config)
1514  return FcFalse;
1515  /* FIXME: this API needs to support non-current FcConfig */
1516  sysroot = FcConfigGetSysRoot (config);
1517  if (sysroot)
1518  dir = FcStrBuildFilename (sysroot, cache_dir, NULL);
1519  else
1520  dir = FcStrCopyFilename (cache_dir);
1521  if (!dir)
1522  {
1523  fprintf (stderr, "Fontconfig error: %s: out of memory\n", cache_dir);
1524  ret = FcFalse;
1525  goto bail;
1526  }
1527  if (access ((char *) dir, W_OK) != 0)
1528  {
1529  if (verbose || FcDebug () & FC_DBG_CACHE)
1530  printf ("%s: not cleaning %s cache directory\n", dir,
1531  access ((char *) dir, F_OK) == 0 ? "unwritable" : "non-existent");
1532  goto bail0;
1533  }
1534  if (verbose || FcDebug () & FC_DBG_CACHE)
1535  printf ("%s: cleaning cache directory\n", dir);
1536  d = opendir ((char *) dir);
1537  if (!d)
1538  {
1539  perror ((char *) dir);
1540  ret = FcFalse;
1541  goto bail0;
1542  }
1543  while ((ent = readdir (d)))
1544  {
1545  FcChar8 *file_name;
1546  const FcChar8 *target_dir;
1547 
1548  if (ent->d_name[0] == '.')
1549  continue;
1550  /* skip cache files for different architectures and */
1551  /* files which are not cache files at all */
1552  if (strlen(ent->d_name) != 32 + strlen ("-" FC_ARCHITECTURE FC_CACHE_SUFFIX) ||
1553  strcmp(ent->d_name + 32, "-" FC_ARCHITECTURE FC_CACHE_SUFFIX))
1554  continue;
1555 
1557  if (!file_name)
1558  {
1559  fprintf (stderr, "Fontconfig error: %s: allocation failure\n", dir);
1560  ret = FcFalse;
1561  break;
1562  }
1563  remove = FcFalse;
1565  if (!cache)
1566  {
1567  if (verbose || FcDebug () & FC_DBG_CACHE)
1568  printf ("%s: invalid cache file: %s\n", dir, ent->d_name);
1569  remove = FcTrue;
1570  }
1571  else
1572  {
1573  FcChar8 *s;
1574 
1575  target_dir = FcCacheDir (cache);
1576  if (sysroot)
1577  s = FcStrBuildFilename (sysroot, target_dir, NULL);
1578  else
1579  s = FcStrdup (target_dir);
1580  if (stat ((char *) s, &target_stat) < 0)
1581  {
1582  if (verbose || FcDebug () & FC_DBG_CACHE)
1583  printf ("%s: %s: missing directory: %s \n",
1584  dir, ent->d_name, s);
1585  remove = FcTrue;
1586  }
1588  FcStrFree (s);
1589  }
1590  if (remove)
1591  {
1592  if (unlink ((char *) file_name) < 0)
1593  {
1594  perror ((char *) file_name);
1595  ret = FcFalse;
1596  }
1597  }
1598  FcStrFree (file_name);
1599  }
1600 
1601  closedir (d);
1602 bail0:
1603  FcStrFree (dir);
1604 bail:
1606 
1607  return ret;
1608 }
1609 
1610 int
1612  FcConfig *config)
1613 {
1614  FcChar8 *cache_hashed = NULL;
1615  FcChar8 cache_base[CACHEBASE_LEN];
1616  FcStrList *list;
1617  FcChar8 *cache_dir;
1618  const FcChar8 *sysroot = FcConfigGetSysRoot (config);
1619  int fd = -1;
1620 
1621  FcDirCacheBasenameMD5 (config, dir, cache_base);
1622  list = FcStrListCreate (config->cacheDirs);
1623  if (!list)
1624  return -1;
1625 
1626  while ((cache_dir = FcStrListNext (list)))
1627  {
1628  if (sysroot)
1629  cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL);
1630  else
1631  cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL);
1632  if (!cache_hashed)
1633  break;
1634  fd = FcOpen ((const char *)cache_hashed, O_RDWR);
1635  FcStrFree (cache_hashed);
1636  /* No caches in that directory. simply retry with another one */
1637  if (fd != -1)
1638  {
1639 #if defined(_WIN32)
1640  if (_locking (fd, _LK_LOCK, 1) == -1)
1641  goto bail;
1642 #else
1643  struct flock fl;
1644 
1645  fl.l_type = F_WRLCK;
1646  fl.l_whence = SEEK_SET;
1647  fl.l_start = 0;
1648  fl.l_len = 0;
1649  fl.l_pid = getpid ();
1650  if (fcntl (fd, F_SETLKW, &fl) == -1)
1651  goto bail;
1652 #endif
1653  break;
1654  }
1655  }
1656  FcStrListDone (list);
1657  return fd;
1658 bail:
1659  FcStrListDone (list);
1660  if (fd != -1)
1661  close (fd);
1662  return -1;
1663 }
1664 
1665 void
1667 {
1668  if (fd != -1)
1669  {
1670 #if defined(_WIN32)
1671  _locking (fd, _LK_UNLCK, 1);
1672 #else
1673  struct flock fl;
1674 
1675  fl.l_type = F_UNLCK;
1676  fl.l_whence = SEEK_SET;
1677  fl.l_start = 0;
1678  fl.l_len = 0;
1679  fl.l_pid = getpid ();
1680  fcntl (fd, F_SETLK, &fl);
1681 #endif
1682  close (fd);
1683  }
1684 }
1685 
1686 /*
1687  * Hokey little macro trick to permit the definitions of C functions
1688  * with the same name as CPP macros
1689  */
1690 #define args1(x) (x)
1691 #define args2(x,y) (x,y)
1692 
1693 const FcChar8 *
1695 {
1696  return FcCacheDir (c);
1697 }
1698 
1699 FcFontSet *
1701 {
1702  FcFontSet *old = FcCacheSet (c);
1703  FcFontSet *new = FcFontSetCreate ();
1704  int i;
1705 
1706  if (!new)
1707  return NULL;
1708  for (i = 0; i < old->nfont; i++)
1709  {
1710  FcPattern *font = FcFontSetFont (old, i);
1711 
1713  if (!FcFontSetAdd (new, font))
1714  {
1715  FcFontSetDestroy (new);
1716  return NULL;
1717  }
1718  }
1719  return new;
1720 }
1721 
1722 const FcChar8 *
1724 {
1725  return FcCacheSubdir (c, i);
1726 }
1727 
1728 int
1730 {
1731  return c->dirs_count;
1732 }
1733 
1734 int
1736 {
1737  return FcCacheSet(c)->nfont;
1738 }
1739 
1740 FcBool
1742 {
1743  FcChar8 *cache_tag;
1744  int fd;
1745  FILE *fp;
1746  FcAtomic *atomic;
1747  static const FcChar8 cache_tag_contents[] =
1748  "Signature: 8a477f597d28d172789f06886806bc55\n"
1749  "# This file is a cache directory tag created by fontconfig.\n"
1750  "# For information about cache directory tags, see:\n"
1751  "# http://www.brynosaurus.com/cachedir/\n";
1752  static size_t cache_tag_contents_size = sizeof (cache_tag_contents) - 1;
1753  FcBool ret = FcFalse;
1754 
1755  if (!cache_dir)
1756  return FcFalse;
1757 
1758  if (access ((char *) cache_dir, W_OK) == 0)
1759  {
1760  /* Create CACHEDIR.TAG */
1761  cache_tag = FcStrBuildFilename (cache_dir, "CACHEDIR.TAG", NULL);
1762  if (!cache_tag)
1763  return FcFalse;
1764  atomic = FcAtomicCreate ((FcChar8 *)cache_tag);
1765  if (!atomic)
1766  goto bail1;
1767  if (!FcAtomicLock (atomic))
1768  goto bail2;
1769  fd = FcOpen((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT, 0644);
1770  if (fd == -1)
1771  goto bail3;
1772  fp = fdopen(fd, "wb");
1773  if (fp == NULL)
1774  goto bail3;
1775 
1776  fwrite(cache_tag_contents, cache_tag_contents_size, sizeof (FcChar8), fp);
1777  fclose(fp);
1778 
1780  goto bail3;
1781 
1782  ret = FcTrue;
1783  bail3:
1785  bail2:
1787  bail1:
1788  FcStrFree (cache_tag);
1789  }
1790 
1791  if (FcDebug () & FC_DBG_CACHE)
1792  {
1793  if (ret)
1794  printf ("Created CACHEDIR.TAG at %s\n", cache_dir);
1795  else
1796  printf ("Unable to create CACHEDIR.TAG at %s\n", cache_dir);
1797  }
1798 
1799  return ret;
1800 }
1801 
1802 void
1804 {
1805  FcChar8 *cache_dir = NULL, *d = NULL;
1806  FcStrList *list;
1807  const FcChar8 *sysroot;
1808 
1810  if (!config)
1811  return;
1812  sysroot = FcConfigGetSysRoot (config);
1813 
1815  if (!list)
1816  goto bail;
1817 
1818  while ((cache_dir = FcStrListNext (list)))
1819  {
1820  if (d)
1821  FcStrFree (d);
1822  if (sysroot)
1823  d = FcStrBuildFilename (sysroot, cache_dir, NULL);
1824  else
1825  d = FcStrCopyFilename (cache_dir);
1826  if (FcDirCacheCreateTagFile (d))
1827  break;
1828  }
1829  if (d)
1830  FcStrFree (d);
1831  FcStrListDone (list);
1832 bail:
1834 }
1835 
1836 #define __fccache__
1837 #include "fcaliastail.h"
1838 #undef __fccache__
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
void __cdecl perror(char const *_ErrMsg)
unsigned long long __cdecl strtoull(char const *_String, char **_EndPtr, int _Radix)
int level
Definition: afm2pl.c:1694
#define next(a)
Definition: aptex-macros.h:924
#define hash
Definition: aptex.h:388
#define free(a)
Definition: decNumber.cpp:310
int ssize_t
Definition: defines.h:155
#define F_OK
Definition: defs.h:34
#define skip(p, c)
Definition: ptexmac.h:70
int strcmp()
Definition: coll.cpp:143
int printf()
char * strcpy()
#define FcAtomicDestroy
Definition: fcalias.h:238
#define FcStrListDone
Definition: fcalias.h:444
#define FcAtomicReplaceOrig
Definition: fcalias.h:232
#define FcConfigGetCacheDirs
Definition: fcalias.h:60
#define FcAtomicCreate
Definition: fcalias.h:224
#define FcConfigDestroy
Definition: fcalias.h:40
#define FcFontSetCreate
Definition: fcalias.h:158
#define FcFontSetAdd
Definition: fcalias.h:162
#define FcStrCopyFilename
Definition: fcalias.h:392
#define FcStrListCreate
Definition: fcalias.h:438
#define FcAtomicNewFile
Definition: fcalias.h:228
#define FcConfigGetSysRoot
Definition: fcalias.h:78
#define FcPatternReference
Definition: fcalias.h:286
#define FcStrBuildFilename
Definition: fcalias.h:418
#define FcConfigReference
Definition: fcalias.h:38
#define FcFontSetDestroy
Definition: fcalias.h:160
#define FcAtomicUnlock
Definition: fcalias.h:236
#define FcStrFree
Definition: fcalias.h:396
#define FcAtomicLock
Definition: fcalias.h:226
#define FcStrListNext
Definition: fcalias.h:442
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 FcRefAdd(FcRef *r, int v)
Definition: fcatomic.h:143
static int FcRefDec(FcRef *r)
Definition: fcatomic.h:142
#define fc_atomic_ptr_cmpexch(P, O, N)
Definition: fcatomic.h:122
#define FC_ATOMIC_INT_FORMAT
Definition: fcatomic.h:118
static void FcRefInit(FcRef *r, int v)
Definition: fcatomic.h:140
FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct stat *file_stat)
Definition: fccache.c:1111
static void lock_cache(void)
Definition: fccache.c:488
const FcChar8 * FcCacheDir(const FcCache *c)
Definition: fccache.c:1694
int FcCacheNumSubdir(const FcCache *c)
Definition: fccache.c:1729
FcBool FcDirCacheWrite(FcCache *cache, FcConfig *config)
Definition: fccache.c:1346
#define O_BINARY
Definition: fccache.c:53
static void unlock_cache(void)
Definition: fccache.c:510
static FcChar8 * FcDirCacheBasenameMD5(FcConfig *config, const FcChar8 *dir, FcChar8 cache_base[(1+36+1+sizeof("le" "64")+sizeof(".cache-" "7"))])
Definition: fccache.c:154
FcBool FcDirCacheCreateTagFile(const FcChar8 *cache_dir)
Definition: fccache.c:1741
static FcCacheSkip * FcCacheFindByAddr(void *object)
Definition: fccache.c:653
static int64_t FcDirChecksumNano(struct stat *statb)
Definition: fccache.c:1170
static FcBool FcCacheTimeValid(FcConfig *config, FcCache *cache, struct stat *dir_stat)
Definition: fccache.c:815
int FcDirCacheLock(const FcChar8 *dir, FcConfig *config)
Definition: fccache.c:1611
FcBool FcDirCacheClean(const FcChar8 *cache_dir, FcBool verbose)
Definition: fccache.c:1500
void FcCacheObjectDereference(void *object)
Definition: fccache.c:753
static FcCache * FcCacheFindByStat(struct stat *cache_stat)
Definition: fccache.c:702
static FcCacheSkip * fcCacheChains[16]
Definition: fccache.c:481
FcCache * FcDirCacheRebuild(FcCache *cache, struct stat *dir_stat, FcStrSet *dirs)
Definition: fccache.c:1332
void FcCacheCreateTagFile(FcConfig *config)
Definition: fccache.c:1803
int FcCacheNumFont(const FcCache *c)
Definition: fccache.c:1735
#define CACHEBASE_LEN
Definition: fccache.c:115
#define args1(x)
Definition: fccache.c:1690
FcBool FcDirCacheDeleteUUID(const FcChar8 *dir, FcConfig *config)
Definition: fccache.c:65
static FcBool FcDirCacheValidConfig(const FcChar8 *dir, FcConfig *config)
Definition: fccache.c:1210
FcBool FcDirCacheValid(const FcChar8 *dir)
Definition: fccache.c:1218
#define args2(x, y)
Definition: fccache.c:1691
static FcBool FcDirCacheProcess(FcConfig *config, const FcChar8 *dir, FcBool(*callback)(FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *cache_mtime, void *closure), void *closure, FcChar8 **cache_file_ret)
Definition: fccache.c:354
static void FcCacheRemoveUnlocked(FcCache *cache)
Definition: fccache.c:663
static FcBool FcCacheIsMmapSafe(int fd)
Definition: fccache.c:118
static FcCache * FcDirCacheMapFd(FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat)
Definition: fccache.c:939
FcCache * FcDirCacheBuild(FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs)
Definition: fccache.c:1237
FcFontSet * FcCacheCopySet(const FcCache *c)
Definition: fccache.c:1700
void FcDirCacheUnlock(int fd)
Definition: fccache.c:1666
static FcBool FcDirCacheValidateHelper(FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure)
Definition: fccache.c:1187
static FcBool FcCacheInsert(FcCache *cache, struct stat *cache_stat)
Definition: fccache.c:556
void FcCacheObjectReference(void *object)
Definition: fccache.c:744
FcBool FcDirCacheCreateUUID(FcChar8 *dir, FcBool force, FcConfig *config)
Definition: fccache.c:57
const FcChar8 * FcCacheSubdir(const FcCache *c, int i)
Definition: fccache.c:1723
void FcDirCacheUnload(FcCache *cache)
Definition: fccache.c:1035
static void FcDirCacheDisposeUnlocked(FcCache *cache)
Definition: fccache.c:725
static FcCacheSkip * FcCacheFindByAddrUnlocked(void *object)
Definition: fccache.c:628
#define FC_CACHE_MIN_MMAP
Definition: fccache.c:451
static const char bin2hex[]
Definition: fccache.c:148
FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file)
Definition: fccache.c:1093
static FcMutex * cache_lock
Definition: fccache.c:485
static int FcDirCacheOpenFile(const FcChar8 *cache_file, struct stat *file_stat)
Definition: fccache.c:327
static FcChar8 * FcDirCacheBasenameUUID(FcConfig *config, const FcChar8 *dir, FcChar8 cache_base[(1+36+1+sizeof("le" "64")+sizeof(".cache-" "7"))])
Definition: fccache.c:219
static int fcCacheMaxLevel
Definition: fccache.c:482
void FcCacheFini(void)
Definition: fccache.c:792
FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config)
Definition: fccache.c:262
#define FC_CACHE_MAX_LEVEL
Definition: fccache.c:478
static FcBool FcDirCacheMapHelper(FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure)
Definition: fccache.c:1041
void * FcCacheAllocate(FcCache *cache, size_t len)
Definition: fccache.c:768
void FcDirCacheReference(FcCache *cache, int nref)
Definition: fccache.c:1026
static void free_lock(void)
Definition: fccache.c:518
static FcBool FcCacheOffsetsValid(FcCache *cache)
Definition: fccache.c:852
static int FcDirChecksum(struct stat *statb)
Definition: fccache.c:1133
static int random_level(void)
Definition: fccache.c:537
FcChar8 * FcConfigMapFontPath(FcConfig *config, const FcChar8 *path)
Definition: fccfg.c:712
const FcChar8 * FcConfigMapSalt(FcConfig *config, const FcChar8 *path)
Definition: fccfg.c:748
int32_t FcRandom(void)
Definition: fccompat.c:183
int FcOpen(const char *pathname, int flags,...)
Definition: fccompat.c:127
FcBool FcMakeDirectory(const FcChar8 *dir)
Definition: fccompat.c:256
FcFontSet * FcFontSetDeserialize(const FcFontSet *set)
Definition: fcfs.c:127
FcFontSet * FcFontSetSerialize(FcSerialize *serialize, const FcFontSet *s)
Definition: fcfs.c:94
FcBool FcFontSetSerializeAlloc(FcSerialize *serialize, const FcFontSet *s)
Definition: fcfs.c:77
intptr_t FcSerializeReserve(FcSerialize *serialize, int size)
Definition: fcserialize.c:102
int FcStat(const FcChar8 *file, struct stat *statb)
Definition: fcstat.c:127
#define FcPatternElts(p)
Definition: fcint.h:235
void FcSerializeDestroy(FcSerialize *serialize)
Definition: fcserialize.c:55
FcBool FcSerializeAlloc(FcSerialize *serialize, const void *object, int size)
Definition: fcserialize.c:79
FcBool FcNameBool(const FcChar8 *v, FcBool *result)
Definition: fcname.c:263
void * FcSerializePtr(FcSerialize *serialize, const void *object)
Definition: fcserialize.c:130
#define FcOffsetToPtr(b, o, t)
Definition: fcint.h:167
FcChar8 * FcStrSerialize(FcSerialize *serialize, const FcChar8 *str)
Definition: fcserialize.c:146
FcBool FcIsFsMmapSafe(int fd)
Definition: fcstat.c:421
#define FC_UNUSED
Definition: fcint.h:95
#define FcIsEncodedOffset(p)
Definition: fcint.h:155
#define FcCacheSet(c)
Definition: fcint.h:435
#define FC_CACHE_MAGIC_MMAP
Definition: fcint.h:512
#define FC_CACHE_MAGIC_ALLOC
Definition: fcint.h:513
#define FcFontSetFont(fs, i)
Definition: fcint.h:239
#define FcValueListNext(vl)
Definition: fcint.h:204
#define FC_DBG_CACHE
Definition: fcint.h:106
#define FC_UINT64_FORMAT
Definition: fcint.h:99
#define FcPtrToOffset(b, p)
Definition: fcint.h:164
#define FcStrdup(s)
Definition: fcint.h:146
#define FcDebug()
Definition: fcint.h:899
int FcStatChecksum(const FcChar8 *file, struct stat *statb)
Definition: fcstat.c:337
#define FcPatternEltValues(pe)
Definition: fcint.h:226
FcBool FcStrSerializeAlloc(FcSerialize *serialize, const FcChar8 *str)
Definition: fcserialize.c:140
#define FcCacheDirs(c)
Definition: fcint.h:434
FcSerialize * FcSerializeCreate(void)
Definition: fcserialize.c:40
static void MD5Init(struct MD5Context *ctx)
Definition: fcmd5.h:52
static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned len)
Definition: fcmd5.h:67
static void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
Definition: fcmd5.h:115
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
int fcntl(int fd, int action,...)
Definition: fcntl.c:202
#define FC_CACHE_VERSION_NUMBER
Definition: fontconfig.h:70
unsigned char FcChar8
Definition: fontconfig.h:43
#define FcFalse
Definition: fontconfig.h:75
#define FcTrue
Definition: fontconfig.h:76
#define FC_CACHE_SUFFIX
Definition: fontconfig.h:132
int FcBool
Definition: fontconfig.h:46
static void
Definition: fpif.c:118
#define s
Definition: afcover.h:80
#define c(n)
Definition: gpos-common.c:150
#define d(n)
Definition: gpos-common.c:151
int base
Definition: gsftopk.c:1502
#define memcpy(d, s, n)
Definition: gsftopk.c:64
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define SEEK_SET
Definition: jmemansi.c:26
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
sizeof(AF_ModuleRec)
for(n=0;n< outline->n_points;n++)
Definition: ftbbox.c:494
signed __int64 int64_t
Definition: stdint.h:89
#define INTPTR_MAX
Definition: stdint.h:180
signed int intptr_t
Definition: stdint.h:118
char * getenv()
struct config_s config
int errno
#define unlink(file)
Definition: config.h:413
#define ULONG_MAX
Definition: c-minmax.h:66
#define W_OK
Definition: c-unistd.h:47
#define fclose
Definition: debug.h:100
struct dirent * readdir(DIR *dirp)
Definition: dirent.c:138
int closedir(DIR *dirp)
Definition: dirent.c:123
DIR * opendir(char *fname)
Definition: dirent.c:60
#define access
Definition: win32lib.h:59
#define O_CREAT
Definition: win32lib.h:170
#define chmod
Definition: win32lib.h:62
#define read
Definition: win32lib.h:88
#define O_RDONLY
Definition: win32lib.h:176
#define close
Definition: win32lib.h:63
#define fstat
Definition: win32lib.h:74
#define O_RDWR
Definition: win32lib.h:167
#define write
Definition: win32lib.h:103
#define getpid
Definition: win32lib.h:76
static int ret
Definition: convert.c:72
#define fprintf
Definition: mendex.h:64
char * closure
Definition: font.h:85
static char * strerror(int errnum)
Definition: error.c:56
char file_name[][1024]
Definition: cwebboot.c:318
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
#define malloc
Definition: alloca.c:91
long time_t
Definition: types.h:18
unsigned int dev_t
Definition: types.h:27
unsigned short ino_t
Definition: types.h:10
int remove()
cell * list
Definition: list_routines.h:30
static UHashtable * cache
#define target(code, i)
Definition: lpeg.c:1165
char * memchr(char *s, int c, size_t n) const
Definition: memchr.c:58
void serialize(MeasureUnitImpl &impl, UErrorCode &status)
#define fp
static int cnt
Definition: pkout.c:166
static int force
Definition: pnmtopng.c:115
static int size
Definition: ppmlabel.c:24
bstring c int memset(void *s, int c, int length)
#define FC_ARCHITECTURE
Definition: config.h:30
#define dir
#define status
static void chunk(LexState *ls)
Definition: minilua.c:4678
static l_mem atomic(lua_State *L)
Definition: lgc.c:982
FILE * fdopen(int, const char *)
static UMutex lock
Definition: serv.cpp:336
ShellFileEnvironment e
Definition: sh6.c:388
#define intptr_t
Definition: stdint.in.h:320
Definition: dirent.h:44
FcCache * cache
Definition: fccache.c:462
FcCacheSkip * next[1]
Definition: fccache.c:470
ino_t cache_ino
Definition: fccache.c:467
FcRef ref
Definition: fccache.c:463
dev_t cache_dev
Definition: fccache.c:466
time_t cache_mtime
Definition: fccache.c:468
long cache_mtime_nano
Definition: fccache.c:469
intptr_t size
Definition: fccache.c:464
void * allocated
Definition: fccache.c:465
int num
Definition: fcint.h:392
FcChar8 ** strs
Definition: fcint.h:394
Definition: namelist.c:170
Definition: dirent.h:34
char d_name[260]
Definition: dirent.h:37
Definition: sh.h:1689
Definition: pbmfont.h:11
#define FILE
Definition: t1stdio.h:34
int j
Definition: t4ht.c:1589
while(temp)
Definition: t4ht.c:858
*job_name strlen((char *) job_name) - 4)
#define key
Definition: tex2xindy.c:753
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 verbose
Definition: jpeg.c:35
#define MAP_FAILED
Definition: umapfile.cpp:77
#define end(cp)
Definition: zic.c:71