Mercurial > hg > xemacs-beta
comparison src/process.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 | 8b63e21b0436 |
comparison
equal
deleted
inserted
replaced
4845:a3c673c0720b | 4846:a98ca4640147 |
---|---|
143 #include "process-slots.h" | 143 #include "process-slots.h" |
144 return Qnil; | 144 return Qnil; |
145 } | 145 } |
146 | 146 |
147 static void | 147 static void |
148 print_process (Lisp_Object object, Lisp_Object printcharfun, int escapeflag) | 148 print_process (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) |
149 { | 149 { |
150 Lisp_Process *process = XPROCESS (object); | 150 Lisp_Process *process = XPROCESS (obj); |
151 | 151 |
152 if (print_readably) | 152 if (print_readably) |
153 printing_unreadable_object ("#<process %s>", XSTRING_DATA (process->name)); | 153 printing_unreadable_lcrecord (obj, XSTRING_DATA (process->name)); |
154 | 154 |
155 if (!escapeflag) | 155 if (!escapeflag) |
156 { | 156 { |
157 print_internal (process->name, printcharfun, 0); | 157 print_internal (process->name, printcharfun, 0); |
158 } | 158 } |
159 else | 159 else |
160 { | 160 { |
161 int netp = network_connection_p (object); | 161 int netp = network_connection_p (obj); |
162 write_c_string (printcharfun, | 162 write_c_string (printcharfun, |
163 netp ? GETTEXT ("#<network connection ") : | 163 netp ? GETTEXT ("#<network connection ") : |
164 GETTEXT ("#<process ")); | 164 GETTEXT ("#<process ")); |
165 print_internal (process->name, printcharfun, 1); | 165 print_internal (process->name, printcharfun, 1); |
166 write_c_string (printcharfun, (netp ? " " : " pid ")); | 166 write_c_string (printcharfun, (netp ? " " : " pid ")); |