diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-16 18:56:39 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-16 18:56:39 -0800 |
commit | 8c299f44b94d4462147b9e3cb782c52c3669a1e5 (patch) | |
tree | f1ea94cd5de6f808696c1bb168d99b7c8766902c /stream.c | |
parent | dcd14af875e74e92379031076d48c526b57a06bf (diff) | |
download | txr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.tar.gz txr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.tar.bz2 txr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.zip |
* eval.c (eval_init): Register match-fun.
* match.c (v_do): Store match context.
(match_fun): New function.
* match.h (match_fun): Declared.
* stream.c (streamp): New function.
* stream.h (streamp): Declared.
* txr.1: Stub section for match-fun.
* txr.vim: Highlight match-fun.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -680,6 +680,11 @@ val make_dir_stream(DIR *dir) return cobj((mem_t *) dir, stream_s, &dir_ops.cobj_ops); } +val streamp(val obj) +{ + return typeof(obj) == stream_s ? t : nil; +} + val close_stream(val stream, val throw_on_error) { type_check (stream, COBJ); |