From 2e5f6c20ebfb350127432bb71b36c58a44a65e80 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 26 Apr 2025 01:58:18 -0400 Subject: Add TOMO_VERSION as a variable accessible to tomo programs at runtime --- src/stdlib/stdlib.c | 1 + src/stdlib/stdlib.h | 1 + 2 files changed, 2 insertions(+) (limited to 'src/stdlib') diff --git a/src/stdlib/stdlib.c b/src/stdlib/stdlib.c index c1aba23c..7ee249ab 100644 --- a/src/stdlib/stdlib.c +++ b/src/stdlib/stdlib.c @@ -42,6 +42,7 @@ static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { #endif public bool USE_COLOR; +public Text_t TOMO_VERSION_TEXT = Text(TOMO_VERSION); static _Noreturn void signal_handler(int sig, siginfo_t *info, void *userdata) { diff --git a/src/stdlib/stdlib.h b/src/stdlib/stdlib.h index ee4149b1..04c504fe 100644 --- a/src/stdlib/stdlib.h +++ b/src/stdlib/stdlib.h @@ -15,6 +15,7 @@ #include "util.h" extern bool USE_COLOR; +extern Text_t TOMO_VERSION_TEXT; typedef struct { const char *name; -- cgit v1.2.3