diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-09-09 21:21:01 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2006-09-09 21:21:01 -0700 |
commit | 9419bb34f6eac685fcf957faf6a38a5cdfa811d9 (patch) | |
tree | 7c2004c72d4ff4fdf3d9a054411d0891848ce244 | |
parent | 248b5903b7057b3c44ea1cd3a9b0d27624eba24a (diff) |
Fix conf.d directory sorting.
Sort was using broken comparison function.
-rw-r--r-- | src/fcxml.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fcxml.c b/src/fcxml.c index 4087183..a9453eb 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -2281,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, @@ -2350,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); } |