[project @ 2005-06-25 18:11:10 by unknown_lamer]
authorunknown_lamer <unknown>
Sat, 25 Jun 2005 18:11:10 +0000 (18:11 +0000)
committerunknown_lamer <unknown>
Sat, 25 Jun 2005 18:11:10 +0000 (18:11 +0000)
Guile's debugging evaluator is now enabled when --debug is used

ChangeLog
NEWS
source/Interp.C
source/Main.C

index 800c6c1..8d5e0ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-06-25  Clinton Ebadi  <clinton@unknownlamer.org>
+
+       * 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  <clinton@unknownlamer.org>
 
        * All: Updated FSF street address
diff --git a/NEWS b/NEWS
index 655161f..abd164e 100644 (file)
--- 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)
 
index 0b4ee35..40886ae 100644 (file)
@@ -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
index 4d430b9..d119a74 100644 (file)
@@ -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);