summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-12-29 20:00:26 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-02-13 16:54:04 -0800
commit0c93b91db0cdf7c5e901477c266b45c8baeadd00 (patch)
treefd3df21df4f20d88a9af8426533fcb0ed542541a /doc
parent5cf04b201fb5e9dc989d30cf5c30f7575dda56bc (diff)
Implement FcPatternFormat and use it in cmdline tools (bug #17107)
Still need to add more features, but the API is there, and used by cmdline tools with -f or --format.
Diffstat (limited to 'doc')
-rw-r--r--doc/fcpattern.fncs18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/fcpattern.fncs b/doc/fcpattern.fncs
index 7297e019..c89706a4 100644
--- a/doc/fcpattern.fncs
+++ b/doc/fcpattern.fncs
@@ -395,3 +395,21 @@ Converts the given pattern into the standard text format described above.
The return value is not static, but instead refers to newly allocated memory
which should be freed by the caller using free().
@@
+
+@RET@ FcChar8 *
+@FUNC@ FcPatternFormat
+@TYPE1@ FcPattern * @ARG1@ pat
+@TYPE2@ const FcChar8 * @ARG2@ format
+@PURPOSE@ Format a pattern into a string according to a format specifier
+@DESC@
+
+Converts the given pattern into text format described by the format specifier.
+The format specifier is similar to a C style printf string, which the
+printf(2) man page provides a good introduction to. However, as RPM already
+knows the type of data that is being printed, you must omit the type
+specifier. In its place put the element name you wish to print enclosed in
+curly braces ({}). For example, to print the family name and style the
+pattern, use the format "%{family} %{style}\n".
+The return value refers to newly allocated memory which should be freed by the
+caller using free().
+@@