Cthulhu  0.2.10
Cthulhu compiler collection
version_def.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 
3 #pragma once
4 
5 #include <inttypes.h>
6 #include <stdint.h>
7 
12 
19 
20 #define CT_NEW_VERSION(major, minor, patch) (((major & 0xFF) << 24) | ((minor & 0xFF) << 16) | (patch & 0xFFFF))
21 
26 
31 
36 
37 #define CT_VERSION_MAJOR(version) (((version) >> 24) & 0xFF)
38 #define CT_VERSION_MINOR(version) (((version) >> 16) & 0xFF)
39 #define CT_VERSION_PATCH(version) ((version) & 0xFFFF)
40 
42 typedef uint_fast32_t ctu_version_t;
43 
44 #define PRI_VERSION PRIuFAST32
45 
47 typedef struct version_info_t
48 {
49  const char *license;
50  const char *desc;
51  const char *author;
54 
uint_fast32_t ctu_version_t
underlying type for ctu_version_t
Definition: version_def.h:42
version information for a driver/interface/plugin
Definition: version_def.h:48
const char * license
the license of this component
Definition: version_def.h:49
const char * author
the author of this component
Definition: version_def.h:51
const char * desc
a short description of this component
Definition: version_def.h:50
ctu_version_t version
the version info for this component
Definition: version_def.h:52