comparison src/gpmevent.c @ 2834:172fb92bd156

[xemacs-hg @ 2005-06-28 11:32:13 by crestani] 2005-06-28 Marcus Crestani <crestani@xemacs.org> * gpmevent.c: Remove workaround. * gpmevent.c (Fgpm_enable): Use GET_DEFUN_LISP_OBJECT to get Lisp_Object of a built-in function. * gpmevent.c (syms_of_gpmevent): Remove workaround. * lisp.h (GET_DEFUN_LISP_OBJECT): New. Returns Lisp_Object of a DEFUN. * tooltalk.c (init_tooltalk): Use GET_DEFUN_LISP_OBJECT to get Lisp_Object of a built-in function.
author crestani
date Tue, 28 Jun 2005 11:32:15 +0000
parents 6fa9919a9a0b
children facf3239ba30
comparison
equal deleted inserted replaced
2833:3a7b185f1a2e 2834:172fb92bd156
56 static int (*orig_event_pending_p) (int); 56 static int (*orig_event_pending_p) (int);
57 static void (*orig_next_event_cb) (Lisp_Event *); 57 static void (*orig_next_event_cb) (Lisp_Event *);
58 58
59 static Lisp_Object gpm_event_queue; 59 static Lisp_Object gpm_event_queue;
60 static Lisp_Object gpm_event_queue_tail; 60 static Lisp_Object gpm_event_queue_tail;
61
62 #ifdef MC_ALLOC
63 static Lisp_Object MC_ALLOC_Freceive_gpm_event;
64 #endif /* MC_ALLOC */
65 61
66 struct __gpm_state 62 struct __gpm_state
67 { 63 {
68 int gpm_tried; 64 int gpm_tried;
69 int gpm_flag; 65 int gpm_flag;
595 591
596 if (!NILP (gpm_process)) 592 if (!NILP (gpm_process))
597 { 593 {
598 rval = 0; 594 rval = 0;
599 Fprocess_kill_without_query (gpm_process, Qnil); 595 Fprocess_kill_without_query (gpm_process, Qnil);
600 #ifdef MC_ALLOC 596 gpm_filter = GET_DEFUN_LISP_OBJECT (Freceive_gpm_event);
601 gpm_filter = MC_ALLOC_Freceive_gpm_event;
602 #else /* not MC_ALLOC */
603 gpm_filter = wrap_subr (&SFreceive_gpm_event);
604 #endif /* not MC_ALLOC */
605 set_process_filter (gpm_process, gpm_filter, 1, 0); 597 set_process_filter (gpm_process, gpm_filter, 1, 0);
606 598
607 /* Keep track of the device for later */ 599 /* Keep track of the device for later */
608 /* Fput (gpm_process, intern ("gpm-device"), device); */ 600 /* Fput (gpm_process, intern ("gpm-device"), device); */
609 } 601 }
627 dump_add_root_lisp_object (&gpm_event_queue_tail); 619 dump_add_root_lisp_object (&gpm_event_queue_tail);
628 } 620 }
629 621
630 void syms_of_gpmevent (void) 622 void syms_of_gpmevent (void)
631 { 623 {
632 #ifdef MC_ALLOC
633 #define DEFSUBR_receive_gpm_event(Fname) \
634 do { \
635 DEFSUBR_MC_ALLOC (Fname); \
636 defsubr (S##Fname); \
637 MC_ALLOC_Freceive_gpm_event = wrap_subr (S##Fname); \
638 } while (0)
639 DEFSUBR_receive_gpm_event (Freceive_gpm_event);
640 #else /* not MC_ALLOC */
641 DEFSUBR (Freceive_gpm_event); 624 DEFSUBR (Freceive_gpm_event);
642 #endif /* not MC_ALLOC */
643 DEFSUBR (Fgpm_enable); 625 DEFSUBR (Fgpm_enable);
644 DEFSUBR (Fgpm_enabled_p); 626 DEFSUBR (Fgpm_enabled_p);
645 } 627 }
646 628
647 #endif /* HAVE_GPM */ 629 #endif /* HAVE_GPM */