]> code.delx.au - gnu-emacs/commitdiff
If a C name must be extern on some platforms, make it extern on all.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Jun 2014 18:27:22 +0000 (11:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Jun 2014 18:27:22 +0000 (11:27 -0700)
* dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
(load_color):
* font.h (ftxfont_driver) [HAVE_XFT]:
* keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
* lisp.h (get_frame_param):
* menu.h (tty_menu_show):
* process.h (conv_sockaddr_to_lisp, catch_child_signal):
* termhooks.h (encode_terminal_code):
* xterm.h (x_menu_wait_for_event):
Always declare.
* frame.c (get_frame_param):
* fringe.c (max_used_fringe_bitmap):
* ftxfont.c (ftxfont_driver):
* keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
* menu.c (menu_items_inuse):
* process.c (conv_sockaddr_to_lisp, catch_child_signal):
* term.c (encode_terminal_code, tty_menu_show):
* xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
* xfaces.c (load_color):
* xmenu.c (x_menu_wait_for_event):
Now always extern.

19 files changed:
src/ChangeLog
src/dispextern.h
src/font.h
src/frame.c
src/fringe.c
src/ftxfont.c
src/keyboard.c
src/keyboard.h
src/lisp.h
src/menu.c
src/menu.h
src/process.c
src/process.h
src/term.c
src/termhooks.h
src/xdisp.c
src/xfaces.c
src/xmenu.c
src/xterm.h

index 2cdaf494aad8c9b2b7e27371f84823c01b4cf7f7..72aaea5eeb6fc11c327d2f0007e831bef84dcf87 100644 (file)
@@ -1,3 +1,28 @@
+2014-06-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       If a C name must be extern on some platforms, make it extern on all.
+       * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
+       (load_color):
+       * font.h (ftxfont_driver) [HAVE_XFT]:
+       * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
+       * lisp.h (get_frame_param):
+       * menu.h (tty_menu_show):
+       * process.h (conv_sockaddr_to_lisp, catch_child_signal):
+       * termhooks.h (encode_terminal_code):
+       * xterm.h (x_menu_wait_for_event):
+       Always declare.
+       * frame.c (get_frame_param):
+       * fringe.c (max_used_fringe_bitmap):
+       * ftxfont.c (ftxfont_driver):
+       * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
+       * menu.c (menu_items_inuse):
+       * process.c (conv_sockaddr_to_lisp, catch_child_signal):
+       * term.c (encode_terminal_code, tty_menu_show):
+       * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
+       * xfaces.c (load_color):
+       * xmenu.c (x_menu_wait_for_event):
+       Now always extern.
+
 2014-06-08  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Change object marking routines to minimize stack usage.
index 8ccc3d35d8c306ec87896ff98c48ea02186c16a7..ee17b65deaa43404c5901314be4d9ad40fbc0345 100644 (file)
@@ -3163,9 +3163,7 @@ int default_line_pixel_height (struct window *);
 int display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
 void resize_echo_area_exactly (void);
 int resize_mini_window (struct window *, int);
-#if defined USE_TOOLKIT_SCROLL_BARS && !defined USE_GTK
 void set_vertical_scroll_bar (struct window *);
-#endif
 int try_window (Lisp_Object, struct text_pos, int);
 void window_box (struct window *, enum glyph_row_area,
                 int *, int *, int *, int *);
@@ -3238,9 +3236,7 @@ extern void draw_phys_cursor_glyph (struct window *,
                                     enum draw_glyphs_face);
 extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
                                       struct glyph *, int *, int *, int *);
-#if HAVE_NTGUI
 extern void erase_phys_cursor (struct window *);
-#endif
 extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
 extern void x_update_cursor (struct frame *, bool);
 extern void x_clear_cursor (struct window *);
@@ -3354,10 +3350,8 @@ void update_face_from_frame_parameter (struct frame *, Lisp_Object,
                                        Lisp_Object);
 Lisp_Object tty_color_name (struct frame *, int);
 void clear_face_cache (int);
-#ifdef MSDOS
 unsigned long load_color (struct frame *, struct face *, Lisp_Object,
                           enum lface_attribute_index);
-#endif
 char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
                         int *);
 void prepare_face_for_display (struct frame *, struct face *);
index e2e36460583b678d25da9e2be675200e7f85385f..4a525573cc2a452beef7749293573b82d897fbfa 100644 (file)
@@ -834,7 +834,8 @@ extern void syms_of_ftxfont (void);
 extern Lisp_Object Qxft;
 extern struct font_driver xftfont_driver;
 extern void syms_of_xftfont (void);
-#elif defined HAVE_FREETYPE
+#endif
+#if defined HAVE_FREETYPE || defined HAVE_XFT
 extern struct font_driver ftxfont_driver;
 #endif
 #ifdef HAVE_BDFFONT
index 4575ac0553eba337610f280279f0c526bfa02834..e75a74be93889bd0be5cfd102578010fb00b300f 100644 (file)
@@ -1965,9 +1965,6 @@ If there is no window system support, this function does nothing.  */)
 /* Return the value of frame parameter PROP in frame FRAME.  */
 
 #ifdef HAVE_WINDOW_SYSTEM
-#if !HAVE_NS && !HAVE_NTGUI
-static
-#endif
 Lisp_Object
 get_frame_param (register struct frame *frame, Lisp_Object prop)
 {
index 1eae6b1849365207b3ba4498be6f725494e18866..7256987bcc25942b176f7d9d754771ea2839084e 100644 (file)
@@ -480,9 +480,6 @@ static struct fringe_bitmap **fringe_bitmaps;
 static Lisp_Object *fringe_faces;
 static int max_fringe_bitmaps;
 
-#ifndef HAVE_NS
-static
-#endif
 int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
 
 
index 9db7cbceb66ae818828d6abb20755617d4692680..53f2616bb62a86306bba486e9590ef133d763c47 100644 (file)
@@ -37,9 +37,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 static Lisp_Object Qftx;
 
-#if defined HAVE_XFT || !defined HAVE_FREETYPE
-static
-#endif
 struct font_driver ftxfont_driver;
 
 struct ftxfont_frame_data
index 568c8203c7fc29739094fa6da926095ef9b457f5..dcf89137a5c261c70011a45e1eed5dd860a4b5d9 100644 (file)
@@ -1286,9 +1286,6 @@ usage: (track-mouse BODY...)  */)
    If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement
    after resizing the tool-bar window.  */
 
-#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS
-static
-#endif
 bool ignore_mouse_drag_p;
 
 static struct frame *
@@ -2085,9 +2082,6 @@ bind_polling_period (int n)
 \f
 /* Apply the control modifier to CHARACTER.  */
 
-#ifndef HAVE_NTGUI
-static
-#endif
 int
 make_ctrl_char (int c)
 {
index 8a72d03416f628c03183b5145a937aa5311c5a5d..da83b9b01ed9d8d5f2e36dd7733ab15969885642 100644 (file)
@@ -305,9 +305,7 @@ extern Lisp_Object menu_items;
 
 /* If non-nil, means that the global vars defined here are already in use.
    Used to detect cases where we try to re-enter this non-reentrant code.  */
-#if defined USE_GTK || defined USE_MOTIF
 extern Lisp_Object menu_items_inuse;
-#endif
 
 /* Number of slots currently allocated in menu_items.  */
 extern int menu_items_allocated;
@@ -415,9 +413,7 @@ extern bool waiting_for_input;
    happens.  */
 extern struct timespec *input_available_clear_time;
 
-#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS
 extern bool ignore_mouse_drag_p;
-#endif
 
 /* The primary selection.  */
 extern Lisp_Object QPRIMARY;
@@ -467,9 +463,7 @@ extern bool input_polling_used (void);
 extern void clear_input_pending (void);
 extern bool requeued_events_pending_p (void);
 extern void bind_polling_period (int);
-#if HAVE_NTGUI
 extern int make_ctrl_char (int) ATTRIBUTE_CONST;
-#endif
 extern void stuff_buffered_input (Lisp_Object);
 extern void clear_waiting_for_input (void);
 extern void swallow_events (bool);
index 6d397169e87e767bf9a282514dcd41b8060022bf..67bbfa7c9b9a51a0f15d2608916fee44e68291ca 100644 (file)
@@ -4127,9 +4127,7 @@ extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
 extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
-#if HAVE_NS || HAVE_NTGUI
 extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
-#endif
 extern void frames_discard_buffer (Lisp_Object);
 extern void syms_of_frame (void);
 
index 552ce1f2818948500228bbddbbaaa9aa34c2f7d8..96f53903201dd15da468865ade0d022a710549d8 100644 (file)
@@ -66,9 +66,6 @@ Lisp_Object menu_items;
 
 /* If non-nil, means that the global vars defined here are already in use.
    Used to detect cases where we try to re-enter this non-reentrant code.  */
-#if ! (defined USE_GTK || defined USE_MOTIF)
-static
-#endif
 Lisp_Object menu_items_inuse;
 
 /* Number of slots currently allocated in menu_items.  */
index 42038f54b679114a8fa4f30eb58095d3de08ab53..643ff40fef8c00a1c2e29e737c7c6fb49ca7df0c 100644 (file)
@@ -64,14 +64,12 @@ extern Lisp_Object x_menu_show (struct frame *, int, int, int,
 #ifdef HAVE_NTGUI
 extern Lisp_Object w32_menu_show (struct frame *, int, int, int,
                                  Lisp_Object, const char **);
-#ifdef WINDOWSNT
-extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
-                                 Lisp_Object, const char **);
-#endif
 #endif
 #ifdef HAVE_NS
 extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
                                 Lisp_Object, const char **);
 #endif
+extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
+                                 Lisp_Object, const char **);
 extern ptrdiff_t menu_item_width (const unsigned char *);
 #endif /* MENU_H */
index 7f9b5ac59d140949d021fe391aa101f98cf02367..b8b8eaaee5bd500209bbc3c5cde71cfec8d98732 100644 (file)
@@ -1957,9 +1957,6 @@ create_pty (Lisp_Object process)
 /* Convert an internal struct sockaddr to a lisp object (vector or string).
    The address family of sa is not included in the result.  */
 
-#ifndef WINDOWSNT
-static
-#endif
 Lisp_Object
 conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
 {
@@ -7051,9 +7048,6 @@ integer or floating point values.
    futz with the SIGCHLD handler, but before Emacs forks any children.
    This function's caller should block SIGCHLD.  */
 
-#ifndef NS_IMPL_GNUSTEP
-static
-#endif
 void
 catch_child_signal (void)
 {
index 9181139226dbfc26d8a88bcc27a5df3197732a1a..273ad9267d68d271e1520726ca721a52e7517d52 100644 (file)
@@ -225,9 +225,7 @@ extern Lisp_Object system_process_attributes (Lisp_Object);
 
 extern void record_deleted_pid (pid_t, Lisp_Object);
 struct sockaddr;
-#ifdef WINDOWSNT
 extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int);
-#endif
 extern void hold_keyboard_input (void);
 extern void unhold_keyboard_input (void);
 extern bool kbd_on_hold_p (void);
@@ -238,9 +236,7 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
 extern void delete_read_fd (int fd);
 extern void add_write_fd (int fd, fd_callback func, void *data);
 extern void delete_write_fd (int fd);
-#ifdef NS_IMPL_GNUSTEP
 extern void catch_child_signal (void);
-#endif
 
 #ifdef WINDOWSNT
 extern Lisp_Object network_interface_list (void);
index 37a938e338d0c8d15c76278f00f51282cea233c3..642907979aa7d472d42df93ec0bae7d0a5be0f6f 100644 (file)
@@ -527,9 +527,6 @@ static ptrdiff_t encode_terminal_dst_size;
    Set CODING->produced to the byte-length of the resulting byte
    sequence, and return a pointer to that byte sequence.  */
 
-#ifndef DOS_NT
-static
-#endif
 unsigned char *
 encode_terminal_code (struct glyph *src, int src_len,
                      struct coding_system *coding)
@@ -3583,9 +3580,6 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
 }
 
 /* WINDOWSNT uses this as menu_show_hook, see w32console.c.  */
-#ifndef WINDOWSNT
-static
-#endif
 Lisp_Object
 tty_menu_show (struct frame *f, int x, int y, int menuflags,
               Lisp_Object title, const char **error_name)
index 7aef3ae619d4d01f09424a3993cbe1751da6987c..f9bf9d785b67541f9264dbe63bff83fbabe33aa2 100644 (file)
@@ -651,10 +651,8 @@ extern void delete_terminal (struct terminal *);
 /* The initial terminal device, created by initial_term_init.  */
 extern struct terminal *initial_terminal;
 
-#ifdef DOS_NT
 extern unsigned char *encode_terminal_code (struct glyph *, int,
                                            struct coding_system *);
-#endif
 
 #ifdef HAVE_GPM
 extern void close_gpm (int gpm_fd);
index fbe87ed847ae175e48f09f15fbf5cbb1c01228b7..1b86ec7d9d333b5c992bc92a56f4ea3b51914862 100644 (file)
@@ -15710,9 +15710,6 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
   return rc;
 }
 
-#if !defined USE_TOOLKIT_SCROLL_BARS || defined USE_GTK
-static
-#endif
 void
 set_vertical_scroll_bar (struct window *w)
 {
@@ -27055,9 +27052,6 @@ draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
 
 /* Erase the image of a cursor of window W from the screen.  */
 
-#ifndef HAVE_NTGUI
-static
-#endif
 void
 erase_phys_cursor (struct window *w)
 {
index 4e599d0bd052286da7986be4236e9b5407b899c7..1d869d90ac3678e240cadec60ea1ee7f5bb0982a 100644 (file)
@@ -1248,9 +1248,6 @@ load_color2 (struct frame *f, struct face *face, Lisp_Object name,
    record that fact in flags of the face so that we don't try to free
    these colors.  */
 
-#ifndef MSDOS
-static
-#endif
 unsigned long
 load_color (struct frame *f, struct face *face, Lisp_Object name,
            enum lface_attribute_index target_index)
index 18793457dad040fa2cd575bc60a63b186b3e3df4..2d41350e737f3f53b5401cc43b08635cbf3da848 100644 (file)
@@ -208,9 +208,6 @@ x_menu_set_in_use (int in_use)
 
 /* Wait for an X event to arrive or for a timer to expire.  */
 
-#ifndef USE_MOTIF
-static
-#endif
 void
 x_menu_wait_for_event (void *data)
 {
index bd27c1b201be27a117b2aed27e6ebd35103824b0..9daa478c964776fc19b31f2556fe52c049a30988 100644 (file)
@@ -1031,9 +1031,7 @@ extern Lisp_Object xw_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
 #if defined USE_GTK || defined USE_MOTIF
 extern void x_menu_set_in_use (int);
 #endif
-#ifdef USE_MOTIF
 extern void x_menu_wait_for_event (void *data);
-#endif
 extern int popup_activated (void);
 extern void initialize_frame_menubar (struct frame *);