naev
0.11.5
src
semver.h
1
/*
2
* semver.h
3
*
4
* Copyright (c) 2015-2017 Tomas Aparicio
5
* MIT licensed
6
*/
7
8
#ifndef __SEMVER_H
9
#define __SEMVER_H
10
11
#ifdef __cplusplus
12
extern
"C"
{
13
#endif
14
15
#ifndef SEMVER_VERSION
16
#define SEMVER_VERSION "0.2.0"
17
#endif
18
23
typedef
struct
semver_version_s {
24
int
major;
25
int
minor;
26
int
patch;
27
char
* metadata;
28
char
* prerelease;
29
}
semver_t
;
30
35
int
36
semver_satisfies (
semver_t
x,
semver_t
y,
const
char
*op);
37
38
int
39
semver_satisfies_caret (
semver_t
x,
semver_t
y);
40
41
int
42
semver_satisfies_patch (
semver_t
x,
semver_t
y);
43
44
int
45
semver_compare (
semver_t
x,
semver_t
y);
46
47
int
48
semver_compare_version (
semver_t
x,
semver_t
y);
49
50
int
51
semver_compare_prerelease (
semver_t
x,
semver_t
y);
52
53
int
54
semver_gt (
semver_t
x,
semver_t
y);
55
56
int
57
semver_gte (
semver_t
x,
semver_t
y);
58
59
int
60
semver_lt (
semver_t
x,
semver_t
y);
61
62
int
63
semver_lte (
semver_t
x,
semver_t
y);
64
65
int
66
semver_eq (
semver_t
x,
semver_t
y);
67
68
int
69
semver_neq (
semver_t
x,
semver_t
y);
70
71
int
72
semver_parse (
const
char
*str,
semver_t
*ver);
73
74
int
75
semver_parse_version (
const
char
*str,
semver_t
*ver);
76
77
void
78
semver_render (
semver_t
*x,
char
*dest);
79
80
int
81
semver_numeric (
semver_t
*x);
82
83
void
84
semver_bump (
semver_t
*x);
85
86
void
87
semver_bump_minor (
semver_t
*x);
88
89
void
90
semver_bump_patch (
semver_t
*x);
91
92
void
93
semver_free (
semver_t
*x);
94
95
int
96
semver_is_valid (
const
char
*s);
97
98
int
99
semver_clean (
char
*s);
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
semver_t
Definition
semver.h:23
Generated by
1.12.0