Mercurial > vim
comparison src/term.c @ 28497:7c4a9e20c178 v8.2.4773
patch 8.2.4773: build failure without the +eval feature
Commit: https://github.com/vim/vim/commit/a9549c9e8f368a7fa1dcbe14ec23e82c6a0b8715
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 17 14:18:11 2022 +0100
patch 8.2.4773: build failure without the +eval feature
Problem: Build failure without the +eval feature.
Solution: Use other error message. Avoid warnings.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Apr 2022 15:30:06 +0200 |
parents | 4dcccb2673fe |
children | e1c6e1f3c1bb |
comparison
equal
deleted
inserted
replaced
28496:bf19917b91ab | 28497:7c4a9e20c178 |
---|---|
5955 int *did_simplify) | 5955 int *did_simplify) |
5956 { | 5956 { |
5957 int i; | 5957 int i; |
5958 int slen; | 5958 int slen; |
5959 int key; | 5959 int key; |
5960 int dlen = 0; | 5960 size_t dlen = 0; |
5961 char_u *src; | 5961 char_u *src; |
5962 int do_backslash; // backslash is a special character | 5962 int do_backslash; // backslash is a special character |
5963 int do_special; // recognize <> key codes | 5963 int do_special; // recognize <> key codes |
5964 int do_key_code; // recognize raw key codes | 5964 int do_key_code; // recognize raw key codes |
5965 char_u *result; // buffer for resulting string | 5965 char_u *result; // buffer for resulting string |
5975 * Allocate space for the translation. Worst case a single character is | 5975 * Allocate space for the translation. Worst case a single character is |
5976 * replaced by 6 bytes (shifted special key), plus a NUL at the end. | 5976 * replaced by 6 bytes (shifted special key), plus a NUL at the end. |
5977 * In the rare case more might be needed ga_grow() must be called again. | 5977 * In the rare case more might be needed ga_grow() must be called again. |
5978 */ | 5978 */ |
5979 ga_init2(&ga, 1L, 100); | 5979 ga_init2(&ga, 1L, 100); |
5980 if (ga_grow(&ga, STRLEN(src) * 6 + 1) == FAIL) // out of memory | 5980 if (ga_grow(&ga, (int)(STRLEN(src) * 6 + 1)) == FAIL) // out of memory |
5981 { | 5981 { |
5982 *bufp = NULL; | 5982 *bufp = NULL; |
5983 return from; | 5983 return from; |
5984 } | 5984 } |
5985 result = ga.ga_data; | 5985 result = ga.ga_data; |
6042 if (si->sn_autoload_prefix != NULL) | 6042 if (si->sn_autoload_prefix != NULL) |
6043 { | 6043 { |
6044 // Turn "<SID>name.Func" | 6044 // Turn "<SID>name.Func" |
6045 // into "scriptname#Func". | 6045 // into "scriptname#Func". |
6046 len = STRLEN(si->sn_autoload_prefix); | 6046 len = STRLEN(si->sn_autoload_prefix); |
6047 if (ga_grow(&ga, STRLEN(src) * 6 + len + 1) | 6047 if (ga_grow(&ga, |
6048 == FAIL) | 6048 (int)(STRLEN(src) * 6 + len + 1)) == FAIL) |
6049 { | 6049 { |
6050 ga_clear(&ga); | 6050 ga_clear(&ga); |
6051 *bufp = NULL; | 6051 *bufp = NULL; |
6052 return from; | 6052 return from; |
6053 } | 6053 } |
6062 | 6062 |
6063 result[dlen++] = K_SPECIAL; | 6063 result[dlen++] = K_SPECIAL; |
6064 result[dlen++] = (int)KS_EXTRA; | 6064 result[dlen++] = (int)KS_EXTRA; |
6065 result[dlen++] = (int)KE_SNR; | 6065 result[dlen++] = (int)KE_SNR; |
6066 sprintf((char *)result + dlen, "%ld", sid); | 6066 sprintf((char *)result + dlen, "%ld", sid); |
6067 dlen += (int)STRLEN(result + dlen); | 6067 dlen += STRLEN(result + dlen); |
6068 result[dlen++] = '_'; | 6068 result[dlen++] = '_'; |
6069 continue; | 6069 continue; |
6070 } | 6070 } |
6071 } | 6071 } |
6072 #endif | 6072 #endif |