diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-12-08 18:11:59 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-12-08 18:11:59 -0800 |
commit | c71b79a13a7960f255e6e1d66ca543daba328771 (patch) | |
tree | 30bf8f53afcf65ad0b8500ef879a5a4e99868dd9 /lib.c | |
parent | 8834a98cff2d8f80458957fccab5424f4b90cde5 (diff) | |
download | txr-c71b79a13a7960f255e6e1d66ca543daba328771.tar.gz txr-c71b79a13a7960f255e6e1d66ca543daba328771.tar.bz2 txr-c71b79a13a7960f255e6e1d66ca543daba328771.zip |
New feature: structure delegate streams.
A new kind of stream object which redirects its operations to
the methods of a structure.
* Makefile (OBJS): New object file, strudel.o.
* lib.c (init): Call new strudel_init function.
* lisplib.c (stream_wrap_set_entries,
stream_wrap_instantiate): New static functions.
(lisplib_init): Arrange for autloading of new stream-wrap.tl.
* share/txr/stdlib/stream-wrap.tl: New file.
* stream.c (put_string_s, put_char_s, put_byte_s, get_line_s,
get_char_s, get_byte_s, unget_char_s, unget_byte_s, put_buf_s,
fill_buf_s, flush_s, seek_s, truncate_s, get_prop_s,
set_prop_s, get_error_s, get_error_str_s, clear_error_s,
get_fd_s): New symbol variables.
(stream_init): New symbol variables initialized. Numerous
functions registered via these variables now rather than
intern(...) expressions.
* stream.h (put_string_s, put_char_s, put_byte_s, get_line_s,
get_char_s, get_byte_s, unget_char_s, unget_byte_s, put_buf_s,
fill_buf_s, flush_s, seek_s, truncate_s, get_prop_s,
set_prop_s, get_error_s, get_error_str_s, clear_error_s,
get_fd_s): Declared.
* strudel.c, strudel.h: New files.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -55,6 +55,7 @@ #include "unwind.h" #include "args.h" #include "stream.h" +#include "strudel.h" #include "utf8.h" #include "filter.h" #include "eval.h" @@ -11704,6 +11705,7 @@ void init(val *stack_bottom) arith_init(); rand_init(); stream_init(); + strudel_init(); #if HAVE_POSIX_SIGS sig_init(); #endif |