Mercurial > vim
diff src/if_cscope.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 | 98c35d312987 |
children | 7fad90423bd2 |
line wrap: on
line diff
--- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -212,7 +212,7 @@ do_cscope_general( { if (!cmdp->cansplit) { - (void)MSG_PUTS(_("This cscope command does not support splitting the window.\n")); + (void)msg_puts(_("This cscope command does not support splitting the window.\n")); return; } postponed_split = -1; @@ -1280,7 +1280,7 @@ cs_help(exarg_T *eap UNUSED) { cscmd_T *cmdp = cs_cmds; - (void)MSG_PUTS(_("cscope commands:\n")); + (void)msg_puts(_("cscope commands:\n")); while (cmdp->name != NULL) { char *help = _(cmdp->help); @@ -1294,7 +1294,7 @@ cs_help(exarg_T *eap UNUSED) help, space_cnt, " ", cmdp->usage); if (strcmp(cmdp->name, "find") == 0) - MSG_PUTS(_("\n" + msg_puts(_("\n" " a: Find assignments to this symbol\n" " c: Find functions calling this function\n" " d: Find functions called by this function\n" @@ -1992,14 +1992,14 @@ cs_print_tags_priv(char **matches, char { bufsize = newsize; (void)sprintf(buf, cstag_msg, ptag); - MSG_PUTS_ATTR(buf, HL_ATTR(HLF_T)); + msg_puts_attr(buf, HL_ATTR(HLF_T)); } vim_free(tbuf); - MSG_PUTS_ATTR(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */ + msg_puts_attr(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */ msg_advance(msg_col + 2); - MSG_PUTS_ATTR(_("filename / context / line\n"), HL_ATTR(HLF_T)); + msg_puts_attr(_("filename / context / line\n"), HL_ATTR(HLF_T)); num = 1; for (i = 0; i < num_matches; i++) @@ -2043,9 +2043,10 @@ cs_print_tags_priv(char **matches, char { /* csfmt_str = "%4d %6s "; */ (void)sprintf(buf, csfmt_str, num, lno); - MSG_PUTS_ATTR(buf, HL_ATTR(HLF_CM)); + msg_puts_attr(buf, HL_ATTR(HLF_CM)); } - MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), HL_ATTR(HLF_CM)); + msg_outtrans_long_attr((char_u *)cs_pathcomponents(fname), + HL_ATTR(HLF_CM)); /* compute the required space for the context */ if (cntxts[idx] != NULL) @@ -2074,13 +2075,13 @@ cs_print_tags_priv(char **matches, char if (msg_col + (int)strlen(buf) >= (int)Columns) msg_putchar('\n'); msg_advance(12); - MSG_PUTS_LONG(buf); + msg_outtrans_long_attr((char_u *)buf, 0); msg_putchar('\n'); } if (extra != NULL) { msg_advance(13); - MSG_PUTS_LONG(extra); + msg_outtrans_long_attr((char_u *)extra, 0); } vim_free(tbuf); /* only after printing extra due to strtok use */ @@ -2371,7 +2372,7 @@ cs_reset(exarg_T *eap UNUSED) * "Added cscope database..." */ sprintf(buf, " (#%d)", i); - MSG_PUTS_ATTR(buf, HL_ATTR(HLF_R)); + msg_puts_attr(buf, HL_ATTR(HLF_R)); } } vim_free(dblist[i]); @@ -2383,7 +2384,7 @@ cs_reset(exarg_T *eap UNUSED) vim_free(fllist); if (p_csverbose) - MSG_ATTR(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST); + msg_attr(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST); return CSCOPE_SUCCESS; } /* cs_reset */ @@ -2464,10 +2465,10 @@ cs_show(exarg_T *eap UNUSED) { short i; if (cs_cnt_connections() == 0) - MSG_PUTS(_("no cscope connections\n")); + msg_puts(_("no cscope connections\n")); else { - MSG_PUTS_ATTR( + msg_puts_attr( _(" # pid database name prepend path\n"), HL_ATTR(HLF_T)); for (i = 0; i < csinfo_size; i++)