comparison src/print.c @ 91041:bdb3fe0ba9fa

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author Miles Bader <miles@gnu.org>
date Thu, 11 Oct 2007 16:22:07 +0000
parents 424b655804ca a0c901e4e649
children 1251cabc40b7
comparison
equal deleted inserted replaced
91040:14c4a6aac623 91041:bdb3fe0ba9fa
33 #include "process.h" 33 #include "process.h"
34 #include "dispextern.h" 34 #include "dispextern.h"
35 #include "termchar.h" 35 #include "termchar.h"
36 #include "intervals.h" 36 #include "intervals.h"
37 #include "blockinput.h" 37 #include "blockinput.h"
38 #include "termhooks.h" /* For struct terminal. */
38 39
39 Lisp_Object Vstandard_output, Qstandard_output; 40 Lisp_Object Vstandard_output, Qstandard_output;
40 41
41 Lisp_Object Qtemp_buffer_setup_hook; 42 Lisp_Object Qtemp_buffer_setup_hook;
42 43
1022 if (valid > 0) 1023 if (valid > 0)
1023 debug_print (arg); 1024 debug_print (arg);
1024 else 1025 else
1025 fprintf (stderr, "#<%s_LISP_OBJECT 0x%08lx>\r\n", 1026 fprintf (stderr, "#<%s_LISP_OBJECT 0x%08lx>\r\n",
1026 !valid ? "INVALID" : "SOME", 1027 !valid ? "INVALID" : "SOME",
1027 #ifdef NO_UNION_TYPE 1028 (unsigned long) XHASH (arg)
1028 (unsigned long) arg
1029 #else
1030 (unsigned long) arg.i
1031 #endif
1032 ); 1029 );
1033 } 1030 }
1034 1031
1035 1032
1036 DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, 1033 DEFUN ("error-message-string", Ferror_message_string, Serror_message_string,
1386 if (! NILP (Vprint_circle) || SYMBOLP (obj)) 1383 if (! NILP (Vprint_circle) || SYMBOLP (obj))
1387 { 1384 {
1388 for (i = 0; i < print_number_index; i++) 1385 for (i = 0; i < print_number_index; i++)
1389 if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj)) 1386 if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj))
1390 { 1387 {
1391 /* OBJ appears more than once. Let's remember that. */ 1388 /* OBJ appears more than once. Let's remember that. */
1392 PRINT_NUMBER_STATUS (Vprint_number_table, i) = Qt; 1389 PRINT_NUMBER_STATUS (Vprint_number_table, i) = Qt;
1393 print_depth--; 1390 print_depth--;
1394 return; 1391 return;
1395 } 1392 }
1396 1393
1397 /* OBJ is not yet recorded. Let's add to the table. */ 1394 /* OBJ is not yet recorded. Let's add to the table. */
1398 if (print_number_index == 0) 1395 if (print_number_index == 0)
1399 { 1396 {
2061 strout (" on ", -1, -1, printcharfun, 0); 2058 strout (" on ", -1, -1, printcharfun, 0);
2062 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun); 2059 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun);
2063 } 2060 }
2064 PRINTCHAR ('>'); 2061 PRINTCHAR ('>');
2065 } 2062 }
2063 else if (TERMINALP (obj))
2064 {
2065 struct terminal *t = XTERMINAL (obj);
2066 strout ("#<terminal ", -1, -1, printcharfun, 0);
2067 sprintf (buf, "%d", t->id);
2068 strout (buf, -1, -1, printcharfun, 0);
2069 if (t->name)
2070 {
2071 strout (" on ", -1, -1, printcharfun, 0);
2072 strout (t->name, -1, -1, printcharfun, 0);
2073 }
2074 PRINTCHAR ('>');
2075 }
2066 else if (HASH_TABLE_P (obj)) 2076 else if (HASH_TABLE_P (obj))
2067 { 2077 {
2068 struct Lisp_Hash_Table *h = XHASH_TABLE (obj); 2078 struct Lisp_Hash_Table *h = XHASH_TABLE (obj);
2069 strout ("#<hash-table", -1, -1, printcharfun, 0); 2079 strout ("#<hash-table", -1, -1, printcharfun, 0);
2070 if (SYMBOLP (h->test)) 2080 if (SYMBOLP (h->test))
2073 PRINTCHAR ('\''); 2083 PRINTCHAR ('\'');
2074 strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun, 0); 2084 strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun, 0);
2075 PRINTCHAR (' '); 2085 PRINTCHAR (' ');
2076 strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0); 2086 strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0);
2077 PRINTCHAR (' '); 2087 PRINTCHAR (' ');
2078 sprintf (buf, "%ld/%ld", (long) XFASTINT (h->count), 2088 sprintf (buf, "%ld/%ld", (long) h->count,
2079 (long) XVECTOR (h->next)->size); 2089 (long) XVECTOR (h->next)->size);
2080 strout (buf, -1, -1, printcharfun, 0); 2090 strout (buf, -1, -1, printcharfun, 0);
2081 } 2091 }
2082 sprintf (buf, " 0x%lx", (unsigned long) h); 2092 sprintf (buf, " 0x%lx", (unsigned long) h);
2083 strout (buf, -1, -1, printcharfun, 0); 2093 strout (buf, -1, -1, printcharfun, 0);