52 Clipboard access.
Pt = Pc ; Pd
@@ -973,9 +973,9 @@
115 Reset TEK Window's text color.
116 Reset TEK Window's background color.
-
+
-
+
SOS Sequence
Modified: trunk/doc/en/html/menu/setup-additional.html
===================================================================
--- trunk/doc/en/html/menu/setup-additional.html 2020-01-29 15:22:19 UTC (rev 8511)
+++ trunk/doc/en/html/menu/setup-additional.html 2020-01-30 10:10:41 UTC (rev 8512)
@@ -285,7 +285,7 @@
Mixed ThemeFile to Background
When the Eterm look-feel feature is enabled, you can specify whether to mix the wallpaper and the image of theme file.
- Howerver, this option can not be used with Background Image at the same time.
+ However, this option can not be used with Background Image at the same time.
Background Image
@@ -498,7 +498,7 @@
Configure CygTerm settings. Please refer to CygTerm+ setup file for details.
- NOTE: The cygterm.cfg file is automatically updated after configuration on version 4.88 or ealier,
+ NOTE: The cygterm.cfg file is automatically updated after configuration on version 4.88 or earlier,
however the file is not automatically updated on version 4.89 or later.
Please do Setup - Save Setup to update the cygterm.cfg file.
Modified: trunk/doc/en/html/menu/setup-serialport.html
===================================================================
--- trunk/doc/en/html/menu/setup-serialport.html 2020-01-29 15:22:19 UTC (rev 8511)
+++ trunk/doc/en/html/menu/setup-serialport.html 2020-01-30 10:10:41 UTC (rev 8512)
@@ -17,7 +17,7 @@
OK button
- The label of OK button is changed refering to the connection state.
+ The label of OK button is changed according to the connection state.
Connect with New window ... Serial connection is launched with new window since TCP/IP connection is using.
New open ... Serial connection starts.
Close and New open ... Current COM port is closed and serial connection starts with new COM port.
@@ -26,7 +26,7 @@
Cancel button
- Discards the setting change and close the dialog.
+ Discards the setting change and closes the dialog.
Help button
Modified: trunk/doc/en/html/reference/develop.txt
===================================================================
--- trunk/doc/en/html/reference/develop.txt 2020-01-29 15:22:19 UTC (rev 8511)
+++ trunk/doc/en/html/reference/develop.txt 2020-01-30 10:10:41 UTC (rev 8512)
@@ -57,8 +57,8 @@
- SFMT 1.5.1 (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html)
-* Notice for SVN commiter
-- SVN repository for commiter is followings:
+* Notice for SVN committer
+- SVN repository for committer is the following:
svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk
- Should not edit checkout file in copying directory.
@@ -235,7 +235,7 @@
* How to build HTML help file
To build HTML help file is shown in the following step:
- 1. Intall HTML Help Workshop from below site:
+ 1. Install HTML Help Workshop from below site:
http://www.microsoft.com/en-us/download/details.aspx?id=21138
2. Copy document files with batch file on command prompt.
Modified: trunk/doc/en/html/usage/tips/vim.html
===================================================================
--- trunk/doc/en/html/usage/tips/vim.html 2020-01-29 15:22:19 UTC (rev 8511)
+++ trunk/doc/en/html/usage/tips/vim.html 2020-01-30 10:10:41 UTC (rev 8512)
@@ -65,7 +65,7 @@
Auto indent can be disabled on pasting from clipboard
-NOTE: When text is pasted by using Vim 8.0.0238 or later , auto indent and completion are disabled not below configuration becasue the vim editor supports Bracketed Paste Mode.
+NOTE: When text is pasted by using Vim 8.0.0238 or later, auto indent and completion are disabled not below configuration because the vim editor supports Bracketed Paste Mode.
However, when tmux is used, below configuration is needed because Bracketed Paste Mode is not enabled.
Modified: trunk/doc/en/teraterm.hhc
===================================================================
--- trunk/doc/en/teraterm.hhc 2020-01-29 15:22:19 UTC (rev 8511)
+++ trunk/doc/en/teraterm.hhc 2020-01-30 10:10:41 UTC (rev 8512)
@@ -386,7 +386,7 @@
-
+
From scmnotify @ osdn.net Thu Jan 30 19:10:47 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Thu, 30 Jan 2020 19:10:47 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MTNdIOODoeODi+ODpeODvOmgheebrg==?=
=?utf-8?b?44Gu6Kqk5a2X44KS5L+u5q2j?=
Message-ID: <1580379047.734937.93446.nullmailer@users.osdn.me>
Revision: 8513
https://osdn.net/projects/ttssh2/scm/svn/commits/8513
Author: doda
Date: 2020-01-30 19:10:47 +0900 (Thu, 30 Jan 2020)
Log Message:
-----------
メニュー項目の誤字を修正
Ticket: #39967
問題:
TTXAlwaysOnTop のメニュー項目に誤字がある
対処:
誤字を修正した
Ticket Links:
------------
https://osdn.net/projects/ttssh2/tracker/detail/39967
Modified Paths:
--------------
trunk/TTXSamples/TTXAlwaysOnTop/TTXAlwaysOnTop.c
-------------- next part --------------
Modified: trunk/TTXSamples/TTXAlwaysOnTop/TTXAlwaysOnTop.c
===================================================================
--- trunk/TTXSamples/TTXAlwaysOnTop/TTXAlwaysOnTop.c 2020-01-30 10:10:41 UTC (rev 8512)
+++ trunk/TTXSamples/TTXAlwaysOnTop/TTXAlwaysOnTop.c 2020-01-30 10:10:47 UTC (rev 8513)
@@ -74,7 +74,7 @@
flag |= MF_CHECKED;
}
- InsertMenu(pvar->ControlMenu, ID_CONTROL_MACRO, flag, ID_MENU_BASE, "&Alwais on top");
+ InsertMenu(pvar->ControlMenu, ID_CONTROL_MACRO, flag, ID_MENU_BASE, "&Always on top");
InsertMenu(pvar->ControlMenu, ID_CONTROL_MACRO, MF_BYCOMMAND | MF_SEPARATOR, 0, NULL);
SetI18nMenuStrs(IniSection, menu, MenuTextInfo, _countof(MenuTextInfo), pvar->ts->UILanguageFile);
From scmnotify @ osdn.net Thu Jan 30 19:17:48 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Thu, 30 Jan 2020 19:17:48 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MTRdIOiqpOWtl+OCkuS/ruatow==?=
Message-ID: <1580379468.333068.114448.nullmailer@users.osdn.me>
Revision: 8514
https://osdn.net/projects/ttssh2/scm/svn/commits/8514
Author: doda
Date: 2020-01-30 19:17:47 +0900 (Thu, 30 Jan 2020)
Log Message:
-----------
誤字を修正
Ticket: #39965
問題:
ヘルプファイルに誤字が有る
対応:
誤字を修正した
Ticket Links:
------------
https://osdn.net/projects/ttssh2/tracker/detail/39965
Modified Paths:
--------------
branches/4-stable/doc/en/html/about/ctrlseq.html
branches/4-stable/doc/en/html/menu/setup-additional.html
branches/4-stable/doc/en/html/menu/setup-serialport.html
branches/4-stable/doc/en/html/reference/develop.txt
branches/4-stable/doc/en/html/usage/tips/vim.html
branches/4-stable/doc/en/teraterm.hhc
-------------- next part --------------
Modified: branches/4-stable/doc/en/html/about/ctrlseq.html
===================================================================
--- branches/4-stable/doc/en/html/about/ctrlseq.html 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/html/about/ctrlseq.html 2020-01-30 10:17:47 UTC (rev 8514)
@@ -949,9 +949,9 @@
15 Change TEK Window's text color to Pt . Format of Pt is same as OSC 4's spec .
16 Change TEK Window's background color to Pt . Format of Pt is same as OSC 4's spec .
-
+
-
+
52 Clipboard access.
Pt = Pc ; Pd
@@ -973,9 +973,9 @@
115 Reset TEK Window's text color.
116 Reset TEK Window's background color.
-
+
-
+
SOS Sequence
Modified: branches/4-stable/doc/en/html/menu/setup-additional.html
===================================================================
--- branches/4-stable/doc/en/html/menu/setup-additional.html 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/html/menu/setup-additional.html 2020-01-30 10:17:47 UTC (rev 8514)
@@ -285,7 +285,7 @@
Mixed ThemeFile to Background
When the Eterm look-feel feature is enabled, you can specify whether to mix the wallpaper and the image of theme file.
- Howerver, this option can not be used with Background Image at the same time.
+ However, this option can not be used with Background Image at the same time.
Background Image
@@ -498,7 +498,7 @@
Configure CygTerm settings. Please refer to CygTerm+ setup file for details.
- NOTE: The cygterm.cfg file is automatically updated after configuration on version 4.88 or ealier,
+ NOTE: The cygterm.cfg file is automatically updated after configuration on version 4.88 or earlier,
however the file is not automatically updated on version 4.89 or later.
Please do Setup - Save Setup to update the cygterm.cfg file.
Modified: branches/4-stable/doc/en/html/menu/setup-serialport.html
===================================================================
--- branches/4-stable/doc/en/html/menu/setup-serialport.html 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/html/menu/setup-serialport.html 2020-01-30 10:17:47 UTC (rev 8514)
@@ -17,7 +17,7 @@
OK button
- The label of OK button is changed refering to the connection state.
+ The label of OK button is changed according to the connection state.
Connect with New window ... Serial connection is launched with new window since TCP/IP connection is using.
New open ... Serial connection starts.
Close and New open ... Current COM port is closed and serial connection starts with new COM port.
@@ -26,7 +26,7 @@
Cancel button
- Discards the setting change and close the dialog.
+ Discards the setting change and closes the dialog.
Help button
Modified: branches/4-stable/doc/en/html/reference/develop.txt
===================================================================
--- branches/4-stable/doc/en/html/reference/develop.txt 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/html/reference/develop.txt 2020-01-30 10:17:47 UTC (rev 8514)
@@ -57,8 +57,8 @@
- SFMT 1.5.1 (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html)
-* Notice for SVN commiter
-- SVN repository for commiter is followings:
+* Notice for SVN committer
+- SVN repository for committer is the following:
svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk
- Should not edit checkout file in copying directory.
@@ -235,7 +235,7 @@
* How to build HTML help file
To build HTML help file is shown in the following step:
- 1. Intall HTML Help Workshop from below site:
+ 1. Install HTML Help Workshop from below site:
http://www.microsoft.com/en-us/download/details.aspx?id=21138
2. Copy document files with batch file on command prompt.
Modified: branches/4-stable/doc/en/html/usage/tips/vim.html
===================================================================
--- branches/4-stable/doc/en/html/usage/tips/vim.html 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/html/usage/tips/vim.html 2020-01-30 10:17:47 UTC (rev 8514)
@@ -65,7 +65,7 @@
Auto indent can be disabled on pasting from clipboard
-NOTE: When text is pasted by using Vim 8.0.0238 or later , auto indent and completion are disabled not below configuration becasue the vim editor supports Bracketed Paste Mode.
+NOTE: When text is pasted by using Vim 8.0.0238 or later, auto indent and completion are disabled not below configuration because the vim editor supports Bracketed Paste Mode.
However, when tmux is used, below configuration is needed because Bracketed Paste Mode is not enabled.
Modified: branches/4-stable/doc/en/teraterm.hhc
===================================================================
--- branches/4-stable/doc/en/teraterm.hhc 2020-01-30 10:10:47 UTC (rev 8513)
+++ branches/4-stable/doc/en/teraterm.hhc 2020-01-30 10:17:47 UTC (rev 8514)
@@ -386,7 +386,7 @@
-
+
From scmnotify @ osdn.net Thu Jan 30 19:17:52 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Thu, 30 Jan 2020 19:17:52 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MTVdIOODk+ODq+ODieaZguOBq+eUnw==?=
=?utf-8?b?5oiQ44GV44KM44KL44OQ44Kk44OK44OqL+OCouODvOOCq+OCpOODluOCkg==?=
=?utf-8?b?5YmK6Zmk?=
Message-ID: <1580379472.943337.115131.nullmailer@users.osdn.me>
Revision: 8515
https://osdn.net/projects/ttssh2/scm/svn/commits/8515
Author: doda
Date: 2020-01-30 19:17:52 +0900 (Thu, 30 Jan 2020)
Log Message:
-----------
ビルド時に生成されるバイナリ/アーカイブを削除
誤コミットの原因となる為
Removed Paths:
-------------
branches/4-stable/cygterm/cyglaunch.exe
branches/4-stable/cygterm/cygterm+.tar.gz
branches/4-stable/cygterm/cygterm.exe
-------------- next part --------------
Deleted: branches/4-stable/cygterm/cyglaunch.exe
===================================================================
(Binary files differ)
Deleted: branches/4-stable/cygterm/cygterm+.tar.gz
===================================================================
(Binary files differ)
Deleted: branches/4-stable/cygterm/cygterm.exe
===================================================================
(Binary files differ)
From scmnotify @ osdn.net Fri Jan 31 08:42:36 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Fri, 31 Jan 2020 08:42:36 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MTZdIE9wZW5IZWxwKCkg44Oq44OV44Kh?=
=?utf-8?b?44Kv44K/44Oq44Oz44Kw?=
Message-ID: <1580427756.665334.105064.nullmailer@users.osdn.me>
Revision: 8516
https://osdn.net/projects/ttssh2/scm/svn/commits/8516
Author: zmatsuo
Date: 2020-01-31 08:42:36 +0900 (Fri, 31 Jan 2020)
Log Message:
-----------
OpenHelp() リファクタリング
Modified Paths:
--------------
trunk/teraterm/ttpcmn/ttcmn.c
-------------- next part --------------
Modified: trunk/teraterm/ttpcmn/ttcmn.c
===================================================================
--- trunk/teraterm/ttpcmn/ttcmn.c 2020-01-30 10:17:52 UTC (rev 8515)
+++ trunk/teraterm/ttpcmn/ttcmn.c 2020-01-30 23:42:36 UTC (rev 8516)
@@ -1168,7 +1168,7 @@
HWND HWin;
wchar_t HelpFN[MAX_PATH];
wchar_t uimsg[MAX_UIMSG];
- wchar_t *HomeDirT;
+ wchar_t *HomeDirW;
/* Get home directory */
if (GetModuleFileNameA(NULL,Temp,_countof(Temp)) == 0) {
@@ -1175,29 +1175,22 @@
return;
}
ExtractDirName(Temp, HomeDir);
- HomeDirT = ToWcharA(HomeDir);
-
+ HomeDirW = ToWcharA(HomeDir);
get_lang_msgW("HELPFILE", uimsg, _countof(uimsg), L"teraterm.chm", UILanguageFile);
+ _snwprintf_s(HelpFN, _countof(HelpFN), _TRUNCATE, L"%s\\%s", HomeDirW, uimsg);
+ free(HomeDirW);
// \x83w\x83\x8B\x83v\x82̃I\x81[\x83i\x81[\x82͏\xED\x82Ƀf\x83X\x83N\x83g\x83b\x83v\x82ɂȂ\xE9 (2007.5.12 maya)
HWin = GetDesktopWindow();
- _snwprintf_s(HelpFN, _countof(HelpFN), _TRUNCATE, L"%s\\%s", HomeDirT, uimsg);
if (_HtmlHelpW(HWin, HelpFN, Command, Data) == NULL && Command != HH_CLOSE_ALL) {
- goto error;
- }
- goto finish;
-
-error:
- {
+ // \x83w\x83\x8B\x83v\x82\xAA\x8AJ\x82\xAF\x82Ȃ\xA9\x82\xC1\x82\xBD
wchar_t buf[MAX_PATH];
get_lang_msgW("MSG_OPENHELP_ERROR", uimsg, _countof(uimsg),
L"Can't open HTML help file(%s).", UILanguageFile);
_snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg, HelpFN);
_MessageBoxW(HWin, buf, L"Tera Term: HTML help", MB_OK | MB_ICONERROR);
+ return;
}
-
-finish:
- free(HomeDirT);
}
HWND WINAPI GetNthWin(int n)
From scmnotify @ osdn.net Fri Jan 31 08:42:44 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Fri, 31 Jan 2020 08:42:44 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MTddIOODnuODq+ODgeODouODi+OCvw==?=
=?utf-8?b?6Zai6YCj44GuQVBJ44KS55u05o6l5ZG844Gw44Gq44GE44KI44GG44Gr44GX?=
=?utf-8?b?44Gf?=
Message-ID: <1580427764.518284.105185.nullmailer@users.osdn.me>
Revision: 8517
https://osdn.net/projects/ttssh2/scm/svn/commits/8517
Author: zmatsuo
Date: 2020-01-31 08:42:44 +0900 (Fri, 31 Jan 2020)
Log Message:
-----------
マルチモニタ関連のAPIを直接呼ばないようにした
- まだ使用している箇所があったので修正
- pMonitorFromRect(), pGetMonitorInfoA()
- r8504
Revision Links:
--------------
https://osdn.net/projects/ttssh2/scm/svn/commits/8504
Modified Paths:
--------------
trunk/teraterm/common/compat_win.cpp
trunk/teraterm/common/compat_win.h
trunk/teraterm/ttpcmn/ttcmn.c
-------------- next part --------------
Modified: trunk/teraterm/common/compat_win.cpp
===================================================================
--- trunk/teraterm/common/compat_win.cpp 2020-01-30 23:42:36 UTC (rev 8516)
+++ trunk/teraterm/common/compat_win.cpp 2020-01-30 23:42:44 UTC (rev 8517)
@@ -61,7 +61,6 @@
BOOL (WINAPI *pRemoveFontResourceExA)(LPCSTR name, DWORD fl, PVOID pdv);
BOOL (WINAPI *pRemoveFontResourceExW)(LPCWSTR name, DWORD fl, PVOID pdv);
HRESULT (WINAPI *pGetDpiForMonitor)(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT *dpiX, UINT *dpiY);
-HMONITOR (WINAPI *pMonitorFromRect)(LPCRECT lprc, DWORD dwFlags);
BOOL (WINAPI *pAdjustWindowRectEx)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);
BOOL (WINAPI *pAdjustWindowRectExForDpi)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi);
HWND (WINAPI *pGetConsoleWindow)(void);
@@ -76,6 +75,7 @@
HMONITOR (WINAPI *pMonitorFromWindow)(HWND hwnd, DWORD dwFlags);
HMONITOR (WINAPI *pMonitorFromPoint)(POINT pt, DWORD dwFlags);
+HMONITOR (WINAPI *pMonitorFromRect)(LPCRECT lprc, DWORD dwFlags);
BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR hMonitor, LPMONITORINFO lpmi);
/**
Modified: trunk/teraterm/common/compat_win.h
===================================================================
--- trunk/teraterm/common/compat_win.h 2020-01-30 23:42:36 UTC (rev 8516)
+++ trunk/teraterm/common/compat_win.h 2020-01-30 23:42:44 UTC (rev 8517)
@@ -106,6 +106,7 @@
extern BOOL (WINAPI *pAppendMenuW)(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCWSTR lpNewItem);
extern HMONITOR (WINAPI *pMonitorFromWindow)(HWND hwnd, DWORD dwFlags);
extern HMONITOR (WINAPI *pMonitorFromPoint)(POINT pt, DWORD dwFlags);
+extern HMONITOR (WINAPI *pMonitorFromRect)(LPCRECT lprc, DWORD dwFlags);
extern BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR hMonitor, LPMONITORINFO lpmi);
Modified: trunk/teraterm/ttpcmn/ttcmn.c
===================================================================
--- trunk/teraterm/ttpcmn/ttcmn.c 2020-01-30 23:42:36 UTC (rev 8516)
+++ trunk/teraterm/ttpcmn/ttcmn.c 2020-01-30 23:42:44 UTC (rev 8517)
@@ -1098,8 +1098,6 @@
int i;
WINDOWPLACEMENT rc0;
RECT rc;
- HMONITOR hMonitor;
- MONITORINFO mi;
int stat = SW_RESTORE;
int multi_mon = 0;
@@ -1120,9 +1118,11 @@
// NT4.0, 95 \x82̓}\x83\x8B\x83`\x83\x82\x83j\x83^API\x82ɔ\xF1\x91Ή\x9E
if (multi_mon) {
// \x91Ώۃ\x82\x83j\x83^\x82̏\xEE\x95\xF1\x82\xF0\x8E擾
- hMonitor = MonitorFromRect(&rc, MONITOR_DEFAULTTONEAREST);
+ HMONITOR hMonitor;
+ MONITORINFO mi;
+ hMonitor = pMonitorFromRect(&rc, MONITOR_DEFAULTTONEAREST);
mi.cbSize = sizeof(MONITORINFO);
- GetMonitorInfo(hMonitor, &mi);
+ pGetMonitorInfoA(hMonitor, &mi);
// \x88ʒu\x95\x81i\x95\x9C\x8C\xB3\x91O\x8C\xE3\x82ʼn𑜓x\x82\xAA\x95ς\xED\x82\xC1\x82Ă\xA2\x82\xE9\x8Fꍇ\x82ւ̑\xF4\x81j
if (rc.right > mi.rcMonitor.right) {
From scmnotify @ osdn.net Fri Jan 31 08:42:48 2020
From: scmnotify @ osdn.net (scmnotify @ osdn.net)
Date: Fri, 31 Jan 2020 08:42:48 +0900
Subject: [Ttssh2-commit] =?utf-8?b?Wzg1MThdIFRTUEVDSUFMMS5UVEYg44Gu44Ot?=
=?utf-8?b?44O844OJ44KSIGxheWVyIGZvciB1bmljb2RlIOOCkuS9v+eUqOOBmeOCiw==?=
=?utf-8?b?44KI44GG44Gr44GX44Gf?=
Message-ID: <1580427768.096729.105277.nullmailer@users.osdn.me>
Revision: 8518
https://osdn.net/projects/ttssh2/scm/svn/commits/8518
Author: zmatsuo
Date: 2020-01-31 08:42:47 +0900 (Fri, 31 Jan 2020)
Log Message:
-----------
TSPECIAL1.TTF のロードを layer for unicode を使用するようにした
Modified Paths:
--------------
trunk/teraterm/common/compat_win.cpp
trunk/teraterm/common/compat_win.h
trunk/teraterm/common/layer_for_unicode.cpp
trunk/teraterm/common/layer_for_unicode.h
trunk/teraterm/teraterm/teraterm.cpp
-------------- next part --------------
Modified: trunk/teraterm/common/compat_win.cpp
===================================================================
--- trunk/teraterm/common/compat_win.cpp 2020-01-30 23:42:44 UTC (rev 8517)
+++ trunk/teraterm/common/compat_win.cpp 2020-01-30 23:42:47 UTC (rev 8518)
@@ -56,10 +56,6 @@
BOOL (WINAPI *pIsValidDpiAwarenessContext)(DPI_AWARENESS_CONTEXT dpiContext);
UINT (WINAPI *pGetDpiForWindow)(HWND hwnd);
BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
-int (WINAPI *pAddFontResourceExA)(LPCSTR name, DWORD fl, PVOID res);
-int (WINAPI *pAddFontResourceExW)(LPCWSTR name, DWORD fl, PVOID res);
-BOOL (WINAPI *pRemoveFontResourceExA)(LPCSTR name, DWORD fl, PVOID pdv);
-BOOL (WINAPI *pRemoveFontResourceExW)(LPCWSTR name, DWORD fl, PVOID pdv);
HRESULT (WINAPI *pGetDpiForMonitor)(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT *dpiX, UINT *dpiY);
BOOL (WINAPI *pAdjustWindowRectEx)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);
BOOL (WINAPI *pAdjustWindowRectExForDpi)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi);
@@ -67,6 +63,11 @@
int (WINAPI *pMessageBoxW)(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
INT_PTR (WINAPI *pDialogBoxIndirectParamW)(HINSTANCE hInstance, LPCDLGTEMPLATEW hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
+// gdi32.lib
+int (WINAPI *pAddFontResourceExW)(LPCWSTR name, DWORD fl, PVOID res);
+BOOL (WINAPI *pRemoveFontResourceExW)(LPCWSTR name, DWORD fl, PVOID pdv);
+
+// htmlhelp.ocx
HWND (WINAPI *pHtmlHelpW)(HWND hwndCaller, LPCWSTR pszFile, UINT uCommand, DWORD_PTR dwData);
HWND (WINAPI *pHtmlHelpA)(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD_PTR dwData);
@@ -147,8 +148,6 @@
};
static const APIInfo Lists_gdi32[] = {
- { "AddFontResourceExA", (void **)&pAddFontResourceExA },
- { "RemoveFontResourceExA", (void **)&pRemoveFontResourceExA },
{ "AddFontResourceExW", (void **)&pAddFontResourceExW },
{ "RemoveFontResourceExW", (void **)&pRemoveFontResourceExW },
{},
Modified: trunk/teraterm/common/compat_win.h
===================================================================
--- trunk/teraterm/common/compat_win.h 2020-01-30 23:42:44 UTC (rev 8517)
+++ trunk/teraterm/common/compat_win.h 2020-01-30 23:42:47 UTC (rev 8518)
@@ -93,9 +93,7 @@
extern BOOL (WINAPI *pAdjustWindowRectEx)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);
extern BOOL (WINAPI *pAdjustWindowRectExForDpi)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi);
extern BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
-extern int (WINAPI *pAddFontResourceExA)(LPCSTR name, DWORD fl, PVOID res);
extern int (WINAPI *pAddFontResourceExW)(LPCWSTR name, DWORD fl, PVOID res);
-extern BOOL (WINAPI *pRemoveFontResourceExA)(LPCSTR name, DWORD fl, PVOID pdv);
extern BOOL (WINAPI *pRemoveFontResourceExW)(LPCWSTR name, DWORD fl, PVOID pdv);
extern HWND (WINAPI *pGetConsoleWindow)(void);
extern int (WINAPI *pMessageBoxW)(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
@@ -110,14 +108,6 @@
extern BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR hMonitor, LPMONITORINFO lpmi);
-#ifdef UNICODE
-#define pAddFontResourceEx pAddFontResourceExW
-#define pRemoveFontResourceEx pRemoveFontResourceExW
-#else
-#define pAddFontResourceEx pAddFontResourceExA
-#define pRemoveFontResourceEx pRemoveFontResourceExA
-#endif // !UNICODE
-
void WinCompatInit();
#ifdef __cplusplus
Modified: trunk/teraterm/common/layer_for_unicode.cpp
===================================================================
--- trunk/teraterm/common/layer_for_unicode.cpp 2020-01-30 23:42:44 UTC (rev 8517)
+++ trunk/teraterm/common/layer_for_unicode.cpp 2020-01-30 23:42:47 UTC (rev 8518)
@@ -318,3 +318,37 @@
free(itemA);
return result;
}
+
+int _AddFontResourceExW(LPCWSTR name, DWORD fl, PVOID res)
+{
+ if (pAddFontResourceExW != NULL) {
+ /* Windows 2000\x88ȍ~\x82͎g\x82\xA6\x82\xE9\x82͂\xB8 */
+ return pAddFontResourceExW(name, fl, res);
+ }
+ return 0;
+}
+
+BOOL _RemoveFontResourceExW(LPCWSTR name, DWORD fl, PVOID pdv)
+{
+ if (pRemoveFontResourceExW != NULL) {
+ /* Windows 2000\x88ȍ~\x82͎g\x82\xA6\x82\xE9\x82͂\xB8 */
+ return pRemoveFontResourceExW(name, fl, pdv);
+ }
+ return FALSE;
+}
+
+int _AddFontResourceW(LPCWSTR lpFileName)
+{
+ char *filenameA = ToCharW(lpFileName);
+ int result = AddFontResourceA(filenameA);
+ free(filenameA);
+ return result;
+}
+
+BOOL _RemoveFontResourceW(LPCWSTR lpFileName)
+{
+ char *filenameA = ToCharW(lpFileName);
+ int result = RemoveFontResourceA(filenameA);
+ free(filenameA);
+ return result;
+}
Modified: trunk/teraterm/common/layer_for_unicode.h
===================================================================
--- trunk/teraterm/common/layer_for_unicode.h 2020-01-30 23:42:44 UTC (rev 8517)
+++ trunk/teraterm/common/layer_for_unicode.h 2020-01-30 23:42:47 UTC (rev 8518)
@@ -56,6 +56,12 @@
BOOL _AppendMenuW(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCWSTR lpNewItem);
HWND _HtmlHelpW(HWND hwndCaller, LPCWSTR pszFile, UINT uCommand, DWORD_PTR dwData);
+// gdi32.lib
+int _AddFontResourceW(LPCWSTR lpFileName);
+BOOL _RemoveFontResourceW(LPCWSTR lpFileName);
+int _AddFontResourceExW(LPCWSTR name, DWORD fl, PVOID res);
+BOOL _RemoveFontResourceExW(LPCWSTR name, DWORD fl, PVOID pdv);
+
// Comctl32.lib
HPROPSHEETPAGE _CreatePropertySheetPageW(LPCPROPSHEETPAGEW_V1 constPropSheetPagePointer);
INT_PTR _PropertySheetW(PROPSHEETHEADERW *constPropSheetHeaderPointer);
Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp 2020-01-30 23:42:44 UTC (rev 8517)
+++ trunk/teraterm/teraterm/teraterm.cpp 2020-01-30 23:42:47 UTC (rev 8518)
@@ -59,6 +59,7 @@
#if UNICODE_INTERNAL_BUFF
#include "sendmem.h"
#endif
+#include "layer_for_unicode.h"
#if defined(_DEBUG) && defined(_MSC_VER)
#define new ::new(_NORMAL_BLOCK, __FILE__, __LINE__)
@@ -65,45 +66,46 @@
#endif
static BOOL AddFontFlag;
-static TCHAR TSpecialFont[MAX_PATH];
+static wchar_t TSpecialFont[MAX_PATH];
static CVTWindow* pVTWin;
static void LoadSpecialFont()
{
- if (!IsExistFontA("Tera Special", SYMBOL_CHARSET, TRUE)) {
- int r;
+ if (IsExistFontA("Tera Special", SYMBOL_CHARSET, TRUE)) {
+ // \x82\xB7\x82łɑ\xB6\x8D݂\xB7\x82\xE9\x82̂Ń\x8D\x81[\x83h\x82\xB5\x82Ȃ\xA2
+ return;
+ }
- if (GetModuleFileName(NULL, TSpecialFont,_countof(TSpecialFont)) == 0) {
- AddFontFlag = FALSE;
- return;
- }
- *_tcsrchr(TSpecialFont, _T('\\')) = 0;
- _tcscat_s(TSpecialFont, _T("\\TSPECIAL1.TTF"));
+ if (GetModuleFileNameW(NULL, TSpecialFont, _countof(TSpecialFont)) == 0) {
+ AddFontFlag = FALSE;
+ return;
+ }
+ *wcsrchr(TSpecialFont, L'\\') = 0;
+ wcscat_s(TSpecialFont, L"\\TSPECIAL1.TTF");
- if (pAddFontResourceEx != NULL) {
- // teraterm.exe\x82݂̂ŗL\x8C\xF8\x82ȃt\x83H\x83\x93\x83g\x82ƂȂ\xE9\x81B
- // remove\x82\xB5\x82Ȃ\xAD\x82Ă\xE0\x8FI\x97\xB9\x82\xB7\x82\xE9\x82\xC6OS\x82\xA9\x82\xE7\x82Ȃ\xAD\x82Ȃ\xE9
- r = pAddFontResourceEx(TSpecialFont, FR_PRIVATE, NULL);
- } else {
- // \x83V\x83X\x83e\x83\x80\x91S\x91̂Ŏg\x82\xA6\x82\xE9\x83t\x83H\x83\x93\x83g\x82ƂȂ\xE9
- // remove\x82\xB5\x82Ȃ\xA2\x82\xC6OS\x82\xAA\x92͂܂܂ƂȂ\xE9
- r = AddFontResource(TSpecialFont);
- }
- if (r != 0) {
- AddFontFlag = TRUE;
- }
+ // teraterm.exe\x82݂̂ŗL\x8C\xF8\x82ȃt\x83H\x83\x93\x83g\x82ƂȂ\xE9\x81B
+ // remove\x82\xB5\x82Ȃ\xAD\x82Ă\xE0\x8FI\x97\xB9\x82\xB7\x82\xE9\x82\xC6OS\x82\xA9\x82\xE7\x82Ȃ\xAD\x82Ȃ\xE9
+ int r = _AddFontResourceExW(TSpecialFont, FR_PRIVATE, NULL);
+ if (r == 0) {
+ // AddFontResourceEx() \x82\xAA\x8Eg\x82\xA6\x82Ȃ\xA9\x82\xC1\x82\xBD
+ // \x83V\x83X\x83e\x83\x80\x91S\x91̂Ŏg\x82\xA6\x82\xE9\x83t\x83H\x83\x93\x83g\x82ƂȂ\xE9
+ // remove\x82\xB5\x82Ȃ\xA2\x82\xC6OS\x82\xAA\x92͂܂܂ƂȂ\xE9
+ r = _AddFontResourceW(TSpecialFont);
}
+ if (r != 0) {
+ AddFontFlag = TRUE;
+ }
}
static void UnloadSpecialFont()
{
- if (AddFontFlag) {
- if (pRemoveFontResourceEx != NULL) {
- pRemoveFontResourceEx(TSpecialFont, FR_PRIVATE, NULL);
- } else {
- RemoveFontResource(TSpecialFont);
- }
+ if (!AddFontFlag) {
+ return;
}
+ int r = _RemoveFontResourceExW(TSpecialFont, FR_PRIVATE, NULL);
+ if (r == 0) {
+ _RemoveFontResourceW(TSpecialFont);
+ }
}
static void init()