summaryrefslogtreecommitdiff
path: root/docs/reference/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-11-14 23:28:01 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-11-14 23:28:01 +0000
commit41ee5267cbaddb90070af789cdd52a912a9762c7 (patch)
tree03fe42fb521147328c74f44c603d63a913b0abe8 /docs/reference/gdk-pixbuf
parent5df65643e22d1e0dcbb13d38e43e8d65f27ae777 (diff)
downloadgdk-pixbuf-41ee5267cbaddb90070af789cdd52a912a9762c7.tar.gz
Check that the mask is NULL or a string of the same length consisting
Sat Nov 15 00:26:19 2003 Matthias Clasen <maclas@gmx.de> * queryloaders.c (loader_sanity_check): Check that the mask is NULL or a string of the same length consisting entirely of ' ', '!', 'x', 'z', 'n'.
Diffstat (limited to 'docs/reference/gdk-pixbuf')
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/module_interface.sgml24
1 files changed, 18 insertions, 6 deletions
diff --git a/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml b/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
index 9bacd0e49..c3c86af96 100644
--- a/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
@@ -18,8 +18,8 @@ a #GdkPixbufModuleFillVtableFunc function named
In order to make format-checking work before actually loading the modules
(which may require dlopening image libraries), modules export their
signatures (and other information) via the <function>fill_info</function>
-function. An external utility, <command>gdk-pixbuf-query-loaders</command>, uses
-this to create a text file containing a list of all available loaders and
+function. An external utility, <command>gdk-pixbuf-query-loaders</command>,
+uses this to create a text file containing a list of all available loaders and
their signatures. This file is then read at runtime by &gdk-pixbuf; to obtain
the list of available loaders and their signatures.
</para>
@@ -158,18 +158,30 @@ operations.
<!-- ##### STRUCT GdkPixbufModulePattern ##### -->
<para>
The signature of a module is a set of prefixes. Prefixes are encoded as
-pairs of ordinary strings, where the second string, if not %NULL,
-may contain ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be
-matched, not matched, "don't-care"-bytes, zeros and non-zeros.
+pairs of ordinary strings, where the second string, if not %NULL, must be
+of the same length as the first one and may contain ' ', '!', 'x', 'z',
+and 'n' to indicate bytes that must be matched, not matched,
+"don't-care"-bytes, zeros and non-zeros.
Each prefix has an associated integer that describes the relevance of
the prefix, with 0 meaning a mismatch and 100 a "perfect match".
</para>
<para>
The signature of a module is stored as an array of
-#GdkPixbufModulePattern<!-- -->s.
+#GdkPixbufModulePattern<!-- -->s. The array is terminated by a pattern
+where the @prefix is %NULL.
</para>
+<informalexample><programlisting>
+GdkPixbufModulePattern *signature[] = {
+ { "abcdx", " !x z", 100 },
+ { "bla", NULL, 90 },
+ { NULL, NULL, 0 }
+};
+</programlisting>
+The example matches e.g. "auud\0" with relevance 100, and "blau" with
+relevance 90.</informalexample>
+
@prefix: the prefix for this pattern
@mask: mask containing bytes which modify how the prefix is matched against
test data