Mercurial > hg > xemacs-beta
comparison src/tooltalk.c @ 563:183866b06e0b
[xemacs-hg @ 2001-05-24 07:50:48 by ben]
Makefile.in.in, abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casetab.c, chartab.c, cmdloop.c, cmds.c, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console.c, data.c, database.c, debug.c, device-gtk.c, device-msw.c, device-tty.c, device-x.c, device.c, dialog-gtk.c, dialog-msw.c, dialog-x.c, dialog.c, dired-msw.c, dired.c, doc.c, doprnt.c, dragdrop.c, editfns.c, eldap.c, eldap.h, elhash.c, emacs-widget-accessors.c, emacs.c, emodules.c, esd.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, filelock.c, floatfns.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, general-slots.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-gtk.c, gui-x.c, gui.c, gutter.c, hpplay.c, indent.c, input-method-xlib.c, insdel.c, intl.c, keymap.c, libsst.c, libsst.h, linuxplay.c, lisp.h, lread.c, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, miscplay.c, miscplay.h, mule-ccl.c, mule-charset.c, mule-wnnfns.c, mule.c, nas.c, ntplay.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay.c, scrollbar.c, search.c, select-gtk.c, select-x.c, select.c, sgiplay.c, sheap.c, sound.c, specifier.c, sunplay.c, symbols.c, symeval.h, symsinit.h, syntax.c, sysdep.c, toolbar-msw.c, toolbar.c, tooltalk.c, ui-byhand.c, ui-gtk.c, undo.c, unexaix.c, unexapollo.c, unexconvex.c, unexec.c, widget.c, win32.c, window.c:
-- defsymbol -> DEFSYMBOL.
-- add an error type to all errors.
-- eliminate the error functions in eval.c that let you just
use Qerror as the type.
-- redo the error API to be more consistent, sensibly named,
and easier to use.
-- redo the error hierarchy somewhat. create new errors:
structure-formation-error, gui-error, invalid-constant,
stack-overflow, out-of-memory, process-error, network-error,
sound-error, printing-unreadable-object, base64-conversion-
error; coding-system-error renamed to text-conversion error;
some others.
-- fix Mule problems in error strings in emodules.c, tooltalk.c.
-- fix error handling in mswin open-network-stream.
-- Mule-ize all sound files and clean up the headers.
-- nativesound.h -> sound.h and used for all sound files.
-- move some shared stuff into glyphs-shared.c: first attempt
at eliminating some of the massive GTK code duplication.
xemacs.mak: add glyphs-shared.c.
xemacs-faq.texi: document how to debug X errors
subr.el: fix doc string to reflect reality
author | ben |
---|---|
date | Thu, 24 May 2001 07:51:33 +0000 |
parents | 576fb035e263 |
children | 6db80f4ab17c |
comparison
equal
deleted
inserted
replaced
562:c775bd016b32 | 563:183866b06e0b |
---|---|
165 Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj); | 165 Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj); |
166 | 166 |
167 char buf[200]; | 167 char buf[200]; |
168 | 168 |
169 if (print_readably) | 169 if (print_readably) |
170 error ("printing unreadable object #<tooltalk_message 0x%x>", | 170 printing_unreadable_object ("#<tooltalk_message 0x%x>", |
171 p->header.uid); | 171 p->header.uid); |
172 | 172 |
173 sprintf (buf, "#<tooltalk_message id:0x%lx 0x%x>", (long) (p->m), p->header.uid); | 173 sprintf (buf, "#<tooltalk_message id:0x%lx 0x%x>", (long) (p->m), p->header.uid); |
174 write_c_string (buf, printcharfun); | 174 write_c_string (buf, printcharfun); |
175 } | 175 } |
176 | 176 |
238 Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj); | 238 Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj); |
239 | 239 |
240 char buf[200]; | 240 char buf[200]; |
241 | 241 |
242 if (print_readably) | 242 if (print_readably) |
243 error ("printing unreadable object #<tooltalk_pattern 0x%x>", | 243 printing_unreadable_object ("#<tooltalk_pattern 0x%x>", |
244 p->header.uid); | 244 p->header.uid); |
245 | 245 |
246 sprintf (buf, "#<tooltalk_pattern id:0x%lx 0x%x>", (long) (p->p), p->header.uid); | 246 sprintf (buf, "#<tooltalk_pattern id:0x%lx 0x%x>", (long) (p->p), p->header.uid); |
247 write_c_string (buf, printcharfun); | 247 write_c_string (buf, printcharfun); |
248 } | 248 } |
249 | 249 |
298 | 298 |
299 static void | 299 static void |
300 check_status (Tt_status st) | 300 check_status (Tt_status st) |
301 { | 301 { |
302 if (tt_is_err (st)) | 302 if (tt_is_err (st)) |
303 signal_error (Qtooltalk_error, | 303 { |
304 Fcons (build_string (tt_status_message (st)), Qnil)); | 304 Bufbyte *err; |
305 | |
306 EXTERNAL_TO_C_STRING (tt_status_message (st), err, Qnative); | |
307 signal_error (Qtooltalk_error, err, Qunbound); | |
308 } | |
305 } | 309 } |
306 | 310 |
307 DEFUN ("receive-tooltalk-message", Freceive_tooltalk_message, 0, 2, 0, /* | 311 DEFUN ("receive-tooltalk-message", Freceive_tooltalk_message, 0, 2, 0, /* |
308 Run tt_message_receive(). | 312 Run tt_message_receive(). |
309 This function is the process handler for the ToolTalk connection process. | 313 This function is the process handler for the ToolTalk connection process. |
670 else if (EQ (attribute, Qtt_plist)) | 674 else if (EQ (attribute, Qtt_plist)) |
671 return Fcopy_sequence (Fsymbol_plist | 675 return Fcopy_sequence (Fsymbol_plist |
672 (XTOOLTALK_MESSAGE (message_)->plist_sym)); | 676 (XTOOLTALK_MESSAGE (message_)->plist_sym)); |
673 | 677 |
674 else | 678 else |
675 signal_simple_error ("Invalid value for `get-tooltalk-message-attribute'", | 679 invalid_constant ("Invalid value for `get-tooltalk-message-attribute'", |
676 attribute); | 680 attribute); |
677 | 681 |
678 return Qnil; | 682 return Qnil; |
679 } | 683 } |
680 | 684 |
790 else if (EQ (attribute, Qtt_prop)) | 794 else if (EQ (attribute, Qtt_prop)) |
791 { | 795 { |
792 return Fput (XTOOLTALK_MESSAGE (message_)->plist_sym, argn, value); | 796 return Fput (XTOOLTALK_MESSAGE (message_)->plist_sym, argn, value); |
793 } | 797 } |
794 else | 798 else |
795 signal_simple_error ("Invalid value for `set-tooltalk-message-attribute'", | 799 invalid_constant ("Invalid value for `set-tooltalk-message-attribute'", |
796 attribute); | 800 attribute); |
797 | 801 |
798 if (fun_str) | 802 if (fun_str) |
799 { | 803 { |
800 const char *value_ext; | 804 const char *value_ext; |
1289 Returns t if successful, nil otherwise. | 1293 Returns t if successful, nil otherwise. |
1290 */ | 1294 */ |
1291 ()) | 1295 ()) |
1292 { | 1296 { |
1293 if (!NILP (Vtooltalk_fd)) | 1297 if (!NILP (Vtooltalk_fd)) |
1294 error ("Already connected to ToolTalk."); | 1298 signal_error (Qio_error, "Already connected to ToolTalk", Qunbound); |
1295 if (noninteractive) | 1299 if (noninteractive) |
1296 error ("Can't connect to ToolTalk in batch mode."); | 1300 signal_error (Qio_error, "Can't connect to ToolTalk in batch mode", Qunbound); |
1297 init_tooltalk (); | 1301 init_tooltalk (); |
1298 return NILP (Vtooltalk_fd) ? Qnil : Qt; | 1302 return NILP (Vtooltalk_fd) ? Qnil : Qt; |
1299 } | 1303 } |
1300 | 1304 |
1301 | 1305 |
1303 syms_of_tooltalk (void) | 1307 syms_of_tooltalk (void) |
1304 { | 1308 { |
1305 INIT_LRECORD_IMPLEMENTATION (tooltalk_message); | 1309 INIT_LRECORD_IMPLEMENTATION (tooltalk_message); |
1306 INIT_LRECORD_IMPLEMENTATION (tooltalk_pattern); | 1310 INIT_LRECORD_IMPLEMENTATION (tooltalk_pattern); |
1307 | 1311 |
1308 defsymbol (&Qtooltalk_messagep, "tooltalk-message-p"); | 1312 DEFSYMBOL_MULTIWORD_PREDICATE (Qtooltalk_messagep); |
1309 DEFSUBR (Ftooltalk_message_p); | 1313 DEFSUBR (Ftooltalk_message_p); |
1310 defsymbol (&Qtooltalk_patternp, "tooltalk-pattern-p"); | 1314 DEFSYMBOL_MULTIWORD_PREDICATE (Qtooltalk_patternp); |
1311 DEFSUBR (Ftooltalk_pattern_p); | 1315 DEFSUBR (Ftooltalk_pattern_p); |
1312 defsymbol (&Qtooltalk_message_handler_hook, "tooltalk-message-handler-hook"); | 1316 DEFSYMBOL (Qtooltalk_message_handler_hook); |
1313 defsymbol (&Qtooltalk_pattern_handler_hook, "tooltalk-pattern-handler-hook"); | 1317 DEFSYMBOL (Qtooltalk_pattern_handler_hook); |
1314 defsymbol (&Qtooltalk_unprocessed_message_hook, | 1318 DEFSYMBOL (Qtooltalk_unprocessed_message_hook); |
1315 "tooltalk-unprocessed-message-hook"); | |
1316 | 1319 |
1317 DEFSUBR (Freceive_tooltalk_message); | 1320 DEFSUBR (Freceive_tooltalk_message); |
1318 DEFSUBR (Fcreate_tooltalk_message); | 1321 DEFSUBR (Fcreate_tooltalk_message); |
1319 DEFSUBR (Fdestroy_tooltalk_message); | 1322 DEFSUBR (Fdestroy_tooltalk_message); |
1320 DEFSUBR (Fadd_tooltalk_message_arg); | 1323 DEFSUBR (Fadd_tooltalk_message_arg); |
1333 DEFSUBR (Ftooltalk_pattern_prop_get); | 1336 DEFSUBR (Ftooltalk_pattern_prop_get); |
1334 DEFSUBR (Ftooltalk_default_procid); | 1337 DEFSUBR (Ftooltalk_default_procid); |
1335 DEFSUBR (Ftooltalk_default_session); | 1338 DEFSUBR (Ftooltalk_default_session); |
1336 DEFSUBR (Ftooltalk_open_connection); | 1339 DEFSUBR (Ftooltalk_open_connection); |
1337 | 1340 |
1338 defsymbol (&Qreceive_tooltalk_message, "receive-tooltalk-message"); | 1341 DEFSYMBOL (Qreceive_tooltalk_message); |
1339 defsymbol (&Qtt_address, "address"); | 1342 defsymbol (&Qtt_address, "address"); |
1340 defsymbol (&Qtt_args_count, "args_count"); | 1343 defsymbol (&Qtt_args_count, "args_count"); |
1341 defsymbol (&Qtt_arg_bval, "arg_bval"); | 1344 defsymbol (&Qtt_arg_bval, "arg_bval"); |
1342 defsymbol (&Qtt_arg_ival, "arg_ival"); | 1345 defsymbol (&Qtt_arg_ival, "arg_ival"); |
1343 defsymbol (&Qtt_arg_mode, "arg_mode"); | 1346 defsymbol (&Qtt_arg_mode, "arg_mode"); |