changeset 59745:2177d96b9c08

(x_error_quitter): Add a prototype. Make it static again.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 27 Jan 2005 17:00:38 +0000
parents 19a1efbcc922
children e3086ef13cec
files src/ChangeLog src/xterm.c
diffstat 2 files changed, 64 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 27 15:36:25 2005 +0000
+++ b/src/ChangeLog	Thu Jan 27 17:00:38 2005 +0000
@@ -1,3 +1,7 @@
+2005-01-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* xterm.c (x_error_quitter): Add a prototype.  Make it static again.
+
 2005-01-27  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (get_glyph_string_clip_rect): Always show a cursor
@@ -62,7 +66,7 @@
 2005-01-22  Steven Tamm  <steventamm@mac.com>
 
 	* s/darwin.h: Removed PTY_ITERATION from here.
-	(DARWIN): Defined.
+	(DARWIN): Define.
 	* process.c (init_process): Default process-connection-type to
 	nil on darwin 6 or less, t if it is 7 or higher.  This way the
 	broken pty behavior is still allowed on darwin 6 for interactive
@@ -105,17 +109,16 @@
 
 2005-01-20  Steven Tamm  <steventamm@mac.com>
 
-	* editfns.c (Voperating_system_release): Added.
+	* editfns.c (Voperating_system_release): Add.
 	(init_editfns): Assign new variable operating-system-release
 	based on call to uname if available.
-	(get_operating_system_release): Added function to
+	(get_operating_system_release): Add function to
 	allow c-level access to operating system release.
 
 	* config.h: Regenerated.
 
-	* s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or
-	less.
-	(MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for
+	* s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or less.
+	(MIN_PTY_KERNEL_VERSION): Define minimum kernel version for
 	using ptys as '7'.
 
 2005-01-20  Kim F. Storm  <storm@cua.dk>
@@ -157,8 +160,8 @@
 
 2005-01-17  Kim F. Storm  <storm@cua.dk>
 
-	* dispnew.c (mode_line_string, marginal_area_string): Fix
-	off-by-one error in search for glyph.
+	* dispnew.c (mode_line_string, marginal_area_string):
+	Fix off-by-one error in search for glyph.
 
 2005-01-16  Kim F. Storm  <storm@cua.dk>
 
@@ -166,7 +169,7 @@
 
 2005-01-16  Steven Tamm  <steventamm@mac.com>
 
-	* macterm.c (mac_to_x_fontname): Removed spurious argument.
+	* macterm.c (mac_to_x_fontname): Remove spurious argument.
 
 2005-01-16  Andreas Schwab  <schwab@suse.de>
 
@@ -182,7 +185,7 @@
 	* keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW)
 	(READABLE_EVENTS_FILTER_EVENTS, READABLE_EVENTS_IGNORE_SQUEEZABLES):
 	New flags for readable_events.
-	(get_filtered_input_pending, readable_filtered_events): Removed.
+	(get_filtered_input_pending, readable_filtered_events): Remove.
 	(tracking_off): Call readable_events and get_input_pending with
 	flag READABLE_EVENTS_DO_TIMERS_NOW.
 	(readable_events): Move code from old readable_filtered_events here,
@@ -222,8 +225,8 @@
 
 2005-01-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* macfns.c (x_set_foreground_color, x_set_background_color): Sync
-	with xfns.c.
+	* macfns.c (x_set_foreground_color, x_set_background_color):
+	Sync with xfns.c.
 	(mac_window, x_create_tip_frame): Use XSetWindowBackground.
 	* macterm.c (XSetBackground, XSetWindowBackground): New functions.
 	* macterm.h (XSetBackground, XSetWindowBackground): Add externs.
@@ -280,8 +283,8 @@
 	(get_next_display_element): Test Vshow_nonbreak_escape.
 	Do not setup escape_glyph_face.
 	Properly merge escape-glyph face or face from display table with
-	current face for escape and control characters.  Set
-	it->dpvec_face_id to relevant face id instead of adding it to each
+	current face for escape and control characters.
+	Set it->dpvec_face_id to relevant face id instead of adding it to each
 	element of display vector.
 	(next_element_from_display_vector): If it->dpvec_face_id is set,
 	use that instead of lface_id from glyph itself.
@@ -305,8 +308,7 @@
 
 	* gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
 	(xg_tool_bar_callback, xg_tool_bar_help_callback)
-	(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
-	warning.
+	(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler warning.
 
 	* xselect.c (x_get_foreign_selection, x_fill_property_data)
 	(Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with
@@ -364,8 +366,8 @@
 	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise.
 	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a
 	file dialog is in action.
-	[TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise.  Reject
-	only when there are no filename items.  Set background color
+	[TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise.
+	Reject only when there are no filename items.  Set background color
 	before (un)highlighting the window below the dragged items.
 	(XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update.
 
@@ -449,8 +451,7 @@
 
 	* fileio.c (Finsert_file_contents): Don't use
 	current_buffer->buffer_file_coding_system even if REPLACE is
-	non-nil.  Call Qafter_insert_file_set_coding with the second arg
-	VISIT.
+	non-nil.  Call Qafter_insert_file_set_coding with the second arg VISIT.
 
 	* fontset.h (struct font_info): New members space_width and
 	average_width.
@@ -463,8 +464,7 @@
 	* xterm.c (x_new_font): Set FRAME_COLUMN_WIDTH to
 	fontp->average_width, not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to
 	fontp->space_width.
-	(x_load_font): Calculate fontp->space_width and
-	fontp->average_width.
+	(x_load_font): Calculate fontp->space_width and fontp->average_width.
 	(x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH.
 
 	* xdisp.c (x_produce_glyphs): Calculate tab width by
@@ -473,8 +473,7 @@
 2004-12-29  Sanghyuk Suh  <han9kin@mac.com>
 
 	* macterm.c (SelectionRange): Add Xcode position apple event struct.
-	(do_ae_open_documents): Handle Xcode-style file position open
-	events.
+	(do_ae_open_documents): Handle Xcode-style file position open events.
 
 2004-12-29  Luc Teirlinck  <teirllm@auburn.edu>
 
@@ -500,11 +499,11 @@
 	init_mac_drag_n_drop.
 	(mac_do_track_drag): New function and declaration.
 	(install_window_handler): Return OSErr value.
-	(install_window_handler) [TARGET_API_MAC_CARBON]: Register
-	handlers for tracking/receiving drag-and-drop items.
+	(install_window_handler) [TARGET_API_MAC_CARBON]:
+	Register handlers for tracking/receiving drag-and-drop items.
 	(do_ae_open_documents): Generate unibyte strings for filenames.
-	(mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise.  Reject
-	only non-filename items.  Set event modifiers.  Set return value.
+	(mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise.
+	Reject only non-filename items.  Set event modifiers, and return value.
 
 2004-12-28  Dan Nicolaescu  <dann@ics.uci.edu>
 
@@ -528,8 +527,8 @@
 	* xmenu.c (popup_get_selection): Only pop down dialogs
 	on C-g and Escape.
 	(popup_get_selection): Remove parameter down_on_keypress.
-	(create_and_show_popup_menu, create_and_show_dialog): Remove
-	parameter down_on_keypress to popup_get_selection.
+	(create_and_show_popup_menu, create_and_show_dialog):
+	Remove parameter down_on_keypress to popup_get_selection.
 
 2004-12-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
@@ -546,8 +545,8 @@
 
 	* frame.c (x_set_frame_parameters, x_report_frame_params)
 	(x_set_fullscreen): Remove #ifndef HAVE_CARBON.
-	(x_set_border_width, Vdefault_frame_scroll_bars): Change
-	HAVE_CARBON to MAC_OS.
+	(x_set_border_width, Vdefault_frame_scroll_bars):
+	Change HAVE_CARBON to MAC_OS.
 
 	* image.c [MAC_OS]: Include sys/stat.h.
 	[MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and
@@ -555,8 +554,7 @@
 
 	* mac.c [!MAC_OSX] (mac_wait_next_event): Add extern.
 	[!MAC_OSX] (select): Use mac_wait_next_event.
-	[!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to
-	Vexec_suffixes.
+	[!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to Vexec_suffixes.
 	[!MAC_OSX] (select, run_mac_command): Change `#ifdef
 	TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'.
 	(mac_clear_font_name_table): Add extern.
@@ -575,21 +573,19 @@
 	* macfns.c (mac_initialized): Remove extern.
 	(stricmp): Put in #if 0.  All callers changed to use xstricmp in
 	xfaces.c.
-	(strnicmp): Decrement `n' at the end of each loop, not the
-	beginning.
-	(check_mac): Use the term "Mac native windows" instead of "Mac
-	OS".
+	(strnicmp): Decrement `n' at the end of each loop, not the beginning.
+	(check_mac): Use the term "Mac native windows" instead of "Mac OS".
 	(check_x_display_info, x_display_info_for_name): Sync with xfns.c.
 	(mac_get_rdb_resource): New function (from w32reg.c).
 	(x_get_string_resource): Use it.
 	(install_window_handler): Add extern.
 	(mac_window): New function.
-	(Fx_create_frame): Use it instead of make_mac_frame.  Set
-	parameter for Qfullscreen.  Call x_wm_set_size_hint.
+	(Fx_create_frame): Use it instead of make_mac_frame.
+	Set parameter for Qfullscreen.  Call x_wm_set_size_hint.
 	(Fx_open_connection, Fx_close_connection): New defuns.
 	(syms_of_macfns): Defsubr them.
-	(x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add
-	kWindowNoUpdatesAttribute to the window attribute.
+	(x_create_tip_frame) [TARGET_API_MAC_CARBON]:
+	Add kWindowNoUpdatesAttribute to the window attribute.
 	(x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow.
 	(x_create_tip_frame): Don't call ShowWindow.
 	(Fx_show_tip): Call ShowWindow.
@@ -598,8 +594,7 @@
 	(mac_frame_parm_handlers): Set handlers for Qfullscreen.
 	(syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0.
 
-	* macgui.h [!MAC_OSX]: Don't include Controls.h.  Include
-	Windows.h.
+	* macgui.h [!MAC_OSX]: Don't include Controls.h.  Include Windows.h.
 	(Window): Typedef to WindowPtr and move outside `#if
 	TARGET_API_MAC_CARBON'.
 	(XSizeHints): New struct.
@@ -618,8 +613,7 @@
 	(x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window
 	if the position is neither user-specified nor program-specified.
 	(x_free_frame_resources): Free size_hints.
-	(x_wm_set_size_hint): Allocate size_hints if needed.  Set
-	size_hints.
+	(x_wm_set_size_hint): Allocate size_hints if needed.  Set size_hints.
 	(mac_clear_font_name_table): New function.
 	(mac_do_list_fonts): Initialize font_name_table if needed.
 	(x_list_fonts): Don't initialize font_name_table.  Add BLOCK_INPUT
@@ -633,8 +627,7 @@
 	(do_window_update): Add BeginUpdate/EndUpdate for the tooltip
 	window.  Use UpdateControls.  Get the rectangle that should be
 	updated and restrict the target of expose_frame to it.
-	(do_grow_window): Set minimum height/width according to
-	size_hints.
+	(do_grow_window): Set minimum height/width according to size_hints.
 	(do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow.
 	(do_zoom_window): Don't use x_set_window_size.
 	[USE_CARBON_EVENTS] (mac_handle_window_event): New function.
@@ -646,10 +639,10 @@
 	(XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event.
 	Update mouse_region when mouse is moved.
 	(make_mac_frame): Remove.
-	(make_mac_terminal_frame): Put in #ifdef MAC_OS8.  Initialize
-	mouse pointer shapes.  Change values of f->left_pos and
-	f->top_pos.  Don't use make_mac_frame.  Use NewCWindow.  Don't
-	call ShowWindow.
+	(make_mac_terminal_frame): Put in #ifdef MAC_OS8.
+	Initialize mouse pointer shapes.  Change values of f->left_pos and
+	f->top_pos.  Don't use make_mac_frame.  Use NewCWindow.
+	Don't call ShowWindow.
 	(mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from
 	Vinvocation_name and Vsystem_name.
 	(mac_make_rdb): New function (from w32term.c).
@@ -672,17 +665,17 @@
 
 2004-12-27  Richard M. Stallman  <rms@gnu.org>
 
-	* buffer.c (Fbuffer_disable_undo): Deleted (moved to simple.el).
+	* buffer.c (Fbuffer_disable_undo): Delete (move to simple.el).
 	(syms_of_buffer): Don't defsubr it.
 
 	* process.c (list_processes_1): Set undo_list instead
 	of calling Fbuffer_disable_undo.
 
-	* xdisp.c (single_display_spec_string_p): Renamed from
+	* xdisp.c (single_display_spec_string_p): Rename from
 	single_display_prop_string_p.
-	(single_display_spec_intangible_p): Renamed from
+	(single_display_spec_intangible_p): Rename from
 	single_display_prop_intangible_p.
-	(handle_single_display_spec): Renamed from handle_single_display_prop.
+	(handle_single_display_spec): Rename from handle_single_display_prop.
 	Rewritten to be easier to understand.
 
 	Change in load-history format.  Functions now get (defun . NAME),
@@ -766,7 +759,7 @@
 
 	* alloc.c (Fgarbage_collect): Update call to truncate_undo_list.
 	Call that at the very start.
-	(undo_limit, undo_strong_limit, undo_outer_limit): Moved to undo.c.
+	(undo_limit, undo_strong_limit, undo_outer_limit): Move to undo.c.
 	(syms_of_alloc): Don't define undo-limit,
 	undo-strong-limit and undo-outer-limit here.
 
@@ -801,8 +794,8 @@
 
 2004-12-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* macterm.c (endif, x_font_name_to_mac_font_name): Use
-	maccentraleurroman instead of maccentraleuropean
+	* macterm.c (endif, x_font_name_to_mac_font_name):
+	Use maccentraleurroman instead of maccentraleuropean
 	(mac_c_string_match, mac_do_list_fonts): Speed up font search by
 	quickly finding a specific font without needing regexps.
 
@@ -828,8 +821,8 @@
 
 	* sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK.
 
-	* process.c (send_process_trap, sigchld_handler): Call
-	SIGNAL_THREAD_CHECK.
+	* process.c (send_process_trap, sigchld_handler):
+	Call SIGNAL_THREAD_CHECK.
 
 	* data.c (arith_error): Call SIGNAL_THREAD_CHECK.
 
@@ -919,7 +912,7 @@
 
 	* alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.
 
-2004-12-07  Stefan  <monnier@iro.umontreal.ca>
+2004-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* eval.c (init_eval_once): Increase max_specpdl_size to 1000.
 
@@ -2072,7 +2065,7 @@
 
 	* window.c (Fspecial_display_p): Doc fix.
 
-2004-10-15  Stefan  <monnier@iro.umontreal.ca>
+2004-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* doc.c (Fsubstitute_command_keys): Fix remap-handling.
 	Don't ignore menus, because where-is-internal already does it for us.
--- a/src/xterm.c	Thu Jan 27 15:36:25 2005 +0000
+++ b/src/xterm.c	Thu Jan 27 17:00:38 2005 +0000
@@ -1,6 +1,6 @@
 /* X Communication module for terminals which understand the X protocol.
-   Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 1999, 2000,01,02,03,04
-   Free Software Foundation, Inc.
+   Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+     2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -7766,6 +7766,10 @@
   error ("%s", error_msg);
 }
 
+/* We specifically use it before defining it, so that gcc doesn't inline it,
+   otherwise gdb doesn't know how to properly put a breakpoint on it.  */
+static void x_error_quitter (Display *display, XErrorEvent *error);
+
 /* This is the first-level handler for X protocol errors.
    It calls x_error_quitter or x_error_catcher.  */
 
@@ -7785,11 +7789,10 @@
    It kills all frames on the display that we got the error for.
    If that was the only one, it prints an error message and kills Emacs.  */
 
-/* This is not static because we want to put a breakpoint on it.
-   It is after x_error_handler so that it won't get inlined in
+/* It is after x_error_handler so that it won't get inlined in
    x_error_handler.  */
 
-void
+static void
 x_error_quitter (display, error)
      Display *display;
      XErrorEvent *error;