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)
Files: src/fileio.c
*** ../vim-7.4.1976/src/fileio.c 2016-07-01 18:16:47.489936307 +0200
--- src/fileio.c 2016-07-01 19:58:45.000202933 +0200
***************
*** 5231,5247 ****
if (insert_space)
*p++ = ' ';
if (shortmess(SHM_LINES))
! #ifdef LONG_LONG_OFF_T
! sprintf((char *)p,
! "%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
{
if (lnum == 1)
--- 5231,5238 ----
if (insert_space)
*p++ = ' ';
if (shortmess(SHM_LINES))
! vim_snprintf((char *)p, IOSIZE - (p - IObuff),
! "%ldL, %lldC", lnum, (varnumber_T)nchars);
else
{
if (lnum == 1)
***************
*** 5252,5268 ****
if (nchars == 1)
STRCPY(p, _("1 character"));
else
! #ifdef LONG_LONG_OFF_T
! sprintf((char *)p,
! _("%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
}
}
--- 5243,5250 ----
if (nchars == 1)
STRCPY(p, _("1 character"));
else
! vim_snprintf((char *)p, IOSIZE - (p - IObuff),
! _("%lld characters"), (varnumber_T)nchars);
}
}
*** ../vim-7.4.1976/src/version.c 2016-07-01 18:16:47.501936132 +0200
--- src/version.c 2016-07-01 19:59:49.371262907 +0200
***************
*** 760,761 ****
--- 760,763 ----
{ /* Add new patch number below this line */
+ /**/
+ 1977,
/**/
--
If Microsoft would build a car...
... the oil, water temperature, and alternator warning lights would
all be replaced by a single "General Protection Fault" warning light.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.