make -g option SWI compatible

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1884 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-05-20 11:27:37 +00:00
parent ed228a51e0
commit 530df10f5c
3 changed files with 9 additions and 2 deletions

View File

@ -2678,7 +2678,6 @@ p_open_mem_read_stream (void) /* $open_mem_read_stream(+List,-Stream) */
ti = TailOfTerm(ti);
}
nbuf[nchars] = '\0';
fprintf(stderr,"nbuf=%s\n",nbuf);
sno = open_buf_read_stream(nbuf, nchars);
t = MkStream (sno);
return (Yap_unify (ARG2, t));

View File

@ -16,6 +16,7 @@
<h2>Yap-5.1.2:</h2>
<ul>
<li> FIXED: add . to -g goal (obs from Paulo Moura).</li>
<li> FIXED: min_list (obs from Angelika, Bernd & Niels).</li>
<li> FIXED: issues with C-Interface (obs from Trevor Walker).</li>
<li> FIXED: mktime needs to know if daylight time savings are on

View File

@ -795,7 +795,8 @@ nth_instance(X,Y,Z) :-
'$run_atom_goal'(GA) :-
'$current_module'(Module),
atom_codes(GA,Gs),
atom_codes(GA,Gs0),
'$add_dot_to_atom_goal'(Gs0,Gs),
charsio:open_mem_read_stream(Gs, Stream),
( '$system_catch'(read(Stream, G),Module,_,fail) ->
close(Stream)
@ -805,6 +806,12 @@ nth_instance(X,Y,Z) :-
),
'$system_catch'('$query'(once(G), []),Module,Error,user:'$Error'(Error)).
'$add_dot_to_atom_goal'([],[0'.]) :- !.
'$add_dot_to_atom_goal'([0'.],[0'.]) :- !.
'$add_dot_to_atom_goal'([C|Gs0],[C|Gs]) :-
'$add_dot_to_atom_goal'(Gs0,Gs).
prolog_current_frame(Env) :-
Env is '$env'.