From 516f89b76d322d72e32244a83be08ce732da829c Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 10 May 2016 15:44:28 +0100 Subject: [PATCH] verbosity cleanup -- not finished yet --- CMakeLists.txt | 1 + pl/boot.yap | 6 ++---- pl/consult.yap | 1 - pl/messages.yap | 8 +++++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78b8580dc..42339b02e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,7 @@ else() endif() + option (WITH_CUDD "BDD CUDD package" ON) if (WITH_CUDD) #detect cudd setup, as it is shared between different installations. diff --git a/pl/boot.yap b/pl/boot.yap index dcc2f893f..ff7a8f94c 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -1383,11 +1383,9 @@ not(G) :- \+ '$execute'(G). '$silent_bootstrap'(F) :- - yap_flag(verbose, _, silent), - yap_flag(verbose_load, _, silent), + yap_flag(verbose, Old, silent), bootstrap( F ), - yap_flag(verbose, _, normal), - yap_flag(verbose_load, _, normal), + yap_flag(verbose, _, Old), '$live'. diff --git a/pl/consult.yap b/pl/consult.yap index 959cc47b7..ed8daf1f1 100644 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -260,7 +260,6 @@ load_files(Files,Opts) :- '$load_files'(Files, Opts, Call) :- ( '$nb_getval'('$lf_status', OldTOpts, fail), nonvar(OldTOpts) -> - '$lf_opt'(silent, OldTOpts, OldVerbosity), '$lf_opt'(autoload, OldTOpts, OldAutoload) ; '$lf_option'(last_opt, LastOpt), diff --git a/pl/messages.yap b/pl/messages.yap index 787462779..9a7b24f00 100644 --- a/pl/messages.yap +++ b/pl/messages.yap @@ -884,13 +884,15 @@ stub to ensure everything os ok */ +prolog:print_message(Level, _Msg) :- + current_prolog_flag(verbose, silent), + Level \= error, + Level \= warning, + !. prolog:print_message(_, _Msg) :- % first step at hook processi --ng '$nb_getval'('$if_skip_mode',skip,fail), !. -prolog:print_message(informational, _Msg) :- - current_prolog_flag(verbose, silent), - !. prolog:print_message(banner, _Msg) :- current_prolog_flag(verbose, silent), !.