summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-12 07:43:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-12 07:43:45 -0700
commit42854d80a361e297a1dee69bebbb6c53d79f2d19 (patch)
treeddb9c576e9d6297104d2f65c454bd0b12070dda7 /txr.c
parentff7c7432e48776dbfc970d19bb81c6fe6075c117 (diff)
downloadtxr-42854d80a361e297a1dee69bebbb6c53d79f2d19.tar.gz
txr-42854d80a361e297a1dee69bebbb6c53d79f2d19.tar.bz2
txr-42854d80a361e297a1dee69bebbb6c53d79f2d19.zip
* Makefile: Install share/txr/stdlib/*.txr material.
* match.c (do_txeval): If a variable is not in the bindings, fall back on treating it as a TXR Lisp dynamic variable. This allows us to refer to the stdlib variable from a quasistring in a @(load ...) directive. * txr.c (sysroot_init): Register new variable, *txr-version*. * share/txr/stdlib/ver.txr: New file.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 80a902b7..aa3ab885 100644
--- a/txr.c
+++ b/txr.c
@@ -52,6 +52,7 @@
#include "syslog.h"
#include "eval.h"
#include "regex.h"
+#include "arith.h"
#include "txr.h"
const wchli_t *version = wli(TXR_VER);
@@ -235,6 +236,8 @@ static void sysroot_init(void)
#endif
reg_var(intern(lit("stdlib"), user_package),
sysroot(lit("share/txr/stdlib")));
+ reg_var(intern(lit("*txr-version*"), user_package),
+ toint(lit(TXR_VER), nil));
}
int txr_main(int argc, char **argv);