Mercurial > hg > xemacs-beta
comparison src/objects-tty.c @ 5140:e5380fdaf8f1
merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Sat, 13 Mar 2010 05:38:34 -0600 |
| parents | a9c41067dd88 |
| children | 6c6d78781d59 |
comparison
equal
deleted
inserted
replaced
| 5139:a48ef26d87ee | 5140:e5380fdaf8f1 |
|---|---|
| 41 { XD_LISP_OBJECT, offsetof (struct tty_color_instance_data, symbol) }, | 41 { XD_LISP_OBJECT, offsetof (struct tty_color_instance_data, symbol) }, |
| 42 { XD_END } | 42 { XD_END } |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #ifdef NEW_GC | 45 #ifdef NEW_GC |
| 46 DEFINE_LRECORD_IMPLEMENTATION ("tty-color-instance-data", | 46 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("tty-color-instance-data", |
| 47 tty_color_instance_data, | 47 tty_color_instance_data, |
| 48 0, /*dumpable-flag*/ | 48 0, tty_color_instance_data_description_1, |
| 49 0, 0, 0, 0, 0, | 49 struct tty_color_instance_data); |
| 50 tty_color_instance_data_description_1, | |
| 51 struct tty_color_instance_data); | |
| 52 #else /* not NEW_GC */ | 50 #else /* not NEW_GC */ |
| 53 const struct sized_memory_description tty_color_instance_data_description = { | 51 const struct sized_memory_description tty_color_instance_data_description = { |
| 54 sizeof (struct tty_color_instance_data), tty_color_instance_data_description_1 | 52 sizeof (struct tty_color_instance_data), tty_color_instance_data_description_1 |
| 55 }; | 53 }; |
| 56 #endif /* not NEW_GC */ | 54 #endif /* not NEW_GC */ |
| 59 { XD_LISP_OBJECT, offsetof (struct tty_font_instance_data, charset) }, | 57 { XD_LISP_OBJECT, offsetof (struct tty_font_instance_data, charset) }, |
| 60 { XD_END } | 58 { XD_END } |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 #ifdef NEW_GC | 61 #ifdef NEW_GC |
| 64 DEFINE_LRECORD_IMPLEMENTATION ("tty-font-instance-data", | 62 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("tty-font-instance-data", |
| 65 tty_font_instance_data, | 63 tty_font_instance_data, 0, |
| 66 0, /*dumpable-flag*/ | 64 tty_font_instance_data_description_1, |
| 67 0, 0, 0, 0, 0, | 65 struct tty_font_instance_data); |
| 68 tty_font_instance_data_description_1, | |
| 69 struct tty_font_instance_data); | |
| 70 #else /* not NEW_GC */ | 66 #else /* not NEW_GC */ |
| 71 const struct sized_memory_description tty_font_instance_data_description = { | 67 const struct sized_memory_description tty_font_instance_data_description = { |
| 72 sizeof (struct tty_font_instance_data), tty_font_instance_data_description_1 | 68 sizeof (struct tty_font_instance_data), tty_font_instance_data_description_1 |
| 73 }; | 69 }; |
| 74 #endif /* not NEW_GC */ | 70 #endif /* not NEW_GC */ |
| 193 return 0; | 189 return 0; |
| 194 } | 190 } |
| 195 | 191 |
| 196 /* Don't allocate the data until we're sure that we will succeed. */ | 192 /* Don't allocate the data until we're sure that we will succeed. */ |
| 197 #ifdef NEW_GC | 193 #ifdef NEW_GC |
| 198 c->data = alloc_lrecord_type (struct tty_color_instance_data, | 194 c->data = |
| 199 &lrecord_tty_color_instance_data); | 195 XTTY_COLOR_INSTANCE_DATA (ALLOC_NORMAL_LISP_OBJECT (tty_color_instance_data)); |
| 200 #else /* not NEW_GC */ | 196 #else /* not NEW_GC */ |
| 201 c->data = xnew (struct tty_color_instance_data); | 197 c->data = xnew (struct tty_color_instance_data); |
| 202 #endif /* not NEW_GC */ | 198 #endif /* not NEW_GC */ |
| 203 COLOR_INSTANCE_TTY_SYMBOL (c) = name; | 199 COLOR_INSTANCE_TTY_SYMBOL (c) = name; |
| 204 | 200 |
| 278 #endif | 274 #endif |
| 279 } | 275 } |
| 280 | 276 |
| 281 /* Don't allocate the data until we're sure that we will succeed. */ | 277 /* Don't allocate the data until we're sure that we will succeed. */ |
| 282 #ifdef NEW_GC | 278 #ifdef NEW_GC |
| 283 f->data = alloc_lrecord_type (struct tty_font_instance_data, | 279 f->data = |
| 284 &lrecord_tty_font_instance_data); | 280 XTTY_FONT_INSTANCE_DATA (ALLOC_NORMAL_LISP_OBJECT (tty_font_instance_data)); |
| 285 #else /* not NEW_GC */ | 281 #else /* not NEW_GC */ |
| 286 f->data = xnew (struct tty_font_instance_data); | 282 f->data = xnew (struct tty_font_instance_data); |
| 287 #endif /* not NEW_GC */ | 283 #endif /* not NEW_GC */ |
| 288 FONT_INSTANCE_TTY_CHARSET (f) = charset; | 284 FONT_INSTANCE_TTY_CHARSET (f) = charset; |
| 289 #ifdef MULE | 285 #ifdef MULE |
| 395 | 391 |
| 396 void | 392 void |
| 397 syms_of_objects_tty (void) | 393 syms_of_objects_tty (void) |
| 398 { | 394 { |
| 399 #ifdef NEW_GC | 395 #ifdef NEW_GC |
| 400 INIT_LRECORD_IMPLEMENTATION (tty_color_instance_data); | 396 INIT_LISP_OBJECT (tty_color_instance_data); |
| 401 INIT_LRECORD_IMPLEMENTATION (tty_font_instance_data); | 397 INIT_LISP_OBJECT (tty_font_instance_data); |
| 402 #endif /* NEW_GC */ | 398 #endif /* NEW_GC */ |
| 403 | 399 |
| 404 DEFSUBR (Fregister_tty_color); | 400 DEFSUBR (Fregister_tty_color); |
| 405 DEFSUBR (Funregister_tty_color); | 401 DEFSUBR (Funregister_tty_color); |
| 406 DEFSUBR (Ffind_tty_color); | 402 DEFSUBR (Ffind_tty_color); |
