aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--X11/extensions/randrproto.txt2
-rw-r--r--fontconfig/fc-cache/fc-cache.c10
-rw-r--r--fontconfig/fontconfig/fontconfig.h3
-rw-r--r--fontconfig/src/fccache.c13
-rw-r--r--fontconfig/src/fcdir.c46
-rw-r--r--fontconfig/src/fcfs.c22
-rw-r--r--fontconfig/src/fcint.h6
-rw-r--r--fontconfig/src/fcpat.c2
-rw-r--r--libX11/src/XlibInt.c33
-rw-r--r--libX11/src/xkb/XKB.c3
-rw-r--r--libX11/src/xkb/XKBGeom.c2
11 files changed, 101 insertions, 41 deletions
diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt
index f82407c30..bf70d69d6 100644
--- a/X11/extensions/randrproto.txt
+++ b/X11/extensions/randrproto.txt
@@ -108,7 +108,7 @@ instead it provides a mechanism to find out what combinations are supported.
1.3 Introduction to version 1.3 of the extension
Version 1.3 builds on the changes made with version 1.2 and adds some new
-capabilities without fundmentally changing the extension again. The
+capabilities without fundamentally changing the extension again. The
following features are added in this version:
• Projective Transforms. The implementation work for general rotation
diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c
index bf3b6b482..99e0e9f42 100644
--- a/fontconfig/fc-cache/fc-cache.c
+++ b/fontconfig/fc-cache/fc-cache.c
@@ -187,8 +187,13 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
if (!cache)
{
- (*changed)++;
- cache = FcDirCacheRead (dir, FcTrue, config);
+ if (!recursive)
+ cache = FcDirCacheRescan (dir, config);
+ else
+ {
+ (*changed)++;
+ cache = FcDirCacheRead (dir, FcTrue, config);
+ }
if (!cache)
{
fprintf (stderr, "%s: error scanning\n", dir);
@@ -386,6 +391,7 @@ main (int argc, char **argv)
ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL);
FcStrListDone (list);
}
+ FcStrSetDestroy (updateDirs);
/*
* Try to create CACHEDIR.TAG anyway.
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index dfc48f9e3..1a283a1ce 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -541,6 +541,9 @@ FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
FcPublic FcCache *
FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file);
+
+FcPublic FcCache *
+FcDirCacheRescan (const FcChar8 *dir, FcConfig *config);
FcPublic FcCache *
FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config);
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index 10eacffdf..5173e0be2 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -828,6 +828,19 @@ bail1:
return NULL;
}
+FcCache *
+FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs)
+{
+ FcCache *new;
+ FcFontSet *set = FcFontSetDeserialize (FcCacheSet (cache));
+ const FcChar8 *dir = FcCacheDir (cache);
+
+ new = FcDirCacheBuild (set, dir, dir_stat, dirs);
+ FcFontSetDestroy (set);
+
+ return new;
+}
+
/* write serialized state to the cache file */
FcBool
FcDirCacheWrite (FcCache *cache, FcConfig *config)
diff --git a/fontconfig/src/fcdir.c b/fontconfig/src/fcdir.c
index b040a285a..3bcd0b867 100644
--- a/fontconfig/src/fcdir.c
+++ b/fontconfig/src/fcdir.c
@@ -130,7 +130,12 @@ FcFileScanConfig (FcFontSet *set,
if (FcFileIsDir (file))
return FcStrSetAdd (dirs, file);
else
- return FcFileScanFontConfig (set, blanks, file, config);
+ {
+ if (set)
+ return FcFileScanFontConfig (set, blanks, file, config);
+ else
+ return FcTrue;
+ }
}
FcBool
@@ -306,6 +311,45 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
return cache;
}
+FcCache *
+FcDirCacheRescan (const FcChar8 *dir, FcConfig *config)
+{
+ FcCache *cache = FcDirCacheLoad (dir, config, NULL);
+ FcCache *new = NULL;
+ struct stat dir_stat;
+ FcStrSet *dirs;
+
+ if (!cache)
+ return NULL;
+ if (FcStatChecksum (dir, &dir_stat) < 0)
+ goto bail;
+ dirs = FcStrSetCreate ();
+ if (!dirs)
+ goto bail;
+
+ /*
+ * Scan the dir
+ */
+ if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config))
+ goto bail1;
+ /*
+ * Rebuild the cache object
+ */
+ new = FcDirCacheRebuild (cache, &dir_stat, dirs);
+ if (!new)
+ goto bail1;
+ FcDirCacheUnload (cache);
+ /*
+ * Write out the cache file, ignoring any troubles
+ */
+ FcDirCacheWrite (new, config);
+
+bail1:
+ FcStrSetDestroy (dirs);
+bail:
+ return new;
+}
+
/*
* Read (or construct) the cache for a directory
*/
diff --git a/fontconfig/src/fcfs.c b/fontconfig/src/fcfs.c
index 941abba8f..21c6c7cbb 100644
--- a/fontconfig/src/fcfs.c
+++ b/fontconfig/src/fcfs.c
@@ -122,6 +122,28 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s)
return s_serialize;
}
+
+FcFontSet *
+FcFontSetDeserialize (const FcFontSet *set)
+{
+ int i;
+ FcFontSet *new = FcFontSetCreate ();
+
+ if (!new)
+ return NULL;
+ for (i = 0; i < set->nfont; i++)
+ {
+ if (!FcFontSetAdd (new, FcPatternDuplicate (FcFontSetFont (set, i))))
+ goto bail;
+ }
+
+ return new;
+bail:
+ FcFontSetDestroy (new);
+
+ return NULL;
+}
+
#define __fcfs__
#include "fcaliastail.h"
#undef __fcfs__
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index 362ea6f99..cdf2daba0 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -567,6 +567,9 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
FcPrivate FcCache *
FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
+FcPrivate FcCache *
+FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs);
+
FcPrivate FcBool
FcDirCacheWrite (FcCache *cache, FcConfig *config);
@@ -838,6 +841,9 @@ FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
FcPrivate FcFontSet *
FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
+FcPrivate FcFontSet *
+FcFontSetDeserialize (const FcFontSet *set);
+
/* fchash.c */
FcPrivate FcChar8 *
FcHashGetSHA256Digest (const FcChar8 *input_strings,
diff --git a/fontconfig/src/fcpat.c b/fontconfig/src/fcpat.c
index 0614ac2c2..986cca391 100644
--- a/fontconfig/src/fcpat.c
+++ b/fontconfig/src/fcpat.c
@@ -33,6 +33,7 @@ FcPatternCreate (void)
p = (FcPattern *) malloc (sizeof (FcPattern));
if (!p)
return 0;
+ memset (p, 0, sizeof (FcPattern));
p->num = 0;
p->size = 0;
p->elts_offset = FcPtrToOffset (p, NULL);
@@ -1310,6 +1311,7 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
}
return head_serialized;
}
+
#define __fcpat__
#include "fcaliastail.h"
#include "fcftaliastail.h"
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c
index 7521f12ad..a5350e953 100644
--- a/libX11/src/XlibInt.c
+++ b/libX11/src/XlibInt.c
@@ -74,27 +74,6 @@ xthread_t (*_Xthread_self_fn)(void) = NULL;
#endif /* XTHREADS */
-/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
- * systems are broken and return EWOULDBLOCK when they should return EAGAIN
- */
-#ifdef WIN32
-#define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK)
-#else
-#ifdef __CYGWIN__ /* Cygwin uses ENOBUFS to signal socket is full */
-#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS)
-#else
-#if defined(EAGAIN) && defined(EWOULDBLOCK)
-#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK)
-#else
-#ifdef EAGAIN
-#define ETEST() (errno == EAGAIN)
-#else
-#define ETEST() (errno == EWOULDBLOCK)
-#endif /* EAGAIN */
-#endif /* EAGAIN && EWOULDBLOCK */
-#endif /* __CYGWIN__ */
-#endif /* WIN32 */
-
#ifdef WIN32
#define ECHECK(err) (WSAGetLastError() == err)
#define ESET(val) WSASetLastError(val)
@@ -108,18 +87,6 @@ xthread_t (*_Xthread_self_fn)(void) = NULL;
#endif
#endif
-#if defined(LOCALCONN) || defined(LACHMAN)
-#ifdef EMSGSIZE
-#define ESZTEST() (ECHECK(EMSGSIZE) || ECHECK(ERANGE))
-#else
-#define ESZTEST() ECHECK(ERANGE)
-#endif
-#else
-#ifdef EMSGSIZE
-#define ESZTEST() ECHECK(EMSGSIZE)
-#endif
-#endif
-
#ifdef __UNIXOS2__
#include <limits.h>
#define MAX_PATH _POSIX_PATH_MAX
diff --git a/libX11/src/xkb/XKB.c b/libX11/src/xkb/XKB.c
index 8a9795982..6413ba274 100644
--- a/libX11/src/xkb/XKB.c
+++ b/libX11/src/xkb/XKB.c
@@ -169,9 +169,6 @@ XkbSelectEventDetails(Display *dpy,
/* doesn't. Make sure that we always request the stuff */
/* that the implicit support needs, and just filter out anything */
/* the client doesn't want later */
- req->affectWhich = 0;
- req->selectAll = 0;
- req->clear = 0;
req->affectMap = (CARD16) affect;
req->map = (CARD16) details | (XkbAllClientInfoMask & affect);
req->affectWhich = XkbMapNotifyMask;
diff --git a/libX11/src/xkb/XKBGeom.c b/libX11/src/xkb/XKBGeom.c
index 6a1c74a4f..feaaab6f8 100644
--- a/libX11/src/xkb/XKBGeom.c
+++ b/libX11/src/xkb/XKBGeom.c
@@ -476,9 +476,9 @@ _XkbReadGeomOverlay(XkbReadBufferPtr buf,
if (rowWire == NULL)
return BadLength;
row = XkbAddGeomOverlayRow(ol, rowWire->rowUnder, rowWire->nKeys);
- row->row_under = rowWire->rowUnder;
if (!row)
return BadAlloc;
+ row->row_under = rowWire->rowUnder;
if (rowWire->nKeys < 1)
continue;
keyWire = (xkbOverlayKeyWireDesc *)