aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-12-24 11:25:11 -0800
committerPaul Eggert2017-12-24 11:30:20 -0800
commit9982be8f015facb4a615d7a94b10c7078c1a8e7c (patch)
tree5e8330c66774f9ff708aac919ae6e89293a03669 /src
parent3f63ae54ecc22de51930cba1b118e93f7decd45e (diff)
downloademacs-9982be8f015facb4a615d7a94b10c7078c1a8e7c.tar.gz
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.
Diffstat (limited to 'src')
-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;
1871 1871
1872static struct atimer *poll_timer; 1872static struct atimer *poll_timer;
1873 1873
1874#if defined CYGWIN || defined DOS_NT
1874/* Poll for input, so that we catch a C-g if it comes in. */ 1875/* Poll for input, so that we catch a C-g if it comes in. */
1875void 1876void
1876poll_for_input_1 (void) 1877poll_for_input_1 (void)
@@ -1879,6 +1880,7 @@ poll_for_input_1 (void)
1879 && !waiting_for_input) 1880 && !waiting_for_input)
1880 gobble_input (); 1881 gobble_input ();
1881} 1882}
1883#endif
1882 1884
1883/* Timer callback function for poll_timer. TIMER is equal to 1885/* Timer callback function for poll_timer. TIMER is equal to
1884 poll_timer. */ 1886 poll_timer. */
@@ -1930,20 +1932,22 @@ start_polling (void)
1930#endif 1932#endif
1931} 1933}
1932 1934
1935#ifdef DOS_NT
1933/* True if we are using polling to handle input asynchronously. */ 1936/* True if we are using polling to handle input asynchronously. */
1934 1937
1935bool 1938bool
1936input_polling_used (void) 1939input_polling_used (void)
1937{ 1940{
1938#ifdef POLL_FOR_INPUT 1941# ifdef POLL_FOR_INPUT
1939 /* XXX This condition was (read_socket_hook && !interrupt_input), 1942 /* XXX This condition was (read_socket_hook && !interrupt_input),
1940 but read_socket_hook is not global anymore. Let's pretend that 1943 but read_socket_hook is not global anymore. Let's pretend that
1941 it's always set. */ 1944 it's always set. */
1942 return !interrupt_input; 1945 return !interrupt_input;
1943#else 1946# else
1944 return 0; 1947 return false;
1945#endif 1948# endif
1946} 1949}
1950#endif
1947 1951
1948/* Turn off polling. */ 1952/* Turn off polling. */
1949 1953