/* MS-DOS specific C utilities. -*- coding: cp850 -*-
-Copyright (C) 1993-1997, 1999-2014 Free Software Foundation, Inc.
+Copyright (C) 1993-1997, 1999-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "coding.h"
#include "disptab.h"
#include "window.h"
+#include "menu.h"
#include "buffer.h"
#include "commands.h"
#include "blockinput.h"
}
Vinitial_window_system = Qpc;
- Vwindow_system_version = make_number (24); /* RE Emacs version */
+ Vwindow_system_version = make_number (25); /* RE Emacs version */
tty->terminal->type = output_msdos_raw;
/* If Emacs was dumped on DOS/V machine, forget the stale VRAM
#endif
\f
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
-
-/* Augment DJGPP library POSIX signal functions. This is needed
- as of DJGPP v2.01, but might be in the library in later releases. */
-
-#include <libc/bss.h>
-
-/* A counter to know when to re-initialize the static sets. */
-static int sigprocmask_count = -1;
-
-/* Which signals are currently blocked (initially none). */
-static sigset_t current_mask;
-
-/* Which signals are pending (initially none). */
-static sigset_t msdos_pending_signals;
-
-/* Previous handlers to restore when the blocked signals are unblocked. */
-typedef void (*sighandler_t)(int);
-static sighandler_t prev_handlers[320];
-
-/* A signal handler which just records that a signal occurred
- (it will be raised later, if and when the signal is unblocked). */
-static void
-sig_suspender (int signo)
-{
- sigaddset (&msdos_pending_signals, signo);
-}
-
-int
-sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set)
-{
- int signo;
- sigset_t new_mask;
-
- /* If called for the first time, initialize. */
- if (sigprocmask_count != __bss_count)
- {
- sigprocmask_count = __bss_count;
- sigemptyset (&msdos_pending_signals);
- sigemptyset (¤t_mask);
- for (signo = 0; signo < 320; signo++)
- prev_handlers[signo] = SIG_ERR;
- }
-
- if (old_set)
- *old_set = current_mask;
-
- if (new_set == 0)
- return 0;
-
- if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
- {
- errno = EINVAL;
- return -1;
- }
-
- sigemptyset (&new_mask);
-
- /* DJGPP supports upto 320 signals. */
- for (signo = 0; signo < 320; signo++)
- {
- if (sigismember (¤t_mask, signo))
- sigaddset (&new_mask, signo);
- else if (sigismember (new_set, signo) && how != SIG_UNBLOCK)
- {
- sigaddset (&new_mask, signo);
-
- /* SIGKILL is silently ignored, as on other platforms. */
- if (signo != SIGKILL && prev_handlers[signo] == SIG_ERR)
- prev_handlers[signo] = signal (signo, sig_suspender);
- }
- if (( how == SIG_UNBLOCK
- && sigismember (&new_mask, signo)
- && sigismember (new_set, signo))
- || (how == SIG_SETMASK
- && sigismember (&new_mask, signo)
- && !sigismember (new_set, signo)))
- {
- sigdelset (&new_mask, signo);
- if (prev_handlers[signo] != SIG_ERR)
- {
- signal (signo, prev_handlers[signo]);
- prev_handlers[signo] = SIG_ERR;
- }
- if (sigismember (&msdos_pending_signals, signo))
- {
- sigdelset (&msdos_pending_signals, signo);
- raise (signo);
- }
- }
- }
- current_mask = new_mask;
- return 0;
-}
-
-#endif /* not __DJGPP_MINOR__ < 2 */
-
#ifndef HAVE_SELECT
#include "sysselect.h"
dos_ttcooked ();
ScreenSetCursor (10, 0);
cputs ("\r\n\nEmacs aborted!\r\n");
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
- if (screen_virtual_segment)
- dosv_refresh_virtual_screen (2 * 10 * screen_size_X, 4 * screen_size_X);
- /* Generate traceback, so we could tell whodunit. */
- signal (SIGINT, SIG_DFL);
- __asm__ __volatile__ ("movb $0x1b,%al;call ___djgpp_hw_exception");
-#else /* __DJGPP_MINOR__ >= 2 */
raise (SIGABRT);
-#endif /* __DJGPP_MINOR__ >= 2 */
exit (2);
}