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

patch 7.4.1977

Problem:    With 64 bit changes don't need three calls to sprintf().
Solution:   Simplify the code, use vim_snprintf(). (Ken Takata)
This commit is contained in:
Bram Moolenaar
2016-07-01 20:03:42 +02:00
parent 22fcfad292
commit bde9810d61
2 changed files with 6 additions and 22 deletions

View File

@@ -5231,17 +5231,8 @@ msg_add_lines(
if (insert_space) if (insert_space)
*p++ = ' '; *p++ = ' ';
if (shortmess(SHM_LINES)) if (shortmess(SHM_LINES))
#ifdef LONG_LONG_OFF_T vim_snprintf((char *)p, IOSIZE - (p - IObuff),
sprintf((char *)p, "%ldL, %lldC", lnum, (varnumber_T)nchars);
"%ldL, %lldC", lnum, (long long)nchars);
#elif defined(WIN3264)
sprintf((char *)p,
"%ldL, %I64dC", lnum, (__int64)nchars);
#else
sprintf((char *)p,
/* Explicit typecast avoids warning on Mac OS X 10.6 */
"%ldL, %ldC", lnum, (long)nchars);
#endif
else else
{ {
if (lnum == 1) if (lnum == 1)
@@ -5252,17 +5243,8 @@ msg_add_lines(
if (nchars == 1) if (nchars == 1)
STRCPY(p, _("1 character")); STRCPY(p, _("1 character"));
else else
#ifdef LONG_LONG_OFF_T vim_snprintf((char *)p, IOSIZE - (p - IObuff),
sprintf((char *)p, _("%lld characters"), (varnumber_T)nchars);
_("%lld characters"), (long long)nchars);
#elif defined(WIN3264)
sprintf((char *)p,
_("%I64d characters"), (__int64)nchars);
#else
sprintf((char *)p,
/* Explicit typecast avoids warning on Mac OS X 10.6 */
_("%ld characters"), (long)nchars);
#endif
} }
} }

View File

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