comparison src/ex_docmd.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 41fbbcea0f1b
children d89c5b339c2a
comparison
equal deleted inserted replaced
15542:5baedae7ca7a 15543:dd725a8ab112
560 #ifdef FEAT_GUI 560 #ifdef FEAT_GUI
561 /* Ignore scrollbar and mouse events in Ex mode */ 561 /* Ignore scrollbar and mouse events in Ex mode */
562 ++hold_gui_events; 562 ++hold_gui_events;
563 #endif 563 #endif
564 564
565 MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode.")); 565 msg(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
566 while (exmode_active) 566 while (exmode_active)
567 { 567 {
568 /* Check for a ":normal" command and no more characters left. */ 568 /* Check for a ":normal" command and no more characters left. */
569 if (ex_normal_busy > 0 && typebuf.tb_len == 0) 569 if (ex_normal_busy > 0 && typebuf.tb_len == 0)
570 { 570 {
1017 verbose_enter_scroll(); 1017 verbose_enter_scroll();
1018 1018
1019 smsg(_("line %ld: %s"), 1019 smsg(_("line %ld: %s"),
1020 (long)sourcing_lnum, cmdline_copy); 1020 (long)sourcing_lnum, cmdline_copy);
1021 if (msg_silent == 0) 1021 if (msg_silent == 0)
1022 msg_puts((char_u *)"\n"); /* don't overwrite this */ 1022 msg_puts("\n"); /* don't overwrite this */
1023 1023
1024 verbose_leave_scroll(); 1024 verbose_leave_scroll();
1025 --no_wait_return; 1025 --no_wait_return;
1026 } 1026 }
1027 1027
6041 || message_filtered(cmd->uc_name)) 6041 || message_filtered(cmd->uc_name))
6042 continue; 6042 continue;
6043 6043
6044 /* Put out the title first time */ 6044 /* Put out the title first time */
6045 if (!found) 6045 if (!found)
6046 MSG_PUTS_TITLE(_("\n Name Args Address Complete Definition")); 6046 msg_puts_title(_("\n Name Args Address Complete Definition"));
6047 found = TRUE; 6047 found = TRUE;
6048 msg_putchar('\n'); 6048 msg_putchar('\n');
6049 if (got_int) 6049 if (got_int)
6050 break; 6050 break;
6051 6051
6148 break; 6148 break;
6149 gap = &ucmds; 6149 gap = &ucmds;
6150 } 6150 }
6151 6151
6152 if (!found) 6152 if (!found)
6153 MSG(_("No user-defined commands found")); 6153 msg(_("No user-defined commands found"));
6154 } 6154 }
6155 6155
6156 static char * 6156 static char *
6157 uc_fun_cmd(void) 6157 uc_fun_cmd(void)
6158 { 6158 {
7237 --emsg_off; 7237 --emsg_off;
7238 vim_free(expr); 7238 vim_free(expr);
7239 } 7239 }
7240 if (p != NULL) 7240 if (p != NULL)
7241 { 7241 {
7242 MSG(p); 7242 msg((char *)p);
7243 vim_free(p); 7243 vim_free(p);
7244 } 7244 }
7245 else 7245 else
7246 MSG("default"); 7246 msg("default");
7247 #else 7247 #else
7248 MSG(_("unknown")); 7248 msg(_("unknown"));
7249 #endif 7249 #endif
7250 } 7250 }
7251 else if (load_colors(eap->arg) == FAIL) 7251 else if (load_colors(eap->arg) == FAIL)
7252 semsg(_("E185: Cannot find color scheme '%s'"), eap->arg); 7252 semsg(_("E185: Cannot find color scheme '%s'"), eap->arg);
7253 } 7253 }
7254 7254
7255 static void 7255 static void
7256 ex_highlight(exarg_T *eap) 7256 ex_highlight(exarg_T *eap)
7257 { 7257 {
7258 if (*eap->arg == NUL && eap->cmd[2] == '!') 7258 if (*eap->arg == NUL && eap->cmd[2] == '!')
7259 MSG(_("Greetings, Vim user!")); 7259 msg(_("Greetings, Vim user!"));
7260 do_highlight(eap->arg, eap->forceit, FALSE); 7260 do_highlight(eap->arg, eap->forceit, FALSE);
7261 } 7261 }
7262 7262
7263 7263
7264 /* 7264 /*
7670 if (cmdwin_type != 0) 7670 if (cmdwin_type != 0)
7671 cmdwin_result = K_IGNORE; 7671 cmdwin_result = K_IGNORE;
7672 else 7672 else
7673 # endif 7673 # endif
7674 if (first_tabpage->tp_next == NULL) 7674 if (first_tabpage->tp_next == NULL)
7675 MSG(_("Already only one tab page")); 7675 msg(_("Already only one tab page"));
7676 else 7676 else
7677 { 7677 {
7678 tab_number = get_tabpage_arg(eap); 7678 tab_number = get_tabpage_arg(eap);
7679 if (eap->errmsg == NULL) 7679 if (eap->errmsg == NULL)
7680 { 7680 {
8919 8919
8920 static void 8920 static void
8921 ex_swapname(exarg_T *eap UNUSED) 8921 ex_swapname(exarg_T *eap UNUSED)
8922 { 8922 {
8923 if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL) 8923 if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
8924 MSG(_("No swap file")); 8924 msg(_("No swap file"));
8925 else 8925 else
8926 msg(curbuf->b_ml.ml_mfp->mf_fname); 8926 msg((char *)curbuf->b_ml.ml_mfp->mf_fname);
8927 } 8927 }
8928 8928
8929 /* 8929 /*
8930 * ":syncbind" forces all 'scrollbind' windows to have the same relative 8930 * ":syncbind" forces all 'scrollbind' windows to have the same relative
8931 * offset. 8931 * offset.
9219 if (mch_dirname(NameBuff, MAXPATHL) == OK) 9219 if (mch_dirname(NameBuff, MAXPATHL) == OK)
9220 { 9220 {
9221 #ifdef BACKSLASH_IN_FILENAME 9221 #ifdef BACKSLASH_IN_FILENAME
9222 slash_adjust(NameBuff); 9222 slash_adjust(NameBuff);
9223 #endif 9223 #endif
9224 msg(NameBuff); 9224 msg((char *)NameBuff);
9225 } 9225 }
9226 else 9226 else
9227 emsg(_("E187: Unknown")); 9227 emsg(_("E187: Unknown"));
9228 } 9228 }
9229 9229
9400 # else 9400 # else
9401 if (mch_get_winpos(&x, &y) != FAIL) 9401 if (mch_get_winpos(&x, &y) != FAIL)
9402 # endif 9402 # endif
9403 { 9403 {
9404 sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y); 9404 sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
9405 msg(IObuff); 9405 msg((char *)IObuff);
9406 } 9406 }
9407 else 9407 else
9408 # endif 9408 # endif
9409 emsg(_("E188: Obtaining window position not implemented for this platform")); 9409 emsg(_("E188: Obtaining window position not implemented for this platform"));
9410 } 9410 }