message: Remove useless emsg* functions, leaving only emsgf

This commit is contained in:
ZyX
2016-03-07 09:29:38 +03:00
parent 9a56fcb2e8
commit 82f249f829
4 changed files with 59 additions and 105 deletions

View File

@@ -557,52 +557,11 @@ int emsg(char_u *s)
return msg_attr(s, attr);
}
/*
* Print an error message with one "%s" and one string argument.
*/
int emsg2(char_u *s, char_u *a1)
{
return emsg3(s, a1, NULL);
}
void emsg_invreg(int name)
{
EMSG2(_("E354: Invalid register name: '%s'"), transchar(name));
}
/// Print an error message with one or two "%s" and one or two string arguments.
int emsg3(char_u *s, char_u *a1, char_u *a2)
{
if (emsg_not_now()) {
return TRUE; // no error messages at the moment
}
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
return emsg(IObuff);
}
/// Print an error message with one "%" PRId64 and one (int64_t) argument.
int emsgn(char_u *s, int64_t n)
{
if (emsg_not_now()) {
return TRUE; // no error messages at the moment
}
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
return emsg(IObuff);
}
/// Print an error message with one "%" PRIu64 and one (uint64_t) argument.
int emsgu(char_u *s, uint64_t n)
{
if (emsg_not_now()) {
return TRUE; // no error messages at the moment
}
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
return emsg(IObuff);
}
/// Print an error message with unknown number of arguments
bool emsgf(const char *const fmt, ...)
{