diff options
author | marha <marha@users.sourceforge.net> | 2011-06-21 14:43:05 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-21 14:43:05 +0200 |
commit | 6bf5e6441da930ba3c1541f4e5e61ef7e6866b35 (patch) | |
tree | 0cac64c1f2404632d76fb87895d60eff1cd53651 /fontconfig/fc-match/fc-match.c | |
parent | 2fcbb7316a41857c67cd6bd1667853a2ff6b2fb9 (diff) | |
parent | 8a49ff701cfa50f9dcb237051e2ba7ac0302a515 (diff) | |
download | vcxsrv-6bf5e6441da930ba3c1541f4e5e61ef7e6866b35.tar.gz vcxsrv-6bf5e6441da930ba3c1541f4e5e61ef7e6866b35.tar.bz2 vcxsrv-6bf5e6441da930ba3c1541f4e5e61ef7e6866b35.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
fontconfig/doc/fcformat.fncs
fontconfig/fc-cat/fc-cat.c
fontconfig/fc-list/fc-list.c
fontconfig/fc-match/fc-match.c
fontconfig/src/fcdir.c
fontconfig/src/fcformat.c
fontconfig/src/fcname.c
mesalib/src/glsl/linker.cpp
mesalib/src/mesa/state_tracker/st_format.c
Diffstat (limited to 'fontconfig/fc-match/fc-match.c')
-rw-r--r-- | fontconfig/fc-match/fc-match.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/fontconfig/fc-match/fc-match.c b/fontconfig/fc-match/fc-match.c index 14f38ff30..929eda59b 100644 --- a/fontconfig/fc-match/fc-match.c +++ b/fontconfig/fc-match/fc-match.c @@ -195,6 +195,14 @@ main (int argc, char **argv) }
FcPatternDestroy (pat);
+ if (!format)
+ {
+ if (os)
+ format = "%{=unparse}\n";
+ else
+ format = "%{=fcmatch}\n";
+ }
+
if (fs)
{
int j;
@@ -209,7 +217,7 @@ main (int argc, char **argv) {
FcPatternPrint (font);
}
- else if (format)
+ else
{
FcChar8 *s;
@@ -220,34 +228,6 @@ main (int argc, char **argv) free (s);
}
}
- else if (os)
- {
- FcChar8 *str;
- str = FcNameUnparse (font);
- printf ("%s\n", str);
- free (str);
- }
- else
- {
- FcChar8 *family;
- FcChar8 *style;
- FcChar8 *file;
-
- if (FcPatternGetString (font, FC_FILE, 0, &file) != FcResultMatch)
- file = (FcChar8 *) "<unknown filename>";
- else
- {
- FcChar8 *slash = (FcChar8 *) strrchr ((char *) file, '/');
- if (slash)
- file = slash+1;
- }
- if (FcPatternGetString (font, FC_FAMILY, 0, &family) != FcResultMatch)
- family = (FcChar8 *) "<unknown family>";
- if (FcPatternGetString (font, FC_STYLE, 0, &style) != FcResultMatch)
- style = (FcChar8 *) "<unknown style>";
-
- printf ("%s: \"%s\" \"%s\"\n", file, family, style);
- }
FcPatternDestroy (font);
}
|