comparison src/console-stream.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents 190b164ddcac
children a5954632b187
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
1 /* Stream device functions. 1 /* Stream device functions.
2 Copyright (C) 1995 Free Software Foundation, Inc. 2 Copyright (C) 1995 Free Software Foundation, Inc.
3 Copyright (C) 1996 Ben Wing. 3 Copyright (C) 1996, 2001 Ben Wing.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
69 { 69 {
70 CHECK_STRING (tty); 70 CHECK_STRING (tty);
71 stream_con->in = stream_con->out = stream_con->err = 71 stream_con->in = stream_con->out = stream_con->err =
72 /* #### We don't currently do coding-system translation on 72 /* #### We don't currently do coding-system translation on
73 this descriptor. */ 73 this descriptor. */
74 fopen ((char *) XSTRING_DATA (tty), READ_PLUS_TEXT); 74 qxe_fopen (XSTRING_DATA (tty), READ_PLUS_TEXT);
75 if (!stream_con->in) 75 if (!stream_con->in)
76 signal_error (Qio_error, "Unable to open tty", tty); 76 signal_error (Qio_error, "Unable to open tty", tty);
77 } 77 }
78 } 78 }
79 79
107 { 107 {
108 fputc ('\n', stream_con->out); 108 fputc ('\n', stream_con->out);
109 fflush (stream_con->out); 109 fflush (stream_con->out);
110 } 110 }
111 if (stream_con->in != stdin) 111 if (stream_con->in != stdin)
112 fclose (stream_con->in); 112 retry_fclose (stream_con->in);
113 113
114 xfree (stream_con); 114 xfree (stream_con);
115 CONSOLE_STREAM_DATA (con) = NULL; 115 CONSOLE_STREAM_DATA (con) = NULL;
116 } 116 }
117 } 117 }
155 return stream_canonicalize_console_connection (connection, errb); 155 return stream_canonicalize_console_connection (connection, errb);
156 } 156 }
157 157
158 158
159 static void 159 static void
160 stream_init_frame_1 (struct frame *f, Lisp_Object props) 160 stream_init_frame_1 (struct frame *f, Lisp_Object props,
161 int frame_name_is_defaulted)
161 { 162 {
162 #if 0 163 #if 0
163 struct device *d = XDEVICE (FRAME_DEVICE (f)); 164 struct device *d = XDEVICE (FRAME_DEVICE (f));
164 if (!NILP (DEVICE_FRAME_LIST (d))) 165 if (!NILP (DEVICE_FRAME_LIST (d)))
165 invalid_operation ("Only one frame allowed on stream devices", Qunbound); 166 invalid_operation ("Only one frame allowed on stream devices", Qunbound);
166 #endif 167 #endif
167 f->name = build_string ("stream"); 168 if (frame_name_is_defaulted)
169 f->name = build_string ("stream");
168 f->height = 80; 170 f->height = 80;
169 f->width = 24; 171 f->width = 24;
170 f->visible = 0; /* so redisplay doesn't try to do anything */ 172 f->visible = 0; /* so redisplay doesn't try to do anything */
171 } 173 }
172 174