Squash  0.7.0
version.h
1 /* Copyright (c) 2013 The Squash Authors
2  *
3  * Permission is hereby granted, free of charge, to any person
4  * obtaining a copy of this software and associated documentation
5  * files (the "Software"), to deal in the Software without
6  * restriction, including without limitation the rights to use, copy,
7  * modify, merge, publish, distribute, sublicense, and/or sell copies
8  * of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be
12  * included in all copies or substantial portions of the Software.
13 
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  *
23  * Authors:
24  * Evan Nemerson <evan@coeus-group.com>
25  */
26 
27 #ifndef SQUASH_VERSION_H
28 #define SQUASH_VERSION_H
29 
30 #if !defined (SQUASH_H_INSIDE) && !defined (SQUASH_COMPILATION)
31 #error "Only <squash/squash.h> can be included directly."
32 #endif
33 
34 #define SQUASH_VERSION_MAJOR 0
35 #define SQUASH_VERSION_MINOR 7
36 #define SQUASH_VERSION_REVISION 0
37 #define SQUASH_VERSION_API "0.7"
38 
39 #define SQUASH_VERSION(major,minor,revision) (((major) << 16) | ((minor) << 8) | (revision))
40 #define SQUASH_VERSION_CURRENT SQUASH_VERSION(SQUASH_VERSION_MAJOR, SQUASH_VERSION_MINOR, SQUASH_VERSION_REVISION)
41 
42 #define SQUASH_VERSION_EXTRACT_MAJOR(version) (((version) >> 16) & 0xff)
43 #define SQUASH_VERSION_EXTRACT_MINOR(version) (((version) >> 8) & 0xff)
44 #define SQUASH_VERSION_EXTRACT_REVISION(version) ((version) & 0xff)
45 
46 SQUASH_BEGIN_DECLS
47 
48 SQUASH_API unsigned int squash_version (void);
49 SQUASH_API const char* squash_version_api (void);
50 
51 SQUASH_END_DECLS
52 
53 #endif /* SQUASH_VERSION_H */
SQUASH_BEGIN_DECLS SQUASH_API unsigned int squash_version(void)
Get the library version.
Definition: version.c:113
SQUASH_API const char * squash_version_api(void)
Get the API version.
Definition: version.c:129