{
struct console *con = XCONSOLE (obj);
-#define MARKED_SLOT(x) ((markobj) (con->x));
+#define MARKED_SLOT(x) ((void) (markobj (con->x)));
#include "conslots.h"
#undef MARKED_SLOT
/* Can be zero for Vconsole_defaults, Vconsole_local_symbols */
if (con->conmeths)
{
- ((markobj) (con->conmeths->symbol));
+ markobj (con->conmeths->symbol);
MAYBE_CONMETH (con, mark_console, (con, markobj));
}
}
DEFINE_LRECORD_IMPLEMENTATION ("console", console,
- mark_console, print_console, 0, 0, 0,
+ mark_console, print_console, 0, 0, 0, 0,
struct console);
\f
static struct console *
allocate_console (void)
{
Lisp_Object console;
- struct console *con = alloc_lcrecord_type (struct console, lrecord_console);
+ struct console *con = alloc_lcrecord_type (struct console, &lrecord_console);
struct gcpro gcpro1;
copy_lcrecord (con, XCONSOLE (Vconsole_defaults));
set_console_last_nonminibuf_frame (struct console *con,
Lisp_Object frame)
{
- con->_last_nonminibuf_frame = frame;
+ con->last_nonminibuf_frame = frame;
}
DEFUN ("consolep", Fconsolep, 1, 1, 0, /*
#endif
}
-/* DOC is ignored because it is snagged and recorded externally
- * by make-docfile */
+/* The docstrings for DEFVAR_* are recorded externally by make-docfile. */
+
/* Declaring this stuff as const produces 'Cannot reinitialize' messages
from SunPro C's fix-and-continue feature (a way neato feature that
makes debugging unbelievably more bearable) */
-#define DEFVAR_CONSOLE_LOCAL(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_SELECTED_CONSOLE_FORWARD }, 0 }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_SELECTED_CONSOLE_FORWARD }, magicfun }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONST_CONSOLE_LOCAL(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_CONST_SELECTED_CONSOLE_FORWARD }, 0 }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONST_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_CONST_SELECTED_CONSOLE_FORWARD }, magicfun }; \
- defvar_console_local ((lname), &I_hate_C); \
-} while (0)
-
-#define DEFVAR_CONSOLE_DEFAULTS(lname, field_name) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_DEFAULT_CONSOLE_FORWARD }, 0 }; \
- defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
-} while (0)
-
-#define DEFVAR_CONSOLE_DEFAULTS_MAGIC(lname, field_name, magicfun) do { \
-static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- SYMVAL_DEFAULT_CONSOLE_FORWARD }, magicfun }; \
- defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
+#define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) do { \
+ static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
+ = { { { symbol_value_forward_lheader_initializer, \
+ (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
+ forward_type }, magicfun }; \
+ { \
+ int offset = ((char *)symbol_value_forward_forward (&I_hate_C) \
+ - (char *)&console_local_flags); \
+ \
+ defvar_magic (lname, &I_hate_C); \
+ \
+ *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \
+ = intern (lname); \
+ } \
} while (0)
-static void
-defvar_console_local (CONST char *namestring,
- CONST struct symbol_value_forward *m)
-{
- int offset = ((char *)symbol_value_forward_forward (m)
- - (char *)&console_local_flags);
-
- defvar_mumble (namestring, m, sizeof (*m));
-
- *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols)))
- = intern (namestring);
-}
+#define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) \
+ DEFVAR_CONSOLE_LOCAL_1 (lname, field_name, \
+ SYMVAL_SELECTED_CONSOLE_FORWARD, magicfun)
+#define DEFVAR_CONSOLE_LOCAL(lname, field_name) \
+ DEFVAR_CONSOLE_LOCAL_MAGIC (lname, field_name, 0)
+#define DEFVAR_CONST_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) \
+ DEFVAR_CONSOLE_LOCAL_1 (lname, field_name, \
+ SYMVAL_CONST_SELECTED_CONSOLE_FORWARD, magicfun)
+#define DEFVAR_CONST_CONSOLE_LOCAL(lname, field_name) \
+ DEFVAR_CONST_CONSOLE_LOCAL_MAGIC (lname, field_name, 0)
+
+#define DEFVAR_CONSOLE_DEFAULTS_MAGIC(lname, field_name, magicfun) \
+ DEFVAR_SYMVAL_FWD(lname, &(console_local_flags.field_name), \
+ SYMVAL_DEFAULT_CONSOLE_FORWARD, magicfun)
+#define DEFVAR_CONSOLE_DEFAULTS(lname, field_name) \
+ DEFVAR_CONSOLE_DEFAULTS_MAGIC (lname, field_name, 0)
static void
nuke_all_console_slots (struct console *con, Lisp_Object zap)
/* 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);
+ struct console *defs = alloc_lcrecord_type (struct console, &lrecord_console);
+ struct console *syms = alloc_lcrecord_type (struct console, &lrecord_console);
staticpro (&Vconsole_defaults);
staticpro (&Vconsole_local_symbols);