Commit c06981c0 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Include frame.h before termhooks.h.

(dos_cleanup): Use CURTTY ()->termscript instead of a global variable
parent 4e389d32
......@@ -29,8 +29,8 @@ along with GNU Emacs. If not, see <>. */
#include "lisp.h"
#include "buffer.h"
#include "termchar.h"
#include "termhooks.h"
#include "frame.h"
#include "termhooks.h"
#include "blockinput.h"
#include "window.h"
#include "dosfns.h"
......@@ -536,15 +536,27 @@ If the underlying system call fails, value is nil. */)
dos_cleanup (void)
struct tty_display_info *tty;
restore_parent_vm_title ();
/* Make sure the termscript file is committed, in case we are
crashing and some vital info was written there. */
if (termscript)
if (FRAMEP (selected_frame))
fflush (termscript);
fsync (fileno (termscript));
struct frame *sf = XFRAME (selected_frame);
if (FRAME_LIVE_P (sf)
&& (FRAME_MSDOS_P (sf) || FRAME_TERMCAP_P (sf)))
tty = CURTTY ();
if (tty->termscript)
fflush (tty->termscript);
fsync (fileno (tty->termscript));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment