comparison src/console.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 d674024a8674
children 4aebb0131297
comparison
equal deleted inserted replaced
4845:a3c673c0720b 4846:a98ca4640147
167 int UNUSED (escapeflag)) 167 int UNUSED (escapeflag))
168 { 168 {
169 struct console *con = XCONSOLE (obj); 169 struct console *con = XCONSOLE (obj);
170 170
171 if (print_readably) 171 if (print_readably)
172 printing_unreadable_object ("#<console %s 0x%x>", 172 printing_unreadable_lcrecord (obj, XSTRING_DATA (con->name));
173 XSTRING_DATA (con->name), con->header.uid);
174 173
175 write_fmt_string (printcharfun, "#<%s-console", 174 write_fmt_string (printcharfun, "#<%s-console",
176 !CONSOLE_LIVE_P (con) ? "dead" : CONSOLE_TYPE_NAME (con)); 175 !CONSOLE_LIVE_P (con) ? "dead" : CONSOLE_TYPE_NAME (con));
177 if (CONSOLE_LIVE_P (con) && !NILP (CONSOLE_CONNECTION (con))) 176 if (CONSOLE_LIVE_P (con) && !NILP (CONSOLE_CONNECTION (con)))
178 write_fmt_string_lisp (printcharfun, " on %S", 1, 177 write_fmt_string_lisp (printcharfun, " on %S", 1,