emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Renaming non-X x_* identifiers


From: Eli Zaretskii
Subject: Re: [PATCH] Renaming non-X x_* identifiers
Date: Thu, 25 Apr 2019 12:56:56 +0300

> Date: Thu, 25 Apr 2019 08:25:17 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 
> > From: Alex Gramiak <address@hidden>
> > Cc: address@hidden,  address@hidden
> > Date: Wed, 24 Apr 2019 13:40:51 -0600
> > 
> > Have you had a chance to build scratch/x_emacs on w32?
> 
> Not yet, soon.

Done now.  The original didn't compile; error messages below for your
reference.  The patch to fix those is near the end; after applying it,
Emacs builds and seems to work.

Thanks!

    CC       xdisp.o
  xdisp.c: In function 'note_tool_bar_highlight':
  xdisp.c:13167:19: warning: implicit declaration of function 
'x_mouse_grabbed'; did you mean 'gui_mouse_grabbed'? 
[-Wimplicit-function-declaration]
     mouse_down_p = (x_mouse_grabbed (dpyinfo)
                     ^~~~~~~~~~~~~~~
                     gui_mouse_grabbed
  xdisp.c:13167:19: warning: nested extern declaration of 'x_mouse_grabbed' 
[-Wnested-externs]
    [...]
    CC       w32fns.o
  w32fns.c:1649:1: warning: no previous prototype for 
'w32_clear_under_internal_border' [-Wmissing-prototypes]
   w32_clear_under_internal_border (struct frame *f)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC       w32menu.o
    CC       w32reg.o
  w32reg.c:143:1: warning: no previous prototype for 'w32_get_string_resource' 
[-Wmissing-prototypes]
   w32_get_string_resource (void *v_rdb, const char *name, const char *class)
   ^~~~~~~~~~~~~~~~~~~~~~~
  w32reg.c: In function 'w32_get_string_resource':
  w32reg.c:145:21: warning: initialization makes pointer from integer without a 
cast [-Wint-conversion]
     const char *rdb = *((const char *)v_rdb);
                       ^
    CC       w32font.o
    CC       w32term.o
  w32term.c:187:13: error: conflicting types for 'w32_frame_rehighlight'
   static void w32_frame_rehighlight (struct w32_display_info *);
               ^~~~~~~~~~~~~~~~~~~~~
  w32term.c:186:13: note: previous declaration of 'w32_frame_rehighlight' was 
here

   static void w32_frame_rehighlight (struct frame *);
               ^~~~~~~~~~~~~~~~~~~~~
  w32term.c: In function 'w32_new_focus_frame':
  w32term.c:2943:3: warning: implicit declaration of function 
'w32_reframe_highlight_1'; did you mean 'w32_frame_highlight'? 
[-Wimplicit-function-declaration]
     w32_reframe_highlight_1 (dpyinfo);
     ^~~~~~~~~~~~~~~~~~~~~~~
     w32_frame_highlight
  w32term.c:2943:3: warning: nested extern declaration of 
'w32_reframe_highlight_1' [-Wnested-externs]
  w32term.c: At top level:
  w32term.c:3029:1: error: conflicting types for 'w32_frame_rehighlight'
   w32_frame_rehighlight (struct frame *frame)
   ^~~~~~~~~~~~~~~~~~~~~
  w32term.c:187:13: note: previous declaration of 'w32_frame_rehighlight' was 
here

   static void w32_frame_rehighlight (struct w32_display_info *);
               ^~~~~~~~~~~~~~~~~~~~~
  w32term.c:3037:1: warning: conflicting types for 'w32_reframe_highlight_1'
   w32_reframe_highlight_1 (struct w32_display_info *dpyinfo)
   ^~~~~~~~~~~~~~~~~~~~~~~
  w32term.c:3037:1: error: static declaration of 'w32_reframe_highlight_1' 
follows non-static declaration
  w32term.c:2943:3: note: previous implicit declaration of 
'w32_reframe_highlight_1' was here
     w32_reframe_highlight_1 (dpyinfo);
     ^~~~~~~~~~~~~~~~~~~~~~~
  w32term.c: In function 'w32_set_vertical_scroll_bar':
  w32term.c:4043:8: warning: implicit declaration of function 
'w32_clear_under_internal_border'; did you mean 'iQdrag_internal_border'? 
[-Wimplicit-function-decla
  ration]
          w32_clear_under_internal_border (f);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          iQdrag_internal_border
  w32term.c:4043:8: warning: nested extern declaration of 
'w32_clear_under_internal_border' [-Wnested-externs]
  w32term.c: At top level:
  w32term.c:4669:1: error: static declaration of 'w32_scroll_bar_clear' follows 
non-static declaration
   w32_scroll_bar_clear (struct frame *f)
   ^~~~~~~~~~~~~~~~~~~~
  w32term.c:171:6: note: previous declaration of 'w32_scroll_bar_clear' was here
   void w32_scroll_bar_clear (struct frame *);
        ^~~~~~~~~~~~~~~~~~~~
  w32term.c:7138:3: error: 'w32_clear_under_internal_border' undeclared here 
(not in a function); did you mean 'Qdrag_internal_border'?
     w32_clear_under_internal_border,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Qdrag_internal_border
  w32term.c: In function 'w32_create_terminal':
  w32term.c:7170:32: warning: assignment from incompatible pointer type 
[-Wincompatible-pointer-types]
     terminal->defined_color_hook = w32_defined_color;
                                  ^
  At top level:
  w32term.c:4669:1: warning: 'w32_scroll_bar_clear' defined but not used 
[-Wunused-function]
   w32_scroll_bar_clear (struct frame *f)
   ^~~~~~~~~~~~~~~~~~~~
  w32term.c:3037:1: warning: 'w32_reframe_highlight_1' defined but not used 
[-Wunused-function]
   w32_reframe_highlight_1 (struct w32_display_info *dpyinfo)
   ^~~~~~~~~~~~~~~~~~~~~~~
  Makefile:394: recipe for target `w32term.o' failed
  make[1]: *** [w32term.o] Error 1
  make[1]: Leaving directory `/d/gnu/git/emacs/trunk/src'
  Makefile:423: recipe for target `src' failed
  make: *** [src] Error 2

--- ./src/w32fns.c~0    2019-04-25 12:25:08.979250000 +0300
+++ ./src/w32fns.c      2019-04-25 12:45:07.229250000 +0300
@@ -1173,7 +1173,7 @@ gamma_correct (struct frame *f, COLORREF
    the selected frame; if so, return the rgb values in COLOR_DEF.
    If ALLOC is nonzero, allocate a new colormap cell.  */
 
-int
+bool
 w32_defined_color (struct frame *f, const char *color, XColor *color_def,
                   bool alloc_p, bool _makeIndex)
 {
--- ./src/w32reg.c~0    2019-04-25 12:25:08.994875000 +0300
+++ ./src/w32reg.c      2019-04-25 12:36:20.713625000 +0300
@@ -22,6 +22,7 @@ along with GNU Emacs.  If not, see <http
 #include <config.h>
 #include "lisp.h"
 #include "blockinput.h"
+#include "w32term.h"
 
 #include <stdio.h>
 
@@ -142,7 +143,7 @@ w32_get_string_resource_1 (const char *n
 const char *
 w32_get_string_resource (void *v_rdb, const char *name, const char *class)
 {
-  const char *rdb = *((const char *)v_rdb);
+  const char *rdb = v_rdb;
 
   if (rdb)
     {
--- ./src/w32term.c~0   2019-04-25 12:25:09.010500000 +0300
+++ ./src/w32term.c     2019-04-25 12:42:41.010500000 +0300
@@ -168,7 +168,7 @@ static void w32_handle_tool_bar_click (s
                                        struct input_event *);
 static void w32_define_cursor (Window, Cursor);
 
-void w32_scroll_bar_clear (struct frame *);
+static void w32_scroll_bar_clear (struct frame *);
 static void w32_raise_frame (struct frame *);
 static void w32_lower_frame (struct frame *);
 static void w32_initialize (void);
@@ -184,7 +184,7 @@ static void w32_focus_changed (int, int,
 static void w32_detect_focus_change (struct w32_display_info *,
                                      W32Msg *, struct input_event *);
 static void w32_frame_rehighlight (struct frame *);
-static void w32_frame_rehighlight (struct w32_display_info *);
+static void w32_reframe_highlight_1 (struct w32_display_info *);
 static void w32_draw_hollow_cursor (struct window *, struct glyph_row *);
 static void w32_draw_bar_cursor (struct window *, struct glyph_row *, int,
                                enum text_cursor_kinds);
--- ./src/w32term.h~0   2019-04-25 12:25:09.010500000 +0300
+++ ./src/w32term.h     2019-04-25 12:45:52.057375000 +0300
@@ -239,8 +239,8 @@ extern void w32_set_scroll_bar_default_h
 
 extern struct w32_display_info *w32_term_init (Lisp_Object,
                                               char *, char *);
-extern int w32_defined_color (struct frame *f, const char *color,
-                              XColor *color_def, bool alloc_p, bool 
_makeIndex);
+extern bool w32_defined_color (struct frame *, const char *, XColor *,
+                              bool, bool);
 extern int w32_display_pixel_height (struct w32_display_info *);
 extern int w32_display_pixel_width (struct w32_display_info *);
 extern void initialize_frame_menubar (struct frame *);
@@ -865,6 +865,7 @@ typedef char guichar_t;
 extern Lisp_Object w32_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
 extern void w32_arrow_cursor (void);
 
+extern void w32_clear_under_internal_border (struct frame *);
 extern void syms_of_w32term (void);
 extern void syms_of_w32menu (void);
 extern void syms_of_w32fns (void);
--- ./src/xdisp.c~0     2019-04-25 12:25:09.026125000 +0300
+++ ./src/xdisp.c       2019-04-25 12:29:48.573000000 +0300
@@ -13164,7 +13164,7 @@ note_tool_bar_highlight (struct frame *f
   clear_mouse_face (hlinfo);
 
   /* Mouse is down, but on different tool-bar item?  */
-  mouse_down_p = (x_mouse_grabbed (dpyinfo)
+  mouse_down_p = (gui_mouse_grabbed (dpyinfo)
                  && f == dpyinfo->last_mouse_frame);
 
   if (mouse_down_p && f->last_tool_bar_item != prop_idx)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]