Mercurial > hg > xemacs-beta
comparison src/console.c @ 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 | 6fa9919a9a0b |
children | b7f26b2f78bd |
comparison
equal
deleted
inserted
replaced
3016:f252275fb013 | 3017:1e7cc382eb16 |
---|---|
192 | 192 |
193 static struct console * | 193 static struct console * |
194 allocate_console (Lisp_Object type) | 194 allocate_console (Lisp_Object type) |
195 { | 195 { |
196 Lisp_Object console; | 196 Lisp_Object console; |
197 #ifdef MC_ALLOC | 197 struct console *con = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console); |
198 struct console *con = alloc_lrecord_type (struct console, &lrecord_console); | |
199 #else /* not MC_ALLOC */ | |
200 struct console *con = alloc_lcrecord_type (struct console, &lrecord_console); | |
201 #endif /* not MC_ALLOC */ | |
202 struct gcpro gcpro1; | 198 struct gcpro gcpro1; |
203 | 199 |
204 #ifdef MC_ALLOC | 200 COPY_LCRECORD (con, XCONSOLE (Vconsole_defaults)); |
205 copy_lrecord (con, XCONSOLE (Vconsole_defaults)); | |
206 #else /* not MC_ALLOC */ | |
207 copy_lcrecord (con, XCONSOLE (Vconsole_defaults)); | |
208 #endif /* not MC_ALLOC */ | |
209 | 201 |
210 console = wrap_console (con); | 202 console = wrap_console (con); |
211 GCPRO1 (console); | 203 GCPRO1 (console); |
212 | 204 |
213 con->conmeths = decode_console_type (type, ERROR_ME); | 205 con->conmeths = decode_console_type (type, ERROR_ME); |
668 } | 660 } |
669 | 661 |
670 static void | 662 static void |
671 nuke_all_console_slots (struct console *con, Lisp_Object zap) | 663 nuke_all_console_slots (struct console *con, Lisp_Object zap) |
672 { | 664 { |
673 #ifdef MC_ALLOC | 665 ZERO_LCRECORD (con); |
674 zero_lrecord (con); | |
675 #else /* not MC_ALLOC */ | |
676 zero_lcrecord (con); | |
677 #endif /* not MC_ALLOC */ | |
678 | 666 |
679 #define MARKED_SLOT(x) con->x = zap; | 667 #define MARKED_SLOT(x) con->x = zap; |
680 #include "conslots.h" | 668 #include "conslots.h" |
681 } | 669 } |
682 | 670 |
1403 common_init_complex_vars_of_console (void) | 1391 common_init_complex_vars_of_console (void) |
1404 { | 1392 { |
1405 /* Make sure all markable slots in console_defaults | 1393 /* Make sure all markable slots in console_defaults |
1406 are initialized reasonably, so mark_console won't choke. | 1394 are initialized reasonably, so mark_console won't choke. |
1407 */ | 1395 */ |
1408 #ifdef MC_ALLOC | 1396 struct console *defs = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console); |
1409 struct console *defs = alloc_lrecord_type (struct console, &lrecord_console); | 1397 struct console *syms = ALLOC_LCRECORD_TYPE (struct console, &lrecord_console); |
1410 struct console *syms = alloc_lrecord_type (struct console, &lrecord_console); | |
1411 #else /* not MC_ALLOC */ | |
1412 struct console *defs = alloc_lcrecord_type (struct console, &lrecord_console); | |
1413 struct console *syms = alloc_lcrecord_type (struct console, &lrecord_console); | |
1414 #endif /* not MC_ALLOC */ | |
1415 | 1398 |
1416 staticpro_nodump (&Vconsole_defaults); | 1399 staticpro_nodump (&Vconsole_defaults); |
1417 staticpro_nodump (&Vconsole_local_symbols); | 1400 staticpro_nodump (&Vconsole_local_symbols); |
1418 Vconsole_defaults = wrap_console (defs); | 1401 Vconsole_defaults = wrap_console (defs); |
1419 Vconsole_local_symbols = wrap_console (syms); | 1402 Vconsole_local_symbols = wrap_console (syms); |