Hi Bram,

2016/7/2 Sat 1:17:57 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.1976
> Problem:    Number variables are not 64 bits while they could be.
> Solution:   Add the num64 feature. (Ken Takata)
> Files:      runtime/doc/eval.txt, runtime/doc/various.txt,
>           src/Make_cyg_ming.mak, src/Make_mvc.mak, src/charset.c,
>           src/eval.c, src/ex_cmds.c, src/ex_getln.c, src/feature.h,
>           src/fileio.c, src/fold.c, src/json.c, src/message.c, src/misc1.c,
>           src/misc2.c, src/ops.c, src/option.c, src/proto/charset.pro,
>           src/proto/eval.pro, src/quickfix.c, src/structs.h,
>           src/testdir/test_viml.vim, src/version.c

Thank you very much for merging this patch.
BTW, the first version of this patch was written by mattn, so his name
should be also listed.

And also thanks for merging the largefiles patches. Now we have both largefiles
and num64 patches, some part can be made simpler.
Please check attached patch.

Regards,
Ken Takata

-- 
-- 
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.
# HG changeset patch
# Parent  a24d6ef50cf2880d09845499ce6939da701139b6
largefile + num64

This patch is an additional patch for the largefiles patches and the num64
patches.  Both series of patches must be applied before this patch.

diff --git a/src/fileio.c b/src/fileio.c
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5231,17 +5231,8 @@ msg_add_lines(
     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
+	vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+		"%ldL, %lldC", lnum, (varnumber_T)nchars);
     else
     {
 	if (lnum == 1)
@@ -5252,17 +5243,8 @@ msg_add_lines(
 	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
+	    vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+		    _("%lld characters"), (varnumber_T)nchars);
     }
 }
 

Raspunde prin e-mail lui