Mercurial > emacs
comparison src/keyboard.c @ 97656:0ddcae8d4119
(handle_interrupt) [MSDOS]: Call cursor_to with SELECTED_FRAME as
additional (1st) argument.
(tty_read_avail_input): Handle output_msdos_raw in addition to output_termcap.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 23 Aug 2008 16:52:37 +0000 |
parents | 9ca57f39eb82 |
children | 5a501b4092a0 |
comparison
equal
deleted
inserted
replaced
97655:287457e9bac1 | 97656:0ddcae8d4119 |
---|---|
7074 int nread = 0; | 7074 int nread = 0; |
7075 | 7075 |
7076 if (!terminal->name) /* Don't read from a dead terminal. */ | 7076 if (!terminal->name) /* Don't read from a dead terminal. */ |
7077 return 0; | 7077 return 0; |
7078 | 7078 |
7079 if (terminal->type != output_termcap) | 7079 if (terminal->type != output_termcap |
7080 && terminal->type != output_msdos_raw) | |
7080 abort (); | 7081 abort (); |
7081 | 7082 |
7082 /* XXX I think the following code should be moved to separate hook | 7083 /* XXX I think the following code should be moved to separate hook |
7083 functions in system-dependent files. */ | 7084 functions in system-dependent files. */ |
7084 #ifdef WINDOWSNT | 7085 #ifdef WINDOWSNT |
7085 return 0; | 7086 return 0; |
7086 #else /* not WINDOWSNT */ | 7087 #else /* not WINDOWSNT */ |
7088 if (! tty->term_initted) /* In case we get called during bootstrap. */ | |
7089 return 0; | |
7090 | |
7091 if (! tty->input) | |
7092 return 0; /* The terminal is suspended. */ | |
7093 | |
7087 #ifdef MSDOS | 7094 #ifdef MSDOS |
7088 n_to_read = dos_keysns (); | 7095 n_to_read = dos_keysns (); |
7089 if (n_to_read == 0) | 7096 if (n_to_read == 0) |
7090 return 0; | 7097 return 0; |
7091 | 7098 |
7092 cbuf[0] = dos_keyread (); | 7099 cbuf[0] = dos_keyread (); |
7093 nread = 1; | 7100 nread = 1; |
7094 | 7101 |
7095 #else /* not MSDOS */ | 7102 #else /* not MSDOS */ |
7096 | |
7097 if (! tty->term_initted) /* In case we get called during bootstrap. */ | |
7098 return 0; | |
7099 | |
7100 if (! tty->input) | |
7101 return 0; /* The terminal is suspended. */ | |
7102 | |
7103 #ifdef HAVE_GPM | 7103 #ifdef HAVE_GPM |
7104 if (gpm_tty == tty) | 7104 if (gpm_tty == tty) |
7105 { | 7105 { |
7106 Gpm_Event event; | 7106 Gpm_Event event; |
7107 struct input_event hold_quit; | 7107 struct input_event hold_quit; |
11003 printf ("you can continue or abort.\n"); | 11003 printf ("you can continue or abort.\n"); |
11004 #endif /* not SIGTSTP */ | 11004 #endif /* not SIGTSTP */ |
11005 #ifdef MSDOS | 11005 #ifdef MSDOS |
11006 /* We must remain inside the screen area when the internal terminal | 11006 /* We must remain inside the screen area when the internal terminal |
11007 is used. Note that [Enter] is not echoed by dos. */ | 11007 is used. Note that [Enter] is not echoed by dos. */ |
11008 cursor_to (0, 0); | 11008 cursor_to (SELECTED_FRAME (), 0, 0); |
11009 #endif | 11009 #endif |
11010 /* It doesn't work to autosave while GC is in progress; | 11010 /* It doesn't work to autosave while GC is in progress; |
11011 the code used for auto-saving doesn't cope with the mark bit. */ | 11011 the code used for auto-saving doesn't cope with the mark bit. */ |
11012 if (!gc_in_progress) | 11012 if (!gc_in_progress) |
11013 { | 11013 { |