static Lisp_Object
mark_tooltalk_message (Lisp_Object obj, void (*markobj) (Lisp_Object))
{
- (markobj) (XTOOLTALK_MESSAGE (obj)->callback);
+ markobj (XTOOLTALK_MESSAGE (obj)->callback);
return XTOOLTALK_MESSAGE (obj)->plist_sym;
}
error ("printing unreadable object #<tooltalk_message 0x%x>",
p->header.uid);
- sprintf (buf, "#<tooltalk_message id:%p 0x%x>", p->m, p->header.uid);
+ sprintf (buf, "#<tooltalk_message id:0x%lx 0x%x>", (long) (p->m), p->header.uid);
write_c_string (buf, printcharfun);
}
DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message,
mark_tooltalk_message, print_tooltalk_message,
- 0, 0, 0,
+ 0, 0, 0, 0,
struct Lisp_Tooltalk_Message);
\f
static Lisp_Object
Lisp_Object val;
struct Lisp_Tooltalk_Message *msg =
alloc_lcrecord_type (struct Lisp_Tooltalk_Message,
- lrecord_tooltalk_message);
+ &lrecord_tooltalk_message);
msg->m = m;
msg->callback = Qnil;
static Lisp_Object
mark_tooltalk_pattern (Lisp_Object obj, void (*markobj) (Lisp_Object))
{
- (markobj) (XTOOLTALK_PATTERN (obj)->callback);
+ markobj (XTOOLTALK_PATTERN (obj)->callback);
return XTOOLTALK_PATTERN (obj)->plist_sym;
}
error ("printing unreadable object #<tooltalk_pattern 0x%x>",
p->header.uid);
- sprintf (buf, "#<tooltalk_pattern id:%p 0x%x>", p->p, p->header.uid);
+ sprintf (buf, "#<tooltalk_pattern id:0x%lx 0x%x>", (long) (p->p), p->header.uid);
write_c_string (buf, printcharfun);
}
DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern,
mark_tooltalk_pattern, print_tooltalk_pattern,
- 0, 0, 0,
+ 0, 0, 0, 0,
struct Lisp_Tooltalk_Pattern);
\f
static Lisp_Object
{
struct Lisp_Tooltalk_Pattern *pat =
alloc_lcrecord_type (struct Lisp_Tooltalk_Pattern,
- lrecord_tooltalk_pattern);
+ &lrecord_tooltalk_pattern);
Lisp_Object val;
pat->p = p;
(XTOOLTALK_MESSAGE (message_)->plist_sym));
else
- signal_simple_error ("invalid value for `get-tooltalk-message-attribute'",
+ signal_simple_error ("Invalid value for `get-tooltalk-message-attribute'",
attribute);
return Qnil;
return Fput (XTOOLTALK_MESSAGE (message_)->plist_sym, argn, value);
}
else
- signal_simple_error ("invalid value for `set-tooltalk-message-attribute'",
+ signal_simple_error ("Invalid value for `set-tooltalk-message-attribute'",
attribute);
return Qnil;
}
Lisp_Object lp;
Lisp_Object fil;
+
+ /* tt_open() messes with our signal handler flags (at least when no
+ ttsessions is running on the machine), therefore we save the
+ actions and restore them after the call */
+#ifdef HAVE_SIGPROCMASK
+ {
+ struct sigaction ActSIGQUIT;
+ struct sigaction ActSIGINT;
+ struct sigaction ActSIGCHLD;
+ sigaction (SIGQUIT, NULL, &ActSIGQUIT);
+ sigaction (SIGINT, NULL, &ActSIGINT);
+ sigaction (SIGCHLD, NULL, &ActSIGCHLD);
+#endif
retval = tt_open ();
+#ifdef HAVE_SIGPROCMASK
+ sigaction (SIGQUIT, &ActSIGQUIT, NULL);
+ sigaction (SIGINT, &ActSIGINT, NULL);
+ sigaction (SIGCHLD, &ActSIGCHLD, NULL);
+ }
+#endif
+
+
if (tt_ptr_error (retval) != TT_OK)
return;
staticpro (&Vtooltalk_message_gcpro);
staticpro (&Vtooltalk_pattern_gcpro);
- Vtooltalk_message_gcpro = make_lisp_hashtable (10, HASHTABLE_NONWEAK,
- HASHTABLE_EQ);
- Vtooltalk_pattern_gcpro = make_lisp_hashtable (10, HASHTABLE_NONWEAK,
- HASHTABLE_EQ);
+ Vtooltalk_message_gcpro =
+ make_lisp_hash_table (10, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
+ Vtooltalk_pattern_gcpro =
+ make_lisp_hash_table (10, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
}