• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

K.Takata's patch queue for Vim


Commit MetaInfo

Revisión84ef0037953b696e5fb3ccba70974ae5a861dc08 (tree)
Tiempo2020-11-18 12:33:23
AutorK.Takata <kentkt@csc....>
CommiterK.Takata

Log Message

Add a new patch

Cambiar Resumen

Diferencia incremental

diff -r a54ff2429dca -r 84ef0037953b gvimext-restore-lang.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gvimext-restore-lang.patch Wed Nov 18 12:33:23 2020 +0900
@@ -0,0 +1,74 @@
1+# HG changeset patch
2+# Parent 5f07bb4a50712f0d3bfa4bdc01c349b1d72dd0a5
3+
4+diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp
5+--- a/src/GvimExt/gvimext.cpp
6++++ b/src/GvimExt/gvimext.cpp
7+@@ -205,17 +205,17 @@ dyn_libintl_init(char *dir)
8+ if (buf != NULL && buf2 != NULL)
9+ {
10+ GetEnvironmentVariableW(L"PATH", buf, len);
11+-#ifdef _WIN64
12++# ifdef _WIN64
13+ _snwprintf(buf2, len2, L"%S\\GvimExt64;%s", dir, buf);
14+-#else
15++# else
16+ _snwprintf(buf2, len2, L"%S\\GvimExt32;%s", dir, buf);
17+-#endif
18++# endif
19+ SetEnvironmentVariableW(L"PATH", buf2);
20+ hLibintlDLL = LoadLibrary(GETTEXT_DLL);
21+-#ifdef GETTEXT_DLL_ALT
22++# ifdef GETTEXT_DLL_ALT
23+ if (!hLibintlDLL)
24+ hLibintlDLL = LoadLibrary(GETTEXT_DLL_ALT);
25+-#endif
26++# endif
27+ SetEnvironmentVariableW(L"PATH", buf);
28+ }
29+ free(buf);
30+@@ -274,6 +274,7 @@ dyn_gettext_load(void)
31+ {
32+ char szBuff[BUFSIZE];
33+ char szLang[BUFSIZE];
34++ LPWSTR saved_lang = NULL;
35+ DWORD len;
36+ HKEY keyhandle;
37+ int gotlang = 0;
38+@@ -322,7 +323,12 @@ dyn_gettext_load(void)
39+ }
40+ }
41+ if (gotlang)
42++ {
43++ LPWSTR p = _wgetenv(L"LANG");
44++
45++ saved_lang = _wcsdup(p == NULL ? L"" : p);
46+ putenv(szLang);
47++ }
48+
49+ // Try to locate the runtime files. The path is used to find libintl.dll
50+ // and the vim.mo files.
51+@@ -338,6 +344,23 @@ dyn_gettext_load(void)
52+ (*dyn_libintl_textdomain)(VIMPACKAGE);
53+ }
54+ }
55++
56++ // Restore $LANG to avoid the side effects on the process which loaded
57++ // this DLL.
58++ // gvimext.dll is (normally) compiled by MSVC, and libintl-8.dll is
59++ // compiled by MinGW. This means that the DLLs have separate environment
60++ // variable areas. So, restoring $LANG in gvimext.dll doesn't affect
61++ // libintl-8.dll.
62++ if (saved_lang != NULL)
63++ {
64++# ifdef _MSC_VER
65++ WCHAR buf[BUFSIZE];
66++
67++ _snwprintf(buf, BUFSIZE, L"LANG=%s", saved_lang);
68++ _wputenv(buf);
69++# endif
70++ free(saved_lang);
71++ }
72+ }
73+
74+ static void
diff -r a54ff2429dca -r 84ef0037953b series
--- a/series Wed Nov 18 07:05:29 2020 +0900
+++ b/series Wed Nov 18 12:33:23 2020 +0900
@@ -29,4 +29,5 @@
2929 msvc-use-gf-flag.patch
3030 win32-disable-quickedit-by-mouse.patch
3131 win32-job-issue7097.diff #+disabled
32+gvimext-restore-lang.patch
3233 fix-config_cache-removal.patch #+rejected