comparison src/gui_w32.c @ 12950:e60b2aa04903 v8.0.1351

patch 8.0.1351: warning for unused variables building with MinGW commit https://github.com/vim/vim/commit/bdb8139098d170ede2bc79dd4f62e4ed5e778d3e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 27 23:24:08 2017 +0100 patch 8.0.1351: warning for unused variables building with MinGW Problem: Warning for unused variables building with MinGW. Solution: Change a few #ifdefs (suggested by John Marriott). Remove superfluous checks of FEAT_MBYTE.
author Christian Brabandt <cb@256bit.org>
date Mon, 27 Nov 2017 23:30:05 +0100
parents 2ebc3df65ca2
children 18e6f4addce9
comparison
equal deleted inserted replaced
12949:bbdb2b017123 12950:e60b2aa04903
496 /* 496 /*
497 * For control IME. 497 * For control IME.
498 * 498 *
499 * These LOGFONT used for IME. 499 * These LOGFONT used for IME.
500 */ 500 */
501 #ifdef FEAT_MBYTE 501 #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
502 /* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */ 502 /* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */
503 static LOGFONT norm_logfont; 503 static LOGFONT norm_logfont;
504 #endif
505 #ifdef FEAT_MBYTE_IME
504 /* holds LOGFONT for 'guifont' always. */ 506 /* holds LOGFONT for 'guifont' always. */
505 static LOGFONT sub_logfont; 507 static LOGFONT sub_logfont;
506 #endif 508 #endif
507 509
508 #ifdef FEAT_MBYTE_IME 510 #ifdef FEAT_MBYTE_IME
3359 3361
3360 if (font_name == NULL) 3362 if (font_name == NULL)
3361 font_name = (char_u *)lf.lfFaceName; 3363 font_name = (char_u *)lf.lfFaceName;
3362 #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME) 3364 #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
3363 norm_logfont = lf; 3365 norm_logfont = lf;
3366 #endif
3367 #ifdef FEAT_MBYTE_IME
3364 sub_logfont = lf; 3368 sub_logfont = lf;
3365 #endif 3369 #endif
3366 #ifdef FEAT_MBYTE_IME 3370 #ifdef FEAT_MBYTE_IME
3367 update_im_font(); 3371 update_im_font();
3368 #endif 3372 #endif
5792 gui_mch_set_sp_color(guicolor_T color) 5796 gui_mch_set_sp_color(guicolor_T color)
5793 { 5797 {
5794 gui.currSpColor = color; 5798 gui.currSpColor = color;
5795 } 5799 }
5796 5800
5797 #if defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME) 5801 #ifdef FEAT_MBYTE_IME
5798 /* 5802 /*
5799 * Multi-byte handling, originally by Sung-Hoon Baek. 5803 * Multi-byte handling, originally by Sung-Hoon Baek.
5800 * First static functions (no prototypes generated). 5804 * First static functions (no prototypes generated).
5801 */ 5805 */
5802 #ifdef _MSC_VER 5806 # ifdef _MSC_VER
5803 # include <ime.h> /* Apparently not needed for Cygwin, MingW or Borland. */ 5807 # include <ime.h> /* Apparently not needed for Cygwin, MingW or Borland. */
5804 #endif 5808 # endif
5805 #include <imm.h> 5809 # include <imm.h>
5806 5810
5807 /* 5811 /*
5808 * handle WM_IME_NOTIFY message 5812 * handle WM_IME_NOTIFY message
5809 */ 5813 */
5810 static LRESULT 5814 static LRESULT
5952 return convbuf; 5956 return convbuf;
5953 } 5957 }
5954 #endif 5958 #endif
5955 5959
5956 /* For global functions we need prototypes. */ 5960 /* For global functions we need prototypes. */
5957 #if (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) || defined(PROTO) 5961 #if defined(FEAT_MBYTE_IME) || defined(PROTO)
5958 5962
5959 /* 5963 /*
5960 * set font to IM. 5964 * set font to IM.
5961 */ 5965 */
5962 void 5966 void
6077 pImmReleaseContext(s_hwnd, hImc); 6081 pImmReleaseContext(s_hwnd, hImc);
6078 } 6082 }
6079 return status; 6083 return status;
6080 } 6084 }
6081 6085
6082 #endif /* FEAT_MBYTE && FEAT_MBYTE_IME */ 6086 #endif /* FEAT_MBYTE_IME */
6083 6087
6084 #if defined(FEAT_MBYTE) && !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME) 6088 #if defined(FEAT_MBYTE) && !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME)
6085 /* Win32 with GLOBAL IME */ 6089 /* Win32 with GLOBAL IME */
6086 6090
6087 /* 6091 /*