diff options
| author | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
|---|---|---|
| committer | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
| commit | 76424950e373d3b04ac3dd13019151bfba3e8423 (patch) | |
| tree | 4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/common/parsing.h | |
Add the files
Diffstat (limited to 'src/common/parsing.h')
| -rw-r--r-- | src/common/parsing.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/common/parsing.h b/src/common/parsing.h new file mode 100644 index 0000000..c3a4bee --- /dev/null +++ b/src/common/parsing.h @@ -0,0 +1,24 @@ +#pragma once + +#include "common/FFstrbuf.h" + +#include <stdint.h> + +typedef struct FFVersion { + uint32_t major; + uint32_t minor; + uint32_t patch; +} FFVersion; + +typedef struct FFColorRangeConfig { + uint8_t green; + uint8_t yellow; +} FFColorRangeConfig; + +#define FF_VERSION_INIT ((FFVersion) { 0 }) + +void ffParseSemver(FFstrbuf* buffer, const FFstrbuf* major, const FFstrbuf* minor, const FFstrbuf* patch); +void ffParseGTK(FFstrbuf* buffer, const FFstrbuf* gtk2, const FFstrbuf* gtk3, const FFstrbuf* gtk4); + +void ffVersionToPretty(const FFVersion* version, FFstrbuf* pretty); +int8_t ffVersionCompare(const FFVersion* version1, const FFVersion* version2); |