comparison src/device.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 141c2920ea48
children ae48681c47fa
comparison
equal deleted inserted replaced
4845:a3c673c0720b 4846:a98ca4640147
158 int UNUSED (escapeflag)) 158 int UNUSED (escapeflag))
159 { 159 {
160 struct device *d = XDEVICE (obj); 160 struct device *d = XDEVICE (obj);
161 161
162 if (print_readably) 162 if (print_readably)
163 printing_unreadable_object ("#<device %s 0x%x>", 163 printing_unreadable_lcrecord (obj, XSTRING_DATA (d->name));
164 XSTRING_DATA (d->name), d->header.uid);
165 164
166 write_fmt_string (printcharfun, "#<%s-device", !DEVICE_LIVE_P (d) ? "dead" : 165 write_fmt_string (printcharfun, "#<%s-device", !DEVICE_LIVE_P (d) ? "dead" :
167 DEVICE_TYPE_NAME (d)); 166 DEVICE_TYPE_NAME (d));
168 if (DEVICE_LIVE_P (d) && !NILP (DEVICE_CONNECTION (d))) 167 if (DEVICE_LIVE_P (d) && !NILP (DEVICE_CONNECTION (d)))
169 write_fmt_string_lisp (printcharfun, " on %S", 1, DEVICE_CONNECTION (d)); 168 write_fmt_string_lisp (printcharfun, " on %S", 1, DEVICE_CONNECTION (d));