mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
foot/client: version info: add +/- assertions
This commit is contained in:
parent
db2529159c
commit
3155ab45fe
3 changed files with 15 additions and 4 deletions
5
client.c
5
client.c
|
|
@ -43,11 +43,12 @@ static const char *
|
||||||
version_and_features(void)
|
version_and_features(void)
|
||||||
{
|
{
|
||||||
static char buf[256];
|
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,
|
FOOT_VERSION,
|
||||||
feature_pgo() ? '+' : '-',
|
feature_pgo() ? '+' : '-',
|
||||||
feature_ime() ? '+' : '-',
|
feature_ime() ? '+' : '-',
|
||||||
feature_graphemes() ? '+' : '-');
|
feature_graphemes() ? '+' : '-',
|
||||||
|
feature_assertions() ? '+' : '-');
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
static inline bool feature_assertions(void)
|
||||||
|
{
|
||||||
|
#if defined(NDEBUG)
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool feature_ime(void)
|
static inline bool feature_ime(void)
|
||||||
{
|
{
|
||||||
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
|
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
|
||||||
|
|
|
||||||
5
main.c
5
main.c
|
|
@ -45,11 +45,12 @@ static const char *
|
||||||
version_and_features(void)
|
version_and_features(void)
|
||||||
{
|
{
|
||||||
static char buf[256];
|
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,
|
FOOT_VERSION,
|
||||||
feature_pgo() ? '+' : '-',
|
feature_pgo() ? '+' : '-',
|
||||||
feature_ime() ? '+' : '-',
|
feature_ime() ? '+' : '-',
|
||||||
feature_graphemes() ? '+' : '-');
|
feature_graphemes() ? '+' : '-',
|
||||||
|
feature_assertions() ? '+' : '-');
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue