aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.c5
-rw-r--r--foot-features.h9
-rw-r--r--main.c5
3 files changed, 15 insertions, 4 deletions
diff --git a/client.c b/client.c
index 5c767e11..d9566e15 100644
--- a/client.c
+++ b/client.c
@@ -43,11 +43,12 @@ static const char *
version_and_features(void)
{
static char buf[256];
- snprintf(buf, sizeof(buf), "version: %s %cpgo %cime %cgraphemes",
+ snprintf(buf, sizeof(buf), "version: %s %cpgo %cime %cgraphemes %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
- feature_graphemes() ? '+' : '-');
+ feature_graphemes() ? '+' : '-',
+ feature_assertions() ? '+' : '-');
return buf;
}
diff --git a/foot-features.h b/foot-features.h
index cdc8056f..ad447767 100644
--- a/foot-features.h
+++ b/foot-features.h
@@ -2,6 +2,15 @@
#include <stdbool.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
diff --git a/main.c b/main.c
index fd27aebd..07f58080 100644
--- a/main.c
+++ b/main.c
@@ -45,11 +45,12 @@ static const char *
version_and_features(void)
{
static char buf[256];
- snprintf(buf, sizeof(buf), "version: %s %cpgo %cime %cgraphemes",
+ snprintf(buf, sizeof(buf), "version: %s %cpgo %cime %cgraphemes %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
- feature_graphemes() ? '+' : '-');
+ feature_graphemes() ? '+' : '-',
+ feature_assertions() ? '+' : '-');
return buf;
}