[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114315: Don't overuse 'const' in types of locals.
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r114315: Don't overuse 'const' in types of locals. |
Date: |
Tue, 17 Sep 2013 07:06:55 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114315
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-17 00:06:42 -0700
message:
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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/bidi.c bidi.c-20091231194348-rm8gzug639w0dpq5-1
src/gtkutil.c gtkutil.c-20091113204419-o5vbwnq5f7feedwu-2527
src/gtkutil.h gtkutil.h-20091113204419-o5vbwnq5f7feedwu-2528
src/xselect.c xselect.c-20091113204419-o5vbwnq5f7feedwu-543
src/xsettings.c xsettings.c-20091117210551-bqxn4u9uesl3d17a-4
src/xsettings.h xsettings.h-20091117210551-bqxn4u9uesl3d17a-5
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
src/xterm.h xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-09-17 06:57:30 +0000
+++ b/src/ChangeLog 2013-09-17 07:06:42 +0000
@@ -1,3 +1,24 @@
+2013-09-17 Paul Eggert <address@hidden>
+
+ 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 <address@hidden>
* image.c (fn_g_type_init) [WINDOWSNT]: Define and load
=== modified file 'src/bidi.c'
--- a/src/bidi.c 2013-08-06 06:53:09 +0000
+++ b/src/bidi.c 2013-09-17 07:06:42 +0000
@@ -870,8 +870,8 @@
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;
=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c 2013-09-16 10:41:41 +0000
+++ b/src/gtkutil.c 2013-09-17 07:06:42 +0000
@@ -3409,7 +3409,7 @@
}
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 @@
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;
=== modified file 'src/gtkutil.h'
--- a/src/gtkutil.h 2013-09-16 10:41:41 +0000
+++ b/src/gtkutil.h 2013-09-17 07:06:42 +0000
@@ -105,7 +105,7 @@
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 @@
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);
=== modified file 'src/xselect.c'
--- a/src/xselect.c 2013-09-16 10:41:41 +0000
+++ b/src/xselect.c 2013-09-17 07:06:42 +0000
@@ -1141,7 +1141,7 @@
/* 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 @@
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 @@
/* 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;
=== modified file 'src/xsettings.c'
--- a/src/xsettings.c 2013-09-17 06:33:24 +0000
+++ b/src/xsettings.c 2013-09-17 07:06:42 +0000
@@ -754,7 +754,7 @@
/* 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;
=== modified file 'src/xsettings.h'
--- a/src/xsettings.h 2013-09-16 10:41:41 +0000
+++ b/src/xsettings.h 2013-09-17 07:06:42 +0000
@@ -21,7 +21,7 @@
#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);
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2013-09-17 06:57:30 +0000
+++ b/src/xterm.c 2013-09-17 07:06:42 +0000
@@ -303,12 +303,12 @@
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 @@
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 @@
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 @@
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 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 @@
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 @@
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 @@
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 @@
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 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 @@
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 @@
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 @@
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;
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2013-09-16 10:41:41 +0000
+++ b/src/xterm.h 2013-09-17 07:06:42 +0000
@@ -941,8 +941,8 @@
/* 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 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114315: Don't overuse 'const' in types of locals.,
Paul Eggert <=