From 606a8eec6da5209b70126e502f9a61b2e5fe2211 Mon Sep 17 00:00:00 2001 From: unknown_lamer Date: Sat, 25 Jun 2005 18:11:10 +0000 Subject: [PATCH] [project @ 2005-06-25 18:11:10 by unknown_lamer] Guile's debugging evaluator is now enabled when --debug is used --- ChangeLog | 8 ++++++++ NEWS | 2 ++ source/Interp.C | 2 +- source/Main.C | 37 +++++++++++++++++++++++-------------- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 800c6c1..8d5e0ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-06-25 Clinton Ebadi + + * source/Main.C (real_main): Enable Guile debugging mode when + --debug is used + + * source/Interp.C (interp_post_startup_helper): Return + SCM_UNSPECIFIED instead of 0 + 2005-06-24 Clinton Ebadi * All: Updated FSF street address diff --git a/NEWS b/NEWS index 655161f..abd164e 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ Version 2.1.8: to the bobot++ functions * bot:msg and bot:say may both send to channels and users (instead of bot:msg for users and bot:say for channels) + + Debugging + * The debugging evaluator is now enabled when --debug is passed to the bot - Documentation + Merged documentation patch from Dale Smith (thanks) diff --git a/source/Interp.C b/source/Interp.C index 0b4ee35..40886ae 100644 --- a/source/Interp.C +++ b/source/Interp.C @@ -220,7 +220,7 @@ interp_post_startup_helper (void *bot_module) scm_primitive_load (scm_makfrom0str (String(PREFIX) + "/share/bobotpp/scripts/bobot-utils.scm")); - return 0; + return SCM_UNSPECIFIED; } void diff --git a/source/Main.C b/source/Main.C index 4d430b9..d119a74 100644 --- a/source/Main.C +++ b/source/Main.C @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. #ifdef HAVE_CONFIG_H #include "config.h" @@ -222,23 +223,31 @@ namespace // initialize the Parser Parser::init (); - if (!debug) { - if (background) - switch (fork()) { - case -1: - std::cout << "Could not run in the background. Exiting...\n"; - perror("fork"); - exit(1); - case 0: + if (!debug) + { + if (background) + switch (fork()) + { + case -1: + std::cout << "Could not run in the background. Exiting...\n"; + perror("fork"); + exit(1); + case 0: break; - default: - std::cout << "Running in the background...\n"; - exit(0); - } - } + default: + std::cout << "Running in the background...\n"; + exit(0); + } + } #ifdef USESCRIPTS Interp::Startup(); + if (debug) + { + SCM_DEVAL_P = 1; + SCM_RECORD_POSITIONS_P = 1; + SCM_RESET_DEBUG_MODE; + } #endif b = new Bot(configFile, debug); -- 2.20.1