From a6cb6f6a2560dafbf73d9686d3ff0e11f306d784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Sun, 16 Mar 2014 18:59:54 +0000 Subject: [PATCH] paths are hard --- pl/arith.yap | 3 +++ pl/boot.yap | 10 +++++----- pl/consult.yap | 6 ++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pl/arith.yap b/pl/arith.yap index c8f59f9bf..8af05001e 100644 --- a/pl/arith.yap +++ b/pl/arith.yap @@ -167,6 +167,9 @@ do_not_compile_expressions :- set_value('$c_arith',[]). var(V), !. '$expand_expr'([T], E, V) :- !, '$expand_expr'(T, E, V). +'$expand_expr'(String, _E, V) :- + string( String ), !, + string_codes(String, [V]). '$expand_expr'(A, true, A) :- atomic(A), !. '$expand_expr'(T, E, V) :- diff --git a/pl/boot.yap b/pl/boot.yap index ec63e6a0e..2ac8d4ed0 100755 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -28,11 +28,6 @@ true :- true. '$init_system'. '$do_live' :- - '$swi_current_prolog_flag'(file_name_variables, OldF), - '$swi_set_prolog_flag'(file_name_variables, true), - '$init_consult', - '$swi_set_prolog_flag'(file_name_variables, OldF), - '$init_win_graphics', repeat, '$current_module'(Module), ( Module==user -> @@ -72,6 +67,11 @@ true :- true. % ; % true % ), + '$swi_current_prolog_flag'(file_name_variables, OldF), + '$swi_set_prolog_flag'(file_name_variables, true), + '$init_consult', + '$swi_set_prolog_flag'(file_name_variables, OldF), + '$init_win_graphics', '$init_globals', '$swi_set_prolog_flag'(fileerrors, true), set_value('$gc',on), diff --git a/pl/consult.yap b/pl/consult.yap index ebc1ebacf..4e215e7f3 100755 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -594,6 +594,12 @@ initialization(G,OPT) :- '$extend_exports'(File, Imports, OldF ) ). +% +% reconsult at startup... +% +'$do_startup_reconsult'(_X) :- + '$init_win_graphics', + fail. '$do_startup_reconsult'(X) :- ( '$access_yap_flags'(15, 0) -> '$system_catch'(load_files(X, [silent(true)]), Module, Error, '$Error'(Error))