diff options
Diffstat (limited to 'lisplib.c')
-rw-r--r-- | lisplib.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -189,6 +189,27 @@ static val struct_instantiate(val set_fun) return nil; } +static val with_stream_set_entries(val dlt, val fun) +{ + val name[] = { + lit("with-out-string-stream"), + lit("with-out-strlist-stream"), + lit("with-in-string-stream"), + lit("with-in-string-byte-stream"), + lit("with-stream"), + nil + }; + set_dlt_entries(dlt, name, fun); + return nil; +} + +static val with_stream_instantiate(val set_fun) +{ + funcall1(set_fun, nil); + load(format(nil, lit("~a/with-stream.tl"), stdlib_path, nao)); + return nil; +} + val dlt_register(val dlt, val (*instantiate)(val), val (*set_entries)(val, val)) @@ -207,6 +228,7 @@ void lisplib_init(void) dlt_register(dl_table, with_resources_instantiate, with_resources_set_entries); dlt_register(dl_table, path_test_instantiate, path_test_set_entries); dlt_register(dl_table, struct_instantiate, struct_set_entries); + dlt_register(dl_table, with_stream_instantiate, with_stream_set_entries); } val lisplib_try_load(val sym) |