From cfaedf5db44ce9c783502bc14aa9523e8c131dbf Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 31 Jul 2018 22:15:06 +0100 Subject: [PATCH] consult --- packages/swig/android/streamer.cpp | 9 --------- pl/consult.yap | 3 +++ pl/top.yap | 12 ++++++++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/packages/swig/android/streamer.cpp b/packages/swig/android/streamer.cpp index ebbd789e3..39c458202 100644 --- a/packages/swig/android/streamer.cpp +++ b/packages/swig/android/streamer.cpp @@ -77,15 +77,6 @@ static int64_t and_seek(int sno, int64_t where, int how) { static void and_flush(int sno) { -buff0 += '\0'; -streamerInstance->display(buff0); - - - -// -// Created by vsc on 11-07-2017. -// - } diff --git a/pl/consult.yap b/pl/consult.yap index 6cb1e38b9..e2f6c27ec 100644 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -681,6 +681,9 @@ db_files(Fs) :- '$csult'(Fs, M) :- '$load_files'(M:Fs,[consult(consult)],[M:Fs]). + '$csult_in_mod'(M, -F ) :- $load_files'(M:F,[],[M:F]) + '$csult_in_mod'(M, F ) :- $load_files'(M:F,[consult(consult)],[M:F]) + '$extract_minus'([], []). '$extract_minus'([-F|Fs], [F|MFs]) :- '$extract_minus'(Fs, MFs). diff --git a/pl/top.yap b/pl/top.yap index 9915e846d..eed506471 100644 --- a/pl/top.yap +++ b/pl/top.yap @@ -699,11 +699,15 @@ write_query_answer( Bindings ) :- '$call'(not(X), _CP, G0, M) :- !, \+ ('$current_choice_point'(CP), '$call'(X,CP,G0,M) ). -'$call'(!, CP, _,_) :- !, +'$call'(!, CP, CP,G0) :- !, '$$cut_by'(CP). -'$call'([A|B], _, _, M) :- !, - '$csult'([A|B], M). -'$call'(G, _CP, _G0, CurMod) :- +'$call'([X|Y], _, _, M) :- + (Y == [] -> + consult(M:X) + ; + '$csult'([X|Y] ,M) + ), + $call'(G, _CP, _G0, CurMod) :- % /* % ( % '$is_metapredicate'(G,CurMod)