From f7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 7 Nov 2013 08:21:08 +0100 Subject: xextproto fontconfig libxcb mesa xserver git update 7 Nov 2013 xserver commit ab4b1fb38a61feb73d8336cc7a3399eb9d3d25be libxcb commit e4e0c6eec861f4c69da12060dc8dbe7a63fa5eb6 libxcb/xcb-proto commit 530817c5a926f006d8d61f9dcfd9ab73269a9805 xextproto commit 3f355f138d6df57e067458a20f47307883048adb fontconfig commit a4443e64c89256087d40462cfbb482950873e366 mesa commit 110009302bddb4c42a5b3ed5ca451d6bb50a06a0 --- fontconfig/fc-cache/fc-cache.c | 26 ++++++++++++++++++-------- fontconfig/fc-glyphname/fc-glyphname.c | 2 +- fontconfig/fc-lang/fc-lang.c | 2 +- fontconfig/src/fcname.c | 2 ++ fontconfig/src/fcstr.c | 8 ++++++-- 5 files changed, 28 insertions(+), 12 deletions(-) (limited to 'fontconfig') diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c index af7ba6dd6..27c751304 100644 --- a/fontconfig/fc-cache/fc-cache.c +++ b/fontconfig/fc-cache/fc-cache.c @@ -118,7 +118,7 @@ usage (char *program, int error) static FcStrSet *processed_dirs; static int -scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed) +scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed, FcStrSet *updateDirs) { int ret = 0; const FcChar8 *dir; @@ -137,7 +137,10 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, { if (verbose) { - printf ("%s: ", dir); + if (!recursive) + printf ("Re-scanning %s: ", dir); + else + printf ("%s: ", dir); fflush (stdout); } @@ -226,6 +229,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, } for (i = 0; i < FcCacheNumSubdir (cache); i++) FcStrSetAdd (subdirs, FcCacheSubdir (cache, i)); + if (updateDirs && FcCacheNumSubdir (cache) > 0) + FcStrSetAdd (updateDirs, dir); FcDirCacheUnload (cache); @@ -238,7 +243,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, continue; } FcStrSetAdd (processed_dirs, dir); - ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed); + ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed, updateDirs); FcStrListDone (sublist); } else @@ -271,7 +276,7 @@ cleanCacheDirectories (FcConfig *config, FcBool verbose) int main (int argc, char **argv) { - FcStrSet *dirs; + FcStrSet *dirs, *updateDirs; FcStrList *list; FcBool verbose = FcFalse; FcBool force = FcFalse; @@ -369,13 +374,18 @@ main (int argc, char **argv) fprintf(stderr, "Cannot malloc\n"); return 1; } - + + updateDirs = FcStrSetCreate (); changed = 0; - ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed); + ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed, updateDirs); /* Update the directory cache again to avoid the race condition as much as possible */ - FcStrListFirst (list); - ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed); FcStrListDone (list); + list = FcStrListCreate (updateDirs); + if (list) + { + ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL); + FcStrListDone (list); + } /* * Try to create CACHEDIR.TAG anyway. diff --git a/fontconfig/fc-glyphname/fc-glyphname.c b/fontconfig/fc-glyphname/fc-glyphname.c index 840278164..078490ae4 100644 --- a/fontconfig/fc-glyphname/fc-glyphname.c +++ b/fontconfig/fc-glyphname/fc-glyphname.c @@ -233,7 +233,7 @@ dump (FcGlyphName * const *table, const char *name) int main (int argc FC_UNUSED, char **argv) { - char *files[MAX_GLYPHFILE]; + char *files[MAX_GLYPHFILE + 1]; char line[1024]; FILE *f; int i; diff --git a/fontconfig/fc-lang/fc-lang.c b/fontconfig/fc-lang/fc-lang.c index 0f4217f78..38fc69735 100644 --- a/fontconfig/fc-lang/fc-lang.c +++ b/fontconfig/fc-lang/fc-lang.c @@ -254,7 +254,7 @@ static int compare (const void *a, const void *b) int main (int argc FC_UNUSED, char **argv) { - static Entry entries[MAX_LANG]; + static Entry entries[MAX_LANG + 1]; static FcCharSet *sets[MAX_LANG]; static int duplicate[MAX_LANG]; static int country[MAX_LANG]; diff --git a/fontconfig/src/fcname.c b/fontconfig/src/fcname.c index 712b2fad3..f302948dd 100644 --- a/fontconfig/src/fcname.c +++ b/fontconfig/src/fcname.c @@ -420,6 +420,8 @@ FcNameParse (const FcChar8 *name) if ((c = FcNameGetConstant (save))) { t = FcNameGetObjectType ((char *) c->object); + if (t == NULL) + goto bail2; switch ((int) t->type) { case FcTypeInteger: case FcTypeDouble: diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c index 570717243..024dae325 100644 --- a/fontconfig/src/fcstr.c +++ b/fontconfig/src/fcstr.c @@ -924,12 +924,16 @@ FcStrBuildFilename (const FcChar8 *path, ...) { va_list ap; - FcStrSet *sset = FcStrSetCreate (); + FcStrSet *sset; FcStrList *list; FcChar8 *s, *ret = NULL, *p; size_t len = 0; - if (!sset || !path) + if (!path) + return NULL; + + sset = FcStrSetCreate (); + if (!sset) return NULL; if (!FcStrSetAdd (sset, path)) -- cgit v1.2.3