(M-28068): Map to U-000261E8.
[chise/xemacs-chise.git-] / src / redisplay-tty.c
index 0afc25f..80bdcc4 100644 (file)
@@ -166,8 +166,7 @@ static void
 #endif
 tty_frame_output_end (struct frame *f)
 {
-  struct device *d = XDEVICE (FRAME_DEVICE (f));
-  struct console *c = XCONSOLE (DEVICE_CONSOLE (d));
+  struct console *c = XCONSOLE (FRAME_CONSOLE (f));
 
   CONSOLE_TTY_CURSOR_X (c) = CONSOLE_TTY_FINAL_CURSOR_X (c);
   CONSOLE_TTY_CURSOR_Y (c) = CONSOLE_TTY_FINAL_CURSOR_Y (c);
@@ -881,7 +880,13 @@ reset_tty_modes (struct console *c)
   OUTPUT1_IF (c, TTY_SD (c).keypad_off);
   OUTPUT1_IF (c, TTY_SD (c).cursor_normal);
   OUTPUT1_IF (c, TTY_SD (c).end_motion);
-  tty_frame_output_end (XFRAME (CONSOLE_SELECTED_FRAME (c)));
+
+  {
+    Lisp_Object frm = CONSOLE_SELECTED_FRAME (c);
+
+    if (!NILP (frm))
+      tty_frame_output_end (XFRAME (frm));
+  }
 }
 
 /*****************************************************************************
@@ -918,6 +923,7 @@ tty_redisplay_shutdown (struct console *c)
    up or removed. */
 
 
+#ifdef NOT_YET
 /* FLAGS - these don't need to be console local since only one console
           can be being updated at a time. */
 static int insert_mode_on;             /* nonzero if in insert mode */
@@ -926,7 +932,6 @@ static int underline_mode_on;               /* nonzero if in underline mode */
 static int alternate_mode_on;          /* nonzero if in alternate char set */
 static int attributes_on;              /* nonzero if any attributes on */
 
-#ifdef NOT_YET
 static void
 turn_on_insert (struct frame *f)
 {
@@ -1212,6 +1217,7 @@ init_tty_for_redisplay (struct device *d, char *terminal_type)
    */
   cm_cost_init (c);
 
+#ifdef NOT_YET
   /*
    * Initialize local flags.
    */
@@ -1220,6 +1226,7 @@ init_tty_for_redisplay (struct device *d, char *terminal_type)
   underline_mode_on = 0;
   alternate_mode_on = 0;
   attributes_on = 0;
+#endif
 
   /*
    * Attempt to initialize the function_key_map to