From eb9357709bfd521a87f5fc4232bf37ce360a0317 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Fri, 14 Mar 2025 20:15:11 +0000 Subject: main/client: simplify code for printing --version string --- client.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index e7df3768..e76f2d51 100644 --- a/client.c +++ b/client.c @@ -22,7 +22,6 @@ #include "foot-features.h" #include "macros.h" #include "util.h" -#include "version.h" #include "xmalloc.h" extern char **environ; @@ -62,20 +61,6 @@ sendall(int sock, const void *_buf, size_t len) return len; } -static const char * -version_and_features(void) -{ - static char buf[256]; - snprintf(buf, sizeof(buf), - "version: %s %cpgo %cime %cgraphemes %cassertions", - FOOT_VERSION, - feature_pgo() ? '+' : '-', - feature_ime() ? '+' : '-', - feature_graphemes() ? '+' : '-', - feature_assertions() ? '+' : '-'); - return buf; -} - static void print_usage(const char *prog_name) { @@ -328,7 +313,7 @@ main(int argc, char *const *argv) break; case 'v': - printf("footclient %s\n", version_and_features()); + print_version_and_features("footclient "); ret = EXIT_SUCCESS; goto err; -- cgit v1.3