diff options
| author | Karoly Lorentey | 2004-02-28 01:23:39 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-28 01:23:39 +0000 |
| commit | 0b0d3e0bcefdde298893aaad2e816e1503cef222 (patch) | |
| tree | 439342044857514ad784de0470f5546eb9c3ef9a /src/sysdep.c | |
| parent | 2fc0cf2aefa777e5fe48596e2d43774b28051931 (diff) | |
| download | emacs-0b0d3e0bcefdde298893aaad2e816e1503cef222.tar.gz emacs-0b0d3e0bcefdde298893aaad2e816e1503cef222.zip | |
Implemented suspending of emacsclient frames.
lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
(unquote_argument, handle_sigcont, handle_sigtstp): New functions.
(out, in): New global variables for communicating with the Emacs process.
(init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
(main): Changed out and in to global variables. Prepend `-eval' or
'-file' to each argument. Use fsync to force sending the strings to Emacs.
Removed obsolete -bad-version code. Support the -suspend command.
Cleaned up newline handling.
lisp/frame.el (suspend-frame): New function.
Substitute key definition of suspend-emacs with suspend-frame.
lisp/server.el (server-log): Cosmetic change in log format.
(server-handle-delete-tty, server-handle-delete-frame): Added logging.
(server-handle-suspend-tty, server-quote-arg): New functions.
(server-start): Install server-handle-suspend-tty.
(server-process-filter): Reorganized source code for clarity.
Implemented -resume, -suspend and -ignore commands.
lisp/term/x-win.el (x-initialize-window-system): Don't change the
binding of C-z.
src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
their macro expansion.
src/dispnew.c: Ditto.
src/frame.c: Ditto.
src/keyboard.c: Ditto.
src/sysdep.c: Ditto.
src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
suspended.
src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.
src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
(syms_of_term): Defvar them.
(term_init): Don't allow opening a new frame on a suspended tty device.
(Fsuspend_tty, Fresume_tty): New functions.
(syms_of_term): Defsubr them.
src/termchar.c (struct tty_display_info): Update documentation of
input and output.
(TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 96 |
1 files changed, 53 insertions, 43 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index febf59253e1..d4693f99a94 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -274,7 +274,7 @@ discard_tty_input () | |||
| 274 | 274 | ||
| 275 | #ifdef VMS | 275 | #ifdef VMS |
| 276 | end_kbd_input (); | 276 | end_kbd_input (); |
| 277 | SYS$QIOW (0, fileno (TTY_INPUT (CURTTY())), IO$_READVBLK|IO$M_PURGE, input_iosb, 0, 0, | 277 | SYS$QIOW (0, fileno (CURTTY()->input), IO$_READVBLK|IO$M_PURGE, input_iosb, 0, 0, |
| 278 | &buf.main, 0, 0, terminator_mask, 0, 0); | 278 | &buf.main, 0, 0, terminator_mask, 0, 0); |
| 279 | queue_kbd_input (); | 279 | queue_kbd_input (); |
| 280 | #else /* not VMS */ | 280 | #else /* not VMS */ |
| @@ -284,7 +284,8 @@ discard_tty_input () | |||
| 284 | for (tty = tty_list; tty; tty = tty->next) | 284 | for (tty = tty_list; tty; tty = tty->next) |
| 285 | { | 285 | { |
| 286 | int zero = 0; | 286 | int zero = 0; |
| 287 | ioctl (fileno (TTY_INPUT (tty)), TIOCFLUSH, &zero); | 287 | if (tty->input) |
| 288 | ioctl (fileno (tty->input), TIOCFLUSH, &zero); | ||
| 288 | } | 289 | } |
| 289 | } | 290 | } |
| 290 | #else /* not Apollo */ | 291 | #else /* not Apollo */ |
| @@ -296,8 +297,11 @@ discard_tty_input () | |||
| 296 | struct tty_display_info *tty; | 297 | struct tty_display_info *tty; |
| 297 | for (tty = tty_list; tty; tty = tty->next) | 298 | for (tty = tty_list; tty; tty = tty->next) |
| 298 | { | 299 | { |
| 299 | EMACS_GET_TTY (fileno (TTY_INPUT (tty)), &buf); | 300 | if (tty->input) /* Is the device suspended? */ |
| 300 | EMACS_SET_TTY (fileno (TTY_INPUT (tty)), &buf, 0); | 301 | { |
| 302 | EMACS_GET_TTY (fileno (tty->input), &buf); | ||
| 303 | EMACS_SET_TTY (fileno (tty->input), &buf, 0); | ||
| 304 | } | ||
| 301 | } | 305 | } |
| 302 | } | 306 | } |
| 303 | #endif /* not MSDOS */ | 307 | #endif /* not MSDOS */ |
| @@ -322,7 +326,7 @@ stuff_char (char c) | |||
| 322 | 326 | ||
| 323 | /* Should perhaps error if in batch mode */ | 327 | /* Should perhaps error if in batch mode */ |
| 324 | #ifdef TIOCSTI | 328 | #ifdef TIOCSTI |
| 325 | ioctl (fileno (TTY_INPUT (CURTTY())), TIOCSTI, &c); | 329 | ioctl (fileno (CURTTY()->input), TIOCSTI, &c); |
| 326 | #else /* no TIOCSTI */ | 330 | #else /* no TIOCSTI */ |
| 327 | error ("Cannot stuff terminal input characters in this version of Unix"); | 331 | error ("Cannot stuff terminal input characters in this version of Unix"); |
| 328 | #endif /* no TIOCSTI */ | 332 | #endif /* no TIOCSTI */ |
| @@ -1005,7 +1009,7 @@ request_sigio () | |||
| 1005 | return; | 1009 | return; |
| 1006 | 1010 | ||
| 1007 | /* XXX CURTTY() is bogus here. */ | 1011 | /* XXX CURTTY() is bogus here. */ |
| 1008 | ioctl (fileno (TTY_INPUT (CURTTY ())), FIOASYNC, &on); | 1012 | ioctl (fileno (CURTTY ()->input), FIOASYNC, &on); |
| 1009 | interrupts_deferred = 0; | 1013 | interrupts_deferred = 0; |
| 1010 | } | 1014 | } |
| 1011 | 1015 | ||
| @@ -1018,7 +1022,7 @@ unrequest_sigio () | |||
| 1018 | return; | 1022 | return; |
| 1019 | 1023 | ||
| 1020 | /* XXX CURTTY() is bogus here. */ | 1024 | /* XXX CURTTY() is bogus here. */ |
| 1021 | ioctl (fileno (TTY_INPUT (CURTTY ())), FIOASYNC, &off); | 1025 | ioctl (fileno (CURTTY ()->input), FIOASYNC, &off); |
| 1022 | interrupts_deferred = 1; | 1026 | interrupts_deferred = 1; |
| 1023 | } | 1027 | } |
| 1024 | 1028 | ||
| @@ -1366,6 +1370,9 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1366 | if (noninteractive) | 1370 | if (noninteractive) |
| 1367 | return; | 1371 | return; |
| 1368 | 1372 | ||
| 1373 | if (!tty_out->output) | ||
| 1374 | return; /* The tty is suspended. */ | ||
| 1375 | |||
| 1369 | #ifdef VMS | 1376 | #ifdef VMS |
| 1370 | if (!input_ef) | 1377 | if (!input_ef) |
| 1371 | input_ef = get_kbd_event_flag (); | 1378 | input_ef = get_kbd_event_flag (); |
| @@ -1404,13 +1411,13 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1404 | unconditionally will not cause any problems. */ | 1411 | unconditionally will not cause any problems. */ |
| 1405 | if (! read_socket_hook && EQ (Vinitial_window_system, Qnil)) | 1412 | if (! read_socket_hook && EQ (Vinitial_window_system, Qnil)) |
| 1406 | #endif | 1413 | #endif |
| 1407 | narrow_foreground_group (fileno (TTY_INPUT (tty_out))); | 1414 | narrow_foreground_group (fileno (tty_out->input)); |
| 1408 | #endif | 1415 | #endif |
| 1409 | 1416 | ||
| 1410 | if (! tty_out->old_tty) | 1417 | if (! tty_out->old_tty) |
| 1411 | tty_out->old_tty = (struct emacs_tty *) xmalloc (sizeof (struct emacs_tty)); | 1418 | tty_out->old_tty = (struct emacs_tty *) xmalloc (sizeof (struct emacs_tty)); |
| 1412 | 1419 | ||
| 1413 | EMACS_GET_TTY (fileno (TTY_INPUT (tty_out)), tty_out->old_tty); | 1420 | EMACS_GET_TTY (fileno (tty_out->input), tty_out->old_tty); |
| 1414 | 1421 | ||
| 1415 | tty = *tty_out->old_tty; | 1422 | tty = *tty_out->old_tty; |
| 1416 | 1423 | ||
| @@ -1626,23 +1633,23 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1626 | dos_ttraw (); | 1633 | dos_ttraw (); |
| 1627 | #endif | 1634 | #endif |
| 1628 | 1635 | ||
| 1629 | EMACS_SET_TTY (fileno (TTY_INPUT (tty_out)), &tty, 0); | 1636 | EMACS_SET_TTY (fileno (tty_out->input), &tty, 0); |
| 1630 | 1637 | ||
| 1631 | /* This code added to insure that, if flow-control is not to be used, | 1638 | /* This code added to insure that, if flow-control is not to be used, |
| 1632 | we have an unlocked terminal at the start. */ | 1639 | we have an unlocked terminal at the start. */ |
| 1633 | 1640 | ||
| 1634 | #ifdef TCXONC | 1641 | #ifdef TCXONC |
| 1635 | if (!tty_out->flow_control) ioctl (fileno (TTY_INPUT (tty_out)), TCXONC, 1); | 1642 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TCXONC, 1); |
| 1636 | #endif | 1643 | #endif |
| 1637 | #ifndef APOLLO | 1644 | #ifndef APOLLO |
| 1638 | #ifdef TIOCSTART | 1645 | #ifdef TIOCSTART |
| 1639 | if (!tty_out->flow_control) ioctl (fileno (TTY_INPUT (tty_out)), TIOCSTART, 0); | 1646 | if (!tty_out->flow_control) ioctl (fileno (tty_out->input), TIOCSTART, 0); |
| 1640 | #endif | 1647 | #endif |
| 1641 | #endif | 1648 | #endif |
| 1642 | 1649 | ||
| 1643 | #if defined (HAVE_TERMIOS) || defined (HPUX9) | 1650 | #if defined (HAVE_TERMIOS) || defined (HPUX9) |
| 1644 | #ifdef TCOON | 1651 | #ifdef TCOON |
| 1645 | if (!tty_out->flow_control) tcflow (fileno (TTY_INPUT (tty_out)), TCOON); | 1652 | if (!tty_out->flow_control) tcflow (fileno (tty_out->input), TCOON); |
| 1646 | #endif | 1653 | #endif |
| 1647 | #endif | 1654 | #endif |
| 1648 | 1655 | ||
| @@ -1662,7 +1669,7 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1662 | 1669 | ||
| 1663 | #ifdef VMS | 1670 | #ifdef VMS |
| 1664 | /* Appears to do nothing when in PASTHRU mode. | 1671 | /* Appears to do nothing when in PASTHRU mode. |
| 1665 | SYS$QIOW (0, fileno (TTY_INPUT (tty_out)), IO$_SETMODE|IO$M_OUTBAND, 0, 0, 0, | 1672 | SYS$QIOW (0, fileno (tty_out->input), IO$_SETMODE|IO$M_OUTBAND, 0, 0, 0, |
| 1666 | interrupt_signal, oob_chars, 0, 0, 0, 0); | 1673 | interrupt_signal, oob_chars, 0, 0, 0, 0); |
| 1667 | */ | 1674 | */ |
| 1668 | queue_kbd_input (0); | 1675 | queue_kbd_input (0); |
| @@ -1673,10 +1680,10 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1673 | #ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */ | 1680 | #ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */ |
| 1674 | if (interrupt_input) | 1681 | if (interrupt_input) |
| 1675 | { | 1682 | { |
| 1676 | old_fcntl_owner[fileno (TTY_INPUT (tty_out))] = | 1683 | old_fcntl_owner[fileno (tty_out->input)] = |
| 1677 | fcntl (fileno (TTY_INPUT (tty_out)), F_GETOWN, 0); | 1684 | fcntl (fileno (tty_out->input), F_GETOWN, 0); |
| 1678 | fcntl (fileno (TTY_INPUT (tty_out)), F_SETOWN, getpid ()); | 1685 | fcntl (fileno (tty_out->input), F_SETOWN, getpid ()); |
| 1679 | init_sigio (fileno (TTY_INPUT (tty_out))); | 1686 | init_sigio (fileno (tty_out->input)); |
| 1680 | } | 1687 | } |
| 1681 | #endif /* F_GETOWN */ | 1688 | #endif /* F_GETOWN */ |
| 1682 | #endif /* F_SETOWN_BUG */ | 1689 | #endif /* F_SETOWN_BUG */ |
| @@ -1684,7 +1691,7 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1684 | 1691 | ||
| 1685 | #ifdef BSD4_1 | 1692 | #ifdef BSD4_1 |
| 1686 | if (interrupt_input) | 1693 | if (interrupt_input) |
| 1687 | init_sigio (fileno (TTY_INPUT (tty_out))); | 1694 | init_sigio (fileno (tty_out->input)); |
| 1688 | #endif | 1695 | #endif |
| 1689 | 1696 | ||
| 1690 | #ifdef VMS /* VMS sometimes has this symbol but lacks setvbuf. */ | 1697 | #ifdef VMS /* VMS sometimes has this symbol but lacks setvbuf. */ |
| @@ -1694,9 +1701,9 @@ nil means don't delete them until `list-processes' is run. */); | |||
| 1694 | /* This symbol is defined on recent USG systems. | 1701 | /* This symbol is defined on recent USG systems. |
| 1695 | Someone says without this call USG won't really buffer the file | 1702 | Someone says without this call USG won't really buffer the file |
| 1696 | even with a call to setbuf. */ | 1703 | even with a call to setbuf. */ |
| 1697 | setvbuf (TTY_OUTPUT (tty_out), (char *) _sobuf, _IOFBF, sizeof _sobuf); | 1704 | setvbuf (tty_out->output, (char *) _sobuf, _IOFBF, sizeof _sobuf); |
| 1698 | #else | 1705 | #else |
| 1699 | setbuf (TTY_OUTPUT (tty_out), (char *) _sobuf); | 1706 | setbuf (tty_out->output, (char *) _sobuf); |
| 1700 | #endif | 1707 | #endif |
| 1701 | 1708 | ||
| 1702 | tty_set_terminal_modes (tty_out->display); | 1709 | tty_set_terminal_modes (tty_out->display); |
| @@ -1867,10 +1874,13 @@ reset_sys_modes (tty_out) | |||
| 1867 | if (!tty_out->term_initted) | 1874 | if (!tty_out->term_initted) |
| 1868 | return; | 1875 | return; |
| 1869 | 1876 | ||
| 1877 | if (!tty_out->output) | ||
| 1878 | return; /* The tty is suspended. */ | ||
| 1879 | |||
| 1870 | /* Go to and clear the last line of the terminal. */ | 1880 | /* Go to and clear the last line of the terminal. */ |
| 1871 | 1881 | ||
| 1872 | cmgoto (tty_out, FrameRows (tty_out) - 1, 0); | 1882 | cmgoto (tty_out, FrameRows (tty_out) - 1, 0); |
| 1873 | 1883 | ||
| 1874 | /* Code adapted from tty_clear_end_of_line. */ | 1884 | /* Code adapted from tty_clear_end_of_line. */ |
| 1875 | if (tty_out->TS_clr_line) | 1885 | if (tty_out->TS_clr_line) |
| 1876 | { | 1886 | { |
| @@ -1880,13 +1890,13 @@ reset_sys_modes (tty_out) | |||
| 1880 | { /* have to do it the hard way */ | 1890 | { /* have to do it the hard way */ |
| 1881 | int i; | 1891 | int i; |
| 1882 | turn_off_insert (tty_out); | 1892 | turn_off_insert (tty_out); |
| 1883 | 1893 | ||
| 1884 | for (i = curX (tty_out); i < FrameCols (tty_out) - 1; i++) | 1894 | for (i = curX (tty_out); i < FrameCols (tty_out) - 1; i++) |
| 1885 | { | 1895 | { |
| 1886 | fputc (' ', TTY_OUTPUT (tty_out)); | 1896 | fputc (' ', tty_out->output); |
| 1887 | } | 1897 | } |
| 1888 | } | 1898 | } |
| 1889 | 1899 | ||
| 1890 | cmgoto (tty_out, FrameRows (tty_out) - 1, 0); | 1900 | cmgoto (tty_out, FrameRows (tty_out) - 1, 0); |
| 1891 | fflush (tty_out->output); | 1901 | fflush (tty_out->output); |
| 1892 | 1902 | ||
| @@ -1902,11 +1912,11 @@ reset_sys_modes (tty_out) | |||
| 1902 | #endif | 1912 | #endif |
| 1903 | 1913 | ||
| 1904 | tty_reset_terminal_modes (tty_out->display); | 1914 | tty_reset_terminal_modes (tty_out->display); |
| 1905 | fflush (TTY_OUTPUT (tty_out)); | 1915 | fflush (tty_out->output); |
| 1906 | #ifdef BSD_SYSTEM | 1916 | #ifdef BSD_SYSTEM |
| 1907 | #ifndef BSD4_1 | 1917 | #ifndef BSD4_1 |
| 1908 | /* Avoid possible loss of output when changing terminal modes. */ | 1918 | /* Avoid possible loss of output when changing terminal modes. */ |
| 1909 | fsync (fileno (TTY_OUTPUT (tty_out))); | 1919 | fsync (fileno (tty_out->output)); |
| 1910 | #endif | 1920 | #endif |
| 1911 | #endif | 1921 | #endif |
| 1912 | 1922 | ||
| @@ -1915,24 +1925,24 @@ reset_sys_modes (tty_out) | |||
| 1915 | #ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */ | 1925 | #ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */ |
| 1916 | if (interrupt_input) | 1926 | if (interrupt_input) |
| 1917 | { | 1927 | { |
| 1918 | reset_sigio (fileno (TTY_INPUT (tty_out))); | 1928 | reset_sigio (fileno (tty_out->input)); |
| 1919 | fcntl (fileno (TTY_INPUT (tty_out)), F_SETOWN, | 1929 | fcntl (fileno (tty_out->input), F_SETOWN, |
| 1920 | old_fcntl_owner[fileno (TTY_INPUT (tty_out))]); | 1930 | old_fcntl_owner[fileno (tty_out->input)]); |
| 1921 | } | 1931 | } |
| 1922 | #endif /* F_SETOWN */ | 1932 | #endif /* F_SETOWN */ |
| 1923 | #endif /* F_SETOWN_BUG */ | 1933 | #endif /* F_SETOWN_BUG */ |
| 1924 | #ifdef O_NDELAY | 1934 | #ifdef O_NDELAY |
| 1925 | fcntl (fileno (TTY_INPUT (tty_out)), F_SETFL, | 1935 | fcntl (fileno (tty_out->input), F_SETFL, |
| 1926 | fcntl (fileno (TTY_INPUT (tty_out)), F_GETFL, 0) & ~O_NDELAY); | 1936 | fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY); |
| 1927 | #endif | 1937 | #endif |
| 1928 | #endif /* F_SETFL */ | 1938 | #endif /* F_SETFL */ |
| 1929 | #ifdef BSD4_1 | 1939 | #ifdef BSD4_1 |
| 1930 | if (interrupt_input) | 1940 | if (interrupt_input) |
| 1931 | reset_sigio (fileno (TTY_INPUT (tty_out))); | 1941 | reset_sigio (fileno (tty_out->input)); |
| 1932 | #endif /* BSD4_1 */ | 1942 | #endif /* BSD4_1 */ |
| 1933 | 1943 | ||
| 1934 | if (tty_out->old_tty) | 1944 | if (tty_out->old_tty) |
| 1935 | while (EMACS_SET_TTY (fileno (TTY_INPUT (tty_out)), | 1945 | while (EMACS_SET_TTY (fileno (tty_out->input), |
| 1936 | tty_out->old_tty, 0) < 0 && errno == EINTR) | 1946 | tty_out->old_tty, 0) < 0 && errno == EINTR) |
| 1937 | ; | 1947 | ; |
| 1938 | 1948 | ||
| @@ -1952,7 +1962,7 @@ reset_sys_modes (tty_out) | |||
| 1952 | #endif | 1962 | #endif |
| 1953 | 1963 | ||
| 1954 | #ifdef BSD_PGRPS | 1964 | #ifdef BSD_PGRPS |
| 1955 | widen_foreground_group (fileno (TTY_INPUT (tty_out))); | 1965 | widen_foreground_group (fileno (tty_out->input)); |
| 1956 | #endif | 1966 | #endif |
| 1957 | } | 1967 | } |
| 1958 | 1968 | ||
| @@ -2017,9 +2027,9 @@ init_vms_input () | |||
| 2017 | { | 2027 | { |
| 2018 | int status; | 2028 | int status; |
| 2019 | 2029 | ||
| 2020 | if (fileno (TTY_INPUT (CURTTY())) == 0) | 2030 | if (fileno (CURTTY ()->input)) == 0) |
| 2021 | { | 2031 | { |
| 2022 | status = SYS$ASSIGN (&input_dsc, &fileno (TTY_INPUT (CURTTY())), 0, 0); | 2032 | status = SYS$ASSIGN (&input_dsc, &fileno (CURTTY ()->input)), 0, 0); |
| 2023 | if (! (status & 1)) | 2033 | if (! (status & 1)) |
| 2024 | LIB$STOP (status); | 2034 | LIB$STOP (status); |
| 2025 | } | 2035 | } |
| @@ -2030,7 +2040,7 @@ init_vms_input () | |||
| 2030 | void | 2040 | void |
| 2031 | stop_vms_input () | 2041 | stop_vms_input () |
| 2032 | { | 2042 | { |
| 2033 | return SYS$DASSGN (fileno (TTY_INPUT (CURTTY()))); | 2043 | return SYS$DASSGN (fileno (CURTTY ()->input))); |
| 2034 | } | 2044 | } |
| 2035 | 2045 | ||
| 2036 | short input_buffer; | 2046 | short input_buffer; |
| @@ -2046,7 +2056,7 @@ queue_kbd_input () | |||
| 2046 | 2056 | ||
| 2047 | waiting_for_ast = 0; | 2057 | waiting_for_ast = 0; |
| 2048 | stop_input = 0; | 2058 | stop_input = 0; |
| 2049 | status = SYS$QIO (0, fileno (TTY_INPUT (CURTTY())), IO$_READVBLK, | 2059 | status = SYS$QIO (0, fileno (CURTTY()->input), IO$_READVBLK, |
| 2050 | &input_iosb, kbd_input_ast, 1, | 2060 | &input_iosb, kbd_input_ast, 1, |
| 2051 | &input_buffer, 1, 0, terminator_mask, 0, 0); | 2061 | &input_buffer, 1, 0, terminator_mask, 0, 0); |
| 2052 | } | 2062 | } |
| @@ -2163,7 +2173,7 @@ end_kbd_input () | |||
| 2163 | #endif | 2173 | #endif |
| 2164 | if (LIB$AST_IN_PROG ()) /* Don't wait if suspending from kbd_buffer_store_event! */ | 2174 | if (LIB$AST_IN_PROG ()) /* Don't wait if suspending from kbd_buffer_store_event! */ |
| 2165 | { | 2175 | { |
| 2166 | SYS$CANCEL (fileno (TTY_INPUT (CURTTY()))); | 2176 | SYS$CANCEL (fileno (CURTTY()->input)); |
| 2167 | return; | 2177 | return; |
| 2168 | } | 2178 | } |
| 2169 | 2179 | ||
| @@ -2172,7 +2182,7 @@ end_kbd_input () | |||
| 2172 | SYS$CLREF (input_ef); | 2182 | SYS$CLREF (input_ef); |
| 2173 | waiting_for_ast = 1; | 2183 | waiting_for_ast = 1; |
| 2174 | stop_input = 1; | 2184 | stop_input = 1; |
| 2175 | SYS$CANCEL (fileno (TTY_INPUT (CURTTY()))); | 2185 | SYS$CANCEL (fileno (CURTTY()->input)); |
| 2176 | SYS$SETAST (1); | 2186 | SYS$SETAST (1); |
| 2177 | SYS$WAITFR (input_ef); | 2187 | SYS$WAITFR (input_ef); |
| 2178 | waiting_for_ast = 0; | 2188 | waiting_for_ast = 0; |