To: vim-dev@vim.org Subject: Patch 6.1.403 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.403 (extra) Problem: MS-Windows 16 bit: compiler warnings. Solution: Add typecasts. (Walter Briscoe) Files: src/ex_cmds2.c, src/gui_w48.c, src/os_mswin.c, src/os_win16.c, src/syntax.c *** ../vim61.402/src/ex_cmds2.c Sat Mar 15 16:33:38 2003 --- src/ex_cmds2.c Wed Mar 12 20:11:24 2003 *************** *** 2632,2654 **** #ifdef FEAT_SYN_HL static const long_u cterm_color_8[8] = { ! (long_u)0x000000, (long_u)0xff0000, (long_u)0x00ff00, (long_u)0xffff00, ! (long_u)0x0000ff, (long_u)0xff00ff, (long_u)0x00ffff, (long_u)0xffffff }; static const long_u cterm_color_16[16] = { ! (long_u)0x000000, (long_u)0x0000c0, (long_u)0x008000, (long_u)0x004080, ! (long_u)0xc00000, (long_u)0xc000c0, (long_u)0x808000, (long_u)0xc0c0c0, ! (long_u)0x808080, (long_u)0x6060ff, (long_u)0x00ff00, (long_u)0x00ffff, ! (long_u)0xff8080, (long_u)0xff40ff, (long_u)0xffff00, (long_u)0xffffff }; static int current_syn_id; #endif #define COLOR_BLACK (long_u)0 ! #define COLOR_WHITE (long_u)0xFFFFFF static int curr_italic; static int curr_bold; --- 2634,2656 ---- #ifdef FEAT_SYN_HL static const long_u cterm_color_8[8] = { ! (long_u)0x000000L, (long_u)0xff0000L, (long_u)0x00ff00L, (long_u)0xffff00L, ! (long_u)0x0000ffL, (long_u)0xff00ffL, (long_u)0x00ffffL, (long_u)0xffffffL }; static const long_u cterm_color_16[16] = { ! (long_u)0x000000L, (long_u)0x0000c0L, (long_u)0x008000L, (long_u)0x004080L, ! (long_u)0xc00000L, (long_u)0xc000c0L, (long_u)0x808000L, (long_u)0xc0c0c0L, ! (long_u)0x808080L, (long_u)0x6060ffL, (long_u)0x00ff00L, (long_u)0x00ffffL, ! (long_u)0xff8080L, (long_u)0xff40ffL, (long_u)0xffff00L, (long_u)0xffffffL }; static int current_syn_id; #endif #define COLOR_BLACK (long_u)0 ! #define COLOR_WHITE (long_u)0xFFFFFFL static int curr_italic; static int curr_bold; *************** *** 2758,2764 **** char_u tbuf[20]; if (psettings->has_color) ! prt_set_fg((long_u)0x808080); else prt_set_fg(COLOR_BLACK); prt_set_bg(COLOR_WHITE); --- 2760,2766 ---- char_u tbuf[20]; if (psettings->has_color) ! prt_set_fg((long_u)0x808080L); else prt_set_fg(COLOR_BLACK); prt_set_bg(COLOR_WHITE); *************** *** 3008,3015 **** } /* Set colors and font to normal. */ ! curr_bg = (long_u)0xffffffff; ! curr_fg = (long_u)0xffffffff; curr_italic = MAYBE; curr_bold = MAYBE; curr_underline = MAYBE; --- 3010,3017 ---- } /* Set colors and font to normal. */ ! curr_bg = (long_u)0xffffffffL; ! curr_fg = (long_u)0xffffffffL; curr_italic = MAYBE; curr_bold = MAYBE; curr_underline = MAYBE; *** ../vim61.402/src/gui_w48.c Sun Jan 19 15:50:11 2003 --- src/gui_w48.c Wed Mar 12 09:32:09 2003 *************** *** 2595,2601 **** # ifdef WIN32 SetClassLong(s_textArea, GCL_HCURSOR, (LONG)LoadCursor(NULL, idc)); # else ! SetClassWord(s_textArea, GCW_HCURSOR, LoadCursor(NULL, idc)); # endif #endif if (!p_mh) --- 2595,2601 ---- # ifdef WIN32 SetClassLong(s_textArea, GCL_HCURSOR, (LONG)LoadCursor(NULL, idc)); # else ! SetClassWord(s_textArea, GCW_HCURSOR, (WORD)LoadCursor(NULL, idc)); # endif #endif if (!p_mh) *** ../vim61.402/src/os_mswin.c Sun Feb 23 17:47:25 2003 --- src/os_mswin.c Wed Mar 12 09:36:49 2003 *************** *** 1038,1044 **** if (IsClipboardFormatAvailable(cbd->format)) { VimClipType_t *meta_p; ! HANDLE *meta_h; /* We have metadata on the clipboard; try to get it. */ if ((meta_h = GetClipboardData(cbd->format)) != NULL --- 1038,1044 ---- if (IsClipboardFormatAvailable(cbd->format)) { VimClipType_t *meta_p; ! HGLOBAL meta_h; /* We have metadata on the clipboard; try to get it. */ if ((meta_h = GetClipboardData(cbd->format)) != NULL *** ../vim61.402/src/os_win16.c Sun Feb 16 22:28:48 2003 --- src/os_win16.c Wed Mar 12 09:37:37 2003 *************** *** 486,492 **** else { /* Wait for the command to terminate before continuing */ ! while (GetModuleUsage(h_module) > 0 && again ) { while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) && again ) { --- 486,492 ---- else { /* Wait for the command to terminate before continuing */ ! while (GetModuleUsage((HINSTANCE)h_module) > 0 && again ) { while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) && again ) { *** ../vim61.402/src/syntax.c Tue Mar 11 12:59:06 2003 --- src/syntax.c Wed Mar 12 09:37:59 2003 *************** *** 176,182 **** /* These don't fit in a short, thus can't be used for syntax items, only for * si_flags and bs_flags. */ #define HL_MATCHCONT 0x8000 /* match continued from previous line */ ! #define HL_TRANS_CONT 0x10000 /* transparent item without contains arg */ #define SYN_ITEMS(buf) ((synpat_T *)((buf)->b_syn_patterns.ga_data)) --- 176,182 ---- /* These don't fit in a short, thus can't be used for syntax items, only for * si_flags and bs_flags. */ #define HL_MATCHCONT 0x8000 /* match continued from previous line */ ! #define HL_TRANS_CONT 0x10000L /* transparent item without contains arg */ #define SYN_ITEMS(buf) ((synpat_T *)((buf)->b_syn_patterns.ga_data)) *** ../vim61.402/src/version.c Sat Mar 15 16:49:34 2003 --- src/version.c Sat Mar 15 16:52:58 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 403, /**/ -- From "know your smileys": ~#:-( I just washed my hair, and I can't do nuthin' with it. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///