style check should always use true file name
pipe open was returning output descriptor twice. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1545 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
9e688978c3
commit
919c1946f3
@ -1977,6 +1977,7 @@ p_open_pipe_stream (void)
|
|||||||
sno = GetFreeStreamD();
|
sno = GetFreeStreamD();
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return (PlIOError (SYSTEM_ERROR,TermNil, "new stream not available for open_pipe_stream/2"));
|
return (PlIOError (SYSTEM_ERROR,TermNil, "new stream not available for open_pipe_stream/2"));
|
||||||
|
t1 = MkStream (sno);
|
||||||
st = &Stream[sno];
|
st = &Stream[sno];
|
||||||
st->status = Input_Stream_f | Pipe_Stream_f;
|
st->status = Input_Stream_f | Pipe_Stream_f;
|
||||||
st->linepos = 0;
|
st->linepos = 0;
|
||||||
@ -1996,7 +1997,6 @@ p_open_pipe_stream (void)
|
|||||||
sno = GetFreeStreamD();
|
sno = GetFreeStreamD();
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return (PlIOError (SYSTEM_ERROR,TermNil, "new stream not available for open_pipe_stream/2"));
|
return (PlIOError (SYSTEM_ERROR,TermNil, "new stream not available for open_pipe_stream/2"));
|
||||||
t1 = MkStream (sno);
|
|
||||||
st = &Stream[sno];
|
st = &Stream[sno];
|
||||||
st->status = Output_Stream_f | Pipe_Stream_f;
|
st->status = Output_Stream_f | Pipe_Stream_f;
|
||||||
st->linepos = 0;
|
st->linepos = 0;
|
||||||
@ -3272,7 +3272,7 @@ p_file_name (void)
|
|||||||
tout = MkAtomTerm(Yap_LookupAtom("charsio"));
|
tout = MkAtomTerm(Yap_LookupAtom("charsio"));
|
||||||
else
|
else
|
||||||
tout = MkAtomTerm(Stream[sno].u.file.name);
|
tout = MkAtomTerm(Stream[sno].u.file.name);
|
||||||
return (Yap_unify_constant (ARG2, tout));
|
return Yap_unify_constant (ARG2, tout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.0:</h2>
|
<h2>Yap-5.1.0:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li> FIXED: pipe open was returning the same descriptor twice (Christian Thaeter).</li>
|
||||||
|
<li> FIXED: style check should compare with true file name.</li>
|
||||||
<li> FIXED: ^c should take care about TR and B.</li>
|
<li> FIXED: ^c should take care about TR and B.</li>
|
||||||
<li> FIXED: don't pass a pointer to a mpz_t. (Nuno Fonseca)</li>
|
<li> FIXED: don't pass a pointer to a mpz_t. (Nuno Fonseca)</li>
|
||||||
<li> FIXED: handle heap overflow from huge atoms in Yap_LookupAtom/scanner (Nuno Fonseca).</li>
|
<li> FIXED: handle heap overflow from huge atoms in Yap_LookupAtom/scanner (Nuno Fonseca).</li>
|
||||||
|
@ -192,7 +192,7 @@ use_module(M,F,Is) :-
|
|||||||
'$consult_infolevel'(InfLevel),
|
'$consult_infolevel'(InfLevel),
|
||||||
recorda('$initialisation','$',_),
|
recorda('$initialisation','$',_),
|
||||||
( Reconsult = reconsult ->
|
( Reconsult = reconsult ->
|
||||||
'$start_reconsulting'(F),
|
'$start_reconsulting'(File),
|
||||||
'$start_consult'(Reconsult,File,LC),
|
'$start_consult'(Reconsult,File,LC),
|
||||||
'$remove_multifile_clauses'(File),
|
'$remove_multifile_clauses'(File),
|
||||||
StartMsg = reconsulting,
|
StartMsg = reconsulting,
|
||||||
@ -284,14 +284,7 @@ use_module(M,F,Is) :-
|
|||||||
;
|
;
|
||||||
Opts=[silent(true)]
|
Opts=[silent(true)]
|
||||||
),
|
),
|
||||||
( '$find_in_path'(X,Y,reconsult(X)),
|
load_files(X, Opts),
|
||||||
'$open'(Y,'$csult',Stream,0) ->
|
|
||||||
( '$access_yap_flags'(15, 0) -> true ; '$skip_unix_comments'(Stream) ),
|
|
||||||
load_files(Y,[stream(Stream)|Opts])
|
|
||||||
;
|
|
||||||
'$output_error_message'(permission_error(input,stream,X),reconsult(X))
|
|
||||||
),
|
|
||||||
|
|
||||||
( '$access_yap_flags'(15, 0) -> true ; halt).
|
( '$access_yap_flags'(15, 0) -> true ; halt).
|
||||||
|
|
||||||
'$skip_unix_comments'(Stream) :-
|
'$skip_unix_comments'(Stream) :-
|
||||||
|
Reference in New Issue
Block a user