mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-22 01:40:17 -05:00
features: include compile-time enable/disable state of features when printing version
This commit is contained in:
parent
2078e1675d
commit
77bc7c8b2c
4 changed files with 37 additions and 3 deletions
12
client.c
12
client.c
|
|
@ -16,6 +16,7 @@
|
|||
#define LOG_ENABLE_DBG 0
|
||||
#include "log.h"
|
||||
#include "client-protocol.h"
|
||||
#include "foot-features.h"
|
||||
#include "version.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
|
|
@ -27,6 +28,15 @@ sig_handler(int signo)
|
|||
aborted = 1;
|
||||
}
|
||||
|
||||
static const char *
|
||||
version_and_features(void)
|
||||
{
|
||||
static char buf[256];
|
||||
snprintf(buf, sizeof(buf), "version: %s %cime",
|
||||
FOOT_VERSION, feature_ime() ? '+' : '-');
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void
|
||||
print_usage(const char *prog_name)
|
||||
{
|
||||
|
|
@ -155,7 +165,7 @@ main(int argc, char *const *argv)
|
|||
break;
|
||||
|
||||
case 'v':
|
||||
printf("footclient version %s\n", FOOT_VERSION);
|
||||
printf("footclient %s\n", version_and_features());
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
case 'h':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue