fix debugging of [-f].
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@398 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
a97390c1c3
commit
43cad85ace
@ -2251,6 +2251,8 @@ p_system_pred(void)
|
||||
goto restart_system_pred;
|
||||
}
|
||||
pe = RepPredProp(GetPredPropByFunc(funt, mod));
|
||||
} else if (IsPairTerm(t1)) {
|
||||
return (TRUE);
|
||||
} else
|
||||
return (FALSE);
|
||||
if (EndOfPAEntr(pe))
|
||||
|
@ -347,7 +347,6 @@ debugging :-
|
||||
'$set_creep'(_).
|
||||
|
||||
%'$spycalls'(G,_) :- write(user_error,'$spycalls'(G)), nl(user_error), fail.
|
||||
'$spycalls'([_|_],_,_) :- !, fail.
|
||||
'$spycalls'('!'(CP),Mod,_) :-
|
||||
'$call'(!, CP, !,Mod).
|
||||
'$spycalls'(Mod:G,_,Res) :-
|
||||
@ -383,8 +382,8 @@ debugging :-
|
||||
).
|
||||
'$spycalls'(G,M,_) :-
|
||||
'$system_predicate'(G,M),
|
||||
'$flags'(G,M,F,_),
|
||||
F /\ 0xc00000 =:= 0, % but not meta-predicate or cut transparent
|
||||
% '$flags'(G,M,F,_),
|
||||
% F /\ 0xc00000 =:= 0, % but not meta-predicate or cut transparent
|
||||
!,
|
||||
'$spycall_stdpred'(G,M),
|
||||
(true;
|
||||
@ -812,7 +811,6 @@ debugging :-
|
||||
write(user_error,[chk,L,P,Leap,SP,SC,SL,FS,CL,G]), nl(user_error),
|
||||
fail.
|
||||
*/
|
||||
'$chk'(_,_,[_|_],_,_) :- !, fail.
|
||||
'$chk'(P,L,G,Mod,SL) :-
|
||||
'$get_value'(spy_leap,Leap),
|
||||
(Leap = 0 -> true; % not leaping
|
||||
|
18
pl/utils.yap
18
pl/utils.yap
@ -194,7 +194,7 @@ rename(Old,New) :- atom(Old), atom(New), !,
|
||||
|
||||
unix(V) :- var(V), !,
|
||||
throw(error(instantiation_error,unix(V))).
|
||||
unix(argv(L)) :- (var(L) ; atom(L)), !, '$argv'(L).
|
||||
unix(argv(L)) :- '$is_list_of_atoms'(L,L), !, '$argv'(L).
|
||||
unix(argv(V)) :-
|
||||
throw(error(type_error(atomic,V),unix(argv(V)))).
|
||||
unix(cd) :- cd('~').
|
||||
@ -219,6 +219,22 @@ unix(shell) :- sh.
|
||||
unix(putenv(X,Y)) :- '$putenv'(X,Y).
|
||||
|
||||
|
||||
'$is_list_of_atoms'(V,_) :- var(V),!.
|
||||
'$is_list_of_atoms'([],_) :- !.
|
||||
'$is_list_of_atoms'([H|L],L0) :- !,
|
||||
'$check_if_head_may_be_atom'(H,L0),
|
||||
'$is_list_of_atoms'(L,L0).
|
||||
'$is_list_of_atoms'(H,L0) :-
|
||||
throw(error(type_error(list,H),unix(argv(L0)))).
|
||||
|
||||
'$check_if_head_may_be_atom'(H,L0) :-
|
||||
var(H), !.
|
||||
'$check_if_head_may_be_atom'(H,L0) :-
|
||||
atom(H), !.
|
||||
'$check_if_head_may_be_atom'(H,L0) :-
|
||||
throw(error(type_error(atom,H),unix(argv(L0)))).
|
||||
|
||||
|
||||
'$do_environ'(X, Y) :-
|
||||
var(X), !,
|
||||
throw(error(instantiation_error,unix(environ(X,Y)))).
|
||||
|
Reference in New Issue
Block a user