indentation
This commit is contained in:
parent
80363e359e
commit
15c79d8ecf
54
pl/boot.yap
54
pl/boot.yap
@ -362,7 +362,16 @@ true :- true.
|
|||||||
(
|
(
|
||||||
'$undefined'('$init_preds',prolog)
|
'$undefined'('$init_preds',prolog)
|
||||||
->
|
->
|
||||||
|
get_value('$consult_on_boot',X),
|
||||||
|
(
|
||||||
|
X \= []
|
||||||
|
->
|
||||||
|
bootstrap(X),
|
||||||
|
module( user ),
|
||||||
|
qsave_program( "startup.yss")
|
||||||
|
;
|
||||||
true
|
true
|
||||||
|
)
|
||||||
;
|
;
|
||||||
'$init_state'
|
'$init_state'
|
||||||
),
|
),
|
||||||
@ -457,8 +466,11 @@ true :- true.
|
|||||||
)
|
)
|
||||||
), !.
|
), !.
|
||||||
|
|
||||||
'$handle_toplevel_error'(_, syntax_error(_)) :- !, fail.
|
'$handle_toplevel_error'(_, syntax_error(_)) :-
|
||||||
'$handle_toplevel_error'(end_of_file, error(io_error(read,user_input),_)) :- !.
|
!,
|
||||||
|
fail.
|
||||||
|
'$handle_toplevel_error'(end_of_file, error(io_error(read,user_input),_)) :-
|
||||||
|
!.
|
||||||
'$handle_toplevel_error'(_, E) :-
|
'$handle_toplevel_error'(_, E) :-
|
||||||
throw(E).
|
throw(E).
|
||||||
|
|
||||||
@ -490,7 +502,17 @@ true :- true.
|
|||||||
set_value('$top_level_goal',[]),
|
set_value('$top_level_goal',[]),
|
||||||
'$run_atom_goal'(GA),
|
'$run_atom_goal'(GA),
|
||||||
'$swi_current_prolog_flag'(break_level, BreakLevel),
|
'$swi_current_prolog_flag'(break_level, BreakLevel),
|
||||||
( Breaklevel \= 0 -> true ; '$pred_exists'(halt(_), user) -> halt(0) ; '$halt'(0) ).
|
(
|
||||||
|
Breaklevel \= 0
|
||||||
|
->
|
||||||
|
true
|
||||||
|
;
|
||||||
|
'$pred_exists'(halt(_), user)
|
||||||
|
->
|
||||||
|
halt(0)
|
||||||
|
;
|
||||||
|
'$halt'(0)
|
||||||
|
).
|
||||||
'$enter_top_level' :-
|
'$enter_top_level' :-
|
||||||
flush_output,
|
flush_output,
|
||||||
'$run_toplevel_hooks',
|
'$run_toplevel_hooks',
|
||||||
@ -502,7 +524,16 @@ true :- true.
|
|||||||
nb_setval('$debug_jump',off),
|
nb_setval('$debug_jump',off),
|
||||||
'$command'(Command,Varnames,_Pos,top),
|
'$command'(Command,Varnames,_Pos,top),
|
||||||
'$swi_current_prolog_flag'(break_level, BreakLevel),
|
'$swi_current_prolog_flag'(break_level, BreakLevel),
|
||||||
( BreakLevel \= 0 -> true ; '$pred_exists'(halt(_), user) -> halt(0) ; '$halt'(0) ).
|
(
|
||||||
|
BreakLevel \= 0
|
||||||
|
->
|
||||||
|
true
|
||||||
|
;
|
||||||
|
'$pred_exists'(halt(_), user)
|
||||||
|
-> halt(0)
|
||||||
|
;
|
||||||
|
'$halt'(0)
|
||||||
|
).
|
||||||
|
|
||||||
|
|
||||||
'$erase_sets' :-
|
'$erase_sets' :-
|
||||||
@ -1299,21 +1330,6 @@ not(G) :- \+ '$execute'(G).
|
|||||||
'$check_callable'(_,_).
|
'$check_callable'(_,_).
|
||||||
|
|
||||||
|
|
||||||
'$silent_bootstrap'(F) :-
|
|
||||||
'$init_globals',
|
|
||||||
nb_setval('$if_level',0),
|
|
||||||
'$swi_current_prolog_flag'(verbose_load, OldSilent),
|
|
||||||
'$swi_set_prolog_flag'(verbose_load, silent),
|
|
||||||
bootstrap(F),
|
|
||||||
% -p option must be processed after initializing the system
|
|
||||||
'$swi_set_prolog_flag'(verbose_load, OldSilent).
|
|
||||||
|
|
||||||
bootstrap :-
|
|
||||||
'$argv'([F]),
|
|
||||||
bootstrap(F),
|
|
||||||
module(user),
|
|
||||||
qsave_program('startup.yss').
|
|
||||||
|
|
||||||
bootstrap(F) :-
|
bootstrap(F) :-
|
||||||
% '$open'(F, '$csult', Stream, 0, 0, F),
|
% '$open'(F, '$csult', Stream, 0, 0, F),
|
||||||
% '$file_name'(Stream,File),
|
% '$file_name'(Stream,File),
|
||||||
|
@ -801,9 +801,7 @@ db_files(Fs) :-
|
|||||||
lists:member(G,LGs),
|
lists:member(G,LGs),
|
||||||
% run initialization under user control (so allow debugging this stuff).
|
% run initialization under user control (so allow debugging this stuff).
|
||||||
(
|
(
|
||||||
'$system_catch'(('$user_call'(G,M) -> true), M, Error, user:'$LoopError'(Error, top)),
|
'$system_catch'('$user_call'(G,M), M, Error, user:'$LoopError'(Error, top)) ->
|
||||||
fail
|
|
||||||
;
|
|
||||||
fail
|
fail
|
||||||
).
|
).
|
||||||
'$exec_initialisation_goals' :-
|
'$exec_initialisation_goals' :-
|
||||||
|
@ -118,7 +118,7 @@ otherwise.
|
|||||||
:- bootstrap('os.yap').
|
:- bootstrap('os.yap').
|
||||||
:- bootstrap('absf.yap').
|
:- bootstrap('absf.yap').
|
||||||
|
|
||||||
|
:-'$swi_set_prolog_flag'(verbose, normal).
|
||||||
|
|
||||||
:- [ 'directives.yap',
|
:- [ 'directives.yap',
|
||||||
'utils.yap',
|
'utils.yap',
|
||||||
|
Reference in New Issue
Block a user