diff src/console.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 3742ea8250b5 d674024a8674
children d1247f3cc363
line wrap: on
line diff
--- a/src/console.c	Sat Dec 26 00:20:27 2009 -0600
+++ b/src/console.c	Sat Dec 26 21:18:49 2009 -0600
@@ -115,9 +115,17 @@
 
 static const struct memory_description console_data_description_1 []= {
 #ifdef HAVE_TTY
+#ifdef NEW_GC
+  { XD_LISP_OBJECT, tty_console },
+#else /* not NEW_GC */
   { XD_BLOCK_PTR, tty_console, 1, { &tty_console_data_description} },
+#endif /* not NEW_GC */
 #endif
+#ifdef NEW_GC
+  { XD_LISP_OBJECT, stream_console },
+#else /* not NEW_GC */
   { XD_BLOCK_PTR, stream_console, 1, { &stream_console_data_description} },
+#endif /* not NEW_GC */
   { XD_END }
 };
 
@@ -172,7 +180,7 @@
   write_fmt_string (printcharfun, " 0x%x>", con->header.uid);
 }
 
-DEFINE_NONDUMPABLE_LISP_OBJECT ("console", console, mark_console,
+DEFINE_NODUMP_LISP_OBJECT ("console", console, mark_console,
 					   print_console, 0, 0, 0, 
 					   console_description,
 					   struct console);
@@ -980,7 +988,7 @@
 
 void
 stuff_buffered_input (
-#ifdef BSD
+#if defined(BSD) && defined(HAVE_TTY)
 		      Lisp_Object stuffstring
 #else
 		      Lisp_Object UNUSED (stuffstring)
@@ -988,7 +996,7 @@
 		      )
 {
 /* stuff_char works only in BSD, versions 4.2 and up.  */
-#if defined (BSD)
+#if defined(BSD) && defined(HAVE_TTY)
   if (!CONSOLEP (Vcontrolling_terminal) ||
       !CONSOLE_LIVE_P (XCONSOLE (Vcontrolling_terminal)))
     return;
@@ -1014,7 +1022,7 @@
       stuff_char (XCONSOLE (Vcontrolling_terminal), *kbd_fetch_ptr++);
     }
 # endif
-#endif /* BSD */
+#endif /* BSD && HAVE_TTY */
 }
 
 DEFUN ("suspend-console", Fsuspend_console, 0, 1, "", /*
@@ -1187,6 +1195,12 @@
 syms_of_console (void)
 {
   INIT_LISP_OBJECT (console);
+#ifdef NEW_GC
+#ifdef HAVE_TTY
+  INIT_LISP_OBJECT (tty_console);
+#endif
+  INIT_LISP_OBJECT (stream_console);
+#endif /* NEW_GC */
 
   DEFSUBR (Fvalid_console_type_p);
   DEFSUBR (Fconsole_type_list);
@@ -1309,7 +1323,7 @@
 }
 
 /* The docstrings for DEFVAR_* are recorded externally by make-docfile.  */
-#ifdef MC_ALLOC
+#ifdef NEW_GC
 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magic_fun) \
 do {									   \
   struct symbol_value_forward *I_hate_C =				   \
@@ -1333,7 +1347,7 @@
       = intern (lname);							   \
   }									   \
 } while (0)
-#else /* not MC_ALLOC */
+#else /* not NEW_GC */
 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun)   \
 do {									    \
   static const struct symbol_value_forward I_hate_C =			    \
@@ -1366,7 +1380,7 @@
       = intern (lname);							    \
   }									    \
 } while (0)
-#endif /* not MC_ALLOC */
+#endif /* not NEW_GC */
 
 #define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun)		\
 	DEFVAR_CONSOLE_LOCAL_1 (lname, field_name,			\