aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcmatch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /fontconfig/src/fcmatch.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'fontconfig/src/fcmatch.c')
-rw-r--r--fontconfig/src/fcmatch.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c
index 422bc384d..92e4a6668 100644
--- a/fontconfig/src/fcmatch.c
+++ b/fontconfig/src/fcmatch.c
@@ -501,11 +501,11 @@ FcFontSetMatchInternal (FcConfig *config,
printf ("\n");
FcPatternPrint (best);
}
- if (!best)
- {
- *result = FcResultNoMatch;
- return 0;
- }
+ /* assuming that 'result' is initialized with FcResultNoMatch
+ * outside this function */
+ if (best)
+ *result = FcResultMatch;
+
return best;
}
@@ -522,6 +522,8 @@ FcFontSetMatch (FcConfig *config,
assert (p != NULL);
assert (result != NULL);
+ *result = FcResultNoMatch;
+
if (!config)
{
config = FcConfigGetCurrent ();
@@ -547,6 +549,8 @@ FcFontMatch (FcConfig *config,
assert (p != NULL);
assert (result != NULL);
+ *result = FcResultNoMatch;
+
if (!config)
{
config = FcConfigGetCurrent ();
@@ -826,6 +830,9 @@ FcFontSetSort (FcConfig *config,
printf ("First font ");
FcPatternPrint (ret->fonts[0]);
}
+ if (ret->nfont > 0)
+ *result = FcResultMatch;
+
return ret;
bail2:
@@ -849,6 +856,8 @@ FcFontSort (FcConfig *config,
assert (p != NULL);
assert (result != NULL);
+ *result = FcResultNoMatch;
+
if (!config)
{
config = FcConfigGetCurrent ();