diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-19 21:43:47 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-19 21:43:47 +0200 |
commit | 74c69636563310d1e941fec695ff2d74518fe743 (patch) | |
tree | 52e031d2cc0ed09a9bf40ba11e739ae1e6a88133 | |
parent | be593bf135f6967335b14ba188bd5f8f32175c75 (diff) | |
download | vim-git-74c69636563310d1e941fec695ff2d74518fe743.tar.gz |
patch 8.2.0799: build fails if snprintf is not availablev8.2.0799
Problem: Build fails if snprintf is not available.
Solution: Use vim_snprintf().
-rw-r--r-- | src/libvterm/src/state.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libvterm/src/state.c b/src/libvterm/src/state.c index 6a5c265ab..42f61f256 100644 --- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -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; diff --git a/src/version.c b/src/version.c index 4c3cab753..f79ad7545 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 799, +/**/ 798, /**/ 797, |