summaryrefslogtreecommitdiffstats
path: root/src/if_tcl.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/if_tcl.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/if_tcl.c')
-rw-r--r--src/if_tcl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 7fb9174820..abef6134d0 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -213,7 +213,7 @@ tcl_runtime_link_init(char *libname, int verbose)
if (!(hTclLib = load_dll(libname)))
{
if (verbose)
- EMSG2(_(e_loadlib), libname);
+ semsg(_(e_loadlib), libname);
return FAIL;
}
for (i = 0; tcl_funcname_table[i].ptr; ++i)
@@ -224,7 +224,7 @@ tcl_runtime_link_init(char *libname, int verbose)
close_dll(hTclLib);
hTclLib = NULL;
if (verbose)
- EMSG2(_(e_loadfunc), tcl_funcname_table[i].name);
+ semsg(_(e_loadfunc), tcl_funcname_table[i].name);
return FAIL;
}
}
@@ -1539,7 +1539,7 @@ tclsetdelcmd(
reflist = reflist->next;
}
/* This should never happen. Famous last word? */
- EMSG(_("E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-dev@vim.org"));
+ emsg(_("E280: TCL FATAL ERROR: reflist corrupt!? Please report this to vim-dev@vim.org"));
Tcl_SetResult(interp, _("cannot register callback command: buffer/window reference not found"), TCL_STATIC);
return TCL_ERROR;
}
@@ -1709,7 +1709,7 @@ tclinit(exarg_T *eap)
#ifdef DYNAMIC_TCL
if (!tcl_enabled(TRUE))
{
- EMSG(_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
+ emsg(_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
return FAIL;
}
#endif
@@ -1817,11 +1817,11 @@ tclerrmsg(char *text)
while ((next=strchr(text, '\n')))
{
*next++ = '\0';
- EMSG(text);
+ emsg(text);
text = next;
}
if (*text)
- EMSG(text);
+ emsg(text);
}
static void