To: vim_dev@googlegroups.com Subject: Patch 8.2.0671 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0671 Problem: Haiku: compiler warnings. Solution: Avoid the warnings. Drop display_errors() copy. (Emir Sari, closes #6018) Files: .gitignore, src/gui.c, src/gui_haiku.cc *** ../vim-8.2.0670/.gitignore 2020-01-05 22:10:27.787277609 +0100 --- .gitignore 2020-04-30 22:46:58.037950183 +0200 *************** *** 5,10 **** --- 5,11 ---- src/auto/if_perl.c src/auto/gui_gtk_gresources.c src/auto/gui_gtk_gresources.h + src/auto/os_haiku.rdef src/objects/.dirstamp src/objects src/tags *** ../vim-8.2.0670/src/gui.c 2020-04-20 19:42:06.594078510 +0200 --- src/gui.c 2020-04-30 22:50:14.037228880 +0200 *************** *** 5107,5113 **** # endif #endif ! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(PROTO) void display_errors(void) { --- 5107,5114 ---- # endif #endif ! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)|| defined(FEAT_GUI_HAIKU) \ ! || defined(PROTO) void display_errors(void) { *** ../vim-8.2.0670/src/gui_haiku.cc 2020-04-24 22:16:09.759981331 +0200 --- src/gui_haiku.cc 2020-04-30 22:46:58.037950183 +0200 *************** *** 551,557 **** }; #define RGB(r, g, b) ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0) ! #define GUI_TO_RGB(g) { (g) >> 16, (g) >> 8, (g) >> 0, 255 } // ---------------- end of header part ---------------- --- 551,557 ---- }; #define RGB(r, g, b) ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0) ! #define GUI_TO_RGB(g) { (char_u)((g) >> 16), (char_u)((g) >> 8), (char_u)((g) >> 0), 255 } // ---------------- end of header part ---------------- *************** *** 3990,4029 **** return OK; } - /* - * Display the saved error message(s). - */ - #ifdef USE_MCH_ERRMSG - void - display_errors(void) - { - char *p; - char_u pError[256]; - - if (error_ga.ga_data == NULL) - return; - - // avoid putting up a message box with blanks only - for (p = (char *)error_ga.ga_data; *p; ++p) - if (!isspace(*p)) - { - if (STRLEN(p) > 255) - pError[0] = 255; - else - pError[0] = STRLEN(p); - - STRNCPY(&pError[1], p, pError[0]); - // ParamText(pError, nil, nil, nil); - // Alert(128, nil); - break; - // TODO: handled message longer than 256 chars - // use auto-sizeable alert - // or dialog with scrollbars (TextEdit zone) - } - ga_clear(&error_ga); - } - #endif - void gui_mch_getmouse(int *x, int *y) { --- 3990,3995 ---- *** ../vim-8.2.0670/src/version.c 2020-04-30 22:29:36.630024126 +0200 --- src/version.c 2020-04-30 22:50:29.425172553 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 671, /**/ -- hundred-and-one symptoms of being an internet addict: 31. You code your homework in HTML and give your instructor the URL. /// 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 ///