X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=src%2Ffcformat.c;h=d8518f458252fba1abc6ee4b54111807c750a7c7;hb=HEAD;hp=796957db9ab0f005e23a6d615c5c08678f03a1c2;hpb=e0be405a1dd5765e36152c754a47c8ad7ff0ab85;p=fontconfig.git diff --git a/src/fcformat.c b/src/fcformat.c index 796957d..d8518f4 100644 --- a/src/fcformat.c +++ b/src/fcformat.c @@ -62,6 +62,7 @@ * unparse FcNameUnparse * fcmatch fc-match default * fclist fc-list default + * fccat fc-cat default * pkgkit PackageKit package tag format * * @@ -74,6 +75,7 @@ */ +#define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" #define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" #define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" @@ -304,6 +306,7 @@ interpret_builtin (FcFormatContext *c, #define BUILTIN(name, format) \ else if (0 == strcmp ((const char *) c->word, name))\ ret = FcPatternFormatToBuf (pat, (const FcChar8 *) format, buf) + BUILTIN ("fccat", FCCAT_FORMAT); BUILTIN ("fcmatch", FCMATCH_FORMAT); BUILTIN ("fclist", FCLIST_FORMAT); BUILTIN ("pkgkit", PKGKIT_FORMAT); @@ -732,7 +735,7 @@ interpret_simple (FcFormatContext *c, c->word = c->word + strlen ((const char *) c->word) + 1; /* for now we just support 'default value' */ if (!expect_char (c, '-') || - !read_chars (c, '\0')) + !read_chars (c, '|')) { c->word = orig; return FcFalse;