Mercurial > vim
comparison src/edit.c @ 15543:dd725a8ab112 v8.1.0779
patch 8.1.0779: argument for message functions is inconsistent
commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 19 17:43:09 2019 +0100
patch 8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Jan 2019 17:45:07 +0100 |
parents | 6d949e552e99 |
children | 43fa814a7977 |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
2385 ) | 2385 ) |
2386 : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL)) | 2386 : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL)) |
2387 { | 2387 { |
2388 ctrl_x_mode = CTRL_X_NORMAL; | 2388 ctrl_x_mode = CTRL_X_NORMAL; |
2389 edit_submode = NULL; | 2389 edit_submode = NULL; |
2390 msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty") | 2390 msg_attr(dict_opt ? _("'dictionary' option is empty") |
2391 : (char_u *)_("'thesaurus' option is empty"), | 2391 : _("'thesaurus' option is empty"), |
2392 HL_ATTR(HLF_E)); | 2392 HL_ATTR(HLF_E)); |
2393 if (emsg_silent == 0) | 2393 if (emsg_silent == 0) |
2394 { | 2394 { |
2395 vim_beep(BO_COMPL); | 2395 vim_beep(BO_COMPL); |
2396 setcursor(); | 2396 setcursor(); |
3383 fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */ | 3383 fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */ |
3384 if (flags != DICT_EXACT) | 3384 if (flags != DICT_EXACT) |
3385 { | 3385 { |
3386 vim_snprintf((char *)IObuff, IOSIZE, | 3386 vim_snprintf((char *)IObuff, IOSIZE, |
3387 _("Scanning dictionary: %s"), (char *)files[i]); | 3387 _("Scanning dictionary: %s"), (char *)files[i]); |
3388 (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); | 3388 (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); |
3389 } | 3389 } |
3390 | 3390 |
3391 if (fp != NULL) | 3391 if (fp != NULL) |
3392 { | 3392 { |
3393 /* | 3393 /* |
4498 ins_buf->b_fname == NULL | 4498 ins_buf->b_fname == NULL |
4499 ? buf_spname(ins_buf) | 4499 ? buf_spname(ins_buf) |
4500 : ins_buf->b_sfname == NULL | 4500 : ins_buf->b_sfname == NULL |
4501 ? ins_buf->b_fname | 4501 ? ins_buf->b_fname |
4502 : ins_buf->b_sfname); | 4502 : ins_buf->b_sfname); |
4503 (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); | 4503 (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); |
4504 } | 4504 } |
4505 else if (*e_cpt == NUL) | 4505 else if (*e_cpt == NUL) |
4506 break; | 4506 break; |
4507 else | 4507 else |
4508 { | 4508 { |
4528 #endif | 4528 #endif |
4529 else if (*e_cpt == ']' || *e_cpt == 't') | 4529 else if (*e_cpt == ']' || *e_cpt == 't') |
4530 { | 4530 { |
4531 type = CTRL_X_TAGS; | 4531 type = CTRL_X_TAGS; |
4532 vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags.")); | 4532 vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags.")); |
4533 (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); | 4533 (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); |
4534 } | 4534 } |
4535 else | 4535 else |
4536 type = -1; | 4536 type = -1; |
4537 | 4537 |
4538 /* in any case e_cpt is advanced to the next entry */ | 4538 /* in any case e_cpt is advanced to the next entry */ |
5130 MB_PTR_ADV(s); | 5130 MB_PTR_ADV(s); |
5131 } | 5131 } |
5132 } | 5132 } |
5133 vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead, | 5133 vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead, |
5134 s > compl_shown_match->cp_fname ? "<" : "", s); | 5134 s > compl_shown_match->cp_fname ? "<" : "", s); |
5135 msg(IObuff); | 5135 msg((char *)IObuff); |
5136 redraw_cmdline = FALSE; /* don't overwrite! */ | 5136 redraw_cmdline = FALSE; /* don't overwrite! */ |
5137 } | 5137 } |
5138 } | 5138 } |
5139 | 5139 |
5140 return num_matches; | 5140 return num_matches; |
5876 if (!shortmess(SHM_COMPLETIONMENU)) | 5876 if (!shortmess(SHM_COMPLETIONMENU)) |
5877 { | 5877 { |
5878 if (edit_submode_extra != NULL) | 5878 if (edit_submode_extra != NULL) |
5879 { | 5879 { |
5880 if (!p_smd) | 5880 if (!p_smd) |
5881 msg_attr(edit_submode_extra, | 5881 msg_attr((char *)edit_submode_extra, |
5882 edit_submode_highl < HLF_COUNT | 5882 edit_submode_highl < HLF_COUNT |
5883 ? HL_ATTR(edit_submode_highl) : 0); | 5883 ? HL_ATTR(edit_submode_highl) : 0); |
5884 } | 5884 } |
5885 else | 5885 else |
5886 msg_clr_cmdline(); // necessary for "noshowmode" | 5886 msg_clr_cmdline(); // necessary for "noshowmode" |
8854 * Otherwise remove the mode message. | 8854 * Otherwise remove the mode message. |
8855 */ | 8855 */ |
8856 if (reg_recording != 0 || restart_edit != NUL) | 8856 if (reg_recording != 0 || restart_edit != NUL) |
8857 showmode(); | 8857 showmode(); |
8858 else if (p_smd) | 8858 else if (p_smd) |
8859 MSG(""); | 8859 msg(""); |
8860 | 8860 |
8861 return TRUE; /* exit Insert mode */ | 8861 return TRUE; /* exit Insert mode */ |
8862 } | 8862 } |
8863 | 8863 |
8864 #ifdef FEAT_RIGHTLEFT | 8864 #ifdef FEAT_RIGHTLEFT |