To: vim_dev@googlegroups.com Subject: Patch 8.2.1231 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1231 Problem: MS-Windows: GUI code can be cleaned up. Solution: Do a bit of cleaning up. (Ken Takata, closes #6465) Files: src/gui_w32.c, src/proto/gui_w32.pro *** ../vim-8.2.1230/src/gui_w32.c 2020-07-17 20:43:37.292617041 +0200 --- src/gui_w32.c 2020-07-17 22:15:44.038403955 +0200 *************** *** 240,245 **** --- 240,246 ---- # define CONST # define FAR # define NEAR + # define WINAPI # undef _cdecl # define _cdecl typedef int BOOL; *************** *** 320,328 **** // for find/replace dialog #endif - #if !defined(FEAT_GUI) - static - #endif HWND s_hwnd = NULL; static HDC s_hdc = NULL; static HBRUSH s_brush = NULL; --- 321,326 ---- *************** *** 389,395 **** #endif // use of WindowProc depends on Global IME ! #define MyWindowProc vim_WindowProc extern int current_font_height; // this is in os_mswin.c --- 387,393 ---- #endif // use of WindowProc depends on Global IME ! static LRESULT WINAPI MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); extern int current_font_height; // this is in os_mswin.c *************** *** 1259,1270 **** } } ! #ifdef PROTO ! typedef int WINAPI; ! #endif ! ! LRESULT WINAPI ! vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { #ifdef GLOBAL_IME return global_ime_DefWindowProc(hwnd, message, wParam, lParam); --- 1257,1264 ---- } } ! static LRESULT WINAPI ! MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { #ifdef GLOBAL_IME return global_ime_DefWindowProc(hwnd, message, wParam, lParam); *************** *** 3824,3833 **** # include "xpm_w32.h" #endif - #ifdef PROTO - # define WINAPI - #endif - #ifdef __MINGW32__ /* * Add a lot of missing defines. --- 3818,3823 ---- *** ../vim-8.2.1230/src/proto/gui_w32.pro 2020-07-17 20:43:37.292617041 +0200 --- src/proto/gui_w32.pro 2020-07-17 22:15:44.038403955 +0200 *************** *** 5,11 **** void gui_mch_set_blinking(long wait, long on, long off); void gui_mch_stop_blink(int may_call_gui_update_cursor); void gui_mch_start_blink(void); - LRESULT WINAPI vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); void gui_mch_new_colors(void); void gui_mch_def_colors(void); int gui_mch_open(void); --- 5,10 ---- *** ../vim-8.2.1230/src/version.c 2020-07-17 22:06:40.767784141 +0200 --- src/version.c 2020-07-17 22:15:31.774435421 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1231, /**/ -- Q. What happens to programmers when they die? A: MS-Windows programmers are reinstalled. C++ programmers become undefined, anyone who refers to them will die as well. Java programmers reincarnate after being garbage collected, unless they are in permgen, in which case they become zombies. Zimbu programmers leave a stack trace that tells us exactly where they died and how they got there. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///