changeset 3017:1e7cc382eb16

[xemacs-hg @ 2005-10-24 10:07:26 by ben] refactor mc-alloc dependencies next-error.el, occur.el: Fix some byte-compile warnings. alloc.c, buffer.c, buffer.h, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, console-impl.h, console-msw-impl.h, console.c, data.c, database.c, device-impl.h, device-msw.c, device.c, dialog-msw.c, elhash.c, events.h, extents-impl.h, extents.c, faces.c, faces.h, file-coding.c, file-coding.h, frame-impl.h, frame.c, glyphs.c, glyphs.h, gui.c, gui.h, keymap.c, lisp.h, lrecord.h, lstream.c, lstream.h, mule-charset.c, objects-impl.h, objects.c, opaque.c, opaque.h, print.c, process.c, procimpl.h, rangetab.c, rangetab.h, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, specifier.c, specifier.h, symbols.c, symeval.h, toolbar.c, toolbar.h, tooltalk.c, ui-gtk.c, ui-gtk.h, unicode.c, window-impl.h, window.c: Eliminate the majority of #ifdef MC_ALLOC occurrences through macros LCRECORD_HEADER, ALLOC_LCRECORD_TYPE, MALLOCED_STORAGE_SIZE, etc. (defined in lrecord.h).
author ben
date Mon, 24 Oct 2005 10:07:42 +0000
parents f252275fb013
children 31e656a27dae
files lisp/ChangeLog lisp/next-error.el lisp/occur.el modules/canna/configure src/ChangeLog src/alloc.c src/buffer.c src/buffer.h src/casetab.c src/casetab.h src/charset.h src/chartab.c src/chartab.h src/console-impl.h src/console-msw-impl.h src/console.c src/data.c src/database.c src/device-impl.h src/device-msw.c src/device.c src/dialog-msw.c src/elhash.c src/events.h src/extents-impl.h src/extents.c src/faces.c src/faces.h src/file-coding.c src/file-coding.h src/frame-impl.h src/frame.c src/glyphs.c src/glyphs.h src/gui.c src/gui.h src/keymap.c src/lisp.h src/lrecord.h src/lstream.c src/lstream.h src/mule-charset.c src/objects-impl.h src/objects.c src/opaque.c src/opaque.h src/print.c src/process.c src/procimpl.h src/rangetab.c src/rangetab.h src/scrollbar-gtk.c src/scrollbar-msw.c src/scrollbar-x.c src/scrollbar.c src/scrollbar.h src/specifier.c src/specifier.h src/symbols.c src/symeval.h src/toolbar.c src/toolbar.h src/tooltalk.c src/ui-gtk.c src/ui-gtk.h src/unicode.c src/window-impl.h src/window.c
diffstat 68 files changed, 391 insertions(+), 866 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Oct 24 08:12:59 2005 +0000
+++ b/lisp/ChangeLog	Mon Oct 24 10:07:42 2005 +0000
@@ -1,3 +1,12 @@
+2005-10-24  Ben Wing  <ben@xemacs.org>
+
+	* next-error.el (compilation-current-error):
+	* next-error.el (compilation-current-error)): New.
+	* next-error.el (compilation-context-lines)): New.
+	* occur.el (occur-accumulate-lines):
+	* occur.el (multi-occur):
+	Fix some byte-compile warnings.
+
 2005-10-23  Adrian Aichner  <adrian@xemacs.org>
 
 	* package-get.el (package-get-download-sites): Sync packages
--- a/lisp/next-error.el	Mon Oct 24 08:12:59 2005 +0000
+++ b/lisp/next-error.el	Mon Oct 24 10:07:42 2005 +0000
@@ -270,6 +270,8 @@
 
 ;;; Used as a `post-command-hook' by `next-error-follow-mode'
 ;;; for the *Compilation* *grep* and *Occur* buffers.
+(defvar compilation-current-error)
+(defvar compilation-context-lines)
 (defun next-error-follow-mode-post-command-hook ()
   (unless (equal next-error-follow-last-line (line-number-at-pos))
     (setq next-error-follow-last-line (line-number-at-pos))
--- a/lisp/occur.el	Mon Oct 24 08:12:59 2005 +0000
+++ b/lisp/occur.el	Mon Oct 24 10:07:42 2005 +0000
@@ -247,9 +247,9 @@
 	(setq count (+ count (if forwardp -1 1)))
 	(setq beg (line-beginning-position)
 	      end (line-end-position))
-	(if (and keep-props (if (boundp 'jit-lock-mode) jit-lock-mode)
+	(if (and keep-props (if-boundp 'jit-lock-mode jit-lock-mode)
 		 (text-property-not-all beg end 'fontified t))
-	    (if (fboundp 'jit-lock-fontify-now)
+	    (if-fboundp 'jit-lock-fontify-now
 		(jit-lock-fontify-now beg end)))
 	(push
 	 (funcall (if keep-props
@@ -324,6 +324,7 @@
   "Show all lines in buffers BUFS containing a match for REGEXP.
 This function acts on multiple buffers; otherwise, it is exactly like
 `occur'."
+  (defvar ido-ignore-item-temp-list)
   (interactive
    (cons
     (let* ((bufs (list (read-buffer "First buffer to search: "
--- a/modules/canna/configure	Mon Oct 24 08:12:59 2005 +0000
+++ b/modules/canna/configure	Mon Oct 24 10:07:42 2005 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.1.2.1 .
+# From configure.ac Revision: 1.3 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for Sample module 1.0.
 #
@@ -3656,9 +3656,10 @@
   # 1. Remove the extension, and $U if already installed.
   ac_i=`echo "$ac_i" |
 	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
--- a/src/ChangeLog	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/ChangeLog	Mon Oct 24 10:07:42 2005 +0000
@@ -1,3 +1,150 @@
+2005-10-24  Ben Wing  <ben@xemacs.org>
+
+	* alloc.c:
+	* alloc.c (Lisp_Free):
+	* alloc.c (Fcons):
+	* alloc.c (noseeum_cons):
+	* alloc.c (make_float):
+	* alloc.c (make_bignum):
+	* alloc.c (make_bignum_bg):
+	* alloc.c (make_ratio):
+	* alloc.c (make_ratio_bg):
+	* alloc.c (make_ratio_rt):
+	* alloc.c (make_bigfloat):
+	* alloc.c (make_bigfloat_bf):
+	* alloc.c (make_vector_internal):
+	* alloc.c (make_bit_vector_internal):
+	* alloc.c (make_compiled_function):
+	* alloc.c (Fmake_symbol):
+	* alloc.c (allocate_extent):
+	* alloc.c (allocate_event):
+	* alloc.c (make_key_data):
+	* alloc.c (make_button_data):
+	* alloc.c (make_motion_data):
+	* alloc.c (make_process_data):
+	* alloc.c (make_timeout_data):
+	* alloc.c (make_magic_data):
+	* alloc.c (make_magic_eval_data):
+	* alloc.c (make_eval_data):
+	* alloc.c (make_misc_user_data):
+	* alloc.c (Fmake_marker):
+	* alloc.c (noseeum_make_marker):
+	* buffer.c (allocate_buffer):
+	* buffer.c (compute_buffer_usage):
+	* buffer.c (nuke_all_buffer_slots):
+	* buffer.c (common_init_complex_vars_of_buffer):
+	* buffer.h (struct buffer):
+	* casetab.c (allocate_case_table):
+	* casetab.h (struct Lisp_Case_Table):
+	* charset.h (struct Lisp_Charset):
+	* chartab.c (fill_char_table):
+	* chartab.c (Fmake_char_table):
+	* chartab.c (make_char_table_entry):
+	* chartab.c (copy_char_table_entry):
+	* chartab.c (Fcopy_char_table):
+	* chartab.c (put_char_table):
+	* chartab.h (struct Lisp_Char_Table_Entry):
+	* chartab.h (struct Lisp_Char_Table):
+	* console-impl.h (struct console):
+	* console-msw-impl.h (struct Lisp_Devmode):
+	* console-msw-impl.h (struct mswindows_dialog_id):
+	* console.c (allocate_console):
+	* console.c (nuke_all_console_slots):
+	* console.c (common_init_complex_vars_of_console):
+	* data.c (make_weak_list):
+	* data.c (make_weak_box):
+	* data.c (make_ephemeron):
+	* database.c (struct Lisp_Database):
+	* database.c (allocate_database):
+	* device-impl.h (struct device):
+	* device-msw.c (allocate_devmode):
+	* device.c (nuke_all_device_slots):
+	* device.c (allocate_device):
+	* dialog-msw.c (handle_question_dialog_box):
+	* elhash.c (struct Lisp_Hash_Table):
+	* elhash.c (make_general_lisp_hash_table):
+	* elhash.c (Fcopy_hash_table):
+	* events.h (struct Lisp_Timeout):
+	* events.h (struct command_builder):
+	* extents-impl.h (struct extent_auxiliary):
+	* extents-impl.h (struct extent_info):
+	* extents.c (allocate_extent_auxiliary):
+	* extents.c (allocate_extent_info):
+	* extents.c (copy_extent):
+	* faces.c (allocate_face):
+	* faces.h (struct Lisp_Face):
+	* file-coding.c (Fcopy_coding_system):
+	* file-coding.h (struct Lisp_Coding_System):
+	* frame-impl.h (struct frame):
+	* frame.c (nuke_all_frame_slots):
+	* frame.c (allocate_frame_core):
+	* glyphs.c (allocate_image_instance):
+	* glyphs.c (Fcolorize_image_instance):
+	* glyphs.c (allocate_glyph):
+	* glyphs.h (struct Lisp_Image_Instance):
+	* glyphs.h (struct Lisp_Glyph):
+	* gui.c (allocate_gui_item):
+	* gui.h (struct Lisp_Gui_Item):
+	* keymap.c (struct Lisp_Keymap):
+	* keymap.c (make_keymap):
+	* lisp.h (struct Lisp_Vector):
+	* lisp.h (struct Lisp_Bit_Vector):
+	* lisp.h (struct weak_box):
+	* lisp.h (struct ephemeron):
+	* lisp.h (struct weak_list):
+	* lrecord.h:
+	* lrecord.h (struct toolbar_button):
+	* lstream.c (COPY_SIZED_LCRECORD):
+	* lstream.h (struct lstream):
+	* mule-charset.c (make_charset):
+	* mule-charset.c (compute_charset_usage):
+	* objects-impl.h (struct Lisp_Color_Instance):
+	* objects-impl.h (struct Lisp_Font_Instance):
+	* objects.c (Fmake_color_instance):
+	* objects.c (Fmake_font_instance):
+	* objects.c (reinit_vars_of_objects):
+	* opaque.c (make_opaque):
+	* opaque.h (Lisp_Opaque):
+	* opaque.h (Lisp_Opaque_Ptr):
+	* print.c (default_object_printer):
+	* process.c (make_process_internal):
+	* procimpl.h (struct Lisp_Process):
+	* rangetab.c (Fmake_range_table):
+	* rangetab.c (Fcopy_range_table):
+	* rangetab.h (struct Lisp_Range_Table):
+	* scrollbar-gtk.c (gtk_compute_scrollbar_instance_usage):
+	* scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage):
+	* scrollbar-x.c (x_compute_scrollbar_instance_usage):
+	* scrollbar.c (create_scrollbar_instance):
+	* scrollbar.c (compute_scrollbar_instance_usage):
+	* scrollbar.h (struct scrollbar_instance):
+	* specifier.c (make_specifier_internal):
+	* specifier.h (struct Lisp_Specifier):
+	* symbols.c (Fdefvaralias):
+	* symeval.h (SYMBOL_VALUE_MAGIC_P):
+	* toolbar.c (update_toolbar_button):
+	* toolbar.h (struct toolbar_button):
+	* tooltalk.c (struct Lisp_Tooltalk_Message):
+	* tooltalk.c (make_tooltalk_message):
+	* tooltalk.c (struct Lisp_Tooltalk_Pattern):
+	* tooltalk.c (make_tooltalk_pattern):
+	* ui-gtk.c (allocate_ffi_data):
+	* ui-gtk.c (allocate_emacs_gtk_object_data):
+	* ui-gtk.c (allocate_emacs_gtk_boxed_data):
+	* ui-gtk.h:
+	* unicode.c (compute_from_unicode_table_size_1):
+	* unicode.c (compute_to_unicode_table_size_1):
+	* window-impl.h (struct window):
+	* window-impl.h (struct window_mirror):
+	* window.c (allocate_window):
+	* window.c (new_window_mirror):
+	* window.c (make_dummy_parent):
+	* window.c (compute_window_mirror_usage):
+	* window.c (compute_window_usage):
+	Eliminate the majority of #ifdef MC_ALLOC occurrences through
+	macros LCRECORD_HEADER, ALLOC_LCRECORD_TYPE, MALLOCED_STORAGE_SIZE,
+	etc. (defined in lrecord.h).
+
 2005-10-21  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* Makefile.in.in (mule_canna_objs): Revert canna-api to canna_api.
--- a/src/alloc.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/alloc.c	Mon Oct 24 10:07:42 2005 +0000
@@ -811,7 +811,9 @@
 }
 
 
-#ifndef MC_ALLOC
+#ifdef MC_ALLOC
+#define DECLARE_FIXED_TYPE_ALLOC(type, structture) struct __foo__
+#else
 /************************************************************************/
 /*			  Fixed-size type macros			*/
 /************************************************************************/
@@ -1085,7 +1087,6 @@
   NOSEEUM_INCREMENT_CONS_COUNTER (sizeof (structtype), #type);	\
 } while (0)
 
-
 /* Lisp_Free is the type to represent a free list member inside a frob
    block of any lisp object type.  */
 typedef struct Lisp_Free
@@ -1172,18 +1173,42 @@
 #endif
 #endif /* not MC_ALLOC */
 
+#ifdef MC_ALLOC
+#define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
+do {									\
+  (var) = alloc_lrecord_type (lisp_type, lrec_ptr);			\
+} while (0)
+#define NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var,	\
+                                                 lrec_ptr)		\
+do {									\
+  (var) = noseeum_alloc_lrecord_type (lisp_type, lrec_ptr);		\
+} while (0)
+#else /* not MC_ALLOC */
+#define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
+do									\
+{									\
+  ALLOCATE_FIXED_TYPE (type, lisp_type, var);				\
+  set_lheader_implementation (&(var)->lheader, lrec_ptr);		\
+} while (0)
+#define NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var,	\
+                                                 lrec_ptr)		\
+do									\
+{									\
+  NOSEEUM_ALLOCATE_FIXED_TYPE (type, lisp_type, var);			\
+  set_lheader_implementation (&(var)->lheader, lrec_ptr);		\
+} while (0)
+#endif /* MC_ALLOC */
+
 
 
 /************************************************************************/
 /*			   Cons allocation				*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (cons, Lisp_Cons);
 /* conses are used and freed so often that we set this really high */
 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 20000 */
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000
-#endif /* not MC_ALLOC */
 
 static Lisp_Object
 mark_cons (Lisp_Object obj)
@@ -1237,12 +1262,7 @@
   Lisp_Object val;
   Lisp_Cons *c;
 
-#ifdef MC_ALLOC
-  c = alloc_lrecord_type (Lisp_Cons, &lrecord_cons);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
-  set_lheader_implementation (&c->lheader, &lrecord_cons);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (cons, Lisp_Cons, c, &lrecord_cons);
   val = wrap_cons (c);
   XSETCAR (val, car);
   XSETCDR (val, cdr);
@@ -1258,12 +1278,7 @@
   Lisp_Object val;
   Lisp_Cons *c;
 
-#ifdef MC_ALLOC
-  c = noseeum_alloc_lrecord_type (Lisp_Cons, &lrecord_cons);
-#else /* not MC_ALLOC */
-  NOSEEUM_ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
-  set_lheader_implementation (&c->lheader, &lrecord_cons);
-#endif /* not MC_ALLOC */
+  NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL (cons, Lisp_Cons, c, &lrecord_cons);
   val = wrap_cons (c);
   XCAR (val) = car;
   XCDR (val) = cdr;
@@ -1365,27 +1380,20 @@
 
 /*** With enhanced number support, these are short floats */
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_float (double float_value)
 {
   Lisp_Float *f;
 
-#ifdef MC_ALLOC
-  f = alloc_lrecord_type (Lisp_Float, &lrecord_float);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (float, Lisp_Float, f);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (float, Lisp_Float, f, &lrecord_float);
 
   /* Avoid dump-time `uninitialized memory read' purify warnings. */
   if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f))
-    xzero (*f);
-#endif /* not MC_ALLOC */
-
-  set_lheader_implementation (&f->lheader, &lrecord_float);
+    zero_lrecord (f);
+
   float_data (f) = float_value;
   return wrap_float (f);
 }
@@ -1397,10 +1405,8 @@
 
 /*** Bignum ***/
 #ifdef HAVE_BIGNUM
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (bignum, Lisp_Bignum);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bignum 250
-#endif /* not MC_ALLOC */
 
 /* WARNING: This function returns a bignum even if its argument fits into a
    fixnum.  See Fcanonicalize_number(). */
@@ -1409,12 +1415,7 @@
 {
   Lisp_Bignum *b;
 
-#ifdef MC_ALLOC
-  b = alloc_lrecord_type (Lisp_Bignum, &lrecord_bignum);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (bignum, Lisp_Bignum, b);
-  set_lheader_implementation (&b->lheader, &lrecord_bignum);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bignum, Lisp_Bignum, b, &lrecord_bignum);
   bignum_init (bignum_data (b));
   bignum_set_long (bignum_data (b), bignum_value);
   return wrap_bignum (b);
@@ -1427,12 +1428,7 @@
 {
   Lisp_Bignum *b;
 
-#ifdef MC_ALLOC
-  b = alloc_lrecord_type (Lisp_Bignum, &lrecord_bignum);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (bignum, Lisp_Bignum, b);
-  set_lheader_implementation (&b->lheader, &lrecord_bignum);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bignum, Lisp_Bignum, b, &lrecord_bignum);
   bignum_init (bignum_data (b));
   bignum_set (bignum_data (b), bg);
   return wrap_bignum (b);
@@ -1441,22 +1437,15 @@
 
 /*** Ratio ***/
 #ifdef HAVE_RATIO
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (ratio, Lisp_Ratio);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_ratio 250
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_ratio (long numerator, unsigned long denominator)
 {
   Lisp_Ratio *r;
 
-#ifdef MC_ALLOC
-  r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
-  set_lheader_implementation (&r->lheader, &lrecord_ratio);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
   ratio_init (ratio_data (r));
   ratio_set_long_ulong (ratio_data (r), numerator, denominator);
   ratio_canonicalize (ratio_data (r));
@@ -1468,12 +1457,7 @@
 {
   Lisp_Ratio *r;
 
-#ifdef MC_ALLOC
-  r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
-  set_lheader_implementation (&r->lheader, &lrecord_ratio);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
   ratio_init (ratio_data (r));
   ratio_set_bignum_bignum (ratio_data (r), numerator, denominator);
   ratio_canonicalize (ratio_data (r));
@@ -1485,12 +1469,7 @@
 {
   Lisp_Ratio *r;
 
-#ifdef MC_ALLOC
-  r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
-  set_lheader_implementation (&r->lheader, &lrecord_ratio);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
   ratio_init (ratio_data (r));
   ratio_set (ratio_data (r), rat);
   return wrap_ratio (r);
@@ -1499,10 +1478,8 @@
 
 /*** Bigfloat ***/
 #ifdef HAVE_BIGFLOAT
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (bigfloat, Lisp_Bigfloat);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigfloat 250
-#endif /* not MC_ALLOC */
 
 /* This function creates a bigfloat with the default precision if the
    PRECISION argument is zero. */
@@ -1511,12 +1488,7 @@
 {
   Lisp_Bigfloat *f;
 
-#ifdef MC_ALLOC
-  f = alloc_lrecord_type (Lisp_Bigfloat, &lrecord_bigfloat);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (bigfloat, Lisp_Bigfloat, f);
-  set_lheader_implementation (&f->lheader, &lrecord_bigfloat);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bigfloat, Lisp_Bigfloat, f, &lrecord_bigfloat);
   if (precision == 0UL)
     bigfloat_init (bigfloat_data (f));
   else
@@ -1531,12 +1503,7 @@
 {
   Lisp_Bigfloat *f;
 
-#ifdef MC_ALLOC
-  f = alloc_lrecord_type (Lisp_Bigfloat, &lrecord_bigfloat);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (bigfloat, Lisp_Bigfloat, f);
-  set_lheader_implementation (&f->lheader, &lrecord_bigfloat);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bigfloat, Lisp_Bigfloat, f, &lrecord_bigfloat);
   bigfloat_init_prec (bigfloat_data (f), bigfloat_get_prec (float_value));
   bigfloat_set (bigfloat_data (f), float_value);
   return wrap_bigfloat (f);
@@ -1613,11 +1580,7 @@
   Bytecount sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, Lisp_Object,
 						  contents, sizei);
   Lisp_Vector *p =
-#ifdef MC_ALLOC
-    (Lisp_Vector *) alloc_lrecord (sizem, &lrecord_vector);
-#else /* not MC_ALLOC */
-    (Lisp_Vector *) basic_alloc_lcrecord (sizem, &lrecord_vector);
-#endif /* not MC_ALLOC */
+    (Lisp_Vector *) BASIC_ALLOC_LCRECORD (sizem, &lrecord_vector);
 
   p->size = sizei;
   return p;
@@ -1774,11 +1737,7 @@
 						  unsigned long,
 						  bits, num_longs);
   Lisp_Bit_Vector *p = (Lisp_Bit_Vector *)
-#ifdef MC_ALLOC
-    alloc_lrecord (sizem, &lrecord_bit_vector);
-#else /* not MC_ALLOC */
-    basic_alloc_lcrecord (sizem, &lrecord_bit_vector);
-#endif /* not MC_ALLOC */
+    BASIC_ALLOC_LCRECORD (sizem, &lrecord_bit_vector);
 
   bit_vector_length (p) = sizei;
   return p;
@@ -1854,22 +1813,16 @@
 /*		     Compiled-function allocation			*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (compiled_function, Lisp_Compiled_Function);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_compiled_function 1000
-#endif /* not MC_ALLOC */
 
 static Lisp_Object
 make_compiled_function (void)
 {
   Lisp_Compiled_Function *f;
 
-#ifdef MC_ALLOC
-  f = alloc_lrecord_type (Lisp_Compiled_Function, &lrecord_compiled_function);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (compiled_function, Lisp_Compiled_Function, f);
-  set_lheader_implementation (&f->lheader, &lrecord_compiled_function);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (compiled_function, Lisp_Compiled_Function,
+				    f, &lrecord_compiled_function);
 
   f->stack_depth = 0;
   f->specpdl_depth = 0;
@@ -2001,10 +1954,8 @@
 /*			    Symbol allocation				*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (symbol, Lisp_Symbol);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_symbol 1000
-#endif /* not MC_ALLOC */
 
 DEFUN ("make-symbol", Fmake_symbol, 1, 1, 0, /*
 Return a newly allocated uninterned symbol whose name is NAME.
@@ -2016,12 +1967,7 @@
 
   CHECK_STRING (name);
 
-#ifdef MC_ALLOC
-  p = alloc_lrecord_type (Lisp_Symbol, &lrecord_symbol);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (symbol, Lisp_Symbol, p);
-  set_lheader_implementation (&p->lheader, &lrecord_symbol);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (symbol, Lisp_Symbol, p, &lrecord_symbol);
   p->name     = name;
   p->plist    = Qnil;
   p->value    = Qunbound;
@@ -2035,22 +1981,15 @@
 /*			   Extent allocation				*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (extent, struct extent);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_extent 1000
-#endif /* not MC_ALLOC */
 
 struct extent *
 allocate_extent (void)
 {
   struct extent *e;
 
-#ifdef MC_ALLOC
-  e = alloc_lrecord_type (struct extent, &lrecord_extent);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (extent, struct extent, e);
-  set_lheader_implementation (&e->lheader, &lrecord_extent);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (extent, struct extent, e, &lrecord_extent);
   extent_object (e) = Qnil;
   set_extent_start (e, -1);
   set_extent_end (e, -1);
@@ -2070,221 +2009,151 @@
 /*			   Event allocation				*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (event, Lisp_Event);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_event 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 allocate_event (void)
 {
   Lisp_Event *e;
 
-#ifdef MC_ALLOC
-  e = alloc_lrecord_type (Lisp_Event, &lrecord_event);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (event, Lisp_Event, e);
-  set_lheader_implementation (&e->lheader, &lrecord_event);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (event, Lisp_Event, e, &lrecord_event);
 
   return wrap_event (e);
 }
 
 #ifdef EVENT_DATA_AS_OBJECTS
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (key_data, Lisp_Key_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_key_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_key_data (void)
 {
   Lisp_Key_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Key_Data, &lrecord_key_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (key_data, Lisp_Key_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_key_data);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (key_data, Lisp_Key_Data, d,
+				    &lrecord_key_data);
+  zero_lrecord (d);
   d->keysym = Qnil;
 
   return wrap_key_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (button_data, Lisp_Button_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_button_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_button_data (void)
 {
   Lisp_Button_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Button_Data, &lrecord_button_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (button_data, Lisp_Button_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_button_data);
-
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (button_data, Lisp_Button_Data, d, &lrecord_button_data);
+  zero_lrecord (d);
   return wrap_button_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (motion_data, Lisp_Motion_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_motion_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_motion_data (void)
 {
   Lisp_Motion_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Motion_Data, &lrecord_motion_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (motion_data, Lisp_Motion_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_motion_data);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (motion_data, Lisp_Motion_Data, d, &lrecord_motion_data);
+  zero_lrecord (d);
 
   return wrap_motion_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (process_data, Lisp_Process_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_process_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_process_data (void)
 {
   Lisp_Process_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Process_Data, &lrecord_process_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (process_data, Lisp_Process_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_process_data);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (process_data, Lisp_Process_Data, d, &lrecord_process_data);
+  zero_lrecord (d);
   d->process = Qnil;
-#endif /* not MC_ALLOC */
 
   return wrap_process_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (timeout_data, Lisp_Timeout_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_timeout_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_timeout_data (void)
 {
   Lisp_Timeout_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Timeout_Data, &lrecord_timeout_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (timeout_data, Lisp_Timeout_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_timeout_data);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (timeout_data, Lisp_Timeout_Data, d, &lrecord_timeout_data);
+  zero_lrecord (d);
   d->function = Qnil;
   d->object = Qnil;
-#endif /* not MC_ALLOC */
 
   return wrap_timeout_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (magic_data, Lisp_Magic_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_magic_data (void)
 {
   Lisp_Magic_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Magic_Data, &lrecord_magic_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (magic_data, Lisp_Magic_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_magic_data);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (magic_data, Lisp_Magic_Data, d, &lrecord_magic_data);
+  zero_lrecord (d);
 
   return wrap_magic_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (magic_eval_data, Lisp_Magic_Eval_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_eval_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_magic_eval_data (void)
 {
   Lisp_Magic_Eval_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Magic_Eval_Data, &lrecord_magic_eval_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (magic_eval_data, Lisp_Magic_Eval_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_magic_eval_data);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (magic_eval_data, Lisp_Magic_Eval_Data, d, &lrecord_magic_eval_data);
+  zero_lrecord (d);
   d->object = Qnil;
-#endif /* not MC_ALLOC */
 
   return wrap_magic_eval_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (eval_data, Lisp_Eval_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_eval_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_eval_data (void)
 {
   Lisp_Eval_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Eval_Data, &lrecord_eval_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (eval_data, Lisp_Eval_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_eval_data);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (eval_data, Lisp_Eval_Data, d, &lrecord_eval_data);
+  zero_lrecord (d);
   d->function = Qnil;
   d->object = Qnil;
-#endif /* not MC_ALLOC */
 
   return wrap_eval_data (d);
 }
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (misc_user_data, Lisp_Misc_User_Data);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_misc_user_data 1000
-#endif /* not MC_ALLOC */
 
 Lisp_Object
 make_misc_user_data (void)
 {
   Lisp_Misc_User_Data *d;
 
-#ifdef MC_ALLOC
-  d = alloc_lrecord_type (Lisp_Misc_User_Data, &lrecord_misc_user_data);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (misc_user_data, Lisp_Misc_User_Data, d);
-  xzero (*d);
-  set_lheader_implementation (&d->lheader, &lrecord_misc_user_data);
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (misc_user_data, Lisp_Misc_User_Data, d, &lrecord_misc_user_data);
+  zero_lrecord (d);
   d->function = Qnil;
   d->object = Qnil;
-#endif /* not MC_ALLOC */
 
   return wrap_misc_user_data (d);
 }
@@ -2295,10 +2164,8 @@
 /*			 Marker allocation				*/
 /************************************************************************/
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (marker, Lisp_Marker);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_marker 1000
-#endif /* not MC_ALLOC */
 
 DEFUN ("make-marker", Fmake_marker, 0, 0, 0, /*
 Return a new marker which does not point at any place.
@@ -2307,12 +2174,7 @@
 {
   Lisp_Marker *p;
 
-#ifdef MC_ALLOC
-  p = alloc_lrecord_type (Lisp_Marker, &lrecord_marker);
-#else /* not MC_ALLOC */
-  ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
-  set_lheader_implementation (&p->lheader, &lrecord_marker);
-#endif /* not MC_ALLOC */
+  ALLOCATE_FIXED_TYPE_AND_SET_IMPL (marker, Lisp_Marker, p, &lrecord_marker);
   p->buffer = 0;
   p->membpos = 0;
   marker_next (p) = 0;
@@ -2326,12 +2188,8 @@
 {
   Lisp_Marker *p;
 
-#ifdef MC_ALLOC
-  p = noseeum_alloc_lrecord_type (Lisp_Marker, &lrecord_marker);
-#else /* not MC_ALLOC */
-  NOSEEUM_ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
-  set_lheader_implementation (&p->lheader, &lrecord_marker);
-#endif /* not MC_ALLOC */
+  NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL (marker, Lisp_Marker, p,
+					    &lrecord_marker);
   p->buffer = 0;
   p->membpos = 0;
   marker_next (p) = 0;
@@ -2358,12 +2216,10 @@
 
    This new method makes things somewhat bigger, but it is MUCH safer.  */
 
-#ifndef MC_ALLOC
 DECLARE_FIXED_TYPE_ALLOC (string, Lisp_String);
 /* strings are used and freed quite often */
 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 10000 */
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 1000
-#endif /* not MC_ALLOC */
 
 static Lisp_Object
 mark_string (Lisp_Object obj)
--- a/src/buffer.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/buffer.c	Mon Oct 24 10:07:42 2005 +0000
@@ -587,15 +587,9 @@
 static struct buffer *
 allocate_buffer (void)
 {
-#ifdef MC_ALLOC
-  struct buffer *b = alloc_lrecord_type (struct buffer, &lrecord_buffer);
-
-  copy_lrecord (b, XBUFFER (Vbuffer_defaults));
-#else /* not MC_ALLOC */
-  struct buffer *b = alloc_lcrecord_type (struct buffer, &lrecord_buffer);
-
-  copy_lcrecord (b, XBUFFER (Vbuffer_defaults));
-#endif /* not MC_ALLOC */
+  struct buffer *b = ALLOC_LCRECORD_TYPE (struct buffer, &lrecord_buffer);
+
+  COPY_LCRECORD (b, XBUFFER (Vbuffer_defaults));
 
   return b;
 }
@@ -1763,11 +1757,7 @@
 		      struct overhead_stats *ovstats)
 {
   xzero (*stats);
-#ifdef MC_ALLOC
-  stats->other   += mc_alloced_storage_size (sizeof (*b), ovstats);
-#else /* not MC_ALLOC */
-  stats->other   += malloced_storage_size (b, sizeof (*b), ovstats);
-#endif /* not MC_ALLOC */
+  stats->other   += MALLOCED_STORAGE_SIZE (b, sizeof (*b), ovstats);
   stats->text    += compute_buffer_text_usage   (b, ovstats);
   stats->markers += compute_buffer_marker_usage (b, ovstats);
   stats->extents += compute_buffer_extent_usage (b, ovstats);
@@ -2204,11 +2194,7 @@
 static void
 nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap)
 {
-#ifdef MC_ALLOC
-  zero_lrecord (b);
-#else /* not MC_ALLOC */
-  zero_lcrecord (b);
-#endif /* not MC_ALLOC */
+  ZERO_LCRECORD (b);
 
   b->extent_info = Qnil;
   b->indirect_children = Qnil;
@@ -2223,13 +2209,8 @@
 {
   /* Make sure all markable slots in buffer_defaults
      are initialized reasonably, so mark_buffer won't choke. */
-#ifdef MC_ALLOC
-  struct buffer *defs = alloc_lrecord_type (struct buffer, &lrecord_buffer);
-  struct buffer *syms = alloc_lrecord_type (struct buffer, &lrecord_buffer);
-#else /* not MC_ALLOC */
-  struct buffer *defs = alloc_lcrecord_type (struct buffer, &lrecord_buffer);
-  struct buffer *syms = alloc_lcrecord_type (struct buffer, &lrecord_buffer);
-#endif /* not MC_ALLOC */
+  struct buffer *defs = ALLOC_LCRECORD_TYPE (struct buffer, &lrecord_buffer);
+  struct buffer *syms = ALLOC_LCRECORD_TYPE (struct buffer, &lrecord_buffer);
 
   staticpro_nodump (&Vbuffer_defaults);
   staticpro_nodump (&Vbuffer_local_symbols);
--- a/src/buffer.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/buffer.h	Mon Oct 24 10:07:42 2005 +0000
@@ -140,11 +140,7 @@
 
 struct buffer
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* This structure holds the coordinates of the buffer contents
      in ordinary buffers.  In indirect buffers, this is not used.  */
--- a/src/casetab.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/casetab.c	Mon Oct 24 10:07:42 2005 +0000
@@ -116,11 +116,7 @@
 allocate_case_table (int init_tables)
 {
   Lisp_Case_Table *ct =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Case_Table, &lrecord_case_table);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Case_Table, &lrecord_case_table);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Case_Table, &lrecord_case_table);
 
   if (init_tables)
     {
--- a/src/casetab.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/casetab.h	Mon Oct 24 10:07:42 2005 +0000
@@ -25,11 +25,7 @@
 
 struct Lisp_Case_Table
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object downcase_table;
   Lisp_Object upcase_table;
   Lisp_Object case_canon_table;
--- a/src/charset.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/charset.h	Mon Oct 24 10:07:42 2005 +0000
@@ -181,11 +181,7 @@
 
 struct Lisp_Charset
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   int id;
   Lisp_Object name;
--- a/src/chartab.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/chartab.c	Mon Oct 24 10:07:42 2005 +0000
@@ -476,11 +476,7 @@
       if (!EQ (ct->level1[i], Qnull_pointer) &&
 	  CHAR_TABLE_ENTRYP (ct->level1[i]) &&
 	  !OBJECT_DUMPED_P (ct->level1[1]))
-#ifdef MC_ALLOC
-	free_lrecord (ct->level1[i]);
-#else /* not MC_ALLOC */
-	free_lcrecord (ct->level1[i]);
-#endif /* not MC_ALLOC */
+	FREE_LCRECORD (ct->level1[i]);
       ct->level1[i] = value;
     }
 #endif /* MULE */
@@ -596,11 +592,7 @@
   Lisp_Object obj;
   enum char_table_type ty = symbol_to_char_table_type (type);
 
-#ifdef MC_ALLOC
-  ct = alloc_lrecord_type (Lisp_Char_Table, &lrecord_char_table);
-#else /* not MC_ALLOC */
-  ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table);
-#endif /* not MC_ALLOC */
+  ct = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table);
   ct->type = ty;
   obj = wrap_char_table (ct);
   if (ty == CHAR_TABLE_TYPE_SYNTAX)
@@ -633,11 +625,7 @@
 {
   int i;
   Lisp_Char_Table_Entry *cte =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
 
   for (i = 0; i < 96; i++)
     cte->level2[i] = initval;
@@ -651,11 +639,7 @@
   Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry);
   int i;
   Lisp_Char_Table_Entry *ctenew =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
 
   for (i = 0; i < 96; i++)
     {
@@ -684,11 +668,7 @@
 
   CHECK_CHAR_TABLE (char_table);
   ct = XCHAR_TABLE (char_table);
-#ifdef MC_ALLOC
-  ctnew = alloc_lrecord_type (Lisp_Char_Table, &lrecord_char_table);
-#else /* not MC_ALLOC */
-  ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table);
-#endif /* not MC_ALLOC */
+  ctnew = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table);
   ctnew->type = ct->type;
   ctnew->parent = ct->parent;
   ctnew->default_ = ct->default_;
@@ -1080,11 +1060,7 @@
 	  int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE;
 	  if (CHAR_TABLE_ENTRYP (ct->level1[lb]) &&
 	      !OBJECT_DUMPED_P (ct->level1[lb]))
-#ifdef MC_ALLOC
-	    free_lrecord (ct->level1[lb]);
-#else /* not MC_ALLOC */
-	    free_lcrecord (ct->level1[lb]);
-#endif /* not MC_ALLOC */
+	    FREE_LCRECORD (ct->level1[lb]);
 	  ct->level1[lb] = val;
 	}
       break;
--- a/src/chartab.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/chartab.h	Mon Oct 24 10:07:42 2005 +0000
@@ -42,11 +42,7 @@
 
 struct Lisp_Char_Table_Entry
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* In the interests of simplicity, we just use a fixed 96-entry
      table.  If we felt like being smarter, we could make this
@@ -84,11 +80,7 @@
 
 struct Lisp_Char_Table
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object ascii[NUM_ASCII_CHARS];
   Lisp_Object default_;
--- a/src/console-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/console-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -412,11 +412,7 @@
 
 struct console
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Description of this console's methods.  */
   struct console_methods *conmeths;
--- a/src/console-msw-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/console-msw-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -57,11 +57,7 @@
 
 struct Lisp_Devmode
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Pointer to the DEVMODE structure */
   DEVMODEW *devmode;
@@ -279,11 +275,7 @@
 
 struct mswindows_dialog_id
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object frame;
   Lisp_Object callbacks;
--- a/src/console.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/console.c	Mon Oct 24 10:07:42 2005 +0000
@@ -194,18 +194,10 @@
 allocate_console (Lisp_Object type)
 {
   Lisp_Object console;
-#ifdef MC_ALLOC
-  struct console *con = alloc_lrecord_type (struct console, &lrecord_console);
-#else /* not MC_ALLOC */
-  struct console *con = alloc_lcrecord_type (struct console, &lrecord_console);
-#endif /* not MC_ALLOC */
+  struct console *con = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
   struct gcpro gcpro1;
 
-#ifdef MC_ALLOC
-  copy_lrecord (con, XCONSOLE (Vconsole_defaults));
-#else /* not MC_ALLOC */
-  copy_lcrecord (con, XCONSOLE (Vconsole_defaults));
-#endif /* not MC_ALLOC */
+  COPY_LCRECORD (con, XCONSOLE (Vconsole_defaults));
 
   console = wrap_console (con);
   GCPRO1 (console);
@@ -670,11 +662,7 @@
 static void
 nuke_all_console_slots (struct console *con, Lisp_Object zap)
 {
-#ifdef MC_ALLOC
-  zero_lrecord (con);
-#else /* not MC_ALLOC */
-  zero_lcrecord (con);
-#endif /* not MC_ALLOC */
+  ZERO_LCRECORD (con);
 
 #define MARKED_SLOT(x)	con->x = zap;
 #include "conslots.h"
@@ -1405,13 +1393,8 @@
   /* Make sure all markable slots in console_defaults
      are initialized reasonably, so mark_console won't choke.
    */
-#ifdef MC_ALLOC
-  struct console *defs = alloc_lrecord_type (struct console, &lrecord_console);
-  struct console *syms = alloc_lrecord_type (struct console, &lrecord_console);
-#else /* not MC_ALLOC */
-  struct console *defs = alloc_lcrecord_type (struct console, &lrecord_console);
-  struct console *syms = alloc_lcrecord_type (struct console, &lrecord_console);
-#endif /* not MC_ALLOC */
+  struct console *defs = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
+  struct console *syms = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console);
 
   staticpro_nodump (&Vconsole_defaults);
   staticpro_nodump (&Vconsole_local_symbols);
--- a/src/data.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/data.c	Mon Oct 24 10:07:42 2005 +0000
@@ -2577,11 +2577,7 @@
 {
   Lisp_Object result;
   struct weak_list *wl =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct weak_list, &lrecord_weak_list);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct weak_list, &lrecord_weak_list);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct weak_list, &lrecord_weak_list);
 
   wl->list = Qnil;
   wl->type = type;
@@ -3056,11 +3052,7 @@
   Lisp_Object result;
 
   struct weak_box *wb =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct weak_box, &lrecord_weak_box);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct weak_box, &lrecord_weak_box);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct weak_box, &lrecord_weak_box);
 
   wb->value = value;
   result = wrap_weak_box (wb);
@@ -3283,11 +3275,7 @@
   struct gcpro gcpro1, gcpro2;
 
   struct ephemeron *eph =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct ephemeron, &lrecord_ephemeron);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct ephemeron, &lrecord_ephemeron);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct ephemeron, &lrecord_ephemeron);
 
   eph->key = Qnil;
   eph->cons_chain = Qnil;
--- a/src/database.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/database.c	Mon Oct 24 10:07:42 2005 +0000
@@ -98,11 +98,7 @@
 
 struct Lisp_Database
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object fname;
   int mode;
   int access_;
@@ -135,11 +131,7 @@
 static Lisp_Database *
 allocate_database (void)
 {
-#ifdef MC_ALLOC
-  Lisp_Database *db = alloc_lrecord_type (Lisp_Database, &lrecord_database);
-#else /* not MC_ALLOC */
-  Lisp_Database *db = alloc_lcrecord_type (Lisp_Database, &lrecord_database);
-#endif /* not MC_ALLOC */
+  Lisp_Database *db = ALLOC_LCRECORD_TYPE (Lisp_Database, &lrecord_database);
 
   db->fname = Qnil;
   db->live_p = 0;
--- a/src/device-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/device-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -71,11 +71,7 @@
 
 struct device
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Methods for this device's console.  This can also be retrieved
      through device->console, but it's faster this way. */
--- a/src/device-msw.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/device-msw.c	Mon Oct 24 10:07:42 2005 +0000
@@ -1188,11 +1188,7 @@
 {
   Lisp_Devmode *dm;
 
-#ifdef MC_ALLOC
-  dm = alloc_lrecord_type (Lisp_Devmode, &lrecord_devmode);
-#else /* not MC_ALLOC */
-  dm = alloc_lcrecord_type (Lisp_Devmode, &lrecord_devmode);
-#endif /* not MC_ALLOC */
+  dm = ALLOC_LCRECORD_TYPE (Lisp_Devmode, &lrecord_devmode);
 
   if (d)
     dm->device = wrap_device (d);
--- a/src/device.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/device.c	Mon Oct 24 10:07:42 2005 +0000
@@ -187,11 +187,7 @@
 static void
 nuke_all_device_slots (struct device *d, Lisp_Object zap)
 {
-#ifdef MC_ALLOC
-  zero_lrecord (d);
-#else /* not MC_ALLOC */
-  zero_lcrecord (d);
-#endif /* not MC_ALLOC */
+  ZERO_LCRECORD (d);
 
 #define MARKED_SLOT(x)	d->x = zap;
 #include "devslots.h"
@@ -201,11 +197,7 @@
 allocate_device (Lisp_Object console)
 {
   Lisp_Object device;
-#ifdef MC_ALLOC
-  struct device *d = alloc_lrecord_type (struct device, &lrecord_device);
-#else /* not MC_ALLOC */
-  struct device *d = alloc_lcrecord_type (struct device, &lrecord_device);
-#endif /* not MC_ALLOC */
+  struct device *d = ALLOC_LCRECORD_TYPE (struct device, &lrecord_device);
   struct gcpro gcpro1;
 
   device = wrap_device (d);
--- a/src/dialog-msw.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/dialog-msw.c	Mon Oct 24 10:07:42 2005 +0000
@@ -751,13 +751,8 @@
     Lisp_Object dialog_data;
     int i;
     struct mswindows_dialog_id *did =
-#ifdef MC_ALLOC
-      alloc_lrecord_type (struct mswindows_dialog_id,
-			  &lrecord_mswindows_dialog_id);
-#else /* not MC_ALLOC */
-      alloc_lcrecord_type (struct mswindows_dialog_id,
+      ALLOC_LCRECORD_TYPE (struct mswindows_dialog_id,
 			   &lrecord_mswindows_dialog_id);
-#endif /* not MC_ALLOC */
     
     dialog_data = wrap_mswindows_dialog_id (did);
     
--- a/src/elhash.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/elhash.c	Mon Oct 24 10:07:42 2005 +0000
@@ -102,11 +102,7 @@
 
 struct Lisp_Hash_Table
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Elemcount size;
   Elemcount count;
   Elemcount rehash_count;
@@ -554,11 +550,7 @@
 			      enum hash_table_weakness weakness)
 {
   Lisp_Object hash_table;
-#ifdef MC_ALLOC
-  Lisp_Hash_Table *ht = alloc_lrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
-#else /* not MC_ALLOC */
-  Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
-#endif /* not MC_ALLOC */
+  Lisp_Hash_Table *ht = ALLOC_LCRECORD_TYPE (Lisp_Hash_Table, &lrecord_hash_table);
 
   ht->test_function = test_function;
   ht->hash_function = hash_function;
@@ -975,14 +967,8 @@
        (hash_table))
 {
   const Lisp_Hash_Table *ht_old = xhash_table (hash_table);
-#ifdef MC_ALLOC
-  Lisp_Hash_Table *ht = alloc_lrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
-
-  copy_lrecord (ht, ht_old);
-#else /* not MC_ALLOC */
-  Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
-  copy_lcrecord (ht, ht_old);
-#endif /* not MC_ALLOC */
+  Lisp_Hash_Table *ht = ALLOC_LCRECORD_TYPE (Lisp_Hash_Table, &lrecord_hash_table);
+  COPY_LCRECORD (ht, ht_old);
 
   ht->hentries = xnew_array (htentry, ht_old->size + 1);
   memcpy (ht->hentries, ht_old->hentries, (ht_old->size + 1) * sizeof (htentry));
--- a/src/events.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/events.h	Mon Oct 24 10:07:42 2005 +0000
@@ -660,11 +660,7 @@
 
 struct Lisp_Timeout
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   int id; /* Id we use to identify the timeout over its lifetime */
   int interval_id; /* Id for this particular interval; this may
                       be different each time the timeout is
@@ -1113,11 +1109,7 @@
  */
 struct command_builder
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object console; /* back pointer to the console this command
                           builder is for */
 #if 0
--- a/src/extents-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/extents-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -103,11 +103,7 @@
 typedef struct extent_auxiliary extent_auxiliary;
 struct extent_auxiliary
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object begin_glyph;
   Lisp_Object end_glyph;
@@ -133,11 +129,7 @@
 
 struct extent_info
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   struct extent_list *extents;
   struct stack_of_extents *soe;
--- a/src/extents.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/extents.c	Mon Oct 24 10:07:42 2005 +0000
@@ -986,17 +986,9 @@
 allocate_extent_auxiliary (EXTENT ext)
 {
   Lisp_Object extent_aux;
-#ifdef MC_ALLOC
   struct extent_auxiliary *data =
-    alloc_lrecord_type (struct extent_auxiliary, &lrecord_extent_auxiliary);
-
-  copy_lrecord (data, &extent_auxiliary_defaults);
-#else /* not MC_ALLOC */
-  struct extent_auxiliary *data =
-    alloc_lcrecord_type (struct extent_auxiliary, &lrecord_extent_auxiliary);
-
-  copy_lcrecord (data, &extent_auxiliary_defaults);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct extent_auxiliary, &lrecord_extent_auxiliary);
+  COPY_LCRECORD (data, &extent_auxiliary_defaults);
   extent_aux = wrap_extent_auxiliary (data);
   ext->plist = Fcons (extent_aux, ext->plist);
   ext->flags.has_aux = 1;
@@ -1174,11 +1166,7 @@
 {
   Lisp_Object extent_info;
   struct extent_info *data =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct extent_info, &lrecord_extent_info);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct extent_info, &lrecord_extent_info);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct extent_info, &lrecord_extent_info);
 
   extent_info = wrap_extent_info (data);
   data->extents = allocate_extent_list ();
@@ -3909,19 +3897,11 @@
       /* also need to copy the aux struct.  It won't work for
 	 this extent to share the same aux struct as the original
 	 one. */
-#ifdef MC_ALLOC
       struct extent_auxiliary *data =
-	alloc_lrecord_type (struct extent_auxiliary,
-			    &lrecord_extent_auxiliary);
-
-      copy_lrecord (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
-#else /* not MC_ALLOC */
-      struct extent_auxiliary *data =
-	alloc_lcrecord_type (struct extent_auxiliary,
+	ALLOC_LCRECORD_TYPE (struct extent_auxiliary,
 			     &lrecord_extent_auxiliary);
 
-      copy_lcrecord (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
-#endif /* not MC_ALLOC */
+      COPY_LCRECORD (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
       XCAR (e->plist) = wrap_extent_auxiliary (data);
     }
 
--- a/src/faces.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/faces.c	Mon Oct 24 10:07:42 2005 +0000
@@ -373,11 +373,7 @@
 static Lisp_Face *
 allocate_face (void)
 {
-#ifdef MC_ALLOC
-  Lisp_Face *result = alloc_lrecord_type (Lisp_Face, &lrecord_face);
-#else /* not MC_ALLOC */
-  Lisp_Face *result = alloc_lcrecord_type (Lisp_Face, &lrecord_face);
-#endif /* not MC_ALLOC */
+  Lisp_Face *result = ALLOC_LCRECORD_TYPE (Lisp_Face, &lrecord_face);
 
   reset_face (result);
   return result;
--- a/src/faces.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/faces.h	Mon Oct 24 10:07:42 2005 +0000
@@ -33,11 +33,7 @@
 
 struct Lisp_Face
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object name;
   Lisp_Object doc_string;
--- a/src/file-coding.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/file-coding.c	Mon Oct 24 10:07:42 2005 +0000
@@ -1409,11 +1409,7 @@
   {
     Lisp_Coding_System *to = XCODING_SYSTEM (new_coding_system);
     Lisp_Coding_System *from = XCODING_SYSTEM (old_coding_system);
-#ifdef MC_ALLOC
-    copy_sized_lrecord (to, from, sizeof_coding_system (from));
-#else /* not MC_ALLOC */
-    copy_sized_lcrecord (to, from, sizeof_coding_system (from));
-#endif /* not MC_ALLOC */
+    COPY_SIZED_LCRECORD (to, from, sizeof_coding_system (from));
     to->name = new_name;
   }
   return new_coding_system;
--- a/src/file-coding.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/file-coding.h	Mon Oct 24 10:07:42 2005 +0000
@@ -188,11 +188,7 @@
 
 struct Lisp_Coding_System
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   struct coding_system_methods *methods;
 
 #define CODING_SYSTEM_SLOT_DECLARATION
--- a/src/frame-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/frame-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -41,11 +41,7 @@
 
 struct frame
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Methods for this frame's console.  This can also be retrieved
      through frame->device->console, but it's faster this way. */
--- a/src/frame.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/frame.c	Mon Oct 24 10:07:42 2005 +0000
@@ -259,11 +259,7 @@
 static void
 nuke_all_frame_slots (struct frame *f)
 {
-#ifdef MC_ALLOC
-  zero_lrecord (f);
-#else /* not MC_ALLOC */
-  zero_lcrecord (f);
-#endif /* not MC_ALLOC */
+  ZERO_LCRECORD (f);
 
 #define MARKED_SLOT(x)	f->x = Qnil;
 #include "frameslots.h"
@@ -279,11 +275,7 @@
   /* This function can GC */
   Lisp_Object frame;
   Lisp_Object root_window;
-#ifdef MC_ALLOC
-  struct frame *f = alloc_lrecord_type (struct frame, &lrecord_frame);
-#else /* not MC_ALLOC */
-  struct frame *f = alloc_lcrecord_type (struct frame, &lrecord_frame);
-#endif /* not MC_ALLOC */
+  struct frame *f = ALLOC_LCRECORD_TYPE (struct frame, &lrecord_frame);
 
   nuke_all_frame_slots (f);
   frame = wrap_frame (f);
--- a/src/glyphs.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/glyphs.c	Mon Oct 24 10:07:42 2005 +0000
@@ -1326,11 +1326,7 @@
 			 Lisp_Object instantiator)
 {
   Lisp_Image_Instance *lp =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Image_Instance, &lrecord_image_instance);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Image_Instance, &lrecord_image_instance);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Image_Instance, &lrecord_image_instance);
   Lisp_Object val;
 
   /* It's not possible to simply keep a record of the domain in which
@@ -1997,11 +1993,7 @@
      device-specific method to copy the window-system subobject. */
   new_ = allocate_image_instance (XIMAGE_INSTANCE_DOMAIN (image_instance),
 				 Qnil, Qnil);
-#ifdef MC_ALLOC
-  copy_lrecord (XIMAGE_INSTANCE (new_), XIMAGE_INSTANCE (image_instance));
-#else /* not MC_ALLOC */
-  copy_lcrecord (XIMAGE_INSTANCE (new_), XIMAGE_INSTANCE (image_instance));
-#endif /* not MC_ALLOC */
+  COPY_LCRECORD (XIMAGE_INSTANCE (new_), XIMAGE_INSTANCE (image_instance));
   /* note that if this method returns non-zero, this method MUST
      copy any window-system resources, so that when one image instance is
      freed, the other one is not hosed. */
@@ -3814,11 +3806,7 @@
 {
   /* This function can GC */
   Lisp_Object obj = Qnil;
-#ifdef MC_ALLOC
-  Lisp_Glyph *g = alloc_lrecord_type (Lisp_Glyph, &lrecord_glyph);
-#else /* not MC_ALLOC */
-  Lisp_Glyph *g = alloc_lcrecord_type (Lisp_Glyph, &lrecord_glyph);
-#endif /* not MC_ALLOC */
+  Lisp_Glyph *g = ALLOC_LCRECORD_TYPE (Lisp_Glyph, &lrecord_glyph);
 
   g->type = type;
   g->image = Fmake_specifier (Qimage); /* This function can GC */
--- a/src/glyphs.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/glyphs.h	Mon Oct 24 10:07:42 2005 +0000
@@ -594,11 +594,7 @@
 
 struct Lisp_Image_Instance
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object domain;		/* The domain in which we were cached. */
   Lisp_Object device;		/* The device of the domain. Recorded
 				   since the domain may get deleted
@@ -950,11 +946,7 @@
 
 struct Lisp_Glyph
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   enum glyph_type type;
 
--- a/src/gui.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/gui.c	Mon Oct 24 10:07:42 2005 +0000
@@ -197,11 +197,7 @@
 Lisp_Object
 allocate_gui_item (void)
 {
-#ifdef MC_ALLOC
-  Lisp_Gui_Item *lp = alloc_lrecord_type (Lisp_Gui_Item, &lrecord_gui_item);
-#else /* not MC_ALLOC */
-  Lisp_Gui_Item *lp = alloc_lcrecord_type (Lisp_Gui_Item, &lrecord_gui_item);
-#endif /* not MC_ALLOC */
+  Lisp_Gui_Item *lp = ALLOC_LCRECORD_TYPE (Lisp_Gui_Item, &lrecord_gui_item);
   Lisp_Object val;
 
   val = wrap_gui_item (lp);
--- a/src/gui.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/gui.h	Mon Oct 24 10:07:42 2005 +0000
@@ -44,11 +44,7 @@
    menu item or submenu properties */
 struct Lisp_Gui_Item
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object name;		/* String */
   Lisp_Object callback;		/* Symbol or form */
   Lisp_Object callback_ex;	/* Form taking context arguments */
--- a/src/keymap.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/keymap.c	Mon Oct 24 10:07:42 2005 +0000
@@ -148,11 +148,7 @@
 
 struct Lisp_Keymap
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object parents;		/* Keymaps to be searched after this one.
 				   An ordered list */
   Lisp_Object prompt;           /* Qnil or a string to print in the minibuffer
@@ -760,11 +756,7 @@
 make_keymap (Elemcount size)
 {
   Lisp_Object result;
-#ifdef MC_ALLOC
-  Lisp_Keymap *keymap = alloc_lrecord_type (Lisp_Keymap, &lrecord_keymap);
-#else /* not MC_ALLOC */
-  Lisp_Keymap *keymap = alloc_lcrecord_type (Lisp_Keymap, &lrecord_keymap);
-#endif /* not MC_ALLOC */
+  Lisp_Keymap *keymap = ALLOC_LCRECORD_TYPE (Lisp_Keymap, &lrecord_keymap);
 
   result = wrap_keymap (keymap);
 
--- a/src/lisp.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/lisp.h	Mon Oct 24 10:07:42 2005 +0000
@@ -2372,11 +2372,7 @@
 
 struct Lisp_Vector
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   long size;
   Lisp_Object contents[1];
 };
@@ -2413,11 +2409,7 @@
 
 struct Lisp_Bit_Vector
 {
-#ifdef MC_ALLOC
-  struct lrecord_header lheader;
-#else /* MC_ALLOC */
-  struct lcrecord_header lheader;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER lheader;
   Elemcount size;
   unsigned long bits[1];
 };
@@ -2778,11 +2770,7 @@
 
 struct weak_box
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object value;
 
   Lisp_Object next_weak_box; /* don't mark through this! */
@@ -2804,11 +2792,7 @@
 
 struct ephemeron 
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object key;
 
@@ -2867,11 +2851,7 @@
 
 struct weak_list
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object list; /* don't mark through this! */
   enum weak_list_type type;
   Lisp_Object next_weak; /* don't mark through this! */
--- a/src/lrecord.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/lrecord.h	Mon Oct 24 10:07:42 2005 +0000
@@ -1,6 +1,6 @@
 /* The "lrecord" structure (header of a compound lisp object).
    Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-   Copyright (C) 1996, 2001, 2002, 2004 Ben Wing.
+   Copyright (C) 1996, 2001, 2002, 2004, 2005 Ben Wing.
 
 This file is part of XEmacs.
 
@@ -659,11 +659,7 @@
    
    struct Lisp_Hash_Table
    {
-#ifdef MC_ALLOC
-     struct lrecord_header header;
-#else
-     struct lcrecord_header header;
-#endif
+     struct LCRECORD_HEADER header;
      Elemcount size;
      Elemcount count;
      Elemcount rehash_count;
@@ -728,11 +724,7 @@
 
    struct Lisp_Specifier
    {
-#ifdef MC_ALLOC
-     struct lrecord_header header;
-#else
-     struct lcrecord_header header;
-#endif
+     struct LCRECORD_HEADER header;
      struct specifier_methods *methods;
    
      ...
@@ -1206,11 +1198,7 @@
    1. Declare the struct for your object in a header file somewhere.
    Remember that it must begin with
 
-#ifdef MC_ALLOC
-   struct lrecord_header header;
-#else
-   struct lcrecord_header header;
-#endif
+   struct LCRECORD_HEADER header;
 
    2. Put the "standard junk" (DECLARE_RECORD()/XFOO/etc.) below the
       struct definition -- see below.
@@ -1244,11 +1232,7 @@
 
 struct toolbar_button
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else
-  struct lcrecord_header header;
-#endif
+  struct LCRECORD_HEADER header;
 
   Lisp_Object next;
   Lisp_Object frame;
@@ -1618,6 +1602,7 @@
 MODULE_API void *
 alloc_automanaged_lcrecord (Bytecount size,
 			    const struct lrecord_implementation *);
+
 #define alloc_lcrecord_type(type, lrecord_implementation) \
   ((type *) alloc_automanaged_lcrecord (sizeof (type), lrecord_implementation))
 
@@ -1681,14 +1666,14 @@
 
 #define copy_lrecord(dst, src) copy_sized_lrecord (dst, src, sizeof (*(dst)))
 
+#endif /* MC_ALLOC */
+
 #define zero_sized_lrecord(lcr, size)				\
    memset ((char *) (lcr) + sizeof (struct lrecord_header), 0,	\
 	   (size) - sizeof (struct lrecord_header))
 
 #define zero_lrecord(lcr) zero_sized_lrecord (lcr, sizeof (*(lcr)))
 
-#endif /* MC_ALLOC */
-
 DECLARE_INLINE_HEADER (
 Bytecount
 detagged_lisp_object_size (const struct lrecord_header *h)
@@ -1709,6 +1694,27 @@
   return detagged_lisp_object_size (XRECORD_LHEADER (o));
 }
 
+#ifdef MC_ALLOC
+#define ALLOC_LCRECORD_TYPE alloc_lrecord_type
+#define COPY_SIZED_LCRECORD copy_sized_lrecord
+#define COPY_LCRECORD copy_lrecord
+#define MALLOCED_STORAGE_SIZE(ptr, size, stats) \
+  mc_alloced_storage_size (size, stats)
+#define ZERO_LCRECORD zero_lrecord
+#define LCRECORD_HEADER lrecord_header
+#define BASIC_ALLOC_LCRECORD alloc_lrecord
+#define FREE_LCRECORD free_lrecord
+#else
+#define ALLOC_LCRECORD_TYPE alloc_lcrecord_type
+#define COPY_SIZED_LCRECORD copy_sized_lcrecord
+#define COPY_LCRECORD copy_lcrecord
+#define MALLOCED_STORAGE_SIZE malloced_storage_size
+#define ZERO_LCRECORD zero_lcrecord
+#define LCRECORD_HEADER lcrecord_header
+#define BASIC_ALLOC_LCRECORD basic_alloc_lcrecord
+#define FREE_LCRECORD free_lcrecord
+#endif
+
 
 /************************************************************************/
 /*		                 Dumping                		*/
--- a/src/lstream.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/lstream.c	Mon Oct 24 10:07:42 2005 +0000
@@ -220,6 +220,7 @@
     }
 
   p = XLSTREAM (alloc_managed_lcrecord (Vlstream_free_list[i]));
+#define COPY_SIZED_LCRECORD copy_sized_lcrecord
 #endif /* not MC_ALLOC */
   /* Zero it out, except the header. */
   memset ((char *) p + sizeof (p->header), '\0',
--- a/src/lstream.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/lstream.h	Mon Oct 24 10:07:42 2005 +0000
@@ -230,11 +230,7 @@
 
 struct lstream
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   const Lstream_implementation *imp; /* methods for this stream */
   Lstream_buffering buffering; /* type of buffering in use */
   Bytecount buffering_size; /* number of bytes buffered */
--- a/src/mule-charset.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/mule-charset.c	Mon Oct 24 10:07:42 2005 +0000
@@ -197,11 +197,7 @@
 
   if (!overwrite)
     {
-#ifdef MC_ALLOC
-      cs = alloc_lrecord_type (Lisp_Charset, &lrecord_charset);
-#else /* not MC_ALLOC */
-      cs = alloc_lcrecord_type (Lisp_Charset, &lrecord_charset);
-#endif /* not MC_ALLOC */
+      cs = ALLOC_LCRECORD_TYPE (Lisp_Charset, &lrecord_charset);
       obj = wrap_charset (cs);
 
       if (final)
@@ -884,11 +880,7 @@
 {
   struct Lisp_Charset *c = XCHARSET (charset);
   xzero (*stats);
-#ifdef MC_ALLOC
-  stats->other   += mc_alloced_storage_size (sizeof (*c), ovstats);
-#else /* not MC_ALLOC */
-  stats->other   += malloced_storage_size (c, sizeof (*c), ovstats);
-#endif /* not MC_ALLOC */
+  stats->other   += MALLOCED_STORAGE_SIZE (c, sizeof (*c), ovstats);
   stats->from_unicode += compute_from_unicode_table_size (charset, ovstats);
   stats->to_unicode += compute_to_unicode_table_size (charset, ovstats);
 }
--- a/src/objects-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/objects-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -99,11 +99,7 @@
 
 struct Lisp_Color_Instance
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object name;
   Lisp_Object device;
 
@@ -123,11 +119,7 @@
 
 struct Lisp_Font_Instance
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object name; /* the instantiator used to create the font instance */
   Lisp_Object truename; /* used by the device-specific methods; we need to
 			   call them to get the truename (#### in reality,
--- a/src/objects.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/objects.c	Mon Oct 24 10:07:42 2005 +0000
@@ -178,11 +178,7 @@
   CHECK_STRING (name);
   device = wrap_device (decode_device (device));
 
-#ifdef MC_ALLOC
-  c = alloc_lrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
-#else /* not MC_ALLOC */
-  c = alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
-#endif /* not MC_ALLOC */
+  c = ALLOC_LCRECORD_TYPE (Lisp_Color_Instance, &lrecord_color_instance);
   c->name = name;
   c->device = device;
   c->data = 0;
@@ -391,11 +387,7 @@
 
   device = wrap_device (decode_device (device));
 
-#ifdef MC_ALLOC
-  f = alloc_lrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
-#else /* not MC_ALLOC */
-  f = alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
-#endif /* not MC_ALLOC */
+  f = ALLOC_LCRECORD_TYPE (Lisp_Font_Instance, &lrecord_font_instance);
   f->name = name;
   f->truename = Qnil;
   f->device = device;
@@ -1206,11 +1198,7 @@
   staticpro_nodump (&Vthe_null_color_instance);
   {
     Lisp_Color_Instance *c =
-#ifdef MC_ALLOC
-      alloc_lrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
-#else /* not MC_ALLOC */
-      alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
-#endif /* not MC_ALLOC */
+      ALLOC_LCRECORD_TYPE (Lisp_Color_Instance, &lrecord_color_instance);
     c->name = Qnil;
     c->device = Qnil;
     c->data = 0;
@@ -1221,11 +1209,7 @@
   staticpro_nodump (&Vthe_null_font_instance);
   {
     Lisp_Font_Instance *f =
-#ifdef MC_ALLOC
-      alloc_lrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
-#else /* not MC_ALLOC */
-      alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
-#endif /* not MC_ALLOC */
+      ALLOC_LCRECORD_TYPE (Lisp_Font_Instance, &lrecord_font_instance);
     f->name = Qnil;
     f->truename = Qnil;
     f->device = Qnil;
--- a/src/opaque.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/opaque.c	Mon Oct 24 10:07:42 2005 +0000
@@ -75,11 +75,7 @@
 make_opaque (const void *data, Bytecount size)
 {
   Lisp_Opaque *p = (Lisp_Opaque *)
-#ifdef MC_ALLOC
-    alloc_lrecord (aligned_sizeof_opaque (size), &lrecord_opaque);
-#else /* not MC_ALLOC */
-    basic_alloc_lcrecord (aligned_sizeof_opaque (size), &lrecord_opaque);
-#endif /* not MC_ALLOC */
+    BASIC_ALLOC_LCRECORD (aligned_sizeof_opaque (size), &lrecord_opaque);
   p->size = size;
 
   if (data == OPAQUE_CLEAR)
--- a/src/opaque.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/opaque.h	Mon Oct 24 10:07:42 2005 +0000
@@ -28,11 +28,7 @@
 
 typedef struct Lisp_Opaque
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Bytecount size;
   max_align_t data[1];
 } Lisp_Opaque;
@@ -58,11 +54,7 @@
 
 typedef struct Lisp_Opaque_Ptr
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   void *ptr;
 } Lisp_Opaque_Ptr;
 
--- a/src/print.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/print.c	Mon Oct 24 10:07:42 2005 +0000
@@ -1453,13 +1453,7 @@
 default_object_printer (Lisp_Object obj, Lisp_Object printcharfun,
 			int UNUSED (escapeflag))
 {
-#ifdef MC_ALLOC
-  struct lrecord_header *header =
-    (struct lrecord_header *) XPNTR (obj);
-#else /* not MC_ALLOC */
-  struct lcrecord_header *header =
-    (struct lcrecord_header *) XPNTR (obj);
-#endif /* not MC_ALLOC */
+  struct LCRECORD_HEADER *header = (struct LCRECORD_HEADER *) XPNTR (obj);
 
   if (print_readably)
     printing_unreadable_object
--- a/src/process.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/process.c	Mon Oct 24 10:07:42 2005 +0000
@@ -483,11 +483,7 @@
 {
   Lisp_Object val, name1;
   int i;
-#ifdef MC_ALLOC
-  Lisp_Process *p = alloc_lrecord_type (Lisp_Process, &lrecord_process);
-#else /* not MC_ALLOC */
-  Lisp_Process *p = alloc_lcrecord_type (Lisp_Process, &lrecord_process);
-#endif /* not MC_ALLOC */
+  Lisp_Process *p = ALLOC_LCRECORD_TYPE (Lisp_Process, &lrecord_process);
 
 #define MARKED_SLOT(x)	p->x = Qnil;
 #include "process-slots.h"
--- a/src/procimpl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/procimpl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -94,11 +94,7 @@
 
 struct Lisp_Process
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Exit code if process has terminated,
      signal which stopped/interrupted process
--- a/src/rangetab.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/rangetab.c	Mon Oct 24 10:07:42 2005 +0000
@@ -328,13 +328,8 @@
 */
        (type))
 {
-#ifdef MC_ALLOC
-  Lisp_Range_Table *rt = alloc_lrecord_type (Lisp_Range_Table,
-					     &lrecord_range_table);
-#else /* not MC_ALLOC */
-  Lisp_Range_Table *rt = alloc_lcrecord_type (Lisp_Range_Table,
+  Lisp_Range_Table *rt = ALLOC_LCRECORD_TYPE (Lisp_Range_Table,
 					      &lrecord_range_table);
-#endif /* not MC_ALLOC */
   rt->entries = Dynarr_new (range_table_entry);
   rt->type = range_table_symbol_to_type (type);
   return wrap_range_table (rt);
@@ -352,11 +347,7 @@
   CHECK_RANGE_TABLE (range_table);
   rt = XRANGE_TABLE (range_table);
 
-#ifdef MC_ALLOC
-  rtnew = alloc_lrecord_type (Lisp_Range_Table, &lrecord_range_table);
-#else /* not MC_ALLOC */
-  rtnew = alloc_lcrecord_type (Lisp_Range_Table, &lrecord_range_table);
-#endif /* not MC_ALLOC */
+  rtnew = ALLOC_LCRECORD_TYPE (Lisp_Range_Table, &lrecord_range_table);
   rtnew->entries = Dynarr_new (range_table_entry);
   rtnew->type = rt->type;
 
--- a/src/rangetab.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/rangetab.h	Mon Oct 24 10:07:42 2005 +0000
@@ -49,11 +49,7 @@
 
 struct Lisp_Range_Table
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   range_table_entry_dynarr *entries;
   enum range_table_type type;
 };
--- a/src/scrollbar-gtk.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/scrollbar-gtk.c	Mon Oct 24 10:07:42 2005 +0000
@@ -484,11 +484,7 @@
       struct gtk_scrollbar_data *data =
 	(struct gtk_scrollbar_data *) inst->scrollbar_data;
 
-#ifdef MC_ALLOC
-      total += mc_alloced_storage_size (sizeof (*data), ovstats);
-#else /* not MC_ALLOC */
-      total += malloced_storage_size (data, sizeof (*data), ovstats);
-#endif /* not MC_ALLOC */
+      total += MALLOCED_STORAGE_SIZE (data, sizeof (*data), ovstats);
       inst = inst->next;
     }
 
--- a/src/scrollbar-msw.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/scrollbar-msw.c	Mon Oct 24 10:07:42 2005 +0000
@@ -433,11 +433,7 @@
       struct mswindows_scrollbar_data *data =
 	(struct mswindows_scrollbar_data *) inst->scrollbar_data;
 
-#ifdef MC_ALLOC
-      total += mc_alloced_storage_size (sizeof (*data), ovstats);
-#else /* not MC_ALLOC */
-      total += malloced_storage_size (data, sizeof (*data), ovstats);
-#endif /* not MC_ALLOC */
+      total += MALLOCED_STORAGE_SIZE (data, sizeof (*data), ovstats);
       inst = inst->next;
     }
 
--- a/src/scrollbar-x.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/scrollbar-x.c	Mon Oct 24 10:07:42 2005 +0000
@@ -703,14 +703,9 @@
       struct x_scrollbar_data *data =
 	(struct x_scrollbar_data *) inst->scrollbar_data;
 
-#ifdef MC_ALLOC
-      total += mc_alloced_storage_size (sizeof (*data), ovstats);
-      total += mc_alloced_storage_size (1 + strlen (data->name), ovstats);
-#else /* not MC_ALLOC */
-      total += malloced_storage_size (data, sizeof (*data), ovstats);
-      total += malloced_storage_size (data->name, 1 + strlen (data->name),
+      total += MALLOCED_STORAGE_SIZE (data, sizeof (*data), ovstats);
+      total += MALLOCED_STORAGE_SIZE (data->name, 1 + strlen (data->name),
 				      ovstats);
-#endif /* not MC_ALLOC */
       inst = inst->next;
     }
 
--- a/src/scrollbar.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/scrollbar.c	Mon Oct 24 10:07:42 2005 +0000
@@ -199,13 +199,8 @@
 {
   struct device *d = XDEVICE (f->device);
   struct scrollbar_instance *instance =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct scrollbar_instance,
-			&lrecord_scrollbar_instance);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct scrollbar_instance,
+    ALLOC_LCRECORD_TYPE (struct scrollbar_instance,
 			 &lrecord_scrollbar_instance);
-#endif /* not MC_ALLOC */
 
   MAYBE_DEVMETH (d, create_scrollbar_instance, (f, vertical, instance));
 
@@ -277,11 +272,7 @@
 
   while (inst)
     {
-#ifdef MC_ALLOC
-      total += mc_alloced_storage_size (sizeof (*inst), ovstats);
-#else /* not MC_ALLOC */
-      total += malloced_storage_size (inst, sizeof (*inst), ovstats);
-#endif /* not MC_ALLOC */
+      total += MALLOCED_STORAGE_SIZE (inst, sizeof (*inst), ovstats);
       inst = inst->next;
     }
 
--- a/src/scrollbar.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/scrollbar.h	Mon Oct 24 10:07:42 2005 +0000
@@ -27,11 +27,7 @@
 
 struct scrollbar_instance
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Used by the frame caches. */
   struct scrollbar_instance *next;
--- a/src/specifier.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/specifier.c	Mon Oct 24 10:07:42 2005 +0000
@@ -493,13 +493,8 @@
 {
   Lisp_Object specifier;
   Lisp_Specifier *sp = (Lisp_Specifier *)
-#ifdef MC_ALLOC
-    alloc_lrecord (aligned_sizeof_specifier (data_size),
-		   &lrecord_specifier);
-#else /* not MC_ALLOC */
-    basic_alloc_lcrecord (aligned_sizeof_specifier (data_size),
+    BASIC_ALLOC_LCRECORD (aligned_sizeof_specifier (data_size),
 			  &lrecord_specifier);
-#endif /* not MC_ALLOC */
 
   sp->methods = spec_meths;
   sp->global_specs = Qnil;
--- a/src/specifier.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/specifier.h	Mon Oct 24 10:07:42 2005 +0000
@@ -216,11 +216,7 @@
 
 struct Lisp_Specifier
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   struct specifier_methods *methods;
 
   /* we keep a chained list of all current specifiers, for GC cleanup
--- a/src/symbols.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/symbols.c	Mon Oct 24 10:07:42 2005 +0000
@@ -2187,13 +2187,8 @@
 
   {
     struct symbol_value_buffer_local *bfwd
-#ifdef MC_ALLOC
-      = alloc_lrecord_type (struct symbol_value_buffer_local,
-			    &lrecord_symbol_value_buffer_local);
-#else /* not MC_ALLOC */
-      = alloc_lcrecord_type (struct symbol_value_buffer_local,
+      = ALLOC_LCRECORD_TYPE (struct symbol_value_buffer_local,
 			     &lrecord_symbol_value_buffer_local);
-#endif /* not MC_ALLOC */
     Lisp_Object foo;
     bfwd->magic.type = SYMVAL_BUFFER_LOCAL;
 
@@ -2300,13 +2295,8 @@
     }
 
   /* Make sure variable is set up to hold per-buffer values */
-#ifdef MC_ALLOC
-  bfwd = alloc_lrecord_type (struct symbol_value_buffer_local,
-			     &lrecord_symbol_value_buffer_local);
-#else /* not MC_ALLOC */
-  bfwd = alloc_lcrecord_type (struct symbol_value_buffer_local,
+  bfwd = ALLOC_LCRECORD_TYPE (struct symbol_value_buffer_local,
 			      &lrecord_symbol_value_buffer_local);
-#endif /* not MC_ALLOC */
   bfwd->magic.type = SYMVAL_SOME_BUFFER_LOCAL;
 
   bfwd->current_buffer = Qnil;
@@ -3025,13 +3015,8 @@
   valcontents = XSYMBOL (variable)->value;
   if (!SYMBOL_VALUE_LISP_MAGIC_P (valcontents))
     {
-#ifdef MC_ALLOC
-      bfwd = alloc_lrecord_type (struct symbol_value_lisp_magic,
-				 &lrecord_symbol_value_lisp_magic);
-#else /* MC_ALLOC */
-      bfwd = alloc_lcrecord_type (struct symbol_value_lisp_magic,
+      bfwd = ALLOC_LCRECORD_TYPE (struct symbol_value_lisp_magic,
 				  &lrecord_symbol_value_lisp_magic);
-#endif /* not MC_ALLOC */
       bfwd->magic.type = SYMVAL_LISP_MAGIC;
       for (i = 0; i < MAGIC_HANDLER_MAX; i++)
 	{
@@ -3166,13 +3151,8 @@
     invalid_change ("Variable is magic and cannot be aliased", variable);
   reject_constant_symbols (variable, Qunbound, 0, Qt);
 
-#ifdef MC_ALLOC
-  bfwd = alloc_lrecord_type (struct symbol_value_varalias,
-			     &lrecord_symbol_value_varalias);
-#else /* not MC_ALLOC */
-  bfwd = alloc_lcrecord_type (struct symbol_value_varalias,
+  bfwd = ALLOC_LCRECORD_TYPE (struct symbol_value_varalias,
 			      &lrecord_symbol_value_varalias);
-#endif /* not MC_ALLOC */
   bfwd->magic.type = SYMVAL_VARALIAS;
   bfwd->aliasee = alias;
   bfwd->shadowed = valcontents;
--- a/src/symeval.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/symeval.h	Mon Oct 24 10:07:42 2005 +0000
@@ -77,11 +77,7 @@
 
 struct symbol_value_magic
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header lcheader;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   void *value;
   enum symbol_value_type type;
 };
--- a/src/toolbar.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/toolbar.c	Mon Oct 24 10:07:42 2005 +0000
@@ -303,11 +303,7 @@
 
   if (!tb)
     {
-#ifdef MC_ALLOC
-      tb = alloc_lrecord_type (struct toolbar_button, &lrecord_toolbar_button);
-#else /* not MC_ALLOC */
-      tb = alloc_lcrecord_type (struct toolbar_button, &lrecord_toolbar_button);
-#endif /* not MC_ALLOC */
+      tb = ALLOC_LCRECORD_TYPE (struct toolbar_button, &lrecord_toolbar_button);
       tb->next = Qnil;
       tb->frame = wrap_frame (f);
       tb->up_glyph = Qnil;
--- a/src/toolbar.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/toolbar.h	Mon Oct 24 10:07:42 2005 +0000
@@ -38,11 +38,7 @@
 
 struct toolbar_button
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   Lisp_Object next;
   Lisp_Object frame;
--- a/src/tooltalk.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/tooltalk.c	Mon Oct 24 10:07:42 2005 +0000
@@ -147,11 +147,7 @@
 
 struct Lisp_Tooltalk_Message
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object plist_sym, callback;
   Tt_message m;
 };
@@ -195,11 +191,7 @@
 {
   Lisp_Object val;
   Lisp_Tooltalk_Message *msg =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Tooltalk_Message, &lrecord_tooltalk_message);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Tooltalk_Message, &lrecord_tooltalk_message);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Tooltalk_Message, &lrecord_tooltalk_message);
 
   msg->m = m;
   msg->callback = Qnil;
@@ -233,11 +225,7 @@
 
 struct Lisp_Tooltalk_Pattern
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   Lisp_Object plist_sym, callback;
   Tt_pattern p;
 };
@@ -280,11 +268,7 @@
 make_tooltalk_pattern (Tt_pattern p)
 {
   Lisp_Tooltalk_Pattern *pat =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (Lisp_Tooltalk_Pattern, &lrecord_tooltalk_pattern);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (Lisp_Tooltalk_Pattern, &lrecord_tooltalk_pattern);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (Lisp_Tooltalk_Pattern, &lrecord_tooltalk_pattern);
   Lisp_Object val;
 
   pat->p = p;
--- a/src/ui-gtk.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/ui-gtk.c	Mon Oct 24 10:07:42 2005 +0000
@@ -280,11 +280,7 @@
 static emacs_ffi_data *
 allocate_ffi_data (void)
 {
-#ifdef MC_ALLOC
-  emacs_ffi_data *data = alloc_lrecord_type (emacs_ffi_data, &lrecord_emacs_ffi);
-#else /* not MC_ALLOC */
-  emacs_ffi_data *data = alloc_lcrecord_type (emacs_ffi_data, &lrecord_emacs_ffi);
-#endif /* not MC_ALLOC */
+  emacs_ffi_data *data = ALLOC_LCRECORD_TYPE (emacs_ffi_data, &lrecord_emacs_ffi);
 
   data->return_type = GTK_TYPE_NONE;
   data->n_args = 0;
@@ -948,13 +944,8 @@
 static emacs_gtk_object_data *
 allocate_emacs_gtk_object_data (void)
 {
-#ifdef MC_ALLOC
-  emacs_gtk_object_data *data = alloc_lrecord_type (emacs_gtk_object_data,
-						    &lrecord_emacs_gtk_object);
-#else /* not MC_ALLOC */
-  emacs_gtk_object_data *data = alloc_lcrecord_type (emacs_gtk_object_data,
+  emacs_gtk_object_data *data = ALLOC_LCRECORD_TYPE (emacs_gtk_object_data,
 						     &lrecord_emacs_gtk_object);
-#endif /* not MC_ALLOC */
 
   data->object = NULL;
   data->alive_p = FALSE;
@@ -1162,13 +1153,8 @@
 static emacs_gtk_boxed_data *
 allocate_emacs_gtk_boxed_data (void)
 {
-#ifdef MC_ALLOC
-  emacs_gtk_boxed_data *data = alloc_lrecord_type (emacs_gtk_boxed_data,
-						   &lrecord_emacs_gtk_boxed);
-#else /* not MC_ALLOC */
-  emacs_gtk_boxed_data *data = alloc_lcrecord_type (emacs_gtk_boxed_data,
+  emacs_gtk_boxed_data *data = ALLOC_LCRECORD_TYPE (emacs_gtk_boxed_data,
 						    &lrecord_emacs_gtk_boxed);
-#endif /* not MC_ALLOC */
 
   data->object = NULL;
   data->object_type = GTK_TYPE_INVALID;
--- a/src/ui-gtk.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/ui-gtk.h	Mon Oct 24 10:07:42 2005 +0000
@@ -21,11 +21,7 @@
 #define MAX_GTK_ARGS 100
 
 typedef struct {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   GtkType return_type;
   GtkType args[MAX_GTK_ARGS];
   gint n_args;
@@ -43,11 +39,7 @@
 
 /* Encapsulate a GtkObject in Lisp */
 typedef struct {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   gboolean alive_p;
   GtkObject *object;
   Lisp_Object plist;
@@ -64,11 +56,7 @@
 
 /* Encapsulate a GTK_TYPE_BOXED in lisp */
 typedef struct {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
   GtkType object_type;
   void *object;
 } emacs_gtk_boxed_data;
--- a/src/unicode.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/unicode.c	Mon Oct 24 10:07:42 2005 +0000
@@ -548,15 +548,10 @@
       }
     }
 
-#ifdef MC_ALLOC
-  size += mc_alloced_storage_size (256 * (level == 1 ? sizeof (short) :
-					  sizeof (void *)), stats);
-#else /* not MC_ALLOC */
-  size += malloced_storage_size (table,
+  size += MALLOCED_STORAGE_SIZE (table,
 				 256 * (level == 1 ? sizeof (short) :
 					sizeof (void *)),
 				 stats);
-#endif /* not MC_ALLOC */
   return size;
 }
 
@@ -578,15 +573,10 @@
 	}
     }
 
-#ifdef MC_ALLOC
-  size += mc_alloced_storage_size (96 * (level == 1 ? sizeof (int) :
-					 sizeof (void *)), stats);
-#else /* not MC_ALLOC */
-  size += malloced_storage_size (table,
+  size += MALLOCED_STORAGE_SIZE (table,
 				 96 * (level == 1 ? sizeof (int) :
 				       sizeof (void *)),
 				 stats);
-#endif /* not MC_ALLOC */
   return size;
 }
 
--- a/src/window-impl.h	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/window-impl.h	Mon Oct 24 10:07:42 2005 +0000
@@ -84,11 +84,7 @@
 
 struct window
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* The upper left corner coordinates of this window,
      as integers (pixels) relative to upper left corner of frame = 0, 0 */
@@ -172,11 +168,7 @@
 
 struct window_mirror
 {
-#ifdef MC_ALLOC
-  struct lrecord_header header;
-#else /* MC_ALLOC */
-  struct lcrecord_header header;
-#endif /* MC_ALLOC */
+  struct LCRECORD_HEADER header;
 
   /* Frame this mirror is on. */
   struct frame *frame;
--- a/src/window.c	Mon Oct 24 08:12:59 2005 +0000
+++ b/src/window.c	Mon Oct 24 10:07:42 2005 +0000
@@ -346,11 +346,7 @@
 Lisp_Object
 allocate_window (void)
 {
-#ifdef MC_ALLOC
-  struct window *p = alloc_lrecord_type (struct window, &lrecord_window);
-#else /* not MC_ALLOC */
-  struct window *p = alloc_lcrecord_type (struct window, &lrecord_window);
-#endif /* not MC_ALLOC */
+  struct window *p = ALLOC_LCRECORD_TYPE (struct window, &lrecord_window);
   Lisp_Object val = wrap_window (p);
 
 #define WINDOW_SLOT(slot) p->slot = Qnil;
@@ -487,11 +483,7 @@
 new_window_mirror (struct frame *f)
 {
   struct window_mirror *t =
-#ifdef MC_ALLOC
-    alloc_lrecord_type (struct window_mirror, &lrecord_window_mirror);
-#else /* not MC_ALLOC */
-    alloc_lcrecord_type (struct window_mirror, &lrecord_window_mirror);
-#endif /* not MC_ALLOC */
+    ALLOC_LCRECORD_TYPE (struct window_mirror, &lrecord_window_mirror);
 
   t->frame = f;
   t->current_display_lines = Dynarr_new (display_line);
@@ -3810,18 +3802,10 @@
 {
   Lisp_Object new;
   struct window *o = XWINDOW (window);
-#ifdef MC_ALLOC
-  struct window *p = alloc_lrecord_type (struct window, &lrecord_window);
-#else /* not MC_ALLOC */
-  struct window *p = alloc_lcrecord_type (struct window, &lrecord_window);
-#endif /* not MC_ALLOC */
+  struct window *p = ALLOC_LCRECORD_TYPE (struct window, &lrecord_window);
 
   new = wrap_window (p);
-#ifdef MC_ALLOC
-  copy_lrecord (p, o);
-#else /* MC_ALLOC */
-  copy_lcrecord (p, o);
-#endif /* MC_ALLOC */
+  COPY_LCRECORD (p, o);
 
   /* Don't copy the pointers to the line start cache or the face
      instances. */
@@ -5112,13 +5096,8 @@
 {
   if (!mir)
     return;
-#ifdef MC_ALLOC
-  stats->other += mc_alloced_storage_size (sizeof (struct window_mirror),
-					   ovstats);
-#else /* not MC_ALLOC */
-  stats->other += malloced_storage_size (mir, sizeof (struct window_mirror),
+  stats->other += MALLOCED_STORAGE_SIZE (mir, sizeof (struct window_mirror),
 					 ovstats);
-#endif /* not MC_ALLOC */
 #ifdef HAVE_SCROLLBARS
   {
     struct device *d = XDEVICE (FRAME_DEVICE (mir->frame));
@@ -5142,11 +5121,7 @@
 		      struct overhead_stats *ovstats)
 {
   xzero (*stats);
-#ifdef MC_ALLOC
-  stats->other += mc_alloced_storage_size (sizeof (struct window), ovstats);
-#else /* not MC_ALLOC */
-  stats->other += malloced_storage_size (w, sizeof (struct window), ovstats);
-#endif /* not MC_ALLOC */
+  stats->other += MALLOCED_STORAGE_SIZE (w, sizeof (struct window), ovstats);
   stats->face += compute_face_cachel_usage (w->face_cachels, ovstats);
   stats->glyph += compute_glyph_cachel_usage (w->glyph_cachels, ovstats);
   stats->line_start +=