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)  

fcxml.c
Go to the documentation of this file.
1 /*
2  * fontconfig/src/fcxml.c
3  *
4  * Copyright © 2002 Keith Packard
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of the author(s) not be used in
11  * advertising or publicity pertaining to distribution of the software without
12  * specific, written prior permission. The authors make no
13  * representations about the suitability of this software for any purpose. It
14  * is provided "as is" without express or implied warranty.
15  *
16  * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18  * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22  * PERFORMANCE OF THIS SOFTWARE.
23  */
24 
25 #include <string.h>
26 #include "fcint.h"
27 #include <fcntl.h>
28 #include <stdarg.h>
29 
30 #ifdef HAVE_DIRENT_H
31 #include <dirent.h>
32 #endif
33 
34 #ifdef ENABLE_LIBXML2
35 
36 #include <libxml/parser.h>
37 
38 #define XML_Char xmlChar
39 #define XML_Parser xmlParserCtxtPtr
40 #define XML_ParserFree xmlFreeParserCtxt
41 #define XML_GetCurrentLineNumber xmlSAX2GetLineNumber
42 #define XML_GetErrorCode xmlCtxtGetLastError
43 #define XML_ErrorString(Error) (Error)->message
44 
45 #else /* ENABLE_LIBXML2 */
46 
47 #ifndef HAVE_XMLPARSE_H
48 #define HAVE_XMLPARSE_H 0
49 #endif
50 
51 #if HAVE_XMLPARSE_H
52 #include <xmlparse.h>
53 #else
54 #include <expat.h>
55 #endif
56 
57 #endif /* ENABLE_LIBXML2 */
58 
59 #ifdef _WIN32
60 #include <mbstring.h>
61 extern FcChar8 fontconfig_instprefix[];
62 #endif
63 
66 
67 static void
69 static FcBool
71  const FcChar8 *name,
73  FcBool load);
74 
75 void
77 {
78  FcExprDestroy (test->expr);
79  free (test);
80 }
81 
82 void
84 {
85  FcRule *n = rule->next;
86 
87  switch (rule->type) {
88  case FcRuleTest:
89  FcTestDestroy (rule->u.test);
90  break;
91  case FcRuleEdit:
92  FcEditDestroy (rule->u.edit);
93  break;
94  case FcRuleUnknown:
95  default:
96  break;
97  }
98  free (rule);
99  if (n)
100  FcRuleDestroy (n);
101 }
102 
103 static FcExpr *
105 {
107  if (e)
108  {
109  e->op = FcOpInteger;
110  e->u.ival = i;
111  }
112  return e;
113 }
114 
115 static FcExpr *
117 {
119  if (e)
120  {
121  e->op = FcOpDouble;
122  e->u.dval = d;
123  }
124  return e;
125 }
126 
127 static FcExpr *
129 {
131  if (e)
132  {
133  e->op = FcOpString;
134  e->u.sval = FcStrdup (s);
135  }
136  return e;
137 }
138 
139 static FcExprMatrix *
141 {
142  FcExprMatrix *m = malloc (sizeof (FcExprMatrix));
143  if (m)
144  {
145  *m = *matrix;
146  }
147  return m;
148 }
149 
150 static void
152 {
153  if (!m)
154  return;
155 
156  free (m);
157 }
158 
159 static void
161 {
162  if (!m)
163  return;
164 
165  FcExprDestroy (m->xx);
166  FcExprDestroy (m->xy);
167  FcExprDestroy (m->yx);
168  FcExprDestroy (m->yy);
169 
170  free (m);
171 }
172 
173 static FcExpr *
175 {
177  if (e)
178  {
179  e->op = FcOpMatrix;
180  e->u.mexpr = FcExprMatrixCopyShallow (matrix);
181  }
182  return e;
183 }
184 
185 static FcExpr *
187 {
189  if (e)
190  {
191  e->op = FcOpRange;
192  e->u.rval = FcRangeCopy (range);
193  }
194  return e;
195 }
196 
197 static FcExpr *
199 {
201  if (e)
202  {
203  e->op = FcOpBool;
204  e->u.bval = b;
205  }
206  return e;
207 }
208 
209 static FcExpr *
211 {
213  if (e)
214  {
215  e->op = FcOpCharSet;
216  e->u.cval = FcCharSetCopy (charset);
217  }
218  return e;
219 }
220 
221 static FcExpr *
223 {
225  if (e)
226  {
227  e->op = FcOpLangSet;
228  e->u.lval = FcLangSetCopy (langset);
229  }
230  return e;
231 }
232 
233 static FcExpr *
235 {
237  if (e)
238  {
239  e->op = FcOpField;
240  e->u.name = name;
241  }
242  return e;
243 }
244 
245 static FcExpr *
247 {
249  if (e)
250  {
251  e->op = FcOpConst;
252  e->u.constant = FcStrdup (constant);
253  }
254  return e;
255 }
256 
257 static FcExpr *
259 {
261  if (e)
262  {
263  e->op = op;
264  e->u.tree.left = left;
265  e->u.tree.right = right;
266  }
267  return e;
268 }
269 
270 static void
272 {
273  if (!e)
274  return;
275  switch (FC_OP_GET_OP (e->op)) {
276  case FcOpInteger:
277  break;
278  case FcOpDouble:
279  break;
280  case FcOpString:
281  FcFree (e->u.sval);
282  break;
283  case FcOpMatrix:
284  FcExprMatrixFree (e->u.mexpr);
285  break;
286  case FcOpRange:
287  FcRangeDestroy (e->u.rval);
288  break;
289  case FcOpCharSet:
290  FcCharSetDestroy (e->u.cval);
291  break;
292  case FcOpLangSet:
293  FcLangSetDestroy (e->u.lval);
294  break;
295  case FcOpBool:
296  break;
297  case FcOpField:
298  break;
299  case FcOpConst:
300  FcFree (e->u.constant);
301  break;
302  case FcOpAssign:
303  case FcOpAssignReplace:
304  case FcOpPrepend:
305  case FcOpPrependFirst:
306  case FcOpAppend:
307  case FcOpAppendLast:
308  case FcOpDelete:
309  case FcOpDeleteAll:
310  break;
311  case FcOpOr:
312  case FcOpAnd:
313  case FcOpEqual:
314  case FcOpNotEqual:
315  case FcOpLess:
316  case FcOpLessEqual:
317  case FcOpMore:
318  case FcOpMoreEqual:
319  case FcOpContains:
320  case FcOpListing:
321  case FcOpNotContains:
322  case FcOpPlus:
323  case FcOpMinus:
324  case FcOpTimes:
325  case FcOpDivide:
326  case FcOpQuest:
327  case FcOpComma:
328  FcExprDestroy (e->u.tree.right);
329  /* fall through */
330  case FcOpNot:
331  case FcOpFloor:
332  case FcOpCeil:
333  case FcOpRound:
334  case FcOpTrunc:
335  FcExprDestroy (e->u.tree.left);
336  break;
337  case FcOpNil:
338  case FcOpInvalid:
339  break;
340  }
341 
342  e->op = FcOpNil;
343 }
344 
345 void
347 {
348  if (e->expr)
349  FcExprDestroy (e->expr);
350  free (e);
351 }
352 
353 typedef enum _FcElement {
366 
368 
373 
380 
415 
416 static const struct {
417  const char name[16];
419 } fcElementMap[] = {
420  { "fontconfig", FcElementFontconfig },
421  { "dir", FcElementDir },
422  { "cachedir", FcElementCacheDir },
423  { "cache", FcElementCache },
424  { "include", FcElementInclude },
425  { "config", FcElementConfig },
426  { "match", FcElementMatch },
427  { "alias", FcElementAlias },
428  { "description", FcElementDescription },
429  { "remap-dir", FcElementRemapDir },
430  { "reset-dirs", FcElementResetDirs },
431 
432  { "rescan", FcElementRescan },
433 
434  { "prefer", FcElementPrefer },
435  { "accept", FcElementAccept },
436  { "default", FcElementDefault },
437  { "family", FcElementFamily },
438 
439  { "selectfont", FcElementSelectfont },
440  { "acceptfont", FcElementAcceptfont },
441  { "rejectfont", FcElementRejectfont },
442  { "glob", FcElementGlob },
443  { "pattern", FcElementPattern },
444  { "patelt", FcElementPatelt },
445 
446  { "test", FcElementTest },
447  { "edit", FcElementEdit },
448  { "int", FcElementInt },
449  { "double", FcElementDouble },
450  { "string", FcElementString },
451  { "matrix", FcElementMatrix },
452  { "range", FcElementRange },
453  { "bool", FcElementBool },
454  { "charset", FcElementCharSet },
455  { "langset", FcElementLangSet },
456  { "name", FcElementName },
457  { "const", FcElementConst },
458  { "or", FcElementOr },
459  { "and", FcElementAnd },
460  { "eq", FcElementEq },
461  { "not_eq", FcElementNotEq },
462  { "less", FcElementLess },
463  { "less_eq", FcElementLessEq },
464  { "more", FcElementMore },
465  { "more_eq", FcElementMoreEq },
466  { "contains", FcElementContains },
467  { "not_contains", FcElementNotContains },
468  { "plus", FcElementPlus },
469  { "minus", FcElementMinus },
470  { "times", FcElementTimes },
471  { "divide", FcElementDivide },
472  { "not", FcElementNot },
473  { "if", FcElementIf },
474  { "floor", FcElementFloor },
475  { "ceil", FcElementCeil },
476  { "round", FcElementRound },
477  { "trunc", FcElementTrunc },
478 };
479 #define NUM_ELEMENT_MAPS (int) (sizeof fcElementMap / sizeof fcElementMap[0])
480 
481 static const char *fcElementIgnoreName[16] = {
482  "its:",
483  NULL
484 };
485 
486 static FcElement
488 {
489 
490  int i;
491  for (i = 0; i < NUM_ELEMENT_MAPS; i++)
492  if (!strcmp ((char *) name, fcElementMap[i].name))
493  return fcElementMap[i].element;
494  for (i = 0; fcElementIgnoreName[i] != NULL; i++)
496  return FcElementNone;
497  return FcElementUnknown;
498 }
499 
500 static const char *
502 {
503  int i;
504 
505  for (i = 0; i < NUM_ELEMENT_MAPS; i++)
506  if (fcElementMap[i].element == e)
507  return fcElementMap[i].name;
508 
509  return NULL;
510 }
511 
512 
513 typedef struct _FcPStack {
514  struct _FcPStack *prev;
520 
521 typedef enum _FcVStackTag {
523 
530 
534 
542 
547 
548 typedef struct _FcVStack {
549  struct _FcVStack *prev;
550  FcPStack *pstack; /* related parse element */
552  union {
554 
555  int integer;
556  double _double;
563 
569 
571  } u;
573 
574 typedef struct _FcConfigParse {
578  const FcChar8 *name;
582  unsigned int pstack_static_used;
584  unsigned int vstack_static_used;
588 
589 typedef enum _FcConfigSeverity {
592 
593 static void
595 {
596  const char *s = "unknown";
597  va_list args;
598 
599  va_start (args, fmt);
600 
601  switch (severe) {
602  case FcSevereInfo: s = "info"; break;
603  case FcSevereWarning: s = "warning"; break;
604  case FcSevereError: s = "error"; break;
605  }
606  if (parse)
607  {
608  if (parse->name)
609  fprintf (stderr, "Fontconfig %s: \"%s\", line %d: ", s,
610  parse->name, (int)XML_GetCurrentLineNumber (parse->parser));
611  else
612  fprintf (stderr, "Fontconfig %s: line %d: ", s,
613  (int)XML_GetCurrentLineNumber (parse->parser));
614  if (severe >= FcSevereError)
615  parse->error = FcTrue;
616  }
617  else
618  fprintf (stderr, "Fontconfig %s: ", s);
619  vfprintf (stderr, fmt, args);
620  fprintf (stderr, "\n");
621  va_end (args);
622 }
623 
624 
625 static FcExpr *
627 
628 
629 static const char *
631 {
632  switch (type) {
633  case FcTypeVoid:
634  return "void";
635  case FcTypeInteger:
636  case FcTypeDouble:
637  return "number";
638  case FcTypeString:
639  return "string";
640  case FcTypeBool:
641  return "bool";
642  case FcTypeMatrix:
643  return "matrix";
644  case FcTypeCharSet:
645  return "charset";
646  case FcTypeFTFace:
647  return "FT_Face";
648  case FcTypeLangSet:
649  return "langset";
650  case FcTypeRange:
651  return "range";
652  case FcTypeUnknown:
653  default:
654  return "unknown";
655  }
656 }
657 
658 static void
660 {
661  if (value == FcTypeInteger)
663  if (type == FcTypeInteger)
664  type = FcTypeDouble;
665  if (value != type)
666  {
667  if ((value == FcTypeLangSet && type == FcTypeString) ||
668  (value == FcTypeString && type == FcTypeLangSet) ||
669  (value == FcTypeDouble && type == FcTypeRange))
670  return;
671  if (type == FcTypeUnknown)
672  return;
673  /* It's perfectly fine to use user-define elements in expressions,
674  * so don't warn in that case. */
675  if (value == FcTypeUnknown)
676  return;
677  FcConfigMessage (parse, FcSevereWarning, "saw %s, expected %s",
679  }
680 }
681 
682 static void
684 {
685  const FcObjectType *o;
686  const FcConstant *c;
687 
688  /* If parsing the expression failed, some nodes may be NULL */
689  if (!expr)
690  return;
691 
692  switch (FC_OP_GET_OP (expr->op)) {
693  case FcOpInteger:
694  case FcOpDouble:
696  break;
697  case FcOpString:
699  break;
700  case FcOpMatrix:
702  break;
703  case FcOpBool:
705  break;
706  case FcOpCharSet:
708  break;
709  case FcOpLangSet:
711  break;
712  case FcOpRange:
714  break;
715  case FcOpNil:
716  break;
717  case FcOpField:
718  o = FcNameGetObjectType (FcObjectName (expr->u.name.object));
719  if (o)
721  break;
722  case FcOpConst:
723  c = FcNameGetConstant (expr->u.constant);
724  if (c)
725  {
726  o = FcNameGetObjectType (c->object);
727  if (o)
729  }
730  else
732  "invalid constant used : %s",
733  expr->u.constant);
734  break;
735  case FcOpQuest:
736  FcTypecheckExpr (parse, expr->u.tree.left, FcTypeBool);
737  FcTypecheckExpr (parse, expr->u.tree.right->u.tree.left, type);
738  FcTypecheckExpr (parse, expr->u.tree.right->u.tree.right, type);
739  break;
740  case FcOpAssign:
741  case FcOpAssignReplace:
742  break;
743  case FcOpEqual:
744  case FcOpNotEqual:
745  case FcOpLess:
746  case FcOpLessEqual:
747  case FcOpMore:
748  case FcOpMoreEqual:
749  case FcOpContains:
750  case FcOpNotContains:
751  case FcOpListing:
753  break;
754  case FcOpComma:
755  case FcOpOr:
756  case FcOpAnd:
757  case FcOpPlus:
758  case FcOpMinus:
759  case FcOpTimes:
760  case FcOpDivide:
761  FcTypecheckExpr (parse, expr->u.tree.left, type);
762  FcTypecheckExpr (parse, expr->u.tree.right, type);
763  break;
764  case FcOpNot:
766  FcTypecheckExpr (parse, expr->u.tree.left, FcTypeBool);
767  break;
768  case FcOpFloor:
769  case FcOpCeil:
770  case FcOpRound:
771  case FcOpTrunc:
773  FcTypecheckExpr (parse, expr->u.tree.left, FcTypeDouble);
774  break;
775  default:
776  break;
777  }
778 }
779 
780 static FcTest *
783  FcQual qual,
784  const FcChar8 *field,
785  unsigned int compare,
786  FcExpr *expr)
787 {
788  FcTest *test = (FcTest *) malloc (sizeof (FcTest));
789 
790  if (test)
791  {
792  const FcObjectType *o;
793 
794  test->kind = kind;
795  test->qual = qual;
796  test->object = FcObjectFromName ((const char *) field);
797  test->op = compare;
798  test->expr = expr;
799  o = FcNameGetObjectType (FcObjectName (test->object));
800  if (o)
802  }
803  return test;
804 }
805 
806 static FcEdit *
808  FcObject object,
809  FcOp op,
810  FcExpr *expr,
812 {
813  FcEdit *e = (FcEdit *) malloc (sizeof (FcEdit));
814 
815  if (e)
816  {
817  const FcObjectType *o;
818 
819  e->object = object;
820  e->op = op;
821  e->expr = expr;
822  e->binding = binding;
823  o = FcNameGetObjectType (FcObjectName (e->object));
824  if (o)
826  }
827  return e;
828 }
829 
830 static FcRule *
832  void *p)
833 {
834  FcRule *r = (FcRule *) malloc (sizeof (FcRule));
835 
836  if (!r)
837  return NULL;
838 
839  r->next = NULL;
840  r->type = type;
841  switch (type)
842  {
843  case FcRuleTest:
844  r->u.test = (FcTest *) p;
845  break;
846  case FcRuleEdit:
847  r->u.edit = (FcEdit *) p;
848  break;
849  case FcRuleUnknown:
850  default:
851  free (r);
852  r = NULL;
853  break;
854  }
855 
856  return r;
857 }
858 
859 static FcVStack *
861 {
862  FcVStack *new;
863 
864  if (parse->vstack_static_used < sizeof (parse->vstack_static) / sizeof (parse->vstack_static[0]))
865  new = &parse->vstack_static[parse->vstack_static_used++];
866  else
867  {
868  new = malloc (sizeof (FcVStack));
869  if (!new)
870  return 0;
871  }
872  new->tag = FcVStackNone;
873  new->prev = 0;
874 
875  new->prev = parse->vstack;
876  new->pstack = parse->pstack ? parse->pstack->prev : 0;
877  parse->vstack = new;
878 
879  return new;
880 }
881 
882 static FcBool
884 {
886  if (!vstack)
887  return FcFalse;
888  vstack->u.string = string;
889  vstack->tag = tag;
890  return FcTrue;
891 }
892 
893 static FcBool
895 {
897  if (!vstack)
898  return FcFalse;
899  vstack->u.integer = integer;
900  vstack->tag = FcVStackInteger;
901  return FcTrue;
902 }
903 
904 static FcBool
906 {
908  if (!vstack)
909  return FcFalse;
910  vstack->u._double = _double;
911  vstack->tag = FcVStackDouble;
912  return FcTrue;
913 }
914 
915 static FcBool
917 {
918  FcVStack *vstack;
919  vstack = FcVStackCreateAndPush (parse);
920  if (!vstack)
921  return FcFalse;
923  vstack->tag = FcVStackMatrix;
924  return FcTrue;
925 }
926 
927 static FcBool
929 {
931  if (!vstack)
932  return FcFalse;
933  vstack->u.range = range;
934  vstack->tag = FcVStackRange;
935  return FcTrue;
936 }
937 
938 static FcBool
940 {
942  if (!vstack)
943  return FcFalse;
944  vstack->u.bool_ = bool_;
945  vstack->tag = FcVStackBool;
946  return FcTrue;
947 }
948 
949 static FcBool
951 {
952  FcVStack *vstack;
953  if (!charset)
954  return FcFalse;
955  vstack = FcVStackCreateAndPush (parse);
956  if (!vstack)
957  return FcFalse;
958  vstack->u.charset = charset;
959  vstack->tag = FcVStackCharSet;
960  return FcTrue;
961 }
962 
963 static FcBool
965 {
966  FcVStack *vstack;
967  if (!langset)
968  return FcFalse;
969  vstack = FcVStackCreateAndPush (parse);
970  if (!vstack)
971  return FcFalse;
972  vstack->u.langset = langset;
973  vstack->tag = FcVStackLangSet;
974  return FcTrue;
975 }
976 
977 static FcBool
979 {
981  if (!vstack)
982  return FcFalse;
983  vstack->u.name.object = object;
984  vstack->u.name.kind = kind;
985  vstack->tag = FcVStackName;
986  return FcTrue;
987 }
988 
989 static FcBool
991 {
993  if (!vstack)
994  return FcFalse;
995  vstack->u.test = test;
996  vstack->tag = FcVStackTest;
997  return FcTrue;
998 }
999 
1000 static FcBool
1002 {
1003  FcVStack *vstack = FcVStackCreateAndPush (parse);
1004  if (!vstack)
1005  return FcFalse;
1006  vstack->u.expr = expr;
1007  vstack->tag = tag;
1008  return FcTrue;
1009 }
1010 
1011 static FcBool
1013 {
1014  FcVStack *vstack = FcVStackCreateAndPush (parse);
1015  if (!vstack)
1016  return FcFalse;
1017  vstack->u.edit = edit;
1018  vstack->tag = FcVStackEdit;
1019  return FcTrue;
1020 }
1021 
1022 static FcBool
1024 {
1025  FcVStack *vstack = FcVStackCreateAndPush (parse);
1026  if (!vstack)
1027  return FcFalse;
1028  vstack->u.pattern = pattern;
1029  vstack->tag = FcVStackPattern;
1030  return FcTrue;
1031 }
1032 
1033 static FcVStack *
1035 {
1036  FcVStack *vstack;
1037 
1038  for (vstack = parse->vstack; vstack && off-- > 0; vstack = vstack->prev);
1039  return vstack;
1040 }
1041 
1042 static FcVStack *
1044 {
1045  FcVStack *vstack = parse->vstack;
1046 
1047  return vstack && vstack->pstack == parse->pstack ? vstack : 0;
1048 }
1049 
1050 static void
1052 {
1053  FcVStack *vstack = parse->vstack;
1054 
1055  if (!vstack || vstack->pstack != parse->pstack)
1056  return;
1057 
1058  parse->vstack = vstack->prev;
1059 
1060  switch (vstack->tag) {
1061  case FcVStackNone:
1062  break;
1063  case FcVStackName:
1064  break;
1065  case FcVStackFamily:
1066  break;
1067  case FcVStackString:
1068  case FcVStackConstant:
1069  case FcVStackGlob:
1070  FcStrFree (vstack->u.string);
1071  break;
1072  case FcVStackPattern:
1073  FcPatternDestroy (vstack->u.pattern);
1074  break;
1075  case FcVStackInteger:
1076  case FcVStackDouble:
1077  break;
1078  case FcVStackMatrix:
1079  FcExprMatrixFreeShallow (vstack->u.matrix);
1080  break;
1081  case FcVStackBool:
1082  break;
1083  case FcVStackRange:
1084  FcRangeDestroy (vstack->u.range);
1085  break;
1086  case FcVStackCharSet:
1087  FcCharSetDestroy (vstack->u.charset);
1088  break;
1089  case FcVStackLangSet:
1090  FcLangSetDestroy (vstack->u.langset);
1091  break;
1092  case FcVStackTest:
1093  FcTestDestroy (vstack->u.test);
1094  break;
1095  case FcVStackExpr:
1096  case FcVStackPrefer:
1097  case FcVStackAccept:
1098  case FcVStackDefault:
1099  FcExprDestroy (vstack->u.expr);
1100  break;
1101  case FcVStackEdit:
1102  FcEditDestroy (vstack->u.edit);
1103  break;
1104  }
1105 
1106  if (vstack == &parse->vstack_static[parse->vstack_static_used - 1])
1107  parse->vstack_static_used--;
1108  else
1109  free (vstack);
1110 }
1111 
1112 static void
1114 {
1115  while (FcVStackPeek (parse))
1117 }
1118 
1119 static int
1121 {
1122  int h = 0;
1123  FcVStack *vstack = parse->vstack;
1124  while (vstack && vstack->pstack == parse->pstack)
1125  {
1126  h++;
1127  vstack = vstack->prev;
1128  }
1129  return h;
1130 }
1131 
1132 static FcChar8 **
1134 {
1135  int slen;
1136  int i;
1137  FcChar8 **new;
1138  FcChar8 *s;
1139 
1140  if (!attr)
1141  return 0;
1142  slen = 0;
1143  for (i = 0; attr[i]; i++)
1144  slen += strlen ((char *) attr[i]) + 1;
1145  if (i == 0)
1146  return 0;
1147  slen += (i + 1) * sizeof (FcChar8 *);
1148  if (slen <= size_bytes)
1149  new = buf;
1150  else
1151  {
1152  new = malloc (slen);
1153  if (!new)
1154  {
1155  FcConfigMessage (0, FcSevereError, "out of memory");
1156  return 0;
1157  }
1158  }
1159  s = (FcChar8 *) (new + (i + 1));
1160  for (i = 0; attr[i]; i++)
1161  {
1162  new[i] = s;
1163  strcpy ((char *) s, (char *) attr[i]);
1164  s += strlen ((char *) s) + 1;
1165  }
1166  new[i] = 0;
1167  return new;
1168 }
1169 
1170 static FcBool
1172 {
1173  FcPStack *new;
1174 
1175  if (parse->pstack_static_used < sizeof (parse->pstack_static) / sizeof (parse->pstack_static[0]))
1176  new = &parse->pstack_static[parse->pstack_static_used++];
1177  else
1178  {
1179  new = malloc (sizeof (FcPStack));
1180  if (!new)
1181  return FcFalse;
1182  }
1183 
1184  new->prev = parse->pstack;
1185  new->element = element;
1186  new->attr = FcConfigSaveAttr (attr, new->attr_buf_static, sizeof (new->attr_buf_static));
1187  FcStrBufInit (&new->str, 0, 0);
1188  parse->pstack = new;
1189  return FcTrue;
1190 }
1191 
1192 static FcBool
1194 {
1195  FcPStack *old;
1196 
1197  if (!parse->pstack)
1198  {
1199  FcConfigMessage (parse, FcSevereError, "mismatching element");
1200  return FcFalse;
1201  }
1202 
1203  /* Don't check the attributes for FcElementNone */
1204  if (parse->pstack->element != FcElementNone &&
1205  parse->pstack->attr)
1206  {
1207  /* Warn about unused attrs. */
1208  FcChar8 **attrs = parse->pstack->attr;
1209  while (*attrs)
1210  {
1211  if (attrs[0][0])
1212  {
1213  FcConfigMessage (parse, FcSevereWarning, "invalid attribute '%s'", attrs[0]);
1214  }
1215  attrs += 2;
1216  }
1217  }
1218 
1219  FcVStackClear (parse);
1220  old = parse->pstack;
1221  parse->pstack = old->prev;
1222  FcStrBufDestroy (&old->str);
1223 
1224  if (old->attr && old->attr != old->attr_buf_static)
1225  free (old->attr);
1226 
1227  if (old == &parse->pstack_static[parse->pstack_static_used - 1])
1228  parse->pstack_static_used--;
1229  else
1230  free (old);
1231  return FcTrue;
1232 }
1233 
1234 static FcBool
1236  const FcChar8 *name,
1237  FcConfig *config,
1239  FcBool enabled)
1240 {
1241  parse->pstack = 0;
1242  parse->pstack_static_used = 0;
1243  parse->vstack = 0;
1244  parse->vstack_static_used = 0;
1245  parse->error = FcFalse;
1246  parse->name = name;
1247  parse->config = config;
1248  parse->ruleset = FcRuleSetCreate (name);
1249  parse->parser = parser;
1250  parse->scanOnly = !enabled;
1251  FcRuleSetEnable (parse->ruleset, enabled);
1252 
1253  return FcTrue;
1254 }
1255 
1256 static void
1258 {
1259  while (parse->pstack)
1260  FcPStackPop (parse);
1261  FcRuleSetDestroy (parse->ruleset);
1262  parse->ruleset = NULL;
1263 }
1264 
1265 static const FcChar8 *
1267 {
1268  FcChar8 **attrs;
1269  if (!parse->pstack)
1270  return 0;
1271 
1272  attrs = parse->pstack->attr;
1273  if (!attrs)
1274  return 0;
1275 
1276  while (*attrs)
1277  {
1278  if (!strcmp ((char *) *attrs, attr))
1279  {
1280  attrs[0][0] = '\0'; /* Mark as used. */
1281  return attrs[1];
1282  }
1283  attrs += 2;
1284  }
1285  return 0;
1286 }
1287 
1288 static FcChar8 *
1290 {
1291 #ifdef _WIN32
1292  FcChar8 buffer[1000] = { 0 };
1293 #endif
1294  FcChar8 *parent = NULL, *retval = NULL;
1295 
1296  if (prefix)
1297  {
1298  if (FcStrCmp (prefix, (const FcChar8 *) "xdg") == 0)
1299  {
1301  if (!parent)
1302  {
1303  /* Home directory might be disabled */
1304  return NULL;
1305  }
1306  }
1307  else if (FcStrCmp (prefix, (const FcChar8 *) "default") == 0 ||
1308  FcStrCmp (prefix, (const FcChar8 *) "cwd") == 0)
1309  {
1310  /* Nothing to do */
1311  }
1312  else if (FcStrCmp (prefix, (const FcChar8 *) "relative") == 0)
1313  {
1314  parent = FcStrDirname (parse->name);
1315  if (!parent)
1316  return NULL;
1317  }
1318  }
1319 #ifndef _WIN32
1320  /* For Win32, check this later for dealing with special cases */
1321  else
1322  {
1323  if (!FcStrIsAbsoluteFilename (path) && path[0] != '~')
1324  FcConfigMessage (parse, FcSevereWarning, "Use of ambiguous path in <%s> element. please add prefix=\"cwd\" if current behavior is desired.", FcElementReverseMap (parse->pstack->element));
1325  }
1326 #else
1327  if (strcmp ((const char *) path, "CUSTOMFONTDIR") == 0)
1328  {
1329  FcChar8 *p;
1330  path = buffer;
1331  if (!GetModuleFileName (NULL, (LPCH) buffer, sizeof (buffer) - 20))
1332  {
1333  FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed");
1334  return NULL;
1335  }
1336  /*
1337  * Must use the multi-byte aware function to search
1338  * for backslash because East Asian double-byte code
1339  * pages have characters with backslash as the second
1340  * byte.
1341  */
1342  p = _mbsrchr (path, '\\');
1343  if (p) *p = '\0';
1344  strcat ((char *) path, "\\fonts");
1345  }
1346  else if (strcmp ((const char *) path, "APPSHAREFONTDIR") == 0)
1347  {
1348  FcChar8 *p;
1349  path = buffer;
1350  if (!GetModuleFileName (NULL, (LPCH) buffer, sizeof (buffer) - 20))
1351  {
1352  FcConfigMessage (parse, FcSevereError, "GetModuleFileName failed");
1353  return NULL;
1354  }
1355  p = _mbsrchr (path, '\\');
1356  if (p) *p = '\0';
1357  strcat ((char *) path, "\\..\\share\\fonts");
1358  }
1359  else if (strcmp ((const char *) path, "WINDOWSFONTDIR") == 0)
1360  {
1361  int rc;
1362  path = buffer;
1363  rc = pGetSystemWindowsDirectory ((LPSTR) buffer, sizeof (buffer) - 20);
1364  if (rc == 0 || rc > sizeof (buffer) - 20)
1365  {
1366  FcConfigMessage (parse, FcSevereError, "GetSystemWindowsDirectory failed");
1367  return NULL;
1368  }
1369  if (path [strlen ((const char *) path) - 1] != '\\')
1370  strcat ((char *) path, "\\");
1371  strcat ((char *) path, "fonts");
1372  }
1373  else
1374  {
1375  if (!prefix)
1376  {
1377  if (!FcStrIsAbsoluteFilename (path) && path[0] != '~')
1378  FcConfigMessage (parse, FcSevereWarning, "Use of ambiguous path in <%s> element. please add prefix=\"cwd\" if current behavior is desired.", FcElementReverseMap (parse->pstack->element));
1379  }
1380  }
1381 #endif
1382  if (parent)
1383  {
1384  retval = FcStrBuildFilename (parent, path, NULL);
1385  FcStrFree (parent);
1386  }
1387  else
1388  {
1389  retval = FcStrdup (path);
1390  }
1391 
1392  return retval;
1393 }
1394 
1395 static void
1396 FcStartElement(void *userData, const XML_Char *name, const XML_Char **attr)
1397 {
1400 
1402  if (element == FcElementUnknown)
1403  FcConfigMessage (parse, FcSevereWarning, "unknown element \"%s\"", name);
1404 
1405  if (!FcPStackPush (parse, element, attr))
1406  {
1407  FcConfigMessage (parse, FcSevereError, "out of memory");
1408  return;
1409  }
1410  return;
1411 }
1412 
1413 static void
1415 {
1416  int n = FcVStackElements (parse);
1417  while (n-- > 0)
1418  {
1419  FcVStack *v = FcVStackFetch (parse, n);
1420  if (v->tag != FcVStackInteger)
1421  FcConfigMessage (parse, FcSevereWarning, "non-integer rescan");
1422  else
1423  parse->config->rescanInterval = v->u.integer;
1424  }
1425 }
1426 
1427 static void
1429 {
1430  FcChar8 *s, *end;
1431  int l;
1432 
1433  if (!parse->pstack)
1434  return;
1435  s = FcStrBufDoneStatic (&parse->pstack->str);
1436  if (!s)
1437  {
1438  FcConfigMessage (parse, FcSevereError, "out of memory");
1439  return;
1440  }
1441  end = 0;
1442  l = (int) strtol ((char *) s, (char **)&end, 0);
1443  if (end != s + strlen ((char *) s))
1444  FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid integer", s);
1445  else
1447  FcStrBufDestroy (&parse->pstack->str);
1448 }
1449 
1450 /*
1451  * idea copied from glib g_ascii_strtod with
1452  * permission of the author (Alexander Larsson)
1453  */
1454 
1455 #include <locale.h>
1456 
1457 static double
1458 FcStrtod (char *s, char **end)
1459 {
1460 #ifndef __BIONIC__
1461  struct lconv *locale_data;
1462 #endif
1463  const char *decimal_point;
1464  int dlen;
1465  char *dot;
1466  double v;
1467 
1468  /*
1469  * Have to swap the decimal point to match the current locale
1470  * if that locale doesn't use 0x2e
1471  */
1472 #ifndef __BIONIC__
1473  locale_data = localeconv ();
1474  decimal_point = locale_data->decimal_point;
1475  dlen = strlen (decimal_point);
1476 #else
1477  decimal_point = ".";
1478  dlen = 1;
1479 #endif
1480 
1481  if ((dot = strchr (s, 0x2e)) &&
1482  (decimal_point[0] != 0x2e ||
1483  decimal_point[1] != 0))
1484  {
1485  char buf[128];
1486  int slen = strlen (s);
1487 
1488  if (slen + dlen > (int) sizeof (buf))
1489  {
1490  if (end)
1491  *end = s;
1492  v = 0;
1493  }
1494  else
1495  {
1496  char *buf_end;
1497  /* mantissa */
1498  strncpy (buf, s, dot - s);
1499  /* decimal point */
1500  strcpy (buf + (dot - s), decimal_point);
1501  /* rest of number */
1502  strcpy (buf + (dot - s) + dlen, dot + 1);
1503  buf_end = 0;
1504  v = strtod (buf, &buf_end);
1505  if (buf_end) {
1506  buf_end = s + (buf_end - buf);
1507  if (buf_end > dot)
1508  buf_end -= dlen - 1;
1509  }
1510  if (end)
1511  *end = buf_end;
1512  }
1513  }
1514  else
1515  v = strtod (s, end);
1516  return v;
1517 }
1518 
1519 static void
1521 {
1522  FcChar8 *s, *end;
1523  double d;
1524 
1525  if (!parse->pstack)
1526  return;
1527  s = FcStrBufDoneStatic (&parse->pstack->str);
1528  if (!s)
1529  {
1530  FcConfigMessage (parse, FcSevereError, "out of memory");
1531  return;
1532  }
1533  end = 0;
1534  d = FcStrtod ((char *) s, (char **)&end);
1535  if (end != s + strlen ((char *) s))
1536  FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid double", s);
1537  else
1539  FcStrBufDestroy (&parse->pstack->str);
1540 }
1541 
1542 static void
1544 {
1545  FcChar8 *s;
1546 
1547  if (!parse->pstack)
1548  return;
1549  s = FcStrBufDone (&parse->pstack->str);
1550  if (!s)
1551  {
1552  FcConfigMessage (parse, FcSevereError, "out of memory");
1553  return;
1554  }
1555  if (!FcVStackPushString (parse, tag, s))
1556  FcStrFree (s);
1557 }
1558 
1559 static void
1561 {
1562  const FcChar8 *kind_string;
1563  FcMatchKind kind;
1564  FcChar8 *s;
1565  FcObject object;
1566 
1567  kind_string = FcConfigGetAttribute (parse, "target");
1568  if (!kind_string)
1569  kind = FcMatchDefault;
1570  else
1571  {
1572  if (!strcmp ((char *) kind_string, "pattern"))
1573  kind = FcMatchPattern;
1574  else if (!strcmp ((char *) kind_string, "font"))
1575  kind = FcMatchFont;
1576  else if (!strcmp ((char *) kind_string, "default"))
1577  kind = FcMatchDefault;
1578  else
1579  {
1580  FcConfigMessage (parse, FcSevereWarning, "invalid name target \"%s\"", kind_string);
1581  return;
1582  }
1583  }
1584 
1585  if (!parse->pstack)
1586  return;
1587  s = FcStrBufDone (&parse->pstack->str);
1588  if (!s)
1589  {
1590  FcConfigMessage (parse, FcSevereError, "out of memory");
1591  return;
1592  }
1593  object = FcObjectFromName ((const char *) s);
1594 
1595  FcVStackPushName (parse, kind, object);
1596 
1597  FcStrFree (s);
1598 }
1599 
1600 static void
1602 {
1603  FcExprMatrix m;
1604 
1605  m.yy = FcPopExpr (parse);
1606  m.yx = FcPopExpr (parse);
1607  m.xy = FcPopExpr (parse);
1608  m.xx = FcPopExpr (parse);
1609 
1610  if (!m.yy || !m.yx || !m.xy || !m.xx)
1611  {
1612  FcConfigMessage (parse, FcSevereWarning, "Missing values in matrix element");
1613  return;
1614  }
1615  if (FcPopExpr (parse))
1616  FcConfigMessage (parse, FcSevereError, "wrong number of matrix elements");
1617  else
1619 }
1620 
1621 static void
1623 {
1624  FcVStack *vstack;
1625  FcRange *r;
1626  FcChar32 n[2] = {0, 0};
1627  int count = 1;
1628  double d[2] = {0.0L, 0.0L};
1629  FcBool dflag = FcFalse;
1630 
1631  while ((vstack = FcVStackPeek (parse)))
1632  {
1633  if (count < 0)
1634  {
1635  FcConfigMessage (parse, FcSevereError, "too many elements in range");
1636  return;
1637  }
1638  switch ((int) vstack->tag) {
1639  case FcVStackInteger:
1640  if (dflag)
1641  d[count] = (double)vstack->u.integer;
1642  else
1643  n[count] = vstack->u.integer;
1644  break;
1645  case FcVStackDouble:
1646  if (count == 0 && !dflag)
1647  d[1] = (double)n[1];
1648  d[count] = vstack->u._double;
1649  dflag = FcTrue;
1650  break;
1651  default:
1652  FcConfigMessage (parse, FcSevereError, "invalid element in range");
1653  if (dflag)
1654  d[count] = 0.0L;
1655  else
1656  n[count] = 0;
1657  break;
1658  }
1659  count--;
1661  }
1662  if (count >= 0)
1663  {
1664  FcConfigMessage (parse, FcSevereError, "invalid range");
1665  return;
1666  }
1667  if (dflag)
1668  {
1669  if (d[0] > d[1])
1670  {
1671  FcConfigMessage (parse, FcSevereError, "invalid range");
1672  return;
1673  }
1674  r = FcRangeCreateDouble (d[0], d[1]);
1675  }
1676  else
1677  {
1678  if (n[0] > n[1])
1679  {
1680  FcConfigMessage (parse, FcSevereError, "invalid range");
1681  return;
1682  }
1683  r = FcRangeCreateInteger (n[0], n[1]);
1684  }
1686 }
1687 
1688 static FcBool
1690 {
1691  FcBool result = FcFalse;
1692 
1693  if (!FcNameBool (bool_, &result))
1694  FcConfigMessage (parse, FcSevereWarning, "\"%s\" is not known boolean",
1695  bool_);
1696  return result;
1697 }
1698 
1699 static void
1701 {
1702  FcChar8 *s;
1703 
1704  if (!parse->pstack)
1705  return;
1706  s = FcStrBufDoneStatic (&parse->pstack->str);
1707  if (!s)
1708  {
1709  FcConfigMessage (parse, FcSevereError, "out of memory");
1710  return;
1711  }
1713  FcStrBufDestroy (&parse->pstack->str);
1714 }
1715 
1716 static void
1718 {
1719  FcVStack *vstack;
1721  FcChar32 i, begin, end;
1722  int n = 0;
1723 
1724  while ((vstack = FcVStackPeek (parse)))
1725  {
1726  switch ((int) vstack->tag) {
1727  case FcVStackInteger:
1728  if (!FcCharSetAddChar (charset, vstack->u.integer))
1729  {
1730  FcConfigMessage (parse, FcSevereWarning, "invalid character: 0x%04x", vstack->u.integer);
1731  }
1732  else
1733  n++;
1734  break;
1735  case FcVStackRange:
1736  begin = (FcChar32) vstack->u.range->begin;
1737  end = (FcChar32) vstack->u.range->end;
1738 
1739  if (begin <= end)
1740  {
1741  for (i = begin; i <= end; i++)
1742  {
1743  if (!FcCharSetAddChar (charset, i))
1744  {
1745  FcConfigMessage (parse, FcSevereWarning, "invalid character: 0x%04x", i);
1746  }
1747  else
1748  n++;
1749  }
1750  }
1751  break;
1752  default:
1753  FcConfigMessage (parse, FcSevereError, "invalid element in charset");
1754  break;
1755  }
1757  }
1758  if (n > 0)
1760  else
1762 }
1763 
1764 static void
1766 {
1767  FcVStack *vstack;
1768  FcLangSet *langset = FcLangSetCreate ();
1769  int n = 0;
1770 
1771  while ((vstack = FcVStackPeek (parse)))
1772  {
1773  switch ((int) vstack->tag) {
1774  case FcVStackString:
1775  if (!FcLangSetAdd (langset, vstack->u.string))
1776  {
1777  FcConfigMessage (parse, FcSevereWarning, "invalid langset: %s", vstack->u.string);
1778  }
1779  else
1780  n++;
1781  break;
1782  default:
1783  FcConfigMessage (parse, FcSevereError, "invalid element in langset");
1784  break;
1785  }
1787  }
1788  if (n > 0)
1789  FcVStackPushLangSet (parse, langset);
1790  else
1791  FcLangSetDestroy (langset);
1792 }
1793 
1794 static FcBool
1796  const FcChar8 *binding_string,
1797  FcValueBinding *binding_ret)
1798 {
1800 
1801  if (!binding_string)
1803  else
1804  {
1805  if (!strcmp ((char *) binding_string, "weak"))
1807  else if (!strcmp ((char *) binding_string, "strong"))
1809  else if (!strcmp ((char *) binding_string, "same"))
1811  else
1812  {
1813  FcConfigMessage (parse, FcSevereWarning, "invalid binding \"%s\"", binding_string);
1814  return FcFalse;
1815  }
1816  }
1817  *binding_ret = binding;
1818  return FcTrue;
1819 }
1820 
1821 static void
1823 {
1824  FcVStack *vstack;
1825  FcExpr *left, *expr = 0, *new;
1826 
1827  while ((vstack = FcVStackPeek (parse)))
1828  {
1829  if (vstack->tag != FcVStackFamily)
1830  {
1831  FcConfigMessage (parse, FcSevereWarning, "non-family");
1833  continue;
1834  }
1835  left = vstack->u.expr;
1836  vstack->tag = FcVStackNone;
1838  if (expr)
1839  {
1840  new = FcExprCreateOp (parse->config, left, FcOpComma, expr);
1841  if (!new)
1842  {
1843  FcConfigMessage (parse, FcSevereError, "out of memory");
1844  FcExprDestroy (left);
1845  FcExprDestroy (expr);
1846  break;
1847  }
1848  expr = new;
1849  }
1850  else
1851  expr = left;
1852  }
1853  if (expr)
1854  {
1855  if (!FcVStackPushExpr (parse, tag, expr))
1856  {
1857  FcConfigMessage (parse, FcSevereError, "out of memory");
1858  FcExprDestroy (expr);
1859  }
1860  }
1861 }
1862 
1863 static void
1865 {
1866  FcChar8 *s;
1867  FcExpr *expr;
1868 
1869  if (!parse->pstack)
1870  return;
1871  s = FcStrBufDoneStatic (&parse->pstack->str);
1872  if (!s)
1873  {
1874  FcConfigMessage (parse, FcSevereError, "out of memory");
1875  return;
1876  }
1877  expr = FcExprCreateString (parse->config, s);
1878  FcStrBufDestroy (&parse->pstack->str);
1879  if (expr)
1881 }
1882 
1883 static void
1885 {
1886  FcExpr *family = 0, *accept = 0, *prefer = 0, *def = 0, *new = 0;
1887  FcEdit *edit = 0;
1888  FcVStack *vstack;
1889  FcRule *rule = NULL, *r;
1891  int n;
1892 
1894  return;
1895  while ((vstack = FcVStackPeek (parse)))
1896  {
1897  switch ((int) vstack->tag) {
1898  case FcVStackFamily:
1899  if (family)
1900  {
1901  FcConfigMessage (parse, FcSevereWarning, "Having multiple <family> in <alias> isn't supported and may not work as expected");
1902  new = FcExprCreateOp (parse->config, vstack->u.expr, FcOpComma, family);
1903  if (!new)
1904  FcConfigMessage (parse, FcSevereError, "out of memory");
1905  else
1906  family = new;
1907  }
1908  else
1909  new = vstack->u.expr;
1910  if (new)
1911  {
1912  family = new;
1913  vstack->tag = FcVStackNone;
1914  }
1915  break;
1916  case FcVStackPrefer:
1917  if (prefer)
1918  FcExprDestroy (prefer);
1919  prefer = vstack->u.expr;
1920  vstack->tag = FcVStackNone;
1921  break;
1922  case FcVStackAccept:
1923  if (accept)
1924  FcExprDestroy (accept);
1925  accept = vstack->u.expr;
1926  vstack->tag = FcVStackNone;
1927  break;
1928  case FcVStackDefault:
1929  if (def)
1930  FcExprDestroy (def);
1931  def = vstack->u.expr;
1932  vstack->tag = FcVStackNone;
1933  break;
1934  case FcVStackTest:
1935  if (rule)
1936  {
1937  r = FcRuleCreate (FcRuleTest, vstack->u.test);
1938  r->next = rule;
1939  rule = r;
1940  }
1941  else
1942  rule = FcRuleCreate (FcRuleTest, vstack->u.test);
1943  vstack->tag = FcVStackNone;
1944  break;
1945  default:
1946  FcConfigMessage (parse, FcSevereWarning, "bad alias");
1947  break;
1948  }
1950  }
1951  if (!family)
1952  {
1953  FcConfigMessage (parse, FcSevereError, "missing family in alias");
1954  if (prefer)
1955  FcExprDestroy (prefer);
1956  if (accept)
1957  FcExprDestroy (accept);
1958  if (def)
1959  FcExprDestroy (def);
1960  if (rule)
1961  FcRuleDestroy (rule);
1962  return;
1963  }
1964  if (!prefer &&
1965  !accept &&
1966  !def)
1967  {
1969  if (rule)
1970  FcRuleDestroy (rule);
1971  return;
1972  }
1973  else
1974  {
1976  FcQualAny,
1977  (FcChar8 *) FC_FAMILY,
1979  family);
1980  if (rule)
1981  {
1982  for (r = rule; r->next; r = r->next);
1983  r->next = FcRuleCreate (FcRuleTest, t);
1984  r = r->next;
1985  }
1986  else
1987  {
1988  r = rule = FcRuleCreate (FcRuleTest, t);
1989  }
1990  }
1991  if (prefer)
1992  {
1993  edit = FcEditCreate (parse,
1994  FC_FAMILY_OBJECT,
1995  FcOpPrepend,
1996  prefer,
1997  binding);
1998  if (!edit)
1999  FcExprDestroy (prefer);
2000  else
2001  {
2002  r->next = FcRuleCreate (FcRuleEdit, edit);
2003  r = r->next;
2004  }
2005  }
2006  if (accept)
2007  {
2008  edit = FcEditCreate (parse,
2009  FC_FAMILY_OBJECT,
2010  FcOpAppend,
2011  accept,
2012  binding);
2013  if (!edit)
2014  FcExprDestroy (accept);
2015  else
2016  {
2017  r->next = FcRuleCreate (FcRuleEdit, edit);
2018  r = r->next;
2019  }
2020  }
2021  if (def)
2022  {
2023  edit = FcEditCreate (parse,
2024  FC_FAMILY_OBJECT,
2026  def,
2027  binding);
2028  if (!edit)
2029  FcExprDestroy (def);
2030  else
2031  {
2032  r->next = FcRuleCreate (FcRuleEdit, edit);
2033  r = r->next;
2034  }
2035  }
2036  if ((n = FcRuleSetAdd (parse->ruleset, rule, FcMatchPattern)) == -1)
2037  FcRuleDestroy (rule);
2038  else
2039  if (parse->config->maxObjects < n)
2040  parse->config->maxObjects = n;
2041 }
2042 
2043 static void
2045 {
2046  const FcChar8 *domain;
2047  FcChar8 *desc;
2048 
2049  domain = FcConfigGetAttribute (parse, "domain");
2050  desc = FcStrBufDone (&parse->pstack->str);
2051  if (!desc)
2052  {
2053  FcConfigMessage (parse, FcSevereError, "out of memory");
2054  return;
2055  }
2056  FcRuleSetAddDescription (parse->ruleset, domain, desc);
2057 
2058  FcStrFree (desc);
2059 }
2060 
2061 static void
2063 {
2064  const FcChar8 *path, *attr, *data, *salt;
2065  FcChar8 *prefix = NULL;
2066 
2067  data = FcStrBufDoneStatic (&parse->pstack->str);
2068  if (!data)
2069  {
2070  FcConfigMessage (parse, FcSevereError, "out of memory");
2071  return;
2072  }
2073  if (data[0] == 0)
2074  {
2075  FcConfigMessage (parse, FcSevereWarning, "empty font directory name for remap ignored");
2076  return;
2077  }
2078  path = FcConfigGetAttribute (parse, "as-path");
2079  if (!path)
2080  {
2081  FcConfigMessage (parse, FcSevereWarning, "Missing as-path in remap-dir");
2082  return;
2083  }
2084  attr = FcConfigGetAttribute (parse, "prefix");
2085  salt = FcConfigGetAttribute (parse, "salt");
2087  if (!prefix || prefix[0] == 0)
2088  {
2089  /* nop */
2090  }
2091  else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
2092  {
2093  if (!FcConfigAddFontDir (parse->config, prefix, path, salt))
2094  FcConfigMessage (parse, FcSevereError, "out of memory; cannot create remap data for %s as %s", prefix, path);
2095  }
2096  FcStrBufDestroy (&parse->pstack->str);
2097 
2098  if (prefix)
2099  FcStrFree (prefix);
2100 }
2101 
2102 static void
2104 {
2105  if (!parse->scanOnly)
2106  {
2107  if (!FcConfigResetFontDirs (parse->config))
2108  FcConfigMessage (parse, FcSevereError, "Unable to reset fonts dirs");
2109  }
2110 }
2111 
2112 static FcExpr *
2114 {
2115  FcVStack *vstack = FcVStackPeek (parse);
2116  FcExpr *expr = 0;
2117  if (!vstack)
2118  return 0;
2119  switch ((int) vstack->tag) {
2120  case FcVStackNone:
2121  break;
2122  case FcVStackString:
2123  case FcVStackFamily:
2124  expr = FcExprCreateString (parse->config, vstack->u.string);
2125  break;
2126  case FcVStackName:
2127  expr = FcExprCreateName (parse->config, vstack->u.name);
2128  break;
2129  case FcVStackConstant:
2130  expr = FcExprCreateConst (parse->config, vstack->u.string);
2131  break;
2132  case FcVStackGlob:
2133  /* XXX: What's the correct action here? (CDW) */
2134  break;
2135  case FcVStackPrefer:
2136  case FcVStackAccept:
2137  case FcVStackDefault:
2138  expr = vstack->u.expr;
2139  vstack->tag = FcVStackNone;
2140  break;
2141  case FcVStackInteger:
2142  expr = FcExprCreateInteger (parse->config, vstack->u.integer);
2143  break;
2144  case FcVStackDouble:
2145  expr = FcExprCreateDouble (parse->config, vstack->u._double);
2146  break;
2147  case FcVStackMatrix:
2148  expr = FcExprCreateMatrix (parse->config, vstack->u.matrix);
2149  break;
2150  case FcVStackRange:
2151  expr = FcExprCreateRange (parse->config, vstack->u.range);
2152  break;
2153  case FcVStackBool:
2154  expr = FcExprCreateBool (parse->config, vstack->u.bool_);
2155  break;
2156  case FcVStackCharSet:
2157  expr = FcExprCreateCharSet (parse->config, vstack->u.charset);
2158  break;
2159  case FcVStackLangSet:
2160  expr = FcExprCreateLangSet (parse->config, vstack->u.langset);
2161  break;
2162  case FcVStackTest:
2163  break;
2164  case FcVStackExpr:
2165  expr = vstack->u.expr;
2166  vstack->tag = FcVStackNone;
2167  break;
2168  case FcVStackEdit:
2169  break;
2170  default:
2171  break;
2172  }
2174  return expr;
2175 }
2176 
2177 /*
2178  * This builds a tree of binary operations. Note
2179  * that every operator is defined so that if only
2180  * a single operand is contained, the value of the
2181  * whole expression is the value of the operand.
2182  *
2183  * This code reduces in that case to returning that
2184  * operand.
2185  */
2186 static FcExpr *
2188 {
2189  FcExpr *left, *expr = 0, *new;
2190 
2191  while ((left = FcPopExpr (parse)))
2192  {
2193  if (expr)
2194  {
2195  new = FcExprCreateOp (parse->config, left, op, expr);
2196  if (!new)
2197  {
2198  FcConfigMessage (parse, FcSevereError, "out of memory");
2199  FcExprDestroy (left);
2200  FcExprDestroy (expr);
2201  return 0;
2202  }
2203  expr = new;
2204  }
2205  else
2206  expr = left;
2207  }
2208  return expr;
2209 }
2210 
2211 static void
2213 {
2214  FcExpr *expr = FcPopBinary (parse, op);
2215  if (expr)
2217 }
2218 
2219 /*
2220  * This builds a a unary operator, it consumes only
2221  * a single operand
2222  */
2223 
2224 static FcExpr *
2226 {
2227  FcExpr *operand, *new = 0;
2228 
2229  if ((operand = FcPopExpr (parse)))
2230  {
2231  new = FcExprCreateOp (parse->config, operand, op, 0);
2232  if (!new)
2233  {
2234  FcExprDestroy (operand);
2235  FcConfigMessage (parse, FcSevereError, "out of memory");
2236  }
2237  }
2238  return new;
2239 }
2240 
2241 static void
2243 {
2244  FcExpr *expr = FcPopUnary (parse, op);
2245  if (expr)
2247 }
2248 
2249 static void
2251 {
2252  const FcChar8 *attr, *data, *salt;
2253  FcChar8 *prefix = NULL;
2254 
2255  data = FcStrBufDoneStatic (&parse->pstack->str);
2256  if (!data)
2257  {
2258  FcConfigMessage (parse, FcSevereError, "out of memory");
2259  return;
2260  }
2261  if (data[0] == 0)
2262  {
2263  FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
2264  return;
2265  }
2266  attr = FcConfigGetAttribute (parse, "prefix");
2267  salt = FcConfigGetAttribute (parse, "salt");
2269  if (!prefix || prefix[0] == 0)
2270  {
2271  /* nop */
2272  }
2273  else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
2274  {
2275  if (!FcConfigAddFontDir (parse->config, prefix, NULL, salt))
2276  FcConfigMessage (parse, FcSevereError, "out of memory; cannot add directory %s", prefix);
2277  }
2278  FcStrBufDestroy (&parse->pstack->str);
2279 
2280  if (prefix)
2281  FcStrFree (prefix);
2282 }
2283 
2284 static void
2286 {
2287  const FcChar8 *attr;
2288  FcChar8 *prefix = NULL, *p, *data = NULL;
2289 
2290  attr = FcConfigGetAttribute (parse, "prefix");
2291  if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
2292  {
2294  /* home directory might be disabled.
2295  * simply ignore this element.
2296  */
2297  if (!prefix)
2298  goto bail;
2299  }
2300  data = FcStrBufDone (&parse->pstack->str);
2301  if (!data)
2302  {
2303  FcConfigMessage (parse, FcSevereError, "out of memory");
2304  data = prefix;
2305  goto bail;
2306  }
2307  if (data[0] == 0)
2308  {
2309  FcConfigMessage (parse, FcSevereWarning, "empty cache directory name ignored");
2310  return;
2311  }
2312  if (prefix)
2313  {
2314  size_t plen = strlen ((const char *)prefix);
2315  size_t dlen = strlen ((const char *)data);
2316 
2317  p = realloc (prefix, plen + 1 + dlen + 1);
2318  if (!p)
2319  {
2320  FcConfigMessage (parse, FcSevereError, "out of memory");
2321  FcStrFree (prefix);
2322  goto bail;
2323  }
2324  prefix = p;
2325  prefix[plen] = FC_DIR_SEPARATOR;
2326  memcpy (&prefix[plen + 1], data, dlen);
2327  prefix[plen + 1 + dlen] = 0;
2328  FcStrFree (data);
2329  data = prefix;
2330  }
2331 #ifdef _WIN32
2332  else if (data[0] == '/' && fontconfig_instprefix[0] != '\0')
2333  {
2334  size_t plen = strlen ((const char *)fontconfig_instprefix);
2335  size_t dlen = strlen ((const char *)data);
2336 
2337  prefix = malloc (plen + 1 + dlen + 1);
2338  if (!prefix)
2339  {
2340  FcConfigMessage (parse, FcSevereError, "out of memory");
2341  goto bail;
2342  }
2343  strcpy ((char *) prefix, (char *) fontconfig_instprefix);
2344  prefix[plen] = FC_DIR_SEPARATOR;
2345  memcpy (&prefix[plen + 1], data, dlen);
2346  prefix[plen + 1 + dlen] = 0;
2347  FcStrFree (data);
2348  data = prefix;
2349  }
2350  else if (strcmp ((const char *) data, "WINDOWSTEMPDIR_FONTCONFIG_CACHE") == 0)
2351  {
2352  int rc;
2353 
2354  FcStrFree (data);
2355  data = malloc (1000);
2356  if (!data)
2357  {
2358  FcConfigMessage (parse, FcSevereError, "out of memory");
2359  goto bail;
2360  }
2361  rc = GetTempPath (800, (LPSTR) data);
2362  if (rc == 0 || rc > 800)
2363  {
2364  FcConfigMessage (parse, FcSevereError, "GetTempPath failed");
2365  goto bail;
2366  }
2367  if (data [strlen ((const char *) data) - 1] != '\\')
2368  strcat ((char *) data, "\\");
2369  strcat ((char *) data, "fontconfig\\cache");
2370  }
2371  else if (strcmp ((const char *) data, "LOCAL_APPDATA_FONTCONFIG_CACHE") == 0)
2372  {
2373  char szFPath[MAX_PATH + 1];
2374  size_t len;
2375 
2376  if (!(pSHGetFolderPathA && SUCCEEDED(pSHGetFolderPathA(NULL, /* CSIDL_LOCAL_APPDATA */ 28, NULL, 0, szFPath))))
2377  {
2378  FcConfigMessage (parse, FcSevereError, "SHGetFolderPathA failed");
2379  goto bail;
2380  }
2381  strncat(szFPath, "\\fontconfig\\cache", MAX_PATH - 1 - strlen(szFPath));
2382  len = strlen(szFPath) + 1;
2383  FcStrFree (data);
2384  data = malloc(len);
2385  if (!data)
2386  {
2387  FcConfigMessage (parse, FcSevereError, "out of memory");
2388  goto bail;
2389  }
2390  strncpy((char *) data, szFPath, len);
2391  }
2392 #endif
2393  if (strlen ((char *) data) == 0)
2394  FcConfigMessage (parse, FcSevereWarning, "empty cache directory name ignored");
2395  else if (!parse->scanOnly && (!FcStrUsesHome (data) || FcConfigHome ()))
2396  {
2397  if (!FcConfigAddCacheDir (parse->config, data))
2398  FcConfigMessage (parse, FcSevereError, "out of memory; cannot add cache directory %s", data);
2399  }
2400  FcStrBufDestroy (&parse->pstack->str);
2401 
2402  bail:
2403  if (data)
2404  FcStrFree (data);
2405 }
2406 
2407 void
2409 {
2410  FcChar8 *s;
2411 
2412 retry_dir:
2415  goto retry_dir;
2416  free (s);
2417 
2418 retry_conf:
2421  goto retry_conf;
2422  free (s);
2423 }
2424 
2425 static void
2427 {
2428  FcChar8 *s;
2429  const FcChar8 *attr;
2430  FcBool ignore_missing = FcFalse;
2431 #ifndef _WIN32
2432  FcBool deprecated = FcFalse;
2433 #endif
2434  FcChar8 *prefix = NULL, *p;
2435  FcChar8 *userdir = NULL, *userconf = NULL;
2436  FcRuleSet *ruleset;
2437  FcMatchKind k;
2438 
2439  s = FcStrBufDoneStatic (&parse->pstack->str);
2440  if (!s)
2441  {
2442  FcConfigMessage (parse, FcSevereError, "out of memory");
2443  goto bail;
2444  }
2445  attr = FcConfigGetAttribute (parse, "ignore_missing");
2446  if (attr && FcConfigLexBool (parse, (FcChar8 *) attr) == FcTrue)
2447  ignore_missing = FcTrue;
2448  attr = FcConfigGetAttribute (parse, "deprecated");
2449 #ifndef _WIN32
2450  if (attr && FcConfigLexBool (parse, (FcChar8 *) attr) == FcTrue)
2451  deprecated = FcTrue;
2452 #endif
2453  attr = FcConfigGetAttribute (parse, "prefix");
2454  if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
2455  {
2457  /* home directory might be disabled.
2458  * simply ignore this element.
2459  */
2460  if (!prefix)
2461  goto bail;
2462  }
2463  if (prefix)
2464  {
2465  size_t plen = strlen ((const char *)prefix);
2466  size_t dlen = strlen ((const char *)s);
2467  FcChar8 *u;
2468 
2469  p = realloc (prefix, plen + 1 + dlen + 1);
2470  if (!p)
2471  {
2472  FcConfigMessage (parse, FcSevereError, "out of memory");
2473  goto bail;
2474  }
2475  prefix = p;
2476  prefix[plen] = FC_DIR_SEPARATOR;
2477  memcpy (&prefix[plen + 1], s, dlen);
2478  prefix[plen + 1 + dlen] = 0;
2479  s = prefix;
2480  if (FcFileIsDir (s))
2481  {
2482  userdir:
2483  userdir = fc_atomic_ptr_get (&__fc_userdir);
2484  if (!userdir)
2485  {
2486  u = FcStrdup (s);
2487  if (!fc_atomic_ptr_cmpexch (&__fc_userdir, userdir, u))
2488  {
2489  free (u);
2490  goto userdir;
2491  }
2492  userdir = u;
2493  }
2494  }
2495  else if (FcFileIsFile (s))
2496  {
2497  userconf:
2498  userconf = fc_atomic_ptr_get (&__fc_userconf);
2499  if (!userconf)
2500  {
2501  u = FcStrdup (s);
2502  if (!fc_atomic_ptr_cmpexch (&__fc_userconf, userconf, u))
2503  {
2504  free (u);
2505  goto userconf;
2506  }
2507  userconf = u;
2508  }
2509  }
2510  else
2511  {
2512  /* No config dir nor file on the XDG directory spec compliant place
2513  * so need to guess what it is supposed to be.
2514  */
2515  if (FcStrStr (s, (const FcChar8 *)"conf.d") != NULL)
2516  goto userdir;
2517  else
2518  goto userconf;
2519  }
2520  }
2521  /* flush the ruleset into the queue */
2522  ruleset = parse->ruleset;
2523  parse->ruleset = FcRuleSetCreate (ruleset->name);
2524  FcRuleSetEnable (parse->ruleset, ruleset->enabled);
2525  FcRuleSetAddDescription (parse->ruleset, ruleset->domain, ruleset->description);
2526  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
2527  {
2528  FcPtrListIter iter;
2529 
2530  FcPtrListIterInit (ruleset->subst[k], &iter);
2531  if (FcPtrListIterIsValid (ruleset->subst[k], &iter))
2532  {
2533  FcPtrListIterInitAtLast (parse->config->subst[k], &iter);
2534  FcRuleSetReference (ruleset);
2535  FcPtrListIterAdd (parse->config->subst[k], &iter, ruleset);
2536  }
2537  }
2538  FcRuleSetDestroy (ruleset);
2539  if (!_FcConfigParse (parse->config, s, !ignore_missing, !parse->scanOnly))
2540  parse->error = FcTrue;
2541 #ifndef _WIN32
2542  else
2543  {
2544  FcChar8 *filename;
2545  static FcBool warn_conf = FcFalse, warn_confd = FcFalse;
2546 
2547  filename = FcConfigGetFilename(parse->config, s);
2548  if (deprecated == FcTrue &&
2549  filename != NULL &&
2550  userdir != NULL &&
2552  {
2553  if (FcFileIsDir (filename))
2554  {
2555  FcChar8 *parent = FcStrDirname (userdir);
2556 
2557  if (!FcFileIsDir (parent))
2559  FcStrFree (parent);
2560  if (FcFileIsDir (userdir) ||
2561  rename ((const char *)filename, (const char *)userdir) != 0 ||
2562  symlink ((const char *)userdir, (const char *)filename) != 0)
2563  {
2564  if (!warn_confd)
2565  {
2566  FcConfigMessage (parse, FcSevereWarning, "reading configurations from %s is deprecated. please move it to %s manually", s, userdir);
2567  warn_confd = FcTrue;
2568  }
2569  }
2570  }
2571  else
2572  {
2573  FcChar8 *parent = FcStrDirname (userconf);
2574 
2575  if (!FcFileIsDir (parent))
2577  FcStrFree (parent);
2578  if (FcFileIsFile (userconf) ||
2579  rename ((const char *)filename, (const char *)userconf) != 0 ||
2580  symlink ((const char *)userconf, (const char *)filename) != 0)
2581  {
2582  if (!warn_conf)
2583  {
2584  FcConfigMessage (parse, FcSevereWarning, "reading configurations from %s is deprecated. please move it to %s manually", s, userconf);
2585  warn_conf = FcTrue;
2586  }
2587  }
2588  }
2589  }
2590  if(filename)
2592  }
2593 #endif
2594  FcStrBufDestroy (&parse->pstack->str);
2595 
2596  bail:
2597  if (prefix)
2598  FcStrFree (prefix);
2599 }
2600 
2601 typedef struct _FcOpMap {
2602  char name[16];
2605 
2606 static FcOp
2607 FcConfigLexOp (const FcChar8 *op, const FcOpMap *map, int nmap)
2608 {
2609  int i;
2610 
2611  for (i = 0; i < nmap; i++)
2612  if (!strcmp ((char *) op, map[i].name))
2613  return map[i].op;
2614  return FcOpInvalid;
2615 }
2616 
2617 static const FcOpMap fcCompareOps[] = {
2618  { "eq", FcOpEqual },
2619  { "not_eq", FcOpNotEqual },
2620  { "less", FcOpLess },
2621  { "less_eq", FcOpLessEqual },
2622  { "more", FcOpMore },
2623  { "more_eq", FcOpMoreEqual },
2624  { "contains", FcOpContains },
2625  { "not_contains", FcOpNotContains }
2626 };
2627 
2628 #define NUM_COMPARE_OPS (int) (sizeof fcCompareOps / sizeof fcCompareOps[0])
2629 
2630 static FcOp
2632 {
2634 }
2635 
2636 static void
2638 {
2639  const FcChar8 *kind_string;
2640  FcMatchKind kind;
2641  const FcChar8 *qual_string;
2642  FcQual qual;
2643  const FcChar8 *name;
2644  const FcChar8 *compare_string;
2645  FcOp compare;
2646  FcExpr *expr;
2647  FcTest *test;
2648  const FcChar8 *iblanks_string;
2649  int flags = 0;
2650 
2651  kind_string = FcConfigGetAttribute (parse, "target");
2652  if (!kind_string)
2653  kind = FcMatchDefault;
2654  else
2655  {
2656  if (!strcmp ((char *) kind_string, "pattern"))
2657  kind = FcMatchPattern;
2658  else if (!strcmp ((char *) kind_string, "font"))
2659  kind = FcMatchFont;
2660  else if (!strcmp ((char *) kind_string, "scan"))
2661  kind = FcMatchScan;
2662  else if (!strcmp ((char *) kind_string, "default"))
2663  kind = FcMatchDefault;
2664  else
2665  {
2666  FcConfigMessage (parse, FcSevereWarning, "invalid test target \"%s\"", kind_string);
2667  return;
2668  }
2669  }
2670  qual_string = FcConfigGetAttribute (parse, "qual");
2671  if (!qual_string)
2672  qual = FcQualAny;
2673  else
2674  {
2675  if (!strcmp ((char *) qual_string, "any"))
2676  qual = FcQualAny;
2677  else if (!strcmp ((char *) qual_string, "all"))
2678  qual = FcQualAll;
2679  else if (!strcmp ((char *) qual_string, "first"))
2680  qual = FcQualFirst;
2681  else if (!strcmp ((char *) qual_string, "not_first"))
2682  qual = FcQualNotFirst;
2683  else
2684  {
2685  FcConfigMessage (parse, FcSevereWarning, "invalid test qual \"%s\"", qual_string);
2686  return;
2687  }
2688  }
2689  name = FcConfigGetAttribute (parse, "name");
2690  if (!name)
2691  {
2692  FcConfigMessage (parse, FcSevereWarning, "missing test name");
2693  return;
2694  }
2695  compare_string = FcConfigGetAttribute (parse, "compare");
2696  if (!compare_string)
2697  compare = FcOpEqual;
2698  else
2699  {
2701  if (compare == FcOpInvalid)
2702  {
2703  FcConfigMessage (parse, FcSevereWarning, "invalid test compare \"%s\"", compare_string);
2704  return;
2705  }
2706  }
2707  iblanks_string = FcConfigGetAttribute (parse, "ignore-blanks");
2708  if (iblanks_string)
2709  {
2710  FcBool f = FcFalse;
2711 
2712  if (!FcNameBool (iblanks_string, &f))
2713  {
2716  "invalid test ignore-blanks \"%s\"", iblanks_string);
2717  }
2718  if (f)
2720  }
2722  if (!expr)
2723  {
2724  FcConfigMessage (parse, FcSevereWarning, "missing test expression");
2725  return;
2726  }
2727  if (expr->op == FcOpComma)
2728  {
2729  FcConfigMessage (parse, FcSevereWarning, "Having multiple values in <test> isn't supported and may not work as expected");
2730  }
2731  test = FcTestCreate (parse, kind, qual, name, FC_OP (compare, flags), expr);
2732  if (!test)
2733  {
2734  FcConfigMessage (parse, FcSevereError, "out of memory");
2735  return;
2736  }
2738 }
2739 
2740 static const FcOpMap fcModeOps[] = {
2741  { "assign", FcOpAssign },
2742  { "assign_replace", FcOpAssignReplace },
2743  { "prepend", FcOpPrepend },
2744  { "prepend_first", FcOpPrependFirst },
2745  { "append", FcOpAppend },
2746  { "append_last", FcOpAppendLast },
2747  { "delete", FcOpDelete },
2748  { "delete_all", FcOpDeleteAll },
2749 };
2750 
2751 #define NUM_MODE_OPS (int) (sizeof fcModeOps / sizeof fcModeOps[0])
2752 
2753 static FcOp
2755 {
2757 }
2758 
2759 static void
2761 {
2762  const FcChar8 *name;
2763  const FcChar8 *mode_string;
2764  FcOp mode;
2766  FcExpr *expr;
2767  FcEdit *edit;
2768 
2769  name = FcConfigGetAttribute (parse, "name");
2770  if (!name)
2771  {
2772  FcConfigMessage (parse, FcSevereWarning, "missing edit name");
2773  return;
2774  }
2775  mode_string = FcConfigGetAttribute (parse, "mode");
2776  if (!mode_string)
2777  mode = FcOpAssign;
2778  else
2779  {
2780  mode = FcConfigLexMode (mode_string);
2781  if (mode == FcOpInvalid)
2782  {
2783  FcConfigMessage (parse, FcSevereWarning, "invalid edit mode \"%s\"", mode_string);
2784  return;
2785  }
2786  }
2788  return;
2789 
2791  if ((mode == FcOpDelete || mode == FcOpDeleteAll) &&
2792  expr != NULL)
2793  {
2794  FcConfigMessage (parse, FcSevereWarning, "Expression doesn't take any effects for delete and delete_all");
2795  FcExprDestroy (expr);
2796  expr = NULL;
2797  }
2798  edit = FcEditCreate (parse, FcObjectFromName ((char *) name),
2799  mode, expr, binding);
2800  if (!edit)
2801  {
2802  FcConfigMessage (parse, FcSevereError, "out of memory");
2803  FcExprDestroy (expr);
2804  return;
2805  }
2806  if (!FcVStackPushEdit (parse, edit))
2807  FcEditDestroy (edit);
2808 }
2809 
2810 static void
2812 {
2813  const FcChar8 *kind_name;
2814  FcMatchKind kind;
2815  FcVStack *vstack;
2816  FcRule *rule = NULL, *r;
2817  int n;
2818 
2819  kind_name = FcConfigGetAttribute (parse, "target");
2820  if (!kind_name)
2821  kind = FcMatchPattern;
2822  else
2823  {
2824  if (!strcmp ((char *) kind_name, "pattern"))
2825  kind = FcMatchPattern;
2826  else if (!strcmp ((char *) kind_name, "font"))
2827  kind = FcMatchFont;
2828  else if (!strcmp ((char *) kind_name, "scan"))
2829  kind = FcMatchScan;
2830  else
2831  {
2832  FcConfigMessage (parse, FcSevereWarning, "invalid match target \"%s\"", kind_name);
2833  return;
2834  }
2835  }
2836  while ((vstack = FcVStackPeek (parse)))
2837  {
2838  switch ((int) vstack->tag) {
2839  case FcVStackTest:
2840  r = FcRuleCreate (FcRuleTest, vstack->u.test);
2841  if (rule)
2842  r->next = rule;
2843  rule = r;
2844  vstack->tag = FcVStackNone;
2845  break;
2846  case FcVStackEdit:
2847  if (kind == FcMatchScan && vstack->u.edit->object > FC_MAX_BASE_OBJECT)
2848  {
2850  "<match target=\"scan\"> cannot edit user-defined object \"%s\"",
2851  FcObjectName(vstack->u.edit->object));
2852  if (rule)
2853  FcRuleDestroy (rule);
2854  return;
2855  }
2856  r = FcRuleCreate (FcRuleEdit, vstack->u.edit);
2857  if (rule)
2858  r->next = rule;
2859  rule = r;
2860  vstack->tag = FcVStackNone;
2861  break;
2862  default:
2863  FcConfigMessage (parse, FcSevereWarning, "invalid match element");
2864  break;
2865  }
2867  }
2868  if (!rule)
2869  {
2870  FcConfigMessage (parse, FcSevereWarning, "No <test> nor <edit> elements in <match>");
2871  return;
2872  }
2873  if ((n = FcRuleSetAdd (parse->ruleset, rule, kind)) == -1)
2874  {
2875  FcConfigMessage (parse, FcSevereError, "out of memory");
2876  FcRuleDestroy (rule);
2877  }
2878  else
2879  if (parse->config->maxObjects < n)
2880  parse->config->maxObjects = n;
2881 }
2882 
2883 static void
2885 {
2886  FcVStack *vstack;
2887 
2888  while ((vstack = FcVStackPeek (parse)))
2889  {
2890  switch ((int) vstack->tag) {
2891  case FcVStackGlob:
2892  if (!parse->scanOnly && !FcConfigGlobAdd (parse->config,
2893  vstack->u.string,
2895  {
2896  FcConfigMessage (parse, FcSevereError, "out of memory");
2897  }
2898  else
2899  {
2900  if (parse->scanOnly && vstack->u.string)
2901  {
2902  FcStrFree (vstack->u.string);
2903  vstack->tag = FcVStackNone;
2904  }
2905  }
2906  break;
2907  case FcVStackPattern:
2908  if (!parse->scanOnly && !FcConfigPatternsAdd (parse->config,
2909  vstack->u.pattern,
2911  {
2912  FcConfigMessage (parse, FcSevereError, "out of memory");
2913  }
2914  else
2915  {
2916  if (parse->scanOnly && vstack->u.pattern)
2917  FcPatternDestroy (vstack->u.pattern);
2918  vstack->tag = FcVStackNone;
2919  }
2920  break;
2921  default:
2922  FcConfigMessage (parse, FcSevereWarning, "bad font selector");
2923  break;
2924  }
2926  }
2927 }
2928 
2929 
2930 static FcValue
2932 {
2933  FcVStack *vstack = FcVStackPeek (parse);
2934  FcValue value;
2935 
2936  value.type = FcTypeVoid;
2937 
2938  if (!vstack)
2939  return value;
2940 
2941  switch ((int) vstack->tag) {
2942  case FcVStackString:
2943  value.u.s = FcStrdup (vstack->u.string);
2944  if (value.u.s)
2945  value.type = FcTypeString;
2946  break;
2947  case FcVStackConstant:
2948  if (FcNameConstant (vstack->u.string, &value.u.i))
2949  value.type = FcTypeInteger;
2950  break;
2951  case FcVStackInteger:
2952  value.u.i = vstack->u.integer;
2953  value.type = FcTypeInteger;
2954  break;
2955  case FcVStackDouble:
2956  value.u.d = vstack->u._double;
2957  value.type = FcTypeDouble;
2958  break;
2959  case FcVStackBool:
2960  value.u.b = vstack->u.bool_;
2961  value.type = FcTypeBool;
2962  break;
2963  case FcVStackCharSet:
2964  value.u.c = FcCharSetCopy (vstack->u.charset);
2965  if (value.u.c)
2966  value.type = FcTypeCharSet;
2967  break;
2968  case FcVStackLangSet:
2969  value.u.l = FcLangSetCopy (vstack->u.langset);
2970  if (value.u.l)
2971  value.type = FcTypeLangSet;
2972  break;
2973  case FcVStackRange:
2974  value.u.r = FcRangeCopy (vstack->u.range);
2975  if (value.u.r)
2976  value.type = FcTypeRange;
2977  break;
2978  default:
2979  FcConfigMessage (parse, FcSevereWarning, "unknown pattern element %d",
2980  vstack->tag);
2981  break;
2982  }
2984 
2985  return value;
2986 }
2987 
2988 static void
2990 {
2991  FcValue value;
2993  const char *name;
2994 
2995  if (!pattern)
2996  {
2997  FcConfigMessage (parse, FcSevereError, "out of memory");
2998  return;
2999  }
3000 
3001  name = (char *) FcConfigGetAttribute (parse, "name");
3002  if (!name)
3003  {
3004  FcConfigMessage (parse, FcSevereWarning, "missing pattern element name");
3006  return;
3007  }
3008 
3009  for (;;)
3010  {
3011  value = FcPopValue (parse);
3012  if (value.type == FcTypeVoid)
3013  break;
3014  if (!FcPatternAdd (pattern, name, value, FcTrue))
3015  {
3016  FcConfigMessage (parse, FcSevereError, "out of memory");
3018  break;
3019  }
3021  }
3022 
3024 }
3025 
3026 static void
3028 {
3029  FcVStack *vstack;
3031 
3032  if (!pattern)
3033  {
3034  FcConfigMessage (parse, FcSevereError, "out of memory");
3035  return;
3036  }
3037 
3038  while ((vstack = FcVStackPeek (parse)))
3039  {
3040  switch ((int) vstack->tag) {
3041  case FcVStackPattern:
3042  if (!FcPatternAppend (pattern, vstack->u.pattern))
3043  {
3044  FcConfigMessage (parse, FcSevereError, "out of memory");
3046  return;
3047  }
3048  break;
3049  default:
3050  FcConfigMessage (parse, FcSevereWarning, "unknown pattern element");
3051  break;
3052  }
3054  }
3055 
3057 }
3058 
3059 static void
3061 {
3063  FcChar8 *data;
3064 
3065  if (!parse->pstack)
3066  return;
3067  switch (parse->pstack->element) {
3068  case FcElementNone:
3069  break;
3070  case FcElementFontconfig:
3071  break;
3072  case FcElementDir:
3073  FcParseDir (parse);
3074  break;
3075  case FcElementCacheDir:
3077  break;
3078  case FcElementCache:
3079  data = FcStrBufDoneStatic (&parse->pstack->str);
3080  if (!data)
3081  {
3082  FcConfigMessage (parse, FcSevereError, "out of memory");
3083  break;
3084  }
3085  /* discard this data; no longer used */
3086  FcStrBufDestroy (&parse->pstack->str);
3087  break;
3088  case FcElementInclude:
3090  break;
3091  case FcElementConfig:
3092  break;
3093  case FcElementMatch:
3094  FcParseMatch (parse);
3095  break;
3096  case FcElementAlias:
3097  FcParseAlias (parse);
3098  break;
3099  case FcElementDescription:
3101  break;
3102  case FcElementRemapDir:
3104  break;
3105  case FcElementResetDirs:
3107  break;
3108 
3109  case FcElementRescan:
3110  FcParseRescan (parse);
3111  break;
3112 
3113  case FcElementPrefer:
3115  break;
3116  case FcElementAccept:
3118  break;
3119  case FcElementDefault:
3121  break;
3122  case FcElementFamily:
3123  FcParseFamily (parse);
3124  break;
3125 
3126  case FcElementTest:
3127  FcParseTest (parse);
3128  break;
3129  case FcElementEdit:
3130  FcParseEdit (parse);
3131  break;
3132 
3133  case FcElementInt:
3134  FcParseInt (parse);
3135  break;
3136  case FcElementDouble:
3137  FcParseDouble (parse);
3138  break;
3139  case FcElementString:
3141  break;
3142  case FcElementMatrix:
3143  FcParseMatrix (parse);
3144  break;
3145  case FcElementRange:
3146  FcParseRange (parse);
3147  break;
3148  case FcElementBool:
3149  FcParseBool (parse);
3150  break;
3151  case FcElementCharSet:
3153  break;
3154  case FcElementLangSet:
3156  break;
3157  case FcElementSelectfont:
3158  break;
3159  case FcElementAcceptfont:
3160  case FcElementRejectfont:
3161  FcParseAcceptRejectFont (parse, parse->pstack->element);
3162  break;
3163  case FcElementGlob:
3165  break;
3166  case FcElementPattern:
3168  break;
3169  case FcElementPatelt:
3170  FcParsePatelt (parse);
3171  break;
3172  case FcElementName:
3173  FcParseName (parse);
3174  break;
3175  case FcElementConst:
3177  break;
3178  case FcElementOr:
3180  break;
3181  case FcElementAnd:
3183  break;
3184  case FcElementEq:
3186  break;
3187  case FcElementNotEq:
3189  break;
3190  case FcElementLess:
3192  break;
3193  case FcElementLessEq:
3195  break;
3196  case FcElementMore:
3198  break;
3199  case FcElementMoreEq:
3201  break;
3202  case FcElementContains:
3204  break;
3205  case FcElementNotContains:
3207  break;
3208  case FcElementPlus:
3210  break;
3211  case FcElementMinus:
3213  break;
3214  case FcElementTimes:
3216  break;
3217  case FcElementDivide:
3219  break;
3220  case FcElementNot:
3222  break;
3223  case FcElementIf:
3225  break;
3226  case FcElementFloor:
3228  break;
3229  case FcElementCeil:
3231  break;
3232  case FcElementRound:
3234  break;
3235  case FcElementTrunc:
3237  break;
3238  case FcElementUnknown:
3239  break;
3240  }
3241  (void) FcPStackPop (parse);
3242 }
3243 
3244 static void
3245 FcCharacterData (void *userData, const XML_Char *s, int len)
3246 {
3248 
3249  if (!parse->pstack)
3250  return;
3251  if (!FcStrBufData (&parse->pstack->str, (FcChar8 *) s, len))
3252  FcConfigMessage (parse, FcSevereError, "out of memory");
3253 }
3254 
3255 static void
3257  const XML_Char *doctypeName,
3258  const XML_Char *sysid FC_UNUSED,
3259  const XML_Char *pubid FC_UNUSED,
3260  int has_internal_subset FC_UNUSED)
3261 {
3263 
3264  if (strcmp ((char *) doctypeName, "fontconfig") != 0)
3265  FcConfigMessage (parse, FcSevereError, "invalid doctype \"%s\"", doctypeName);
3266 }
3267 
3268 #ifdef ENABLE_LIBXML2
3269 
3270 static void
3271 FcInternalSubsetDecl (void *userData,
3272  const XML_Char *doctypeName,
3273  const XML_Char *sysid,
3274  const XML_Char *pubid)
3275 {
3276  FcStartDoctypeDecl (userData, doctypeName, sysid, pubid, 1);
3277 }
3278 
3279 static void
3280 FcExternalSubsetDecl (void *userData,
3281  const XML_Char *doctypeName,
3282  const XML_Char *sysid,
3283  const XML_Char *pubid)
3284 {
3285  FcStartDoctypeDecl (userData, doctypeName, sysid, pubid, 0);
3286 }
3287 
3288 #else /* ENABLE_LIBXML2 */
3289 
3290 static void
3292 {
3293 }
3294 
3295 #endif /* ENABLE_LIBXML2 */
3296 
3297 static int
3298 FcSortCmpStr (const void *a, const void *b)
3299 {
3300  const FcChar8 *as = *((FcChar8 **) a);
3301  const FcChar8 *bs = *((FcChar8 **) b);
3302  return FcStrCmp (as, bs);
3303 }
3304 
3305 static FcBool
3307  const FcChar8 *name,
3308  const FcChar8 *dir,
3309  FcBool complain,
3310  FcBool load)
3311 {
3312  DIR *d;
3313  struct dirent *e;
3314  FcBool ret = FcTrue;
3315  FcChar8 *file;
3316  FcChar8 *base;
3317  FcStrSet *files;
3318 
3319  d = opendir ((char *) dir);
3320  if (!d)
3321  {
3322  if (complain)
3323  FcConfigMessage (0, FcSevereError, "Cannot open config dir \"%s\"",
3324  name);
3325  ret = FcFalse;
3326  goto bail0;
3327  }
3328  /* freed below */
3329  file = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + FC_MAX_FILE_LEN + 1);
3330  if (!file)
3331  {
3332  ret = FcFalse;
3333  goto bail1;
3334  }
3335 
3336  strcpy ((char *) file, (char *) dir);
3337  strcat ((char *) file, "/");
3338  base = file + strlen ((char *) file);
3339 
3341  if (!files)
3342  {
3343  ret = FcFalse;
3344  goto bail2;
3345  }
3346 
3347  if (FcDebug () & FC_DBG_CONFIG)
3348  printf ("\tScanning config dir %s\n", dir);
3349 
3350  if (load)
3352 
3353  while (ret && (e = readdir (d)))
3354  {
3355  int d_len;
3356 #define TAIL ".conf"
3357 #define TAIL_LEN 5
3358  /*
3359  * Add all files of the form [0-9]*.conf
3360  */
3361  d_len = strlen (e->d_name);
3362  if ('0' <= e->d_name[0] && e->d_name[0] <= '9' &&
3363  d_len > TAIL_LEN &&
3364  strcmp (e->d_name + d_len - TAIL_LEN, TAIL) == 0)
3365  {
3366  strcpy ((char *) base, (char *) e->d_name);
3367  if (!FcStrSetAdd (files, file))
3368  {
3369  ret = FcFalse;
3370  goto bail3;
3371  }
3372  }
3373  }
3374  if (ret)
3375  {
3376  int i;
3377  qsort (files->strs, files->num, sizeof (FcChar8 *),
3378  (int (*)(const void *, const void *)) FcSortCmpStr);
3379  for (i = 0; ret && i < files->num; i++)
3380  ret = _FcConfigParse (config, files->strs[i], complain, load);
3381  }
3382 bail3:
3384 bail2:
3385  free (file);
3386 bail1:
3387  closedir (d);
3388 bail0:
3389  return ret || !complain;
3390 }
3391 
3392 #ifdef _WIN32
3393 pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory = NULL;
3394 pfnSHGetFolderPathA pSHGetFolderPathA = NULL;
3395 #endif
3396 
3397 static FcBool
3399  const FcChar8 *filename,
3400  const FcChar8 *buffer,
3401  FcBool complain,
3402  FcBool load)
3403 {
3404 
3405  XML_Parser p;
3406  size_t len;
3408  FcBool error = FcTrue;
3409  FcMatchKind k;
3410  FcPtrListIter liter;
3411 
3412 #ifdef ENABLE_LIBXML2
3413  xmlSAXHandler sax;
3414 #else
3415  void *buf;
3416  const FcChar8 *s;
3417  size_t buflen;
3418 #endif
3419 
3420  if (!buffer)
3421  return FcFalse;
3422  len = strlen ((const char *) buffer);
3423  if (FcDebug () & FC_DBG_CONFIG)
3424  printf ("\t%s config file from %s\n", load ? "Loading" : "Scanning", filename);
3425 
3426 #ifdef ENABLE_LIBXML2
3427  memset(&sax, 0, sizeof(sax));
3428 
3429  sax.internalSubset = FcInternalSubsetDecl;
3430  sax.externalSubset = FcExternalSubsetDecl;
3431  sax.startElement = FcStartElement;
3432  sax.endElement = FcEndElement;
3433  sax.characters = FcCharacterData;
3434 
3435  p = xmlCreatePushParserCtxt (&sax, &parse, NULL, 0, (const char *) filename);
3436 #else
3437  p = XML_ParserCreate ("UTF-8");
3438 #endif
3439 
3440  if (!p)
3441  goto bail1;
3442 
3444  goto bail2;
3445 
3446 #ifndef ENABLE_LIBXML2
3447 
3448  XML_SetUserData (p, &parse);
3449 
3453 
3454 #endif /* ENABLE_LIBXML2 */
3455 
3456 #ifndef ENABLE_LIBXML2
3457  s = buffer;
3458  do {
3459  buf = XML_GetBuffer (p, BUFSIZ);
3460  if (!buf)
3461  {
3462  FcConfigMessage (&parse, FcSevereError, "cannot get parse buffer");
3463  goto bail3;
3464  }
3465  if (len > BUFSIZ)
3466  {
3467  buflen = BUFSIZ;
3468  len -= BUFSIZ;
3469  }
3470  else
3471  {
3472  buflen = len;
3473  len = 0;
3474  }
3475  memcpy (buf, s, buflen);
3476  s = s + buflen;
3477 #endif
3478 
3479 #ifdef ENABLE_LIBXML2
3480  if (xmlParseChunk (p, (const char *)buffer, len, len == 0))
3481 #else
3482  if (!XML_ParseBuffer (p, buflen, buflen == 0))
3483 #endif
3484  {
3487  goto bail3;
3488  }
3489 #ifndef ENABLE_LIBXML2
3490  } while (buflen != 0);
3491 #endif
3492  error = parse.error;
3493  if (load)
3494  {
3495  for (k = FcMatchKindBegin; k < FcMatchKindEnd; k++)
3496  {
3497  FcPtrListIter iter;
3498 
3499  FcPtrListIterInit (parse.ruleset->subst[k], &iter);
3500  if (FcPtrListIterIsValid (parse.ruleset->subst[k], &iter))
3501  {
3502  FcPtrListIterInitAtLast (parse.config->subst[k], &iter);
3503  FcRuleSetReference (parse.ruleset);
3504  FcPtrListIterAdd (parse.config->subst[k], &iter, parse.ruleset);
3505  }
3506  }
3507  }
3508  FcPtrListIterInitAtLast (parse.config->rulesetList, &liter);
3509  FcRuleSetReference (parse.ruleset);
3510  FcPtrListIterAdd (parse.config->rulesetList, &liter, parse.ruleset);
3511 bail3:
3513 bail2:
3514  XML_ParserFree (p);
3515 bail1:
3516  if (error && complain)
3517  {
3518  FcConfigMessage (0, FcSevereError, "Cannot %s config file from %s", load ? "load" : "scan", filename);
3519  return FcFalse;
3520  }
3521  if (FcDebug () & FC_DBG_CONFIG)
3522  printf ("\t%s config file from %s done\n", load ? "Loading" : "Scanning", filename);
3523  return FcTrue;
3524 }
3525 
3526 static FcBool
3528  const FcChar8 *name,
3529  FcBool complain,
3530  FcBool load)
3531 {
3532  FcChar8 *filename = NULL, *realfilename = NULL;
3533  int fd;
3534  int len;
3535  FcStrBuf sbuf;
3536  char buf[BUFSIZ];
3537  FcBool ret = FcFalse, complain_again = complain;
3538  FcStrBuf reason;
3539 
3540  FcStrBufInit (&reason, NULL, 0);
3541 #ifdef _WIN32
3542  if (!pGetSystemWindowsDirectory)
3543  {
3544  HMODULE hk32 = GetModuleHandleA("kernel32.dll");
3545  if (!(pGetSystemWindowsDirectory = (pfnGetSystemWindowsDirectory) GetProcAddress(hk32, "GetSystemWindowsDirectoryA")))
3546  pGetSystemWindowsDirectory = (pfnGetSystemWindowsDirectory) GetWindowsDirectory;
3547  }
3548  if (!pSHGetFolderPathA)
3549  {
3550  HMODULE hSh = LoadLibraryA("shfolder.dll");
3551  /* the check is done later, because there is no provided fallback */
3552  if (hSh)
3553  pSHGetFolderPathA = (pfnSHGetFolderPathA) GetProcAddress(hSh, "SHGetFolderPathA");
3554  }
3555 #endif
3556 
3558  if (!filename)
3559  {
3560  FcStrBufString (&reason, (FcChar8 *)"No such file: ");
3561  FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)");
3562  goto bail0;
3563  }
3564  realfilename = FcConfigRealFilename (config, name);
3565  if (!realfilename)
3566  {
3567  FcStrBufString (&reason, (FcChar8 *)"No such realfile: ");
3568  FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)");
3569  goto bail0;
3570  }
3571  if (FcStrSetMember (config->availConfigFiles, realfilename))
3572  {
3573  FcStrFree (filename);
3574  FcStrFree (realfilename);
3575  return FcTrue;
3576  }
3577 
3578  if (load)
3579  {
3580  if (!FcStrSetAdd (config->configFiles, filename))
3581  goto bail0;
3582  }
3583  if (!FcStrSetAdd (config->availConfigFiles, realfilename))
3584  goto bail0;
3585 
3586  if (FcFileIsDir (realfilename))
3587  {
3588  ret = FcConfigParseAndLoadDir (config, name, realfilename, complain, load);
3589  FcStrFree (filename);
3590  FcStrFree (realfilename);
3591  return ret;
3592  }
3593 
3594  FcStrBufInit (&sbuf, NULL, 0);
3595 
3596  fd = FcOpen ((char *) realfilename, O_RDONLY);
3597  if (fd == -1)
3598  {
3599  FcStrBufString (&reason, (FcChar8 *)"Unable to open ");
3600  FcStrBufString (&reason, realfilename);
3601  goto bail1;
3602  }
3603 
3604  do {
3605  len = read (fd, buf, BUFSIZ);
3606  if (len < 0)
3607  {
3608  int errno_ = errno;
3609  char ebuf[BUFSIZ+1];
3610 
3611 #if HAVE_STRERROR_R
3612  strerror_r (errno_, ebuf, BUFSIZ);
3613 #elif HAVE_STRERROR
3614  char *tmp = strerror (errno_);
3615  size_t len = strlen (tmp);
3616  memcpy (ebuf, tmp, FC_MIN (BUFSIZ, len));
3617  ebuf[FC_MIN (BUFSIZ, len)] = 0;
3618 #else
3619  ebuf[0] = 0;
3620 #endif
3621  FcConfigMessage (0, FcSevereError, "failed reading config file: %s: %s (errno %d)", realfilename, ebuf, errno_);
3622  close (fd);
3623  goto bail1;
3624  }
3625  FcStrBufData (&sbuf, (const FcChar8 *)buf, len);
3626  } while (len != 0);
3627  close (fd);
3628 
3630  complain_again = FcFalse; /* no need to reclaim here */
3631 bail1:
3632  FcStrBufDestroy (&sbuf);
3633 bail0:
3634  if (filename)
3635  FcStrFree (filename);
3636  if (realfilename)
3637  FcStrFree (realfilename);
3638  if (!complain)
3639  return FcTrue;
3640  if (!ret && complain_again)
3641  {
3642  if (name)
3643  FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\": %s", load ? "load" : "scan", name, FcStrBufDoneStatic (&reason));
3644  else
3645  FcConfigMessage (0, FcSevereError, "Cannot %s default config file: %s", load ? "load" : "scan", FcStrBufDoneStatic (&reason));
3647  return FcFalse;
3648  }
3650  return ret;
3651 }
3652 
3653 FcBool
3655  const FcChar8 *name,
3656  FcBool complain)
3657 {
3659 }
3660 
3661 FcBool
3663  const FcChar8 *name,
3664  FcBool complain)
3665 {
3667 }
3668 
3669 FcBool
3671  const FcChar8 *buffer,
3672  FcBool complain)
3673 {
3675 }
3676 
3677 #define __fcxml__
3678 #include "fcaliastail.h"
3679 #undef __fcxml__
double __cdecl strtod(char const *_String, char **_EndPtr)
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
#define buflen
Definition: afm2pl.c:181
#define type(a)
Definition: aptex-macros.h:171
#define count(a)
Definition: aptex-macros.h:781
#define mode
Definition: aptex-macros.h:510
#define _double(f)
Definition: aptex-src.c:7850
int rc
Definition: bmpfont.h:9
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define free(a)
Definition: decNumber.cpp:310
char * def
Definition: definitions.c:41
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
char * strncpy()
int strcmp()
Definition: coll.cpp:143
int printf()
char * strcpy()
#define error(a)
Definition: dviinfo.c:48
struct rect data
Definition: dvipdfm.c:64
#define MAX_PATH
Definition: dvispc.c:163
const XML_LChar * XML_ErrorString(enum XML_Error code)
Definition: xmlparse.c:1848
void XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
Definition: xmlparse.c:1214
void XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler)
Definition: xmlparse.c:1235
enum XML_Error XML_GetErrorCode(XML_Parser parser)
Definition: xmlparse.c:1755
void XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)
Definition: xmlparse.c:1293
XML_Parser XML_ParserCreate(const XML_Char *encoding)
Definition: xmlparse.c:658
void * XML_GetBuffer(XML_Parser parser, int len)
Definition: xmlparse.c:1601
void XML_ParserFree(XML_Parser parser)
Definition: xmlparse.c:1082
XML_Size XML_GetCurrentLineNumber(XML_Parser parser)
Definition: xmlparse.c:1790
void XML_SetUserData(XML_Parser parser, void *userData)
Definition: xmlparse.c:1173
enum XML_Status XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
Definition: xmlparse.c:1550
char XML_Char
struct rule_struct rule
Definition: dvistuff.c:785
#define FcNameGetConstant
Definition: fcalias.h:274
#define FcConfigHome
Definition: fcalias.h:28
#define FcCharSetCreate
Definition: fcalias.h:88
#define FcStrSetMember
Definition: fcalias.h:426
#define FcFileIsDir
Definition: fcalias.h:136
#define FcLangSetCreate
Definition: fcalias.h:184
#define FcPatternAdd
Definition: fcalias.h:306
#define FcStrStr
Definition: fcalias.h:406
#define FcStrDirname
Definition: fcalias.h:420
#define FcLangSetCopy
Definition: fcalias.h:188
#define FcPatternCreate
Definition: fcalias.h:282
#define FcLangSetDestroy
Definition: fcalias.h:186
#define FcConfigGetFilename
Definition: fcalias.h:32
#define FcRangeDestroy
Definition: fcalias.h:360
#define FcRangeCreateDouble
Definition: fcalias.h:356
#define FcNameGetObjectType
Definition: fcalias.h:268
#define FcStrCmp
Definition: fcalias.h:402
#define FcStrSetDestroy
Definition: fcalias.h:436
#define FcStrSetAdd
Definition: fcalias.h:430
#define FcLangSetAdd
Definition: fcalias.h:190
#define FcRangeCopy
Definition: fcalias.h:362
#define FcStrBuildFilename
Definition: fcalias.h:418
#define FcNameConstant
Definition: fcalias.h:276
#define FcCharSetCopy
Definition: fcalias.h:98
#define FcPatternDestroy
Definition: fcalias.h:296
#define FcStrFree
Definition: fcalias.h:396
#define FcRangeCreateInteger
Definition: fcalias.h:358
#define FcCharSetDestroy
Definition: fcalias.h:92
#define FcCharSetAddChar
Definition: fcalias.h:94
#define FcValueDestroy
Definition: fcalias.h:290
#define fc_atomic_ptr_get(P)
Definition: fcatomic.h:121
#define fc_atomic_ptr_cmpexch(P, O, N)
Definition: fcatomic.h:122
void FcRuleSetEnable(FcRuleSet *rs, FcBool flag)
Definition: fccfg.c:3112
FcChar8 * FcConfigXdgCacheHome(void)
Definition: fccfg.c:2564
void FcRuleSetReference(FcRuleSet *rs)
Definition: fccfg.c:3105
FcBool FcConfigGlobAdd(FcConfig *config, const FcChar8 *glob, FcBool accept)
Definition: fccfg.c:2917
void FcRuleSetAddDescription(FcRuleSet *rs, const FcChar8 *domain, const FcChar8 *description)
Definition: fccfg.c:3126
FcBool FcConfigPatternsAdd(FcConfig *config, FcPattern *pattern, FcBool accept)
Definition: fccfg.c:2954
FcBool FcConfigAddConfigDir(FcConfig *config, const FcChar8 *d)
Definition: fccfg.c:629
FcBool FcConfigResetFontDirs(FcConfig *config)
Definition: fccfg.c:670
FcBool FcConfigAddFontDir(FcConfig *config, const FcChar8 *d, const FcChar8 *m, const FcChar8 *salt)
Definition: fccfg.c:650
FcChar8 * FcConfigXdgConfigHome(void)
Definition: fccfg.c:2592
FcRuleSet * FcRuleSetCreate(const FcChar8 *name)
Definition: fccfg.c:3058
int FcRuleSetAdd(FcRuleSet *rs, FcRule *rule, FcMatchKind kind)
Definition: fccfg.c:3140
FcBool FcConfigAddCacheDir(FcConfig *config, const FcChar8 *d)
Definition: fccfg.c:768
FcExpr * FcConfigAllocExpr(FcConfig *config)
Definition: fccfg.c:334
FcChar8 * FcConfigRealFilename(FcConfig *config, const FcChar8 *url)
Definition: fccfg.c:2747
void FcRuleSetDestroy(FcRuleSet *rs)
Definition: fccfg.c:3083
FcChar8 * FcConfigXdgDataHome(void)
Definition: fccfg.c:2620
int FcOpen(const char *pathname, int flags,...)
Definition: fccompat.c:127
FcBool FcMakeDirectory(const FcChar8 *dir)
Definition: fccompat.c:256
FcObject field
Definition: fcdefault.c:32
FcBool FcFileIsLink(const FcChar8 *file)
Definition: fcdir.c:42
FcBool FcFileIsFile(const FcChar8 *file)
Definition: fcdir.c:56
FcBool FcStrBufData(FcStrBuf *buf, const FcChar8 *s, int len)
Definition: fcstr.c:937
FcStrSet * FcStrSetCreateEx(unsigned int control)
Definition: fcstr.c:1250
@ FcOpFlagIgnoreBlanks
Definition: fcint.h:262
FcObject FcObjectFromName(const char *name)
Definition: fcname.c:107
void FcStrBufInit(FcStrBuf *buf, FcChar8 *init, int size)
Definition: fcstr.c:833
#define FC_MIN(a, b)
Definition: fcint.h:119
@ FcOpFloor
Definition: fcint.h:257
@ FcOpMoreEqual
Definition: fcint.h:255
@ FcOpString
Definition: fcint.h:246
@ FcOpComma
Definition: fcint.h:257
@ FcOpMatrix
Definition: fcint.h:246
@ FcOpDelete
Definition: fcint.h:251
@ FcOpLessEqual
Definition: fcint.h:255
@ FcOpAnd
Definition: fcint.h:253
@ FcOpCeil
Definition: fcint.h:257
@ FcOpMore
Definition: fcint.h:255
@ FcOpNot
Definition: fcint.h:257
@ FcOpNotEqual
Definition: fcint.h:253
@ FcOpListing
Definition: fcint.h:254
@ FcOpDivide
Definition: fcint.h:256
@ FcOpAppend
Definition: fcint.h:250
@ FcOpPrepend
Definition: fcint.h:250
@ FcOpAssignReplace
Definition: fcint.h:249
@ FcOpRange
Definition: fcint.h:246
@ FcOpConst
Definition: fcint.h:248
@ FcOpNotContains
Definition: fcint.h:254
@ FcOpPlus
Definition: fcint.h:256
@ FcOpCharSet
Definition: fcint.h:246
@ FcOpAppendLast
Definition: fcint.h:250
@ FcOpInvalid
Definition: fcint.h:258
@ FcOpOr
Definition: fcint.h:253
@ FcOpDeleteAll
Definition: fcint.h:251
@ FcOpQuest
Definition: fcint.h:252
@ FcOpDouble
Definition: fcint.h:246
@ FcOpEqual
Definition: fcint.h:253
@ FcOpPrependFirst
Definition: fcint.h:250
@ FcOpBool
Definition: fcint.h:246
@ FcOpMinus
Definition: fcint.h:256
@ FcOpNil
Definition: fcint.h:247
@ FcOpTimes
Definition: fcint.h:256
@ FcOpField
Definition: fcint.h:248
@ FcOpTrunc
Definition: fcint.h:257
@ FcOpAssign
Definition: fcint.h:249
@ FcOpLangSet
Definition: fcint.h:246
@ FcOpInteger
Definition: fcint.h:246
@ FcOpContains
Definition: fcint.h:254
@ FcOpLess
Definition: fcint.h:255
@ FcOpRound
Definition: fcint.h:257
#define FC_DIR_SEPARATOR
Definition: fcint.h:79
FcBool FcNameBool(const FcChar8 *v, FcBool *result)
Definition: fcname.c:263
#define FCSS_GROW_BY_64
Definition: fcint.h:385
enum _FcRuleType FcRuleType
FcBool FcPtrListIterIsValid(const FcPtrList *list, const FcPtrListIter *iter)
Definition: fcptrlist.c:113
FcBool FcStrUsesHome(const FcChar8 *s)
Definition: fcstr.c:946
void FcPtrListIterInit(const FcPtrList *list, FcPtrListIter *iter)
Definition: fcptrlist.c:72
#define FcMatchDefault
Definition: fcint.h:317
FcChar8 * FcStrBufDone(FcStrBuf *buf)
Definition: fcstr.c:860
#define FcFree(s)
Definition: fcint.h:147
@ FcRuleEdit
Definition: fcint.h:345
@ FcRuleUnknown
Definition: fcint.h:345
@ FcRuleTest
Definition: fcint.h:345
void FcStrBufDestroy(FcStrBuf *buf)
Definition: fcstr.c:850
FcBool FcPtrListIterAdd(FcPtrList *list, FcPtrListIter *iter, void *data)
Definition: fcptrlist.c:135
#define FC_UNUSED
Definition: fcint.h:95
#define FC_OP(_x_, _f_)
Definition: fcint.h:267
FcBool FcPatternAppend(FcPattern *p, FcPattern *s)
Definition: fcpat.c:1271
enum _FcQual FcQual
int FcObject
Definition: fcint.h:206
enum _FcOp FcOp
FcChar8 * FcStrBufDoneStatic(FcStrBuf *buf)
Definition: fcstr.c:878
@ FcQualNotFirst
Definition: fcint.h:314
@ FcQualAny
Definition: fcint.h:314
@ FcQualAll
Definition: fcint.h:314
@ FcQualFirst
Definition: fcint.h:314
#define FC_DBG_CONFIG
Definition: fcint.h:111
FcBool FcStrIsAbsoluteFilename(const FcChar8 *s)
Definition: fcstr.c:952
const char * FcObjectName(FcObject object)
Definition: fcname.c:127
#define FC_MAX_FILE_LEN
Definition: fcint.h:510
#define FcStrdup(s)
Definition: fcint.h:146
FcBool FcStrBufString(FcStrBuf *buf, const FcChar8 *s)
Definition: fcstr.c:927
#define FC_OP_GET_OP(_x_)
Definition: fcint.h:265
#define FcDebug()
Definition: fcint.h:899
void FcPtrListIterInitAtLast(FcPtrList *list, FcPtrListIter *iter)
Definition: fcptrlist.c:83
#define FC_MAX_BASE_OBJECT
Definition: fcint.h:1051
static FcValue FcPopValue(FcConfigParse *parse)
Definition: fcxml.c:2931
static const char * fcElementIgnoreName[16]
Definition: fcxml.c:481
static FcBool FcConfigLexBool(FcConfigParse *parse, const FcChar8 *bool_)
Definition: fcxml.c:1689
static void FcStartElement(void *userData, const XML_Char *name, const XML_Char **attr)
Definition: fcxml.c:1396
static void FcStartDoctypeDecl(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset)
Definition: fcxml.c:3256
static const FcOpMap fcCompareOps[]
Definition: fcxml.c:2617
static void FcParseInclude(FcConfigParse *parse)
Definition: fcxml.c:2426
static void FcEndElement(void *userData, const XML_Char *name)
Definition: fcxml.c:3060
void FcEditDestroy(FcEdit *e)
Definition: fcxml.c:346
static void FcParsePattern(FcConfigParse *parse)
Definition: fcxml.c:3027
static void FcParseRescan(FcConfigParse *parse)
Definition: fcxml.c:1414
static void FcCharacterData(void *userData, const XML_Char *s, int len)
Definition: fcxml.c:3245
static FcBool FcConfigParseInit(FcConfigParse *parse, const FcChar8 *name, FcConfig *config, XML_Parser parser, FcBool enabled)
Definition: fcxml.c:1235
void FcConfigPathFini(void)
Definition: fcxml.c:2408
static void FcParseAlias(FcConfigParse *parse)
Definition: fcxml.c:1884
static void FcParsePatelt(FcConfigParse *parse)
Definition: fcxml.c:2989
static FcBool FcVStackPushName(FcConfigParse *parse, FcMatchKind kind, FcObject object)
Definition: fcxml.c:978
static void FcParseMatch(FcConfigParse *parse)
Definition: fcxml.c:2811
static FcElement FcElementMap(const XML_Char *name)
Definition: fcxml.c:487
static const char * FcElementReverseMap(FcElement e)
Definition: fcxml.c:501
static FcBool FcVStackPushPattern(FcConfigParse *parse, FcPattern *pattern)
Definition: fcxml.c:1023
static FcExpr * FcExprCreateOp(FcConfig *config, FcExpr *left, FcOp op, FcExpr *right)
Definition: fcxml.c:258
static FcChar8 * __fc_userdir
Definition: fcxml.c:64
static void FcParseAcceptRejectFont(FcConfigParse *parse, FcElement element)
Definition: fcxml.c:2884
_FcVStackTag
Definition: fcxml.c:521
@ FcVStackName
Definition: fcxml.c:528
@ FcVStackAccept
Definition: fcxml.c:532
@ FcVStackMatrix
Definition: fcxml.c:537
@ FcVStackTest
Definition: fcxml.c:543
@ FcVStackString
Definition: fcxml.c:524
@ FcVStackGlob
Definition: fcxml.c:527
@ FcVStackDouble
Definition: fcxml.c:536
@ FcVStackBool
Definition: fcxml.c:539
@ FcVStackEdit
Definition: fcxml.c:545
@ FcVStackRange
Definition: fcxml.c:538
@ FcVStackPattern
Definition: fcxml.c:529
@ FcVStackConstant
Definition: fcxml.c:526
@ FcVStackLangSet
Definition: fcxml.c:541
@ FcVStackPrefer
Definition: fcxml.c:531
@ FcVStackFamily
Definition: fcxml.c:525
@ FcVStackCharSet
Definition: fcxml.c:540
@ FcVStackNone
Definition: fcxml.c:522
@ FcVStackDefault
Definition: fcxml.c:533
@ FcVStackInteger
Definition: fcxml.c:535
@ FcVStackExpr
Definition: fcxml.c:544
static FcBool FcConfigParseAndLoadDir(FcConfig *config, const FcChar8 *name, const FcChar8 *dir, FcBool complain, FcBool load)
Definition: fcxml.c:3306
static void FcParseDir(FcConfigParse *parse)
Definition: fcxml.c:2250