diff 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
line wrap: on
line diff
--- a/src/print.c	Thu Oct 11 16:14:00 2007 +0000
+++ b/src/print.c	Thu Oct 11 16:22:07 2007 +0000
@@ -35,6 +35,7 @@
 #include "termchar.h"
 #include "intervals.h"
 #include "blockinput.h"
+#include "termhooks.h"		/* For struct terminal.  */
 
 Lisp_Object Vstandard_output, Qstandard_output;
 
@@ -1024,11 +1025,7 @@
   else
     fprintf (stderr, "#<%s_LISP_OBJECT 0x%08lx>\r\n",
 	     !valid ? "INVALID" : "SOME",
-#ifdef NO_UNION_TYPE
-	     (unsigned long) arg
-#else
-	     (unsigned long) arg.i
-#endif
+	     (unsigned long) XHASH (arg)
 	     );
 }
 
@@ -1388,10 +1385,10 @@
 	  for (i = 0; i < print_number_index; i++)
 	    if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj))
 	      {
-		/* OBJ appears more than once.  Let's remember that.  */
+		/* OBJ appears more than once.	Let's remember that.  */
 		PRINT_NUMBER_STATUS (Vprint_number_table, i) = Qt;
                 print_depth--;
-                return;
+		return;
 	      }
 
 	  /* OBJ is not yet recorded.  Let's add to the table.  */
@@ -2063,6 +2060,19 @@
 	    }
 	  PRINTCHAR ('>');
 	}
+      else if (TERMINALP (obj))
+	{
+	  struct terminal *t = XTERMINAL (obj);
+	  strout ("#<terminal ", -1, -1, printcharfun, 0);
+	  sprintf (buf, "%d", t->id);
+	  strout (buf, -1, -1, printcharfun, 0);
+	  if (t->name)
+	    {
+	      strout (" on ", -1, -1, printcharfun, 0);
+	      strout (t->name, -1, -1, printcharfun, 0);
+	    }
+	  PRINTCHAR ('>');
+	}
       else if (HASH_TABLE_P (obj))
 	{
 	  struct Lisp_Hash_Table *h = XHASH_TABLE (obj);
@@ -2075,7 +2085,7 @@
 	      PRINTCHAR (' ');
 	      strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0);
 	      PRINTCHAR (' ');
-	      sprintf (buf, "%ld/%ld", (long) XFASTINT (h->count),
+	      sprintf (buf, "%ld/%ld", (long) h->count,
 		       (long) XVECTOR (h->next)->size);
 	      strout (buf, -1, -1, printcharfun, 0);
 	    }