Commit 15e6b562 authored by Michael Hanus 's avatar Michael Hanus
Browse files

setEnv/unsetEnv fixed

parent 98291a3d
...@@ -15,13 +15,11 @@ ...@@ -15,13 +15,11 @@
'System.Environment.prim_setEnviron'(Var,Value,'Prelude.()') :- 'System.Environment.prim_setEnviron'(Var,Value,'Prelude.()') :-
string2Atom(Var,AtomVar), string2Atom(Var,AtomVar),
string2Atom(Value,AtomValue), string2Atom(Value,AtomValue),
catch(setEnv(AtomVar,AtomValue), _, setEnv(AtomVar,AtomValue).
prolog:set_system_property(AtomVar,AtomValue)).
'System.Environment.prim_unsetEnviron'(Var,'Prelude.()') :- 'System.Environment.prim_unsetEnviron'(Var,'Prelude.()') :-
string2Atom(Var,AtomVar), string2Atom(Var,AtomVar),
catch(unsetEnv(AtomVar), _, unsetEnv(AtomVar).
'System.Environment.prim_setEnviron'(Var,[],'Prelude.()')).
'System.Environment.getHostname'(String) :- 'System.Environment.getHostname'(String) :-
getHostname(Name), getHostname(Name),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment