Mercurial > hg > xemacs-beta
comparison src/extents.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 | 0e0af7cbfd1b |
children | facf3239ba30 |
comparison
equal
deleted
inserted
replaced
3016:f252275fb013 | 3017:1e7cc382eb16 |
---|---|
984 struct extent_auxiliary); | 984 struct extent_auxiliary); |
985 void | 985 void |
986 allocate_extent_auxiliary (EXTENT ext) | 986 allocate_extent_auxiliary (EXTENT ext) |
987 { | 987 { |
988 Lisp_Object extent_aux; | 988 Lisp_Object extent_aux; |
989 #ifdef MC_ALLOC | |
990 struct extent_auxiliary *data = | 989 struct extent_auxiliary *data = |
991 alloc_lrecord_type (struct extent_auxiliary, &lrecord_extent_auxiliary); | 990 ALLOC_LCRECORD_TYPE (struct extent_auxiliary, &lrecord_extent_auxiliary); |
992 | 991 COPY_LCRECORD (data, &extent_auxiliary_defaults); |
993 copy_lrecord (data, &extent_auxiliary_defaults); | |
994 #else /* not MC_ALLOC */ | |
995 struct extent_auxiliary *data = | |
996 alloc_lcrecord_type (struct extent_auxiliary, &lrecord_extent_auxiliary); | |
997 | |
998 copy_lcrecord (data, &extent_auxiliary_defaults); | |
999 #endif /* not MC_ALLOC */ | |
1000 extent_aux = wrap_extent_auxiliary (data); | 992 extent_aux = wrap_extent_auxiliary (data); |
1001 ext->plist = Fcons (extent_aux, ext->plist); | 993 ext->plist = Fcons (extent_aux, ext->plist); |
1002 ext->flags.has_aux = 1; | 994 ext->flags.has_aux = 1; |
1003 } | 995 } |
1004 | 996 |
1172 static Lisp_Object | 1164 static Lisp_Object |
1173 allocate_extent_info (void) | 1165 allocate_extent_info (void) |
1174 { | 1166 { |
1175 Lisp_Object extent_info; | 1167 Lisp_Object extent_info; |
1176 struct extent_info *data = | 1168 struct extent_info *data = |
1177 #ifdef MC_ALLOC | 1169 ALLOC_LCRECORD_TYPE (struct extent_info, &lrecord_extent_info); |
1178 alloc_lrecord_type (struct extent_info, &lrecord_extent_info); | |
1179 #else /* not MC_ALLOC */ | |
1180 alloc_lcrecord_type (struct extent_info, &lrecord_extent_info); | |
1181 #endif /* not MC_ALLOC */ | |
1182 | 1170 |
1183 extent_info = wrap_extent_info (data); | 1171 extent_info = wrap_extent_info (data); |
1184 data->extents = allocate_extent_list (); | 1172 data->extents = allocate_extent_list (); |
1185 data->soe = 0; | 1173 data->soe = 0; |
1186 return extent_info; | 1174 return extent_info; |
3907 if (e->flags.has_aux) | 3895 if (e->flags.has_aux) |
3908 { | 3896 { |
3909 /* also need to copy the aux struct. It won't work for | 3897 /* also need to copy the aux struct. It won't work for |
3910 this extent to share the same aux struct as the original | 3898 this extent to share the same aux struct as the original |
3911 one. */ | 3899 one. */ |
3912 #ifdef MC_ALLOC | |
3913 struct extent_auxiliary *data = | 3900 struct extent_auxiliary *data = |
3914 alloc_lrecord_type (struct extent_auxiliary, | 3901 ALLOC_LCRECORD_TYPE (struct extent_auxiliary, |
3915 &lrecord_extent_auxiliary); | |
3916 | |
3917 copy_lrecord (data, XEXTENT_AUXILIARY (XCAR (original->plist))); | |
3918 #else /* not MC_ALLOC */ | |
3919 struct extent_auxiliary *data = | |
3920 alloc_lcrecord_type (struct extent_auxiliary, | |
3921 &lrecord_extent_auxiliary); | 3902 &lrecord_extent_auxiliary); |
3922 | 3903 |
3923 copy_lcrecord (data, XEXTENT_AUXILIARY (XCAR (original->plist))); | 3904 COPY_LCRECORD (data, XEXTENT_AUXILIARY (XCAR (original->plist))); |
3924 #endif /* not MC_ALLOC */ | |
3925 XCAR (e->plist) = wrap_extent_auxiliary (data); | 3905 XCAR (e->plist) = wrap_extent_auxiliary (data); |
3926 } | 3906 } |
3927 | 3907 |
3928 { | 3908 { |
3929 /* we may have just added another child to the parent extent. */ | 3909 /* we may have just added another child to the parent extent. */ |