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
|
/*=============================================================================*\
* File: gfsmVersion.h
* Author: Bryan Jurish <moocow@ling.uni-potsdam.de>
* Description: finite state machine library
*
* Copyright (c) 2004-2007 Bryan Jurish.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*=============================================================================*/
/** \file gfsmVersion.h
* \brief Library version information
*/
#ifndef _GFSM_VERSION_H
#define _GFSM_VERSION_H
#include <glib.h>
/*======================================================================
* Types
*/
/// Library Version information
typedef struct {
guint32 major; /**< major version */
guint32 minor; /**< minor version */
guint32 micro; /**< micro version */
} gfsmVersionInfo;
/*======================================================================
* Constants
*/
/** Current version information */
extern const gfsmVersionInfo gfsm_version;
/** Current version string */
extern const char *gfsm_version_string;
/*======================================================================
* Comparison
*/
/** 3-way comparison two gfsmVersionInfo structures */
int gfsm_version_compare(gfsmVersionInfo v1, gfsmVersionInfo v2);
/** Equality check for gfsmVersionInfo structures */
#define gfsm_version_eq(v1,v2) (gfsm_version_compare((gfsmVersionInfo)(v1),(gfsmVersionInfo)(v2))==0)
/** Less-than comparison for gfsmVersionInfo structures: v1 < v2 */
#define gfsm_version_less(v1,v2) (gfsm_version_compare((gfsmVersionInfo)(v1),(gfsmVersionInfo)(v2))<0)
/** Less-than-or-equal comparison for gfsmVersionInfo structures: v1 <= v2 */
#define gfsm_version_le(v1,v2) (gfsm_version_compare((gfsmVersionInfo)(v1),(gfsmVersionInfo)(v2))<=0)
/** Greater-than comparison for gfsmVersionInfo structures: v1 > v2 */
#define gfsm_version_greater(v1,v2) (gfsm_version_compare((gfsmVersionInfo)(v1),(gfsmVersionInfo)(v2))>0)
/** Greater-than-or-equal comparison for gfsmVersionInfo structures: v1 >= v2 */
#define gfsm_version_ge(v1,v2) (gfsm_version_compare((gfsmVersionInfo)(v1),(gfsmVersionInfo)(v2))>=0)
#endif /* _GFSM_VERSION_H */
|