Commit b7ad2f74 authored by Paul Eggert's avatar Paul Eggert

Don't overuse 'const' in types of locals.

* bidi.c (bidi_count_bytes):
* gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
(xg_event_is_for_scrollbar):
* xselect.c (x_handle_property_notify)
(x_handle_selection_notify, x_handle_dnd_message):
* xsettings.c, xsettings.h (xft_settings_event):
* xterm.c (x_handle_net_wm_state, handle_one_event)
(x_menubar_window_to_frame, x_detect_focus_change)
(construct_mouse_click, note_mouse_movement)
(x_scroll_bar_to_input_event, x_scroll_bar_expose)
(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
(handle_one_xevent, x_handle_net_wm_state):
* xterm.h (x_handle_property_notify, x_handle_selection_notify)
(x_handle_dnd_message):
Avoid unnecessary 'const', typically the second 'const' in
'const foo * const arg', a 'const' that does not affect the API
and doesn't significantly help the human reader.
parent 1893694e
2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
Don't overuse 'const' in types of locals.
* bidi.c (bidi_count_bytes):
* gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
(xg_event_is_for_scrollbar):
* xselect.c (x_handle_property_notify)
(x_handle_selection_notify, x_handle_dnd_message):
* xsettings.c, xsettings.h (xft_settings_event):
* xterm.c (x_handle_net_wm_state, handle_one_event)
(x_menubar_window_to_frame, x_detect_focus_change)
(construct_mouse_click, note_mouse_movement)
(x_scroll_bar_to_input_event, x_scroll_bar_expose)
(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
(handle_one_xevent, x_handle_net_wm_state):
* xterm.h (x_handle_property_notify, x_handle_selection_notify)
(x_handle_dnd_message):
Avoid unnecessary 'const', typically the second 'const' in
'const foo * const arg', a 'const' that does not affect the API
and doesn't significantly help the human reader.
2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
* image.c (fn_g_type_init) [WINDOWSNT]: Define and load
......
......@@ -870,8 +870,8 @@ bidi_line_init (struct bidi_it *bidi_it)
are zero-based character positions in S, BEGBYTE is byte position
corresponding to BEG. UNIBYTE means S is a unibyte string. */
static ptrdiff_t
bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg,
const ptrdiff_t begbyte, const ptrdiff_t end, bool unibyte)
bidi_count_bytes (const unsigned char *s, ptrdiff_t beg,
ptrdiff_t begbyte, ptrdiff_t end, bool unibyte)
{
ptrdiff_t pos = beg;
const unsigned char *p = s + begbyte, *start = p;
......
......@@ -3409,7 +3409,7 @@ free_frame_menubar (struct frame *f)
}
bool
xg_event_is_for_menubar (struct frame *f, const XEvent * const event)
xg_event_is_for_menubar (struct frame *f, const XEvent *event)
{
struct x_output *x = f->output_data.x;
GList *iter;
......@@ -3861,7 +3861,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
frame. This function does additional checks. */
bool
xg_event_is_for_scrollbar (struct frame *f, const XEvent * const event)
xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
{
bool retval = 0;
......
......@@ -105,7 +105,7 @@ extern void xg_modify_menubar_widgets (GtkWidget *menubar,
extern void xg_update_frame_menubar (struct frame *f);
extern bool xg_event_is_for_menubar (struct frame *, const XEvent * const);
extern bool xg_event_is_for_menubar (struct frame *, const XEvent *);
extern bool xg_have_tear_offs (void);
......@@ -129,7 +129,7 @@ extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
int portion,
int position,
int whole);
extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent * const);
extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent *);
extern int xg_get_default_scrollbar_width (void);
extern void update_frame_tool_bar (struct frame *f);
......
......@@ -1141,7 +1141,7 @@ wait_for_property_change (struct prop_location *location)
/* Called from XTread_socket in response to a PropertyNotify event. */
void
x_handle_property_notify (const XPropertyEvent * const event)
x_handle_property_notify (const XPropertyEvent *event)
{
struct prop_location *rest;
......@@ -1888,7 +1888,7 @@ clean_local_selection_data (Lisp_Object obj)
We store t there if the reply is successful, lambda if not. */
void
x_handle_selection_notify (const XSelectionEvent * const event)
x_handle_selection_notify (const XSelectionEvent *event)
{
if (event->requestor != reading_selection_window)
return;
......@@ -2488,7 +2488,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */
int
x_handle_dnd_message (struct frame *f, const XClientMessageEvent * const event,
x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event,
struct x_display_info *dpyinfo, struct input_event *bufp)
{
Lisp_Object vec;
......
......@@ -754,7 +754,7 @@ read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p)
/* Check if EVENT for the display in DPYINFO is XSettings related. */
void
xft_settings_event (struct x_display_info *dpyinfo, const XEvent * const event)
xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event)
{
bool check_window_p = 0, apply_settings_p = 0;
......
......@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define XSETTINGS_H
extern void xsettings_initialize (struct x_display_info *);
extern void xft_settings_event (struct x_display_info *, const XEvent * const);
extern void xft_settings_event (struct x_display_info *, const XEvent *);
extern const char *xsettings_get_system_font (void);
#ifdef USE_LUCID
extern const char *xsettings_get_system_normal_font (void);
......
......@@ -303,12 +303,12 @@ static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
enum scroll_bar_part *,
Lisp_Object *, Lisp_Object *,
Time *);
static int x_handle_net_wm_state (struct frame *, const XPropertyEvent * const);
static int x_handle_net_wm_state (struct frame *, const XPropertyEvent *);
static void x_check_fullscreen (struct frame *);
static void x_check_expected_move (struct frame *, int, int);
static void x_sync_with_move (struct frame *, int, int, int);
static int handle_one_xevent (struct x_display_info *,
const XEvent * const, int *,
const XEvent *, int *,
struct input_event *);
#ifdef USE_GTK
static int x_dispatch_event (XEvent *, Display *);
......@@ -3462,7 +3462,7 @@ x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
static struct frame *
x_menubar_window_to_frame (struct x_display_info *dpyinfo,
const XEvent * const event)
const XEvent *event)
{
Window wdesc = event->xany.window;
Lisp_Object tail, frame;
......@@ -3544,7 +3544,7 @@ x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
static void
x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame,
const XEvent * const event, struct input_event *bufp)
const XEvent *event, struct input_event *bufp)
{
if (!frame)
return;
......@@ -3835,7 +3835,7 @@ x_get_keysym_name (int keysym)
static Lisp_Object
construct_mouse_click (struct input_event *result,
const XButtonEvent * const event,
const XButtonEvent *event,
struct frame *f)
{
/* Make the event type NO_EVENT; we'll change that when we decide
......@@ -3868,7 +3868,7 @@ static XMotionEvent last_mouse_motion_event;
static Lisp_Object last_mouse_motion_frame;
static int
note_mouse_movement (struct frame *frame, const XMotionEvent * const event)
note_mouse_movement (struct frame *frame, const XMotionEvent *event)
{
last_mouse_movement_time = event->time;
last_mouse_motion_event = *event;
......@@ -4359,7 +4359,7 @@ x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
in *IEVENT. */
static void
x_scroll_bar_to_input_event (const XEvent * const event,
x_scroll_bar_to_input_event (const XEvent *event,
struct input_event *ievent)
{
XClientMessageEvent *ev = (XClientMessageEvent *) event;
......@@ -5504,7 +5504,7 @@ XTjudge_scroll_bars (struct frame *f)
mark bits. */
static void
x_scroll_bar_expose (struct scroll_bar *bar, const XEvent * const event)
x_scroll_bar_expose (struct scroll_bar *bar, const XEvent *event)
{
Window w = bar->x_window;
struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
......@@ -5543,7 +5543,7 @@ x_scroll_bar_expose (struct scroll_bar *bar, const XEvent * const event)
static void
x_scroll_bar_handle_click (struct scroll_bar *bar,
const XEvent * const event,
const XEvent *event,
struct input_event *emacs_event)
{
if (! WINDOWP (bar->window))
......@@ -5602,7 +5602,7 @@ x_scroll_bar_handle_click (struct scroll_bar *bar,
static void
x_scroll_bar_note_movement (struct scroll_bar *bar,
const XMotionEvent * const event)
const XMotionEvent *event)
{
struct frame *f = XFRAME (XWINDOW (bar->window)->frame);
......@@ -5853,7 +5853,7 @@ static void xembed_send_message (struct frame *f, Time,
static int
handle_one_xevent (struct x_display_info *dpyinfo,
const XEvent * const event,
const XEvent *event,
int *finish, struct input_event *hold_quit)
{
union {
......@@ -6078,7 +6078,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
const XSelectionClearEvent * const eventp = &event->xselectionclear;
const XSelectionClearEvent *eventp = &event->xselectionclear;
inev.ie.kind = SELECTION_CLEAR_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
......@@ -6094,7 +6094,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
const XSelectionRequestEvent * const eventp = &event->xselectionrequest;
const XSelectionRequestEvent *eventp = &event->xselectionrequest;
inev.ie.kind = SELECTION_REQUEST_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
......@@ -8533,7 +8533,7 @@ XTfullscreen_hook (struct frame *f)
static int
x_handle_net_wm_state (struct frame *f, const XPropertyEvent * const event)
x_handle_net_wm_state (struct frame *f, const XPropertyEvent *event)
{
int value = FULLSCREEN_NONE;
Lisp_Object lval;
......
......@@ -941,8 +941,8 @@ extern void x_wait_for_event (struct frame *, int);
/* Defined in xselect.c */
extern void x_handle_property_notify (const XPropertyEvent * const);
extern void x_handle_selection_notify (const XSelectionEvent * const);
extern void x_handle_property_notify (const XPropertyEvent *);
extern void x_handle_selection_notify (const XSelectionEvent *);
extern void x_handle_selection_event (struct input_event *);
extern void x_clear_frame_selections (struct frame *);
......@@ -954,7 +954,7 @@ extern void x_send_client_event (Lisp_Object display,
Lisp_Object values);
extern int x_handle_dnd_message (struct frame *,
const XClientMessageEvent * const,
const XClientMessageEvent *,
struct x_display_info *,
struct input_event *);
extern int x_check_property_data (Lisp_Object);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment