comparison src/glyphs.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 576f09d387d5
children 6ef8256a020a 19a72041c5ed
comparison
equal deleted inserted replaced
4845:a3c673c0720b 4846:a98ca4640147
990 int escapeflag) 990 int escapeflag)
991 { 991 {
992 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (obj); 992 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (obj);
993 993
994 if (print_readably) 994 if (print_readably)
995 printing_unreadable_object ("#<image-instance 0x%x>", 995 printing_unreadable_lcrecord (obj, 0);
996 ii->header.uid);
997 write_fmt_string_lisp (printcharfun, "#<image-instance (%s) ", 1, 996 write_fmt_string_lisp (printcharfun, "#<image-instance (%s) ", 1,
998 Fimage_instance_type (obj)); 997 Fimage_instance_type (obj));
999 if (!NILP (ii->name)) 998 if (!NILP (ii->name))
1000 write_fmt_string_lisp (printcharfun, "%S ", 1, ii->name); 999 write_fmt_string_lisp (printcharfun, "%S ", 1, ii->name);
1001 write_fmt_string_lisp (printcharfun, "on %s ", 1, ii->domain); 1000 write_fmt_string_lisp (printcharfun, "on %s ", 1, ii->domain);
3691 int UNUSED (escapeflag)) 3690 int UNUSED (escapeflag))
3692 { 3691 {
3693 Lisp_Glyph *glyph = XGLYPH (obj); 3692 Lisp_Glyph *glyph = XGLYPH (obj);
3694 3693
3695 if (print_readably) 3694 if (print_readably)
3696 printing_unreadable_object ("#<glyph 0x%x>", glyph->header.uid); 3695 printing_unreadable_lcrecord (obj, 0);
3697 3696
3698 write_fmt_string_lisp (printcharfun, "#<glyph (%s", 1, Fglyph_type (obj)); 3697 write_fmt_string_lisp (printcharfun, "#<glyph (%s", 1, Fglyph_type (obj));
3699 write_fmt_string_lisp (printcharfun, ") %S", 1, glyph->image); 3698 write_fmt_string_lisp (printcharfun, ") %S", 1, glyph->image);
3700 write_fmt_string (printcharfun, "0x%x>", glyph->header.uid); 3699 write_fmt_string (printcharfun, "0x%x>", glyph->header.uid);
3701 } 3700 }