summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-13 23:38:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-13 23:38:42 +0100
commitf9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d (patch)
treea6b07005c19279a4f5d01be14f14861c2657fa95 /src/misc1.c
parent05500ece6282407f9f7227aaf564e24147326863 (diff)
patch 8.1.0743: giving error messages is not flexiblev8.1.0743
Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes #3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts.
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/misc1.c b/src/misc1.c
index ccd9b0796a..0a6dc87212 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2658,7 +2658,7 @@ del_bytes(
/* If "count" is negative the caller must be doing something wrong. */
if (count < 1)
{
- IEMSGN("E950: Invalid count for del_bytes(): %ld", count);
+ siemsg("E950: Invalid count for del_bytes(): %ld", count);
return FAIL;
}
@@ -3521,7 +3521,7 @@ ask_yesno(char_u *str, int direct)
while (r != 'y' && r != 'n')
{
/* same highlighting as for wait_return */
- smsg_attr(HL_ATTR(HLF_R), (char_u *)"%s (y/n)?", str);
+ smsg_attr(HL_ATTR(HLF_R), "%s (y/n)?", str);
if (direct)
r = get_keystroke();
else
@@ -4060,7 +4060,7 @@ init_homedir(void)
if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK)
var = IObuff;
if (mch_chdir((char *)NameBuff) != 0)
- EMSG(_(e_prev_dir));
+ emsg(_(e_prev_dir));
}
#endif
homedir = vim_strsave(var);
@@ -9942,7 +9942,7 @@ expand_wildcards_eval(
int ret = FAIL;
char_u *eval_pat = NULL;
char_u *exp_pat = *pat;
- char_u *ignored_msg;
+ char *ignored_msg;
int usedlen;
if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<')
@@ -11434,7 +11434,7 @@ get_cmd_output(
/* get a name for the temp file */
if ((tempname = vim_tempname('o', FALSE)) == NULL)
{
- EMSG(_(e_notmp));
+ emsg(_(e_notmp));
return NULL;
}
@@ -11465,7 +11465,7 @@ get_cmd_output(
if (fd == NULL)
{
- EMSG2(_(e_notopen), tempname);
+ semsg(_(e_notopen), tempname);
goto done;
}
@@ -11485,7 +11485,7 @@ get_cmd_output(
#endif
if (i != len)
{
- EMSG2(_(e_notread), tempname);
+ semsg(_(e_notread), tempname);
VIM_CLEAR(buffer);
}
else if (ret_len == NULL)