From 8c31a2434d5dfa475ef710ad52c992111caac424 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 Feb 2009 23:08:08 -0500 Subject: [fcformat] Add element filtering and deletion The filtering, '%{+elt1,elt2,elt3{subexpr}}' will evaluate subexpr with a pattern only having the listed elements from the surrounding pattern. The deletion, '%{-elt1,elt2,elt3{subexpr}}' will evaluate subexpr with a the surrounding pattern sans the listed elements. --- fc-query/fc-query.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fc-query') diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c index 8c5672c6..4d707bc1 100644 --- a/fc-query/fc-query.c +++ b/fc-query/fc-query.c @@ -162,8 +162,11 @@ main (int argc, char **argv) FcChar8 *s; s = FcPatternFormat (pat, format); - printf ("%s", s); - free (s); + if (s) + { + printf ("%s", s); + free (s); + } } else { -- cgit v1.2.3