aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/misc2.c11
-rw-r--r--src/misc2.h1
-rw-r--r--src/vim.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 06a4764250..9ffec654d1 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -900,6 +900,17 @@ int emsgn(char_u *s, int64_t n)
}
/*
+ * 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);
+}
+
+/*
* Read 2 bytes from "fd" and turn them into an int, MSB first.
*/
int get2c(FILE *fd)
diff --git a/src/misc2.h b/src/misc2.h
index 7567b11e60..a15c75c435 100644
--- a/src/misc2.h
+++ b/src/misc2.h
@@ -39,6 +39,7 @@ int illegal_slash(char *name);
int vim_chdir(char_u *new_dir);
int emsg3(char_u *s, char_u *a1, char_u *a2);
int emsgn(char_u *s, int64_t n);
+int emsgu(char_u *s, uint64_t n);
int get2c(FILE *fd);
int get3c(FILE *fd);
int get4c(FILE *fd);
diff --git a/src/vim.h b/src/vim.h
index 915aa5df78..f48b7a6f4c 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1024,7 +1024,7 @@ typedef enum {
#define EMSG3(s, p, q) emsg3((char_u *)(s), (char_u *)(p), \
(char_u *)(q))
#define EMSGN(s, n) emsgn((char_u *)(s), (int64_t)(n))
-#define EMSGU(s, n) emsgu((char_u *)(s), (long_u)(n))
+#define EMSGU(s, n) emsgu((char_u *)(s), (uint64_t)(n))
#define OUT_STR(s) out_str((char_u *)(s))
#define OUT_STR_NF(s) out_str_nf((char_u *)(s))
#define MSG_PUTS(s) msg_puts((char_u *)(s))