Mercurial > vim
diff src/evalfunc.c @ 11653:67cf0d45b006 v8.0.0709
patch 8.0.0709: libvterm cannot use vsnprintf()
commit https://github.com/vim/vim/commit/8327d1df1754b33d8a93b3411f30692f0042f4ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 11 22:34:51 2017 +0200
patch 8.0.0709: libvterm cannot use vsnprintf()
Problem: Libvterm cannot use vsnprintf(), it does not exist in C90.
Solution: Use vim_vsnprintf() instead.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 11 Jul 2017 22:45:03 +0200 |
parents | b8299e742f41 |
children | 3b2afa2b77b3 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -8043,14 +8043,15 @@ f_printf(typval_T *argvars, typval_T *re /* Get the required length, allocate the buffer and do it for real. */ did_emsg = FALSE; fmt = (char *)get_tv_string_buf(&argvars[0], buf); - len = vim_vsnprintf(NULL, 0, fmt, ap, argvars + 1); + len = vim_vsnprintf_typval(NULL, 0, fmt, ap, argvars + 1); if (!did_emsg) { s = alloc(len + 1); if (s != NULL) { rettv->vval.v_string = s; - (void)vim_vsnprintf((char *)s, len + 1, fmt, ap, argvars + 1); + (void)vim_vsnprintf_typval((char *)s, len + 1, fmt, + ap, argvars + 1); } } did_emsg |= saved_did_emsg;