aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2008-08-23 16:56:59 +0000
committerEli Zaretskii2008-08-23 16:56:59 +0000
commit99dda2cdb74c3549e378ce483984971a04833fbe (patch)
tree67adf5b5709646b4fbb6c4587981764e6d0cef99 /src
parent84704c5c583eaf1008d150da72460bbffd81802e (diff)
downloademacs-99dda2cdb74c3549e378ce483984971a04833fbe.tar.gz
emacs-99dda2cdb74c3549e378ce483984971a04833fbe.zip
(make_terminal_frame) [MSDOS]: Adjust initialization of f->output_data.tty.
(Fmake_terminal_frame) [MSDOS]: Don't allow creation of new terminal devices.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index 7e482d6a5da..8d67f20ae48 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -586,19 +586,20 @@ make_terminal_frame (struct terminal *terminal)
586 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ 586 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
587 f->async_visible = 1; /* Don't let visible be cleared later. */ 587 f->async_visible = 1; /* Don't let visible be cleared later. */
588#ifdef MSDOS 588#ifdef MSDOS
589 f->output_data.x = &the_only_x_display; 589 f->output_data.tty->display_info = &the_only_display_info;
590 if (!inhibit_window_system 590 if (!inhibit_window_system
591 && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)) 591 && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))
592 || XFRAME (selected_frame)->output_method == output_msdos_raw)) 592 || XFRAME (selected_frame)->output_method == output_msdos_raw))
593 { 593 {
594 f->output_method = output_msdos_raw; 594 f->output_method = output_msdos_raw;
595#if 0
595 /* This initialization of foreground and background pixels is 596 /* This initialization of foreground and background pixels is
596 only important for the initial frame created in temacs. If 597 only important for the initial frame created in temacs. If
597 we don't do that, we get black background and foreground in 598 we don't do that, we get black background and foreground in
598 the dumped Emacs because the_only_x_display is a static 599 the dumped Emacs because the_only_display_info is a static
599 variable, hence it is born all-zeroes, and zero is the code 600 variable, hence it is born all-zeroes, and zero is the code
600 for the black color. Other frames all inherit their pixels 601 for the black color. Other frames all inherit their pixels
601 from what's already in the_only_x_display. */ 602 from what's already in the_only_display_info. */
602 if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))) 603 if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
603 && FRAME_BACKGROUND_PIXEL (f) == 0 604 && FRAME_BACKGROUND_PIXEL (f) == 0
604 && FRAME_FOREGROUND_PIXEL (f) == 0) 605 && FRAME_FOREGROUND_PIXEL (f) == 0)
@@ -606,6 +607,7 @@ make_terminal_frame (struct terminal *terminal)
606 FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; 607 FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR;
607 FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR; 608 FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR;
608 } 609 }
610#endif
609 } 611 }
610 else 612 else
611 f->output_method = output_termcap; 613 f->output_method = output_termcap;
@@ -719,6 +721,10 @@ affects all frames on the same terminal device. */)
719 721
720 if (!t) 722 if (!t)
721 { 723 {
724#ifdef MSDOS
725 /* msdos.c assumes a single tty_display_info object. */
726 error ("Multiple terminals are not supported on this platform");
727#else /* !MSDOS */
722 char *name = 0, *type = 0; 728 char *name = 0, *type = 0;
723 Lisp_Object tty, tty_type; 729 Lisp_Object tty, tty_type;
724 730
@@ -745,6 +751,7 @@ affects all frames on the same terminal device. */)
745 } 751 }
746 752
747 t = init_tty (name, type, 0); /* Errors are not fatal. */ 753 t = init_tty (name, type, 0); /* Errors are not fatal. */
754#endif /* !MSDOS */
748 } 755 }
749 756
750 f = make_terminal_frame (t); 757 f = make_terminal_frame (t);