Mercurial > vim
comparison src/screen.c @ 8977:b3da1ec8d156 v7.4.1774
commit https://github.com/vim/vim/commit/902647d2dfb42dce8449dfbbc22dab27a528744d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 22 11:49:06 2016 +0200
patch 7.4.1774
Problem: Cterm true color feature has warnings.
Solution: Add type casts.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 22 Apr 2016 12:00:07 +0200 |
parents | c83e2c1e7f2b |
children | 773d627cac0b |
comparison
equal
deleted
inserted
replaced
8976:7cbde3a1c69b | 8977:b3da1ec8d156 |
---|---|
7840 if ((attr & HL_BOLD) && T_MD != NULL) /* bold */ | 7840 if ((attr & HL_BOLD) && T_MD != NULL) /* bold */ |
7841 out_str(T_MD); | 7841 out_str(T_MD); |
7842 else if (aep != NULL && cterm_normal_fg_bold && | 7842 else if (aep != NULL && cterm_normal_fg_bold && |
7843 #ifdef FEAT_TERMTRUECOLOR | 7843 #ifdef FEAT_TERMTRUECOLOR |
7844 (p_guicolors ? | 7844 (p_guicolors ? |
7845 (aep->ae_u.cterm.fg_rgb != INVALCOLOR): | 7845 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR): |
7846 #endif | 7846 #endif |
7847 (t_colors > 1 && aep->ae_u.cterm.fg_color) | 7847 (t_colors > 1 && aep->ae_u.cterm.fg_color) |
7848 #ifdef FEAT_TERMTRUECOLOR | 7848 #ifdef FEAT_TERMTRUECOLOR |
7849 ) | 7849 ) |
7850 #endif | 7850 #endif |
7869 if (aep != NULL) | 7869 if (aep != NULL) |
7870 { | 7870 { |
7871 #ifdef FEAT_TERMTRUECOLOR | 7871 #ifdef FEAT_TERMTRUECOLOR |
7872 if (p_guicolors) | 7872 if (p_guicolors) |
7873 { | 7873 { |
7874 if (aep->ae_u.cterm.fg_rgb != INVALCOLOR) | 7874 if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR) |
7875 term_fg_rgb_color(aep->ae_u.cterm.fg_rgb); | 7875 term_fg_rgb_color(aep->ae_u.cterm.fg_rgb); |
7876 if (aep->ae_u.cterm.bg_rgb != INVALCOLOR) | 7876 if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR) |
7877 term_bg_rgb_color(aep->ae_u.cterm.bg_rgb); | 7877 term_bg_rgb_color(aep->ae_u.cterm.bg_rgb); |
7878 } | 7878 } |
7879 else | 7879 else |
7880 #endif | 7880 #endif |
7881 { | 7881 { |
7931 */ | 7931 */ |
7932 aep = syn_cterm_attr2entry(screen_attr); | 7932 aep = syn_cterm_attr2entry(screen_attr); |
7933 if (aep != NULL && | 7933 if (aep != NULL && |
7934 #ifdef FEAT_TERMTRUECOLOR | 7934 #ifdef FEAT_TERMTRUECOLOR |
7935 (p_guicolors ? | 7935 (p_guicolors ? |
7936 (aep->ae_u.cterm.fg_rgb != INVALCOLOR || | 7936 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR || |
7937 aep->ae_u.cterm.bg_rgb != INVALCOLOR): | 7937 aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR): |
7938 #endif | 7938 #endif |
7939 (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color) | 7939 (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color) |
7940 #ifdef FEAT_TERMTRUECOLOR | 7940 #ifdef FEAT_TERMTRUECOLOR |
7941 ) | 7941 ) |
7942 #endif | 7942 #endif |
7989 out_str(T_ME); | 7989 out_str(T_ME); |
7990 | 7990 |
7991 #ifdef FEAT_TERMTRUECOLOR | 7991 #ifdef FEAT_TERMTRUECOLOR |
7992 if (p_guicolors) | 7992 if (p_guicolors) |
7993 { | 7993 { |
7994 if (cterm_normal_fg_gui_color != INVALCOLOR) | 7994 if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR) |
7995 term_fg_rgb_color(cterm_normal_fg_gui_color); | 7995 term_fg_rgb_color(cterm_normal_fg_gui_color); |
7996 if (cterm_normal_bg_gui_color != INVALCOLOR) | 7996 if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR) |
7997 term_bg_rgb_color(cterm_normal_bg_gui_color); | 7997 term_bg_rgb_color(cterm_normal_bg_gui_color); |
7998 } | 7998 } |
7999 else | 7999 else |
8000 #endif | 8000 #endif |
8001 { | 8001 { |
8025 if (IS_CTERM) | 8025 if (IS_CTERM) |
8026 { | 8026 { |
8027 /* set Normal cterm colors */ | 8027 /* set Normal cterm colors */ |
8028 #ifdef FEAT_TERMTRUECOLOR | 8028 #ifdef FEAT_TERMTRUECOLOR |
8029 if (p_guicolors ? | 8029 if (p_guicolors ? |
8030 (cterm_normal_fg_gui_color != INVALCOLOR | 8030 (cterm_normal_fg_gui_color != (long_u)INVALCOLOR |
8031 || cterm_normal_bg_gui_color != INVALCOLOR): | 8031 || cterm_normal_bg_gui_color != (long_u)INVALCOLOR): |
8032 (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)) | 8032 (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)) |
8033 #else | 8033 #else |
8034 if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) | 8034 if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) |
8035 #endif | 8035 #endif |
8036 { | 8036 { |
8958 return (*p != NUL && (t_colors <= 1 | 8958 return (*p != NUL && (t_colors <= 1 |
8959 #ifdef FEAT_GUI | 8959 #ifdef FEAT_GUI |
8960 || gui.in_use | 8960 || gui.in_use |
8961 #endif | 8961 #endif |
8962 #ifdef FEAT_TERMTRUECOLOR | 8962 #ifdef FEAT_TERMTRUECOLOR |
8963 || (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR) | 8963 || (p_guicolors && cterm_normal_bg_gui_color != (long_u)INVALCOLOR) |
8964 #endif | 8964 #endif |
8965 || cterm_normal_bg_color == 0 || *T_UT != NUL)); | 8965 || cterm_normal_bg_color == 0 || *T_UT != NUL)); |
8966 } | 8966 } |
8967 | 8967 |
8968 /* | 8968 /* |