diff --git a/library/heaps.yap b/library/heaps.yap index d7e7669e7..5a2e94e43 100644 --- a/library/heaps.yap +++ b/library/heaps.yap @@ -223,7 +223,7 @@ min_of_heap(t(_,_,t(Key1,Datum1,Lson,Rson)), Key1, Datum1, Key2, Datum2) :- min_of_heap(Lson, Rson, Key2, Datum2). -min_of_heap(t(Ka,Da,_,_), t(Kb,Db,_,_), Kb, Db) :- +min_of_heap(t(Ka,_Da,_,_), t(Kb,Db,_,_), Kb, Db) :- Kb @< Ka, !. min_of_heap(t(Ka,Da,_,_), _, Ka, Da). min_of_heap(t, t(Kb,Db,_,_), Kb, Db). diff --git a/library/system.yap b/library/system.yap index def416df4..156470324 100644 --- a/library/system.yap +++ b/library/system.yap @@ -289,7 +289,7 @@ win_popen(0, Command, ForReading, Result) :- exec_command(Command, 0, ForWriting, 2, _, Result), close(ForWriting). win_popen(1, Command, ForWriting, Result) :- - open_pipe_streams(Stream, ForWriting), + open_pipe_streams(ForReading, ForWriting), exec_command(Command, ForReading, 1, 2, _, Result), close(ForReading). @@ -358,7 +358,7 @@ get_shell0(Shell) :- getenv('SHELL', Shell), !. get_shell0(Shell) :- win, !, - getenv('COMSPEC', Shell0). + getenv('COMSPEC', Shell). get_shell0('/bin/sh'). get_shell(Shell) :-