Debian Codegraph @

deps/libneon/doc/ref/vers.xml

raw
1 <refentry id="refvers">
2
3 <refmeta>
4 <refentrytitle>ne_version_match</refentrytitle>
5 <manvolnum>3</manvolnum>
6 </refmeta>
7
8 <refnamediv>
9 <refname>ne_version_match</refname>
10 <refname>ne_version_string</refname>
11 <refpurpose>library versioning</refpurpose>
12 </refnamediv>
13
14 <refsynopsisdiv>
15
16 <funcsynopsis>
17
18 <funcsynopsisinfo>#include &lt;ne_utils.h&gt;</funcsynopsisinfo>
19
20 <funcprototype>
21 <funcdef>int <function>ne_version_match</function></funcdef>
22 <paramdef>int <parameter>major</parameter></paramdef>
23 <paramdef>int <parameter>minor</parameter></paramdef>
24 </funcprototype>
25
26 <funcprototype>
27 <funcdef>const char *<function>ne_version_string</function></funcdef>
28 <void/>
29 </funcprototype>
30
31 </funcsynopsis>
32
33 </refsynopsisdiv>
34
35 <refsect1>
36 <title>Description</title>
37
38 <para>The <function>ne_version_match</function> function returns
39 non-zero if the library version is not of major version
40 <parameter>major</parameter>, or the minor version is less than
41 <parameter>minor</parameter>. For &neon; versions 0.x, every
42 minor version is assumed to be incompatible with every other minor
43 version.</para> <!-- TODO: remove that for 1.0 -->
44
45 <para>The <function>ne_version_string</function> function returns
46 a string giving the library version.</para>
47
48 </refsect1>
49
50 <refsect1>
51 <title>Examples</title>
52
53 <para>To require &neon; 1.x, version 1.2 or later:</para>
54
55 <programlisting>if (ne_version_match(1, 2)) {
56 printf("Library version out of date: 1.2 required, found %s.",
57 ne_version_string());
58 exit(1);
59 }</programlisting>
60
61 </refsect1>
62
63 </refentry>