diff src/console.c @ 5140:e5380fdaf8f1

merge
author Ben Wing <ben@xemacs.org>
date Sat, 13 Mar 2010 05:38:34 -0600
parents a9c41067dd88
children f965e31a35f0
line wrap: on
line diff
--- a/src/console.c	Fri Mar 12 20:23:50 2010 -0600
+++ b/src/console.c	Sat Mar 13 05:38:34 2010 -0600
@@ -173,11 +173,10 @@
   write_fmt_string (printcharfun, " 0x%x>", con->header.uid);
 }
 
-DEFINE_LRECORD_IMPLEMENTATION ("console", console,
-			       0, /*dumpable-flag*/
-			       mark_console, print_console, 0, 0, 0, 
-			       console_description,
-			       struct console);
+DEFINE_NODUMP_LISP_OBJECT ("console", console, mark_console,
+			   print_console, 0, 0, 0, 
+			   console_description,
+			   struct console);
 
 
 static void
@@ -194,13 +193,12 @@
 static struct console *
 allocate_console (Lisp_Object type)
 {
-  Lisp_Object console;
-  struct console *con = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
+  Lisp_Object console = ALLOC_NORMAL_LISP_OBJECT (console);
+  struct console *con = XCONSOLE (console);
   struct gcpro gcpro1;
 
-  COPY_LCRECORD (con, XCONSOLE (Vconsole_defaults));
+  copy_lisp_object (console, Vconsole_defaults);
 
-  console = wrap_console (con);
   GCPRO1 (console);
 
   con->conmeths = decode_console_type (type, ERROR_ME);
@@ -663,7 +661,7 @@
 static void
 nuke_all_console_slots (struct console *con, Lisp_Object zap)
 {
-  ZERO_LCRECORD (con);
+  zero_nonsized_lisp_object (wrap_console (con));
 
 #define MARKED_SLOT(x)	con->x = zap;
 #include "conslots.h"
@@ -1187,12 +1185,12 @@
 void
 syms_of_console (void)
 {
-  INIT_LRECORD_IMPLEMENTATION (console);
+  INIT_LISP_OBJECT (console);
 #ifdef NEW_GC
 #ifdef HAVE_TTY
-  INIT_LRECORD_IMPLEMENTATION (tty_console);
+  INIT_LISP_OBJECT (tty_console);
 #endif
-  INIT_LRECORD_IMPLEMENTATION (stream_console);
+  INIT_LISP_OBJECT (stream_console);
 #endif /* NEW_GC */
 
   DEFSUBR (Fvalid_console_type_p);
@@ -1320,9 +1318,8 @@
 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magic_fun) \
 do {									   \
   struct symbol_value_forward *I_hate_C =				   \
-    alloc_lrecord_type (struct symbol_value_forward,			   \
-			&lrecord_symbol_value_forward);			   \
-  /*mcpro ((Lisp_Object) I_hate_C);*/					\
+    XSYMBOL_VALUE_FORWARD (ALLOC_NORMAL_LISP_OBJECT (symbol_value_forward));	   \
+  /*mcpro ((Lisp_Object) I_hate_C);*/					   \
 									   \
   I_hate_C->magic.value = &(console_local_flags.field_name);		   \
   I_hate_C->magic.type = forward_type;					   \
@@ -1398,13 +1395,15 @@
   /* Make sure all markable slots in console_defaults
      are initialized reasonably, so mark_console won't choke.
    */
-  struct console *defs = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
-  struct console *syms = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
+  Lisp_Object defobj = ALLOC_NORMAL_LISP_OBJECT (console);
+  struct console *defs = XCONSOLE (defobj);
+  Lisp_Object symobj = ALLOC_NORMAL_LISP_OBJECT (console);
+  struct console *syms = XCONSOLE (symobj);
 
   staticpro_nodump (&Vconsole_defaults);
   staticpro_nodump (&Vconsole_local_symbols);
-  Vconsole_defaults = wrap_console (defs);
-  Vconsole_local_symbols = wrap_console (syms);
+  Vconsole_defaults = defobj;
+  Vconsole_local_symbols = symobj;
 
   nuke_all_console_slots (syms, Qnil);
   nuke_all_console_slots (defs, Qnil);
@@ -1442,6 +1441,8 @@
        The local flag bits are in the local_var_flags slot of the
        console.  */
 
+    set_lheader_implementation ((struct lrecord_header *)
+				&console_local_flags, &lrecord_console);
     nuke_all_console_slots (&console_local_flags, make_int (-2));
     console_local_flags.defining_kbd_macro = always_local_resettable;
     console_local_flags.last_kbd_macro = always_local_resettable;