Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
/* 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);
{
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
*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)
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)
{
}
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);
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'"));
}
}
{
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;
{
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)
{
{
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)
: 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;
{
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;
}
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! */
}
}
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);
}
if (reg_recording != 0 || restart_edit != NUL)
showmode();
else if (p_smd)
- MSG("");
+ msg("");
return TRUE; /* exit Insert mode */
}
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 */
void
list_hashtable_vars(
hashtab_T *ht,
- char_u *prefix,
+ char *prefix,
int empty,
int *first)
{
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;
static void
list_glob_vars(int *first)
{
- list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
+ list_hashtable_vars(&globvarht, "", TRUE, 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);
}
/*
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);
}
/*
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);
}
/*
static void
list_vim_vars(int *first)
{
- list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
+ list_hashtable_vars(&vimvarht, "v:", FALSE, 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);
}
/*
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,
}
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;
* 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;
static void
list_one_var_a(
- char_u *prefix,
+ char *prefix,
char_u *name,
int type,
char_u *string,
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)
msg_outtrans(string);
if (type == VAR_FUNC || type == VAR_PARTIAL)
- msg_puts((char_u *)"()");
+ msg_puts("()");
if (*first)
{
msg_clr_eos();
*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;
}
}
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)
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)
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();
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');
}
}
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 */
}
}
c = gchar_cursor();
if (c == NUL)
{
- MSG("NUL");
+ msg("NUL");
return;
}
}
#endif
- msg(IObuff);
+ msg((char *)IObuff);
}
/*
{
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);
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();
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 */
}
beginline(BL_WHITE | BL_FIX);
}
if (!do_sub_msg(subflags.do_count) && subflags.do_ask)
- MSG("");
+ msg("");
}
else
global_need_beginline = TRUE;
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());
}
: 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)
* 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')
char_u *fname;
if (l == NULL)
- msg((char_u *)_("No old files"));
+ msg(_("No old files"));
else
{
msg_start();
if (!message_filtered(fname))
{
msg_outnum((long)nr);
- MSG_PUTS(": ");
+ msg_puts(": ");
msg_outtrans(fname);
msg_clr_eos();
msg_putchar('\n');
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);
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
if (debug_backtrace_level < 0)
{
debug_backtrace_level = 0;
- MSG(_("frame is zero"));
+ msg(_("frame is zero"));
}
else
{
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)
{
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;
}
vim_snprintf((char *)IObuff, IOSIZE,
_("W20: Required python version 2.x not supported, ignoring file: %s"),
fname);
- MSG(IObuff);
+ msg((char *)IObuff);
# endif
return;
}
vim_snprintf((char *)IObuff, IOSIZE,
_("W21: Required python version 3.x not supported, ignoring file: %s"),
fname);
- MSG(IObuff);
+ msg((char *)IObuff);
# endif
return;
}
++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. */
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;
/* 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)
}
if (!found)
- MSG(_("No user-defined commands found"));
+ msg(_("No user-defined commands found"));
}
static char *
}
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)
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);
}
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);
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);
}
/*
#ifdef BACKSLASH_IN_FILENAME
slash_adjust(NameBuff);
#endif
- msg(NameBuff);
+ msg((char *)NameBuff);
}
else
emsg(_("E187: Unknown"));
# endif
{
sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
- msg(IObuff);
+ msg((char *)IObuff);
}
else
# endif
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;
? _("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;
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;
++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)
VIM_CLEAR(ccline.cmdbuff);
if (msg_scrolled == 0)
compute_cmdrow();
- MSG("");
+ msg("");
redraw_cmdline = TRUE;
}
while (indent >= 8)
{
ga_append(&line_ga, TAB);
- msg_puts((char_u *)" ");
+ msg_puts(" ");
indent -= 8;
}
while (indent-- > 0)
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)
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);
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 */
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; )
if (hislen == 0)
{
- MSG(_("'history' option is zero"));
+ msg(_("'history' option is zero"));
return;
}
{
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;
/* 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));
}
/*
/* 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));
}
/*
{
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;
/* 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,
#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,
;
#endif
-EXTERN char_u farsi_text_5[]
+EXTERN char farsi_text_5[]
#ifdef DO_INIT
= { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'}
#endif
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:
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 */
* 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)
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
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"
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')
if (need_wait_return && didit == 2)
{
/* make sure msg isn't overwritten */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
out_flush();
}
}
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)
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');
{
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();
if (!forceit && *cmd == NUL)
{
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Autocommands ---"));
+ msg_puts_title(_("\n--- Autocommands ---"));
}
/*
nothing_done = FALSE;
if (nothing_done && do_msg)
- MSG(_("No matching autocommands"));
+ msg(_("No matching autocommands"));
if (did_something != NULL)
*did_something = !nothing_done;
{
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);
}
/*
- * 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 ".".
)
{
if (abbrev)
- MSG(_("No abbreviation found"));
+ msg(_("No abbreviation found"));
else
- MSG(_("No mapping found"));
+ msg(_("No mapping found"));
}
goto theend; /* listing finished */
}
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);
}
} 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(' ');
/* 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
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);
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
}
}
else
- MSG(_("No match at cursor, finding next"));
+ msg(_("No match at cursor, finding next"));
vim_regfree(regmatch.regprog);
}
}
&& 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();
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;
}
{
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;
{
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);
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"
{
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++)
{
/* 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)
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 */
* "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]);
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 */
{
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++)
if (error)
emsg(prev);
else
- MSG(prev);
+ msg(prev);
prev = p + 1;
p = strchr(prev, '\n');
}
if (error)
emsg(prev);
else
- MSG(prev);
+ msg(prev);
}
static void
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
}
}
- static int
-msg_wrapper(char *text)
-{
- return msg((char_u *)text);
-}
-
static int
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);
# 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:
strcpy(buff, RSTRING_PTR(str));
p = strchr(buff, '\n');
if (p) *p = '\0';
- MSG(buff);
+ msg(buff);
}
else
{
- MSG("");
+ msg("");
}
return Qnil;
}
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];
while ((next=strchr(text, '\n')))
{
*next++ = '\0';
- MSG(text);
+ msg(text);
text = next;
}
if (*text)
- MSG(text);
+ msg(text);
}
static void
else
{
if (arg == NULL)
- MSG(_("No marks set"));
+ msg(_("No marks set"));
else
semsg(_("E283: No marks matching \"%s\""), arg);
}
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');
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)
out_flush();
}
if (curwin->w_jumplistidx == curwin->w_jumplistlen)
- MSG_PUTS("\n>");
+ msg_puts("\n>");
}
void
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)
{
out_flush();
}
if (curwin->w_changelistidx == curbuf->b_changelistlen)
- MSG_PUTS("\n>");
+ msg_puts("\n>");
}
#endif
len = utfc_ptr2len(line);
if (len == 0)
{
- MSG("NUL");
+ msg("NUL");
return;
}
break;
}
- msg(IObuff);
+ msg((char *)IObuff);
}
/*
/* 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;
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;
{
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;
}
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;
}
{
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;
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);
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
if (list)
{
/* use msg() to start the scrolling properly */
- msg((char_u *)_("Swap files found:"));
+ msg(_("Swap files found:"));
msg_putchar('\n');
}
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)
{
/* 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
/* 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);
}
/*
{
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
{
#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;
if (message)
{
if (status == OK)
- MSG(_("File preserved"));
+ msg(_("File preserved"));
else
emsg(_("E314: Preserve failed"));
}
++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;
}
else
#endif
{
- MSG_PUTS("\n");
+ msg_puts("\n");
if (msg_silent == 0)
/* call wait_return() later */
need_wait_return = TRUE;
/* 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;
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));
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)
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);
}
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);
* return TRUE if wait_return not called
*/
int
-msg(char_u *s)
+msg(char *s)
{
return msg_attr_keep(s, 0, FALSE);
}
* Like msg() but keep it silent when 'verbosefile' is set.
*/
int
-verb_msg(char_u *s)
+verb_msg(char *s)
{
int n;
#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 */
{
/* 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
/*
/* 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)
/* 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;
va_start(arglist, s);
vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist);
va_end(arglist);
- return msg(IObuff);
+ return msg((char *)IObuff);
}
int
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
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
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 */
}
/* 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;
* 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;
* 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;
}
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>"),
/* 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;
}
#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)
}
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;
}
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;
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))
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;
void
msg_outnum(long n)
{
- char_u buf[20];
+ char buf[20];
- sprintf((char *)buf, "%ld", n);
+ sprintf(buf, "%ld", n);
msg_puts(buf);
}
return p + l;
}
#endif
- msg_puts_attr(transchar_byte(*p), attr);
+ msg_puts_attr((char *)transchar_byte(*p), attr);
return p + 1;
}
/* 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
/*
/* 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;
/* 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
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;
}
{
char_u *str = strstart;
int retval = 0;
- char_u *string;
+ char *text;
int attr;
int len;
/* 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;
mch_memmove(buf, s, (size_t)l);
buf[l] = NUL;
}
- msg_puts(buf);
+ msg_puts((char *)buf);
s += l;
continue;
}
* 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));
}
* 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;
{
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);
}
* 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);
}
* 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".
/* 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;
}
* 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);
}
/*
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 */
/* 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;
}
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
{
if (typed > 0)
{
- MSG_PUTS("\b \b");
+ msg_puts("\b \b");
--typed;
}
n /= 10;
/* 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
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;
}
}
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));
}
}
}
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
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
smsg("Already: %s",
file_path);
/* don't overwrite this either */
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
verbose_leave_scroll();
}
continue;
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
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
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
/* 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;
}
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:
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();
if (full_screen)
{
if (!did_check && HL_ATTR(HLF_V) == 0)
- MSG(_("Warning: terminal cannot highlight"));
+ msg(_("Warning: terminal cannot highlight"));
did_check = TRUE;
}
}
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
* 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;
#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. */
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);
}
/*
* adds the escaping back later.
*/
reg_recording = 0;
- MSG("");
+ msg("");
p = get_recorded();
if (p == NULL)
retval = FAIL;
VIM_CLEAR(y_current->y_array);
#ifdef AMIGA
if (n >= 1000)
- MSG("");
+ msg("");
#endif
}
}
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);
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)
}
}
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();
if ((p = get_last_insert()) != NULL
&& (arg == NULL || vim_strchr(arg, '.') != NULL) && !got_int)
{
- MSG_PUTS("\n\". ");
+ msg_puts("\n\". ");
dis_msg(p, TRUE);
}
if (last_cmdline != NULL && (arg == NULL || vim_strchr(arg, ':') != NULL)
&& !got_int)
{
- MSG_PUTS("\n\": ");
+ msg_puts("\n\": ");
dis_msg(last_cmdline, FALSE);
}
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);
}
if (buflist_name_nr(0, &fname, &dummy) != FAIL)
{
- MSG_PUTS("\n\"# ");
+ msg_puts("\n\"# ");
dis_msg(fname, FALSE);
}
}
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);
}
if (expr_line != NULL && (arg == NULL || vim_strchr(arg, '=') != NULL)
&& !got_int)
{
- MSG_PUTS("\n\"= ");
+ msg_puts("\n\"= ");
dis_msg(expr_line, FALSE);
}
#endif
{
if (dict == NULL)
{
- MSG(_(no_lines_msg));
+ msg(_(no_lines_msg));
return;
}
}
/* 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;
}
}
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
/* 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:
/* 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('=');
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
{
msg_putchar('\n');
msg_outnum((long)x);
- MSG_PUTS(_(" returned\n"));
+ msg_puts(_(" returned\n"));
}
retval = x;
}
if (x < 0)
# endif
{
- MSG_PUTS(_("Cannot execute "));
+ msg_puts(_("Cannot execute "));
if (use_execute)
{
if (cmd == NULL)
}
else
{
- MSG_PUTS(_("shell "));
+ msg_puts(_("shell "));
msg_outtrans(shellcmd);
}
msg_putchar('\n');
{
msg_putchar('\n');
msg_outnum((long)x);
- MSG_PUTS(_(" returned\n"));
+ msg_puts(_(" returned\n"));
}
retval = x;
}
(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);
}
if (p_verbose >= 5)
{
verbose_enter();
- MSG("fchdir() to previous dir");
+ msg("fchdir() to previous dir");
verbose_leave();
}
l = fchdir(fd);
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);
{
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');
}
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 */
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');
}
}
if (pipe_error)
{
- MSG_PUTS(_("\nCannot create pipes\n"));
+ msg_puts(_("\nCannot create pipes\n"));
out_flush();
}
}
{
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)
* external program. */
if ((wpid = fork()) == -1)
{
- MSG_PUTS(_("\nCannot fork\n"));
+ msg_puts(_("\nCannot fork\n"));
}
else if (wpid == 0) /* child */
{
}
c = *p;
*p = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
if (p < buffer + len)
{
*p = c;
else
{
buffer[len] = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
}
windgoto(msg_row, msg_col);
{
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"));
}
}
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)
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 */
if (!(flags & EW_SILENT))
#endif
{
- MSG(_(e_wildexpand));
+ msg(_(e_wildexpand));
msg_start(); /* don't overwrite this message */
}
}
/* 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);
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;
}
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 */
{
/* Lost ICE */
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP lost ICE connection"));
+ verb_msg(_("XSMP lost ICE connection"));
xsmp_close();
return FAIL;
}
#endif
if (p_verbose > 0)
- verb_msg((char_u *)_("XSMP opening connection"));
+ verb_msg(_("XSMP opening connection"));
xsmp.save_yourself = xsmp.shutdown = False;
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;
}
{
vim_snprintf(errorreport, sizeof(errorreport),
_("XSMP SmcOpenConnection failed: %s"), errorstring);
- verb_msg((char_u *)errorreport);
+ verb_msg(errorreport);
}
return;
}
}
c = *p;
*p = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
if (p < buffer + len)
{
*p = c;
else
{
buffer[len] = NUL;
- msg_puts(buffer);
+ msg_puts((char *)buffer);
}
windgoto(msg_row, msg_col);
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);
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);
/* 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);
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);
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);
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;
}
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)
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
vim_strcat(buf, (char_u *)title, IOSIZE);
}
trunc_string(buf, buf, Columns - 1, IOSIZE);
- msg(buf);
+ msg((char *)buf);
}
/*
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 ? "> " : " ");
if (msg_col == 0)
msg_didout = FALSE;
msg_start();
- MSG_PUTS(":!");
+ msg_puts(":!");
msg_outtrans(cmd); // show what we are doing
return cmd;
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();
}
}
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
# 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)
{
/* 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
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);
}
}
}
#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
{
# 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)
{
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;
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);
}
}
message */
{
msg_home_replace_hl(new_fname);
- MSG_PUTS(_(" (includes previously listed match)"));
+ msg_puts(_(" (includes previously listed match)"));
prev_fname = NULL;
}
}
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
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 */
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
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
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 */
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;
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)
_(" 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)
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);
}
}
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)
sug.su_badlen, sug.su_badptr);
}
#endif
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
msg_clr_eos();
msg_putchar('\n');
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)
rl_mirror(IObuff + 1);
#endif
msg_advance(30);
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
}
msg_putchar('\n');
}
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');
}
}
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
{
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 */
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)
_("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;
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;
}
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)
{
{
if (!spin->si_verbose)
verbose_enter();
- MSG(str);
+ msg((char *)str);
out_flush();
if (!spin->si_verbose)
verbose_leave();
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
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;
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;
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;
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
if (!syntax_present(curwin))
{
- MSG(_(msg_no_items));
+ msg(_(msg_no_items));
return;
}
{
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;
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))
{
/*
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"));
}
}
{
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"));
}
}
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(' ');
}
}
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);
}
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(' ');
}
}
}
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");
}
}
{
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)
{
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");
}
/* 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 */
{
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)
{
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);
}
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);
}
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)
if (!syntax_present(curwin))
{
- MSG(_(msg_no_items));
+ msg(_(msg_no_items));
return;
}
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)
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
{
(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);
}
{
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);
}
/* 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(' ');
}
/* 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;
}
}
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);
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)
{
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));
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)
p = msg_outtrans_one(p, attr);
if (*p == TAB)
{
- msg_puts_attr((char_u *)" ", attr);
+ msg_puts_attr(" ", attr);
break;
}
if (*p == ':')
&& 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
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)
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.
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
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;
*/
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();
return;
/* Highlight title */
- MSG_PUTS_TITLE(_("\n--- Terminal keys ---"));
+ msg_puts_title(_("\n--- Terminal keys ---"));
/*
* do the loop two times:
if (printit)
{
- msg_puts(IObuff);
+ msg_puts((char *)IObuff);
if (code == NULL)
- msg_puts((char_u *)"NULL");
+ msg_puts("NULL");
else
msg_outtrans(code);
}
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;
}
emsg(_(e_shellempty));
else
{
- MSG_PUTS(_("new shell started\n"));
+ msg_puts(_("new shell started\n"));
do_shell(NULL, 0);
}
}
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();
}
}
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;
}
beep_flush();
if (count == startcount - 1)
{
- MSG(_("Already at oldest change"));
+ msg(_("Already at oldest change"));
return;
}
break;
beep_flush(); /* nothing to redo */
if (count == startcount - 1)
{
- MSG(_("Already at newest change"));
+ msg(_("Already at newest change"));
return;
}
break;
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;
}
}
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();
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
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;
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;
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;
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);
if (!got_int)
{
msg_putchar('\n');
- msg_puts((char_u *)" endfunction");
+ msg_puts(" endfunction");
}
}
else
{
if (current_funccal != NULL)
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
- (char_u *)"l:", FALSE, first);
+ "l:", FALSE, first);
}
/*
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 779,
/**/
778,
/**/
if (!got_int)
{
if (wrap)
- MSG_PUTS("[");
- MSG_PUTS(s);
+ msg_puts("[");
+ msg_puts((char *)s);
if (wrap)
- MSG_PUTS("]");
+ msg_puts("]");
}
}
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)
* 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
/* 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)
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;
/* 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
# 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
/* move window to new tab page */
case 'T':
if (one_window())
- MSG(_(m_onlyone));
+ msg(_(m_onlyone));
else
{
tabpage_T *oldtab = curtab;
if (one_window())
{
if (message && !autocmd_busy)
- MSG(_(m_onlyone));
+ msg(_(m_onlyone));
return;
}