diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2025-03-14 20:15:11 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2025-03-14 20:15:11 +0000 |
| commit | eb9357709bfd521a87f5fc4232bf37ce360a0317 (patch) | |
| tree | 0ff80196c91c85b06d9cd8272ed708363f7da51e /foot-features.h | |
| parent | meson: require wayland-protocols >= 1.41 (diff) | |
main/client: simplify code for printing --version string
Diffstat (limited to 'foot-features.h')
| -rw-r--r-- | foot-features.h | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/foot-features.h b/foot-features.h index ad447767..49cc56ed 100644 --- a/foot-features.h +++ b/foot-features.h @@ -1,39 +1,13 @@ #pragma once -#include <stdbool.h> +#include <stdio.h> -static inline bool feature_assertions(void) -{ -#if defined(NDEBUG) - return false; -#else - return true; -#endif -} - -static inline bool feature_ime(void) -{ -#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED - return true; -#else - return false; -#endif -} - -static inline bool feature_pgo(void) -{ -#if defined(FOOT_PGO_ENABLED) && FOOT_PGO_ENABLED - return true; -#else - return false; -#endif -} +extern const char version_and_features[]; -static inline bool feature_graphemes(void) +static inline void +print_version_and_features(const char *prefix) { -#if defined(FOOT_GRAPHEME_CLUSTERING) && FOOT_GRAPHEME_CLUSTERING - return true; -#else - return false; -#endif + fputs(prefix, stdout); + fputs(version_and_features, stdout); + fputc('\n', stdout); } |
