From efa924f66b183d9cf2404ce91c4f009c27e0515a Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 18 Oct 2021 09:08:46 -0400 Subject: vim-patch:8.1.0743: giving error messages is not flexible 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 vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d --- src/nvim/debugger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/debugger.c') diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c index aeaf2555b1..9657e903d1 100644 --- a/src/nvim/debugger.c +++ b/src/nvim/debugger.c @@ -496,7 +496,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) bp->dbg_type = DBG_FILE; } else if (gap != &prof_ga && STRNCMP(p, "here", 4) == 0) { if (curbuf->b_ffname == NULL) { - EMSG(_(e_noname)); + emsg(_(e_noname)); return FAIL; } bp->dbg_type = DBG_FILE; @@ -504,7 +504,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) } else if (gap != &prof_ga && STRNCMP(p, "expr", 4) == 0) { bp->dbg_type = DBG_EXPR; } else { - EMSG2(_(e_invarg2), p); + semsg(_(e_invarg2), p); return FAIL; } p = skipwhite(p + 4); @@ -523,7 +523,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) if ((!here && *p == NUL) || (here && *p != NUL) || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL)) { - EMSG2(_(e_invarg2), arg); + semsg(_(e_invarg2), arg); return FAIL; } @@ -661,7 +661,7 @@ void ex_breakdel(exarg_T *eap) } if (todel < 0) { - EMSG2(_("E161: Breakpoint not found: %s"), eap->arg); + semsg(_("E161: Breakpoint not found: %s"), eap->arg); } else { while (!GA_EMPTY(gap)) { xfree(DEBUGGY(gap, todel).dbg_name); -- cgit