comparison src/console-stream.c @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 6719134a07c2
children 2f8bb876ab1d
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
169 } 169 }
170 170
171 171
172 static int 172 static int
173 stream_text_width (struct frame *f, struct face_cachel *cachel, 173 stream_text_width (struct frame *f, struct face_cachel *cachel,
174 CONST Emchar *str, Charcount len) 174 const Emchar *str, Charcount len)
175 { 175 {
176 return len; 176 return len;
177 } 177 }
178 178
179 static int 179 static int
296 CONSOLE_HAS_METHOD (stream, flash); 296 CONSOLE_HAS_METHOD (stream, flash);
297 CONSOLE_HAS_METHOD (stream, ring_bell); 297 CONSOLE_HAS_METHOD (stream, ring_bell);
298 } 298 }
299 299
300 void 300 void
301 reinit_console_type_create_stream (void)
302 {
303 REINITIALIZE_CONSOLE_TYPE (stream);
304 }
305
306 void
301 vars_of_console_stream (void) 307 vars_of_console_stream (void)
302 { 308 {
303 DEFVAR_LISP ("terminal-console", &Vterminal_console /* 309 DEFVAR_LISP ("terminal-console", &Vterminal_console /*
304 The initial console-object, which represents XEmacs' stdout. 310 The initial console-object, which represents XEmacs' stdout.
305 */ ); 311 */ );
318 /* Moved from console-tty.c */ 324 /* Moved from console-tty.c */
319 Vstdio_str = build_string ("stdio"); 325 Vstdio_str = build_string ("stdio");
320 staticpro (&Vstdio_str); 326 staticpro (&Vstdio_str);
321 } 327 }
322 328
329 #ifndef PDUMP
323 void 330 void
324 init_console_stream (void) 331 init_console_stream (void)
325 { 332 {
326 /* This function can GC */ 333 /* This function can GC */
327 if (!initialized) 334 if (!initialized)
337 stream_init_console (XCONSOLE (Vterminal_console), Qnil); 344 stream_init_console (XCONSOLE (Vterminal_console), Qnil);
338 if (noninteractive) 345 if (noninteractive)
339 event_stream_select_console (XCONSOLE (Vterminal_console)); 346 event_stream_select_console (XCONSOLE (Vterminal_console));
340 } 347 }
341 } 348 }
349
350 #else
351
352 void
353 init_console_stream (void)
354 {
355 /* This function can GC */
356 Vterminal_device = Fmake_device (Qstream, Qnil, Qnil);
357 Vterminal_console = Fdevice_console (Vterminal_device);
358 Vterminal_frame = Fmake_frame (Qnil, Vterminal_device);
359 minibuf_window = XFRAME (Vterminal_frame)->minibuffer_window;
360 if (initialized)
361 {
362 stream_init_console (XCONSOLE (Vterminal_console), Qnil);
363 if (noninteractive)
364 event_stream_select_console (XCONSOLE (Vterminal_console));
365 }
366 }
367 #endif