diff options
author | marha <marha@users.sourceforge.net> | 2013-08-26 09:04:58 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-08-26 09:04:58 +0200 |
commit | 5ee5b91b019005aa27273dff01388a68c12be293 (patch) | |
tree | d2db8b0d1533d2eea8bfe77f8a6b3d52fa3f633e /fontconfig/src | |
parent | 854ec4da20ddff9b830be0a7d5b81d8cb4774132 (diff) | |
download | vcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.tar.gz vcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.tar.bz2 vcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.zip |
xserver mesa fontconfig libX11 libxcb libxcb/xcb-proto xkeyboard-config git update 26 Aug 2013
xserver commit e01a3f65d3e6d92f92ef2992b338cc9625bde082
libxcb commit c52f2891b43ae77008f63700982f800371458f4d
libxcb/xcb-proto commit bd7708ac1037e647b094fa7440ebb6171b9bc75f
xkeyboard-config commit 77026e8c59cc64856180452c5f89be86928fea7c
libX11 commit e9b14d10d0258bfcc273ff8bc84cd349dccda62c
libXdmcp commit 66514a4af7eaa47e8718434356d7efce95e570cf
libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4
libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a
libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff
libXau commit 899790011304c4029e15abf410e49ce7cec17e0a
xkbcomp commit 0ebdf47fd4bc434ac3d2339544c022a869510738
pixman commit 3518a0dafa63098d41e466f73d105b7e3e4b12de
xextproto commit f27fcc99d1cf935cc289933326f7d3baacd5107a
randrproto commit ca7cc541c2e43e6c784df19b4583ac35829d2f72
glproto commit 8e3407e02980d088e20041e79bdcdd3737e7827e
mkfontscale commit f48de13423c7300f4da9f61993b624426b38ddc0
xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13
libXft commit c5e760a239afc62a1c75e0509868e35957c8df52
libXmu commit d5dac08d65c4865f311cb62c161dbb1300eecd11
libxtrans commit f6a161f2a003f4da0a2e414b4faa0ee0de0c01f0
fontconfig commit fba9efecd2ef3aca84e0a4806899c09ba95f4c19
mesa commit 7fa18774bd9d0e97a82ee9b7dfce8fc5a1041c3a
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/fcarch.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fcarch.h | 2 | ||||
-rw-r--r-- | fontconfig/src/fccfg.c | 52 | ||||
-rw-r--r-- | fontconfig/src/fcint.h | 5 | ||||
-rw-r--r-- | fontconfig/src/fcxml.c | 7 |
5 files changed, 36 insertions, 32 deletions
diff --git a/fontconfig/src/fcarch.c b/fontconfig/src/fcarch.c index 35734c021..21516ff05 100644 --- a/fontconfig/src/fcarch.c +++ b/fontconfig/src/fcarch.c @@ -49,7 +49,7 @@ FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcStrSet *)); FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcCharLeaf **)); FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcChar16 *)); -FC_ASSERT_STATIC (0x08 + 1*FC_MAX(4,ALIGNOF_DOUBLE) == sizeof (FcValue)); +FC_ASSERT_STATIC (0x08 + 1*FC_MAX(SIZEOF_VOID_P,ALIGNOF_DOUBLE) == sizeof (FcValue)); FC_ASSERT_STATIC (0x00 + 2*SIZEOF_VOID_P == sizeof (FcPatternElt)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcPattern)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcCharSet)); diff --git a/fontconfig/src/fcarch.h b/fontconfig/src/fcarch.h index cf7fd3c9f..049a5b02b 100644 --- a/fontconfig/src/fcarch.h +++ b/fontconfig/src/fcarch.h @@ -33,7 +33,7 @@ * and on 32bit ones, whether double is aligned to one word or two words. * Those result in the 6 formats listed below. * - * If any of the assertion errors in fccache.c fail, you need to add a new + * If any of the assertion errors in fcarch.c fail, you need to add a new * architecture. Contact the fontconfig mailing list in that case. * * name endianness pointer-size double-alignment diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c index be738d53d..b88095bc6 100644 --- a/fontconfig/src/fccfg.c +++ b/fontconfig/src/fccfg.c @@ -649,8 +649,10 @@ FcConfigAddRule (FcConfig *config, { FcSubst *subst, **prev; FcRule *r; - int num; + int n = 0; + if (!rule) + return FcFalse; switch (kind) { case FcMatchPattern: prev = &config->substPattern; @@ -671,7 +673,6 @@ FcConfigAddRule (FcConfig *config, *prev = subst; subst->next = NULL; subst->rule = rule; - num = 0; for (r = rule; r; r = r->next) { switch (r->type) @@ -680,19 +681,21 @@ FcConfigAddRule (FcConfig *config, if (r->u.test && r->u.test->kind == FcMatchDefault) r->u.test->kind = kind; - if (r->u.test->object > FC_MAX_BASE_OBJECT) - num++; + + if (n < r->u.test->object) + n = r->u.test->object; break; case FcRuleEdit: - if (r->u.edit->object > FC_MAX_BASE_OBJECT) - num++; + if (n < r->u.edit->object) + n = r->u.edit->object; break; default: break; } } - if (config->maxObjects < num) - config->maxObjects = num; + n = FC_OBJ_ID (n) - FC_MAX_BASE_OBJECT; + if (config->maxObjects < n) + config->maxObjects = n; if (FcDebug () & FC_DBG_EDIT) { printf ("Add Subst "); @@ -701,11 +704,6 @@ FcConfigAddRule (FcConfig *config, return FcTrue; } -typedef struct _FcSubState { - FcPatternElt *elt; - FcValueList *value; -} FcSubState; - static FcValue FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf) { @@ -1495,16 +1493,14 @@ FcConfigSubstituteWithPat (FcConfig *config, FcValue v; FcSubst *s; FcRule *r; - FcValueList *l, **value = NULL; + FcValueList *l, **value = NULL, *vl; FcPattern *m; FcStrSet *strs; FcObject object = FC_INVALID_OBJECT; - FcPatternElt **elt = NULL; + FcPatternElt **elt = NULL, *e; int i, nobjs; FcBool retval = FcTrue; -#define FC_OBJ_ID(_n_) ((_n_) > FC_MAX_BASE_OBJECT ? ((_n_) - FC_EXT_OBJ_INDEX) : (_n_)) - if (!config) { config = FcConfigGetCurrent (); @@ -1597,12 +1593,17 @@ FcConfigSubstituteWithPat (FcConfig *config, else m = p; if (m) - elt[object] = FcPatternObjectFindElt (m, r->u.test->object); + e = FcPatternObjectFindElt (m, r->u.test->object); + else + e = NULL; + /* different 'kind' won't be the target of edit */ + if (!elt[object] && kind == r->u.test->kind) + elt[object] = e; /* * If there's no such field in the font, * then FcQualAll matches while FcQualAny does not */ - if (!elt[object]) + if (!e) { if (r->u.test->qual == FcQualAll) { @@ -1620,10 +1621,13 @@ FcConfigSubstituteWithPat (FcConfig *config, * Check to see if there is a match, mark the location * to apply match-relative edits */ - value[object] = FcConfigMatchValueList (m, p_pat, kind, r->u.test, elt[object]->values); - if (!value[object] || - (r->u.test->qual == FcQualFirst && value[object] != elt[object]->values) || - (r->u.test->qual == FcQualNotFirst && value[object] == elt[object]->values)) + vl = FcConfigMatchValueList (m, p_pat, kind, r->u.test, e->values); + /* different 'kind' won't be the target of edit */ + if (!value[object] && kind == r->u.test->kind) + value[object] = vl; + if (!vl || + (r->u.test->qual == FcQualFirst && vl != e->values) || + (r->u.test->qual == FcQualNotFirst && vl == e->values)) { if (FcDebug () & FC_DBG_EDIT) printf ("No match\n"); @@ -1745,8 +1749,6 @@ bail1: if (value) free (value); -#undef FC_OBJ_ID - return retval; } diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h index ec0c67470..362ea6f99 100644 --- a/fontconfig/src/fcint.h +++ b/fontconfig/src/fcint.h @@ -174,10 +174,11 @@ typedef struct _FcValueList { typedef int FcObject; -/* The 1000 is to leave some room for future added internal objects, such +/* The 1024 is to leave some room for future added internal objects, such * that caches from newer fontconfig can still be used with older fontconfig * without getting confused. */ -#define FC_EXT_OBJ_INDEX 1000 +#define FC_EXT_OBJ_INDEX 1024 +#define FC_OBJ_ID(_n_) ((_n_) & (~FC_EXT_OBJ_INDEX)) typedef struct _FcPatternElt *FcPatternEltPtr; diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index 2cdf0ad0a..b464b4ede 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/src/fcxml.c @@ -2509,7 +2509,6 @@ FcParseMatch (FcConfigParse *parse) { const FcChar8 *kind_name; FcMatchKind kind; - FcEdit *edit = 0; FcVStack *vstack; FcRule *rule = NULL, *r; @@ -2545,8 +2544,10 @@ FcParseMatch (FcConfigParse *parse) { FcConfigMessage (parse, FcSevereError, "<match target=\"scan\"> cannot edit user-defined object \"%s\"", - FcObjectName(edit->object)); - break; + FcObjectName(vstack->u.edit->object)); + if (rule) + FcRuleDestroy (rule); + return; } r = FcRuleCreate (FcRuleEdit, vstack->u.edit); if (rule) |