X-Git-Url: https://git.hcoop.net/clinton/bobotpp.git/blobdiff_plain/cf8ea87372f220b09b01689b1729a88eb3b2a1d2..ae97d6ecf49738b9e0e253a07db0b07a28fee05e:/source/BotInterp.C diff --git a/source/BotInterp.C b/source/BotInterp.C index 815c9bf..e020cfd 100644 --- a/source/BotInterp.C +++ b/source/BotInterp.C @@ -1,6 +1,6 @@ // BotInterp.C -*- C++ -*- // Copyright (c) 1998 Etienne BERNARD -// Copyright (C) 2002 Clinton Ebadi +// Copyright (C) 2002,2005 Clinton Ebadi // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,13 +53,10 @@ BotInterp::LoadScript(String filename) Interp::LoadScript(bot, filename); } -void -BotInterp::ScriptLog(SCM throw_args) +SCM +BotInterp::ScriptLog() { - scm_display_error_message(SCM_CADR (throw_args), - SCM_CADDR (throw_args), - logPort); - scm_flush(logPort); + return logPort; } namespace @@ -117,10 +115,11 @@ BotInterp::RunHooks(int hooktype, String match, SCM args) SCM_UNDEFINED, SCM_UNDEFINED) != SCM_BOOL_F) { wd.func = (*it)->function; - result = gh_catch(SCM_BOOL_T, - (scm_t_catch_body) scm_apply_wrapper, - static_cast (&wd), - (scm_t_catch_handler) Interp::ErrorHandler, 0); + result = scm_internal_catch(SCM_BOOL_T, + (scm_t_catch_body) + Interp::LazyApplyWrapper, + static_cast (&wd), + (scm_t_catch_handler) Interp::EmptyHandler, 0); if (! (*it)->fallthru) break; } @@ -170,8 +169,9 @@ BotInterp::RunTimers(int now) while (it != it2) { if ((*it)->when <= now) { wd.func = (*it)->function; - gh_catch(SCM_BOOL_T, (scm_t_catch_body) scm_apply_wrapper, - (void *)&wd, (scm_t_catch_handler) Interp::ErrorHandler, 0); + scm_internal_catch(SCM_BOOL_T, + (scm_t_catch_body) Interp::LazyApplyWrapper, (void *)&wd, + (scm_t_catch_handler) Interp::EmptyHandler, 0); scm_gc_unprotect_object(wd.func); it3 = it; ++it3;