Mercurial > octave
changeset 22087:7f79c716876c
eliminate unused parameter from octave::sys::popen2
* oct-syscalls.h, oct-syscalls.cc (popen2): Eliminate interactive
parameter.
* syscalls.cc (Fpopen2): Don't pass INTERACTIVE to
octave::sys::popen2.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Jul 2016 13:02:58 -0400 |
parents | 67a44207da71 |
children | c3823cb0ea02 |
files | libinterp/corefcn/syscalls.cc liboctave/system/oct-syscalls.cc liboctave/system/oct-syscalls.h |
diffstat | 3 files changed, 7 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/syscalls.cc Mon Jul 11 13:20:58 2016 +0200 +++ b/libinterp/corefcn/syscalls.cc Mon Jul 11 13:02:58 2016 -0400 @@ -38,6 +38,7 @@ #include "fcntl-wrappers.h" #include "file-ops.h" #include "file-stat.h" +#include "lo-utils.h" #include "oct-env.h" #include "oct-syscalls.h" #include "oct-uname.h" @@ -45,7 +46,6 @@ #include "defun.h" #include "error.h" #include "errwarn.h" -#include "lo-utils.h" #include "oct-hist.h" #include "oct-map.h" #include "ovl.h" @@ -279,8 +279,8 @@ std::string msg; pid_t pid; - pid = octave::sys::popen2 (exec_file, arg_list, sync_mode, filedesc, - msg, interactive); + pid = octave::sys::popen2 (exec_file, arg_list, sync_mode, filedesc, msg); + if (pid < 0) error (msg.c_str ());
--- a/liboctave/system/oct-syscalls.cc Mon Jul 11 13:20:58 2016 +0200 +++ b/liboctave/system/oct-syscalls.cc Mon Jul 11 13:02:58 2016 -0400 @@ -321,25 +321,13 @@ bool sync_mode, int *fildes) { std::string msg; - bool interactive = false; - return octave::sys::popen2 (cmd, args, sync_mode, fildes, msg, - interactive); + return octave::sys::popen2 (cmd, args, sync_mode, fildes, msg); } pid_t popen2 (const std::string& cmd, const string_vector& args, bool sync_mode, int *fildes, std::string& msg) { - bool interactive = false; - return octave::sys::popen2 (cmd, args, sync_mode, fildes, msg, - interactive); - } - - pid_t - popen2 (const std::string& cmd, const string_vector& args, - bool sync_mode, int *fildes, std::string& msg, - bool & /* interactive */) - { char **argv = args.c_str_vec (); const char *errmsg;
--- a/liboctave/system/oct-syscalls.h Mon Jul 11 13:20:58 2016 +0200 +++ b/liboctave/system/oct-syscalls.h Mon Jul 11 13:02:58 2016 -0400 @@ -98,10 +98,6 @@ popen2 (const std::string&, const string_vector&, bool, int *, std::string&); - extern OCTAVE_API pid_t - popen2 (const std::string&, const string_vector&, bool, int *, - std::string&, bool &interactive); - extern OCTAVE_API int fcntl (int, int, long); extern OCTAVE_API int fcntl (int, int, long, std::string&); } @@ -128,9 +124,10 @@ OCTAVE_DEPRECATED ("use 'octave::sys::popen2' instead") inline pid_t popen2 (const std::string& cmd, const string_vector& args, - bool sync_mode, int *filedes, std::string& msg, bool &interactive) + bool sync_mode, int *filedes, std::string& msg, + bool &/*interactive*/) { - return octave::sys::popen2 (cmd, args, sync_mode, filedes, msg, interactive); + return octave::sys::popen2 (cmd, args, sync_mode, filedes, msg); } #endif