From 5285db54f7199cf75c0b740faaeee15cc9cc8c6a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 27 Nov 2013 21:05:51 -0800 Subject: * configure: Added check to detect POSIX sleep function. * eval.c (eval_init): Register new open_tail function as intrinsic. * match.c (complex_snarf, complex_stream): Update calls to make_stdio_stream and make_pipe_stream to take fewer arguments. (match_files): Support a stream object as a data source specification in place of a string. * parser.l (parse_reset): Update call to make_stdio_stream to take fewer arguments. * stream.c: Inclusion of made properly conditional. (struct stdio_handle): pid member defined as pid_t only if we have fork functionality, otherwise defined as int. (tail_get_line, tail_get_char, tail_get_byte): New static functions. (tail_ops): New static structure. (make_stdio_stream_common): New static structure. (make_stdio_stream, make_pipe_stream): These functions lose the input and output parameters, which ended up never used. Reimplemented in terms of new common function. (make_tail_stream): New function. (make_pipevp_stream): Reimplemented in terms of new common function. (open_file, open_command): Simplified by removal of useless local variables and their computation, which used to be extra arguments to make_stdio_stream and make_pipe_stream. (open_tail): New function. (stream_init): Calls to make_stdio_stream updated. * stream.h (make_stdio_stream, make_pipe_stream): Declarations updated. (make_tail_stream, open_tail): Declared. * txr.c (txr_main): Calls to make_stdio_stream updated. --- eval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 1bbab315..003a0623 100644 --- a/eval.c +++ b/eval.c @@ -2366,6 +2366,7 @@ void eval_init(void) reg_fun(intern(lit("open-directory"), user_package), func_n1(open_directory)); reg_fun(intern(lit("open-file"), user_package), func_n2(open_file)); + reg_fun(intern(lit("open-tail"), user_package), func_n3(open_tail)); reg_fun(intern(lit("open-command"), user_package), func_n2(open_command)); reg_fun(intern(lit("open-pipe"), user_package), func_n2(open_command)); reg_fun(intern(lit("open-process"), user_package), func_n3o(open_process, 2)); -- cgit v1.2.3