X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=src%2Ffclist.c;h=61034089f181a98d731d95cb7c6a19985dddd1f5;hb=3074a73b418b40135d4a4f4e0713fcf987d34795;hp=c0b7fb0cdfc1b7a2af8b8af3a085687421e12bf4;hpb=7ce196733129b0e664c1bdc20f973f15167292f7;p=fontconfig.git diff --git a/src/fclist.c b/src/fclist.c index c0b7fb0..6103408 100644 --- a/src/fclist.c +++ b/src/fclist.c @@ -1,5 +1,5 @@ /* - * $RCSId: xc/lib/fontconfig/src/fclist.c,v 1.11tsi Exp $ + * fontconfig/src/fclist.c * * Copyright © 2000 Keith Packard * @@ -13,9 +13,9 @@ * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR @@ -457,6 +457,7 @@ FcFontSetList (FcConfig *config, FcListHashTable table; int i; FcListBucket *bucket; + int destroy_os = 0; if (!config) { @@ -468,6 +469,13 @@ FcFontSetList (FcConfig *config, goto bail0; } FcListHashTableInit (&table); + + if (!os) + { + os = FcObjectGetSet (); + destroy_os = 1; + } + /* * Walk all available fonts adding those that * match to the hash table @@ -532,6 +540,8 @@ bail2: bail1: FcListHashTableCleanup (&table); bail0: + if (destroy_os) + FcObjectSetDestroy (os); return 0; } @@ -545,6 +555,9 @@ FcFontList (FcConfig *config, if (!config) { + if (!FcInitBringUptoDate ()) + return 0; + config = FcConfigGetCurrent (); if (!config) return 0; @@ -556,3 +569,6 @@ FcFontList (FcConfig *config, sets[nsets++] = config->fonts[FcSetApplication]; return FcFontSetList (config, sets, nsets, p, os); } +#define __fclist__ +#include "fcaliastail.h" +#undef __fclist__