X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fdevice.c;h=a080d09113a018c8945ea4989b731cdf34bf1f1a;hp=dd98407248077789e0f2fe63e1adf6ea50cab99b;hb=ea1ea793fe6e244ef5555ed983423a204101af13;hpb=399b9f4466f37412410de8ec4a08e3dc5504ad10 diff --git a/src/device.c b/src/device.c index dd98407..a080d09 100644 --- a/src/device.c +++ b/src/device.c @@ -73,41 +73,40 @@ Lisp_Object Qslow_device, Qsecurity; Lisp_Object Qdevicep, Qdevice_live_p; -Lisp_Object Qdelete_device; Lisp_Object Qcreate_device_hook; Lisp_Object Qdelete_device_hook; Lisp_Object Vdevice_class_list; static Lisp_Object -mark_device (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_device (Lisp_Object obj) { struct device *d = XDEVICE (obj); - markobj (d->name); - markobj (d->connection); - markobj (d->canon_connection); - markobj (d->console); - markobj (d->selected_frame); - markobj (d->frame_with_focus_real); - markobj (d->frame_with_focus_for_hooks); - markobj (d->frame_that_ought_to_have_focus); - markobj (d->device_class); - markobj (d->user_defined_tags); - markobj (d->pixel_to_glyph_cache.obj1); - markobj (d->pixel_to_glyph_cache.obj2); - - markobj (d->color_instance_cache); - markobj (d->font_instance_cache); + mark_object (d->name); + mark_object (d->connection); + mark_object (d->canon_connection); + mark_object (d->console); + mark_object (d->selected_frame); + mark_object (d->frame_with_focus_real); + mark_object (d->frame_with_focus_for_hooks); + mark_object (d->frame_that_ought_to_have_focus); + mark_object (d->device_class); + mark_object (d->user_defined_tags); + mark_object (d->pixel_to_glyph_cache.obj1); + mark_object (d->pixel_to_glyph_cache.obj2); + + mark_object (d->color_instance_cache); + mark_object (d->font_instance_cache); #ifdef MULE - markobj (d->charset_font_cache); + mark_object (d->charset_font_cache); #endif - markobj (d->image_instance_cache); + mark_object (d->image_instance_cache); if (d->devmeths) { - markobj (d->devmeths->symbol); - MAYBE_DEVMETH (d, mark_device, (d, markobj)); + mark_object (d->devmeths->symbol); + MAYBE_DEVMETH (d, mark_device, (d)); } return (d->frame_list); @@ -1250,7 +1249,6 @@ syms_of_device (void) defsymbol (&Qdevicep, "devicep"); defsymbol (&Qdevice_live_p, "device-live-p"); - defsymbol (&Qdelete_device, "delete-device"); defsymbol (&Qcreate_device_hook, "create-device-hook"); defsymbol (&Qdelete_device_hook, "delete-device-hook"); @@ -1299,8 +1297,18 @@ syms_of_device (void) } void +reinit_vars_of_device (void) +{ + staticpro_nodump (&Vdefault_device); + Vdefault_device = Qnil; + asynch_device_change_pending = 0; +} + +void vars_of_device (void) { + reinit_vars_of_device (); + DEFVAR_LISP ("create-device-hook", &Vcreate_device_hook /* Function or functions to call when a device is created. One argument, the newly-created device. @@ -1316,11 +1324,6 @@ One argument, the to-be-deleted device. */ ); Vdelete_device_hook = Qnil; - staticpro (&Vdefault_device); - Vdefault_device = Qnil; - - asynch_device_change_pending = 0; - Vdevice_class_list = list3 (Qcolor, Qgrayscale, Qmono); staticpro (&Vdevice_class_list);