@@ -1131,7 +1131,7 @@ _WndProc(
11311131
11321132 if (STRLEN (str ) < sizeof (lpdi -> szText )
11331133 || ((tt_text = vim_strsave (str )) == NULL ))
1134- vim_strncpy (lpdi -> szText , str ,
1134+ vim_strncpy (( char_u * ) lpdi -> szText , str ,
11351135 sizeof (lpdi -> szText ) - 1 );
11361136 else
11371137 lpdi -> lpszText = tt_text ;
@@ -1747,9 +1747,9 @@ gui_mch_init(void)
17471747
17481748 /* Initialise the struct */
17491749 s_findrep_struct .lStructSize = sizeof (s_findrep_struct );
1750- s_findrep_struct .lpstrFindWhat = alloc (MSWIN_FR_BUFSIZE );
1750+ s_findrep_struct .lpstrFindWhat = ( LPSTR ) alloc (MSWIN_FR_BUFSIZE );
17511751 s_findrep_struct .lpstrFindWhat [0 ] = NUL ;
1752- s_findrep_struct .lpstrReplaceWith = alloc (MSWIN_FR_BUFSIZE );
1752+ s_findrep_struct .lpstrReplaceWith = ( LPSTR ) alloc (MSWIN_FR_BUFSIZE );
17531753 s_findrep_struct .lpstrReplaceWith [0 ] = NUL ;
17541754 s_findrep_struct .wFindWhatLen = MSWIN_FR_BUFSIZE ;
17551755 s_findrep_struct .wReplaceWithLen = MSWIN_FR_BUFSIZE ;
@@ -2099,7 +2099,7 @@ GetCompositionString_inUCS2(HIMC hIMC, DWORD GCS, int *lenp)
20992099 pImmGetCompositionStringA (hIMC , GCS , buf , ret );
21002100
21012101 /* convert from codepage to UCS-2 */
2102- MultiByteToWideChar_alloc (GetACP (), 0 , buf , ret , & wbuf , lenp );
2102+ MultiByteToWideChar_alloc (GetACP (), 0 , ( LPCSTR ) buf , ret , & wbuf , lenp );
21032103 vim_free (buf );
21042104
21052105 return (short_u * )wbuf ;
@@ -3028,7 +3028,7 @@ rebuild_tearoff(vimmenu_T *menu)
30283028
30293029 HWND thwnd = menu -> tearoff_handle ;
30303030
3031- GetWindowText (thwnd , tbuf , 127 );
3031+ GetWindowText (thwnd , ( LPSTR ) tbuf , 127 );
30323032 if (GetWindowRect (thwnd , & trect )
30333033 && GetWindowRect (s_hwnd , & rct )
30343034 && GetClientRect (s_hwnd , & roct ))
@@ -3174,7 +3174,7 @@ dialog_callback(
31743174 else
31753175# endif
31763176 GetDlgItemText (hwnd , DLG_NONBUTTON_CONTROL + 2 ,
3177- s_textfield , IOSIZE );
3177+ ( LPSTR ) s_textfield , IOSIZE );
31783178 }
31793179
31803180 /*
@@ -3216,7 +3216,7 @@ dialog_callback(
32163216 * If stubbing out this fn, return 1.
32173217 */
32183218
3219- static const char_u * dlg_icons [] = /* must match names in resource file */
3219+ static const char * dlg_icons [] = /* must match names in resource file */
32203220{
32213221 "IDR_VIM" ,
32223222 "IDR_VIM_ERROR" ,
@@ -3353,7 +3353,7 @@ gui_mch_dialog(
33533353 fontHeight = fontInfo .tmHeight ;
33543354
33553355 /* Minimum width for horizontal button */
3356- minButtonWidth = GetTextWidth (hdc , "Cancel" , 6 );
3356+ minButtonWidth = GetTextWidth (hdc , ( char_u * ) "Cancel" , 6 );
33573357
33583358 /* Maximum width of a dialog, if possible */
33593359 if (s_hwnd == NULL )
@@ -3617,7 +3617,7 @@ gui_mch_dialog(
36173617 + 2 * fontHeight * i ),
36183618 PixelToDialogX (dlgwidth - 2 * DLG_VERT_PADDING_X ),
36193619 (WORD )(PixelToDialogY (2 * fontHeight ) - 1 ),
3620- (WORD )(IDCANCEL + 1 + i ), (WORD )0x0080 , pstart );
3620+ (WORD )(IDCANCEL + 1 + i ), (WORD )0x0080 , ( char * ) pstart );
36213621 }
36223622 else
36233623 {
@@ -3628,7 +3628,7 @@ gui_mch_dialog(
36283628 PixelToDialogY (buttonYpos ), /* TBK */
36293629 PixelToDialogX (buttonWidths [i ]),
36303630 (WORD )(PixelToDialogY (2 * fontHeight ) - 1 ),
3631- (WORD )(IDCANCEL + 1 + i ), (WORD )0x0080 , pstart );
3631+ (WORD )(IDCANCEL + 1 + i ), (WORD )0x0080 , ( char * ) pstart );
36323632 }
36333633 pstart = pend + 1 ; /*next button*/
36343634 }
@@ -3649,7 +3649,7 @@ gui_mch_dialog(
36493649 PixelToDialogY (dlgPaddingY ),
36503650 (WORD )(PixelToDialogX (messageWidth ) + 1 ),
36513651 PixelToDialogY (msgheight ),
3652- DLG_NONBUTTON_CONTROL + 1 , (WORD )0x0081 , message );
3652+ DLG_NONBUTTON_CONTROL + 1 , (WORD )0x0081 , ( char * ) message );
36533653
36543654 /* Edit box */
36553655 if (textfield != NULL )
@@ -3659,7 +3659,7 @@ gui_mch_dialog(
36593659 PixelToDialogY (2 * dlgPaddingY + msgheight ),
36603660 PixelToDialogX (dlgwidth - 4 * dlgPaddingX ),
36613661 PixelToDialogY (fontHeight + dlgPaddingY ),
3662- DLG_NONBUTTON_CONTROL + 2 , (WORD )0x0081 , textfield );
3662+ DLG_NONBUTTON_CONTROL + 2 , (WORD )0x0081 , ( char * ) textfield );
36633663 * pnumitems += 1 ;
36643664 }
36653665
@@ -3798,7 +3798,7 @@ nCopyAnsiToWideChar(
37983798 if (enc_codepage == 0 && (int )GetACP () != enc_codepage )
37993799 {
38003800 /* Not a codepage, use our own conversion function. */
3801- wn = enc_to_utf16 (lpAnsiIn , NULL );
3801+ wn = enc_to_utf16 (( char_u * ) lpAnsiIn , NULL );
38023802 if (wn != NULL )
38033803 {
38043804 wcscpy (lpWCStr , wn );
@@ -4043,7 +4043,7 @@ gui_mch_tearoff(
40434043
40444044 /* Calculate width of a single space. Used for padding columns to the
40454045 * right width. */
4046- spaceWidth = GetTextWidth (hdc , " " , 1 );
4046+ spaceWidth = GetTextWidth (hdc , ( char_u * ) " " , 1 );
40474047
40484048 /* Figure out max width of the text column, the accelerator column and the
40494049 * optional submenu column. */
@@ -4086,7 +4086,7 @@ gui_mch_tearoff(
40864086 textWidth = columnWidths [0 ] + columnWidths [1 ];
40874087 if (submenuWidth != 0 )
40884088 {
4089- submenuWidth = GetTextWidth (hdc , TEAROFF_SUBMENU_LABEL ,
4089+ submenuWidth = GetTextWidth (hdc , ( char_u * ) TEAROFF_SUBMENU_LABEL ,
40904090 (int )STRLEN (TEAROFF_SUBMENU_LABEL ));
40914091 textWidth += submenuWidth ;
40924092 }
@@ -4262,7 +4262,7 @@ gui_mch_tearoff(
42624262 (WORD )(sepPadding + 1 + 13 * (* pnumitems )),
42634263 (WORD )PixelToDialogX (dlgwidth - 2 * TEAROFF_PADDING_X ),
42644264 (WORD )12 ,
4265- menuID , (WORD )0x0080 , label );
4265+ menuID , (WORD )0x0080 , ( char * ) label );
42664266 vim_free (label );
42674267 (* pnumitems )++ ;
42684268 }
@@ -4360,7 +4360,7 @@ get_toolbar_bitmap(vimmenu_T *menu)
43604360 gui_find_iconfile (menu -> iconfile , fname , "bmp" );
43614361 hbitmap = LoadImage (
43624362 NULL ,
4363- fname ,
4363+ ( LPCSTR ) fname ,
43644364 IMAGE_BITMAP ,
43654365 TOOLBAR_BUTTON_WIDTH ,
43664366 TOOLBAR_BUTTON_HEIGHT ,
@@ -4381,7 +4381,7 @@ get_toolbar_bitmap(vimmenu_T *menu)
43814381 menu -> dname , fname , "bmp" ) == OK ))
43824382 hbitmap = LoadImage (
43834383 NULL ,
4384- fname ,
4384+ ( LPCSTR ) fname ,
43854385 IMAGE_BITMAP ,
43864386 TOOLBAR_BUTTON_WIDTH ,
43874387 TOOLBAR_BUTTON_HEIGHT ,
@@ -4629,14 +4629,15 @@ gui_mch_register_sign(char_u *signfile)
46294629 do_load = 0 ;
46304630
46314631 if (do_load )
4632- sign .hImage = (HANDLE )LoadImage (NULL , signfile , sign .uType ,
4632+ sign .hImage = (HANDLE )LoadImage (NULL , ( LPCSTR ) signfile , sign .uType ,
46334633 gui .char_width * 2 , gui .char_height ,
46344634 LR_LOADFROMFILE | LR_CREATEDIBSECTION );
46354635#ifdef FEAT_XPM_W32
46364636 if (!STRICMP (ext , ".xpm" ))
46374637 {
46384638 sign .uType = IMAGE_XPM ;
4639- LoadXpmImage (signfile , (HBITMAP * )& sign .hImage , (HBITMAP * )& sign .hShape );
4639+ LoadXpmImage ((char * )signfile , (HBITMAP * )& sign .hImage ,
4640+ (HBITMAP * )& sign .hShape );
46404641 }
46414642#endif
46424643 }
@@ -4740,13 +4741,13 @@ multiline_balloon_available(void)
47404741 UINT vlen = 0 ;
47414742 void * data = alloc (len );
47424743
4743- if (data != NULL
4744+ if (( data != NULL
47444745 && GetFileVersionInfo (comctl_dll , 0 , len , data )
47454746 && VerQueryValue (data , "\\" , (void * * )& ver , & vlen )
47464747 && vlen
4747- && HIWORD (ver -> dwFileVersionMS ) > 4
4748- || (HIWORD (ver -> dwFileVersionMS ) == 4
4749- && LOWORD (ver -> dwFileVersionMS ) >= 70 ))
4748+ && HIWORD (ver -> dwFileVersionMS ) > 4 )
4749+ || (( HIWORD (ver -> dwFileVersionMS ) == 4
4750+ && LOWORD (ver -> dwFileVersionMS ) >= 70 )))
47504751 {
47514752 vim_free (data );
47524753 multiline_tip = TRUE;
@@ -4908,7 +4909,7 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
49084909 {
49094910 gui_mch_disable_beval_area (cur_beval );
49104911 beval -> showState = ShS_SHOWING ;
4911- make_tooltip (beval , mesg , pt );
4912+ make_tooltip (beval , ( char * ) mesg , pt );
49124913 }
49134914 // TRACE0("gui_mch_post_balloon }}}");
49144915}
0 commit comments