1
0
forked from aniani/vim

patch 8.1.0811: too many #ifdefs

Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
This commit is contained in:
Bram Moolenaar
2019-01-24 17:59:39 +01:00
parent 264b74fa54
commit 30276f2beb
54 changed files with 121 additions and 324 deletions

View File

@@ -4492,14 +4492,10 @@ vim_vsnprintf_typval(
{
/* Don't put the #if inside memchr(), it can be a
* macro. */
# if VIM_SIZEOF_INT <= 2
char *q = memchr(str_arg, '\0', precision);
# else
/* memchr on HP does not like n > 2^31 !!! */
char *q = memchr(str_arg, '\0',
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL);
# endif
str_arg_l = (q == NULL) ? precision
: (size_t)(q - str_arg);
}