This commit is contained in:
Vitor Santos Costa 2018-11-22 13:48:21 +00:00
parent b7cdaa10ec
commit 5fdd481d6c
6 changed files with 25 additions and 19 deletions

View File

@ -952,8 +952,8 @@ target_link_libraries(yap-bin libYap)
install(TARGETS libYap yap-bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

View File

@ -22,6 +22,13 @@
@brief global flags and their values.
*/
#ifdef __ANDROID__
#define IN_ANDROID "true"
#else
#define IN_ANDROID "false"
#endif
START_GLOBAL_FLAGS
/**<
@ -63,14 +70,10 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
/**< how to present answers, default is `~p`. */
YAP_FLAG(ANSWER_FORMAT_FLAG, "answer_format", true, isatom, "~p", NULL),
#if __ANDROID__
/**<
read-only boolean, a machine running an Google's Android version of the
Linux Operating System */
YAP_FLAG(ANDROID_FLAG, "android", false, booleanFlag, "true", NULL),
#else
YAP_FLAG(ANDROID_FLAG, "android", false, booleanFlag, "false", NULL),
#endif
YAP_FLAG(ANDROID_FLAG, "android", false, booleanFlag, IN_ANDROID, NULL),
#if __APPLE__
/**<

View File

@ -28,9 +28,9 @@ target_link_libraries(Py4YAP libYap ${PYTHON_LIBRARIES})
install(TARGETS Py4YAP
RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR}
LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

View File

@ -476,9 +476,12 @@ If this hook preodicate succeeds it must instantiate the _Action_ argument to t
:- ensure_loaded('../pl/pathconf.yap').
:- yap_flag(user:unknown,error).
:- ( get_prolog_flag(android,true) -> ensure_loaded(library(android)) ; true ).
%:- ensure_loaded('../android.yap').
:- set_prolog_flag(unknown,error).
%% @}

View File

@ -704,8 +704,8 @@ db_files(Fs) :-
'$csult'(Fs, M) :-
load_files(M:Fs,[consult(consult)]).
'$csult_in_mod'(M, -F ) :- $load_files'(M:F,[],[M:F])
'$csult_in_mod'(M, F ) :- $load_files'(M:F,[consult(consult)],[M:F])
'$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]) :-
@ -813,7 +813,7 @@ db_files(Fs) :-
'__NB_getval__'('$if_level', OldIfLevel, fail), !,
nb_setval('$if_level',0).
'$reset_if'(0) :-
nb_setval('$if_le1vel',0).
nb_setval('$if_level',0).
'$get_if'(Level0) :-
'__NB_getval__'('$if_level', Level, fail), !,
@ -930,7 +930,7 @@ nb_setval('$if_le1vel',0).
%
'$do_startup_reconsult'(_X) :-
'$init_win_graphics',
fail.
fail.../
'$do_startup_reconsult'(X) :-
catch(load_files(user:X, [silent(true)]), Error, '$LoopError'(Error, consult)),
!,

View File

@ -712,15 +712,15 @@ write_query_answer( Bindings ) :-
'$call'(not(X), _CP, G0, M) :- !,
\+ ('$current_choice_point'(CP),
'$call'(X,CP,G0,M) ).
'$call'(!, CP, CP,G0) :- !,
'$call'(!, CP, CP,_G0) :- !,
'$$cut_by'(CP).
'$call'([X|Y], _, _, M) :-
(Y == [] ->
consult(M:X)
;
'$csult'([X|Y] ,M)
),
$call'(G, _CP, _G0, CurMod) :-
).
'$call'(G, _CP, _G0, CurMod) :-
% /*
% (
% '$is_metapredicate'(G,CurMod)