summaryrefslogtreecommitdiffstats
path: root/stream.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-28 18:58:25 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-28 18:58:25 -0800
commit57bfb0fa5d8803fe9df5f1dac672b689e5f4e3d3 (patch)
tree08f536f7caecc9239ff76842406d1a3dcb7cbbe0 /stream.h
parentb133159cf56dba53c53b3cbc05f7907a60bb7441 (diff)
downloadtxr-57bfb0fa5d8803fe9df5f1dac672b689e5f4e3d3.tar.gz
txr-57bfb0fa5d8803fe9df5f1dac672b689e5f4e3d3.tar.bz2
txr-57bfb0fa5d8803fe9df5f1dac672b689e5f4e3d3.zip
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.
Diffstat (limited to 'stream.h')
-rw-r--r--stream.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/stream.h b/stream.h
index 8dbc0dd8..a65954ba 100644
--- a/stream.h
+++ b/stream.h
@@ -42,9 +42,13 @@ val get_byte(val);
val vformat(val stream, val string, va_list);
val vformat_to_string(val string, va_list);
val format(val stream, val string, ...);
+val formatv(val stream, val string, val args);
val put_string(val stream, val string);
val put_line(val stream, val string);
val put_char(val stream, val ch);
val flush_stream(val stream);
+val open_directory(val path);
+val open_file(val path, val mode_str);
+val open_pipe(val path, val mode_str);
void stream_init(void);