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.
f9e3e09fdc
This commit is contained in:
James McCoy
2021-10-18 09:08:46 -04:00
parent 684640f551
commit efa924f66b
75 changed files with 1697 additions and 1741 deletions

View File

@@ -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);