diff options
| -rw-r--r-- | src/environment.c | 1 | ||||
| -rw-r--r-- | src/stdlib/stdlib.c | 1 | ||||
| -rw-r--r-- | src/stdlib/stdlib.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/environment.c b/src/environment.c index 651bc9ca..8bf77733 100644 --- a/src/environment.c +++ b/src/environment.c @@ -516,6 +516,7 @@ env_t *global_env(bool source_mapping) const char *name, *code, *type_str; } global_vars[] = { {"USE_COLOR", "USE_COLOR", "Bool"}, + {"TOMO_VERSION", "TOMO_VERSION_TEXT", "Text"}, {"say", "say", "func(text:Text, newline=yes)"}, {"print", "say", "func(text:Text, newline=yes)"}, {"getenv", "getenv_text", "func(name:Text -> Text?)"}, 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; |
