summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c31
-rw-r--r--src/crypt.c4
-rw-r--r--src/edit.c16
-rw-r--r--src/eval.c49
-rw-r--r--src/evalfunc.c4
-rw-r--r--src/ex_cmds.c28
-rw-r--r--src/ex_cmds2.c14
-rw-r--r--src/ex_docmd.c26
-rw-r--r--src/ex_eval.c8
-rw-r--r--src/ex_getln.c20
-rw-r--r--src/farsi.c8
-rw-r--r--src/farsi.h6
-rw-r--r--src/fileio.c47
-rw-r--r--src/getchar.c14
-rw-r--r--src/globals.h2
-rw-r--r--src/gui.c4
-rw-r--r--src/gui_w32.c2
-rw-r--r--src/hardcopy.c2
-rw-r--r--src/if_cscope.c29
-rw-r--r--src/if_mzsch.c4
-rw-r--r--src/if_perl.xs4
-rw-r--r--src/if_py_both.h8
-rw-r--r--src/if_ruby.c10
-rw-r--r--src/if_tcl.c4
-rw-r--r--src/mark.c12
-rw-r--r--src/mbyte.c4
-rw-r--r--src/memline.c138
-rw-r--r--src/menu.c14
-rw-r--r--src/message.c149
-rw-r--r--src/misc1.c19
-rw-r--r--src/misc2.c12
-rw-r--r--src/netbeans.c4
-rw-r--r--src/normal.c14
-rw-r--r--src/ops.c30
-rw-r--r--src/option.c18
-rw-r--r--src/os_amiga.c12
-rw-r--r--src/os_unix.c52
-rw-r--r--src/os_win32.c6
-rw-r--r--src/proto/eval.pro2
-rw-r--r--src/proto/message.pro33
-rw-r--r--src/quickfix.c20
-rw-r--r--src/regexp.c4
-rw-r--r--src/screen.c55
-rw-r--r--src/search.c30
-rw-r--r--src/sign.c26
-rw-r--r--src/spell.c18
-rw-r--r--src/spellfile.c26
-rw-r--r--src/syntax.c134
-rw-r--r--src/tag.c24
-rw-r--r--src/term.c8
-rw-r--r--src/ui.c4
-rw-r--r--src/undo.c16
-rw-r--r--src/userfunc.c44
-rw-r--r--src/version.c94
-rw-r--r--src/vim.h7
-rw-r--r--src/window.c4
56 files changed, 679 insertions, 698 deletions
diff --git a/src/buffer.c b/src/buffer.c
index c22773f7a..18e08ad18 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1083,7 +1083,7 @@ handle_swap_exists(bufref_T *old_curbuf)
/* User selected Recover at ATTENTION prompt. */
msg_scroll = TRUE;
ml_recover();
- MSG_PUTS("\n"); /* don't overwrite the last message */
+ msg_puts("\n"); /* don't overwrite the last message */
cmdline_row = msg_row;
do_modelines(0);
@@ -3449,17 +3449,17 @@ fileinfo(
{
char_u *name;
int n;
- char_u *p;
- char_u *buffer;
+ char *p;
+ char *buffer;
size_t len;
- buffer = alloc(IOSIZE);
+ buffer = (char *)alloc(IOSIZE);
if (buffer == NULL)
return;
if (fullname > 1) /* 2 CTRL-G: include buffer number */
{
- vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
+ vim_snprintf(buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
p = buffer + STRLEN(buffer);
}
else
@@ -3467,18 +3467,18 @@ fileinfo(
*p++ = '"';
if (buf_spname(curbuf) != NULL)
- vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
+ vim_strncpy((char_u *)p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
else
{
if (!fullname && curbuf->b_fname != NULL)
name = curbuf->b_fname;
else
name = curbuf->b_ffname;
- home_replace(shorthelp ? curbuf : NULL, name, p,
+ home_replace(shorthelp ? curbuf : NULL, name, (char_u *)p,
(int)(IOSIZE - (p - buffer)), TRUE);
}
- vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s",
+ vim_snprintf_add(buffer, IOSIZE, "\"%s%s%s%s%s%s",
curbufIsChanged() ? (shortmess(SHM_MOD)
? " [+]" : _(" [Modified]")) : " ",
(curbuf->b_flags & BF_NOTEDITED)
@@ -3506,29 +3506,30 @@ fileinfo(
n = (int)(((long)curwin->w_cursor.lnum * 100L) /
(long)curbuf->b_ml.ml_line_count);
if (curbuf->b_ml.ml_flags & ML_EMPTY)
- vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
+ vim_snprintf_add(buffer, IOSIZE, "%s", _(no_lines_msg));
#ifdef FEAT_CMDL_INFO
else if (p_ru)
/* Current line and column are already on the screen -- webb */
- vim_snprintf_add((char *)buffer, IOSIZE,
+ vim_snprintf_add(buffer, IOSIZE,
NGETTEXT("%ld line --%d%%--", "%ld lines --%d%%--",
curbuf->b_ml.ml_line_count),
(long)curbuf->b_ml.ml_line_count, n);
#endif
else
{
- vim_snprintf_add((char *)buffer, IOSIZE,
+ vim_snprintf_add(buffer, IOSIZE,
_("line %ld of %ld --%d%%-- col "),
(long)curwin->w_cursor.lnum,
(long)curbuf->b_ml.ml_line_count,
n);
validate_virtcol();
len = STRLEN(buffer);
- col_print(buffer + len, IOSIZE - len,
+ col_print((char_u *)buffer + len, IOSIZE - len,
(int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
}
- (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
+ (void)append_arg_number(curwin, (char_u *)buffer, IOSIZE,
+ !shortmess(SHM_FILE));
if (dont_truncate)
{
@@ -3542,14 +3543,14 @@ fileinfo(
}
else
{
- p = msg_trunc_attr(buffer, FALSE, 0);
+ p = (char *)msg_trunc_attr(buffer, FALSE, 0);
if (restart_edit != 0 || (msg_scrolled && !need_wait_return))
/* Need to repeat the message after redrawing when:
* - When restart_edit is set (otherwise there will be a delay
* before redrawing).
* - When the screen was scrolled but there is no wait-return
* prompt. */
- set_keep_msg(p, 0);
+ set_keep_msg((char_u *)p, 0);
}
vim_free(buffer);
diff --git a/src/crypt.c b/src/crypt.c
index f82ee7bdb..47617e9a9 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -513,7 +513,7 @@ crypt_check_method(int method)
if (method < CRYPT_M_BF2)
{
msg_scroll = TRUE;
- MSG(_("Warning: Using a weak encryption method; see :help 'cm'"));
+ msg(_("Warning: Using a weak encryption method; see :help 'cm'"));
}
}
@@ -555,7 +555,7 @@ crypt_get_key(
{
if (p2 != NULL && STRCMP(p1, p2) != 0)
{
- MSG(_("Keys don't match!"));
+ msg(_("Keys don't match!"));
crypt_free_key(p1);
crypt_free_key(p2);
p2 = NULL;
diff --git a/src/edit.c b/src/edit.c
index ea50e8018..482e644e8 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2387,8 +2387,8 @@ has_compl_option(int dict_opt)
{
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
- msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty")
- : (char_u *)_("'thesaurus' option is empty"),
+ msg_attr(dict_opt ? _("'dictionary' option is empty")
+ : _("'thesaurus' option is empty"),
HL_ATTR(HLF_E));
if (emsg_silent == 0)
{
@@ -3385,7 +3385,7 @@ ins_compl_files(
{
vim_snprintf((char *)IObuff, IOSIZE,
_("Scanning dictionary: %s"), (char *)files[i]);
- (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
}
if (fp != NULL)
@@ -4500,7 +4500,7 @@ ins_compl_get_exp(pos_T *ini)
: ins_buf->b_sfname == NULL
? ins_buf->b_fname
: ins_buf->b_sfname);
- (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
}
else if (*e_cpt == NUL)
break;
@@ -4530,7 +4530,7 @@ ins_compl_get_exp(pos_T *ini)
{
type = CTRL_X_TAGS;
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
- (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
}
else
type = -1;
@@ -5132,7 +5132,7 @@ ins_compl_next(
}
vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
s > compl_shown_match->cp_fname ? "<" : "", s);
- msg(IObuff);
+ msg((char *)IObuff);
redraw_cmdline = FALSE; /* don't overwrite! */
}
}
@@ -5878,7 +5878,7 @@ ins_complete(int c, int enable_pum)
if (edit_submode_extra != NULL)
{
if (!p_smd)
- msg_attr(edit_submode_extra,
+ msg_attr((char *)edit_submode_extra,
edit_submode_highl < HLF_COUNT
? HL_ATTR(edit_submode_highl) : 0);
}
@@ -8856,7 +8856,7 @@ ins_esc(
if (reg_recording != 0 || restart_edit != NUL)
showmode();
else if (p_smd)
- MSG("");
+ msg("");
return TRUE; /* exit Insert mode */
}
diff --git a/src/eval.c b/src/eval.c
index d8a9e4318..d1a7fd37d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -245,8 +245,8 @@ static char_u * make_expanded_name(char_u *in_start, char_u *expr_start, char_u
static void check_vars(char_u *name, int len);
static typval_T *alloc_string_tv(char_u *string);
static void delete_var(hashtab_T *ht, hashitem_T *hi);
-static void list_one_var(dictitem_T *v, char_u *prefix, int *first);
-static void list_one_var_a(char_u *prefix, char_u *name, int type, char_u *string, int *first);
+static void list_one_var(dictitem_T *v, char *prefix, int *first);
+static void list_one_var_a(char *prefix, char_u *name, int type, char_u *string, int *first);
static char_u *find_option_end(char_u **arg, int *opt_flags);
/* for VIM_VERSION_ defines */
@@ -1448,7 +1448,7 @@ skip_var_one(char_u *arg)
void
list_hashtable_vars(
hashtab_T *ht,
- char_u *prefix,
+ char *prefix,
int empty,
int *first)
{
@@ -1466,8 +1466,8 @@ list_hashtable_vars(
di = HI2DI(hi);
// apply :filter /pat/ to variable name
- vim_strncpy((char_u *) buf, prefix, IOSIZE - 1);
- vim_strcat((char_u *) buf, di->di_key, IOSIZE);
+ vim_strncpy((char_u *)buf, (char_u *)prefix, IOSIZE - 1);
+ vim_strcat((char_u *)buf, di->di_key, IOSIZE);
if (message_filtered(buf))
continue;
@@ -1484,7 +1484,7 @@ list_hashtable_vars(
static void
list_glob_vars(int *first)
{
- list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
+ list_hashtable_vars(&globvarht, "", TRUE, first);
}
/*
@@ -1493,8 +1493,7 @@ list_glob_vars(int *first)
static void
list_buf_vars(int *first)
{
- list_hashtable_vars(&curbuf->b_vars->dv_hashtab, (char_u *)"b:",
- TRUE, first);
+ list_hashtable_vars(&curbuf->b_vars->dv_hashtab, "b:", TRUE, first);
}
/*
@@ -1503,8 +1502,7 @@ list_buf_vars(int *first)
static void
list_win_vars(int *first)
{
- list_hashtable_vars(&curwin->w_vars->dv_hashtab,
- (char_u *)"w:", TRUE, first);
+ list_hashtable_vars(&curwin->w_vars->dv_hashtab, "w:", TRUE, first);
}
/*
@@ -1513,8 +1511,7 @@ list_win_vars(int *first)
static void
list_tab_vars(int *first)
{
- list_hashtable_vars(&curtab->tp_vars->dv_hashtab,
- (char_u *)"t:", TRUE, first);
+ list_hashtable_vars(&curtab->tp_vars->dv_hashtab, "t:", TRUE, first);
}
/*
@@ -1523,7 +1520,7 @@ list_tab_vars(int *first)
static void
list_vim_vars(int *first)
{
- list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
+ list_hashtable_vars(&vimvarht, "v:", FALSE, first);
}
/*
@@ -1534,7 +1531,7 @@ list_script_vars(int *first)
{
if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len)
list_hashtable_vars(&SCRIPT_VARS(current_sctx.sc_sid),
- (char_u *)"s:", FALSE, first);
+ "s:", FALSE, first);
}
/*
@@ -1619,7 +1616,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
s = echo_string(&tv, &tf, numbuf, 0);
c = *arg;
*arg = NUL;
- list_one_var_a((char_u *)"",
+ list_one_var_a("",
arg == arg_subsc ? name : name_start,
tv.v_type,
s == NULL ? (char_u *)"" : s,
@@ -5462,7 +5459,7 @@ garbage_collect(int testing)
}
else if (p_verbose > 0)
{
- verb_msg((char_u *)_("Not enough memory to set references, garbage collection aborted!"));
+ verb_msg(_("Not enough memory to set references, garbage collection aborted!"));
}
return did_free;
@@ -7791,7 +7788,7 @@ delete_var(hashtab_T *ht, hashitem_T *hi)
* List the value of one internal variable.
*/
static void
-list_one_var(dictitem_T *v, char_u *prefix, int *first)
+list_one_var(dictitem_T *v, char *prefix, int *first)
{
char_u *tofree;
char_u *s;
@@ -7805,7 +7802,7 @@ list_one_var(dictitem_T *v, char_u *prefix, int *first)
static void
list_one_var_a(
- char_u *prefix,
+ char *prefix,
char_u *name,
int type,
char_u *string,
@@ -7815,7 +7812,7 @@ list_one_var_a(
msg_start();
msg_puts(prefix);
if (name != NULL) /* "a:" vars don't have a name stored */
- msg_puts(name);
+ msg_puts((char *)name);
msg_putchar(' ');
msg_advance(22);
if (type == VAR_NUMBER)
@@ -7840,7 +7837,7 @@ list_one_var_a(
msg_outtrans(string);
if (type == VAR_FUNC || type == VAR_PARTIAL)
- msg_puts((char_u *)"()");
+ msg_puts("()");
if (*first)
{
msg_clr_eos();
@@ -8304,7 +8301,7 @@ get_user_input(
*p = NUL;
msg_start();
msg_clr_eos();
- msg_puts_attr(prompt, echo_attr);
+ msg_puts_attr((char *)prompt, echo_attr);
msg_didout = FALSE;
msg_starthere();
*p = c;
@@ -8422,7 +8419,7 @@ ex_echo(exarg_T *eap)
}
}
else if (eap->cmdidx == CMD_echo)
- msg_puts_attr((char_u *)" ", echo_attr);
+ msg_puts_attr(" ", echo_attr);
p = echo_string(&rettv, &tofree, numbuf, get_copyID());
if (p != NULL)
for ( ; *p != NUL && !got_int; ++p)
@@ -8546,7 +8543,7 @@ ex_execute(exarg_T *eap)
if (eap->cmdidx == CMD_echomsg)
{
- MSG_ATTR(ga.ga_data, echo_attr);
+ msg_attr(ga.ga_data, echo_attr);
out_flush();
}
else if (eap->cmdidx == CMD_echoerr)
@@ -9159,11 +9156,11 @@ last_set_msg(sctx_T script_ctx)
if (p != NULL)
{
verbose_enter();
- MSG_PUTS(_("\n\tLast set from "));
- MSG_PUTS(p);
+ msg_puts(_("\n\tLast set from "));
+ msg_puts((char *)p);
if (script_ctx.sc_lnum > 0)
{
- MSG_PUTS(_(" line "));
+ msg_puts(_(" line "));
msg_outnum((long)script_ctx.sc_lnum);
}
verbose_leave();
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 1bdb72263..ac009e6e9 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -7169,7 +7169,7 @@ f_inputlist(typval_T *argvars, typval_T *rettv)
for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next)
{
- msg_puts(tv_get_string(&li->li_tv));
+ msg_puts((char *)tv_get_string(&li->li_tv));
msg_putchar('\n');
}
@@ -7198,7 +7198,7 @@ f_inputrestore(typval_T *argvars UNUSED, typval_T *rettv)
}
else if (p_verbose > 1)
{
- verb_msg((char_u *)_("called inputrestore() more often than inputsave()"));
+ verb_msg(_("called inputrestore() more often than inputsave()"));
rettv->vval.v_number = 1; /* Failed */
}
}
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 25322c2bd..b6bd3d348 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -62,7 +62,7 @@ do_ascii(exarg_T *eap UNUSED)
c = gchar_cursor();
if (c == NUL)
{
- MSG("NUL");
+ msg("NUL");
return;
}
@@ -152,7 +152,7 @@ do_ascii(exarg_T *eap UNUSED)
}
#endif
- msg(IObuff);
+ msg((char *)IObuff);
}
/*
@@ -1490,11 +1490,11 @@ do_filter(
{
if (do_in)
{
- vim_snprintf((char *)msg_buf, sizeof(msg_buf),
+ vim_snprintf(msg_buf, sizeof(msg_buf),
_("%ld lines filtered"), (long)linecount);
if (msg(msg_buf) && !msg_scroll)
/* save message to display it after redraw */
- set_keep_msg(msg_buf, 0);
+ set_keep_msg((char_u *)msg_buf, 0);
}
else
msgmore((long)linecount);
@@ -1586,7 +1586,7 @@ do_shell(
if (!winstart)
starttermcap(); /* don't want a message box here */
#endif
- MSG_PUTS(_("[No write since last change]\n"));
+ msg_puts(_("[No write since last change]\n"));
#ifdef FEAT_GUI_MSWIN
if (!winstart)
stoptermcap();
@@ -3028,11 +3028,11 @@ print_line_no_prefix(
int use_number,
int list)
{
- char_u numbuf[30];
+ char numbuf[30];
if (curwin->w_p_nu || use_number)
{
- vim_snprintf((char *)numbuf, sizeof(numbuf),
+ vim_snprintf(numbuf, sizeof(numbuf),
"%*ld ", number_width(curwin), (long)lnum);
msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */
}
@@ -5926,7 +5926,7 @@ outofmem:
beginline(BL_WHITE | BL_FIX);
}
if (!do_sub_msg(subflags.do_count) && subflags.do_ask)
- MSG("");
+ msg("");
}
else
global_need_beginline = TRUE;
@@ -5939,7 +5939,7 @@ outofmem:
if (got_int) /* interrupted */
emsg(_(e_interr));
else if (got_match) /* did find something but nothing substituted */
- MSG("");
+ msg("");
else if (subflags.do_error) /* nothing found */
semsg(_(e_patnotf2), get_search_pat());
}
@@ -5995,13 +5995,13 @@ do_sub_msg(
: NGETTEXT("%ld substitution on %ld lines",
"%ld substitutions on %ld lines", sub_nsubs);
- vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+ vim_snprintf_add(msg_buf, sizeof(msg_buf),
NGETTEXT(msg_single, msg_plural, sub_nlines),
sub_nsubs, (long)sub_nlines);
if (msg(msg_buf))
/* save message to display it after redraw */
- set_keep_msg(msg_buf, 0);
+ set_keep_msg((char_u *)msg_buf, 0);
return TRUE;
}
if (got_int)
@@ -6147,7 +6147,7 @@ ex_global(exarg_T *eap)
* pass 2: execute the command for each line that has been marked
*/
if (got_int)
- MSG(_(e_interr));
+ msg(_(e_interr));
else if (ndone == 0)
{
if (type == 'v')
@@ -7755,7 +7755,7 @@ ex_oldfiles(exarg_T *eap UNUSED)
char_u *fname;
if (l == NULL)
- msg((char_u *)_("No old files"));
+ msg(_("No old files"));
else
{
msg_start();
@@ -7767,7 +7767,7 @@ ex_oldfiles(exarg_T *eap UNUSED)
if (!message_filtered(fname))
{
msg_outnum((long)nr);
- MSG_PUTS(": ");
+ msg_puts(": ");
msg_outtrans(fname);
msg_clr_eos();
msg_putchar('\n');
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index d044fdb2c..72d28c52d 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -143,7 +143,7 @@ do_debug(char_u *cmd)
debug_mode = TRUE;
if (!debug_did_msg)
- MSG(_("Entering Debug mode. Type \"cont\" to continue."));
+ msg(_("Entering Debug mode. Type \"cont\" to continue."));
if (debug_oldval != NULL)
{
smsg(_("Oldval = \"%s\""), debug_oldval);
@@ -157,7 +157,7 @@ do_debug(char_u *cmd)
debug_newval = NULL;
}
if (sourcing_name != NULL)
- msg(sourcing_name);
+ msg((char *)sourcing_name);
if (sourcing_lnum != 0)
smsg(_("line %ld: %s"), (long)sourcing_lnum, cmd);
else
@@ -390,7 +390,7 @@ do_checkbacktracelevel(void)
if (debug_backtrace_level < 0)
{
debug_backtrace_level = 0;
- MSG(_("frame is zero"));
+ msg(_("frame is zero"));
}
else
{
@@ -857,7 +857,7 @@ ex_breaklist(exarg_T *eap UNUSED)
int i;
if (dbg_breakp.ga_len == 0)
- MSG(_("No breakpoints defined"));
+ msg(_("No breakpoints defined"));
else
for (i = 0; i < dbg_breakp.ga_len; ++i)
{
@@ -2430,7 +2430,7 @@ buf_write_all(buf_T *buf, int forceit)
if (curbuf != old_curbuf)
{
msg_source(HL_ATTR(HLF_W));
- MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
+ msg(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
}
return retval;
}
@@ -4112,7 +4112,7 @@ source_pyx_file(exarg_T *eap, char_u *fname)
vim_snprintf((char *)IObuff, IOSIZE,
_("W20: Required python version 2.x not supported, ignoring file: %s"),
fname);
- MSG(IObuff);
+ msg((char *)IObuff);
# endif
return;
}
@@ -4124,7 +4124,7 @@ source_pyx_file(exarg_T *eap, char_u *fname)
vim_snprintf((char *)IObuff, IOSIZE,
_("W21: Required python version 3.x not supported, ignoring file: %s"),
fname);
- MSG(IObuff);
+ msg((char *)IObuff);
# endif
return;
}
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 97976442e..8a9b2f4bf 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -562,7 +562,7 @@ do_exmode(
++hold_gui_events;
#endif
- MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
+ msg(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
while (exmode_active)
{
/* Check for a ":normal" command and no more characters left. */
@@ -1019,7 +1019,7 @@ do_cmdline(
smsg(_("line %ld: %s"),
(long)sourcing_lnum, cmdline_copy);
if (msg_silent == 0)
- msg_puts((char_u *)"\n"); /* don't overwrite this */
+ msg_puts("\n"); /* don't overwrite this */
verbose_leave_scroll();
--no_wait_return;
@@ -6043,7 +6043,7 @@ uc_list(char_u *name, size_t name_len)
/* Put out the title first time */
if (!found)
- MSG_PUTS_TITLE(_("\n Name Args Address Complete Definition"));
+ msg_puts_title(_("\n Name Args Address Complete Definition"));
found = TRUE;
msg_putchar('\n');
if (got_int)
@@ -6150,7 +6150,7 @@ uc_list(char_u *name, size_t name_len)
}
if (!found)
- MSG(_("No user-defined commands found"));
+ msg(_("No user-defined commands found"));
}
static char *
@@ -7239,13 +7239,13 @@ ex_colorscheme(exarg_T *eap)
}
if (p != NULL)
{
- MSG(p);
+ msg((char *)p);
vim_free(p);
}
else
- MSG("default");
+ msg("default");
#else
- MSG(_("unknown"));
+ msg(_("unknown"));
#endif
}
else if (load_colors(eap->arg) == FAIL)
@@ -7256,7 +7256,7 @@ ex_colorscheme(exarg_T *eap)
ex_highlight(exarg_T *eap)
{
if (*eap->arg == NUL && eap->cmd[2] == '!')
- MSG(_("Greetings, Vim user!"));
+ msg(_("Greetings, Vim user!"));
do_highlight(eap->arg, eap->forceit, FALSE);
}
@@ -7672,7 +7672,7 @@ ex_tabonly(exarg_T *eap)
else
# endif
if (first_tabpage->tp_next == NULL)
- MSG(_("Already only one tab page"));
+ msg(_("Already only one tab page"));
else
{
tab_number = get_tabpage_arg(eap);
@@ -8921,9 +8921,9 @@ ex_popup(exarg_T *eap)
ex_swapname(exarg_T *eap UNUSED)
{
if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
- MSG(_("No swap file"));
+ msg(_("No swap file"));
else
- msg(curbuf->b_ml.ml_mfp->mf_fname);
+ msg((char *)curbuf->b_ml.ml_mfp->mf_fname);
}
/*
@@ -9221,7 +9221,7 @@ ex_pwd(exarg_T *eap UNUSED)
#ifdef BACKSLASH_IN_FILENAME
slash_adjust(NameBuff);
#endif
- msg(NameBuff);
+ msg((char *)NameBuff);
}
else
emsg(_("E187: Unknown"));
@@ -9402,7 +9402,7 @@ ex_winpos(exarg_T *eap)
# endif
{
sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
- msg(IObuff);
+ msg((char *)IObuff);
}
else
# endif
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 10a9dbcbf..63bca6718 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -556,7 +556,7 @@ throw_exception(void *value, except_type_T type, char_u *cmdname)
msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg(_("Exception thrown: %s"), excp->value);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row;
@@ -610,7 +610,7 @@ discard_exception(except_T *excp, int was_finished)
? _("Exception finished: %s")
: _("Exception discarded: %s"),
excp->value);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row;
--no_wait_return;
@@ -679,7 +679,7 @@ catch_exception(except_T *excp)
msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg(_("Exception caught: %s"), excp->value);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row;
@@ -806,7 +806,7 @@ report_pending(int action, int pending, void *value)
++no_wait_return;
msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg(mesg, s);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
cmdline_row = msg_row;
--no_wait_return;
if (debug_break_level > 0)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 70dd77a49..fc48a9b72 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -158,7 +158,7 @@ abandon_cmdline(void)
VIM_CLEAR(ccline.cmdbuff);
if (msg_scrolled == 0)
compute_cmdrow();
- MSG("");
+ msg("");
redraw_cmdline = TRUE;
}
@@ -2786,7 +2786,7 @@ getexmodeline(
while (indent >= 8)
{
ga_append(&line_ga, TAB);
- msg_puts((char_u *)" ");
+ msg_puts(" ");
indent -= 8;
}
while (indent-- > 0)
@@ -3769,7 +3769,7 @@ redrawcmdprompt(void)
msg_putchar(ccline.cmdfirstc);
if (ccline.cmdprompt != NULL)
{
- msg_puts_attr(ccline.cmdprompt, ccline.cmdattr);
+ msg_puts_attr((char *)ccline.cmdprompt, ccline.cmdattr);
ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns;
/* do the reverse of set_cmdspos() */
if (ccline.cmdfirstc != NUL)
@@ -3961,7 +3961,7 @@ nextwild(
return FAIL;
}
- MSG_PUTS("..."); /* show that we are busy */
+ msg_puts("..."); /* show that we are busy */
out_flush();
i = (int)(xp->xp_pattern - ccline.cmdbuff);
@@ -4611,10 +4611,10 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
if (xp->xp_context == EXPAND_TAGS_LISTFILES)
{
- MSG_PUTS_ATTR(_("tagname"), HL_ATTR(HLF_T));
+ msg_puts_attr(_("tagname"), HL_ATTR(HLF_T));
msg_clr_eos();
msg_advance(maxlen - 3);
- MSG_PUTS_ATTR(_(" kind file\n"), HL_ATTR(HLF_T));
+ msg_puts_attr(_(" kind file\n"), HL_ATTR(HLF_T));
}
/* list the files line by line */
@@ -4628,9 +4628,9 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D));
p = files_found[k] + STRLEN(files_found[k]) + 1;
msg_advance(maxlen + 1);
- msg_puts(p);
+ msg_puts((char *)p);
msg_advance(maxlen + 3);
- msg_puts_long_attr(p + 2, HL_ATTR(HLF_D));
+ msg_outtrans_long_attr(p + 2, HL_ATTR(HLF_D));
break;
}
for (j = maxlen - lastlen; --j >= 0; )
@@ -6635,7 +6635,7 @@ ex_history(exarg_T *eap)
if (hislen == 0)
{
- MSG(_("'history' option is zero"));
+ msg(_("'history' option is zero"));
return;
}
@@ -6678,7 +6678,7 @@ ex_history(exarg_T *eap)
{
STRCPY(IObuff, "\n # ");
STRCAT(STRCAT(IObuff, history_names[histype1]), " history");
- MSG_PUTS_TITLE(IObuff);
+ msg_puts_title((char *)IObuff);
idx = hisidx[histype1];
hist = history[histype1];
j = hisidx1;
diff --git a/src/farsi.c b/src/farsi.c
index ebed47e6e..48dd991b0 100644
--- a/src/farsi.c
+++ b/src/farsi.c
@@ -1719,7 +1719,7 @@ conv_to_pvim(void)
/* Assume the screen has been messed up: clear it and redraw. */
redraw_later(CLEAR);
- MSG_ATTR(farsi_text_1, HL_ATTR(HLF_S));
+ msg_attr(farsi_text_1, HL_ATTR(HLF_S));
}
/*
@@ -1747,7 +1747,7 @@ conv_to_pstd(void)
/* Assume the screen has been messed up: clear it and redraw. */
redraw_later(CLEAR);
- MSG_ATTR(farsi_text_2, HL_ATTR(HLF_S));
+ msg_attr(farsi_text_2, HL_ATTR(HLF_S));
}
/*
@@ -2150,13 +2150,13 @@ farsi_f8(cmdarg_T *cap UNUSED)
{
p_fkmap = 0;
do_cmdline_cmd((char_u *)"set norl");
- MSG("");
+ msg("");
}
else
{
p_fkmap = 1;
do_cmdline_cmd((char_u *)"set rl");
- MSG("");
+ msg("");
}
curwin->w_farsi = curwin->w_farsi ^ W_R_L;
diff --git a/src/farsi.h b/src/farsi.h
index 33f197479..e91bdf727 100644
--- a/src/farsi.h
+++ b/src/farsi.h
@@ -186,7 +186,7 @@
/* special Farsi text messages */
-EXTERN char_u farsi_text_1[]
+EXTERN char farsi_text_1[]
#ifdef DO_INIT
= { YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M',
' ', F_HE, _BE, ' ', SHIN, RE, _GAF, DAL,' ', NOON,
@@ -194,7 +194,7 @@ EXTERN char_u farsi_text_1[]
#endif
;
-EXTERN char_u farsi_text_2[]
+EXTERN char farsi_text_2[]
#ifdef DO_INIT
= { YE_, _SIN, RE, ALEF_, _FE, ' ', FARSI_3, FARSI_3,
FARSI_4, FARSI_2, ' ', DAL, RE, ALEF, DAL, _NOON,
@@ -227,7 +227,7 @@ EXTERN char_u farsi_text_4[]
;
#endif
-EXTERN char_u farsi_text_5[]
+EXTERN char farsi_text_5[]
#ifdef DO_INIT
= { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'}
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 23fe50452..168c26ed3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2586,7 +2586,7 @@ failed:
p = msg_may_trunc(FALSE, IObuff);
else
#endif
- p = msg_trunc_attr(IObuff, FALSE, 0);
+ p = (char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0);
if (read_stdin || read_buffer || restart_edit != 0
|| (msg_scrolled != 0 && !need_wait_return))
/* Need to repeat the message after redrawing when:
@@ -2902,28 +2902,28 @@ readfile_charconvert(
int *fdp) /* in/out: file descriptor of file */
{
char_u *tmpname;
- char_u *errmsg = NULL;
+ char *errmsg = NULL;
tmpname = vim_tempname('r', FALSE);
if (tmpname == NULL)
- errmsg = (char_u *)_("Can't find temp file for conversion");
+ errmsg = _("Can't find temp file for conversion");
else
{
close(*fdp); /* close the input file, ignore errors */
*fdp = -1;
if (eval_charconvert(fenc, enc_utf8 ? (char_u *)"utf-8" : p_enc,
fname, tmpname) == FAIL)
- errmsg = (char_u *)_("Conversion with 'charconvert' failed");
+ errmsg = _("Conversion with 'charconvert' failed");
if (errmsg == NULL && (*fdp = mch_open((char *)tmpname,
O_RDONLY | O_EXTRA, 0)) < 0)
- errmsg = (char_u *)_("can't read output of 'charconvert'");
+ errmsg = _("can't read output of 'charconvert'");
}
if (errmsg != NULL)
{
/* Don't use emsg(), it breaks mappings, the retry with
* another type of conversion might still work. */
- MSG(errmsg);
+ msg(errmsg);
if (tmpname != NULL)
{
mch_remove(tmpname); /* delete converted file */
@@ -4908,7 +4908,7 @@ restore_backup:
* know we got the message. */
if (got_int)
{
- MSG(_(e_interr));
+ msg(_(e_interr));
out_flush();
}
if ((fd = mch_open((char *)backup, O_RDONLY | O_EXTRA, 0)) >= 0)
@@ -5007,7 +5007,7 @@ restore_backup:
STRCAT(IObuff, shortmess(SHM_WRI) ? _(" [w]") : _(" written"));
}
- set_keep_msg(msg_trunc_attr(IObuff, FALSE, 0), 0);
+ set_keep_msg((char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0), 0);
}
/* When written everything correctly: reset 'modified'. Unless not
@@ -5157,9 +5157,9 @@ nofail:
retval = FAIL;
if (end == 0)
{
- MSG_PUTS_ATTR(_("\nWARNING: Original file may be lost or damaged\n"),
+ msg_puts_attr(_("\nWARNING: Original file may be lost or damaged\n"),
attr | MSG_HIST);
- MSG_PUTS_ATTR(_("don't quit the editor until the file is successfully written!"),
+ msg_puts_attr(_("don't quit the editor until the file is successfully written!"),
attr | MSG_HIST);
/* Update the timestamp to avoid an "overwrite changed file"
@@ -5372,7 +5372,7 @@ check_mtime(buf_T *buf, stat_T *st)
msg_scroll = TRUE; /* don't overwrite messages here */
msg_silent = 0; /* must give this prompt */
/* don't use emsg() here, don't want to flush the buffers */
- MSG_ATTR(_("WARNING: The file has been changed since reading it!!!"),
+ msg_attr(_("WARNING: The file has been changed since reading it!!!"),
HL_ATTR(HLF_E));
if (ask_yesno((char_u *)_("Do you really want to write to it"),
TRUE) == 'n')
@@ -6807,7 +6807,7 @@ check_timestamps(
if (need_wait_return && didit == 2)
{
/* make sure msg isn't overwritten */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
out_flush();
}
}
@@ -7093,10 +7093,9 @@ buf_check_timestamp(
if (!autocmd_busy)
{
msg_start();
- msg_puts_attr((char_u *)tbuf, HL_ATTR(HLF_E) + MSG_HIST);
+ msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
if (*mesg2 != NUL)
- msg_puts_attr((char_u *)mesg2,
- HL_ATTR(HLF_W) + MSG_HIST);
+ msg_puts_attr(mesg2, HL_ATTR(HLF_W) + MSG_HIST);
msg_clr_eos();
(void)msg_end();
if (emsg_silent == 0)
@@ -7926,12 +7925,12 @@ show_autocmd(AutoPat *ap, event_T event)
if (ap->group != AUGROUP_DEFAULT)
{
if (AUGROUP_NAME(ap->group) == NULL)
- msg_puts_attr(get_deleted_augroup(), HL_ATTR(HLF_E));
+ msg_puts_attr((char *)get_deleted_augroup(), HL_ATTR(HLF_E));
else
- msg_puts_attr(AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
- msg_puts((char_u *)" ");
+ msg_puts_attr((char *)AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
+ msg_puts(" ");
}
- msg_puts_attr(event_nr2name(event), HL_ATTR(HLF_T));
+ msg_puts_attr((char *)event_nr2name(event), HL_ATTR(HLF_T));
last_event = event;
last_group = ap->group;
msg_putchar('\n');
@@ -8210,8 +8209,8 @@ do_augroup(char_u *arg, int del_group)
{
if (AUGROUP_NAME(i) != NULL)
{
- msg_puts(AUGROUP_NAME(i));
- msg_puts((char_u *)" ");
+ msg_puts((char *)AUGROUP_NAME(i));
+ msg_puts(" ");
}
}
msg_clr_eos();
@@ -8535,7 +8534,7 @@ do_autocmd(char_u *arg_in, int forceit)
if (!forceit && *cmd == NUL)
{
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Autocommands ---"));
+ msg_puts_title(_("\n--- Autocommands ---"));
}
/*
@@ -8902,7 +8901,7 @@ do_doautocmd(
nothing_done = FALSE;
if (nothing_done && do_msg)
- MSG(_("No matching autocommands"));
+ msg(_("No matching autocommands"));
if (did_something != NULL)
*did_something = !nothing_done;
@@ -9939,7 +9938,7 @@ getnextac(int c UNUSED, void *cookie, int indent UNUSED)
{
verbose_enter_scroll();
smsg(_("autocommand %s"), ac->cmd);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
verbose_leave_scroll();
}
retval = vim_strsave(ac->cmd);
diff --git a/src/getchar.c b/src/getchar.c
index a51af9dd9..c0cfd92d6 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1942,7 +1942,7 @@ vungetc(int c)
}
/*
- * Get a character:
+ * Get a byte:
* 1. from the stuffbuffer
* This is used for abbreviated commands like "D" -> "d$".
* Also used to redo a command for ".".
@@ -3728,9 +3728,9 @@ do_map(
)
{
if (abbrev)
- MSG(_("No abbreviation found"));
+ msg(_("No abbreviation found"));
else
- MSG(_("No mapping found"));
+ msg(_("No mapping found"));
}
goto theend; /* listing finished */
}
@@ -4047,7 +4047,7 @@ showmap(
mapchars = map_mode_to_chars(mp->m_mode);
if (mapchars != NULL)
{
- msg_puts(mapchars);
+ msg_puts((char *)mapchars);
len = (int)STRLEN(mapchars);
vim_free(mapchars);
}
@@ -4064,9 +4064,9 @@ showmap(
} while (len < 12);
if (mp->m_noremap == REMAP_NONE)
- msg_puts_attr((char_u *)"*", HL_ATTR(HLF_8));
+ msg_puts_attr("*", HL_ATTR(HLF_8));
else if (mp->m_noremap == REMAP_SCRIPT)
- msg_puts_attr((char_u *)"&", HL_ATTR(HLF_8));
+ msg_puts_attr("&", HL_ATTR(HLF_8));
else
msg_putchar(' ');
@@ -4078,7 +4078,7 @@ showmap(
/* Use FALSE below if we only want things like <Up> to show up as such on
* the rhs, and not M-x etc, TRUE gets both -- webb */
if (*mp->m_str == NUL)
- msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
+ msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
else
{
/* Remove escaping of CSI, because "m_str" is in a format to be used
diff --git a/src/globals.h b/src/globals.h
index 645c93608..d9cd467ca 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -989,7 +989,7 @@ EXTERN char_u *IObuff; /* sprintf's are done in this buffer,
size is IOSIZE */
EXTERN char_u *NameBuff; /* file names are expanded in this
* buffer, size is MAXPATHL */
-EXTERN char_u msg_buf[MSG_BUF_LEN]; /* small buffer for messages */
+EXTERN char msg_buf[MSG_BUF_LEN]; /* small buffer for messages */
/* When non-zero, postpone redrawing. */
EXTERN int RedrawingDisabled INIT(= 0);
diff --git a/src/gui.c b/src/gui.c
index 867778762..9278df973 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -2750,7 +2750,7 @@ gui_redraw_block(
vim_snprintf((char *)IObuff, IOSIZE,
"INTERNAL ERROR: NUL in ScreenLines in row %ld",
(long)gui.row);
- msg(IObuff);
+ msg((char *)IObuff);
}
}
# ifdef FEAT_GUI_GTK
@@ -5323,7 +5323,7 @@ gui_do_findrepl(
}
}
else
- MSG(_("No match at cursor, finding next"));
+ msg(_("No match at cursor, finding next"));
vim_regfree(regmatch.regprog);
}
}
diff --git a/src/gui_w32.c b/src/gui_w32.c
index ab60fb518..ceaa041b6 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -5128,7 +5128,7 @@ _WndProc(
&& GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
{
++msg_hist_off;
- msg(pMenu->strings[MENU_INDEX_TIP]);
+ msg((char *)pMenu->strings[MENU_INDEX_TIP]);
--msg_hist_off;
setcursor();
out_flush();
diff --git a/src/hardcopy.c b/src/hardcopy.c
index 508cf413f..45800a16f 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -657,7 +657,7 @@ ex_hardcopy(exarg_T *eap)
bytes_to_print += (long_u)STRLEN(skipwhite(ml_get(lnum)));
if (bytes_to_print == 0)
{
- MSG(_("No text to be printed"));
+ msg(_("No text to be printed"));
goto print_fail_no_begin;
}
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 4904424d1..4cc053ed0 100644
--- 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 **cntxts, int num_matches)
{
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 **cntxts, int num_matches)
{
/* 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 **cntxts, int num_matches)
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++)
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 503a1e4e1..16c4c88df 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -1574,7 +1574,7 @@ do_intrnl_output(char *mesg, int error)
if (error)
emsg(prev);
else
- MSG(prev);
+ msg(prev);
prev = p + 1;
p = strchr(prev, '\n');
}
@@ -1582,7 +1582,7 @@ do_intrnl_output(char *mesg, int error)
if (error)
emsg(prev);
else
- MSG(prev);
+ msg(prev);
}
static void
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 356108598..203bb6a67 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -798,11 +798,11 @@ msg_split(
while ((next = strchr(token, '\n')) && !got_int)
{
*next++ = '\0'; /* replace \n with \0 */
- msg_attr((char_u *)token, attr);
+ msg_attr(token, attr);
token = next;
}
if (*token && !got_int)
- msg_attr((char_u *)token, attr);
+ msg_attr(token, attr);
}
#ifndef FEAT_EVAL
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 85141e11a..233489ecc 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -410,12 +410,6 @@ writer(writefn fn, char_u *str, PyInt n)
}
static int
-msg_wrapper(char *text)
-{
- return msg((char_u *)text);
-}
-
- static int
write_output(OutputObject *self, PyObject *string)
{
Py_ssize_t len = 0;
@@ -427,7 +421,7 @@ write_output(OutputObject *self, PyObject *string)
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();
- writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len);
+ writer((writefn)(error ? emsg : msg), (char_u *)str, len);
Python_Release_Vim();
Py_END_ALLOW_THREADS
PyMem_Free(str);
diff --git a/src/if_ruby.c b/src/if_ruby.c
index fb1b25b5e..9c91f3177 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -1057,11 +1057,11 @@ static void error_print(int state)
# ifdef RUBY21_OR_LATER
bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0);
for (i = 0; i < RARRAY_LEN(bt); i++)
- msg_attr((char_u *)RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
+ msg_attr(RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
# else
bt = rb_funcall2(error, rb_intern("backtrace"), 0, 0);
for (i = 0; i < RARRAY_LEN(bt); i++)
- msg_attr((char_u *)RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
+ msg_attr(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
# endif
break;
default:
@@ -1083,11 +1083,11 @@ static VALUE vim_message(VALUE self UNUSED, VALUE str)
strcpy(buff, RSTRING_PTR(str));
p = strchr(buff, '\n');
if (p) *p = '\0';
- MSG(buff);
+ msg(buff);
}
else
{
- MSG("");
+ msg("");
}
return Qnil;
}
@@ -1641,7 +1641,7 @@ static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
if (i > 0) rb_str_cat(str, ", ", 2);
rb_str_concat(str, rb_inspect(argv[i]));
}
- MSG(RSTRING_PTR(str));
+ msg(RSTRING_PTR(str));
if (argc == 1)
ret = argv[0];
diff --git a/src/if_tcl.c b/src/if_tcl.c
index abef6134d..eb6684c8f 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -1832,11 +1832,11 @@ tclmsg(char *text)
while ((next=strchr(text, '\n')))
{
*next++ = '\0';
- MSG(text);
+ msg(text);
text = next;
}
if (*text)
- MSG(text);
+ msg(text);
}
static void
diff --git a/src/mark.c b/src/mark.c
index a9d73b52d..de4b0f97b 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -761,7 +761,7 @@ show_one_mark(
else
{
if (arg == NULL)
- MSG(_("No marks set"));
+ msg(_("No marks set"));
else
semsg(_("E283: No marks matching \"%s\""), arg);
}
@@ -774,7 +774,7 @@ show_one_mark(
if (!did_title)
{
/* Highlight title */
- MSG_PUTS_TITLE(_("\nmark line col file/text"));
+ msg_puts_title(_("\nmark line col file/text"));
did_title = TRUE;
}
msg_putchar('\n');
@@ -895,7 +895,7 @@ ex_jumps(exarg_T *eap UNUSED)
cleanup_jumplist(curwin, TRUE);
/* Highlight title */
- MSG_PUTS_TITLE(_("\n jump line col file/text"));
+ msg_puts_title(_("\n jump line col file/text"));
for (i = 0; i < curwin->w_jumplistlen && !got_int; ++i)
{
if (curwin->w_jumplist[i].fmark.mark.lnum != 0)
@@ -928,7 +928,7 @@ ex_jumps(exarg_T *eap UNUSED)
out_flush();
}
if (curwin->w_jumplistidx == curwin->w_jumplistlen)
- MSG_PUTS("\n>");
+ msg_puts("\n>");
}
void
@@ -949,7 +949,7 @@ ex_changes(exarg_T *eap UNUSED)
char_u *name;
/* Highlight title */
- MSG_PUTS_TITLE(_("\nchange line col text"));
+ msg_puts_title(_("\nchange line col text"));
for (i = 0; i < curbuf->b_changelistlen && !got_int; ++i)
{
@@ -975,7 +975,7 @@ ex_changes(exarg_T *eap UNUSED)
out_flush();
}
if (curwin->w_changelistidx == curbuf->b_changelistlen)
- MSG_PUTS("\n>");
+ msg_puts("\n>");
}
#endif
diff --git a/src/mbyte.c b/src/mbyte.c
index 66a3cc29d..b6758a1c1 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3745,7 +3745,7 @@ show_utf8(void)
len = utfc_ptr2len(line);
if (len == 0)
{
- MSG("NUL");
+ msg("NUL");
return;
}
@@ -3770,7 +3770,7 @@ show_utf8(void)
break;
}
- msg(IObuff);
+ msg((char *)IObuff);
}
/*
diff --git a/src/memline.c b/src/memline.c
index ca0c71137..87c2a1138 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1174,7 +1174,7 @@ ml_recover(void)
/* list the names of the swap files */
(void)recover_names(fname, TRUE, 0, NULL);
msg_putchar('\n');
- MSG_PUTS(_("Enter number of swap file to use (0 to quit): "));
+ msg_puts(_("Enter number of swap file to use (0 to quit): "));
i = get_number(FALSE, NULL);
if (i < 1 || i > len)
goto theend;
@@ -1243,9 +1243,9 @@ ml_recover(void)
if ((hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL)
{
msg_start();
- MSG_PUTS_ATTR(_("Unable to read block 0 from "), attr | MSG_HIST);
+ msg_puts_attr(_("Unable to read block 0 from "), attr | MSG_HIST);
msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
- MSG_PUTS_ATTR(_("\nMaybe no changes were made or Vim did not update the swap file."),
+ msg_puts_attr(_("\nMaybe no changes were made or Vim did not update the swap file."),
attr | MSG_HIST);
msg_end();
goto theend;
@@ -1255,9 +1255,9 @@ ml_recover(void)
{
msg_start();
msg_outtrans_attr(mfp->mf_fname, MSG_HIST);
- MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"),
+ msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
MSG_HIST);
- MSG_PUTS_ATTR(_("Use Vim version 3.0.\n"), MSG_HIST);
+ msg_puts_attr(_("Use Vim version 3.0.\n"), MSG_HIST);
msg_end();
goto theend;
}
@@ -1272,17 +1272,17 @@ ml_recover(void)
msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
#if defined(MSWIN)
if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0)
- MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"),
+ msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
attr | MSG_HIST);
else
#endif
- MSG_PUTS_ATTR(_(" cannot be used on this computer.\n"),
+ msg_puts_attr(_(" cannot be used on this computer.\n"),
attr | MSG_HIST);
- MSG_PUTS_ATTR(_("The file was created on "), attr | MSG_HIST);
+ msg_puts_attr(_("The file was created on "), attr | MSG_HIST);
/* avoid going past the end of a corrupted hostname */
b0p->b0_fname[0] = NUL;
- MSG_PUTS_ATTR(b0p->b0_hname, attr | MSG_HIST);
- MSG_PUTS_ATTR(_(",\nor the file has been damaged."), attr | MSG_HIST);
+ msg_puts_attr((char *)b0p->b0_hname, attr | MSG_HIST);
+ msg_puts_attr(_(",\nor the file has been damaged."), attr | MSG_HIST);
msg_end();
goto theend;
}
@@ -1315,7 +1315,7 @@ ml_recover(void)
{
msg_start();
msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
- MSG_PUTS_ATTR(_(" has been damaged (page size is smaller than minimum value).\n"),
+ msg_puts_attr(_(" has been damaged (page size is smaller than minimum value).\n"),
attr | MSG_HIST);
msg_end();
goto theend;
@@ -1413,10 +1413,10 @@ ml_recover(void)
if (*curbuf->b_p_key != NUL)
{
smsg(_("Swap file is encrypted: \"%s\""), fname_used);
- MSG_PUTS(_("\nIf you entered a new crypt key but did not write the text file,"));
- MSG_PUTS(_("\nenter the new crypt key."));
- MSG_PUTS(_("\nIf you wrote the text file after changing the crypt key press enter"));
- MSG_PUTS(_("\nto use the same key for text file and swap file"));
+ msg_puts(_("\nIf you entered a new crypt key but did not write the text file,"));
+ msg_puts(_("\nenter the new crypt key."));
+ msg_puts(_("\nIf you wrote the text file after changing the crypt key press enter"));
+ msg_puts(_("\nto use the same key for text file and swap file"));
}
else
smsg(_(need_key_msg), fname_used);
@@ -1681,29 +1681,29 @@ ml_recover(void)
else if (error)
{
++no_wait_return;
- MSG(">>>>>>>>>>>>>");
+ msg(">>>>>>>>>>>>>");
emsg(_("E312: Errors detected while recovering; look for lines starting with ???"));
--no_wait_return;
- MSG(_("See \":help E312\" for more information."));
- MSG(">>>>>>>>>>>>>");
+ msg(_("See \":help E312\" for more information."));
+ msg(">>>>>>>>>>>>>");
}
else
{
if (curbuf->b_changed)
{
- MSG(_("Recovery completed. You should check if everything is OK."));
- MSG_PUTS(_("\n(You might want to write out this file under another name\n"));
- MSG_PUTS(_("and run diff with the original file to check for changes)"));
+ msg(_("Recovery completed. You should check if everything is OK."));
+ msg_puts(_("\n(You might want to write out this file under another name\n"));
+ msg_puts(_("and run diff with the original file to check for changes)"));
}
else
- MSG(_("Recovery completed. Buffer contents equals file contents."));
- MSG_PUTS(_("\nYou may want to delete the .swp file now.\n\n"));
+ msg(_("Recovery completed. Buffer contents equals file contents."));
+ msg_puts(_("\nYou may want to delete the .swp file now.\n\n"));
cmdline_row = msg_row;
}
#ifdef FEAT_CRYPT
if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0)
{
- MSG_PUTS(_("Using crypt key from swap file for the text file.\n"));
+ msg_puts(_("Using crypt key from swap file for the text file.\n"));
set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL);
}
#endif
@@ -1785,7 +1785,7 @@ recover_names(
if (list)
{
/* use msg() to start the scrolling properly */
- msg((char_u *)_("Swap files found:"));
+ msg(_("Swap files found:"));
msg_putchar('\n');
}
@@ -1966,15 +1966,15 @@ recover_names(
if (dir_name[0] == '.' && dir_name[1] == NUL)
{
if (fname == NULL)
- MSG_PUTS(_(" In current directory:\n"));
+ msg_puts(_(" In current directory:\n"));
else
- MSG_PUTS(_(" Using specified name:\n"));
+ msg_puts(_(" Using specified name:\n"));
}
else
{
- MSG_PUTS(_(" In directory "));
+ msg_puts(_(" In directory "));
msg_home_replace(dir_name);
- MSG_PUTS(":\n");
+ msg_puts(":\n");
}
if (num_files)
@@ -1983,14 +1983,14 @@ recover_names(
{
/* print the swap file name */
msg_outnum((long)++file_count);
- MSG_PUTS(". ");
- msg_puts(gettail(files[i]));
+ msg_puts(". ");
+ msg_puts((char *)gettail(files[i]));
msg_putchar('\n');
(void)swapfile_info(files[i]);
}
}
else
- MSG_PUTS(_(" -- none --\n"));
+ msg_puts(_(" -- none --\n"));
out_flush();
}
else
@@ -2106,19 +2106,19 @@ swapfile_info(char_u *fname)
/* print name of owner of the file */
if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK)
{
- MSG_PUTS(_(" owned by: "));
+ msg_puts(_(" owned by: "));
msg_outtrans(uname);
- MSG_PUTS(_(" dated: "));
+ msg_puts(_(" dated: "));
}
else
#endif
- MSG_PUTS(_(" dated: "));
+ msg_puts(_(" dated: "));
x = st.st_mtime; /* Manx C can't do &st.st_mtime */
p = ctime(&x); /* includes '\n' */
if (p == NULL)
- MSG_PUTS("(invalid)\n");
+ msg_puts("(invalid)\n");
else
- MSG_PUTS(p);
+ msg_puts(p);
}
/*
@@ -2131,47 +2131,47 @@ swapfile_info(char_u *fname)
{
if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
{
- MSG_PUTS(_(" [from Vim version 3.0]"));
+ msg_puts(_(" [from Vim version 3.0]"));
}
else if (ml_check_b0_id(&b0) == FAIL)
{
- MSG_PUTS(_(" [does not look like a Vim swap file]"));
+ msg_puts(_(" [does not look like a Vim swap file]"));
}
else
{
- MSG_PUTS(_(" file name: "));
+ msg_puts(_(" file name: "));
if (b0.b0_fname[0] == NUL)
- MSG_PUTS(_("[No Name]"));
+ msg_puts(_("[No Name]"));
else
msg_outtrans(b0.b0_fname);
- MSG_PUTS(_("\n modified: "));
- MSG_PUTS(b0.b0_dirty ? _("YES") : _("no"));
+ msg_puts(_("\n modified: "));
+ msg_puts(b0.b0_dirty ? _("YES") : _("no"));
if (*(b0.b0_uname) != NUL)
{
- MSG_PUTS(_("\n user name: "));
+ msg_puts(_("\n user name: "));
msg_outtrans(b0.b0_uname);
}
if (*(b0.b0_hname) != NUL)
{
if (*(b0.b0_uname) != NUL)
- MSG_PUTS(_(" host name: "));
+ msg_puts(_(" host name: "));
else
- MSG_PUTS(_("\n host name: "));
+ msg_puts(_("\n host name: "));
msg_outtrans(b0.b0_hname);
}
if (char_to_long(b0.b0_pid) != 0L)
{
- MSG_PUTS(_("\n process ID: "));
+ msg_puts(_("\n process ID: "));
msg_outnum(char_to_long(b0.b0_pid));
#if defined(UNIX)
/* EMX kill() not working correctly, it seems */
if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0)
{
- MSG_PUTS(_(" (STILL RUNNING)"));
+ msg_puts(_(" (STILL RUNNING)"));
# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
process_still_running = TRUE;
# endif
@@ -2183,19 +2183,19 @@ swapfile_info(char_u *fname)
{
#if defined(MSWIN)
if (STRNCMP(b0.b0_hname, "PC ", 3) == 0)
- MSG_PUTS(_("\n [not usable with this version of Vim]"));
+ msg_puts(_("\n [not usable with this version of Vim]"));
else
#endif
- MSG_PUTS(_("\n [not usable on this computer]"));
+ msg_puts(_("\n [not usable on this computer]"));
}
}
}
else
- MSG_PUTS(_(" [cannot be read]"));
+ msg_puts(_(" [cannot be read]"));
close(fd);
}
else
- MSG_PUTS(_(" [cannot be opened]"));
+ msg_puts(_(" [cannot be opened]"));
msg_putchar('\n');
return x;
@@ -2414,7 +2414,7 @@ theend:
if (message)
{
if (status == OK)
- MSG(_("File preserved"));
+ msg(_("File preserved"));
else
emsg(_("E314: Preserve failed"));
}
@@ -4373,39 +4373,39 @@ attention_message(
++no_wait_return;
(void)emsg(_("E325: ATTENTION"));
- MSG_PUTS(_("\nFound a swap file by the name \""));
+ msg_puts(_("\nFound a swap file by the name \""));
msg_home_replace(fname);
- MSG_PUTS("\"\n");
+ msg_puts("\"\n");
sx = swapfile_info(fname);
- MSG_PUTS(_("While opening file \""));
+ msg_puts(_("While opening file \""));
msg_outtrans(buf->b_fname);
- MSG_PUTS("\"\n");
+ msg_puts("\"\n");
if (mch_stat((char *)buf->b_fname, &st) == -1)
{
- MSG_PUTS(_(" CANNOT BE FOUND"));
+ msg_puts(_(" CANNOT BE FOUND"));
}
else
{
- MSG_PUTS(_(" dated: "));
+ msg_puts(_(" dated: "));
x = st.st_mtime; /* Manx C can't do &st.st_mtime */
p = ctime(&x); /* includes '\n' */
if (p == NULL)
- MSG_PUTS("(invalid)\n");
+ msg_puts("(invalid)\n");
else
- MSG_PUTS(p);
+ msg_puts(p);
if (sx != 0 && x > sx)
- MSG_PUTS(_(" NEWER than swap file!\n"));
+ msg_puts(_(" NEWER than swap file!\n"));
}
/* Some of these messages are long to allow translation to
* other languages. */
- MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n"));
- MSG_PUTS(_("(2) An edit session for this file crashed.\n"));
- MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r "));
+ msg_puts(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n"));
+ msg_puts(_("(2) An edit session for this file crashed.\n"));
+ msg_puts(_(" If this is the case, use \":recover\" or \"vim -r "));
msg_outtrans(buf->b_fname);
- MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n"));
- MSG_PUTS(_(" If you did this already, delete the swap file \""));
+ msg_puts(_("\"\n to recover the changes (see \":help recovery\").\n"));
+ msg_puts(_(" If you did this already, delete the swap file \""));
msg_outtrans(fname);
- MSG_PUTS(_("\"\n to avoid this message.\n"));
+ msg_puts(_("\"\n to avoid this message.\n"));
cmdline_row = msg_row;
--no_wait_return;
}
@@ -4890,7 +4890,7 @@ findswapname(
else
#endif
{
- MSG_PUTS("\n");
+ msg_puts("\n");
if (msg_silent == 0)
/* call wait_return() later */
need_wait_return = TRUE;
diff --git a/src/menu.c b/src/menu.c
index a5c24c269..7c934ea43 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1151,7 +1151,7 @@ show_menus(char_u *path_name, int modes)
/* Now we have found the matching menu, and we list the mappings */
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Menus ---"));
+ msg_puts_title(_("\n--- Menus ---"));
show_menus_recursive(parent, modes, 0);
return OK;
@@ -1175,11 +1175,11 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth)
if (got_int) /* "q" hit for "--more--" */
return;
for (i = 0; i < depth; i++)
- MSG_PUTS(" ");
+ msg_puts(" ");
if (menu->priority)
{
msg_outnum((long)menu->priority);
- MSG_PUTS(" ");
+ msg_puts(" ");
}
/* Same highlighting as for directories!? */
msg_outtrans_attr(menu->name, HL_ATTR(HLF_D));
@@ -1194,8 +1194,8 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth)
if (got_int) /* "q" hit for "--more--" */
return;
for (i = 0; i < depth + 2; i++)
- MSG_PUTS(" ");
- msg_puts((char_u*)menu_mode_chars[bit]);
+ msg_puts(" ");
+ msg_puts(menu_mode_chars[bit]);
if (menu->noremap[bit] == REMAP_NONE)
msg_putchar('*');
else if (menu->noremap[bit] == REMAP_SCRIPT)
@@ -1210,9 +1210,9 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth)
msg_putchar('-');
else
msg_putchar(' ');
- MSG_PUTS(" ");
+ msg_puts(" ");
if (*menu->strings[bit] == NUL)
- msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
+ msg_puts_attr("<Nop>", HL_ATTR(HLF_8));
else
msg_outtrans_special(menu->strings[bit], FALSE);
}
diff --git a/src/message.c b/src/message.c
index 9969632dd..448173c0b 100644
--- a/src/message.c
+++ b/src/message.c
@@ -19,7 +19,7 @@
static void add_msg_hist(char_u *s, int len, int attr);
static void hit_return_msg(void);
static void msg_home_replace_attr(char_u *fname, int attr);
-static void msg_puts_attr_len(char_u *str, int maxlen, int attr);
+static void msg_puts_attr_len(char *str, int maxlen, int attr);
static void msg_puts_display(char_u *str, int maxlen, int attr, int recurse);
static void msg_scroll_up(void);
static void inc_msg_scrolled(void);
@@ -96,7 +96,7 @@ static int verbose_did_open = FALSE;
* return TRUE if wait_return not called
*/
int
-msg(char_u *s)
+msg(char *s)
{
return msg_attr_keep(s, 0, FALSE);
}
@@ -107,7 +107,7 @@ msg(char_u *s)
* Like msg() but keep it silent when 'verbosefile' is set.
*/
int
-verb_msg(char_u *s)
+verb_msg(char *s)
{
int n;
@@ -120,14 +120,14 @@ verb_msg(char_u *s)
#endif
int
-msg_attr(char_u *s, int attr)
+msg_attr(char *s, int attr)
{
return msg_attr_keep(s, attr, FALSE);
}
int
msg_attr_keep(
- char_u *s,
+ char *s,
int attr,
int keep) /* TRUE: set keep_msg if it doesn't scroll */
{
@@ -137,12 +137,12 @@ msg_attr_keep(
/* Skip messages not matching ":filter pattern".
* Don't filter when there is an error. */
- if (!emsg_on_display && message_filtered(s))
+ if (!emsg_on_display && message_filtered((char_u *)s))
return TRUE;
#ifdef FEAT_EVAL
if (attr == 0)
- set_vim_var_string(VV_STATUSMSG, s, -1);
+ set_vim_var_string(VV_STATUSMSG, (char_u *)s, -1);
#endif
/*
@@ -156,12 +156,12 @@ msg_attr_keep(
/* Add message to history (unless it's a repeated kept message or a
* truncated message) */
- if (s != keep_msg
+ if ((char_u *)s != keep_msg
|| (*s != '<'
&& last_msg_hist != NULL
&& last_msg_hist->msg != NULL
&& STRCMP(s, last_msg_hist->msg)))
- add_msg_hist(s, -1, attr);
+ add_msg_hist((char_u *)s, -1, attr);
#ifdef FEAT_JOB_CHANNEL
if (emsg_to_channel_log)
@@ -171,22 +171,22 @@ msg_attr_keep(
/* When displaying keep_msg, don't let msg_start() free it, caller must do
* that. */
- if (s == keep_msg)
+ if ((char_u *)s == keep_msg)
keep_msg = NULL;
/* Truncate the message if needed. */
msg_start();
- buf = msg_strtrunc(s, FALSE);
+ buf = msg_strtrunc((char_u *)s, FALSE);
if (buf != NULL)
- s = buf;
+ s = (char *)buf;
- msg_outtrans_attr(s, attr);
+ msg_outtrans_attr((char_u *)s, attr);
msg_clr_eos();
retval = msg_end();
- if (keep && retval && vim_strsize(s) < (int)(Rows - cmdline_row - 1)
- * Columns + sc_col)
- set_keep_msg(s, 0);
+ if (keep && retval && vim_strsize((char_u *)s)
+ < (int)(Rows - cmdline_row - 1) * Columns + sc_col)
+ set_keep_msg((char_u *)s, 0);
vim_free(buf);
--entered;
@@ -376,7 +376,7 @@ smsg(const char *s, ...)
va_start(arglist, s);
vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
va_end(arglist);
- return msg(IObuff);
+ return msg((char *)IObuff);
}
int
@@ -390,7 +390,7 @@ smsg_attr(int attr, const char *s, ...)
va_start(arglist, s);
vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
va_end(arglist);
- return msg_attr(IObuff, attr);
+ return msg_attr((char *)IObuff, attr);
}
int
@@ -404,7 +404,7 @@ smsg_attr_keep(int attr, const char *s, ...)
va_start(arglist, s);
vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
va_end(arglist);
- return msg_attr_keep(IObuff, attr, TRUE);
+ return msg_attr_keep((char *)IObuff, attr, TRUE);
}
#endif
@@ -502,13 +502,13 @@ msg_source(int attr)
p = get_emsg_source();
if (p != NULL)
{
- msg_attr(p, attr);
+ msg_attr((char *)p, attr);
vim_free(p);
}
p = get_emsg_lnum();
if (p != NULL)
{
- msg_attr(p, HL_ATTR(HLF_N));
+ msg_attr((char *)p, HL_ATTR(HLF_N));
vim_free(p);
last_sourcing_lnum = sourcing_lnum; /* only once for each line */
}
@@ -611,7 +611,7 @@ emsg_core(char_u *s)
/* When testing some errors are turned into a normal message. */
if (ignore_error(s))
/* don't call msg() if it results in a dialog */
- return msg_use_printf() ? FALSE : msg(s);
+ return msg_use_printf() ? FALSE : msg((char *)s);
#endif
called_emsg = TRUE;
@@ -716,7 +716,7 @@ emsg_core(char_u *s)
* Display the error message itself.
*/
msg_nowait = FALSE; /* wait for this msg */
- r = msg_attr(s, attr);
+ r = msg_attr((char *)s, attr);
#ifdef FEAT_JOB_CHANNEL
emsg_to_channel_log = FALSE;
@@ -817,22 +817,23 @@ emsg_invreg(int name)
* Careful: The string may be changed by msg_may_trunc()!
* Returns a pointer to the printed message, if wait_return() not called.
*/
- char_u *
-msg_trunc_attr(char_u *s, int force, int attr)
+ char *
+msg_trunc_attr(char *s, int force, int attr)
{
int n;
+ char *ts;
/* Add message to history before truncating */
- add_msg_hist(s, -1, attr);
+ add_msg_hist((char_u *)s, -1, attr);
- s = msg_may_trunc(force, s);
+ ts = (char *)msg_may_trunc(force, (char_u *)s);
msg_hist_off = TRUE;
- n = msg_attr(s, attr);
+ n = msg_attr(ts, attr);
msg_hist_off = FALSE;
if (n)
- return s;
+ return ts;
return NULL;
}
@@ -983,7 +984,7 @@ ex_messages(exarg_T *eap)
if (s != NULL && *s != NUL)
// The next comment is extracted by xgettext and put in po file for
// translators to read.
- msg_attr((char_u *)
+ msg_attr(
// Translator: Please replace the name and email address
// with the appropriate text for your translation.
_("Messages maintainer: Bram Moolenaar <Bram@vim.org>"),
@@ -993,7 +994,7 @@ ex_messages(exarg_T *eap)
/* Display what was not skipped. */
for (; p != NULL && !got_int; p = p->next)
if (p->msg != NULL)
- msg_attr(p->msg, p->attr);
+ msg_attr((char *)p->msg, p->attr);
msg_hist_off = FALSE;
}
@@ -1016,10 +1017,10 @@ msg_end_prompt(void)
#endif
/*
- * wait for the user to hit a key (normally a return)
- * if 'redraw' is TRUE, clear and redraw the screen
- * if 'redraw' is FALSE, just redraw the screen
- * if 'redraw' is -1, don't redraw at all
+ * Wait for the user to hit a key (normally Enter).
+ * If "redraw" is TRUE, clear and redraw the screen.
+ * If "redraw" is FALSE, just redraw the screen.
+ * If "redraw" is -1, don't redraw at all.
*/
void
wait_return(int redraw)
@@ -1065,7 +1066,7 @@ wait_return(int redraw)
}
else if (exmode_active)
{
- MSG_PUTS(" "); /* make sure the cursor is on the right line */
+ msg_puts(" "); /* make sure the cursor is on the right line */
c = CAR; /* no need for a return in ex mode */
got_int = FALSE;
}
@@ -1281,9 +1282,9 @@ hit_return_msg(void)
if (msg_didout) /* start on a new line */
msg_putchar('\n');
if (got_int)
- MSG_PUTS(_("Interrupt: "));
+ msg_puts(_("Interrupt: "));
- MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
+ msg_puts_attr(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
if (!msg_use_printf())
msg_clr_eos();
p_more = save_p_more;
@@ -1388,9 +1389,9 @@ msg_putchar(int c)
msg_putchar_attr(int c, int attr)
{
#ifdef FEAT_MBYTE
- char_u buf[MB_MAXBYTES + 1];
+ char buf[MB_MAXBYTES + 1];
#else
- char_u buf[4];
+ char buf[4];
#endif
if (IS_SPECIAL(c))
@@ -1403,7 +1404,7 @@ msg_putchar_attr(int c, int attr)
else
{
#ifdef FEAT_MBYTE
- buf[(*mb_char2bytes)(c, buf)] = NUL;
+ buf[(*mb_char2bytes)(c, (char_u *)buf)] = NUL;
#else
buf[0] = c;
buf[1] = NUL;
@@ -1415,9 +1416,9 @@ msg_putchar_attr(int c, int attr)
void
msg_outnum(long n)
{
- char_u buf[20];
+ char buf[20];
- sprintf((char *)buf, "%ld", n);
+ sprintf(buf, "%ld", n);
msg_puts(buf);
}
@@ -1486,7 +1487,7 @@ msg_outtrans_one(char_u *p, int attr)
return p + l;
}
#endif
- msg_puts_attr(transchar_byte(*p), attr);
+ msg_puts_attr((char *)transchar_byte(*p), attr);
return p + 1;
}
@@ -1513,7 +1514,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
/* If the string starts with a composing character first draw a space on
* which the composing char can be drawn. */
if (enc_utf8 && utf_iscomposing(utf_ptr2char(msgstr)))
- msg_puts_attr((char_u *)" ", attr);
+ msg_puts_attr(" ", attr);
#endif
/*
@@ -1541,10 +1542,11 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
/* unprintable multi-byte char: print the printable chars so
* far and the translation of the unprintable char. */
if (str > plain_start)
- msg_puts_attr_len(plain_start, (int)(str - plain_start),
- attr);
+ msg_puts_attr_len((char *)plain_start,
+ (int)(str - plain_start), attr);
plain_start = str + mb_l;
- msg_puts_attr(transchar(c), attr == 0 ? HL_ATTR(HLF_8) : attr);
+ msg_puts_attr((char *)transchar(c),
+ attr == 0 ? HL_ATTR(HLF_8) : attr);
retval += char2cells(c);
}
len -= mb_l - 1;
@@ -1559,10 +1561,10 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
/* unprintable char: print the printable chars so far and the
* translation of the unprintable char. */
if (str > plain_start)
- msg_puts_attr_len(plain_start, (int)(str - plain_start),
- attr);
+ msg_puts_attr_len((char *)plain_start,
+ (int)(str - plain_start), attr);
plain_start = str + 1;
- msg_puts_attr(s, attr == 0 ? HL_ATTR(HLF_8) : attr);
+ msg_puts_attr((char *)s, attr == 0 ? HL_ATTR(HLF_8) : attr);
retval += (int)STRLEN(s);
}
else
@@ -1573,7 +1575,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
if (str > plain_start)
/* print the printable chars at the end */
- msg_puts_attr_len(plain_start, (int)(str - plain_start), attr);
+ msg_puts_attr_len((char *)plain_start, (int)(str - plain_start), attr);
return retval;
}
@@ -1619,7 +1621,7 @@ msg_outtrans_special(
{
char_u *str = strstart;
int retval = 0;
- char_u *string;
+ char *text;
int attr;
int len;
@@ -1629,16 +1631,16 @@ msg_outtrans_special(
/* Leading and trailing spaces need to be displayed in <> form. */
if ((str == strstart || str[1] == NUL) && *str == ' ')
{
- string = (char_u *)"<Space>";
+ text = "<Space>";
++str;
}
else
- string = str2special(&str, from);
- len = vim_strsize(string);
+ text = (char *)str2special(&str, from);
+ len = vim_strsize((char_u *)text);
/* Highlight special keys */
- msg_puts_attr(string, len > 1
+ msg_puts_attr(text, len > 1
#ifdef FEAT_MBYTE
- && (*mb_ptr2len)(string) <= 1
+ && (*mb_ptr2len)((char_u *)text) <= 1
#endif
? attr : 0);
retval += len;
@@ -1825,7 +1827,7 @@ msg_prt_line(char_u *s, int list)
mch_memmove(buf, s, (size_t)l);
buf[l] = NUL;
}
- msg_puts(buf);
+ msg_puts((char *)buf);
s += l;
continue;
}
@@ -1957,14 +1959,13 @@ screen_puts_mbyte(char_u *s, int l, int attr)
* Update msg_row and msg_col for the next message.
*/
void
-msg_puts(char_u *s)
+msg_puts(char *s)
{
msg_puts_attr(s, 0);
}
void
-msg_puts_title(
- char_u *s)
+msg_puts_title(char *s)
{
msg_puts_attr(s, HL_ATTR(HLF_T));
}
@@ -1975,13 +1976,13 @@ msg_puts_title(
* Does not handle multi-byte characters!
*/
void
-msg_puts_long_attr(char_u *longstr, int attr)
+msg_outtrans_long_attr(char_u *longstr, int attr)
{
- msg_puts_long_len_attr(longstr, (int)STRLEN(longstr), attr);
+ msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
}
void
-msg_puts_long_len_attr(char_u *longstr, int len, int attr)
+msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
{
int slen = len;
int room;
@@ -1991,7 +1992,7 @@ msg_puts_long_len_attr(char_u *longstr, int len, int attr)
{
slen = (room - 3) / 2;
msg_outtrans_len_attr(longstr, slen, attr);
- msg_puts_attr((char_u *)"...", HL_ATTR(HLF_8));
+ msg_puts_attr("...", HL_ATTR(HLF_8));
}
msg_outtrans_len_attr(longstr + len - slen, slen, attr);
}
@@ -2000,7 +2001,7 @@ msg_puts_long_len_attr(char_u *longstr, int len, int attr)
* Basic function for writing a message with highlight attributes.
*/
void
-msg_puts_attr(char_u *s, int attr)
+msg_puts_attr(char *s, int attr)
{
msg_puts_attr_len(s, -1, attr);
}
@@ -2011,12 +2012,12 @@ msg_puts_attr(char_u *s, int attr)
* When "maxlen" is >= 0 the message is not put in the history.
*/
static void
-msg_puts_attr_len(char_u *str, int maxlen, int attr)
+msg_puts_attr_len(char *str, int maxlen, int attr)
{
/*
* If redirection is on, also write to the redirection file.
*/
- redir_write(str, maxlen);
+ redir_write((char_u *)str, maxlen);
/*
* Don't print anything when using ":silent cmd".
@@ -2027,7 +2028,7 @@ msg_puts_attr_len(char_u *str, int maxlen, int attr)
/* if MSG_HIST flag set, add message to history */
if ((attr & MSG_HIST) && maxlen < 0)
{
- add_msg_hist(str, -1, attr);
+ add_msg_hist((char_u *)str, -1, attr);
attr &= ~MSG_HIST;
}
@@ -2049,9 +2050,9 @@ msg_puts_attr_len(char_u *str, int maxlen, int attr)
* cursor is.
*/
if (msg_use_printf())
- msg_puts_printf(str, maxlen);
+ msg_puts_printf((char_u *)str, maxlen);
else
- msg_puts_display(str, maxlen, attr, FALSE);
+ msg_puts_display((char_u *)str, maxlen, attr, FALSE);
}
/*
@@ -3497,7 +3498,7 @@ give_warning(char_u *message, int hl)
keep_msg_attr = HL_ATTR(HLF_W);
else
keep_msg_attr = 0;
- if (msg_attr(message, keep_msg_attr) && msg_scrolled == 0)
+ if (msg_attr((char *)message, keep_msg_attr) && msg_scrolled == 0)
set_keep_msg(message, keep_msg_attr);
msg_didout = FALSE; /* overwrite this message */
msg_nowait = TRUE; /* don't wait for this message */
@@ -3891,7 +3892,7 @@ display_confirm_msg(void)
/* avoid that 'q' at the more prompt truncates the message here */
++confirm_msg_used;
if (confirm_msg != NULL)
- msg_puts_attr(confirm_msg, HL_ATTR(HLF_M));
+ msg_puts_attr((char *)confirm_msg, HL_ATTR(HLF_M));
--confirm_msg_used;
}
diff --git a/src/misc1.c b/src/misc1.c
index a4b56286a..4c9bd2fed 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3468,7 +3468,7 @@ change_warning(
if (msg_row == Rows - 1)
msg_col = col;
msg_source(HL_ATTR(HLF_W));
- MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
+ msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
#ifdef FEAT_EVAL
set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
#endif
@@ -3742,7 +3742,7 @@ get_number(
{
if (typed > 0)
{
- MSG_PUTS("\b \b");
+ msg_puts("\b \b");
--typed;
}
n /= 10;
@@ -3786,9 +3786,9 @@ prompt_for_number(int *mouse_used)
/* When using ":silent" assume that <CR> was entered. */
if (mouse_used != NULL)
- MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): "));
+ msg_puts(_("Type number and <Enter> or click with mouse (empty cancels): "));
else
- MSG_PUTS(_("Type number and <Enter> (empty cancels): "));
+ msg_puts(_("Type number and <Enter> (empty cancels): "));
// Set the state such that text can be selected/copied/pasted and we still
// get mouse events. redraw_after_callback() will not redraw if cmdline_row
@@ -3846,16 +3846,17 @@ msgmore(long n)
if (pn > p_report)
{
if (n > 0)
- vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+ vim_snprintf(msg_buf, MSG_BUF_LEN,
NGETTEXT("%ld more line", "%ld more lines", pn), pn);
else
- vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+ vim_snprintf(msg_buf, MSG_BUF_LEN,
NGETTEXT("%ld line less", "%ld fewer lines", pn), pn);
if (got_int)
- vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
+ vim_strcat((char_u *)msg_buf, (char_u *)_(" (Interrupted)"),
+ MSG_BUF_LEN);
if (msg(msg_buf))
{
- set_keep_msg(msg_buf, 0);
+ set_keep_msg((char_u *)msg_buf, 0);
keep_msg_more = TRUE;
}
}
@@ -3936,7 +3937,7 @@ vim_beep(
if (vim_strchr(p_debug, 'e') != NULL)
{
msg_source(HL_ATTR(HLF_W));
- msg_attr((char_u *)_("Beep!"), HL_ATTR(HLF_W));
+ msg_attr(_("Beep!"), HL_ATTR(HLF_W));
}
}
}
diff --git a/src/misc2.c b/src/misc2.c
index 55a901ff8..214a3a2bd 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4670,7 +4670,7 @@ vim_findfile(void *search_ctx_arg)
smsg("Already Searched: %s (%s)",
stackp->ffs_fix_path, stackp->ffs_wc_path);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
#endif
@@ -4684,7 +4684,7 @@ vim_findfile(void *search_ctx_arg)
smsg("Searching: %s (%s)",
stackp->ffs_fix_path, stackp->ffs_wc_path);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
#endif
@@ -4903,7 +4903,7 @@ vim_findfile(void *search_ctx_arg)
smsg("Already: %s",
file_path);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
continue;
@@ -4930,7 +4930,7 @@ vim_findfile(void *search_ctx_arg)
verbose_enter_scroll();
smsg("HIT: %s", file_path);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
#endif
@@ -5131,7 +5131,7 @@ ff_get_visited_list(
smsg("ff_get_visited_list: FOUND list for %s",
filename);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
#endif
@@ -5147,7 +5147,7 @@ ff_get_visited_list(
verbose_enter_scroll();
smsg("ff_get_visited_list: new list for %s", filename);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
#endif
diff --git a/src/netbeans.c b/src/netbeans.c
index 823bdaed7..b36d8680c 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -3437,7 +3437,7 @@ print_read_msg(nbbuf_T *buf)
/* Now display it */
VIM_CLEAR(keep_msg);
msg_scrolled_ign = TRUE;
- msg_trunc_attr(IObuff, FALSE, 0);
+ msg_trunc_attr((char *)IObuff, FALSE, 0);
msg_scrolled_ign = FALSE;
}
@@ -3464,7 +3464,7 @@ print_save_msg(nbbuf_T *buf, off_T nchars)
VIM_CLEAR(keep_msg);
msg_scrolled_ign = TRUE;
- p = msg_trunc_attr(IObuff, FALSE, 0);
+ p = (char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0);
if ((msg_scrolled && !need_wait_return) || !buf->initDone)
{
/* Need to repeat the message after redrawing when:
diff --git a/src/normal.c b/src/normal.c
index b7bd864c0..157acbc1f 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1207,7 +1207,7 @@ getcount:
update_screen(0);
/* now reset it, otherwise it's put in the history again */
keep_msg = kmsg;
- msg_attr(kmsg, keep_msg_attr);
+ msg_attr((char *)kmsg, keep_msg_attr);
vim_free(kmsg);
}
setcursor();
@@ -3274,7 +3274,7 @@ check_visual_highlight(void)
if (full_screen)
{
if (!did_check && HL_ATTR(HLF_V) == 0)
- MSG(_("Warning: terminal cannot highlight"));
+ msg(_("Warning: terminal cannot highlight"));
did_check = TRUE;
}
}
@@ -6468,7 +6468,7 @@ nv_brackets(cmdarg_T *cap)
cap->oap->inclusive = FALSE;
old_pos = curwin->w_cursor;
#ifdef FEAT_VIRTUALEDIT
- curwin->w_cursor.coladd = 0; /* TODO: don't do this for an error. */
+ curwin->w_cursor.coladd = 0; // TODO: don't do this for an error.
#endif
#ifdef FEAT_SEARCHPATH
@@ -6491,11 +6491,11 @@ nv_brackets(cmdarg_T *cap)
* define "]d" "[d" "]D" "[D" "]^D" "[^D"
*/
if (vim_strchr((char_u *)
-#ifdef EBCDIC
+# ifdef EBCDIC
"iI\005dD\067",
-#else
+# else
"iI\011dD\004",
-#endif
+# endif
cap->nchar) != NULL)
{
char_u *ptr;
@@ -9027,7 +9027,7 @@ nv_esc(cmdarg_T *cap)
#endif
&& !VIsual_active
&& no_reason)
- MSG(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
+ msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
/* Don't reset "restart_edit" when 'insertmode' is set, it won't be
* set again below when halfway a mapping. */
diff --git a/src/ops.c b/src/ops.c
index 3818b68e5..9ee233950 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -302,7 +302,7 @@ op_shift(oparg_T *oap, int curs_top, int amount)
vim_snprintf((char *)IObuff, IOSIZE,
NGETTEXT(msg_line_single, msg_line_plural, oap->line_count),
oap->line_count, op, amount);
- msg(IObuff);
+ msg((char *)IObuff);
}
/*
@@ -1112,7 +1112,7 @@ do_record(int c)
* adds the escaping back later.
*/
reg_recording = 0;
- MSG("");
+ msg("");
p = get_recorded();
if (p == NULL)
retval = FAIL;
@@ -3049,7 +3049,7 @@ free_yank(long n)
VIM_CLEAR(y_current->y_array);
#ifdef AMIGA
if (n >= 1000)
- MSG("");
+ msg("");
#endif
}
}
@@ -4285,7 +4285,7 @@ ex_display(exarg_T *eap)
attr = HL_ATTR(HLF_8);
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Registers ---"));
+ msg_puts_title(_("\n--- Registers ---"));
for (i = -1; i < NUM_REGISTERS && !got_int; ++i)
{
name = get_register_name(i);
@@ -4327,14 +4327,14 @@ ex_display(exarg_T *eap)
msg_putchar('\n');
msg_putchar('"');
msg_putchar(name);
- MSG_PUTS(" ");
+ msg_puts(" ");
n = (int)Columns - 6;
for (j = 0; j < yb->y_size && n > 1; ++j)
{
if (j)
{
- MSG_PUTS_ATTR("^J", attr);
+ msg_puts_attr("^J", attr);
n -= 2;
}
for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
@@ -4349,7 +4349,7 @@ ex_display(exarg_T *eap)
}
}
if (n > 1 && yb->y_type == MLINE)
- MSG_PUTS_ATTR("^J", attr);
+ msg_puts_attr("^J", attr);
out_flush(); /* show one line at a time */
}
ui_breakcheck();
@@ -4361,7 +4361,7 @@ ex_display(exarg_T *eap)
if ((p = get_last_insert()) != NULL
&& (arg == NULL || vim_strchr(arg, '.') != NULL) && !got_int)
{
- MSG_PUTS("\n\". ");
+ msg_puts("\n\". ");
dis_msg(p, TRUE);
}
@@ -4371,7 +4371,7 @@ ex_display(exarg_T *eap)
if (last_cmdline != NULL && (arg == NULL || vim_strchr(arg, ':') != NULL)
&& !got_int)
{
- MSG_PUTS("\n\": ");
+ msg_puts("\n\": ");
dis_msg(last_cmdline, FALSE);
}
@@ -4381,7 +4381,7 @@ ex_display(exarg_T *eap)
if (curbuf->b_fname != NULL
&& (arg == NULL || vim_strchr(arg, '%') != NULL) && !got_int)
{
- MSG_PUTS("\n\"% ");
+ msg_puts("\n\"% ");
dis_msg(curbuf->b_fname, FALSE);
}
@@ -4395,7 +4395,7 @@ ex_display(exarg_T *eap)
if (buflist_name_nr(0, &fname, &dummy) != FAIL)
{
- MSG_PUTS("\n\"# ");
+ msg_puts("\n\"# ");
dis_msg(fname, FALSE);
}
}
@@ -4406,7 +4406,7 @@ ex_display(exarg_T *eap)
if (last_search_pat() != NULL
&& (arg == NULL || vim_strchr(arg, '/') != NULL) && !got_int)
{
- MSG_PUTS("\n\"/ ");
+ msg_puts("\n\"/ ");
dis_msg(last_search_pat(), FALSE);
}
@@ -4417,7 +4417,7 @@ ex_display(exarg_T *eap)
if (expr_line != NULL && (arg == NULL || vim_strchr(arg, '=') != NULL)
&& !got_int)
{
- MSG_PUTS("\n\"= ");
+ msg_puts("\n\"= ");
dis_msg(expr_line, FALSE);
}
#endif
@@ -7401,7 +7401,7 @@ cursor_pos_info(dict_T *dict)
{
if (dict == NULL)
{
- MSG(_(no_lines_msg));
+ msg(_(no_lines_msg));
return;
}
}
@@ -7615,7 +7615,7 @@ cursor_pos_info(dict_T *dict)
/* Don't shorten this message, the user asked for it. */
p = p_shm;
p_shm = (char_u *)"";
- msg(IObuff);
+ msg((char *)IObuff);
p_shm = p;
}
}
diff --git a/src/option.c b/src/option.c
index ec058e97d..3be4447dd 100644
--- a/src/option.c
+++ b/src/option.c
@@ -8885,7 +8885,7 @@ set_bool_option(
static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
msg_source(HL_ATTR(HLF_W));
- MSG_ATTR(_(w_arabic), HL_ATTR(HLF_W));
+ msg_attr(_(w_arabic), HL_ATTR(HLF_W));
#ifdef FEAT_EVAL
set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
#endif
@@ -10152,13 +10152,13 @@ showoptions(
/* Highlight title */
if (all == 2)
- MSG_PUTS_TITLE(_("\n--- Terminal codes ---"));
+ msg_puts_title(_("\n--- Terminal codes ---"));
else if (opt_flags & OPT_GLOBAL)
- MSG_PUTS_TITLE(_("\n--- Global option values ---"));
+ msg_puts_title(_("\n--- Global option values ---"));
else if (opt_flags & OPT_LOCAL)
- MSG_PUTS_TITLE(_("\n--- Local option values ---"));
+ msg_puts_title(_("\n--- Local option values ---"));
else
- MSG_PUTS_TITLE(_("\n--- Options ---"));
+ msg_puts_title(_("\n--- Options ---"));
/*
* do the loop two times:
@@ -10276,12 +10276,12 @@ showoneopt(
/* for 'modified' we also need to check if 'ff' or 'fenc' changed. */
if ((p->flags & P_BOOL) && ((int *)varp == &curbuf->b_changed
? !curbufIsChanged() : !*(int *)varp))
- MSG_PUTS("no");
+ msg_puts("no");
else if ((p->flags & P_BOOL) && *(int *)varp < 0)
- MSG_PUTS("--");
+ msg_puts("--");
else
- MSG_PUTS(" ");
- MSG_PUTS(p->fullname);
+ msg_puts(" ");
+ msg_puts(p->fullname);
if (!(p->flags & P_BOOL))
{
msg_putchar('=');
diff --git a/src/os_amiga.c b/src/os_amiga.c
index 1cd1a191a..de8bf190a 100644
--- a/src/os_amiga.c
+++ b/src/os_amiga.c
@@ -1230,10 +1230,10 @@ mch_call_shell(
if (x < 0)
# endif
{
- MSG_PUTS(_("Cannot execute "));
+ msg_puts(_("Cannot execute "));
if (cmd == NULL)
{
- MSG_PUTS(_("shell "));
+ msg_puts(_("shell "));
msg_outtrans(p_sh);
}
else
@@ -1253,7 +1253,7 @@ mch_call_shell(
{
msg_putchar('\n');
msg_outnum((long)x);
- MSG_PUTS(_(" returned\n"));
+ msg_puts(_(" returned\n"));
}
retval = x;
}
@@ -1320,7 +1320,7 @@ mch_call_shell(
if (x < 0)
# endif
{
- MSG_PUTS(_("Cannot execute "));
+ msg_puts(_("Cannot execute "));
if (use_execute)
{
if (cmd == NULL)
@@ -1330,7 +1330,7 @@ mch_call_shell(
}
else
{
- MSG_PUTS(_("shell "));
+ msg_puts(_("shell "));
msg_outtrans(shellcmd);
}
msg_putchar('\n');
@@ -1355,7 +1355,7 @@ mch_call_shell(
{
msg_putchar('\n');
msg_outnum((long)x);
- MSG_PUTS(_(" returned\n"));
+ msg_puts(_(" returned\n"));
}
retval = x;
}
diff --git a/src/os_unix.c b/src/os_unix.c
index b8a92d930..242d60e1a 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1790,7 +1790,7 @@ test_x11_window(Display *dpy)
(void)XSetErrorHandler(old_handler);
if (p_verbose > 0 && got_x_error)
- verb_msg((char_u *)_("Testing the X display failed"));
+ verb_msg(_("Testing the X display failed"));
return (got_x_error ? FAIL : OK);
}
@@ -2660,7 +2660,7 @@ mch_FullName(
if (p_verbose >= 5)
{
verbose_enter();
- MSG("fchdir() to previous dir");
+ msg("fchdir() to previous dir");
verbose_leave();
}
l = fchdir(fd);
@@ -2869,14 +2869,14 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
if (errno == EOPNOTSUPP)
return;
- MSG_PUTS(_("\nCould not get security context for "));
+ msg_puts(_("\nCould not get security context for "));
msg_outtrans(from_file);
msg_putchar('\n');
return;
}
if (getfilecon((char *)to_file, &to_context) < 0)
{
- MSG_PUTS(_("\nCould not get security context for "));
+ msg_puts(_("\nCould not get security context for "));
msg_outtrans(to_file);
msg_putchar('\n');
freecon (from_context);
@@ -2886,7 +2886,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
{
if (setfilecon((char *)to_file, from_context) < 0)
{
- MSG_PUTS(_("\nCould not set security context for "));
+ msg_puts(_("\nCould not set security context for "));
msg_outtrans(to_file);
msg_putchar('\n');
}
@@ -2957,7 +2957,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
vim_snprintf((char *)IObuff, IOSIZE,
_("Could not get security context %s for %s. Removing it!"),
name, from_file);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
msg_putchar('\n');
/* FALLTHROUGH to remove the attribute */
@@ -4505,10 +4505,10 @@ mch_call_shell_system(
if (emsg_silent)
;
else if (x == 127)
- MSG_PUTS(_("\nCannot execute shell sh\n"));
+ msg_puts(_("\nCannot execute shell sh\n"));
else if (x && !(options & SHELL_SILENT))
{
- MSG_PUTS(_("\nshell returned "));
+ msg_puts(_("\nshell returned "));
msg_outnum((long)x);
msg_putchar('\n');
}
@@ -4605,7 +4605,7 @@ mch_call_shell_fork(
}
if (pipe_error)
{
- MSG_PUTS(_("\nCannot create pipes\n"));
+ msg_puts(_("\nCannot create pipes\n"));
out_flush();
}
}
@@ -4625,7 +4625,7 @@ mch_call_shell_fork(
{
UNBLOCK_SIGNALS(&curset);
- MSG_PUTS(_("\nCannot fork\n"));
+ msg_puts(_("\nCannot fork\n"));
if ((options & (SHELL_READ|SHELL_WRITE))
# ifdef FEAT_GUI
|| (gui.in_use && show_shell_mess)
@@ -4877,7 +4877,7 @@ mch_call_shell_fork(
* external program. */
if ((wpid = fork()) == -1)
{
- MSG_PUTS(_("\nCannot fork\n"));
+ msg_puts(_("\nCannot fork\n"));
}
else if (wpid == 0) /* child */
{
@@ -5166,7 +5166,7 @@ mch_call_shell_fork(
}
c = *p;
*p = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
if (p < buffer + len)
{
*p = c;
@@ -5180,7 +5180,7 @@ mch_call_shell_fork(
else
{
buffer[len] = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
}
windgoto(msg_row, msg_col);
@@ -5360,20 +5360,20 @@ finished:
{
if (retval == EXEC_FAILED)
{
- MSG_PUTS(_("\nCannot execute shell "));
+ msg_puts(_("\nCannot execute shell "));
msg_outtrans(p_sh);
msg_putchar('\n');
}
else if (!(options & SHELL_SILENT))
{
- MSG_PUTS(_("\nshell returned "));
+ msg_puts(_("\nshell returned "));
msg_outnum((long)retval);
msg_putchar('\n');
}
}
}
else
- MSG_PUTS(_("\nCommand terminated\n"));
+ msg_puts(_("\nCommand terminated\n"));
}
}
@@ -6196,7 +6196,7 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
else if (fds[xsmp_idx].revents & POLLHUP)
{
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP lost ICE connection"));
+ verb_msg(_("XSMP lost ICE connection"));
xsmp_close();
}
if (--ret == 0)
@@ -6354,7 +6354,7 @@ select_eintr:
if (FD_ISSET(xsmp_icefd, &efds))
{
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP lost ICE connection"));
+ verb_msg(_("XSMP lost ICE connection"));
xsmp_close();
if (--ret == 0)
finished = FALSE; /* keep going if event was only one */
@@ -6714,7 +6714,7 @@ mch_expand_wildcards(
if (!(flags & EW_SILENT))
#endif
{
- MSG(_(e_wildexpand));
+ msg(_(e_wildexpand));
msg_start(); /* don't overwrite this message */
}
}
@@ -6734,7 +6734,7 @@ mch_expand_wildcards(
/* Something went wrong, perhaps a file name with a special char. */
if (!(flags & EW_SILENT))
{
- MSG(_(e_wildexpand));
+ msg(_(e_wildexpand));
msg_start(); /* don't overwrite this message */
}
vim_free(tempname);
@@ -7534,7 +7534,7 @@ setup_term_clip(void)
if (xterm_dpy == NULL)
{
if (p_verbose > 0)
- verb_msg((char_u *)_("Opening the X display failed"));
+ verb_msg(_("Opening the X display failed"));
return;
}
@@ -7872,7 +7872,7 @@ xsmp_handle_save_yourself(
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP handling save-yourself request"));
+ verb_msg(_("XSMP handling save-yourself request"));
# if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
/* Now see if we can ask about unsaved files */
@@ -7961,7 +7961,7 @@ xsmp_handle_requests(void)
{
/* Lost ICE */
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP lost ICE connection"));
+ verb_msg(_("XSMP lost ICE connection"));
xsmp_close();
return FAIL;
}
@@ -7984,7 +7984,7 @@ xsmp_init(void)
#endif
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP opening connection"));
+ verb_msg(_("XSMP opening connection"));
xsmp.save_yourself = xsmp.shutdown = False;
@@ -8003,7 +8003,7 @@ xsmp_init(void)
if (IceAddConnectionWatch(xsmp_ice_connection, &dummy) == 0)
{
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP ICE connection watch failed"));
+ verb_msg(_("XSMP ICE connection watch failed"));
return;
}
@@ -8028,7 +8028,7 @@ xsmp_init(void)
{
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
- verb_msg((char_u *)errorreport);
+ verb_msg(errorreport);
}
return;
}
diff --git a/src/os_win32.c b/src/os_win32.c
index e8c4916a8..3ea1fe321 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -4534,7 +4534,7 @@ dump_pipe(int options,
}
c = *p;
*p = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
if (p < buffer + len)
{
*p = c;
@@ -4548,7 +4548,7 @@ dump_pipe(int options,
else
{
buffer[len] = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
}
windgoto(msg_row, msg_col);
@@ -4607,7 +4607,7 @@ mch_system_piped(char *cmd, int options)
CloseHandle(g_hChildStd_IN_Wr);
CloseHandle(g_hChildStd_OUT_Rd);
CloseHandle(g_hChildStd_OUT_Wr);
- MSG_PUTS(_("\nCannot create pipes\n"));
+ msg_puts(_("\nCannot create pipes\n"));
}
si.cb = sizeof(si);
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 7d73f6c28..1e673e3c8 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -25,7 +25,7 @@ void *call_func_retstr(char_u *func, int argc, typval_T *argv);
void *call_func_retlist(char_u *func, int argc, typval_T *argv);
int eval_foldexpr(char_u *arg, int *cp);
void ex_let(exarg_T *eap);
-void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first);
+void list_hashtable_vars(hashtab_T *ht, char *prefix, int empty, int *first);
char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags);
void clear_lval(lval_T *lp);
void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip);
diff --git a/src/proto/message.pro b/src/proto/message.pro
index 588c3a7de..792ac5ddf 100644
--- a/src/proto/message.pro
+++ b/src/proto/message.pro
@@ -1,8 +1,8 @@
/* message.c */
-int msg(char_u *s);
-int verb_msg(char_u *s);
-int msg_attr(char_u *s, int attr);
-int msg_attr_keep(char_u *s, int attr, int keep);
+int msg(char *s);
+int verb_msg(char *s);
+int msg_attr(char *s, int attr);
+int msg_attr_keep(char *s, int attr, int keep);
char_u *msg_strtrunc(char_u *s, int force);
void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
void reset_last_sourcing(void);
@@ -11,21 +11,12 @@ int emsg_not_now(void);
void ignore_error_for_testing(char_u *error);
void do_perror(char *msg);
int emsg(char *s);
-
-int semsg(const char *s, ...)
-#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
- __attribute__((format(printf, 1, 2)))
-#endif
-;
+int semsg(const char *s, ...);
void iemsg(char *s);
-void siemsg(const char *s, ...)
-#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
- __attribute__((format(printf, 1, 2)))
-#endif
-;
+void siemsg(const char *s, ...);
void internal_error(char *where);
void emsg_invreg(int name);
-char_u *msg_trunc_attr(char_u *s, int force, int attr);
+char *msg_trunc_attr(char *s, int force, int attr);
char_u *msg_may_trunc(int force, char_u *s);
int delete_first_msg(void);
void ex_messages(exarg_T *eap);
@@ -51,11 +42,11 @@ char_u *str2special_save(char_u *str, int is_lhs);
char_u *str2special(char_u **sp, int from);
void str2specialbuf(char_u *sp, char_u *buf, int len);
void msg_prt_line(char_u *s, int list);
-void msg_puts(char_u *s);
-void msg_puts_title(char_u *s);
-void msg_puts_long_attr(char_u *longstr, int attr);
-void msg_puts_long_len_attr(char_u *longstr, int len, int attr);
-void msg_puts_attr(char_u *s, int attr);
+void msg_puts(char *s);
+void msg_puts_title(char *s);
+void msg_outtrans_long_attr(char_u *longstr, int attr);
+void msg_outtrans_long_len_attr(char_u *longstr, int len, int attr);
+void msg_puts_attr(char *s, int attr);
int message_filtered(char_u *msg);
void may_clear_sb_text(void);
void sb_text_start_cmdline(void);
diff --git a/src/quickfix.c b/src/quickfix.c
index 4e1e8e061..bc09053e1 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3149,7 +3149,7 @@ qf_jump_print_msg(
msg_scroll = TRUE;
else if (!msg_scrolled && shortmess(SHM_OVERALL))
msg_scroll = FALSE;
- msg_attr_keep(IObuff, 0, TRUE);
+ msg_attr_keep((char *)IObuff, 0, TRUE);
msg_scroll = i;
}
@@ -3422,7 +3422,7 @@ qf_list_entry(qfline_T *qfp, int qf_idx, int cursel)
msg_outtrans_attr(IObuff, cursel ? HL_ATTR(HLF_QFL) : qfFileAttr);
if (qfp->qf_lnum != 0)
- msg_puts_attr((char_u *)":", qfSepAttr);
+ msg_puts_attr(":", qfSepAttr);
if (qfp->qf_lnum == 0)
IObuff[0] = NUL;
else if (qfp->qf_col == 0)
@@ -3432,15 +3432,15 @@ qf_list_entry(qfline_T *qfp, int qf_idx, int cursel)
qfp->qf_lnum, qfp->qf_col);
sprintf((char *)IObuff + STRLEN(IObuff), "%s",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
- msg_puts_attr(IObuff, qfLineAttr);
- msg_puts_attr((char_u *)":", qfSepAttr);
+ msg_puts_attr((char *)IObuff, qfLineAttr);
+ msg_puts_attr(":", qfSepAttr);
if (qfp->qf_pattern != NULL)
{
qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
- msg_puts(IObuff);
- msg_puts_attr((char_u *)":", qfSepAttr);
+ msg_puts((char *)IObuff);
+ msg_puts_attr(":", qfSepAttr);
}
- msg_puts((char_u *)" ");
+ msg_puts(" ");
// Remove newlines and leading whitespace from the text. For an
// unrecognized line keep the indent, the compiler may mark a word
@@ -3601,7 +3601,7 @@ qf_msg(qf_info_T *qi, int which, char *lead)
vim_strcat(buf, (char_u *)title, IOSIZE);
}
trunc_string(buf, buf, Columns - 1, IOSIZE);
- msg(buf);
+ msg((char *)buf);
}
/*
@@ -3667,7 +3667,7 @@ qf_history(exarg_T *eap)
if (is_loclist_cmd(eap->cmdidx))
qi = GET_LOC_LIST(curwin);
if (qf_stack_empty(qi))
- MSG(_("No entries"));
+ msg(_("No entries"));
else
for (i = 0; i < qi->qf_listcount; ++i)
qf_msg(qi, i, i == qi->qf_curlist ? "> " : " ");
@@ -4653,7 +4653,7 @@ make_get_fullcmd(char_u *makecmd, char_u *fname)
if (msg_col == 0)
msg_didout = FALSE;
msg_start();
- MSG_PUTS(":!");
+ msg_puts(":!");
msg_outtrans(cmd); // show what we are doing
return cmd;
diff --git a/src/regexp.c b/src/regexp.c
index 06076fde5..accd10c50 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -8199,8 +8199,8 @@ report_re_switch(char_u *pat)
if (p_verbose > 0)
{
verbose_enter();
- MSG_PUTS(_("Switching to backtracking RE engine for pattern: "));
- MSG_PUTS(pat);
+ msg_puts(_("Switching to backtracking RE engine for pattern: "));
+ msg_puts((char *)pat);
verbose_leave();
}
}
diff --git a/src/screen.c b/src/screen.c
index 1b53ae2cd..4a8fce2c7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -10438,7 +10438,7 @@ showmode(void)
attr = HL_ATTR(HLF_CM); /* Highlight mode */
if (do_mode)
{
- MSG_PUTS_ATTR("--", attr);
+ msg_puts_attr("--", attr);
#if defined(FEAT_XIM)
if (
# ifdef FEAT_GUI_GTK
@@ -10448,9 +10448,9 @@ showmode(void)
# endif
)
# ifdef FEAT_GUI_GTK /* most of the time, it's not XIM being used */
- MSG_PUTS_ATTR(" IM", attr);
+ msg_puts_attr(" IM", attr);
# else
- MSG_PUTS_ATTR(" XIM", attr);
+ msg_puts_attr(" XIM", attr);
# endif
#endif
#if defined(FEAT_HANGULIN) && defined(FEAT_GUI)
@@ -10460,9 +10460,9 @@ showmode(void)
{
/* HANGUL */
if (enc_utf8)
- MSG_PUTS_ATTR(" \355\225\234\352\270\200", attr);
+ msg_puts_attr(" \355\225\234\352\270\200", attr);
else
- MSG_PUTS_ATTR(" \307\321\261\333", attr);
+ msg_puts_attr(" \307\321\261\333", attr);
}
}
#endif
@@ -10482,17 +10482,17 @@ showmode(void)
if (length - vim_strsize(edit_submode) > 0)
{
if (edit_submode_pre != NULL)
- msg_puts_attr(edit_submode_pre, attr);
- msg_puts_attr(edit_submode, attr);
+ msg_puts_attr((char *)edit_submode_pre, attr);
+ msg_puts_attr((char *)edit_submode, attr);
}
if (edit_submode_extra != NULL)
{
- MSG_PUTS_ATTR(" ", attr); /* add a space in between */
+ msg_puts_attr(" ", attr); /* add a space in between */
if ((int)edit_submode_highl < (int)HLF_COUNT)
sub_attr = HL_ATTR(edit_submode_highl);
else
sub_attr = attr;
- msg_puts_attr(edit_submode_extra, sub_attr);
+ msg_puts_attr((char *)edit_submode_extra, sub_attr);
}
}
}
@@ -10500,29 +10500,29 @@ showmode(void)
#endif
{
if (State & VREPLACE_FLAG)
- MSG_PUTS_ATTR(_(" VREPLACE"), attr);
+ msg_puts_attr(_(" VREPLACE"), attr);
else if (State & REPLACE_FLAG)
- MSG_PUTS_ATTR(_(" REPLACE"), attr);
+ msg_puts_attr(_(" REPLACE"), attr);
else if (State & INSERT)
{
#ifdef FEAT_RIGHTLEFT
if (p_ri)
- MSG_PUTS_ATTR(_(" REVERSE"), attr);
+ msg_puts_attr(_(" REVERSE"), attr);
#endif
- MSG_PUTS_ATTR(_(" INSERT"), attr);
+ msg_puts_attr(_(" INSERT"), attr);
}
else if (restart_edit == 'I' || restart_edit == 'A')
- MSG_PUTS_ATTR(_(" (insert)"), attr);
+ msg_puts_attr(_(" (insert)"), attr);
else if (restart_edit == 'R')
- MSG_PUTS_ATTR(_(" (replace)"), attr);
+ msg_puts_attr(_(" (replace)"), attr);
else if (restart_edit == 'V')
- MSG_PUTS_ATTR(_(" (vreplace)"), attr);
+ msg_puts_attr(_(" (vreplace)"), attr);
#ifdef FEAT_RIGHTLEFT
if (p_hkmap)
- MSG_PUTS_ATTR(_(" Hebrew"), attr);
+ msg_puts_attr(_(" Hebrew"), attr);
# ifdef FEAT_FKMAP
if (p_fkmap)
- MSG_PUTS_ATTR(farsi_text_5, attr);
+ msg_puts_attr(farsi_text_5, attr);
# endif
#endif
#ifdef FEAT_KEYMAP
@@ -10530,16 +10530,16 @@ showmode(void)
{
# ifdef FEAT_ARABIC
if (curwin->w_p_arab)
- MSG_PUTS_ATTR(_(" Arabic"), attr);
+ msg_puts_attr(_(" Arabic"), attr);
else
# endif
if (get_keymap_str(curwin, (char_u *)" (%s)",
NameBuff, MAXPATHL))
- MSG_PUTS_ATTR(NameBuff, attr);
+ msg_puts_attr((char *)NameBuff, attr);
}
#endif
if ((State & INSERT) && p_paste)
- MSG_PUTS_ATTR(_(" (paste)"), attr);
+ msg_puts_attr(_(" (paste)"), attr);
if (VIsual_active)
{
@@ -10558,9 +10558,9 @@ showmode(void)
case 5: p = N_(" SELECT LINE"); break;
default: p = N_(" SELECT BLOCK"); break;
}
- MSG_PUTS_ATTR(_(p), attr);
+ msg_puts_attr(_(p), attr);
}
- MSG_PUTS_ATTR(" --", attr);
+ msg_puts_attr(" --", attr);
}
need_clear = TRUE;
@@ -10651,12 +10651,13 @@ clearmode(void)
static void
recording_mode(int attr)
{
- MSG_PUTS_ATTR(_("recording"), attr);
+ msg_puts_attr(_("recording"), attr);
if (!shortmess(SHM_RECORDING))
{
- char_u s[4];
- sprintf((char *)s, " @%c", reg_recording);
- MSG_PUTS_ATTR(s, attr);
+ char s[4];
+
+ sprintf(s, " @%c", reg_recording);
+ msg_puts_attr(s, attr);
}
}
diff --git a/src/search.c b/src/search.c
index c607f6d06..f62858c2f 100644
--- a/src/search.c
+++ b/src/search.c
@@ -5059,7 +5059,7 @@ find_pattern_in_path(
message */
{
msg_home_replace_hl(new_fname);
- MSG_PUTS(_(" (includes previously listed match)"));
+ msg_puts(_(" (includes previously listed match)"));
prev_fname = NULL;
}
}
@@ -5078,25 +5078,25 @@ find_pattern_in_path(
else
{
gotocmdline(TRUE); /* cursor at status line */
- MSG_PUTS_TITLE(_("--- Included files "));
+ msg_puts_title(_("--- Included files "));
if (action != ACTION_SHOW_ALL)
- MSG_PUTS_TITLE(_("not found "));
- MSG_PUTS_TITLE(_("in path ---\n"));
+ msg_puts_title(_("not found "));
+ msg_puts_title(_("in path ---\n"));
}
did_show = TRUE;
while (depth_displayed < depth && !got_int)
{
++depth_displayed;
for (i = 0; i < depth_displayed; i++)
- MSG_PUTS(" ");
+ msg_puts(" ");
msg_home_replace(files[depth_displayed].name);
- MSG_PUTS(" -->\n");
+ msg_puts(" -->\n");
}
if (!got_int) /* don't display if 'q' typed
for "--more--" message */
{
for (i = 0; i <= depth_displayed; i++)
- MSG_PUTS(" ");
+ msg_puts(" ");
if (new_fname != NULL)
{
/* using "new_fname" is more reliable, e.g., when
@@ -5154,9 +5154,9 @@ find_pattern_in_path(
if (new_fname == NULL && action == ACTION_SHOW_ALL)
{
if (already_searched)
- MSG_PUTS(_(" (Already listed)"));
+ msg_puts(_(" (Already listed)"));
else
- MSG_PUTS(_(" NOT FOUND"));
+ msg_puts(_(" NOT FOUND"));
}
}
out_flush(); /* output each line directly */
@@ -5212,7 +5212,7 @@ find_pattern_in_path(
vim_snprintf((char*)IObuff, IOSIZE,
_("Scanning included file: %s"),
(char *)new_fname);
- msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
+ msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
}
else
#endif
@@ -5593,9 +5593,9 @@ exit_matched:
if (!did_show)
{
if (action != ACTION_SHOW_ALL)
- MSG(_("All included files were found"));
+ msg(_("All included files were found"));
else
- MSG(_("No included files"));
+ msg(_("No included files"));
}
}
else if (!found
@@ -5658,11 +5658,11 @@ show_pat_in_path(
if (action == ACTION_SHOW_ALL)
{
sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */
/* Highlight line numbers */
- msg_puts_attr(IObuff, HL_ATTR(HLF_N));
- MSG_PUTS(" ");
+ msg_puts_attr((char *)IObuff, HL_ATTR(HLF_N));
+ msg_puts(" ");
}
msg_prt_line(line, FALSE);
out_flush(); /* show one line at a time */
diff --git a/src/sign.c b/src/sign.c
index bab93ff08..3e2baff07 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -611,7 +611,7 @@ sign_list_placed(buf_T *rbuf, char_u *sign_group)
char lbuf[MSG_BUF_LEN];
char group[MSG_BUF_LEN];
- MSG_PUTS_TITLE(_("\n--- Signs ---"));
+ msg_puts_title(_("\n--- Signs ---"));
msg_putchar('\n');
if (rbuf == NULL)
buf = firstbuf;
@@ -622,7 +622,7 @@ sign_list_placed(buf_T *rbuf, char_u *sign_group)
if (buf->b_signlist != NULL)
{
vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname);
- MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
+ msg_puts_attr(lbuf, HL_ATTR(HLF_D));
msg_putchar('\n');
}
FOR_ALL_SIGNS_IN_BUF(buf, sign)
@@ -640,7 +640,7 @@ sign_list_placed(buf_T *rbuf, char_u *sign_group)
_(" line=%ld id=%d%s name=%s priority=%d"),
(long)sign->lnum, sign->id, group,
sign_typenr2name(sign->typenr), sign->priority);
- MSG_PUTS(lbuf);
+ msg_puts(lbuf);
msg_putchar('\n');
}
if (rbuf != NULL)
@@ -1640,37 +1640,37 @@ sign_list_defined(sign_T *sp)
smsg("sign %s", sp->sn_name);
if (sp->sn_icon != NULL)
{
- MSG_PUTS(" icon=");
+ msg_puts(" icon=");
msg_outtrans(sp->sn_icon);
# ifdef FEAT_SIGN_ICONS
if (sp->sn_image == NULL)
- MSG_PUTS(_(" (NOT FOUND)"));
+ msg_puts(_(" (NOT FOUND)"));
# else
- MSG_PUTS(_(" (not supported)"));
+ msg_puts(_(" (not supported)"));
# endif
}
if (sp->sn_text != NULL)
{
- MSG_PUTS(" text=");
+ msg_puts(" text=");
msg_outtrans(sp->sn_text);
}
if (sp->sn_line_hl > 0)
{
- MSG_PUTS(" linehl=");
+ msg_puts(" linehl=");
p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
if (p == NULL)
- MSG_PUTS("NONE");
+ msg_puts("NONE");
else
- msg_puts(p);
+ msg_puts((char *)p);
}
if (sp->sn_text_hl > 0)
{
- MSG_PUTS(" texthl=");
+ msg_puts(" texthl=");
p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
if (p == NULL)
- MSG_PUTS("NONE");
+ msg_puts("NONE");
else
- msg_puts(p);
+ msg_puts((char *)p);
}
}
diff --git a/src/spell.c b/src/spell.c
index 9fd4fd684..8d0eddce0 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -3375,7 +3375,7 @@ spell_suggest(int count)
TRUE, need_cap, TRUE);
if (sug.su_ga.ga_len == 0)
- MSG(_("Sorry, no suggestions"));
+ msg(_("Sorry, no suggestions"));
else if (count > 0)
{
if (count > sug.su_ga.ga_len)
@@ -3409,7 +3409,7 @@ spell_suggest(int count)
sug.su_badlen, sug.su_badptr);
}
#endif
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
msg_clr_eos();
msg_putchar('\n');
@@ -3430,17 +3430,17 @@ spell_suggest(int count)
if (cmdmsg_rl)
rl_mirror(IObuff);
#endif
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
vim_snprintf((char *)IObuff, IOSIZE, " \"%s\"", wcopy);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
/* The word may replace more than "su_badlen". */
if (sug.su_badlen < stp->st_orglen)
{
vim_snprintf((char *)IObuff, IOSIZE, _(" < \"%.*s\""),
stp->st_orglen, sug.su_badptr);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
}
if (p_verbose > 0)
@@ -3459,7 +3459,7 @@ spell_suggest(int count)
rl_mirror(IObuff + 1);
#endif
msg_advance(30);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
}
msg_putchar('\n');
}
@@ -8458,13 +8458,13 @@ ex_spellinfo(exarg_T *eap UNUSED)
for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi)
{
lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi);
- msg_puts((char_u *)"file: ");
- msg_puts(lp->lp_slang->sl_fname);
+ msg_puts("file: ");
+ msg_puts((char *)lp->lp_slang->sl_fname);
msg_putchar('\n');
p = lp->lp_slang->sl_info;
if (p != NULL)
{
- msg_puts(p);
+ msg_puts((char *)p);
msg_putchar('\n');
}
}
diff --git a/src/spellfile.c b/src/spellfile.c
index bf580eb65..7d3a486ef 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -2114,9 +2114,9 @@ spell_print_node(wordnode_T *node, int depth)
PRINTSOME(line1, depth, "(%d)", node->wn_nr, 0);
PRINTSOME(line2, depth, " ", 0, 0);
PRINTSOME(line3, depth, " ", 0, 0);
- msg((char_u *)line1);
- msg((char_u *)line2);
- msg((char_u *)line3);
+ msg(line1);
+ msg(line2);
+ msg(line3);
}
else
{
@@ -2142,9 +2142,9 @@ spell_print_node(wordnode_T *node, int depth)
if (node->wn_byte == NUL)
{
- msg((char_u *)line1);
- msg((char_u *)line2);
- msg((char_u *)line3);
+ msg(line1);
+ msg(line2);
+ msg(line3);
}
/* do the children */
@@ -3085,11 +3085,11 @@ spell_read_aff(spellinfo_T *spin, char_u *fname)
if (spin->si_newcompID < spin->si_newprefID)
{
if (spin->si_newcompID == 127 || spin->si_newcompID == 255)
- MSG(_("Too many postponed prefixes"));
+ msg(_("Too many postponed prefixes"));
else if (spin->si_newprefID == 0 || spin->si_newprefID == 127)
- MSG(_("Too many compound flags"));
+ msg(_("Too many compound flags"));
else
- MSG(_("Too many postponed prefixes and/or compound flags"));
+ msg(_("Too many postponed prefixes and/or compound flags"));
}
if (syllable != NULL)
@@ -3640,7 +3640,7 @@ spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
_("line %6d, word %6ld - %s"),
lnum, spin->si_foldwcount + spin->si_keepwcount, w);
msg_start();
- msg_puts_long_attr(message, 0);
+ msg_outtrans_long_attr(message, 0);
msg_clr_eos();
msg_didout = FALSE;
msg_col = 0;
@@ -4618,7 +4618,7 @@ tree_add_word(
if (spin->si_verbose)
{
msg_start();
- msg_puts((char_u *)_(msg_compressing));
+ msg_puts(_(msg_compressing));
msg_clr_eos();
msg_didout = FALSE;
msg_col = 0;
@@ -6119,7 +6119,7 @@ mkspell(
}
if (spin.si_compflags != NULL && spin.si_nobreak)
- MSG(_("Warning: both compounding and NOBREAK specified"));
+ msg(_("Warning: both compounding and NOBREAK specified"));
if (!error && !got_int)
{
@@ -6197,7 +6197,7 @@ spell_message(spellinfo_T *spin, char_u *str)
{
if (!spin->si_verbose)
verbose_enter();
- MSG(str);
+ msg((char *)str);
out_flush();
if (!spin->si_verbose)
verbose_leave();
diff --git a/src/syntax.c b/src/syntax.c
index 0c739476e..4e1d45007 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3313,7 +3313,7 @@ syn_regexec(
if (timed_out && !syn_win->w_s->b_syn_slow)
{
syn_win->w_s->b_syn_slow = TRUE;
- MSG(_("'redrawtime' exceeded, syntax highlighting disabled"));
+ msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
}
#endif
@@ -3435,9 +3435,9 @@ syn_cmd_conceal(exarg_T *eap UNUSED, int syncing UNUSED)
if (*arg == NUL)
{
if (curwin->w_s->b_syn_conceal)
- MSG(_("syntax conceal on"));
+ msg(_("syntax conceal on"));
else
- MSG(_("syntax conceal off"));
+ msg(_("syntax conceal off"));
}
else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
curwin->w_s->b_syn_conceal = TRUE;
@@ -3465,9 +3465,9 @@ syn_cmd_case(exarg_T *eap, int syncing UNUSED)
if (*arg == NUL)
{
if (curwin->w_s->b_syn_ic)
- MSG(_("syntax case ignore"));
+ msg(_("syntax case ignore"));
else
- MSG(_("syntax case match"));
+ msg(_("syntax case match"));
}
else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
curwin->w_s->b_syn_ic = FALSE;
@@ -3494,11 +3494,11 @@ syn_cmd_spell(exarg_T *eap, int syncing UNUSED)
if (*arg == NUL)
{
if (curwin->w_s->b_syn_spell == SYNSPL_TOP)
- MSG(_("syntax spell toplevel"));
+ msg(_("syntax spell toplevel"));
else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP)
- MSG(_("syntax spell notoplevel"));
+ msg(_("syntax spell notoplevel"));
else
- MSG(_("syntax spell default"));
+ msg(_("syntax spell default"));
}
else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
curwin->w_s->b_syn_spell = SYNSPL_TOP;
@@ -3532,10 +3532,10 @@ syn_cmd_iskeyword(exarg_T *eap, int syncing UNUSED)
arg = skipwhite(arg);
if (*arg == NUL)
{
- MSG_PUTS("\n");
+ msg_puts("\n");
if (curwin->w_s->b_syn_isk != empty_option)
{
- MSG_PUTS(_("syntax iskeyword "));
+ msg_puts(_("syntax iskeyword "));
msg_outtrans(curwin->w_s->b_syn_isk);
}
else
@@ -3909,7 +3909,7 @@ syn_cmd_list(
if (!syntax_present(curwin))
{
- MSG(_(msg_no_items));
+ msg(_(msg_no_items));
return;
}
@@ -3917,7 +3917,7 @@ syn_cmd_list(
{
if (curwin->w_s->b_syn_sync_flags & SF_CCOMMENT)
{
- MSG_PUTS(_("syncing on C-style comments"));
+ msg_puts(_("syncing on C-style comments"));
syn_lines_msg();
syn_match_msg();
return;
@@ -3925,28 +3925,28 @@ syn_cmd_list(
else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH))
{
if (curwin->w_s->b_syn_sync_minlines == 0)
- MSG_PUTS(_("no syncing"));
+ msg_puts(_("no syncing"));
else
{
- MSG_PUTS(_("syncing starts "));
+ msg_puts(_("syncing starts "));
msg_outnum(curwin->w_s->b_syn_sync_minlines);
- MSG_PUTS(_(" lines before top line"));
+ msg_puts(_(" lines before top line"));
syn_match_msg();
}
return;
}
- MSG_PUTS_TITLE(_("\n--- Syntax sync items ---"));
+ msg_puts_title(_("\n--- Syntax sync items ---"));
if (curwin->w_s->b_syn_sync_minlines > 0
|| curwin->w_s->b_syn_sync_maxlines > 0
|| curwin->w_s->b_syn_sync_linebreaks > 0)
{
- MSG_PUTS(_("\nsyncing on items"));
+ msg_puts(_("\nsyncing on items"));
syn_lines_msg();
syn_match_msg();
}
}
else
- MSG_PUTS_TITLE(_("\n--- Syntax items ---"));
+ msg_puts_title(_("\n--- Syntax items ---"));
if (ends_excmd(*arg))
{
/*
@@ -3993,20 +3993,20 @@ syn_lines_msg(void)
if (curwin->w_s->b_syn_sync_maxlines > 0
|| curwin->w_s->b_syn_sync_minlines > 0)
{
- MSG_PUTS("; ");
+ msg_puts("; ");
if (curwin->w_s->b_syn_sync_minlines > 0)
{
- MSG_PUTS(_("minimal "));
+ msg_puts(_("minimal "));
msg_outnum(curwin->w_s->b_syn_sync_minlines);
if (curwin->w_s->b_syn_sync_maxlines)
- MSG_PUTS(", ");
+ msg_puts(", ");
}
if (curwin->w_s->b_syn_sync_maxlines > 0)
{
- MSG_PUTS(_("maximal "));
+ msg_puts(_("maximal "));
msg_outnum(curwin->w_s->b_syn_sync_maxlines);
}
- MSG_PUTS(_(" lines before top line"));
+ msg_puts(_(" lines before top line"));
}
}
@@ -4015,9 +4015,9 @@ syn_match_msg(void)
{
if (curwin->w_s->b_syn_sync_linebreaks > 0)
{
- MSG_PUTS(_("; match "));
+ msg_puts(_("; match "));
msg_outnum(curwin->w_s->b_syn_sync_linebreaks);
- MSG_PUTS(_(" line breaks"));
+ msg_puts(_(" line breaks"));
}
}
@@ -4122,15 +4122,15 @@ syn_list_one(
if (spp->sp_flags & (HL_SYNC_HERE|HL_SYNC_THERE))
{
if (spp->sp_flags & HL_SYNC_HERE)
- msg_puts_attr((char_u *)"grouphere", attr);
+ msg_puts_attr("grouphere", attr);
else
- msg_puts_attr((char_u *)"groupthere", attr);
+ msg_puts_attr("groupthere", attr);
msg_putchar(' ');
if (spp->sp_sync_idx >= 0)
msg_outtrans(HL_TABLE()[SYN_ITEMS(curwin->w_s)
[spp->sp_sync_idx].sp_syn.id - 1].sg_name);
else
- MSG_PUTS("NONE");
+ msg_puts("NONE");
msg_putchar(' ');
}
}
@@ -4139,7 +4139,7 @@ syn_list_one(
if (HL_TABLE()[id - 1].sg_link && (did_header || link_only) && !got_int)
{
(void)syn_list_header(did_header, 999, id);
- msg_puts_attr((char_u *)"links to", attr);
+ msg_puts_attr("links to", attr);
msg_putchar(' ');
msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
}
@@ -4153,7 +4153,7 @@ syn_list_flags(struct name_list *nlist, int flags, int attr)
for (i = 0; nlist[i].flag != 0; ++i)
if (flags & nlist[i].flag)
{
- msg_puts_attr((char_u *)nlist[i].name, attr);
+ msg_puts_attr(nlist[i].name, attr);
msg_putchar(' ');
}
}
@@ -4183,8 +4183,8 @@ syn_list_cluster(int id)
}
else
{
- msg_puts_attr((char_u *)"cluster", HL_ATTR(HLF_D));
- msg_puts((char_u *)"=NONE");
+ msg_puts_attr("cluster", HL_ATTR(HLF_D));
+ msg_puts("=NONE");
}
}
@@ -4193,24 +4193,24 @@ put_id_list(char_u *name, short *list, int attr)
{
short *p;
- msg_puts_attr(name, attr);
+ msg_puts_attr((char *)name, attr);
msg_putchar('=');
for (p = list; *p; ++p)
{
if (*p >= SYNID_ALLBUT && *p < SYNID_TOP)
{
if (p[1])
- MSG_PUTS("ALLBUT");
+ msg_puts("ALLBUT");
else
- MSG_PUTS("ALL");
+ msg_puts("ALL");
}
else if (*p >= SYNID_TOP && *p < SYNID_CONTAINED)
{
- MSG_PUTS("TOP");
+ msg_puts("TOP");
}
else if (*p >= SYNID_CONTAINED && *p < SYNID_CLUSTER)
{
- MSG_PUTS("CONTAINED");
+ msg_puts("CONTAINED");
}
else if (*p >= SYNID_CLUSTER)
{
@@ -4244,7 +4244,7 @@ put_pattern(
if (last_matchgroup != spp->sp_syn_match_id)
{
last_matchgroup = spp->sp_syn_match_id;
- msg_puts_attr((char_u *)"matchgroup", attr);
+ msg_puts_attr("matchgroup", attr);
msg_putchar('=');
if (last_matchgroup == 0)
msg_outtrans((char_u *)"NONE");
@@ -4254,7 +4254,7 @@ put_pattern(
}
/* output the name of the pattern and an '=' or ' ' */
- msg_puts_attr((char_u *)s, attr);
+ msg_puts_attr(s, attr);
msg_putchar(c);
/* output the pattern, in between a char that is not in the pattern */
@@ -4277,7 +4277,7 @@ put_pattern(
{
if (!first)
msg_putchar(','); /* separate with commas */
- msg_puts((char_u *)spo_name_tab[i]);
+ msg_puts(spo_name_tab[i]);
n = spp->sp_offsets[i];
if (i != SPO_LC_OFF)
{
@@ -4354,7 +4354,7 @@ syn_list_keywords(
did_header = TRUE;
if (prev_contained != (kp->flags & HL_CONTAINED))
{
- msg_puts_attr((char_u *)"contained", attr);
+ msg_puts_attr("contained", attr);
msg_putchar(' ');
prev_contained = (kp->flags & HL_CONTAINED);
}
@@ -4372,19 +4372,19 @@ syn_list_keywords(
prev_next_list = kp->next_list;
if (kp->flags & HL_SKIPNL)
{
- msg_puts_attr((char_u *)"skipnl", attr);
+ msg_puts_attr("skipnl", attr);
msg_putchar(' ');
prev_skipnl = (kp->flags & HL_SKIPNL);
}
if (kp->flags & HL_SKIPWHITE)
{
- msg_puts_attr((char_u *)"skipwhite", attr);
+ msg_puts_attr("skipwhite", attr);
msg_putchar(' ');
prev_skipwhite = (kp->flags & HL_SKIPWHITE);
}
if (kp->flags & HL_SKIPEMPTY)
{
- msg_puts_attr((char_u *)"skipempty", attr);
+ msg_puts_attr("skipempty", attr);
msg_putchar(' ');
prev_skipempty = (kp->flags & HL_SKIPEMPTY);
}
@@ -6671,7 +6671,7 @@ syntime_clear(void)
if (!syntax_present(curwin))
{
- MSG(_(msg_no_items));
+ msg(_(msg_no_items));
return;
}
for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx)
@@ -6742,7 +6742,7 @@ syntime_report(void)
if (!syntax_present(curwin))
{
- MSG(_(msg_no_items));
+ msg(_(msg_no_items));
return;
}
@@ -6777,31 +6777,31 @@ syntime_report(void)
qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
syn_compare_syntime);
- MSG_PUTS_TITLE(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
- MSG_PUTS("\n");
+ msg_puts_title(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
+ msg_puts("\n");
for (idx = 0; idx < ga.ga_len && !got_int; ++idx)
{
p = ((time_entry_T *)ga.ga_data) + idx;
- MSG_PUTS(profile_msg(&p->total));
- MSG_PUTS(" "); /* make sure there is always a separating space */
+ msg_puts(profile_msg(&p->total));
+ msg_puts(" "); /* make sure there is always a separating space */
msg_advance(13);
msg_outnum(p->count);
- MSG_PUTS(" ");
+ msg_puts(" ");
msg_advance(20);
msg_outnum(p->match);
- MSG_PUTS(" ");
+ msg_puts(" ");
msg_advance(26);
- MSG_PUTS(profile_msg(&p->slowest));
- MSG_PUTS(" ");
+ msg_puts(profile_msg(&p->slowest));
+ msg_puts(" ");
msg_advance(38);
# ifdef FEAT_FLOAT
- MSG_PUTS(profile_msg(&p->average));
- MSG_PUTS(" ");
+ msg_puts(profile_msg(&p->average));
+ msg_puts(" ");
# endif
msg_advance(50);
msg_outtrans(HL_TABLE()[p->id - 1].sg_name);
- MSG_PUTS(" ");
+ msg_puts(" ");
msg_advance(69);
if (Columns < 80)
@@ -6811,16 +6811,16 @@ syntime_report(void)
if (len > (int)STRLEN(p->pattern))
len = (int)STRLEN(p->pattern);
msg_outtrans_len(p->pattern, len);
- MSG_PUTS("\n");
+ msg_puts("\n");
}
ga_clear(&ga);
if (!got_int)
{
- MSG_PUTS("\n");
- MSG_PUTS(profile_msg(&total_total));
+ msg_puts("\n");
+ msg_puts(profile_msg(&total_total));
msg_advance(13);
msg_outnum(total_count);
- MSG_PUTS("\n");
+ msg_puts("\n");
}
}
#endif
@@ -9227,7 +9227,7 @@ highlight_list_one(int id)
{
(void)syn_list_header(didh, 9999, id);
didh = TRUE;
- msg_puts_attr((char_u *)"links to", HL_ATTR(HLF_D));
+ msg_puts_attr("links to", HL_ATTR(HLF_D));
msg_putchar(' ');
msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
}
@@ -9284,8 +9284,8 @@ highlight_list_arg(
{
if (*name != NUL)
{
- MSG_PUTS_ATTR(name, HL_ATTR(HLF_D));
- MSG_PUTS_ATTR("=", HL_ATTR(HLF_D));
+ msg_puts_attr(name, HL_ATTR(HLF_D));
+ msg_puts_attr("=", HL_ATTR(HLF_D));
}
msg_outtrans(ts);
}
@@ -9484,7 +9484,7 @@ syn_list_header(
/* Show "xxx" with the attributes. */
if (!did_header)
{
- msg_puts_attr((char_u *)"xxx", syn_id2attr(id));
+ msg_puts_attr("xxx", syn_id2attr(id));
msg_putchar(' ');
}
@@ -9725,7 +9725,7 @@ syn_add_group(char_u *name)
/* This is an error, but since there previously was no check only
* give a warning. */
msg_source(HL_ATTR(HLF_W));
- MSG(_("W18: Invalid character in group name"));
+ msg(_("W18: Invalid character in group name"));
break;
}
}
@@ -10264,7 +10264,7 @@ highlight_list(void)
static void
highlight_list_two(int cnt, int attr)
{
- msg_puts_attr((char_u *)&("N \bI \b! \b"[cnt / 11]), attr);
+ msg_puts_attr(&("N \bI \b! \b"[cnt / 11]), attr);
msg_clr_eos();
out_flush();
ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
diff --git a/src/tag.c b/src/tag.c
index f3218e794..e14be6be0 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -605,10 +605,10 @@ do_tag(
if (msg_col == 0)
msg_didout = FALSE; /* overwrite previous message */
msg_start();
- MSG_PUTS_ATTR(_(" # pri kind tag"), HL_ATTR(HLF_T));
+ msg_puts_attr(_(" # pri kind tag"), HL_ATTR(HLF_T));
msg_clr_eos();
taglen_advance(taglen);
- MSG_PUTS_ATTR(_("file\n"), HL_ATTR(HLF_T));
+ msg_puts_attr(_("file\n"), HL_ATTR(HLF_T));
for (i = 0; i < num_matches && !got_int; ++i)
{
@@ -626,7 +626,7 @@ do_tag(
vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
"%2d %s ", i + 1,
mt_names[matches[i][0] & MT_MASK]);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
if (tagp.tagkind != NULL)
msg_outtrans_len(tagp.tagkind,
(int)(tagp.tagkind_end - tagp.tagkind));
@@ -642,7 +642,7 @@ do_tag(
p = tag_full_fname(&tagp);
if (p != NULL)
{
- msg_puts_long_attr(p, HL_ATTR(HLF_D));
+ msg_outtrans_long_attr(p, HL_ATTR(HLF_D));
vim_free(p);
}
if (msg_col > 0)
@@ -690,7 +690,7 @@ do_tag(
p = msg_outtrans_one(p, attr);
if (*p == TAB)
{
- msg_puts_attr((char_u *)" ", attr);
+ msg_puts_attr(" ", attr);
break;
}
if (*p == ':')
@@ -1003,9 +1003,9 @@ do_tag(
&& num_matches > 1)
{
if (ic)
- msg_attr(IObuff, HL_ATTR(HLF_W));
+ msg_attr((char *)IObuff, HL_ATTR(HLF_W));
else
- msg(IObuff);
+ msg((char *)IObuff);
msg_scroll = TRUE; /* don't overwrite this message */
}
else
@@ -1119,7 +1119,7 @@ do_tags(exarg_T *eap UNUSED)
int tagstacklen = curwin->w_tagstacklen;
/* Highlight title */
- MSG_PUTS_TITLE(_("\n # TO tag FROM line in file/text"));
+ msg_puts_title(_("\n # TO tag FROM line in file/text"));
for (i = 0; i < tagstacklen; ++i)
{
if (tagstack[i].tagname != NULL)
@@ -1143,7 +1143,7 @@ do_tags(exarg_T *eap UNUSED)
out_flush(); /* show one line at a time */
}
if (tagstackidx == tagstacklen) /* idx at top of stack */
- MSG_PUTS("\n>");
+ msg_puts("\n>");
}
/* When not using a CR for line separator, use vim_fgets() to read tag lines.
@@ -1962,7 +1962,7 @@ parse_line:
if (p_verbose >= 5)
{
verbose_enter();
- MSG(_("Ignoring long line in tags file"));
+ msg(_("Ignoring long line in tags file"));
verbose_leave();
}
#ifdef FEAT_TAG_BINS
@@ -2818,7 +2818,7 @@ etag_fail:
if (p_verbose >= 5)
{
verbose_enter();
- MSG(_("Ignoring long line in tags file"));
+ msg(_("Ignoring long line in tags file"));
verbose_leave();
}
tagp->command = lbuf;
@@ -3381,7 +3381,7 @@ jumpto_tag(
*/
if (found == 2 || !save_p_ic)
{
- MSG(_("E435: Couldn't find tag, just guessing!"));
+ msg(_("E435: Couldn't find tag, just guessing!"));
if (!msg_scrolled && msg_silent == 0)
{
out_flush();
diff --git a/src/term.c b/src/term.c
index cccc94cf8..e48b16e4e 100644
--- a/src/term.c
+++ b/src/term.c
@@ -6373,7 +6373,7 @@ show_termcodes(void)
return;
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Terminal keys ---"));
+ msg_puts_title(_("\n--- Terminal keys ---"));
/*
* do the loop two times:
@@ -6475,9 +6475,9 @@ show_one_termcode(char_u *name, char_u *code, int printit)
if (printit)
{
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
if (code == NULL)
- msg_puts((char_u *)"NULL");
+ msg_puts("NULL");
else
msg_outtrans(code);
}
@@ -7013,7 +7013,7 @@ gui_get_color_cmn(char_u *name)
if (fd == NULL)
{
if (p_verbose > 1)
- verb_msg((char_u *)_("Cannot open $VIMRUNTIME/rgb.txt"));
+ verb_msg(_("Cannot open $VIMRUNTIME/rgb.txt"));
return INVALCOLOR;
}
diff --git a/src/ui.c b/src/ui.c
index 08dc9d0a0..54515702d 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -340,7 +340,7 @@ suspend_shell(void)
emsg(_(e_shellempty));
else
{
- MSG_PUTS(_("new shell started\n"));
+ msg_puts(_("new shell started\n"));
do_shell(NULL, 0);
}
}
@@ -2626,7 +2626,7 @@ yank_cut_buffer0(Display *dpy, VimClipboard *cbd)
if (p_verbose > 0)
{
verbose_enter();
- verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection"));
+ verb_msg(_("Used CUT_BUFFER0 instead of empty selection"));
verbose_leave();
}
}
diff --git a/src/undo.c b/src/undo.c
index 5dafee813..911eed5c8 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1641,7 +1641,7 @@ u_write_undo(
if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL)
{
if (p_verbose > 0)
- verb_msg((char_u *)_("Skipping undo file write, nothing to undo"));
+ verb_msg(_("Skipping undo file write, nothing to undo"));
goto theend;
}
@@ -2232,7 +2232,7 @@ u_doit(int startcount)
beep_flush();
if (count == startcount - 1)
{
- MSG(_("Already at oldest change"));
+ msg(_("Already at oldest change"));
return;
}
break;
@@ -2247,7 +2247,7 @@ u_doit(int startcount)
beep_flush(); /* nothing to redo */
if (count == startcount - 1)
{
- MSG(_("Already at newest change"));
+ msg(_("Already at newest change"));
return;
}
break;
@@ -2495,9 +2495,9 @@ undo_time(
if (closest == closest_start)
{
if (step < 0)
- MSG(_("Already at oldest change"));
+ msg(_("Already at oldest change"));
else
- MSG(_("Already at newest change"));
+ msg(_("Already at newest change"));
return;
}
@@ -3104,20 +3104,20 @@ ex_undolist(exarg_T *eap UNUSED)
}
if (ga.ga_len == 0)
- MSG(_("Nothing to undo"));
+ msg(_("Nothing to undo"));
else
{
sort_strings((char_u **)ga.ga_data, ga.ga_len);
msg_start();
- msg_puts_attr((char_u *)_("number changes when saved"),
+ msg_puts_attr(_("number changes when saved"),
HL_ATTR(HLF_T));
for (i = 0; i < ga.ga_len && !got_int; ++i)
{
msg_putchar('\n');
if (got_int)
break;
- msg_puts(((char_u **)ga.ga_data)[i]);
+ msg_puts(((char **)ga.ga_data)[i]);
}
msg_end();
diff --git a/src/userfunc.c b/src/userfunc.c
index 34e1caa6b..49c34c127 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -893,11 +893,11 @@ call_user_func(
char_u *tofree;
char_u *s;
- msg_puts((char_u *)"(");
+ msg_puts("(");
for (i = 0; i < argcount; ++i)
{
if (i > 0)
- msg_puts((char_u *)", ");
+ msg_puts(", ");
if (argvars[i].v_type == VAR_NUMBER)
msg_outnum((long)argvars[i].vval.v_number);
else
@@ -913,14 +913,14 @@ call_user_func(
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
s = buf;
}
- msg_puts(s);
+ msg_puts((char *)s);
vim_free(tofree);
}
}
}
- msg_puts((char_u *)")");
+ msg_puts(")");
}
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
verbose_leave_scroll();
--no_wait_return;
@@ -1018,7 +1018,7 @@ call_user_func(
vim_free(tofree);
}
}
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
verbose_leave_scroll();
--no_wait_return;
@@ -1041,7 +1041,7 @@ call_user_func(
verbose_enter_scroll();
smsg(_("continuing in %s"), sourcing_name);
- msg_puts((char_u *)"\n"); /* don't overwrite this either */
+ msg_puts("\n"); /* don't overwrite this either */
verbose_leave_scroll();
--no_wait_return;
@@ -1571,37 +1571,37 @@ list_func_head(ufunc_T *fp, int indent)
msg_start();
if (indent)
- MSG_PUTS(" ");
- MSG_PUTS("function ");
+ msg_puts(" ");
+ msg_puts("function ");
if (fp->uf_name[0] == K_SPECIAL)
{
- MSG_PUTS_ATTR("<SNR>", HL_ATTR(HLF_8));
- msg_puts(fp->uf_name + 3);
+ msg_puts_attr("<SNR>", HL_ATTR(HLF_8));
+ msg_puts((char *)fp->uf_name + 3);
}
else
- msg_puts(fp->uf_name);
+ msg_puts((char *)fp->uf_name);
msg_putchar('(');
for (j = 0; j < fp->uf_args.ga_len; ++j)
{
if (j)
- MSG_PUTS(", ");
- msg_puts(FUNCARG(fp, j));
+ msg_puts(", ");
+ msg_puts((char *)FUNCARG(fp, j));
}
if (fp->uf_varargs)
{
if (j)
- MSG_PUTS(", ");
- MSG_PUTS("...");
+ msg_puts(", ");
+ msg_puts("...");
}
msg_putchar(')');
if (fp->uf_flags & FC_ABORT)
- MSG_PUTS(" abort");
+ msg_puts(" abort");
if (fp->uf_flags & FC_RANGE)
- MSG_PUTS(" range");
+ msg_puts(" range");
if (fp->uf_flags & FC_DICT)
- MSG_PUTS(" dict");
+ msg_puts(" dict");
if (fp->uf_flags & FC_CLOSURE)
- MSG_PUTS(" closure");
+ msg_puts(" closure");
msg_clr_eos();
if (p_verbose > 0)
last_set_msg(fp->uf_script_ctx);
@@ -2010,7 +2010,7 @@ ex_function(exarg_T *eap)
if (!got_int)
{
msg_putchar('\n');
- msg_puts((char_u *)" endfunction");
+ msg_puts(" endfunction");
}
}
else
@@ -3731,7 +3731,7 @@ list_func_vars(int *first)
{
if (current_funccal != NULL)
list_hashtable_vars(&current_funccal->l_vars.dv_hashtab,
- (char_u *)"l:", FALSE, first);
+ "l:", FALSE, first);
}
/*
diff --git a/src/version.c b/src/version.c
index 3a1369ce2..f6f3b3a28 100644
--- a/src/version.c
+++ b/src/version.c
@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 779,
+/**/
778,
/**/
777,
@@ -2421,10 +2423,10 @@ version_msg_wrap(char_u *s, int wrap)
if (!got_int)
{
if (wrap)
- MSG_PUTS("[");
- MSG_PUTS(s);
+ msg_puts("[");
+ msg_puts((char *)s);
if (wrap)
- MSG_PUTS("]");
+ msg_puts("]");
}
}
@@ -2502,10 +2504,10 @@ list_in_columns(char_u **items, int size, int current)
msg_putchar('[');
#ifdef FEAT_SYN_HL
if (use_highlight && items[idx][0] == '-')
- msg_puts_attr(items[idx], HL_ATTR(HLF_W));
+ msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W));
else
#endif
- msg_puts(items[idx]);
+ msg_puts((char *)items[idx]);
if (idx == current)
msg_putchar(']');
if (last_col)
@@ -2539,40 +2541,40 @@ list_version(void)
* internal variables in eval.c!
*/
init_longVersion();
- MSG(longVersion);
+ msg(longVersion);
#ifdef WIN3264
# ifdef FEAT_GUI_W32
# ifdef _WIN64
- MSG_PUTS(_("\nMS-Windows 64-bit GUI version"));
+ msg_puts(_("\nMS-Windows 64-bit GUI version"));
# else
- MSG_PUTS(_("\nMS-Windows 32-bit GUI version"));
+ msg_puts(_("\nMS-Windows 32-bit GUI version"));
# endif
# ifdef FEAT_OLE
- MSG_PUTS(_(" with OLE support"));
+ msg_puts(_(" with OLE support"));
# endif
# else
# ifdef _WIN64
- MSG_PUTS(_("\nMS-Windows 64-bit console version"));
+ msg_puts(_("\nMS-Windows 64-bit console version"));
# else
- MSG_PUTS(_("\nMS-Windows 32-bit console version"));
+ msg_puts(_("\nMS-Windows 32-bit console version"));
# endif
# endif
#endif
#if defined(MACOS_X)
# if defined(MACOS_X_DARWIN)
- MSG_PUTS(_("\nmacOS version"));
+ msg_puts(_("\nmacOS version"));
# else
- MSG_PUTS(_("\nmacOS version w/o darwin feat."));
+ msg_puts(_("\nmacOS version w/o darwin feat."));
# endif
#endif
#ifdef VMS
- MSG_PUTS(_("\nOpenVMS version"));
+ msg_puts(_("\nOpenVMS version"));
# ifdef HAVE_PATHDEF
if (*compiled_arch != NUL)
{
- MSG_PUTS(" - ");
- MSG_PUTS(compiled_arch);
+ msg_puts(" - ");
+ msg_puts((char *)compiled_arch);
}
# endif
@@ -2582,7 +2584,7 @@ list_version(void)
/* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
if (included_patches[0] != 0)
{
- MSG_PUTS(_("\nIncluded patches: "));
+ msg_puts(_("\nIncluded patches: "));
first = -1;
/* find last one */
for (i = 0; included_patches[i] != 0; ++i)
@@ -2593,12 +2595,12 @@ list_version(void)
first = included_patches[i];
if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
{
- MSG_PUTS(s);
+ msg_puts(s);
s = ", ";
msg_outnum((long)first);
if (first != included_patches[i])
{
- MSG_PUTS("-");
+ msg_puts("-");
msg_outnum((long)included_patches[i]);
}
first = -1;
@@ -2609,91 +2611,91 @@ list_version(void)
/* Print the list of extra patch descriptions if there is at least one. */
if (extra_patches[0] != NULL)
{
- MSG_PUTS(_("\nExtra patches: "));
+ msg_puts(_("\nExtra patches: "));
s = "";
for (i = 0; extra_patches[i] != NULL; ++i)
{
- MSG_PUTS(s);
+ msg_puts(s);
s = ", ";
- MSG_PUTS(extra_patches[i]);
+ msg_puts(extra_patches[i]);
}
}
#ifdef MODIFIED_BY
- MSG_PUTS("\n");
- MSG_PUTS(_("Modified by "));
- MSG_PUTS(MODIFIED_BY);
+ msg_puts("\n");
+ msg_puts(_("Modified by "));
+ msg_puts(MODIFIED_BY);
#endif
#ifdef HAVE_PATHDEF
if (*compiled_user != NUL || *compiled_sys != NUL)
{
- MSG_PUTS(_("\nCompiled "));
+ msg_puts(_("\nCompiled "));
if (*compiled_user != NUL)
{
- MSG_PUTS(_("by "));
- MSG_PUTS(compiled_user);
+ msg_puts(_("by "));
+ msg_puts((char *)compiled_user);
}
if (*compiled_sys != NUL)
{
- MSG_PUTS("@");
- MSG_PUTS(compiled_sys);
+ msg_puts("@");
+ msg_puts((char *)compiled_sys);
}
}
#endif
#ifdef FEAT_HUGE
- MSG_PUTS(_("\nHuge version "));
+ msg_puts(_("\nHuge version "));
#else
# ifdef FEAT_BIG
- MSG_PUTS(_("\nBig version "));
+ msg_puts(_("\nBig version "));
# else
# ifdef FEAT_NORMAL
- MSG_PUTS(_("\nNormal version "));
+ msg_puts(_("\nNormal version "));
# else
# ifdef FEAT_SMALL
- MSG_PUTS(_("\nSmall version "));
+ msg_puts(_("\nSmall version "));
# else
- MSG_PUTS(_("\nTiny version "));
+ msg_puts(_("\nTiny version "));
# endif
# endif
# endif
#endif
#ifndef FEAT_GUI
- MSG_PUTS(_("without GUI."));
+ msg_puts(_("without GUI."));
#else
# ifdef FEAT_GUI_GTK
# ifdef USE_GTK3
- MSG_PUTS(_("with GTK3 GUI."));
+ msg_puts(_("with GTK3 GUI."));
# else
# ifdef FEAT_GUI_GNOME
- MSG_PUTS(_("with GTK2-GNOME GUI."));
+ msg_puts(_("with GTK2-GNOME GUI."));
# else
- MSG_PUTS(_("with GTK2 GUI."));
+ msg_puts(_("with GTK2 GUI."));
# endif
# endif
# else
# ifdef FEAT_GUI_MOTIF
- MSG_PUTS(_("with X11-Motif GUI."));
+ msg_puts(_("with X11-Motif GUI."));
# else
# ifdef FEAT_GUI_ATHENA
# ifdef FEAT_GUI_NEXTAW
- MSG_PUTS(_("with X11-neXtaw GUI."));
+ msg_puts(_("with X11-neXtaw GUI."));
# else
- MSG_PUTS(_("with X11-Athena GUI."));
+ msg_puts(_("with X11-Athena GUI."));
# endif
# else
# ifdef FEAT_GUI_PHOTON
- MSG_PUTS(_("with Photon GUI."));
+ msg_puts(_("with Photon GUI."));
# else
# if defined(MSWIN)
- MSG_PUTS(_("with GUI."));
+ msg_puts(_("with GUI."));
# else
# if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
- MSG_PUTS(_("with Carbon GUI."));
+ msg_puts(_("with Carbon GUI."));
# else
# if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
- MSG_PUTS(_("with Cocoa GUI."));
+ msg_puts(_("with Cocoa GUI."));
# else
# endif
# endif
diff --git a/src/vim.h b/src/vim.h
index 9ae3b3081..39da8c94b 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1630,15 +1630,8 @@ typedef UINT32_TYPEDEF UINT32_T;
# define vim_strpbrk(s, cs) (char_u *)strpbrk((char *)(s), (char *)(cs))
#endif
-#define MSG(s) msg((char_u *)(s))
-#define MSG_ATTR(s, attr) msg_attr((char_u *)(s), (attr))
#define OUT_STR(s) out_str((char_u *)(s))
#define OUT_STR_NF(s) out_str_nf((char_u *)(s))
-#define MSG_PUTS(s) msg_puts((char_u *)(s))
-#define MSG_PUTS_ATTR(s, a) msg_puts_attr((char_u *)(s), (a))
-#define MSG_PUTS_TITLE(s) msg_puts_title((char_u *)(s))
-#define MSG_PUTS_LONG(s) msg_puts_long_attr((char_u *)(s), 0)
-#define MSG_PUTS_LONG_ATTR(s, a) msg_puts_long_attr((char_u *)(s), (a))
#ifdef FEAT_GUI
# ifdef FEAT_TERMGUICOLORS
diff --git a/src/window.c b/src/window.c
index f9b499900..792288fbe 100644
--- a/src/window.c
+++ b/src/window.c
@@ -310,7 +310,7 @@ newwindow:
/* move window to new tab page */
case 'T':
if (one_window())
- MSG(_(m_onlyone));
+ msg(_(m_onlyone));
else
{
tabpage_T *oldtab = curtab;
@@ -3379,7 +3379,7 @@ close_others(
if (one_window())
{
if (message && !autocmd_busy)
- MSG(_(m_onlyone));
+ msg(_(m_onlyone));
return;
}