From 57bfb0fa5d8803fe9df5f1dac672b689e5f4e3d3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 28 Nov 2011 18:58:25 -0800 Subject: Adding streams functions to Lisp evaluator. * eval.c (op_let): Bugfix: was not evaluating var init forms. (reg_var): New static function. (eval_init): Registered numerous stream functions and the three standard streams. * lib.c (obj_print, obj_pprint): Modified to return a value. (init): eval_init called after stream_init, because eval needs the three standrad streams prepared. * lib.h (obj_print, obj_pprint): Declarations updated. * stream.c (format): Support t as a shorthand for standard output. (formatv, open_directory, open_file, open_pipe): New functions. (w_opendir): New static function. * stream.h (formatv, open_directory, open_file, open_pipe): Declared. * txr.vim: set iskeyword such that keyword can contain special characters. Set b:current_syntax to "lisp". (txl_keyword): New keyword category populated with TXR Lisp keywords defined as separate category. (txr_list): Contains txl_keyword. (txr_meta): Contains txl_keyword and txr_list. --- lib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index d83a0cef..aa3064f0 100644 --- a/lib.h +++ b/lib.h @@ -489,8 +489,8 @@ val find(val list, val key, val testfun, val keyfun); val set_diff(val list1, val list2, val testfun, val keyfun); val env(void); -void obj_print(val obj, val stream); -void obj_pprint(val obj, val stream); +val obj_print(val obj, val stream); +val obj_pprint(val obj, val stream); void init(const wchar_t *progname, mem_t *(*oom_realloc)(mem_t *, size_t), val *stack_bottom); void dump(val obj, val stream); -- cgit v1.2.3