Mercurial > hg > plml
changeset 30:adce0075bf6c
Fixed ml_open option processing and added new cmd/1 option to select executable.
author | samer |
---|---|
date | Sun, 04 Mar 2012 16:10:23 +0000 |
parents | eefd012640e8 |
children | 39d648b9a6c3 fc72b98aba8c |
files | prolog/plml.pl |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/prolog/plml.pl Fri Feb 24 18:39:34 2012 +0000 +++ b/prolog/plml.pl Sun Mar 04 16:10:23 2012 +0000 @@ -288,9 +288,10 @@ ml_open(Id,Host,Options) :- ground(Id), options_flags(Options,Flags), - ( (Host=localhost;hostname(Host)) - -> Exec='exec matlab' % using exec fixes Ctrl-C bug - ; Exec='ssh /usr/local/bin/matlab' + option(cmd(Bin),Options,matlab), + ( (Host=localhost;hostname(HostName)) + -> format(atom(Exec),'exec ~w',[Bin]) % using exec fixes Ctrl-C bug + ; format(atom(Exec),'ssh ~w ~w',[HostName,Bin]) ), ( member(debug(In,Out),Options) -> debug(plml,'Running Matlab with protocol logging.',[]), @@ -320,7 +321,7 @@ nofail(P) :- catch(ignore(call(P)), E, print_message(warning,E)). nofail(P,X) :- catch(ignore(call(P,X)), E, print_message(warning,E)). -options_flags(_,'nodesktop -nosplash -noawt'). +options_flags(_,'-nodesktop -nosplash -noawt'). %% ml_exec(+Id:ml_eng, +Expr:ml_expr) is det.