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