Mercurial > hg > xemacs-beta
comparison src/tooltalk.c @ 4846:a98ca4640147
clean up object print methods
casetab.c, console.c, data.c, database.c, device-msw.c, device.c, eval.c, file-coding.c, frame.c, glyphs.c, gui.c, keymap.c, lisp.h, mule-charset.c, objects.c, print.c, process.c, tooltalk.c, ui-gtk.c, window.c:
New function printing_unreadable_lcrecord(). Automatically
prints the type name and pointer value of the object. Use it
instead of printing_unreadable_object(); make that latter
function local to print.c.
window.c: During creation, window may have Qt as its buffer. Don't
crash if trying to print such a window.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 13 Jan 2010 05:49:13 -0600 |
parents | b3ea9c582280 |
children | 19a72041c5ed |
comparison
equal
deleted
inserted
replaced
4845:a3c673c0720b | 4846:a98ca4640147 |
---|---|
170 int UNUSED (escapeflag)) | 170 int UNUSED (escapeflag)) |
171 { | 171 { |
172 Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj); | 172 Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj); |
173 | 173 |
174 if (print_readably) | 174 if (print_readably) |
175 printing_unreadable_object ("#<tooltalk_message 0x%x>", | 175 printing_unreadable_lcrecord (obj, 0); |
176 p->header.uid); | 176 |
177 | 177 write_fmt_string (printcharfun, "#<tooltalk-message id:0x%lx 0x%x>", |
178 write_fmt_string (printcharfun, "#<tooltalk_message id:0x%lx 0x%x>", | |
179 (long) (p->m), p->header.uid); | 178 (long) (p->m), p->header.uid); |
180 } | 179 } |
181 | 180 |
182 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message, | 181 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message, |
183 0, /*dumpable-flag*/ | 182 0, /*dumpable-flag*/ |
248 int UNUSED (escapeflag)) | 247 int UNUSED (escapeflag)) |
249 { | 248 { |
250 Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj); | 249 Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj); |
251 | 250 |
252 if (print_readably) | 251 if (print_readably) |
253 printing_unreadable_object ("#<tooltalk_pattern 0x%x>", | 252 printing_unreadable_lcrecord (obj, 0); |
254 p->header.uid); | 253 |
255 | 254 write_fmt_string (printcharfun, "#<tooltalk-pattern id:0x%lx 0x%x>", |
256 write_fmt_string (printcharfun, "#<tooltalk_pattern id:0x%lx 0x%x>", | |
257 (long) (p->p), p->header.uid); | 255 (long) (p->p), p->header.uid); |
258 } | 256 } |
259 | 257 |
260 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern, | 258 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern, |
261 0, /*dumpable-flag*/ | 259 0, /*dumpable-flag*/ |