* ports.c (scm_port_closed_p): new procedure, implements
[bpt/guile.git] / libguile / stackchk.c
index 5d08ff3..a4fe70e 100644 (file)
@@ -1,4 +1,4 @@
-/*     Copyright (C) 1995,1996 Free Software Foundation, Inc.
+/*     Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
  * 
  * 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
@@ -12,7 +12,8 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.  If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
  *
  * As a special exception, the Free Software Foundation gives permission
  * for additional uses of the text contained in its release of GUILE.
@@ -36,8 +37,7 @@
  *
  * If you write modifications of your own for GUILE, it is your choice
  * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.  
- */
+ * If you do not wish that, delete this exception notice.  */
 \f
 
 #include <stdio.h>
@@ -53,6 +53,8 @@
 #ifdef STACK_CHECKING
 int scm_stack_checking_enabled_p;
 
+SCM_SYMBOL (scm_stack_overflow_key, "stack-overflow");
+
 void
 scm_report_stack_overflow ()
 {
@@ -65,14 +67,10 @@ scm_report_stack_overflow ()
 }
 
 #endif
-#ifdef __STDC__
-long 
-scm_stack_size (SCM_STACKITEM *start)
-#else
+
 long 
 scm_stack_size (start)
      SCM_STACKITEM *start;
-#endif
 {
   SCM_STACKITEM stack;
 #ifdef SCM_STACK_GROWS_UP
@@ -82,33 +80,25 @@ scm_stack_size (start)
 #endif /* def SCM_STACK_GROWS_UP */
 }
 
-#ifdef __STDC__
-void 
-scm_stack_report (void)
-#else
+
 void 
 scm_stack_report ()
-#endif
 {
   SCM_STACKITEM stack;
   scm_intprint (scm_stack_size (SCM_BASE (scm_rootcont)) * sizeof (SCM_STACKITEM),
                16, scm_cur_errp);
-  scm_gen_puts (scm_regular_string, " of stack: 0x", scm_cur_errp);
+  scm_puts (" of stack: 0x", scm_cur_errp);
   scm_intprint ((long) SCM_BASE (scm_rootcont), 16, scm_cur_errp);
-  scm_gen_puts (scm_regular_string, " - 0x", scm_cur_errp);
+  scm_puts (" - 0x", scm_cur_errp);
   scm_intprint ((long) &stack, 16, scm_cur_errp);
-  scm_gen_puts (scm_regular_string, "\n", scm_cur_errp);
+  scm_puts ("\n", scm_cur_errp);
 }
 
 
 
-#ifdef __STDC__
-void
-scm_init_stackchk (void)
-#else
+
 void
 scm_init_stackchk ()
-#endif
 {
 #include "stackchk.x"
 }