diff options
Diffstat (limited to 'doc/ref/vers.xml')
-rw-r--r-- | doc/ref/vers.xml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/ref/vers.xml b/doc/ref/vers.xml new file mode 100644 index 0000000..2e7a50d --- /dev/null +++ b/doc/ref/vers.xml @@ -0,0 +1,63 @@ +<refentry id="refvers"> + + <refmeta> + <refentrytitle>ne_version_match</refentrytitle> + <manvolnum>3</manvolnum> + </refmeta> + + <refnamediv> + <refname>ne_version_match</refname> + <refname>ne_version_string</refname> + <refpurpose>library versioning</refpurpose> + </refnamediv> + + <refsynopsisdiv> + + <funcsynopsis> + + <funcsynopsisinfo>#include <ne_utils.h></funcsynopsisinfo> + + <funcprototype> + <funcdef>int <function>ne_version_match</function></funcdef> + <paramdef>int <parameter>major</parameter></paramdef> + <paramdef>int <parameter>minor</parameter></paramdef> + </funcprototype> + + <funcprototype> + <funcdef>const char *<function>ne_version_string</function></funcdef> + <void/> + </funcprototype> + + </funcsynopsis> + + </refsynopsisdiv> + + <refsect1> + <title>Description</title> + + <para>The <function>ne_version_match</function> function returns + non-zero if the library version is not of major version + <parameter>major</parameter>, or the minor version is less than + <parameter>minor</parameter>. For &neon; versions 0.x, every + minor version is assumed to be incompatible with every other minor + version.</para> <!-- TODO: remove that for 1.0 --> + + <para>The <function>ne_version_string</function> function returns + a string giving the library version.</para> + + </refsect1> + + <refsect1> + <title>Examples</title> + + <para>To require &neon; 1.x, version 1.2 or later:</para> + + <programlisting>if (ne_version_match(1, 2)) { + printf("Library version out of date: 1.2 required, found %s.", + ne_version_string()); + exit(1); +}</programlisting> + + </refsect1> + +</refentry> |