diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 21:22:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 21:22:32 -0700 |
commit | c3700b0be6c78154e811a3225128efec098efcaf (patch) | |
tree | f16781e33cf92a3a9672ab3035afadd752cd0c17 | |
parent | 246887dce1d8d09ec2a5af5f019613ac064e779c (diff) | |
download | txr-c3700b0be6c78154e811a3225128efec098efcaf.tar.gz txr-c3700b0be6c78154e811a3225128efec098efcaf.tar.bz2 txr-c3700b0be6c78154e811a3225128efec098efcaf.zip |
* eval.c (eval_init): Registered open-command and open-process
intrinsics. open-pipe is now deprecated but stays for backward
compatibility as a synonym for open-command.
* stream.c (open_pipe): Renamed to open_command.
(open_pipevp): Renamed to open_process.
* stream.h (open_pipe, open_pipevp): Declarations updated.
* txr.1: Documentation headings updated.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | eval.c | 5 | ||||
-rw-r--r-- | stream.c | 8 | ||||
-rw-r--r-- | stream.h | 4 | ||||
-rw-r--r-- | txr.1 | 4 |
5 files changed, 25 insertions, 9 deletions
@@ -1,5 +1,18 @@ 2012-05-18 Kaz Kylheku <kaz@kylheku.com> + * eval.c (eval_init): Registered open-command and open-process + intrinsics. open-pipe is now deprecated but stays for backward + compatibility as a synonym for open-command. + + * stream.c (open_pipe): Renamed to open_command. + (open_pipevp): Renamed to open_process. + + * stream.h (open_pipe, open_pipevp): Declarations updated. + + * txr.1: Documentation headings updated. + +2012-05-18 Kaz Kylheku <kaz@kylheku.com> + * stream.c (open_pipev): Bugfix: program name is included as first element of argv. @@ -2290,8 +2290,9 @@ void eval_init(void) reg_fun(intern(lit("flush-stream"), user_package), func_n1(flush_stream)); 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-pipe"), user_package), func_n2(open_pipe)); - reg_fun(intern(lit("open-pipe-args"), user_package), func_n3o(open_pipevp, 2)); + 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)); reg_var(intern(lit("*user-package*"), user_package), &user_package); reg_var(intern(lit("*keyword-package*"), user_package), &keyword_package); @@ -1515,7 +1515,7 @@ val open_file(val path, val mode_str) return make_stdio_stream(f, path, input, output); } -val open_pipe(val path, val mode_str) +val open_command(val path, val mode_str) { FILE *f = w_popen(c_str(path), c_str(mode_str)); val input = nil, output = nil; @@ -1537,7 +1537,7 @@ val open_pipe(val path, val mode_str) } #if HAVE_FORK_STUFF -val open_pipevp(val name, val mode_str, val args) +val open_process(val name, val mode_str, val args) { int input = equal(mode_str, lit("r")) || equal(mode_str, lit("rb")); int fd[2]; @@ -1658,10 +1658,10 @@ static val win_make_cmdline(val args) return out; } -val open_pipevp(val name, val mode_str, val args) +val open_process(val name, val mode_str, val args) { val win_cmdline = win_make_cmdline(cons(name, args)); - return open_pipe(win_cmdline, mode_str); + return open_command(win_cmdline, mode_str); } #endif @@ -52,7 +52,7 @@ val put_byte(val byte, val stream); 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); -val open_pipevp(val path, val mode_str, val args); +val open_command(val path, val mode_str); +val open_process(val path, val mode_str, val args); void stream_init(void); @@ -7483,7 +7483,9 @@ Examples: .SS Function open-directory -.SS Functions open-file, open-pipe, open-pipe-args +.SS Functions open-file + +.SS Functions open-command, open-process .SS Variables *user-package*, *keyword-package*, *system-package* |