diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-26 12:26:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-26 12:26:16 -0800 |
commit | b58791b726228b97297cc4512476f6016b9346a2 (patch) | |
tree | 2ed1b157bb29f6f90c97565adac4b2d54c2e1912 /lib.h | |
parent | b7aae46f879bfc8a43781a08aaef9f506f7211bf (diff) | |
download | txr-b58791b726228b97297cc4512476f6016b9346a2.tar.gz txr-b58791b726228b97297cc4512476f6016b9346a2.tar.bz2 txr-b58791b726228b97297cc4512476f6016b9346a2.zip |
* eval.c (dwim_loc, dwim_op): Eliminated redundant re-evaluation
of range arguments. They are already evaluated since the cons
expression is evaluates as part of the dwim arglist.
Replaced some open code with function calls to the new listref
and listref_l functions.
(tostring, tostringp): made extern and moved to lib.c.
* lib.c (listref, listref_l): New functions.
(tostring, tostringp): moved here from eval.c.
* lib.h (listref, listref_l, tostring, tostringp): Declared.
* match.c (format_field): Handle index and range references.
* txr.1: Documented new output variable syntax.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -324,6 +324,8 @@ val third(val cons); val fourth(val cons); val fifth(val cons); val sixth(val cons); +val listref(val list, val ind); +val *listref_l(val list, val ind); val *tail(val cons); val *ltail(val *cons); val pop(val *plist); @@ -554,9 +556,11 @@ val find(val list, val key, val testfun, val keyfun); val set_diff(val list1, val list2, val testfun, val keyfun); val length(val seq); val env(void); - val obj_print(val obj, val stream); val obj_pprint(val obj, val stream); +val tostring(val obj); +val tostringp(val obj); + void init(const wchar_t *progname, mem_t *(*oom_realloc)(mem_t *, size_t), val *stack_bottom); void dump(val obj, val stream); |