diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-28 21:00:29 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-28 21:00:29 -0700 |
commit | 8f79bdd128e7ffcd471ad5f00e33a49619c41e6e (patch) | |
tree | 5b84236d77340fa0001d81064e33392e9410b325 /eval.c | |
parent | 936314c70f9356db993cfbe781919026e2df042c (diff) | |
download | txr-8f79bdd128e7ffcd471ad5f00e33a49619c41e6e.tar.gz txr-8f79bdd128e7ffcd471ad5f00e33a49619c41e6e.tar.bz2 txr-8f79bdd128e7ffcd471ad5f00e33a49619c41e6e.zip |
json: tojson function.
* eval.c (eval_init): tojson intrinsic registered.
* lib.c (tojson): New function.
* lib.h (tojson): Declared.
* txr.1: Documented.
* share/txr/stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -6873,6 +6873,7 @@ void eval_init(void) reg_fun(intern(lit("prinl"), user_package), func_n2o(prinl, 1)); reg_fun(intern(lit("pprinl"), user_package), func_n2o(pprinl, 1)); reg_fun(intern(lit("tprint"), user_package), func_n2o(tprint, 1)); + reg_fun(intern(lit("tojson"), user_package), func_n2o(tojson, 1)); reg_fun(intern(lit("display-width"), user_package), func_n1(display_width)); reg_fun(intern(lit("fmt-simple"), system_package), func_n5o(fmt_simple, 1)); |