1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
<refentry id="refvers">
<refmeta>
<refentrytitle>ne_version_match</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>ne_version_match</refname>
<refname>ne_version_string</refname>
<refname>ne_version_library</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>
<funcprototype>
<funcdef>const char *<function>ne_version_library</function></funcdef>
<void/>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The <function>ne_version_match</function> function returns
zero if the library version is backwards-compatible with the
version given in the <parameter>major</parameter> and
<parameter>minor</parameter> parameters.</para>
<para>The <function>ne_version_string</function> function returns
a string giving the library version and build information.</para>
<para>The <function>ne_version_library</function> function returns
a string giving the library version number alone, for example
<literal>"0.37.0"</literal>.</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>To require a version of &neon; which is backwards-compatible with version 1.2.0:</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>
<refsect1>
<title>History</title>
<para>The <function>ne_version_library</function> function is available in
&neon; 0.37.0 and later.</para>
</refsect1>
</refentry>
|