This commit is contained in:
Vitor Santos Costa 2016-04-18 05:25:23 -07:00
parent 37649b7d1a
commit 6880fc20a6
5 changed files with 31 additions and 17 deletions

View File

@ -188,7 +188,7 @@ absolute_file_name(File0,File) :-
(
% look for solutions
'$find_in_path'(File, Opts,TrueFileName),
( (First == first -> ! ; nb_setarg(1, HasSol, yes) ),
( (First == first -> ! ; nb_setarg(1, HasSol, yes) ),
set_prolog_flag( fileerrors, PreviousFileErrors ),
set_prolog_flag( open_expands_filename, OldF),
set_prolog_flag( verbose_file_search, PreviousVerbose ),
@ -402,8 +402,8 @@ absolute_file_name(File0,File) :-
'$dir' --> { current_prolog_flag(windows, true) },
!,
"\\".
"\\",
!.
'$dir' --> "/".
'$dir'('/') --> !.
@ -441,26 +441,26 @@ absolute_file_name(File0,File) :-
'$absf_trace'(Msg, Args ) -->
{ current_prolog_flag( verbose_file_search, true ) },
!,
{ print_message( informational, absolute_file_path( Msg, Args ) ) }.
{ print_message( informational, absolute_file_path( Msg, Args ) ) },
!.
'$absf_trace'(_Msg, _Args ) --> [].
'$absf_trace'(Msg, Args ) :-
current_prolog_flag( verbose_file_search, true ),
!,
print_message( informational, absolute_file_path( Msg, Args ) ).
print_message( informational, absolute_file_path( Msg, Args ) ),
!.
'$absf_trace'(_Msg, _Args ).
'$absf_trace'( File ) :-
current_prolog_flag( verbose_file_search, true ),
!,
print_message( informational, absolute_file_path( File ) ).
print_message( informational, absolute_file_path( File ) ),
!.
'$absf_trace'( _File ).
'$absf_trace_options'(Args ) :-
current_prolog_flag( verbose_file_search, true ),
!,
print_message( informational, arguments( Args ) ).
print_message( informational, arguments( Args ) ),
!.
'$absf_trace_options'( _Args ).
/** @pred prolog_file_name( +File, -PrologFileaNme)

View File

@ -1361,11 +1361,20 @@ not(G) :- \+ '$execute'(G).
'$bootstrap' :-
bootstrap('pl/init.yap'),
bootstrap('init.yap'),
module(user),
'$live'.
'$silent_bootstrap'(F) :-
yap_flag(verbose, _, silent),
yap_flag(verbose_load, _, silent),
bootstrap( F ),
yap_flag(verbose, _, normal),
yap_flag(verbose_load, _, normal),
'$live'.
bootstrap(F) :-
% '$open'(F, '$csult', Stream, 0, 0, F),
% '$file_name'(Stream,File),

View File

@ -680,7 +680,7 @@ db_files(Fs) :-
'$lf_opt'(consult, TOpts, Reconsult0),
'$lf_opt'('$options', TOpts, Opts),
'$lf_opt'('$location', TOpts, ParentF:Line),
'$loaded'(File, UserFile, SourceModule, ParentF, Line, Reconsult0, Reconsult, Dir, Opts),
'$loaded'(File, UserFile, SourceModule, ParentF, Line, Reconsult0, Reconsult, Dir, Opts),
working_directory(OldD, Dir),
H0 is heapused, '$cputime'(T0,_),
current_prolog_flag(generate_debug_info, GenerateDebug),

View File

@ -106,10 +106,11 @@ otherwise.
'$continue_static_clause'(A,B,C,D,E).
'$do_static_clause'(_,_,_,_,_).
:- bootstrap('arith.yap').
:- '$all_current_modules'(M), yap_flag(M:unknown, error) ; true.
:- bootstrap('arith.yap').
:- compile_expressions.
@ -131,17 +132,17 @@ otherwise.
:- dynamic prolog:'$parent_module'/2.
%:- start_low_level_trace.
:- [
'directives.yap',
'preds.yap',
'modules.yap'
].
%:- stop_low_level_trace.
:- use_module('error.yap').
:- [
'errors.yap',
'utils.yap',
@ -200,6 +201,8 @@ version(yap,[6,3]).
:- ['undefined.yap'].
%:- start_low_level_trace.
:- multifile user:portray_message/2.
:- dynamic user:portray_message/2.

View File

@ -69,6 +69,8 @@ handling in YAP:
*/
:- module(system('$messages'),
[system_message/4,
prefix/6,