aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/fc-cat
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-06-21 14:43:05 +0200
committermarha <marha@users.sourceforge.net>2011-06-21 14:43:05 +0200
commit6bf5e6441da930ba3c1541f4e5e61ef7e6866b35 (patch)
tree0cac64c1f2404632d76fb87895d60eff1cd53651 /fontconfig/fc-cat
parent2fcbb7316a41857c67cd6bd1667853a2ff6b2fb9 (diff)
parent8a49ff701cfa50f9dcb237051e2ba7ac0302a515 (diff)
downloadvcxsrv-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-cat')
-rw-r--r--fontconfig/fc-cat/fc-cat.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/fontconfig/fc-cat/fc-cat.c b/fontconfig/fc-cat/fc-cat.c
index 7b52d5475..623a01466 100644
--- a/fontconfig/fc-cat/fc-cat.c
+++ b/fontconfig/fc-cat/fc-cat.c
@@ -194,11 +194,9 @@ file_base_name (const FcChar8 *cache, const FcChar8 *file)
static FcBool
cache_print_set (FcFontSet *set, FcStrSet *dirs, const FcChar8 *base_name, FcBool verbose)
{
- FcChar8 *name, *dir;
- const FcChar8 *file, *base;
- int ret;
+ FcChar8 *dir;
+ const FcChar8 *base;
int n;
- int id;
int ndir = 0;
FcStrList *list;
@@ -227,37 +225,22 @@ cache_print_set (FcFontSet *set, FcStrSet *dirs, const FcChar8 *base_name, FcBoo
for (n = 0; n < set->nfont; n++)
{
FcPattern *font = set->fonts[n];
+ FcChar8 *s;
- if (FcPatternGetString (font, FC_FILE, 0, (FcChar8 **) &file) != FcResultMatch)
- goto bail3;
- base = file_base_name (base_name, file);
- if (FcPatternGetInteger (font, FC_INDEX, 0, &id) != FcResultMatch)
- goto bail3;
- if (!write_string (stdout, base))
- goto bail3;
- if (PUTC (' ', stdout) == EOF)
- goto bail3;
- if (!write_int (stdout, id))
- goto bail3;
- if (PUTC (' ', stdout) == EOF)
- goto bail3;
- name = FcNameUnparse (font);
- if (!name)
- goto bail3;
- ret = write_string (stdout, name);
- FcStrFree (name);
- if (!ret)
- goto bail3;
- if (PUTC ('\n', stdout) == EOF)
- goto bail3;
+ s = FcPatternFormat (font, "%{=fccat}\n");
+ if (s)
+ {
+ printf ("%s", s);
+ free (s);
+ }
}
if (verbose && !set->nfont && !ndir)
printf ("<empty>\n");
-
+
FcStrListDone (list);
return FcTrue;
-
+
bail3:
FcStrListDone (list);
bail2: