Mercurial > vim
comparison src/term.c @ 29105:faf7fcd1c8d5 v8.2.5073
patch 8.2.5073: clang on MS-Windows produces warnings
Commit: https://github.com/vim/vim/commit/35d7a2fb13fc833aa1b654ca6fd6e429e72e6b49
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 9 20:53:54 2022 +0100
patch 8.2.5073: clang on MS-Windows produces warnings
Problem: Clang on MS-Windows produces warnings.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10546)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Jun 2022 22:00:07 +0200 |
parents | be6c32395444 |
children | 755ab148288b |
comparison
equal
deleted
inserted
replaced
29104:c58baa6d6dda | 29105:faf7fcd1c8d5 |
---|---|
48 # endif | 48 # endif |
49 #endif | 49 #endif |
50 | 50 |
51 #undef tgetstr | 51 #undef tgetstr |
52 | 52 |
53 /* | |
54 * Here are the builtin termcap entries. They are not stored as complete | |
55 * structures with all entries, as such a structure is too big. | |
56 * | |
57 * The entries are compact, therefore they normally are included even when | |
58 * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries | |
59 * can be accessed with "builtin_amiga", "builtin_ansi", "builtin_debug", etc. | |
60 * | |
61 * Each termcap is a list of builtin_term structures. It always starts with | |
62 * KS_NAME, which separates the entries. See parse_builtin_tcap() for all | |
63 * details. | |
64 * bt_entry is either a KS_xxx code (>= 0), or a K_xxx code. | |
65 * | |
66 * Entries marked with "guessed" may be wrong. | |
67 */ | |
68 struct builtin_term | 53 struct builtin_term |
69 { | 54 { |
70 int bt_entry; | 55 int bt_entry; |
71 char *bt_string; | 56 char *bt_string; |
72 }; | 57 }; |
219 | 204 |
220 // The blink flag from the blinking-cursor mode response | 205 // The blink flag from the blinking-cursor mode response |
221 static int initial_cursor_blink = FALSE; | 206 static int initial_cursor_blink = FALSE; |
222 #endif | 207 #endif |
223 | 208 |
209 /* | |
210 * Here are the builtin termcap entries. They are not stored as complete | |
211 * structures with all entries to save space. | |
212 * | |
213 * The entries are also included even when HAVE_TGETENT is defined, the systerm | |
214 * termcap may be incomplee. When HAVE_TGETENT is defined, the builtin entries | |
215 * can be accessed with "builtin_amiga", "builtin_ansi", "builtin_debug", etc. | |
216 * | |
217 * Each termcap is a list of builtin_term structures. It always starts with | |
218 * KS_NAME, which separates the entries. See parse_builtin_tcap() for all | |
219 * details. | |
220 * bt_entry is either a KS_xxx code (>= 0), or a K_xxx code. | |
221 * | |
222 * Entries marked with "guessed" may be wrong. | |
223 */ | |
224 static struct builtin_term builtin_termcaps[] = | 224 static struct builtin_term builtin_termcaps[] = |
225 { | 225 { |
226 | 226 |
227 #if defined(FEAT_GUI) | 227 #if defined(FEAT_GUI) |
228 /* | 228 /* |
6601 char buf[CMODE_LAST][KSSIZE]; // real buffer | 6601 char buf[CMODE_LAST][KSSIZE]; // real buffer |
6602 }; | 6602 }; |
6603 | 6603 |
6604 static struct ks_tbl_S ks_tbl[] = | 6604 static struct ks_tbl_S ks_tbl[] = |
6605 { | 6605 { |
6606 {(int)KS_ME, "\033|0m", "\033|0m"}, // normal | 6606 {(int)KS_ME, "\033|0m", "\033|0m", {""}}, // normal |
6607 {(int)KS_MR, "\033|7m", "\033|7m"}, // reverse | 6607 {(int)KS_MR, "\033|7m", "\033|7m", {""}}, // reverse |
6608 {(int)KS_MD, "\033|1m", "\033|1m"}, // bold | 6608 {(int)KS_MD, "\033|1m", "\033|1m", {""}}, // bold |
6609 {(int)KS_SO, "\033|91m", "\033|91m"}, // standout: bright red text | 6609 {(int)KS_SO, "\033|91m", "\033|91m", {""}}, // standout: bright red text |
6610 {(int)KS_SE, "\033|39m", "\033|39m"}, // standout end: default color | 6610 {(int)KS_SE, "\033|39m", "\033|39m", {""}}, // standout end: default color |
6611 {(int)KS_CZH, "\033|3m", "\033|3m"}, // italic | 6611 {(int)KS_CZH, "\033|3m", "\033|3m", {""}}, // italic |
6612 {(int)KS_CZR, "\033|0m", "\033|0m"}, // italic end | 6612 {(int)KS_CZR, "\033|0m", "\033|0m", {""}}, // italic end |
6613 {(int)KS_US, "\033|4m", "\033|4m"}, // underscore | 6613 {(int)KS_US, "\033|4m", "\033|4m", {""}}, // underscore |
6614 {(int)KS_UE, "\033|24m", "\033|24m"}, // underscore end | 6614 {(int)KS_UE, "\033|24m", "\033|24m", {""}}, // underscore end |
6615 # ifdef TERMINFO | 6615 # ifdef TERMINFO |
6616 {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, // set background color | 6616 {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm", {""}}, // set background color |
6617 {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, // set foreground color | 6617 {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm", {""}}, // set foreground color |
6618 {(int)KS_CS, "\033|%p1%d;%p2%dR", "\033|%p1%d;%p2%dR"}, | 6618 {(int)KS_CS, "\033|%p1%d;%p2%dR", "\033|%p1%d;%p2%dR", {""}}, |
6619 {(int)KS_CSV, "\033|%p1%d;%p2%dV", "\033|%p1%d;%p2%dV"}, | 6619 {(int)KS_CSV, "\033|%p1%d;%p2%dV", "\033|%p1%d;%p2%dV", {""}}, |
6620 # else | 6620 # else |
6621 {(int)KS_CAB, "\033|%db", "\033|4%dm"}, // set background color | 6621 {(int)KS_CAB, "\033|%db", "\033|4%dm", {""}}, // set background color |
6622 {(int)KS_CAF, "\033|%df", "\033|3%dm"}, // set foreground color | 6622 {(int)KS_CAF, "\033|%df", "\033|3%dm", {""}}, // set foreground color |
6623 {(int)KS_CS, "\033|%d;%dR", "\033|%d;%dR"}, | 6623 {(int)KS_CS, "\033|%d;%dR", "\033|%d;%dR", {""}}, |
6624 {(int)KS_CSV, "\033|%d;%dV", "\033|%d;%dV"}, | 6624 {(int)KS_CSV, "\033|%d;%dV", "\033|%d;%dV", {""}}, |
6625 # endif | 6625 # endif |
6626 {(int)KS_CCO, "256", "256"}, // colors | 6626 {(int)KS_CCO, "256", "256", {""}}, // colors |
6627 {(int)KS_NAME} // terminator | 6627 {(int)KS_NAME, NULL, NULL, {""}} // terminator |
6628 }; | 6628 }; |
6629 | 6629 |
6630 static struct builtin_term * | 6630 static struct builtin_term * |
6631 find_first_tcap( | 6631 find_first_tcap( |
6632 char_u *name, | 6632 char_u *name, |