Mercurial > vim
comparison src/gui_haiku.cc @ 20231:993d820196b9 v8.2.0671
patch 8.2.0671: Haiku: compiler warnings
Commit: https://github.com/vim/vim/commit/9e175141f3437627c314257ebf894c29c71a9ded
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 30 22:51:01 2020 +0200
patch 8.2.0671: Haiku: compiler warnings
Problem: Haiku: compiler warnings.
Solution: Avoid the warnings. Drop display_errors() copy. (Emir Sari,
closes #6018)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 Apr 2020 23:00:05 +0200 |
parents | bac01efdf059 |
children | 8a694c9447d7 |
comparison
equal
deleted
inserted
replaced
20230:1885410aedb6 | 20231:993d820196b9 |
---|---|
549 struct VimTablineMenuMsg TablineMenu; | 549 struct VimTablineMenuMsg TablineMenu; |
550 } u; | 550 } u; |
551 }; | 551 }; |
552 | 552 |
553 #define RGB(r, g, b) ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0) | 553 #define RGB(r, g, b) ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0) |
554 #define GUI_TO_RGB(g) { (g) >> 16, (g) >> 8, (g) >> 0, 255 } | 554 #define GUI_TO_RGB(g) { (char_u)((g) >> 16), (char_u)((g) >> 8), (char_u)((g) >> 0), 255 } |
555 | 555 |
556 // ---------------- end of header part ---------------- | 556 // ---------------- end of header part ---------------- |
557 | 557 |
558 static struct specialkey | 558 static struct specialkey |
559 { | 559 { |
3988 gui.char_ascent = (int)(fh.ascent + 0.5) + p_linespace / 2; | 3988 gui.char_ascent = (int)(fh.ascent + 0.5) + p_linespace / 2; |
3989 } | 3989 } |
3990 return OK; | 3990 return OK; |
3991 } | 3991 } |
3992 | 3992 |
3993 /* | |
3994 * Display the saved error message(s). | |
3995 */ | |
3996 #ifdef USE_MCH_ERRMSG | |
3997 void | |
3998 display_errors(void) | |
3999 { | |
4000 char *p; | |
4001 char_u pError[256]; | |
4002 | |
4003 if (error_ga.ga_data == NULL) | |
4004 return; | |
4005 | |
4006 // avoid putting up a message box with blanks only | |
4007 for (p = (char *)error_ga.ga_data; *p; ++p) | |
4008 if (!isspace(*p)) | |
4009 { | |
4010 if (STRLEN(p) > 255) | |
4011 pError[0] = 255; | |
4012 else | |
4013 pError[0] = STRLEN(p); | |
4014 | |
4015 STRNCPY(&pError[1], p, pError[0]); | |
4016 // ParamText(pError, nil, nil, nil); | |
4017 // Alert(128, nil); | |
4018 break; | |
4019 // TODO: handled message longer than 256 chars | |
4020 // use auto-sizeable alert | |
4021 // or dialog with scrollbars (TextEdit zone) | |
4022 } | |
4023 ga_clear(&error_ga); | |
4024 } | |
4025 #endif | |
4026 | |
4027 void | 3993 void |
4028 gui_mch_getmouse(int *x, int *y) | 3994 gui_mch_getmouse(int *x, int *y) |
4029 { | 3995 { |
4030 fprintf(stderr, "gui_mch_getmouse"); | 3996 fprintf(stderr, "gui_mch_getmouse"); |
4031 | 3997 |