diff src/console-stream.c @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents e04119814345
children c7528f8e288d
line wrap: on
line diff
--- a/src/console-stream.c	Mon Aug 13 09:00:04 2007 +0200
+++ b/src/console-stream.c	Mon Aug 13 09:02:59 2007 +0200
@@ -42,7 +42,7 @@
 Lisp_Object Vterminal_device;
 Lisp_Object Vterminal_frame;
 
-Lisp_Object Vstdio_str;
+extern Lisp_Object Vstdio_str; /* in console-tty.c */
 
 static void
 allocate_stream_console_struct (struct console *con)
@@ -124,46 +124,32 @@
   free_stream_console_struct (con);
 }
 
-Lisp_Object
+static Lisp_Object
 stream_semi_canonicalize_console_connection (Lisp_Object connection,
 					     Error_behavior errb)
 {
-  if (NILP (connection))
-    return Vstdio_str;
-
-  return connection;
+  return tty_semi_canonicalize_console_connection (connection, errb);
 }
 
-Lisp_Object
+static Lisp_Object
 stream_canonicalize_console_connection (Lisp_Object connection,
 					Error_behavior errb)
 {
-  if (NILP (connection) || !NILP (Fequal (connection, Vstdio_str)))
-    return Vstdio_str;
-
-  if (!ERRB_EQ (errb, ERROR_ME))
-    {
-      if (!STRINGP (connection))
-	return Qunbound;
-    }
-  else
-    CHECK_STRING (connection);
-
-  return Ffile_truename (connection, Qnil);
+  return tty_canonicalize_console_connection (connection, errb);
 }
 
-Lisp_Object
+static Lisp_Object
 stream_semi_canonicalize_device_connection (Lisp_Object connection,
 					    Error_behavior errb)
 {
-  return stream_semi_canonicalize_console_connection (connection, errb);
+  return tty_semi_canonicalize_device_connection (connection, errb);
 }
 
-Lisp_Object
+static Lisp_Object
 stream_canonicalize_device_connection (Lisp_Object connection,
 				       Error_behavior errb)
 {
-  return stream_canonicalize_console_connection (connection, errb);
+  return tty_canonicalize_device_connection (connection, errb);
 }
 
 
@@ -318,23 +304,19 @@
 vars_of_console_stream (void)
 {
   DEFVAR_LISP ("terminal-console", &Vterminal_console /*
-The initial console-object, which represents XEmacs' stdout.
+The initial console-object, which represent's Emacs's stdout.
 */ );
   Vterminal_console = Qnil;
 
   DEFVAR_LISP ("terminal-device", &Vterminal_device /*
-The initial device-object, which represents XEmacs' stdout.
+The initial device-object, which represent's Emacs's stdout.
 */ );
   Vterminal_device = Qnil;
 
   DEFVAR_LISP ("terminal-frame", &Vterminal_frame /*
-The initial frame-object, which represents XEmacs' stdout.
+The initial frame-object, which represents Emacs's stdout.
 */ );
   Vterminal_frame = Qnil;
-
-  /* Moved from console-tty.c */
-  Vstdio_str = build_string ("stdio");
-  staticpro (&Vstdio_str);
 }
 
 void