|
Karsten Hopp |
0b7a6d |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
0b7a6d |
Subject: Patch 7.3.1284
|
|
Karsten Hopp |
0b7a6d |
Fcc: outbox
|
|
Karsten Hopp |
0b7a6d |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
0b7a6d |
Mime-Version: 1.0
|
|
Karsten Hopp |
0b7a6d |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
0b7a6d |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
0b7a6d |
------------
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
Patch 7.3.1284
|
|
Karsten Hopp |
0b7a6d |
Problem: Compiler warnings in MS-Windows clipboard handling.
|
|
Karsten Hopp |
0b7a6d |
Solution: Add type casts. (Ken Takata)
|
|
Karsten Hopp |
0b7a6d |
Files: src/winclip.c
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
*** ../vim-7.3.1283/src/winclip.c 2013-02-26 14:56:24.000000000 +0100
|
|
Karsten Hopp |
0b7a6d |
--- src/winclip.c 2013-07-01 21:05:53.000000000 +0200
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 180,186 ****
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
*outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
|
|
Karsten Hopp |
0b7a6d |
/* Add one one byte to avoid a zero-length alloc(). */
|
|
Karsten Hopp |
0b7a6d |
! *out = alloc((unsigned)*outlen + 1);
|
|
Karsten Hopp |
0b7a6d |
if (*out != NULL)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
|
|
Karsten Hopp |
0b7a6d |
--- 180,186 ----
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
*outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
|
|
Karsten Hopp |
0b7a6d |
/* Add one one byte to avoid a zero-length alloc(). */
|
|
Karsten Hopp |
0b7a6d |
! *out = (LPSTR)alloc((unsigned)*outlen + 1);
|
|
Karsten Hopp |
0b7a6d |
if (*out != NULL)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 557,563 ****
|
|
Karsten Hopp |
0b7a6d |
return; /* out of memory */
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
WideCharToMultiByte(GetACP(), 0, out, len,
|
|
Karsten Hopp |
0b7a6d |
! str, metadata.txtlen, 0, 0);
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
/* Allocate memory for the UTF-16 text, add one NUL word to
|
|
Karsten Hopp |
0b7a6d |
* terminate the string. */
|
|
Karsten Hopp |
0b7a6d |
--- 557,563 ----
|
|
Karsten Hopp |
0b7a6d |
return; /* out of memory */
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
WideCharToMultiByte(GetACP(), 0, out, len,
|
|
Karsten Hopp |
0b7a6d |
! (LPSTR)str, metadata.txtlen, 0, 0);
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
/* Allocate memory for the UTF-16 text, add one NUL word to
|
|
Karsten Hopp |
0b7a6d |
* terminate the string. */
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 584,590 ****
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
if (lpszMem)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
! vim_strncpy(lpszMem, str, metadata.txtlen);
|
|
Karsten Hopp |
0b7a6d |
GlobalUnlock(hMem);
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
--- 584,590 ----
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
if (lpszMem)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
! vim_strncpy((char_u *)lpszMem, str, metadata.txtlen);
|
|
Karsten Hopp |
0b7a6d |
GlobalUnlock(hMem);
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 677,683 ****
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
/* We can do any CP### -> UTF-16 in one pass, and we can do it
|
|
Karsten Hopp |
0b7a6d |
* without iconv() (convert_* may need iconv). */
|
|
Karsten Hopp |
0b7a6d |
! MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length);
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
else
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
--- 677,684 ----
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
/* We can do any CP### -> UTF-16 in one pass, and we can do it
|
|
Karsten Hopp |
0b7a6d |
* without iconv() (convert_* may need iconv). */
|
|
Karsten Hopp |
0b7a6d |
! MultiByteToWideChar_alloc(enc_codepage, 0, (LPCSTR)str, *lenp,
|
|
Karsten Hopp |
0b7a6d |
! &ret, &length);
|
|
Karsten Hopp |
0b7a6d |
}
|
|
Karsten Hopp |
0b7a6d |
else
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 787,793 ****
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
LPWSTR widestr;
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
! MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen);
|
|
Karsten Hopp |
0b7a6d |
if (widestr != NULL)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
++*outlen; /* Include the 0 after the string */
|
|
Karsten Hopp |
0b7a6d |
--- 788,795 ----
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
LPWSTR widestr;
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
! MultiByteToWideChar_alloc(GetACP(), 0, (LPCSTR)str, str_size,
|
|
Karsten Hopp |
0b7a6d |
! &widestr, outlen);
|
|
Karsten Hopp |
0b7a6d |
if (widestr != NULL)
|
|
Karsten Hopp |
0b7a6d |
{
|
|
Karsten Hopp |
0b7a6d |
++*outlen; /* Include the 0 after the string */
|
|
Karsten Hopp |
0b7a6d |
*** ../vim-7.3.1283/src/version.c 2013-07-01 20:59:08.000000000 +0200
|
|
Karsten Hopp |
0b7a6d |
--- src/version.c 2013-07-01 21:07:14.000000000 +0200
|
|
Karsten Hopp |
0b7a6d |
***************
|
|
Karsten Hopp |
0b7a6d |
*** 730,731 ****
|
|
Karsten Hopp |
0b7a6d |
--- 730,733 ----
|
|
Karsten Hopp |
0b7a6d |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
0b7a6d |
+ /**/
|
|
Karsten Hopp |
0b7a6d |
+ 1284,
|
|
Karsten Hopp |
0b7a6d |
/**/
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
--
|
|
Karsten Hopp |
0b7a6d |
BLACK KNIGHT: I move for no man.
|
|
Karsten Hopp |
0b7a6d |
ARTHUR: So be it!
|
|
Karsten Hopp |
0b7a6d |
[hah] [parry thrust]
|
|
Karsten Hopp |
0b7a6d |
[ARTHUR chops the BLACK KNIGHT's left arm off]
|
|
Karsten Hopp |
0b7a6d |
ARTHUR: Now stand aside, worthy adversary.
|
|
Karsten Hopp |
0b7a6d |
BLACK KNIGHT: 'Tis but a scratch.
|
|
Karsten Hopp |
0b7a6d |
The Quest for the Holy Grail (Monty Python)
|
|
Karsten Hopp |
0b7a6d |
|
|
Karsten Hopp |
0b7a6d |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
0b7a6d |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
0b7a6d |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
0b7a6d |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|