diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-13 23:38:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-13 23:38:42 +0100 |
commit | f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d (patch) | |
tree | a6b07005c19279a4f5d01be14f14861c2657fa95 /src/mbyte.c | |
parent | 05500ece6282407f9f7227aaf564e24147326863 (diff) | |
download | vim-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/mbyte.c')
-rw-r--r-- | src/mbyte.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 26233e423..9c40072f4 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -199,7 +199,7 @@ xim_log(char *s, ...) fd = mch_fopen("xim.log", "w"); if (fd == NULL) { - EMSG("Cannot open xim.log"); + emsg("Cannot open xim.log"); fd = (FILE *)-1; return; } @@ -509,7 +509,7 @@ enc_canon_props(char_u *name) * When there is something wrong: Returns an error message and doesn't change * anything. */ - char_u * + char * mb_init(void) { int i; @@ -4749,7 +4749,7 @@ iconv_enabled(int verbose) if (verbose && p_verbose > 0) { verbose_enter(); - EMSG2(_(e_loadlib), + semsg(_(e_loadlib), hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL); verbose_leave(); } @@ -4771,7 +4771,7 @@ iconv_enabled(int verbose) if (verbose && p_verbose > 0) { verbose_enter(); - EMSG2(_(e_loadfunc), "for libiconv"); + semsg(_(e_loadfunc), "for libiconv"); verbose_leave(); } return FALSE; @@ -6028,7 +6028,7 @@ xim_set_preedit(void) XNLineSpace, line_space, NULL); if (XSetICValues(xic, XNPreeditAttributes, attr_list, NULL)) - EMSG(_("E284: Cannot set IC values")); + emsg(_("E284: Cannot set IC values")); XFree(attr_list); } } @@ -6187,7 +6187,7 @@ xim_real_init(Window x11_window, Display *x11_display) if (p_verbose > 0) { verbose_enter(); - EMSG(_("E286: Failed to open input method")); + emsg(_("E286: Failed to open input method")); verbose_leave(); } return FALSE; @@ -6200,13 +6200,13 @@ xim_real_init(Window x11_window, Display *x11_display) destroy_cb.callback = xim_destroy_cb; destroy_cb.client_data = NULL; if (XSetIMValues(xim, XNDestroyCallback, &destroy_cb, NULL)) - EMSG(_("E287: Warning: Could not set destroy callback to IM")); + emsg(_("E287: Warning: Could not set destroy callback to IM")); } # endif if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles) { - EMSG(_("E288: input method doesn't support any style")); + emsg(_("E288: input method doesn't support any style")); XCloseIM(xim); return FALSE; } @@ -6265,7 +6265,7 @@ xim_real_init(Window x11_window, Display *x11_display) if (p_verbose > 0) { verbose_enter(); - EMSG(_("E289: input method doesn't support my preedit type")); + emsg(_("E289: input method doesn't support my preedit type")); verbose_leave(); } XCloseIM(xim); @@ -6329,7 +6329,7 @@ xim_real_init(Window x11_window, Display *x11_display) else { if (!is_not_a_term()) - EMSG(_(e_xim)); + emsg(_(e_xim)); XCloseIM(xim); return FALSE; } |