stumpless  2.1.0
version.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2018-2022 Joel E. Anderson
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
23 #ifndef __STUMPLESS_VERSION_H
24 # define __STUMPLESS_VERSION_H
25 
26 # include <stumpless/config.h>
27 
28 # ifdef __cplusplus
29 extern "C" {
30 # endif
31 
36  int major;
37  int minor;
38  int patch;
39 };
40 
59 struct stumpless_version *
61 
88 int
89 stumpless_version_cmp( const struct stumpless_version * version_x,
90  const struct stumpless_version * version_y );
91 
92 
121 char *
123 
124 # ifdef __cplusplus
125 } /* extern "C" */
126 # endif
127 
128 #endif /* __STUMPLESS_VERSION_H */
stumpless_version_to_string
char * stumpless_version_to_string(const struct stumpless_version *version)
Creates a string representation of the given version.
stumpless_get_version
struct stumpless_version * stumpless_get_version(void)
Gets the version of code the library was built with.
stumpless_version::major
int major
The major version.
Definition: version.h:36
stumpless_version::patch
int patch
The patch version.
Definition: version.h:38
stumpless_version
A description of a library version.
Definition: version.h:35
STUMPLESS_PUBLIC_FUNCTION
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition: config.h:31
config.h
stumpless_version_cmp
int stumpless_version_cmp(const struct stumpless_version *version_x, const struct stumpless_version *version_y)
Compares the version of two given stumpless_version struct.
stumpless_version::minor
int minor
The minor version.
Definition: version.h:37