]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix minor problems found by static checking.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Dec 2013 23:04:10 +0000 (15:04 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Dec 2013 23:04:10 +0000 (15:04 -0800)
* keyboard.c (poll_for_input_1, input_polling_used):
Define only if HAVE_NTGUI.
* xmenu.c (popup_activate_callback): Omit unnecessary
check against USE_X_TOOLKIT, which must be defined here anyway.
* xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
Now static.

src/ChangeLog
src/keyboard.c
src/xmenu.c
src/xterm.c
src/xterm.h

index 3072e2dcdec55965df9b38b1a7c49801b03f4b92..c7776762b8da63e60fcc1521d2c5aa5fb62e8d8b 100644 (file)
@@ -1,3 +1,13 @@
+2013-12-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix minor problems found by static checking.
+       * keyboard.c (poll_for_input_1, input_polling_used):
+       Define only if HAVE_NTGUI.
+       * xmenu.c (popup_activate_callback): Omit unnecessary
+       check against USE_X_TOOLKIT, which must be defined here anyway.
+       * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
+       Now static.
+
 2013-12-07  Martin Rudalics  <rudalics@gmx.at>
 
        * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
index b50c06b4154e91d4ec711553651fea8b2404e462..913a277ca791367336bacbde3062a01af371a0fe 100644 (file)
@@ -1954,10 +1954,8 @@ int poll_suppress_count;
 
 static struct atimer *poll_timer;
 
-/* Poll for input, so that we catch a C-g if it comes in.  This
-   function is called from x_make_frame_visible, see comment
-   there.  */
-
+#ifdef HAVE_NTGUI
+/* Poll for input, so that we catch a C-g if it comes in.  */
 void
 poll_for_input_1 (void)
 {
@@ -1965,6 +1963,7 @@ poll_for_input_1 (void)
       && !waiting_for_input)
     gobble_input ();
 }
+#endif
 
 /* Timer callback function for poll_timer.  TIMER is equal to
    poll_timer.  */
@@ -2016,6 +2015,8 @@ start_polling (void)
 #endif
 }
 
+#ifdef HAVE_NTGUI
+
 /* True if we are using polling to handle input asynchronously.  */
 
 bool
@@ -2030,6 +2031,7 @@ input_polling_used (void)
   return 0;
 #endif
 }
+#endif
 
 /* Turn off polling.  */
 
index d587610fdd745e595d907ea727d515fa066fee5d..fb3baa01ef467dc6bd15f9f96d78c4cdeee49ace 100644 (file)
@@ -510,9 +510,7 @@ static void
 popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   popup_activated_flag = 1;
-#ifdef USE_X_TOOLKIT
   x_activate_timeout_atimer ();
-#endif
 }
 #endif
 
index e8e69c666ee84b6f71762c8c34812a87aaec0f36..90c7c36c44f6115752dd7ad697cb53756d853e8b 100644 (file)
@@ -248,6 +248,9 @@ static void x_sync_with_move (struct frame *, int, int, int);
 static int handle_one_xevent (struct x_display_info *,
                              const XEvent *, int *,
                              struct input_event *);
+#if ! (defined USE_X_TOOLKIT || defined USE_MOTIF)
+static int x_dispatch_event (XEvent *, Display *);
+#endif
 /* Don't declare this _Noreturn because we want no
    interference with debugging failing X calls.  */
 static void x_connection_closed (Display *, const char *);
index 3d954fb860007e6a5fe363cdcc825c80ddce6467..eff75403476e951ba3f75dba58885c5759712d17 100644 (file)
@@ -945,7 +945,9 @@ extern void x_clear_area (Display *, Window, int, int, int, int);
 extern void x_mouse_leave (struct x_display_info *);
 #endif
 
+#if defined USE_X_TOOLKIT || defined USE_MOTIF
 extern int x_dispatch_event (XEvent *, Display *);
+#endif
 extern int x_x_to_emacs_modifiers (struct x_display_info *, int);
 extern int x_display_pixel_height (struct x_display_info *);
 extern int x_display_pixel_width (struct x_display_info *);