X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=src%2Ffcxml.c;h=a9453ebc0b01b31187320bcd5b08057836affe86;hb=9419bb34f6eac685fcf957faf6a38a5cdfa811d9;hp=d91e52275161bab71913ac24bb3c12b0e6b44e4c;hpb=822ec78c54a24a0f1589154ac2d4906b02b111ef;p=fontconfig.git diff --git a/src/fcxml.c b/src/fcxml.c index d91e522..a9453eb 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -545,6 +545,8 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type) if ((value == FcTypeLangSet && type == FcTypeString) || (value == FcTypeString && type == FcTypeLangSet)) return; + if (type == (FcType) -1) + return; FcConfigMessage (parse, FcSevereWarning, "saw %s, expected %s", FcTypeName (value), FcTypeName (type)); } @@ -2279,6 +2281,14 @@ FcEndDoctypeDecl (void *userData) #endif /* ENABLE_LIBXML2 */ +static int +FcSortCmpStr (const void *a, const void *b) +{ + const FcChar8 *as = *((FcChar8 **) a); + const FcChar8 *bs = *((FcChar8 **) b); + return FcStrCmp (as, bs); +} + static FcBool FcConfigParseAndLoadDir (FcConfig *config, const FcChar8 *name, @@ -2348,7 +2358,7 @@ FcConfigParseAndLoadDir (FcConfig *config, { int i; qsort (files->strs, files->num, sizeof (FcChar8 *), - (int (*)(const void *, const void *)) FcStrCmp); + (int (*)(const void *, const void *)) FcSortCmpStr); for (i = 0; ret && i < files->num; i++) ret = FcConfigParseAndLoad (config, files->strs[i], complain); } @@ -2491,3 +2501,6 @@ bail0: } return FcTrue; } +#define __fcxml__ +#include "fcaliastail.h" +#undef __fcxml__