summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-12-24 11:25:11 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-12-24 11:30:20 -0800
commit9982be8f015facb4a615d7a94b10c7078c1a8e7c (patch)
tree5e8330c66774f9ff708aac919ae6e89293a03669
parent3f63ae54ecc22de51930cba1b118e93f7decd45e (diff)
downloademacs-9982be8f015facb4a615d7a94b10c7078c1a8e7c.tar.gz
emacs-9982be8f015facb4a615d7a94b10c7078c1a8e7c.tar.bz2
emacs-9982be8f015facb4a615d7a94b10c7078c1a8e7c.zip
On non-MS-Windows, omit unnecessary polling functions
* src/keyboard.c (poll_for_input_1) [!CYGWIN && !DOS_NT]: Remove. (input_polling_used) [!DOS_NT]: Remove.
-rw-r--r--src/keyboard.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 375aa4f6067..b9929b39099 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1871,6 +1871,7 @@ int poll_suppress_count;
static struct atimer *poll_timer;
+#if defined CYGWIN || defined DOS_NT
/* Poll for input, so that we catch a C-g if it comes in. */
void
poll_for_input_1 (void)
@@ -1879,6 +1880,7 @@ poll_for_input_1 (void)
&& !waiting_for_input)
gobble_input ();
}
+#endif
/* Timer callback function for poll_timer. TIMER is equal to
poll_timer. */
@@ -1930,20 +1932,22 @@ start_polling (void)
#endif
}
+#ifdef DOS_NT
/* True if we are using polling to handle input asynchronously. */
bool
input_polling_used (void)
{
-#ifdef POLL_FOR_INPUT
+# ifdef POLL_FOR_INPUT
/* XXX This condition was (read_socket_hook && !interrupt_input),
but read_socket_hook is not global anymore. Let's pretend that
it's always set. */
return !interrupt_input;
-#else
- return 0;
-#endif
+# else
+ return false;
+# endif
}
+#endif
/* Turn off polling. */