naev
0.12.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
22
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
34
35
int
semver_satisfies(
semver_t
x,
semver_t
y,
const
char
*op );
36
37
int
semver_satisfies_caret(
semver_t
x,
semver_t
y );
38
39
int
semver_satisfies_patch(
semver_t
x,
semver_t
y );
40
41
int
semver_compare(
semver_t
x,
semver_t
y );
42
43
int
semver_compare_version(
semver_t
x,
semver_t
y );
44
45
int
semver_compare_prerelease(
semver_t
x,
semver_t
y );
46
47
int
semver_gt(
semver_t
x,
semver_t
y );
48
49
int
semver_gte(
semver_t
x,
semver_t
y );
50
51
int
semver_lt(
semver_t
x,
semver_t
y );
52
53
int
semver_lte(
semver_t
x,
semver_t
y );
54
55
int
semver_eq(
semver_t
x,
semver_t
y );
56
57
int
semver_neq(
semver_t
x,
semver_t
y );
58
59
int
semver_parse(
const
char
*str,
semver_t
*ver );
60
61
int
semver_parse_version(
const
char
*str,
semver_t
*ver );
62
63
void
semver_render(
semver_t
*x,
char
*dest );
64
65
int
semver_numeric(
semver_t
*x );
66
67
void
semver_bump(
semver_t
*x );
68
69
void
semver_bump_minor(
semver_t
*x );
70
71
void
semver_bump_patch(
semver_t
*x );
72
73
void
semver_free(
semver_t
*x );
74
75
int
semver_is_valid(
const
char
*s );
76
77
int
semver_clean(
char
*s );
78
79
#ifdef __cplusplus
80
}
81
#endif
82
83
#endif
semver_t
Definition
semver.h:23
Generated by
1.14.0