summaryrefslogtreecommitdiff
path: root/doc/manual-html/gimpprint_18.html
blob: 96bc5a4bcafe4813c184baf4ef162036309cf6f4 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from .././gimpprint.texi on 11 June 2004 -->

<TITLE>GIMP-Print - Version functions</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="gimpprint_1.html">first</A>, <A HREF="gimpprint_17.html">previous</A>, <A HREF="gimpprint_19.html">next</A>, <A HREF="gimpprint_47.html">last</A> section, <A HREF="gimpprint_toc.html">table of contents</A>.
<P><HR><P>


<H2><A NAME="SEC23" HREF="gimpprint_toc.html#TOC23">4.8  Version functions</A></H2>
<P>
<A NAME="IDX159"></A>

</P>
<P>
<DL>
<DT><U>Function:</U> const char * <B>stp_check_version</B> <I>(unsigned int <VAR>required_major</VAR>,</I>
<DD><A NAME="IDX160"></A>
unsigned int <VAR>required_minor</VAR>, unsigned int <VAR>required_micro</VAR>)

</P>
<P>
This function checks whether the version of libgimpprint that the program
is linked with is equal to the version number passed to it. If the version
is the same, the function returns <CODE>NULL</CODE>. If any of the version
numbers do not match (i.e. the library version is too old or too new), a string containing a desription of the difference is
returned. The first error found is returned. The function checks in the order
major, minor, micro.
</DL>

</P>


<H3><A NAME="SEC24" HREF="gimpprint_toc.html#TOC24">4.8.1  Version macros</A></H3>

<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_CHECK_VERSION</B> <I>(major,minor,micro)</I>
<DD><A NAME="IDX161"></A>

</P>
<P>
This macro returns zero if the version of the libgimpprint headers are
greater or equal to the version given as an argument. It returns nonzero
if the version of the libgimpprint headers are less than the argument.
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_MAJOR_VERSION</B>
<DD><A NAME="IDX162"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_MINOR_VERSION</B>
<DD><A NAME="IDX163"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_MICRO_VERSION</B>
<DD><A NAME="IDX164"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_CURRENT_INTERFACE</B>
<DD><A NAME="IDX165"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_BINARY_AGE</B>
<DD><A NAME="IDX166"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Macro:</U> <B>GIMPPRINT_INTERFACE_AGE</B>
<DD><A NAME="IDX167"></A>
</DL>

</P>
<P>
These macros are integers holding the version numbers. They should be
used for compile-time checking only. To check version numbers at
run-time, use the equivalent variables. Note that at present (4.1.x
development branch) the library interface version numbers are not used.

</P>


<H3><A NAME="SEC25" HREF="gimpprint_toc.html#TOC25">4.8.2  Version variables</A></H3>

<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_major_version</B>
<DD><A NAME="IDX168"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_minor_version</B>
<DD><A NAME="IDX169"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_micro_version</B>
<DD><A NAME="IDX170"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_current_interface</B>
<DD><A NAME="IDX171"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_binary_age</B>
<DD><A NAME="IDX172"></A>
</DL>

</P>
<P>
<DL>
<DT><U>Variable:</U> const unsigned int <B>gimpprint_interface_age</B>
<DD><A NAME="IDX173"></A>
</DL>

</P>
<P>
These variables hold the library version numbers. Because the version of
the library may change on a system using shared libraries, these should
be used instead of the equivalent macros when checking the library
version at run-time. Note that library interface version numbers are not
used in the development branch, but are in the stable branch.
<P><HR><P>
Go to the <A HREF="gimpprint_1.html">first</A>, <A HREF="gimpprint_17.html">previous</A>, <A HREF="gimpprint_19.html">next</A>, <A HREF="gimpprint_47.html">last</A> section, <A HREF="gimpprint_toc.html">table of contents</A>.
</BODY>
</HTML>