summaryrefslogtreecommitdiff
path: root/src/digraph.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/digraph.c
parent05500ece6282407f9f7227aaf564e24147326863 (diff)
downloadvim-git-f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d.tar.gz
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/digraph.c')
-rw-r--r--src/digraph.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/digraph.c b/src/digraph.c
index 8a46b5b0d..407b45f83 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -2218,18 +2218,18 @@ putdigraph(char_u *str)
char2 = *str++;
if (char2 == 0)
{
- EMSG(_(e_invarg));
+ emsg(_(e_invarg));
return;
}
if (char1 == ESC || char2 == ESC)
{
- EMSG(_("E104: Escape not allowed in digraph"));
+ emsg(_("E104: Escape not allowed in digraph"));
return;
}
str = skipwhite(str);
if (!VIM_ISDIGIT(*str))
{
- EMSG(_(e_number_exp));
+ emsg(_(e_number_exp));
return;
}
n = getdigits(&str);
@@ -2446,7 +2446,7 @@ static void keymap_unload(void);
* used when setting the option, not later when the value has already been
* checked.
*/
- char_u *
+ char *
keymap_init(void)
{
curbuf->b_kmap_state &= ~KEYMAP_INIT;
@@ -2487,7 +2487,7 @@ keymap_init(void)
if (source_runtime(buf, 0) == FAIL)
{
vim_free(buf);
- return (char_u *)N_("E544: Keymap file not found");
+ return N_("E544: Keymap file not found");
}
}
vim_free(buf);
@@ -2513,7 +2513,7 @@ ex_loadkeymap(exarg_T *eap)
if (!getline_equal(eap->getline, eap->cookie, getsourceline))
{
- EMSG(_("E105: Using :loadkeymap not in a sourced file"));
+ emsg(_("E105: Using :loadkeymap not in a sourced file"));
return;
}
@@ -2552,7 +2552,7 @@ ex_loadkeymap(exarg_T *eap)
|| *kp->from == NUL || *kp->to == NUL)
{
if (kp->to != NULL && *kp->to == NUL)
- EMSG(_("E791: Empty keymap entry"));
+ emsg(_("E791: Empty keymap entry"));
vim_free(kp->from);
vim_free(kp->to);
}