Mercurial > hg > xemacs-beta
comparison src/rangetab.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
39 | 39 |
40 #### We should be using the gap array stuff from extents.c. This | 40 #### We should be using the gap array stuff from extents.c. This |
41 is not hard but just requires moving that stuff out of that file. */ | 41 is not hard but just requires moving that stuff out of that file. */ |
42 | 42 |
43 static Lisp_Object | 43 static Lisp_Object |
44 mark_range_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) | 44 mark_range_table (Lisp_Object obj) |
45 { | 45 { |
46 struct Lisp_Range_Table *rt = XRANGE_TABLE (obj); | 46 struct Lisp_Range_Table *rt = XRANGE_TABLE (obj); |
47 int i; | 47 int i; |
48 | 48 |
49 for (i = 0; i < Dynarr_length (rt->entries); i++) | 49 for (i = 0; i < Dynarr_length (rt->entries); i++) |
50 markobj (Dynarr_at (rt->entries, i).val); | 50 mark_object (Dynarr_at (rt->entries, i).val); |
51 return Qnil; | 51 return Qnil; |
52 } | 52 } |
53 | 53 |
54 static void | 54 static void |
55 print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) | 55 print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) |
130 i*size/5), | 130 i*size/5), |
131 depth)); | 131 depth)); |
132 return hash; | 132 return hash; |
133 } | 133 } |
134 | 134 |
135 static const struct lrecord_description rte_description_1[] = { | |
136 { XD_LISP_OBJECT, offsetof(range_table_entry, val), 1 }, | |
137 { XD_END } | |
138 }; | |
139 | |
140 static const struct struct_description rte_description = { | |
141 sizeof(range_table_entry), | |
142 rte_description_1 | |
143 }; | |
144 | |
145 static const struct lrecord_description rted_description_1[] = { | |
146 XD_DYNARR_DESC(range_table_entry_dynarr, &rte_description), | |
147 { XD_END } | |
148 }; | |
149 | |
150 static const struct struct_description rted_description = { | |
151 sizeof(range_table_entry_dynarr), | |
152 rted_description_1 | |
153 }; | |
154 | |
155 static const struct lrecord_description range_table_description[] = { | |
156 { XD_STRUCT_PTR, offsetof(struct Lisp_Range_Table, entries), 1, &rted_description }, | |
157 { XD_END } | |
158 }; | |
159 | |
135 DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table, | 160 DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table, |
136 mark_range_table, print_range_table, 0, | 161 mark_range_table, print_range_table, 0, |
137 range_table_equal, range_table_hash, 0, | 162 range_table_equal, range_table_hash, |
163 range_table_description, | |
138 struct Lisp_Range_Table); | 164 struct Lisp_Range_Table); |
139 | 165 |
140 /************************************************************************/ | 166 /************************************************************************/ |
141 /* Range table operations */ | 167 /* Range table operations */ |
142 /************************************************************************/ | 168 /************************************************************************/ |