|
|
dcaee6 |
To: vim_dev@googlegroups.com
|
|
|
dcaee6 |
Subject: Patch 7.4.124
|
|
|
dcaee6 |
Fcc: outbox
|
|
|
dcaee6 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
dcaee6 |
Mime-Version: 1.0
|
|
|
dcaee6 |
Content-Type: text/plain; charset=UTF-8
|
|
|
dcaee6 |
Content-Transfer-Encoding: 8bit
|
|
|
dcaee6 |
------------
|
|
|
dcaee6 |
|
|
|
dcaee6 |
Patch 7.4.124
|
|
|
dcaee6 |
Problem: Win32: Getting host name does not use wide function.
|
|
|
dcaee6 |
Solution: Use GetComputerNameW() if possible. (Ken Takata)
|
|
|
dcaee6 |
Files: src/os_win32.c
|
|
|
dcaee6 |
|
|
|
dcaee6 |
|
|
|
dcaee6 |
*** ../vim-7.4.123/src/os_win32.c 2013-12-11 18:18:01.000000000 +0100
|
|
|
dcaee6 |
--- src/os_win32.c 2013-12-11 18:19:11.000000000 +0100
|
|
|
dcaee6 |
***************
|
|
|
dcaee6 |
*** 2808,2813 ****
|
|
|
dcaee6 |
--- 2808,2833 ----
|
|
|
dcaee6 |
{
|
|
|
dcaee6 |
DWORD cch = len;
|
|
|
dcaee6 |
|
|
|
dcaee6 |
+ #ifdef FEAT_MBYTE
|
|
|
dcaee6 |
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
|
|
|
dcaee6 |
+ {
|
|
|
dcaee6 |
+ WCHAR wszHostName[256 + 1];
|
|
|
dcaee6 |
+ DWORD wcch = sizeof(wszHostName) / sizeof(WCHAR);
|
|
|
dcaee6 |
+
|
|
|
dcaee6 |
+ if (GetComputerNameW(wszHostName, &wcch))
|
|
|
dcaee6 |
+ {
|
|
|
dcaee6 |
+ char_u *p = utf16_to_enc(wszHostName, NULL);
|
|
|
dcaee6 |
+
|
|
|
dcaee6 |
+ if (p != NULL)
|
|
|
dcaee6 |
+ {
|
|
|
dcaee6 |
+ vim_strncpy(s, p, len - 1);
|
|
|
dcaee6 |
+ vim_free(p);
|
|
|
dcaee6 |
+ return;
|
|
|
dcaee6 |
+ }
|
|
|
dcaee6 |
+ }
|
|
|
dcaee6 |
+ /* Retry with non-wide function (for Windows 98). */
|
|
|
dcaee6 |
+ }
|
|
|
dcaee6 |
+ #endif
|
|
|
dcaee6 |
if (!GetComputerName(s, &cch))
|
|
|
dcaee6 |
vim_strncpy(s, "PC (Win32 Vim)", len - 1);
|
|
|
dcaee6 |
}
|
|
|
dcaee6 |
*** ../vim-7.4.123/src/version.c 2013-12-11 18:18:01.000000000 +0100
|
|
|
dcaee6 |
--- src/version.c 2013-12-11 18:20:03.000000000 +0100
|
|
|
dcaee6 |
***************
|
|
|
dcaee6 |
*** 740,741 ****
|
|
|
dcaee6 |
--- 740,743 ----
|
|
|
dcaee6 |
{ /* Add new patch number below this line */
|
|
|
dcaee6 |
+ /**/
|
|
|
dcaee6 |
+ 124,
|
|
|
dcaee6 |
/**/
|
|
|
dcaee6 |
|
|
|
dcaee6 |
--
|
|
|
dcaee6 |
Don't read everything you believe.
|
|
|
dcaee6 |
|
|
|
dcaee6 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
dcaee6 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
dcaee6 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
dcaee6 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|