aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-26 01:58:18 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-26 01:58:18 -0400
commit2e5f6c20ebfb350127432bb71b36c58a44a65e80 (patch)
tree69017c10d0faa8e9ccb05478dd34b800da916215 /src/stdlib
parentc77380f353e85bcd9ba03c29b292022c694b9667 (diff)
Add TOMO_VERSION as a variable accessible to tomo programs at runtime
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/stdlib.c1
-rw-r--r--src/stdlib/stdlib.h1
2 files changed, 2 insertions, 0 deletions
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;