0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.0799: build fails if snprintf is not available

Problem:    Build fails if snprintf is not available.
Solution:   Use vim_snprintf().
This commit is contained in:
Bram Moolenaar
2020-05-19 21:43:47 +02:00
parent be593bf135
commit 74c6963656
2 changed files with 5 additions and 3 deletions

View File

@@ -1674,13 +1674,13 @@ static void request_status_string(VTermState *state, VTermStringFragment frag)
size_t cur = 0;
int argi;
cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
cur += SNPRINTF(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
vt->mode.ctrl8bit ? "\x90" "1$r" : ESC_S "P" "1$r"); // DCS 1$r ...
if(cur >= vt->tmpbuffer_len)
return;
for(argi = 0; argi < argc; argi++) {
cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
cur += SNPRINTF(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
argi == argc - 1 ? "%ld" :
CSI_ARG_HAS_MORE(args[argi]) ? "%ld:" :
"%ld;",
@@ -1689,7 +1689,7 @@ static void request_status_string(VTermState *state, VTermStringFragment frag)
return;
}
cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
cur += SNPRINTF(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
vt->mode.ctrl8bit ? "m" "\x9C" : "m" ESC_S "\\"); // ... m ST
if(cur >= vt->tmpbuffer_len)
return;

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
799,
/**/
798,
/**/