diff options
| author | Eli Zaretskii | 2008-08-23 16:50:44 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-08-23 16:50:44 +0000 |
| commit | c06981c06286a000c3046af21fb65d07748d8462 (patch) | |
| tree | 2f8184f22630dfdf1da0207b81f7c42835d36fba /src | |
| parent | 4e389d323caa5bb11aa61c349473eaac4caa4767 (diff) | |
| download | emacs-c06981c06286a000c3046af21fb65d07748d8462.tar.gz emacs-c06981c06286a000c3046af21fb65d07748d8462.zip | |
Include frame.h before termhooks.h.
(dos_cleanup): Use CURTTY ()->termscript instead of a global variable
termscript.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dosfns.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/dosfns.c b/src/dosfns.c index ac336c9a5df..240f19c3380 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -29,8 +29,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include "lisp.h" | 29 | #include "lisp.h" |
| 30 | #include "buffer.h" | 30 | #include "buffer.h" |
| 31 | #include "termchar.h" | 31 | #include "termchar.h" |
| 32 | #include "termhooks.h" | ||
| 33 | #include "frame.h" | 32 | #include "frame.h" |
| 33 | #include "termhooks.h" | ||
| 34 | #include "blockinput.h" | 34 | #include "blockinput.h" |
| 35 | #include "window.h" | 35 | #include "window.h" |
| 36 | #include "dosfns.h" | 36 | #include "dosfns.h" |
| @@ -536,15 +536,27 @@ If the underlying system call fails, value is nil. */) | |||
| 536 | void | 536 | void |
| 537 | dos_cleanup (void) | 537 | dos_cleanup (void) |
| 538 | { | 538 | { |
| 539 | struct tty_display_info *tty; | ||
| 540 | |||
| 539 | #ifndef HAVE_X_WINDOWS | 541 | #ifndef HAVE_X_WINDOWS |
| 540 | restore_parent_vm_title (); | 542 | restore_parent_vm_title (); |
| 541 | #endif | 543 | #endif |
| 542 | /* Make sure the termscript file is committed, in case we are | 544 | /* Make sure the termscript file is committed, in case we are |
| 543 | crashing and some vital info was written there. */ | 545 | crashing and some vital info was written there. */ |
| 544 | if (termscript) | 546 | if (FRAMEP (selected_frame)) |
| 545 | { | 547 | { |
| 546 | fflush (termscript); | 548 | struct frame *sf = XFRAME (selected_frame); |
| 547 | fsync (fileno (termscript)); | 549 | |
| 550 | if (FRAME_LIVE_P (sf) | ||
| 551 | && (FRAME_MSDOS_P (sf) || FRAME_TERMCAP_P (sf))) | ||
| 552 | { | ||
| 553 | tty = CURTTY (); | ||
| 554 | if (tty->termscript) | ||
| 555 | { | ||
| 556 | fflush (tty->termscript); | ||
| 557 | fsync (fileno (tty->termscript)); | ||
| 558 | } | ||
| 559 | } | ||
| 548 | } | 560 | } |
| 549 | } | 561 | } |
| 550 | 562 | ||